@angular/cdk 19.0.0-next.4 → 19.0.0-next.5

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 (288) hide show
  1. package/a11y/index.d.ts +19 -37
  2. package/accordion/index.d.ts +5 -4
  3. package/bidi/index.d.ts +2 -2
  4. package/clipboard/index.d.ts +3 -4
  5. package/dialog/index.d.ts +6 -9
  6. package/drag-drop/index.d.ts +16 -33
  7. package/fesm2022/a11y.mjs +81 -139
  8. package/fesm2022/a11y.mjs.map +1 -1
  9. package/fesm2022/accordion.mjs +11 -16
  10. package/fesm2022/accordion.mjs.map +1 -1
  11. package/fesm2022/bidi.mjs +5 -9
  12. package/fesm2022/bidi.mjs.map +1 -1
  13. package/fesm2022/cdk.mjs +1 -1
  14. package/fesm2022/cdk.mjs.map +1 -1
  15. package/fesm2022/clipboard.mjs +11 -18
  16. package/fesm2022/clipboard.mjs.map +1 -1
  17. package/fesm2022/coercion/private.mjs.map +1 -1
  18. package/fesm2022/coercion.mjs.map +1 -1
  19. package/fesm2022/collections.mjs.map +1 -1
  20. package/fesm2022/dialog.mjs +25 -45
  21. package/fesm2022/dialog.mjs.map +1 -1
  22. package/fesm2022/drag-drop.mjs +66 -125
  23. package/fesm2022/drag-drop.mjs.map +1 -1
  24. package/fesm2022/keycodes.mjs.map +1 -1
  25. package/fesm2022/layout.mjs +13 -18
  26. package/fesm2022/layout.mjs.map +1 -1
  27. package/fesm2022/listbox.mjs +7 -1
  28. package/fesm2022/listbox.mjs.map +1 -1
  29. package/fesm2022/menu.mjs.map +1 -1
  30. package/fesm2022/observers/private.mjs.map +1 -1
  31. package/fesm2022/observers.mjs +10 -10
  32. package/fesm2022/observers.mjs.map +1 -1
  33. package/fesm2022/overlay.mjs +73 -121
  34. package/fesm2022/overlay.mjs.map +1 -1
  35. package/fesm2022/platform.mjs.map +1 -1
  36. package/fesm2022/portal.mjs +45 -44
  37. package/fesm2022/portal.mjs.map +1 -1
  38. package/fesm2022/private.mjs.map +1 -1
  39. package/fesm2022/scrolling.mjs +59 -99
  40. package/fesm2022/scrolling.mjs.map +1 -1
  41. package/fesm2022/stepper.mjs +31 -40
  42. package/fesm2022/stepper.mjs.map +1 -1
  43. package/fesm2022/table.mjs +113 -171
  44. package/fesm2022/table.mjs.map +1 -1
  45. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  46. package/fesm2022/testing/testbed.mjs.map +1 -1
  47. package/fesm2022/testing.mjs.map +1 -1
  48. package/fesm2022/text-field.mjs +20 -27
  49. package/fesm2022/text-field.mjs.map +1 -1
  50. package/fesm2022/tree.mjs +50 -53
  51. package/fesm2022/tree.mjs.map +1 -1
  52. package/layout/index.d.ts +5 -7
  53. package/observers/index.d.ts +2 -2
  54. package/overlay/_index.scss +44 -11
  55. package/overlay/index.d.ts +16 -34
  56. package/overlay-prebuilt.css +1 -1
  57. package/package.json +1 -1
  58. package/portal/index.d.ts +21 -18
  59. package/schematics/index.d.ts +1 -1
  60. package/schematics/index.js +2 -2
  61. package/schematics/index.mjs +2 -2
  62. package/schematics/ng-add/index.d.ts +1 -1
  63. package/schematics/ng-add/index.js +3 -3
  64. package/schematics/ng-add/index.mjs +3 -3
  65. package/schematics/ng-add/package-config.d.ts +1 -1
  66. package/schematics/ng-add/package-config.js +2 -2
  67. package/schematics/ng-add/package-config.mjs +2 -2
  68. package/schematics/ng-add/schema.d.ts +1 -1
  69. package/schematics/ng-add/schema.js +2 -2
  70. package/schematics/ng-add/schema.mjs +2 -2
  71. package/schematics/ng-generate/drag-drop/index.d.ts +1 -1
  72. package/schematics/ng-generate/drag-drop/index.js +2 -2
  73. package/schematics/ng-generate/drag-drop/index.mjs +2 -2
  74. package/schematics/ng-generate/drag-drop/schema.d.ts +1 -1
  75. package/schematics/ng-generate/drag-drop/schema.js +2 -2
  76. package/schematics/ng-generate/drag-drop/schema.mjs +2 -2
  77. package/schematics/ng-update/data/attribute-selectors.d.ts +1 -1
  78. package/schematics/ng-update/data/attribute-selectors.js +2 -2
  79. package/schematics/ng-update/data/attribute-selectors.mjs +2 -2
  80. package/schematics/ng-update/data/class-names.d.ts +1 -1
  81. package/schematics/ng-update/data/class-names.js +2 -2
  82. package/schematics/ng-update/data/class-names.mjs +2 -2
  83. package/schematics/ng-update/data/constructor-checks.d.ts +1 -1
  84. package/schematics/ng-update/data/constructor-checks.js +2 -2
  85. package/schematics/ng-update/data/constructor-checks.mjs +2 -2
  86. package/schematics/ng-update/data/css-selectors.d.ts +1 -1
  87. package/schematics/ng-update/data/css-selectors.js +2 -2
  88. package/schematics/ng-update/data/css-selectors.mjs +2 -2
  89. package/schematics/ng-update/data/css-tokens.d.ts +1 -1
  90. package/schematics/ng-update/data/css-tokens.js +2 -2
  91. package/schematics/ng-update/data/css-tokens.mjs +2 -2
  92. package/schematics/ng-update/data/element-selectors.d.ts +1 -1
  93. package/schematics/ng-update/data/element-selectors.js +2 -2
  94. package/schematics/ng-update/data/element-selectors.mjs +2 -2
  95. package/schematics/ng-update/data/index.d.ts +1 -1
  96. package/schematics/ng-update/data/index.js +2 -2
  97. package/schematics/ng-update/data/index.mjs +2 -2
  98. package/schematics/ng-update/data/input-names.d.ts +1 -1
  99. package/schematics/ng-update/data/input-names.js +2 -2
  100. package/schematics/ng-update/data/input-names.mjs +2 -2
  101. package/schematics/ng-update/data/method-call-checks.d.ts +1 -1
  102. package/schematics/ng-update/data/method-call-checks.js +2 -2
  103. package/schematics/ng-update/data/method-call-checks.mjs +2 -2
  104. package/schematics/ng-update/data/output-names.d.ts +1 -1
  105. package/schematics/ng-update/data/output-names.js +2 -2
  106. package/schematics/ng-update/data/output-names.mjs +2 -2
  107. package/schematics/ng-update/data/property-names.d.ts +1 -1
  108. package/schematics/ng-update/data/property-names.js +2 -2
  109. package/schematics/ng-update/data/property-names.mjs +2 -2
  110. package/schematics/ng-update/data/symbol-removal.d.ts +1 -1
  111. package/schematics/ng-update/data/symbol-removal.js +2 -2
  112. package/schematics/ng-update/data/symbol-removal.mjs +2 -2
  113. package/schematics/ng-update/devkit-file-system.d.ts +1 -1
  114. package/schematics/ng-update/devkit-file-system.js +2 -2
  115. package/schematics/ng-update/devkit-file-system.mjs +2 -2
  116. package/schematics/ng-update/devkit-migration-rule.d.ts +1 -1
  117. package/schematics/ng-update/devkit-migration-rule.js +2 -2
  118. package/schematics/ng-update/devkit-migration-rule.mjs +2 -2
  119. package/schematics/ng-update/devkit-migration.d.ts +1 -1
  120. package/schematics/ng-update/devkit-migration.js +2 -2
  121. package/schematics/ng-update/devkit-migration.mjs +2 -2
  122. package/schematics/ng-update/find-stylesheets.d.ts +1 -1
  123. package/schematics/ng-update/find-stylesheets.js +2 -2
  124. package/schematics/ng-update/find-stylesheets.mjs +2 -2
  125. package/schematics/ng-update/html-parsing/angular.d.ts +1 -1
  126. package/schematics/ng-update/html-parsing/angular.js +2 -2
  127. package/schematics/ng-update/html-parsing/angular.mjs +2 -2
  128. package/schematics/ng-update/html-parsing/elements.d.ts +1 -1
  129. package/schematics/ng-update/html-parsing/elements.js +2 -2
  130. package/schematics/ng-update/html-parsing/elements.mjs +2 -2
  131. package/schematics/ng-update/index.d.ts +1 -1
  132. package/schematics/ng-update/index.js +2 -2
  133. package/schematics/ng-update/index.mjs +2 -2
  134. package/schematics/ng-update/migrations/attribute-selectors.d.ts +1 -1
  135. package/schematics/ng-update/migrations/attribute-selectors.js +2 -2
  136. package/schematics/ng-update/migrations/attribute-selectors.mjs +2 -2
  137. package/schematics/ng-update/migrations/class-inheritance.d.ts +1 -1
  138. package/schematics/ng-update/migrations/class-inheritance.js +2 -2
  139. package/schematics/ng-update/migrations/class-inheritance.mjs +2 -2
  140. package/schematics/ng-update/migrations/class-names.d.ts +1 -1
  141. package/schematics/ng-update/migrations/class-names.js +2 -2
  142. package/schematics/ng-update/migrations/class-names.mjs +2 -2
  143. package/schematics/ng-update/migrations/constructor-signature.d.ts +1 -1
  144. package/schematics/ng-update/migrations/constructor-signature.js +2 -2
  145. package/schematics/ng-update/migrations/constructor-signature.mjs +2 -2
  146. package/schematics/ng-update/migrations/css-selectors.d.ts +1 -1
  147. package/schematics/ng-update/migrations/css-selectors.js +2 -2
  148. package/schematics/ng-update/migrations/css-selectors.mjs +2 -2
  149. package/schematics/ng-update/migrations/css-tokens.d.ts +1 -1
  150. package/schematics/ng-update/migrations/css-tokens.js +2 -2
  151. package/schematics/ng-update/migrations/css-tokens.mjs +2 -2
  152. package/schematics/ng-update/migrations/element-selectors.d.ts +1 -1
  153. package/schematics/ng-update/migrations/element-selectors.js +2 -2
  154. package/schematics/ng-update/migrations/element-selectors.mjs +2 -2
  155. package/schematics/ng-update/migrations/input-names.d.ts +1 -1
  156. package/schematics/ng-update/migrations/input-names.js +2 -2
  157. package/schematics/ng-update/migrations/input-names.mjs +2 -2
  158. package/schematics/ng-update/migrations/method-call-arguments.d.ts +1 -1
  159. package/schematics/ng-update/migrations/method-call-arguments.js +2 -2
  160. package/schematics/ng-update/migrations/method-call-arguments.mjs +2 -2
  161. package/schematics/ng-update/migrations/misc-template.d.ts +1 -1
  162. package/schematics/ng-update/migrations/misc-template.js +2 -2
  163. package/schematics/ng-update/migrations/misc-template.mjs +2 -2
  164. package/schematics/ng-update/migrations/output-names.d.ts +1 -1
  165. package/schematics/ng-update/migrations/output-names.js +2 -2
  166. package/schematics/ng-update/migrations/output-names.mjs +2 -2
  167. package/schematics/ng-update/migrations/property-names.d.ts +1 -1
  168. package/schematics/ng-update/migrations/property-names.js +2 -2
  169. package/schematics/ng-update/migrations/property-names.mjs +2 -2
  170. package/schematics/ng-update/migrations/symbol-removal.d.ts +1 -1
  171. package/schematics/ng-update/migrations/symbol-removal.js +2 -2
  172. package/schematics/ng-update/migrations/symbol-removal.mjs +2 -2
  173. package/schematics/ng-update/public-api.d.ts +1 -1
  174. package/schematics/ng-update/public-api.js +2 -2
  175. package/schematics/ng-update/public-api.mjs +2 -2
  176. package/schematics/ng-update/typescript/base-types.d.ts +1 -1
  177. package/schematics/ng-update/typescript/base-types.js +2 -2
  178. package/schematics/ng-update/typescript/base-types.mjs +2 -2
  179. package/schematics/ng-update/typescript/imports.d.ts +1 -1
  180. package/schematics/ng-update/typescript/imports.js +2 -2
  181. package/schematics/ng-update/typescript/imports.mjs +2 -2
  182. package/schematics/ng-update/typescript/literal.d.ts +1 -1
  183. package/schematics/ng-update/typescript/literal.js +2 -2
  184. package/schematics/ng-update/typescript/literal.mjs +2 -2
  185. package/schematics/ng-update/typescript/module-specifiers.d.ts +1 -1
  186. package/schematics/ng-update/typescript/module-specifiers.js +2 -2
  187. package/schematics/ng-update/typescript/module-specifiers.mjs +2 -2
  188. package/schematics/ng-update/upgrade-data.d.ts +1 -1
  189. package/schematics/ng-update/upgrade-data.js +2 -2
  190. package/schematics/ng-update/upgrade-data.mjs +2 -2
  191. package/schematics/paths.d.ts +1 -1
  192. package/schematics/paths.js +2 -2
  193. package/schematics/paths.mjs +2 -2
  194. package/schematics/update-tool/component-resource-collector.d.ts +1 -1
  195. package/schematics/update-tool/component-resource-collector.js +2 -2
  196. package/schematics/update-tool/component-resource-collector.mjs +2 -2
  197. package/schematics/update-tool/file-system.d.ts +1 -1
  198. package/schematics/update-tool/file-system.js +2 -2
  199. package/schematics/update-tool/file-system.mjs +2 -2
  200. package/schematics/update-tool/index.d.ts +1 -1
  201. package/schematics/update-tool/index.js +2 -2
  202. package/schematics/update-tool/index.mjs +2 -2
  203. package/schematics/update-tool/logger.d.ts +1 -1
  204. package/schematics/update-tool/logger.js +2 -2
  205. package/schematics/update-tool/logger.mjs +2 -2
  206. package/schematics/update-tool/migration.d.ts +1 -1
  207. package/schematics/update-tool/migration.js +2 -2
  208. package/schematics/update-tool/migration.mjs +2 -2
  209. package/schematics/update-tool/public-api.d.ts +1 -1
  210. package/schematics/update-tool/public-api.js +2 -2
  211. package/schematics/update-tool/public-api.mjs +2 -2
  212. package/schematics/update-tool/target-version.d.ts +1 -1
  213. package/schematics/update-tool/target-version.js +2 -2
  214. package/schematics/update-tool/target-version.mjs +2 -2
  215. package/schematics/update-tool/update-recorder.d.ts +1 -1
  216. package/schematics/update-tool/update-recorder.js +2 -2
  217. package/schematics/update-tool/update-recorder.mjs +2 -2
  218. package/schematics/update-tool/utils/decorators.d.ts +1 -1
  219. package/schematics/update-tool/utils/decorators.js +2 -2
  220. package/schematics/update-tool/utils/decorators.mjs +2 -2
  221. package/schematics/update-tool/utils/diagnostics.d.ts +1 -1
  222. package/schematics/update-tool/utils/diagnostics.js +2 -2
  223. package/schematics/update-tool/utils/diagnostics.mjs +2 -2
  224. package/schematics/update-tool/utils/functions.d.ts +1 -1
  225. package/schematics/update-tool/utils/functions.js +2 -2
  226. package/schematics/update-tool/utils/functions.mjs +2 -2
  227. package/schematics/update-tool/utils/imports.d.ts +1 -1
  228. package/schematics/update-tool/utils/imports.js +2 -2
  229. package/schematics/update-tool/utils/imports.mjs +2 -2
  230. package/schematics/update-tool/utils/line-mappings.d.ts +1 -1
  231. package/schematics/update-tool/utils/line-mappings.js +2 -2
  232. package/schematics/update-tool/utils/line-mappings.mjs +2 -2
  233. package/schematics/update-tool/utils/parse-tsconfig.d.ts +1 -1
  234. package/schematics/update-tool/utils/parse-tsconfig.js +2 -2
  235. package/schematics/update-tool/utils/parse-tsconfig.mjs +2 -2
  236. package/schematics/update-tool/utils/property-name.d.ts +1 -1
  237. package/schematics/update-tool/utils/property-name.js +2 -2
  238. package/schematics/update-tool/utils/property-name.mjs +2 -2
  239. package/schematics/update-tool/utils/virtual-host.d.ts +1 -1
  240. package/schematics/update-tool/utils/virtual-host.js +2 -2
  241. package/schematics/update-tool/utils/virtual-host.mjs +2 -2
  242. package/schematics/update-tool/version-changes.d.ts +1 -1
  243. package/schematics/update-tool/version-changes.js +2 -2
  244. package/schematics/update-tool/version-changes.mjs +2 -2
  245. package/schematics/utils/ast/ng-module-imports.d.ts +1 -1
  246. package/schematics/utils/ast/ng-module-imports.js +2 -2
  247. package/schematics/utils/ast/ng-module-imports.mjs +2 -2
  248. package/schematics/utils/ast.d.ts +1 -1
  249. package/schematics/utils/ast.js +2 -2
  250. package/schematics/utils/ast.mjs +2 -2
  251. package/schematics/utils/build-component.d.ts +1 -1
  252. package/schematics/utils/build-component.js +2 -2
  253. package/schematics/utils/build-component.mjs +2 -2
  254. package/schematics/utils/get-project.d.ts +1 -1
  255. package/schematics/utils/get-project.js +2 -2
  256. package/schematics/utils/get-project.mjs +2 -2
  257. package/schematics/utils/html-manipulation.d.ts +1 -1
  258. package/schematics/utils/html-manipulation.js +2 -2
  259. package/schematics/utils/html-manipulation.mjs +2 -2
  260. package/schematics/utils/index.d.ts +1 -1
  261. package/schematics/utils/index.js +2 -2
  262. package/schematics/utils/index.mjs +2 -2
  263. package/schematics/utils/parse5-element.d.ts +1 -1
  264. package/schematics/utils/parse5-element.js +2 -2
  265. package/schematics/utils/parse5-element.mjs +2 -2
  266. package/schematics/utils/project-index-file.d.ts +1 -1
  267. package/schematics/utils/project-index-file.js +2 -2
  268. package/schematics/utils/project-index-file.mjs +2 -2
  269. package/schematics/utils/project-main-file.d.ts +1 -1
  270. package/schematics/utils/project-main-file.js +2 -2
  271. package/schematics/utils/project-main-file.mjs +2 -2
  272. package/schematics/utils/project-style-file.d.ts +1 -1
  273. package/schematics/utils/project-style-file.js +2 -2
  274. package/schematics/utils/project-style-file.mjs +2 -2
  275. package/schematics/utils/project-targets.d.ts +1 -1
  276. package/schematics/utils/project-targets.js +2 -2
  277. package/schematics/utils/project-targets.mjs +2 -2
  278. package/schematics/utils/project-tsconfig-paths.d.ts +1 -1
  279. package/schematics/utils/project-tsconfig-paths.js +2 -2
  280. package/schematics/utils/project-tsconfig-paths.mjs +2 -2
  281. package/schematics/utils/schematic-options.d.ts +1 -1
  282. package/schematics/utils/schematic-options.js +2 -2
  283. package/schematics/utils/schematic-options.mjs +2 -2
  284. package/scrolling/index.d.ts +17 -37
  285. package/stepper/index.d.ts +9 -11
  286. package/table/index.d.ts +36 -51
  287. package/text-field/index.d.ts +5 -9
  288. package/tree/index.d.ts +11 -13
