@angular/cdk 20.0.0-next.0 → 20.0.0-next.2

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 (181) hide show
  1. package/a11y/index.d.ts +330 -1234
  2. package/a11y-module.d-7d03e079.d.ts +313 -0
  3. package/accordion/index.d.ts +8 -27
  4. package/activedescendant-key-manager.d-11921e3a.d.ts +31 -0
  5. package/bidi/index.d.ts +3 -62
  6. package/bidi-module.d-f8648621.d.ts +53 -0
  7. package/clipboard/index.d.ts +61 -75
  8. package/coercion/index.d.ts +10 -33
  9. package/coercion/private/index.d.ts +2 -2
  10. package/collections/index.d.ts +13 -291
  11. package/data-source.d-7cab2c9d.d.ts +42 -0
  12. package/dialog/index.d.ts +204 -249
  13. package/drag-drop/index.d.ts +1077 -1157
  14. package/fesm2022/a11y-module-e6996d20.mjs +952 -0
  15. package/fesm2022/a11y-module-e6996d20.mjs.map +1 -0
  16. package/fesm2022/a11y.mjs +47 -2445
  17. package/fesm2022/a11y.mjs.map +1 -1
  18. package/fesm2022/accordion.mjs +12 -16
  19. package/fesm2022/accordion.mjs.map +1 -1
  20. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs +16 -0
  21. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs.map +1 -0
  22. package/fesm2022/array-ee3b4bab.mjs +6 -0
  23. package/fesm2022/array-ee3b4bab.mjs.map +1 -0
  24. package/fesm2022/backwards-compatibility-bcbe473e.mjs +25 -0
  25. package/fesm2022/backwards-compatibility-bcbe473e.mjs.map +1 -0
  26. package/fesm2022/bidi-module-0726b65c.mjs +78 -0
  27. package/fesm2022/bidi-module-0726b65c.mjs.map +1 -0
  28. package/fesm2022/bidi.mjs +4 -143
  29. package/fesm2022/bidi.mjs.map +1 -1
  30. package/fesm2022/breakpoints-observer-d4584b66.mjs +179 -0
  31. package/fesm2022/breakpoints-observer-d4584b66.mjs.map +1 -0
  32. package/fesm2022/cdk.mjs +1 -1
  33. package/fesm2022/cdk.mjs.map +1 -1
  34. package/fesm2022/clipboard.mjs +10 -14
  35. package/fesm2022/clipboard.mjs.map +1 -1
  36. package/fesm2022/coercion/private.mjs +2 -18
  37. package/fesm2022/coercion/private.mjs.map +1 -1
  38. package/fesm2022/coercion.mjs +5 -39
  39. package/fesm2022/coercion.mjs.map +1 -1
  40. package/fesm2022/collections.mjs +7 -476
  41. package/fesm2022/collections.mjs.map +1 -1
  42. package/fesm2022/css-pixel-value-286c9a60.mjs +10 -0
  43. package/fesm2022/css-pixel-value-286c9a60.mjs.map +1 -0
  44. package/fesm2022/data-source-5320b6fd.mjs +15 -0
  45. package/fesm2022/data-source-5320b6fd.mjs.map +1 -0
  46. package/fesm2022/dialog.mjs +37 -39
  47. package/fesm2022/dialog.mjs.map +1 -1
  48. package/fesm2022/directionality-7ea26429.mjs +72 -0
  49. package/fesm2022/directionality-7ea26429.mjs.map +1 -0
  50. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs +44 -0
  51. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs.map +1 -0
  52. package/fesm2022/drag-drop.mjs +48 -50
  53. package/fesm2022/drag-drop.mjs.map +1 -1
  54. package/fesm2022/element-705567fe.mjs +29 -0
  55. package/fesm2022/element-705567fe.mjs.map +1 -0
  56. package/fesm2022/fake-event-detection-7055b1bd.mjs +24 -0
  57. package/fesm2022/fake-event-detection-7055b1bd.mjs.map +1 -0
  58. package/fesm2022/focus-key-manager-58d29acd.mjs +22 -0
  59. package/fesm2022/focus-key-manager-58d29acd.mjs.map +1 -0
  60. package/fesm2022/focus-monitor-cebaa0d1.mjs +629 -0
  61. package/fesm2022/focus-monitor-cebaa0d1.mjs.map +1 -0
  62. package/fesm2022/id-generator-fba495fb.mjs +37 -0
  63. package/fesm2022/id-generator-fba495fb.mjs.map +1 -0
  64. package/fesm2022/keycodes-107cd3e4.mjs +122 -0
  65. package/fesm2022/keycodes-107cd3e4.mjs.map +1 -0
  66. package/fesm2022/keycodes.mjs +2 -136
  67. package/fesm2022/keycodes.mjs.map +1 -1
  68. package/fesm2022/layout.mjs +12 -184
  69. package/fesm2022/layout.mjs.map +1 -1
  70. package/fesm2022/list-key-manager-c7b5cefb.mjs +360 -0
  71. package/fesm2022/list-key-manager-c7b5cefb.mjs.map +1 -0
  72. package/fesm2022/listbox.mjs +21 -20
  73. package/fesm2022/listbox.mjs.map +1 -1
  74. package/fesm2022/menu.mjs +76 -60
  75. package/fesm2022/menu.mjs.map +1 -1
  76. package/fesm2022/modifiers-33a5859e.mjs +13 -0
  77. package/fesm2022/modifiers-33a5859e.mjs.map +1 -0
  78. package/fesm2022/observable-97c0792c.mjs +15 -0
  79. package/fesm2022/observable-97c0792c.mjs.map +1 -0
  80. package/fesm2022/observe-content-d2a6b5a0.mjs +210 -0
  81. package/fesm2022/observe-content-d2a6b5a0.mjs.map +1 -0
  82. package/fesm2022/observers/private.mjs +3 -7
  83. package/fesm2022/observers/private.mjs.map +1 -1
  84. package/fesm2022/observers.mjs +5 -213
  85. package/fesm2022/observers.mjs.map +1 -1
  86. package/fesm2022/overlay-module-863b82c9.mjs +3029 -0
  87. package/fesm2022/overlay-module-863b82c9.mjs.map +1 -0
  88. package/fesm2022/overlay.mjs +28 -3019
  89. package/fesm2022/overlay.mjs.map +1 -1
  90. package/fesm2022/passive-listeners-c0bdc49f.mjs +31 -0
  91. package/fesm2022/passive-listeners-c0bdc49f.mjs.map +1 -0
  92. package/fesm2022/platform-1be098b0.mjs +77 -0
  93. package/fesm2022/platform-1be098b0.mjs.map +1 -0
  94. package/fesm2022/platform.mjs +13 -293
  95. package/fesm2022/platform.mjs.map +1 -1
  96. package/fesm2022/portal-directives-c88fea11.mjs +615 -0
  97. package/fesm2022/portal-directives-c88fea11.mjs.map +1 -0
  98. package/fesm2022/portal.mjs +3 -650
  99. package/fesm2022/portal.mjs.map +1 -1
  100. package/fesm2022/private.mjs +3 -63
  101. package/fesm2022/private.mjs.map +1 -1
  102. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs +156 -0
  103. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs.map +1 -0
  104. package/fesm2022/scrolling-61955dd1.mjs +99 -0
  105. package/fesm2022/scrolling-61955dd1.mjs.map +1 -0
  106. package/fesm2022/scrolling-module-aa9eeac5.mjs +1463 -0
  107. package/fesm2022/scrolling-module-aa9eeac5.mjs.map +1 -0
  108. package/fesm2022/scrolling.mjs +12 -1463
  109. package/fesm2022/scrolling.mjs.map +1 -1
  110. package/fesm2022/selection-model-30243dba.mjs +221 -0
  111. package/fesm2022/selection-model-30243dba.mjs.map +1 -0
  112. package/fesm2022/shadow-dom-9f403d00.mjs +49 -0
  113. package/fesm2022/shadow-dom-9f403d00.mjs.map +1 -0
  114. package/fesm2022/stepper.mjs +32 -30
  115. package/fesm2022/stepper.mjs.map +1 -1
  116. package/fesm2022/style-loader-e14dc585.mjs +47 -0
  117. package/fesm2022/style-loader-e14dc585.mjs.map +1 -0
  118. package/fesm2022/table.mjs +88 -132
  119. package/fesm2022/table.mjs.map +1 -1
  120. package/fesm2022/test-environment-34eef1ee.mjs +19 -0
  121. package/fesm2022/test-environment-34eef1ee.mjs.map +1 -0
  122. package/fesm2022/testing/selenium-webdriver.mjs +2 -1
  123. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  124. package/fesm2022/testing/testbed.mjs +33 -74
  125. package/fesm2022/testing/testbed.mjs.map +1 -1
  126. package/fesm2022/testing.mjs +2 -697
  127. package/fesm2022/testing.mjs.map +1 -1
  128. package/fesm2022/text-field.mjs +24 -23
  129. package/fesm2022/text-field.mjs.map +1 -1
  130. package/fesm2022/text-filtering-b60ba8a2.mjs +698 -0
  131. package/fesm2022/text-filtering-b60ba8a2.mjs.map +1 -0
  132. package/fesm2022/tree-key-manager-2f20c79c.mjs +360 -0
  133. package/fesm2022/tree-key-manager-2f20c79c.mjs.map +1 -0
  134. package/fesm2022/tree.mjs +33 -33
  135. package/fesm2022/tree.mjs.map +1 -1
  136. package/fesm2022/typeahead-11ae39bd.mjs +88 -0
  137. package/fesm2022/typeahead-11ae39bd.mjs.map +1 -0
  138. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs +49 -0
  139. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs.map +1 -0
  140. package/fesm2022/visually-hidden-83aea4a0.mjs +18 -0
  141. package/fesm2022/visually-hidden-83aea4a0.mjs.map +1 -0
  142. package/focus-key-manager.d-415a6958.d.ts +33 -0
  143. package/focus-monitor.d-810a02e6.d.ts +209 -0
  144. package/harness-environment.d-4d615248.d.ts +619 -0
  145. package/index.d.ts +2 -2
  146. package/keycodes/index.d.ts +123 -244
  147. package/layout/index.d.ts +23 -25
  148. package/list-key-manager.d-72e9a2e7.d.ts +164 -0
  149. package/listbox/index.d.ts +91 -107
  150. package/menu/index.d.ts +596 -682
  151. package/number-property.d-ce316715.d.ts +15 -0
  152. package/observe-content.d-c08bc882.d.ts +84 -0
  153. package/observers/index.d.ts +4 -90
  154. package/observers/private/index.d.ts +3 -3
  155. package/overlay/index.d.ts +110 -951
  156. package/overlay-module.d-5d06db8a.d.ts +790 -0
  157. package/package.json +1 -1
  158. package/platform/index.d.ts +45 -86
  159. package/platform.d-0a5b4792.d.ts +33 -0
  160. package/portal/index.d.ts +5 -264
  161. package/portal-directives.d-d345bd53.d.ts +210 -0
  162. package/private/index.d.ts +3 -20
  163. package/schematics/ng-add/index.js +1 -1
  164. package/schematics/ng-add/index.mjs +1 -1
  165. package/schematics/ng-update/html-parsing/angular.js +2 -2
  166. package/schematics/ng-update/html-parsing/angular.mjs +2 -2
  167. package/scrolling/index.d.ts +7 -687
  168. package/scrolling-module.d-a08a462d.d.ts +551 -0
  169. package/selection-model.d-1a70542c.d.ts +111 -0
  170. package/stepper/index.d.ts +74 -124
  171. package/style-loader.d-19baab84.d.ts +21 -0
  172. package/table/index.d.ts +329 -453
  173. package/testing/index.d.ts +32 -675
  174. package/testing/selenium-webdriver/index.d.ts +30 -20
  175. package/testing/testbed/index.d.ts +9 -19
  176. package/text-field/index.d.ts +11 -30
  177. package/tree/index.d.ts +205 -271
  178. package/tree-key-manager-strategy.d-603161dd.d.ts +116 -0
  179. package/unique-selection-dispatcher.d-7993b9f5.d.ts +32 -0
  180. package/view-repeater.d-79039e1f.d.ts +88 -0
  181. package/viewport-ruler.d-f3d3e82f.d.ts +57 -0
