@angular/cdk 15.1.0-rc.0 → 15.1.1

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 (201) hide show
  1. package/drag-drop/index.d.ts +11 -0
  2. package/esm2020/a11y/a11y-module.mjs +5 -5
  3. package/esm2020/a11y/aria-describer/aria-describer.mjs +4 -4
  4. package/esm2020/a11y/focus-monitor/focus-monitor.mjs +7 -7
  5. package/esm2020/a11y/focus-trap/configurable-focus-trap-factory.mjs +4 -4
  6. package/esm2020/a11y/focus-trap/configurable-focus-trap.mjs +7 -7
  7. package/esm2020/a11y/focus-trap/focus-trap-manager.mjs +4 -4
  8. package/esm2020/a11y/focus-trap/focus-trap.mjs +30 -30
  9. package/esm2020/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +4 -4
  10. package/esm2020/a11y/input-modality/input-modality-detector.mjs +8 -8
  11. package/esm2020/a11y/interactivity-checker/interactivity-checker.mjs +4 -4
  12. package/esm2020/a11y/live-announcer/live-announcer.mjs +14 -14
  13. package/esm2020/accordion/accordion-item.mjs +38 -38
  14. package/esm2020/accordion/accordion-module.mjs +5 -5
  15. package/esm2020/accordion/accordion.mjs +4 -4
  16. package/esm2020/bidi/bidi-module.mjs +5 -5
  17. package/esm2020/bidi/dir.mjs +4 -4
  18. package/esm2020/bidi/directionality.mjs +4 -4
  19. package/esm2020/clipboard/clipboard-module.mjs +5 -5
  20. package/esm2020/clipboard/clipboard.mjs +4 -4
  21. package/esm2020/clipboard/copy-to-clipboard.mjs +4 -4
  22. package/esm2020/collections/selection-model.mjs +8 -8
  23. package/esm2020/collections/unique-selection-dispatcher.mjs +4 -4
  24. package/esm2020/dialog/dialog-container.mjs +4 -4
  25. package/esm2020/dialog/dialog-module.mjs +5 -5
  26. package/esm2020/dialog/dialog.mjs +12 -12
  27. package/esm2020/drag-drop/directives/drag-handle.mjs +12 -12
  28. package/esm2020/drag-drop/directives/drag-placeholder.mjs +4 -4
  29. package/esm2020/drag-drop/directives/drag-preview.mjs +8 -8
  30. package/esm2020/drag-drop/directives/drag.mjs +12 -12
  31. package/esm2020/drag-drop/directives/drop-list-group.mjs +4 -4
  32. package/esm2020/drag-drop/directives/drop-list.mjs +17 -16
  33. package/esm2020/drag-drop/drag-drop-module.mjs +5 -5
  34. package/esm2020/drag-drop/drag-drop-registry.mjs +4 -4
  35. package/esm2020/drag-drop/drag-drop.mjs +4 -4
  36. package/esm2020/drag-drop/drag-ref.mjs +13 -13
  37. package/esm2020/drag-drop/drop-list-ref.mjs +13 -1
  38. package/esm2020/layout/breakpoints-observer.mjs +4 -4
  39. package/esm2020/layout/layout-module.mjs +5 -5
  40. package/esm2020/layout/media-matcher.mjs +4 -4
  41. package/esm2020/listbox/listbox-module.mjs +5 -5
  42. package/esm2020/listbox/listbox.mjs +7 -7
  43. package/esm2020/menu/context-menu-trigger.mjs +14 -14
  44. package/esm2020/menu/menu-aim.mjs +7 -7
  45. package/esm2020/menu/menu-bar.mjs +4 -4
  46. package/esm2020/menu/menu-base.mjs +4 -4
  47. package/esm2020/menu/menu-group.mjs +4 -4
  48. package/esm2020/menu/menu-item-checkbox.mjs +4 -4
  49. package/esm2020/menu/menu-item-radio.mjs +4 -4
  50. package/esm2020/menu/menu-item-selectable.mjs +4 -4
  51. package/esm2020/menu/menu-item.mjs +15 -15
  52. package/esm2020/menu/menu-module.mjs +5 -5
  53. package/esm2020/menu/menu-stack.mjs +4 -4
  54. package/esm2020/menu/menu-trigger-base.mjs +4 -4
  55. package/esm2020/menu/menu-trigger.mjs +4 -4
  56. package/esm2020/menu/menu.mjs +4 -4
  57. package/esm2020/observers/observe-content.mjs +23 -23
  58. package/esm2020/overlay/dispatchers/base-overlay-dispatcher.mjs +4 -4
  59. package/esm2020/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +4 -4
  60. package/esm2020/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +4 -4
  61. package/esm2020/overlay/fullscreen-overlay-container.mjs +4 -4
  62. package/esm2020/overlay/overlay-container.mjs +4 -4
  63. package/esm2020/overlay/overlay-directives.mjs +42 -42
  64. package/esm2020/overlay/overlay-module.mjs +5 -5
  65. package/esm2020/overlay/overlay.mjs +4 -4
  66. package/esm2020/overlay/position/flexible-connected-position-strategy.mjs +5 -5
  67. package/esm2020/overlay/position/overlay-position-builder.mjs +4 -4
  68. package/esm2020/overlay/scroll/scroll-strategy-options.mjs +4 -4
  69. package/esm2020/platform/platform-module.mjs +5 -5
  70. package/esm2020/platform/platform.mjs +4 -4
  71. package/esm2020/portal/portal-directives.mjs +17 -17
  72. package/esm2020/scrolling/fixed-size-virtual-scroll.mjs +4 -4
  73. package/esm2020/scrolling/scroll-dispatcher.mjs +4 -4
  74. package/esm2020/scrolling/scrollable.mjs +4 -4
  75. package/esm2020/scrolling/scrolling-module.mjs +9 -9
  76. package/esm2020/scrolling/viewport-ruler.mjs +4 -4
  77. package/esm2020/scrolling/virtual-for-of.mjs +48 -48
  78. package/esm2020/scrolling/virtual-scroll-viewport.mjs +24 -24
  79. package/esm2020/scrolling/virtual-scrollable-element.mjs +4 -4
  80. package/esm2020/scrolling/virtual-scrollable-window.mjs +4 -4
  81. package/esm2020/scrolling/virtual-scrollable.mjs +4 -4
  82. package/esm2020/stepper/step-header.mjs +4 -4
  83. package/esm2020/stepper/step-label.mjs +4 -4
  84. package/esm2020/stepper/stepper-button.mjs +7 -7
  85. package/esm2020/stepper/stepper-module.mjs +5 -5
  86. package/esm2020/stepper/stepper.mjs +37 -37
  87. package/esm2020/table/can-stick.mjs +7 -7
  88. package/esm2020/table/cell.mjs +27 -27
  89. package/esm2020/table/coalesced-style-scheduler.mjs +4 -4
  90. package/esm2020/table/row.mjs +28 -28
  91. package/esm2020/table/table-module.mjs +5 -5
  92. package/esm2020/table/table.mjs +93 -93
  93. package/esm2020/table/text-column.mjs +14 -14
  94. package/esm2020/testing/harness-environment.mjs +4 -4
  95. package/esm2020/text-field/autofill.mjs +7 -7
  96. package/esm2020/text-field/autosize.mjs +26 -26
  97. package/esm2020/text-field/text-field-module.mjs +5 -5
  98. package/esm2020/tree/nested-node.mjs +4 -4
  99. package/esm2020/tree/node.mjs +4 -4
  100. package/esm2020/tree/outlet.mjs +4 -4
  101. package/esm2020/tree/padding.mjs +21 -21
  102. package/esm2020/tree/toggle.mjs +9 -9
  103. package/esm2020/tree/tree-module.mjs +5 -5
  104. package/esm2020/tree/tree.mjs +30 -30
  105. package/esm2020/version.mjs +1 -1
  106. package/fesm2015/a11y.mjs +80 -80
  107. package/fesm2015/a11y.mjs.map +1 -1
  108. package/fesm2015/accordion.mjs +44 -44
  109. package/fesm2015/accordion.mjs.map +1 -1
  110. package/fesm2015/bidi.mjs +10 -10
  111. package/fesm2015/bidi.mjs.map +1 -1
  112. package/fesm2015/cdk.mjs +1 -1
  113. package/fesm2015/cdk.mjs.map +1 -1
  114. package/fesm2015/clipboard.mjs +10 -10
  115. package/fesm2015/clipboard.mjs.map +1 -1
  116. package/fesm2015/collections.mjs +10 -10
  117. package/fesm2015/collections.mjs.map +1 -1
  118. package/fesm2015/dialog.mjs +18 -18
  119. package/fesm2015/dialog.mjs.map +1 -1
  120. package/fesm2015/drag-drop.mjs +84 -71
  121. package/fesm2015/drag-drop.mjs.map +1 -1
  122. package/fesm2015/layout.mjs +10 -10
  123. package/fesm2015/layout.mjs.map +1 -1
  124. package/fesm2015/listbox.mjs +10 -10
  125. package/fesm2015/listbox.mjs.map +1 -1
  126. package/fesm2015/menu.mjs +68 -68
  127. package/fesm2015/menu.mjs.map +1 -1
  128. package/fesm2015/observers.mjs +22 -22
  129. package/fesm2015/observers.mjs.map +1 -1
  130. package/fesm2015/overlay.mjs +73 -73
  131. package/fesm2015/overlay.mjs.map +1 -1
  132. package/fesm2015/platform.mjs +7 -7
  133. package/fesm2015/platform.mjs.map +1 -1
  134. package/fesm2015/portal.mjs +16 -16
  135. package/fesm2015/portal.mjs.map +1 -1
  136. package/fesm2015/scrolling.mjs +99 -99
  137. package/fesm2015/scrolling.mjs.map +1 -1
  138. package/fesm2015/stepper.mjs +52 -52
  139. package/fesm2015/stepper.mjs.map +1 -1
  140. package/fesm2015/table.mjs +171 -171
  141. package/fesm2015/table.mjs.map +1 -1
  142. package/fesm2015/testing.mjs +3 -3
  143. package/fesm2015/testing.mjs.map +1 -1
  144. package/fesm2015/text-field.mjs +35 -35
  145. package/fesm2015/text-field.mjs.map +1 -1
  146. package/fesm2015/tree.mjs +70 -70
  147. package/fesm2015/tree.mjs.map +1 -1
  148. package/fesm2020/a11y.mjs +80 -80
  149. package/fesm2020/a11y.mjs.map +1 -1
  150. package/fesm2020/accordion.mjs +44 -44
  151. package/fesm2020/accordion.mjs.map +1 -1
  152. package/fesm2020/bidi.mjs +10 -10
  153. package/fesm2020/bidi.mjs.map +1 -1
  154. package/fesm2020/cdk.mjs +1 -1
  155. package/fesm2020/cdk.mjs.map +1 -1
  156. package/fesm2020/clipboard.mjs +10 -10
  157. package/fesm2020/clipboard.mjs.map +1 -1
  158. package/fesm2020/collections.mjs +10 -10
  159. package/fesm2020/collections.mjs.map +1 -1
  160. package/fesm2020/dialog.mjs +18 -18
  161. package/fesm2020/dialog.mjs.map +1 -1
  162. package/fesm2020/drag-drop.mjs +84 -71
  163. package/fesm2020/drag-drop.mjs.map +1 -1
  164. package/fesm2020/layout.mjs +10 -10
  165. package/fesm2020/layout.mjs.map +1 -1
  166. package/fesm2020/listbox.mjs +10 -10
  167. package/fesm2020/listbox.mjs.map +1 -1
  168. package/fesm2020/menu.mjs +67 -67
  169. package/fesm2020/menu.mjs.map +1 -1
  170. package/fesm2020/observers.mjs +22 -22
  171. package/fesm2020/observers.mjs.map +1 -1
  172. package/fesm2020/overlay.mjs +73 -73
  173. package/fesm2020/overlay.mjs.map +1 -1
  174. package/fesm2020/platform.mjs +7 -7
  175. package/fesm2020/platform.mjs.map +1 -1
  176. package/fesm2020/portal.mjs +16 -16
  177. package/fesm2020/portal.mjs.map +1 -1
  178. package/fesm2020/scrolling.mjs +99 -99
  179. package/fesm2020/scrolling.mjs.map +1 -1
  180. package/fesm2020/stepper.mjs +52 -52
  181. package/fesm2020/stepper.mjs.map +1 -1
  182. package/fesm2020/table.mjs +171 -171
  183. package/fesm2020/table.mjs.map +1 -1
  184. package/fesm2020/testing.mjs +3 -3
  185. package/fesm2020/testing.mjs.map +1 -1
  186. package/fesm2020/text-field.mjs +35 -35
  187. package/fesm2020/text-field.mjs.map +1 -1
  188. package/fesm2020/tree.mjs +70 -70
  189. package/fesm2020/tree.mjs.map +1 -1
  190. package/package.json +3 -3
  191. package/schematics/ng-add/index.js +1 -1
  192. package/schematics/ng-add/index.mjs +1 -1
  193. package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  194. package/schematics/ng-update/devkit-migration-rule.d.ts +2 -2
  195. package/schematics/ng-update/devkit-migration.d.ts +2 -2
  196. package/schematics/update-tool/file-system.d.ts +1 -1
  197. package/schematics/update-tool/migration.d.ts +3 -3
  198. package/schematics/update-tool/utils/decorators.d.ts +1 -1
  199. package/schematics/update-tool/utils/property-name.d.ts +1 -1
  200. package/schematics/update-tool/version-changes.d.ts +3 -3
  201. package/schematics/utils/parse5-element.d.ts +2 -2