@@ -1 +1 @@
1
- {"version":3,"file":"private.mjs","sources":["../../../../../../../src/cdk/observers/private/shared-resize-observer.ts","../../../../../../../src/cdk/observers/private/private_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {inject, Injectable, NgZone, OnDestroy} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {filter, shareReplay, takeUntil} from 'rxjs/operators';\n\n/**\n * Handler that logs \"ResizeObserver loop limit exceeded\" errors.\n * These errors are not shown in the Chrome console, so we log them to ensure developers are aware.\n * @param e The error\n */\nconst loopLimitExceededErrorHandler = (e: unknown) => {\n if (e instanceof ErrorEvent && e.message === 'ResizeObserver loop limit exceeded') {\n console.error(\n `${e.message}. This could indicate a performance issue with your app. See https://github.com/WICG/resize-observer/blob/master/explainer.md#error-handling`,\n );\n }\n};\n\n/**\n * A shared ResizeObserver to be used for a particular box type (content-box, border-box, or\n * device-pixel-content-box)\n */\nclass SingleBoxSharedResizeObserver {\n /** Stream that emits when the shared observer is destroyed. */\n private _destroyed = new Subject<void>();\n /** Stream of all events from the ResizeObserver. */\n private _resizeSubject = new Subject<ResizeObserverEntry[]>();\n /** ResizeObserver used to observe element resize events. */\n private _resizeObserver?: ResizeObserver;\n /** A map of elements to streams of their resize events. */\n private _elementObservables = new Map<Element, Observable<ResizeObserverEntry[]>>();\n\n constructor(\n /** The box type to observe for resizes. */\n private _box: ResizeObserverBoxOptions,\n ) {\n if (typeof ResizeObserver !== 'undefined') {\n this._resizeObserver = new ResizeObserver(entries => this._resizeSubject.next(entries));\n }\n }\n\n /**\n * Gets a stream of resize events for the given element.\n * @param target The element to observe.\n * @return The stream of resize events for the element.\n */\n observe(target: Element): Observable<ResizeObserverEntry[]> {\n if (!this._elementObservables.has(target)) {\n this._elementObservables.set(\n target,\n new Observable<ResizeObserverEntry[]>(observer => {\n const subscription = this._resizeSubject.subscribe(observer);\n this._resizeObserver?.observe(target, {box: this._box});\n return () => {\n this._resizeObserver?.unobserve(target);\n subscription.unsubscribe();\n this._elementObservables.delete(target);\n };\n }).pipe(\n filter(entries => entries.some(entry => entry.target === target)),\n // Share a replay of the last event so that subsequent calls to observe the same element\n // receive initial sizing info like the first one. Also enable ref counting so the\n // element will be automatically unobserved when there are no more subscriptions.\n shareReplay({bufferSize: 1, refCount: true}),\n takeUntil(this._destroyed),\n ),\n );\n }\n return this._elementObservables.get(target)!;\n }\n\n /** Destroys this instance. */\n destroy() {\n this._destroyed.next();\n this._destroyed.complete();\n this._resizeSubject.complete();\n this._elementObservables.clear();\n }\n}\n\n/**\n * Allows observing resize events on multiple elements using a shared set of ResizeObserver.\n * Sharing a ResizeObserver instance is recommended for better performance (see\n * https://github.com/WICG/resize-observer/issues/59).\n *\n * Rather than share a single `ResizeObserver`, this class creates one `ResizeObserver` per type\n * of observed box ('content-box', 'border-box', and 'device-pixel-content-box'). This avoids\n * later calls to `observe` with a different box type from influencing the events dispatched to\n * earlier calls.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SharedResizeObserver implements OnDestroy {\n /** Map of box type to shared resize observer. */\n private _observers = new Map<ResizeObserverBoxOptions, SingleBoxSharedResizeObserver>();\n\n /** The Angular zone. */\n private _ngZone = inject(NgZone);\n\n constructor() {\n if (typeof ResizeObserver !== 'undefined' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n this._ngZone.runOutsideAngular(() => {\n window.addEventListener('error', loopLimitExceededErrorHandler);\n });\n }\n }\n\n ngOnDestroy() {\n for (const [, observer] of this._observers) {\n observer.destroy();\n }\n this._observers.clear();\n if (typeof ResizeObserver !== 'undefined' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n window.removeEventListener('error', loopLimitExceededErrorHandler);\n }\n }\n\n /**\n * Gets a stream of resize events for the given target element and box type.\n * @param target The element to observe for resizes.\n * @param options Options to pass to the `ResizeObserver`\n * @return The stream of resize events for the element.\n */\n observe(target: Element, options?: ResizeObserverOptions): Observable<ResizeObserverEntry[]> {\n const box = options?.box || 'content-box';\n if (!this._observers.has(box)) {\n this._observers.set(box, new SingleBoxSharedResizeObserver(box));\n }\n return this._observers.get(box)!.observe(target);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA;;;;AAIG;AACH,MAAM,6BAA6B,GAAG,CAAC,CAAU,KAAI;IACnD,IAAI,CAAC,YAAY,UAAU,IAAI,CAAC,CAAC,OAAO,KAAK,oCAAoC,EAAE;QACjF,OAAO,CAAC,KAAK,CACX,CAAA,EAAG,CAAC,CAAC,OAAO,CAA8I,4IAAA,CAAA,CAC3J,CAAC;KACH;AACH,CAAC,CAAC;AAEF;;;AAGG;AACH,MAAM,6BAA6B,CAAA;AAUjC,IAAA,WAAA;;IAEU,IAA8B,EAAA;QAA9B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAA0B;;AAVhC,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,OAAO,EAAQ,CAAC;;AAEjC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,OAAO,EAAyB,CAAC;;AAItD,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAA8C,CAAC;AAMlF,QAAA,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;AACzC,YAAA,IAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;SACzF;KACF;AAED;;;;AAIG;AACH,IAAA,OAAO,CAAC,MAAe,EAAA;QACrB,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;AACzC,YAAA,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAC1B,MAAM,EACN,IAAI,UAAU,CAAwB,QAAQ,IAAG;gBAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,cA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,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA,CAAA,EAAA;;kGAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;AClGD;;AAEG;;;;"}
1
+ {"version":3,"file":"private.mjs","sources":["../../../../../../../src/cdk/observers/private/shared-resize-observer.ts","../../../../../../../src/cdk/observers/private/private_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {inject, Injectable, NgZone, OnDestroy} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {filter, shareReplay, takeUntil} from 'rxjs/operators';\n\n/**\n * Handler that logs \"ResizeObserver loop limit exceeded\" errors.\n * These errors are not shown in the Chrome console, so we log them to ensure developers are aware.\n * @param e The error\n */\nconst loopLimitExceededErrorHandler = (e: unknown) => {\n if (e instanceof ErrorEvent && e.message === 'ResizeObserver loop limit exceeded') {\n console.error(\n `${e.message}. This could indicate a performance issue with your app. See https://github.com/WICG/resize-observer/blob/master/explainer.md#error-handling`,\n );\n }\n};\n\n/**\n * A shared ResizeObserver to be used for a particular box type (content-box, border-box, or\n * device-pixel-content-box)\n */\nclass SingleBoxSharedResizeObserver {\n /** Stream that emits when the shared observer is destroyed. */\n private _destroyed = new Subject<void>();\n /** Stream of all events from the ResizeObserver. */\n private _resizeSubject = new Subject<ResizeObserverEntry[]>();\n /** ResizeObserver used to observe element resize events. */\n private _resizeObserver?: ResizeObserver;\n /** A map of elements to streams of their resize events. */\n private _elementObservables = new Map<Element, Observable<ResizeObserverEntry[]>>();\n\n constructor(\n /** The box type to observe for resizes. */\n private _box: ResizeObserverBoxOptions,\n ) {\n if (typeof ResizeObserver !== 'undefined') {\n this._resizeObserver = new ResizeObserver(entries => this._resizeSubject.next(entries));\n }\n }\n\n /**\n * Gets a stream of resize events for the given element.\n * @param target The element to observe.\n * @return The stream of resize events for the element.\n */\n observe(target: Element): Observable<ResizeObserverEntry[]> {\n if (!this._elementObservables.has(target)) {\n this._elementObservables.set(\n target,\n new Observable<ResizeObserverEntry[]>(observer => {\n const subscription = this._resizeSubject.subscribe(observer);\n this._resizeObserver?.observe(target, {box: this._box});\n return () => {\n this._resizeObserver?.unobserve(target);\n subscription.unsubscribe();\n this._elementObservables.delete(target);\n };\n }).pipe(\n filter(entries => entries.some(entry => entry.target === target)),\n // Share a replay of the last event so that subsequent calls to observe the same element\n // receive initial sizing info like the first one. Also enable ref counting so the\n // element will be automatically unobserved when there are no more subscriptions.\n shareReplay({bufferSize: 1, refCount: true}),\n takeUntil(this._destroyed),\n ),\n );\n }\n return this._elementObservables.get(target)!;\n }\n\n /** Destroys this instance. */\n destroy() {\n this._destroyed.next();\n this._destroyed.complete();\n this._resizeSubject.complete();\n this._elementObservables.clear();\n }\n}\n\n/**\n * Allows observing resize events on multiple elements using a shared set of ResizeObserver.\n * Sharing a ResizeObserver instance is recommended for better performance (see\n * https://github.com/WICG/resize-observer/issues/59).\n *\n * Rather than share a single `ResizeObserver`, this class creates one `ResizeObserver` per type\n * of observed box ('content-box', 'border-box', and 'device-pixel-content-box'). This avoids\n * later calls to `observe` with a different box type from influencing the events dispatched to\n * earlier calls.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SharedResizeObserver implements OnDestroy {\n /** Map of box type to shared resize observer. */\n private _observers = new Map<ResizeObserverBoxOptions, SingleBoxSharedResizeObserver>();\n\n /** The Angular zone. */\n private _ngZone = inject(NgZone);\n\n constructor() {\n if (typeof ResizeObserver !== 'undefined' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n this._ngZone.runOutsideAngular(() => {\n window.addEventListener('error', loopLimitExceededErrorHandler);\n });\n }\n }\n\n ngOnDestroy() {\n for (const [, observer] of this._observers) {\n observer.destroy();\n }\n this._observers.clear();\n if (typeof ResizeObserver !== 'undefined' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n window.removeEventListener('error', loopLimitExceededErrorHandler);\n }\n }\n\n /**\n * Gets a stream of resize events for the given target element and box type.\n * @param target The element to observe for resizes.\n * @param options Options to pass to the `ResizeObserver`\n * @return The stream of resize events for the element.\n */\n observe(target: Element, options?: ResizeObserverOptions): Observable<ResizeObserverEntry[]> {\n const box = options?.box || 'content-box';\n if (!this._observers.has(box)) {\n this._observers.set(box, new SingleBoxSharedResizeObserver(box));\n }\n return this._observers.get(box)!.observe(target);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA;;;;AAIG;AACH,MAAM,6BAA6B,GAAG,CAAC,CAAU,KAAI;IACnD,IAAI,CAAC,YAAY,UAAU,IAAI,CAAC,CAAC,OAAO,KAAK,oCAAoC,EAAE;QACjF,OAAO,CAAC,KAAK,CACX,CAAA,EAAG,CAAC,CAAC,OAAO,CAA8I,4IAAA,CAAA,CAC3J,CAAC;KACH;AACH,CAAC,CAAC;AAEF;;;AAGG;AACH,MAAM,6BAA6B,CAAA;AAUjC,IAAA,WAAA;;IAEU,IAA8B,EAAA;QAA9B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAA0B;;AAVhC,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,OAAO,EAAQ,CAAC;;AAEjC,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,OAAO,EAAyB,CAAC;;AAItD,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAA8C,CAAC;AAMlF,QAAA,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;AACzC,YAAA,IAAI,CAAC,eAAe,GAAG,IAAI,cAAc,CAAC,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;SACzF;KACF;AAED;;;;AAIG;AACH,IAAA,OAAO,CAAC,MAAe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,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAApB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA,CAAA,EAAA;;kGAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;AClGD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { coerceElement, coerceNumberProperty } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, inject, NgZone, EventEmitter, booleanAttribute, Directive, Output, Input, NgModule } from '@angular/core';
3
+ import { Injectable, inject, NgZone, ElementRef, EventEmitter, booleanAttribute, Directive, Output, Input, NgModule } from '@angular/core';
4
4
  import { Observable, Subject } from 'rxjs';
5
5
  import { map, filter, debounceTime } from 'rxjs/operators';
6
6
 
@@ -47,8 +47,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
47
47
  }] });
