@angular/cdk 17.1.0-next.3 → 17.1.0

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 (148) hide show
  1. package/LICENSE +1 -1
  2. package/dialog/index.d.ts +5 -0
  3. package/drag-drop/index.d.ts +5 -5
  4. package/esm2022/a11y/a11y-module.mjs +4 -4
  5. package/esm2022/a11y/aria-describer/aria-describer.mjs +3 -3
  6. package/esm2022/a11y/aria-describer/aria-reference.mjs +8 -5
  7. package/esm2022/a11y/focus-monitor/focus-monitor.mjs +6 -6
  8. package/esm2022/a11y/focus-trap/configurable-focus-trap-factory.mjs +3 -3
  9. package/esm2022/a11y/focus-trap/focus-trap-manager.mjs +3 -3
  10. package/esm2022/a11y/focus-trap/focus-trap.mjs +22 -17
  11. package/esm2022/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +3 -3
  12. package/esm2022/a11y/input-modality/input-modality-detector.mjs +3 -3
  13. package/esm2022/a11y/interactivity-checker/interactivity-checker.mjs +3 -3
  14. package/esm2022/a11y/live-announcer/live-announcer.mjs +6 -6
  15. package/esm2022/accordion/accordion-item.mjs +3 -3
  16. package/esm2022/accordion/accordion-module.mjs +4 -4
  17. package/esm2022/accordion/accordion.mjs +3 -3
  18. package/esm2022/bidi/bidi-module.mjs +4 -4
  19. package/esm2022/bidi/dir.mjs +3 -3
  20. package/esm2022/bidi/directionality.mjs +3 -3
  21. package/esm2022/clipboard/clipboard-module.mjs +4 -4
  22. package/esm2022/clipboard/clipboard.mjs +3 -3
  23. package/esm2022/clipboard/copy-to-clipboard.mjs +3 -3
  24. package/esm2022/collections/selection-model.mjs +5 -4
  25. package/esm2022/collections/unique-selection-dispatcher.mjs +3 -3
  26. package/esm2022/dialog/dialog-container.mjs +29 -12
  27. package/esm2022/dialog/dialog-module.mjs +4 -4
  28. package/esm2022/dialog/dialog.mjs +3 -3
  29. package/esm2022/drag-drop/directives/drag-handle.mjs +3 -3
  30. package/esm2022/drag-drop/directives/drag-placeholder.mjs +3 -3
  31. package/esm2022/drag-drop/directives/drag-preview.mjs +3 -3
  32. package/esm2022/drag-drop/directives/drag.mjs +4 -4
  33. package/esm2022/drag-drop/directives/drop-list-group.mjs +3 -3
  34. package/esm2022/drag-drop/directives/drop-list.mjs +3 -3
  35. package/esm2022/drag-drop/dom/dom-rect.mjs +64 -0
  36. package/esm2022/drag-drop/dom/parent-position-tracker.mjs +3 -3
  37. package/esm2022/drag-drop/drag-drop-module.mjs +4 -4
  38. package/esm2022/drag-drop/drag-drop-registry.mjs +3 -3
  39. package/esm2022/drag-drop/drag-drop.mjs +3 -3
  40. package/esm2022/drag-drop/drag-ref.mjs +13 -13
  41. package/esm2022/drag-drop/drop-list-ref.mjs +34 -20
  42. package/esm2022/drag-drop/sorting/single-axis-sort-strategy.mjs +5 -5
  43. package/esm2022/layout/breakpoints-observer.mjs +3 -3
  44. package/esm2022/layout/layout-module.mjs +4 -4
  45. package/esm2022/layout/media-matcher.mjs +3 -3
  46. package/esm2022/listbox/listbox-module.mjs +4 -4
  47. package/esm2022/listbox/listbox.mjs +6 -6
  48. package/esm2022/menu/context-menu-trigger.mjs +6 -6
  49. package/esm2022/menu/menu-aim.mjs +6 -6
  50. package/esm2022/menu/menu-bar.mjs +3 -3
  51. package/esm2022/menu/menu-base.mjs +3 -3
  52. package/esm2022/menu/menu-group.mjs +3 -3
  53. package/esm2022/menu/menu-item-checkbox.mjs +3 -3
  54. package/esm2022/menu/menu-item-radio.mjs +3 -3
  55. package/esm2022/menu/menu-item-selectable.mjs +3 -3
  56. package/esm2022/menu/menu-item.mjs +3 -3
  57. package/esm2022/menu/menu-module.mjs +4 -4
  58. package/esm2022/menu/menu-stack.mjs +3 -3
  59. package/esm2022/menu/menu-trigger-base.mjs +3 -3
  60. package/esm2022/menu/menu-trigger.mjs +3 -3
  61. package/esm2022/menu/menu.mjs +3 -3
  62. package/esm2022/observers/observe-content.mjs +13 -13
  63. package/esm2022/observers/private/shared-resize-observer.mjs +3 -3
  64. package/esm2022/overlay/dispatchers/base-overlay-dispatcher.mjs +3 -3
  65. package/esm2022/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +3 -3
  66. package/esm2022/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +3 -3
  67. package/esm2022/overlay/fullscreen-overlay-container.mjs +3 -3
  68. package/esm2022/overlay/overlay-container.mjs +3 -3
  69. package/esm2022/overlay/overlay-directives.mjs +6 -6
  70. package/esm2022/overlay/overlay-module.mjs +4 -4
  71. package/esm2022/overlay/overlay.mjs +3 -3
  72. package/esm2022/overlay/position/flexible-connected-position-strategy.mjs +5 -5
  73. package/esm2022/overlay/position/overlay-position-builder.mjs +3 -3
  74. package/esm2022/overlay/position/scroll-clip.mjs +1 -1
  75. package/esm2022/overlay/scroll/scroll-strategy-options.mjs +3 -3
  76. package/esm2022/platform/platform-module.mjs +4 -4
  77. package/esm2022/platform/platform.mjs +3 -3
  78. package/esm2022/portal/portal-directives.mjs +16 -16
  79. package/esm2022/scrolling/fixed-size-virtual-scroll.mjs +3 -3
  80. package/esm2022/scrolling/scroll-dispatcher.mjs +3 -3
  81. package/esm2022/scrolling/scrollable.mjs +3 -3
  82. package/esm2022/scrolling/scrolling-module.mjs +8 -8
  83. package/esm2022/scrolling/viewport-ruler.mjs +5 -5
  84. package/esm2022/scrolling/virtual-for-of.mjs +3 -3
  85. package/esm2022/scrolling/virtual-scroll-viewport.mjs +3 -3
  86. package/esm2022/scrolling/virtual-scrollable-element.mjs +3 -3
  87. package/esm2022/scrolling/virtual-scrollable-window.mjs +3 -3
  88. package/esm2022/scrolling/virtual-scrollable.mjs +4 -4
  89. package/esm2022/stepper/step-header.mjs +3 -3
  90. package/esm2022/stepper/step-label.mjs +3 -3
  91. package/esm2022/stepper/stepper-button.mjs +6 -6
  92. package/esm2022/stepper/stepper-module.mjs +4 -4
  93. package/esm2022/stepper/stepper.mjs +6 -6
  94. package/esm2022/table/cell.mjs +26 -28
  95. package/esm2022/table/coalesced-style-scheduler.mjs +3 -3
  96. package/esm2022/table/row.mjs +27 -27
  97. package/esm2022/table/sticky-styler.mjs +32 -32
  98. package/esm2022/table/table-module.mjs +4 -4
  99. package/esm2022/table/table.mjs +175 -114
  100. package/esm2022/table/text-column.mjs +3 -3
  101. package/esm2022/text-field/autofill.mjs +6 -6
  102. package/esm2022/text-field/autosize.mjs +3 -3
  103. package/esm2022/text-field/text-field-module.mjs +4 -4
  104. package/esm2022/tree/nested-node.mjs +3 -3
  105. package/esm2022/tree/node.mjs +3 -3
  106. package/esm2022/tree/outlet.mjs +3 -3
  107. package/esm2022/tree/padding.mjs +3 -3
  108. package/esm2022/tree/toggle.mjs +3 -3
  109. package/esm2022/tree/tree-module.mjs +4 -4
  110. package/esm2022/tree/tree.mjs +6 -6
  111. package/esm2022/version.mjs +1 -1
  112. package/fesm2022/a11y.mjs +61 -53
  113. package/fesm2022/a11y.mjs.map +1 -1
  114. package/fesm2022/accordion.mjs +10 -10
  115. package/fesm2022/bidi.mjs +10 -10
  116. package/fesm2022/cdk.mjs +1 -1
  117. package/fesm2022/cdk.mjs.map +1 -1
  118. package/fesm2022/clipboard.mjs +10 -10
  119. package/fesm2022/collections.mjs +7 -6
  120. package/fesm2022/collections.mjs.map +1 -1
  121. package/fesm2022/dialog.mjs +35 -18
  122. package/fesm2022/dialog.mjs.map +1 -1
  123. package/fesm2022/drag-drop.mjs +99 -85
  124. package/fesm2022/drag-drop.mjs.map +1 -1
  125. package/fesm2022/layout.mjs +10 -10
  126. package/fesm2022/listbox.mjs +10 -10
  127. package/fesm2022/menu.mjs +49 -49
  128. package/fesm2022/observers/private.mjs +3 -3
  129. package/fesm2022/observers.mjs +13 -13
  130. package/fesm2022/overlay.mjs +38 -38
  131. package/fesm2022/overlay.mjs.map +1 -1
  132. package/fesm2022/platform.mjs +7 -7
  133. package/fesm2022/portal.mjs +16 -16
  134. package/fesm2022/scrolling.mjs +36 -36
  135. package/fesm2022/scrolling.mjs.map +1 -1
  136. package/fesm2022/stepper.mjs +22 -22
  137. package/fesm2022/table.mjs +267 -208
  138. package/fesm2022/table.mjs.map +1 -1
  139. package/fesm2022/text-field.mjs +13 -13
  140. package/fesm2022/tree.mjs +25 -25
  141. package/overlay/index.d.ts +1 -1
  142. package/package.json +3 -3
  143. package/schematics/ng-add/index.js +1 -1
  144. package/schematics/ng-add/index.mjs +1 -1
  145. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  146. package/scrolling/index.d.ts +2 -2
  147. package/table/index.d.ts +13 -4
  148. package/esm2022/drag-drop/dom/client-rect.mjs +0 -64
