@angular/cdk-experimental 13.0.0-next.7 → 13.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/column-resize/column-resize-directives/column-resize-flex.d.ts +3 -0
  2. package/column-resize/column-resize-directives/column-resize.d.ts +3 -0
  3. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +3 -0
  4. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +3 -0
  5. package/column-resize/column-resize-module.d.ts +11 -7
  6. package/column-resize/column-resize-notifier.d.ts +5 -7
  7. package/column-resize/column-resize.d.ts +3 -0
  8. package/column-resize/column-resize_public_index.d.ts +4 -0
  9. package/column-resize/column-size-store.d.ts +3 -7
  10. package/column-resize/event-dispatcher.d.ts +3 -0
  11. package/column-resize/index.d.ts +5 -2
  12. package/column-resize/overlay-handle.d.ts +3 -0
  13. package/column-resize/package.json +6 -6
  14. package/column-resize/resizable.d.ts +3 -0
  15. package/column-resize/resize-strategy.d.ts +7 -0
  16. package/combobox/combobox-module.d.ts +8 -7
  17. package/combobox/combobox-panel.d.ts +5 -2
  18. package/combobox/combobox-popup.d.ts +3 -0
  19. package/combobox/combobox.d.ts +8 -5
  20. package/combobox/combobox_public_index.d.ts +4 -0
  21. package/combobox/index.d.ts +5 -1
  22. package/combobox/package.json +6 -6
  23. package/dialog/dialog-container.d.ts +4 -1
  24. package/dialog/dialog-module.d.ts +8 -7
  25. package/dialog/dialog.d.ts +3 -0
  26. package/dialog/dialog_public_index.d.ts +4 -0
  27. package/dialog/index.d.ts +5 -1
  28. package/dialog/package.json +6 -6
  29. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +42 -0
  30. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +42 -0
  31. package/{esm2015/column-resize/column-resize-directives/constants.js → esm2020/column-resize/column-resize-directives/constants.mjs} +0 -0
  32. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +48 -0
  33. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +48 -0
  34. package/esm2020/column-resize/column-resize-module.mjs +46 -0
  35. package/esm2020/column-resize/column-resize-notifier.mjs +52 -0
  36. package/esm2020/column-resize/column-resize.mjs +82 -0
  37. package/esm2020/column-resize/column-resize_public_index.mjs +5 -0
  38. package/esm2020/column-resize/column-size-store.mjs +20 -0
  39. package/esm2020/column-resize/event-dispatcher.mjs +70 -0
  40. package/esm2020/column-resize/index.mjs +9 -0
  41. package/esm2020/column-resize/overlay-handle.mjs +146 -0
  42. package/{esm2015/column-resize/public-api.js → esm2020/column-resize/public-api.mjs} +0 -0
  43. package/esm2020/column-resize/resizable.mjs +195 -0
  44. package/{esm2015/column-resize/resize-ref.js → esm2020/column-resize/resize-ref.mjs} +1 -1
  45. package/esm2020/column-resize/resize-strategy.mjs +230 -0
  46. package/{esm2015/column-resize/selectors.js → esm2020/column-resize/selectors.mjs} +0 -0
  47. package/esm2020/combobox/combobox-module.mjs +28 -0
  48. package/esm2020/combobox/combobox-panel.mjs +48 -0
  49. package/esm2020/combobox/combobox-popup.mjs +83 -0
  50. package/esm2020/combobox/combobox.mjs +261 -0
  51. package/esm2020/combobox/combobox_public_index.mjs +5 -0
  52. package/esm2020/combobox/index.mjs +9 -0
  53. package/{esm2015/combobox/public-api.js → esm2020/combobox/public-api.mjs} +0 -0
  54. package/{esm2015/dialog/dialog-config.js → esm2020/dialog/dialog-config.mjs} +0 -0
  55. package/esm2020/dialog/dialog-container.mjs +310 -0
  56. package/esm2020/dialog/dialog-injectors.mjs +30 -0
  57. package/esm2020/dialog/dialog-module.mjs +57 -0
  58. package/esm2020/dialog/dialog-ref.mjs +116 -0
  59. package/esm2020/dialog/dialog.mjs +252 -0
  60. package/esm2020/dialog/dialog_public_index.mjs +5 -0
  61. package/esm2020/dialog/index.mjs +9 -0
  62. package/{esm2015/dialog/public-api.js → esm2020/dialog/public-api.mjs} +0 -0
  63. package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  64. package/esm2020/listbox/index.mjs +9 -0
  65. package/esm2020/listbox/listbox-module.mjs +24 -0
  66. package/esm2020/listbox/listbox.mjs +499 -0
  67. package/esm2020/listbox/listbox_public_index.mjs +5 -0
  68. package/{esm2015/listbox/public-api.js → esm2020/listbox/public-api.mjs} +0 -0
  69. package/esm2020/menu/context-menu.mjs +287 -0
  70. package/esm2020/menu/index.mjs +9 -0
  71. package/esm2020/menu/menu-aim.mjs +199 -0
  72. package/esm2020/menu/menu-bar.mjs +272 -0
  73. package/{esm2015/menu/menu-errors.js → esm2020/menu/menu-errors.mjs} +1 -1
  74. package/esm2020/menu/menu-group.mjs +68 -0
  75. package/{esm2015/menu/menu-interface.js → esm2020/menu/menu-interface.mjs} +0 -0
  76. package/esm2020/menu/menu-item-checkbox.mjs +48 -0
  77. package/esm2020/menu/menu-item-radio.mjs +90 -0
  78. package/esm2020/menu/menu-item-selectable.mjs +57 -0
  79. package/esm2020/menu/menu-item-trigger.mjs +361 -0
  80. package/esm2020/menu/menu-item.mjs +291 -0
  81. package/esm2020/menu/menu-module.mjs +64 -0
  82. package/esm2020/menu/menu-panel.mjs +37 -0
  83. package/{esm2015/menu/menu-stack.js → esm2020/menu/menu-stack.mjs} +0 -0
  84. package/esm2020/menu/menu.mjs +316 -0
  85. package/esm2020/menu/menu_public_index.mjs +5 -0
  86. package/{esm2015/menu/pointer-focus-tracker.js → esm2020/menu/pointer-focus-tracker.mjs} +1 -1
  87. package/{esm2015/menu/public-api.js → esm2020/menu/public-api.mjs} +0 -0
  88. package/{esm2015/popover-edit/constants.js → esm2020/popover-edit/constants.mjs} +0 -0
  89. package/esm2020/popover-edit/edit-event-dispatcher.mjs +215 -0
  90. package/esm2020/popover-edit/edit-ref.mjs +84 -0
  91. package/esm2020/popover-edit/edit-services.mjs +48 -0
  92. package/esm2020/popover-edit/focus-dispatcher.mjs +82 -0
  93. package/esm2020/popover-edit/focus-escape-notifier.mjs +63 -0
  94. package/{esm2015/popover-edit/form-value-container.js → esm2020/popover-edit/form-value-container.mjs} +0 -0
  95. package/esm2020/popover-edit/index.mjs +9 -0
  96. package/esm2020/popover-edit/lens-directives.mjs +210 -0
  97. package/esm2020/popover-edit/polyfill.mjs +37 -0
  98. package/esm2020/popover-edit/popover-edit-module.mjs +62 -0
  99. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +76 -0
  100. package/esm2020/popover-edit/popover-edit_public_index.mjs +5 -0
  101. package/{esm2015/popover-edit/public-api.js → esm2020/popover-edit/public-api.mjs} +0 -0
  102. package/esm2020/popover-edit/table-directives.mjs +400 -0
  103. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  104. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +421 -0
  105. package/esm2020/scrolling/index.mjs +9 -0
  106. package/{esm2015/scrolling/public-api.js → esm2020/scrolling/public-api.mjs} +0 -0
  107. package/esm2020/scrolling/scrolling-module.mjs +23 -0
  108. package/esm2020/scrolling/scrolling_public_index.mjs +5 -0
  109. package/esm2020/selection/index.mjs +9 -0
  110. package/{esm2015/selection/public-api.js → esm2020/selection/public-api.mjs} +0 -0
  111. package/esm2020/selection/row-selection.mjs +49 -0
  112. package/esm2020/selection/select-all.mjs +109 -0
  113. package/esm2020/selection/selection-column.mjs +134 -0
  114. package/esm2020/selection/selection-module.mjs +40 -0
  115. package/{esm2015/selection/selection-set.js → esm2020/selection/selection-set.mjs} +1 -1
  116. package/esm2020/selection/selection-toggle.mjs +101 -0
  117. package/esm2020/selection/selection.mjs +186 -0
  118. package/esm2020/selection/selection_public_index.mjs +5 -0
  119. package/esm2020/table-scroll-container/index.mjs +9 -0
  120. package/{esm2015/table-scroll-container/public-api.js → esm2020/table-scroll-container/public-api.mjs} +0 -0
  121. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +23 -0
  122. package/esm2020/table-scroll-container/table-scroll-container.mjs +131 -0
  123. package/esm2020/table-scroll-container/table-scroll-container_public_index.mjs +5 -0
  124. package/{esm2015/version.js → esm2020/version.mjs} +1 -1
  125. package/fesm2015/{cdk-experimental.js → cdk-experimental.mjs} +2 -2
  126. package/fesm2015/cdk-experimental.mjs.map +1 -0
  127. package/fesm2015/{column-resize.js → column-resize.mjs} +213 -175
  128. package/fesm2015/column-resize.mjs.map +1 -0
  129. package/fesm2015/{combobox.js → combobox.mjs} +134 -102
  130. package/fesm2015/combobox.mjs.map +1 -0
  131. package/fesm2015/dialog.mjs +813 -0
  132. package/fesm2015/dialog.mjs.map +1 -0
  133. package/fesm2015/{listbox.js → listbox.mjs} +128 -91
  134. package/fesm2015/listbox.mjs.map +1 -0
  135. package/fesm2015/{menu.js → menu.mjs} +576 -397
  136. package/fesm2015/menu.mjs.map +1 -0
  137. package/fesm2015/{popover-edit.js → popover-edit.mjs} +257 -230
  138. package/fesm2015/popover-edit.mjs.map +1 -0
  139. package/fesm2015/{scrolling.js → scrolling.mjs} +66 -36
  140. package/fesm2015/scrolling.mjs.map +1 -0
  141. package/fesm2015/selection.mjs +693 -0
  142. package/fesm2015/selection.mjs.map +1 -0
  143. package/fesm2015/{table-scroll-container.js → table-scroll-container.mjs} +43 -30
  144. package/fesm2015/table-scroll-container.mjs.map +1 -0
  145. package/fesm2020/cdk-experimental.mjs +30 -0
  146. package/fesm2020/cdk-experimental.mjs.map +1 -0
  147. package/fesm2020/column-resize.mjs +1016 -0
  148. package/fesm2020/column-resize.mjs.map +1 -0
  149. package/fesm2020/combobox.mjs +430 -0
  150. package/fesm2020/combobox.mjs.map +1 -0
  151. package/{fesm2015/dialog.js → fesm2020/dialog.mjs} +156 -104
  152. package/fesm2020/dialog.mjs.map +1 -0
  153. package/fesm2020/listbox.mjs +541 -0
  154. package/fesm2020/listbox.mjs.map +1 -0
  155. package/fesm2020/menu.mjs +2202 -0
  156. package/fesm2020/menu.mjs.map +1 -0
  157. package/fesm2020/popover-edit.mjs +1289 -0
  158. package/fesm2020/popover-edit.mjs.map +1 -0
  159. package/fesm2020/scrolling.mjs +464 -0
  160. package/fesm2020/scrolling.mjs.map +1 -0
  161. package/{fesm2015/selection.js → fesm2020/selection.mjs} +195 -107
  162. package/fesm2020/selection.mjs.map +1 -0
  163. package/fesm2020/table-scroll-container.mjs +173 -0
  164. package/fesm2020/table-scroll-container.mjs.map +1 -0
  165. package/listbox/index.d.ts +5 -1
  166. package/listbox/listbox-module.d.ts +5 -7
  167. package/listbox/listbox.d.ts +5 -0
  168. package/listbox/listbox_public_index.d.ts +4 -0
  169. package/listbox/package.json +6 -6
  170. package/menu/context-menu.d.ts +5 -0
  171. package/menu/index.d.ts +5 -3
  172. package/menu/menu-aim.d.ts +5 -0
  173. package/menu/menu-bar.d.ts +3 -0
  174. package/menu/menu-group.d.ts +3 -0
  175. package/menu/menu-item-checkbox.d.ts +3 -7
  176. package/menu/menu-item-radio.d.ts +3 -0
  177. package/menu/menu-item-selectable.d.ts +3 -0
  178. package/menu/menu-item-trigger.d.ts +3 -0
  179. package/menu/menu-item.d.ts +3 -0
  180. package/menu/menu-module.d.ts +15 -7
  181. package/menu/menu-panel.d.ts +3 -0
  182. package/menu/menu.d.ts +3 -0
  183. package/menu/menu_public_index.d.ts +4 -0
  184. package/menu/package.json +6 -6
  185. package/package.json +94 -8
  186. package/popover-edit/edit-event-dispatcher.d.ts +3 -0
  187. package/popover-edit/edit-ref.d.ts +3 -0
  188. package/popover-edit/edit-services.d.ts +3 -0
  189. package/popover-edit/focus-dispatcher.d.ts +3 -0
  190. package/popover-edit/focus-escape-notifier.d.ts +3 -0
  191. package/popover-edit/index.d.ts +5 -3
  192. package/popover-edit/lens-directives.d.ts +7 -0
  193. package/popover-edit/package.json +6 -6
  194. package/popover-edit/popover-edit-module.d.ts +7 -7
  195. package/popover-edit/popover-edit-position-strategy-factory.d.ts +5 -0
  196. package/popover-edit/popover-edit_public_index.d.ts +4 -0
  197. package/popover-edit/table-directives.d.ts +11 -0
  198. package/scrolling/auto-size-virtual-scroll.d.ts +3 -0
  199. package/scrolling/index.d.ts +5 -1
  200. package/scrolling/package.json +6 -6
  201. package/scrolling/scrolling-module.d.ts +5 -7
  202. package/scrolling/scrolling_public_index.d.ts +4 -0
  203. package/selection/index.d.ts +5 -1
  204. package/selection/package.json +6 -6
  205. package/selection/row-selection.d.ts +3 -0
  206. package/selection/select-all.d.ts +3 -0
  207. package/selection/selection-column.d.ts +3 -0
  208. package/selection/selection-module.d.ts +11 -7
  209. package/selection/selection-toggle.d.ts +3 -0
  210. package/selection/selection.d.ts +3 -0
  211. package/selection/selection_public_index.d.ts +4 -0
  212. package/table-scroll-container/index.d.ts +5 -1
  213. package/table-scroll-container/package.json +6 -6
  214. package/table-scroll-container/table-scroll-container-module.d.ts +5 -7
  215. package/table-scroll-container/table-scroll-container.d.ts +3 -0
  216. package/table-scroll-container/table-scroll-container_public_index.d.ts +4 -0
  217. package/bundles/cdk-experimental-column-resize.umd.js +0 -1324
  218. package/bundles/cdk-experimental-column-resize.umd.js.map +0 -1
  219. package/bundles/cdk-experimental-combobox.umd.js +0 -443
  220. package/bundles/cdk-experimental-combobox.umd.js.map +0 -1
  221. package/bundles/cdk-experimental-dialog.umd.js +0 -1113
  222. package/bundles/cdk-experimental-dialog.umd.js.map +0 -1
  223. package/bundles/cdk-experimental-listbox.umd.js +0 -935
  224. package/bundles/cdk-experimental-listbox.umd.js.map +0 -1
  225. package/bundles/cdk-experimental-menu.umd.js +0 -2461
  226. package/bundles/cdk-experimental-menu.umd.js.map +0 -1
  227. package/bundles/cdk-experimental-popover-edit.umd.js +0 -1679
  228. package/bundles/cdk-experimental-popover-edit.umd.js.map +0 -1
  229. package/bundles/cdk-experimental-scrolling.umd.js +0 -459
  230. package/bundles/cdk-experimental-scrolling.umd.js.map +0 -1
  231. package/bundles/cdk-experimental-selection.umd.js +0 -961
  232. package/bundles/cdk-experimental-selection.umd.js.map +0 -1
  233. package/bundles/cdk-experimental-table-scroll-container.umd.js +0 -499
  234. package/bundles/cdk-experimental-table-scroll-container.umd.js.map +0 -1
  235. package/bundles/cdk-experimental.umd.js +0 -38
  236. package/bundles/cdk-experimental.umd.js.map +0 -1
  237. package/column-resize/index.metadata.json +0 -1
  238. package/combobox/index.metadata.json +0 -1
  239. package/dialog/index.metadata.json +0 -1
  240. package/esm2015/cdk-experimental.externs.js +0 -0
  241. package/esm2015/column-resize/column-resize-directives/column-resize-flex.js +0 -46
  242. package/esm2015/column-resize/column-resize-directives/column-resize.js +0 -46
  243. package/esm2015/column-resize/column-resize-directives/default-enabled-column-resize-flex.js +0 -46
  244. package/esm2015/column-resize/column-resize-directives/default-enabled-column-resize.js +0 -46
  245. package/esm2015/column-resize/column-resize-module.js +0 -37
  246. package/esm2015/column-resize/column-resize-notifier.js +0 -45
  247. package/esm2015/column-resize/column-resize.externs.js +0 -6
  248. package/esm2015/column-resize/column-resize.js +0 -71
  249. package/esm2015/column-resize/column-size-store.js +0 -17
  250. package/esm2015/column-resize/event-dispatcher.js +0 -70
  251. package/esm2015/column-resize/index.js +0 -6
  252. package/esm2015/column-resize/overlay-handle.js +0 -139
  253. package/esm2015/column-resize/resizable.js +0 -185
  254. package/esm2015/column-resize/resize-strategy.js +0 -227
  255. package/esm2015/combobox/combobox-module.js +0 -23
  256. package/esm2015/combobox/combobox-panel.js +0 -55
  257. package/esm2015/combobox/combobox-popup.js +0 -74
  258. package/esm2015/combobox/combobox.externs.js +0 -6
  259. package/esm2015/combobox/combobox.js +0 -248
  260. package/esm2015/combobox/index.js +0 -5
  261. package/esm2015/dialog/dialog-container.js +0 -289
  262. package/esm2015/dialog/dialog-injectors.js +0 -30
  263. package/esm2015/dialog/dialog-module.js +0 -47
  264. package/esm2015/dialog/dialog-ref.js +0 -115
  265. package/esm2015/dialog/dialog.externs.js +0 -6
  266. package/esm2015/dialog/dialog.js +0 -238
  267. package/esm2015/dialog/index.js +0 -5
  268. package/esm2015/listbox/index.js +0 -5
  269. package/esm2015/listbox/listbox-module.js +0 -19
  270. package/esm2015/listbox/listbox.externs.js +0 -6
  271. package/esm2015/listbox/listbox.js +0 -481
  272. package/esm2015/menu/context-menu.js +0 -280
  273. package/esm2015/menu/index.js +0 -6
  274. package/esm2015/menu/menu-aim.js +0 -195
  275. package/esm2015/menu/menu-bar.js +0 -252
  276. package/esm2015/menu/menu-group.js +0 -63
  277. package/esm2015/menu/menu-item-checkbox.js +0 -41
  278. package/esm2015/menu/menu-item-radio.js +0 -73
  279. package/esm2015/menu/menu-item-selectable.js +0 -51
  280. package/esm2015/menu/menu-item-trigger.js +0 -354
  281. package/esm2015/menu/menu-item.js +0 -253
  282. package/esm2015/menu/menu-module.js +0 -41
  283. package/esm2015/menu/menu-panel.js +0 -37
  284. package/esm2015/menu/menu.externs.js +0 -6
  285. package/esm2015/menu/menu.js +0 -293
  286. package/esm2015/popover-edit/edit-event-dispatcher.js +0 -215
  287. package/esm2015/popover-edit/edit-ref.js +0 -82
  288. package/esm2015/popover-edit/edit-services.js +0 -49
  289. package/esm2015/popover-edit/focus-dispatcher.js +0 -83
  290. package/esm2015/popover-edit/focus-escape-notifier.js +0 -64
  291. package/esm2015/popover-edit/index.js +0 -7
  292. package/esm2015/popover-edit/lens-directives.js +0 -199
  293. package/esm2015/popover-edit/polyfill.js +0 -35
  294. package/esm2015/popover-edit/popover-edit-module.js +0 -38
  295. package/esm2015/popover-edit/popover-edit-position-strategy-factory.js +0 -70
  296. package/esm2015/popover-edit/popover-edit.externs.js +0 -6
  297. package/esm2015/popover-edit/table-directives.js +0 -390
  298. package/esm2015/scrolling/auto-size-virtual-scroll.js +0 -403
  299. package/esm2015/scrolling/index.js +0 -5
  300. package/esm2015/scrolling/scrolling-module.js +0 -18
  301. package/esm2015/scrolling/scrolling.externs.js +0 -6
  302. package/esm2015/selection/index.js +0 -5
  303. package/esm2015/selection/row-selection.js +0 -41
  304. package/esm2015/selection/select-all.js +0 -96
  305. package/esm2015/selection/selection-column.js +0 -93
  306. package/esm2015/selection/selection-module.js +0 -40
  307. package/esm2015/selection/selection-toggle.js +0 -82
  308. package/esm2015/selection/selection.externs.js +0 -6
  309. package/esm2015/selection/selection.js +0 -176
  310. package/esm2015/table-scroll-container/index.js +0 -5
  311. package/esm2015/table-scroll-container/table-scroll-container-module.js +0 -18
  312. package/esm2015/table-scroll-container/table-scroll-container.externs.js +0 -6
  313. package/esm2015/table-scroll-container/table-scroll-container.js +0 -133
  314. package/fesm2015/cdk-experimental.js.map +0 -1
  315. package/fesm2015/column-resize.js.map +0 -1
  316. package/fesm2015/combobox.js.map +0 -1
  317. package/fesm2015/dialog.js.map +0 -1
  318. package/fesm2015/listbox.js.map +0 -1
  319. package/fesm2015/menu.js.map +0 -1
  320. package/fesm2015/popover-edit.js.map +0 -1
  321. package/fesm2015/scrolling.js.map +0 -1
  322. package/fesm2015/selection.js.map +0 -1
  323. package/fesm2015/table-scroll-container.js.map +0 -1
  324. package/listbox/index.metadata.json +0 -1
  325. package/menu/index.metadata.json +0 -1
  326. package/popover-edit/index.metadata.json +0 -1
  327. package/scrolling/index.metadata.json +0 -1
  328. package/selection/index.metadata.json +0 -1
  329. package/table-scroll-container/index.metadata.json +0 -1