48
48
  /** An injectable service that allows watching elements for changes to their content. */
49
49
  class ContentObserver {
50
- constructor(_mutationObserverFactory) {
51
- this._mutationObserverFactory = _mutationObserverFactory;
50
+ constructor() {
51
+ this._mutationObserverFactory = inject(MutationObserverFactory);
52
52
  /** Keeps track of the existing MutationObservers so they can be reused. */
53
53
  this._observedElements = new Map();
54
54
  this._ngZone = inject(NgZone);
@@ -120,13 +120,13 @@ class ContentObserver {
120
120
  this._observedElements.delete(element);
121
121
  }
122
122
  }
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ContentObserver, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
123
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ContentObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
124
124
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ContentObserver, providedIn: 'root' }); }
125
125
  }
126
126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ContentObserver, decorators: [{
127
127
  type: Injectable,
128
128
  args: [{ providedIn: 'root' }]
129
- }], ctorParameters: () => [{ type: MutationObserverFactory }] });
129
+ }], ctorParameters: () => [] });
130
130
  /**
131
131
  * Directive that triggers a callback whenever the content of
132
132
  * its associated element has changed.
@@ -151,9 +151,9 @@ class CdkObserveContent {
151
151
  this._debounce = coerceNumberProperty(value);
152
152
  this._subscribe();
153
153
  }
154
- constructor(_contentObserver, _elementRef) {
155
- this._contentObserver = _contentObserver;
156
- this._elementRef = _elementRef;
154
+ constructor() {
155
+ this._contentObserver = inject(ContentObserver);
156
+ this._elementRef = inject(ElementRef);
157
157
  /** Event emitted for each change in the element's content. */
