@angular/cdk-experimental 14.0.0-next.7 → 14.0.0-rc.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 (213) 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 +6 -7
  16. package/esm2020/combobox/combobox-popup.mjs +12 -23
  17. package/esm2020/combobox/combobox.mjs +50 -34
  18. package/esm2020/combobox/public-api.mjs +1 -2
  19. package/esm2020/listbox/listbox-module.mjs +5 -5
  20. package/esm2020/listbox/listbox.mjs +26 -44
  21. package/esm2020/popover-edit/edit-event-dispatcher.mjs +7 -7
  22. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  23. package/esm2020/popover-edit/edit-services.mjs +4 -4
  24. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  25. package/esm2020/popover-edit/focus-escape-notifier.mjs +6 -6
  26. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  27. package/esm2020/popover-edit/popover-edit-module.mjs +6 -6
  28. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  29. package/esm2020/popover-edit/table-directives.mjs +19 -19
  30. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  31. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  32. package/esm2020/selection/row-selection.mjs +4 -4
  33. package/esm2020/selection/select-all.mjs +4 -4
  34. package/esm2020/selection/selection-column.mjs +10 -10
  35. package/esm2020/selection/selection-module.mjs +5 -5
  36. package/esm2020/selection/selection-toggle.mjs +4 -4
  37. package/esm2020/selection/selection.mjs +4 -4
  38. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  39. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  40. package/esm2020/version.mjs +1 -1
  41. package/fesm2015/cdk-experimental.mjs +1 -1
  42. package/fesm2015/cdk-experimental.mjs.map +1 -1
  43. package/fesm2015/column-resize.mjs +50 -50
  44. package/fesm2015/column-resize.mjs.map +1 -1
  45. package/fesm2015/combobox.mjs +63 -106
  46. package/fesm2015/combobox.mjs.map +1 -1
  47. package/fesm2015/listbox.mjs +31 -47
  48. package/fesm2015/listbox.mjs.map +1 -1
  49. package/fesm2015/popover-edit.mjs +58 -58
  50. package/fesm2015/popover-edit.mjs.map +1 -1
  51. package/fesm2015/scrolling.mjs +7 -7
  52. package/fesm2015/scrolling.mjs.map +1 -1
  53. package/fesm2015/selection.mjs +23 -23
  54. package/fesm2015/selection.mjs.map +1 -1
  55. package/fesm2015/table-scroll-container.mjs +7 -7
  56. package/fesm2015/table-scroll-container.mjs.map +1 -1
  57. package/fesm2020/cdk-experimental.mjs +1 -1
  58. package/fesm2020/cdk-experimental.mjs.map +1 -1
  59. package/fesm2020/column-resize.mjs +50 -50
  60. package/fesm2020/column-resize.mjs.map +1 -1
  61. package/fesm2020/combobox.mjs +62 -103
  62. package/fesm2020/combobox.mjs.map +1 -1
  63. package/fesm2020/listbox.mjs +29 -46
  64. package/fesm2020/listbox.mjs.map +1 -1
  65. package/fesm2020/popover-edit.mjs +58 -58
  66. package/fesm2020/popover-edit.mjs.map +1 -1
  67. package/fesm2020/scrolling.mjs +7 -7
  68. package/fesm2020/scrolling.mjs.map +1 -1
  69. package/fesm2020/selection.mjs +23 -23
  70. package/fesm2020/selection.mjs.map +1 -1
  71. package/fesm2020/table-scroll-container.mjs +7 -7
  72. package/fesm2020/table-scroll-container.mjs.map +1 -1
  73. package/index.d.ts +6 -8
  74. package/listbox/index.d.ts +197 -8
  75. package/package.json +9 -25
  76. package/popover-edit/index.d.ts +532 -5
  77. package/scrolling/index.d.ts +173 -6
  78. package/selection/index.d.ts +273 -5
  79. package/table-scroll-container/index.d.ts +61 -5
  80. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -28
  81. package/column-resize/column-resize-directives/column-resize.d.ts +0 -28
  82. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  83. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +0 -28
  84. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +0 -28
  85. package/column-resize/column-resize-module.d.ts +0 -23
  86. package/column-resize/column-resize-notifier.d.ts +0 -49
  87. package/column-resize/column-resize.d.ts +0 -39
  88. package/column-resize/column-resize_public_index.d.ts +0 -4
  89. package/column-resize/column-size-store.d.ts +0 -12
  90. package/column-resize/event-dispatcher.d.ts +0 -44
  91. package/column-resize/overlay-handle.d.ts +0 -43
  92. package/column-resize/package.json +0 -9
  93. package/column-resize/public-api.d.ts +0 -20
  94. package/column-resize/resizable.d.ts +0 -69
  95. package/column-resize/resize-ref.d.ts +0 -17
  96. package/column-resize/resize-strategy.d.ts +0 -83
  97. package/column-resize/selectors.d.ts +0 -10
  98. package/combobox/combobox-module.d.ts +0 -10
  99. package/combobox/combobox-panel.d.ts +0 -27
  100. package/combobox/combobox-popup.d.ts +0 -29
  101. package/combobox/combobox.d.ts +0 -71
  102. package/combobox/combobox_public_index.d.ts +0 -4
  103. package/combobox/package.json +0 -9
  104. package/combobox/public-api.d.ts +0 -11
  105. package/dialog/dialog-config.d.ts +0 -77
  106. package/dialog/dialog-container.d.ts +0 -99
  107. package/dialog/dialog-injectors.d.ts +0 -30
  108. package/dialog/dialog-module.d.ts +0 -10
  109. package/dialog/dialog-ref.d.ts +0 -57
  110. package/dialog/dialog.d.ts +0 -100
  111. package/dialog/dialog_public_index.d.ts +0 -4
  112. package/dialog/index.d.ts +0 -8
  113. package/dialog/package.json +0 -9
  114. package/dialog/public-api.d.ts +0 -13
  115. package/esm2020/combobox/combobox-panel.mjs +0 -48
  116. package/esm2020/dialog/dialog-config.mjs +0 -43
  117. package/esm2020/dialog/dialog-container.mjs +0 -295
  118. package/esm2020/dialog/dialog-injectors.mjs +0 -30
  119. package/esm2020/dialog/dialog-module.mjs +0 -56
  120. package/esm2020/dialog/dialog-ref.mjs +0 -116
  121. package/esm2020/dialog/dialog.mjs +0 -252
  122. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  123. package/esm2020/dialog/index.mjs +0 -9
  124. package/esm2020/dialog/public-api.mjs +0 -14
  125. package/esm2020/menu/context-menu.mjs +0 -274
  126. package/esm2020/menu/index.mjs +0 -9
  127. package/esm2020/menu/menu-aim.mjs +0 -199
  128. package/esm2020/menu/menu-bar.mjs +0 -255
  129. package/esm2020/menu/menu-errors.mjs +0 -22
  130. package/esm2020/menu/menu-group.mjs +0 -68
  131. package/esm2020/menu/menu-interface.mjs +0 -11
  132. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  133. package/esm2020/menu/menu-item-radio.mjs +0 -97
  134. package/esm2020/menu/menu-item-selectable.mjs +0 -57
  135. package/esm2020/menu/menu-item-trigger.mjs +0 -343
  136. package/esm2020/menu/menu-item.mjs +0 -245
  137. package/esm2020/menu/menu-module.mjs +0 -60
  138. package/esm2020/menu/menu-stack.mjs +0 -110
  139. package/esm2020/menu/menu-trigger.mjs +0 -43
  140. package/esm2020/menu/menu.mjs +0 -288
  141. package/esm2020/menu/menu_public_index.mjs +0 -5
  142. package/esm2020/menu/pointer-focus-tracker.mjs +0 -49
  143. package/esm2020/menu/public-api.mjs +0 -21
  144. package/fesm2015/dialog.mjs +0 -797
  145. package/fesm2015/dialog.mjs.map +0 -1
  146. package/fesm2015/menu.mjs +0 -2106
  147. package/fesm2015/menu.mjs.map +0 -1
  148. package/fesm2020/dialog.mjs +0 -792
  149. package/fesm2020/dialog.mjs.map +0 -1
  150. package/fesm2020/menu.mjs +0 -2076
  151. package/fesm2020/menu.mjs.map +0 -1
  152. package/listbox/listbox-module.d.ts +0 -7
  153. package/listbox/listbox.d.ts +0 -169
  154. package/listbox/listbox_public_index.d.ts +0 -4
  155. package/listbox/package.json +0 -9
  156. package/listbox/public-api.d.ts +0 -9
  157. package/menu/context-menu.d.ts +0 -117
  158. package/menu/index.d.ts +0 -8
  159. package/menu/menu-aim.d.ts +0 -96
  160. package/menu/menu-bar.d.ts +0 -88
  161. package/menu/menu-errors.d.ts +0 -17
  162. package/menu/menu-group.d.ts +0 -33
  163. package/menu/menu-interface.d.ts +0 -23
  164. package/menu/menu-item-checkbox.d.ts +0 -12
  165. package/menu/menu-item-radio.d.ts +0 -36
  166. package/menu/menu-item-selectable.d.ts +0 -31
  167. package/menu/menu-item-trigger.d.ts +0 -110
  168. package/menu/menu-item.d.ts +0 -100
  169. package/menu/menu-module.d.ts +0 -16
  170. package/menu/menu-stack.d.ts +0 -79
  171. package/menu/menu-trigger.d.ts +0 -24
  172. package/menu/menu.d.ts +0 -97
  173. package/menu/menu_public_index.d.ts +0 -4
  174. package/menu/package.json +0 -9
  175. package/menu/pointer-focus-tracker.d.ts +0 -44
  176. package/menu/public-api.d.ts +0 -20
  177. package/popover-edit/constants.d.ts +0 -19
  178. package/popover-edit/edit-event-dispatcher.d.ts +0 -99
  179. package/popover-edit/edit-ref.d.ts +0 -52
  180. package/popover-edit/edit-services.d.ts +0 -37
  181. package/popover-edit/focus-dispatcher.d.ts +0 -31
  182. package/popover-edit/focus-escape-notifier.d.ts +0 -40
  183. package/popover-edit/form-value-container.d.ts +0 -24
  184. package/popover-edit/lens-directives.d.ts +0 -82
  185. package/popover-edit/package.json +0 -9
  186. package/popover-edit/polyfill.d.ts +0 -9
  187. package/popover-edit/popover-edit-module.d.ts +0 -9
  188. package/popover-edit/popover-edit-position-strategy-factory.d.ts +0 -42
  189. package/popover-edit/popover-edit_public_index.d.ts +0 -4
  190. package/popover-edit/public-api.d.ts +0 -17
  191. package/popover-edit/table-directives.d.ts +0 -150
  192. package/public-api.d.ts +0 -8
  193. package/scrolling/auto-size-virtual-scroll.d.ts +0 -160
  194. package/scrolling/package.json +0 -9
  195. package/scrolling/public-api.d.ts +0 -9
  196. package/scrolling/scrolling-module.d.ts +0 -7
  197. package/scrolling/scrolling_public_index.d.ts +0 -4
  198. package/selection/package.json +0 -9
  199. package/selection/public-api.d.ts +0 -14
  200. package/selection/row-selection.d.ts +0 -27
  201. package/selection/select-all.d.ts +0 -52
  202. package/selection/selection-column.d.ts +0 -34
  203. package/selection/selection-module.d.ts +0 -13
  204. package/selection/selection-set.d.ts +0 -56
  205. package/selection/selection-toggle.d.ts +0 -46
  206. package/selection/selection.d.ts +0 -65
  207. package/selection/selection_public_index.d.ts +0 -4
  208. package/table-scroll-container/package.json +0 -9
  209. package/table-scroll-container/public-api.d.ts +0 -9
  210. package/table-scroll-container/table-scroll-container-module.d.ts +0 -7
  211. package/table-scroll-container/table-scroll-container.d.ts +0 -53
  212. package/table-scroll-container/table-scroll-container_public_index.d.ts +0 -4
  213. package/version.d.ts +0 -10