@@ -0,0 +1,541 @@
1
+ import * as i0 from '@angular/core';
2
+ import { forwardRef, InjectionToken, EventEmitter, Directive, Inject, Input, Output, Optional, ContentChildren, NgModule } from '@angular/core';
3
+ import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
4
+ import { SPACE, ENTER, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW } from '@angular/cdk/keycodes';
5
+ import { coerceBooleanProperty, coerceArray } from '@angular/cdk/coercion';
6
+ import { SelectionModel } from '@angular/cdk/collections';
7
+ import { defer, merge, Subject } from 'rxjs';
8
+ import { startWith, switchMap, takeUntil } from 'rxjs/operators';
9
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
+ import * as i2 from '@angular/cdk-experimental/combobox';
11
+ import * as i1 from '@angular/cdk/bidi';
12
+
13
+ /**
14
+ * @license
15
+ * Copyright Google LLC All Rights Reserved.
16
+ *
17
+ * Use of this source code is governed by an MIT-style license that can be
18
+ * found in the LICENSE file at https://angular.io/license
19
+ */
20
+ let nextId = 0;
21
+ let listboxId = 0;
22
+ const CDK_LISTBOX_VALUE_ACCESSOR = {
23
+ provide: NG_VALUE_ACCESSOR,
24
+ useExisting: forwardRef(() => CdkListbox),
25
+ multi: true,
26
+ };
27
+ const PANEL = new InjectionToken('CdkComboboxPanel');
28
+ class CdkOption {
29
+ constructor(_elementRef, listbox) {
30
+ this._elementRef = _elementRef;
31
+ this.listbox = listbox;
32
+ this._selected = false;
33
+ this._disabled = false;
34
+ this._active = false;
35
+ /** The id of the option, set to a uniqueid if the user does not provide one. */
36
+ this.id = `cdk-option-${nextId++}`;
37
+ this.selectionChange = new EventEmitter();
38
+ }
39
+ get selected() {
40
+ return this._selected;
41
+ }
42
+ set selected(value) {
43
+ if (!this._disabled) {
44
+ this._selected = coerceBooleanProperty(value);
45
+ }
46
+ }
47
+ get disabled() {
48
+ return this._disabled;
49
+ }
50
+ set disabled(value) {
51
+ this._disabled = coerceBooleanProperty(value);
52
+ }
53
+ /** The form value of the option. */
54
+ get value() {
55
+ return this._value;
56
+ }
57
+ set value(value) {
58
+ if (this.selected && value !== this._value) {
59
+ this.deselect();
60
+ }
61
+ this._value = value;
62
+ }
63
+ /** Toggles the selected state, emits a change event through the injected listbox. */
64
+ toggle() {
65
+ if (!this._isInteractionDisabled()) {
66
+ this.selected = !this.selected;
67
+ this._emitSelectionChange(true);
68
+ }
69
+ }
70
+ /** Sets the active property true if the option and listbox aren't disabled. */
71
+ activate() {
72
+ if (!this._isInteractionDisabled()) {
73
+ this._active = true;
74
+ }
75
+ }
76
+ /** Sets the active property false. */
77
+ deactivate() {
78
+ if (!this._isInteractionDisabled()) {
79
+ this._active = false;
80
+ }
81
+ }
82
+ /** Sets the selected property true if it was false. */
83
+ select() {
84
+ if (!this.selected) {
85
+ this.selected = true;
86
+ this._emitSelectionChange();
87
+ }
88
+ }
89
+ /** Sets the selected property false if it was true. */
90
+ deselect() {
91
+ if (this.selected) {
92
+ this.selected = false;
93
+ this._emitSelectionChange();
94
+ }
95
+ }
96
+ /** Applies focus to the option. */
97
+ focus() {
98
+ this._elementRef.nativeElement.focus();
99
+ }
100
+ /** Returns true if the option or listbox are disabled, and false otherwise. */
101
+ _isInteractionDisabled() {
102
+ return this.listbox.disabled || this._disabled;
103
+ }
104
+ /** Emits a change event extending the Option Selection Change Event interface. */
105
+ _emitSelectionChange(isUserInput = false) {
106
+ this.selectionChange.emit({
107
+ source: this,
108
+ isUserInput: isUserInput,
109
+ });
110
+ }
111
+ /** Returns the tab index which depends on the disabled property. */
112
+ _getTabIndex() {
113
+ return this._isInteractionDisabled() ? null : '-1';
114
+ }
115
+ /** Get the label for this element which is required by the FocusableOption interface. */
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;
131
+ }
132
+ /** Sets the active property to true to enable the active css class. */
133
+ setActiveStyles() {
134
+ this._active = true;
135
+ }
136
+ /** Sets the active property to false to disable the active css class. */
137
+ setInactiveStyles() {
138
+ this._active = false;
139
+ }
140
+ }
141
+ CdkOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", 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: "13.0.0-next.15", 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: "13.0.0-next.15", ngImport: i0, type: CdkOption, decorators: [{
144
+ type: Directive,
145
+ args: [{
146
+ selector: '[cdkOption]',
147
+ exportAs: 'cdkOption',
148
+ host: {
149
+ 'role': 'option',
150
+ 'class': 'cdk-option',
151
+ '(click)': 'toggle()',
152
+ '(focus)': 'activate()',
153
+ '(blur)': 'deactivate()',
154
+ '[id]': 'id',
155
+ '[attr.aria-selected]': 'selected || null',
156
+ '[attr.tabindex]': '_getTabIndex()',
157
+ '[attr.aria-disabled]': '_isInteractionDisabled()',
158
+ '[class.cdk-option-disabled]': '_isInteractionDisabled()',
159
+ '[class.cdk-option-active]': '_active',
160
+ '[class.cdk-option-selected]': 'selected',
161
+ },
162
+ }]
163
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: CdkListbox, decorators: [{
164
+ type: Inject,
165
+ args: [forwardRef(() => CdkListbox)]
166
+ }] }]; }, propDecorators: { id: [{
167
+ type: Input
168
+ }], selected: [{
169
+ type: Input
170
+ }], disabled: [{
171
+ type: Input
172
+ }], value: [{
173
+ type: Input
174
+ }], selectionChange: [{
175
+ type: Output
176
+ }] } });
177
+ class CdkListbox {
178
+ constructor(_parentPanel, _dir) {
179
+ this._parentPanel = _parentPanel;
180
+ this._dir = _dir;
181
+ this._tabIndex = 0;
182
+ /** `View -> model callback called when select has been touched` */
183
+ this._onTouched = () => { };
184
+ /** `View -> model callback called when value changes` */
185
+ this._onChange = () => { };
186
+ this.optionSelectionChanges = defer(() => {
187
+ const options = this._options;
188
+ return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.selectionChange))));
189
+ });
190
+ this._disabled = false;
191
+ this._multiple = false;
192
+ this._useActiveDescendant = false;
193
+ this._autoFocus = true;
194
+ this._destroyed = new Subject();
195
+ this.selectionChange = new EventEmitter();
196
+ this.id = `cdk-listbox-${listboxId++}`;
197
+ /** Determines the orientation for the list key manager. Affects keyboard interaction. */
198
+ this.orientation = 'vertical';
199
+ this.compareWith = (a1, a2) => a1 === a2;
200
+ }
201
+ /**
202
+ * Whether the listbox allows multiple options to be selected.
203
+ * If `multiple` switches from `true` to `false`, all options are deselected.
204
+ */
205
+ get multiple() {
206
+ return this._multiple;
207
+ }
208
+ set multiple(value) {
209
+ this._updateSelectionOnMultiSelectionChange(value);
210
+ this._multiple = coerceBooleanProperty(value);
211
+ }
212
+ get disabled() {
213
+ return this._disabled;
214
+ }
215
+ set disabled(value) {
216
+ this._disabled = coerceBooleanProperty(value);
217
+ }
218
+ /** Whether the listbox will use active descendant or will move focus onto the options. */
219
+ get useActiveDescendant() {
220
+ return this._useActiveDescendant;
221
+ }
222
+ set useActiveDescendant(shouldUseActiveDescendant) {
223
+ this._useActiveDescendant = coerceBooleanProperty(shouldUseActiveDescendant);
224
+ }
225
+ /** Whether on focus the listbox will focus its active option, default to true. */
226
+ get autoFocus() {
227
+ return this._autoFocus;
228
+ }
229
+ set autoFocus(shouldAutoFocus) {
230
+ this._autoFocus = coerceBooleanProperty(shouldAutoFocus);
231
+ }
232
+ ngOnInit() {
233
+ this._selectionModel = new SelectionModel(this.multiple);
234
+ }
235
+ ngAfterContentInit() {
236
+ this._initKeyManager();
237
+ this._initSelectionModel();
238
+ this._registerWithPanel();
239
+ this.optionSelectionChanges.subscribe(event => {
240
+ this._emitChangeEvent(event.source);
241
+ this._updateSelectionModel(event.source);
242
+ this.setActiveOption(event.source);
243
+ this._updatePanelForSelection(event.source);
244
+ });
245
+ }
246
+ ngOnDestroy() {
247
+ this._listKeyManager.change.complete();
248
+ this._destroyed.next();
249
+ this._destroyed.complete();
250
+ }
251
+ _registerWithPanel() {
252
+ const panel = this._parentPanel || this._explicitPanel;
253
+ panel?._registerContent(this.id, 'listbox');
254
+ }
255
+ _initKeyManager() {
256
+ this._listKeyManager = new ActiveDescendantKeyManager(this._options)
257
+ .withWrap()
258
+ .withTypeAhead()
259
+ .withHomeAndEnd()
260
+ .withAllowedModifierKeys(['shiftKey']);
261
+ if (this.orientation === 'vertical') {
262
+ this._listKeyManager.withVerticalOrientation();
263
+ }
264
+ else {
265
+ this._listKeyManager.withHorizontalOrientation(this._dir?.value || 'ltr');
266
+ }
267
+ this._listKeyManager.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
268
+ this._updateActiveOption();
269
+ });
270
+ }
271
+ _initSelectionModel() {
272
+ this._selectionModel.changed
273
+ .pipe(takeUntil(this._destroyed))
274
+ .subscribe((event) => {
275
+ for (const option of event.added) {
276
+ option.selected = true;
277
+ }
278
+ for (const option of event.removed) {
279
+ option.selected = false;
280
+ }
281
+ });
282
+ }
283
+ _keydown(event) {
284
+ if (this._disabled) {
285
+ return;
286
+ }
287
+ const manager = this._listKeyManager;
288
+ const { keyCode } = event;
289
+ const previousActiveIndex = manager.activeItemIndex;
290
+ if (keyCode === SPACE || keyCode === ENTER) {
291
+ if (manager.activeItem && !manager.isTyping()) {
292
+ this._toggleActiveOption();
293
+ }
294
+ event.preventDefault();
295
+ }
296
+ else {
297
+ manager.onKeydown(event);
298
+ }
299
+ /** Will select an option if shift was pressed while navigating to the option */
300
+ const isArrow = keyCode === UP_ARROW ||
301
+ keyCode === DOWN_ARROW ||
302
+ keyCode === LEFT_ARROW ||
303
+ keyCode === RIGHT_ARROW;
304
+ if (isArrow && event.shiftKey && previousActiveIndex !== this._listKeyManager.activeItemIndex) {
305
+ this._toggleActiveOption();
306
+ }
307
+ }
308
+ /** Emits a selection change event, called when an option has its selected state changed. */
309
+ _emitChangeEvent(option) {
310
+ this.selectionChange.emit({
311
+ source: this,
312
+ option: option,
313
+ });
314
+ }
315
+ /** Updates the selection model after a toggle. */
316
+ _updateSelectionModel(option) {
317
+ if (!this.multiple && this._selectionModel.selected.length !== 0) {
318
+ const previouslySelected = this._selectionModel.selected[0];
319
+ this.deselect(previouslySelected);
320
+ }
321
+ option.selected ? this._selectionModel.select(option) : this._selectionModel.deselect(option);
322
+ }
323
+ _updatePanelForSelection(option) {
324
+ const panel = this._parentPanel || this._explicitPanel;
325
+ if (!this.multiple) {
326
+ option.selected ? panel?.closePanel(option.value) : panel?.closePanel();
327
+ }
328
+ else {
329
+ panel?.closePanel(this.getSelectedValues());
330
+ }
331
+ }
332
+ /** Toggles the selected state of the active option if not disabled. */
333
+ _toggleActiveOption() {
334
+ const activeOption = this._listKeyManager.activeItem;
335
+ if (activeOption && !activeOption.disabled) {
336
+ activeOption.toggle();
337
+ }
338
+ }
339
+ /** Returns the id of the active option if active descendant is being used. */
340
+ _getAriaActiveDescendant() {
341
+ return this._useActiveDescendant ? this._listKeyManager?.activeItem?.id : null;
342
+ }
343
+ /** Updates the activeOption and the active and focus properties of the option. */
344
+ _updateActiveOption() {
345
+ if (!this._listKeyManager.activeItem) {
346
+ return;
347
+ }
348
+ this._activeOption?.deactivate();
349
+ this._activeOption = this._listKeyManager.activeItem;
350
+ this._activeOption.activate();
351
+ if (!this.useActiveDescendant) {
352
+ this._activeOption.focus();
353
+ }
354
+ }
355
+ /** Updates selection states of options when the 'multiple' property changes. */
356
+ _updateSelectionOnMultiSelectionChange(value) {
357
+ if (this.multiple && !value) {
358
+ // Deselect all options instead of arbitrarily keeping one of the selected options.
359
+ this.setAllSelected(false);
360
+ }
361
+ else if (!this.multiple && value) {
362
+ this._selectionModel = new SelectionModel(value, this._selectionModel?.selected);
363
+ }
364
+ }
365
+ _focusActiveOption() {
366
+ if (!this.autoFocus) {
367
+ return;
368
+ }
369
+ if (this._listKeyManager.activeItem) {
370
+ this.setActiveOption(this._listKeyManager.activeItem);
371
+ }
372
+ else if (this._options.first) {
373
+ this.setActiveOption(this._options.first);
374
+ }
375
+ }
376
+ /** Selects the given option if the option and listbox aren't disabled. */
377
+ select(option) {
378
+ if (!this.disabled && !option.disabled) {
379
+ option.select();
380
+ }
381
+ }
382
+ /** Deselects the given option if the option and listbox aren't disabled. */
383
+ deselect(option) {
384
+ if (!this.disabled && !option.disabled) {
385
+ option.deselect();
386
+ }
387
+ }
388
+ /** Sets the selected state of all options to be the given value. */
389
+ setAllSelected(isSelected) {
390
+ for (const option of this._options.toArray()) {
391
+ isSelected ? this.select(option) : this.deselect(option);
392
+ }
393
+ }
394
+ /** Updates the key manager's active item to the given option. */
395
+ setActiveOption(option) {
396
+ this._listKeyManager.updateActiveItem(option);
397
+ this._updateActiveOption();
398
+ }
399
+ /**
400
+ * Saves a callback function to be invoked when the select's value
401
+ * changes from user input. Required to implement ControlValueAccessor.
402
+ */
403
+ registerOnChange(fn) {
404
+ this._onChange = fn;
405
+ }
406
+ /**
407
+ * Saves a callback function to be invoked when the select is blurred
408
+ * by the user. Required to implement ControlValueAccessor.
409
+ */
410
+ registerOnTouched(fn) {
411
+ this._onTouched = fn;
412
+ }
413
+ /** Sets the select's value. Required to implement ControlValueAccessor. */
414
+ writeValue(values) {
415
+ if (this._options) {
416
+ this._setSelectionByValue(values);
417
+ }
418
+ }
419
+ /** Disables the select. Required to implement ControlValueAccessor. */
420
+ setDisabledState(isDisabled) {
421
+ this.disabled = isDisabled;
422
+ }
423
+ /** Returns the values of the currently selected options. */
424
+ getSelectedValues() {
425
+ return this._options.filter(option => option.selected).map(option => option.value);
426
+ }
427
+ /** Selects an option that has the corresponding given value. */
428
+ _setSelectionByValue(values) {
429
+ for (const option of this._options.toArray()) {
430
+ this.deselect(option);
431
+ }
432
+ const valuesArray = coerceArray(values);
433
+ for (const value of valuesArray) {
434
+ const correspondingOption = this._options.find((option) => {
435
+ return option.value != null && this.compareWith(option.value, value);
436
+ });
437
+ if (correspondingOption) {
438
+ this.select(correspondingOption);
439
+ if (!this.multiple) {
440
+ return;
441
+ }
442
+ }
443
+ }
444
+ }
445
+ }
446
+ CdkListbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkListbox, deps: [{ token: PANEL, optional: true }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
447
+ CdkListbox.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.0-next.15", 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 });
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkListbox, decorators: [{
449
+ type: Directive,
450
+ args: [{
451
+ selector: '[cdkListbox]',
452
+ exportAs: 'cdkListbox',
453
+ host: {
454
+ 'role': 'listbox',
455
+ 'class': 'cdk-listbox',
456
+ '[id]': 'id',
457
+ '(focus)': '_focusActiveOption()',
458
+ '(keydown)': '_keydown($event)',
459
+ '[attr.tabindex]': '_tabIndex',
460
+ '[attr.aria-disabled]': 'disabled',
461
+ '[attr.aria-multiselectable]': 'multiple',
462
+ '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',
463
+ '[attr.aria-orientation]': 'orientation',
464
+ },
465
+ providers: [CDK_LISTBOX_VALUE_ACCESSOR],
466
+ }]
467
+ }], ctorParameters: function () { return [{ type: i2.CdkComboboxPanel, decorators: [{
468
+ type: Optional
469
+ }, {
470
+ type: Inject,
471
+ args: [PANEL]
472
+ }] }, { type: i1.Directionality, decorators: [{
473
+ type: Optional
474
+ }] }]; }, propDecorators: { _options: [{
475
+ type: ContentChildren,
476
+ args: [CdkOption, { descendants: true }]
477
+ }], selectionChange: [{
478
+ type: Output
479
+ }], id: [{
480
+ type: Input
481
+ }], multiple: [{
482
+ type: Input
483
+ }], disabled: [{
484
+ type: Input
485
+ }], useActiveDescendant: [{
486
+ type: Input
487
+ }], autoFocus: [{
488
+ type: Input
489
+ }], orientation: [{
490
+ type: Input,
491
+ args: ['listboxOrientation']
492
+ }], compareWith: [{
493
+ type: Input
494
+ }], _explicitPanel: [{
495
+ type: Input,
496
+ args: ['parentPanel']
497
+ }] } });
498
+
499
+ /**
500
+ * @license
501
+ * Copyright Google LLC All Rights Reserved.
502
+ *
503
+ * Use of this source code is governed by an MIT-style license that can be
504
+ * found in the LICENSE file at https://angular.io/license
505
+ */
506
+ const EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];
507
+ class CdkListboxModule {
508
+ }
509
+ CdkListboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkListboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
510
+ CdkListboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkListboxModule, declarations: [CdkListbox, CdkOption], exports: [CdkListbox, CdkOption] });
511
+ CdkListboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkListboxModule });
512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0-next.15", ngImport: i0, type: CdkListboxModule, decorators: [{
513
+ type: NgModule,
514
+ args: [{
515
+ exports: EXPORTED_DECLARATIONS,
516
+ declarations: EXPORTED_DECLARATIONS,
517
+ }]
518
+ }] });
519
+
520
+ /**
521
+ * @license
522
+ * Copyright Google LLC All Rights Reserved.
523
+ *
524
+ * Use of this source code is governed by an MIT-style license that can be
525
+ * found in the LICENSE file at https://angular.io/license
526
+ */
527
+
528
+ /**
529
+ * @license
530
+ * Copyright Google LLC All Rights Reserved.
531
+ *
532
+ * Use of this source code is governed by an MIT-style license that can be
533
+ * found in the LICENSE file at https://angular.io/license
534
+ */
535
+
536
+ /**
537
+ * Generated bundle index. Do not edit.
538
+ */
539
+
540
+ export { CDK_LISTBOX_VALUE_ACCESSOR, CdkListbox, CdkListboxModule, CdkOption, PANEL };
541
+ //# sourceMappingURL=listbox.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listbox.mjs","sources":["../../../../../../src/cdk-experimental/listbox/listbox.ts","../../../../../../src/cdk-experimental/listbox/listbox-module.ts","../../../../../../src/cdk-experimental/listbox/public-api.ts","../../../../../../src/cdk-experimental/listbox/index.ts","../../../../../../src/cdk-experimental/listbox/listbox_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\nimport {\n AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n} from '@angular/core';\nimport {ActiveDescendantKeyManager, Highlightable, ListKeyManagerOption} from '@angular/cdk/a11y';\nimport {DOWN_ARROW, ENTER, SPACE, UP_ARROW, LEFT_ARROW, RIGHT_ARROW} from '@angular/cdk/keycodes';\nimport {BooleanInput, coerceBooleanProperty, coerceArray} from '@angular/cdk/coercion';\nimport {SelectionChange, SelectionModel} from '@angular/cdk/collections';\nimport {defer, merge, Observable, Subject} from 'rxjs';\nimport {startWith, switchMap, takeUntil} from 'rxjs/operators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {CdkComboboxPanel} from '@angular/cdk-experimental/combobox';\nimport {Directionality} from '@angular/cdk/bidi';\n\nlet nextId = 0;\nlet listboxId = 0;\n\nexport const CDK_LISTBOX_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CdkListbox),\n multi: true,\n};\n\nexport const PANEL = new InjectionToken<CdkComboboxPanel>('CdkComboboxPanel');\n\n@Directive({\n selector: '[cdkOption]',\n exportAs: 'cdkOption',\n host: {\n 'role': 'option',\n 'class': 'cdk-option',\n '(click)': 'toggle()',\n '(focus)': 'activate()',\n '(blur)': 'deactivate()',\n '[id]': 'id',\n '[attr.aria-selected]': 'selected || null',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': '_isInteractionDisabled()',\n '[class.cdk-option-disabled]': '_isInteractionDisabled()',\n '[class.cdk-option-active]': '_active',\n '[class.cdk-option-selected]': 'selected',\n },\n})\nexport class CdkOption<T = unknown> implements ListKeyManagerOption, Highlightable {\n private _selected: boolean = false;\n private _disabled: boolean = false;\n private _value: T;\n _active: boolean = false;\n\n /** The id of the option, set to a uniqueid if the user does not provide one. */\n @Input() id = `cdk-option-${nextId++}`;\n\n @Input()\n get selected(): boolean {\n return this._selected;\n }\n set selected(value: boolean) {\n if (!this._disabled) {\n this._selected = coerceBooleanProperty(value);\n }\n }\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n\n /** The form value of the option. */\n @Input()\n get value(): T {\n return this._value;\n }\n set value(value: T) {\n if (this.selected && value !== this._value) {\n this.deselect();\n }\n this._value = value;\n }\n\n @Output() readonly selectionChange = new EventEmitter<OptionSelectionChangeEvent<T>>();\n\n constructor(\n private readonly _elementRef: ElementRef,\n @Inject(forwardRef(() => CdkListbox)) readonly listbox: CdkListbox<T>,\n ) {}\n\n /** Toggles the selected state, emits a change event through the injected listbox. */\n toggle() {\n if (!this._isInteractionDisabled()) {\n this.selected = !this.selected;\n this._emitSelectionChange(true);\n }\n }\n\n /** Sets the active property true if the option and listbox aren't disabled. */\n activate() {\n if (!this._isInteractionDisabled()) {\n this._active = true;\n }\n }\n\n /** Sets the active property false. */\n deactivate() {\n if (!this._isInteractionDisabled()) {\n this._active = false;\n }\n }\n\n /** Sets the selected property true if it was false. */\n select() {\n if (!this.selected) {\n this.selected = true;\n this._emitSelectionChange();\n }\n }\n\n /** Sets the selected property false if it was true. */\n deselect() {\n if (this.selected) {\n this.selected = false;\n this._emitSelectionChange();\n }\n }\n\n /** Applies focus to the option. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n\n /** Returns true if the option or listbox are disabled, and false otherwise. */\n _isInteractionDisabled(): boolean {\n return this.listbox.disabled || this._disabled;\n }\n\n /** Emits a change event extending the Option Selection Change Event interface. */\n private _emitSelectionChange(isUserInput = false) {\n this.selectionChange.emit({\n source: this,\n isUserInput: isUserInput,\n });\n }\n\n /** Returns the tab index which depends on the disabled property. */\n _getTabIndex(): string | null {\n return this._isInteractionDisabled() ? null : '-1';\n }\n\n /** Get the label for this element which is required by the FocusableOption interface. */\n getLabel() {\n // we know that the current node is an element type\n const clone = this._elementRef.nativeElement.cloneNode(true) as Element;\n this._removeIcons(clone);\n\n return clone.textContent?.trim() || '';\n }\n\n /** Remove any child from the given element which can be identified as an icon. */\n private _removeIcons(element: Element) {\n // TODO: make this a configurable function that can removed any desired type of node.\n for (const icon of Array.from(element.querySelectorAll('mat-icon, .material-icons'))) {\n icon.remove();\n }\n }\n\n getElementRef() {\n return this._elementRef;\n }\n\n /** Sets the active property to true to enable the active css class. */\n setActiveStyles() {\n this._active = true;\n }\n\n /** Sets the active property to false to disable the active css class. */\n setInactiveStyles() {\n this._active = false;\n }\n\n static ngAcceptInputType_selected: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n\n@Directive({\n selector: '[cdkListbox]',\n exportAs: 'cdkListbox',\n host: {\n 'role': 'listbox',\n 'class': 'cdk-listbox',\n '[id]': 'id',\n '(focus)': '_focusActiveOption()',\n '(keydown)': '_keydown($event)',\n '[attr.tabindex]': '_tabIndex',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-multiselectable]': 'multiple',\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n '[attr.aria-orientation]': 'orientation',\n },\n providers: [CDK_LISTBOX_VALUE_ACCESSOR],\n})\nexport class CdkListbox<T> implements AfterContentInit, OnDestroy, OnInit, ControlValueAccessor {\n _listKeyManager: ActiveDescendantKeyManager<CdkOption<T>>;\n _selectionModel: SelectionModel<CdkOption<T>>;\n _tabIndex = 0;\n\n /** `View -> model callback called when select has been touched` */\n _onTouched: () => void = () => {};\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: T) => void = () => {};\n\n readonly optionSelectionChanges: Observable<OptionSelectionChangeEvent<T>> = defer(() => {\n const options = this._options;\n\n return options.changes.pipe(\n startWith(options),\n switchMap(() => merge(...options.map(option => option.selectionChange))),\n );\n }) as Observable<OptionSelectionChangeEvent<T>>;\n\n private _disabled: boolean = false;\n private _multiple: boolean = false;\n private _useActiveDescendant: boolean = false;\n private _autoFocus: boolean = true;\n private _activeOption: CdkOption<T>;\n private readonly _destroyed = new Subject<void>();\n\n @ContentChildren(CdkOption, {descendants: true}) _options: QueryList<CdkOption<T>>;\n\n @Output() readonly selectionChange = new EventEmitter<ListboxSelectionChangeEvent<T>>();\n\n @Input() id = `cdk-listbox-${listboxId++}`;\n\n /**\n * Whether the listbox allows multiple options to be selected.\n * If `multiple` switches from `true` to `false`, all options are deselected.\n */\n @Input()\n get multiple(): boolean {\n return this._multiple;\n }\n set multiple(value: boolean) {\n this._updateSelectionOnMultiSelectionChange(value);\n this._multiple = coerceBooleanProperty(value);\n }\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n }\n\n /** Whether the listbox will use active descendant or will move focus onto the options. */\n @Input()\n get useActiveDescendant(): boolean {\n return this._useActiveDescendant;\n }\n set useActiveDescendant(shouldUseActiveDescendant: boolean) {\n this._useActiveDescendant = coerceBooleanProperty(shouldUseActiveDescendant);\n }\n\n /** Whether on focus the listbox will focus its active option, default to true. */\n @Input()\n get autoFocus(): boolean {\n return this._autoFocus;\n }\n set autoFocus(shouldAutoFocus: boolean) {\n this._autoFocus = coerceBooleanProperty(shouldAutoFocus);\n }\n\n /** Determines the orientation for the list key manager. Affects keyboard interaction. */\n @Input('listboxOrientation') orientation: 'horizontal' | 'vertical' = 'vertical';\n\n @Input() compareWith: (o1: T, o2: T) => boolean = (a1, a2) => a1 === a2;\n\n @Input('parentPanel') private readonly _explicitPanel: CdkComboboxPanel;\n\n constructor(\n @Optional() @Inject(PANEL) readonly _parentPanel?: CdkComboboxPanel<T>,\n @Optional() private readonly _dir?: Directionality,\n ) {}\n\n ngOnInit() {\n this._selectionModel = new SelectionModel<CdkOption<T>>(this.multiple);\n }\n\n ngAfterContentInit() {\n this._initKeyManager();\n this._initSelectionModel();\n this._registerWithPanel();\n\n this.optionSelectionChanges.subscribe(event => {\n this._emitChangeEvent(event.source);\n this._updateSelectionModel(event.source);\n this.setActiveOption(event.source);\n this._updatePanelForSelection(event.source);\n });\n }\n\n ngOnDestroy() {\n this._listKeyManager.change.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n private _registerWithPanel(): void {\n const panel = this._parentPanel || this._explicitPanel;\n panel?._registerContent(this.id, 'listbox');\n }\n\n private _initKeyManager() {\n this._listKeyManager = new ActiveDescendantKeyManager(this._options)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd()\n .withAllowedModifierKeys(['shiftKey']);\n\n if (this.orientation === 'vertical') {\n this._listKeyManager.withVerticalOrientation();\n } else {\n this._listKeyManager.withHorizontalOrientation(this._dir?.value || 'ltr');\n }\n\n this._listKeyManager.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._updateActiveOption();\n });\n }\n\n private _initSelectionModel() {\n this._selectionModel.changed\n .pipe(takeUntil(this._destroyed))\n .subscribe((event: SelectionChange<CdkOption<T>>) => {\n for (const option of event.added) {\n option.selected = true;\n }\n\n for (const option of event.removed) {\n option.selected = false;\n }\n });\n }\n\n _keydown(event: KeyboardEvent) {\n if (this._disabled) {\n return;\n }\n\n const manager = this._listKeyManager;\n const {keyCode} = event;\n const previousActiveIndex = manager.activeItemIndex;\n\n if (keyCode === SPACE || keyCode === ENTER) {\n if (manager.activeItem && !manager.isTyping()) {\n this._toggleActiveOption();\n }\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n\n /** Will select an option if shift was pressed while navigating to the option */\n const isArrow =\n keyCode === UP_ARROW ||\n keyCode === DOWN_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW;\n if (isArrow && event.shiftKey && previousActiveIndex !== this._listKeyManager.activeItemIndex) {\n this._toggleActiveOption();\n }\n }\n\n /** Emits a selection change event, called when an option has its selected state changed. */\n _emitChangeEvent(option: CdkOption<T>) {\n this.selectionChange.emit({\n source: this,\n option: option,\n });\n }\n\n /** Updates the selection model after a toggle. */\n _updateSelectionModel(option: CdkOption<T>) {\n if (!this.multiple && this._selectionModel.selected.length !== 0) {\n const previouslySelected = this._selectionModel.selected[0];\n this.deselect(previouslySelected);\n }\n\n option.selected ? this._selectionModel.select(option) : this._selectionModel.deselect(option);\n }\n\n _updatePanelForSelection(option: CdkOption<T>) {\n const panel = this._parentPanel || this._explicitPanel;\n if (!this.multiple) {\n option.selected ? panel?.closePanel(option.value) : panel?.closePanel();\n } else {\n panel?.closePanel(this.getSelectedValues());\n }\n }\n\n /** Toggles the selected state of the active option if not disabled. */\n private _toggleActiveOption() {\n const activeOption = this._listKeyManager.activeItem;\n if (activeOption && !activeOption.disabled) {\n activeOption.toggle();\n }\n }\n\n /** Returns the id of the active option if active descendant is being used. */\n _getAriaActiveDescendant(): string | null | undefined {\n return this._useActiveDescendant ? this._listKeyManager?.activeItem?.id : null;\n }\n\n /** Updates the activeOption and the active and focus properties of the option. */\n private _updateActiveOption() {\n if (!this._listKeyManager.activeItem) {\n return;\n }\n\n this._activeOption?.deactivate();\n this._activeOption = this._listKeyManager.activeItem;\n this._activeOption.activate();\n\n if (!this.useActiveDescendant) {\n this._activeOption.focus();\n }\n }\n\n /** Updates selection states of options when the 'multiple' property changes. */\n private _updateSelectionOnMultiSelectionChange(value: boolean) {\n if (this.multiple && !value) {\n // Deselect all options instead of arbitrarily keeping one of the selected options.\n this.setAllSelected(false);\n } else if (!this.multiple && value) {\n this._selectionModel = new SelectionModel<CdkOption<T>>(\n value,\n this._selectionModel?.selected,\n );\n }\n }\n\n _focusActiveOption() {\n if (!this.autoFocus) {\n return;\n }\n\n if (this._listKeyManager.activeItem) {\n this.setActiveOption(this._listKeyManager.activeItem);\n } else if (this._options.first) {\n this.setActiveOption(this._options.first);\n }\n }\n\n /** Selects the given option if the option and listbox aren't disabled. */\n select(option: CdkOption<T>) {\n if (!this.disabled && !option.disabled) {\n option.select();\n }\n }\n\n /** Deselects the given option if the option and listbox aren't disabled. */\n deselect(option: CdkOption<T>) {\n if (!this.disabled && !option.disabled) {\n option.deselect();\n }\n }\n\n /** Sets the selected state of all options to be the given value. */\n setAllSelected(isSelected: boolean) {\n for (const option of this._options.toArray()) {\n isSelected ? this.select(option) : this.deselect(option);\n }\n }\n\n /** Updates the key manager's active item to the given option. */\n setActiveOption(option: CdkOption<T>) {\n this._listKeyManager.updateActiveItem(option);\n this._updateActiveOption();\n }\n\n /**\n * Saves a callback function to be invoked when the select's value\n * changes from user input. Required to implement ControlValueAccessor.\n */\n registerOnChange(fn: (value: T) => void): void {\n this._onChange = fn;\n }\n\n /**\n * Saves a callback function to be invoked when the select is blurred\n * by the user. Required to implement ControlValueAccessor.\n */\n registerOnTouched(fn: () => {}): void {\n this._onTouched = fn;\n }\n\n /** Sets the select's value. Required to implement ControlValueAccessor. */\n writeValue(values: T | T[]): void {\n if (this._options) {\n this._setSelectionByValue(values);\n }\n }\n\n /** Disables the select. Required to implement ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Returns the values of the currently selected options. */\n getSelectedValues(): T[] {\n return this._options.filter(option => option.selected).map(option => option.value);\n }\n\n /** Selects an option that has the corresponding given value. */\n private _setSelectionByValue(values: T | T[]) {\n for (const option of this._options.toArray()) {\n this.deselect(option);\n }\n\n const valuesArray = coerceArray(values);\n for (const value of valuesArray) {\n const correspondingOption = this._options.find((option: CdkOption<T>) => {\n return option.value != null && this.compareWith(option.value, value);\n });\n\n if (correspondingOption) {\n this.select(correspondingOption);\n if (!this.multiple) {\n return;\n }\n }\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\n static ngAcceptInputType_useActiveDescendant: BooleanInput;\n static ngAcceptInputType_autoFocus: BooleanInput;\n}\n\n/** Change event that is being fired whenever the selected state of an option changes. */\nexport interface ListboxSelectionChangeEvent<T> {\n /** Reference to the listbox that emitted the event. */\n readonly source: CdkListbox<T>;\n\n /** Reference to the option that has been changed. */\n readonly option: CdkOption<T>;\n}\n\n/** Event object emitted by MatOption when selected or deselected. */\nexport interface OptionSelectionChangeEvent<T> {\n /** Reference to the option that emitted the event. */\n source: CdkOption<T>;\n\n /** Whether the change in the option's value was a result of a user action. */\n isUserInput: boolean;\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 {CdkListbox, CdkOption} from './listbox';\n\nconst EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];\n@NgModule({\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n})\nexport class CdkListboxModule {}\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 './listbox';\nexport * from './listbox-module';\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;;;;;;;AAkCA,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,IAAI,SAAS,GAAG,CAAC,CAAC;MAEL,0BAA0B,GAAQ;IAC7C,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,UAAU,CAAC;IACzC,KAAK,EAAE,IAAI;EACX;MAEW,KAAK,GAAG,IAAI,cAAc,CAAmB,kBAAkB,EAAE;MAoBjE,SAAS;IAyCpB,YACmB,WAAuB,EACO,OAAsB;QADpD,gBAAW,GAAX,WAAW,CAAY;QACO,YAAO,GAAP,OAAO,CAAe;QA1C/D,cAAS,GAAY,KAAK,CAAC;QAC3B,cAAS,GAAY,KAAK,CAAC;QAEnC,YAAO,GAAY,KAAK,CAAC;;QAGhB,OAAE,GAAG,cAAc,MAAM,EAAE,EAAE,CAAC;QAgCpB,oBAAe,GAAG,IAAI,YAAY,EAAiC,CAAC;KAKnF;IAnCJ,IACI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAI,QAAQ,CAAC,KAAc;QACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;SAC/C;KACF;IAED,IACI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAI,QAAQ,CAAC,KAAc;QACzB,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAA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