@@ -72,10 +72,10 @@ class AutofillMonitor {
72
72
  ngOnDestroy() {
73
73
  this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));
74
74
  }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: AutofillMonitor, deps: [{ token: i1.Platform }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
76
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: AutofillMonitor, providedIn: 'root' }); }
75
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: AutofillMonitor, deps: [{ token: i1.Platform }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
76
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: AutofillMonitor, providedIn: 'root' }); }
77
77
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: AutofillMonitor, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: AutofillMonitor, decorators: [{
79
79
  type: Injectable,
80
80
  args: [{ providedIn: 'root' }]
81
81
  }], ctorParameters: () => [{ type: i1.Platform }, { type: i0.NgZone }] });
@@ -95,10 +95,10 @@ class CdkAutofill {
95
95
  ngOnDestroy() {
96
96
  this._autofillMonitor.stopMonitoring(this._elementRef);
97
97
  }
98
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkAutofill, deps: [{ token: i0.ElementRef }, { token: AutofillMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }
99
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.2", type: CdkAutofill, isStandalone: true, selector: "[cdkAutofill]", outputs: { cdkAutofill: "cdkAutofill" }, ngImport: i0 }); }
98
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkAutofill, deps: [{ token: i0.ElementRef }, { token: AutofillMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }
99
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.5", type: CdkAutofill, isStandalone: true, selector: "[cdkAutofill]", outputs: { cdkAutofill: "cdkAutofill" }, ngImport: i0 }); }
100
100
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkAutofill, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkAutofill, decorators: [{
102
102
  type: Directive,
103
103
  args: [{
104
104
  selector: '[cdkAutofill]',
@@ -367,10 +367,10 @@ class CdkTextareaAutosize {
367
367
  textarea.setSelectionRange(selectionStart, selectionEnd);
368
368
  }
369
369
  }
370
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTextareaAutosize, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
371
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.0-next.2", type: CdkTextareaAutosize, isStandalone: true, selector: "textarea[cdkTextareaAutosize]", inputs: { minRows: ["cdkAutosizeMinRows", "minRows"], maxRows: ["cdkAutosizeMaxRows", "maxRows"], enabled: ["cdkTextareaAutosize", "enabled", booleanAttribute], placeholder: "placeholder" }, host: { attributes: { "rows": "1" }, listeners: { "input": "_noopInputHandler()" }, classAttribute: "cdk-textarea-autosize" }, exportAs: ["cdkTextareaAutosize"], ngImport: i0 }); }
370
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTextareaAutosize, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
371
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.0-next.5", type: CdkTextareaAutosize, isStandalone: true, selector: "textarea[cdkTextareaAutosize]", inputs: { minRows: ["cdkAutosizeMinRows", "minRows"], maxRows: ["cdkAutosizeMaxRows", "maxRows"], enabled: ["cdkTextareaAutosize", "enabled", booleanAttribute], placeholder: "placeholder" }, host: { attributes: { "rows": "1" }, listeners: { "input": "_noopInputHandler()" }, classAttribute: "cdk-textarea-autosize" }, exportAs: ["cdkTextareaAutosize"], ngImport: i0 }); }
372
372
  }
373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTextareaAutosize, decorators: [{
373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTextareaAutosize, decorators: [{
374
374
  type: Directive,
375
375
  args: [{
376
376
  selector: 'textarea[cdkTextareaAutosize]',
@@ -403,11 +403,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2",
403
403
  }] } });
404
404
 
405
405
  class TextFieldModule {
406
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: TextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
407
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0-next.2", ngImport: i0, type: TextFieldModule, imports: [CdkAutofill, CdkTextareaAutosize], exports: [CdkAutofill, CdkTextareaAutosize] }); }
408
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: TextFieldModule }); }
406
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: TextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
407
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0-next.5", ngImport: i0, type: TextFieldModule, imports: [CdkAutofill, CdkTextareaAutosize], exports: [CdkAutofill, CdkTextareaAutosize] }); }
408
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: TextFieldModule }); }
409
409
  }
