@angular/cdk 5.2.1 → 5.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/_overlay.scss +6 -0
  2. package/a11y/typings/aria-describer/aria-describer.d.ts +2 -0
  3. package/a11y/typings/index.metadata.json +1 -1
  4. package/a11y/typings/key-manager/list-key-manager.d.ts +11 -0
  5. package/bundles/cdk-a11y.umd.js +65 -13
  6. package/bundles/cdk-a11y.umd.js.map +1 -1
  7. package/bundles/cdk-a11y.umd.min.js +1 -1
  8. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  9. package/bundles/cdk-collections.umd.js +7 -11
  10. package/bundles/cdk-collections.umd.js.map +1 -1
  11. package/bundles/cdk-collections.umd.min.js +1 -1
  12. package/bundles/cdk-collections.umd.min.js.map +1 -1
  13. package/bundles/cdk-overlay.umd.js +24 -5
  14. package/bundles/cdk-overlay.umd.js.map +1 -1
  15. package/bundles/cdk-overlay.umd.min.js +2 -2
  16. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  17. package/bundles/cdk-platform.umd.js +3 -3
  18. package/bundles/cdk-platform.umd.js.map +1 -1
  19. package/bundles/cdk-platform.umd.min.js +1 -1
  20. package/bundles/cdk-platform.umd.min.js.map +1 -1
  21. package/bundles/cdk-scrolling.umd.js +17 -4
  22. package/bundles/cdk-scrolling.umd.js.map +1 -1
  23. package/bundles/cdk-scrolling.umd.min.js +1 -1
  24. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  25. package/bundles/cdk-stepper.umd.js +3 -1
  26. package/bundles/cdk-stepper.umd.js.map +1 -1
  27. package/bundles/cdk-stepper.umd.min.js +1 -1
  28. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  29. package/bundles/cdk.umd.js +1 -1
  30. package/bundles/cdk.umd.js.map +1 -1
  31. package/bundles/cdk.umd.min.js +1 -1
  32. package/bundles/cdk.umd.min.js.map +1 -1
  33. package/collections/typings/index.metadata.json +1 -1
  34. package/collections/typings/selection.d.ts +3 -10
  35. package/esm2015/a11y.js +48 -13
  36. package/esm2015/a11y.js.map +1 -1
  37. package/esm2015/cdk.js +1 -1
  38. package/esm2015/cdk.js.map +1 -1
  39. package/esm2015/collections.js +8 -15
  40. package/esm2015/collections.js.map +1 -1
  41. package/esm2015/overlay.js +20 -5
  42. package/esm2015/overlay.js.map +1 -1
  43. package/esm2015/platform.js +3 -3
  44. package/esm2015/platform.js.map +1 -1
  45. package/esm2015/scrolling.js +18 -5
  46. package/esm2015/scrolling.js.map +1 -1
  47. package/esm2015/stepper.js +3 -1
  48. package/esm2015/stepper.js.map +1 -1
  49. package/esm5/a11y.es5.js +65 -13
  50. package/esm5/a11y.es5.js.map +1 -1
  51. package/esm5/cdk.es5.js +1 -1
  52. package/esm5/cdk.es5.js.map +1 -1
  53. package/esm5/collections.es5.js +8 -11
  54. package/esm5/collections.es5.js.map +1 -1
  55. package/esm5/overlay.es5.js +24 -5
  56. package/esm5/overlay.es5.js.map +1 -1
  57. package/esm5/platform.es5.js +3 -3
  58. package/esm5/platform.es5.js.map +1 -1
  59. package/esm5/scrolling.es5.js +17 -4
  60. package/esm5/scrolling.es5.js.map +1 -1
  61. package/esm5/stepper.es5.js +3 -1
  62. package/esm5/stepper.es5.js.map +1 -1
  63. package/overlay/typings/index.metadata.json +1 -1
  64. package/overlay/typings/overlay-directives.d.ts +4 -1
  65. package/overlay/typings/overlay.d.ts +1 -1
  66. package/overlay/typings/position/connected-position-strategy.d.ts +0 -2
  67. package/overlay-prebuilt.css +1 -1
  68. package/package.json +3 -3
  69. package/scrolling/typings/index.metadata.json +1 -1
  70. package/scrolling/typings/viewport-ruler.d.ts +2 -1
  71. package/typings/a11y/aria-describer/aria-describer.d.ts +2 -0
  72. package/typings/a11y/index.metadata.json +1 -1
  73. package/typings/a11y/key-manager/list-key-manager.d.ts +11 -0
  74. package/typings/collections/index.metadata.json +1 -1
  75. package/typings/collections/selection.d.ts +3 -10
  76. package/typings/esm5/a11y/aria-describer/aria-describer.d.ts +2 -0
  77. package/typings/esm5/a11y/index.metadata.json +1 -1
  78. package/typings/esm5/a11y/key-manager/list-key-manager.d.ts +11 -0
  79. package/typings/esm5/collections/index.metadata.json +1 -1
  80. package/typings/esm5/collections/selection.d.ts +3 -10
  81. package/typings/esm5/index.metadata.json +1 -1
  82. package/typings/esm5/overlay/index.metadata.json +1 -1
  83. package/typings/esm5/overlay/overlay-directives.d.ts +4 -1
  84. package/typings/esm5/overlay/overlay.d.ts +1 -1
  85. package/typings/esm5/overlay/position/connected-position-strategy.d.ts +0 -2
  86. package/typings/esm5/scrolling/index.metadata.json +1 -1
  87. package/typings/esm5/scrolling/viewport-ruler.d.ts +2 -1
  88. package/typings/index.metadata.json +1 -1
  89. package/typings/overlay/index.metadata.json +1 -1
  90. package/typings/overlay/overlay-directives.d.ts +4 -1
  91. package/typings/overlay/overlay.d.ts +1 -1
  92. package/typings/overlay/position/connected-position-strategy.d.ts +0 -2
  93. package/typings/scrolling/index.metadata.json +1 -1
  94. package/typings/scrolling/viewport-ruler.d.ts +2 -1
@@ -18,7 +18,7 @@
18
18
 
19
19
  // Whether the current platform supports the V8 Break Iterator. The V8 check
20
20
  // is necessary to detect all Blink based browsers.