@@ -1,20 +1,30 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Directive, Optional, Input, Output, InjectionToken, Inject, NgModule } from '@angular/core';
2
+ import { InjectionToken, EventEmitter, Directive, Inject, Optional, Input, Output, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/cdk/overlay';
4
4
  import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
5
+ import { DOCUMENT } from '@angular/common';
5
6
  import { TemplatePortal } from '@angular/cdk/portal';
6
7
  import * as i2 from '@angular/cdk/bidi';
7
8
  import { coerceBooleanProperty, coerceArray } from '@angular/cdk/coercion';
8
9
  import { _getEventTarget } from '@angular/cdk/platform';
9
10
  import { DOWN_ARROW, ENTER, ESCAPE, TAB } from '@angular/cdk/keycodes';
10
- import { Subject } from 'rxjs';
11
11
 
12
+ /**
13
+ * @license
14
+ * Copyright Google LLC All Rights Reserved.
15
+ *
16
+ * Use of this source code is governed by an MIT-style license that can be
17
+ * found in the LICENSE file at https://angular.io/license
18
+ */
12
19
  const allowedOpenActions = ['focus', 'click', 'downKey', 'toggle'];
20
+ const CDK_COMBOBOX = new InjectionToken('CDK_COMBOBOX');
13
21
  class CdkCombobox {
14
- constructor(_elementRef, _overlay, _viewContainerRef, _directionality) {
22
+ constructor(_elementRef, _overlay, _viewContainerRef, _injector, _doc, _directionality) {
15
23
  this._elementRef = _elementRef;
16
24
  this._overlay = _overlay;
17
25
  this._viewContainerRef = _viewContainerRef;
26
+ this._injector = _injector;
27
+ this._doc = _doc;
18
28
  this._directionality = _directionality;
19
29
  this._disabled = false;
20
30
  this._openActions = ['click'];
@@ -24,12 +34,6 @@ class CdkCombobox {
24
34
  this.panelValueChanged = new EventEmitter();
25
35
  this.contentId = '';
26
36
  }
27
- get panel() {
28
- return this._panel;
29
- }
30
- set panel(panel) {
31
- this._panel = panel;
32
- }
33
37
  get disabled() {
34
38
  return this._disabled;
35
39
  }
@@ -49,18 +53,6 @@ class CdkCombobox {
49
53
  set autoSetText(value) {
50
54
  this._autoSetText = coerceBooleanProperty(value);
51
55
  }
52
- ngAfterContentInit() {
53
- this._panel?.valueUpdated.subscribe(data => {
54
- this._setComboboxValue(data);
55
- this.close();
56
- });
57
- this._panel?.contentIdUpdated.subscribe(id => {
58
- this.contentId = id;
59
- });
60
- this._panel?.contentTypeUpdated.subscribe(type => {
61
- this.contentType = type;
62
- });
63
- }
64
56
  ngOnDestroy() {
65
57
  if (this._overlayRef) {
66
58
  this._overlayRef.dispose();
@@ -73,7 +65,8 @@ class CdkCombobox {
73
65
  const { keyCode } = event;
74
66
  if (keyCode === DOWN_ARROW) {
75
67
  if (this.isOpen()) {
76
- this._panel?.focusContent();
68
+ // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping
69
+ this._doc.getElementById(this.contentId)?.focus();
77
70
  }
78
71
  else if (this._openActions.indexOf('downKey') !== -1) {
79
72
  this.open();
@@ -137,7 +130,8 @@ class CdkCombobox {
137
130
  this._overlayRef = this._overlayRef || this._overlay.create(this._getOverlayConfig());
138
131
  this._overlayRef.attach(this._getPanelContent());
139
132
  if (!this._isTextTrigger()) {
140
- this._panel?.focusContent();
133
+ // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping
134
+ this._doc.getElementById(this.contentId)?.focus();
141
135
  }
142
136
  }
143
137
  }
@@ -154,7 +148,7 @@ class CdkCombobox {
154
148
  }
155
149
  /** Returns true if combobox has a child panel. */
156
150
  hasPanel() {
157
- return !!this.panel;
151
+ return !!this._panelTemplateRef;
158
152
  }
159
153
  _getTabIndex() {
160
154
  return this.disabled ? null : '0';
@@ -169,6 +163,10 @@ class CdkCombobox {
169
163
  }
170
164
  }
171
165
  }
166
+ updateAndClose(value) {
167
+ this._setComboboxValue(value);
168
+ this.close();
169
+ }
172
170
  _setTextContent(content) {
173
171
  const contentArray = coerceArray(content);
174
172
  this._elementRef.nativeElement.textContent = contentArray.join(' ');
@@ -199,12 +197,15 @@ class CdkCombobox {
199
197
  { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },
200
198
  ];
201
199
  }
200
+ _getPanelInjector() {
201
+ return this._injector;
202
+ }
202
203
  _getPanelContent() {
203
- const hasPanelChanged = this._panel?._templateRef !== this._panelContent?.templateRef;
204
- if (this._panel && (!this._panel || hasPanelChanged)) {
205
- this._panelContent = new TemplatePortal(this._panel._templateRef, this._viewContainerRef);
204
+ const hasPanelChanged = this._panelTemplateRef !== this._panelPortal?.templateRef;
205
+ if (this._panelTemplateRef && (!this._panelPortal || hasPanelChanged)) {
206
+ this._panelPortal = new TemplatePortal(this._panelTemplateRef, this._viewContainerRef, undefined, this._getPanelInjector());
206
207
  }
207
- return this._panelContent;
208
+ return this._panelPortal;
208
209
  }
209
210
  _coerceOpenActionProperty(input) {
210
211
  let actions = typeof input === 'string' ? input.trim().split(/[ ,]+/) : input;
@@ -214,10 +215,20 @@ class CdkCombobox {
214
215
  }
215
216
  return actions;
216
217
  }
218
+ /** Registers the content's id and the content type with the panel. */
219
+ _registerContent(contentId, contentType) {
220
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
221
+ contentType !== 'listbox' &&
222
+ contentType !== 'dialog') {
223
+ throw Error('CdkComboboxPanel currently only supports listbox or dialog content.');
224
+ }
225
+ this.contentId = contentId;
226
+ this.contentType = contentType;
227
+ }
217
228
  }
218
- CdkCombobox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkCombobox, deps: [{ token: i0.ElementRef }, { token: i1.Overlay }, { token: i0.ViewContainerRef }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
219
- CdkCombobox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkCombobox, selector: "[cdkCombobox]", inputs: { panel: ["cdkComboboxTriggerFor", "panel"], value: "value", disabled: "disabled", openActions: "openActions", autoSetText: "autoSetText" }, outputs: { opened: "comboboxPanelOpened", closed: "comboboxPanelClosed", panelValueChanged: "panelValueChanged" }, host: { attributes: { "role": "combobox" }, listeners: { "click": "_handleInteractions(\"click\")", "focus": "_handleInteractions(\"focus\")", "keydown": "_keydown($event)", "document:click": "_attemptClose($event)" }, properties: { "attr.aria-disabled": "disabled", "attr.aria-owns": "contentId", "attr.aria-haspopup": "contentType", "attr.aria-expanded": "isOpen()", "attr.tabindex": "_getTabIndex()" }, classAttribute: "cdk-combobox" }, exportAs: ["cdkCombobox"], ngImport: i0 });
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkCombobox, decorators: [{
229
+ CdkCombobox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkCombobox, deps: [{ token: i0.ElementRef }, { token: i1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.Injector }, { token: DOCUMENT }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
230
+ CdkCombobox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0-next.16", type: CdkCombobox, selector: "[cdkCombobox]", inputs: { _panelTemplateRef: ["cdkComboboxTriggerFor", "_panelTemplateRef"], value: "value", disabled: "disabled", openActions: "openActions", autoSetText: "autoSetText" }, outputs: { opened: "comboboxPanelOpened", closed: "comboboxPanelClosed", panelValueChanged: "panelValueChanged" }, host: { attributes: { "role": "combobox" }, listeners: { "click": "_handleInteractions(\"click\")", "focus": "_handleInteractions(\"focus\")", "keydown": "_keydown($event)", "document:click": "_attemptClose($event)" }, properties: { "attr.aria-disabled": "disabled", "attr.aria-owns": "contentId", "attr.aria-haspopup": "contentType", "attr.aria-expanded": "isOpen()", "attr.tabindex": "_getTabIndex()" }, classAttribute: "cdk-combobox" }, providers: [{ provide: CDK_COMBOBOX, useExisting: CdkCombobox }], exportAs: ["cdkCombobox"], ngImport: i0 });
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkCombobox, decorators: [{
221
232
  type: Directive,
222
233
  args: [{
223
234
  selector: '[cdkCombobox]',
@@ -235,10 +246,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
235
246
  '[attr.aria-expanded]': 'isOpen()',
236
247
  '[attr.tabindex]': '_getTabIndex()',
237
248
  },
249
+ providers: [{ provide: CDK_COMBOBOX, useExisting: CdkCombobox }],
238
250
  }]
239
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i2.Directionality, decorators: [{
251
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.Injector }, { type: undefined, decorators: [{
252
+ type: Inject,
253
+ args: [DOCUMENT]
254
+ }] }, { type: i2.Directionality, decorators: [{
240
255
  type: Optional
241
- }] }]; }, propDecorators: { panel: [{
256
+ }] }]; }, propDecorators: { _panelTemplateRef: [{
242
257
  type: Input,
243
258
  args: ['cdkComboboxTriggerFor']
244
259
  }], value: [{
@@ -260,51 +275,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
260
275
  args: ['panelValueChanged']
261
276
  }] } });
262
277
 
263
- class CdkComboboxPanel {
264
- constructor(_templateRef) {
265
- this._templateRef = _templateRef;
266
- this.valueUpdated = new Subject();
267
- this.contentIdUpdated = new Subject();
268
- this.contentTypeUpdated = new Subject();
269
- this.contentId = '';
270
- }
271
- /** Tells the parent combobox to close the panel and sends back the content value. */
272
- closePanel(data) {
273
- this.valueUpdated.next(data || []);
274
- }
275
- // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping
276
- focusContent() {
277
- // TODO: Use an injected document here
278
- document.getElementById(this.contentId)?.focus();
279
- }
280
- /** Registers the content's id and the content type with the panel. */
281
- _registerContent(contentId, contentType) {
282
- // If content has already been registered, no further contentIds are registered.
283
- if (this.contentType && this.contentType !== contentType) {
284
- return;
285
- }
286
- this.contentId = contentId;
287
- if (contentType !== 'listbox' && contentType !== 'dialog') {
288
- throw Error('CdkComboboxPanel currently only supports listbox or dialog content.');
289
- }
290
- this.contentType = contentType;
291
- this.contentIdUpdated.next(this.contentId);
292
- this.contentTypeUpdated.next(this.contentType);
293
- }
294
- }
295
- CdkComboboxPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxPanel, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
296
- CdkComboboxPanel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkComboboxPanel, selector: "ng-template[cdkComboboxPanel]", host: { classAttribute: "cdk-combobox-panel" }, exportAs: ["cdkComboboxPanel"], ngImport: i0 });
297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxPanel, decorators: [{
298
- type: Directive,
299
- args: [{
300
- host: {
301
- 'class': 'cdk-combobox-panel',
302
- },
303
- selector: 'ng-template[cdkComboboxPanel]',
304
- exportAs: 'cdkComboboxPanel',
305
- }]
306
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
307
-
308
278
  /**
309
279
  * @license
310
280
  * Copyright Google LLC All Rights Reserved.
@@ -312,12 +282,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
312
282
  * Use of this source code is governed by an MIT-style license that can be
313
283
  * found in the LICENSE file at https://angular.io/license
314
284
  */
315
- const PANEL = new InjectionToken('CdkComboboxPanel');
316
285
  let nextId = 0;
317
286
  class CdkComboboxPopup {
318
- constructor(_elementRef, _parentPanel) {
287
+ constructor(_elementRef, _combobox) {
319
288
  this._elementRef = _elementRef;
320
- this._parentPanel = _parentPanel;
289
+ this._combobox = _combobox;
321
290
  this._role = 'dialog';
322
291
  this.id = `cdk-combobox-popup-${nextId++}`;
323
292
  }
@@ -337,12 +306,7 @@ class CdkComboboxPopup {
337
306
  this.registerWithPanel();
338
307
  }
339
308
  registerWithPanel() {
340
- if (this._parentPanel === null || this._parentPanel === undefined) {
341
- this._explicitPanel._registerContent(this.id, this._role);
342
- }
343
- else {
344
- this._parentPanel._registerContent(this.id, this._role);
345
- }
309
+ this._combobox._registerContent(this.id, this._role);
346
310
  }
347
311
  focusFirstElement() {
348
312
  if (this._firstFocusElement) {
@@ -353,9 +317,9 @@ class CdkComboboxPopup {
353
317
  }
354
318
  }
355
319
  }
356
- CdkComboboxPopup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxPopup, deps: [{ token: i0.ElementRef }, { token: PANEL, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
357
- CdkComboboxPopup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkComboboxPopup, selector: "[cdkComboboxPopup]", inputs: { role: "role", firstFocus: "firstFocus", id: "id", _explicitPanel: ["parentPanel", "_explicitPanel"] }, host: { attributes: { "tabindex": "-1" }, listeners: { "focus": "focusFirstElement()" }, properties: { "attr.role": "role", "id": "id" }, classAttribute: "cdk-combobox-popup" }, exportAs: ["cdkComboboxPopup"], ngImport: i0 });
358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxPopup, decorators: [{
320
+ CdkComboboxPopup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkComboboxPopup, deps: [{ token: i0.ElementRef }, { token: CDK_COMBOBOX }], target: i0.ɵɵFactoryTarget.Directive });
321
+ CdkComboboxPopup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0-next.16", type: CdkComboboxPopup, selector: "[cdkComboboxPopup]", inputs: { role: "role", firstFocus: "firstFocus", id: "id" }, host: { attributes: { "tabindex": "-1" }, listeners: { "focus": "focusFirstElement()" }, properties: { "attr.role": "role", "id": "id" }, classAttribute: "cdk-combobox-popup" }, exportAs: ["cdkComboboxPopup"], ngImport: i0 });
322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkComboboxPopup, decorators: [{
359
323
  type: Directive,
360
324
  args: [{
361
325
  selector: '[cdkComboboxPopup]',
@@ -368,20 +332,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
368
332
  '(focus)': 'focusFirstElement()',
369
333
  },
370
334
  }]
371
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: CdkComboboxPanel, decorators: [{
372
- type: Optional
373
- }, {
335
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: CdkCombobox, decorators: [{
374
336
  type: Inject,
375
- args: [PANEL]
337
+ args: [CDK_COMBOBOX]
376
338
  }] }]; }, propDecorators: { role: [{
377
339
  type: Input
378
340
  }], firstFocus: [{
379
341
  type: Input
380
342
  }], id: [{
381
343
  type: Input
382
- }], _explicitPanel: [{
383
- type: Input,
384
- args: ['parentPanel']
385
344
  }] } });
386
345
 
387
346
  /**
@@ -391,13 +350,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
391
350
  * Use of this source code is governed by an MIT-style license that can be
392
351
  * found in the LICENSE file at https://angular.io/license
393
352
  */
394
- const EXPORTED_DECLARATIONS = [CdkCombobox, CdkComboboxPanel, CdkComboboxPopup];
353
+ const EXPORTED_DECLARATIONS = [CdkCombobox, CdkComboboxPopup];
395
354
  class CdkComboboxModule {
396
355
  }
397
- CdkComboboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
398
- CdkComboboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxModule, declarations: [CdkCombobox, CdkComboboxPanel, CdkComboboxPopup], imports: [OverlayModule], exports: [CdkCombobox, CdkComboboxPanel, CdkComboboxPopup] });
399
- CdkComboboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxModule, imports: [[OverlayModule]] });
400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkComboboxModule, decorators: [{
356
+ CdkComboboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkComboboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
357
+ CdkComboboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkComboboxModule, declarations: [CdkCombobox, CdkComboboxPopup], imports: [OverlayModule], exports: [CdkCombobox, CdkComboboxPopup] });
358
+ CdkComboboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkComboboxModule, imports: [OverlayModule] });
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkComboboxModule, decorators: [{
401
360
  type: NgModule,
402
361
  args: [{
403
362
  imports: [OverlayModule],
@@ -426,5 +385,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
426
385
  * Generated bundle index. Do not edit.
427
386
  */
428
387
 
429
- export { CdkCombobox, CdkComboboxModule, CdkComboboxPanel, CdkComboboxPopup, PANEL };
388
+ export { CDK_COMBOBOX, CdkCombobox, CdkComboboxModule, CdkComboboxPopup };
430
389
  //# sourceMappingURL=combobox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.mjs","sources":["../../../../../../src/cdk-experimental/combobox/combobox.ts","../../../../../../src/cdk-experimental/combobox/combobox-panel.ts","../../../../../../src/cdk-experimental/combobox/combobox-popup.ts","../../../../../../src/cdk-experimental/combobox/combobox-module.ts","../../../../../../src/cdk-experimental/combobox/public-api.ts","../../../../../../src/cdk-experimental/combobox/index.ts","../../../../../../src/cdk-experimental/combobox/combobox_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport type OpenAction = 'focus' | 'click' | 'downKey' | 'toggle';\nexport type OpenActionInput = OpenAction | OpenAction[] | string | null | undefined;\n\nimport {\n AfterContentInit,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Optional,\n Output,\n ViewContainerRef,\n} from '@angular/core';\nimport {CdkComboboxPanel, AriaHasPopupValue} from './combobox-panel';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceBooleanProperty, coerceArray} from '@angular/cdk/coercion';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB} from '@angular/cdk/keycodes';\n\nconst allowedOpenActions = ['focus', 'click', 'downKey', 'toggle'];\n\n@Directive({\n selector: '[cdkCombobox]',\n exportAs: 'cdkCombobox',\n host: {\n 'role': 'combobox',\n 'class': 'cdk-combobox',\n '(click)': '_handleInteractions(\"click\")',\n '(focus)': '_handleInteractions(\"focus\")',\n '(keydown)': '_keydown($event)',\n '(document:click)': '_attemptClose($event)',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-owns]': 'contentId',\n '[attr.aria-haspopup]': 'contentType',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.tabindex]': '_getTabIndex()',\n },\n})\nexport class CdkCombobox<T = unknown> implements OnDestroy, AfterContentInit {\n @Input('cdkComboboxTriggerFor')\n get panel(): CdkComboboxPanel<T> | undefined {\n return this._panel;\n }\n set panel(panel: CdkComboboxPanel<T> | undefined) {\n this._panel = panel;\n }\n private _panel: CdkComboboxPanel<T> | undefined;\n\n @Input()\n value: T | T[];\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled: boolean = false;\n\n @Input()\n get openActions(): OpenAction[] {\n return this._openActions;\n }\n set openActions(action: OpenActionInput) {\n this._openActions = this._coerceOpenActionProperty(action);\n }\n private _openActions: OpenAction[] = ['click'];\n\n /** Whether the textContent is automatically updated upon change of the combobox value. */\n @Input()\n get autoSetText(): boolean {\n return this._autoSetText;\n }\n set autoSetText(value: BooleanInput) {\n this._autoSetText = coerceBooleanProperty(value);\n }\n private _autoSetText: boolean = true;\n\n @Output('comboboxPanelOpened') readonly opened: EventEmitter<void> = new EventEmitter<void>();\n @Output('comboboxPanelClosed') readonly closed: EventEmitter<void> = new EventEmitter<void>();\n @Output('panelValueChanged') readonly panelValueChanged: EventEmitter<T[]> = new EventEmitter<\n T[]\n >();\n\n private _overlayRef: OverlayRef;\n private _panelContent: TemplatePortal;\n contentId: string = '';\n contentType: AriaHasPopupValue;\n\n constructor(\n private readonly _elementRef: ElementRef<HTMLElement>,\n private readonly _overlay: Overlay,\n protected readonly _viewContainerRef: ViewContainerRef,\n @Optional() private readonly _directionality?: Directionality,\n ) {}\n\n ngAfterContentInit() {\n this._panel?.valueUpdated.subscribe(data => {\n this._setComboboxValue(data);\n this.close();\n });\n\n this._panel?.contentIdUpdated.subscribe(id => {\n this.contentId = id;\n });\n\n this._panel?.contentTypeUpdated.subscribe(type => {\n this.contentType = type;\n });\n }\n\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n\n this.opened.complete();\n this.closed.complete();\n this.panelValueChanged.complete();\n }\n\n _keydown(event: KeyboardEvent) {\n const {keyCode} = event;\n\n if (keyCode === DOWN_ARROW) {\n if (this.isOpen()) {\n this._panel?.focusContent();\n } else if (this._openActions.indexOf('downKey') !== -1) {\n this.open();\n }\n } else if (keyCode === ENTER) {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (keyCode === ESCAPE) {\n event.preventDefault();\n this.close();\n } else if (keyCode === TAB) {\n this.close();\n }\n }\n\n /** Handles click or focus interactions. */\n _handleInteractions(interaction: OpenAction) {\n if (interaction === 'click') {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (interaction === 'focus') {\n if (this._openActions.indexOf('focus') !== -1) {\n this.open();\n }\n }\n }\n\n /** Given a click in the document, determines if the click was inside a combobox. */\n _attemptClose(event: MouseEvent) {\n if (this.isOpen()) {\n let target = _getEventTarget(event);\n while (target instanceof Element) {\n if (target.className.indexOf('cdk-combobox') !== -1) {\n return;\n }\n target = target.parentElement;\n }\n }\n\n this.close();\n }\n\n /** Toggles the open state of the panel. */\n toggle() {\n if (this.hasPanel()) {\n this.isOpen() ? this.close() : this.open();\n }\n }\n\n /** If the combobox is closed and not disabled, opens the panel. */\n open() {\n if (!this.isOpen() && !this.disabled) {\n this.opened.next();\n this._overlayRef = this._overlayRef || this._overlay.create(this._getOverlayConfig());\n this._overlayRef.attach(this._getPanelContent());\n if (!this._isTextTrigger()) {\n this._panel?.focusContent();\n }\n }\n }\n\n /** If the combobox is open and not disabled, closes the panel. */\n close() {\n if (this.isOpen() && !this.disabled) {\n this.closed.next();\n this._overlayRef.detach();\n }\n }\n\n /** Returns true if panel is currently opened. */\n isOpen(): boolean {\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\n }\n\n /** Returns true if combobox has a child panel. */\n hasPanel(): boolean {\n return !!this.panel;\n }\n\n _getTabIndex(): string | null {\n return this.disabled ? null : '0';\n }\n\n private _setComboboxValue(value: T | T[]) {\n const valueChanged = this.value !== value;\n this.value = value;\n\n if (valueChanged) {\n this.panelValueChanged.emit(coerceArray(value));\n if (this._autoSetText) {\n this._setTextContent(value);\n }\n }\n }\n\n private _setTextContent(content: T | T[]) {\n const contentArray = coerceArray(content);\n this._elementRef.nativeElement.textContent = contentArray.join(' ');\n }\n\n private _isTextTrigger() {\n // TODO: Should check if the trigger is contenteditable.\n const tagName = this._elementRef.nativeElement.tagName.toLowerCase();\n return tagName === 'input' || tagName === 'textarea' ? true : false;\n }\n\n private _getOverlayConfig() {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPositionStrategy(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n direction: this._directionality,\n });\n }\n\n private _getOverlayPositionStrategy(): FlexibleConnectedPositionStrategy {\n return this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withPositions(this._getOverlayPositions());\n }\n\n private _getOverlayPositions(): ConnectedPosition[] {\n return [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom'},\n ];\n }\n\n private _getPanelContent() {\n const hasPanelChanged = this._panel?._templateRef !== this._panelContent?.templateRef;\n if (this._panel && (!this._panel || hasPanelChanged)) {\n this._panelContent = new TemplatePortal(this._panel._templateRef, this._viewContainerRef);\n }\n\n return this._panelContent;\n }\n\n private _coerceOpenActionProperty(input: OpenActionInput): OpenAction[] {\n let actions = typeof input === 'string' ? input.trim().split(/[ ,]+/) : input;\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n actions?.some(a => allowedOpenActions.indexOf(a) === -1)\n ) {\n throw Error(`${input} is not a support open action for CdkCombobox`);\n }\n return actions as OpenAction[];\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport type AriaHasPopupValue = 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n\nimport {Directive, TemplateRef} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n@Directive({\n host: {\n 'class': 'cdk-combobox-panel',\n },\n selector: 'ng-template[cdkComboboxPanel]',\n exportAs: 'cdkComboboxPanel',\n})\nexport class CdkComboboxPanel<T = unknown> {\n valueUpdated: Subject<T | T[]> = new Subject<T | T[]>();\n contentIdUpdated: Subject<string> = new Subject<string>();\n contentTypeUpdated: Subject<AriaHasPopupValue> = new Subject<AriaHasPopupValue>();\n\n contentId: string = '';\n contentType: AriaHasPopupValue;\n\n constructor(readonly _templateRef: TemplateRef<unknown>) {}\n\n /** Tells the parent combobox to close the panel and sends back the content value. */\n closePanel(data?: T | T[]) {\n this.valueUpdated.next(data || []);\n }\n\n // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping\n focusContent() {\n // TODO: Use an injected document here\n document.getElementById(this.contentId)?.focus();\n }\n\n /** Registers the content's id and the content type with the panel. */\n _registerContent(contentId: string, contentType: AriaHasPopupValue) {\n // If content has already been registered, no further contentIds are registered.\n if (this.contentType && this.contentType !== contentType) {\n return;\n }\n\n this.contentId = contentId;\n if (contentType !== 'listbox' && contentType !== 'dialog') {\n throw Error('CdkComboboxPanel currently only supports listbox or dialog content.');\n }\n this.contentType = contentType;\n\n this.contentIdUpdated.next(this.contentId);\n this.contentTypeUpdated.next(this.contentType);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n OnInit,\n Optional,\n} from '@angular/core';\nimport {AriaHasPopupValue, CdkComboboxPanel} from './combobox-panel';\n\nexport const PANEL = new InjectionToken<CdkComboboxPanel>('CdkComboboxPanel');\n\nlet nextId = 0;\n\n@Directive({\n selector: '[cdkComboboxPopup]',\n exportAs: 'cdkComboboxPopup',\n host: {\n 'class': 'cdk-combobox-popup',\n '[attr.role]': 'role',\n '[id]': 'id',\n 'tabindex': '-1',\n '(focus)': 'focusFirstElement()',\n },\n})\nexport class CdkComboboxPopup<T = unknown> implements OnInit {\n @Input()\n get role(): AriaHasPopupValue {\n return this._role;\n }\n set role(value: AriaHasPopupValue) {\n this._role = value;\n }\n private _role: AriaHasPopupValue = 'dialog';\n\n @Input()\n get firstFocus(): HTMLElement {\n return this._firstFocusElement;\n }\n set firstFocus(id: HTMLElement) {\n this._firstFocusElement = id;\n }\n private _firstFocusElement: HTMLElement;\n\n @Input() id = `cdk-combobox-popup-${nextId++}`;\n\n @Input('parentPanel') private readonly _explicitPanel: CdkComboboxPanel;\n\n constructor(\n private readonly _elementRef: ElementRef<HTMLElement>,\n @Optional() @Inject(PANEL) readonly _parentPanel?: CdkComboboxPanel<T>,\n ) {}\n\n ngOnInit() {\n this.registerWithPanel();\n }\n\n registerWithPanel(): void {\n if (this._parentPanel === null || this._parentPanel === undefined) {\n this._explicitPanel._registerContent(this.id, this._role);\n } else {\n this._parentPanel._registerContent(this.id, this._role);\n }\n }\n\n focusFirstElement() {\n if (this._firstFocusElement) {\n this._firstFocusElement.focus();\n } else {\n this._elementRef.nativeElement.focus();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {CdkCombobox} from './combobox';\nimport {CdkComboboxPanel} from './combobox-panel';\nimport {CdkComboboxPopup} from './combobox-popup';\n\nconst EXPORTED_DECLARATIONS = [CdkCombobox, CdkComboboxPanel, CdkComboboxPopup];\n@NgModule({\n imports: [OverlayModule],\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n})\nexport class CdkComboboxModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './combobox-module';\nexport * from './combobox';\nexport * from './combobox-panel';\nexport * from './combobox-popup';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAoCA,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;MAmBtD,WAAW,CAAA;AAoDtB,IAAA,WAAA,CACmB,WAAoC,EACpC,QAAiB,EACf,iBAAmC,EACzB,eAAgC,EAAA;QAH5C,IAAW,CAAA,WAAA,GAAX,WAAW,CAAyB;QACpC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;QACf,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;QACzB,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;QApCvD,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC;AAS3B,QAAA,IAAA,CAAA,YAAY,GAAiB,CAAC,OAAO,CAAC,CAAC;QAUvC,IAAY,CAAA,YAAA,GAAY,IAAI,CAAC;AAEG,QAAA,IAAA,CAAA,MAAM,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACtD,QAAA,IAAA,CAAA,MAAM,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACxD,QAAA,IAAA,CAAA,iBAAiB,GAAsB,IAAI,YAAY,EAE1F,CAAC;QAIJ,IAAS,CAAA,SAAA,GAAW,EAAE,CAAC;KAQnB;AAxDJ,IAAA,IACI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IACD,IAAI,KAAK,CAAC,KAAsC,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;KACrB;AAMD,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAI,QAAQ,CAAC,KAAmB,EAAA;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;KAC/C;AAGD,IAAA,IACI,WAAW,GA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CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EANC,YAAA,EAAA,CAAA,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,CAElE,EAAA,OAAA,EAAA,CAAA,aAAa,CAFM,EAAA,OAAA,EAAA,CAAA,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;sHAMjE,iBAAiB,EAAA,OAAA,EAAA,CAJnB,CAAC,aAAa,CAAC,CAAA,EAAA,CAAA,CAAA;kGAIb,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,OAAO,EAAE,qBAAqB;AAC9B,oBAAA,YAAY,EAAE,qBAAqB;AACpC,iBAAA,CAAA;;;ACnBD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"combobox.mjs","sources":["../../../../../../src/cdk-experimental/combobox/combobox.ts","../../../../../../src/cdk-experimental/combobox/combobox-popup.ts","../../../../../../src/cdk-experimental/combobox/combobox-module.ts","../../../../../../src/cdk-experimental/combobox/public-api.ts","../../../../../../src/cdk-experimental/combobox/index.ts","../../../../../../src/cdk-experimental/combobox/combobox_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Injector,\n Input,\n OnDestroy,\n Optional,\n Output,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceArray, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB} from '@angular/cdk/keycodes';\n\nexport type AriaHasPopupValue = 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\nexport type OpenAction = 'focus' | 'click' | 'downKey' | 'toggle';\nexport type OpenActionInput = OpenAction | OpenAction[] | string | null | undefined;\n\nconst allowedOpenActions = ['focus', 'click', 'downKey', 'toggle'];\n\nexport const CDK_COMBOBOX = new InjectionToken<CdkCombobox>('CDK_COMBOBOX');\n\n@Directive({\n selector: '[cdkCombobox]',\n exportAs: 'cdkCombobox',\n host: {\n 'role': 'combobox',\n 'class': 'cdk-combobox',\n '(click)': '_handleInteractions(\"click\")',\n '(focus)': '_handleInteractions(\"focus\")',\n '(keydown)': '_keydown($event)',\n '(document:click)': '_attemptClose($event)',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-owns]': 'contentId',\n '[attr.aria-haspopup]': 'contentType',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.tabindex]': '_getTabIndex()',\n },\n providers: [{provide: CDK_COMBOBOX, useExisting: CdkCombobox}],\n})\nexport class CdkCombobox<T = unknown> implements OnDestroy {\n @Input('cdkComboboxTriggerFor')\n _panelTemplateRef: TemplateRef<unknown>;\n\n @Input()\n value: T | T[];\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n }\n private _disabled: boolean = false;\n\n @Input()\n get openActions(): OpenAction[] {\n return this._openActions;\n }\n set openActions(action: OpenActionInput) {\n this._openActions = this._coerceOpenActionProperty(action);\n }\n private _openActions: OpenAction[] = ['click'];\n\n /** Whether the textContent is automatically updated upon change of the combobox value. */\n @Input()\n get autoSetText(): boolean {\n return this._autoSetText;\n }\n set autoSetText(value: BooleanInput) {\n this._autoSetText = coerceBooleanProperty(value);\n }\n private _autoSetText: boolean = true;\n\n @Output('comboboxPanelOpened') readonly opened: EventEmitter<void> = new EventEmitter<void>();\n @Output('comboboxPanelClosed') readonly closed: EventEmitter<void> = new EventEmitter<void>();\n @Output('panelValueChanged') readonly panelValueChanged: EventEmitter<T[]> = new EventEmitter<\n T[]\n >();\n\n private _overlayRef: OverlayRef;\n private _panelPortal: TemplatePortal;\n\n contentId: string = '';\n contentType: AriaHasPopupValue;\n\n constructor(\n private readonly _elementRef: ElementRef<HTMLElement>,\n private readonly _overlay: Overlay,\n protected readonly _viewContainerRef: ViewContainerRef,\n private readonly _injector: Injector,\n @Inject(DOCUMENT) private readonly _doc: any,\n @Optional() private readonly _directionality?: Directionality,\n ) {}\n\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n\n this.opened.complete();\n this.closed.complete();\n this.panelValueChanged.complete();\n }\n\n _keydown(event: KeyboardEvent) {\n const {keyCode} = event;\n\n if (keyCode === DOWN_ARROW) {\n if (this.isOpen()) {\n // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping\n this._doc.getElementById(this.contentId)?.focus();\n } else if (this._openActions.indexOf('downKey') !== -1) {\n this.open();\n }\n } else if (keyCode === ENTER) {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (keyCode === ESCAPE) {\n event.preventDefault();\n this.close();\n } else if (keyCode === TAB) {\n this.close();\n }\n }\n\n /** Handles click or focus interactions. */\n _handleInteractions(interaction: OpenAction) {\n if (interaction === 'click') {\n if (this._openActions.indexOf('toggle') !== -1) {\n this.toggle();\n } else if (this._openActions.indexOf('click') !== -1) {\n this.open();\n }\n } else if (interaction === 'focus') {\n if (this._openActions.indexOf('focus') !== -1) {\n this.open();\n }\n }\n }\n\n /** Given a click in the document, determines if the click was inside a combobox. */\n _attemptClose(event: MouseEvent) {\n if (this.isOpen()) {\n let target = _getEventTarget(event);\n while (target instanceof Element) {\n if (target.className.indexOf('cdk-combobox') !== -1) {\n return;\n }\n target = target.parentElement;\n }\n }\n\n this.close();\n }\n\n /** Toggles the open state of the panel. */\n toggle() {\n if (this.hasPanel()) {\n this.isOpen() ? this.close() : this.open();\n }\n }\n\n /** If the combobox is closed and not disabled, opens the panel. */\n open() {\n if (!this.isOpen() && !this.disabled) {\n this.opened.next();\n this._overlayRef = this._overlayRef || this._overlay.create(this._getOverlayConfig());\n this._overlayRef.attach(this._getPanelContent());\n if (!this._isTextTrigger()) {\n // TODO: instead of using a focus function, potentially use cdk/a11y focus trapping\n this._doc.getElementById(this.contentId)?.focus();\n }\n }\n }\n\n /** If the combobox is open and not disabled, closes the panel. */\n close() {\n if (this.isOpen() && !this.disabled) {\n this.closed.next();\n this._overlayRef.detach();\n }\n }\n\n /** Returns true if panel is currently opened. */\n isOpen(): boolean {\n return this._overlayRef ? this._overlayRef.hasAttached() : false;\n }\n\n /** Returns true if combobox has a child panel. */\n hasPanel(): boolean {\n return !!this._panelTemplateRef;\n }\n\n _getTabIndex(): string | null {\n return this.disabled ? null : '0';\n }\n\n private _setComboboxValue(value: T | T[]) {\n const valueChanged = this.value !== value;\n this.value = value;\n\n if (valueChanged) {\n this.panelValueChanged.emit(coerceArray(value));\n if (this._autoSetText) {\n this._setTextContent(value);\n }\n }\n }\n\n updateAndClose(value: T | T[]) {\n this._setComboboxValue(value);\n this.close();\n }\n\n private _setTextContent(content: T | T[]) {\n const contentArray = coerceArray(content);\n this._elementRef.nativeElement.textContent = contentArray.join(' ');\n }\n\n private _isTextTrigger() {\n // TODO: Should check if the trigger is contenteditable.\n const tagName = this._elementRef.nativeElement.tagName.toLowerCase();\n return tagName === 'input' || tagName === 'textarea' ? true : false;\n }\n\n private _getOverlayConfig() {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPositionStrategy(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n direction: this._directionality,\n });\n }\n\n private _getOverlayPositionStrategy(): FlexibleConnectedPositionStrategy {\n return this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withPositions(this._getOverlayPositions());\n }\n\n private _getOverlayPositions(): ConnectedPosition[] {\n return [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom'},\n ];\n }\n\n private _getPanelInjector() {\n return this._injector;\n }\n\n private _getPanelContent() {\n const hasPanelChanged = this._panelTemplateRef !== this._panelPortal?.templateRef;\n if (this._panelTemplateRef && (!this._panelPortal || hasPanelChanged)) {\n this._panelPortal = new TemplatePortal(\n this._panelTemplateRef,\n this._viewContainerRef,\n undefined,\n this._getPanelInjector(),\n );\n }\n\n return this._panelPortal;\n }\n\n private _coerceOpenActionProperty(input: OpenActionInput): OpenAction[] {\n let actions = typeof input === 'string' ? input.trim().split(/[ ,]+/) : input;\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n actions?.some(a => allowedOpenActions.indexOf(a) === -1)\n ) {\n throw Error(`${input} is not a support open action for CdkCombobox`);\n }\n return actions as OpenAction[];\n }\n\n /** Registers the content's id and the content type with the panel. */\n _registerContent(contentId: string, contentType: AriaHasPopupValue) {\n if (\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n contentType !== 'listbox' &&\n contentType !== 'dialog'\n ) {\n throw Error('CdkComboboxPanel currently only supports listbox or dialog content.');\n }\n this.contentId = contentId;\n this.contentType = contentType;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, Inject, Input, OnInit} from '@angular/core';\nimport {AriaHasPopupValue, CDK_COMBOBOX, CdkCombobox} from './combobox';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[cdkComboboxPopup]',\n exportAs: 'cdkComboboxPopup',\n host: {\n 'class': 'cdk-combobox-popup',\n '[attr.role]': 'role',\n '[id]': 'id',\n 'tabindex': '-1',\n '(focus)': 'focusFirstElement()',\n },\n})\nexport class CdkComboboxPopup<T = unknown> implements OnInit {\n @Input()\n get role(): AriaHasPopupValue {\n return this._role;\n }\n set role(value: AriaHasPopupValue) {\n this._role = value;\n }\n private _role: AriaHasPopupValue = 'dialog';\n\n @Input()\n get firstFocus(): HTMLElement {\n return this._firstFocusElement;\n }\n set firstFocus(id: HTMLElement) {\n this._firstFocusElement = id;\n }\n private _firstFocusElement: HTMLElement;\n\n @Input() id = `cdk-combobox-popup-${nextId++}`;\n\n constructor(\n private readonly _elementRef: ElementRef<HTMLElement>,\n @Inject(CDK_COMBOBOX) private readonly _combobox: CdkCombobox,\n ) {}\n\n ngOnInit() {\n this.registerWithPanel();\n }\n\n registerWithPanel(): void {\n this._combobox._registerContent(this.id, this._role);\n }\n\n focusFirstElement() {\n if (this._firstFocusElement) {\n this._firstFocusElement.focus();\n } else {\n this._elementRef.nativeElement.focus();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {CdkCombobox} from './combobox';\nimport {CdkComboboxPopup} from './combobox-popup';\n\nconst EXPORTED_DECLARATIONS = [CdkCombobox, CdkComboboxPopup];\n@NgModule({\n imports: [OverlayModule],\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n})\nexport class CdkComboboxModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './combobox-module';\nexport * from './combobox';\nexport * from './combobox-popup';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;AAMG;AAiCH,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;MAEtD,YAAY,GAAG,IAAI,cAAc,CAAc,cAAc,EAAE;MAoB/D,WAAW,CAAA;IA+CtB,WACmB,CAAA,WAAoC,EACpC,QAAiB,EACf,iBAAmC,EACrC,SAAmB,EACD,IAAS,EACf,eAAgC,EAAA;QAL5C,IAAW,CAAA,WAAA,GAAX,WAAW,CAAyB;QACpC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;QACf,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;QACrC,IAAS,CAAA,SAAA,GAAT,SAAS,CAAU;QACD,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAK;QACf,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;QAvCvD,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC;AAS3B,QAAA,IAAA,CAAA,YAAY,GAAiB,CAAC,OAAO,CAAC,CAAC;QAUvC,IAAY,CAAA,YAAA,GAAY,IAAI,CAAC;AAEG,QAAA,IAAA,CAAA,MAAM,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACtD,QAAA,IAAA,CAAA,MAAM,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACxD,QAAA,IAAA,CAAA,iBAAiB,GAAsB,IAAI,YAAY,EAE1F,CAAC;QAKJ,IAAS,CAAA,SAAA,GAAW,EAAE,CAAC;KAUnB;AA/CJ,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAI,QA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BACR,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,OAAO,EAAE,qBAAqB;AAC9B,oBAAA,YAAY,EAAE,qBAAqB;AACpC,iBAAA,CAAA;;;AClBD;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, InjectionToken, EventEmitter, Directive, Inject, Input, Output, Optional, ContentChildren, NgModule } from '@angular/core';
2
+ import { forwardRef, EventEmitter, Directive, Inject, Input, Output, Optional, ContentChildren, NgModule } from '@angular/core';
3
3
  import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
4
4
  import { SPACE, ENTER, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';
5
5
  import { coerceBooleanProperty, coerceArray } from '@angular/cdk/coercion';
@@ -7,8 +7,9 @@ import { SelectionModel } from '@angular/cdk/collections';
7
7
  import { defer, merge, Subject } from 'rxjs';
8
8
  import { startWith, switchMap, takeUntil } from 'rxjs/operators';
9
9
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
- import * as i2 from '@angular/cdk-experimental/combobox';
11
10
  import * as i1 from '@angular/cdk/bidi';
11
+ import * as i2 from '@angular/cdk-experimental/combobox';
12
+ import { CDK_COMBOBOX } from '@angular/cdk-experimental/combobox';
12
13
 
13
14
  /**
14
15
  * @license
@@ -24,7 +25,6 @@ const CDK_LISTBOX_VALUE_ACCESSOR = {
24
25
  useExisting: forwardRef(() => CdkListbox),
25
26
  multi: true,
26
27
  };
27
- const PANEL = new InjectionToken('CdkComboboxPanel');
28
28
  class CdkOption {
29
29
  constructor(_elementRef, listbox) {
30
30
  this._elementRef = _elementRef;
@@ -114,20 +114,7 @@ class CdkOption {
114
114
  }
115
115
  /** Get the label for this element which is required by the FocusableOption interface. */
116
116
  getLabel() {
117
- // we know that the current node is an element type
118
- const clone = this._elementRef.nativeElement.cloneNode(true);
119
- this._removeIcons(clone);
120
- return clone.textContent?.trim() || '';
121
- }
122
- /** Remove any child from the given element which can be identified as an icon. */
123
- _removeIcons(element) {
124
- // TODO: make this a configurable function that can removed any desired type of node.
125
- for (const icon of Array.from(element.querySelectorAll('mat-icon, .material-icons'))) {
126
- icon.remove();
127
- }
128
- }
129
- getElementRef() {
130
- return this._elementRef;
117
+ return (this.typeahead ?? this._elementRef.nativeElement.textContent?.trim()) || '';
131
118
  }
132
119
  /** Sets the active property to true to enable the active css class. */
133
120
  setActiveStyles() {
@@ -138,9 +125,9 @@ class CdkOption {
138
125
  this._active = false;
139
126
  }
140
127
  }
141
- CdkOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkOption, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => CdkListbox) }], target: i0.ɵɵFactoryTarget.Directive });
142
- CdkOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkOption, selector: "[cdkOption]", inputs: { id: "id", selected: "selected", disabled: "disabled", value: "value" }, outputs: { selectionChange: "selectionChange" }, host: { attributes: { "role": "option" }, listeners: { "click": "toggle()", "focus": "activate()", "blur": "deactivate()" }, properties: { "id": "id", "attr.aria-selected": "selected || null", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "_isInteractionDisabled()", "class.cdk-option-disabled": "_isInteractionDisabled()", "class.cdk-option-active": "_active", "class.cdk-option-selected": "selected" }, classAttribute: "cdk-option" }, exportAs: ["cdkOption"], ngImport: i0 });
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkOption, decorators: [{
128
+ CdkOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkOption, deps: [{ token: i0.ElementRef }, { token: forwardRef(() => CdkListbox) }], target: i0.ɵɵFactoryTarget.Directive });
129
+ CdkOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0-next.16", type: CdkOption, selector: "[cdkOption]", inputs: { id: "id", selected: "selected", disabled: "disabled", value: "value", typeahead: "typeahead" }, outputs: { selectionChange: "selectionChange" }, host: { attributes: { "role": "option" }, listeners: { "click": "toggle()", "focus": "activate()", "blur": "deactivate()" }, properties: { "id": "id", "attr.aria-selected": "selected || null", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "_isInteractionDisabled()", "class.cdk-option-disabled": "_isInteractionDisabled()", "class.cdk-option-active": "_active", "class.cdk-option-selected": "selected" }, classAttribute: "cdk-option" }, exportAs: ["cdkOption"], ngImport: i0 });
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkOption, decorators: [{
144
131
  type: Directive,
145
132
  args: [{
146
133
  selector: '[cdkOption]',
@@ -171,12 +158,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
171
158
  type: Input
172
159
  }], value: [{
173
160
  type: Input
161
+ }], typeahead: [{
162
+ type: Input
174
163
  }], selectionChange: [{
175
164
  type: Output
176
165
  }] } });