@@ -345,6 +345,18 @@ const dragImportantProperties = new Set([
345
345
  * Reference to a draggable item. Used to manipulate or dispose of the item.
346
346
  */
347
347
  class DragRef {
348
+ /** Whether starting to drag this element is disabled. */
349
+ get disabled() {
350
+ return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);
351
+ }
352
+ set disabled(value) {
353
+ const newValue = coerceBooleanProperty(value);
354
+ if (newValue !== this._disabled) {
355
+ this._disabled = newValue;
356
+ this._toggleNativeDragInteractions();
357
+ this._handles.forEach(handle => toggleNativeDragInteractions(handle, newValue));
358
+ }
359
+ }
348
360
  constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {
349
361
  this._config = _config;
350
362
  this._document = _document;
@@ -512,18 +524,6 @@ class DragRef {
512
524
  this._parentPositions = new ParentPositionTracker(_document);
513
525
  _dragDropRegistry.registerDragItem(this);
514
526
  }
515
- /** Whether starting to drag this element is disabled. */
516
- get disabled() {
517
- return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);
518
- }
519
- set disabled(value) {
520
- const newValue = coerceBooleanProperty(value);
521
- if (newValue !== this._disabled) {
522
- this._disabled = newValue;
523
- this._toggleNativeDragInteractions();
524
- this._handles.forEach(handle => toggleNativeDragInteractions(handle, newValue));
525
- }
526
- }
527
527
  /**
528
528
  * Returns the element that is being used as a placeholder
529
529
  * while the current element is being dragged.
@@ -1910,6 +1910,10 @@ class DropListRef {
1910
1910
  this.dropped = new Subject();
1911
1911
  /** Emits as the user is swapping items while actively dragging. */
1912
1912
  this.sorted = new Subject();
1913
+ /** Emits when a dragging sequence is started in a list connected to the current one. */
1914
+ this.receivingStarted = new Subject();
1915
+ /** Emits when a dragging sequence is stopped from a list connected to the current one. */
1916
+ this.receivingStopped = new Subject();
1913
1917
  /** Whether an item in the list is being dragged. */
1914
1918
  this._isDragging = false;
1915
1919
  /** Draggable items in the container. */
@@ -1968,6 +1972,8 @@ class DropListRef {
1968
1972
  this.exited.complete();
1969
1973
  this.dropped.complete();
1970
1974
  this.sorted.complete();
1975
+ this.receivingStarted.complete();
1976
+ this.receivingStopped.complete();
1971
1977
  this._activeSiblings.clear();
1972
1978
  this._scrollNode = null;
1973
1979
  this._parentPositions.clear();
@@ -2298,6 +2304,11 @@ class DropListRef {
2298
2304
  activeSiblings.add(sibling);
2299
2305
  this._cacheParentPositions();
2300
2306
  this._listenToScrollEvents();
2307
+ this.receivingStarted.next({
2308
+ initiator: sibling,
2309
+ receiver: this,
2310
+ items,
2311
+ });
2301
2312
  }
2302
2313
  }
2303
2314
  /**
@@ -2307,6 +2318,7 @@ class DropListRef {
2307
2318
  _stopReceiving(sibling) {
2308
2319
  this._activeSiblings.delete(sibling);
2309
2320
  this._viewportScrollSubscription.unsubscribe();
2321
+ this.receivingStopped.next({ initiator: sibling, receiver: this });
2310
2322
  }
2311
2323
  /**
2312
2324
  * Starts listening to scroll events on the viewport.
@@ -2638,9 +2650,9 @@ class DragDropRegistry {
2638
2650
  this._globalListeners.clear();
2639
2651
  }
2640
2652
  }
2641
- DragDropRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDropRegistry, deps: [{ token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
2642
- DragDropRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDropRegistry, providedIn: 'root' });
2643
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDropRegistry, decorators: [{
2653
+ DragDropRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDropRegistry, deps: [{ token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
2654
+ DragDropRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDropRegistry, providedIn: 'root' });
2655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDropRegistry, decorators: [{
2644
2656
  type: Injectable,
2645
2657
  args: [{ providedIn: 'root' }]
2646
2658
  }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: undefined, decorators: [{
@@ -2686,9 +2698,9 @@ class DragDrop {
2686
2698
  return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
2687
2699
  }
2688
2700
  }
2689
- DragDrop.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDrop, deps: [{ token: DOCUMENT }, { token: i0.NgZone }, { token: i1.ViewportRuler }, { token: DragDropRegistry }], target: i0.ɵɵFactoryTarget.Injectable });
2690
- DragDrop.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDrop, providedIn: 'root' });
2691
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDrop, decorators: [{
2701
+ DragDrop.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDrop, deps: [{ token: DOCUMENT }, { token: i0.NgZone }, { token: i1.ViewportRuler }, { token: DragDropRegistry }], target: i0.ɵɵFactoryTarget.Injectable });
2702
+ DragDrop.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDrop, providedIn: 'root' });
2703
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDrop, decorators: [{
2692
2704
  type: Injectable,
2693
2705
  args: [{ providedIn: 'root' }]
2694
2706
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -2755,9 +2767,9 @@ class CdkDropListGroup {
2755
2767
  this._items.clear();
2756
2768
  }
2757
2769
  }
2758
- CdkDropListGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDropListGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2759
- CdkDropListGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.3", type: CdkDropListGroup, isStandalone: true, selector: "[cdkDropListGroup]", inputs: { disabled: ["cdkDropListGroupDisabled", "disabled"] }, providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }], exportAs: ["cdkDropListGroup"], ngImport: i0 });
2760
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDropListGroup, decorators: [{
2770
+ CdkDropListGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDropListGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2771
+ CdkDropListGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0", type: CdkDropListGroup, isStandalone: true, selector: "[cdkDropListGroup]", inputs: { disabled: ["cdkDropListGroupDisabled", "disabled"] }, providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }], exportAs: ["cdkDropListGroup"], ngImport: i0 });
2772
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDropListGroup, decorators: [{
2761
2773
  type: Directive,
2762
2774
  args: [{
2763
2775
  selector: '[cdkDropListGroup]',
@@ -2818,6 +2830,17 @@ let _uniqueIdCounter = 0;
2818
2830
  const CDK_DROP_LIST = new InjectionToken('CdkDropList');
2819
2831
  /** Container that wraps a set of draggable items. */
2820
2832
  class CdkDropList {
2833
+ /** Whether starting a dragging sequence from this container is disabled. */
2834
+ get disabled() {
2835
+ return this._disabled || (!!this._group && this._group.disabled);
2836
+ }
2837
+ set disabled(value) {
2838
+ // Usually we sync the directive and ref state right before dragging starts, in order to have
2839
+ // a single point of failure and to avoid having to use setters for everything. `disabled` is
2840
+ // a special case, because it can prevent the `beforeStarted` event from firing, which can lock
2841
+ // the user in a disabled state, so we also need to sync it as it's being set.
2842
+ this._dropListRef.disabled = this._disabled = coerceBooleanProperty(value);
2843
+ }
2821
2844
  constructor(
2822
2845
  /** Element that the drop list is attached to. */
2823
2846
  element, dragDrop, _changeDetectorRef, _scrollDispatcher, _dir, _group, config) {
@@ -2888,17 +2911,6 @@ class CdkDropList {
2888
2911
  _group._items.add(this);
2889
2912
  }
2890
2913
  }
2891
- /** Whether starting a dragging sequence from this container is disabled. */
2892
- get disabled() {
2893
- return this._disabled || (!!this._group && this._group.disabled);
2894
- }
2895
- set disabled(value) {
2896
- // Usually we sync the directive and ref state right before dragging starts, in order to have
2897
- // a single point of failure and to avoid having to use setters for everything. `disabled` is
2898
- // a special case, because it can prevent the `beforeStarted` event from firing, which can lock
2899
- // the user in a disabled state, so we also need to sync it as it's being set.
2900
- this._dropListRef.disabled = this._disabled = coerceBooleanProperty(value);
2901
- }
2902
2914
  /** Registers an items with the drop list. */
2903
2915
  addItem(item) {
2904
2916
  this._unsortedItems.add(item);
@@ -3028,6 +3040,7 @@ class CdkDropList {
3028
3040
  // detection and we're not guaranteed for something else to have triggered it.
3029
3041
  this._changeDetectorRef.markForCheck();
3030
3042
  });
3043
+ merge(ref.receivingStarted, ref.receivingStopped).subscribe(() => this._changeDetectorRef.markForCheck());
3031
3044
  }
3032
3045
  /** Assigns the default input values based on a provided config object. */
3033
3046
  _assignDefaults(config) {
@@ -3047,13 +3060,13 @@ class CdkDropList {
3047
3060
  }
3048
3061
  /** Keeps track of the drop lists that are currently on the page. */
3049
3062
  CdkDropList._dropLists = [];
3050
- CdkDropList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDropList, deps: [{ token: i0.ElementRef }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: i1.ScrollDispatcher }, { token: i3.Directionality, optional: true }, { token: CDK_DROP_LIST_GROUP, optional: true, skipSelf: true }, { token: CDK_DRAG_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3051
- CdkDropList.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.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"], sortingDisabled: ["cdkDropListSortingDisabled", "sortingDisabled"], enterPredicate: ["cdkDropListEnterPredicate", "enterPredicate"], sortPredicate: ["cdkDropListSortPredicate", "sortPredicate"], autoScrollDisabled: ["cdkDropListAutoScrollDisabled", "autoScrollDisabled"], autoScrollStep: ["cdkDropListAutoScrollStep", "autoScrollStep"] }, 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: [
3063
+ CdkDropList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDropList, deps: [{ token: i0.ElementRef }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: i1.ScrollDispatcher }, { token: i3.Directionality, optional: true }, { token: CDK_DROP_LIST_GROUP, optional: true, skipSelf: true }, { token: CDK_DRAG_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3064
+ CdkDropList.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0", 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"], sortingDisabled: ["cdkDropListSortingDisabled", "sortingDisabled"], enterPredicate: ["cdkDropListEnterPredicate", "enterPredicate"], sortPredicate: ["cdkDropListSortPredicate", "sortPredicate"], autoScrollDisabled: ["cdkDropListAutoScrollDisabled", "autoScrollDisabled"], autoScrollStep: ["cdkDropListAutoScrollStep", "autoScrollStep"] }, 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: [
3052
3065
  // Prevent child drop lists from picking up the same group as their parent.
3053
3066
  { provide: CDK_DROP_LIST_GROUP, useValue: undefined },
3054
3067
  { provide: CDK_DROP_LIST, useExisting: CdkDropList },
3055
3068
  ], exportAs: ["cdkDropList"], ngImport: i0 });
3056
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDropList, decorators: [{
3069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDropList, decorators: [{
3057
3070
  type: Directive,
3058
3071
  args: [{
3059
3072
  selector: '[cdkDropList], cdk-drop-list',
@@ -3147,6 +3160,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3",
3147
3160
  const CDK_DRAG_HANDLE = new InjectionToken('CdkDragHandle');
3148
3161
  /** Handle that can be used to drag a CdkDrag instance. */
3149
3162
  class CdkDragHandle {
3163
+ /** Whether starting to drag through this handle is disabled. */
3164
+ get disabled() {
3165
+ return this._disabled;
3166
+ }
3167
+ set disabled(value) {
3168
+ this._disabled = coerceBooleanProperty(value);
3169
+ this._stateChanges.next(this);
3170
+ }
3150
3171
  constructor(element, parentDrag) {
3151
3172
  this.element = element;
3152
3173
  /** Emits when the state of the handle has changed. */
@@ -3157,21 +3178,13 @@ class CdkDragHandle {
3157
3178
  }
3158
3179
  this._parentDrag = parentDrag;
3159
3180
  }
3160
- /** Whether starting to drag through this handle is disabled. */
3161
- get disabled() {
3162
- return this._disabled;
3163
- }
3164
- set disabled(value) {
3165
- this._disabled = coerceBooleanProperty(value);
3166
- this._stateChanges.next(this);
3167
- }
3168
3181
  ngOnDestroy() {
3169
3182
  this._stateChanges.complete();
3170
3183
  }
3171
3184
  }
3172
- CdkDragHandle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDragHandle, deps: [{ token: i0.ElementRef }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
3173
- CdkDragHandle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.3", type: CdkDragHandle, isStandalone: true, selector: "[cdkDragHandle]", inputs: { disabled: ["cdkDragHandleDisabled", "disabled"] }, host: { classAttribute: "cdk-drag-handle" }, providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }], ngImport: i0 });
3174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDragHandle, decorators: [{
3185
+ CdkDragHandle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDragHandle, deps: [{ token: i0.ElementRef }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
3186
+ CdkDragHandle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0", type: CdkDragHandle, isStandalone: true, selector: "[cdkDragHandle]", inputs: { disabled: ["cdkDragHandleDisabled", "disabled"] }, host: { classAttribute: "cdk-drag-handle" }, providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }], ngImport: i0 });
3187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDragHandle, decorators: [{
3175
3188
  type: Directive,
3176
3189
  args: [{
3177
3190
  selector: '[cdkDragHandle]',
@@ -3215,9 +3228,9 @@ class CdkDragPlaceholder {
3215
3228
  this.templateRef = templateRef;
3216
3229
  }
3217
3230
  }
3218
- CdkDragPlaceholder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDragPlaceholder, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3219
- CdkDragPlaceholder.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.3", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 });
3220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
3231
+ CdkDragPlaceholder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDragPlaceholder, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3232
+ CdkDragPlaceholder.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 });
3233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
3221
3234
  type: Directive,
3222
3235
  args: [{
3223
3236
  selector: 'ng-template[cdkDragPlaceholder]',
@@ -3246,10 +3259,6 @@ const CDK_DRAG_PREVIEW = new InjectionToken('CdkDragPreview');
3246
3259
  * of a CdkDrag when it is being dragged.
3247
3260
  */
3248
3261
  class CdkDragPreview {
3249
- constructor(templateRef) {
3250
- this.templateRef = templateRef;
3251
- this._matchSize = false;
3252
- }
3253
3262
  /** Whether the preview should preserve the same size as the item that is being dragged. */
3254
3263
  get matchSize() {
3255
3264
  return this._matchSize;
@@ -3257,10 +3266,14 @@ class CdkDragPreview {
3257
3266
  set matchSize(value) {
3258
3267
  this._matchSize = coerceBooleanProperty(value);
3259
3268
  }
3269
+ constructor(templateRef) {
3270
+ this.templateRef = templateRef;
3271
+ this._matchSize = false;
3272
+ }
3260
3273
  }
3261
- CdkDragPreview.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDragPreview, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3262
- CdkDragPreview.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0-next.3", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: "matchSize" }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 });
3263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDragPreview, decorators: [{
3274
+ CdkDragPreview.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDragPreview, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3275
+ CdkDragPreview.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: "matchSize" }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 });
3276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDragPreview, decorators: [{
3264
3277
  type: Directive,
3265
3278
  args: [{
3266
3279
  selector: 'ng-template[cdkDragPreview]',
@@ -3283,6 +3296,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3",
3283
3296
  const DRAG_HOST_CLASS = 'cdk-drag';
3284
3297
  /** Element that can be moved inside a CdkDropList container. */
3285
3298
  class CdkDrag {
3299
+ /** Whether starting to drag this element is disabled. */
3300
+ get disabled() {
3301
+ return this._disabled || (this.dropContainer && this.dropContainer.disabled);
3302
+ }
3303
+ set disabled(value) {
3304
+ this._disabled = coerceBooleanProperty(value);
3305
+ this._dragRef.disabled = this._disabled;
3306
+ }
3286
3307
  constructor(
3287
3308
  /** Element that the draggable is attached to. */
3288
3309
  element,
@@ -3361,14 +3382,6 @@ class CdkDrag {
3361
3382
  this._syncInputs(this._dragRef);
3362
3383
  this._handleEvents(this._dragRef);
3363
3384
  }
3364
- /** Whether starting to drag this element is disabled. */
3365
- get disabled() {
3366
- return this._disabled || (this.dropContainer && this.dropContainer.disabled);
3367
- }
3368
- set disabled(value) {
3369
- this._disabled = coerceBooleanProperty(value);
3370
- this._dragRef.disabled = this._disabled;
3371
- }
3372
3385
  /**
3373
3386
  * Returns the element that is being used as a placeholder
3374
3387
  * while the current element is being dragged.
@@ -3635,9 +3648,9 @@ class CdkDrag {
3635
3648
  }
3636
3649
  }
3637
3650
  CdkDrag._dragInstances = [];
3638
- CdkDrag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDrag, deps: [{ token: i0.ElementRef }, { token: CDK_DROP_LIST, optional: true, skipSelf: true }, { token: DOCUMENT }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: CDK_DRAG_CONFIG, optional: true }, { token: i3.Directionality, optional: true }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: CDK_DRAG_HANDLE, optional: true, self: true }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
3639
- CdkDrag.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.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"], constrainPosition: ["cdkDragConstrainPosition", "constrainPosition"], previewClass: ["cdkDragPreviewClass", "previewClass"], previewContainer: ["cdkDragPreviewContainer", "previewContainer"] }, 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 }], queries: [{ propertyName: "_previewTemplate", first: true, predicate: CDK_DRAG_PREVIEW, descendants: true }, { propertyName: "_placeholderTemplate", first: true, predicate: CDK_DRAG_PLACEHOLDER, descendants: true }, { propertyName: "_handles", predicate: CDK_DRAG_HANDLE, descendants: true }], exportAs: ["cdkDrag"], usesOnChanges: true, ngImport: i0 });
3640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: CdkDrag, decorators: [{
3651
+ CdkDrag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDrag, deps: [{ token: i0.ElementRef }, { token: CDK_DROP_LIST, optional: true, skipSelf: true }, { token: DOCUMENT }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: CDK_DRAG_CONFIG, optional: true }, { token: i3.Directionality, optional: true }, { token: DragDrop }, { token: i0.ChangeDetectorRef }, { token: CDK_DRAG_HANDLE, optional: true, self: true }, { token: CDK_DRAG_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
3652
+ CdkDrag.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0", 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"], constrainPosition: ["cdkDragConstrainPosition", "constrainPosition"], previewClass: ["cdkDragPreviewClass", "previewClass"], previewContainer: ["cdkDragPreviewContainer", "previewContainer"] }, 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 }], queries: [{ propertyName: "_previewTemplate", first: true, predicate: CDK_DRAG_PREVIEW, descendants: true }, { propertyName: "_placeholderTemplate", first: true, predicate: CDK_DRAG_PLACEHOLDER, descendants: true }, { propertyName: "_handles", predicate: CDK_DRAG_HANDLE, descendants: true }], exportAs: ["cdkDrag"], usesOnChanges: true, ngImport: i0 });
3653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CdkDrag, decorators: [{
3641
3654
  type: Directive,
3642
3655
  args: [{
3643
3656
  selector: '[cdkDrag]',
@@ -3760,8 +3773,8 @@ const DRAG_DROP_DIRECTIVES = [
3760
3773
  ];
3761
3774
  class DragDropModule {
3762
3775
  }
3763
- DragDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3764
- DragDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDropModule, imports: [CdkDropList,
3776
+ DragDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3777
+ DragDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: DragDropModule, imports: [CdkDropList,
3765
3778
  CdkDropListGroup,
3766
3779
  CdkDrag,
3767
3780
  CdkDragHandle,
@@ -3772,8 +3785,8 @@ DragDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
3772
3785
  CdkDragHandle,
3773
3786
  CdkDragPreview,
3774
3787
  CdkDragPlaceholder] });
3775
- DragDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDropModule, providers: [DragDrop], imports: [CdkScrollableModule] });
3776
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0-next.3", ngImport: i0, type: DragDropModule, decorators: [{
3788
+ DragDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDropModule, providers: [DragDrop], imports: [CdkScrollableModule] });
3789
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DragDropModule, decorators: [{
3777
3790
  type: NgModule,
3778
3791
  args: [{
3779
3792
  imports: DRAG_DROP_DIRECTIVES,