158
158
  this.event = new EventEmitter();
159
159
  this._disabled = false;
@@ -175,7 +175,7 @@ class CdkObserveContent {
175
175
  _unsubscribe() {
176
176
  this._currentSubscription?.unsubscribe();
177
177
  }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkObserveContent, deps: [{ token: ContentObserver }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkObserveContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
179
179
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-next.3", type: CdkObserveContent, isStandalone: true, selector: "[cdkObserveContent]", inputs: { disabled: ["cdkObserveContentDisabled", "disabled", booleanAttribute], debounce: "debounce" }, outputs: { event: "cdkObserveContent" }, exportAs: ["cdkObserveContent"], ngImport: i0 }); }
180
180
  }
181
181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkObserveContent, decorators: [{
@@ -185,7 +185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
185
185
  exportAs: 'cdkObserveContent',
186
186
  standalone: true,
187
187
  }]
188
- }], ctorParameters: () => [{ type: ContentObserver }, { type: i0.ElementRef }], propDecorators: { event: [{
188
+ }], ctorParameters: () => [], propDecorators: { event: [{
189
189
  type: Output,
190
190
  args: ['cdkObserveContent']
191
191
  }], disabled: [{
@@ -1 +1 @@
1
- {"version":3,"file":"observers.mjs","sources":["../../../../../../src/cdk/observers/observe-content.ts","../../../../../../src/cdk/observers/observers_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NumberInput, coerceElement, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n Input,\n NgModule,\n NgZone,\n OnDestroy,\n Output,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {Observable, Observer, Subject, Subscription} from 'rxjs';\nimport {debounceTime, filter, map} from 'rxjs/operators';\n\n// Angular may add, remove, or edit comment nodes during change detection. We don't care about\n// these changes because they don't affect the user-preceived content, and worse it can cause\n// infinite change detection cycles where the change detection updates a comment, triggering the\n// MutationObserver, triggering another change detection and kicking the cycle off again.\nfunction shouldIgnoreRecord(record: MutationRecord) {\n // Ignore changes to comment text.\n if (record.type === 'characterData' && record.target instanceof Comment) {\n return true;\n }\n // Ignore addition / removal of comments.\n if (record.type === 'childList') {\n for (let i = 0; i < record.addedNodes.length; i++) {\n if (!(record.addedNodes[i] instanceof Comment)) {\n return false;\n }\n }\n for (let i = 0; i < record.removedNodes.length; i++) {\n if (!(record.removedNodes[i] instanceof Comment)) {\n return false;\n }\n }\n return true;\n }\n // Observe everything else.\n return false;\n}\n\n/**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class MutationObserverFactory {\n create(callback: MutationCallback): MutationObserver | null {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n }\n}\n\n/** An injectable service that allows watching elements for changes to their content. */\n@Injectable({providedIn: 'root'})\nexport class ContentObserver implements OnDestroy {\n /** Keeps track of the existing MutationObservers so they can be reused. */\n private _observedElements = new Map<\n Element,\n {\n observer: MutationObserver | null;\n readonly stream: Subject<MutationRecord[]>;\n count: number;\n }\n >();\n\n private _ngZone = inject(NgZone);\n\n constructor(private _mutationObserverFactory: MutationObserverFactory) {}\n\n ngOnDestroy() {\n this._observedElements.forEach((_, element) => this._cleanupObserver(element));\n }\n\n /**\n * Observe content changes on an element.\n * @param element The element to observe for content changes.\n */\n observe(element: Element): Observable<MutationRecord[]>;\n\n /**\n * Observe content changes on an element.\n * @param element The element to observe for content changes.\n */\n observe(element: ElementRef<Element>): Observable<MutationRecord[]>;\n\n observe(elementOrRef: Element | ElementRef<Element>): Observable<MutationRecord[]> {\n const element = coerceElement(elementOrRef);\n\n return new Observable((observer: Observer<MutationRecord[]>) => {\n const stream = this._observeElement(element);\n const subscription = stream\n .pipe(\n map(records => records.filter(record => !shouldIgnoreRecord(record))),\n filter(records => !!records.length),\n )\n .subscribe(records => {\n this._ngZone.run(() => {\n observer.next(records);\n });\n });\n\n return () => {\n subscription.unsubscribe();\n this._unobserveElement(element);\n };\n });\n }\n\n /**\n * Observes the given element by using the existing MutationObserver if available, or creating a\n * new one if not.\n */\n private _observeElement(element: Element): Subject<MutationRecord[]> {\n return this._ngZone.runOutsideAngular(() => {\n if (!this._observedElements.has(element)) {\n const stream = new Subject<MutationRecord[]>();\n const observer = this._mutationObserverFactory.create(mutations => stream.next(mutations));\n if (observer) {\n observer.observe(element, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n this._observedElements.set(element, {observer, stream, count: 1});\n } else {\n this._observedElements.get(element)!.count++;\n }\n return this._observedElements.get(element)!.stream;\n });\n }\n\n /**\n * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is\n * observing this element.\n */\n private _unobserveElement(element: Element) {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element)!.count--;\n if (!this._observedElements.get(element)!.count) {\n this._cleanupObserver(element);\n }\n }\n }\n\n /** Clean up the underlying MutationObserver for the specified element. */\n private _cleanupObserver(element: Element) {\n if (this._observedElements.has(element)) {\n const {observer, stream} = this._observedElements.get(element)!;\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n }\n}\n\n/**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\n@Directive({\n selector: '[cdkObserveContent]',\n exportAs: 'cdkObserveContent',\n standalone: true,\n})\nexport class CdkObserveContent implements AfterContentInit, OnDestroy {\n /** Event emitted for each change in the element's content. */\n @Output('cdkObserveContent') readonly event = new EventEmitter<MutationRecord[]>();\n\n /**\n * Whether observing content is disabled. This option can be used\n * to disconnect the underlying MutationObserver until it is needed.\n */\n @Input({alias: 'cdkObserveContentDisabled', transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n this._disabled ? this._unsubscribe() : this._subscribe();\n }\n private _disabled = false;\n\n /** Debounce interval for emitting the changes. */\n @Input()\n get debounce(): number {\n return this._debounce;\n }\n set debounce(value: NumberInput) {\n this._debounce = coerceNumberProperty(value);\n this._subscribe();\n }\n private _debounce: number;\n\n private _currentSubscription: Subscription | null = null;\n\n constructor(\n private _contentObserver: ContentObserver,\n private _elementRef: ElementRef<HTMLElement>,\n ) {}\n\n ngAfterContentInit() {\n if (!this._currentSubscription && !this.disabled) {\n this._subscribe();\n }\n }\n\n ngOnDestroy() {\n this._unsubscribe();\n }\n\n private _subscribe() {\n this._unsubscribe();\n const stream = this._contentObserver.observe(this._elementRef);\n\n this._currentSubscription = (\n this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream\n ).subscribe(this.event);\n }\n\n private _unsubscribe() {\n this._currentSubscription?.unsubscribe();\n }\n}\n\n@NgModule({\n imports: [CdkObserveContent],\n exports: [CdkObserveContent],\n providers: [MutationObserverFactory],\n})\nexport class ObserversModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA0BA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,MAAsB,EAAA;;AAEhD,IAAA,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,IAAI,MAAM,CAAC,MAAM,YAAY,OAAO,EAAE;AACvE,QAAA,OAAO,IAAI,CAAC;KACb;;AAED,IAAA,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE;AAC/B,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACjD,YAAA,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,OAAO,CAAC,EAAE;AAC9C,gBAAA,OAAO,KAAK,CAAC;aACd;SACF;AACD,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACnD,YAAA,IAAI,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,OAAO,CAAC,EAAE;AAChD,gBAAA,OAAO,KAAK,CAAC;aACd;SACF;AACD,QAAA,OAAO,IAAI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B;AAC7B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;0GAGuC,KAAK,EAAA,CAAA;sBAA1C,MAAM;uBAAC,mBAAmB,CAAA;gBAOvB,QAAQ,EAAA,CAAA;sBADX,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAC,KAAK,EAAE,2BAA2B,EAAE,SAAS,EAAE,gBAAgB,EAAC,CAAA;gBAYpE,QAAQ,EAAA,CAAA;sBADX,KAAK;;MA8CK,eAAe,CAAA;qHAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;sHAAf,eAAe,EAAA,OAAA,EAAA,CAjEf,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAAjB,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;sHAiEjB,eAAe,EAAA,SAAA,EAFf,CAAC,uBAAuB,CAAC,EAAA,CAAA,CAAA,EAAA;;kGAEzB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,SAAS,EAAE,CAAC,uBAAuB,CAAC;AACrC,iBAAA,CAAA;;;ACnPD;;AAEG;;;;"}
1
+ {"version":3,"file":"observers.mjs","sources":["../../../../../../src/cdk/observers/observe-content.ts","../../../../../../src/cdk/observers/observers_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NumberInput, coerceElement, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentInit,\n Directive,\n ElementRef,\n EventEmitter,\n Injectable,\n Input,\n NgModule,\n NgZone,\n OnDestroy,\n Output,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {Observable, Observer, Subject, Subscription} from 'rxjs';\nimport {debounceTime, filter, map} from 'rxjs/operators';\n\n// Angular may add, remove, or edit comment nodes during change detection. We don't care about\n// these changes because they don't affect the user-preceived content, and worse it can cause\n// infinite change detection cycles where the change detection updates a comment, triggering the\n// MutationObserver, triggering another change detection and kicking the cycle off again.\nfunction shouldIgnoreRecord(record: MutationRecord) {\n // Ignore changes to comment text.\n if (record.type === 'characterData' && record.target instanceof Comment) {\n return true;\n }\n // Ignore addition / removal of comments.\n if (record.type === 'childList') {\n for (let i = 0; i < record.addedNodes.length; i++) {\n if (!(record.addedNodes[i] instanceof Comment)) {\n return false;\n }\n }\n for (let i = 0; i < record.removedNodes.length; i++) {\n if (!(record.removedNodes[i] instanceof Comment)) {\n return false;\n }\n }\n return true;\n }\n // Observe everything else.\n return false;\n}\n\n/**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class MutationObserverFactory {\n create(callback: MutationCallback): MutationObserver | null {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n }\n}\n\n/** An injectable service that allows watching elements for changes to their content. */\n@Injectable({providedIn: 'root'})\nexport class ContentObserver implements OnDestroy {\n private _mutationObserverFactory = inject(MutationObserverFactory);\n\n /** Keeps track of the existing MutationObservers so they can be reused. */\n private _observedElements = new Map<\n Element,\n {\n observer: MutationObserver | null;\n readonly stream: Subject<MutationRecord[]>;\n count: number;\n }\n >();\n\n private _ngZone = inject(NgZone);\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngOnDestroy() {\n this._observedElements.forEach((_, element) => this._cleanupObserver(element));\n }\n\n /**\n * Observe content changes on an element.\n * @param element The element to observe for content changes.\n */\n observe(element: Element): Observable<MutationRecord[]>;\n\n /**\n * Observe content changes on an element.\n * @param element The element to observe for content changes.\n */\n observe(element: ElementRef<Element>): Observable<MutationRecord[]>;\n\n observe(elementOrRef: Element | ElementRef<Element>): Observable<MutationRecord[]> {\n const element = coerceElement(elementOrRef);\n\n return new Observable((observer: Observer<MutationRecord[]>) => {\n const stream = this._observeElement(element);\n const subscription = stream\n .pipe(\n map(records => records.filter(record => !shouldIgnoreRecord(record))),\n filter(records => !!records.length),\n )\n .subscribe(records => {\n this._ngZone.run(() => {\n observer.next(records);\n });\n });\n\n return () => {\n subscription.unsubscribe();\n this._unobserveElement(element);\n };\n });\n }\n\n /**\n * Observes the given element by using the existing MutationObserver if available, or creating a\n * new one if not.\n */\n private _observeElement(element: Element): Subject<MutationRecord[]> {\n return this._ngZone.runOutsideAngular(() => {\n if (!this._observedElements.has(element)) {\n const stream = new Subject<MutationRecord[]>();\n const observer = this._mutationObserverFactory.create(mutations => stream.next(mutations));\n if (observer) {\n observer.observe(element, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n this._observedElements.set(element, {observer, stream, count: 1});\n } else {\n this._observedElements.get(element)!.count++;\n }\n return this._observedElements.get(element)!.stream;\n });\n }\n\n /**\n * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is\n * observing this element.\n */\n private _unobserveElement(element: Element) {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element)!.count--;\n if (!this._observedElements.get(element)!.count) {\n this._cleanupObserver(element);\n }\n }\n }\n\n /** Clean up the underlying MutationObserver for the specified element. */\n private _cleanupObserver(element: Element) {\n if (this._observedElements.has(element)) {\n const {observer, stream} = this._observedElements.get(element)!;\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n }\n}\n\n/**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\n@Directive({\n selector: '[cdkObserveContent]',\n exportAs: 'cdkObserveContent',\n standalone: true,\n})\nexport class CdkObserveContent implements AfterContentInit, OnDestroy {\n private _contentObserver = inject(ContentObserver);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Event emitted for each change in the element's content. */\n @Output('cdkObserveContent') readonly event = new EventEmitter<MutationRecord[]>();\n\n /**\n * Whether observing content is disabled. This option can be used\n * to disconnect the underlying MutationObserver until it is needed.\n */\n @Input({alias: 'cdkObserveContentDisabled', transform: booleanAttribute})\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n this._disabled ? this._unsubscribe() : this._subscribe();\n }\n private _disabled = false;\n\n /** Debounce interval for emitting the changes. */\n @Input()\n get debounce(): number {\n return this._debounce;\n }\n set debounce(value: NumberInput) {\n this._debounce = coerceNumberProperty(value);\n this._subscribe();\n }\n private _debounce: number;\n\n private _currentSubscription: Subscription | null = null;\n\n constructor(...args: unknown[]);\n constructor() {}\n\n ngAfterContentInit() {\n if (!this._currentSubscription && !this.disabled) {\n this._subscribe();\n }\n }\n\n ngOnDestroy() {\n this._unsubscribe();\n }\n\n private _subscribe() {\n this._unsubscribe();\n const stream = this._contentObserver.observe(this._elementRef);\n\n this._currentSubscription = (\n this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream\n ).subscribe(this.event);\n }\n\n private _unsubscribe() {\n this._currentSubscription?.unsubscribe();\n }\n}\n\n@NgModule({\n imports: [CdkObserveContent],\n exports: [CdkObserveContent],\n providers: [MutationObserverFactory],\n})\nexport class ObserversModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA0BA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,MAAsB,EAAA;;AAEhD,IAAA,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,IAAI,MAAM,CAAC,MAAM,YAAY,OAAO,EAAE;AACvE,QAAA,OAAO,IAAI,CAAC;KACb;;AAED,IAAA,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE;AAC/B,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACjD,YAAA,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,C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from '@angular/cdk/scrolling';
3
2
  export { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';
4
- import * as i6 from '@angular/common';
5
- import { DOCUMENT } from '@angular/common';
3
+ import { DOCUMENT, Location } from '@angular/common';
6
4
  import * as i0 from '@angular/core';
7
- import { Injectable, Inject, Optional, Component, ChangeDetectionStrategy, ViewEncapsulation, inject, untracked, afterRender, afterNextRender, ElementRef, EnvironmentInjector, ApplicationRef, ANIMATION_MODULE_TYPE, InjectionToken, Directive, NgZone, EventEmitter, booleanAttribute, Input, Output, NgModule } from '@angular/core';
5
+ import { inject, NgZone, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, untracked, afterRender, afterNextRender, ElementRef, ComponentFactoryResolver, Injector, ANIMATION_MODULE_TYPE, EnvironmentInjector, ApplicationRef, InjectionToken, Directive, EventEmitter, TemplateRef, ViewContainerRef, booleanAttribute, Input, Output, NgModule } from '@angular/core';
8
6
  import { coerceCssPixelValue, coerceArray } from '@angular/cdk/coercion';
9
- import * as i1$1 from '@angular/cdk/platform';
10
- import { supportsScrollBehavior, _getEventTarget, _isTestEnvironment } from '@angular/cdk/platform';
7
+ import { supportsScrollBehavior, Platform, _getEventTarget, _isTestEnvironment } from '@angular/cdk/platform';
11
8
  import { filter, takeUntil, takeWhile } from 'rxjs/operators';
12
- import * as i5 from '@angular/cdk/bidi';
13
- import { BidiModule } from '@angular/cdk/bidi';
9
+ import { Directionality, BidiModule } from '@angular/cdk/bidi';
14
10
  import { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';
15
11
  import { _CdkPrivateStyleLoader } from '@angular/cdk/private';
16
12
  import { Subject, Subscription, merge } from 'rxjs';
@@ -259,10 +255,11 @@ class RepositionScrollStrategy {
259
255
  * behaviors. This class primarily acts as a factory for ScrollStrategy instances.
260
256
  */
261
257
  class ScrollStrategyOptions {
262
- constructor(_scrollDispatcher, _viewportRuler, _ngZone, document) {
263
- this._scrollDispatcher = _scrollDispatcher;
264
- this._viewportRuler = _viewportRuler;
265
- this._ngZone = _ngZone;
258
+ constructor() {
259
+ this._scrollDispatcher = inject(ScrollDispatcher);
260
+ this._viewportRuler = inject(ViewportRuler);
261
+ this._ngZone = inject(NgZone);
262
+ this._document = inject(DOCUMENT);
266
263
  /** Do nothing on scroll. */
267
264
  this.noop = () => new NoopScrollStrategy();
268
265
  /**
@@ -278,18 +275,14 @@ class ScrollStrategyOptions {
278
275
  * Allows debouncing the reposition calls.
279
276
  */
280
277
  this.reposition = (config) => new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config);
281
- this._document = document;
282
278
  }
283
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ScrollStrategyOptions, deps: [{ token: i1.ScrollDispatcher }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
279
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ScrollStrategyOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
284
280
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' }); }
285
281
  }
286
282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: ScrollStrategyOptions, decorators: [{
287
283
  type: Injectable,
288
284
  args: [{ providedIn: 'root' }]
289
- }], ctorParameters: () => [{ type: i1.ScrollDispatcher }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: undefined, decorators: [{
290
- type: Inject,
291
- args: [DOCUMENT]
292
- }] }] });
285
+ }], ctorParameters: () => [] });
293
286
 
294
287
  /** Initial configuration used when creating an overlay. */
295
288
  class OverlayConfig {
@@ -415,10 +408,10 @@ function validateHorizontalPosition(property, value) {
415
408
  * on event target and order of overlay opens.
416
409
  */
417
410
  class BaseOverlayDispatcher {
418
- constructor(document) {
411
+ constructor() {
419
412
  /** Currently attached overlays in the order they were attached. */
420
413
  this._attachedOverlays = [];
421
- this._document = document;
414
+ this._document = inject(DOCUMENT);
422
415
  }
423
416
  ngOnDestroy() {
424
417
  this.detach();
@@ -440,16 +433,13 @@ class BaseOverlayDispatcher {
440
433
  this.detach();
441
434
  }
442
435
  }
443
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: BaseOverlayDispatcher, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
436
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: BaseOverlayDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
444
437
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' }); }
445
438
  }
446
439
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: BaseOverlayDispatcher, decorators: [{
447
440
  type: Injectable,
448
441
  args: [{ providedIn: 'root' }]
449
- }], ctorParameters: () => [{ type: undefined, decorators: [{
450
- type: Inject,
451
- args: [DOCUMENT]
452
- }] }] });
442
+ }], ctorParameters: () => [] });
453
443
 
454
444
  /**
455
445
  * Service for dispatching keyboard events that land on the body to appropriate overlay ref,
@@ -457,11 +447,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
457
447
  * on event target and order of overlay opens.
458
448
  */
459
449
  class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
460
- constructor(document,
461
- /** @breaking-change 14.0.0 _ngZone will be required. */
462
- _ngZone) {
463
- super(document);
464
- this._ngZone = _ngZone;
450
+ constructor() {
451
+ super(...arguments);
452
+ this._ngZone = inject(NgZone, { optional: true });
465
453
  /** Keyboard event listener that will be attached to the body. */
466
454
  this._keydownListener = (event) => {
467
455
  const overlays = this._attachedOverlays;
@@ -508,18 +496,13 @@ class OverlayKeyboardDispatcher extends BaseOverlayDispatcher {
508
496
  this._isAttached = false;
509
497
  }
510
498
  }
511
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayKeyboardDispatcher, deps: [{ token: DOCUMENT }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
499
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayKeyboardDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
512
500
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' }); }
513
501
  }
514
502
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayKeyboardDispatcher, decorators: [{
515
503
  type: Injectable,
516
504
  args: [{ providedIn: 'root' }]
517
- }], ctorParameters: () => [{ type: undefined, decorators: [{
518
- type: Inject,
519
- args: [DOCUMENT]
520
- }] }, { type: i0.NgZone, decorators: [{
521
- type: Optional
522
- }] }] });
505
+ }] });
523
506
 
