@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk",
3
- "version": "20.0.0-next.0",
3
+ "version": "20.0.0-next.2",
4
4
  "description": "Angular Material Component Development Kit",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,94 +1,31 @@
1
+ export { P as Platform } from '../platform.d-0a5b4792.js';
1
2
  import * as i0 from '@angular/core';
2
3
  import { Renderer2 } from '@angular/core';
3
4
 
4
- /**
5
- * Binds an event listener with specific options in a backwards-compatible way.
6
- * This function is necessary, because `Renderer2.listen` only supports listener options
7
- * after 19.1 and during the v19 period we support any 19.x version.
8
- * @docs-private
9
- */
10
- export declare function _bindEventWithOptions(renderer: Renderer2, target: EventTarget, eventName: string, callback: (event: any) => boolean | void, options: _ListenerOptions): () => void;
11
-
12
- /** Gets the target of an event while accounting for Shadow DOM. */
13
- export declare function _getEventTarget<T extends EventTarget>(event: Event): T | null;
5
+ declare class PlatformModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlatformModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PlatformModule, never, never, never>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<PlatformModule>;
9
+ }
14
10
 
15
- /**
16
- * Gets the currently-focused element on the page while
17
- * also piercing through Shadow DOM boundaries.
18
- */
19
- export declare function _getFocusedElementPierceShadowDom(): HTMLElement | null;
11
+ /** @returns The input types supported by this browser. */
12
+ declare function getSupportedInputTypes(): Set<string>;
20
13
 
21
14
  /**
22
- * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,
23
- * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.
15
+ * Checks whether the user's browser supports passive event listeners.
16
+ * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
24
17
  */
25
- export declare function getRtlScrollAxisType(): RtlScrollAxisType;
26
-
27
- /** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */
28
- export declare function _getShadowRoot(element: HTMLElement): ShadowRoot | null;
29
-
30
-
31
- /** @returns The input types supported by this browser. */
32
- export declare function getSupportedInputTypes(): Set<string>;
33
-
34
-
35
- /** Gets whether the code is currently running in a test environment. */
36
- export declare function _isTestEnvironment(): boolean;
37
-
38
- /** Options when binding events manually. */
39
- export declare interface _ListenerOptions {
40
- capture?: boolean;
41
- once?: boolean;
42
- passive?: boolean;
43
- }
44
-
18
+ declare function supportsPassiveEventListeners(): boolean;
45
19
  /**
46
20
  * Normalizes an `AddEventListener` object to something that can be passed
47
21
  * to `addEventListener` on any browser, no matter whether it supports the
48
22
  * `options` parameter.
49
23
  * @param options Object to be normalized.
50
24
  */
51
- export declare function normalizePassiveListenerOptions(options: AddEventListenerOptions): AddEventListenerOptions | boolean;
52
-
53
- /**
54
- * Service to detect the current platform by comparing the userAgent strings and
55
- * checking browser-specific global properties.
56
- */
57
- export declare class Platform {
58
- private _platformId;
59
- /** Whether the Angular application is being rendered in the browser. */
60
- isBrowser: boolean;
61
- /** Whether the current browser is Microsoft Edge. */
62
- EDGE: boolean;
63
- /** Whether the current rendering engine is Microsoft Trident. */
64
- TRIDENT: boolean;
65
- /** Whether the current rendering engine is Blink. */
66
- BLINK: boolean;
67
- /** Whether the current rendering engine is WebKit. */
68
- WEBKIT: boolean;
69
- /** Whether the current platform is Apple iOS. */
70
- IOS: boolean;
71
- /** Whether the current browser is Firefox. */
72
- FIREFOX: boolean;
73
- /** Whether the current platform is Android. */
74
- ANDROID: boolean;
75
- /** Whether the current browser is Safari. */
76
- SAFARI: boolean;
77
- /** Backwards-compatible constructor. */
78
- constructor(..._args: unknown[]);
79
- static ɵfac: i0.ɵɵFactoryDeclaration<Platform, never>;
80
- static ɵprov: i0.ɵɵInjectableDeclaration<Platform>;
81
- }
82
-
83
- export declare class PlatformModule {
84
- static ɵfac: i0.ɵɵFactoryDeclaration<PlatformModule, never>;
85
- static ɵmod: i0.ɵɵNgModuleDeclaration<PlatformModule, never, never, never>;
86
- static ɵinj: i0.ɵɵInjectorDeclaration<PlatformModule>;
87
- }
88
-
25
+ declare function normalizePassiveListenerOptions(options: AddEventListenerOptions): AddEventListenerOptions | boolean;
89
26
 
