@angular/cdk 2.0.0-beta.11 → 2.0.0-beta.12

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 (306) hide show
  1. package/_a11y.scss +23 -0
  2. package/_overlay.scss +93 -0
  3. package/a11y/index.metadata.json +2 -1
  4. package/a11y/typings/a11y-module.d.ts +2 -0
  5. package/a11y/typings/focus-monitor.d.ts +1 -1
  6. package/a11y/typings/index.d.ts +1 -1
  7. package/a11y/typings/index.metadata.json +1 -1
  8. package/a11y/typings/{public_api.d.ts → public-api.d.ts} +8 -2
  9. package/a11y-prebuilt.css +1 -0
  10. package/a11y.metadata.json +2 -1
  11. package/bidi/index.metadata.json +2 -1
  12. package/bidi/typings/bidi-module.d.ts +2 -0
  13. package/bidi/typings/index.d.ts +1 -1
  14. package/bidi/typings/index.metadata.json +1 -1
  15. package/bidi/typings/public-api.d.ts +10 -0
  16. package/bidi.metadata.json +2 -1
  17. package/bundles/cdk-a11y.umd.js +1368 -1357
  18. package/bundles/cdk-a11y.umd.js.map +1 -1
  19. package/bundles/cdk-a11y.umd.min.js +2 -2
  20. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  21. package/bundles/cdk-bidi.umd.js +42 -40
  22. package/bundles/cdk-bidi.umd.js.map +1 -1
  23. package/bundles/cdk-bidi.umd.min.js +2 -2
  24. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  25. package/bundles/cdk-coercion.umd.js +12 -0
  26. package/bundles/cdk-coercion.umd.js.map +1 -1
  27. package/bundles/cdk-coercion.umd.min.js +2 -2
  28. package/bundles/cdk-coercion.umd.min.js.map +1 -1
  29. package/bundles/cdk-collections.umd.js +113 -11
  30. package/bundles/cdk-collections.umd.js.map +1 -1
  31. package/bundles/cdk-collections.umd.min.js +2 -2
  32. package/bundles/cdk-collections.umd.min.js.map +1 -1
  33. package/bundles/cdk-keycodes.umd.js.map +1 -1
  34. package/bundles/cdk-keycodes.umd.min.js +1 -1
  35. package/bundles/cdk-keycodes.umd.min.js.map +1 -1
  36. package/bundles/cdk-layout.umd.js +235 -0
  37. package/bundles/cdk-layout.umd.js.map +1 -0
  38. package/bundles/cdk-layout.umd.min.js +9 -0
  39. package/bundles/cdk-layout.umd.min.js.map +1 -0
  40. package/bundles/cdk-observers.umd.js +41 -40
  41. package/bundles/cdk-observers.umd.js.map +1 -1
  42. package/bundles/cdk-observers.umd.min.js +2 -2
  43. package/bundles/cdk-observers.umd.min.js.map +1 -1
  44. package/bundles/cdk-overlay.umd.js +306 -265
  45. package/bundles/cdk-overlay.umd.js.map +1 -1
  46. package/bundles/cdk-overlay.umd.min.js +2 -2
  47. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  48. package/bundles/cdk-platform.umd.js +19 -17
  49. package/bundles/cdk-platform.umd.js.map +1 -1
  50. package/bundles/cdk-platform.umd.min.js +2 -2
  51. package/bundles/cdk-platform.umd.min.js.map +1 -1
  52. package/bundles/cdk-portal.umd.js +71 -37
  53. package/bundles/cdk-portal.umd.js.map +1 -1
  54. package/bundles/cdk-portal.umd.min.js +2 -2
  55. package/bundles/cdk-portal.umd.min.js.map +1 -1
  56. package/bundles/cdk-rxjs.umd.js +13 -4
  57. package/bundles/cdk-rxjs.umd.js.map +1 -1
  58. package/bundles/cdk-rxjs.umd.min.js +2 -2
  59. package/bundles/cdk-rxjs.umd.min.js.map +1 -1
  60. package/bundles/cdk-scrolling.umd.js +89 -54
  61. package/bundles/cdk-scrolling.umd.js.map +1 -1
  62. package/bundles/cdk-scrolling.umd.min.js +2 -2
  63. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  64. package/bundles/cdk-stepper.umd.js +115 -90
  65. package/bundles/cdk-stepper.umd.js.map +1 -1
  66. package/bundles/cdk-stepper.umd.min.js +2 -2
  67. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  68. package/bundles/cdk-table.umd.js +261 -218
  69. package/bundles/cdk-table.umd.js.map +1 -1
  70. package/bundles/cdk-table.umd.min.js +2 -2
  71. package/bundles/cdk-table.umd.min.js.map +1 -1
  72. package/bundles/cdk.umd.js +1 -1
  73. package/bundles/cdk.umd.js.map +1 -1
  74. package/bundles/cdk.umd.min.js +2 -2
  75. package/bundles/cdk.umd.min.js.map +1 -1
  76. package/cdk.metadata.json +2 -1
  77. package/coercion/index.metadata.json +2 -1
  78. package/coercion/typings/array.d.ts +9 -0
  79. package/coercion/typings/index.d.ts +1 -1
  80. package/coercion/typings/index.metadata.json +1 -1
  81. package/{typings/coercion/public_api.d.ts → coercion/typings/public-api.d.ts} +1 -0
  82. package/coercion.metadata.json +2 -1
  83. package/collections/index.metadata.json +2 -1
  84. package/collections/typings/index.d.ts +2 -1
  85. package/collections/typings/index.metadata.json +1 -1
  86. package/{typings/collections/public_api.d.ts → collections/typings/public-api.d.ts} +1 -0
  87. package/collections/typings/selection.d.ts +13 -3
  88. package/collections/typings/unique-selection-dispatcher.d.ts +40 -0
  89. package/collections.metadata.json +2 -1
  90. package/esm2015/a11y.js +1252 -1250
  91. package/esm2015/a11y.js.map +1 -1
  92. package/esm2015/bidi.js +1 -1
  93. package/esm2015/bidi.js.map +1 -1
  94. package/esm2015/cdk.js +1 -1
  95. package/esm2015/cdk.js.map +1 -1
  96. package/esm2015/coercion.js +11 -1
  97. package/esm2015/coercion.js.map +1 -1
  98. package/esm2015/collections.js +93 -8
  99. package/esm2015/collections.js.map +1 -1
  100. package/esm2015/keycodes.js.map +1 -1
  101. package/esm2015/layout.js +226 -0
  102. package/esm2015/layout.js.map +1 -0
  103. package/esm2015/observers.js +8 -7
  104. package/esm2015/observers.js.map +1 -1
  105. package/esm2015/overlay.js +157 -136
  106. package/esm2015/overlay.js.map +1 -1
  107. package/esm2015/platform.js +1 -1
  108. package/esm2015/platform.js.map +1 -1
  109. package/esm2015/portal.js +30 -1
  110. package/esm2015/portal.js.map +1 -1
  111. package/esm2015/rxjs.js +5 -1
  112. package/esm2015/rxjs.js.map +1 -1
  113. package/esm2015/scrolling.js +39 -8
  114. package/esm2015/scrolling.js.map +1 -1
  115. package/esm2015/stepper.js +27 -5
  116. package/esm2015/stepper.js.map +1 -1
  117. package/esm2015/table.js +68 -29
  118. package/esm2015/table.js.map +1 -1
  119. package/esm5/a11y.es5.js +1372 -1357
  120. package/esm5/a11y.es5.js.map +1 -1
  121. package/esm5/bidi.es5.js +45 -40
  122. package/esm5/bidi.es5.js.map +1 -1
  123. package/esm5/cdk.es5.js +4 -1
  124. package/esm5/cdk.es5.js.map +1 -1
  125. package/esm5/coercion.es5.js +14 -1
  126. package/esm5/coercion.es5.js.map +1 -1
  127. package/esm5/collections.es5.js +110 -8
  128. package/esm5/collections.es5.js.map +1 -1
  129. package/esm5/keycodes.es5.js +2 -0
  130. package/esm5/keycodes.es5.js.map +1 -1
  131. package/esm5/layout.es5.js +234 -0
  132. package/esm5/layout.es5.js.map +1 -0
  133. package/esm5/observers.es5.js +44 -40
  134. package/esm5/observers.es5.js.map +1 -1
  135. package/esm5/overlay.es5.js +304 -259
  136. package/esm5/overlay.es5.js.map +1 -1
  137. package/esm5/platform.es5.js +22 -17
  138. package/esm5/platform.es5.js.map +1 -1
  139. package/esm5/portal.es5.js +81 -44
  140. package/esm5/portal.es5.js.map +1 -1
  141. package/esm5/rxjs.es5.js +12 -1
  142. package/esm5/rxjs.es5.js.map +1 -1
  143. package/esm5/scrolling.es5.js +89 -51
  144. package/esm5/scrolling.es5.js.map +1 -1
  145. package/esm5/stepper.es5.js +119 -91
  146. package/esm5/stepper.es5.js.map +1 -1
  147. package/esm5/table.es5.js +265 -218
  148. package/esm5/table.es5.js.map +1 -1
  149. package/keycodes/index.metadata.json +2 -1
  150. package/keycodes/typings/index.d.ts +1 -1
  151. package/keycodes/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  152. package/keycodes.metadata.json +2 -1
  153. package/layout/index.d.ts +8 -0
  154. package/layout/index.metadata.json +12 -0
  155. package/layout/package.json +7 -0
  156. package/layout/typings/breakpoints-observer.d.ts +37 -0
  157. package/layout/typings/breakpoints.d.ts +18 -0
  158. package/layout/typings/index.d.ts +4 -0
  159. package/layout/typings/index.metadata.json +1 -0
  160. package/layout/typings/media-matcher.d.ts +15 -0
  161. package/layout/typings/public-api.d.ts +5 -0
  162. package/layout.d.ts +8 -0
  163. package/layout.metadata.json +12 -0
  164. package/observers/index.metadata.json +2 -1
  165. package/observers/typings/index.d.ts +1 -1
  166. package/observers/typings/index.metadata.json +1 -1
  167. package/observers/typings/observe-content.d.ts +3 -3
  168. package/observers/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  169. package/observers.metadata.json +2 -1
  170. package/overlay/index.metadata.json +2 -1
  171. package/overlay/typings/index.d.ts +2 -2
  172. package/overlay/typings/index.metadata.json +1 -1
  173. package/overlay/typings/overlay-config.d.ts +1 -1
  174. package/overlay/typings/overlay-directives.d.ts +3 -3
  175. package/overlay/typings/overlay-module.d.ts +11 -0
  176. package/overlay/typings/overlay-ref.d.ts +6 -6
  177. package/overlay/typings/overlay.d.ts +2 -2
  178. package/overlay/typings/position/connected-position-strategy.d.ts +5 -0
  179. package/overlay/typings/position/position-strategy.d.ts +2 -0
  180. package/overlay/typings/{public_api.d.ts → public-api.d.ts} +1 -4
  181. package/overlay/typings/scroll/scroll-strategy.d.ts +1 -1
  182. package/overlay-prebuilt.css +1 -0
  183. package/overlay.metadata.json +2 -1
  184. package/package.json +3 -3
  185. package/platform/index.metadata.json +2 -1
  186. package/platform/typings/index.d.ts +1 -1
  187. package/platform/typings/index.metadata.json +1 -1
  188. package/platform/typings/platform-module.d.ts +2 -0
  189. package/platform/typings/public-api.d.ts +10 -0
  190. package/platform.metadata.json +2 -1
  191. package/portal/index.metadata.json +2 -1
  192. package/portal/typings/index.d.ts +1 -1
  193. package/portal/typings/index.metadata.json +1 -1
  194. package/portal/typings/{public_api.d.ts → public-api.d.ts} +1 -0
  195. package/portal.metadata.json +2 -1
  196. package/rxjs/index.metadata.json +2 -1
  197. package/rxjs/typings/index.d.ts +1 -1
  198. package/rxjs/typings/index.metadata.json +1 -1
  199. package/rxjs/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  200. package/rxjs/typings/rx-operators.d.ts +7 -0
  201. package/rxjs.metadata.json +2 -1
  202. package/scrolling/index.metadata.json +2 -1
  203. package/scrolling/typings/index.d.ts +1 -1
  204. package/scrolling/typings/index.metadata.json +1 -1
  205. package/scrolling/typings/public-api.d.ts +11 -0
  206. package/scrolling/typings/scrolling-module.d.ts +2 -0
  207. package/scrolling/typings/viewport-ruler.d.ts +20 -6
  208. package/scrolling.metadata.json +2 -1
  209. package/stepper/index.metadata.json +2 -1
  210. package/stepper/typings/index.d.ts +1 -1
  211. package/stepper/typings/index.metadata.json +1 -1
  212. package/stepper/typings/public-api.d.ts +11 -0
  213. package/stepper/typings/stepper-module.d.ts +2 -0
  214. package/stepper/typings/stepper.d.ts +8 -4
  215. package/stepper.metadata.json +2 -1
  216. package/table/index.metadata.json +2 -1
  217. package/table/typings/index.d.ts +1 -1
  218. package/table/typings/index.metadata.json +1 -1
  219. package/table/typings/public-api.d.ts +13 -0
  220. package/table/typings/row.d.ts +11 -3
  221. package/table/typings/table-errors.d.ts +10 -0
  222. package/table/typings/table-module.d.ts +2 -0
  223. package/table/typings/table.d.ts +17 -8
  224. package/table.metadata.json +2 -1
  225. package/typings/a11y/a11y-module.d.ts +2 -0
  226. package/typings/a11y/focus-monitor.d.ts +1 -1
  227. package/typings/a11y/index.d.ts +1 -1
  228. package/typings/a11y/index.metadata.json +1 -1
  229. package/typings/a11y/{public_api.d.ts → public-api.d.ts} +8 -2
  230. package/typings/bidi/bidi-module.d.ts +2 -0
  231. package/typings/bidi/index.d.ts +1 -1
  232. package/typings/bidi/index.metadata.json +1 -1
  233. package/typings/bidi/public-api.d.ts +10 -0
  234. package/typings/coercion/array.d.ts +9 -0
  235. package/typings/coercion/index.d.ts +1 -1
  236. package/typings/coercion/index.metadata.json +1 -1
  237. package/{coercion/typings/public_api.d.ts → typings/coercion/public-api.d.ts} +1 -0
  238. package/typings/collections/index.d.ts +2 -1
  239. package/typings/collections/index.metadata.json +1 -1
  240. package/{collections/typings/public_api.d.ts → typings/collections/public-api.d.ts} +1 -0
  241. package/typings/collections/selection.d.ts +13 -3
  242. package/typings/collections/unique-selection-dispatcher.d.ts +40 -0
  243. package/typings/index.d.ts +1 -1
  244. package/typings/index.metadata.json +1 -1
  245. package/typings/keycodes/index.d.ts +1 -1
  246. package/typings/keycodes/{public_api.d.ts → public-api.d.ts} +0 -0
  247. package/typings/layout/breakpoints-observer.d.ts +37 -0
  248. package/typings/layout/breakpoints.d.ts +18 -0
  249. package/typings/layout/index.d.ts +4 -0
  250. package/typings/layout/index.metadata.json +1 -0
  251. package/typings/layout/media-matcher.d.ts +15 -0
  252. package/typings/layout/public-api.d.ts +5 -0
  253. package/typings/observers/index.d.ts +1 -1
  254. package/typings/observers/index.metadata.json +1 -1
  255. package/typings/observers/observe-content.d.ts +3 -3
  256. package/typings/observers/{public_api.d.ts → public-api.d.ts} +0 -0
  257. package/typings/overlay/index.d.ts +2 -2
  258. package/typings/overlay/index.metadata.json +1 -1
  259. package/typings/overlay/overlay-config.d.ts +1 -1
  260. package/typings/overlay/overlay-directives.d.ts +3 -3
  261. package/typings/overlay/overlay-module.d.ts +11 -0
  262. package/typings/overlay/overlay-ref.d.ts +6 -6
  263. package/typings/overlay/overlay.d.ts +2 -2
  264. package/typings/overlay/position/connected-position-strategy.d.ts +5 -0
  265. package/typings/overlay/position/position-strategy.d.ts +2 -0
  266. package/typings/overlay/{public_api.d.ts → public-api.d.ts} +1 -4
  267. package/typings/overlay/scroll/scroll-strategy.d.ts +1 -1
  268. package/typings/platform/index.d.ts +1 -1
  269. package/typings/platform/index.metadata.json +1 -1
  270. package/typings/platform/platform-module.d.ts +2 -0
  271. package/typings/platform/public-api.d.ts +10 -0
  272. package/typings/portal/index.d.ts +1 -1
  273. package/typings/portal/index.metadata.json +1 -1
  274. package/typings/portal/{public_api.d.ts → public-api.d.ts} +1 -0
  275. package/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  276. package/typings/rxjs/index.d.ts +1 -1
  277. package/typings/rxjs/index.metadata.json +1 -1
  278. package/typings/rxjs/{public_api.d.ts → public-api.d.ts} +0 -0
  279. package/typings/rxjs/rx-operators.d.ts +7 -0
  280. package/typings/scrolling/index.d.ts +1 -1
  281. package/typings/scrolling/index.metadata.json +1 -1
  282. package/typings/scrolling/public-api.d.ts +11 -0
  283. package/typings/scrolling/scrolling-module.d.ts +2 -0
  284. package/typings/scrolling/viewport-ruler.d.ts +20 -6
  285. package/typings/stepper/index.d.ts +1 -1
  286. package/typings/stepper/index.metadata.json +1 -1
  287. package/typings/stepper/public-api.d.ts +11 -0
  288. package/typings/stepper/stepper-module.d.ts +2 -0
  289. package/typings/stepper/stepper.d.ts +8 -4
  290. package/typings/table/index.d.ts +1 -1
  291. package/typings/table/index.metadata.json +1 -1
  292. package/typings/table/public-api.d.ts +13 -0
  293. package/typings/table/row.d.ts +11 -3
  294. package/typings/table/table-errors.d.ts +10 -0
  295. package/typings/table/table-module.d.ts +2 -0
  296. package/typings/table/table.d.ts +17 -8
  297. package/bidi/typings/public_api.d.ts +0 -4
  298. package/platform/typings/public_api.d.ts +0 -4
  299. package/scrolling/typings/public_api.d.ts +0 -5
  300. package/stepper/typings/public_api.d.ts +0 -5
  301. package/table/typings/public_api.d.ts +0 -7
  302. package/typings/bidi/public_api.d.ts +0 -4
  303. package/typings/platform/public_api.d.ts +0 -4
  304. package/typings/scrolling/public_api.d.ts +0 -5
  305. package/typings/stepper/public_api.d.ts +0 -5
  306. package/typings/table/public_api.d.ts +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"observers.js","sources":["../../../src/cdk/observers/index.ts","../../../src/cdk/observers/observe-content.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport {MdMutationObserverFactory,ObserveContent,ObserversModule} from './public_api';\n","/**\n * @license\n * Copyright Google Inc. 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\n\nimport {\n Directive,\n ElementRef,\n NgModule,\n Output,\n Input,\n EventEmitter,\n OnDestroy,\n AfterContentInit,\n Injectable,\n NgZone,\n} from '@angular/core';\nimport {Subject} from 'rxjs/Subject';\nimport {RxChain, debounceTime} from '@angular/cdk/rxjs';\n/**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * \\@docs-private\n */\nexport class MdMutationObserverFactory {\n/**\n * @param {?} callback\n * @return {?}\n */\ncreate(callback): MutationObserver | null {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction MdMutationObserverFactory_tsickle_Closure_declarations() {\n/** @type {?} */\nMdMutationObserverFactory.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nMdMutationObserverFactory.ctorParameters;\n}\n\n/**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\nexport class ObserveContent implements AfterContentInit, OnDestroy {\nprivate _observer: MutationObserver | null;\n/**\n * Event emitted for each change in the element's content.\n */\nevent = new EventEmitter<MutationRecord[]>();\n/**\n * Used for debouncing the emitted values to the observeContent event.\n */\nprivate _debouncer = new Subject<MutationRecord[]>();\n/**\n * Debounce interval for emitting the changes.\n */\ndebounce: number;\n/**\n * @param {?} _mutationObserverFactory\n * @param {?} _elementRef\n * @param {?} _ngZone\n */\nconstructor(\nprivate _mutationObserverFactory: MdMutationObserverFactory,\nprivate _elementRef: ElementRef,\nprivate _ngZone: NgZone) { }\n/**\n * @return {?}\n */\nngAfterContentInit() {\n if (this.debounce > 0) {\n this._ngZone.runOutsideAngular(() => {\n RxChain.from(this._debouncer)\n .call(debounceTime, this.debounce)\n .subscribe((mutations: MutationRecord[]) => this.event.emit(mutations));\n });\n } else {\n this._debouncer.subscribe(mutations => this.event.emit(mutations));\n }\n\n this._observer = this._ngZone.runOutsideAngular(() => {\n return this._mutationObserverFactory.create((mutations: MutationRecord[]) => {\n this._debouncer.next(mutations);\n });\n });\n\n if (this._observer) {\n this._observer.observe(this._elementRef.nativeElement, {\n characterData: true,\n childList: true,\n subtree: true\n });\n }\n }\n/**\n * @return {?}\n */\nngOnDestroy() {\n if (this._observer) {\n this._observer.disconnect();\n }\n\n this._debouncer.complete();\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[cdkObserveContent]'\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: MdMutationObserverFactory, },\n{type: ElementRef, },\n{type: NgZone, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'event': [{ type: Output, args: ['cdkObserveContent', ] },],\n'debounce': [{ type: Input },],\n};\n}\n\nfunction ObserveContent_tsickle_Closure_declarations() {\n/** @type {?} */\nObserveContent.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nObserveContent.ctorParameters;\n/** @type {?} */\nObserveContent.propDecorators;\n/** @type {?} */\nObserveContent.prototype._observer;\n/**\n * Event emitted for each change in the element's content.\n * @type {?}\n */\nObserveContent.prototype.event;\n/**\n * Used for debouncing the emitted values to the observeContent event.\n * @type {?}\n */\nObserveContent.prototype._debouncer;\n/**\n * Debounce interval for emitting the changes.\n * @type {?}\n */\nObserveContent.prototype.debounce;\n/** @type {?} */\nObserveContent.prototype._mutationObserverFactory;\n/** @type {?} */\nObserveContent.prototype._elementRef;\n/** @type {?} */\nObserveContent.prototype._ngZone;\n}\n\nexport class ObserversModule {static decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n exports: [ObserveContent],\n declarations: [ObserveContent],\n providers: [MdMutationObserverFactory]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction ObserversModule_tsickle_Closure_declarations() {\n/** @type {?} */\nObserversModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nObserversModule.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"observers.js","sources":["../../packages/cdk/observers/observe-content.js","../../packages/cdk/observers/index.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. 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 { Directive, ElementRef, NgModule, Output, Input, EventEmitter, Injectable, NgZone, } from '@angular/core';\nimport { Subject } from 'rxjs/Subject';\nimport { RxChain, debounceTime } from '@angular/cdk/rxjs';\n/**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * \\@docs-private\n */\nexport class MatMutationObserverFactory {\n /**\n * @param {?} callback\n * @return {?}\n */\n create(callback) {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n }\n}\nMatMutationObserverFactory.decorators = [\n { type: Injectable },\n];\n/**\n * @nocollapse\n */\nMatMutationObserverFactory.ctorParameters = () => [];\nfunction MatMutationObserverFactory_tsickle_Closure_declarations() {\n /** @type {?} */\n MatMutationObserverFactory.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n MatMutationObserverFactory.ctorParameters;\n}\n/**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\nexport class ObserveContent {\n /**\n * @param {?} _mutationObserverFactory\n * @param {?} _elementRef\n * @param {?} _ngZone\n */\n constructor(_mutationObserverFactory, _elementRef, _ngZone) {\n this._mutationObserverFactory = _mutationObserverFactory;\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n /**\n * Event emitted for each change in the element's content.\n */\n this.event = new EventEmitter();\n /**\n * Used for debouncing the emitted values to the observeContent event.\n */\n this._debouncer = new Subject();\n }\n /**\n * @return {?}\n */\n ngAfterContentInit() {\n if (this.debounce > 0) {\n this._ngZone.runOutsideAngular(() => {\n RxChain.from(this._debouncer)\n .call(debounceTime, this.debounce)\n .subscribe((mutations) => this.event.emit(mutations));\n });\n }\n else {\n this._debouncer.subscribe(mutations => this.event.emit(mutations));\n }\n this._observer = this._ngZone.runOutsideAngular(() => {\n return this._mutationObserverFactory.create((mutations) => {\n this._debouncer.next(mutations);\n });\n });\n if (this._observer) {\n this._observer.observe(this._elementRef.nativeElement, {\n characterData: true,\n childList: true,\n subtree: true\n });\n }\n }\n /**\n * @return {?}\n */\n ngOnDestroy() {\n if (this._observer) {\n this._observer.disconnect();\n }\n this._debouncer.complete();\n }\n}\nObserveContent.decorators = [\n { type: Directive, args: [{\n selector: '[cdkObserveContent]',\n exportAs: 'cdkObserveContent',\n },] },\n];\n/**\n * @nocollapse\n */\nObserveContent.ctorParameters = () => [\n { type: MatMutationObserverFactory, },\n { type: ElementRef, },\n { type: NgZone, },\n];\nObserveContent.propDecorators = {\n 'event': [{ type: Output, args: ['cdkObserveContent',] },],\n 'debounce': [{ type: Input },],\n};\nfunction ObserveContent_tsickle_Closure_declarations() {\n /** @type {?} */\n ObserveContent.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n ObserveContent.ctorParameters;\n /** @type {?} */\n ObserveContent.propDecorators;\n /** @type {?} */\n ObserveContent.prototype._observer;\n /**\n * Event emitted for each change in the element's content.\n * @type {?}\n */\n ObserveContent.prototype.event;\n /**\n * Used for debouncing the emitted values to the observeContent event.\n * @type {?}\n */\n ObserveContent.prototype._debouncer;\n /**\n * Debounce interval for emitting the changes.\n * @type {?}\n */\n ObserveContent.prototype.debounce;\n /** @type {?} */\n ObserveContent.prototype._mutationObserverFactory;\n /** @type {?} */\n ObserveContent.prototype._elementRef;\n /** @type {?} */\n ObserveContent.prototype._ngZone;\n}\nexport class ObserversModule {\n}\nObserversModule.decorators = [\n { type: NgModule, args: [{\n exports: [ObserveContent],\n declarations: [ObserveContent],\n providers: [MatMutationObserverFactory]\n },] },\n];\n/**\n * @nocollapse\n */\nObserversModule.ctorParameters = () => [];\nfunction ObserversModule_tsickle_Closure_declarations() {\n /** @type {?} */\n ObserversModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n ObserversModule.ctorParameters;\n}\n//# sourceMappingURL=observe-content.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { MatMutationObserverFactory, ObserveContent, ObserversModule } from './public-api';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":"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"}