524
507
  /**
525
508
  * Service for dispatching mouse click events that land on the body to appropriate overlay ref,
@@ -527,12 +510,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
527
510
  * on event target and order of overlay opens.
528
511
  */
529
512
  class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
530
- constructor(document, _platform,
531
- /** @breaking-change 14.0.0 _ngZone will be required. */
532
- _ngZone) {
533
- super(document);
534
- this._platform = _platform;
535
- this._ngZone = _ngZone;
513
+ constructor() {
514
+ super(...arguments);
515
+ this._platform = inject(Platform);
516
+ this._ngZone = inject(NgZone, { optional: true });
536
517
  this._cursorStyleIsSet = false;
537
518
  /** Store pointerdown event target to track origin of click. */
538
519
  this._pointerDownListener = (event) => {
@@ -633,18 +614,13 @@ class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {
633
614
  body.addEventListener('auxclick', this._clickListener, true);
634
615
  body.addEventListener('contextmenu', this._clickListener, true);
635
616
  }
636
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayOutsideClickDispatcher, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
617
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayOutsideClickDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
637
618
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' }); }
638
619
  }
639
620
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayOutsideClickDispatcher, decorators: [{
640
621
  type: Injectable,
641
622
  args: [{ providedIn: 'root' }]
642
- }], ctorParameters: () => [{ type: undefined, decorators: [{
643
- type: Inject,
644
- args: [DOCUMENT]
645
- }] }, { type: i1$1.Platform }, { type: i0.NgZone, decorators: [{
646
- type: Optional
647
- }] }] });
623
+ }] });
648
624
  /** Version of `Element.contains` that transcends shadow DOM boundaries. */