177
166
  class CdkListbox {
178
- constructor(_parentPanel, _dir) {
179
- this._parentPanel = _parentPanel;
167
+ constructor(_combobox, _dir) {
168
+ this._combobox = _combobox;
180
169
  this._dir = _dir;
181
170
  this._tabIndex = 0;
182
171
  /** `View -> model callback called when select has been touched` */
@@ -236,7 +225,7 @@ class CdkListbox {
236
225
  ngAfterContentInit() {
237
226
  this._initKeyManager();
238
227
  this._initSelectionModel();
239
- this._registerWithPanel();
228
+ this._combobox?._registerContent(this.id, 'listbox');
240
229
  this.optionSelectionChanges.subscribe(event => {
241
230
  this._emitChangeEvent(event.source);
242
231
  this._updateSelectionModel(event.source);
@@ -249,10 +238,6 @@ class CdkListbox {
249
238
  this._destroyed.next();
250
239
  this._destroyed.complete();
251
240
  }
252
- _registerWithPanel() {
253
- const panel = this._parentPanel || this._explicitPanel;
254
- panel?._registerContent(this.id, 'listbox');
255
- }
256
241
  _initKeyManager() {
257
242
  this._listKeyManager = new ActiveDescendantKeyManager(this._options)
258
243
  .withWrap()
@@ -322,12 +307,13 @@ class CdkListbox {
322
307
  option.selected ? this._selectionModel.select(option) : this._selectionModel.deselect(option);
323
308
  }
324
309
  _updatePanelForSelection(option) {
325
- const panel = this._parentPanel || this._explicitPanel;
326
- if (!this.multiple) {
327
- option.selected ? panel?.closePanel(option.value) : panel?.closePanel();
328
- }
329
- else {
330
- panel?.closePanel(this.getSelectedValues());
310
+ if (this._combobox) {
311
+ if (!this.multiple) {
312
+ this._combobox.updateAndClose(option.selected ? option.value : []);
313
+ }
314
+ else {
315
+ this._combobox.updateAndClose(this.getSelectedValues());
316
+ }
331
317
  }
332
318
  }
333
319
  /** Toggles the selected state of the active option if not disabled. */
@@ -444,9 +430,9 @@ class CdkListbox {
444
430
  }
445
431
  }
446
432
  }
447
- CdkListbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkListbox, deps: [{ token: PANEL, optional: true }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
448
- CdkListbox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.6", type: CdkListbox, selector: "[cdkListbox]", inputs: { id: "id", multiple: "multiple", disabled: "disabled", useActiveDescendant: "useActiveDescendant", autoFocus: "autoFocus", orientation: ["listboxOrientation", "orientation"], compareWith: "compareWith", _explicitPanel: ["parentPanel", "_explicitPanel"] }, outputs: { selectionChange: "selectionChange" }, host: { attributes: { "role": "listbox" }, listeners: { "focus": "_focusActiveOption()", "keydown": "_keydown($event)" }, properties: { "id": "id", "attr.tabindex": "_tabIndex", "attr.aria-disabled": "disabled", "attr.aria-multiselectable": "multiple", "attr.aria-activedescendant": "_getAriaActiveDescendant()", "attr.aria-orientation": "orientation" }, classAttribute: "cdk-listbox" }, providers: [CDK_LISTBOX_VALUE_ACCESSOR], queries: [{ propertyName: "_options", predicate: CdkOption, descendants: true }], exportAs: ["cdkListbox"], ngImport: i0 });
449
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkListbox, decorators: [{
433
+ CdkListbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkListbox, deps: [{ token: CDK_COMBOBOX, optional: true }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
434
+ CdkListbox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0-next.16", type: CdkListbox, selector: "[cdkListbox]", inputs: { id: "id", multiple: "multiple", disabled: "disabled", useActiveDescendant: "useActiveDescendant", autoFocus: "autoFocus", orientation: ["listboxOrientation", "orientation"], compareWith: "compareWith" }, outputs: { selectionChange: "selectionChange" }, host: { attributes: { "role": "listbox" }, listeners: { "focus": "_focusActiveOption()", "keydown": "_keydown($event)" }, properties: { "id": "id", "attr.tabindex": "_tabIndex", "attr.aria-disabled": "disabled", "attr.aria-multiselectable": "multiple", "attr.aria-activedescendant": "_getAriaActiveDescendant()", "attr.aria-orientation": "orientation" }, classAttribute: "cdk-listbox" }, providers: [CDK_LISTBOX_VALUE_ACCESSOR], queries: [{ propertyName: "_options", predicate: CdkOption, descendants: true }], exportAs: ["cdkListbox"], ngImport: i0 });
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkListbox, decorators: [{
450
436
  type: Directive,
451
437
  args: [{
452
438
  selector: '[cdkListbox]',
@@ -465,11 +451,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
465
451
  },
466
452
  providers: [CDK_LISTBOX_VALUE_ACCESSOR],
467
453
  }]
468
- }], ctorParameters: function () { return [{ type: i2.CdkComboboxPanel, decorators: [{
454
+ }], ctorParameters: function () { return [{ type: i2.CdkCombobox, decorators: [{
469
455
  type: Optional
470
456
  }, {
471
457
  type: Inject,
472
- args: [PANEL]
458
+ args: [CDK_COMBOBOX]
473
459
  }] }, { type: i1.Directionality, decorators: [{
474
460
  type: Optional
475
461
  }] }]; }, propDecorators: { _options: [{
@@ -492,9 +478,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
492
478
  args: ['listboxOrientation']
493
479
  }], compareWith: [{
494
480
  type: Input
495
- }], _explicitPanel: [{
496
- type: Input,
497
- args: ['parentPanel']
498
481
  }] } });
499
482
 
500
483
  /**
@@ -507,10 +490,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
507
490
  const EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];
508
491
  class CdkListboxModule {
509
492
  }
510
- CdkListboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkListboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
511
- CdkListboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkListboxModule, declarations: [CdkListbox, CdkOption], exports: [CdkListbox, CdkOption] });
512
- CdkListboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkListboxModule });
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6", ngImport: i0, type: CdkListboxModule, decorators: [{
493
+ CdkListboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkListboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
494
+ CdkListboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkListboxModule, declarations: [CdkListbox, CdkOption], exports: [CdkListbox, CdkOption] });
495
+ CdkListboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkListboxModule });
496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.16", ngImport: i0, type: CdkListboxModule, decorators: [{
514
497
  type: NgModule,
515
498
  args: [{
516
499
  exports: EXPORTED_DECLARATIONS,
@@ -538,5 +521,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.6",
538
521
  * Generated bundle index. Do not edit.
539
522
  */
540
523
 
541
- export { CDK_LISTBOX_VALUE_ACCESSOR, CdkListbox, CdkListboxModule, CdkOption, PANEL };
524
+ export { CDK_LISTBOX_VALUE_ACCESSOR, CdkListbox, CdkListboxModule, CdkOption };
542
525
  //# sourceMappingURL=listbox.mjs.map