21
- var hasV8BreakIterator = (typeof (Intl) !== 'undefined' && (/** @type {?} */ (Intl)).v8BreakIterator);
21
+ var hasV8BreakIterator = (typeof Intl !== 'undefined' && (/** @type {?} */ (Intl)).v8BreakIterator);
22
22
  /**
23
23
  * Service to detect the current platform by comparing the userAgent strings and
24
24
  * checking browser-specific global properties.
@@ -40,8 +40,8 @@ var Platform = /** @class */ (function () {
40
40
  /**
41
41
  * Whether the current rendering engine is Blink.
42
42
  */
43
- this.BLINK = this.isBrowser &&
44
- (!!((/** @type {?} */ (window)).chrome || hasV8BreakIterator) && !!CSS && !this.EDGE && !this.TRIDENT);
43
+ this.BLINK = this.isBrowser && (!!((/** @type {?} */ (window)).chrome || hasV8BreakIterator) &&
44
+ typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);
45
45
  /**
46
46
  * Whether the current rendering engine is WebKit.
47
47
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-platform.umd.js","sources":["../../src/cdk/platform/platform-module.ts","../../src/cdk/platform/features.ts","../../src/cdk/platform/platform.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {Platform} from './platform';\n\n\n@NgModule({\n providers: [Platform]\n})\nexport class PlatformModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof(Intl) !== 'undefined' && (Intl as any).v8BreakIterator);\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable()\nexport class Platform {\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Blink. */\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n BLINK: boolean = this.isBrowser &&\n (!!((window as any).chrome || hasV8BreakIterator) && !!CSS && !this.EDGE && !this.TRIDENT);\n\n /** Whether the current rendering engine is WebKit. */\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !(window as any).MSStream;\n\n /** Whether the current browser is Firefox. */\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n /** Whether the current browser is Safari. */\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n"],"names":["NgModule","Injectable"],"mappings":";;;;;;;;;;;;;;;;;;;;AEYA,IAAM,kBAAkB,IAAI,QAAO,IAAI,CAAC,KAAK,WAAW,IAAI,mBAAC,IAAW,GAAE,eAAe,CAAC,CAAC;;;;;;;;;;QAS3F,IAAA,CAAA,SAAA,GAAuB,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAjE;;;;QAGA,IAAA,CAAA,IAAA,GAAkB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAvE;;;;QAGA,IAAA,CAAA,OAAA,GAAqB,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAlF;;;;QAIA,IAAA,CAAA,KAAA,GAAmB,IAAI,CAAC,SAAS;aAC1B,CAAC,EAAE,mBAAC,MAAa,GAAE,MAAM,IAAI,kBAAkB,CAAC,IAAI,CAAC,C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,cAAA,CAAA;CAeA,EAAA,CAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-platform.umd.js","sources":["../../src/cdk/platform/platform-module.ts","../../src/cdk/platform/features.ts","../../src/cdk/platform/platform.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {Platform} from './platform';\n\n\n@NgModule({\n providers: [Platform]\n})\nexport class PlatformModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable()\nexport class Platform {\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Blink. */\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n /** Whether the current rendering engine is WebKit. */\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !(window as any).MSStream;\n\n /** Whether the current browser is Firefox. */\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n /** Whether the current browser is Safari. */\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n"],"names":["NgModule","Injectable"],"mappings":";;;;;;;;;;;;;;;;;;;;AEYA,IAAM,kBAAkB,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,mBAAC,IAAW,GAAE,eAAe,CAAC,CAAC;;;;;;;;;;QAS1F,IAAA,CAAA,SAAA,GAAuB,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAjE;;;;QAGA,IAAA,CAAA,IAAA,GAAkB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAvE;;;;QAGA,IAAA,CAAA,OAAA,GAAqB,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAlF;;;;QAIA,IAAA,CAAA,KAAA,GAAmB,IAAI,CAAC,SAAS,KAAK,CAAC,EAAE,mBAAC,MAAa,GAAE,MAAM,IAAI,kBAAkB,CAAC;YAClF,OAAO,GAAG,KAAK,WAAW,IAAI,CAAC,IAAI,CAAC,I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;;;;;;;;;"}
@@ -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")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.platform=e.ng.cdk.platform||{}),e.ng.core)}(this,function(e,t){"use strict";function r(){if(null==n&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return n=!0}}))}finally{n=n||!1}return n}function i(){if(s)return s;if("object"!=typeof document||!document)return s=new Set(a);var e=document.createElement("input");return s=new Set(a.filter(function(t){return e.setAttribute("type",t),e.type===t}))}var n,s,o="undefined"!=typeof Intl&&Intl.v8BreakIterator,u=function(){function e(){this.isBrowser="object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!o)&&!!CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),a=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],d=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{providers:[u]}]}],e.ctorParameters=function(){return[]},e}();e.Platform=u,e.supportsPassiveEventListeners=r,e.getSupportedInputTypes=i,e.PlatformModule=d,Object.defineProperty(e,"__esModule",{value:!0})});
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.platform=e.ng.cdk.platform||{}),e.ng.core)}(this,function(e,t){"use strict";function r(){if(null==n&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return n=!0}}))}finally{n=n||!1}return n}function i(){if(o)return o;if("object"!=typeof document||!document)return o=new Set(a);var e=document.createElement("input");return o=new Set(a.filter(function(t){return e.setAttribute("type",t),e.type===t}))}var n,o,s="undefined"!=typeof Intl&&Intl.v8BreakIterator,u=function(){function e(){this.isBrowser="object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!s)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),a=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],d=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{providers:[u]}]}],e.ctorParameters=function(){return[]},e}();e.Platform=u,e.supportsPassiveEventListeners=r,e.getSupportedInputTypes=i,e.PlatformModule=d,Object.defineProperty(e,"__esModule",{value:!0})});
9
9
  //# sourceMappingURL=cdk-platform.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-platform.umd.min.js","sources":["../../src/cdk/platform/features.ts","../../src/cdk/platform/platform.ts","../../src/cdk/platform/platform-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof(Intl) !== 'undefined' && (Intl as any).v8BreakIterator);\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable()\nexport class Platform {\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Blink. */\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n BLINK: boolean = this.isBrowser &&\n (!!((window as any).chrome || hasV8BreakIterator) && !!CSS && !this.EDGE && !this.TRIDENT);\n\n /** Whether the current rendering engine is WebKit. */\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !(window as any).MSStream;\n\n /** Whether the current browser is Firefox. */\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n /** Whether the current browser is Safari. */\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {Platform} from './platform';\n\n\n@NgModule({\n providers: [Platform]\n})\nexport class PlatformModule {}\n"],"names":["supportsPassiveEventListeners","supportsPassiveEvents","window","addEventListener","Object","defineProperty","get","getSupportedInputTypes","supportedInputTypes","document","Set","candidateInputTypes","featureTestInput","createElement","filter","value","setAttribute","type","hasV8BreakIterator","v8BreakIterator","this","isBrowser","EDGE","test","navigator","userAgent","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","MSStream","FIREFOX","ANDROID","SAFARI","Injectable","Platform","PlatformModule","NgModule","args","providers"],"mappings":";;;;;;;+SAeA,SAAAA,KACE,GAA6B,MAAzBC,GAAmD,mBAAXC,QAC1C,IACEA,OAAOC,iBAAiB,OAAM,KAASC,OAAOC,kBAAmB,WAC/DC,IAAK,WAAM,MAAAL,IAAwB,cAGrCA,EAAwBA,IAAyB,EAIrD,MAAOA,GAqCT,QAAAM,KAEE,GAAIC,EACF,MAAOA,EAMT,IAAwB,gBAAbC,YAA0BA,SAEnC,MADAD,GAAsB,GAAIE,KAAIC,EAIhC,IAAIC,GAAmBH,SAASI,cAAc,QAM9C,OALAL,GAAsB,GAAIE,KAAIC,EAAoBG,OAAO,SAAAC,GAEvD,MADAH,GAAiBI,aAAa,OAAQD,GAC/BH,EAAiBK,OAASF,KCpErC,GDHId,GAqBAO,EClBEU,EAAuC,mBAAjB,OAAgC,KAAcC,0CAS1EC,KAAAC,UAA2C,gBAAbZ,aAA2BA,SAGzDW,KAAAE,KAAkBF,KAAKC,WAAa,UAAUE,KAAKC,UAAUC,WAG7DL,KAAAM,QAAqBN,KAAKC,WAAa,kBAAkBE,KAAKC,UAAUC,WAIxEL,KAAAO,MAAmBP,KAAKC,cACd,OAAgBO,SAAUV,MAAyBW,MAAQT,KAAKE,OAASF,KAAKM,QAKxFN,KAAAU,OAAoBV,KAAKC,WACnB,eAAeE,KAAKC,UAAUC,aAAeL,KAAKO,QAAUP,KAAKE,OAASF,KAAKM,QAGrFN,KAAAW,IAAiBX,KAAKC,WAAa,mBAAmBE,KAAKC,UAAUC,aAC9D,OAAgBO,SAOvBZ,KAAAa,QAAqBb,KAAKC,WAAa,uBAAuBE,KAAKC,UAAUC,WAI7EL,KAAAc,QAAqBd,KAAKC,WAAa,WAAWE,KAAKC,UAAUC,aAAeL,KAAKM,QAMrFN,KAAAe,OAAoBf,KAAKC,WAAa,UAAUE,KAAKC,UAAUC,YAAcL,KAAKU,OA3DlF,sBAkBAb,KAACmB,EAAAA,mDAlBDC,KDiCM1B,GAKJ,QACA,SACA,WACA,OACA,iBACA,QACA,OACA,SACA,QACA,QACA,SACA,WACA,QACA,QACA,QACA,SACA,SACA,MACA,OACA,OACA,MACA,QEnDF2B,EAAA,yBARA,sBAYArB,KAACsB,EAAAA,SAADC,OACEC,WAAYJ,6CAbdC"}
1
+ {"version":3,"file":"cdk-platform.umd.min.js","sources":["../../src/cdk/platform/features.ts","../../src/cdk/platform/platform.ts","../../src/cdk/platform/platform-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents: boolean;\n\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nexport function supportsPassiveEventListeners(): boolean {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null!, Object.defineProperty({}, 'passive', {\n get: () => supportsPassiveEvents = true\n }));\n } finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n\n return supportsPassiveEvents;\n}\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes: Set<string>;\n\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n\n/** @returns The input types supported by this browser. */\nexport function getSupportedInputTypes(): Set<string> {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n\n return supportedInputTypes;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nconst hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator);\n\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\n@Injectable()\nexport class Platform {\n /** Whether the Angular application is being rendered in the browser. */\n isBrowser: boolean = typeof document === 'object' && !!document;\n\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Blink. */\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n\n /** Whether the current rendering engine is WebKit. */\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n WEBKIT: boolean = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !(window as any).MSStream;\n\n /** Whether the current browser is Firefox. */\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n /** Whether the current browser is Safari. */\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {Platform} from './platform';\n\n\n@NgModule({\n providers: [Platform]\n})\nexport class PlatformModule {}\n"],"names":["supportsPassiveEventListeners","supportsPassiveEvents","window","addEventListener","Object","defineProperty","get","getSupportedInputTypes","supportedInputTypes","document","Set","candidateInputTypes","featureTestInput","createElement","filter","value","setAttribute","type","hasV8BreakIterator","Intl","v8BreakIterator","this","isBrowser","EDGE","test","navigator","userAgent","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","MSStream","FIREFOX","ANDROID","SAFARI","Injectable","Platform","PlatformModule","NgModule","args","providers"],"mappings":";;;;;;;+SAeA,SAAAA,KACE,GAA6B,MAAzBC,GAAmD,mBAAXC,QAC1C,IACEA,OAAOC,iBAAiB,OAAM,KAASC,OAAOC,kBAAmB,WAC/DC,IAAK,WAAM,MAAAL,IAAwB,cAGrCA,EAAwBA,IAAyB,EAIrD,MAAOA,GAqCT,QAAAM,KAEE,GAAIC,EACF,MAAOA,EAMT,IAAwB,gBAAbC,YAA0BA,SAEnC,MADAD,GAAsB,GAAIE,KAAIC,EAIhC,IAAIC,GAAmBH,SAASI,cAAc,QAM9C,OALAL,GAAsB,GAAIE,KAAIC,EAAoBG,OAAO,SAAAC,GAEvD,MADAH,GAAiBI,aAAa,OAAQD,GAC/BH,EAAiBK,OAASF,KCpErC,GDHId,GAqBAO,EClBEU,EAAsC,mBAATC,OAAwB,KAAcC,0CASzEC,KAAAC,UAA2C,gBAAbb,aAA2BA,SAGzDY,KAAAE,KAAkBF,KAAKC,WAAa,UAAUE,KAAKC,UAAUC,WAG7DL,KAAAM,QAAqBN,KAAKC,WAAa,kBAAkBE,KAAKC,UAAUC,WAIxEL,KAAAO,MAAmBP,KAAKC,cAAiB,OAAgBO,SAAUX,IAChD,mBAARY,OAAwBT,KAAKE,OAASF,KAAKM,QAKtDN,KAAAU,OAAoBV,KAAKC,WACnB,eAAeE,KAAKC,UAAUC,aAAeL,KAAKO,QAAUP,KAAKE,OAASF,KAAKM,QAGrFN,KAAAW,IAAiBX,KAAKC,WAAa,mBAAmBE,KAAKC,UAAUC,aAC9D,OAAgBO,SAOvBZ,KAAAa,QAAqBb,KAAKC,WAAa,uBAAuBE,KAAKC,UAAUC,WAI7EL,KAAAc,QAAqBd,KAAKC,WAAa,WAAWE,KAAKC,UAAUC,aAAeL,KAAKM,QAMrFN,KAAAe,OAAoBf,KAAKC,WAAa,UAAUE,KAAKC,UAAUC,YAAcL,KAAKU,OA3DlF,sBAkBAd,KAACoB,EAAAA,mDAlBDC,KDiCM3B,GAKJ,QACA,SACA,WACA,OACA,iBACA,QACA,OACA,SACA,QACA,QACA,SACA,WACA,QACA,QACA,QACA,SACA,SACA,MACA,OACA,OACA,MACA,QEnDF4B,EAAA,yBARA,sBAYAtB,KAACuB,EAAAA,SAADC,OACEC,WAAYJ,6CAbdC"}
@@ -381,9 +381,10 @@ var DEFAULT_RESIZE_TIME = 20;
381
381
  * \@docs-private
382
382
  */
383
383
  var ViewportRuler = /** @class */ (function () {
384
- function ViewportRuler(platform, ngZone) {
384
+ function ViewportRuler(_platform, ngZone) {
385
385
  var _this = this;
386
- this._change = platform.isBrowser ? ngZone.runOutsideAngular(function () {
386
+ this._platform = _platform;
387
+ this._change = _platform.isBrowser ? ngZone.runOutsideAngular(function () {
387
388
  return rxjs_observable_merge.merge(rxjs_observable_fromEvent.fromEvent(window, 'resize'), rxjs_observable_fromEvent.fromEvent(window, 'orientationchange'));
388
389
  }) : rxjs_observable_of.of();
389
390
  this._invalidateCache = this.change().subscribe(function () { return _this._updateViewportSize(); });
@@ -410,7 +411,12 @@ var ViewportRuler = /** @class */ (function () {
410
411
  if (!this._viewportSize) {
411
412
  this._updateViewportSize();
412
413
  }
413
- return { width: this._viewportSize.width, height: this._viewportSize.height };
414
+ var /** @type {?} */ output = { width: this._viewportSize.width, height: this._viewportSize.height };
415
+ // If we're not on a browser, don't cache the size since it'll be mocked out anyway.
416
+ if (!this._platform.isBrowser) {
417
+ this._viewportSize = /** @type {?} */ ((null));
418
+ }
419
+ return output;
414
420
  };
415
421
  /** Gets a ClientRect for the viewport's bounds. */
416
422
  /**
@@ -452,6 +458,11 @@ var ViewportRuler = /** @class */ (function () {
452
458
  * @return {?}
453
459
  */
454
460
  function () {
461
+ // While we can get a reference to the fake document
462
+ // during SSR, it doesn't have getBoundingClientRect.
463
+ if (!this._platform.isBrowser) {
464
+ return { top: 0, left: 0 };
465
+ }
455
466
  // The top-left-corner of the viewport is determined by the scroll position of the document
456
467
  // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about
457
468
  // whether `document.body` or `document.documentElement` is the scrolled element, so reading
@@ -492,7 +503,9 @@ var ViewportRuler = /** @class */ (function () {
492
503
  * @return {?}
493
504
  */
494
505
  function () {
495
- this._viewportSize = { width: window.innerWidth, height: window.innerHeight };
506
+ this._viewportSize = this._platform.isBrowser ?
507
+ { width: window.innerWidth, height: window.innerHeight } :
508
+ { width: 0, height: 0 };
496
509
  };
497
510
  ViewportRuler.decorators = [
498
511
  { type: _angular_core.Injectable },
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-scrolling.umd.js","sources":["../../src/cdk/scrolling/scrolling-module.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scroll-dispatcher.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nimport {CdkScrollable} from './scrollable';\nimport {PlatformModule} from '@angular/cdk/platform';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n})\nexport class ScrollDispatchModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Optional, SkipSelf, NgZone, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Observable} from 'rxjs/Observable';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {merge} from 'rxjs/observable/merge';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {Subscription} from 'rxjs/Subscription';\nimport {of as observableOf} from 'rxjs/observable/of';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable()\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(platform: Platform, ngZone: NgZone) {\n this._change = platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n return {width: this._viewportSize.width, height: this._viewportSize.height};\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\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 scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\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 getViewportScrollPosition() {\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 documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttle Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = {width: window.innerWidth, height: window.innerHeight};\n }\n}\n\n/** @docs-private */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private */\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], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subject} from 'rxjs/Subject';\nimport {ScrollDispatcher} from './scroll-dispatcher';\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 */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef, Injectable, NgZone, Optional, SkipSelf, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs/Subject';\nimport {Subscription} from 'rxjs/Subscription';\nimport {Observable} from 'rxjs/Observable';\nimport {of as observableOf} from 'rxjs/observable/of';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {filter} from 'rxjs/operators/filter';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\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 */\n@Injectable()\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns 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 *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\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 const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\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 private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element = elementRef.nativeElement;\n let 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 /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n/** @docs-private */\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 */\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"],"names":["PlatformModule","NgModule","Optional","SkipSelf","Platform","NgZone","Injectable","auditTime","observableOf","merge","fromEvent","ElementRef","Directive","Subject","filter","Observable"],"mappings":";;;;;;;;;;;;;;;;;;;;;AGqBA,IAAa,mBAAmB,GAAG,EAAE,CAAC;;;;;;IAQpC,SAAF,gBAAA,CAAsB,OAAe,EAAU,SAAmB,EAAlE;QAAsB,IAAtB,CAAA,OAA6B,GAAP,OAAO,CAAQ;QAAU,IAA/C,CAAA,SAAwD,GAAT,SAAS,CAAU;;;;QAGlE,IAAA,CAAA,SAAA,GAAsB,IAAIa,oBAAO,EAAsB,CAAvD;;;;QAGA,IAAA,CAAA,mBAAA,GAA6C,IAAI,CAAjD;;;;QAGA,IAAA,CAAA,cAAA,GAA2B,CAAC,CAA5B;;;;;QAMA,IAAA,CAAA,gBAAA,GAAuD,IAAI,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AAE,EAAE,IAAIC,sBAAQ,EAAE,EAAE,aAAa,CAAC,EAAEC,8BAAQ,EAAEC,oBAAM,CAAC;IACzE,UAAU,EAAE,+BAA+B;CAC5C,CAAC;;;;;;;ADtHF,IAAA,oBAAA,kBAAA,YAAA;;;;QAKA,EAAA,IAAA,EAACJ,sBAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAACD,oCAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,SAAS,EAAE,CAAC,0BAA0B,CAAC;iBACxC,EAAD,EAAA;;;;IAlBA,OAAA,oBAAA,CAAA;CAmBA,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-scrolling.umd.js","sources":["../../src/cdk/scrolling/scrolling-module.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scroll-dispatcher.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nimport {CdkScrollable} from './scrollable';\nimport {PlatformModule} from '@angular/cdk/platform';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n})\nexport class ScrollDispatchModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Optional, SkipSelf, NgZone, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Observable} from 'rxjs/Observable';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {merge} from 'rxjs/observable/merge';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {Subscription} from 'rxjs/Subscription';\nimport {of as observableOf} from 'rxjs/observable/of';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable()\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(private _platform: Platform, ngZone: NgZone) {\n this._change = _platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize.width, height: this._viewportSize.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\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 scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\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 getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\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 documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttle Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser ?\n {width: window.innerWidth, height: window.innerHeight} :\n {width: 0, height: 0};\n }\n}\n\n/** @docs-private */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private */\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], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subject} from 'rxjs/Subject';\nimport {ScrollDispatcher} from './scroll-dispatcher';\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 */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef, Injectable, NgZone, Optional, SkipSelf, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs/Subject';\nimport {Subscription} from 'rxjs/Subscription';\nimport {Observable} from 'rxjs/Observable';\nimport {of as observableOf} from 'rxjs/observable/of';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {filter} from 'rxjs/operators/filter';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\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 */\n@Injectable()\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns 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 *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\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 const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\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 private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element = elementRef.nativeElement;\n let 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 /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n/** @docs-private */\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 */\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"],"names":["PlatformModule","NgModule","Optional","SkipSelf","Platform","NgZone","Injectable","auditTime","observableOf","merge","fromEvent","ElementRef","Directive","Subject","filter","Observable"],"mappings":";;;;;;;;;;;;;;;;;;;;;AGqBA,IAAa,mBAAmB,GAAG,EAAE,CAAC;;;;;;IAQpC,SAAF,gBAAA,CAAsB,OAAe,EAAU,SAAmB,EAAlE;QAAsB,IAAtB,CAAA,OAA6B,GAAP,OAAO,CAAQ;QAAU,IAA/C,CAAA,SAAwD,GAAT,SAAS,CAAU;;;;QAGlE,IAAA,CAAA,SAAA,GAAsB,IAAIa,oBAAO,EAAsB,CAAvD;;;;QAGA,IAAA,CAAA,mBAAA,GAA6C,IAAI,CAAjD;;;;QAGA,IAAA,CAAA,cAAA,GAA2B,CAAC,CAA5B;;;;;QAMA,IAAA,CAAA,gBAAA,GAAuD,IAAI,GAAG,EAAE,CAAhE;KAfuE;;;;;;;;;;;;IAsBrE,gBAAF,CAAA,SAAA,CAAA,QAAU;;;;;;IAAR,UAAS,UAAyB,EAApC;QAAE,IAAF,KAAA,GAAA,IAAA,CAKG;QAJC,qBAAM,kBAAkB,GAAG,UAAU,CAAC,eAAe,EAAE;aAClD,SAAS,CAAC,YAAnB,EAAyB,OAAA,KAAI,CAAC,SAAS,CAAC,IAAI,C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IAAI,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;CAC3D;;;;AAGD,IAAa,uBAAuB,GAAG;;IAErC,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,CAAC,CAAC,IAAIH,sBAAQ,EAAE,EAAE,IAAIC,sBAAQ,EAAE,EAAE,aAAa,CAAC,EAAEC,8BAAQ,EAAEC,oBAAM,CAAC;IACzE,UAAU,EAAE,+BAA+B;CAC5C,CAAC;;;;;;;ADrIF,IAAA,oBAAA,kBAAA,YAAA;;;;QAKA,EAAA,IAAA,EAACJ,sBAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAACD,oCAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,YAAY,EAAE,CAAC,aAAa,CAAC;oBAC7B,SAAS,EAAE,CAAC,0BAA0B,CAAC;iBACxC,EAAD,EAAA;;;;IAlBA,OAAA,oBAAA,CAAA;CAmBA,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;"}
@@ -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/Observable"),require("rxjs/observable/of"),require("rxjs/observable/fromEvent"),require("rxjs/operators/auditTime"),require("rxjs/operators/filter"),require("rxjs/observable/merge")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/cdk/platform","rxjs/Subject","rxjs/Observable","rxjs/observable/of","rxjs/observable/fromEvent","rxjs/operators/auditTime","rxjs/operators/filter","rxjs/observable/merge"],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,e.Rx.operators,e.Rx.operators,e.Rx.Observable)}(this,function(e,t,r,o,n,i,s,l,c,u){"use strict";function a(e,t,r){return e||new d(t,r)}function p(e,t,r){return e||new b(t,r)}var d=function(){function e(e,t){this._ngZone=e,this._platform=t,this._scrolled=new o.Subject,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return e.prototype.register=function(e){var t=this,r=e.elementScrolled().subscribe(function(){return t._scrolled.next(e)});this.scrollContainers.set(e,r)},e.prototype.deregister=function(e){var t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))},e.prototype.scrolled=function(e){var t=this;return void 0===e&&(e=20),this._platform.isBrowser?n.Observable.create(function(r){t._globalSubscription||t._addGlobalListener();var o=e>0?t._scrolled.pipe(l.auditTime(e)).subscribe(r):t._scrolled.subscribe(r);return t._scrolledCount++,function(){o.unsubscribe(),--t._scrolledCount||t._removeGlobalListener()}}):i.of()},e.prototype.ngOnDestroy=function(){var e=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(t,r){return e.deregister(r)})},e.prototype.ancestorScrolled=function(e,t){var r=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(c.filter(function(e){return!e||r.indexOf(e)>-1}))},e.prototype.getAncestorScrollContainers=function(e){var t=this,r=[];return this.scrollContainers.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._addGlobalListener=function(){var e=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return s.fromEvent(window.document,"scroll").subscribe(function(){return e._scrolled.next()})})},e.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:t.NgZone},{type:r.Platform}]},e}(),f={provide:d,deps:[[new t.Optional,new t.SkipSelf,d],t.NgZone,r.Platform],useFactory:a},h=function(){function e(e,t,r){var n=this;this._elementRef=e,this._scroll=t,this._ngZone=r,this._elementScrolled=new o.Subject,this._scrollListener=function(e){return n._elementScrolled.next(e)}}return e.prototype.ngOnInit=function(){var e=this;this._ngZone.runOutsideAngular(function(){e.getElementRef().nativeElement.addEventListener("scroll",e._scrollListener)}),this._scroll.register(this)},e.prototype.ngOnDestroy=function(){this._scroll.deregister(this),this._scrollListener&&this.getElementRef().nativeElement.removeEventListener("scroll",this._scrollListener)},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:d},{type:t.NgZone}]},e}(),b=function(){function e(e,t){var r=this;this._change=e.isBrowser?t.runOutsideAngular(function(){return u.merge(s.fromEvent(window,"resize"),s.fromEvent(window,"orientationchange"))}):i.of(),this._invalidateCache=this.change().subscribe(function(){return r._updateViewportSize()})}return e.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},e.prototype.getViewportSize=function(){return this._viewportSize||this._updateViewportSize(),{width:this._viewportSize.width,height:this._viewportSize.height}},e.prototype.getViewportRect=function(){var e=this.getViewportScrollPosition(),t=this.getViewportSize(),r=t.width,o=t.height;return{top:e.top,left:e.left,bottom:e.top+o,right:e.left+r,height:o,width:r}},e.prototype.getViewportScrollPosition=function(){var e=document.documentElement.getBoundingClientRect();return{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?this._change.pipe(l.auditTime(e)):this._change},e.prototype._updateViewportSize=function(){this._viewportSize={width:window.innerWidth,height:window.innerHeight}},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:r.Platform},{type:t.NgZone}]},e}(),g={provide:b,deps:[[new t.Optional,new t.SkipSelf,b],r.Platform,t.NgZone],useFactory:p},_=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.PlatformModule],exports:[h],declarations:[h],providers:[f]}]}],e.ctorParameters=function(){return[]},e}();e.DEFAULT_SCROLL_TIME=20,e.ScrollDispatcher=d,e.SCROLL_DISPATCHER_PROVIDER_FACTORY=a,e.SCROLL_DISPATCHER_PROVIDER=f,e.CdkScrollable=h,e.DEFAULT_RESIZE_TIME=20,e.ViewportRuler=b,e.VIEWPORT_RULER_PROVIDER_FACTORY=p,e.VIEWPORT_RULER_PROVIDER=g,e.ScrollDispatchModule=_,Object.defineProperty(e,"__esModule",{value:!0})});
8
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/cdk/platform"),require("rxjs/Subject"),require("rxjs/Observable"),require("rxjs/observable/of"),require("rxjs/observable/fromEvent"),require("rxjs/operators/auditTime"),require("rxjs/operators/filter"),require("rxjs/observable/merge")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/cdk/platform","rxjs/Subject","rxjs/Observable","rxjs/observable/of","rxjs/observable/fromEvent","rxjs/operators/auditTime","rxjs/operators/filter","rxjs/observable/merge"],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,e.Rx.operators,e.Rx.operators,e.Rx.Observable)}(this,function(e,t,r,o,n,i,s,l,c,u){"use strict";function a(e,t,r){return e||new f(t,r)}function p(e,t,r){return e||new b(t,r)}var f=function(){function e(e,t){this._ngZone=e,this._platform=t,this._scrolled=new o.Subject,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return e.prototype.register=function(e){var t=this,r=e.elementScrolled().subscribe(function(){return t._scrolled.next(e)});this.scrollContainers.set(e,r)},e.prototype.deregister=function(e){var t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))},e.prototype.scrolled=function(e){var t=this;return void 0===e&&(e=20),this._platform.isBrowser?n.Observable.create(function(r){t._globalSubscription||t._addGlobalListener();var o=e>0?t._scrolled.pipe(l.auditTime(e)).subscribe(r):t._scrolled.subscribe(r);return t._scrolledCount++,function(){o.unsubscribe(),--t._scrolledCount||t._removeGlobalListener()}}):i.of()},e.prototype.ngOnDestroy=function(){var e=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(t,r){return e.deregister(r)})},e.prototype.ancestorScrolled=function(e,t){var r=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(c.filter(function(e){return!e||r.indexOf(e)>-1}))},e.prototype.getAncestorScrollContainers=function(e){var t=this,r=[];return this.scrollContainers.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._addGlobalListener=function(){var e=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return s.fromEvent(window.document,"scroll").subscribe(function(){return e._scrolled.next()})})},e.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:t.NgZone},{type:r.Platform}]},e}(),d={provide:f,deps:[[new t.Optional,new t.SkipSelf,f],t.NgZone,r.Platform],useFactory:a},h=function(){function e(e,t,r){var n=this;this._elementRef=e,this._scroll=t,this._ngZone=r,this._elementScrolled=new o.Subject,this._scrollListener=function(e){return n._elementScrolled.next(e)}}return e.prototype.ngOnInit=function(){var e=this;this._ngZone.runOutsideAngular(function(){e.getElementRef().nativeElement.addEventListener("scroll",e._scrollListener)}),this._scroll.register(this)},e.prototype.ngOnDestroy=function(){this._scroll.deregister(this),this._scrollListener&&this.getElementRef().nativeElement.removeEventListener("scroll",this._scrollListener)},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:f},{type:t.NgZone}]},e}(),b=function(){function e(e,t){var r=this;this._platform=e,this._change=e.isBrowser?t.runOutsideAngular(function(){return u.merge(s.fromEvent(window,"resize"),s.fromEvent(window,"orientationchange"))}):i.of(),this._invalidateCache=this.change().subscribe(function(){return r._updateViewportSize()})}return e.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},e.prototype.getViewportSize=function(){this._viewportSize||this._updateViewportSize();var e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e},e.prototype.getViewportRect=function(){var e=this.getViewportScrollPosition(),t=this.getViewportSize(),r=t.width,o=t.height;return{top:e.top,left:e.left,bottom:e.top+o,right:e.left+r,height:o,width:r}},e.prototype.getViewportScrollPosition=function(){if(!this._platform.isBrowser)return{top:0,left:0};var e=document.documentElement.getBoundingClientRect();return{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?this._change.pipe(l.auditTime(e)):this._change},e.prototype._updateViewportSize=function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:r.Platform},{type:t.NgZone}]},e}(),g={provide:b,deps:[[new t.Optional,new t.SkipSelf,b],r.Platform,t.NgZone],useFactory:p},_=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.PlatformModule],exports:[h],declarations:[h],providers:[d]}]}],e.ctorParameters=function(){return[]},e}();e.DEFAULT_SCROLL_TIME=20,e.ScrollDispatcher=f,e.SCROLL_DISPATCHER_PROVIDER_FACTORY=a,e.SCROLL_DISPATCHER_PROVIDER=d,e.CdkScrollable=h,e.DEFAULT_RESIZE_TIME=20,e.ViewportRuler=b,e.VIEWPORT_RULER_PROVIDER_FACTORY=p,e.VIEWPORT_RULER_PROVIDER=g,e.ScrollDispatchModule=_,Object.defineProperty(e,"__esModule",{value:!0})});
9
9
  //# sourceMappingURL=cdk-scrolling.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-scrolling.umd.min.js","sources":["../../src/cdk/scrolling/scroll-dispatcher.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scrolling-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef, Injectable, NgZone, Optional, SkipSelf, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs/Subject';\nimport {Subscription} from 'rxjs/Subscription';\nimport {Observable} from 'rxjs/Observable';\nimport {of as observableOf} from 'rxjs/observable/of';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {filter} from 'rxjs/operators/filter';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\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 */\n@Injectable()\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns 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 *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\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 const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\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 private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element = elementRef.nativeElement;\n let 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 /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n/** @docs-private */\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 */\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Optional, SkipSelf, NgZone, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Observable} from 'rxjs/Observable';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {merge} from 'rxjs/observable/merge';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {Subscription} from 'rxjs/Subscription';\nimport {of as observableOf} from 'rxjs/observable/of';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable()\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(platform: Platform, ngZone: NgZone) {\n this._change = platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n return {width: this._viewportSize.width, height: this._viewportSize.height};\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\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 scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\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 getViewportScrollPosition() {\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 documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttle Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = {width: window.innerWidth, height: window.innerHeight};\n }\n}\n\n/** @docs-private */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private */\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], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subject} from 'rxjs/Subject';\nimport {ScrollDispatcher} from './scroll-dispatcher';\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 */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nimport {CdkScrollable} from './scrollable';\nimport {PlatformModule} from '@angular/cdk/platform';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n})\nexport class ScrollDispatchModule {}\n"],"names":["SCROLL_DISPATCHER_PROVIDER_FACTORY","parentDispatcher","ngZone","platform","ScrollDispatcher","VIEWPORT_RULER_PROVIDER_FACTORY","parentRuler","ViewportRuler","_ngZone","_platform","this","_scrolled","Subject","_globalSubscription","_scrolledCount","scrollContainers","Map","prototype","register","scrollable","_this","scrollSubscription","elementScrolled","subscribe","next","set","deregister","scrollableReference","get","unsubscribe","delete","scrolled","auditTimeInMs","isBrowser","Observable","create","observer","_addGlobalListener","subscription","pipe","auditTime","_removeGlobalListener","observableOf","ngOnDestroy","forEach","_","container","ancestorScrolled","elementRef","ancestors","getAncestorScrollContainers","filter","target","indexOf","scrollingContainers","_subscription","_scrollableContainsElement","push","element","nativeElement","scrollableElement","getElementRef","parentElement","runOutsideAngular","fromEvent","window","document","type","Injectable","NgZone","Platform","SCROLL_DISPATCHER_PROVIDER","provide","deps","Optional","SkipSelf","useFactory","CdkScrollable","_elementRef","_scroll","_elementScrolled","_scrollListener","event","ngOnInit","addEventListener","removeEventListener","asObservable","Directive","args","selector","ElementRef","_change","merge","_invalidateCache","change","_updateViewportSize","getViewportSize","_viewportSize","width","height","getViewportRect","scrollPosition","getViewportScrollPosition","_a","top","left","bottom","right","documentRect","documentElement","getBoundingClientRect","body","scrollTop","scrollY","scrollLeft","scrollX","throttleTime","innerWidth","innerHeight","VIEWPORT_RULER_PROVIDER","ScrollDispatchModule","NgModule","imports","PlatformModule","exports","declarations","providers"],"mappings":";;;;;;;61BAyKA,SAAAA,GACIC,EAAoCC,EAAgBC,GACtD,MAAOF,IAAoB,GAAIG,GAAiBF,EAAQC,GCzD1D,QAAAE,GAAgDC,EACAH,EACAD,GAC9C,MAAOI,IAAe,GAAIC,GAAcJ,EAAUD,GDhGpD,iBAQE,QAAFE,GAAsBI,EAAyBC,GAAzBC,KAAtBF,QAAsBA,EAAyBE,KAA/CD,UAA+CA,EAG/CC,KAAAC,UAAsB,GAAIC,GAAAA,QAG1BF,KAAAG,oBAA6C,KAG7CH,KAAAI,eAA2B,EAM3BJ,KAAAK,iBAAuD,GAAIC,KA5C3D,MAmDEZ,GAAFa,UAAA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,IASvD3G,EAAFU,UAAA6E,OAAE,SAAOsB,GACL,WADJ,KAAAA,IAASA,EArF0B,IAsFxBA,EAAe,EAAI1G,KAAKiF,QAAQpD,KAAKC,EAAAA,UAAU4E,IAAiB1G,KAAKiF,SAItEpF,EAAVU,UAAA8E,+BACIrF,KAAKuF,eAAiBC,MAAOjC,OAAOoD,WAAYlB,OAAQlC,OAAOqD,6BArFnEnD,KAACC,EAAAA,iDAfDD,KAAQG,EAAAA,WADRH,KAAwCE,EAAAA,UARxC9D,KAyHagH,GAEX/C,QAASjE,EACTkE,OAAQ,GAAIC,GAAAA,SAAY,GAAIC,GAAAA,SAAYpE,GAAgB+D,EAAAA,SAAUD,EAAAA,QAClEO,WAAYvE,GErHdmH,EAAA,yBARA,sBAaArD,KAACsD,EAAAA,SAADjC,OACEkC,SAAUC,EAAAA,gBACVC,SAAU/C,GACVgD,cAAehD,GACfiD,WAAYvD,6CAjBdiD,2BHqBmC,sICHA"}
