@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-scrolling.umd.js","sources":["../../src/cdk/scrolling/index.ts","../../src/cdk/scrolling/public_api.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scroll-dispatcher.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport {ScrollDispatchModule,DEFAULT_SCROLL_TIME,ScrollDispatcher,SCROLL_DISPATCHER_PROVIDER_FACTORY,SCROLL_DISPATCHER_PROVIDER,Scrollable,ViewportRuler,VIEWPORT_RULER_PROVIDER_FACTORY,VIEWPORT_RULER_PROVIDER} 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 {NgModule} from '@angular/core';\nimport {SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nimport {Scrollable} from './scrollable';\nimport {PlatformModule} from '@angular/cdk/platform';\nexport class ScrollDispatchModule {static decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [PlatformModule],\n exports: [Scrollable],\n declarations: [Scrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction ScrollDispatchModule_tsickle_Closure_declarations() {\n/** @type {?} */\nScrollDispatchModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nScrollDispatchModule.ctorParameters;\n}\n\n\nexport {DEFAULT_SCROLL_TIME,ScrollDispatcher,SCROLL_DISPATCHER_PROVIDER_FACTORY,SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nexport {Scrollable} from './scrollable';\nexport {ViewportRuler,VIEWPORT_RULER_PROVIDER_FACTORY,VIEWPORT_RULER_PROVIDER} from './viewport-ruler';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\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 {Injectable, Optional, SkipSelf} from '@angular/core';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * \\@docs-private\n */\nexport class ViewportRuler {\n/**\n * Cached document client rectangle.\n */\nprivate _documentRect?: ClientRect;\n/**\n * @param {?} scrollDispatcher\n */\nconstructor(scrollDispatcher: ScrollDispatcher) {\n // Subscribe to scroll and resize events and update the document rectangle on changes.\n scrollDispatcher.scrolled(0, () => this._cacheViewportGeometry());\n }\n/**\n * Gets a ClientRect for the viewport's bounds.\n * @param {?=} documentRect\n * @return {?}\n */\ngetViewportRect(documentRect = this._documentRect): ClientRect {\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const /** @type {?} */ scrollPosition = this.getViewportScrollPosition(documentRect);\n const /** @type {?} */ height = window.innerHeight;\n const /** @type {?} */ width = window.innerWidth;\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n/**\n * Gets the (top, left) scroll position of the viewport.\n * @param {?=} documentRect\n * @return {?}\n */\ngetViewportScrollPosition(documentRect = this._documentRect) {\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const /** @type {?} */ top = - /** @type {?} */((documentRect)).top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const /** @type {?} */ left = - /** @type {?} */((documentRect)).left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n/**\n * Caches the latest client rectangle of the document element.\n * @return {?}\n */\n_cacheViewportGeometry() {\n this._documentRect = document.documentElement.getBoundingClientRect();\n }\n\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ScrollDispatcher, },\n];\n}\n\nfunction ViewportRuler_tsickle_Closure_declarations() {\n/** @type {?} */\nViewportRuler.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nViewportRuler.ctorParameters;\n/**\n * Cached document client rectangle.\n * @type {?}\n */\nViewportRuler.prototype._documentRect;\n}\n\n/**\n * \\@docs-private\n * @param {?} parentRuler\n * @param {?} scrollDispatcher\n * @return {?}\n */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n scrollDispatcher: ScrollDispatcher) {\n return parentRuler || new ViewportRuler(scrollDispatcher);\n}\n/**\n * \\@docs-private\n */\nexport const VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], ScrollDispatcher],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\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 {Directive, ElementRef, OnInit, OnDestroy, NgZone, Renderer2} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subject} from 'rxjs/Subject';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\nexport class Scrollable implements OnInit, OnDestroy {\nprivate _elementScrolled: Subject<Event> = new Subject();\nprivate _scrollListener: Function | null;\n/**\n * @param {?} _elementRef\n * @param {?} _scroll\n * @param {?} _ngZone\n * @param {?} _renderer\n */\nconstructor(private _elementRef: ElementRef,\nprivate _scroll: ScrollDispatcher,\nprivate _ngZone: NgZone,\nprivate _renderer: Renderer2) {}\n/**\n * @return {?}\n */\nngOnInit() {\n this._scrollListener = this._ngZone.runOutsideAngular(() => {\n return this._renderer.listen(this.getElementRef().nativeElement, 'scroll', (event: Event) => {\n this._elementScrolled.next(event);\n });\n });\n\n this._scroll.register(this);\n }\n/**\n * @return {?}\n */\nngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this._scrollListener();\n this._scrollListener = null;\n }\n }\n/**\n * Returns observable that emits when a scroll event is fired on the host element.\n * @return {?}\n */\nelementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n/**\n * @return {?}\n */\ngetElementRef(): ElementRef {\n return this._elementRef;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[cdk-scrollable], [cdkScrollable]'\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ElementRef, },\n{type: ScrollDispatcher, },\n{type: NgZone, },\n{type: Renderer2, },\n];\n}\n\nfunction Scrollable_tsickle_Closure_declarations() {\n/** @type {?} */\nScrollable.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nScrollable.ctorParameters;\n/** @type {?} */\nScrollable.prototype._elementScrolled;\n/** @type {?} */\nScrollable.prototype._scrollListener;\n/** @type {?} */\nScrollable.prototype._elementRef;\n/** @type {?} */\nScrollable.prototype._scroll;\n/** @type {?} */\nScrollable.prototype._ngZone;\n/** @type {?} */\nScrollable.prototype._renderer;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\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 {ElementRef, Injectable, NgZone, Optional, SkipSelf} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs/Subject';\nimport {Subscription} from 'rxjs/Subscription';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {merge} from 'rxjs/observable/merge';\nimport {auditTime} from 'rxjs/operator/auditTime';\nimport {Scrollable} from './scrollable';\n/**\n * Time in ms to throttle the scrolling events by default.\n */\nexport const DEFAULT_SCROLL_TIME = 20;\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\nexport class ScrollDispatcher {\n/**\n * @param {?} _ngZone\n * @param {?} _platform\n */\nconstructor(private _ngZone: NgZone,\nprivate _platform: Platform) { }\n/**\n * Subject for notifying that a registered scrollable reference element has been scrolled.\n */\n_scrolled: Subject<void> = new Subject<void>();\n/**\n * Keeps track of the global `scroll` and `resize` subscriptions.\n */\n_globalSubscription: Subscription | null = null;\n/**\n * Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards.\n */\nprivate _scrolledCount = 0;\n/**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\nscrollableReferences: Map<Scrollable, Subscription> = new Map();\n/**\n * Registers a Scrollable with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event in its scrolled observable.\n * @param {?} scrollable Scrollable instance to be registered.\n * @return {?}\n */\nregister(scrollable: Scrollable): void {\n const /** @type {?} */ scrollSubscription = scrollable.elementScrolled().subscribe(() => this._notify());\n\n this.scrollableReferences.set(scrollable, scrollSubscription);\n }\n/**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param {?} scrollable Scrollable instance to be deregistered.\n * @return {?}\n */\nderegister(scrollable: Scrollable): void {\n const /** @type {?} */ scrollableReference = this.scrollableReferences.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollableReferences.delete(scrollable);\n }\n }\n/**\n * Subscribes to an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n * @param {?=} auditTimeInMs\n * @param {?=} callback\n * @return {?}\n */\nscrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME, callback: () => any): Subscription {\n // Scroll events can only happen on the browser, so do nothing if we're not on the browser.\n if (!this._platform.isBrowser) {\n return Subscription.EMPTY;\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n let /** @type {?} */ observable = auditTimeInMs > 0 ?\n auditTime.call(this._scrolled.asObservable(), auditTimeInMs) :\n this._scrolled.asObservable();\n\n this._scrolledCount++;\n\n if (!this._globalSubscription) {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return merge(\n fromEvent(window.document, 'scroll'),\n fromEvent(window, 'resize')\n ).subscribe(() => this._notify());\n });\n }\n\n // Note that we need to do the subscribing from here, in order to be able to remove\n // the global event listeners once there are no more subscriptions.\n let /** @type {?} */ subscription = observable.subscribe(callback);\n\n subscription.add(() => {\n this._scrolledCount--;\n\n if (this._globalSubscription && !this.scrollableReferences.size && !this._scrolledCount) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n });\n\n return subscription;\n }\n/**\n * Returns all registered Scrollables that contain the provided element.\n * @param {?} elementRef\n * @return {?}\n */\ngetScrollContainers(elementRef: ElementRef): Scrollable[] {\n const /** @type {?} */ scrollingContainers: Scrollable[] = [];\n\n this.scrollableReferences.forEach((_subscription: Subscription, scrollable: Scrollable) => {\n if (this.scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n/**\n * Returns true if the element is contained within the provided Scrollable.\n * @param {?} scrollable\n * @param {?} elementRef\n * @return {?}\n */\nscrollableContainsElement(scrollable: Scrollable, elementRef: ElementRef): boolean {\n let /** @type {?} */ element = elementRef.nativeElement;\n let /** @type {?} */ scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) { return true; }\n } while (element = element.parentElement);\n\n return false;\n }\n/**\n * Sends a notification that a scroll event has been fired.\n * @return {?}\n */\n_notify() {\n this._scrolled.next();\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: NgZone, },\n{type: Platform, },\n];\n}\n\nfunction ScrollDispatcher_tsickle_Closure_declarations() {\n/** @type {?} */\nScrollDispatcher.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nScrollDispatcher.ctorParameters;\n/**\n * Subject for notifying that a registered scrollable reference element has been scrolled.\n * @type {?}\n */\nScrollDispatcher.prototype._scrolled;\n/**\n * Keeps track of the global `scroll` and `resize` subscriptions.\n * @type {?}\n */\nScrollDispatcher.prototype._globalSubscription;\n/**\n * Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards.\n * @type {?}\n */\nScrollDispatcher.prototype._scrolledCount;\n/**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n * @type {?}\n */\nScrollDispatcher.prototype.scrollableReferences;\n/** @type {?} */\nScrollDispatcher.prototype._ngZone;\n/** @type {?} */\nScrollDispatcher.prototype._platform;\n}\n\n/**\n * \\@docs-private\n * @param {?} parentDispatcher\n * @param {?} ngZone\n * @param {?} platform\n * @return {?}\n */\nexport function SCROLL_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: ScrollDispatcher, ngZone: NgZone, platform: Platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n/**\n * \\@docs-private\n */\nexport const SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"],"names":["NgModule","Optional","SkipSelf","Injectable","NgZone","Platform","merge","fromEvent","auditTime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;QI8BA,IAAA,CAAA,OAAA,GAH+B,OAG/B,CAAA;QAHsB,IAAtB,CAAA,SAAA,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;KAqBA;;;;;;;;QAOA,IANG,KAMH,GAAA,IAAA,CAAA;QACI,qBAAJ,kBAAA,GAAA,UAAA,CAAA,eAAA,EAN2C,CAM3C,SAAA,CAAA,YAN4E,EAM5E,OAAA,KAAA,CAAA,OAAA,EAAA,CAAA,EAAA,CAAA,CAAA;QAEI,IAAI,CANC,oBAAC,CAAoB,GAAC,CAAG,UAAC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,CAAA,GAAA;YACA,IAAA,EAAA,cAAA,CAAA,IAAA;;;;;;KAMA,CAAA;;;;;;;;;;;;SAaA;;;;;;;;;;YAYA,QAAA,CAAA,eAAA,CAAA,UAAA,IAAA,CAAA,CAAA;QACI,OAAJ,EAAA,GAAA,EAAA,GAAA,EAAA,IAAA,EAAA,IALyB,EAKzB,CAAA;KACG,CAAH;;;;;;;;IACA,OAAA,aAAA,CAAA;CAQA,EAAA,CAAA,CAAA;AACA,aAAA,CAAA,UAAA,GAAA;IAGA,EAAA,IAAA,EAAAF,wBAAA,EAAA;;;;;;IAqBA,EAAA,IAAA,EAAA,gBAAA,GAAA;CAEA,CAAA,EAAE,CAAF;;;;;;;AAOA,SAAA,+BAAA,CAAA,WAAA,EAAA,gBAAA,EAAA;IACE,OAAO,WAAT,IAAwB,IAAxB,aAAA,CAA0C,gBAAgB,CAA1D,CAAA;CACA;;;;;;ID5HA,OAAA,EAAA,aACkB;IAAlB,IAAA,EAAA,CAAA,CAAA,IAAEF,sBAAF,EACW,EADX,IAAAC,sBACa,EADb,EAAA,aAAA,CAAA,EAAA,gBAAA,CAAA;IACA,UAAA,EAAE,+BAAF;CACA,CAAA;AACA,IAAA,oBAAA,IACa,YADb;IACA,SAAC,oBAAD,GAAA;KACA;;;;IAGA,EAAA,IAAA,EAAAF,sBAAA,EAAA,IAAA,EAAA,CAAA;;gBDvBA,OAAA,EAAA,CAAA,UAAA,CAAA;;gBAEA,SAAA,EAAA,CAAA,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"cdk-scrolling.umd.js","sources":["cdk/scrolling.es5.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, Injectable, NgModule, NgZone, Optional, Renderer2, SkipSelf } from '@angular/core';\nimport { Platform, PlatformModule } from '@angular/cdk/platform';\nimport { Subject } from 'rxjs/Subject';\nimport { Subscription } from 'rxjs/Subscription';\nimport { fromEvent } from 'rxjs/observable/fromEvent';\nimport { auditTime } from 'rxjs/operator/auditTime';\nimport { merge } from 'rxjs/observable/merge';\nimport { of } from 'rxjs/observable/of';\n\n/**\n * Time in ms to throttle the scrolling events by default.\n */\nvar DEFAULT_SCROLL_TIME = 20;\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\nvar ScrollDispatcher = (function () {\n /**\n * @param {?} _ngZone\n * @param {?} _platform\n */\n function ScrollDispatcher(_ngZone, _platform) {\n this._ngZone = _ngZone;\n this._platform = _platform;\n /**\n * Subject for notifying that a registered scrollable reference element has been scrolled.\n */\n this._scrolled = new Subject();\n /**\n * Keeps track of the global `scroll` and `resize` subscriptions.\n */\n this._globalSubscription = null;\n /**\n * Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards.\n */\n this._scrolledCount = 0;\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n this.scrollableReferences = new Map();\n }\n /**\n * Registers a Scrollable with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event in its scrolled observable.\n * @param {?} scrollable Scrollable instance to be registered.\n * @return {?}\n */\n ScrollDispatcher.prototype.register = function (scrollable) {\n var _this = this;\n var /** @type {?} */ scrollSubscription = scrollable.elementScrolled().subscribe(function () { return _this._notify(); });\n this.scrollableReferences.set(scrollable, scrollSubscription);\n };\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param {?} scrollable Scrollable instance to be deregistered.\n * @return {?}\n */\n ScrollDispatcher.prototype.deregister = function (scrollable) {\n var /** @type {?} */ scrollableReference = this.scrollableReferences.get(scrollable);\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollableReferences.delete(scrollable);\n }\n };\n /**\n * Subscribes to an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n * @param {?=} auditTimeInMs\n * @param {?=} callback\n * @return {?}\n */\n ScrollDispatcher.prototype.scrolled = function (auditTimeInMs, callback) {\n var _this = this;\n if (auditTimeInMs === void 0) { auditTimeInMs = DEFAULT_SCROLL_TIME; }\n // Scroll events can only happen on the browser, so do nothing if we're not on the browser.\n if (!this._platform.isBrowser) {\n return Subscription.EMPTY;\n }\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n var /** @type {?} */ observable = auditTimeInMs > 0 ?\n auditTime.call(this._scrolled.asObservable(), auditTimeInMs) :\n this._scrolled.asObservable();\n this._scrolledCount++;\n if (!this._globalSubscription) {\n this._globalSubscription = this._ngZone.runOutsideAngular(function () {\n return fromEvent(window.document, 'scroll').subscribe(function () { return _this._notify(); });\n });\n }\n // Note that we need to do the subscribing from here, in order to be able to remove\n // the global event listeners once there are no more subscriptions.\n var /** @type {?} */ subscription = observable.subscribe(callback);\n subscription.add(function () {\n _this._scrolledCount--;\n if (_this._globalSubscription && !_this.scrollableReferences.size && !_this._scrolledCount) {\n _this._globalSubscription.unsubscribe();\n _this._globalSubscription = null;\n }\n });\n return subscription;\n };\n /**\n * Returns all registered Scrollables that contain the provided element.\n * @param {?} elementRef\n * @return {?}\n */\n ScrollDispatcher.prototype.getScrollContainers = function (elementRef) {\n var _this = this;\n var /** @type {?} */ scrollingContainers = [];\n this.scrollableReferences.forEach(function (_subscription, scrollable) {\n if (_this.scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n };\n /**\n * Returns true if the element is contained within the provided Scrollable.\n * @param {?} scrollable\n * @param {?} elementRef\n * @return {?}\n */\n ScrollDispatcher.prototype.scrollableContainsElement = function (scrollable, elementRef) {\n var /** @type {?} */ element = elementRef.nativeElement;\n var /** @type {?} */ scrollableElement = scrollable.getElementRef().nativeElement;\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) {\n return true;\n }\n } while (element = element.parentElement);\n return false;\n };\n /**\n * Sends a notification that a scroll event has been fired.\n * @return {?}\n */\n ScrollDispatcher.prototype._notify = function () {\n this._scrolled.next();\n };\n ScrollDispatcher.decorators = [\n { type: Injectable },\n ];\n /**\n * @nocollapse\n */\n ScrollDispatcher.ctorParameters = function () { return [\n { type: NgZone, },\n { type: Platform, },\n ]; };\n return ScrollDispatcher;\n}());\n/**\n * \\@docs-private\n * @param {?} parentDispatcher\n * @param {?} ngZone\n * @param {?} platform\n * @return {?}\n */\nfunction SCROLL_DISPATCHER_PROVIDER_FACTORY(parentDispatcher, ngZone, platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n/**\n * \\@docs-private\n */\nvar SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\nvar Scrollable = (function () {\n /**\n * @param {?} _elementRef\n * @param {?} _scroll\n * @param {?} _ngZone\n * @param {?} _renderer\n */\n function Scrollable(_elementRef, _scroll, _ngZone, _renderer) {\n this._elementRef = _elementRef;\n this._scroll = _scroll;\n this._ngZone = _ngZone;\n this._renderer = _renderer;\n this._elementScrolled = new Subject();\n }\n /**\n * @return {?}\n */\n Scrollable.prototype.ngOnInit = function () {\n var _this = this;\n this._scrollListener = this._ngZone.runOutsideAngular(function () {\n return _this._renderer.listen(_this.getElementRef().nativeElement, 'scroll', function (event) {\n _this._elementScrolled.next(event);\n });\n });\n this._scroll.register(this);\n };\n /**\n * @return {?}\n */\n Scrollable.prototype.ngOnDestroy = function () {\n this._scroll.deregister(this);\n if (this._scrollListener) {\n this._scrollListener();\n this._scrollListener = null;\n }\n };\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n * @return {?}\n */\n Scrollable.prototype.elementScrolled = function () {\n return this._elementScrolled.asObservable();\n };\n /**\n * @return {?}\n */\n Scrollable.prototype.getElementRef = function () {\n return this._elementRef;\n };\n Scrollable.decorators = [\n { type: Directive, args: [{\n selector: '[cdk-scrollable], [cdkScrollable]'\n },] },\n ];\n /**\n * @nocollapse\n */\n Scrollable.ctorParameters = function () { return [\n { type: ElementRef, },\n { type: ScrollDispatcher, },\n { type: NgZone, },\n { type: Renderer2, },\n ]; };\n return Scrollable;\n}());\n\n/**\n * Time in ms to throttle the resize events by default.\n */\nvar DEFAULT_RESIZE_TIME = 20;\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * \\@docs-private\n */\nvar ViewportRuler = (function () {\n /**\n * @param {?} platform\n * @param {?} ngZone\n * @param {?} scrollDispatcher\n */\n function ViewportRuler(platform, ngZone, scrollDispatcher) {\n var _this = this;\n this._change = platform.isBrowser ? ngZone.runOutsideAngular(function () {\n return merge(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : of();\n // Subscribe to scroll and resize events and update the document rectangle on changes.\n this._invalidateCacheSubscriptions = [\n scrollDispatcher.scrolled(0, function () { return _this._cacheViewportGeometry(); }),\n this.change().subscribe(function () { return _this._cacheViewportGeometry(); })\n ];\n }\n /**\n * @return {?}\n */\n ViewportRuler.prototype.ngOnDestroy = function () {\n this._invalidateCacheSubscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });\n };\n /**\n * Gets a ClientRect for the viewport's bounds.\n * @param {?=} documentRect\n * @return {?}\n */\n ViewportRuler.prototype.getViewportRect = function (documentRect) {\n if (documentRect === void 0) { documentRect = this._documentRect; }\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n var /** @type {?} */ scrollPosition = this.getViewportScrollPosition(documentRect);\n var /** @type {?} */ height = window.innerHeight;\n var /** @type {?} */ width = window.innerWidth;\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height: height,\n width: width,\n };\n };\n /**\n * Gets the (top, left) scroll position of the viewport.\n * @param {?=} documentRect\n * @return {?}\n */\n ViewportRuler.prototype.getViewportScrollPosition = function (documentRect) {\n if (documentRect === void 0) { documentRect = this._documentRect; }\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n var /** @type {?} */ top = -((documentRect)).top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n var /** @type {?} */ left = -((documentRect)).left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n return { top: top, left: left };\n };\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param {?=} throttleTime\n * @return {?}\n */\n ViewportRuler.prototype.change = function (throttleTime) {\n if (throttleTime === void 0) { throttleTime = DEFAULT_RESIZE_TIME; }\n return throttleTime > 0 ? auditTime.call(this._change, throttleTime) : this._change;\n };\n /**\n * Caches the latest client rectangle of the document element.\n * @return {?}\n */\n ViewportRuler.prototype._cacheViewportGeometry = function () {\n this._documentRect = document.documentElement.getBoundingClientRect();\n };\n ViewportRuler.decorators = [\n { type: Injectable },\n ];\n /**\n * @nocollapse\n */\n ViewportRuler.ctorParameters = function () { return [\n { type: Platform, },\n { type: NgZone, },\n { type: ScrollDispatcher, },\n ]; };\n return ViewportRuler;\n}());\n/**\n * \\@docs-private\n * @param {?} parentRuler\n * @param {?} platform\n * @param {?} ngZone\n * @param {?} scrollDispatcher\n * @return {?}\n */\nfunction VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler, platform, ngZone, scrollDispatcher) {\n return parentRuler || new ViewportRuler(platform, ngZone, scrollDispatcher);\n}\n/**\n * \\@docs-private\n */\nvar VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], Platform, NgZone, ScrollDispatcher],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n\nvar ScrollDispatchModule = (function () {\n function ScrollDispatchModule() {\n }\n ScrollDispatchModule.decorators = [\n { type: NgModule, args: [{\n imports: [PlatformModule],\n exports: [Scrollable],\n declarations: [Scrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n },] },\n ];\n /**\n * @nocollapse\n */\n ScrollDispatchModule.ctorParameters = function () { return []; };\n return ScrollDispatchModule;\n}());\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DEFAULT_SCROLL_TIME, ScrollDispatcher, SCROLL_DISPATCHER_PROVIDER_FACTORY, SCROLL_DISPATCHER_PROVIDER, Scrollable, DEFAULT_RESIZE_TIME, ViewportRuler, VIEWPORT_RULER_PROVIDER_FACTORY, VIEWPORT_RULER_PROVIDER, ScrollDispatchModule };\n//# sourceMappingURL=scrolling.es5.js.map\n"],"names":["Subject","Subscription","auditTime","fromEvent","Injectable","NgZone","Platform","Optional","SkipSelf","Directive","ElementRef","Renderer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;QACjB,EAAE,IAAI,EAAE,gBAAgB,GAAG;KAC9B,CAAC,EAAE,CAAC;IACL,OAAO,aAAa,CAAC;CACxB,EAAE,CAAC,CAAC;;;;;;;;;AASL,SAAS,+BAA+B,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE;IACtF,OAAO,WAAW,IAAI,IAAI,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC/E;;;;AAID,IAAI,uBAAuB,GAAG;;IAE1B,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,CAAC,CAAC,IAAIE,sBAAQ,EAAE,EAAE,IAAIC,sBAAQ,EAAE,EAAE,aAAa,CAAC,EAAEF,8BAAQ,EAAED,oBAAM,EAAE,gBAAgB,CAAC;IAC3F,UAAU,EAAE,+BAA+B;CAC9C,CAAC;;AAEF,IAAI,oBAAoB,IAAI,YAAY;IACpC,SAAS,oBAAoB,GAAG;KAC/B;IACD,oBAAoB,CAAC,UAAU,GAAG;QAC9B,EAAE,IAAI,EAAES,sBAAQ,EAAE,IAAI,EAAE,CAAC;oBACb,OAAO,EAAE,CAACC,oCAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,UAAU,CAAC;oBACrB,YAAY,EAAE,CAAC,UAAU,CAAC;oBAC1B,SAAS,EAAE,CAAC,0BAA0B,CAAC;iBAC1C,EAAE,EAAE;KAChB,CAAC;;;;IAIF,oBAAoB,CAAC,cAAc,GAAG,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACjE,OAAO,oBAAoB,CAAC;CAC/B,EAAE,CAAC,CAAC,AAEL,AAIiP,AACjP,AAAyC;;;;;;;;;;;;;;;"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/cdk/platform"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/observable/fromEvent"),require("rxjs/observable/merge"),require("rxjs/
|
|
9
|
-
//# sourceMappingURL
|
|
8
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/cdk/platform"),require("rxjs/Subject"),require("rxjs/Subscription"),require("rxjs/observable/fromEvent"),require("rxjs/operator/auditTime"),require("rxjs/observable/merge"),require("rxjs/observable/of")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/cdk/platform","rxjs/Subject","rxjs/Subscription","rxjs/observable/fromEvent","rxjs/operator/auditTime","rxjs/observable/merge","rxjs/observable/of"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.scrolling=e.ng.cdk.scrolling||{}),e.ng.core,e.ng.cdk.platform,e.Rx,e.Rx,e.Rx.Observable,e.Rx.Observable.prototype,e.Rx.Observable,e.Rx.Observable)}(this,function(e,t,r,o,n,i,l,s,c){"use strict";function u(e,t,r){return e||new p(t,r)}function a(e,t,r,o){return e||new b(t,r,o)}var p=function(){function e(e,t){this._ngZone=e,this._platform=t,this._scrolled=new o.Subject,this._globalSubscription=null,this._scrolledCount=0,this.scrollableReferences=new Map}return e.prototype.register=function(e){var t=this,r=e.elementScrolled().subscribe(function(){return t._notify()});this.scrollableReferences.set(e,r)},e.prototype.deregister=function(e){var t=this.scrollableReferences.get(e);t&&(t.unsubscribe(),this.scrollableReferences.delete(e))},e.prototype.scrolled=function(e,t){var r=this;if(void 0===e&&(e=20),!this._platform.isBrowser)return n.Subscription.EMPTY;var o=e>0?l.auditTime.call(this._scrolled.asObservable(),e):this._scrolled.asObservable();this._scrolledCount++,this._globalSubscription||(this._globalSubscription=this._ngZone.runOutsideAngular(function(){return i.fromEvent(window.document,"scroll").subscribe(function(){return r._notify()})}));var s=o.subscribe(t);return s.add(function(){r._scrolledCount--,!r._globalSubscription||r.scrollableReferences.size||r._scrolledCount||(r._globalSubscription.unsubscribe(),r._globalSubscription=null)}),s},e.prototype.getScrollContainers=function(e){var t=this,r=[];return this.scrollableReferences.forEach(function(o,n){t.scrollableContainsElement(n,e)&&r.push(n)}),r},e.prototype.scrollableContainsElement=function(e,t){var r=t.nativeElement,o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1},e.prototype._notify=function(){this._scrolled.next()},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:t.NgZone},{type:r.Platform}]},e}(),f={provide:p,deps:[[new t.Optional,new t.SkipSelf,p],t.NgZone,r.Platform],useFactory:u},d=function(){function e(e,t,r,n){this._elementRef=e,this._scroll=t,this._ngZone=r,this._renderer=n,this._elementScrolled=new o.Subject}return e.prototype.ngOnInit=function(){var e=this;this._scrollListener=this._ngZone.runOutsideAngular(function(){return e._renderer.listen(e.getElementRef().nativeElement,"scroll",function(t){e._elementScrolled.next(t)})}),this._scroll.register(this)},e.prototype.ngOnDestroy=function(){this._scroll.deregister(this),this._scrollListener&&(this._scrollListener(),this._scrollListener=null)},e.prototype.elementScrolled=function(){return this._elementScrolled.asObservable()},e.prototype.getElementRef=function(){return this._elementRef},e.decorators=[{type:t.Directive,args:[{selector:"[cdk-scrollable], [cdkScrollable]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:p},{type:t.NgZone},{type:t.Renderer2}]},e}(),b=function(){function e(e,t,r){var o=this;this._change=e.isBrowser?t.runOutsideAngular(function(){return s.merge(i.fromEvent(window,"resize"),i.fromEvent(window,"orientationchange"))}):c.of(),this._invalidateCacheSubscriptions=[r.scrolled(0,function(){return o._cacheViewportGeometry()}),this.change().subscribe(function(){return o._cacheViewportGeometry()})]}return e.prototype.ngOnDestroy=function(){this._invalidateCacheSubscriptions.forEach(function(e){return e.unsubscribe()})},e.prototype.getViewportRect=function(e){void 0===e&&(e=this._documentRect),e||(this._cacheViewportGeometry(),e=this._documentRect);var t=this.getViewportScrollPosition(e),r=window.innerHeight,o=window.innerWidth;return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+o,height:r,width:o}},e.prototype.getViewportScrollPosition=function(e){return void 0===e&&(e=this._documentRect),e||(this._cacheViewportGeometry(),e=this._documentRect),{top:-e.top||document.body.scrollTop||window.scrollY||document.documentElement.scrollTop||0,left:-e.left||document.body.scrollLeft||window.scrollX||document.documentElement.scrollLeft||0}},e.prototype.change=function(e){return void 0===e&&(e=20),e>0?l.auditTime.call(this._change,e):this._change},e.prototype._cacheViewportGeometry=function(){this._documentRect=document.documentElement.getBoundingClientRect()},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:r.Platform},{type:t.NgZone},{type:p}]},e}(),h={provide:b,deps:[[new t.Optional,new t.SkipSelf,b],r.Platform,t.NgZone,p],useFactory:a},m=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.PlatformModule],exports:[d],declarations:[d],providers:[f]}]}],e.ctorParameters=function(){return[]},e}();e.DEFAULT_SCROLL_TIME=20,e.ScrollDispatcher=p,e.SCROLL_DISPATCHER_PROVIDER_FACTORY=u,e.SCROLL_DISPATCHER_PROVIDER=f,e.Scrollable=d,e.DEFAULT_RESIZE_TIME=20,e.ViewportRuler=b,e.VIEWPORT_RULER_PROVIDER_FACTORY=a,e.VIEWPORT_RULER_PROVIDER=h,e.ScrollDispatchModule=m,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
9
|
+
//# sourceMappingURL=/Users/karakara/repos/material2/dist/bundles/cdk-scrolling.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-scrolling.umd.min.js","sources":["../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scroll-dispatcher.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/public_api.ts","../../src/cdk/scrolling/index.ts"],"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 */\n\n\nimport {Injectable, Optional, SkipSelf} from '@angular/core';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * \\@docs-private\n */\nexport class ViewportRuler {\n/**\n * Cached document client rectangle.\n */\nprivate _documentRect?: ClientRect;\n/**\n * @param {?} scrollDispatcher\n */\nconstructor(scrollDispatcher: ScrollDispatcher) {\n // Subscribe to scroll and resize events and update the document rectangle on changes.\n scrollDispatcher.scrolled(0, () => this._cacheViewportGeometry());\n }\n/**\n * Gets a ClientRect for the viewport's bounds.\n * @param {?=} documentRect\n * @return {?}\n */\ngetViewportRect(documentRect = this._documentRect): ClientRect {\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const /** @type {?} */ scrollPosition = this.getViewportScrollPosition(documentRect);\n const /** @type {?} */ height = window.innerHeight;\n const /** @type {?} */ width = window.innerWidth;\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n/**\n * Gets the (top, left) scroll position of the viewport.\n * @param {?=} documentRect\n * @return {?}\n */\ngetViewportScrollPosition(documentRect = this._documentRect) {\n // Cache the document bounding rect so that we don't recompute it for multiple calls.\n if (!documentRect) {\n this._cacheViewportGeometry();\n documentRect = this._documentRect;\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const /** @type {?} */ top = - /** @type {?} */((documentRect)).top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const /** @type {?} */ left = - /** @type {?} */((documentRect)).left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n/**\n * Caches the latest client rectangle of the document element.\n * @return {?}\n */\n_cacheViewportGeometry() {\n this._documentRect = document.documentElement.getBoundingClientRect();\n }\n\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ScrollDispatcher, },\n];\n}\n\nfunction ViewportRuler_tsickle_Closure_declarations() {\n/** @type {?} */\nViewportRuler.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nViewportRuler.ctorParameters;\n/**\n * Cached document client rectangle.\n * @type {?}\n */\nViewportRuler.prototype._documentRect;\n}\n\n/**\n * \\@docs-private\n * @param {?} parentRuler\n * @param {?} scrollDispatcher\n * @return {?}\n */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n scrollDispatcher: ScrollDispatcher) {\n return parentRuler || new ViewportRuler(scrollDispatcher);\n}\n/**\n * \\@docs-private\n */\nexport const VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], ScrollDispatcher],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\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 {ElementRef, Injectable, NgZone, Optional, SkipSelf} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs/Subject';\nimport {Subscription} from 'rxjs/Subscription';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {merge} from 'rxjs/observable/merge';\nimport {auditTime} from 'rxjs/operator/auditTime';\nimport {Scrollable} from './scrollable';\n/**\n * Time in ms to throttle the scrolling events by default.\n */\nexport const DEFAULT_SCROLL_TIME = 20;\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\nexport class ScrollDispatcher {\n/**\n * @param {?} _ngZone\n * @param {?} _platform\n */\nconstructor(private _ngZone: NgZone,\nprivate _platform: Platform) { }\n/**\n * Subject for notifying that a registered scrollable reference element has been scrolled.\n */\n_scrolled: Subject<void> = new Subject<void>();\n/**\n * Keeps track of the global `scroll` and `resize` subscriptions.\n */\n_globalSubscription: Subscription | null = null;\n/**\n * Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards.\n */\nprivate _scrolledCount = 0;\n/**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\nscrollableReferences: Map<Scrollable, Subscription> = new Map();\n/**\n * Registers a Scrollable with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event in its scrolled observable.\n * @param {?} scrollable Scrollable instance to be registered.\n * @return {?}\n */\nregister(scrollable: Scrollable): void {\n const /** @type {?} */ scrollSubscription = scrollable.elementScrolled().subscribe(() => this._notify());\n\n this.scrollableReferences.set(scrollable, scrollSubscription);\n }\n/**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param {?} scrollable Scrollable instance to be deregistered.\n * @return {?}\n */\nderegister(scrollable: Scrollable): void {\n const /** @type {?} */ scrollableReference = this.scrollableReferences.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollableReferences.delete(scrollable);\n }\n }\n/**\n * Subscribes to an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n * @param {?=} auditTimeInMs\n * @param {?=} callback\n * @return {?}\n */\nscrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME, callback: () => any): Subscription {\n // Scroll events can only happen on the browser, so do nothing if we're not on the browser.\n if (!this._platform.isBrowser) {\n return Subscription.EMPTY;\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n let /** @type {?} */ observable = auditTimeInMs > 0 ?\n auditTime.call(this._scrolled.asObservable(), auditTimeInMs) :\n this._scrolled.asObservable();\n\n this._scrolledCount++;\n\n if (!this._globalSubscription) {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return merge(\n fromEvent(window.document, 'scroll'),\n fromEvent(window, 'resize')\n ).subscribe(() => this._notify());\n });\n }\n\n // Note that we need to do the subscribing from here, in order to be able to remove\n // the global event listeners once there are no more subscriptions.\n let /** @type {?} */ subscription = observable.subscribe(callback);\n\n subscription.add(() => {\n this._scrolledCount--;\n\n if (this._globalSubscription && !this.scrollableReferences.size && !this._scrolledCount) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n });\n\n return subscription;\n }\n/**\n * Returns all registered Scrollables that contain the provided element.\n * @param {?} elementRef\n * @return {?}\n */\ngetScrollContainers(elementRef: ElementRef): Scrollable[] {\n const /** @type {?} */ scrollingContainers: Scrollable[] = [];\n\n this.scrollableReferences.forEach((_subscription: Subscription, scrollable: Scrollable) => {\n if (this.scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n/**\n * Returns true if the element is contained within the provided Scrollable.\n * @param {?} scrollable\n * @param {?} elementRef\n * @return {?}\n */\nscrollableContainsElement(scrollable: Scrollable, elementRef: ElementRef): boolean {\n let /** @type {?} */ element = elementRef.nativeElement;\n let /** @type {?} */ scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) { return true; }\n } while (element = element.parentElement);\n\n return false;\n }\n/**\n * Sends a notification that a scroll event has been fired.\n * @return {?}\n */\n_notify() {\n this._scrolled.next();\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: NgZone, },\n{type: Platform, },\n];\n}\n\nfunction ScrollDispatcher_tsickle_Closure_declarations() {\n/** @type {?} */\nScrollDispatcher.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nScrollDispatcher.ctorParameters;\n/**\n * Subject for notifying that a registered scrollable reference element has been scrolled.\n * @type {?}\n */\nScrollDispatcher.prototype._scrolled;\n/**\n * Keeps track of the global `scroll` and `resize` subscriptions.\n * @type {?}\n */\nScrollDispatcher.prototype._globalSubscription;\n/**\n * Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards.\n * @type {?}\n */\nScrollDispatcher.prototype._scrolledCount;\n/**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n * @type {?}\n */\nScrollDispatcher.prototype.scrollableReferences;\n/** @type {?} */\nScrollDispatcher.prototype._ngZone;\n/** @type {?} */\nScrollDispatcher.prototype._platform;\n}\n\n/**\n * \\@docs-private\n * @param {?} parentDispatcher\n * @param {?} ngZone\n * @param {?} platform\n * @return {?}\n */\nexport function SCROLL_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: ScrollDispatcher, ngZone: NgZone, platform: Platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n/**\n * \\@docs-private\n */\nexport const SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\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 {Directive, ElementRef, OnInit, OnDestroy, NgZone, Renderer2} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subject} from 'rxjs/Subject';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\nexport class Scrollable implements OnInit, OnDestroy {\nprivate _elementScrolled: Subject<Event> = new Subject();\nprivate _scrollListener: Function | null;\n/**\n * @param {?} _elementRef\n * @param {?} _scroll\n * @param {?} _ngZone\n * @param {?} _renderer\n */\nconstructor(private _elementRef: ElementRef,\nprivate _scroll: ScrollDispatcher,\nprivate _ngZone: NgZone,\nprivate _renderer: Renderer2) {}\n/**\n * @return {?}\n */\nngOnInit() {\n this._scrollListener = this._ngZone.runOutsideAngular(() => {\n return this._renderer.listen(this.getElementRef().nativeElement, 'scroll', (event: Event) => {\n this._elementScrolled.next(event);\n });\n });\n\n this._scroll.register(this);\n }\n/**\n * @return {?}\n */\nngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this._scrollListener();\n this._scrollListener = null;\n }\n }\n/**\n * Returns observable that emits when a scroll event is fired on the host element.\n * @return {?}\n */\nelementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n/**\n * @return {?}\n */\ngetElementRef(): ElementRef {\n return this._elementRef;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[cdk-scrollable], [cdkScrollable]'\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ElementRef, },\n{type: ScrollDispatcher, },\n{type: NgZone, },\n{type: Renderer2, },\n];\n}\n\nfunction Scrollable_tsickle_Closure_declarations() {\n/** @type {?} */\nScrollable.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nScrollable.ctorParameters;\n/** @type {?} */\nScrollable.prototype._elementScrolled;\n/** @type {?} */\nScrollable.prototype._scrollListener;\n/** @type {?} */\nScrollable.prototype._elementRef;\n/** @type {?} */\nScrollable.prototype._scroll;\n/** @type {?} */\nScrollable.prototype._ngZone;\n/** @type {?} */\nScrollable.prototype._renderer;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\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 {NgModule} from '@angular/core';\nimport {SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nimport {Scrollable} from './scrollable';\nimport {PlatformModule} from '@angular/cdk/platform';\nexport class ScrollDispatchModule {static decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [PlatformModule],\n exports: [Scrollable],\n declarations: [Scrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction ScrollDispatchModule_tsickle_Closure_declarations() {\n/** @type {?} */\nScrollDispatchModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nScrollDispatchModule.ctorParameters;\n}\n\n\nexport {DEFAULT_SCROLL_TIME,ScrollDispatcher,SCROLL_DISPATCHER_PROVIDER_FACTORY,SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nexport {Scrollable} from './scrollable';\nexport {ViewportRuler,VIEWPORT_RULER_PROVIDER_FACTORY,VIEWPORT_RULER_PROVIDER} from './viewport-ruler';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport {ScrollDispatchModule,DEFAULT_SCROLL_TIME,ScrollDispatcher,SCROLL_DISPATCHER_PROVIDER_FACTORY,SCROLL_DISPATCHER_PROVIDER,Scrollable,ViewportRuler,VIEWPORT_RULER_PROVIDER_FACTORY,VIEWPORT_RULER_PROVIDER} from './public_api';\n"],"names":["VIEWPORT_RULER_PROVIDER_FACTORY","parentRuler","scrollDispatcher","ViewportRuler","this","_ngZone","_platform","_this","scrollSubscription","scrollable","elementScrolled","subscribe","_notify","scrollableReferences","set","ScrollDispatcher","prototype","deregister","scrollableReference","get","unsubscribe","delete","scrolled","auditTimeInMs","callback","isBrowser","observable","auditTime","call","_scrolled","asObservable","_scrolledCount","_globalSubscription","runOutsideAngular","merge","fromEvent","window","document","subscription","add","size","getScrollContainers","elementRef","scrollingContainers","forEach","_subscription","scrollableContainsElement","push","scrollableElement","getElementRef","nativeElement","element","next","ctorParameters","SCROLL_DISPATCHER_PROVIDER","deps","Optional","SkipSelf","NgZone","Platform","Scrollable","_elementRef","_scroll","_renderer","ngOnInit","_scrollListener","listen","event","_elementScrolled","ngOnDestroy","type","getViewportRect","documentRect","scrollPosition","getViewportScrollPosition","height","innerHeight","width","innerWidth","top","left","documentElement","scrollLeft","decorators","Injectable","provide","useFactory","ScrollDispatchModule","NgModule","args","exports","providers"],"mappings":";;;;;;;mwBAwIA,QAAAA,GAAAC,EAAAC,GACE,MAAOD,IAAe,GAAxBE,GAA0CD,oCC3G1CE,KAAAC,QAH+BA,EAATD,KAAtBE,UAAAA,qHAuIA,wCA3GA,GANGC,GAMHH,KACAI,EAAAC,EAAAC,kBAAAC,UAAA,WAAA,MAAAJ,GAAAK,WAEIR,MANKS,qBAAqBC,IAAIL,EAAYD,IAa9CO,EAAAC,UAAAC,WAAA,SAAAR,GACI,GAAJS,GAAAd,KAAAS,qBAAAM,IAAAV,EAEQS,KACFA,EANoBE,cAOpBhB,KANKS,qBA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MAAR1B,GAAAwD,UAL+BG,OAK/B3D,EAAA0C,gBAAAC,cAAA,SAAA,SAAAiB,GACA5D,EAAA6D,iBAAAhB,KAAAe,oCASAP,EAAA5C,UAAAqD,YAP6B,WAQ7BjE,KAAA0D,QAAA7C,WAAAb,MACAA,KAAA6D,yJAKAL,EAAA5C,UAAAiC,cAAA,WAUA,MAAA7C,MAAAyD,aAEAD,6FAUAA,EAAAP,eAAA,WAAA,4BFrEAiB,KAAAvD,uCAYA,IAAAZ,GAAA,gGAuEA,MAzDAA,GAAAa,UAAAuD,gBAAA,SAAAC,6FAkBA,IAAAC,GAAArE,KAAAsE,0BAAAF,GACAG,EAJ6BvC,OAI7BwC,YACAC,EAAAzC,OAAA0C,UACA,QACAC,IAAAN,EAAAM,IACAC,KAAAP,EAAAO,wGAgCI,mGAAJD,2FAAAC,wDADA3C,SAAA4C,gBAAAC,YAAA,uHAGA/E,IASAA,GAAAgF,aAGAb,KAAAc,EAAAA,iDAqBAd,KAAAvD,YGjHAsE,QAAAlF,EACAoD,OAAA,GAAEC,GAAFA,SAAA,GAAAC,GAAAA,SAAAtD,GAAAY,GACAuE,WAAEtF,GAEFuF,EACa,WAAb,QAACA,iCAIDjB,KAAAkB,EAAAA,SAAAC,kCCvBAC,SAAA9B,oBAEA+B,WAAArC"}
|
|
1
|
+
{"version":3,"sources":["/Users/karakara/repos/material2/dist/bundles/cdk-scrolling.umd.js"],"names":["global","factory","exports","module","require","define","amd","ng","cdk","scrolling","core","platform","Rx","Observable","prototype","this","_angular_core","_angular_cdk_platform","rxjs_Subject","rxjs_Subscription","rxjs_observable_fromEvent","rxjs_operator_auditTime","rxjs_observable_merge","rxjs_observable_of","SCROLL_DISPATCHER_PROVIDER_FACTORY","parentDispatcher","ngZone","ScrollDispatcher","VIEWPORT_RULER_PROVIDER_FACTORY","parentRuler","scrollDispatcher","ViewportRuler","_ngZone","_platform","_scrolled","Subject","_globalSubscription","_scrolledCount","scrollableReferences","Map","register","scrollable","_this","scrollSubscription","elementScrolled","subscribe","_notify","set","deregister","scrollableReference","get","unsubscribe","delete","scrolled","auditTimeInMs","callback","isBrowser","Subscription","EMPTY","observable","auditTime","call","asObservable","runOutsideAngular","fromEvent","window","document","subscription","add","size","getScrollContainers","elementRef","scrollingContainers","forEach","_subscription","scrollableContainsElement","push","element","nativeElement","scrollableElement","getElementRef","parentElement","next","decorators","type","Injectable","ctorParameters","NgZone","Platform","SCROLL_DISPATCHER_PROVIDER","provide","deps","Optional","SkipSelf","useFactory","Scrollable","_elementRef","_scroll","_renderer","_elementScrolled","ngOnInit","_scrollListener","listen","event","ngOnDestroy","Directive","args","selector","ElementRef","Renderer2","_change","merge","of","_invalidateCacheSubscriptions","_cacheViewportGeometry","change","getViewportRect","documentRect","_documentRect","scrollPosition","getViewportScrollPosition","height","innerHeight","width","innerWidth","top","left","bottom","right","body","scrollTop","scrollY","documentElement","scrollLeft","scrollX","throttleTime","getBoundingClientRect","VIEWPORT_RULER_PROVIDER","ScrollDispatchModule","NgModule","imports","PlatformModule","declarations","providers","DEFAULT_SCROLL_TIME","DEFAULT_RESIZE_TIME","Object","defineProperty","value"],"mappings":";;;;;;;CAOC,SAAUA,EAAQC,GACC,gBAAZC,UAA0C,mBAAXC,QAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,yBAA0BA,QAAQ,gBAAiBA,QAAQ,qBAAsBA,QAAQ,6BAA8BA,QAAQ,2BAA4BA,QAAQ,yBAA0BA,QAAQ,uBACrS,kBAAXC,SAAyBA,OAAOC,IAAMD,QAAQ,UAAW,gBAAiB,wBAAyB,eAAgB,oBAAqB,4BAA6B,0BAA2B,wBAAyB,sBAAuBJ,GACtPA,GAASD,EAAOO,GAAKP,EAAOO,OAAUP,EAAOO,GAAGC,IAAMR,EAAOO,GAAGC,QAAWR,EAAOO,GAAGC,IAAIC,UAAYT,EAAOO,GAAGC,IAAIC,eAAiBT,EAAOO,GAAGG,KAAKV,EAAOO,GAAGC,IAAIG,SAASX,EAAO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KAAMpE,EAAc2H,SAAUjC,OACpBkC,SAAU3H,EAAsB4H,gBAChC3I,SAAU6F,GACV+C,cAAe/C,GACfgD,WAAYtD,OAM5BiD,EAAqBpD,eAAiB,WAAc,UAC7CoD,IAGXxI,GAAQ8I,oBAvYkB,GAwY1B9I,EAAQyB,iBAAmBA,EAC3BzB,EAAQsB,mCAAqCA,EAC7CtB,EAAQuF,2BAA6BA,EACrCvF,EAAQ6F,WAAaA,EACrB7F,EAAQ+I,oBA9JkB,GA+J1B/I,EAAQ6B,cAAgBA,EACxB7B,EAAQ0B,gCAAkCA,EAC1C1B,EAAQuI,wBAA0BA,EAClCvI,EAAQwI,qBAAuBA,EAE/BQ,OAAOC,eAAejJ,EAAS,cAAgBkJ,OAAO","file":"/Users/karakara/repos/material2/dist/bundles/cdk-scrolling.umd.min.js"}
|
|
@@ -18,19 +18,20 @@ var CdkStepLabel = (function () {
|
|
|
18
18
|
function CdkStepLabel(template) {
|
|
19
19
|
this.template = template;
|
|
20
20
|
}
|
|
21
|
+
CdkStepLabel.decorators = [
|
|
22
|
+
{ type: _angular_core.Directive, args: [{
|
|
23
|
+
selector: '[cdkStepLabel]',
|
|
24
|
+
},] },
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* @nocollapse
|
|
28
|
+
*/
|
|
29
|
+
CdkStepLabel.ctorParameters = function () { return [
|
|
30
|
+
{ type: _angular_core.TemplateRef, },
|
|
31
|
+
]; };
|
|
21
32
|
return CdkStepLabel;
|
|
22
33
|
}());
|
|
23
|
-
|
|
24
|
-
{ type: _angular_core.Directive, args: [{
|
|
25
|
-
selector: '[cdkStepLabel]',
|
|
26
|
-
},] },
|
|
27
|
-
];
|
|
28
|
-
/**
|
|
29
|
-
* @nocollapse
|
|
30
|
-
*/
|
|
31
|
-
CdkStepLabel.ctorParameters = function () { return [
|
|
32
|
-
{ type: _angular_core.TemplateRef, },
|
|
33
|
-
]; };
|
|
34
|
+
|
|
34
35
|
/**
|
|
35
36
|
* Used to generate unique ID for each stepper component.
|
|
36
37
|
*/
|
|
@@ -50,7 +51,7 @@ var CdkStep = (function () {
|
|
|
50
51
|
function CdkStep(_stepper) {
|
|
51
52
|
this._stepper = _stepper;
|
|
52
53
|
/**
|
|
53
|
-
* Whether user has seen the expanded step content or not
|
|
54
|
+
* Whether user has seen the expanded step content or not.
|
|
54
55
|
*/
|
|
55
56
|
this.interacted = false;
|
|
56
57
|
this._editable = true;
|
|
@@ -123,36 +124,48 @@ var CdkStep = (function () {
|
|
|
123
124
|
CdkStep.prototype.select = function () {
|
|
124
125
|
this._stepper.selected = this;
|
|
125
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* @return {?}
|
|
129
|
+
*/
|
|
130
|
+
CdkStep.prototype.ngOnChanges = function () {
|
|
131
|
+
// Since basically all inputs of the MdStep get proxied through the view down to the
|
|
132
|
+
// underlying MdStepHeader, we have to make sure that change detection runs correctly.
|
|
133
|
+
this._stepper._stateChanged();
|
|
134
|
+
};
|
|
135
|
+
CdkStep.decorators = [
|
|
136
|
+
{ type: _angular_core.Component, args: [{selector: 'cdk-step',
|
|
137
|
+
exportAs: 'cdkStep',
|
|
138
|
+
template: "<ng-template><ng-content></ng-content></ng-template>",
|
|
139
|
+
encapsulation: _angular_core.ViewEncapsulation.None,
|
|
140
|
+
preserveWhitespaces: false,
|
|
141
|
+
changeDetection: _angular_core.ChangeDetectionStrategy.OnPush,
|
|
142
|
+
},] },
|
|
143
|
+
];
|
|
144
|
+
/**
|
|
145
|
+
* @nocollapse
|
|
146
|
+
*/
|
|
147
|
+
CdkStep.ctorParameters = function () { return [
|
|
148
|
+
{ type: CdkStepper, decorators: [{ type: _angular_core.Inject, args: [_angular_core.forwardRef(function () { return CdkStepper; }),] },] },
|
|
149
|
+
]; };
|
|
150
|
+
CdkStep.propDecorators = {
|
|
151
|
+
'stepLabel': [{ type: _angular_core.ContentChild, args: [CdkStepLabel,] },],
|
|
152
|
+
'content': [{ type: _angular_core.ViewChild, args: [_angular_core.TemplateRef,] },],
|
|
153
|
+
'stepControl': [{ type: _angular_core.Input },],
|
|
154
|
+
'label': [{ type: _angular_core.Input },],
|
|
155
|
+
'editable': [{ type: _angular_core.Input },],
|
|
156
|
+
'optional': [{ type: _angular_core.Input },],
|
|
157
|
+
'completed': [{ type: _angular_core.Input },],
|
|
158
|
+
};
|
|
126
159
|
return CdkStep;
|
|
127
160
|
}());
|
|
128
|
-
CdkStep.decorators = [
|
|
129
|
-
{ type: _angular_core.Component, args: [{ selector: 'cdk-step',
|
|
130
|
-
template: "<ng-template><ng-content></ng-content></ng-template>",
|
|
131
|
-
encapsulation: _angular_core.ViewEncapsulation.None,
|
|
132
|
-
preserveWhitespaces: false,
|
|
133
|
-
},] },
|
|
134
|
-
];
|
|
135
|
-
/**
|
|
136
|
-
* @nocollapse
|
|
137
|
-
*/
|
|
138
|
-
CdkStep.ctorParameters = function () { return [
|
|
139
|
-
{ type: CdkStepper, decorators: [{ type: _angular_core.Inject, args: [_angular_core.forwardRef(function () { return CdkStepper; }),] },] },
|
|
140
|
-
]; };
|
|
141
|
-
CdkStep.propDecorators = {
|
|
142
|
-
'stepLabel': [{ type: _angular_core.ContentChild, args: [CdkStepLabel,] },],
|
|
143
|
-
'content': [{ type: _angular_core.ViewChild, args: [_angular_core.TemplateRef,] },],
|
|
144
|
-
'stepControl': [{ type: _angular_core.Input },],
|
|
145
|
-
'label': [{ type: _angular_core.Input },],
|
|
146
|
-
'editable': [{ type: _angular_core.Input },],
|
|
147
|
-
'optional': [{ type: _angular_core.Input },],
|
|
148
|
-
'completed': [{ type: _angular_core.Input },],
|
|
149
|
-
};
|
|
150
161
|
var CdkStepper = (function () {
|
|
151
162
|
/**
|
|
152
163
|
* @param {?} _dir
|
|
164
|
+
* @param {?} _changeDetectorRef
|
|
153
165
|
*/
|
|
154
|
-
function CdkStepper(_dir) {
|
|
166
|
+
function CdkStepper(_dir, _changeDetectorRef) {
|
|
155
167
|
this._dir = _dir;
|
|
168
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
156
169
|
this._linear = false;
|
|
157
170
|
this._selectedIndex = 0;
|
|
158
171
|
/**
|
|
@@ -208,7 +221,7 @@ var CdkStepper = (function () {
|
|
|
208
221
|
* The step that is selected.
|
|
209
222
|
* @return {?}
|
|
210
223
|
*/
|
|
211
|
-
get: function () { return this._steps[this.selectedIndex]; },
|
|
224
|
+
get: function () { return this._steps.toArray()[this.selectedIndex]; },
|
|
212
225
|
/**
|
|
213
226
|
* @param {?} step
|
|
214
227
|
* @return {?}
|
|
@@ -249,6 +262,13 @@ var CdkStepper = (function () {
|
|
|
249
262
|
CdkStepper.prototype._getStepContentId = function (i) {
|
|
250
263
|
return "mat-step-content-" + this._groupId + "-" + i;
|
|
251
264
|
};
|
|
265
|
+
/**
|
|
266
|
+
* Marks the component to be change detected.
|
|
267
|
+
* @return {?}
|
|
268
|
+
*/
|
|
269
|
+
CdkStepper.prototype._stateChanged = function () {
|
|
270
|
+
this._changeDetectorRef.markForCheck();
|
|
271
|
+
};
|
|
252
272
|
/**
|
|
253
273
|
* Returns position state of the step with the given index.
|
|
254
274
|
* @param {?} index
|
|
@@ -291,6 +311,7 @@ var CdkStepper = (function () {
|
|
|
291
311
|
previouslySelectedStep: stepsArray[this._selectedIndex],
|
|
292
312
|
});
|
|
293
313
|
this._selectedIndex = newIndex;
|
|
314
|
+
this._stateChanged();
|
|
294
315
|
};
|
|
295
316
|
/**
|
|
296
317
|
* @param {?} event
|
|
@@ -361,26 +382,29 @@ var CdkStepper = (function () {
|
|
|
361
382
|
CdkStepper.prototype._layoutDirection = function () {
|
|
362
383
|
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
363
384
|
};
|
|
385
|
+
CdkStepper.decorators = [
|
|
386
|
+
{ type: _angular_core.Directive, args: [{
|
|
387
|
+
selector: '[cdkStepper]',
|
|
388
|
+
exportAs: 'cdkStepper',
|
|
389
|
+
},] },
|
|
390
|
+
];
|
|
391
|
+
/**
|
|
392
|
+
* @nocollapse
|
|
393
|
+
*/
|
|
394
|
+
CdkStepper.ctorParameters = function () { return [
|
|
395
|
+
{ type: _angular_cdk_bidi.Directionality, decorators: [{ type: _angular_core.Optional },] },
|
|
396
|
+
{ type: _angular_core.ChangeDetectorRef, },
|
|
397
|
+
]; };
|
|
398
|
+
CdkStepper.propDecorators = {
|
|
399
|
+
'_steps': [{ type: _angular_core.ContentChildren, args: [CdkStep,] },],
|
|
400
|
+
'linear': [{ type: _angular_core.Input },],
|
|
401
|
+
'selectedIndex': [{ type: _angular_core.Input },],
|
|
402
|
+
'selected': [{ type: _angular_core.Input },],
|
|
403
|
+
'selectionChange': [{ type: _angular_core.Output },],
|
|
404
|
+
};
|
|
364
405
|
return CdkStepper;
|
|
365
406
|
}());
|
|
366
|
-
|
|
367
|
-
{ type: _angular_core.Directive, args: [{
|
|
368
|
-
selector: '[cdkStepper]',
|
|
369
|
-
},] },
|
|
370
|
-
];
|
|
371
|
-
/**
|
|
372
|
-
* @nocollapse
|
|
373
|
-
*/
|
|
374
|
-
CdkStepper.ctorParameters = function () { return [
|
|
375
|
-
{ type: _angular_cdk_bidi.Directionality, decorators: [{ type: _angular_core.Optional },] },
|
|
376
|
-
]; };
|
|
377
|
-
CdkStepper.propDecorators = {
|
|
378
|
-
'_steps': [{ type: _angular_core.ContentChildren, args: [CdkStep,] },],
|
|
379
|
-
'linear': [{ type: _angular_core.Input },],
|
|
380
|
-
'selectedIndex': [{ type: _angular_core.Input },],
|
|
381
|
-
'selected': [{ type: _angular_core.Input },],
|
|
382
|
-
'selectionChange': [{ type: _angular_core.Output },],
|
|
383
|
-
};
|
|
407
|
+
|
|
384
408
|
/**
|
|
385
409
|
* Button that moves to the next step in a stepper workflow.
|
|
386
410
|
*/
|
|
@@ -391,20 +415,20 @@ var CdkStepperNext = (function () {
|
|
|
391
415
|
function CdkStepperNext(_stepper) {
|
|
392
416
|
this._stepper = _stepper;
|
|
393
417
|
}
|
|
418
|
+
CdkStepperNext.decorators = [
|
|
419
|
+
{ type: _angular_core.Directive, args: [{
|
|
420
|
+
selector: 'button[cdkStepperNext]',
|
|
421
|
+
host: { '(click)': '_stepper.next()' }
|
|
422
|
+
},] },
|
|
423
|
+
];
|
|
424
|
+
/**
|
|
425
|
+
* @nocollapse
|
|
426
|
+
*/
|
|
427
|
+
CdkStepperNext.ctorParameters = function () { return [
|
|
428
|
+
{ type: CdkStepper, },
|
|
429
|
+
]; };
|
|
394
430
|
return CdkStepperNext;
|
|
395
431
|
}());
|
|
396
|
-
CdkStepperNext.decorators = [
|
|
397
|
-
{ type: _angular_core.Directive, args: [{
|
|
398
|
-
selector: 'button[cdkStepperNext]',
|
|
399
|
-
host: { '(click)': '_stepper.next()' }
|
|
400
|
-
},] },
|
|
401
|
-
];
|
|
402
|
-
/**
|
|
403
|
-
* @nocollapse
|
|
404
|
-
*/
|
|
405
|
-
CdkStepperNext.ctorParameters = function () { return [
|
|
406
|
-
{ type: CdkStepper, },
|
|
407
|
-
]; };
|
|
408
432
|
/**
|
|
409
433
|
* Button that moves to the previous step in a stepper workflow.
|
|
410
434
|
*/
|
|
@@ -415,44 +439,45 @@ var CdkStepperPrevious = (function () {
|
|
|
415
439
|
function CdkStepperPrevious(_stepper) {
|
|
416
440
|
this._stepper = _stepper;
|
|
417
441
|
}
|
|
442
|
+
CdkStepperPrevious.decorators = [
|
|
443
|
+
{ type: _angular_core.Directive, args: [{
|
|
444
|
+
selector: 'button[cdkStepperPrevious]',
|
|
445
|
+
host: { '(click)': '_stepper.previous()' }
|
|
446
|
+
},] },
|
|
447
|
+
];
|
|
448
|
+
/**
|
|
449
|
+
* @nocollapse
|
|
450
|
+
*/
|
|
451
|
+
CdkStepperPrevious.ctorParameters = function () { return [
|
|
452
|
+
{ type: CdkStepper, },
|
|
453
|
+
]; };
|
|
418
454
|
return CdkStepperPrevious;
|
|
419
455
|
}());
|
|
420
|
-
|
|
421
|
-
{ type: _angular_core.Directive, args: [{
|
|
422
|
-
selector: 'button[cdkStepperPrevious]',
|
|
423
|
-
host: { '(click)': '_stepper.previous()' }
|
|
424
|
-
},] },
|
|
425
|
-
];
|
|
426
|
-
/**
|
|
427
|
-
* @nocollapse
|
|
428
|
-
*/
|
|
429
|
-
CdkStepperPrevious.ctorParameters = function () { return [
|
|
430
|
-
{ type: CdkStepper, },
|
|
431
|
-
]; };
|
|
456
|
+
|
|
432
457
|
var CdkStepperModule = (function () {
|
|
433
458
|
function CdkStepperModule() {
|
|
434
459
|
}
|
|
460
|
+
CdkStepperModule.decorators = [
|
|
461
|
+
{ type: _angular_core.NgModule, args: [{
|
|
462
|
+
imports: [_angular_cdk_bidi.BidiModule, _angular_common.CommonModule],
|
|
463
|
+
exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],
|
|
464
|
+
declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]
|
|
465
|
+
},] },
|
|
466
|
+
];
|
|
467
|
+
/**
|
|
468
|
+
* @nocollapse
|
|
469
|
+
*/
|
|
470
|
+
CdkStepperModule.ctorParameters = function () { return []; };
|
|
435
471
|
return CdkStepperModule;
|
|
436
472
|
}());
|
|
437
|
-
CdkStepperModule.decorators = [
|
|
438
|
-
{ type: _angular_core.NgModule, args: [{
|
|
439
|
-
imports: [_angular_cdk_bidi.BidiModule, _angular_common.CommonModule],
|
|
440
|
-
exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],
|
|
441
|
-
declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]
|
|
442
|
-
},] },
|
|
443
|
-
];
|
|
444
|
-
/**
|
|
445
|
-
* @nocollapse
|
|
446
|
-
*/
|
|
447
|
-
CdkStepperModule.ctorParameters = function () { return []; };
|
|
448
473
|
|
|
449
|
-
exports.CdkStepperModule = CdkStepperModule;
|
|
450
474
|
exports.StepperSelectionEvent = StepperSelectionEvent;
|
|
451
475
|
exports.CdkStep = CdkStep;
|
|
452
476
|
exports.CdkStepper = CdkStepper;
|
|
453
477
|
exports.CdkStepLabel = CdkStepLabel;
|
|
454
478
|
exports.CdkStepperNext = CdkStepperNext;
|
|
455
479
|
exports.CdkStepperPrevious = CdkStepperPrevious;
|
|
480
|
+
exports.CdkStepperModule = CdkStepperModule;
|
|
456
481
|
|
|
457
482
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
458
483
|
|