@angular/cdk-experimental 14.0.0-next.10 → 14.0.0-next.13

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 (212) hide show
  1. package/column-resize/index.d.ts +419 -6
  2. package/combobox/index.d.ts +123 -8
  3. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  4. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
  5. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  6. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  7. package/esm2020/column-resize/column-resize-module.mjs +9 -9
  8. package/esm2020/column-resize/column-resize-notifier.mjs +7 -7
  9. package/esm2020/column-resize/column-resize.mjs +4 -4
  10. package/esm2020/column-resize/column-size-store.mjs +4 -4
  11. package/esm2020/column-resize/event-dispatcher.mjs +4 -4
  12. package/esm2020/column-resize/overlay-handle.mjs +4 -4
  13. package/esm2020/column-resize/resizable.mjs +4 -4
  14. package/esm2020/column-resize/resize-strategy.mjs +10 -10
  15. package/esm2020/combobox/combobox-module.mjs +5 -5
  16. package/esm2020/combobox/combobox-popup.mjs +4 -4
  17. package/esm2020/combobox/combobox.mjs +4 -4
  18. package/esm2020/listbox/listbox-module.mjs +5 -5
  19. package/esm2020/listbox/listbox.mjs +7 -7
  20. package/esm2020/popover-edit/edit-event-dispatcher.mjs +4 -4
  21. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  22. package/esm2020/popover-edit/edit-services.mjs +4 -4
  23. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  24. package/esm2020/popover-edit/focus-escape-notifier.mjs +4 -4
  25. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  26. package/esm2020/popover-edit/popover-edit-module.mjs +6 -6
  27. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  28. package/esm2020/popover-edit/table-directives.mjs +16 -16
  29. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  30. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  31. package/esm2020/selection/row-selection.mjs +4 -4
  32. package/esm2020/selection/select-all.mjs +4 -4
  33. package/esm2020/selection/selection-column.mjs +10 -10
  34. package/esm2020/selection/selection-module.mjs +5 -5
  35. package/esm2020/selection/selection-toggle.mjs +4 -4
  36. package/esm2020/selection/selection.mjs +4 -4
  37. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  38. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  39. package/esm2020/version.mjs +1 -1
  40. package/fesm2015/cdk-experimental.mjs +1 -1
  41. package/fesm2015/cdk-experimental.mjs.map +1 -1
  42. package/fesm2015/column-resize.mjs +50 -50
  43. package/fesm2015/column-resize.mjs.map +1 -1
  44. package/fesm2015/combobox.mjs +10 -10
  45. package/fesm2015/combobox.mjs.map +1 -1
  46. package/fesm2015/listbox.mjs +10 -10
  47. package/fesm2015/listbox.mjs.map +1 -1
  48. package/fesm2015/popover-edit.mjs +50 -50
  49. package/fesm2015/popover-edit.mjs.map +1 -1
  50. package/fesm2015/scrolling.mjs +7 -7
  51. package/fesm2015/scrolling.mjs.map +1 -1
  52. package/fesm2015/selection.mjs +23 -23
  53. package/fesm2015/selection.mjs.map +1 -1
  54. package/fesm2015/table-scroll-container.mjs +7 -7
  55. package/fesm2015/table-scroll-container.mjs.map +1 -1
  56. package/fesm2020/cdk-experimental.mjs +1 -1
  57. package/fesm2020/cdk-experimental.mjs.map +1 -1
  58. package/fesm2020/column-resize.mjs +50 -50
  59. package/fesm2020/column-resize.mjs.map +1 -1
  60. package/fesm2020/combobox.mjs +10 -10
  61. package/fesm2020/combobox.mjs.map +1 -1
  62. package/fesm2020/listbox.mjs +10 -10
  63. package/fesm2020/listbox.mjs.map +1 -1
  64. package/fesm2020/popover-edit.mjs +50 -50
  65. package/fesm2020/popover-edit.mjs.map +1 -1
  66. package/fesm2020/scrolling.mjs +7 -7
  67. package/fesm2020/scrolling.mjs.map +1 -1
  68. package/fesm2020/selection.mjs +23 -23
  69. package/fesm2020/selection.mjs.map +1 -1
  70. package/fesm2020/table-scroll-container.mjs +7 -7
  71. package/fesm2020/table-scroll-container.mjs.map +1 -1
  72. package/index.d.ts +6 -8
  73. package/listbox/index.d.ts +197 -8
  74. package/package.json +9 -25
  75. package/popover-edit/index.d.ts +532 -5
  76. package/scrolling/index.d.ts +173 -6
  77. package/selection/index.d.ts +273 -5
  78. package/table-scroll-container/index.d.ts +61 -5
  79. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -28
  80. package/column-resize/column-resize-directives/column-resize.d.ts +0 -28
  81. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  82. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +0 -28
  83. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +0 -28
  84. package/column-resize/column-resize-module.d.ts +0 -23
  85. package/column-resize/column-resize-notifier.d.ts +0 -49
  86. package/column-resize/column-resize.d.ts +0 -39
  87. package/column-resize/column-resize_public_index.d.ts +0 -4
  88. package/column-resize/column-size-store.d.ts +0 -12
  89. package/column-resize/event-dispatcher.d.ts +0 -44
  90. package/column-resize/overlay-handle.d.ts +0 -43
  91. package/column-resize/package.json +0 -9
  92. package/column-resize/public-api.d.ts +0 -20
  93. package/column-resize/resizable.d.ts +0 -69
  94. package/column-resize/resize-ref.d.ts +0 -17
  95. package/column-resize/resize-strategy.d.ts +0 -83
  96. package/column-resize/selectors.d.ts +0 -10
  97. package/combobox/combobox-module.d.ts +0 -9
  98. package/combobox/combobox-popup.d.ts +0 -27
  99. package/combobox/combobox.d.ts +0 -68
  100. package/combobox/combobox_public_index.d.ts +0 -4
  101. package/combobox/package.json +0 -9
  102. package/combobox/public-api.d.ts +0 -10
  103. package/dialog/dialog-config.d.ts +0 -82
  104. package/dialog/dialog-container.d.ts +0 -99
  105. package/dialog/dialog-injectors.d.ts +0 -30
  106. package/dialog/dialog-module.d.ts +0 -10
  107. package/dialog/dialog-ref.d.ts +0 -57
  108. package/dialog/dialog.d.ts +0 -100
  109. package/dialog/dialog_public_index.d.ts +0 -4
  110. package/dialog/index.d.ts +0 -8
  111. package/dialog/package.json +0 -9
  112. package/dialog/public-api.d.ts +0 -13
  113. package/esm2020/dialog/dialog-config.mjs +0 -43
  114. package/esm2020/dialog/dialog-container.mjs +0 -300
  115. package/esm2020/dialog/dialog-injectors.mjs +0 -30
  116. package/esm2020/dialog/dialog-module.mjs +0 -56
  117. package/esm2020/dialog/dialog-ref.mjs +0 -116
  118. package/esm2020/dialog/dialog.mjs +0 -252
  119. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  120. package/esm2020/dialog/index.mjs +0 -9
  121. package/esm2020/dialog/public-api.mjs +0 -14
  122. package/esm2020/menu/context-menu-trigger.mjs +0 -227
  123. package/esm2020/menu/index.mjs +0 -9
  124. package/esm2020/menu/menu-aim.mjs +0 -204
  125. package/esm2020/menu/menu-bar.mjs +0 -159
  126. package/esm2020/menu/menu-base.mjs +0 -203
  127. package/esm2020/menu/menu-errors.mjs +0 -22
  128. package/esm2020/menu/menu-group.mjs +0 -30
  129. package/esm2020/menu/menu-interface.mjs +0 -11
  130. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  131. package/esm2020/menu/menu-item-radio.mjs +0 -114
  132. package/esm2020/menu/menu-item-selectable.mjs +0 -42
  133. package/esm2020/menu/menu-item.mjs +0 -289
  134. package/esm2020/menu/menu-module.mjs +0 -62
  135. package/esm2020/menu/menu-stack.mjs +0 -156
  136. package/esm2020/menu/menu-trigger-base.mjs +0 -114
  137. package/esm2020/menu/menu-trigger.mjs +0 -302
  138. package/esm2020/menu/menu.mjs +0 -168
  139. package/esm2020/menu/menu_public_index.mjs +0 -5
  140. package/esm2020/menu/pointer-focus-tracker.mjs +0 -51
  141. package/esm2020/menu/public-api.mjs +0 -24
  142. package/fesm2015/dialog.mjs +0 -803
  143. package/fesm2015/dialog.mjs.map +0 -1
  144. package/fesm2015/menu.mjs +0 -2131
  145. package/fesm2015/menu.mjs.map +0 -1
  146. package/fesm2020/dialog.mjs +0 -797
  147. package/fesm2020/dialog.mjs.map +0 -1
  148. package/fesm2020/menu.mjs +0 -2104
  149. package/fesm2020/menu.mjs.map +0 -1
  150. package/listbox/listbox-module.d.ts +0 -7
  151. package/listbox/listbox.d.ts +0 -172
  152. package/listbox/listbox_public_index.d.ts +0 -4
  153. package/listbox/package.json +0 -9
  154. package/listbox/public-api.d.ts +0 -9
  155. package/menu/context-menu-trigger.d.ts +0 -98
  156. package/menu/index.d.ts +0 -8
  157. package/menu/menu-aim.d.ts +0 -107
  158. package/menu/menu-bar.d.ts +0 -52
  159. package/menu/menu-base.d.ts +0 -104
  160. package/menu/menu-errors.d.ts +0 -17
  161. package/menu/menu-group.d.ts +0 -8
  162. package/menu/menu-interface.d.ts +0 -25
  163. package/menu/menu-item-checkbox.d.ts +0 -18
  164. package/menu/menu-item-radio.d.ts +0 -59
  165. package/menu/menu-item-selectable.d.ts +0 -21
  166. package/menu/menu-item.d.ts +0 -140
  167. package/menu/menu-module.d.ts +0 -17
  168. package/menu/menu-stack.d.ts +0 -122
  169. package/menu/menu-trigger-base.d.ts +0 -77
  170. package/menu/menu-trigger.d.ts +0 -104
  171. package/menu/menu.d.ts +0 -60
  172. package/menu/menu_public_index.d.ts +0 -4
  173. package/menu/package.json +0 -9
  174. package/menu/pointer-focus-tracker.d.ts +0 -47
  175. package/menu/public-api.d.ts +0 -23
  176. package/popover-edit/constants.d.ts +0 -19
  177. package/popover-edit/edit-event-dispatcher.d.ts +0 -99
  178. package/popover-edit/edit-ref.d.ts +0 -52
  179. package/popover-edit/edit-services.d.ts +0 -37
  180. package/popover-edit/focus-dispatcher.d.ts +0 -31
  181. package/popover-edit/focus-escape-notifier.d.ts +0 -40
  182. package/popover-edit/form-value-container.d.ts +0 -24
  183. package/popover-edit/lens-directives.d.ts +0 -82
  184. package/popover-edit/package.json +0 -9
  185. package/popover-edit/polyfill.d.ts +0 -9
  186. package/popover-edit/popover-edit-module.d.ts +0 -9
  187. package/popover-edit/popover-edit-position-strategy-factory.d.ts +0 -42
  188. package/popover-edit/popover-edit_public_index.d.ts +0 -4
  189. package/popover-edit/public-api.d.ts +0 -17
  190. package/popover-edit/table-directives.d.ts +0 -150
  191. package/public-api.d.ts +0 -8
  192. package/scrolling/auto-size-virtual-scroll.d.ts +0 -160
  193. package/scrolling/package.json +0 -9
  194. package/scrolling/public-api.d.ts +0 -9
  195. package/scrolling/scrolling-module.d.ts +0 -7
  196. package/scrolling/scrolling_public_index.d.ts +0 -4
  197. package/selection/package.json +0 -9
  198. package/selection/public-api.d.ts +0 -14
  199. package/selection/row-selection.d.ts +0 -27
  200. package/selection/select-all.d.ts +0 -52
  201. package/selection/selection-column.d.ts +0 -34
  202. package/selection/selection-module.d.ts +0 -13
  203. package/selection/selection-set.d.ts +0 -56
  204. package/selection/selection-toggle.d.ts +0 -46
  205. package/selection/selection.d.ts +0 -65
  206. package/selection/selection_public_index.d.ts +0 -4
  207. package/table-scroll-container/package.json +0 -9
  208. package/table-scroll-container/public-api.d.ts +0 -9
  209. package/table-scroll-container/table-scroll-container-module.d.ts +0 -7
  210. package/table-scroll-container/table-scroll-container.d.ts +0 -53
  211. package/table-scroll-container/table-scroll-container_public_index.d.ts +0 -4
  212. package/version.d.ts +0 -10