1
+ {"version":3,"file":"cdk-scrolling.umd.min.js","sources":["../../src/cdk/scrolling/scroll-dispatcher.ts","../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scrolling-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ElementRef, Injectable, NgZone, Optional, SkipSelf, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Subject} from 'rxjs/Subject';\nimport {Subscription} from 'rxjs/Subscription';\nimport {Observable} from 'rxjs/Observable';\nimport {of as observableOf} from 'rxjs/observable/of';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {filter} from 'rxjs/operators/filter';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\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 */\n@Injectable()\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n const scrollSubscription = scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable));\n\n this.scrollContainers.set(scrollable, scrollSubscription);\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns 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 *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n return this._platform.isBrowser ? Observable.create(observer => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\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 const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n }) : observableOf<void>();\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\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 private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element = elementRef.nativeElement;\n let 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 /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n/** @docs-private */\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 */\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Optional, SkipSelf, NgZone, OnDestroy} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {Observable} from 'rxjs/Observable';\nimport {fromEvent} from 'rxjs/observable/fromEvent';\nimport {merge} from 'rxjs/observable/merge';\nimport {auditTime} from 'rxjs/operators/auditTime';\nimport {Subscription} from 'rxjs/Subscription';\nimport {of as observableOf} from 'rxjs/observable/of';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable()\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(private _platform: Platform, ngZone: NgZone) {\n this._change = _platform.isBrowser ? ngZone.runOutsideAngular(() => {\n return merge<Event>(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange'));\n }) : observableOf();\n\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize.width, height: this._viewportSize.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\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 scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\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 getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\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 documentRect = document.documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n document.documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n document.documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttle Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser ?\n {width: window.innerWidth, height: window.innerHeight} :\n {width: 0, height: 0};\n }\n}\n\n/** @docs-private */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private */\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], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, OnInit, OnDestroy, NgZone} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {Subject} from 'rxjs/Subject';\nimport {ScrollDispatcher} from './scroll-dispatcher';\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 */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _elementScrolled: Subject<Event> = new Subject();\n private _scrollListener = (event: Event) => this._elementScrolled.next(event);\n\n constructor(private _elementRef: ElementRef,\n private _scroll: ScrollDispatcher,\n private _ngZone: NgZone) {}\n\n ngOnInit() {\n this._ngZone.runOutsideAngular(() => {\n this.getElementRef().nativeElement.addEventListener('scroll', this._scrollListener);\n });\n\n this._scroll.register(this);\n }\n\n ngOnDestroy() {\n this._scroll.deregister(this);\n\n if (this._scrollListener) {\n this.getElementRef().nativeElement.removeEventListener('scroll', this._scrollListener);\n }\n }\n\n /**\n * Returns observable that emits when a scroll event is fired on the host element.\n */\n elementScrolled(): Observable<any> {\n return this._elementScrolled.asObservable();\n }\n\n getElementRef(): ElementRef {\n return this._elementRef;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';\nimport {CdkScrollable} from './scrollable';\nimport {PlatformModule} from '@angular/cdk/platform';\n\n@NgModule({\n imports: [PlatformModule],\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n providers: [SCROLL_DISPATCHER_PROVIDER],\n})\nexport class ScrollDispatchModule {}\n"],"names":["SCROLL_DISPATCHER_PROVIDER_FACTORY","parentDispatcher","ngZone","platform","ScrollDispatcher","VIEWPORT_RULER_PROVIDER_FACTORY","parentRuler","ViewportRuler","_ngZone","_platform","this","_scrolled","Subject","_globalSubscription","_scrolledCount","scrollContainers","Map","prototype","register","scrollable","_this","scrollSubscription","elementScrolled","subscribe","next","set","deregister","scrollableReference","get","unsubscribe","delete","scrolled","auditTimeInMs","isBrowser","Observable","create","observer","_addGlobalListener","subscription","pipe","auditTime","_removeGlobalListener","observableOf","ngOnDestroy","forEach","_","container","ancestorScrolled","elementRef","ancestors","getAncestorScrollContainers","filter","target","indexOf","scrollingContainers","_subscription","_scrollableContainsElement","push","element","nativeElement","scrollableElement","getElementRef","parentElement","runOutsideAngular","fromEvent","window","document","type","Injectable","NgZone","Platform","SCROLL_DISPATCHER_PROVIDER","provide","deps","Optional","SkipSelf","useFactory","CdkScrollable","_elementRef","_scroll","_elementScrolled","_scrollListener","event","ngOnInit","addEventListener","removeEventListener","asObservable","Directive","args","selector","ElementRef","_change","merge","_invalidateCache","change","_updateViewportSize","getViewportSize","_viewportSize","output","width","height","getViewportRect","scrollPosition","getViewportScrollPosition","_a","top","left","bottom","right","documentRect","documentElement","getBoundingClientRect","body","scrollTop","scrollY","scrollLeft","scrollX","throttleTime","innerWidth","innerHeight","VIEWPORT_RULER_PROVIDER","ScrollDispatchModule","NgModule","imports","PlatformModule","exports","declarations","providers"],"mappings":";;;;;;;61BAyKA,SAAAA,GACIC,EAAoCC,EAAgBC,GACtD,MAAOF,IAAoB,GAAIG,GAAiBF,EAAQC,GC1C1D,QAAAE,GAAgDC,EACAH,EACAD,GAC9C,MAAOI,IAAe,GAAIC,GAAcJ,EAAUD,GD/GpD,iBAQE,QAAFE,GAAsBI,EAAyBC,GAAzBC,KAAtBF,QAAsBA,EAAyBE,KAA/CD,UAA+CA,EAG/CC,KAAAC,UAAsB,GAAIC,GAAAA,QAG1BF,KAAAG,oBAA6C,KAG7CH,KAAAI,eAA2B,EAM3BJ,KAAAK,iBAAuD,GAAIC,KA5C3D,MAmDEZ,GAAFa,UAAAC,SAAE,SAASC,GAAT,GAAFC,GAAAV,KACUW,EAAqBF,EAAWG,kBACjCC,UAAU,WAAM,MAAAH,GAAKT,UAAUa,KAAKL,IAEzCT,MAAKK,iBAAiBU,IAAIN,EAAYE,IAOxCjB,EAAFa,UAAAS,WAAE,SAAWP,GACT,GAAMQ,GAAsBjB,KAAKK,iBAAiBa,IAAIT,EAElDQ,KACFA,EAAoBE,cACpBnB,KAAKK,iBAAiBe,OAAOX,KAcjCf,EAAFa,UAAAc,SAAE,SAASC,GAAT,GAAFZ,GAAAV,IACI,YADJ,KAAAsB,IAAWA,EA5DwB,IA6DxBtB,KAAKD,UAAUwB,UAAYC,EAAAA,WAAWC,OAAO,SAAAC,GAC7ChB,EAAKP,qBACRO,EAAKiB,oBAKP,IAAMC,GAAeN,EAAgB,EACnCZ,EAAKT,UAAU4B,KAAKC,EAAAA,UAAUR,IAAgBT,UAAUa,GACxDhB,EAAKT,UAAUY,UAAUa,EAI3B,OAFAhB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AA,SAAYpE,GAAgB+D,EAAAA,SAAUD,EAAAA,QAClEO,WAAYvE,GEpIdoH,EAAA,yBARA,sBAaAtD,KAACuD,EAAAA,SAADlC,OACEmC,SAAUC,EAAAA,gBACVC,SAAUhD,GACViD,cAAejD,GACfkD,WAAYxD,6CAjBdkD,2BHqBmC,sICHA"}
@@ -499,7 +499,9 @@ var CdkStepper = /** @class */ (function () {
499
499
  if (this._linear && index >= 0) {
500
500
  return steps.slice(0, index).some(function (step) {
501
501
  var /** @type {?} */ control = step.stepControl;
502
- var /** @type {?} */ isIncomplete = control ? (control.invalid || control.pending) : !step.completed;
502
+ var /** @type {?} */ isIncomplete = control ?
503
+ (control.invalid || control.pending || !step.interacted) :
504
+ !step.completed;
503
505
  return isIncomplete && !step.optional;
504
506
  });
505
507
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-stepper.umd.js","sources":["../../src/cdk/stepper/stepper-module.ts","../../src/cdk/stepper/stepper-button.ts","../../src/cdk/stepper/stepper.ts","../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule, CommonModule],\n exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],\n declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Input} from '@angular/core';\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '(click)': '_stepper.next()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '(click)': '_stepper.previous()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n Directive,\n ElementRef,\n Component,\n ContentChild,\n ViewChild,\n TemplateRef,\n ViewEncapsulation,\n Optional,\n Inject,\n forwardRef,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n OnChanges,\n OnDestroy\n} from '@angular/core';\nimport {\n LEFT_ARROW,\n RIGHT_ARROW,\n DOWN_ARROW,\n UP_ARROW,\n ENTER,\n SPACE,\n HOME,\n END,\n} from '@angular/cdk/keycodes';\nimport {CdkStepLabel} from './step-label';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {AbstractControl} from '@angular/forms';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {Subject} from 'rxjs/Subject';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n@Component({\n moduleId: module.id,\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n templateUrl: 'step.html',\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: AbstractControl;\n\n /** Whether user has seen the expanded step content or not. */\n interacted = false;\n\n /** Label of the step. */\n @Input() label: string;\n\n /** Whether the user can return to this step once it has been marked as complted. */\n @Input()\n get editable(): boolean { return this._editable; }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean { return this._optional; }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;\n }\n set completed(value: boolean) {\n this._customCompleted = coerceBooleanProperty(value);\n }\n private _customCompleted: boolean | null = null;\n\n private get _defaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n constructor(@Inject(forwardRef(() => CdkStepper)) private _stepper: CdkStepper) { }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._customCompleted != null) {\n this._customCompleted = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements OnDestroy {\n /** Emits when the component is destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** The list of step components that the stepper is holding. */\n @ContentChildren(CdkStep) _steps: QueryList<CdkStep>;\n\n /** The list of step headers of the steps in the stepper. */\n _stepHeader: QueryList<ElementRef>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean { return this._linear; }\n set linear(value: boolean) { this._linear = coerceBooleanProperty(value); }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() { return this._selectedIndex; }\n set selectedIndex(index: number) {\n if (this._steps) {\n // Ensure that the index can't be out of bounds.\n if (index < 0 || index > this._steps.length - 1) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n if (this._anyControlsInvalidOrPending(index) || index < this._selectedIndex &&\n !this._steps.toArray()[index].editable) {\n // remove focus from clicked step header if the step is not able to be selected\n this._stepHeader.toArray()[index].nativeElement.blur();\n } else if (this._selectedIndex != index) {\n this._emitStepperSelectionEvent(index);\n this._focusIndex = this._selectedIndex;\n }\n } else {\n this._selectedIndex = this._focusIndex = index;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep { return this._steps.toArray()[this.selectedIndex]; }\n set selected(step: CdkStep) {\n this.selectedIndex = this._steps.toArray().indexOf(step);\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() selectionChange: EventEmitter<StepperSelectionEvent>\n = new EventEmitter<StepperSelectionEvent>();\n\n /** The index of the step that the focus can be set. */\n _focusIndex: number = 0;\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality,\n private _changeDetectorRef: ChangeDetectorRef) {\n this._groupId = nextId++;\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this.selectedIndex = 0;\n this._steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number): 'number' | 'edit' | 'done' {\n const step = this._steps.toArray()[index];\n if (!step.completed || this._selectedIndex == index) {\n return 'number';\n } else {\n return step.editable ? 'edit' : 'done';\n }\n }\n\n private _emitStepperSelectionEvent(newIndex: number): void {\n const stepsArray = this._steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n // Note that the left/right arrows work both in vertical and horizontal mode.\n if (keyCode === RIGHT_ARROW) {\n this._layoutDirection() === 'rtl' ? this._focusPreviousStep() : this._focusNextStep();\n event.preventDefault();\n }\n\n if (keyCode === LEFT_ARROW) {\n this._layoutDirection() === 'rtl' ? this._focusNextStep() : this._focusPreviousStep();\n event.preventDefault();\n }\n\n // Note that the up/down arrows only work in vertical mode.\n // See: https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel\n if (this._orientation === 'vertical' && (keyCode === UP_ARROW || keyCode === DOWN_ARROW)) {\n keyCode === UP_ARROW ? this._focusPreviousStep() : this._focusNextStep();\n event.preventDefault();\n }\n\n if (keyCode === SPACE || keyCode === ENTER) {\n this.selectedIndex = this._focusIndex;\n event.preventDefault();\n }\n\n if (keyCode === HOME) {\n this._focusStep(0);\n event.preventDefault();\n }\n\n if (keyCode === END) {\n this._focusStep(this._steps.length - 1);\n event.preventDefault();\n }\n }\n\n private _focusNextStep() {\n this._focusStep((this._focusIndex + 1) % this._steps.length);\n }\n\n private _focusPreviousStep() {\n this._focusStep((this._focusIndex + this._steps.length - 1) % this._steps.length);\n }\n\n private _focusStep(index: number) {\n this._focusIndex = index;\n this._stepHeader.toArray()[this._focusIndex].nativeElement.focus();\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n const steps = this._steps.toArray();\n\n steps[this._selectedIndex].interacted = true;\n\n if (this._linear && index >= 0) {\n return steps.slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete = control ? (control.invalid || control.pending) : !step.completed;\n return isIncomplete && !step.optional;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n"],"names":["BidiModule","CommonModule","NgModule","Input","Directive","Output","END","H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/stepper/stepper-module.ts","../../src/cdk/stepper/stepper-button.ts","../../src/cdk/stepper/stepper.ts","../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule, CommonModule],\n exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],\n declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Input} from '@angular/core';\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '(click)': '_stepper.next()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '(click)': '_stepper.previous()',\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n Directive,\n ElementRef,\n Component,\n ContentChild,\n ViewChild,\n TemplateRef,\n ViewEncapsulation,\n Optional,\n Inject,\n forwardRef,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n OnChanges,\n OnDestroy\n} from '@angular/core';\nimport {\n LEFT_ARROW,\n RIGHT_ARROW,\n DOWN_ARROW,\n UP_ARROW,\n ENTER,\n SPACE,\n HOME,\n END,\n} from '@angular/cdk/keycodes';\nimport {CdkStepLabel} from './step-label';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {AbstractControl} from '@angular/forms';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {Subject} from 'rxjs/Subject';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n@Component({\n moduleId: module.id,\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n templateUrl: 'step.html',\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: AbstractControl;\n\n /** Whether user has seen the expanded step content or not. */\n interacted = false;\n\n /** Label of the step. */\n @Input() label: string;\n\n /** Whether the user can return to this step once it has been marked as complted. */\n @Input()\n get editable(): boolean { return this._editable; }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean { return this._optional; }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;\n }\n set completed(value: boolean) {\n this._customCompleted = coerceBooleanProperty(value);\n }\n private _customCompleted: boolean | null = null;\n\n private get _defaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n constructor(@Inject(forwardRef(() => CdkStepper)) private _stepper: CdkStepper) { }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._customCompleted != null) {\n this._customCompleted = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements OnDestroy {\n /** Emits when the component is destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** The list of step components that the stepper is holding. */\n @ContentChildren(CdkStep) _steps: QueryList<CdkStep>;\n\n /** The list of step headers of the steps in the stepper. */\n _stepHeader: QueryList<ElementRef>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean { return this._linear; }\n set linear(value: boolean) { this._linear = coerceBooleanProperty(value); }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() { return this._selectedIndex; }\n set selectedIndex(index: number) {\n if (this._steps) {\n // Ensure that the index can't be out of bounds.\n if (index < 0 || index > this._steps.length - 1) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n if (this._anyControlsInvalidOrPending(index) || index < this._selectedIndex &&\n !this._steps.toArray()[index].editable) {\n // remove focus from clicked step header if the step is not able to be selected\n this._stepHeader.toArray()[index].nativeElement.blur();\n } else if (this._selectedIndex != index) {\n this._emitStepperSelectionEvent(index);\n this._focusIndex = this._selectedIndex;\n }\n } else {\n this._selectedIndex = this._focusIndex = index;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep { return this._steps.toArray()[this.selectedIndex]; }\n set selected(step: CdkStep) {\n this.selectedIndex = this._steps.toArray().indexOf(step);\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() selectionChange: EventEmitter<StepperSelectionEvent>\n = new EventEmitter<StepperSelectionEvent>();\n\n /** The index of the step that the focus can be set. */\n _focusIndex: number = 0;\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality,\n private _changeDetectorRef: ChangeDetectorRef) {\n this._groupId = nextId++;\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this.selectedIndex = 0;\n this._steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number): 'number' | 'edit' | 'done' {\n const step = this._steps.toArray()[index];\n if (!step.completed || this._selectedIndex == index) {\n return 'number';\n } else {\n return step.editable ? 'edit' : 'done';\n }\n }\n\n private _emitStepperSelectionEvent(newIndex: number): void {\n const stepsArray = this._steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const keyCode = event.keyCode;\n\n // Note that the left/right arrows work both in vertical and horizontal mode.\n if (keyCode === RIGHT_ARROW) {\n this._layoutDirection() === 'rtl' ? this._focusPreviousStep() : this._focusNextStep();\n event.preventDefault();\n }\n\n if (keyCode === LEFT_ARROW) {\n this._layoutDirection() === 'rtl' ? this._focusNextStep() : this._focusPreviousStep();\n event.preventDefault();\n }\n\n // Note that the up/down arrows only work in vertical mode.\n // See: https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel\n if (this._orientation === 'vertical' && (keyCode === UP_ARROW || keyCode === DOWN_ARROW)) {\n keyCode === UP_ARROW ? this._focusPreviousStep() : this._focusNextStep();\n event.preventDefault();\n }\n\n if (keyCode === SPACE || keyCode === ENTER) {\n this.selectedIndex = this._focusIndex;\n event.preventDefault();\n }\n\n if (keyCode === HOME) {\n this._focusStep(0);\n event.preventDefault();\n }\n\n if (keyCode === END) {\n this._focusStep(this._steps.length - 1);\n event.preventDefault();\n }\n }\n\n private _focusNextStep() {\n this._focusStep((this._focusIndex + 1) % this._steps.length);\n }\n\n private _focusPreviousStep() {\n this._focusStep((this._focusIndex + this._steps.length - 1) % this._steps.length);\n }\n\n private _focusStep(index: number) {\n this._focusIndex = index;\n this._stepHeader.toArray()[this._focusIndex].nativeElement.focus();\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n const steps = this._steps.toArray();\n\n steps[this._selectedIndex].interacted = true;\n\n if (this._linear && index >= 0) {\n return steps.slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete = control ?\n (control.invalid || control.pending || !step.interacted) :\n !step.completed;\n return isIncomplete && !step.optional;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n"],"names":["BidiModule","CommonModule","NgModule","Input","Directive","Output","END","HOME","SPACE","ENTER","LEFT_ARROW","RIGHT_ARROW","ChangeDetectionStrategy","ViewEncapsulation","Component","coerceBooleanProperty","TemplateRef"],"mappings":";;;;;;;;;;;;;;;;;;AGQA,IAAA,YAAA,kBAAA,YAAA;IAME,SAAF,YAAA,CAA0C,QAA1C,EAAA;QAA0C,IAA1C,CAAA,QAAkD,GAAR,QAAQ,CAAlD;KAAyE;;QAJzE,EAAA,IAAA,EAACI,uBAAS,EAAV,IAAA,EAAA,CAAW;oBACT,QAAQ,EAAE,gBAAgB;iBAC3B,EAAD,EAAA;;;;QAJA,EAAA,IAAA,EAAmBY,yBAAW,GAA9B;;IARA,OAAA,YAAA,CAAA;CAaA,EAAA,CAAA,CAAA;;;;;;;;;;ADiCA,IAAI,MAAM,GAAG,CAAC,CAAC;;;;AAYf,IAAA,qBAAA,kBAAA,YAAA;;;IA1DA,OAAA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