649
625
  function containsPierceShadowDom(parent, child) {
650
626
  const supportsShadowRoot = typeof ShadowRoot !== 'undefined' && ShadowRoot;
@@ -661,18 +637,18 @@ function containsPierceShadowDom(parent, child) {
661
637
 
662
638
  class _CdkOverlayStyleLoader {
663
639
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: _CdkOverlayStyleLoader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
664
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0-next.3", type: _CdkOverlayStyleLoader, isStandalone: true, selector: "ng-component", host: { attributes: { "cdk-overlay-style-loader": "" } }, ngImport: i0, template: '', isInline: true, styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);opacity:0}.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:var(--cdk-overlay-backdrop-dark-color, rgba(0, 0, 0, 0.32))}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
640
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0-next.3", type: _CdkOverlayStyleLoader, isStandalone: true, selector: "ng-component", host: { attributes: { "cdk-overlay-style-loader": "" } }, ngImport: i0, template: '', isInline: true, styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
665
641
  }
666
642
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: _CdkOverlayStyleLoader, decorators: [{
667
643
  type: Component,
668
- args: [{ template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, host: { 'cdk-overlay-style-loader': '' }, styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);opacity:0}.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:var(--cdk-overlay-backdrop-dark-color, rgba(0, 0, 0, 0.32))}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}"] }]
644
+ args: [{ template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, host: { 'cdk-overlay-style-loader': '' }, styles: [".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}"] }]
669
645
  }] });