90
27
  /** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */
91
- export declare enum RtlScrollAxisType {
28
+ declare enum RtlScrollAxisType {
92
29
  /**
93
30
  * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled
94
31
  * all the way right.
@@ -105,19 +42,41 @@ export declare enum RtlScrollAxisType {
105
42
  */
106
43
  INVERTED = 2
107
44
  }
108
-
109
-
45
+ /** Check whether the browser supports scroll behaviors. */
46
+ declare function supportsScrollBehavior(): boolean;
110
47
  /**
111
- * Checks whether the user's browser supports passive event listeners.
112
- * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
48
+ * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,
49
+ * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.
113
50
  */
114
- export declare function supportsPassiveEventListeners(): boolean;
51
+ declare function getRtlScrollAxisType(): RtlScrollAxisType;
115
52
 
116
- /** Check whether the browser supports scroll behaviors. */
117
- export declare function supportsScrollBehavior(): boolean;
53
+ /** Checks whether the user's browser support Shadow DOM. */
54
+ declare function _supportsShadowDom(): boolean;
55
+ /** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */
56
+ declare function _getShadowRoot(element: HTMLElement): ShadowRoot | null;
57
+ /**
58
+ * Gets the currently-focused element on the page while
59
+ * also piercing through Shadow DOM boundaries.
60
+ */
61
+ declare function _getFocusedElementPierceShadowDom(): HTMLElement | null;
62
+ /** Gets the target of an event while accounting for Shadow DOM. */
63
+ declare function _getEventTarget<T extends EventTarget>(event: Event): T | null;
118
64
 
65
+ /** Gets whether the code is currently running in a test environment. */
66
+ declare function _isTestEnvironment(): boolean;
119
67
 
120
- /** Checks whether the user's browser support Shadow DOM. */
121
- export declare function _supportsShadowDom(): boolean;
68
+ /** Options when binding events manually. */
69
+ interface _ListenerOptions {
70
+ capture?: boolean;
71
+ once?: boolean;
72
+ passive?: boolean;
73
+ }
74
+ /**
75
+ * Binds an event listener with specific options in a backwards-compatible way.
76
+ * This function is necessary, because `Renderer2.listen` only supports listener options
77
+ * after 19.1 and during the v19 period we support any 19.x version.
78
+ * @docs-private
79
+ */
80
+ declare function _bindEventWithOptions(renderer: Renderer2, target: EventTarget, eventName: string, callback: (event: any) => boolean | void, options: _ListenerOptions): () => void;
122
81
 
123
- export { }
82
+ export { PlatformModule, RtlScrollAxisType, type _ListenerOptions, _bindEventWithOptions, _getEventTarget, _getFocusedElementPierceShadowDom, _getShadowRoot, _isTestEnvironment, _supportsShadowDom, getRtlScrollAxisType, getSupportedInputTypes, normalizePassiveListenerOptions, supportsPassiveEventListeners, supportsScrollBehavior };
@@ -0,0 +1,33 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ /**
4
+ * Service to detect the current platform by comparing the userAgent strings and
5
+ * checking browser-specific global properties.
6
+ */
7
+ declare class Platform {
8
+ private _platformId;
9
+ /** Whether the Angular application is being rendered in the browser. */
10
+ isBrowser: boolean;
11
+ /** Whether the current browser is Microsoft Edge. */
12
+ EDGE: boolean;
13
+ /** Whether the current rendering engine is Microsoft Trident. */
14
+ TRIDENT: boolean;
15
+ /** Whether the current rendering engine is Blink. */
16
+ BLINK: boolean;
17
+ /** Whether the current rendering engine is WebKit. */
18
+ WEBKIT: boolean;
19
+ /** Whether the current platform is Apple iOS. */
20
+ IOS: boolean;
21
+ /** Whether the current browser is Firefox. */
22
+ FIREFOX: boolean;
23
+ /** Whether the current platform is Android. */
24
+ ANDROID: boolean;
25
+ /** Whether the current browser is Safari. */
26
+ SAFARI: boolean;
27
+ /** Backwards-compatible constructor. */
28
+ constructor(..._args: unknown[]);
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<Platform, never>;
30
+ static ɵprov: i0.ɵɵInjectableDeclaration<Platform>;
31
+ }
32
+
33
+ export { Platform as P };
package/portal/index.d.ts CHANGED
@@ -1,165 +1,12 @@
1
- import { ApplicationRef } from '@angular/core';
2
- import { ComponentRef } from '@angular/core';
3
- import { ElementRef } from '@angular/core';
4
- import { EmbeddedViewRef } from '@angular/core';
5
- import { EventEmitter } from '@angular/core';
6
- import * as i0 from '@angular/core';
7
- import { Injector } from '@angular/core';
8
- import { OnDestroy } from '@angular/core';
9
- import { OnInit } from '@angular/core';
10
- import { TemplateRef } from '@angular/core';
11
- import { ViewContainerRef } from '@angular/core';
12
-
13
- /**
14
- * @deprecated Use `BasePortalOutlet` instead.
15
- * @breaking-change 9.0.0
16
- */
17
- export declare abstract class BasePortalHost extends BasePortalOutlet {
18
- }
19
-
20
- /**
21
- * Partial implementation of PortalOutlet that handles attaching
22
- * ComponentPortal and TemplatePortal.
23
- */
24
- export declare abstract class BasePortalOutlet implements PortalOutlet {
25
- /** The portal currently attached to the host. */
26
- protected _attachedPortal: Portal<any> | null;
27
- /** A function that will permanently dispose this host. */
28
- private _disposeFn;
29
- /** Whether this host has already been permanently disposed. */
30
- private _isDisposed;
31
- /** Whether this host has an attached portal. */
32
- hasAttached(): boolean;
33
- attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;
34
- attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;
35
- attach(portal: any): any;
36
- abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
37
- abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
38
- readonly attachDomPortal: null | ((portal: DomPortal) => any);
39
- /** Detaches a previously attached portal. */
40
- detach(): void;
41
- /** Permanently dispose of this portal host. */
42
- dispose(): void;
43
- /** @docs-private */
44
- setDisposeFn(fn: () => void): void;
45
- private _invokeDisposeFn;
46
- }
47
-
48
- /**
49
- * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,
50
- * the directive instance itself can be attached to a host, enabling declarative use of portals.
51
- */
52
- export declare class CdkPortal extends TemplatePortal {
53
- constructor(...args: unknown[]);
54
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkPortal, never>;
55
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPortal, "[cdkPortal]", ["cdkPortal"], {}, {}, never, never, true, never>;
56
- }
57
-
58
- /**
59
- * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be
60
- * directly attached to it, enabling declarative use.
61
- *
62
- * Usage:
63
- * `<ng-template [cdkPortalOutlet]="greeting"></ng-template>`
64
- */
65
- export declare class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {
66
- private _moduleRef;
67
- private _document;
68
- private _viewContainerRef;
69
- /** Whether the portal component is initialized. */
70
- private _isInitialized;
71
- /** Reference to the currently-attached component/view ref. */
72
- private _attachedRef;
73
- constructor(...args: unknown[]);
74
- /** Portal associated with the Portal outlet. */
75
- get portal(): Portal<any> | null;
76
- set portal(portal: Portal<any> | null | undefined | '');
77
- /** Emits when a portal is attached to the outlet. */
78
- readonly attached: EventEmitter<CdkPortalOutletAttachedRef>;
79
- /** Component or view reference that is attached to the portal. */
80
- get attachedRef(): CdkPortalOutletAttachedRef;
81
- ngOnInit(): void;
82
- ngOnDestroy(): void;
83
- /**
84
- * Attach the given ComponentPortal to this PortalOutlet.
85
- *
86
- * @param portal Portal to be attached to the portal outlet.
87
- * @returns Reference to the created component.
88
- */
89
- attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
90
- /**
91
- * Attach the given TemplatePortal to this PortalHost as an embedded View.
92
- * @param portal Portal to be attached.
93
- * @returns Reference to the created embedded view.
94
- */
95
- attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
96
- /**
97
- * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.
98
- * @param portal Portal to be attached.
99
- * @deprecated To be turned into a method.
100
- * @breaking-change 10.0.0
101
- */
102
- attachDomPortal: (portal: DomPortal) => void;
103
- /** Gets the root node of the portal outlet. */
104
- private _getRootNode;
105
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkPortalOutlet, never>;
106
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPortalOutlet, "[cdkPortalOutlet]", ["cdkPortalOutlet"], { "portal": { "alias": "cdkPortalOutlet"; "required": false; }; }, { "attached": "attached"; }, never, never, true, never>;
107
- }
108
-
109
- /**
110
- * Possible attached references to the CdkPortalOutlet.
111
- */
112
- export declare type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;
113
-
114
- /**
115
- * A `ComponentPortal` is a portal that instantiates some Component upon attachment.
116
- */
117
- export declare class ComponentPortal<T> extends Portal<ComponentRef<T>> {
118
- /** The type of the component that will be instantiated for attachment. */
119
- component: ComponentType<T>;
120
- /**
121
- * Where the attached component should live in Angular's *logical* component tree.
122
- * This is different from where the component *renders*, which is determined by the PortalOutlet.
123
- * The origin is necessary when the host is outside of the Angular application context.
124
- */
125
- viewContainerRef?: ViewContainerRef | null;
126
- /** Injector used for the instantiation of the component. */
127
- injector?: Injector | null;
128
- /**
129
- * List of DOM nodes that should be projected through `<ng-content>` of the attached component.
130
- */
131
- projectableNodes?: Node[][] | null;
132
- constructor(component: ComponentType<T>, viewContainerRef?: ViewContainerRef | null, injector?: Injector | null, projectableNodes?: Node[][] | null);
133
- }
134
-
135
- /** Interface that can be used to generically type a class. */
136
- export declare interface ComponentType<T> {
137
- new (...args: any[]): T;
138
- }
139
-
140
- /**
141
- * A `DomPortal` is a portal whose DOM element will be taken from its current position
142
- * in the DOM and moved into a portal outlet, when it is attached. On detach, the content
143
- * will be restored to its original position.
144
- */
145
- export declare class DomPortal<T = HTMLElement> extends Portal<T> {
146
- /** DOM node hosting the portal's content. */
147
- readonly element: T;
148
- constructor(element: T | ElementRef<T>);
149
- }
150
-
151
- /**
152
- * @deprecated Use `DomPortalOutlet` instead.
153
- * @breaking-change 9.0.0
154
- */
155
- export declare class DomPortalHost extends DomPortalOutlet {
156
- }
1
+ import { B as BasePortalOutlet, a as ComponentPortal, T as TemplatePortal, D as DomPortal } from '../portal-directives.d-d345bd53.js';
2
+ export { B as BasePortalOutlet, e as CdkPortal, C as CdkPortalOutlet, g as CdkPortalOutletAttachedRef, a as ComponentPortal, b as ComponentType, D as DomPortal, d as Portal, h as PortalHostDirective, P as PortalModule, c as PortalOutlet, T as TemplatePortal, f as TemplatePortalDirective } from '../portal-directives.d-d345bd53.js';
3
+ import { ApplicationRef, Injector, ComponentRef, EmbeddedViewRef } from '@angular/core';
157
4
 
158
5
  /**
159
6
  * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
160
7
  * application context.
161
8
  */
162
- export declare class DomPortalOutlet extends BasePortalOutlet {
9
+ declare class DomPortalOutlet extends BasePortalOutlet {
163
10
  /** Element into which the content is projected. */
164
11
  outletElement: Element;
165
12
  private _appRef?;
@@ -201,110 +48,4 @@ export declare class DomPortalOutlet extends BasePortalOutlet {
201
48
  private _getComponentRootNode;
202
49
  }
203
50
 
204
- /**
205
- * A `Portal` is something that you want to render somewhere else.
206
- * It can be attach to / detached from a `PortalOutlet`.
207
- */
208
- export declare abstract class Portal<T> {
209
- private _attachedHost;
210
- /** Attach this portal to a host. */
211
- attach(host: PortalOutlet): T;
212
- /** Detach this portal from its host */
213
- detach(): void;
214
- /** Whether this portal is attached to a host. */
215
- get isAttached(): boolean;
216
- /**
217
- * Sets the PortalOutlet reference without performing `attach()`. This is used directly by
218
- * the PortalOutlet when it is performing an `attach()` or `detach()`.
219
- */
220
- setAttachedHost(host: PortalOutlet | null): void;
221
- }
222
-
223
- /**
224
- * @deprecated Use `PortalOutlet` instead.
225
- * @breaking-change 9.0.0
226
- */
227
- export declare type PortalHost = PortalOutlet;
228
-
229
- /**
230
- * @deprecated Use `CdkPortalOutlet` instead.
231
- * @breaking-change 9.0.0
232
- */
233
- export declare class PortalHostDirective extends CdkPortalOutlet {
234
- static ɵfac: i0.ɵɵFactoryDeclaration<PortalHostDirective, never>;
235
- static ɵdir: i0.ɵɵDirectiveDeclaration<PortalHostDirective, "[cdkPortalHost], [portalHost]", ["cdkPortalHost"], { "portal": { "alias": "cdkPortalHost"; "required": false; }; }, {}, never, never, true, never>;
236
- }
237
-
238
- /**
239
- * Custom injector to be used when providing custom
240
- * injection tokens to components inside a portal.
241
- * @docs-private
242
- * @deprecated Use `Injector.create` instead.
243
- * @breaking-change 11.0.0
244
- */
245
- export declare class PortalInjector implements Injector {
246
- private _parentInjector;
247
- private _customTokens;
248
- constructor(_parentInjector: Injector, _customTokens: WeakMap<any, any>);
249
- get(token: any, notFoundValue?: any): any;
250
- }
251
-
252
- export declare class PortalModule {
253
- static ɵfac: i0.ɵɵFactoryDeclaration<PortalModule, never>;
254
- static ɵmod: i0.ɵɵNgModuleDeclaration<PortalModule, never, [typeof CdkPortal, typeof CdkPortalOutlet, typeof TemplatePortalDirective, typeof PortalHostDirective], [typeof CdkPortal, typeof CdkPortalOutlet, typeof TemplatePortalDirective, typeof PortalHostDirective]>;
255
- static ɵinj: i0.ɵɵInjectorDeclaration<PortalModule>;
256
- }
257
-
258
- /** A `PortalOutlet` is a space that can contain a single `Portal`. */
259
- export declare interface PortalOutlet {
260
- /** Attaches a portal to this outlet. */
261
- attach(portal: Portal<any>): any;
262
- /** Detaches the currently attached portal from this outlet. */
263
- detach(): any;
264
- /** Performs cleanup before the outlet is destroyed. */
265
- dispose(): void;
266
- /** Whether there is currently a portal attached to this outlet. */
267
- hasAttached(): boolean;
268
- }
269
-
270
- /**
271
- * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).
272
- */
273
- export declare class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {
274
- /** The embedded template that will be used to instantiate an embedded View in the host. */
275
- templateRef: TemplateRef<C>;
276
- /** Reference to the ViewContainer into which the template will be stamped out. */
277
- viewContainerRef: ViewContainerRef;
278
- /** Contextual data to be passed in to the embedded view. */
279
- context?: C | undefined;
280
- /** The injector to use for the embedded view. */
281
- injector?: Injector | undefined;
282
- constructor(
283
- /** The embedded template that will be used to instantiate an embedded View in the host. */
284
- templateRef: TemplateRef<C>,
285
- /** Reference to the ViewContainer into which the template will be stamped out. */
286
- viewContainerRef: ViewContainerRef,
287
- /** Contextual data to be passed in to the embedded view. */
288
- context?: C | undefined,
289
- /** The injector to use for the embedded view. */
290
- injector?: Injector | undefined);
291
- get origin(): ElementRef;
292
- /**
293
- * Attach the portal to the provided `PortalOutlet`.
294
- * When a context is provided it will override the `context` property of the `TemplatePortal`
295
- * instance.
296
- */
297
- attach(host: PortalOutlet, context?: C | undefined): EmbeddedViewRef<C>;
298
- detach(): void;
299
- }
300
-
301
- /**
302
- * @deprecated Use `CdkPortal` instead.
303
- * @breaking-change 9.0.0
304
- */
305
- export declare class TemplatePortalDirective extends CdkPortal {
306
- static ɵfac: i0.ɵɵFactoryDeclaration<TemplatePortalDirective, never>;
307
- static ɵdir: i0.ɵɵDirectiveDeclaration<TemplatePortalDirective, "[cdk-portal], [portal]", ["cdkPortal"], {}, {}, never, never, true, never>;
308
- }
309
-
310
- export { }
51
+ export { DomPortalOutlet };