410
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: TextFieldModule, decorators: [{
410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: TextFieldModule, decorators: [{
411
411
  type: NgModule,
412
412
  args: [{
413
413
  imports: [CdkAutofill, CdkTextareaAutosize],
package/fesm2022/tree.mjs CHANGED
@@ -160,10 +160,10 @@ class CdkTreeNodeOutlet {
160
160
  this.viewContainer = viewContainer;
161
161
  this._node = _node;
162
162
  }
163
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodeOutlet, deps: [{ token: i0.ViewContainerRef }, { token: CDK_TREE_NODE_OUTLET_NODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
164
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.2", type: CdkTreeNodeOutlet, isStandalone: true, selector: "[cdkTreeNodeOutlet]", ngImport: i0 }); }
163
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodeOutlet, deps: [{ token: i0.ViewContainerRef }, { token: CDK_TREE_NODE_OUTLET_NODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
164
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.5", type: CdkTreeNodeOutlet, isStandalone: true, selector: "[cdkTreeNodeOutlet]", ngImport: i0 }); }
165
165
  }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodeOutlet, decorators: [{
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodeOutlet, decorators: [{
167
167
  type: Directive,
168
168
  args: [{
169
169
  selector: '[cdkTreeNodeOutlet]',
@@ -191,10 +191,10 @@ class CdkTreeNodeDef {
191
191
  constructor(template) {
192
192
  this.template = template;
193
193
  }
194
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodeDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
195
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.2", type: CdkTreeNodeDef, isStandalone: true, selector: "[cdkTreeNodeDef]", inputs: { when: ["cdkTreeNodeDefWhen", "when"] }, ngImport: i0 }); }
194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodeDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
195
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.5", type: CdkTreeNodeDef, isStandalone: true, selector: "[cdkTreeNodeDef]", inputs: { when: ["cdkTreeNodeDefWhen", "when"] }, ngImport: i0 }); }
196
196
  }
197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodeDef, decorators: [{
197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodeDef, decorators: [{
198
198
  type: Directive,
199
199
  args: [{
200
200
  selector: '[cdkTreeNodeDef]',
@@ -416,10 +416,10 @@ class CdkTree {
416
416
  CdkTreeNode.mostRecentTreeNode.data = nodeData;
417
417
  }
418
418
  }
419
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTree, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
420
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0-next.2", type: CdkTree, isStandalone: true, selector: "cdk-tree", inputs: { dataSource: "dataSource", treeControl: "treeControl", trackBy: "trackBy" }, host: { attributes: { "role": "tree" }, classAttribute: "cdk-tree" }, queries: [{ propertyName: "_nodeDefs", predicate: CdkTreeNodeDef, descendants: true }], viewQueries: [{ propertyName: "_nodeOutlet", first: true, predicate: CdkTreeNodeOutlet, descendants: true, static: true }], exportAs: ["cdkTree"], ngImport: i0, template: `<ng-container cdkTreeNodeOutlet></ng-container>`, isInline: true, dependencies: [{ kind: "directive", type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
419
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTree, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
420
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0-next.5", type: CdkTree, isStandalone: true, selector: "cdk-tree", inputs: { dataSource: "dataSource", treeControl: "treeControl", trackBy: "trackBy" }, host: { attributes: { "role": "tree" }, classAttribute: "cdk-tree" }, queries: [{ propertyName: "_nodeDefs", predicate: CdkTreeNodeDef, descendants: true }], viewQueries: [{ propertyName: "_nodeOutlet", first: true, predicate: CdkTreeNodeOutlet, descendants: true, static: true }], exportAs: ["cdkTree"], ngImport: i0, template: `<ng-container cdkTreeNodeOutlet></ng-container>`, isInline: true, dependencies: [{ kind: "directive", type: CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
421
421
  }
422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTree, decorators: [{
422
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTree, decorators: [{
423
423
  type: Component,
424
424
  args: [{
425
425
  selector: 'cdk-tree',
@@ -536,10 +536,10 @@ class CdkTreeNode {
536
536
  }
537
537
  this.role = 'treeitem';
538
538
  }
539
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }], target: i0.ɵɵFactoryTarget.Directive }); }
540
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.2", type: CdkTreeNode, isStandalone: true, selector: "cdk-tree-node", inputs: { role: "role" }, host: { properties: { "attr.aria-expanded": "isExpanded" }, classAttribute: "cdk-tree-node" }, exportAs: ["cdkTreeNode"], ngImport: i0 }); }
539
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }], target: i0.ɵɵFactoryTarget.Directive }); }
540
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.5", type: CdkTreeNode, isStandalone: true, selector: "cdk-tree-node", inputs: { role: "role" }, host: { properties: { "attr.aria-expanded": "isExpanded" }, classAttribute: "cdk-tree-node" }, exportAs: ["cdkTreeNode"], ngImport: i0 }); }
541
541
  }
542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNode, decorators: [{
542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNode, decorators: [{
543
543
  type: Directive,
544
544
  args: [{
545
545
  selector: 'cdk-tree-node',
@@ -647,13 +647,13 @@ class CdkNestedTreeNode extends CdkTreeNode {
647
647
  // that we don't pick up the outlet of a child node by accident.
648
648
  return outlets && outlets.find(outlet => !outlet._node || outlet._node === this);
649
649
  }
650
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive }); }
651
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.2", type: CdkNestedTreeNode, isStandalone: true, selector: "cdk-nested-tree-node", host: { classAttribute: "cdk-nested-tree-node" }, providers: [
650
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive }); }
651
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0-next.5", type: CdkNestedTreeNode, isStandalone: true, selector: "cdk-nested-tree-node", host: { classAttribute: "cdk-nested-tree-node" }, providers: [
652
652
  { provide: CdkTreeNode, useExisting: CdkNestedTreeNode },
653
653
  { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode },
654
654
  ], queries: [{ propertyName: "nodeOutlet", predicate: CdkTreeNodeOutlet, descendants: true }], exportAs: ["cdkNestedTreeNode"], usesInheritance: true, ngImport: i0 }); }
655
655
  }
656
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkNestedTreeNode, decorators: [{
656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkNestedTreeNode, decorators: [{
657
657
  type: Directive,
658
658
  args: [{
659
659
  selector: 'cdk-nested-tree-node',
@@ -773,10 +773,10 @@ class CdkTreeNodePadding {
773
773
  this._indent = numberAttribute(value);
774
774
  this._setPadding();
775
775
  }
776
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodePadding, deps: [{ token: CdkTreeNode }, { token: CdkTree }, { token: i0.ElementRef }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
777
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.0-next.2", type: CdkTreeNodePadding, isStandalone: true, selector: "[cdkTreeNodePadding]", inputs: { level: ["cdkTreeNodePadding", "level", numberAttribute], indent: ["cdkTreeNodePaddingIndent", "indent"] }, ngImport: i0 }); }
776
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodePadding, deps: [{ token: CdkTreeNode }, { token: CdkTree }, { token: i0.ElementRef }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
777
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.0-next.5", type: CdkTreeNodePadding, isStandalone: true, selector: "[cdkTreeNodePadding]", inputs: { level: ["cdkTreeNodePadding", "level", numberAttribute], indent: ["cdkTreeNodePaddingIndent", "indent"] }, ngImport: i0 }); }
778
778
  }
779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodePadding, decorators: [{
779
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodePadding, decorators: [{
780
780
  type: Directive,
781
781
  args: [{
782
782
  selector: '[cdkTreeNodePadding]',
@@ -808,10 +808,10 @@ class CdkTreeNodeToggle {
808
808
  : this._tree.treeControl.toggle(this._treeNode.data);
809
809
  event.stopPropagation();
810
810
  }
811
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodeToggle, deps: [{ token: CdkTree }, { token: CdkTreeNode }], target: i0.ɵɵFactoryTarget.Directive }); }
812
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.0-next.2", type: CdkTreeNodeToggle, isStandalone: true, selector: "[cdkTreeNodeToggle]", inputs: { recursive: ["cdkTreeNodeToggleRecursive", "recursive", booleanAttribute] }, host: { listeners: { "click": "_toggle($event)" } }, ngImport: i0 }); }
811
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodeToggle, deps: [{ token: CdkTree }, { token: CdkTreeNode }], target: i0.ɵɵFactoryTarget.Directive }); }
812
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.1.0-next.5", type: CdkTreeNodeToggle, isStandalone: true, selector: "[cdkTreeNodeToggle]", inputs: { recursive: ["cdkTreeNodeToggleRecursive", "recursive", booleanAttribute] }, host: { listeners: { "click": "_toggle($event)" } }, ngImport: i0 }); }
813
813
  }
814
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeNodeToggle, decorators: [{
814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeNodeToggle, decorators: [{
815
815
  type: Directive,
816
816
  args: [{
817
817
  selector: '[cdkTreeNodeToggle]',
@@ -835,8 +835,8 @@ const EXPORTED_DECLARATIONS = [
835
835
  CdkTreeNodeOutlet,
836
836
  ];
837
837
  class CdkTreeModule {
838
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
839
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeModule, imports: [CdkNestedTreeNode,
838
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
839
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeModule, imports: [CdkNestedTreeNode,
840
840
  CdkTreeNodeDef,
841
841
  CdkTreeNodePadding,
842
842
  CdkTreeNodeToggle,
@@ -849,9 +849,9 @@ class CdkTreeModule {
849
849
  CdkTree,
850
850
  CdkTreeNode,
851
851
  CdkTreeNodeOutlet] }); }
852
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeModule }); }
852
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeModule }); }
853
853
  }
854
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.2", ngImport: i0, type: CdkTreeModule, decorators: [{
854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0-next.5", ngImport: i0, type: CdkTreeModule, decorators: [{
855
855
  type: NgModule,
856
856
  args: [{
857
857
  imports: EXPORTED_DECLARATIONS,
@@ -532,7 +532,7 @@ export declare class FlexibleConnectedPositionStrategy implements PositionStrate
532
532
  private _addPanelClasses;
533
533
  /** Clears the classes that the position strategy has applied from the overlay panel. */
534
534
  private _clearPanelClasses;
535
- /** Returns the ClientRect of the current origin. */
535
+ /** Returns the DOMRect of the current origin. */
536
536
  private _getOriginRect;
537
537
  }
538
538
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk",
3
- "version": "17.1.0-next.3",
3
+ "version": "17.1.0",
4
4
  "description": "Angular Material Component Development Kit",
5
5
  "repository": {
6
6
  "type": "git",
@@ -202,8 +202,8 @@
202
202
  }
203
203
  },
204
204
  "peerDependencies": {
205
- "@angular/core": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
206
- "@angular/common": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
205
+ "@angular/core": "^17.0.0 || ^18.0.0",
206
+ "@angular/common": "^17.0.0 || ^18.0.0",
207
207
  "rxjs": "^6.5.3 || ^7.4.0"
208
208
  },
209
209
  "dependencies": {
@@ -28,7 +28,7 @@ function default_1() {
28
28
  // In order to align the CDK version with other Angular dependencies that are setup by
29
29
  // `@schematics/angular`, we use tilde instead of caret. This is default for Angular
30
30
  // dependencies in new CLI projects.
31
- (0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~17.1.0-next.3`);
31
+ (0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~17.1.0`);
32
32
  // Add a task to run the package manager. This is necessary because we updated the
33
33
  // workspace "package.json" file and we want lock files to reflect the new version range.
34
34
  context.addTask(new tasks_1.NodePackageInstallTask());
@@ -28,7 +28,7 @@ function default_1() {
28
28
  // In order to align the CDK version with other Angular dependencies that are setup by
29
29
  // `@schematics/angular`, we use tilde instead of caret. This is default for Angular
30
30
  // dependencies in new CLI projects.
31
- (0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~17.1.0-next.3`);
31
+ (0, package_config_1.addPackageToPackageJson)(host, '@angular/cdk', `~17.1.0`);
32
32
  // Add a task to run the package manager. This is necessary because we updated the
33
33
  // workspace "package.json" file and we want lock files to reflect the new version range.
34
34
  context.addTask(new tasks_1.NodePackageInstallTask());
@@ -7,10 +7,10 @@ import { <% if(standalone) { %>CdkDrag, CdkDropList, <% } %>CdkDragDrop, moveIte
7
7
  <%= indentTextContent(resolvedFiles.template, 4) %>
8
8
  `,<% } else { %>
9
9
  templateUrl: './<%= dasherize(name) %>.component.html',<% } if(inlineStyle) { %>
10
- styles: [`
10
+ styles: `
11
11
  <%= indentTextContent(resolvedFiles.stylesheet, 4) %>
12
- `]<% } else { %>
13
- styleUrls: ['./<%= dasherize(name) %>.component.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>,
12
+ `<% } else { %>
13
+ styleUrl: './<%= dasherize(name) %>.component.<%= style %>'<% } %><% if(!!viewEncapsulation) { %>,
14
14
  encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
15
15
  changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %><% if(standalone) { %>,
16
16
  standalone: true,
@@ -220,7 +220,7 @@ export declare abstract class CdkVirtualScrollable extends CdkScrollable {
220
220
  */
221
221
  measureViewportSize(orientation: 'horizontal' | 'vertical'): number;
222
222
  /**
223
- * Measure the bounding ClientRect size including the scroll offset.
223
+ * Measure the bounding DOMRect size including the scroll offset.
224
224
  *
225
225
  * @param from The edge to measure from.
226
226
  */
@@ -635,7 +635,7 @@ export declare class ViewportRuler implements OnDestroy {
635
635
  width: number;
636
636
  height: number;
637
637
  }>;
638
- /** Gets a ClientRect for the viewport's bounds. */
638
+ /** Gets a DOMRect for the viewport's bounds. */
639
639
  getViewportRect(): {
640
640
  top: number;
641
641
  left: number;
package/table/index.d.ts CHANGED
@@ -94,7 +94,7 @@ export declare const CDK_TABLE: InjectionToken<any>;
94
94
  * material library.
95
95
  * @docs-private
96
96
  */
97
- export declare const CDK_TABLE_TEMPLATE = "\n <ng-content select=\"caption\"></ng-content>\n <ng-content select=\"colgroup, col\"></ng-content>\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container noDataRowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>\n";
97
+ export declare const CDK_TABLE_TEMPLATE = "\n <ng-content select=\"caption\"/>\n <ng-content select=\"colgroup, col\"/>\n\n <!--\n Unprojected content throws a hydration error so we need this to capture it.\n It gets removed on the client so it doesn't affect the layout.\n -->\n @if (_isServer) {\n <ng-content/>\n }\n\n @if (_isNativeHtmlTable) {\n <thead role=\"rowgroup\">\n <ng-container headerRowOutlet/>\n </thead>\n <tbody role=\"rowgroup\">\n <ng-container rowOutlet/>\n <ng-container noDataRowOutlet/>\n </tbody>\n <tfoot role=\"rowgroup\">\n <ng-container footerRowOutlet/>\n </tfoot>\n } @else {\n <ng-container headerRowOutlet/>\n <ng-container rowOutlet/>\n <ng-container noDataRowOutlet/>\n <ng-container footerRowOutlet/>\n }\n";
98
98
 
99
99
  /** Cell template container that adds the right classes and role. */
100
100
  export declare class CdkCell extends BaseCdkCell {
@@ -509,8 +509,15 @@ export declare class CdkTable<T> implements AfterContentChecked, CollectionViewe
509
509
  * overridden by table subclasses
510
510
  */
511
511
  protected needsPositionStickyOnElement: boolean;
512
+ /** Whether the component is being rendered on the server. */
513
+ protected _isServer: boolean;
512
514
  /** Whether the no data row is currently showing anything. */
513
515
  private _isShowingNoDataRow;
516
+ /** Whether the table has rendered out all the outlets for the first time. */
517
+ private _hasRendered;
518
+ /** Aria role to apply to the table's cells based on the table's own role. */
519
+ _getCellRole(): string | null;
520
+ private _cellRoleInternal;
514
521
  /**
515
522
  * Tracking function that will be used to check the differences in data changes. Used similarly
516
523
  * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data
@@ -658,6 +665,10 @@ export declare class CdkTable<T> implements AfterContentChecked, CollectionViewe
658
665
  * input. May be called manually for cases where the cell content changes outside of these events.
659
666
  */
660
667
  updateStickyColumnStyles(): void;
668
+ /** Invoked whenever an outlet is created and has been assigned to the table. */
669
+ _outletAssigned(): void;
670
+ /** Renders the table if its state has changed. */
671
+ private _render;
661
672
  /**
662
673
  * Get the list of RenderRow objects to render according to the current list of data and defined
663
674
  * row definitions. If the previous list already contained a particular pair, it should be reused
@@ -724,8 +735,6 @@ export declare class CdkTable<T> implements AfterContentChecked, CollectionViewe
724
735
  private _updateRowIndexContext;
725
736
  /** Gets the column definitions for the provided row def. */
726
737
  private _getCellTemplates;
727
- /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */
728
- private _applyNativeTableSections;
729
738
  /**
730
739
  * Forces a re-render of the data rows. Should be called in cases where there has been an input
731
740
  * change that affects the evaluation of which rows should be rendered, e.g. toggling
@@ -749,7 +758,7 @@ export declare class CdkTable<T> implements AfterContentChecked, CollectionViewe
749
758
  /** Creates or removes the no data row, depending on whether any data is being shown. */
750
759
  private _updateNoDataRow;
751
760
  static ɵfac: i0.ɵɵFactoryDeclaration<CdkTable<any>, [null, null, null, { attribute: "role"; }, { optional: true; }, null, null, null, null, null, { optional: true; skipSelf: true; }, { optional: true; }]>;
752
- static ɵcmp: i0.ɵɵComponentDeclaration<CdkTable<any>, "cdk-table, table[cdk-table]", ["cdkTable"], { "trackBy": { "alias": "trackBy"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "multiTemplateDataRows": { "alias": "multiTemplateDataRows"; "required": false; }; "fixedLayout": { "alias": "fixedLayout"; "required": false; }; }, { "contentChanged": "contentChanged"; }, ["_noDataRow", "_contentColumnDefs", "_contentRowDefs", "_contentHeaderRowDefs", "_contentFooterRowDefs"], ["caption", "colgroup, col"], true, never>;
761
+ static ɵcmp: i0.ɵɵComponentDeclaration<CdkTable<any>, "cdk-table, table[cdk-table]", ["cdkTable"], { "trackBy": { "alias": "trackBy"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "multiTemplateDataRows": { "alias": "multiTemplateDataRows"; "required": false; }; "fixedLayout": { "alias": "fixedLayout"; "required": false; }; }, { "contentChanged": "contentChanged"; }, ["_noDataRow", "_contentColumnDefs", "_contentRowDefs", "_contentHeaderRowDefs", "_contentFooterRowDefs"], ["caption", "colgroup, col", "*"], true, never>;
753
762
  static ngAcceptInputType_multiTemplateDataRows: unknown;
754
763
  static ngAcceptInputType_fixedLayout: unknown;
755
764
  }
@@ -1,64 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- /** Gets a mutable version of an element's bounding `ClientRect`. */
9
- export function getMutableClientRect(element) {
10
- const clientRect = element.getBoundingClientRect();
11
- // We need to clone the `clientRect` here, because all the values on it are readonly
12
- // and we need to be able to update them. Also we can't use a spread here, because
13
- // the values on a `ClientRect` aren't own properties. See:
14
- // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes
15
- return {
16
- top: clientRect.top,
17
- right: clientRect.right,
18
- bottom: clientRect.bottom,
19
- left: clientRect.left,
20
- width: clientRect.width,
21
- height: clientRect.height,
22
- x: clientRect.x,
23
- y: clientRect.y,
24
- };
25
- }
26
- /**
27
- * Checks whether some coordinates are within a `ClientRect`.
28
- * @param clientRect ClientRect that is being checked.
29
- * @param x Coordinates along the X axis.
30
- * @param y Coordinates along the Y axis.
31
- */
32
- export function isInsideClientRect(clientRect, x, y) {
33
- const { top, bottom, left, right } = clientRect;
34
- return y >= top && y <= bottom && x >= left && x <= right;
35
- }
36
- /**
37
- * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.
38
- * @param clientRect `ClientRect` that should be updated.
39
- * @param top Amount to add to the `top` position.
40
- * @param left Amount to add to the `left` position.
41
- */
42
- export function adjustClientRect(clientRect, top, left) {
43
- clientRect.top += top;
44
- clientRect.bottom = clientRect.top + clientRect.height;
45
- clientRect.left += left;
46
- clientRect.right = clientRect.left + clientRect.width;
47
- }
48
- /**
49
- * Checks whether the pointer coordinates are close to a ClientRect.
50
- * @param rect ClientRect to check against.
51
- * @param threshold Threshold around the ClientRect.
52
- * @param pointerX Coordinates along the X axis.
53
- * @param pointerY Coordinates along the Y axis.
54
- */
55
- export function isPointerNearClientRect(rect, threshold, pointerX, pointerY) {
56
- const { top, right, bottom, left, width, height } = rect;
57
- const xThreshold = width * threshold;
58
- const yThreshold = height * threshold;
59
- return (pointerY > top - yThreshold &&
60
- pointerY < bottom + yThreshold &&
61
- pointerX > left - xThreshold &&
62
- pointerX < right + xThreshold);
63
- }
64
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LXJlY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvY2RrL2RyYWctZHJvcC9kb20vY2xpZW50LXJlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsb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