@depup/angular__material 21.2.4-depup.0 → 21.2.5-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +2 -2
  2. package/changes.json +1 -1
  3. package/fesm2022/_animation-chunk.mjs.map +1 -1
  4. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  6. package/fesm2022/_error-options-chunk.mjs +6 -6
  7. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  8. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  9. package/fesm2022/_form-field-chunk.mjs +33 -33
  10. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  11. package/fesm2022/_icon-button-chunk.mjs +9 -9
  12. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  13. package/fesm2022/_icon-registry-chunk.mjs +4 -4
  14. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  15. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  16. package/fesm2022/_internal-form-field-chunk.mjs +6 -6
  17. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  18. package/fesm2022/_line-chunk.mjs +7 -7
  19. package/fesm2022/_line-chunk.mjs.map +1 -1
  20. package/fesm2022/_option-chunk.mjs +11 -11
  21. package/fesm2022/_option-chunk.mjs.map +1 -1
  22. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  23. package/fesm2022/_option-module-chunk.mjs +4 -4
  24. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  25. package/fesm2022/_pseudo-checkbox-chunk.mjs +6 -6
  26. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  27. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +4 -4
  28. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  29. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  30. package/fesm2022/_ripple-chunk.mjs +10 -10
  31. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  32. package/fesm2022/_ripple-loader-chunk.mjs +3 -3
  33. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  34. package/fesm2022/_ripple-module-chunk.mjs +4 -4
  35. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  36. package/fesm2022/_structural-styles-chunk.mjs +6 -6
  37. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  38. package/fesm2022/_tooltip-chunk.mjs +18 -14
  39. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  40. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  41. package/fesm2022/autocomplete.mjs +21 -21
  42. package/fesm2022/autocomplete.mjs.map +1 -1
  43. package/fesm2022/badge-testing.mjs.map +1 -1
  44. package/fesm2022/badge.mjs +13 -13
  45. package/fesm2022/badge.mjs.map +1 -1
  46. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  47. package/fesm2022/bottom-sheet.mjs +17 -17
  48. package/fesm2022/bottom-sheet.mjs.map +1 -1
  49. package/fesm2022/button-testing.mjs.map +1 -1
  50. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  51. package/fesm2022/button-toggle.mjs +14 -14
  52. package/fesm2022/button-toggle.mjs.map +1 -1
  53. package/fesm2022/button.mjs +20 -20
  54. package/fesm2022/button.mjs.map +1 -1
  55. package/fesm2022/card-testing.mjs.map +1 -1
  56. package/fesm2022/card.mjs +49 -49
  57. package/fesm2022/card.mjs.map +1 -1
  58. package/fesm2022/checkbox-testing.mjs.map +1 -1
  59. package/fesm2022/checkbox.mjs +10 -10
  60. package/fesm2022/checkbox.mjs.map +1 -1
  61. package/fesm2022/chips-testing.mjs.map +1 -1
  62. package/fesm2022/chips.mjs +63 -63
  63. package/fesm2022/chips.mjs.map +1 -1
  64. package/fesm2022/core-testing.mjs +1 -1
  65. package/fesm2022/core-testing.mjs.map +1 -1
  66. package/fesm2022/core.mjs +25 -25
  67. package/fesm2022/core.mjs.map +1 -1
  68. package/fesm2022/datepicker-testing.mjs.map +1 -1
  69. package/fesm2022/datepicker.mjs +97 -97
  70. package/fesm2022/datepicker.mjs.map +1 -1
  71. package/fesm2022/dialog-testing.mjs +3 -3
  72. package/fesm2022/dialog-testing.mjs.map +1 -1
  73. package/fesm2022/dialog.mjs +32 -32
  74. package/fesm2022/dialog.mjs.map +1 -1
  75. package/fesm2022/divider-testing.mjs.map +1 -1
  76. package/fesm2022/divider.mjs +10 -10
  77. package/fesm2022/divider.mjs.map +1 -1
  78. package/fesm2022/expansion-testing.mjs.map +1 -1
  79. package/fesm2022/expansion.mjs +34 -34
  80. package/fesm2022/expansion.mjs.map +1 -1
  81. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  82. package/fesm2022/form-field-testing.mjs +1 -1
  83. package/fesm2022/form-field-testing.mjs.map +1 -1
  84. package/fesm2022/form-field.mjs +5 -5
  85. package/fesm2022/form-field.mjs.map +1 -1
  86. package/fesm2022/grid-list-testing.mjs.map +1 -1
  87. package/fesm2022/grid-list.mjs +29 -29
  88. package/fesm2022/grid-list.mjs.map +1 -1
  89. package/fesm2022/icon-testing.mjs +8 -8
  90. package/fesm2022/icon-testing.mjs.map +1 -1
  91. package/fesm2022/icon.mjs +11 -11
  92. package/fesm2022/icon.mjs.map +1 -1
  93. package/fesm2022/input-testing.mjs.map +1 -1
  94. package/fesm2022/input.mjs +8 -8
  95. package/fesm2022/input.mjs.map +1 -1
  96. package/fesm2022/list-testing.mjs.map +1 -1
  97. package/fesm2022/list.mjs +64 -64
  98. package/fesm2022/list.mjs.map +1 -1
  99. package/fesm2022/menu-testing.mjs.map +1 -1
  100. package/fesm2022/menu.mjs +27 -27
  101. package/fesm2022/menu.mjs.map +1 -1
  102. package/fesm2022/paginator-testing.mjs.map +1 -1
  103. package/fesm2022/paginator.mjs +17 -17
  104. package/fesm2022/paginator.mjs.map +1 -1
  105. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  106. package/fesm2022/progress-bar.mjs +10 -10
  107. package/fesm2022/progress-bar.mjs.map +1 -1
  108. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  109. package/fesm2022/progress-spinner.mjs +10 -10
  110. package/fesm2022/progress-spinner.mjs.map +1 -1
  111. package/fesm2022/radio-testing.mjs.map +1 -1
  112. package/fesm2022/radio.mjs +14 -14
  113. package/fesm2022/radio.mjs.map +1 -1
  114. package/fesm2022/select-testing.mjs.map +1 -1
  115. package/fesm2022/select.mjs +26 -26
  116. package/fesm2022/select.mjs.map +1 -1
  117. package/fesm2022/sidenav-testing.mjs.map +1 -1
  118. package/fesm2022/sidenav.mjs +33 -36
  119. package/fesm2022/sidenav.mjs.map +1 -1
  120. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  121. package/fesm2022/slide-toggle.mjs +10 -10
  122. package/fesm2022/slide-toggle.mjs.map +1 -1
  123. package/fesm2022/slider-testing.mjs.map +1 -1
  124. package/fesm2022/slider.mjs +41 -41
  125. package/fesm2022/slider.mjs.map +1 -1
  126. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  127. package/fesm2022/snack-bar.mjs +30 -30
  128. package/fesm2022/snack-bar.mjs.map +1 -1
  129. package/fesm2022/sort-testing.mjs.map +1 -1
  130. package/fesm2022/sort.mjs +18 -18
  131. package/fesm2022/sort.mjs.map +1 -1
  132. package/fesm2022/stepper-testing.mjs.map +1 -1
  133. package/fesm2022/stepper.mjs +42 -42
  134. package/fesm2022/stepper.mjs.map +1 -1
  135. package/fesm2022/table-testing.mjs.map +1 -1
  136. package/fesm2022/table.mjs +60 -60
  137. package/fesm2022/table.mjs.map +1 -1
  138. package/fesm2022/tabs-testing.mjs.map +1 -1
  139. package/fesm2022/tabs.mjs +59 -59
  140. package/fesm2022/tabs.mjs.map +1 -1
  141. package/fesm2022/timepicker-testing.mjs.map +1 -1
  142. package/fesm2022/timepicker.mjs +17 -17
  143. package/fesm2022/timepicker.mjs.map +1 -1
  144. package/fesm2022/toolbar-testing.mjs.map +1 -1
  145. package/fesm2022/toolbar.mjs +15 -15
  146. package/fesm2022/toolbar.mjs.map +1 -1
  147. package/fesm2022/tooltip-testing.mjs.map +1 -1
  148. package/fesm2022/tooltip.mjs +4 -4
  149. package/fesm2022/tooltip.mjs.map +1 -1
  150. package/fesm2022/tree-testing.mjs.map +1 -1
  151. package/fesm2022/tree.mjs +31 -31
  152. package/fesm2022/tree.mjs.map +1 -1
  153. package/package.json +4 -4
  154. package/prebuilt-themes/azure-blue.css +167 -1
  155. package/prebuilt-themes/cyan-orange.css +167 -1
  156. package/prebuilt-themes/deeppurple-amber.css +2301 -1
  157. package/prebuilt-themes/indigo-pink.css +2301 -1
  158. package/prebuilt-themes/magenta-violet.css +167 -1
  159. package/prebuilt-themes/pink-bluegrey.css +2301 -1
  160. package/prebuilt-themes/purple-green.css +2301 -1
  161. package/prebuilt-themes/rose-red.css +167 -1
  162. package/schematics/ng-add/index.js +1 -1
  163. package/types/_button-toggle-chunk.d.ts +1 -1
  164. package/types/_icon-registry-chunk.d.ts +1 -1
  165. package/types/_option-parent-chunk.d.ts +1 -1
  166. package/types/_ripple-chunk.d.ts +1 -1
  167. package/types/dialog.d.ts +1 -1
  168. package/types/grid-list.d.ts +1 -1
  169. package/types/paginator.d.ts +0 -1
  170. package/types/radio.d.ts +1 -1
  171. package/types/select.d.ts +2 -2
  172. package/types/sidenav-testing.d.ts +1 -1
  173. package/types/sidenav.d.ts +1 -1
  174. package/types/slider.d.ts +5 -9
  175. package/types/table.d.ts +2 -4
  176. package/types/tabs.d.ts +1 -1
  177. package/types/timepicker.d.ts +1 -1
  178. package/types/tooltip.d.ts +318 -7
  179. package/types/tree.d.ts +2 -2
  180. package/types/_tooltip-chunk.d.ts +0 -315