@@ -1,8 +1,535 @@
1
+ import { AfterViewInit } from '@angular/core';
2
+ import { ControlContainer } from '@angular/forms';
3
+ import { Directionality } from '@angular/cdk/bidi';
4
+ import { ElementRef } from '@angular/core';
5
+ import { EmbeddedViewRef } from '@angular/core';
6
+ import { EventEmitter } from '@angular/core';
7
+ import { FocusTrap } from '@angular/cdk/a11y';
8
+ import { FocusTrapFactory } from '@angular/cdk/a11y';
9
+ import * as i0 from '@angular/core';
10
+ import * as i3 from '@angular/cdk/overlay';
11
+ import { InteractivityChecker } from '@angular/cdk/a11y';
12
+ import { NgZone } from '@angular/core';
13
+ import { Observable } from 'rxjs';
14
+ import { OnDestroy } from '@angular/core';
15
+ import { OnInit } from '@angular/core';
16
+ import { Overlay } from '@angular/cdk/overlay';
17
+ import { OverlayRef } from '@angular/cdk/overlay';
18
+ import { OverlaySizeConfig } from '@angular/cdk/overlay';
19
+ import { PartialObserver } from 'rxjs';
20
+ import { PositionStrategy } from '@angular/cdk/overlay';
21
+ import { ScrollDispatcher } from '@angular/cdk/scrolling';
22
+ import { Subject } from 'rxjs';
23
+ import { TemplateRef } from '@angular/core';
24
+ import { ViewContainerRef } from '@angular/core';
25
+ import { ViewportRuler } from '@angular/cdk/scrolling';
26
+
1
27
  /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