@@ -9,10 +9,10 @@ import { ApplicationRef, ComponentFactoryResolver, Directive, ElementRef, EventE
9
9
  import { DomPortalHost, PortalModule, TemplatePortal } from '@angular/cdk/portal';
10
10
  import { Subject } from 'rxjs/Subject';
11
11
  import { ScrollDispatchModule, ScrollDispatcher, Scrollable, VIEWPORT_RULER_PROVIDER, ViewportRuler } from '@angular/cdk/scrolling';
12
+ import { Subscription } from 'rxjs/Subscription';
12
13
  import { Directionality } from '@angular/cdk/bidi';
13
14
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
14
15
  import { ESCAPE } from '@angular/cdk/keycodes';
15
- import { Subscription } from 'rxjs/Subscription';
16
16
 
17
17
  /**
18
18
  * Scroll strategy that doesn't do anything.
@@ -37,9 +37,9 @@ class NoopScrollStrategy {
37
37
  */
38
38
  class OverlayConfig {
39
39
  /**
40
- * @param {?=} state
40
+ * @param {?=} config
41
41
  */
42
- constructor(state) {
42
+ constructor(config) {
43
43
  /**
44
44
  * Strategy to be used when handling scroll events while the overlay is open.
45
45
  */
@@ -60,8 +60,8 @@ class OverlayConfig {
60
60
  * The direction of the text in the overlay panel.
61
61
  */
62
62
  this.direction = 'ltr';
63
- if (state) {
64
- Object.keys(state).forEach(key => this[key] = state[key]);
63
+ if (config) {
64
+ Object.keys(config).forEach(key => this[key] = config[key]);
65
65
  }
66
66
  }
67
67
  }
@@ -74,20 +74,20 @@ class OverlayRef {
74
74
  /**
75
75
  * @param {?} _portalHost
76
76
  * @param {?} _pane
77
- * @param {?} _state
77
+ * @param {?} _config
78
78
  * @param {?} _ngZone
79
79
  */
80
- constructor(_portalHost, _pane, _state, _ngZone) {
80
+ constructor(_portalHost, _pane, _config, _ngZone) {
81
81
  this._portalHost = _portalHost;
82
82
  this._pane = _pane;
83
- this._state = _state;
83
+ this._config = _config;
84
84
  this._ngZone = _ngZone;
85
85
  this._backdropElement = null;
86
86
  this._backdropClick = new Subject();
87
87
  this._attachments = new Subject();
88
88
  this._detachments = new Subject();
89
- if (_state.scrollStrategy) {
90
- _state.scrollStrategy.attach(this);
89
+ if (_config.scrollStrategy) {
90
+ _config.scrollStrategy.attach(this);
91
91
  }
92
92
  }
93
93
  /**
@@ -104,29 +104,29 @@ class OverlayRef {
104
104
  */
105
105
  attach(portal) {
106
106
  let /** @type {?} */ attachResult = this._portalHost.attach(portal);
107
- if (this._state.positionStrategy) {
108
- this._state.positionStrategy.attach(this);
107
+ if (this._config.positionStrategy) {
108
+ this._config.positionStrategy.attach(this);
109
109
  }
110
- // Update the pane element with the given state configuration.
110
+ // Update the pane element with the given configuration.
111
111
  this._updateStackingOrder();
112
112
  this.updateSize();
113
113
  this.updateDirection();
114
114
  this.updatePosition();
115
- if (this._state.scrollStrategy) {
116
- this._state.scrollStrategy.enable();
115
+ if (this._config.scrollStrategy) {
116
+ this._config.scrollStrategy.enable();
117
117
  }
118
118
  // Enable pointer events for the overlay pane element.
119
119
  this._togglePointerEvents(true);
120
- if (this._state.hasBackdrop) {
120
+ if (this._config.hasBackdrop) {
121
121
  this._attachBackdrop();
122
122
  }
123
- if (this._state.panelClass) {
123
+ if (this._config.panelClass) {
124
124
  // We can't do a spread here, because IE doesn't support setting multiple classes.
125
- if (Array.isArray(this._state.panelClass)) {
126
- this._state.panelClass.forEach(cls => this._pane.classList.add(cls));
125
+ if (Array.isArray(this._config.panelClass)) {
126
+ this._config.panelClass.forEach(cls => this._pane.classList.add(cls));
127
127
  }
128
128
  else {
129
- this._pane.classList.add(this._state.panelClass);
129
+ this._pane.classList.add(this._config.panelClass);
130
130
  }
131
131
  }
132
132
  // Only emit the `attachments` event once all other setup is done.
@@ -135,7 +135,7 @@ class OverlayRef {
135
135
  }
136
136
  /**
137
137
  * Detaches an overlay from a portal.
138
- * @return {?} Resolves when the overlay has been detached.
138
+ * @return {?} The portal detachment result.
139
139
  */
140
140
  detach() {
141
141
  this.detachBackdrop();
@@ -143,10 +143,13 @@ class OverlayRef {
143
143
  // This is necessary because otherwise the pane element will cover the page and disable
144
144
  // pointer events therefore. Depends on the position strategy and the applied pane boundaries.
145
145
  this._togglePointerEvents(false);
146
- if (this._state.scrollStrategy) {
147
- this._state.scrollStrategy.disable();
146
+ if (this._config.positionStrategy && this._config.positionStrategy.detach) {
147
+ this._config.positionStrategy.detach();
148
148
  }
149
- let /** @type {?} */ detachmentResult = this._portalHost.detach();
149
+ if (this._config.scrollStrategy) {
150
+ this._config.scrollStrategy.disable();
151
+ }
152
+ const /** @type {?} */ detachmentResult = this._portalHost.detach();
150
153
  // Only emit after everything is detached.
151
154
  this._detachments.next();
152
155
  return detachmentResult;
@@ -156,11 +159,11 @@ class OverlayRef {
156
159
  * @return {?}
157
160
  */
158
161
  dispose() {
159
- if (this._state.positionStrategy) {
160
- this._state.positionStrategy.dispose();
162
+ if (this._config.positionStrategy) {
163
+ this._config.positionStrategy.dispose();
161
164
  }
162
- if (this._state.scrollStrategy) {
163
- this._state.scrollStrategy.disable();
165
+ if (this._config.scrollStrategy) {
166
+ this._config.scrollStrategy.disable();
164
167
  }
165
168
  this.detachBackdrop();
166
169
  this._portalHost.dispose();
@@ -198,19 +201,19 @@ class OverlayRef {
198
201
  return this._detachments.asObservable();
199
202
  }
200
203
  /**
201
- * Gets the current state config of the overlay.
204
+ * Gets the current config of the overlay.
202
205
  * @return {?}
203
206
  */
204
- getState() {
205
- return this._state;
207
+ getConfig() {
208
+ return this._config;
206
209
  }
207
210
  /**
208
211
  * Updates the position of the overlay based on the position strategy.
209
212
  * @return {?}
210
213
  */
211
214
  updatePosition() {
212
- if (this._state.positionStrategy) {
213
- this._state.positionStrategy.apply();
215
+ if (this._config.positionStrategy) {
216
+ this._config.positionStrategy.apply();
214
217
  }
215
218
  }
216
219
  /**
@@ -218,30 +221,30 @@ class OverlayRef {
218
221
  * @return {?}
219
222
  */
220
223
  updateDirection() {
221
- this._pane.setAttribute('dir', /** @type {?} */ ((this._state.direction)));
224
+ this._pane.setAttribute('dir', /** @type {?} */ ((this._config.direction)));
222
225
  }
223
226
  /**
224
227
  * Updates the size of the overlay based on the overlay config.
225
228
  * @return {?}
226
229
  */
227
230
  updateSize() {
228
- if (this._state.width || this._state.width === 0) {
229
- this._pane.style.width = formatCssUnit(this._state.width);
231
+ if (this._config.width || this._config.width === 0) {
232
+ this._pane.style.width = formatCssUnit(this._config.width);
230
233
  }
231
- if (this._state.height || this._state.height === 0) {
232
- this._pane.style.height = formatCssUnit(this._state.height);
234
+ if (this._config.height || this._config.height === 0) {
235
+ this._pane.style.height = formatCssUnit(this._config.height);
233
236
  }
234
- if (this._state.minWidth || this._state.minWidth === 0) {
235
- this._pane.style.minWidth = formatCssUnit(this._state.minWidth);
237
+ if (this._config.minWidth || this._config.minWidth === 0) {
238
+ this._pane.style.minWidth = formatCssUnit(this._config.minWidth);
236
239
  }
237
- if (this._state.minHeight || this._state.minHeight === 0) {
238
- this._pane.style.minHeight = formatCssUnit(this._state.minHeight);
240
+ if (this._config.minHeight || this._config.minHeight === 0) {
241
+ this._pane.style.minHeight = formatCssUnit(this._config.minHeight);
239
242
  }
240
- if (this._state.maxWidth || this._state.maxWidth === 0) {
241
- this._pane.style.maxWidth = formatCssUnit(this._state.maxWidth);
243
+ if (this._config.maxWidth || this._config.maxWidth === 0) {
244
+ this._pane.style.maxWidth = formatCssUnit(this._config.maxWidth);
242
245
  }
243
- if (this._state.maxHeight || this._state.maxHeight === 0) {
244
- this._pane.style.maxHeight = formatCssUnit(this._state.maxHeight);
246
+ if (this._config.maxHeight || this._config.maxHeight === 0) {
247
+ this._pane.style.maxHeight = formatCssUnit(this._config.maxHeight);
245
248
  }
246
249
  }
247
250
  /**
@@ -259,8 +262,8 @@ class OverlayRef {
259
262
  _attachBackdrop() {
260
263
  this._backdropElement = document.createElement('div');
261
264
  this._backdropElement.classList.add('cdk-overlay-backdrop');
262
- if (this._state.backdropClass) {
263
- this._backdropElement.classList.add(this._state.backdropClass);
265
+ if (this._config.backdropClass) {
266
+ this._backdropElement.classList.add(this._config.backdropClass);
264
267
  } /** @type {?} */
265
268
  ((
266
269
  // Insert the backdrop before the pane in the DOM order,
@@ -309,8 +312,8 @@ class OverlayRef {
309
312
  }
310
313
  };
311
314
  backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');
312
- if (this._state.backdropClass) {
313
- backdropToDetach.classList.remove(this._state.backdropClass);
315
+ if (this._config.backdropClass) {
316
+ backdropToDetach.classList.remove(this._config.backdropClass);
314
317
  }
315
318
  backdropToDetach.addEventListener('transitionend', finishDetach);
316
319
  // If the backdrop doesn't have a transition, the `transitionend` event won't fire.
@@ -445,6 +448,9 @@ class ConnectedPositionStrategy {
445
448
  constructor(originPos, overlayPos, _connectedTo, _viewportRuler) {
446
449
  this._connectedTo = _connectedTo;
447
450
  this._viewportRuler = _viewportRuler;
451
+ /**
452
+ * Layout direction of the position strategy.
453
+ */
448
454
  this._dir = 'ltr';
449
455
  /**
450
456
  * The offset in pixels for the overlay connection point on the x-axis
@@ -458,6 +464,10 @@ class ConnectedPositionStrategy {
458
464
  * The Scrollable containers used to check scrollable view properties on position change.
459
465
  */
460
466
  this.scrollables = [];
467
+ /**
468
+ * Subscription to viewport resize events.
469
+ */
470
+ this._resizeSubscription = Subscription.EMPTY;
461
471
  /**
462
472
  * Ordered list of preferred positions, from most to least desirable.
463
473
  */
@@ -494,12 +504,23 @@ class ConnectedPositionStrategy {
494
504
  attach(overlayRef) {
495
505
  this._overlayRef = overlayRef;
496
506
  this._pane = overlayRef.overlayElement;
507
+ this._resizeSubscription.unsubscribe();
508
+ this._resizeSubscription = this._viewportRuler.change().subscribe(() => this.apply());
497
509
  }
498
510
  /**
499
511
  * Performs any cleanup after the element is destroyed.
500
512
  * @return {?}
501
513
  */
502
- dispose() { }
514
+ dispose() {
515
+ this._resizeSubscription.unsubscribe();
516
+ }
517
+ /**
518
+ * \@docs-private
519
+ * @return {?}
520
+ */
521
+ detach() {
522
+ this._resizeSubscription.unsubscribe();
523
+ }
503
524
  /**
504
525
  * Updates the position of the overlay element, using whichever preferred position relative
505
526
  * to the origin fits on-screen.
@@ -1027,7 +1048,7 @@ const OVERLAY_CONTAINER_PROVIDER = {
1027
1048
  * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.
1028
1049
  * @return {?}
1029
1050
  */
1030
- function getMdScrollStrategyAlreadyAttachedError() {
1051
+ function getMatScrollStrategyAlreadyAttachedError() {
1031
1052
  return Error(`Scroll strategy has already been attached.`);
1032
1053
  }
1033
1054
 
@@ -1048,7 +1069,7 @@ class CloseScrollStrategy {
1048
1069
  */
1049
1070
  attach(overlayRef) {
1050
1071
  if (this._overlayRef) {
1051
- throw getMdScrollStrategyAlreadyAttachedError();
1072
+ throw getMatScrollStrategyAlreadyAttachedError();
1052
1073
  }
1053
1074
  this._overlayRef = overlayRef;
1054
1075
  }
@@ -1157,7 +1178,7 @@ class RepositionScrollStrategy {
1157
1178
  */
1158
1179
  attach(overlayRef) {
1159
1180
  if (this._overlayRef) {
1160
- throw getMdScrollStrategyAlreadyAttachedError();
1181
+ throw getMatScrollStrategyAlreadyAttachedError();
1161
1182
  }
1162
1183
  this._overlayRef = overlayRef;
1163
1184
  }
@@ -1233,9 +1254,9 @@ ScrollStrategyOptions.ctorParameters = () => [
1233
1254
  */
1234
1255
  let nextUniqueId = 0;
1235
1256
  /**
1236
- * The default state for newly created overlays.
1257
+ * The default config for newly created overlays.
1237
1258
  */
1238
- let defaultState = new OverlayConfig();
1259
+ let defaultConfig = new OverlayConfig();
1239
1260
  /**
1240
1261
  * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be
1241
1262
  * used as a low-level building building block for other components. Dialogs, tooltips, menus,
@@ -1265,13 +1286,13 @@ class Overlay {
1265
1286
  }
1266
1287
  /**
1267
1288
  * Creates an overlay.
1268
- * @param {?=} state State to apply to the overlay.
1289
+ * @param {?=} config Config to apply to the overlay.
1269
1290
  * @return {?} Reference to the created overlay.
1270
1291
  */
1271
- create(state = defaultState) {
1292
+ create(config = defaultConfig) {
1272
1293
  const /** @type {?} */ pane = this._createPaneElement();
1273
1294
  const /** @type {?} */ portalHost = this._createPortalHost(pane);
1274
- return new OverlayRef(portalHost, pane, state, this._ngZone);
1295
+ return new OverlayRef(portalHost, pane, config, this._ngZone);
1275
1296
  }
1276
1297
  /**
1277
1298
  * Returns a position builder that can be used, via fluent API,
@@ -1317,6 +1338,74 @@ Overlay.ctorParameters = () => [
1317
1338
  { type: NgZone, },
1318
1339
  ];
1319
1340
 
1341
+ /**
1342
+ * The FullscreenOverlayContainer is the alternative to OverlayContainer
1343
+ * that supports correct displaying of overlay elements in Fullscreen mode
1344
+ * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
1345
+ * It should be provided in the root component that way:
1346
+ * providers: [
1347
+ * {provide: OverlayContainer, useClass: FullscreenOverlayContainer}
1348
+ * ],
1349
+ */
1350
+ class FullscreenOverlayContainer extends OverlayContainer {
1351
+ /**
1352
+ * @return {?}
1353
+ */
1354
+ _createContainer() {
1355
+ super._createContainer();
1356
+ this._adjustParentForFullscreenChange();
1357
+ this._addFullscreenChangeListener(() => this._adjustParentForFullscreenChange());
1358
+ }
1359
+ /**
1360
+ * @return {?}
1361
+ */
1362
+ _adjustParentForFullscreenChange() {
1363
+ if (!this._containerElement) {
1364
+ return;
1365
+ }
1366
+ let /** @type {?} */ fullscreenElement = this.getFullscreenElement();
1367
+ let /** @type {?} */ parent = fullscreenElement || document.body;
1368
+ parent.appendChild(this._containerElement);
1369
+ }
1370
+ /**
1371
+ * @param {?} fn
1372
+ * @return {?}
1373
+ */
1374
+ _addFullscreenChangeListener(fn) {
1375
+ if (document.fullscreenEnabled) {
1376
+ document.addEventListener('fullscreenchange', fn);
1377
+ }
1378
+ else if (document.webkitFullscreenEnabled) {
1379
+ document.addEventListener('webkitfullscreenchange', fn);
1380
+ }
1381
+ else if (((document)).mozFullScreenEnabled) {
1382
+ document.addEventListener('mozfullscreenchange', fn);
1383
+ }
1384
+ else if (((document)).msFullscreenEnabled) {
1385
+ document.addEventListener('MSFullscreenChange', fn);
1386
+ }
1387
+ }
1388
+ /**
1389
+ * When the page is put into fullscreen mode, a specific element is specified.
1390
+ * Only that element and its children are visible when in fullscreen mode.
1391
+ * @return {?}
1392
+ */
1393
+ getFullscreenElement() {
1394
+ return document.fullscreenElement ||
1395
+ document.webkitFullscreenElement ||
1396
+ ((document)).mozFullScreenElement ||
1397
+ ((document)).msFullscreenElement ||
1398
+ null;
1399
+ }
1400
+ }
1401
+ FullscreenOverlayContainer.decorators = [
1402
+ { type: Injectable },
1403
+ ];
1404
+ /**
1405
+ * @nocollapse
1406
+ */
1407
+ FullscreenOverlayContainer.ctorParameters = () => [];
1408
+
1320
1409
  /**
1321
1410
  * Default set of positions for the overlay. Follows the behavior of a dropdown.
1322
1411
  */
@@ -1327,22 +1416,22 @@ const defaultPositionList = [
1327
1416
  /**
1328
1417
  * Injection token that determines the scroll handling while the connected overlay is open.
1329
1418
  */
1330
- const MD_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('md-connected-overlay-scroll-strategy');
1419
+ const MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('mat-connected-overlay-scroll-strategy');
1331
1420
  /**
1332
1421
  * \@docs-private
1333
1422
  * @param {?} overlay
1334
1423
  * @return {?}
1335
1424
  */
1336
- function MD_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
1425
+ function MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
1337
1426
  return () => overlay.scrollStrategies.reposition();
1338
1427
  }
1339
1428
  /**
1340
1429
  * \@docs-private
1341
1430
  */
1342
- const MD_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
1343
- provide: MD_CONNECTED_OVERLAY_SCROLL_STRATEGY,
1431
+ const MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
1432
+ provide: MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY,
1344
1433
  deps: [Overlay],
1345
- useFactory: MD_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,
1434
+ useFactory: MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,
1346
1435
  };
1347
1436
  /**
1348
1437
  * Directive applied to an element to make it usable as an origin for an Overlay using a
@@ -1681,7 +1770,7 @@ class ConnectedOverlayDirective {
1681
1770
  this._createOverlay();
1682
1771
  }
1683
1772
  this._position.withDirection(this.dir);
1684
- this._overlayRef.getState().direction = this.dir;
1773
+ this._overlayRef.getConfig().direction = this.dir;
1685
1774
  this._initEscapeListener();
1686
1775
  if (!this._overlayRef.hasAttached()) {
1687
1776
  this._overlayRef.attach(this._templatePortal);
@@ -1743,7 +1832,7 @@ ConnectedOverlayDirective.ctorParameters = () => [
1743
1832
  { type: Renderer2, },
1744
1833
  { type: TemplateRef, },
1745
1834
  { type: ViewContainerRef, },
1746
- { type: undefined, decorators: [{ type: Inject, args: [MD_CONNECTED_OVERLAY_SCROLL_STRATEGY,] },] },
1835
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY,] },] },
1747
1836
  { type: Directionality, decorators: [{ type: Optional },] },
1748
1837
  ];
1749
1838
  ConnectedOverlayDirective.propDecorators = {
@@ -1777,80 +1866,12 @@ ConnectedOverlayDirective.propDecorators = {
1777
1866
  'detach': [{ type: Output },],
1778
1867
  };
1779
1868
 
1780
- /**
1781
- * The FullscreenOverlayContainer is the alternative to OverlayContainer
1782
- * that supports correct displaying of overlay elements in Fullscreen mode
1783
- * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
1784
- * It should be provided in the root component that way:
1785
- * providers: [
1786
- * {provide: OverlayContainer, useClass: FullscreenOverlayContainer}
1787
- * ],
1788
- */
1789
- class FullscreenOverlayContainer extends OverlayContainer {
1790
- /**
1791
- * @return {?}
1792
- */
1793
- _createContainer() {
1794
- super._createContainer();
1795
- this._adjustParentForFullscreenChange();
1796
- this._addFullscreenChangeListener(() => this._adjustParentForFullscreenChange());
1797
- }
1798
- /**
1799
- * @return {?}
1800
- */
1801
- _adjustParentForFullscreenChange() {
1802
- if (!this._containerElement) {
1803
- return;
1804
- }
1805
- let /** @type {?} */ fullscreenElement = this.getFullscreenElement();
1806
- let /** @type {?} */ parent = fullscreenElement || document.body;
1807
- parent.appendChild(this._containerElement);
1808
- }
1809
- /**
1810
- * @param {?} fn
1811
- * @return {?}
1812
- */
1813
- _addFullscreenChangeListener(fn) {
1814
- if (document.fullscreenEnabled) {
1815
- document.addEventListener('fullscreenchange', fn);
1816
- }
1817
- else if (document.webkitFullscreenEnabled) {
1818
- document.addEventListener('webkitfullscreenchange', fn);
1819
- }
1820
- else if (((document)).mozFullScreenEnabled) {
1821
- document.addEventListener('mozfullscreenchange', fn);
1822
- }
1823
- else if (((document)).msFullscreenEnabled) {
1824
- document.addEventListener('MSFullscreenChange', fn);
1825
- }
1826
- }
1827
- /**
1828
- * When the page is put into fullscreen mode, a specific element is specified.
1829
- * Only that element and its children are visible when in fullscreen mode.
1830
- * @return {?}
1831
- */
1832
- getFullscreenElement() {
1833
- return document.fullscreenElement ||
1834
- document.webkitFullscreenElement ||
1835
- ((document)).mozFullScreenElement ||
1836
- ((document)).msFullscreenElement ||
1837
- null;
1838
- }
1839
- }
1840
- FullscreenOverlayContainer.decorators = [
1841
- { type: Injectable },
1842
- ];
1843
- /**
1844
- * @nocollapse
1845
- */
1846
- FullscreenOverlayContainer.ctorParameters = () => [];
1847
-
1848
1869
  const OVERLAY_PROVIDERS = [
1849
1870
  Overlay,
1850
1871
  OverlayPositionBuilder,
1851
1872
  VIEWPORT_RULER_PROVIDER,
1852
1873
  OVERLAY_CONTAINER_PROVIDER,
1853
- MD_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,
1874
+ MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,
1854
1875
  ];
1855
1876
  class OverlayModule {
1856
1877
  }
@@ -1871,5 +1892,5 @@ OverlayModule.ctorParameters = () => [];
1871
1892
  * Generated bundle index. Do not edit.
1872
1893
  */
1873
1894
 
1874
- export { OVERLAY_PROVIDERS, OverlayModule, Overlay, OverlayContainer, FullscreenOverlayContainer, OverlayRef, ConnectedOverlayDirective, OverlayOrigin, ViewportRuler, GlobalPositionStrategy, ConnectedPositionStrategy, VIEWPORT_RULER_PROVIDER, OverlayConfig, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, Scrollable, ScrollDispatcher, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, OVERLAY_CONTAINER_PROVIDER as ɵb, OVERLAY_CONTAINER_PROVIDER_FACTORY as ɵa, MD_CONNECTED_OVERLAY_SCROLL_STRATEGY as ɵc, MD_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER as ɵe, MD_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵd, OverlayPositionBuilder as ɵf };
1895
+ export { Overlay, OverlayContainer, FullscreenOverlayContainer, OverlayRef, ConnectedOverlayDirective, OverlayOrigin, ViewportRuler, GlobalPositionStrategy, ConnectedPositionStrategy, VIEWPORT_RULER_PROVIDER, OverlayConfig, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, Scrollable, ScrollDispatcher, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, OVERLAY_PROVIDERS, OverlayModule, OVERLAY_CONTAINER_PROVIDER as ɵb, OVERLAY_CONTAINER_PROVIDER_FACTORY as ɵa, MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY as ɵc, MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER as ɵe, MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY as ɵd, OverlayPositionBuilder as ɵf };
1875
1896
  //# sourceMappingURL=overlay.js.map