@angular/cdk 16.0.0-next.5 → 16.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 (412) hide show
  1. package/{esm2020 → esm2022}/a11y/a11y-module.mjs +4 -4
  2. package/{esm2020 → esm2022}/a11y/aria-describer/aria-describer.mjs +3 -3
  3. package/{esm2020 → esm2022}/a11y/focus-monitor/focus-monitor.mjs +5 -5
  4. package/{esm2020 → esm2022}/a11y/focus-trap/configurable-focus-trap-factory.mjs +3 -3
  5. package/{esm2020 → esm2022}/a11y/focus-trap/focus-trap-manager.mjs +3 -3
  6. package/{esm2020 → esm2022}/a11y/focus-trap/focus-trap.mjs +5 -5
  7. package/{esm2020 → esm2022}/a11y/high-contrast-mode/high-contrast-mode-detector.mjs +3 -3
  8. package/{esm2020 → esm2022}/a11y/input-modality/input-modality-detector.mjs +3 -3
  9. package/{esm2020 → esm2022}/a11y/interactivity-checker/interactivity-checker.mjs +3 -3
  10. package/{esm2020 → esm2022}/a11y/live-announcer/live-announcer.mjs +5 -5
  11. package/{esm2020 → esm2022}/accordion/accordion-item.mjs +7 -7
  12. package/{esm2020 → esm2022}/accordion/accordion-module.mjs +4 -4
  13. package/{esm2020 → esm2022}/accordion/accordion.mjs +3 -3
  14. package/{esm2020 → esm2022}/bidi/bidi-module.mjs +4 -4
  15. package/{esm2020 → esm2022}/bidi/dir.mjs +3 -3
  16. package/{esm2020 → esm2022}/bidi/directionality.mjs +3 -3
  17. package/{esm2020 → esm2022}/clipboard/clipboard-module.mjs +4 -4
  18. package/{esm2020 → esm2022}/clipboard/clipboard.mjs +3 -3
  19. package/{esm2020 → esm2022}/clipboard/copy-to-clipboard.mjs +3 -3
  20. package/{esm2020 → esm2022}/collections/unique-selection-dispatcher.mjs +3 -3
  21. package/{esm2020 → esm2022}/dialog/dialog-container.mjs +3 -3
  22. package/{esm2020 → esm2022}/dialog/dialog-module.mjs +11 -11
  23. package/{esm2020 → esm2022}/dialog/dialog.mjs +3 -3
  24. package/{esm2020 → esm2022}/drag-drop/directives/drag-handle.mjs +3 -3
  25. package/{esm2020 → esm2022}/drag-drop/directives/drag-placeholder.mjs +3 -3
  26. package/{esm2020 → esm2022}/drag-drop/directives/drag-preview.mjs +3 -3
  27. package/esm2022/drag-drop/directives/drag.mjs +489 -0
  28. package/{esm2020 → esm2022}/drag-drop/directives/drop-list-group.mjs +3 -3
  29. package/esm2022/drag-drop/directives/drop-list.mjs +348 -0
  30. package/{esm2020 → esm2022}/drag-drop/drag-drop-module.mjs +14 -14
  31. package/{esm2020 → esm2022}/drag-drop/drag-drop-registry.mjs +3 -3
  32. package/{esm2020 → esm2022}/drag-drop/drag-drop.mjs +3 -3
  33. package/{esm2020 → esm2022}/layout/breakpoints-observer.mjs +3 -3
  34. package/{esm2020 → esm2022}/layout/layout-module.mjs +4 -4
  35. package/{esm2020 → esm2022}/layout/media-matcher.mjs +3 -3
  36. package/{esm2020 → esm2022}/listbox/listbox-module.mjs +4 -4
  37. package/{esm2020 → esm2022}/listbox/listbox.mjs +11 -11
  38. package/{esm2020 → esm2022}/menu/context-menu-trigger.mjs +8 -8
  39. package/{esm2020 → esm2022}/menu/menu-aim.mjs +5 -5
  40. package/{esm2020 → esm2022}/menu/menu-bar.mjs +7 -7
  41. package/{esm2020 → esm2022}/menu/menu-base.mjs +3 -3
  42. package/{esm2020 → esm2022}/menu/menu-group.mjs +3 -3
  43. package/{esm2020 → esm2022}/menu/menu-item-checkbox.mjs +6 -6
  44. package/{esm2020 → esm2022}/menu/menu-item-radio.mjs +6 -6
  45. package/{esm2020 → esm2022}/menu/menu-item-selectable.mjs +3 -3
  46. package/{esm2020 → esm2022}/menu/menu-item.mjs +3 -3
  47. package/{esm2020 → esm2022}/menu/menu-module.mjs +20 -20
  48. package/{esm2020 → esm2022}/menu/menu-stack.mjs +3 -3
  49. package/{esm2020 → esm2022}/menu/menu-trigger-base.mjs +3 -3
  50. package/{esm2020 → esm2022}/menu/menu-trigger.mjs +6 -6
  51. package/{esm2020 → esm2022}/menu/menu.mjs +7 -7
  52. package/{esm2020 → esm2022}/observers/observe-content.mjs +10 -10
  53. package/{esm2020 → esm2022}/overlay/dispatchers/base-overlay-dispatcher.mjs +3 -3
  54. package/{esm2020 → esm2022}/overlay/dispatchers/overlay-keyboard-dispatcher.mjs +3 -3
  55. package/{esm2020 → esm2022}/overlay/dispatchers/overlay-outside-click-dispatcher.mjs +3 -3
  56. package/{esm2020 → esm2022}/overlay/fullscreen-overlay-container.mjs +3 -3
  57. package/{esm2020 → esm2022}/overlay/overlay-container.mjs +3 -3
  58. package/{esm2020 → esm2022}/overlay/overlay-directives.mjs +5 -5
  59. package/{esm2020 → esm2022}/overlay/overlay-module.mjs +4 -4
  60. package/{esm2020 → esm2022}/overlay/overlay.mjs +3 -3
  61. package/{esm2020 → esm2022}/overlay/position/overlay-position-builder.mjs +3 -3
  62. package/{esm2020 → esm2022}/overlay/scroll/scroll-strategy-options.mjs +3 -3
  63. package/{esm2020 → esm2022}/platform/platform-module.mjs +4 -4
  64. package/{esm2020 → esm2022}/platform/platform.mjs +3 -3
  65. package/esm2022/portal/portal-directives.mjs +250 -0
  66. package/{esm2020 → esm2022}/scrolling/fixed-size-virtual-scroll.mjs +9 -9
  67. package/{esm2020 → esm2022}/scrolling/scroll-dispatcher.mjs +3 -3
  68. package/{esm2020 → esm2022}/scrolling/scrollable.mjs +3 -3
  69. package/{esm2020 → esm2022}/scrolling/scrolling-module.mjs +17 -17
  70. package/{esm2020 → esm2022}/scrolling/viewport-ruler.mjs +3 -3
  71. package/{esm2020 → esm2022}/scrolling/virtual-for-of.mjs +3 -3
  72. package/{esm2020 → esm2022}/scrolling/virtual-scroll-viewport.mjs +9 -9
  73. package/{esm2020 → esm2022}/scrolling/virtual-scrollable-element.mjs +3 -3
  74. package/{esm2020 → esm2022}/scrolling/virtual-scrollable-window.mjs +3 -3
  75. package/{esm2020 → esm2022}/scrolling/virtual-scrollable.mjs +3 -3
  76. package/{esm2020 → esm2022}/stepper/step-header.mjs +3 -3
  77. package/{esm2020 → esm2022}/stepper/step-label.mjs +3 -3
  78. package/{esm2020 → esm2022}/stepper/stepper-button.mjs +5 -5
  79. package/{esm2020 → esm2022}/stepper/stepper-module.mjs +9 -9
  80. package/{esm2020 → esm2022}/stepper/stepper.mjs +5 -5
  81. package/{esm2020 → esm2022}/table/cell.mjs +15 -15
  82. package/{esm2020 → esm2022}/table/coalesced-style-scheduler.mjs +3 -3
  83. package/esm2022/table/row.mjs +271 -0
  84. package/{esm2020 → esm2022}/table/table-module.mjs +46 -46
  85. package/{esm2020 → esm2022}/table/table.mjs +19 -19
  86. package/{esm2020 → esm2022}/table/text-column.mjs +5 -5
  87. package/{esm2020 → esm2022}/text-field/autofill.mjs +5 -5
  88. package/{esm2020 → esm2022}/text-field/autosize.mjs +3 -3
  89. package/{esm2020 → esm2022}/text-field/text-field-module.mjs +4 -4
  90. package/{esm2020 → esm2022}/tree/nested-node.mjs +6 -6
  91. package/{esm2020 → esm2022}/tree/node.mjs +3 -3
  92. package/{esm2020 → esm2022}/tree/outlet.mjs +3 -3
  93. package/{esm2020 → esm2022}/tree/padding.mjs +3 -3
  94. package/{esm2020 → esm2022}/tree/toggle.mjs +3 -3
  95. package/{esm2020 → esm2022}/tree/tree-module.mjs +16 -16
  96. package/esm2022/tree/tree.mjs +349 -0
  97. package/{esm2020 → esm2022}/version.mjs +1 -1
  98. package/{fesm2020 → fesm2022}/a11y.mjs +27 -27
  99. package/{fesm2020 → fesm2022}/a11y.mjs.map +1 -1
  100. package/{fesm2020 → fesm2022}/accordion.mjs +11 -11
  101. package/{fesm2020 → fesm2022}/accordion.mjs.map +1 -1
  102. package/{fesm2020 → fesm2022}/bidi.mjs +7 -7
  103. package/{fesm2020 → fesm2022}/bidi.mjs.map +1 -1
  104. package/{fesm2015 → fesm2022}/cdk.mjs +1 -1
  105. package/{fesm2015 → fesm2022}/cdk.mjs.map +1 -1
  106. package/{fesm2020 → fesm2022}/clipboard.mjs +7 -7
  107. package/{fesm2020 → fesm2022}/clipboard.mjs.map +1 -1
  108. package/{fesm2020 → fesm2022}/collections.mjs +2 -2
  109. package/{fesm2020 → fesm2022}/collections.mjs.map +1 -1
  110. package/{fesm2020 → fesm2022}/dialog.mjs +14 -14
  111. package/{fesm2020 → fesm2022}/dialog.mjs.map +1 -1
  112. package/{fesm2020 → fesm2022}/drag-drop.mjs +36 -36
  113. package/{fesm2020 → fesm2022}/drag-drop.mjs.map +1 -1
  114. package/{fesm2015 → fesm2022}/layout.mjs +7 -7
  115. package/{fesm2015 → fesm2022}/layout.mjs.map +1 -1
  116. package/{fesm2020 → fesm2022}/listbox.mjs +13 -13
  117. package/{fesm2020 → fesm2022}/listbox.mjs.map +1 -1
  118. package/{fesm2020 → fesm2022}/menu.mjs +69 -69
  119. package/{fesm2020 → fesm2022}/menu.mjs.map +1 -1
  120. package/{fesm2020 → fesm2022}/observers.mjs +9 -9
  121. package/{fesm2020 → fesm2022}/observers.mjs.map +1 -1
  122. package/{fesm2020 → fesm2022}/overlay.mjs +23 -23
  123. package/{fesm2020 → fesm2022}/overlay.mjs.map +1 -1
  124. package/{fesm2020 → fesm2022}/platform.mjs +5 -5
  125. package/{fesm2020 → fesm2022}/platform.mjs.map +1 -1
  126. package/{fesm2020 → fesm2022}/portal.mjs +21 -21
  127. package/{fesm2020 → fesm2022}/portal.mjs.map +1 -1
  128. package/{fesm2020 → fesm2022}/scrolling.mjs +46 -46
  129. package/{fesm2020 → fesm2022}/scrolling.mjs.map +1 -1
  130. package/{fesm2020 → fesm2022}/stepper.mjs +20 -20
  131. package/{fesm2020 → fesm2022}/stepper.mjs.map +1 -1
  132. package/{fesm2020 → fesm2022}/table.mjs +109 -109
  133. package/{fesm2020 → fesm2022}/table.mjs.map +1 -1
  134. package/{fesm2020 → fesm2022}/text-field.mjs +9 -9
  135. package/{fesm2020 → fesm2022}/text-field.mjs.map +1 -1
  136. package/{fesm2020 → fesm2022}/tree.mjs +37 -37
  137. package/{fesm2020 → fesm2022}/tree.mjs.map +1 -1
  138. package/package.json +77 -131
  139. package/schematics/ng-add/index.js +1 -1
  140. package/schematics/ng-add/index.mjs +1 -1
  141. package/schematics/ng-update/devkit-file-system.js +3 -2
  142. package/schematics/ng-update/devkit-file-system.mjs +3 -2
  143. package/schematics/ng-update/migrations/attribute-selectors.js +5 -8
  144. package/schematics/ng-update/migrations/attribute-selectors.mjs +5 -8
  145. package/schematics/ng-update/migrations/class-inheritance.js +8 -11
  146. package/schematics/ng-update/migrations/class-inheritance.mjs +8 -11
  147. package/schematics/ng-update/migrations/class-names.js +12 -15
  148. package/schematics/ng-update/migrations/class-names.mjs +12 -15
  149. package/schematics/ng-update/migrations/constructor-signature.js +7 -10
  150. package/schematics/ng-update/migrations/constructor-signature.mjs +7 -10
  151. package/schematics/ng-update/migrations/css-selectors.js +5 -8
  152. package/schematics/ng-update/migrations/css-selectors.mjs +5 -8
  153. package/schematics/ng-update/migrations/element-selectors.js +5 -8
  154. package/schematics/ng-update/migrations/element-selectors.mjs +5 -8
  155. package/schematics/ng-update/migrations/input-names.js +5 -8
  156. package/schematics/ng-update/migrations/input-names.mjs +5 -8
  157. package/schematics/ng-update/migrations/method-call-arguments.js +5 -8
  158. package/schematics/ng-update/migrations/method-call-arguments.mjs +5 -8
  159. package/schematics/ng-update/migrations/misc-template.js +3 -6
  160. package/schematics/ng-update/migrations/misc-template.mjs +3 -6
  161. package/schematics/ng-update/migrations/output-names.js +5 -8
  162. package/schematics/ng-update/migrations/output-names.mjs +5 -8
  163. package/schematics/ng-update/migrations/property-names.js +5 -8
  164. package/schematics/ng-update/migrations/property-names.mjs +5 -8
  165. package/schematics/ng-update/migrations/symbol-removal.js +5 -8
  166. package/schematics/ng-update/migrations/symbol-removal.mjs +5 -8
  167. package/schematics/update-tool/component-resource-collector.js +5 -3
  168. package/schematics/update-tool/component-resource-collector.mjs +5 -3
  169. package/schematics/update-tool/index.js +8 -2
  170. package/schematics/update-tool/index.mjs +8 -2
  171. package/schematics/update-tool/migration.js +10 -3
  172. package/schematics/update-tool/migration.mjs +10 -3
  173. package/schematics/update-tool/utils/virtual-host.js +3 -2
  174. package/schematics/update-tool/utils/virtual-host.mjs +3 -2
  175. package/esm2020/drag-drop/directives/drag.mjs +0 -489
  176. package/esm2020/drag-drop/directives/drop-list.mjs +0 -348
  177. package/esm2020/portal/portal-directives.mjs +0 -250
  178. package/esm2020/table/row.mjs +0 -271
  179. package/esm2020/tree/tree.mjs +0 -349
  180. package/fesm2015/a11y.mjs +0 -2409
  181. package/fesm2015/a11y.mjs.map +0 -1
  182. package/fesm2015/accordion.mjs +0 -238
  183. package/fesm2015/accordion.mjs.map +0 -1
  184. package/fesm2015/bidi.mjs +0 -150
  185. package/fesm2015/bidi.mjs.map +0 -1
  186. package/fesm2015/clipboard.mjs +0 -219
  187. package/fesm2015/clipboard.mjs.map +0 -1
  188. package/fesm2015/collections.mjs +0 -462
  189. package/fesm2015/collections.mjs.map +0 -1
  190. package/fesm2015/dialog.mjs +0 -749
  191. package/fesm2015/dialog.mjs.map +0 -1
  192. package/fesm2015/drag-drop.mjs +0 -3667
  193. package/fesm2015/drag-drop.mjs.map +0 -1
  194. package/fesm2015/listbox.mjs +0 -888
  195. package/fesm2015/listbox.mjs.map +0 -1
  196. package/fesm2015/menu.mjs +0 -1876
  197. package/fesm2015/menu.mjs.map +0 -1
  198. package/fesm2015/observers.mjs +0 -188
  199. package/fesm2015/observers.mjs.map +0 -1
  200. package/fesm2015/overlay.mjs +0 -2998
  201. package/fesm2015/overlay.mjs.map +0 -1
  202. package/fesm2015/platform.mjs +0 -320
  203. package/fesm2015/platform.mjs.map +0 -1
  204. package/fesm2015/portal.mjs +0 -640
  205. package/fesm2015/portal.mjs.map +0 -1
  206. package/fesm2015/scrolling.mjs +0 -1515
  207. package/fesm2015/scrolling.mjs.map +0 -1
  208. package/fesm2015/stepper.mjs +0 -570
  209. package/fesm2015/stepper.mjs.map +0 -1
  210. package/fesm2015/table.mjs +0 -2271
  211. package/fesm2015/table.mjs.map +0 -1
  212. package/fesm2015/testing/selenium-webdriver.mjs +0 -396
  213. package/fesm2015/testing/selenium-webdriver.mjs.map +0 -1
  214. package/fesm2015/testing/testbed.mjs +0 -811
  215. package/fesm2015/testing/testbed.mjs.map +0 -1
  216. package/fesm2015/testing.mjs +0 -748
  217. package/fesm2015/testing.mjs.map +0 -1
  218. package/fesm2015/text-field.mjs +0 -424
  219. package/fesm2015/text-field.mjs.map +0 -1
  220. package/fesm2015/tree.mjs +0 -871
  221. package/fesm2015/tree.mjs.map +0 -1
  222. package/fesm2020/cdk.mjs +0 -7
  223. package/fesm2020/cdk.mjs.map +0 -1
  224. package/fesm2020/coercion.mjs +0 -74
  225. package/fesm2020/coercion.mjs.map +0 -1
  226. package/fesm2020/keycodes.mjs +0 -137
  227. package/fesm2020/keycodes.mjs.map +0 -1
  228. package/fesm2020/layout.mjs +0 -210
  229. package/fesm2020/layout.mjs.map +0 -1
  230. /package/{esm2020 → esm2022}/a11y/a11y_public_index.mjs +0 -0
  231. /package/{esm2020 → esm2022}/a11y/aria-describer/aria-reference.mjs +0 -0
  232. /package/{esm2020 → esm2022}/a11y/fake-event-detection.mjs +0 -0
  233. /package/{esm2020 → esm2022}/a11y/focus-trap/configurable-focus-trap-config.mjs +0 -0
  234. /package/{esm2020 → esm2022}/a11y/focus-trap/configurable-focus-trap.mjs +0 -0
  235. /package/{esm2020 → esm2022}/a11y/focus-trap/event-listener-inert-strategy.mjs +0 -0
  236. /package/{esm2020 → esm2022}/a11y/focus-trap/focus-trap-inert-strategy.mjs +0 -0
  237. /package/{esm2020 → esm2022}/a11y/index.mjs +0 -0
  238. /package/{esm2020 → esm2022}/a11y/key-manager/activedescendant-key-manager.mjs +0 -0
  239. /package/{esm2020 → esm2022}/a11y/key-manager/focus-key-manager.mjs +0 -0
  240. /package/{esm2020 → esm2022}/a11y/key-manager/list-key-manager.mjs +0 -0
  241. /package/{esm2020 → esm2022}/a11y/live-announcer/live-announcer-tokens.mjs +0 -0
  242. /package/{esm2020 → esm2022}/a11y/public-api.mjs +0 -0
  243. /package/{esm2020 → esm2022}/accordion/accordion_public_index.mjs +0 -0
  244. /package/{esm2020 → esm2022}/accordion/index.mjs +0 -0
  245. /package/{esm2020 → esm2022}/accordion/public-api.mjs +0 -0
  246. /package/{esm2020 → esm2022}/bidi/bidi_public_index.mjs +0 -0
  247. /package/{esm2020 → esm2022}/bidi/dir-document-token.mjs +0 -0
  248. /package/{esm2020 → esm2022}/bidi/index.mjs +0 -0
  249. /package/{esm2020 → esm2022}/bidi/public-api.mjs +0 -0
  250. /package/{esm2020 → esm2022}/clipboard/clipboard_public_index.mjs +0 -0
  251. /package/{esm2020 → esm2022}/clipboard/index.mjs +0 -0
  252. /package/{esm2020 → esm2022}/clipboard/pending-copy.mjs +0 -0
  253. /package/{esm2020 → esm2022}/clipboard/public-api.mjs +0 -0
  254. /package/{esm2020 → esm2022}/coercion/array.mjs +0 -0
  255. /package/{esm2020 → esm2022}/coercion/boolean-property.mjs +0 -0
  256. /package/{esm2020 → esm2022}/coercion/css-pixel-value.mjs +0 -0
  257. /package/{esm2020 → esm2022}/coercion/element.mjs +0 -0
  258. /package/{esm2020 → esm2022}/coercion/index.mjs +0 -0
  259. /package/{esm2020 → esm2022}/coercion/number-property.mjs +0 -0
  260. /package/{esm2020 → esm2022}/coercion/public-api.mjs +0 -0
  261. /package/{esm2020 → esm2022}/coercion/string-array.mjs +0 -0
  262. /package/{esm2020 → esm2022}/collections/array-data-source.mjs +0 -0
  263. /package/{esm2020 → esm2022}/collections/collection-viewer.mjs +0 -0
  264. /package/{esm2020 → esm2022}/collections/collections_public_index.mjs +0 -0
  265. /package/{esm2020 → esm2022}/collections/data-source.mjs +0 -0
  266. /package/{esm2020 → esm2022}/collections/dispose-view-repeater-strategy.mjs +0 -0
  267. /package/{esm2020 → esm2022}/collections/index.mjs +0 -0
  268. /package/{esm2020 → esm2022}/collections/public-api.mjs +0 -0
  269. /package/{esm2020 → esm2022}/collections/recycle-view-repeater-strategy.mjs +0 -0
  270. /package/{esm2020 → esm2022}/collections/selection-model.mjs +0 -0
  271. /package/{esm2020 → esm2022}/collections/tree-adapter.mjs +0 -0
  272. /package/{esm2020 → esm2022}/collections/view-repeater.mjs +0 -0
  273. /package/{esm2020 → esm2022}/dialog/dialog-config.mjs +0 -0
  274. /package/{esm2020 → esm2022}/dialog/dialog-injectors.mjs +0 -0
  275. /package/{esm2020 → esm2022}/dialog/dialog-ref.mjs +0 -0
  276. /package/{esm2020 → esm2022}/dialog/dialog_public_index.mjs +0 -0
  277. /package/{esm2020 → esm2022}/dialog/index.mjs +0 -0
  278. /package/{esm2020 → esm2022}/dialog/public-api.mjs +0 -0
  279. /package/{esm2020 → esm2022}/drag-drop/directives/assertions.mjs +0 -0
  280. /package/{esm2020 → esm2022}/drag-drop/directives/config.mjs +0 -0
  281. /package/{esm2020 → esm2022}/drag-drop/dom/client-rect.mjs +0 -0
  282. /package/{esm2020 → esm2022}/drag-drop/dom/clone-node.mjs +0 -0
  283. /package/{esm2020 → esm2022}/drag-drop/dom/parent-position-tracker.mjs +0 -0
  284. /package/{esm2020 → esm2022}/drag-drop/dom/styling.mjs +0 -0
  285. /package/{esm2020 → esm2022}/drag-drop/dom/transition-duration.mjs +0 -0
  286. /package/{esm2020 → esm2022}/drag-drop/drag-drop_public_index.mjs +0 -0
  287. /package/{esm2020 → esm2022}/drag-drop/drag-events.mjs +0 -0
  288. /package/{esm2020 → esm2022}/drag-drop/drag-parent.mjs +0 -0
  289. /package/{esm2020 → esm2022}/drag-drop/drag-ref.mjs +0 -0
  290. /package/{esm2020 → esm2022}/drag-drop/drag-utils.mjs +0 -0
  291. /package/{esm2020 → esm2022}/drag-drop/drop-list-ref.mjs +0 -0
  292. /package/{esm2020 → esm2022}/drag-drop/index.mjs +0 -0
  293. /package/{esm2020 → esm2022}/drag-drop/public-api.mjs +0 -0
  294. /package/{esm2020 → esm2022}/drag-drop/sorting/drop-list-sort-strategy.mjs +0 -0
  295. /package/{esm2020 → esm2022}/drag-drop/sorting/single-axis-sort-strategy.mjs +0 -0
  296. /package/{esm2020 → esm2022}/index.mjs +0 -0
  297. /package/{esm2020 → esm2022}/keycodes/index.mjs +0 -0
  298. /package/{esm2020 → esm2022}/keycodes/keycodes.mjs +0 -0
  299. /package/{esm2020 → esm2022}/keycodes/keycodes_public_index.mjs +0 -0
  300. /package/{esm2020 → esm2022}/keycodes/modifiers.mjs +0 -0
  301. /package/{esm2020 → esm2022}/keycodes/public-api.mjs +0 -0
  302. /package/{esm2020 → esm2022}/layout/breakpoints.mjs +0 -0
  303. /package/{esm2020 → esm2022}/layout/index.mjs +0 -0
  304. /package/{esm2020 → esm2022}/layout/layout_public_index.mjs +0 -0
  305. /package/{esm2020 → esm2022}/layout/public-api.mjs +0 -0
  306. /package/{esm2020 → esm2022}/listbox/index.mjs +0 -0
  307. /package/{esm2020 → esm2022}/listbox/listbox_public_index.mjs +0 -0
  308. /package/{esm2020 → esm2022}/listbox/public-api.mjs +0 -0
  309. /package/{esm2020 → esm2022}/menu/index.mjs +0 -0
  310. /package/{esm2020 → esm2022}/menu/menu-errors.mjs +0 -0
  311. /package/{esm2020 → esm2022}/menu/menu-interface.mjs +0 -0
  312. /package/{esm2020 → esm2022}/menu/menu_public_index.mjs +0 -0
  313. /package/{esm2020 → esm2022}/menu/pointer-focus-tracker.mjs +0 -0
  314. /package/{esm2020 → esm2022}/menu/public-api.mjs +0 -0
  315. /package/{esm2020 → esm2022}/observers/index.mjs +0 -0
  316. /package/{esm2020 → esm2022}/observers/observers_public_index.mjs +0 -0
  317. /package/{esm2020 → esm2022}/observers/public-api.mjs +0 -0
  318. /package/{esm2020 → esm2022}/overlay/dispatchers/index.mjs +0 -0
  319. /package/{esm2020 → esm2022}/overlay/index.mjs +0 -0
  320. /package/{esm2020 → esm2022}/overlay/overlay-config.mjs +0 -0
  321. /package/{esm2020 → esm2022}/overlay/overlay-ref.mjs +0 -0
  322. /package/{esm2020 → esm2022}/overlay/overlay-reference.mjs +0 -0
  323. /package/{esm2020 → esm2022}/overlay/overlay_public_index.mjs +0 -0
  324. /package/{esm2020 → esm2022}/overlay/position/connected-position.mjs +0 -0
  325. /package/{esm2020 → esm2022}/overlay/position/flexible-connected-position-strategy.mjs +0 -0
  326. /package/{esm2020 → esm2022}/overlay/position/global-position-strategy.mjs +0 -0
  327. /package/{esm2020 → esm2022}/overlay/position/position-strategy.mjs +0 -0
  328. /package/{esm2020 → esm2022}/overlay/position/scroll-clip.mjs +0 -0
  329. /package/{esm2020 → esm2022}/overlay/public-api.mjs +0 -0
  330. /package/{esm2020 → esm2022}/overlay/scroll/block-scroll-strategy.mjs +0 -0
  331. /package/{esm2020 → esm2022}/overlay/scroll/close-scroll-strategy.mjs +0 -0
  332. /package/{esm2020 → esm2022}/overlay/scroll/index.mjs +0 -0
  333. /package/{esm2020 → esm2022}/overlay/scroll/noop-scroll-strategy.mjs +0 -0
  334. /package/{esm2020 → esm2022}/overlay/scroll/reposition-scroll-strategy.mjs +0 -0
  335. /package/{esm2020 → esm2022}/overlay/scroll/scroll-strategy.mjs +0 -0
  336. /package/{esm2020 → esm2022}/platform/features/input-types.mjs +0 -0
  337. /package/{esm2020 → esm2022}/platform/features/passive-listeners.mjs +0 -0
  338. /package/{esm2020 → esm2022}/platform/features/scrolling.mjs +0 -0
  339. /package/{esm2020 → esm2022}/platform/features/shadow-dom.mjs +0 -0
  340. /package/{esm2020 → esm2022}/platform/features/test-environment.mjs +0 -0
  341. /package/{esm2020 → esm2022}/platform/index.mjs +0 -0
  342. /package/{esm2020 → esm2022}/platform/platform_public_index.mjs +0 -0
  343. /package/{esm2020 → esm2022}/platform/public-api.mjs +0 -0
  344. /package/{esm2020 → esm2022}/portal/dom-portal-outlet.mjs +0 -0
  345. /package/{esm2020 → esm2022}/portal/index.mjs +0 -0
  346. /package/{esm2020 → esm2022}/portal/portal-errors.mjs +0 -0
  347. /package/{esm2020 → esm2022}/portal/portal-injector.mjs +0 -0
  348. /package/{esm2020 → esm2022}/portal/portal.mjs +0 -0
  349. /package/{esm2020 → esm2022}/portal/portal_public_index.mjs +0 -0
  350. /package/{esm2020 → esm2022}/portal/public-api.mjs +0 -0
  351. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  352. /package/{esm2020 → esm2022}/scrolling/index.mjs +0 -0
  353. /package/{esm2020 → esm2022}/scrolling/public-api.mjs +0 -0
  354. /package/{esm2020 → esm2022}/scrolling/scrolling_public_index.mjs +0 -0
  355. /package/{esm2020 → esm2022}/scrolling/virtual-scroll-repeater.mjs +0 -0
  356. /package/{esm2020 → esm2022}/scrolling/virtual-scroll-strategy.mjs +0 -0
  357. /package/{esm2020 → esm2022}/stepper/index.mjs +0 -0
  358. /package/{esm2020 → esm2022}/stepper/public-api.mjs +0 -0
  359. /package/{esm2020 → esm2022}/stepper/stepper_public_index.mjs +0 -0
  360. /package/{esm2020 → esm2022}/table/can-stick.mjs +0 -0
  361. /package/{esm2020 → esm2022}/table/index.mjs +0 -0
  362. /package/{esm2020 → esm2022}/table/public-api.mjs +0 -0
  363. /package/{esm2020 → esm2022}/table/sticky-position-listener.mjs +0 -0
  364. /package/{esm2020 → esm2022}/table/sticky-styler.mjs +0 -0
  365. /package/{esm2020 → esm2022}/table/table-errors.mjs +0 -0
  366. /package/{esm2020 → esm2022}/table/table_public_index.mjs +0 -0
  367. /package/{esm2020 → esm2022}/table/tokens.mjs +0 -0
  368. /package/{esm2020 → esm2022}/testing/change-detection.mjs +0 -0
  369. /package/{esm2020 → esm2022}/testing/component-harness.mjs +0 -0
  370. /package/{esm2020 → esm2022}/testing/element-dimensions.mjs +0 -0
  371. /package/{esm2020 → esm2022}/testing/harness-environment.mjs +0 -0
  372. /package/{esm2020 → esm2022}/testing/index.mjs +0 -0
  373. /package/{esm2020 → esm2022}/testing/public-api.mjs +0 -0
  374. /package/{esm2020 → esm2022}/testing/selenium-webdriver/index.mjs +0 -0
  375. /package/{esm2020 → esm2022}/testing/selenium-webdriver/public-api.mjs +0 -0
  376. /package/{esm2020 → esm2022}/testing/selenium-webdriver/selenium-web-driver-element.mjs +0 -0
  377. /package/{esm2020 → esm2022}/testing/selenium-webdriver/selenium-web-driver-harness-environment.mjs +0 -0
  378. /package/{esm2020 → esm2022}/testing/selenium-webdriver/selenium-webdriver-keys.mjs +0 -0
  379. /package/{esm2020 → esm2022}/testing/test-element-errors.mjs +0 -0
  380. /package/{esm2020 → esm2022}/testing/test-element.mjs +0 -0
  381. /package/{esm2020 → esm2022}/testing/testbed/fake-events/dispatch-events.mjs +0 -0
  382. /package/{esm2020 → esm2022}/testing/testbed/fake-events/element-focus.mjs +0 -0
  383. /package/{esm2020 → esm2022}/testing/testbed/fake-events/event-objects.mjs +0 -0
  384. /package/{esm2020 → esm2022}/testing/testbed/fake-events/index.mjs +0 -0
  385. /package/{esm2020 → esm2022}/testing/testbed/fake-events/type-in-element.mjs +0 -0
  386. /package/{esm2020 → esm2022}/testing/testbed/index.mjs +0 -0
  387. /package/{esm2020 → esm2022}/testing/testbed/public-api.mjs +0 -0
  388. /package/{esm2020 → esm2022}/testing/testbed/task-state-zone-interceptor.mjs +0 -0
  389. /package/{esm2020 → esm2022}/testing/testbed/testbed-harness-environment.mjs +0 -0
  390. /package/{esm2020 → esm2022}/testing/testbed/unit-test-element.mjs +0 -0
  391. /package/{esm2020 → esm2022}/testing/text-filtering.mjs +0 -0
  392. /package/{esm2020 → esm2022}/text-field/index.mjs +0 -0
  393. /package/{esm2020 → esm2022}/text-field/public-api.mjs +0 -0
  394. /package/{esm2020 → esm2022}/text-field/text-field_public_index.mjs +0 -0
  395. /package/{esm2020 → esm2022}/tree/control/base-tree-control.mjs +0 -0
  396. /package/{esm2020 → esm2022}/tree/control/flat-tree-control.mjs +0 -0
  397. /package/{esm2020 → esm2022}/tree/control/nested-tree-control.mjs +0 -0
  398. /package/{esm2020 → esm2022}/tree/control/tree-control.mjs +0 -0
  399. /package/{esm2020 → esm2022}/tree/index.mjs +0 -0
  400. /package/{esm2020 → esm2022}/tree/public-api.mjs +0 -0
  401. /package/{esm2020 → esm2022}/tree/tree-errors.mjs +0 -0
  402. /package/{esm2020 → esm2022}/tree/tree_public_index.mjs +0 -0
  403. /package/{fesm2015 → fesm2022}/coercion.mjs +0 -0
  404. /package/{fesm2015 → fesm2022}/coercion.mjs.map +0 -0
  405. /package/{fesm2015 → fesm2022}/keycodes.mjs +0 -0
  406. /package/{fesm2015 → fesm2022}/keycodes.mjs.map +0 -0
  407. /package/{fesm2020 → fesm2022}/testing/selenium-webdriver.mjs +0 -0
  408. /package/{fesm2020 → fesm2022}/testing/selenium-webdriver.mjs.map +0 -0
  409. /package/{fesm2020 → fesm2022}/testing/testbed.mjs +0 -0
  410. /package/{fesm2020 → fesm2022}/testing/testbed.mjs.map +0 -0
  411. /package/{fesm2020 → fesm2022}/testing.mjs +0 -0
  412. /package/{fesm2020 → fesm2022}/testing.mjs.map +0 -0