@@ -1,59 +1,24 @@
1
- import { _CdkPrivateStyleLoader } from '@angular/cdk/private';
2
- import { CdkScrollable } from '@angular/cdk/scrolling';
3
- import { ComponentPortal } from '@angular/cdk/portal';
4
- import { ComponentRef } from '@angular/core';
5
- import { ComponentType } from '@angular/cdk/portal';
6
- import { Direction } from '@angular/cdk/bidi';
7
- import { Directionality } from '@angular/cdk/bidi';
8
- import { ElementRef } from '@angular/core';
9
- import { EmbeddedViewRef } from '@angular/core';
10
- import { EnvironmentInjector } from '@angular/core';
11
- import { EventEmitter } from '@angular/core';
1
+ import { S as ScrollStrategy, O as OverlayRef, P as PositionStrategy, F as FlexibleConnectedPositionStrategyOrigin, b as FlexibleConnectedPositionStrategy, c as OverlayConfig, d as OverlayContainer } from '../overlay-module.d-5d06db8a.js';
2
+ export { f as CdkConnectedOverlay, e as CdkOverlayOrigin, n as ConnectedOverlayPositionChange, C as ConnectedPosition, l as ConnectionPositionPair, b as FlexibleConnectedPositionStrategy, F as FlexibleConnectedPositionStrategyOrigin, H as HorizontalConnectionPos, j as OriginConnectionPosition, c as OverlayConfig, k as OverlayConnectionPosition, d as OverlayContainer, q as OverlayKeyboardDispatcher, a as OverlayModule, p as OverlayOutsideClickDispatcher, O as OverlayRef, g as OverlaySizeConfig, P as PositionStrategy, h as STANDARD_DROPDOWN_ADJACENT_POSITIONS, i as STANDARD_DROPDOWN_BELOW_POSITIONS, S as ScrollStrategy, m as ScrollingVisibility, V as VerticalConnectionPos, o as validateHorizontalPosition, v as validateVerticalPosition } from '../overlay-module.d-5d06db8a.js';
3
+ import { b as ScrollDispatcher } from '../scrolling-module.d-a08a462d.js';
4
+ export { C as CdkScrollable, b as ScrollDispatcher } from '../scrolling-module.d-a08a462d.js';
5
+ import { V as ViewportRuler } from '../viewport-ruler.d-f3d3e82f.js';
6
+ export { V as ViewportRuler } from '../viewport-ruler.d-f3d3e82f.js';
12
7
  import * as i0 from '@angular/core';
13
- import * as i1 from '@angular/cdk/bidi';
14
- import * as i2 from '@angular/cdk/portal';
15
- import * as i3 from '@angular/cdk/scrolling';
16
- import { InjectionToken } from '@angular/core';
17
- import { Location as Location_2 } from '@angular/common';
18
- import { NgZone } from '@angular/core';
19
- import { Observable } from 'rxjs';
20
- import { OnChanges } from '@angular/core';
21
- import { OnDestroy } from '@angular/core';
22
- import { Platform } from '@angular/cdk/platform';
23
- import { PortalOutlet } from '@angular/cdk/portal';
24
- import { Renderer2 } from '@angular/core';
25
- import { ScrollDispatcher } from '@angular/cdk/scrolling';
26
- import { SimpleChanges } from '@angular/core';
27
- import { Subject } from 'rxjs';
28
- import { TemplatePortal } from '@angular/cdk/portal';
29
- import { ViewportRuler } from '@angular/cdk/scrolling';
30
-
31
- /**
32
- * Service for dispatching events that land on the body to appropriate overlay ref,
33
- * if any. It maintains a list of attached overlays to determine best suited overlay based
34
- * on event target and order of overlay opens.
35
- */
36
- declare abstract class BaseOverlayDispatcher implements OnDestroy {
37
- /** Currently attached overlays in the order they were attached. */
38
- _attachedOverlays: OverlayRef[];
39
- protected _document: Document;
40
- protected _isAttached: boolean;
41
- constructor(...args: unknown[]);
42
- ngOnDestroy(): void;
43
- /** Add a new overlay to the list of attached overlay refs. */
44
- add(overlayRef: OverlayRef): void;
45
- /** Remove an overlay from the list of attached overlay refs. */
46
- remove(overlayRef: OverlayRef): void;
47
- /** Detaches the global event listener. */
48
- protected abstract detach(): void;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseOverlayDispatcher, never>;
50
- static ɵprov: i0.ɵɵInjectableDeclaration<BaseOverlayDispatcher>;
51
- }
8
+ import { NgZone, OnDestroy } from '@angular/core';
9
+ export { b as ComponentType } from '../portal-directives.d-d345bd53.js';
10
+ import '../bidi-module.d-f8648621.js';
11
+ import '@angular/common';
12
+ import 'rxjs';
13
+ import '../platform.d-0a5b4792.js';
14
+ import '../style-loader.d-19baab84.js';
15
+ import '../data-source.d-7cab2c9d.js';
16
+ import '../number-property.d-ce316715.js';
52
17
 