28
+ * A directive that must be attached to enable editability on a table.
29
+ * It is responsible for setting up delegated event handlers and providing the
30
+ * EditEventDispatcher service for use by the other edit directives.
31
+ */
32
+ export declare class CdkEditable implements AfterViewInit, OnDestroy {
33
+ protected readonly elementRef: ElementRef;
34
+ protected readonly editEventDispatcher: EditEventDispatcher<EditRef<unknown>>;
35
+ protected readonly focusDispatcher: FocusDispatcher;
36
+ protected readonly ngZone: NgZone;
37
+ protected readonly destroyed: Subject<void>;
38
+ constructor(elementRef: ElementRef, editEventDispatcher: EditEventDispatcher<EditRef<unknown>>, focusDispatcher: FocusDispatcher, ngZone: NgZone);
39
+ ngAfterViewInit(): void;
40
+ ngOnDestroy(): void;
41
+ private _listenForTableEvents;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkEditable, never>;
43
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkEditable, "table[editable], cdk-table[editable], mat-table[editable]", never, {}, {}, never, never, false>;
44
+ }
45
+
46
+ /** Closes the lens on click. */
47
+ export declare class CdkEditClose<FormValue> {
48
+ protected readonly elementRef: ElementRef<HTMLElement>;
49
+ protected readonly editRef: EditRef<FormValue>;
50
+ constructor(elementRef: ElementRef<HTMLElement>, editRef: EditRef<FormValue>);
51
+ closeEdit(): void;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkEditClose<any>, never>;
53
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkEditClose<any>, "[cdkEditClose]", never, {}, {}, never, never, false>;
54
+ }
55
+
56
+ /**
57
+ * A directive that attaches to a form within the edit lens.
58
+ * It coordinates the form state with the table-wide edit system and handles
59
+ * closing the edit lens when the form is submitted or the user clicks
60
+ * out.
61
+ */
62
+ export declare class CdkEditControl<FormValue> implements OnDestroy, OnInit {
63
+ protected readonly elementRef: ElementRef;
64
+ readonly editRef: EditRef<FormValue>;
65
+ protected readonly destroyed: Subject<void>;
66
+ /**
67
+ * Specifies what should happen when the user clicks outside of the edit lens.
68
+ * The default behavior is to close the lens without submitting the form.
69
+ */
70
+ clickOutBehavior: PopoverEditClickOutBehavior;
71
+ /**
72
+ * A two-way binding for storing unsubmitted form state. If not provided
73
+ * then form state will be discarded on close. The PeristBy directive is offered
74
+ * as a convenient shortcut for these bindings.
75
+ */
76
+ preservedFormValue?: FormValue;
77
+ readonly preservedFormValueChange: EventEmitter<FormValue>;
78
+ /**
79
+ * Determines whether the lens will close on form submit if the form is not in a valid
80
+ * state. By default the lens will remain open.
81
+ */
82
+ ignoreSubmitUnlessValid: boolean;
83
+ constructor(elementRef: ElementRef, editRef: EditRef<FormValue>);
84
+ ngOnInit(): void;
85
+ ngOnDestroy(): void;
86
+ /**
87
+ * Called when the form submits. If ignoreSubmitUnlessValid is true, checks
88
+ * the form for validity before proceeding.
89
+ * Updates the revert state with the latest submitted value then closes the edit.
90
+ */
91
+ handleFormSubmit(): void;
92
+ /** Called on Escape keyup. Closes the edit. */
93
+ close(): void;
94
+ /**
95
+ * Called on click anywhere in the document.
96
+ * If the click was outside of the lens, trigger the specified click out behavior.
97
+ */
98
+ handlePossibleClickOut(evt: Event): void;
99
+ _handleKeydown(event: KeyboardEvent): void;
100
+ /** Triggers submit on tab out if clickOutBehavior is 'submit'. */
101
+ private _handleBlur;
102
+ private _triggerFormSubmit;
103
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkEditControl<any>, never>;
104
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkEditControl<any>, "form[cdkEditControl]", never, { "clickOutBehavior": "cdkEditControlClickOutBehavior"; "preservedFormValue": "cdkEditControlPreservedFormValue"; "ignoreSubmitUnlessValid": "cdkEditControlIgnoreSubmitUnlessValid"; }, { "preservedFormValueChange": "cdkEditControlPreservedFormValueChange"; }, never, never, false>;
105
+ }
106
+
107
+ /**
108
+ * Opens the closest edit popover to this element, whether it's associated with this exact
109
+ * element or an ancestor element.
110
+ */
111
+ export declare class CdkEditOpen {
112
+ protected readonly elementRef: ElementRef<HTMLElement>;
113
+ protected readonly editEventDispatcher: EditEventDispatcher<EditRef<unknown>>;
114
+ constructor(elementRef: ElementRef<HTMLElement>, editEventDispatcher: EditEventDispatcher<EditRef<unknown>>);
115
+ openEdit(evt: Event): void;
116
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkEditOpen, never>;
117
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkEditOpen, "[cdkEditOpen]", never, {}, {}, never, never, false>;
118
+ }
119
+
120
+ /** Reverts the form to its initial or previously submitted state on click. */
121
+ export declare class CdkEditRevert<FormValue> {
122
+ protected readonly editRef: EditRef<FormValue>;
123
+ /** Type of the button. Defaults to `button` to avoid accident form submits. */
124
+ type: string;
125
+ constructor(editRef: EditRef<FormValue>);
126
+ revertEdit(): void;
127
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkEditRevert<any>, never>;
128
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkEditRevert<any>, "button[cdkEditRevert]", never, { "type": "type"; }, {}, never, never, false>;
129
+ }
130
+
131
+ /**
132
+ * Attaches an ng-template to a cell and shows it when instructed to by the
133
+ * EditEventDispatcher service.
134
+ * Makes the cell focusable.
135
+ */
136
+ export declare class CdkPopoverEdit<C> implements AfterViewInit, OnDestroy {
137
+ protected readonly services: EditServices;
138
+ protected readonly elementRef: ElementRef;
139
+ protected readonly viewContainerRef: ViewContainerRef;
140
+ /** The edit lens template shown over the cell on edit. */
141
+ template: TemplateRef<any> | null;
142
+ /**
143
+ * Implicit context to pass along to the template. Can be omitted if the template
144
+ * is defined within the cell.
145
+ */
146
+ context?: C;
147
+ /**
148
+ * Specifies that the popup should cover additional table cells before and/or after
149
+ * this one.
150
+ */
151
+ get colspan(): CdkPopoverEditColspan;
152
+ set colspan(value: CdkPopoverEditColspan);
153
+ private _colspan;
154
+ /** Whether popover edit is disabled for this cell. */
155
+ get disabled(): boolean;
156
+ set disabled(value: boolean);
157
+ private _disabled;
158
+ protected focusTrap?: FocusTrap;
159
+ protected overlayRef?: OverlayRef;
160
+ protected readonly destroyed: Subject<void>;
161
+ constructor(services: EditServices, elementRef: ElementRef, viewContainerRef: ViewContainerRef);
162
+ ngAfterViewInit(): void;
163
+ ngOnDestroy(): void;
164
+ protected initFocusTrap(): void;
165
+ protected closeEditOverlay(): void;
166
+ protected panelClass(): string;
167
+ private _startListeningToEditEvents;
168
+ private _createEditOverlay;
169
+ private _showEditOverlay;
170
+ private _getOverlayCells;
171
+ private _getPositionStrategy;
172
+ private _updateOverlaySize;
173
+ private _maybeReturnFocusToCell;
174
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkPopoverEdit<any>, never>;
175
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPopoverEdit<any>, "[cdkPopoverEdit]:not([cdkPopoverEditTabOut])", never, { "template": "cdkPopoverEdit"; "context": "cdkPopoverEditContext"; "colspan": "cdkPopoverEditColspan"; "disabled": "cdkPopoverEditDisabled"; }, {}, never, never, false>;
176
+ }
177
+
178
+ /**
179
+ * Describes the number of columns before and after the originating cell that the
180
+ * edit popup should span. In left to right locales, before means left and after means
181
+ * right. In right to left locales before means right and after means left.
182
+ */
183
+ export declare interface CdkPopoverEditColspan {
184
+ before?: number;
185
+ after?: number;
186
+ }
187
+
188
+ export declare class CdkPopoverEditModule {
189
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkPopoverEditModule, never>;
190
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CdkPopoverEditModule, [typeof i1.CdkPopoverEdit, typeof i1.CdkPopoverEditTabOut, typeof i1.CdkRowHoverContent, typeof i2.CdkEditControl, typeof i2.CdkEditRevert, typeof i2.CdkEditClose, typeof i1.CdkEditable, typeof i1.CdkEditOpen], [typeof i3.OverlayModule], [typeof i1.CdkPopoverEdit, typeof i1.CdkPopoverEditTabOut, typeof i1.CdkRowHoverContent, typeof i2.CdkEditControl, typeof i2.CdkEditRevert, typeof i2.CdkEditClose, typeof i1.CdkEditable, typeof i1.CdkEditOpen]>;
191
+ static ɵinj: i0.ɵɵInjectorDeclaration<CdkPopoverEditModule>;
192
+ }
193
+
194
+ /**
195
+ * Attaches an ng-template to a cell and shows it when instructed to by the
196
+ * EditEventDispatcher service.
197
+ * Makes the cell focusable.
198
+ */
199
+ export declare class CdkPopoverEditTabOut<C> extends CdkPopoverEdit<C> {
200
+ protected readonly focusEscapeNotifierFactory: FocusEscapeNotifierFactory;
201
+ protected focusTrap?: FocusEscapeNotifier;
202
+ constructor(elementRef: ElementRef, viewContainerRef: ViewContainerRef, services: EditServices, focusEscapeNotifierFactory: FocusEscapeNotifierFactory);
203
+ protected initFocusTrap(): void;
204
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkPopoverEditTabOut<any>, never>;
205
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkPopoverEditTabOut<any>, "[cdkPopoverEdit][cdkPopoverEditTabOut]", never, { "template": "cdkPopoverEdit"; "context": "cdkPopoverEditContext"; "colspan": "cdkPopoverEditColspan"; "disabled": "cdkPopoverEditDisabled"; }, {}, never, never, false>;
206
+ }
207
+
208
+ /**
209
+ * A structural directive that shows its contents when the table row containing
210
+ * it is hovered or when an element in the row has focus.
211
+ */
212
+ export declare class CdkRowHoverContent implements AfterViewInit, OnDestroy {
213
+ protected readonly services: EditServices;
214
+ protected readonly elementRef: ElementRef;
215
+ protected readonly templateRef: TemplateRef<any>;
216
+ protected readonly viewContainerRef: ViewContainerRef;
217
+ protected readonly destroyed: Subject<void>;
218
+ protected viewRef: EmbeddedViewRef<any> | null;
219
+ private _row?;
220
+ constructor(services: EditServices, elementRef: ElementRef, templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
221
+ ngAfterViewInit(): void;
222
+ ngOnDestroy(): void;
223
+ /**
224
+ * Called immediately after the hover content is created and added to the dom.
225
+ * In the CDK version, this is a noop but subclasses such as MatRowHoverContent use this
226
+ * to prepare/style the inserted element.
227
+ */
228
+ protected initElement(_: HTMLElement): void;
229
+ /**
230
+ * Called when the hover content needs to be focusable to preserve a reasonable tab ordering
231
+ * but should not yet be shown.
232
+ */
233
+ protected makeElementHiddenButFocusable(element: HTMLElement): void;
234
+ /**
235
+ * Called when the hover content needs to be focusable to preserve a reasonable tab ordering
236
+ * but should not yet be shown.
237
+ */
238
+ protected makeElementVisible(element: HTMLElement): void;
239
+ private _listenForHoverAndFocusEvents;
240
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkRowHoverContent, never>;
241
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkRowHoverContent, "[cdkRowHoverContent]", never, {}, {}, never, never, false>;
242
+ }
243
+
244
+ /** Selector for finding table cells. */
245
+ export declare const _CELL_SELECTOR = ".cdk-cell, .mat-cell, td";
246
+
247
+
248
+ /** closest implementation that is able to start from non-Element Nodes. */
249
+ export declare function _closest(element: EventTarget | Element | null | undefined, selector: string): Element | null;
250
+
251
+ /**
252
+ * Default implementation of PopoverEditPositionStrategyFactory.
253
+ * Uses a FlexibleConnectedPositionStrategy anchored to the start + top of the cell.
254
+ * Note: This will change to CoverPositionStrategy once it implemented.
255
+ */
256
+ export declare class DefaultPopoverEditPositionStrategyFactory extends PopoverEditPositionStrategyFactory {
257
+ protected readonly direction: Directionality;
258
+ protected readonly overlay: Overlay;
259
+ constructor(direction: Directionality, overlay: Overlay);
260
+ positionStrategyForCells(cells: HTMLElement[]): PositionStrategy;
261
+ sizeConfigForCells(cells: HTMLElement[]): OverlaySizeConfig;
262
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultPopoverEditPositionStrategyFactory, never>;
263
+ static ɵprov: i0.ɵɵInjectableDeclaration<DefaultPopoverEditPositionStrategyFactory>;
264
+ }
265
+
266
+ /**
267
+ * Service for sharing delegated events and state for triggering table edits.
268
+ */
269
+ export declare class EditEventDispatcher<R> {
270
+ private readonly _ngZone;
271
+ /** A subject that indicates which table cell is currently editing (unless it is disabled). */
272
+ readonly editing: Subject<Element | null>;
273
+ /** A subject that indicates which table row is currently hovered. */
274
+ readonly hovering: Subject<Element | null>;
275
+ /** A subject that indicates which table row currently contains focus. */
276
+ readonly focused: Subject<Element | null>;
277
+ /** A subject that indicates all elements in the table matching ROW_SELECTOR. */
278
+ readonly allRows: Subject<NodeList>;
279
+ /** A subject that emits mouse move events from the table indicating the targeted row. */
280
+ readonly mouseMove: Subject<Element | null>;
281
+ /**
282
+ * Tracks the currently disabled editable cells - edit calls will be ignored
283
+ * for these cells.
284
+ */
285
+ readonly disabledCells: WeakMap<Element, boolean>;
286
+ /** The EditRef for the currently active edit lens (if any). */
287
+ get editRef(): R | null;
288
+ private _editRef;
289
+ private readonly _distinctUntilChanged;
290
+ private readonly _startWithNull;
291
+ private readonly _distinctShare;
292
+ private readonly _startWithNullDistinct;
293
+ readonly editingAndEnabled: Observable<Element | null>;
294
+ /** An observable that emits the row containing focus or an active edit. */
295
+ readonly editingOrFocused: Observable<Element | null>;
296
+ /** Tracks rows that contain hover content with a reference count. */
297
+ private _rowsWithHoverContent;
298
+ /** The table cell that has an active edit lens (or null). */
299
+ private _currentlyEditing;
300
+ /** The combined set of row hover content states organized by row. */
301
+ private readonly _hoveredContentStateDistinct;
302
+ private readonly _editingAndEnabledDistinct;
303
+ private _lastSeenRow;
304
+ private _lastSeenRowHoverOrFocus;
305
+ constructor(_ngZone: NgZone);
306
+ /**
307
+ * Gets an Observable that emits true when the specified element's cell
308
+ * is editing and false when not.
309
+ */
310
+ editingCell(element: Element | EventTarget): Observable<boolean>;
311
+ /**
312
+ * Stops editing for the specified cell. If the specified cell is not the current
313
+ * edit cell, does nothing.
314
+ */
315
+ doneEditingCell(element: Element | EventTarget): void;
316
+ /** Sets the currently active EditRef. */
317
+ setActiveEditRef(ref: R): void;
318
+ /** Unsets the currently active EditRef, if the specified editRef is active. */
319
+ unsetActiveEditRef(ref: R): void;
320
+ /** Adds the specified table row to be tracked for first/last row comparisons. */
321
+ registerRowWithHoverContent(row: Element): void;
322
+ /**
323
+ * Reference decrements and ultimately removes the specified table row from first/last row
324
+ * comparisons.
325
+ */
326
+ deregisterRowWithHoverContent(row: Element): void;
327
+ /**
328
+ * Gets an Observable that emits true when the specified element's row
329
+ * contains the focused element or is being hovered over and false when not.
330
+ * Hovering is defined as when the mouse has momentarily stopped moving over the cell.
331
+ */
332
+ hoverOrFocusOnRow(row: Element): Observable<HoverContentState>;
333
+ /**
334
+ * RxJS operator that enters the Angular zone, used to reduce boilerplate in
335
+ * re-entering the zone for stream pipelines.
336
+ */
337
+ private _enterZone;
338
+ private _getFirstRowWithHoverContent;
339
+ private _getLastRowWithHoverContent;
340
+ private _mapAllRowsToSingleRow;
341
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditEventDispatcher<any>, never>;
342
+ static ɵprov: i0.ɵɵInjectableDeclaration<EditEventDispatcher<any>>;
343
+ }
344
+
345
+ /**
346
+ * Used for communication between the form within the edit lens and the
347
+ * table that launched it. Provided by CdkEditControl within the lens.
348
+ */
349
+ export declare class EditRef<FormValue> implements OnDestroy {
350
+ private readonly _form;
351
+ private readonly _editEventDispatcher;
352
+ private readonly _ngZone;
353
+ /** Emits the final value of this edit instance before closing. */
354
+ private readonly _finalValueSubject;
355
+ readonly finalValue: Observable<FormValue>;
356
+ /** Emits when the user tabs out of this edit lens before closing. */
357
+ private readonly _blurredSubject;
358
+ readonly blurred: Observable<void>;
359
+ /** The value to set the form back to on revert. */
360
+ private _revertFormValue;
361
+ constructor(_form: ControlContainer, _editEventDispatcher: EditEventDispatcher<EditRef<FormValue>>, _ngZone: NgZone);
362
+ /**
363
+ * Called by the host directive's OnInit hook. Reads the initial state of the
364
+ * form and overrides it with persisted state from previous openings, if
365
+ * applicable.
366
+ */
367
+ init(previousFormValue: FormValue | undefined): void;
368
+ ngOnDestroy(): void;
369
+ /** Whether the attached form is in a valid state. */
370
+ isValid(): boolean | null;
371
+ /** Set the form's current value as what it will be set to on revert/reset. */
372
+ updateRevertValue(): void;
373
+ /** Tells the table to close the edit popup. */
374
+ close(): void;
375
+ /** Notifies the active edit that the user has moved focus out of the lens. */
376
+ blur(): void;
377
+ /**
378
+ * Resets the form value to the specified value or the previously set
379
+ * revert value.
380
+ */
381
+ reset(value?: FormValue): void;
382
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditRef<any>, [{ self: true; }, null, null]>;
383
+ static ɵprov: i0.ɵɵInjectableDeclaration<EditRef<any>>;
384
+ }
385
+
386
+ /**
387
+ * Optimization
388
+ * Collects multiple Injectables into a singleton shared across the table. By reducing the
389
+ * number of services injected into each CdkPopoverEdit, this saves about 0.023ms of cpu time
390
+ * and 56 bytes of memory per instance.
391
+ */
392
+ declare class EditServices {
393
+ readonly directionality: Directionality;
394
+ readonly editEventDispatcher: EditEventDispatcher<EditRef<unknown>>;
395
+ readonly focusDispatcher: FocusDispatcher;
396
+ readonly focusTrapFactory: FocusTrapFactory;
397
+ readonly ngZone: NgZone;
398
+ readonly overlay: Overlay;
399
+ readonly positionFactory: PopoverEditPositionStrategyFactory;
400
+ readonly scrollDispatcher: ScrollDispatcher;
401
+ readonly viewportRuler: ViewportRuler;
402
+ constructor(directionality: Directionality, editEventDispatcher: EditEventDispatcher<EditRef<unknown>>, focusDispatcher: FocusDispatcher, focusTrapFactory: FocusTrapFactory, ngZone: NgZone, overlay: Overlay, positionFactory: PopoverEditPositionStrategyFactory, scrollDispatcher: ScrollDispatcher, viewportRuler: ViewportRuler);
403
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditServices, never>;
404
+ static ɵprov: i0.ɵɵInjectableDeclaration<EditServices>;
405
+ }
406
+
407
+
408
+ export declare interface Entry<FormValue> {
409
+ value?: FormValue;
410
+ }
411
+
412
+ /**
413
+ * Service responsible for moving cell focus around in response to keyboard events.
414
+ * May be overridden to customize the keyboard behavior of popover edit.
415
+ */
416
+ export declare class FocusDispatcher {
417
+ protected readonly directionality: Directionality;
418
+ /** Observes keydown events triggered from the table. */
419
+ readonly keyObserver: PartialObserver<KeyboardEvent>;
420
+ constructor(directionality: Directionality);
421
+ /**
422
+ * Moves focus to earlier or later cells (in dom order) by offset cells relative to
423
+ * currentCell.
424
+ */
425
+ moveFocusHorizontally(currentCell: HTMLElement, offset: number): void;
426
+ /** Moves focus to up or down by row by offset cells relative to currentCell. */
427
+ moveFocusVertically(currentCell: HTMLElement, offset: number): void;
428
+ /** Translates arrow keydown events into focus move operations. */
429
+ protected handleKeyboardEvent(event: KeyboardEvent): void;
430
+ static ɵfac: i0.ɵɵFactoryDeclaration<FocusDispatcher, never>;
431
+ static ɵprov: i0.ɵɵInjectableDeclaration<FocusDispatcher>;
432
+ }
433
+
434
+ /**
435
+ * Like FocusTrap, but rather than trapping focus within a dom region, notifies subscribers when
436
+ * focus leaves the region.
437
+ */
438
+ declare class FocusEscapeNotifier extends FocusTrap {
439
+ private readonly _escapeSubject;
440
+ constructor(element: HTMLElement, checker: InteractivityChecker, ngZone: NgZone, document: Document);
441
+ escapes(): Observable<FocusEscapeNotifierDirection>;
442
+ }
443
+
444
+ /** Value indicating whether focus left the target area before or after the enclosed elements. */
445
+ declare const enum FocusEscapeNotifierDirection {
446
+ START = 0,
447
+ END = 1
448
+ }
449
+
450
+ /** Factory that allows easy instantiation of focus escape notifiers. */
451
+ declare class FocusEscapeNotifierFactory {
452
+ private _checker;
453
+ private _ngZone;
454
+ private _document;
455
+ constructor(_checker: InteractivityChecker, _ngZone: NgZone, _document: any);
456
+ /**
457
+ * Creates a focus escape notifier region around the given element.
458
+ * @param element The element around which focus will be monitored.
459
+ * @returns The created focus escape notifier instance.
460
+ */
461
+ create(element: HTMLElement): FocusEscapeNotifier;
462
+ static ɵfac: i0.ɵɵFactoryDeclaration<FocusEscapeNotifierFactory, never>;
463
+ static ɵprov: i0.ɵɵInjectableDeclaration<FocusEscapeNotifierFactory>;
464
+ }
465
+
466
+ /**
467
+ * A convenience class for preserving unsaved form state while an edit lens is closed.
4
468
  *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
469
+ * Example usage:
470
+ * class MyComponent {
471
+ * readonly nameEditValues = new FormValueContainer&lt;Item, {name: string}&gt;();
472
+ * }
473
+ *
474
+ * &lt;form cdkEditControl [(cdkEditControlPreservedFormValue)]="nameEditValues.for(item).value"&gt;
475
+ */
476
+ export declare class FormValueContainer<Key extends object, FormValue> {
477
+ private _formValues;
478
+ for(key: Key): Entry<FormValue>;
479
+ }
480
+
481
+ /**
482
+ * The possible states for hover content:
483
+ * OFF - Not rendered.
484
+ * FOCUSABLE - Rendered in the dom and styled for its contents to be focusable but invisible.
485
+ * ON - Rendered and fully visible.
486
+ */
487
+ export declare const enum HoverContentState {
488
+ OFF = 0,
489
+ FOCUSABLE = 1,
490
+ ON = 2
491
+ }
492
+
493
+ declare namespace i1 {
494
+ export {
495
+ CdkPopoverEditColspan,
496
+ CdkEditable,
497
+ CdkPopoverEdit,
498
+ CdkPopoverEditTabOut,
499
+ CdkRowHoverContent,
500
+ CdkEditOpen
501
+ }
502
+ }
503
+
504
+ declare namespace i2 {
505
+ export {
506
+ PopoverEditClickOutBehavior,
507
+ CdkEditControl,
508
+ CdkEditRevert,
509
+ CdkEditClose
510
+ }
511
+ }
512
+
513
+ /** Options for what do to when the user clicks outside of an edit lens. */
514
+ export declare type PopoverEditClickOutBehavior = 'close' | 'submit' | 'noop';
515
+
516
+ /**
517
+ * Overridable factory responsible for configuring how cdkPopoverEdit popovers are positioned
518
+ * and sized.
7
519
  */
8
- export * from './public-api';
520
+ export declare abstract class PopoverEditPositionStrategyFactory {
521
+ /**
522
+ * Creates a PositionStrategy based on the specified table cells.
523
+ * The cells will be provided in DOM order.
524
+ */
525
+ abstract positionStrategyForCells(cells: HTMLElement[]): PositionStrategy;
526
+ /**
527
+ * Creates an OverlaySizeConfig based on the specified table cells.
528
+ * The cells will be provided in DOM order.
529
+ */
530
+ abstract sizeConfigForCells(cells: HTMLElement[]): OverlaySizeConfig;
531
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverEditPositionStrategyFactory, never>;
532
+ static ɵprov: i0.ɵɵInjectableDeclaration<PopoverEditPositionStrategyFactory>;
533
+ }
534
+
535
+ export { }