670
646
  /** Container inside which all overlays will render. */
671
647
  class OverlayContainer {
672
- constructor(document, _platform) {
673
- this._platform = _platform;
648
+ constructor() {
649
+ this._platform = inject(Platform);
650
+ this._document = inject(DOCUMENT);
674
651
  this._styleLoader = inject(_CdkPrivateStyleLoader);
675
- this._document = document;
676
652
  }
677
653
  ngOnDestroy() {
678
654
  this._containerElement?.remove();
@@ -731,16 +707,13 @@ class OverlayContainer {
731
707
  _loadStyles() {
732
708
  this._styleLoader.load(_CdkOverlayStyleLoader);
733
709
  }
734
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
710
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
735
711
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayContainer, providedIn: 'root' }); }
736
712
  }
737
713
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayContainer, decorators: [{
738
714
  type: Injectable,
739
715
  args: [{ providedIn: 'root' }]
740
- }], ctorParameters: () => [{ type: undefined, decorators: [{
741
- type: Inject,
742
- args: [DOCUMENT]
743
- }] }, { type: i1$1.Platform }] });
716
+ }], ctorParameters: () => [] });
744
717
 
745
718
  /**
746
719
  * Reference to an overlay that has been created with the Overlay service.
@@ -2395,11 +2368,11 @@ class GlobalPositionStrategy {
2395
2368
 
2396
2369
  /** Builder for overlay position strategy. */
2397
2370
  class OverlayPositionBuilder {
2398
- constructor(_viewportRuler, _document, _platform, _overlayContainer) {
2399
- this._viewportRuler = _viewportRuler;
2400
- this._document = _document;
2401
- this._platform = _platform;
2402
- this._overlayContainer = _overlayContainer;
2371
+ constructor() {
2372
+ this._viewportRuler = inject(ViewportRuler);
2373
+ this._document = inject(DOCUMENT);
2374
+ this._platform = inject(Platform);
2375
+ this._overlayContainer = inject(OverlayContainer);
2403
2376
  }
2404
2377
  /**
2405
2378
  * Creates a global position strategy.
@@ -2414,16 +2387,13 @@ class OverlayPositionBuilder {
2414
2387
  flexibleConnectedTo(origin) {
2415
2388
  return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);
2416
2389
  }
2417
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayPositionBuilder, deps: [{ token: i1.ViewportRuler }, { token: DOCUMENT }, { token: i1$1.Platform }, { token: OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable }); }
2390
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayPositionBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2418
2391
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' }); }
2419
2392
  }
2420
2393
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: OverlayPositionBuilder, decorators: [{
2421
2394
  type: Injectable,
2422
2395
  args: [{ providedIn: 'root' }]
2423
- }], ctorParameters: () => [{ type: i1.ViewportRuler }, { type: undefined, decorators: [{
2424
- type: Inject,
2425
- args: [DOCUMENT]
2426
- }] }, { type: i1$1.Platform }, { type: OverlayContainer }] });
2396
+ }], ctorParameters: () => [] });
2427
2397
 
2428
2398
  /** Next overlay unique ID. */
2429
2399
  let nextUniqueId = 0;
@@ -2438,21 +2408,19 @@ let nextUniqueId = 0;
2438
2408
  * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.
2439
2409
  */
2440
2410
  class Overlay {
2441
- constructor(
2442
- /** Scrolling strategies that can be used when creating an overlay. */
2443
- scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher, _animationsModuleType) {
2444
- this.scrollStrategies = scrollStrategies;
2445
- this._overlayContainer = _overlayContainer;
2446
- this._componentFactoryResolver = _componentFactoryResolver;
2447
- this._positionBuilder = _positionBuilder;
2448
- this._keyboardDispatcher = _keyboardDispatcher;
2449
- this._injector = _injector;
2450
- this._ngZone = _ngZone;
2451
- this._document = _document;
2452
- this._directionality = _directionality;
2453
- this._location = _location;
2454
- this._outsideClickDispatcher = _outsideClickDispatcher;
2455
- this._animationsModuleType = _animationsModuleType;
2411
+ constructor() {
2412
+ this.scrollStrategies = inject(ScrollStrategyOptions);
2413
+ this._overlayContainer = inject(OverlayContainer);
2414
+ this._componentFactoryResolver = inject(ComponentFactoryResolver);
2415
+ this._positionBuilder = inject(OverlayPositionBuilder);
2416
+ this._keyboardDispatcher = inject(OverlayKeyboardDispatcher);
2417
+ this._injector = inject(Injector);
2418
+ this._ngZone = inject(NgZone);
2419
+ this._document = inject(DOCUMENT);
2420
+ this._directionality = inject(Directionality);
2421
+ this._location = inject(Location);
2422
+ this._outsideClickDispatcher = inject(OverlayOutsideClickDispatcher);
2423
+ this._animationsModuleType = inject(ANIMATION_MODULE_TYPE, { optional: true });
2456
2424
  this._styleLoader = inject(_CdkPrivateStyleLoader);
2457
2425
  }
2458
2426
  /**
@@ -2513,21 +2481,13 @@ class Overlay {
2513
2481
  }
2514
2482
  return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);
2515
2483
  }
2516
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: Overlay, deps: [{ token: ScrollStrategyOptions }, { token: OverlayContainer }, { token: i0.ComponentFactoryResolver }, { token: OverlayPositionBuilder }, { token: OverlayKeyboardDispatcher }, { token: i0.Injector }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i5.Directionality }, { token: i6.Location }, { token: OverlayOutsideClickDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2484
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: Overlay, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2517
2485
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: Overlay, providedIn: 'root' }); }
2518
2486
  }
2519
2487
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: Overlay, decorators: [{
2520
2488
  type: Injectable,
2521
2489
  args: [{ providedIn: 'root' }]
2522
- }], ctorParameters: () => [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{
2523
- type: Inject,
2524
- args: [DOCUMENT]
2525
- }] }, { type: i5.Directionality }, { type: i6.Location }, { type: OverlayOutsideClickDispatcher }, { type: undefined, decorators: [{
2526
- type: Inject,
2527
- args: [ANIMATION_MODULE_TYPE]
2528
- }, {
2529
- type: Optional
2530
- }] }] });
2490
+ }], ctorParameters: () => [] });
2531
2491
 
2532
2492
  /** Default set of positions for the overlay. Follows the behavior of a dropdown. */
2533
2493
  const defaultPositionList = [
@@ -2569,12 +2529,10 @@ const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-
2569
2529
  * ConnectedPositionStrategy.
2570
2530
  */
2571
2531
  class CdkOverlayOrigin {
2572
- constructor(
2573
- /** Reference to the element on which the directive is applied. */
2574
- elementRef) {
2575
- this.elementRef = elementRef;
2532
+ constructor() {
2533
+ this.elementRef = inject(ElementRef);
2576
2534
  }
2577
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkOverlayOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2535
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkOverlayOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2578
2536
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.3", type: CdkOverlayOrigin, isStandalone: true, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"], ngImport: i0 }); }
2579
2537
  }
2580
2538
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkOverlayOrigin, decorators: [{
@@ -2584,7 +2542,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
2584
2542
  exportAs: 'cdkOverlayOrigin',
2585
2543
  standalone: true,
2586
2544
  }]
2587
- }], ctorParameters: () => [{ type: i0.ElementRef }] });
2545
+ }], ctorParameters: () => [] });
2588
2546
  /**
2589
2547
  * Directive to facilitate declarative creation of an
2590
2548
  * Overlay using a FlexibleConnectedPositionStrategy.
@@ -2618,13 +2576,14 @@ class CdkConnectedOverlay {
2618
2576
  this._disposeOnNavigation = value;
2619
2577
  }
2620
2578
  // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.
2621
- constructor(_overlay, templateRef, viewContainerRef, scrollStrategyFactory, _dir) {
2622
- this._overlay = _overlay;
2623
- this._dir = _dir;
2579
+ constructor() {
2580
+ this._overlay = inject(Overlay);
2581
+ this._dir = inject(Directionality, { optional: true });
2624
2582
  this._backdropSubscription = Subscription.EMPTY;
2625
2583
  this._attachSubscription = Subscription.EMPTY;
2626
2584
  this._detachSubscription = Subscription.EMPTY;
2627
2585
  this._positionSubscription = Subscription.EMPTY;
2586
+ this._scrollStrategyFactory = inject(CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY);
2628
2587
  this._disposeOnNavigation = false;
2629
2588
  this._ngZone = inject(NgZone);
2630
2589
  /** Margin between the overlay and the viewport edges. */
