@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.
- package/_a11y.scss +23 -0
- package/_overlay.scss +93 -0
- package/a11y/index.metadata.json +2 -1
- package/a11y/typings/a11y-module.d.ts +2 -0
- package/a11y/typings/focus-monitor.d.ts +1 -1
- package/a11y/typings/index.d.ts +1 -1
- package/a11y/typings/index.metadata.json +1 -1
- package/a11y/typings/{public_api.d.ts → public-api.d.ts} +8 -2
- package/a11y-prebuilt.css +1 -0
- package/a11y.metadata.json +2 -1
- package/bidi/index.metadata.json +2 -1
- package/bidi/typings/bidi-module.d.ts +2 -0
- package/bidi/typings/index.d.ts +1 -1
- package/bidi/typings/index.metadata.json +1 -1
- package/bidi/typings/public-api.d.ts +10 -0
- package/bidi.metadata.json +2 -1
- package/bundles/cdk-a11y.umd.js +1368 -1357
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +2 -2
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +42 -40
- package/bundles/cdk-bidi.umd.js.map +1 -1
- package/bundles/cdk-bidi.umd.min.js +2 -2
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +12 -0
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js +2 -2
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +113 -11
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +2 -2
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +235 -0
- package/bundles/cdk-layout.umd.js.map +1 -0
- package/bundles/cdk-layout.umd.min.js +9 -0
- package/bundles/cdk-layout.umd.min.js.map +1 -0
- package/bundles/cdk-observers.umd.js +41 -40
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +2 -2
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +306 -265
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +19 -17
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +2 -2
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +71 -37
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +2 -2
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-rxjs.umd.js +13 -4
- package/bundles/cdk-rxjs.umd.js.map +1 -1
- package/bundles/cdk-rxjs.umd.min.js +2 -2
- package/bundles/cdk-rxjs.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +89 -54
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +2 -2
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +115 -90
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js +2 -2
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +261 -218
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +2 -2
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +2 -2
- package/bundles/cdk.umd.min.js.map +1 -1
- package/cdk.metadata.json +2 -1
- package/coercion/index.metadata.json +2 -1
- package/coercion/typings/array.d.ts +9 -0
- package/coercion/typings/index.d.ts +1 -1
- package/coercion/typings/index.metadata.json +1 -1
- package/{typings/coercion/public_api.d.ts → coercion/typings/public-api.d.ts} +1 -0
- package/coercion.metadata.json +2 -1
- package/collections/index.metadata.json +2 -1
- package/collections/typings/index.d.ts +2 -1
- package/collections/typings/index.metadata.json +1 -1
- package/{typings/collections/public_api.d.ts → collections/typings/public-api.d.ts} +1 -0
- package/collections/typings/selection.d.ts +13 -3
- package/collections/typings/unique-selection-dispatcher.d.ts +40 -0
- package/collections.metadata.json +2 -1
- package/esm2015/a11y.js +1252 -1250
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/bidi.js +1 -1
- package/esm2015/bidi.js.map +1 -1
- package/esm2015/cdk.js +1 -1
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +11 -1
- package/esm2015/coercion.js.map +1 -1
- package/esm2015/collections.js +93 -8
- package/esm2015/collections.js.map +1 -1
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +226 -0
- package/esm2015/layout.js.map +1 -0
- package/esm2015/observers.js +8 -7
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +157 -136
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +1 -1
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +30 -1
- package/esm2015/portal.js.map +1 -1
- package/esm2015/rxjs.js +5 -1
- package/esm2015/rxjs.js.map +1 -1
- package/esm2015/scrolling.js +39 -8
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +27 -5
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +68 -29
- package/esm2015/table.js.map +1 -1
- package/esm5/a11y.es5.js +1372 -1357
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/bidi.es5.js +45 -40
- package/esm5/bidi.es5.js.map +1 -1
- package/esm5/cdk.es5.js +4 -1
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +14 -1
- package/esm5/coercion.es5.js.map +1 -1
- package/esm5/collections.es5.js +110 -8
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +2 -0
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +234 -0
- package/esm5/layout.es5.js.map +1 -0
- package/esm5/observers.es5.js +44 -40
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +304 -259
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +22 -17
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +81 -44
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/rxjs.es5.js +12 -1
- package/esm5/rxjs.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +89 -51
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +119 -91
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +265 -218
- package/esm5/table.es5.js.map +1 -1
- package/keycodes/index.metadata.json +2 -1
- package/keycodes/typings/index.d.ts +1 -1
- package/keycodes/typings/{public_api.d.ts → public-api.d.ts} +0 -0
- package/keycodes.metadata.json +2 -1
- package/layout/index.d.ts +8 -0
- package/layout/index.metadata.json +12 -0
- package/layout/package.json +7 -0
- package/layout/typings/breakpoints-observer.d.ts +37 -0
- package/layout/typings/breakpoints.d.ts +18 -0
- package/layout/typings/index.d.ts +4 -0
- package/layout/typings/index.metadata.json +1 -0
- package/layout/typings/media-matcher.d.ts +15 -0
- package/layout/typings/public-api.d.ts +5 -0
- package/layout.d.ts +8 -0
- package/layout.metadata.json +12 -0
- package/observers/index.metadata.json +2 -1
- package/observers/typings/index.d.ts +1 -1
- package/observers/typings/index.metadata.json +1 -1
- package/observers/typings/observe-content.d.ts +3 -3
- package/observers/typings/{public_api.d.ts → public-api.d.ts} +0 -0
- package/observers.metadata.json +2 -1
- package/overlay/index.metadata.json +2 -1
- package/overlay/typings/index.d.ts +2 -2
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-config.d.ts +1 -1
- package/overlay/typings/overlay-directives.d.ts +3 -3
- package/overlay/typings/overlay-module.d.ts +11 -0
- package/overlay/typings/overlay-ref.d.ts +6 -6
- package/overlay/typings/overlay.d.ts +2 -2
- package/overlay/typings/position/connected-position-strategy.d.ts +5 -0
- package/overlay/typings/position/position-strategy.d.ts +2 -0
- package/overlay/typings/{public_api.d.ts → public-api.d.ts} +1 -4
- package/overlay/typings/scroll/scroll-strategy.d.ts +1 -1
- package/overlay-prebuilt.css +1 -0
- package/overlay.metadata.json +2 -1
- package/package.json +3 -3
- package/platform/index.metadata.json +2 -1
- package/platform/typings/index.d.ts +1 -1
- package/platform/typings/index.metadata.json +1 -1
- package/platform/typings/platform-module.d.ts +2 -0
- package/platform/typings/public-api.d.ts +10 -0
- package/platform.metadata.json +2 -1
- package/portal/index.metadata.json +2 -1
- package/portal/typings/index.d.ts +1 -1
- package/portal/typings/index.metadata.json +1 -1
- package/portal/typings/{public_api.d.ts → public-api.d.ts} +1 -0
- package/portal.metadata.json +2 -1
- package/rxjs/index.metadata.json +2 -1
- package/rxjs/typings/index.d.ts +1 -1
- package/rxjs/typings/index.metadata.json +1 -1
- package/rxjs/typings/{public_api.d.ts → public-api.d.ts} +0 -0
- package/rxjs/typings/rx-operators.d.ts +7 -0
- package/rxjs.metadata.json +2 -1
- package/scrolling/index.metadata.json +2 -1
- package/scrolling/typings/index.d.ts +1 -1
- package/scrolling/typings/index.metadata.json +1 -1
- package/scrolling/typings/public-api.d.ts +11 -0
- package/scrolling/typings/scrolling-module.d.ts +2 -0
- package/scrolling/typings/viewport-ruler.d.ts +20 -6
- package/scrolling.metadata.json +2 -1
- package/stepper/index.metadata.json +2 -1
- package/stepper/typings/index.d.ts +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/public-api.d.ts +11 -0
- package/stepper/typings/stepper-module.d.ts +2 -0
- package/stepper/typings/stepper.d.ts +8 -4
- package/stepper.metadata.json +2 -1
- package/table/index.metadata.json +2 -1
- package/table/typings/index.d.ts +1 -1
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +13 -0
- package/table/typings/row.d.ts +11 -3
- package/table/typings/table-errors.d.ts +10 -0
- package/table/typings/table-module.d.ts +2 -0
- package/table/typings/table.d.ts +17 -8
- package/table.metadata.json +2 -1
- package/typings/a11y/a11y-module.d.ts +2 -0
- package/typings/a11y/focus-monitor.d.ts +1 -1
- package/typings/a11y/index.d.ts +1 -1
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/a11y/{public_api.d.ts → public-api.d.ts} +8 -2
- package/typings/bidi/bidi-module.d.ts +2 -0
- package/typings/bidi/index.d.ts +1 -1
- package/typings/bidi/index.metadata.json +1 -1
- package/typings/bidi/public-api.d.ts +10 -0
- package/typings/coercion/array.d.ts +9 -0
- package/typings/coercion/index.d.ts +1 -1
- package/typings/coercion/index.metadata.json +1 -1
- package/{coercion/typings/public_api.d.ts → typings/coercion/public-api.d.ts} +1 -0
- package/typings/collections/index.d.ts +2 -1
- package/typings/collections/index.metadata.json +1 -1
- package/{collections/typings/public_api.d.ts → typings/collections/public-api.d.ts} +1 -0
- package/typings/collections/selection.d.ts +13 -3
- package/typings/collections/unique-selection-dispatcher.d.ts +40 -0
- package/typings/index.d.ts +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/keycodes/index.d.ts +1 -1
- package/typings/keycodes/{public_api.d.ts → public-api.d.ts} +0 -0
- package/typings/layout/breakpoints-observer.d.ts +37 -0
- package/typings/layout/breakpoints.d.ts +18 -0
- package/typings/layout/index.d.ts +4 -0
- package/typings/layout/index.metadata.json +1 -0
- package/typings/layout/media-matcher.d.ts +15 -0
- package/typings/layout/public-api.d.ts +5 -0
- package/typings/observers/index.d.ts +1 -1
- package/typings/observers/index.metadata.json +1 -1
- package/typings/observers/observe-content.d.ts +3 -3
- package/typings/observers/{public_api.d.ts → public-api.d.ts} +0 -0
- package/typings/overlay/index.d.ts +2 -2
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-config.d.ts +1 -1
- package/typings/overlay/overlay-directives.d.ts +3 -3
- package/typings/overlay/overlay-module.d.ts +11 -0
- package/typings/overlay/overlay-ref.d.ts +6 -6
- package/typings/overlay/overlay.d.ts +2 -2
- package/typings/overlay/position/connected-position-strategy.d.ts +5 -0
- package/typings/overlay/position/position-strategy.d.ts +2 -0
- package/typings/overlay/{public_api.d.ts → public-api.d.ts} +1 -4
- package/typings/overlay/scroll/scroll-strategy.d.ts +1 -1
- package/typings/platform/index.d.ts +1 -1
- package/typings/platform/index.metadata.json +1 -1
- package/typings/platform/platform-module.d.ts +2 -0
- package/typings/platform/public-api.d.ts +10 -0
- package/typings/portal/index.d.ts +1 -1
- package/typings/portal/index.metadata.json +1 -1
- package/typings/portal/{public_api.d.ts → public-api.d.ts} +1 -0
- package/typings/{public_api.d.ts → public-api.d.ts} +0 -0
- package/typings/rxjs/index.d.ts +1 -1
- package/typings/rxjs/index.metadata.json +1 -1
- package/typings/rxjs/{public_api.d.ts → public-api.d.ts} +0 -0
- package/typings/rxjs/rx-operators.d.ts +7 -0
- package/typings/scrolling/index.d.ts +1 -1
- package/typings/scrolling/index.metadata.json +1 -1
- package/typings/scrolling/public-api.d.ts +11 -0
- package/typings/scrolling/scrolling-module.d.ts +2 -0
- package/typings/scrolling/viewport-ruler.d.ts +20 -6
- package/typings/stepper/index.d.ts +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/public-api.d.ts +11 -0
- package/typings/stepper/stepper-module.d.ts +2 -0
- package/typings/stepper/stepper.d.ts +8 -4
- package/typings/table/index.d.ts +1 -1
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +13 -0
- package/typings/table/row.d.ts +11 -3
- package/typings/table/table-errors.d.ts +10 -0
- package/typings/table/table-module.d.ts +2 -0
- package/typings/table/table.d.ts +17 -8
- package/bidi/typings/public_api.d.ts +0 -4
- package/platform/typings/public_api.d.ts +0 -4
- package/scrolling/typings/public_api.d.ts +0 -5
- package/stepper/typings/public_api.d.ts +0 -5
- package/table/typings/public_api.d.ts +0 -7
- package/typings/bidi/public_api.d.ts +0 -4
- package/typings/platform/public_api.d.ts +0 -4
- package/typings/scrolling/public_api.d.ts +0 -5
- package/typings/stepper/public_api.d.ts +0 -5
- package/typings/table/public_api.d.ts +0 -7
package/esm2015/observers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observers.js","sources":["
|
|
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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"}
|
package/esm2015/overlay.js
CHANGED
|
@@ -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 {?=}
|
|
40
|
+
* @param {?=} config
|
|
41
41
|
*/
|
|
42
|
-
constructor(
|
|
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 (
|
|
64
|
-
Object.keys(
|
|
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 {?}
|
|
77
|
+
* @param {?} _config
|
|
78
78
|
* @param {?} _ngZone
|
|
79
79
|
*/
|
|
80
|
-
constructor(_portalHost, _pane,
|
|
80
|
+
constructor(_portalHost, _pane, _config, _ngZone) {
|
|
81
81
|
this._portalHost = _portalHost;
|
|
82
82
|
this._pane = _pane;
|
|
83
|
-
this.
|
|
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 (
|
|
90
|
-
|
|
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.
|
|
108
|
-
this.
|
|
107
|
+
if (this._config.positionStrategy) {
|
|
108
|
+
this._config.positionStrategy.attach(this);
|
|
109
109
|
}
|
|
110
|
-
// Update the pane element with the given
|
|
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.
|
|
116
|
-
this.
|
|
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.
|
|
120
|
+
if (this._config.hasBackdrop) {
|
|
121
121
|
this._attachBackdrop();
|
|
122
122
|
}
|
|
123
|
-
if (this.
|
|
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.
|
|
126
|
-
this.
|
|
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.
|
|
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 {?}
|
|
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.
|
|
147
|
-
this.
|
|
146
|
+
if (this._config.positionStrategy && this._config.positionStrategy.detach) {
|
|
147
|
+
this._config.positionStrategy.detach();
|
|
148
148
|
}
|
|
149
|
-
|
|
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.
|
|
160
|
-
this.
|
|
162
|
+
if (this._config.positionStrategy) {
|
|
163
|
+
this._config.positionStrategy.dispose();
|
|
161
164
|
}
|
|
162
|
-
if (this.
|
|
163
|
-
this.
|
|
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
|
|
204
|
+
* Gets the current config of the overlay.
|
|
202
205
|
* @return {?}
|
|
203
206
|
*/
|
|
204
|
-
|
|
205
|
-
return this.
|
|
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.
|
|
213
|
-
this.
|
|
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.
|
|
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.
|
|
229
|
-
this._pane.style.width = formatCssUnit(this.
|
|
231
|
+
if (this._config.width || this._config.width === 0) {
|
|
232
|
+
this._pane.style.width = formatCssUnit(this._config.width);
|
|
230
233
|
}
|
|
231
|
-
if (this.
|
|
232
|
-
this._pane.style.height = formatCssUnit(this.
|
|
234
|
+
if (this._config.height || this._config.height === 0) {
|
|
235
|
+
this._pane.style.height = formatCssUnit(this._config.height);
|
|
233
236
|
}
|
|
234
|
-
if (this.
|
|
235
|
-
this._pane.style.minWidth = formatCssUnit(this.
|
|
237
|
+
if (this._config.minWidth || this._config.minWidth === 0) {
|
|
238
|
+
this._pane.style.minWidth = formatCssUnit(this._config.minWidth);
|
|
236
239
|
}
|
|
237
|
-
if (this.
|
|
238
|
-
this._pane.style.minHeight = formatCssUnit(this.
|
|
240
|
+
if (this._config.minHeight || this._config.minHeight === 0) {
|
|
241
|
+
this._pane.style.minHeight = formatCssUnit(this._config.minHeight);
|
|
239
242
|
}
|
|
240
|
-
if (this.
|
|
241
|
-
this._pane.style.maxWidth = formatCssUnit(this.
|
|
243
|
+
if (this._config.maxWidth || this._config.maxWidth === 0) {
|
|
244
|
+
this._pane.style.maxWidth = formatCssUnit(this._config.maxWidth);
|
|
242
245
|
}
|
|
243
|
-
if (this.
|
|
244
|
-
this._pane.style.maxHeight = formatCssUnit(this.
|
|
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.
|
|
263
|
-
this._backdropElement.classList.add(this.
|
|
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.
|
|
313
|
-
backdropToDetach.classList.remove(this.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1257
|
+
* The default config for newly created overlays.
|
|
1237
1258
|
*/
|
|
1238
|
-
let
|
|
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 {?=}
|
|
1289
|
+
* @param {?=} config Config to apply to the overlay.
|
|
1269
1290
|
* @return {?} Reference to the created overlay.
|
|
1270
1291
|
*/
|
|
1271
|
-
create(
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
1343
|
-
provide:
|
|
1431
|
+
const MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
|
|
1432
|
+
provide: MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY,
|
|
1344
1433
|
deps: [Overlay],
|
|
1345
|
-
useFactory:
|
|
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.
|
|
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: [
|
|
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
|
-
|
|
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 {
|
|
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
|