@@ -1,12 +1,322 @@
1
- import { MatTooltip, TooltipComponent } from './_tooltip-chunk.js';
2
- export { MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_SCROLL_STRATEGY, MatTooltipDefaultOptions, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, TooltipPosition, TooltipTouchGestures, TooltipVisibility, getMatTooltipInvalidPositionError } from './_tooltip-chunk.js';
1
+ import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
3
2
  import * as i0 from '@angular/core';
4
- import * as i1 from '@angular/cdk/a11y';
5
- import * as i2 from '@angular/cdk/overlay';
3
+ import { OnDestroy, AfterViewInit, ElementRef, InjectionToken } from '@angular/core';
6
4
  import * as i2$1 from '@angular/cdk/bidi';
5
+ import { Directionality } from '@angular/cdk/bidi';
6
+ import * as i2 from '@angular/cdk/overlay';
7
+ import { OverlayRef, ConnectedPosition, OriginConnectionPosition, OverlayConnectionPosition, ScrollStrategy } from '@angular/cdk/overlay';
8
+ import { Observable } from 'rxjs';
9
+ import * as i1 from '@angular/cdk/a11y';
7
10
  import * as i1$1 from '@angular/cdk/scrolling';
8
- import '@angular/cdk/coercion';
9
- import 'rxjs';
11
+
12
+ /** Possible positions for a tooltip. */
13
+ type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';
14
+ /**
15
+ * Options for how the tooltip trigger should handle touch gestures.
16
+ * See `MatTooltip.touchGestures` for more information.
17
+ */
18
+ type TooltipTouchGestures = 'auto' | 'on' | 'off';
19
+ /** Possible visibility states of a tooltip. */
20
+ type TooltipVisibility = 'initial' | 'visible' | 'hidden';
21
+ /** Time in ms to throttle repositioning after scroll events. */
22
+ declare const SCROLL_THROTTLE_MS = 20;
23
+ /**
24
+ * Creates an error to be thrown if the user supplied an invalid tooltip position.
25
+ * @docs-private
26
+ */
27
+ declare function getMatTooltipInvalidPositionError(position: string): Error;
28
+ /** Injection token that determines the scroll handling while a tooltip is visible. */
29
+ declare const MAT_TOOLTIP_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
30
+ /** Injection token to be used to override the default options for `matTooltip`. */
31
+ declare const MAT_TOOLTIP_DEFAULT_OPTIONS: InjectionToken<MatTooltipDefaultOptions>;
32
+ /** Default `matTooltip` options that can be overridden. */
33
+ interface MatTooltipDefaultOptions {
34
+ /** Default delay when the tooltip is shown. */
35
+ showDelay: number;
36
+ /** Default delay when the tooltip is hidden. */
37
+ hideDelay: number;
38
+ /** Default delay when hiding the tooltip on a touch device. */
39
+ touchendHideDelay: number;
40
+ /** Time between the user putting the pointer on a tooltip trigger and the long press event being fired on a touch device. */
41
+ touchLongPressShowDelay?: number;
42
+ /** Default touch gesture handling for tooltips. */
43
+ touchGestures?: TooltipTouchGestures;
44
+ /** Default position for tooltips. */
45
+ position?: TooltipPosition;
46
+ /**
47
+ * Default value for whether tooltips should be positioned near the click or touch origin
48
+ * instead of outside the element bounding box.
49
+ */
50
+ positionAtOrigin?: boolean;
51
+ /** Disables the ability for the user to interact with the tooltip element. */
52
+ disableTooltipInteractivity?: boolean;
53
+ /**
54
+ * Default classes to be applied to the tooltip. These default classes will not be applied if
55
+ * `tooltipClass` is defined directly on the tooltip element, as it will override the default.
56
+ */
57
+ tooltipClass?: string | string[];
58
+ /**
59
+ * By default the tooltip attempts to detect whether the user's device is able to hover by
60
+ * consulting the `Platform` provider that was created a long time ago and is based on
61
+ * some data points that may not be entirely accurate anymore (e.g. user agent string and
62
+ * Android/iOS-specific APIs), however changing them will break existing users. You can use this
63
+ * config property to opt into a more modern detection mechanism.
64
+ *
65
+ * The supported values include:
66
+ *
67
+ * - `false` - Default value. Detection is based on the `Platform` provider.
68
+ * - `true` - The tooltip will use the `any-hover` media query for more accurate detection.
69
+ * Note that this may break existing unit tests running in a headless browser.
70
+ * - `() => boolean` - If the automatic detection doesn't work properly in your case (e.g. the
71
+ * `any-hover` media query isn't supported) and you're able to detect more accurately, you can
72
+ * pass in a function that will be used for detection instead. It should return `true` if the
73
+ * device **has the ability to hover**, or `false` if it cannot.
74
+ */
75
+ detectHoverCapability?: boolean | (() => boolean);
76
+ }
77
+ /**
78
+ * CSS class that will be attached to the overlay panel.
79
+ * @deprecated
80
+ * @breaking-change 13.0.0 remove this variable
81
+ */
82
+ declare const TOOLTIP_PANEL_CLASS = "mat-mdc-tooltip-panel";
83
+ /**
84
+ * Directive that attaches a material design tooltip to the host element. Animates the showing and
85
+ * hiding of a tooltip provided position (defaults to below the element).
86
+ *
87
+ * https://material.io/design/components/tooltips.html
88
+ */
89
+ declare class MatTooltip implements OnDestroy, AfterViewInit {
90
+ private _elementRef;
91
+ private _ngZone;
92
+ private _platform;
93
+ private _ariaDescriber;
94
+ private _focusMonitor;
95
+ protected _dir: Directionality;
96
+ private _injector;
97
+ private _viewContainerRef;
98
+ private _mediaMatcher;
99
+ private _document;
100
+ private _renderer;
101
+ private _animationsDisabled;
102
+ private _defaultOptions;
103
+ _overlayRef: OverlayRef | null;
104
+ _tooltipInstance: TooltipComponent | null;
105
+ _overlayPanelClass: string[] | undefined;
106
+ private _portal;
107
+ private _position;
108
+ private _positionAtOrigin;
109
+ private _disabled;
110
+ private _tooltipClass;
111
+ private _viewInitialized;
112
+ private _pointerExitEventsInitialized;
113
+ private readonly _tooltipComponent;
114
+ private _viewportMargin;
115
+ private _currentPosition;
116
+ private readonly _cssClassPrefix;
117
+ private _ariaDescriptionPending;
118
+ private _dirSubscribed;
119
+ /** Allows the user to define the position of the tooltip relative to the parent element */
120
+ get position(): TooltipPosition;
121
+ set position(value: TooltipPosition);
122
+ /**
123
+ * Whether tooltip should be relative to the click or touch origin
124
+ * instead of outside the element bounding box.
125
+ */
126
+ get positionAtOrigin(): boolean;
127
+ set positionAtOrigin(value: BooleanInput);
128
+ /** Disables the display of the tooltip. */
129
+ get disabled(): boolean;
130
+ set disabled(value: BooleanInput);
131
+ /** The default delay in ms before showing the tooltip after show is called */
132
+ get showDelay(): number;
133
+ set showDelay(value: NumberInput);
134
+ private _showDelay;
135
+ /** The default delay in ms before hiding the tooltip after hide is called */
136
+ get hideDelay(): number;
137
+ set hideDelay(value: NumberInput);
138
+ private _hideDelay;
139
+ /**
140
+ * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
141
+ * uses a long press gesture to show and hide, however it can conflict with the native browser
142
+ * gestures. To work around the conflict, Angular Material disables native gestures on the
143
+ * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable
144
+ * elements). The different values for this option configure the touch event handling as follows:
145
+ * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native
146
+ * browser gestures on particular elements. In particular, it allows text selection on inputs
147
+ * and textareas, and preserves the native browser dragging on elements marked as `draggable`.
148
+ * - `on` - Enables touch gestures for all elements and disables native
149
+ * browser gestures with no exceptions.
150
+ * - `off` - Disables touch gestures. Note that this will prevent the tooltip from
151
+ * showing on touch devices.
152
+ */
153
+ touchGestures: TooltipTouchGestures;
154
+ /** The message to be displayed in the tooltip */
155
+ get message(): string;
156
+ set message(value: string | number | null | undefined);
157
+ private _message;
158
+ /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */
159
+ get tooltipClass(): string | string[] | Set<string> | {
160
+ [key: string]: unknown;
161
+ };
162
+ set tooltipClass(value: string | string[] | Set<string> | {
163
+ [key: string]: unknown;
164
+ });
165
+ /** Manually-bound passive event listeners. */
166
+ private readonly _eventCleanups;
167
+ /** Timer started at the last `touchstart` event. */
168
+ private _touchstartTimeout;
169
+ /** Emits when the component is destroyed. */
170
+ private readonly _destroyed;
171
+ /** Whether ngOnDestroyed has been called. */
172
+ private _isDestroyed;
173
+ constructor(...args: unknown[]);
174
+ ngAfterViewInit(): void;
175
+ /**
176
+ * Dispose the tooltip when destroyed.
177
+ */
178
+ ngOnDestroy(): void;
179
+ /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
180
+ show(delay?: number, origin?: {
181
+ x: number;
182
+ y: number;
183
+ }): void;
184
+ /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */
185
+ hide(delay?: number): void;
186
+ /** Shows/hides the tooltip */
187
+ toggle(origin?: {
188
+ x: number;
189
+ y: number;
190
+ }): void;
191
+ /** Returns true if the tooltip is currently visible to the user */
192
+ _isTooltipVisible(): boolean;
193
+ /** Create the overlay config and position strategy */
194
+ private _createOverlay;
195
+ /** Detaches the currently-attached tooltip. */
196
+ private _detach;
197
+ /** Updates the position of the current tooltip. */
198
+ private _updatePosition;
199
+ /** Adds the configured offset to a position. Used as a hook for child classes. */
200
+ protected _addOffset(position: ConnectedPosition): ConnectedPosition;
201
+ /**
202
+ * Returns the origin position and a fallback position based on the user's position preference.
203
+ * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
204
+ */
205
+ _getOrigin(): {
206
+ main: OriginConnectionPosition;
207
+ fallback: OriginConnectionPosition;
208
+ };
209
+ /** Returns the overlay position and a fallback position based on the user's preference */
210
+ _getOverlayPosition(): {
211
+ main: OverlayConnectionPosition;
212
+ fallback: OverlayConnectionPosition;
213
+ };
214
+ /** Updates the tooltip message and repositions the overlay according to the new message length */
215
+ private _updateTooltipMessage;
216
+ /** Updates the tooltip class */
217
+ private _setTooltipClass;
218
+ /** Inverts an overlay position. */
219
+ private _invertPosition;
220
+ /** Updates the class on the overlay panel based on the current position of the tooltip. */
221
+ private _updateCurrentPositionClass;
222
+ /** Binds the pointer events to the tooltip trigger. */
223
+ private _setupPointerEnterEventsIfNeeded;
224
+ private _setupPointerExitEventsIfNeeded;
225
+ private _addListener;
226
+ private _isTouchPlatform;
227
+ /** Disables the native browser gestures, based on how the tooltip has been configured. */
228
+ private _disableNativeGesturesIfNecessary;
229
+ /** Updates the tooltip's ARIA description based on it current state. */
230
+ private _syncAriaDescription;
231
+ /** Determines which events should be routed to the tooltip overlay. */
232
+ private _overlayEventPredicate;
233
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTooltip, never>;
234
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatTooltip, "[matTooltip]", ["matTooltip"], { "position": { "alias": "matTooltipPosition"; "required": false; }; "positionAtOrigin": { "alias": "matTooltipPositionAtOrigin"; "required": false; }; "disabled": { "alias": "matTooltipDisabled"; "required": false; }; "showDelay": { "alias": "matTooltipShowDelay"; "required": false; }; "hideDelay": { "alias": "matTooltipHideDelay"; "required": false; }; "touchGestures": { "alias": "matTooltipTouchGestures"; "required": false; }; "message": { "alias": "matTooltip"; "required": false; }; "tooltipClass": { "alias": "matTooltipClass"; "required": false; }; }, {}, never, never, true, never>;
235
+ }
236
+ /**
237
+ * Internal component that wraps the tooltip's content.
238
+ * @docs-private
239
+ */
240
+ declare class TooltipComponent implements OnDestroy {
241
+ private _changeDetectorRef;
242
+ protected _elementRef: ElementRef<HTMLElement>;
243
+ _isMultiline: boolean;
244
+ /** Message to display in the tooltip */
245
+ message: string;
246
+ /** Classes to be added to the tooltip. */
247
+ tooltipClass: string | string[] | {
248
+ [key: string]: unknown;
249
+ };
250
+ /** The timeout ID of any current timer set to show the tooltip */
251
+ private _showTimeoutId;
252
+ /** The timeout ID of any current timer set to hide the tooltip */
253
+ private _hideTimeoutId;
254
+ /** Element that caused the tooltip to open. */
255
+ _triggerElement: HTMLElement;
256
+ /** Amount of milliseconds to delay the closing sequence. */
257
+ _mouseLeaveHideDelay: number;
258
+ /** Whether animations are currently disabled. */
259
+ private _animationsDisabled;
260
+ /** Reference to the internal tooltip element. */
261
+ _tooltip: ElementRef<HTMLElement>;
262
+ /** Whether interactions on the page should close the tooltip */
263
+ private _closeOnInteraction;
264
+ /** Whether the tooltip is currently visible. */
265
+ private _isVisible;
266
+ /** Subject for notifying that the tooltip has been hidden from the view */
267
+ private readonly _onHide;
268
+ /** Name of the show animation and the class that toggles it. */
269
+ private readonly _showAnimation;
270
+ /** Name of the hide animation and the class that toggles it. */
271
+ private readonly _hideAnimation;
272
+ constructor(...args: unknown[]);
273
+ /**
274
+ * Shows the tooltip with an animation originating from the provided origin
275
+ * @param delay Amount of milliseconds to the delay showing the tooltip.
276
+ */
277
+ show(delay: number): void;
278
+ /**
279
+ * Begins the animation to hide the tooltip after the provided delay in ms.
280
+ * @param delay Amount of milliseconds to delay showing the tooltip.
281
+ */
282
+ hide(delay: number): void;
283
+ /** Returns an observable that notifies when the tooltip has been hidden from view. */
284
+ afterHidden(): Observable<void>;
285
+ /** Whether the tooltip is being displayed. */
286
+ isVisible(): boolean;
287
+ ngOnDestroy(): void;
288
+ /**
289
+ * Interactions on the HTML body should close the tooltip immediately as defined in the
290
+ * material design spec.
291
+ * https://material.io/design/components/tooltips.html#behavior
292
+ */
293
+ _handleBodyInteraction(): void;
294
+ /**
295
+ * Marks that the tooltip needs to be checked in the next change detection run.
296
+ * Mainly used for rendering the initial text before positioning a tooltip, which
297
+ * can be problematic in components with OnPush change detection.
298
+ */
299
+ _markForCheck(): void;
300
+ _handleMouseLeave({ relatedTarget }: MouseEvent): void;
301
+ /**
302
+ * Callback for when the timeout in this.show() gets completed.
303
+ * This method is only needed by the mdc-tooltip, and so it is only implemented
304
+ * in the mdc-tooltip, not here.
305
+ */
306
+ protected _onShow(): void;
307
+ /** Whether the tooltip text has overflown to the next line */
308
+ private _isTooltipMultiline;
309
+ /** Event listener dispatched when an animation on the tooltip finishes. */
310
+ _handleAnimationEnd({ animationName }: AnimationEvent): void;
311
+ /** Cancels any pending animation sequences. */
312
+ _cancelPendingAnimations(): void;
313
+ /** Handles the cleanup after an animation has finished. */
314
+ private _finalizeAnimation;
315
+ /** Toggles the visibility of the tooltip element. */
316
+ private _toggleVisibility;
317
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
318
+ static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "mat-tooltip-component", never, {}, {}, never, never, true, never>;
319
+ }
10
320
 