53
18
  /**
54
19
  * Strategy that will prevent the user from scrolling while the overlay is visible.
55
20
  */
56
- export declare class BlockScrollStrategy implements ScrollStrategy {
21
+ declare class BlockScrollStrategy implements ScrollStrategy {
57
22
  private _viewportRuler;
58
23
  private _previousHTMLStyles;
59
24
  private _previousScrollPosition;
@@ -69,148 +34,17 @@ export declare class BlockScrollStrategy implements ScrollStrategy {
69
34
  private _canBeEnabled;
70
35
  }
71
36
 
72
- /** Injection token that determines the scroll handling while the connected overlay is open. */
73
- declare const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
74
-
75
- /** @docs-private */
76
- declare const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER: {
77
- provide: InjectionToken<() => ScrollStrategy>;
78
- deps: (typeof Overlay)[];
79
- useFactory: typeof CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY;
80
- };
81
-
82
- /** @docs-private */
83
- declare function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => RepositionScrollStrategy;
84
-
85
37
  /**
86
- * Directive to facilitate declarative creation of an
87
- * Overlay using a FlexibleConnectedPositionStrategy.
38
+ * Config options for the CloseScrollStrategy.
88
39
  */
89
- export declare class CdkConnectedOverlay implements OnDestroy, OnChanges {
90
- private _overlay;
91
- private _dir;
92
- private _overlayRef;
93
- private _templatePortal;
94
- private _backdropSubscription;
95
- private _attachSubscription;
96
- private _detachSubscription;
97
- private _positionSubscription;
98
- private _offsetX;
99
- private _offsetY;
100
- private _position;
101
- private _scrollStrategyFactory;
102
- private _disposeOnNavigation;
103
- private _ngZone;
104
- /** Origin for the connected overlay. */
105
- origin: CdkOverlayOrigin | FlexibleConnectedPositionStrategyOrigin;
106
- /** Registered connected position pairs. */
107
- positions: ConnectedPosition[];
108
- /**
109
- * This input overrides the positions input if specified. It lets users pass
110
- * in arbitrary positioning strategies.
111
- */
112
- positionStrategy: FlexibleConnectedPositionStrategy;
113
- /** The offset in pixels for the overlay connection point on the x-axis */
114
- get offsetX(): number;
115
- set offsetX(offsetX: number);
116
- /** The offset in pixels for the overlay connection point on the y-axis */
117
- get offsetY(): number;
118
- set offsetY(offsetY: number);
119
- /** The width of the overlay panel. */
120
- width: number | string;
121
- /** The height of the overlay panel. */
122
- height: number | string;
123
- /** The min width of the overlay panel. */
124
- minWidth: number | string;
125
- /** The min height of the overlay panel. */
126
- minHeight: number | string;
127
- /** The custom class to be set on the backdrop element. */
128
- backdropClass: string | string[];
129
- /** The custom class to add to the overlay pane element. */
130
- panelClass: string | string[];
131
- /** Margin between the overlay and the viewport edges. */
132
- viewportMargin: number;
133
- /** Strategy to be used when handling scroll events while the overlay is open. */
134
- scrollStrategy: ScrollStrategy;
135
- /** Whether the overlay is open. */
136
- open: boolean;
137
- /** Whether the overlay can be closed by user interaction. */
138
- disableClose: boolean;
139
- /** CSS selector which to set the transform origin. */
140
- transformOriginSelector: string;
141
- /** Whether or not the overlay should attach a backdrop. */
142
- hasBackdrop: boolean;
143
- /** Whether or not the overlay should be locked when scrolling. */
144
- lockPosition: boolean;
145
- /** Whether the overlay's width and height can be constrained to fit within the viewport. */
146
- flexibleDimensions: boolean;
147
- /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */
148
- growAfterOpen: boolean;
149
- /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */
150
- push: boolean;
151
- /** Whether the overlay should be disposed of when the user goes backwards/forwards in history. */
152
- get disposeOnNavigation(): boolean;
153
- set disposeOnNavigation(value: boolean);
154
- /** Event emitted when the backdrop is clicked. */
155
- readonly backdropClick: EventEmitter<MouseEvent>;
156
- /** Event emitted when the position has changed. */
157
- readonly positionChange: EventEmitter<ConnectedOverlayPositionChange>;
158
- /** Event emitted when the overlay has been attached. */
159
- readonly attach: EventEmitter<void>;
160
- /** Event emitted when the overlay has been detached. */
161
- readonly detach: EventEmitter<void>;
162
- /** Emits when there are keyboard events that are targeted at the overlay. */
163
- readonly overlayKeydown: EventEmitter<KeyboardEvent>;
164
- /** Emits when there are mouse outside click events that are targeted at the overlay. */
165
- readonly overlayOutsideClick: EventEmitter<MouseEvent>;
166
- constructor(...args: unknown[]);
167
- /** The associated overlay reference. */
168
- get overlayRef(): OverlayRef;
169
- /** The element's layout direction. */
170
- get dir(): Direction;
171
- ngOnDestroy(): void;
172
- ngOnChanges(changes: SimpleChanges): void;
173
- /** Creates an overlay */
174
- private _createOverlay;
175
- /** Builds the overlay config based on the directive's inputs */
176
- private _buildConfig;
177
- /** Updates the state of a position strategy, based on the values of the directive inputs. */
178
- private _updatePositionStrategy;
179
- /** Returns the position strategy of the overlay to be set on the overlay config */
180
- private _createPositionStrategy;
181
- private _getOrigin;
182
- private _getOriginElement;
183
- /** Attaches the overlay. */
184
- attachOverlay(): void;
185
- /** Detaches the overlay. */
186
- detachOverlay(): void;
187
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkConnectedOverlay, never>;
188
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkConnectedOverlay, "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", ["cdkConnectedOverlay"], { "origin": { "alias": "cdkConnectedOverlayOrigin"; "required": false; }; "positions": { "alias": "cdkConnectedOverlayPositions"; "required": false; }; "positionStrategy": { "alias": "cdkConnectedOverlayPositionStrategy"; "required": false; }; "offsetX": { "alias": "cdkConnectedOverlayOffsetX"; "required": false; }; "offsetY": { "alias": "cdkConnectedOverlayOffsetY"; "required": false; }; "width": { "alias": "cdkConnectedOverlayWidth"; "required": false; }; "height": { "alias": "cdkConnectedOverlayHeight"; "required": false; }; "minWidth": { "alias": "cdkConnectedOverlayMinWidth"; "required": false; }; "minHeight": { "alias": "cdkConnectedOverlayMinHeight"; "required": false; }; "backdropClass": { "alias": "cdkConnectedOverlayBackdropClass"; "required": false; }; "panelClass": { "alias": "cdkConnectedOverlayPanelClass"; "required": false; }; "viewportMargin": { "alias": "cdkConnectedOverlayViewportMargin"; "required": false; }; "scrollStrategy": { "alias": "cdkConnectedOverlayScrollStrategy"; "required": false; }; "open": { "alias": "cdkConnectedOverlayOpen"; "required": false; }; "disableClose": { "alias": "cdkConnectedOverlayDisableClose"; "required": false; }; "transformOriginSelector": { "alias": "cdkConnectedOverlayTransformOriginOn"; "required": false; }; "hasBackdrop": { "alias": "cdkConnectedOverlayHasBackdrop"; "required": false; }; "lockPosition": { "alias": "cdkConnectedOverlayLockPosition"; "required": false; }; "flexibleDimensions": { "alias": "cdkConnectedOverlayFlexibleDimensions"; "required": false; }; "growAfterOpen": { "alias": "cdkConnectedOverlayGrowAfterOpen"; "required": false; }; "push": { "alias": "cdkConnectedOverlayPush"; "required": false; }; "disposeOnNavigation": { "alias": "cdkConnectedOverlayDisposeOnNavigation"; "required": false; }; }, { "backdropClick": "backdropClick"; "positionChange": "positionChange"; "attach": "attach"; "detach": "detach"; "overlayKeydown": "overlayKeydown"; "overlayOutsideClick": "overlayOutsideClick"; }, never, never, true, never>;
189
- static ngAcceptInputType_hasBackdrop: unknown;
190
- static ngAcceptInputType_lockPosition: unknown;
191
- static ngAcceptInputType_flexibleDimensions: unknown;
192
- static ngAcceptInputType_growAfterOpen: unknown;
193
- static ngAcceptInputType_push: unknown;
194
- static ngAcceptInputType_disposeOnNavigation: unknown;
40
+ interface CloseScrollStrategyConfig {
41
+ /** Amount of pixels the user has to scroll before the overlay is closed. */
42
+ threshold?: number;
195
43
  }
196
-
197
- /**
198
- * Directive applied to an element to make it usable as an origin for an Overlay using a
199
- * ConnectedPositionStrategy.
200
- */
201
- export declare class CdkOverlayOrigin {
202
- elementRef: ElementRef<any>;
203
- constructor(...args: unknown[]);
204
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkOverlayOrigin, never>;
205
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkOverlayOrigin, "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", ["cdkOverlayOrigin"], {}, {}, never, never, true, never>;
206
- }
207
-
208
- export { CdkScrollable }
209
-
210
44
  /**
211
45
  * Strategy that will close the overlay as soon as the user starts scrolling.
212
46
  */
213
- export declare class CloseScrollStrategy implements ScrollStrategy {
47
+ declare class CloseScrollStrategy implements ScrollStrategy {
214
48
  private _scrollDispatcher;
215
49
  private _ngZone;
216
50
  private _viewportRuler;
@@ -230,341 +64,74 @@ export declare class CloseScrollStrategy implements ScrollStrategy {
230
64
  private _detach;
231
65
  }
232
66
 
233
- /**
234
- * Config options for the CloseScrollStrategy.
235
- */
236
- declare interface CloseScrollStrategyConfig {
237
- /** Amount of pixels the user has to scroll before the overlay is closed. */
238
- threshold?: number;
239
- }
240
-
241
- export { ComponentType }
242
-
243
- /** The change event emitted by the strategy when a fallback position is used. */
244
- export declare class ConnectedOverlayPositionChange {
245
- /** The position used as a result of this change. */
246
- connectionPair: ConnectionPositionPair;
247
- /** @docs-private */
248
- scrollableViewProperties: ScrollingVisibility;
249
- constructor(
250
- /** The position used as a result of this change. */
251
- connectionPair: ConnectionPositionPair,
252
- /** @docs-private */
253
- scrollableViewProperties: ScrollingVisibility);
254
- }
255
-
256
- /** A connected position as specified by the user. */
257
- export declare interface ConnectedPosition {
258
- originX: 'start' | 'center' | 'end';
259
- originY: 'top' | 'center' | 'bottom';
260
- overlayX: 'start' | 'center' | 'end';
261
- overlayY: 'top' | 'center' | 'bottom';
262
- weight?: number;
263
- offsetX?: number;
264
- offsetY?: number;
265
- panelClass?: string | string[];
67
+ /** Scroll strategy that doesn't do anything. */
68
+ declare class NoopScrollStrategy implements ScrollStrategy {
69
+ /** Does nothing, as this scroll strategy is a no-op. */
70
+ enable(): void;
71
+ /** Does nothing, as this scroll strategy is a no-op. */
72
+ disable(): void;
73
+ /** Does nothing, as this scroll strategy is a no-op. */
74
+ attach(): void;
266
75
  }
267
76
 
268
- /** The points of the origin element and the overlay element to connect. */
269
- export declare class ConnectionPositionPair {
270
- /** Offset along the X axis. */
271
- offsetX?: number | undefined;
272
- /** Offset along the Y axis. */
273
- offsetY?: number | undefined;
274
- /** Class(es) to be applied to the panel while this position is active. */
275
- panelClass?: string | string[] | undefined;
276
- /** X-axis attachment point for connected overlay origin. Can be 'start', 'end', or 'center'. */
277
- originX: HorizontalConnectionPos;
278
- /** Y-axis attachment point for connected overlay origin. Can be 'top', 'bottom', or 'center'. */
279
- originY: VerticalConnectionPos;
280
- /** X-axis attachment point for connected overlay. Can be 'start', 'end', or 'center'. */
281
- overlayX: HorizontalConnectionPos;
282
- /** Y-axis attachment point for connected overlay. Can be 'top', 'bottom', or 'center'. */
283
- overlayY: VerticalConnectionPos;
284
- constructor(origin: OriginConnectionPosition, overlay: OverlayConnectionPosition,
285
- /** Offset along the X axis. */
286
- offsetX?: number | undefined,
287
- /** Offset along the Y axis. */
288
- offsetY?: number | undefined,
289
- /** Class(es) to be applied to the panel while this position is active. */
290
- panelClass?: string | string[] | undefined);
77
+ /**
78
+ * Config options for the RepositionScrollStrategy.
79
+ */
80
+ interface RepositionScrollStrategyConfig {
81
+ /** Time in milliseconds to throttle the scroll events. */
82
+ scrollThrottle?: number;
83
+ /** Whether to close the overlay once the user has scrolled away completely. */
84
+ autoClose?: boolean;
291
85
  }
292
-
293
86
  /**
294
- * A strategy for positioning overlays. Using this strategy, an overlay is given an
295
- * implicit position relative some origin element. The relative position is defined in terms of
296
- * a point on the origin element that is connected to a point on the overlay element. For example,
297
- * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner
298
- * of the overlay.
87
+ * Strategy that will update the element position as the user is scrolling.
299
88
  */
300
- export declare class FlexibleConnectedPositionStrategy implements PositionStrategy {
89
+ declare class RepositionScrollStrategy implements ScrollStrategy {
90
+ private _scrollDispatcher;
301
91
  private _viewportRuler;
302
- private _document;
303
- private _platform;
304
- private _overlayContainer;
305
- /** The overlay to which this strategy is attached. */
92
+ private _ngZone;
93
+ private _config?;
94
+ private _scrollSubscription;
306
95
  private _overlayRef;
307
- /** Whether we're performing the very first positioning of the overlay. */
308
- private _isInitialRender;
309
- /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */
310
- private _lastBoundingBoxSize;
311
- /** Whether the overlay was pushed in a previous positioning. */
312
- private _isPushed;
313
- /** Whether the overlay can be pushed on-screen on the initial open. */
314
- private _canPush;
315
- /** Whether the overlay can grow via flexible width/height after the initial open. */
316
- private _growAfterOpen;
317
- /** Whether the overlay's width and height can be constrained to fit within the viewport. */
318
- private _hasFlexibleDimensions;
319
- /** Whether the overlay position is locked. */
320
- private _positionLocked;
321
- /** Cached origin dimensions */
322
- private _originRect;
323
- /** Cached overlay dimensions */
324
- private _overlayRect;
325
- /** Cached viewport dimensions */
326
- private _viewportRect;
327
- /** Cached container dimensions */
328
- private _containerRect;
329
- /** Amount of space that must be maintained between the overlay and the edge of the viewport. */
330
- private _viewportMargin;
331
- /** The Scrollable containers used to check scrollable view properties on position change. */
332
- private _scrollables;
333
- /** Ordered list of preferred positions, from most to least desirable. */
334
- _preferredPositions: ConnectionPositionPair[];
335
- /** The origin element against which the overlay will be positioned. */
336
- _origin: FlexibleConnectedPositionStrategyOrigin;
337
- /** The overlay pane element. */
338
- private _pane;
339
- /** Whether the strategy has been disposed of already. */
340
- private _isDisposed;
341
- /**
342
- * Parent element for the overlay panel used to constrain the overlay panel's size to fit
343
- * within the viewport.
344
- */
345
- private _boundingBox;
346
- /** The last position to have been calculated as the best fit position. */
347
- private _lastPosition;
348
- /** The last calculated scroll visibility. Only tracked */
349
- private _lastScrollVisibility;
350
- /** Subject that emits whenever the position changes. */
351
- private readonly _positionChanges;
352
- /** Subscription to viewport size changes. */
353
- private _resizeSubscription;
354
- /** Default offset for the overlay along the x axis. */
355
- private _offsetX;
356
- /** Default offset for the overlay along the y axis. */
357
- private _offsetY;
358
- /** Selector to be used when finding the elements on which to set the transform origin. */
359
- private _transformOriginSelector;
360
- /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */
361
- private _appliedPanelClasses;
362
- /** Amount by which the overlay was pushed in each axis during the last time it was positioned. */
363
- private _previousPushAmount;
364
- /** Observable sequence of position changes. */
365
- positionChanges: Observable<ConnectedOverlayPositionChange>;
366
- /** Ordered list of preferred positions, from most to least desirable. */
367
- get positions(): ConnectionPositionPair[];
368
- constructor(connectedTo: FlexibleConnectedPositionStrategyOrigin, _viewportRuler: ViewportRuler, _document: Document, _platform: Platform, _overlayContainer: OverlayContainer);
369
- /** Attaches this position strategy to an overlay. */
96
+ constructor(_scrollDispatcher: ScrollDispatcher, _viewportRuler: ViewportRuler, _ngZone: NgZone, _config?: RepositionScrollStrategyConfig | undefined);
97
+ /** Attaches this scroll strategy to an overlay. */
370
98
  attach(overlayRef: OverlayRef): void;
371
- /**
372
- * Updates the position of the overlay element, using whichever preferred position relative
373
- * to the origin best fits on-screen.
374
- *
375
- * The selection of a position goes as follows:
376
- * - If any positions fit completely within the viewport as-is,
377
- * choose the first position that does so.
378
- * - If flexible dimensions are enabled and at least one satisfies the given minimum width/height,
379
- * choose the position with the greatest available size modified by the positions' weight.
380
- * - If pushing is enabled, take the position that went off-screen the least and push it
381
- * on-screen.
382
- * - If none of the previous criteria were met, use the position that goes off-screen the least.
383
- * @docs-private
384
- */
385
- apply(): void;
99
+ /** Enables repositioning of the attached overlay on scroll. */
100
+ enable(): void;
101
+ /** Disables repositioning of the attached overlay on scroll. */
102
+ disable(): void;
386
103
  detach(): void;
387
- /** Cleanup after the element gets destroyed. */
388
- dispose(): void;
389
- /**
390
- * This re-aligns the overlay element with the trigger in its last calculated position,
391
- * even if a position higher in the "preferred positions" list would now fit. This
392
- * allows one to re-align the panel without changing the orientation of the panel.
393
- */
394
- reapplyLastPosition(): void;
395
- /**
396
- * Sets the list of Scrollable containers that host the origin element so that
397
- * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every
398
- * Scrollable must be an ancestor element of the strategy's origin element.
399
- */
400
- withScrollableContainers(scrollables: CdkScrollable[]): this;
401
- /**
402
- * Adds new preferred positions.
403
- * @param positions List of positions options for this overlay.
404
- */
405
- withPositions(positions: ConnectedPosition[]): this;
406
- /**
407
- * Sets a minimum distance the overlay may be positioned to the edge of the viewport.
408
- * @param margin Required margin between the overlay and the viewport edge in pixels.
409
- */
410
- withViewportMargin(margin: number): this;
411
- /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */
412
- withFlexibleDimensions(flexibleDimensions?: boolean): this;
413
- /** Sets whether the overlay can grow after the initial open via flexible width/height. */
414
- withGrowAfterOpen(growAfterOpen?: boolean): this;
415
- /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */
416
- withPush(canPush?: boolean): this;
417
- /**
418
- * Sets whether the overlay's position should be locked in after it is positioned
419
- * initially. When an overlay is locked in, it won't attempt to reposition itself
420
- * when the position is re-applied (e.g. when the user scrolls away).
421
- * @param isLocked Whether the overlay should locked in.
422
- */
423
- withLockedPosition(isLocked?: boolean): this;
424
- /**
425
- * Sets the origin, relative to which to position the overlay.
426
- * Using an element origin is useful for building components that need to be positioned
427
- * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be
428
- * used for cases like contextual menus which open relative to the user's pointer.
429
- * @param origin Reference to the new origin.
430
- */
431
- setOrigin(origin: FlexibleConnectedPositionStrategyOrigin): this;
432
- /**
433
- * Sets the default offset for the overlay's connection point on the x-axis.
434
- * @param offset New offset in the X axis.
435
- */
436
- withDefaultOffsetX(offset: number): this;
437
- /**
438
- * Sets the default offset for the overlay's connection point on the y-axis.
439
- * @param offset New offset in the Y axis.
440
- */
441
- withDefaultOffsetY(offset: number): this;
442
- /**
443
- * Configures that the position strategy should set a `transform-origin` on some elements
444
- * inside the overlay, depending on the current position that is being applied. This is
445
- * useful for the cases where the origin of an animation can change depending on the
446
- * alignment of the overlay.
447
- * @param selector CSS selector that will be used to find the target
448
- * elements onto which to set the transform origin.
449
- */
450
- withTransformOriginOn(selector: string): this;
451
- /**
452
- * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.
453
- */
454
- private _getOriginPoint;
455
- /**
456
- * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and
457
- * origin point to which the overlay should be connected.
458
- */
459
- private _getOverlayPoint;
460
- /** Gets how well an overlay at the given point will fit within the viewport. */
461
- private _getOverlayFit;
462
- /**
463
- * Whether the overlay can fit within the viewport when it may resize either its width or height.
464
- * @param fit How well the overlay fits in the viewport at some position.
465
- * @param point The (x, y) coordinates of the overlay at some position.
466
- * @param viewport The geometry of the viewport.
467
- */
468
- private _canFitWithFlexibleDimensions;
469
- /**
470
- * Gets the point at which the overlay can be "pushed" on-screen. If the overlay is larger than
471
- * the viewport, the top-left corner will be pushed on-screen (with overflow occurring on the
472
- * right and bottom).
473
- *
474
- * @param start Starting point from which the overlay is pushed.
475
- * @param rawOverlayRect Dimensions of the overlay.
476
- * @param scrollPosition Current viewport scroll position.
477
- * @returns The point at which to position the overlay after pushing. This is effectively a new
478
- * originPoint.
479
- */
480
- private _pushOverlayOnScreen;
481
- /**
482
- * Applies a computed position to the overlay and emits a position change.
483
- * @param position The position preference
484
- * @param originPoint The point on the origin element where the overlay is connected.
485
- */
486
- private _applyPosition;
487
- /** Sets the transform origin based on the configured selector and the passed-in position. */
488
- private _setTransformOrigin;
489
- /**
490
- * Gets the position and size of the overlay's sizing container.
491
- *
492
- * This method does no measuring and applies no styles so that we can cheaply compute the
493
- * bounds for all positions and choose the best fit based on these results.
494
- */
495
- private _calculateBoundingBoxRect;
496
- /**
497
- * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the
498
- * origin's connection point and stretches to the bounds of the viewport.
499
- *
500
- * @param origin The point on the origin element where the overlay is connected.
501
- * @param position The position preference
502
- */
503
- private _setBoundingBoxStyles;
504
- /** Resets the styles for the bounding box so that a new positioning can be computed. */
505
- private _resetBoundingBoxStyles;
506
- /** Resets the styles for the overlay pane so that a new positioning can be computed. */
507
- private _resetOverlayElementStyles;
508
- /** Sets positioning styles to the overlay element. */
509
- private _setOverlayElementStyles;
510
- /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */
511
- private _getExactOverlayY;
512
- /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */
513
- private _getExactOverlayX;
514
- /**
515
- * Gets the view properties of the trigger and overlay, including whether they are clipped
516
- * or completely outside the view of any of the strategy's scrollables.
517
- */
518
- private _getScrollVisibility;
519
- /** Subtracts the amount that an element is overflowing on an axis from its length. */
520
- private _subtractOverflows;
521
- /** Narrows the given viewport rect by the current _viewportMargin. */
522
- private _getNarrowedViewportRect;
523
- /** Whether the we're dealing with an RTL context */
524
- private _isRtl;
525
- /** Determines whether the overlay uses exact or flexible positioning. */
526
- private _hasExactPosition;
527
- /** Retrieves the offset of a position along the x or y axis. */
528
- private _getOffset;
529
- /** Validates that the current position match the expected values. */
530
- private _validatePositions;
531
- /** Adds a single CSS class or an array of classes on the overlay panel. */
532
- private _addPanelClasses;
533
- /** Clears the classes that the position strategy has applied from the overlay panel. */
534
- private _clearPanelClasses;
535
- /** Returns the DOMRect of the current origin. */
536
- private _getOriginRect;
537
104
  }
538
105
 
539
- /** Possible values that can be set as the origin of a FlexibleConnectedPositionStrategy. */
540
- export declare type FlexibleConnectedPositionStrategyOrigin = ElementRef | Element | (Point & {
541
- width?: number;
542
- height?: number;
543
- });
544
-
545
106
  /**
546
- * Alternative to OverlayContainer that supports correct displaying of overlay elements in
547
- * Fullscreen mode
548
- * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
107
+ * Options for how an overlay will handle scrolling.
549
108
  *
550
- * Should be provided in the root component.
109
+ * Users can provide a custom value for `ScrollStrategyOptions` to replace the default
110
+ * behaviors. This class primarily acts as a factory for ScrollStrategy instances.
551
111
  */
552
- export declare class FullscreenOverlayContainer extends OverlayContainer implements OnDestroy {
553
- private _renderer;
554
- private _fullScreenEventName;
555
- private _cleanupFullScreenListener;
112
+ declare class ScrollStrategyOptions {
113
+ private _scrollDispatcher;
114
+ private _viewportRuler;
115
+ private _ngZone;
116
+ private _document;
556
117
  constructor(...args: unknown[]);
557
- ngOnDestroy(): void;
558
- protected _createContainer(): void;
559
- private _adjustParentForFullscreenChange;
560
- private _getEventName;
118
+ /** Do nothing on scroll. */
119
+ noop: () => NoopScrollStrategy;
561
120
  /**
562
- * When the page is put into fullscreen mode, a specific element is specified.
563
- * Only that element and its children are visible when in fullscreen mode.
121
+ * Close the overlay as soon as the user scrolls.
122
+ * @param config Configuration to be used inside the scroll strategy.
564
123
  */
565
- getFullscreenElement(): Element;
566
- static ɵfac: i0.ɵɵFactoryDeclaration<FullscreenOverlayContainer, never>;
567
- static ɵprov: i0.ɵɵInjectableDeclaration<FullscreenOverlayContainer>;
124
+ close: (config?: CloseScrollStrategyConfig) => CloseScrollStrategy;
125
+ /** Block scrolling. */
126
+ block: () => BlockScrollStrategy;
127
+ /**
128
+ * Update the overlay's position on scroll.
129
+ * @param config Configuration to be used inside the scroll strategy.
130
+ * Allows debouncing the reposition calls.
131
+ */
132
+ reposition: (config?: RepositionScrollStrategyConfig) => RepositionScrollStrategy;
133
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScrollStrategyOptions, never>;
134
+ static ɵprov: i0.ɵɵInjectableDeclaration<ScrollStrategyOptions>;
568
135
  }
569
136
 
570
137
  /**
@@ -573,7 +140,7 @@ export declare class FullscreenOverlayContainer extends OverlayContainer impleme
573
140
  * transforms, in order to avoid issues with subpixel rendering which can cause the
574
141
  * element to become blurry.
575
142
  */
576
- export declare class GlobalPositionStrategy implements PositionStrategy {
143
+ declare class GlobalPositionStrategy implements PositionStrategy {
577
144
  /** The overlay to which this strategy is attached. */
578
145
  private _overlayRef;
579
146
  private _cssPosition;
@@ -658,39 +225,24 @@ export declare class GlobalPositionStrategy implements PositionStrategy {
658
225
  dispose(): void;
659
226
  }
660
227
 
661
-
662
- /** Horizontal dimension of a connection point on the perimeter of the origin or overlay element. */
663
- export declare type HorizontalConnectionPos = 'start' | 'center' | 'end';
664
-
665
- declare namespace i4 {
666
- export {
667
- CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,
668
- CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,
669
- CdkOverlayOrigin,
670
- CdkConnectedOverlay,
671
- CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER
672
- }
673
- }
674
-
675
- /** An object where all of its properties cannot be written. */
676
- declare type ImmutableObject<T> = {
677
- readonly [P in keyof T]: T[P];
678
- };
679
-
680
- /** Scroll strategy that doesn't do anything. */
681
- export declare class NoopScrollStrategy implements ScrollStrategy {
682
- /** Does nothing, as this scroll strategy is a no-op. */
683
- enable(): void;
684
- /** Does nothing, as this scroll strategy is a no-op. */
685
- disable(): void;
686
- /** Does nothing, as this scroll strategy is a no-op. */
687
- attach(): void;
688
- }
689
-
690
- /** A connection point on the origin element. */
691
- export declare interface OriginConnectionPosition {
692
- originX: HorizontalConnectionPos;
693
- originY: VerticalConnectionPos;
228
+ /** Builder for overlay position strategy. */
229
+ declare class OverlayPositionBuilder {
230
+ private _viewportRuler;
231
+ private _document;
232
+ private _platform;
233
+ private _overlayContainer;
234
+ constructor(...args: unknown[]);
235
+ /**
236
+ * Creates a global position strategy.
237
+ */
238
+ global(): GlobalPositionStrategy;
239
+ /**
240
+ * Creates a flexible position strategy.
241
+ * @param origin Origin relative to which to position the overlay.
242
+ */
243
+ flexibleConnectedTo(origin: FlexibleConnectedPositionStrategyOrigin): FlexibleConnectedPositionStrategy;
244
+ static ɵfac: i0.ɵɵFactoryDeclaration<OverlayPositionBuilder, never>;
245
+ static ɵprov: i0.ɵɵInjectableDeclaration<OverlayPositionBuilder>;
694
246
  }
695
247
 
696
248
  /**
@@ -701,7 +253,7 @@ export declare interface OriginConnectionPosition {
701
253
  *
702
254
  * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.
703
255
  */
704
- export declare class Overlay {
256
+ declare class Overlay {
705
257
  scrollStrategies: ScrollStrategyOptions;
706
258
  private _overlayContainer;
707
259
  private _positionBuilder;
@@ -751,422 +303,29 @@ export declare class Overlay {
751
303
  static ɵprov: i0.ɵɵInjectableDeclaration<Overlay>;
752
304
  }
753
305
 
754
- /** Initial configuration used when creating an overlay. */
755
- export declare class OverlayConfig {
756
- /** Strategy with which to position the overlay. */
757
- positionStrategy?: PositionStrategy;
758
- /** Strategy to be used when handling scroll events while the overlay is open. */
759
- scrollStrategy?: ScrollStrategy;
760
- /** Custom class to add to the overlay pane. */
761
- panelClass?: string | string[];
762
- /** Whether the overlay has a backdrop. */
763
- hasBackdrop?: boolean;
764
- /** Custom class to add to the backdrop */
765
- backdropClass?: string | string[];
766
- /** The width of the overlay panel. If a number is provided, pixel units are assumed. */
767
- width?: number | string;
768
- /** The height of the overlay panel. If a number is provided, pixel units are assumed. */
769
- height?: number | string;
770
- /** The min-width of the overlay panel. If a number is provided, pixel units are assumed. */
771
- minWidth?: number | string;
772
- /** The min-height of the overlay panel. If a number is provided, pixel units are assumed. */
773
- minHeight?: number | string;
774
- /** The max-width of the overlay panel. If a number is provided, pixel units are assumed. */
775
- maxWidth?: number | string;
776
- /** The max-height of the overlay panel. If a number is provided, pixel units are assumed. */
777
- maxHeight?: number | string;
778
- /**
779
- * Direction of the text in the overlay panel. If a `Directionality` instance
780
- * is passed in, the overlay will handle changes to its value automatically.
781
- */
782
- direction?: Direction | Directionality;
783
- /**
784
- * Whether the overlay should be disposed of when the user goes backwards/forwards in history.
785
- * Note that this usually doesn't include clicking on links (unless the user is using
786
- * the `HashLocationStrategy`).
787
- */
788
- disposeOnNavigation?: boolean;
789
- constructor(config?: OverlayConfig);
790
- }
791
-
792
- /** A connection point on the overlay element. */
793
- export declare interface OverlayConnectionPosition {
794
- overlayX: HorizontalConnectionPos;
795
- overlayY: VerticalConnectionPos;
796
- }
797
-
798
- /** Container inside which all overlays will render. */
799
- export declare class OverlayContainer implements OnDestroy {
800
- protected _platform: Platform;
801
- protected _containerElement: HTMLElement;
802
- protected _document: Document;
803
- protected _styleLoader: _CdkPrivateStyleLoader;
804
- constructor(...args: unknown[]);
805
- ngOnDestroy(): void;
806
- /**
807
- * This method returns the overlay container element. It will lazily
808
- * create the element the first time it is called to facilitate using
809
- * the container in non-browser environments.
810
- * @returns the container element
811
- */
812
- getContainerElement(): HTMLElement;
813
- /**
814
- * Create the overlay container element, which is simply a div
815
- * with the 'cdk-overlay-container' class on the document body.
816
- */
817
- protected _createContainer(): void;
818
- /** Loads the structural styles necessary for the overlay to work. */
819
- protected _loadStyles(): void;
820
- static ɵfac: i0.ɵɵFactoryDeclaration<OverlayContainer, never>;
821
- static ɵprov: i0.ɵɵInjectableDeclaration<OverlayContainer>;
822
- }
823
-
824
- /**
825
- * Service for dispatching keyboard events that land on the body to appropriate overlay ref,
826
- * if any. It maintains a list of attached overlays to determine best suited overlay based
827
- * on event target and order of overlay opens.
828
- */
829
- export declare class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
830
- private _ngZone;
831
- private _renderer;
832
- private _cleanupKeydown;
833
- /** Add a new overlay to the list of attached overlay refs. */
834
- add(overlayRef: OverlayRef): void;
835
- /** Detaches the global keyboard event listener. */
836
- protected detach(): void;
837
- /** Keyboard event listener that will be attached to the body. */
838
- private _keydownListener;
839
- static ɵfac: i0.ɵɵFactoryDeclaration<OverlayKeyboardDispatcher, never>;
840
- static ɵprov: i0.ɵɵInjectableDeclaration<OverlayKeyboardDispatcher>;
841
- }
842
-
843
- export declare class OverlayModule {
844
- static ɵfac: i0.ɵɵFactoryDeclaration<OverlayModule, never>;
845
- static ɵmod: i0.ɵɵNgModuleDeclaration<OverlayModule, never, [typeof i1.BidiModule, typeof i2.PortalModule, typeof i3.ScrollingModule, typeof i4.CdkConnectedOverlay, typeof i4.CdkOverlayOrigin], [typeof i4.CdkConnectedOverlay, typeof i4.CdkOverlayOrigin, typeof i3.ScrollingModule]>;
846
- static ɵinj: i0.ɵɵInjectorDeclaration<OverlayModule>;
847
- }
848
-
849
- /**
850
- * Service for dispatching mouse click events that land on the body to appropriate overlay ref,
851
- * if any. It maintains a list of attached overlays to determine best suited overlay based
852
- * on event target and order of overlay opens.
853
- */
854
- export declare class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
855
- private _platform;
856
- private _ngZone;
857
- private _renderer;
858
- private _cursorOriginalValue;
859
- private _cursorStyleIsSet;
860
- private _pointerDownEventTarget;
861
- private _cleanups;
862
- /** Add a new overlay to the list of attached overlay refs. */
863
- add(overlayRef: OverlayRef): void;
864
- /** Detaches the global keyboard event listener. */
865
- protected detach(): void;
866
- /** Store pointerdown event target to track origin of click. */
867
- private _pointerDownListener;
868
- /** Click event listener that will be attached to the body propagate phase. */
869
- private _clickListener;
870
- static ɵfac: i0.ɵɵFactoryDeclaration<OverlayOutsideClickDispatcher, never>;
871
- static ɵprov: i0.ɵɵInjectableDeclaration<OverlayOutsideClickDispatcher>;
872
- }
873
-
874
- /** Builder for overlay position strategy. */
875
- export declare class OverlayPositionBuilder {
876
- private _viewportRuler;
877
- private _document;
878
- private _platform;
879
- private _overlayContainer;
880
- constructor(...args: unknown[]);
881
- /**
882
- * Creates a global position strategy.
883
- */
884
- global(): GlobalPositionStrategy;
885
- /**
886
- * Creates a flexible position strategy.
887
- * @param origin Origin relative to which to position the overlay.
888
- */
889
- flexibleConnectedTo(origin: FlexibleConnectedPositionStrategyOrigin): FlexibleConnectedPositionStrategy;
890
- static ɵfac: i0.ɵɵFactoryDeclaration<OverlayPositionBuilder, never>;
891
- static ɵprov: i0.ɵɵInjectableDeclaration<OverlayPositionBuilder>;
892
- }
893
-
894
- /**
895
- * Reference to an overlay that has been created with the Overlay service.
896
- * Used to manipulate or dispose of said overlay.
897
- */
898
- export declare class OverlayRef implements PortalOutlet {
899
- private _portalOutlet;
900
- private _host;
901
- private _pane;
902
- private _config;
903
- private _ngZone;
904
- private _keyboardDispatcher;
905
- private _document;
906
- private _location;
907
- private _outsideClickDispatcher;
908
- private _animationsDisabled;
909
- private _injector;
910
- private _renderer;
911
- private readonly _backdropClick;
912
- private readonly _attachments;
913
- private readonly _detachments;
914
- private _positionStrategy;
915
- private _scrollStrategy;
916
- private _locationChanges;
917
- private _backdropRef;
918
- /**
919
- * Reference to the parent of the `_host` at the time it was detached. Used to restore
920
- * the `_host` to its original position in the DOM when it gets re-attached.
921
- */
922
- private _previousHostParent;
923
- /** Stream of keydown events dispatched to this overlay. */
924
- readonly _keydownEvents: Subject<KeyboardEvent>;
925
- /** Stream of mouse outside events dispatched to this overlay. */
926
- readonly _outsidePointerEvents: Subject<MouseEvent>;
927
- private _renders;
928
- private _afterRenderRef;
929
- /** Reference to the currently-running `afterNextRender` call. */
930
- private _afterNextRenderRef;
931
- constructor(_portalOutlet: PortalOutlet, _host: HTMLElement, _pane: HTMLElement, _config: ImmutableObject<OverlayConfig>, _ngZone: NgZone, _keyboardDispatcher: OverlayKeyboardDispatcher, _document: Document, _location: Location_2, _outsideClickDispatcher: OverlayOutsideClickDispatcher, _animationsDisabled: boolean | undefined, _injector: EnvironmentInjector, _renderer: Renderer2);
932
- /** The overlay's HTML element */
933
- get overlayElement(): HTMLElement;
934
- /** The overlay's backdrop HTML element. */
935
- get backdropElement(): HTMLElement | null;
936
- /**
937
- * Wrapper around the panel element. Can be used for advanced
938
- * positioning where a wrapper with specific styling is
939
- * required around the overlay pane.
940
- */
941
- get hostElement(): HTMLElement;
942
- attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;
943
- attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;
944
- attach(portal: any): any;
945
- /**
946
- * Detaches an overlay from a portal.
947
- * @returns The portal detachment result.
948
- */
949
- detach(): any;
950
- /** Cleans up the overlay from the DOM. */
951
- dispose(): void;
952
- /** Whether the overlay has attached content. */
953
- hasAttached(): boolean;
954
- /** Gets an observable that emits when the backdrop has been clicked. */
955
- backdropClick(): Observable<MouseEvent>;
956
- /** Gets an observable that emits when the overlay has been attached. */
957
- attachments(): Observable<void>;
958
- /** Gets an observable that emits when the overlay has been detached. */
959
- detachments(): Observable<void>;
960
- /** Gets an observable of keydown events targeted to this overlay. */
961
- keydownEvents(): Observable<KeyboardEvent>;
962
- /** Gets an observable of pointer events targeted outside this overlay. */
963
- outsidePointerEvents(): Observable<MouseEvent>;
964
- /** Gets the current overlay configuration, which is immutable. */
965
- getConfig(): OverlayConfig;
966
- /** Updates the position of the overlay based on the position strategy. */
967
- updatePosition(): void;
968
- /** Switches to a new position strategy and updates the overlay position. */
969
- updatePositionStrategy(strategy: PositionStrategy): void;
970
- /** Update the size properties of the overlay. */
971
- updateSize(sizeConfig: OverlaySizeConfig): void;
972
- /** Sets the LTR/RTL direction for the overlay. */
973
- setDirection(dir: Direction | Directionality): void;
974
- /** Add a CSS class or an array of classes to the overlay pane. */
975
- addPanelClass(classes: string | string[]): void;
976
- /** Remove a CSS class or an array of classes from the overlay pane. */
977
- removePanelClass(classes: string | string[]): void;
978
- /**
979
- * Returns the layout direction of the overlay panel.
980
- */
981
- getDirection(): Direction;
982
- /** Switches to a new scroll strategy. */
983
- updateScrollStrategy(strategy: ScrollStrategy): void;
984
- /** Updates the text direction of the overlay panel. */
985
- private _updateElementDirection;
986
- /** Updates the size of the overlay element based on the overlay config. */
987
- private _updateElementSize;
988
- /** Toggles the pointer events for the overlay pane element. */
989
- private _togglePointerEvents;
990
- /** Attaches a backdrop for this overlay. */
991
- private _attachBackdrop;
992
- /**
993
- * Updates the stacking order of the element, moving it to the top if necessary.
994
- * This is required in cases where one overlay was detached, while another one,
995
- * that should be behind it, was destroyed. The next time both of them are opened,
996
- * the stacking will be wrong, because the detached element's pane will still be
997
- * in its original DOM position.
998
- */
999
- private _updateStackingOrder;
1000
- /** Detaches the backdrop (if any) associated with the overlay. */
1001
- detachBackdrop(): void;
1002
- /** Toggles a single CSS class or an array of classes on an element. */
1003
- private _toggleClasses;
1004
- /** Detaches the overlay content next time the zone stabilizes. */
1005
- private _detachContentWhenEmpty;
1006
- /** Disposes of a scroll strategy. */
1007
- private _disposeScrollStrategy;
1008
- }
1009
-
1010
- /** Size properties for an overlay. */
1011
- export declare interface OverlaySizeConfig {
1012
- width?: number | string;
1013
- height?: number | string;
1014
- minWidth?: number | string;
1015
- minHeight?: number | string;
1016
- maxWidth?: number | string;
1017
- maxHeight?: number | string;
1018
- }
1019
-
1020
- /** A simple (x, y) coordinate. */
1021
- declare interface Point {
1022
- x: number;
1023
- y: number;
1024
- }
1025
-
1026
- /** Strategy for setting the position on an overlay. */
1027
- export declare interface PositionStrategy {
1028
- /** Attaches this position strategy to an overlay. */
1029
- attach(overlayRef: OverlayRef): void;
1030
- /** Updates the position of the overlay element. */
1031
- apply(): void;
1032
- /** Called when the overlay is detached. */
1033
- detach?(): void;
1034
- /** Cleans up any DOM modifications made by the position strategy, if necessary. */
1035
- dispose(): void;
1036
- }
1037
-
1038
- /**
1039
- * Strategy that will update the element position as the user is scrolling.
1040
- */
1041
- export declare class RepositionScrollStrategy implements ScrollStrategy {
1042
- private _scrollDispatcher;
1043
- private _viewportRuler;
1044
- private _ngZone;
1045
- private _config?;
1046
- private _scrollSubscription;
1047
- private _overlayRef;
1048
- constructor(_scrollDispatcher: ScrollDispatcher, _viewportRuler: ViewportRuler, _ngZone: NgZone, _config?: RepositionScrollStrategyConfig | undefined);
1049
- /** Attaches this scroll strategy to an overlay. */
1050
- attach(overlayRef: OverlayRef): void;
1051
- /** Enables repositioning of the attached overlay on scroll. */
1052
- enable(): void;
1053
- /** Disables repositioning of the attached overlay on scroll. */
1054
- disable(): void;
1055
- detach(): void;
1056
- }
1057
-
1058
- /**
1059
- * Config options for the RepositionScrollStrategy.
1060
- */
1061
- export declare interface RepositionScrollStrategyConfig {
1062
- /** Time in milliseconds to throttle the scroll events. */
1063
- scrollThrottle?: number;
1064
- /** Whether to close the overlay once the user has scrolled away completely. */
1065
- autoClose?: boolean;
1066
- }
1067
-
1068
- export { ScrollDispatcher }
1069
-
1070
- /**
1071
- * Set of properties regarding the position of the origin and overlay relative to the viewport
1072
- * with respect to the containing Scrollable elements.
1073
- *
1074
- * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the
1075
- * bounds of any one of the strategy's Scrollable's bounding client rectangle.
1076
- *
1077
- * The overlay and origin are outside view if there is no overlap between their bounding client
1078
- * rectangle and any one of the strategy's Scrollable's bounding client rectangle.
1079
- *
1080
- * ----------- -----------
1081
- * | outside | | clipped |
1082
- * | view | --------------------------
1083
- * | | | | | |
1084
- * ---------- | ----------- |
1085
- * -------------------------- | |
1086
- * | | | Scrollable |
1087
- * | | | |
1088
- * | | --------------------------
1089
- * | Scrollable |
1090
- * | |
1091
- * --------------------------
1092
- *
1093
- * @docs-private
1094
- */
1095
- export declare class ScrollingVisibility {
1096
- isOriginClipped: boolean;
1097
- isOriginOutsideView: boolean;
1098
- isOverlayClipped: boolean;
1099
- isOverlayOutsideView: boolean;
1100
- }
1101
-
1102
306
  /**
1103
- * Describes a strategy that will be used by an overlay to handle scroll events while it is open.
1104
- */
1105
- export declare interface ScrollStrategy {
1106
- /** Enable this scroll strategy (called when the attached overlay is attached to a portal). */
1107
- enable: () => void;
1108
- /** Disable this scroll strategy (called when the attached overlay is detached from a portal). */
1109
- disable: () => void;
1110
- /** Attaches this `ScrollStrategy` to an overlay. */
1111
- attach: (overlayRef: OverlayRef) => void;
1112
- /** Detaches the scroll strategy from the current overlay. */
1113
- detach?: () => void;
1114
- }
1115
-
1116
- /**
1117
- * Options for how an overlay will handle scrolling.
307
+ * Alternative to OverlayContainer that supports correct displaying of overlay elements in
308
+ * Fullscreen mode
309
+ * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
1118
310
  *
1119
- * Users can provide a custom value for `ScrollStrategyOptions` to replace the default
1120
- * behaviors. This class primarily acts as a factory for ScrollStrategy instances.
311
+ * Should be provided in the root component.
1121
312
  */
1122
- export declare class ScrollStrategyOptions {
1123
- private _scrollDispatcher;
1124
- private _viewportRuler;
1125
- private _ngZone;
1126
- private _document;
313
+ declare class FullscreenOverlayContainer extends OverlayContainer implements OnDestroy {
314
+ private _renderer;
315
+ private _fullScreenEventName;
316
+ private _cleanupFullScreenListener;
1127
317
  constructor(...args: unknown[]);
1128
- /** Do nothing on scroll. */
1129
- noop: () => NoopScrollStrategy;
1130
- /**
1131
- * Close the overlay as soon as the user scrolls.
1132
- * @param config Configuration to be used inside the scroll strategy.
1133
- */
1134
- close: (config?: CloseScrollStrategyConfig) => CloseScrollStrategy;
1135
- /** Block scrolling. */
1136
- block: () => BlockScrollStrategy;
318
+ ngOnDestroy(): void;
319
+ protected _createContainer(): void;
320
+ private _adjustParentForFullscreenChange;
321
+ private _getEventName;
1137
322
  /**
1138
- * Update the overlay's position on scroll.
1139
- * @param config Configuration to be used inside the scroll strategy.
1140
- * Allows debouncing the reposition calls.
323
+ * When the page is put into fullscreen mode, a specific element is specified.
324
+ * Only that element and its children are visible when in fullscreen mode.
1141
325
  */
1142
- reposition: (config?: RepositionScrollStrategyConfig) => RepositionScrollStrategy;
1143
- static ɵfac: i0.ɵɵFactoryDeclaration<ScrollStrategyOptions, never>;
1144
- static ɵprov: i0.ɵɵInjectableDeclaration<ScrollStrategyOptions>;
326
+ getFullscreenElement(): Element;
327
+ static ɵfac: i0.ɵɵFactoryDeclaration<FullscreenOverlayContainer, never>;
328
+ static ɵprov: i0.ɵɵInjectableDeclaration<FullscreenOverlayContainer>;
1145
329
  }
1146
330
 
1147
- export declare const STANDARD_DROPDOWN_ADJACENT_POSITIONS: ConnectedPosition[];
1148
-
1149
- export declare const STANDARD_DROPDOWN_BELOW_POSITIONS: ConnectedPosition[];
1150
-
1151
- /**
1152
- * Validates whether a horizontal position property matches the expected values.
1153
- * @param property Name of the property being validated.
1154
- * @param value Value of the property being validated.
1155
- * @docs-private
1156
- */
1157
- export declare function validateHorizontalPosition(property: string, value: HorizontalConnectionPos): void;
1158
-
1159
- /**
1160
- * Validates whether a vertical position property matches the expected values.
1161
- * @param property Name of the property being validated.
1162
- * @param value Value of the property being validated.
1163
- * @docs-private
1164
- */
1165
- export declare function validateVerticalPosition(property: string, value: VerticalConnectionPos): void;
1166
-
1167
- /** Vertical dimension of a connection point on the perimeter of the origin or overlay element. */
1168
- export declare type VerticalConnectionPos = 'top' | 'center' | 'bottom';
1169
-
1170
- export { ViewportRuler }
1171
-
1172
- export { }
331
+ export { BlockScrollStrategy, CloseScrollStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayPositionBuilder, RepositionScrollStrategy, type RepositionScrollStrategyConfig, ScrollStrategyOptions };