@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
@@ -1 +1 @@
1
- {"version":3,"file":"collections.es5.js","sources":["../../../src/cdk/collections/index.ts","../../../src/cdk/collections/public-api.ts","../../../src/cdk/collections/unique-selection-dispatcher.ts","../../../src/cdk/collections/selection.ts","../../../src/cdk/collections/data-source.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {UNIQUE_SELECTION_DISPATCHER_PROVIDER_FACTORY as ɵa} from './unique-selection-dispatcher';","/**\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\nexport * from './collection-viewer';\nexport * from './data-source';\nexport * from './selection';\nexport {\n UniqueSelectionDispatcher,\n UniqueSelectionDispatcherListener,\n UNIQUE_SELECTION_DISPATCHER_PROVIDER,\n} from './unique-selection-dispatcher';\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, OnDestroy} from '@angular/core';\n\n\n// Users of the Dispatcher never need to see this type, but TypeScript requires it to be exported.\nexport type UniqueSelectionDispatcherListener = (id: string, name: string) => void;\n\n/**\n * Class to coordinate unique selection based on name.\n * Intended to be consumed as an Angular service.\n * This service is needed because native radio change events are only fired on the item currently\n * being selected, and we still need to uncheck the previous selection.\n *\n * This service does not *store* any IDs and names because they may change at any time, so it is\n * less error-prone if they are simply passed through when the events occur.\n */\n@Injectable()\nexport class UniqueSelectionDispatcher implements OnDestroy {\n private _listeners: UniqueSelectionDispatcherListener[] = [];\n\n /**\n * Notify other items that selection for the given name has been set.\n * @param id ID of the item.\n * @param name Name of the item.\n */\n notify(id: string, name: string) {\n for (let listener of this._listeners) {\n listener(id, name);\n }\n }\n\n /**\n * Listen for future changes to item selection.\n * @return Function used to deregister listener\n */\n listen(listener: UniqueSelectionDispatcherListener): () => void {\n this._listeners.push(listener);\n return () => {\n this._listeners = this._listeners.filter((registered: UniqueSelectionDispatcherListener) => {\n return listener !== registered;\n });\n };\n }\n\n ngOnDestroy() {\n this._listeners = [];\n }\n}\n\n/** @docs-private */\nexport function UNIQUE_SELECTION_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: UniqueSelectionDispatcher) {\n return parentDispatcher || new UniqueSelectionDispatcher();\n}\n\n/** @docs-private */\nexport const UNIQUE_SELECTION_DISPATCHER_PROVIDER = {\n // If there is already a dispatcher available, use that. Otherwise, provide a new one.\n provide: UniqueSelectionDispatcher,\n deps: [[new Optional(), new SkipSelf(), UniqueSelectionDispatcher]],\n useFactory: UNIQUE_SELECTION_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 {Subject} from 'rxjs/Subject';\n\n/**\n * Class to be used to power selecting one or more options from a list.\n */\nexport class SelectionModel<T> {\n /** Currently-selected values. */\n private _selection: Set<T> = new Set();\n\n /** Keeps track of the deselected options that haven't been emitted by the change event. */\n private _deselectedToEmit: T[] = [];\n\n /** Keeps track of the selected options that haven't been emitted by the change event. */\n private _selectedToEmit: T[] = [];\n\n /** Cache for the array value of the selected items. */\n private _selected: T[] | null;\n\n /** Selected values. */\n get selected(): T[] {\n if (!this._selected) {\n this._selected = Array.from(this._selection.values());\n }\n\n return this._selected;\n }\n\n /** Event emitted when the value has changed. */\n onChange: Subject<SelectionChange<T>> | null = this._emitChanges ? new Subject() : null;\n\n constructor(\n private _multiple = false,\n initiallySelectedValues?: T[],\n private _emitChanges = true) {\n\n if (initiallySelectedValues && initiallySelectedValues.length) {\n if (_multiple) {\n initiallySelectedValues.forEach(value => this._markSelected(value));\n } else {\n this._markSelected(initiallySelectedValues[0]);\n }\n\n // Clear the array in order to avoid firing the change event for preselected values.\n this._selectedToEmit.length = 0;\n }\n }\n\n /**\n * Selects a value or an array of values.\n */\n select(...values: T[]): void {\n this._verifyValueAssignment(values);\n values.forEach(value => this._markSelected(value));\n this._emitChangeEvent();\n }\n\n /**\n * Deselects a value or an array of values.\n */\n deselect(...values: T[]): void {\n this._verifyValueAssignment(values);\n values.forEach(value => this._unmarkSelected(value));\n this._emitChangeEvent();\n }\n\n /**\n * Toggles a value between selected and deselected.\n */\n toggle(value: T): void {\n this.isSelected(value) ? this.deselect(value) : this.select(value);\n }\n\n /**\n * Clears all of the selected values.\n */\n clear(): void {\n this._unmarkAll();\n this._emitChangeEvent();\n }\n\n /**\n * Determines whether a value is selected.\n */\n isSelected(value: T): boolean {\n return this._selection.has(value);\n }\n\n /**\n * Determines whether the model does not have a value.\n */\n isEmpty(): boolean {\n return this._selection.size === 0;\n }\n\n /**\n * Determines whether the model has a value.\n */\n hasValue(): boolean {\n return !this.isEmpty();\n }\n\n /**\n * Sorts the selected values based on a predicate function.\n */\n sort(predicate?: (a: T, b: T) => number): void {\n if (this._multiple && this._selected) {\n this._selected.sort(predicate);\n }\n }\n\n /** Emits a change event and clears the records of selected and deselected values. */\n private _emitChangeEvent() {\n // Clear the selected values so they can be re-cached.\n this._selected = null;\n\n if (this._selectedToEmit.length || this._deselectedToEmit.length) {\n const eventData = new SelectionChange<T>(this, this._selectedToEmit, this._deselectedToEmit);\n\n if (this.onChange) {\n this.onChange.next(eventData);\n }\n\n this._deselectedToEmit = [];\n this._selectedToEmit = [];\n }\n }\n\n /** Selects a value. */\n private _markSelected(value: T) {\n if (!this.isSelected(value)) {\n if (!this._multiple) {\n this._unmarkAll();\n }\n\n this._selection.add(value);\n\n if (this._emitChanges) {\n this._selectedToEmit.push(value);\n }\n }\n }\n\n /** Deselects a value. */\n private _unmarkSelected(value: T) {\n if (this.isSelected(value)) {\n this._selection.delete(value);\n\n if (this._emitChanges) {\n this._deselectedToEmit.push(value);\n }\n }\n }\n\n /** Clears out the selected values. */\n private _unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }\n\n /**\n * Verifies the value assignment and throws an error if the specified value array is\n * including multiple values while the selection model is not supporting multiple values.\n */\n private _verifyValueAssignment(values: T[]) {\n if (values.length > 1 && !this._multiple) {\n throw getMultipleValuesInSingleSelectionError();\n }\n }\n}\n\n/**\n * Event emitted when the value of a MatSelectionModel has changed.\n * @docs-private\n */\nexport class SelectionChange<T> {\n constructor(\n /** Model that dispatched the event. */\n public source: SelectionModel<T>,\n /** Options that were added to the model. */\n public added?: T[],\n /** Options that were removed from the model. */\n public removed?: T[]) {}\n}\n\n/**\n * Returns an error that reports that multiple values are passed into a selection model\n * with a single value.\n */\nexport function getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\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 {Observable} from 'rxjs/Observable';\nimport {CollectionViewer} from './collection-viewer';\n\nexport abstract class DataSource<T> {\n /**\n * Connects a collection viewer (such as a data-table) to this data source. Note that\n * the stream provided will be accessed during change detection and should not directly change\n * values that are bound in template views.\n * @param collectionViewer The component that exposes a view over the data provided by this\n * data source.\n * @returns Observable that emits a new value when the data changes.\n */\n abstract connect(collectionViewer: CollectionViewer): Observable<T[]>;\n\n /**\n * Disconnects a collection viewer (such as a data-table) from this data source. Can be used\n * to perform any clean-up or tear-down operations when a view is being destroyed.\n *\n * @param collectionViewer The component that exposes a view over the data provided by this\n * data source.\n */\n abstract disconnect(collectionViewer: CollectionViewer): void;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AIWA,IAAA,UAAA,kBAAA,YAAA;;;IAXA,OAAA,UAAA,CAAA;CA8BA,EAAA,CAAC,CAAA;;;;;;;ADtBD;;;AAKA,IAAA,cAAA,kBAAA,YAAA;IAyBE,SAAF,cAAA,CACY,SADZ,EAEI,uBAA6B,EACrB,YAHZ,EAAA;;;QAAE,IAAF,KAAA,GAAA,IAAA,CAeG;QAdS,IAAZ,CAAA,SAAqB,GAAT,SAAS,CAArB;QAEY,IAAZ,CAAA,YAAwB,GAAZ,YAAY,CAAxB;;;;QA1BA,IAAA,CAAA,UAAA,GAA+B,IAAI,GAAG,EAAE,CAAxC;;;;QAGA,IAAA,CAAA,iBAAA,GAAmC,EAAE,CAArC;;;;QAGA,IAAA,CAAA,eAAA,GAAiC,EAAE,CAAnC;;;;QAeA,IAAA,CAAA,QAAA,GAAiD,IAAI,CAAC,YAAY,GAAG,IAAI,OAAO,EAAE,GAAG,IAAI,CAAzF;QAOI,IAAI,uBAAuB,IAAI,uBAAuB,CAAC,MAAM,EAAE;YAC7D,IAAI,SAAS,EAAE;gBACb,uBAAuB,CAAC,OAAO,CAAC,UAAA,KAAK,EAA7C,EAAiD,OAAA,KAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAA1E,EAA0E,CAAC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CAArB;YACM,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SACpB;KACF,CAAH;;;;;;;;;;IAME,yBAAF,CAAA,SAAA,CAAA,MAAQ;;;;;IAAN,UAAO,QAA2C,EAApD;QAAE,IAAF,KAAA,GAAA,IAAA,CAOG;QANC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,YAAX;YACM,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAC,UAA6C,EAA7F;gBACQ,OAAO,QAAQ,KAAK,UAAU,CAAC;aAChC,CAAC,CAAC;SACJ,CAAC;KACH,CAAH;;;;IAEE,yBAAF,CAAA,SAAA,CAAA,WAAa;;;IAAX,YAAF;QACI,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;KACtB,CAAH;;QA9BA,EAAA,IAAA,EAAC,UAAU,EAAX;;;;IAvBA,OAAA,yBAAA,CAAA;;AAwBA;;;;;AAiCA,AAAA,SAAA,4CAAA,CACI,gBAA2C,EAD/C;IAEE,OAAO,gBAAgB,IAAI,IAAI,yBAAyB,EAAE,CAAC;CAC5D;;;;AAGD,AAAO,IAAM,oCAAoC,GAAG;;IAElD,OAAO,EAAE,yBAAyB;IAClC,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,IAAI,QAAQ,EAAE,EAAE,yBAAyB,CAAC,CAAC;IACnE,UAAU,EAAE,4CAA4C;CACzD,CAAC;;;;;GD3DF,AACA,AACA,AAIuC;;;;;;;;GDXvC,AAEA,AAAiG;;"}
1
+ {"version":3,"file":"collections.es5.js","sources":["../../../src/cdk/collections/index.ts","../../../src/cdk/collections/public-api.ts","../../../src/cdk/collections/unique-selection-dispatcher.ts","../../../src/cdk/collections/selection.ts","../../../src/cdk/collections/data-source.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {UNIQUE_SELECTION_DISPATCHER_PROVIDER_FACTORY as ɵa} from './unique-selection-dispatcher';","/**\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\nexport * from './collection-viewer';\nexport * from './data-source';\nexport * from './selection';\nexport {\n UniqueSelectionDispatcher,\n UniqueSelectionDispatcherListener,\n UNIQUE_SELECTION_DISPATCHER_PROVIDER,\n} from './unique-selection-dispatcher';\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, OnDestroy} from '@angular/core';\n\n\n// Users of the Dispatcher never need to see this type, but TypeScript requires it to be exported.\nexport type UniqueSelectionDispatcherListener = (id: string, name: string) => void;\n\n/**\n * Class to coordinate unique selection based on name.\n * Intended to be consumed as an Angular service.\n * This service is needed because native radio change events are only fired on the item currently\n * being selected, and we still need to uncheck the previous selection.\n *\n * This service does not *store* any IDs and names because they may change at any time, so it is\n * less error-prone if they are simply passed through when the events occur.\n */\n@Injectable()\nexport class UniqueSelectionDispatcher implements OnDestroy {\n private _listeners: UniqueSelectionDispatcherListener[] = [];\n\n /**\n * Notify other items that selection for the given name has been set.\n * @param id ID of the item.\n * @param name Name of the item.\n */\n notify(id: string, name: string) {\n for (let listener of this._listeners) {\n listener(id, name);\n }\n }\n\n /**\n * Listen for future changes to item selection.\n * @return Function used to deregister listener\n */\n listen(listener: UniqueSelectionDispatcherListener): () => void {\n this._listeners.push(listener);\n return () => {\n this._listeners = this._listeners.filter((registered: UniqueSelectionDispatcherListener) => {\n return listener !== registered;\n });\n };\n }\n\n ngOnDestroy() {\n this._listeners = [];\n }\n}\n\n/** @docs-private */\nexport function UNIQUE_SELECTION_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: UniqueSelectionDispatcher) {\n return parentDispatcher || new UniqueSelectionDispatcher();\n}\n\n/** @docs-private */\nexport const UNIQUE_SELECTION_DISPATCHER_PROVIDER = {\n // If there is already a dispatcher available, use that. Otherwise, provide a new one.\n provide: UniqueSelectionDispatcher,\n deps: [[new Optional(), new SkipSelf(), UniqueSelectionDispatcher]],\n useFactory: UNIQUE_SELECTION_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 {Subject} from 'rxjs/Subject';\n\n/**\n * Class to be used to power selecting one or more options from a list.\n */\nexport class SelectionModel<T> {\n /** Currently-selected values. */\n private _selection: Set<T> = new Set();\n\n /** Keeps track of the deselected options that haven't been emitted by the change event. */\n private _deselectedToEmit: T[] = [];\n\n /** Keeps track of the selected options that haven't been emitted by the change event. */\n private _selectedToEmit: T[] = [];\n\n /** Cache for the array value of the selected items. */\n private _selected: T[] | null;\n\n /** Selected values. */\n get selected(): T[] {\n if (!this._selected) {\n this._selected = Array.from(this._selection.values());\n }\n\n return this._selected;\n }\n\n /** Event emitted when the value has changed. */\n onChange: Subject<SelectionChange<T>> | null = this._emitChanges ? new Subject() : null;\n\n constructor(\n private _multiple = false,\n initiallySelectedValues?: T[],\n private _emitChanges = true) {\n\n if (initiallySelectedValues && initiallySelectedValues.length) {\n if (_multiple) {\n initiallySelectedValues.forEach(value => this._markSelected(value));\n } else {\n this._markSelected(initiallySelectedValues[0]);\n }\n\n // Clear the array in order to avoid firing the change event for preselected values.\n this._selectedToEmit.length = 0;\n }\n }\n\n /**\n * Selects a value or an array of values.\n */\n select(...values: T[]): void {\n this._verifyValueAssignment(values);\n values.forEach(value => this._markSelected(value));\n this._emitChangeEvent();\n }\n\n /**\n * Deselects a value or an array of values.\n */\n deselect(...values: T[]): void {\n this._verifyValueAssignment(values);\n values.forEach(value => this._unmarkSelected(value));\n this._emitChangeEvent();\n }\n\n /**\n * Toggles a value between selected and deselected.\n */\n toggle(value: T): void {\n this.isSelected(value) ? this.deselect(value) : this.select(value);\n }\n\n /**\n * Clears all of the selected values.\n */\n clear(): void {\n this._unmarkAll();\n this._emitChangeEvent();\n }\n\n /**\n * Determines whether a value is selected.\n */\n isSelected(value: T): boolean {\n return this._selection.has(value);\n }\n\n /**\n * Determines whether the model does not have a value.\n */\n isEmpty(): boolean {\n return this._selection.size === 0;\n }\n\n /**\n * Determines whether the model has a value.\n */\n hasValue(): boolean {\n return !this.isEmpty();\n }\n\n /**\n * Sorts the selected values based on a predicate function.\n */\n sort(predicate?: (a: T, b: T) => number): void {\n if (this._multiple && this._selected) {\n this._selected.sort(predicate);\n }\n }\n\n /** Emits a change event and clears the records of selected and deselected values. */\n private _emitChangeEvent() {\n // Clear the selected values so they can be re-cached.\n this._selected = null;\n\n if (this._selectedToEmit.length || this._deselectedToEmit.length) {\n if (this.onChange) {\n this.onChange.next({\n source: this,\n added: this._selectedToEmit,\n removed: this._deselectedToEmit\n });\n }\n\n this._deselectedToEmit = [];\n this._selectedToEmit = [];\n }\n }\n\n /** Selects a value. */\n private _markSelected(value: T) {\n if (!this.isSelected(value)) {\n if (!this._multiple) {\n this._unmarkAll();\n }\n\n this._selection.add(value);\n\n if (this._emitChanges) {\n this._selectedToEmit.push(value);\n }\n }\n }\n\n /** Deselects a value. */\n private _unmarkSelected(value: T) {\n if (this.isSelected(value)) {\n this._selection.delete(value);\n\n if (this._emitChanges) {\n this._deselectedToEmit.push(value);\n }\n }\n }\n\n /** Clears out the selected values. */\n private _unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }\n\n /**\n * Verifies the value assignment and throws an error if the specified value array is\n * including multiple values while the selection model is not supporting multiple values.\n */\n private _verifyValueAssignment(values: T[]) {\n if (values.length > 1 && !this._multiple) {\n throw getMultipleValuesInSingleSelectionError();\n }\n }\n}\n\n/**\n * Event emitted when the value of a MatSelectionModel has changed.\n * @docs-private\n */\nexport interface SelectionChange<T> {\n /** Model that dispatched the event. */\n source: SelectionModel<T>;\n /** Options that were added to the model. */\n added: T[];\n /** Options that were removed from the model. */\n removed: T[];\n}\n\n/**\n * Returns an error that reports that multiple values are passed into a selection model\n * with a single value.\n */\nexport function getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\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 {Observable} from 'rxjs/Observable';\nimport {CollectionViewer} from './collection-viewer';\n\nexport abstract class DataSource<T> {\n /**\n * Connects a collection viewer (such as a data-table) to this data source. Note that\n * the stream provided will be accessed during change detection and should not directly change\n * values that are bound in template views.\n * @param collectionViewer The component that exposes a view over the data provided by this\n * data source.\n * @returns Observable that emits a new value when the data changes.\n */\n abstract connect(collectionViewer: CollectionViewer): Observable<T[]>;\n\n /**\n * Disconnects a collection viewer (such as a data-table) from this data source. Can be used\n * to perform any clean-up or tear-down operations when a view is being destroyed.\n *\n * @param collectionViewer The component that exposes a view over the data provided by this\n * data source.\n */\n abstract disconnect(collectionViewer: CollectionViewer): void;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AIWA,IAAA,UAAA,kBAAA,YAAA;;;IAXA,OAAA,UAAA,CAAA;CA8BA,EAAA,CAAC,CAAA;;;;;;;ADtBD;;;AAKA,IAAA,cAAA,kBAAA,YAAA;IAyBE,SAAF,cAAA,CACY,SADZ,EAEI,uBAA6B,EACrB,YAHZ,EAAA;;;QAAE,IAAF,KAAA,GAAA,IAAA,CAeG;QAdS,IAAZ,CAAA,SAAqB,GAAT,SAAS,CAArB;QAEY,IAAZ,CAAA,YAAwB,GAAZ,YAAY,CAAxB;;;;QA1BA,IAAA,CAAA,UAAA,GAA+B,IAAI,GAAG,EAAE,CAAxC;;;;QAGA,IAAA,CAAA,iBAAA,GAAmC,EAAE,CAArC;;;;QAGA,IAAA,CAAA,eAAA,GAAiC,EAAE,CAAnC;;;;QAeA,IAAA,CAA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AAQ,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SACpB;KACF,CAAH;;;;;;;;;;IAME,yBAAF,CAAA,SAAA,CAAA,MAAQ;;;;;IAAN,UAAO,QAA2C,EAApD;QAAE,IAAF,KAAA,GAAA,IAAA,CAOG;QANC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,YAAX;YACM,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAC,UAA6C,EAA7F;gBACQ,OAAO,QAAQ,KAAK,UAAU,CAAC;aAChC,CAAC,CAAC;SACJ,CAAC;KACH,CAAH;;;;IAEE,yBAAF,CAAA,SAAA,CAAA,WAAa;;;IAAX,YAAF;QACI,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;KACtB,CAAH;;QA9BA,EAAA,IAAA,EAAC,UAAU,EAAX;;;;IAvBA,OAAA,yBAAA,CAAA;;AAwBA;;;;;AAiCA,AAAA,SAAA,4CAAA,CACI,gBAA2C,EAD/C;IAEE,OAAO,gBAAgB,IAAI,IAAI,yBAAyB,EAAE,CAAC;CAC5D;;;;AAGD,AAAO,IAAM,oCAAoC,GAAG;;IAElD,OAAO,EAAE,yBAAyB;IAClC,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,IAAI,QAAQ,EAAE,EAAE,yBAAyB,CAAC,CAAC;IACnE,UAAU,EAAE,4CAA4C;CACzD,CAAC;;;;;GD3DF,AACA,AACA,AAIuC;;;;;;;;GDXvC,AAEA,AAAiG;;"}
@@ -1137,7 +1137,6 @@ var ConnectedPositionStrategy = /** @class */ (function () {
1137
1137
  */
1138
1138
  function (overlayRef) {
1139
1139
  var _this = this;
1140
- this._overlayRef = overlayRef;
1141
1140
  this._pane = overlayRef.overlayElement;
1142
1141
  this._resizeSubscription.unsubscribe();
1143
1142
  this._resizeSubscription = this._viewportRuler.change().subscribe(function () { return _this.apply(); });
@@ -2262,7 +2261,7 @@ var OVERLAY_CONTAINER_PROVIDER = {
2262
2261
  var nextUniqueId = 0;
2263
2262
  /**
2264
2263
  * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be
2265
- * used as a low-level building building block for other components. Dialogs, tooltips, menus,
2264
+ * used as a low-level building block for other components. Dialogs, tooltips, menus,
2266
2265
  * selects, etc. can all be built using overlays. The service should primarily be used by authors
2267
2266
  * of re-usable components rather than developers building end-user applications.
2268
2267
  *
@@ -2428,6 +2427,7 @@ var CdkConnectedOverlay = /** @class */ (function () {
2428
2427
  this._scrollStrategy = _scrollStrategy;
2429
2428
  this._dir = _dir;
2430
2429
  this._hasBackdrop = false;
2430
+ this._lockPosition = false;
2431
2431
  this._backdropSubscription = Subscription.EMPTY;
2432
2432
  this._offsetX = 0;
2433
2433
  this._offsetY = 0;
@@ -2509,6 +2509,20 @@ var CdkConnectedOverlay = /** @class */ (function () {
2509
2509
  enumerable: true,
2510
2510
  configurable: true
2511
2511
  });
2512
+ Object.defineProperty(CdkConnectedOverlay.prototype, "lockPosition", {
2513
+ get: /**
2514
+ * Whether or not the overlay should be locked when scrolling.
2515
+ * @return {?}
2516
+ */
2517
+ function () { return this._lockPosition; },
2518
+ set: /**
2519
+ * @param {?} value
2520
+ * @return {?}
2521
+ */
2522
+ function (value) { this._lockPosition = coerceBooleanProperty(value); },
2523
+ enumerable: true,
2524
+ configurable: true
2525
+ });
2512
2526
  Object.defineProperty(CdkConnectedOverlay.prototype, "_deprecatedOrigin", {
2513
2527
  get: /**
2514
2528
  * @deprecated
@@ -2737,6 +2751,9 @@ var CdkConnectedOverlay = /** @class */ (function () {
2737
2751
  if (changes['positions'] || changes['_deprecatedPositions']) {
2738
2752
  this._position.withPositions(this.positions);
2739
2753
  }
2754
+ if (changes['lockPosition']) {
2755
+ this._position.withLockedPosition(this.lockPosition);
2756
+ }
2740
2757
  if (changes['origin'] || changes['_deprecatedOrigin']) {
2741
2758
  this._position.setOrigin(this.origin.elementRef);
2742
2759
  if (this.open) {
@@ -2810,7 +2827,8 @@ var CdkConnectedOverlay = /** @class */ (function () {
2810
2827
  var /** @type {?} */ strategy = this._overlay.position()
2811
2828
  .connectedTo(this.origin.elementRef, originPoint, overlayPoint)
2812
2829
  .withOffsetX(this.offsetX)
2813
- .withOffsetY(this.offsetY);
2830
+ .withOffsetY(this.offsetY)
2831
+ .withLockedPosition(this.lockPosition);
2814
2832
  for (var /** @type {?} */ i = 1; i < this.positions.length; i++) {
2815
2833
  strategy.withFallbackPosition({ originX: this.positions[i].originX, originY: this.positions[i].originY }, { overlayX: this.positions[i].overlayX, overlayY: this.positions[i].overlayY });
2816
2834
  }
@@ -2851,8 +2869,8 @@ var CdkConnectedOverlay = /** @class */ (function () {
2851
2869
  this.attach.emit();
2852
2870
  }
2853
2871
  if (this.hasBackdrop) {
2854
- this._backdropSubscription = this._overlayRef.backdropClick().subscribe(function () {
2855
- _this.backdropClick.emit();
2872
+ this._backdropSubscription = this._overlayRef.backdropClick().subscribe(function (event) {
2873
+ _this.backdropClick.emit(event);
2856
2874
  });
2857
2875
  }
2858
2876
  };
@@ -2912,6 +2930,7 @@ var CdkConnectedOverlay = /** @class */ (function () {
2912
2930
  "scrollStrategy": [{ type: Input, args: ['cdkConnectedOverlayScrollStrategy',] },],
2913
2931
  "open": [{ type: Input, args: ['cdkConnectedOverlayOpen',] },],
2914
2932
  "hasBackdrop": [{ type: Input, args: ['cdkConnectedOverlayHasBackdrop',] },],
2933
+ "lockPosition": [{ type: Input, args: ['cdkConnectedOverlayLockPosition',] },],
2915
2934
  "_deprecatedOrigin": [{ type: Input, args: ['origin',] },],
2916
2935
  "_deprecatedPositions": [{ type: Input, args: ['positions',] },],
2917
2936
  "_deprecatedOffsetX": [{ type: Input, args: ['offsetX',] },],