@@ -1,640 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ElementRef, Injector, Directive, EventEmitter, Inject, Output, NgModule } from '@angular/core';
3
- import { DOCUMENT } from '@angular/common';
4
-
5
- /**
6
- * Throws an exception when attempting to attach a null portal to a host.
7
- * @docs-private
8
- */
9
- function throwNullPortalError() {
10
- throw Error('Must provide a portal to attach');
11
- }
12
- /**
13
- * Throws an exception when attempting to attach a portal to a host that is already attached.
14
- * @docs-private
15
- */
16
- function throwPortalAlreadyAttachedError() {
17
- throw Error('Host already has a portal attached');
18
- }
19
- /**
20
- * Throws an exception when attempting to attach a portal to an already-disposed host.
21
- * @docs-private
22
- */
23
- function throwPortalOutletAlreadyDisposedError() {
24
- throw Error('This PortalOutlet has already been disposed');
25
- }
26
- /**
27
- * Throws an exception when attempting to attach an unknown portal type.
28
- * @docs-private
29
- */
30
- function throwUnknownPortalTypeError() {
31
- throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +
32
- 'a ComponentPortal or a TemplatePortal.');
33
- }
34
- /**
35
- * Throws an exception when attempting to attach a portal to a null host.
36
- * @docs-private
37
- */
38
- function throwNullPortalOutletError() {
39
- throw Error('Attempting to attach a portal to a null PortalOutlet');
40
- }
41
- /**
42
- * Throws an exception when attempting to detach a portal that is not attached.
43
- * @docs-private
44
- */
45
- function throwNoPortalAttachedError() {
46
- throw Error('Attempting to detach a portal that is not attached to a host');
47
- }
48
-
49
- /**
50
- * A `Portal` is something that you want to render somewhere else.
51
- * It can be attach to / detached from a `PortalOutlet`.
52
- */
53
- class Portal {
54
- /** Attach this portal to a host. */
55
- attach(host) {
56
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
57
- if (host == null) {
58
- throwNullPortalOutletError();
59
- }
60
- if (host.hasAttached()) {
61
- throwPortalAlreadyAttachedError();
62
- }
63
- }
64
- this._attachedHost = host;
65
- return host.attach(this);
66
- }
67
- /** Detach this portal from its host */
68
- detach() {
69
- let host = this._attachedHost;
70
- if (host != null) {
71
- this._attachedHost = null;
72
- host.detach();
73
- }
74
- else if (typeof ngDevMode === 'undefined' || ngDevMode) {
75
- throwNoPortalAttachedError();
76
- }
77
- }
78
- /** Whether this portal is attached to a host. */
79
- get isAttached() {
80
- return this._attachedHost != null;
81
- }
82
- /**
83
- * Sets the PortalOutlet reference without performing `attach()`. This is used directly by
84
- * the PortalOutlet when it is performing an `attach()` or `detach()`.
85
- */
86
- setAttachedHost(host) {
87
- this._attachedHost = host;
88
- }
89
- }
90
- /**
91
- * A `ComponentPortal` is a portal that instantiates some Component upon attachment.
92
- */
93
- class ComponentPortal extends Portal {
94
- constructor(component, viewContainerRef, injector, componentFactoryResolver, projectableNodes) {
95
- super();
96
- this.component = component;
97
- this.viewContainerRef = viewContainerRef;
98
- this.injector = injector;
99
- this.componentFactoryResolver = componentFactoryResolver;
100
- this.projectableNodes = projectableNodes;
101
- }
102
- }
103
- /**
104
- * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).
105
- */
106
- class TemplatePortal extends Portal {
107
- constructor(
108
- /** The embedded template that will be used to instantiate an embedded View in the host. */
109
- templateRef,
110
- /** Reference to the ViewContainer into which the template will be stamped out. */
111
- viewContainerRef,
112
- /** Contextual data to be passed in to the embedded view. */
113
- context,
114
- /** The injector to use for the embedded view. */
115
- injector) {
116
- super();
117
- this.templateRef = templateRef;
118
- this.viewContainerRef = viewContainerRef;
119
- this.context = context;
120
- this.injector = injector;
121
- }
122
- get origin() {
123
- return this.templateRef.elementRef;
124
- }
125
- /**
126
- * Attach the portal to the provided `PortalOutlet`.
127
- * When a context is provided it will override the `context` property of the `TemplatePortal`
128
- * instance.
129
- */
130
- attach(host, context = this.context) {
131
- this.context = context;
132
- return super.attach(host);
133
- }
134
- detach() {
135
- this.context = undefined;
136
- return super.detach();
137
- }
138
- }
139
- /**
140
- * A `DomPortal` is a portal whose DOM element will be taken from its current position
141
- * in the DOM and moved into a portal outlet, when it is attached. On detach, the content
142
- * will be restored to its original position.
143
- */
144
- class DomPortal extends Portal {
145
- constructor(element) {
146
- super();
147
- this.element = element instanceof ElementRef ? element.nativeElement : element;
148
- }
149
- }
150
- /**
151
- * Partial implementation of PortalOutlet that handles attaching
152
- * ComponentPortal and TemplatePortal.
153
- */
154
- class BasePortalOutlet {
155
- constructor() {
156
- /** Whether this host has already been permanently disposed. */
157
- this._isDisposed = false;
158
- // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.
159
- this.attachDomPortal = null;
160
- }
161
- /** Whether this host has an attached portal. */
162
- hasAttached() {
163
- return !!this._attachedPortal;
164
- }
165
- /** Attaches a portal. */
166
- attach(portal) {
167
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
168
- if (!portal) {
169
- throwNullPortalError();
170
- }
171
- if (this.hasAttached()) {
172
- throwPortalAlreadyAttachedError();
173
- }
174
- if (this._isDisposed) {
175
- throwPortalOutletAlreadyDisposedError();
176
- }
177
- }
178
- if (portal instanceof ComponentPortal) {
179
- this._attachedPortal = portal;
180
- return this.attachComponentPortal(portal);
181
- }
182
- else if (portal instanceof TemplatePortal) {
183
- this._attachedPortal = portal;
184
- return this.attachTemplatePortal(portal);
185
- // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.
186
- }
187
- else if (this.attachDomPortal && portal instanceof DomPortal) {
188
- this._attachedPortal = portal;
189
- return this.attachDomPortal(portal);
190
- }
191
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
192
- throwUnknownPortalTypeError();
193
- }
194
- }
195
- /** Detaches a previously attached portal. */
196
- detach() {
197
- if (this._attachedPortal) {
198
- this._attachedPortal.setAttachedHost(null);
199
- this._attachedPortal = null;
200
- }
201
- this._invokeDisposeFn();
202
- }
203
- /** Permanently dispose of this portal host. */
204
- dispose() {
205
- if (this.hasAttached()) {
206
- this.detach();
207
- }
208
- this._invokeDisposeFn();
209
- this._isDisposed = true;
210
- }
211
- /** @docs-private */
212
- setDisposeFn(fn) {
213
- this._disposeFn = fn;
214
- }
215
- _invokeDisposeFn() {
216
- if (this._disposeFn) {
217
- this._disposeFn();
218
- this._disposeFn = null;
219
- }
220
- }
221
- }
222
- /**
223
- * @deprecated Use `BasePortalOutlet` instead.
224
- * @breaking-change 9.0.0
225
- */
226
- class BasePortalHost extends BasePortalOutlet {
227
- }
228
-
229
- /**
230
- * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular
231
- * application context.
232
- */
233
- class DomPortalOutlet extends BasePortalOutlet {
234
- /**
235
- * @param outletElement Element into which the content is projected.
236
- * @param _componentFactoryResolver Used to resolve the component factory.
237
- * Only required when attaching component portals.
238
- * @param _appRef Reference to the application. Only used in component portals when there
239
- * is no `ViewContainerRef` available.
240
- * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't
241
- * have one. Only used for component portals.
242
- * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually
243
- * become a required parameter.
244
- */
245
- constructor(
246
- /** Element into which the content is projected. */
247
- outletElement, _componentFactoryResolver, _appRef, _defaultInjector,
248
- /**
249
- * @deprecated `_document` Parameter to be made required.
250
- * @breaking-change 10.0.0
251
- */
252
- _document) {
253
- super();
254
- this.outletElement = outletElement;
255
- this._componentFactoryResolver = _componentFactoryResolver;
256
- this._appRef = _appRef;
257
- this._defaultInjector = _defaultInjector;
258
- /**
259
- * Attaches a DOM portal by transferring its content into the outlet.
260
- * @param portal Portal to be attached.
261
- * @deprecated To be turned into a method.
262
- * @breaking-change 10.0.0
263
- */
264
- this.attachDomPortal = (portal) => {
265
- // @breaking-change 10.0.0 Remove check and error once the
266
- // `_document` constructor parameter is required.
267
- if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {
268
- throw Error('Cannot attach DOM portal without _document constructor parameter');
269
- }
270
- const element = portal.element;
271
- if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {
272
- throw Error('DOM portal content must be attached to a parent node.');
273
- }
274
- // Anchor used to save the element's previous position so
275
- // that we can restore it when the portal is detached.
276
- const anchorNode = this._document.createComment('dom-portal');
277
- element.parentNode.insertBefore(anchorNode, element);
278
- this.outletElement.appendChild(element);
279
- this._attachedPortal = portal;
280
- super.setDisposeFn(() => {
281
- // We can't use `replaceWith` here because IE doesn't support it.
282
- if (anchorNode.parentNode) {
283
- anchorNode.parentNode.replaceChild(element, anchorNode);
284
- }
285
- });
286
- };
287
- this._document = _document;
288
- }
289
- /**
290
- * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.
291
- * @param portal Portal to be attached
292
- * @returns Reference to the created component.
293
- */
294
- attachComponentPortal(portal) {
295
- const resolver = (portal.componentFactoryResolver || this._componentFactoryResolver);
296
- if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) {
297
- throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.');
298
- }
299
- const componentFactory = resolver.resolveComponentFactory(portal.component);
300
- let componentRef;
301
- // If the portal specifies a ViewContainerRef, we will use that as the attachment point
302
- // for the component (in terms of Angular's component tree, not rendering).
303
- // When the ViewContainerRef is missing, we use the factory to create the component directly
304
- // and then manually attach the view to the application.
305
- if (portal.viewContainerRef) {
306
- componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector, portal.projectableNodes || undefined);
307
- this.setDisposeFn(() => componentRef.destroy());
308
- }
309
- else {
310
- if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {
311
- throw Error('Cannot attach component portal to outlet without an ApplicationRef.');
312
- }
313
- componentRef = componentFactory.create(portal.injector || this._defaultInjector || Injector.NULL);
314
- this._appRef.attachView(componentRef.hostView);
315
- this.setDisposeFn(() => {
316
- // Verify that the ApplicationRef has registered views before trying to detach a host view.
317
- // This check also protects the `detachView` from being called on a destroyed ApplicationRef.
318
- if (this._appRef.viewCount > 0) {
319
- this._appRef.detachView(componentRef.hostView);
320
- }
321
- componentRef.destroy();
322
- });
323
- }
324
- // At this point the component has been instantiated, so we move it to the location in the DOM
325
- // where we want it to be rendered.
326
- this.outletElement.appendChild(this._getComponentRootNode(componentRef));
327
- this._attachedPortal = portal;
328
- return componentRef;
329
- }
330
- /**
331
- * Attaches a template portal to the DOM as an embedded view.
332
- * @param portal Portal to be attached.
333
- * @returns Reference to the created embedded view.
334
- */
335
- attachTemplatePortal(portal) {
336
- let viewContainer = portal.viewContainerRef;
337
- let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {
338
- injector: portal.injector,
339
- });
340
- // The method `createEmbeddedView` will add the view as a child of the viewContainer.
341
- // But for the DomPortalOutlet the view can be added everywhere in the DOM
342
- // (e.g Overlay Container) To move the view to the specified host element. We just
343
- // re-append the existing root nodes.
344
- viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));
345
- // Note that we want to detect changes after the nodes have been moved so that
346
- // any directives inside the portal that are looking at the DOM inside a lifecycle
347
- // hook won't be invoked too early.
348
- viewRef.detectChanges();
349
- this.setDisposeFn(() => {
350
- let index = viewContainer.indexOf(viewRef);
351
- if (index !== -1) {
352
- viewContainer.remove(index);
353
- }
354
- });
355
- this._attachedPortal = portal;
356
- // TODO(jelbourn): Return locals from view.
357
- return viewRef;
358
- }
359
- /**
360
- * Clears out a portal from the DOM.
361
- */
362
- dispose() {
363
- super.dispose();
364
- this.outletElement.remove();
365
- }
366
- /** Gets the root HTMLElement for an instantiated component. */
367
- _getComponentRootNode(componentRef) {
368
- return componentRef.hostView.rootNodes[0];
369
- }
370
- }
371
- /**
372
- * @deprecated Use `DomPortalOutlet` instead.
373
- * @breaking-change 9.0.0
374
- */
375
- class DomPortalHost extends DomPortalOutlet {
376
- }
377
-
378
- /**
379
- * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,
380
- * the directive instance itself can be attached to a host, enabling declarative use of portals.
381
- */
382
- class CdkPortal extends TemplatePortal {
383
- constructor(templateRef, viewContainerRef) {
384
- super(templateRef, viewContainerRef);
385
- }
386
- }
387
- CdkPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: CdkPortal, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
388
- CdkPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.7", type: CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"], usesInheritance: true, ngImport: i0 });
389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: CdkPortal, decorators: [{
390
- type: Directive,
391
- args: [{
392
- selector: '[cdkPortal]',
393
- exportAs: 'cdkPortal',
394
- }]
395
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
396
- /**
397
- * @deprecated Use `CdkPortal` instead.
398
- * @breaking-change 9.0.0
399
- */
400
- class TemplatePortalDirective extends CdkPortal {
401
- }
402
- TemplatePortalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: TemplatePortalDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
403
- TemplatePortalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.7", type: TemplatePortalDirective, selector: "[cdk-portal], [portal]", providers: [
404
- {
405
- provide: CdkPortal,
406
- useExisting: TemplatePortalDirective,
407
- },
408
- ], exportAs: ["cdkPortal"], usesInheritance: true, ngImport: i0 });
409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: TemplatePortalDirective, decorators: [{
410
- type: Directive,
411
- args: [{
412
- selector: '[cdk-portal], [portal]',
413
- exportAs: 'cdkPortal',
414
- providers: [
415
- {
416
- provide: CdkPortal,
417
- useExisting: TemplatePortalDirective,
418
- },
419
- ],
420
- }]
421
- }] });
422
- /**
423
- * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be
424
- * directly attached to it, enabling declarative use.
425
- *
426
- * Usage:
427
- * `<ng-template [cdkPortalOutlet]="greeting"></ng-template>`
428
- */
429
- class CdkPortalOutlet extends BasePortalOutlet {
430
- constructor(_componentFactoryResolver, _viewContainerRef,
431
- /**
432
- * @deprecated `_document` parameter to be made required.
433
- * @breaking-change 9.0.0
434
- */
435
- _document) {
436
- super();
437
- this._componentFactoryResolver = _componentFactoryResolver;
438
- this._viewContainerRef = _viewContainerRef;
439
- /** Whether the portal component is initialized. */
440
- this._isInitialized = false;
441
- /** Emits when a portal is attached to the outlet. */
442
- this.attached = new EventEmitter();
443
- /**
444
- * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.
445
- * @param portal Portal to be attached.
446
- * @deprecated To be turned into a method.
447
- * @breaking-change 10.0.0
448
- */
449
- this.attachDomPortal = (portal) => {
450
- // @breaking-change 9.0.0 Remove check and error once the
451
- // `_document` constructor parameter is required.
452
- if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {
453
- throw Error('Cannot attach DOM portal without _document constructor parameter');
454
- }
455
- const element = portal.element;
456
- if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {
457
- throw Error('DOM portal content must be attached to a parent node.');
458
- }
459
- // Anchor used to save the element's previous position so
460
- // that we can restore it when the portal is detached.
461
- const anchorNode = this._document.createComment('dom-portal');
462
- portal.setAttachedHost(this);
463
- element.parentNode.insertBefore(anchorNode, element);
464
- this._getRootNode().appendChild(element);
465
- this._attachedPortal = portal;
466
- super.setDisposeFn(() => {
467
- if (anchorNode.parentNode) {
468
- anchorNode.parentNode.replaceChild(element, anchorNode);
469
- }
470
- });
471
- };
472
- this._document = _document;
473
- }
474
- /** Portal associated with the Portal outlet. */
475
- get portal() {
476
- return this._attachedPortal;
477
- }
478
- set portal(portal) {
479
- // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have
480
- // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`
481
- // and attach a portal programmatically in the parent component. When Angular does the first CD
482
- // round, it will fire the setter with empty string, causing the user's content to be cleared.
483
- if (this.hasAttached() && !portal && !this._isInitialized) {
484
- return;
485
- }
486
- if (this.hasAttached()) {
487
- super.detach();
488
- }
489
- if (portal) {
490
- super.attach(portal);
491
- }
492
- this._attachedPortal = portal || null;
493
- }
494
- /** Component or view reference that is attached to the portal. */
495
- get attachedRef() {
496
- return this._attachedRef;
497
- }
498
- ngOnInit() {
499
- this._isInitialized = true;
500
- }
501
- ngOnDestroy() {
502
- super.dispose();
503
- this._attachedRef = this._attachedPortal = null;
504
- }
505
- /**
506
- * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.
507
- *
508
- * @param portal Portal to be attached to the portal outlet.
509
- * @returns Reference to the created component.
510
- */
511
- attachComponentPortal(portal) {
512
- portal.setAttachedHost(this);
513
- // If the portal specifies an origin, use that as the logical location of the component
514
- // in the application tree. Otherwise use the location of this PortalOutlet.
515
- const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;
516
- const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;
517
- const componentFactory = resolver.resolveComponentFactory(portal.component);
518
- const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector, portal.projectableNodes || undefined);
519
- // If we're using a view container that's different from the injected one (e.g. when the portal
520
- // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered
521
- // inside of the alternate view container.
522
- if (viewContainerRef !== this._viewContainerRef) {
523
- this._getRootNode().appendChild(ref.hostView.rootNodes[0]);
524
- }
525
- super.setDisposeFn(() => ref.destroy());
526
- this._attachedPortal = portal;
527
- this._attachedRef = ref;
528
- this.attached.emit(ref);
529
- return ref;
530
- }
531
- /**
532
- * Attach the given TemplatePortal to this PortalHost as an embedded View.
533
- * @param portal Portal to be attached.
534
- * @returns Reference to the created embedded view.
535
- */
536
- attachTemplatePortal(portal) {
537
- portal.setAttachedHost(this);
538
- const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {
539
- injector: portal.injector,
540
- });
541
- super.setDisposeFn(() => this._viewContainerRef.clear());
542
- this._attachedPortal = portal;
543
- this._attachedRef = viewRef;
544
- this.attached.emit(viewRef);
545
- return viewRef;
546
- }
547
- /** Gets the root node of the portal outlet. */
548
- _getRootNode() {
549
- const nativeElement = this._viewContainerRef.element.nativeElement;
550
- // The directive could be set on a template which will result in a comment
551
- // node being the root. Use the comment's parent node if that is the case.
552
- return (nativeElement.nodeType === nativeElement.ELEMENT_NODE
553
- ? nativeElement
554
- : nativeElement.parentNode);
555
- }
556
- }
557
- CdkPortalOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: CdkPortalOutlet, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
558
- CdkPortalOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.7", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: { portal: ["cdkPortalOutlet", "portal"] }, outputs: { attached: "attached" }, exportAs: ["cdkPortalOutlet"], usesInheritance: true, ngImport: i0 });
559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: CdkPortalOutlet, decorators: [{
560
- type: Directive,
561
- args: [{
562
- selector: '[cdkPortalOutlet]',
563
- exportAs: 'cdkPortalOutlet',
564
- inputs: ['portal: cdkPortalOutlet'],
565
- }]
566
- }], ctorParameters: function () {
567
- return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
568
- type: Inject,
569
- args: [DOCUMENT]
570
- }] }];
571
- }, propDecorators: { attached: [{
572
- type: Output
573
- }] } });
574
- /**
575
- * @deprecated Use `CdkPortalOutlet` instead.
576
- * @breaking-change 9.0.0
577
- */
578
- class PortalHostDirective extends CdkPortalOutlet {
579
- }
580
- PortalHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: PortalHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
581
- PortalHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.7", type: PortalHostDirective, selector: "[cdkPortalHost], [portalHost]", inputs: { portal: ["cdkPortalHost", "portal"] }, providers: [
582
- {
583
- provide: CdkPortalOutlet,
584
- useExisting: PortalHostDirective,
585
- },
586
- ], exportAs: ["cdkPortalHost"], usesInheritance: true, ngImport: i0 });
587
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: PortalHostDirective, decorators: [{
588
- type: Directive,
589
- args: [{
590
- selector: '[cdkPortalHost], [portalHost]',
591
- exportAs: 'cdkPortalHost',
592
- inputs: ['portal: cdkPortalHost'],
593
- providers: [
594
- {
595
- provide: CdkPortalOutlet,
596
- useExisting: PortalHostDirective,
597
- },
598
- ],
599
- }]
600
- }] });
601
- class PortalModule {
602
- }
603
- PortalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: PortalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
604
- PortalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.7", ngImport: i0, type: PortalModule, declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] });
605
- PortalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: PortalModule });
606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: PortalModule, decorators: [{
607
- type: NgModule,
608
- args: [{
609
- exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
610
- declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
611
- }]
612
- }] });
613
-
614
- /**
615
- * Custom injector to be used when providing custom
616
- * injection tokens to components inside a portal.
617
- * @docs-private
618
- * @deprecated Use `Injector.create` instead.
619
- * @breaking-change 11.0.0
620
- */
621
- class PortalInjector {
622
- constructor(_parentInjector, _customTokens) {
623
- this._parentInjector = _parentInjector;
624
- this._customTokens = _customTokens;
625
- }
626
- get(token, notFoundValue) {
627
- const value = this._customTokens.get(token);
628
- if (typeof value !== 'undefined') {
629
- return value;
630
- }
631
- return this._parentInjector.get(token, notFoundValue);
632
- }
633
- }
634
-
635
- /**
636
- * Generated bundle index. Do not edit.
637
- */
638
-
639
- export { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };
640
- //# sourceMappingURL=portal.mjs.map