@@ -2655,8 +2614,9 @@ class CdkConnectedOverlay {
2655
2614
  this.overlayKeydown = new EventEmitter();
2656
2615
  /** Emits when there are mouse outside click events that are targeted at the overlay. */
2657
2616
  this.overlayOutsideClick = new EventEmitter();
2617
+ const templateRef = inject(TemplateRef);
2618
+ const viewContainerRef = inject(ViewContainerRef);
2658
2619
  this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);
2659
- this._scrollStrategyFactory = scrollStrategyFactory;
2660
2620
  this.scrollStrategy = this._scrollStrategyFactory();
2661
2621
  }
2662
2622
  /** The associated overlay reference. */
@@ -2721,7 +2681,7 @@ class CdkConnectedOverlay {
2721
2681
  const positionStrategy = (this._position =
2722
2682
  this.positionStrategy || this._createPositionStrategy());
2723
2683
  const overlayConfig = new OverlayConfig({
2724
- direction: this._dir,
2684
+ direction: this._dir || 'ltr',
2725
2685
  positionStrategy,
2726
2686
  scrollStrategy: this.scrollStrategy,
2727
2687
  hasBackdrop: this.hasBackdrop,
@@ -2836,7 +2796,7 @@ class CdkConnectedOverlay {
2836
2796
  this._backdropSubscription.unsubscribe();
2837
2797
  this._positionSubscription.unsubscribe();
2838
2798
  }
2839
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkConnectedOverlay, deps: [{ token: Overlay }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
2799
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkConnectedOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
2840
2800
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-next.3", type: CdkConnectedOverlay, isStandalone: true, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: { origin: ["cdkConnectedOverlayOrigin", "origin"], positions: ["cdkConnectedOverlayPositions", "positions"], positionStrategy: ["cdkConnectedOverlayPositionStrategy", "positionStrategy"], offsetX: ["cdkConnectedOverlayOffsetX", "offsetX"], offsetY: ["cdkConnectedOverlayOffsetY", "offsetY"], width: ["cdkConnectedOverlayWidth", "width"], height: ["cdkConnectedOverlayHeight", "height"], minWidth: ["cdkConnectedOverlayMinWidth", "minWidth"], minHeight: ["cdkConnectedOverlayMinHeight", "minHeight"], backdropClass: ["cdkConnectedOverlayBackdropClass", "backdropClass"], panelClass: ["cdkConnectedOverlayPanelClass", "panelClass"], viewportMargin: ["cdkConnectedOverlayViewportMargin", "viewportMargin"], scrollStrategy: ["cdkConnectedOverlayScrollStrategy", "scrollStrategy"], open: ["cdkConnectedOverlayOpen", "open"], disableClose: ["cdkConnectedOverlayDisableClose", "disableClose"], transformOriginSelector: ["cdkConnectedOverlayTransformOriginOn", "transformOriginSelector"], hasBackdrop: ["cdkConnectedOverlayHasBackdrop", "hasBackdrop", booleanAttribute], lockPosition: ["cdkConnectedOverlayLockPosition", "lockPosition", booleanAttribute], flexibleDimensions: ["cdkConnectedOverlayFlexibleDimensions", "flexibleDimensions", booleanAttribute], growAfterOpen: ["cdkConnectedOverlayGrowAfterOpen", "growAfterOpen", booleanAttribute], push: ["cdkConnectedOverlayPush", "push", booleanAttribute], disposeOnNavigation: ["cdkConnectedOverlayDisposeOnNavigation", "disposeOnNavigation", booleanAttribute] }, outputs: { backdropClick: "backdropClick", positionChange: "positionChange", attach: "attach", detach: "detach", overlayKeydown: "overlayKeydown", overlayOutsideClick: "overlayOutsideClick" }, exportAs: ["cdkConnectedOverlay"], usesOnChanges: true, ngImport: i0 }); }
2841
2801
  }
2842
2802
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkConnectedOverlay, decorators: [{
@@ -2846,12 +2806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
2846
2806
  exportAs: 'cdkConnectedOverlay',
2847
2807
  standalone: true,
2848
2808
  }]
2849
- }], ctorParameters: () => [{ type: Overlay }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
2850
- type: Inject,
2851
- args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY]
2852
- }] }, { type: i5.Directionality, decorators: [{
2853
- type: Optional
2854
- }] }], propDecorators: { origin: [{
2809
+ }], ctorParameters: () => [], propDecorators: { origin: [{
2855
2810
  type: Input,
2856
2811
  args: ['cdkConnectedOverlayOrigin']
2857
2812
  }], positions: [{
@@ -2963,8 +2918,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
2963
2918
  * Should be provided in the root component.
2964
2919
  */
2965
2920
  class FullscreenOverlayContainer extends OverlayContainer {
2966
- constructor(_document, platform) {
2967
- super(_document, platform);
2921
+ constructor() {
2922
+ super();
2968
2923
  }
2969
2924
  ngOnDestroy() {
2970
2925
  super.ngOnDestroy();
@@ -3025,16 +2980,13 @@ class FullscreenOverlayContainer extends OverlayContainer {
3025
2980
  _document.msFullscreenElement ||
3026
2981
  null);
3027
2982
  }
3028
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: FullscreenOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
2983
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: FullscreenOverlayContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3029
2984
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' }); }
3030
2985
  }
3031
2986
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{
3032
2987
  type: Injectable,
3033
2988
  args: [{ providedIn: 'root' }]
3034
- }], ctorParameters: () => [{ type: undefined, decorators: [{
3035
- type: Inject,
3036
- args: [DOCUMENT]
3037
- }] }, { type: i1$1.Platform }] });
2989
+ }], ctorParameters: () => [] });
3038
2990
 
3039
2991
  /**
3040
2992
  * Generated bundle index. Do not edit.