@kato-lee/cdk 14.2.7

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