11
321
  declare class MatTooltipModule {
12
322
  static ɵfac: i0.ɵɵFactoryDeclaration<MatTooltipModule, never>;
@@ -14,4 +324,5 @@ declare class MatTooltipModule {
14
324
  static ɵinj: i0.ɵɵInjectorDeclaration<MatTooltipModule>;
15
325
  }
16
326
 
17
- export { MatTooltip, MatTooltipModule, TooltipComponent };
327
+ export { MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_SCROLL_STRATEGY, MatTooltip, MatTooltipModule, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, TooltipComponent, getMatTooltipInvalidPositionError };
328
+ export type { MatTooltipDefaultOptions, TooltipPosition, TooltipTouchGestures, TooltipVisibility };
package/types/tree.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as i1 from '@angular/cdk/tree';
2
- import { CdkTreeNode, CdkTreeNodeDef, CdkNestedTreeNode, CdkTreeNodePadding, CdkTreeNodeOutlet, CdkTree, CdkTreeNodeToggle, TreeControl, FlatTreeControl } from '@angular/cdk/tree';
2
+ import { CdkNestedTreeNode, CdkTreeNodeDef, CdkTreeNode, CdkTreeNodePadding, CdkTreeNodeOutlet, CdkTree, CdkTreeNodeToggle, FlatTreeControl, TreeControl } from '@angular/cdk/tree';
3
3
  import * as i0 from '@angular/core';
4
- import { OnInit, OnDestroy, AfterContentInit, ViewContainerRef } from '@angular/core';
4
+ import { AfterContentInit, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
5
5
  import * as i2 from '@angular/cdk/bidi';
6
6
  import { DataSource, CollectionViewer } from '@angular/cdk/collections';
7
7
  import { Observable } from 'rxjs';
@@ -1,315 +0,0 @@
1
- import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
2
- import * as i0 from '@angular/core';
3
- import { InjectionToken, OnDestroy, AfterViewInit, ElementRef } from '@angular/core';
4
- import { Directionality } from '@angular/cdk/bidi';
5
- import { ScrollStrategy, OverlayRef, ConnectedPosition, OriginConnectionPosition, OverlayConnectionPosition } from '@angular/cdk/overlay';
6
- import { Observable } from 'rxjs';
7
-
8
- declare global {
9
- interface CSSStyleDeclaration {
10
- msUserSelect: string;
11
- MozUserSelect: string;
12
- webkitUserDrag: string;
13
- webkitTapHighlightColor: string;
14
- }
15
- }
16
- /** Possible positions for a tooltip. */
17
- type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';
18
- /**
19
- * Options for how the tooltip trigger should handle touch gestures.
20
- * See `MatTooltip.touchGestures` for more information.
21
- */
22
- type TooltipTouchGestures = 'auto' | 'on' | 'off';
23
- /** Possible visibility states of a tooltip. */
24
- type TooltipVisibility = 'initial' | 'visible' | 'hidden';
25
- /** Time in ms to throttle repositioning after scroll events. */
26
- declare const SCROLL_THROTTLE_MS = 20;
27
- /**
28
- * Creates an error to be thrown if the user supplied an invalid tooltip position.
29
- * @docs-private
30
- */
31
- declare function getMatTooltipInvalidPositionError(position: string): Error;
32
- /** Injection token that determines the scroll handling while a tooltip is visible. */
33
- declare const MAT_TOOLTIP_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
34
- /** Injection token to be used to override the default options for `matTooltip`. */
35
- declare const MAT_TOOLTIP_DEFAULT_OPTIONS: InjectionToken<MatTooltipDefaultOptions>;
36
- /** Default `matTooltip` options that can be overridden. */
37
- interface MatTooltipDefaultOptions {
38
- /** Default delay when the tooltip is shown. */
39
- showDelay: number;
40
- /** Default delay when the tooltip is hidden. */
41
- hideDelay: number;
42
- /** Default delay when hiding the tooltip on a touch device. */
43
- touchendHideDelay: number;
44
- /** Time between the user putting the pointer on a tooltip trigger and the long press event being fired on a touch device. */
45
- touchLongPressShowDelay?: number;
46
- /** Default touch gesture handling for tooltips. */
47
- touchGestures?: TooltipTouchGestures;
48
- /** Default position for tooltips. */
49
- position?: TooltipPosition;
50
- /**
51
- * Default value for whether tooltips should be positioned near the click or touch origin
52
- * instead of outside the element bounding box.
53
- */
54
- positionAtOrigin?: boolean;
55
- /** Disables the ability for the user to interact with the tooltip element. */
56
- disableTooltipInteractivity?: boolean;
57
- /**
58
- * Default classes to be applied to the tooltip. These default classes will not be applied if
59
- * `tooltipClass` is defined directly on the tooltip element, as it will override the default.
60
- */
61
- tooltipClass?: string | string[];
62
- /**
63
- * Whether the tooltip should use a media query to detect if the device is able to hover.
64
- * Note that this may affect tests that run in a headless browser which reports that it's
65
- * unable to hover. In such cases you may need to include an additional timeout, because
66
- * the tooltip will fall back to treating the device as a touch screen.
67
- */
68
- detectHoverCapability?: boolean;
69
- }
70
- /**
71
- * CSS class that will be attached to the overlay panel.
72
- * @deprecated
73
- * @breaking-change 13.0.0 remove this variable
74
- */
75
- declare const TOOLTIP_PANEL_CLASS = "mat-mdc-tooltip-panel";
76
- /**
77
- * Directive that attaches a material design tooltip to the host element. Animates the showing and
78
- * hiding of a tooltip provided position (defaults to below the element).
79
- *
80
- * https://material.io/design/components/tooltips.html
81
- */
82
- declare class MatTooltip implements OnDestroy, AfterViewInit {
83
- private _elementRef;
84
- private _ngZone;
85
- private _platform;
86
- private _ariaDescriber;
87
- private _focusMonitor;
88
- protected _dir: Directionality;
89
- private _injector;
90
- private _viewContainerRef;
91
- private _mediaMatcher;
92
- private _document;
93
- private _renderer;
94
- private _animationsDisabled;
95
- private _defaultOptions;
96
- _overlayRef: OverlayRef | null;
97
- _tooltipInstance: TooltipComponent | null;
98
- _overlayPanelClass: string[] | undefined;
99
- private _portal;
100
- private _position;
101
- private _positionAtOrigin;
102
- private _disabled;
103
- private _tooltipClass;
104
- private _viewInitialized;
105
- private _pointerExitEventsInitialized;
106
- private readonly _tooltipComponent;
107
- private _viewportMargin;
108
- private _currentPosition;
109
- private readonly _cssClassPrefix;
110
- private _ariaDescriptionPending;
111
- private _dirSubscribed;
112
- /** Allows the user to define the position of the tooltip relative to the parent element */
113
- get position(): TooltipPosition;
114
- set position(value: TooltipPosition);
115
- /**
116
- * Whether tooltip should be relative to the click or touch origin
117
- * instead of outside the element bounding box.
118
- */
119
- get positionAtOrigin(): boolean;
120
- set positionAtOrigin(value: BooleanInput);
121
- /** Disables the display of the tooltip. */
122
- get disabled(): boolean;
123
- set disabled(value: BooleanInput);
124
- /** The default delay in ms before showing the tooltip after show is called */
125
- get showDelay(): number;
126
- set showDelay(value: NumberInput);
127
- private _showDelay;
128
- /** The default delay in ms before hiding the tooltip after hide is called */
129
- get hideDelay(): number;
130
- set hideDelay(value: NumberInput);
131
- private _hideDelay;
132
- /**
133
- * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
134
- * uses a long press gesture to show and hide, however it can conflict with the native browser
135
- * gestures. To work around the conflict, Angular Material disables native gestures on the
136
- * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable
137
- * elements). The different values for this option configure the touch event handling as follows:
138
- * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native
139
- * browser gestures on particular elements. In particular, it allows text selection on inputs
140
- * and textareas, and preserves the native browser dragging on elements marked as `draggable`.
141
- * - `on` - Enables touch gestures for all elements and disables native
142
- * browser gestures with no exceptions.
143
- * - `off` - Disables touch gestures. Note that this will prevent the tooltip from
144
- * showing on touch devices.
145
- */
146
- touchGestures: TooltipTouchGestures;
147
- /** The message to be displayed in the tooltip */
148
- get message(): string;
149
- set message(value: string | number | null | undefined);
150
- private _message;
151
- /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */
152
- get tooltipClass(): string | string[] | Set<string> | {
153
- [key: string]: unknown;
154
- };
155
- set tooltipClass(value: string | string[] | Set<string> | {
156
- [key: string]: unknown;
157
- });
158
- /** Manually-bound passive event listeners. */
159
- private readonly _eventCleanups;
160
- /** Timer started at the last `touchstart` event. */
161
- private _touchstartTimeout;
162
- /** Emits when the component is destroyed. */
163
- private readonly _destroyed;
164
- /** Whether ngOnDestroyed has been called. */
165
- private _isDestroyed;
166
- constructor(...args: unknown[]);
167
- ngAfterViewInit(): void;
168
- /**
169
- * Dispose the tooltip when destroyed.
170
- */
171
- ngOnDestroy(): void;
172
- /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
173
- show(delay?: number, origin?: {
174
- x: number;
175
- y: number;
176
- }): void;
177
- /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */
178
- hide(delay?: number): void;
179
- /** Shows/hides the tooltip */
180
- toggle(origin?: {
181
- x: number;
182
- y: number;
183
- }): void;
184
- /** Returns true if the tooltip is currently visible to the user */
185
- _isTooltipVisible(): boolean;
186
- /** Create the overlay config and position strategy */
187
- private _createOverlay;
188
- /** Detaches the currently-attached tooltip. */
189
- private _detach;
190
- /** Updates the position of the current tooltip. */
191
- private _updatePosition;
192
- /** Adds the configured offset to a position. Used as a hook for child classes. */
193
- protected _addOffset(position: ConnectedPosition): ConnectedPosition;
194
- /**
195
- * Returns the origin position and a fallback position based on the user's position preference.
196
- * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).
197
- */
198
- _getOrigin(): {
199
- main: OriginConnectionPosition;
200
- fallback: OriginConnectionPosition;
201
- };
202
- /** Returns the overlay position and a fallback position based on the user's preference */
203
- _getOverlayPosition(): {
204
- main: OverlayConnectionPosition;
205
- fallback: OverlayConnectionPosition;
206
- };
207
- /** Updates the tooltip message and repositions the overlay according to the new message length */
208
- private _updateTooltipMessage;
209
- /** Updates the tooltip class */
210
- private _setTooltipClass;
211
- /** Inverts an overlay position. */
212
- private _invertPosition;
213
- /** Updates the class on the overlay panel based on the current position of the tooltip. */
214
- private _updateCurrentPositionClass;
215
- /** Binds the pointer events to the tooltip trigger. */
216
- private _setupPointerEnterEventsIfNeeded;
217
- private _setupPointerExitEventsIfNeeded;
218
- private _addListener;
219
- private _isTouchPlatform;
220
- /** Disables the native browser gestures, based on how the tooltip has been configured. */
221
- private _disableNativeGesturesIfNecessary;
222
- /** Updates the tooltip's ARIA description based on it current state. */
223
- private _syncAriaDescription;
224
- /** Determines which events should be routed to the tooltip overlay. */
225
- private _overlayEventPredicate;
226
- static ɵfac: i0.ɵɵFactoryDeclaration<MatTooltip, never>;
227
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatTooltip, "[matTooltip]", ["matTooltip"], { "position": { "alias": "matTooltipPosition"; "required": false; }; "positionAtOrigin": { "alias": "matTooltipPositionAtOrigin"; "required": false; }; "disabled": { "alias": "matTooltipDisabled"; "required": false; }; "showDelay": { "alias": "matTooltipShowDelay"; "required": false; }; "hideDelay": { "alias": "matTooltipHideDelay"; "required": false; }; "touchGestures": { "alias": "matTooltipTouchGestures"; "required": false; }; "message": { "alias": "matTooltip"; "required": false; }; "tooltipClass": { "alias": "matTooltipClass"; "required": false; }; }, {}, never, never, true, never>;
228
- }
229
- /**
230
- * Internal component that wraps the tooltip's content.
231
- * @docs-private
232
- */
233
- declare class TooltipComponent implements OnDestroy {
234
- private _changeDetectorRef;
235
- protected _elementRef: ElementRef<HTMLElement>;
236
- _isMultiline: boolean;
237
- /** Message to display in the tooltip */
238
- message: string;
239
- /** Classes to be added to the tooltip. */
240
- tooltipClass: string | string[] | {
241
- [key: string]: unknown;
242
- };
243
- /** The timeout ID of any current timer set to show the tooltip */
244
- private _showTimeoutId;
245
- /** The timeout ID of any current timer set to hide the tooltip */
246
- private _hideTimeoutId;
247
- /** Element that caused the tooltip to open. */
248
- _triggerElement: HTMLElement;
249
- /** Amount of milliseconds to delay the closing sequence. */
250
- _mouseLeaveHideDelay: number;
251
- /** Whether animations are currently disabled. */
252
- private _animationsDisabled;
253
- /** Reference to the internal tooltip element. */
254
- _tooltip: ElementRef<HTMLElement>;
255
- /** Whether interactions on the page should close the tooltip */
256
- private _closeOnInteraction;
257
- /** Whether the tooltip is currently visible. */
258
- private _isVisible;
259
- /** Subject for notifying that the tooltip has been hidden from the view */
260
- private readonly _onHide;
261
- /** Name of the show animation and the class that toggles it. */
262
- private readonly _showAnimation;
263
- /** Name of the hide animation and the class that toggles it. */
264
- private readonly _hideAnimation;
265
- constructor(...args: unknown[]);
266
- /**
267
- * Shows the tooltip with an animation originating from the provided origin
268
- * @param delay Amount of milliseconds to the delay showing the tooltip.
269
- */
270
- show(delay: number): void;
271
- /**
272
- * Begins the animation to hide the tooltip after the provided delay in ms.
273
- * @param delay Amount of milliseconds to delay showing the tooltip.
274
- */
275
- hide(delay: number): void;
276
- /** Returns an observable that notifies when the tooltip has been hidden from view. */
277
- afterHidden(): Observable<void>;
278
- /** Whether the tooltip is being displayed. */
279
- isVisible(): boolean;
280
- ngOnDestroy(): void;
281
- /**
282
- * Interactions on the HTML body should close the tooltip immediately as defined in the
283
- * material design spec.
284
- * https://material.io/design/components/tooltips.html#behavior
285
- */
286
- _handleBodyInteraction(): void;
287
- /**
288
- * Marks that the tooltip needs to be checked in the next change detection run.
289
- * Mainly used for rendering the initial text before positioning a tooltip, which
290
- * can be problematic in components with OnPush change detection.
291
- */
292
- _markForCheck(): void;
293
- _handleMouseLeave({ relatedTarget }: MouseEvent): void;
294
- /**
295
- * Callback for when the timeout in this.show() gets completed.
296
- * This method is only needed by the mdc-tooltip, and so it is only implemented
297
- * in the mdc-tooltip, not here.
298
- */
299
- protected _onShow(): void;
300
- /** Whether the tooltip text has overflown to the next line */
301
- private _isTooltipMultiline;
302
- /** Event listener dispatched when an animation on the tooltip finishes. */
303
- _handleAnimationEnd({ animationName }: AnimationEvent): void;
304
- /** Cancels any pending animation sequences. */
305
- _cancelPendingAnimations(): void;
306
- /** Handles the cleanup after an animation has finished. */
307
- private _finalizeAnimation;
308
- /** Toggles the visibility of the tooltip element. */
309
- private _toggleVisibility;
310
- static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
311
- static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "mat-tooltip-component", never, {}, {}, never, never, true, never>;
312
- }
313
-
314
- export { MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_SCROLL_STRATEGY, MatTooltip, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, TooltipComponent, getMatTooltipInvalidPositionError };
315
- export type { MatTooltipDefaultOptions, TooltipPosition, TooltipTouchGestures, TooltipVisibility };