@angular/cdk 7.0.4 → 7.2.1

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 (271) hide show
  1. package/LICENSE +1 -1
  2. package/_a11y.scss +1 -1
  3. package/a11y/typings/focus-monitor/focus-monitor.d.ts +20 -5
  4. package/a11y/typings/focus-trap/focus-trap.d.ts +2 -0
  5. package/a11y/typings/index.metadata.json +1 -1
  6. package/a11y/typings/live-announcer/live-announcer.d.ts +34 -3
  7. package/bundles/cdk-a11y.umd.js +477 -216
  8. package/bundles/cdk-a11y.umd.js.map +1 -1
  9. package/bundles/cdk-a11y.umd.min.js +1 -1
  10. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  11. package/bundles/cdk-accordion.umd.js +16 -9
  12. package/bundles/cdk-accordion.umd.js.map +1 -1
  13. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  14. package/bundles/cdk-bidi.umd.js +11 -6
  15. package/bundles/cdk-bidi.umd.js.map +1 -1
  16. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  17. package/bundles/cdk-coercion.umd.js +25 -9
  18. package/bundles/cdk-coercion.umd.js.map +1 -1
  19. package/bundles/cdk-coercion.umd.min.js +1 -1
  20. package/bundles/cdk-coercion.umd.min.js.map +1 -1
  21. package/bundles/cdk-collections.umd.js +28 -5
  22. package/bundles/cdk-collections.umd.js.map +1 -1
  23. package/bundles/cdk-collections.umd.min.js.map +1 -1
  24. package/bundles/cdk-drag-drop.umd.js +2177 -915
  25. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  26. package/bundles/cdk-drag-drop.umd.min.js +2 -1
  27. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  28. package/bundles/cdk-keycodes.umd.js +33 -1
  29. package/bundles/cdk-keycodes.umd.js.map +1 -1
  30. package/bundles/cdk-keycodes.umd.min.js +1 -1
  31. package/bundles/cdk-keycodes.umd.min.js.map +1 -1
  32. package/bundles/cdk-layout.umd.js +29 -22
  33. package/bundles/cdk-layout.umd.js.map +1 -1
  34. package/bundles/cdk-layout.umd.min.js +1 -1
  35. package/bundles/cdk-layout.umd.min.js.map +1 -1
  36. package/bundles/cdk-observers.umd.js +26 -7
  37. package/bundles/cdk-observers.umd.js.map +1 -1
  38. package/bundles/cdk-observers.umd.min.js +1 -1
  39. package/bundles/cdk-observers.umd.min.js.map +1 -1
  40. package/bundles/cdk-overlay.umd.js +605 -258
  41. package/bundles/cdk-overlay.umd.js.map +1 -1
  42. package/bundles/cdk-overlay.umd.min.js +2 -2
  43. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  44. package/bundles/cdk-platform.umd.js +50 -28
  45. package/bundles/cdk-platform.umd.js.map +1 -1
  46. package/bundles/cdk-platform.umd.min.js.map +1 -1
  47. package/bundles/cdk-portal.umd.js +14 -7
  48. package/bundles/cdk-portal.umd.js.map +1 -1
  49. package/bundles/cdk-portal.umd.min.js.map +1 -1
  50. package/bundles/cdk-scrolling.umd.js +139 -44
  51. package/bundles/cdk-scrolling.umd.js.map +1 -1
  52. package/bundles/cdk-scrolling.umd.min.js +1 -1
  53. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  54. package/bundles/cdk-stepper.umd.js +103 -19
  55. package/bundles/cdk-stepper.umd.js.map +1 -1
  56. package/bundles/cdk-stepper.umd.min.js +1 -1
  57. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  58. package/bundles/cdk-table.umd.js +182 -48
  59. package/bundles/cdk-table.umd.js.map +1 -1
  60. package/bundles/cdk-table.umd.min.js.map +1 -1
  61. package/bundles/cdk-text-field.umd.js +76 -38
  62. package/bundles/cdk-text-field.umd.js.map +1 -1
  63. package/bundles/cdk-text-field.umd.min.js +1 -1
  64. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  65. package/bundles/cdk-tree.umd.js +71 -34
  66. package/bundles/cdk-tree.umd.js.map +1 -1
  67. package/bundles/cdk-tree.umd.min.js +1 -1
  68. package/bundles/cdk-tree.umd.min.js.map +1 -1
  69. package/bundles/cdk.umd.js +5 -4
  70. package/bundles/cdk.umd.js.map +1 -1
  71. package/bundles/cdk.umd.min.js +1 -1
  72. package/bundles/cdk.umd.min.js.map +1 -1
  73. package/coercion/typings/element.d.ts +13 -0
  74. package/coercion/typings/index.metadata.json +1 -1
  75. package/coercion/typings/public-api.d.ts +1 -0
  76. package/drag-drop/typings/{drag-handle.d.ts → directives/drag-handle.d.ts} +3 -0
  77. package/drag-drop/typings/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  78. package/drag-drop/typings/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  79. package/drag-drop/typings/directives/drag.d.ts +109 -0
  80. package/{typings/drag-drop → drag-drop/typings/directives}/drop-list-group.d.ts +3 -0
  81. package/drag-drop/typings/directives/drop-list.d.ts +135 -0
  82. package/drag-drop/typings/drag-drop-registry.d.ts +8 -3
  83. package/drag-drop/typings/drag-events.d.ts +14 -7
  84. package/{typings/esm5/drag-drop/drag.d.ts → drag-drop/typings/drag-ref.d.ts} +152 -82
  85. package/drag-drop/typings/drop-list-container.d.ts +21 -3
  86. package/drag-drop/typings/{drop-list.d.ts → drop-list-ref.d.ts} +132 -81
  87. package/drag-drop/typings/index.d.ts +1 -0
  88. package/drag-drop/typings/index.metadata.json +1 -1
  89. package/drag-drop/typings/public-api.d.ts +13 -6
  90. package/esm2015/a11y.js +337 -190
  91. package/esm2015/a11y.js.map +1 -1
  92. package/esm2015/accordion.js +16 -11
  93. package/esm2015/accordion.js.map +1 -1
  94. package/esm2015/bidi.js +13 -8
  95. package/esm2015/bidi.js.map +1 -1
  96. package/esm2015/cdk.js +7 -6
  97. package/esm2015/cdk.js.map +1 -1
  98. package/esm2015/coercion.js +25 -8
  99. package/esm2015/coercion.js.map +1 -1
  100. package/esm2015/collections.js +22 -7
  101. package/esm2015/collections.js.map +1 -1
  102. package/esm2015/drag-drop.js +1587 -691
  103. package/esm2015/drag-drop.js.map +1 -1
  104. package/esm2015/keycodes.js +31 -4
  105. package/esm2015/keycodes.js.map +1 -1
  106. package/esm2015/layout.js +29 -19
  107. package/esm2015/layout.js.map +1 -1
  108. package/esm2015/observers.js +15 -10
  109. package/esm2015/observers.js.map +1 -1
  110. package/esm2015/overlay.js +393 -232
  111. package/esm2015/overlay.js.map +1 -1
  112. package/esm2015/platform.js +53 -31
  113. package/esm2015/platform.js.map +1 -1
  114. package/esm2015/portal.js +13 -9
  115. package/esm2015/portal.js.map +1 -1
  116. package/esm2015/scrolling.js +102 -45
  117. package/esm2015/scrolling.js.map +1 -1
  118. package/esm2015/stepper.js +93 -24
  119. package/esm2015/stepper.js.map +1 -1
  120. package/esm2015/table.js +89 -45
  121. package/esm2015/table.js.map +1 -1
  122. package/esm2015/text-field.js +54 -37
  123. package/esm2015/text-field.js.map +1 -1
  124. package/esm2015/tree.js +55 -36
  125. package/esm2015/tree.js.map +1 -1
  126. package/esm5/a11y.es5.js +481 -220
  127. package/esm5/a11y.es5.js.map +1 -1
  128. package/esm5/accordion.es5.js +18 -11
  129. package/esm5/accordion.es5.js.map +1 -1
  130. package/esm5/bidi.es5.js +13 -8
  131. package/esm5/bidi.es5.js.map +1 -1
  132. package/esm5/cdk.es5.js +7 -6
  133. package/esm5/cdk.es5.js.map +1 -1
  134. package/esm5/coercion.es5.js +25 -8
  135. package/esm5/coercion.es5.js.map +1 -1
  136. package/esm5/collections.es5.js +35 -7
  137. package/esm5/collections.es5.js.map +1 -1
  138. package/esm5/drag-drop.es5.js +2233 -972
  139. package/esm5/drag-drop.es5.js.map +1 -1
  140. package/esm5/keycodes.es5.js +35 -4
  141. package/esm5/keycodes.es5.js.map +1 -1
  142. package/esm5/layout.es5.js +31 -24
  143. package/esm5/layout.es5.js.map +1 -1
  144. package/esm5/observers.es5.js +29 -10
  145. package/esm5/observers.es5.js.map +1 -1
  146. package/esm5/overlay.es5.js +609 -262
  147. package/esm5/overlay.es5.js.map +1 -1
  148. package/esm5/platform.es5.js +52 -30
  149. package/esm5/platform.es5.js.map +1 -1
  150. package/esm5/portal.es5.js +16 -9
  151. package/esm5/portal.es5.js.map +1 -1
  152. package/esm5/scrolling.es5.js +141 -46
  153. package/esm5/scrolling.es5.js.map +1 -1
  154. package/esm5/stepper.es5.js +106 -24
  155. package/esm5/stepper.es5.js.map +1 -1
  156. package/esm5/table.es5.js +184 -50
  157. package/esm5/table.es5.js.map +1 -1
  158. package/esm5/text-field.es5.js +75 -37
  159. package/esm5/text-field.es5.js.map +1 -1
  160. package/esm5/tree.es5.js +74 -37
  161. package/esm5/tree.es5.js.map +1 -1
  162. package/keycodes/typings/index.metadata.json +1 -1
  163. package/keycodes/typings/modifiers.d.ts +14 -0
  164. package/keycodes/typings/public-api.d.ts +1 -0
  165. package/overlay/typings/index.metadata.json +1 -1
  166. package/overlay/typings/overlay-directives.d.ts +0 -2
  167. package/package.json +4 -4
  168. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  169. package/schematics/ng-update/upgrade-data.js +2 -1
  170. package/schematics/ng-update/upgrade-data.js.map +1 -1
  171. package/schematics/ng-update/upgrade-rules/index.js +3 -2
  172. package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
  173. package/schematics/utils/ast/ng-module-imports.d.ts +1 -1
  174. package/schematics/utils/ast/ng-module-imports.js +25 -13
  175. package/schematics/utils/ast/ng-module-imports.js.map +1 -1
  176. package/schematics/utils/get-project.js +2 -1
  177. package/schematics/utils/get-project.js.map +1 -1
  178. package/schematics/utils/parse5-element.js +3 -2
  179. package/schematics/utils/parse5-element.js.map +1 -1
  180. package/schematics/utils/project-targets.js +2 -1
  181. package/schematics/utils/project-targets.js.map +1 -1
  182. package/schematics/utils/version-agnostic-typescript.js +3 -2
  183. package/schematics/utils/version-agnostic-typescript.js.map +1 -1
  184. package/scrolling/typings/index.metadata.json +1 -1
  185. package/stepper/typings/index.metadata.json +1 -1
  186. package/stepper/typings/public-api.d.ts +1 -0
  187. package/stepper/typings/step-header.d.ts +15 -0
  188. package/stepper/typings/stepper.d.ts +11 -1
  189. package/text-field/typings/autosize.d.ts +6 -0
  190. package/text-field/typings/index.metadata.json +1 -1
  191. package/tree/typings/control/base-tree-control.d.ts +1 -1
  192. package/tree/typings/control/nested-tree-control.d.ts +2 -2
  193. package/tree/typings/control/tree-control.d.ts +1 -1
  194. package/tree/typings/nested-node.d.ts +5 -5
  195. package/typings/a11y/focus-monitor/focus-monitor.d.ts +20 -5
  196. package/typings/a11y/focus-trap/focus-trap.d.ts +2 -0
  197. package/typings/a11y/index.metadata.json +1 -1
  198. package/typings/a11y/live-announcer/live-announcer.d.ts +34 -3
  199. package/typings/coercion/element.d.ts +13 -0
  200. package/typings/coercion/index.metadata.json +1 -1
  201. package/typings/coercion/public-api.d.ts +1 -0
  202. package/typings/{esm5/drag-drop → drag-drop/directives}/drag-handle.d.ts +3 -0
  203. package/typings/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  204. package/typings/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  205. package/typings/drag-drop/directives/drag.d.ts +109 -0
  206. package/typings/{esm5/drag-drop → drag-drop/directives}/drop-list-group.d.ts +3 -0
  207. package/typings/drag-drop/directives/drop-list.d.ts +135 -0
  208. package/typings/drag-drop/drag-drop-registry.d.ts +8 -3
  209. package/typings/drag-drop/drag-events.d.ts +14 -7
  210. package/typings/drag-drop/{drag.d.ts → drag-ref.d.ts} +152 -82
  211. package/typings/drag-drop/drop-list-container.d.ts +21 -3
  212. package/typings/{esm5/drag-drop/drop-list.d.ts → drag-drop/drop-list-ref.d.ts} +132 -81
  213. package/typings/drag-drop/index.d.ts +1 -0
  214. package/typings/drag-drop/index.metadata.json +1 -1
  215. package/typings/drag-drop/public-api.d.ts +13 -6
  216. package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +20 -5
  217. package/typings/esm5/a11y/focus-trap/focus-trap.d.ts +2 -0
  218. package/typings/esm5/a11y/index.metadata.json +1 -1
  219. package/typings/esm5/a11y/live-announcer/live-announcer.d.ts +34 -3
  220. package/typings/esm5/coercion/element.d.ts +13 -0
  221. package/typings/esm5/coercion/index.metadata.json +1 -1
  222. package/typings/esm5/coercion/public-api.d.ts +1 -0
  223. package/typings/{drag-drop → esm5/drag-drop/directives}/drag-handle.d.ts +3 -0
  224. package/typings/esm5/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  225. package/typings/esm5/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  226. package/typings/esm5/drag-drop/directives/drag.d.ts +109 -0
  227. package/{drag-drop/typings → typings/esm5/drag-drop/directives}/drop-list-group.d.ts +3 -0
  228. package/typings/esm5/drag-drop/directives/drop-list.d.ts +135 -0
  229. package/typings/esm5/drag-drop/drag-drop-registry.d.ts +8 -3
  230. package/typings/esm5/drag-drop/drag-events.d.ts +14 -7
  231. package/{drag-drop/typings/drag.d.ts → typings/esm5/drag-drop/drag-ref.d.ts} +152 -82
  232. package/typings/esm5/drag-drop/drop-list-container.d.ts +21 -3
  233. package/typings/{drag-drop/drop-list.d.ts → esm5/drag-drop/drop-list-ref.d.ts} +132 -81
  234. package/typings/esm5/drag-drop/index.d.ts +1 -0
  235. package/typings/esm5/drag-drop/index.metadata.json +1 -1
  236. package/typings/esm5/drag-drop/public-api.d.ts +13 -6
  237. package/typings/esm5/index.metadata.json +1 -1
  238. package/typings/esm5/keycodes/index.metadata.json +1 -1
  239. package/typings/esm5/keycodes/modifiers.d.ts +14 -0
  240. package/typings/esm5/keycodes/public-api.d.ts +1 -0
  241. package/typings/esm5/overlay/index.metadata.json +1 -1
  242. package/typings/esm5/overlay/overlay-directives.d.ts +0 -2
  243. package/typings/esm5/scrolling/index.metadata.json +1 -1
  244. package/typings/esm5/stepper/index.metadata.json +1 -1
  245. package/typings/esm5/stepper/public-api.d.ts +1 -0
  246. package/typings/esm5/stepper/step-header.d.ts +15 -0
  247. package/typings/esm5/stepper/stepper.d.ts +11 -1
  248. package/typings/esm5/text-field/autosize.d.ts +6 -0
  249. package/typings/esm5/text-field/index.metadata.json +1 -1
  250. package/typings/esm5/tree/control/base-tree-control.d.ts +1 -1
  251. package/typings/esm5/tree/control/nested-tree-control.d.ts +2 -2
  252. package/typings/esm5/tree/control/tree-control.d.ts +1 -1
  253. package/typings/esm5/tree/nested-node.d.ts +5 -5
  254. package/typings/index.metadata.json +1 -1
  255. package/typings/keycodes/index.metadata.json +1 -1
  256. package/typings/keycodes/modifiers.d.ts +14 -0
  257. package/typings/keycodes/public-api.d.ts +1 -0
  258. package/typings/overlay/index.metadata.json +1 -1
  259. package/typings/overlay/overlay-directives.d.ts +0 -2
  260. package/typings/schematics/utils/ast/ng-module-imports.d.ts +1 -1
  261. package/typings/scrolling/index.metadata.json +1 -1
  262. package/typings/stepper/index.metadata.json +1 -1
  263. package/typings/stepper/public-api.d.ts +1 -0
  264. package/typings/stepper/step-header.d.ts +15 -0
  265. package/typings/stepper/stepper.d.ts +11 -1
  266. package/typings/text-field/autosize.d.ts +6 -0
  267. package/typings/text-field/index.metadata.json +1 -1
  268. package/typings/tree/control/base-tree-control.d.ts +1 -1
  269. package/typings/tree/control/nested-tree-control.d.ts +2 -2
  270. package/typings/tree/control/tree-control.d.ts +1 -1
  271. package/typings/tree/nested-node.d.ts +5 -5
@@ -12,11 +12,12 @@ import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
12
12
 
13
13
  /**
14
14
  * @fileoverview added by tsickle
15
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
15
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
16
16
  */
17
- /** *
17
+ /**
18
18
  * Used to generate unique ID for each accordion.
19
- @type {?} */
19
+ * @type {?}
20
+ */
20
21
  let nextId = 0;
21
22
  /**
22
23
  * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.
@@ -75,6 +76,7 @@ class CdkAccordion {
75
76
  this._stateChanges.complete();
76
77
  }
77
78
  /**
79
+ * @private
78
80
  * @param {?} expanded
79
81
  * @return {?}
80
82
  */
@@ -96,11 +98,12 @@ CdkAccordion.propDecorators = {
96
98
 
97
99
  /**
98
100
  * @fileoverview added by tsickle
99
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
101
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
100
102
  */
101
- /** *
103
+ /**
102
104
  * Used to generate unique ID for each accordion item.
103
- @type {?} */
105
+ * @type {?}
106
+ */
104
107
  let nextId$1 = 0;
105
108
  const ɵ0 = undefined;
106
109
  /**
@@ -178,10 +181,11 @@ class CdkAccordionItem {
178
181
  this.expandedChange.emit(expanded);
179
182
  if (expanded) {
180
183
  this.opened.emit();
181
- /** *
184
+ /**
182
185
  * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,
183
186
  * the name value is the id of the accordion.
184
- @type {?} */
187
+ * @type {?}
188
+ */
185
189
  const accordionId = this.accordion ? this.accordion.id : this.id;
186
190
  this._expansionDispatcher.notify(this.id, accordionId);
187
191
  }
@@ -243,6 +247,7 @@ class CdkAccordionItem {
243
247
  }
244
248
  }
245
249
  /**
250
+ * @private
246
251
  * @return {?}
247
252
  */
248
253
  _subscribeToOpenCloseAllActions() {
@@ -282,7 +287,7 @@ CdkAccordionItem.propDecorators = {
282
287
 
283
288
  /**
284
289
  * @fileoverview added by tsickle
285
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
290
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
286
291
  */
287
292
  class CdkAccordionModule {
288
293
  }
@@ -295,12 +300,12 @@ CdkAccordionModule.decorators = [
295
300
 
296
301
  /**
297
302
  * @fileoverview added by tsickle
298
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
303
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
299
304
  */
300
305
 
301
306
  /**
302
307
  * @fileoverview added by tsickle
303
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
308
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
304
309
  */
305
310
 
306
311
  export { CdkAccordionItem, CdkAccordion, CdkAccordionModule };
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sources":["../../../src/cdk/accordion/accordion-module.ts","../../../src/cdk/accordion/accordion-item.ts","../../../src/cdk/accordion/accordion.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 {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n\n@NgModule({\n exports: [CdkAccordion, CdkAccordionItem],\n declarations: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\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 Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Optional,\n ChangeDetectorRef,\n SkipSelf,\n} from '@angular/core';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {CdkAccordion} from './accordion';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Subscription} from 'rxjs';\n\n/** Used to generate unique ID for each accordion item. */\nlet nextId = 0;\n\n/**\n * An basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide CdkAccordion as undefined to prevent nested accordion items from registering\n // to the same accordion.\n {provide: CdkAccordion, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnDestroy {\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = `cdk-accordion-child-${nextId++}`;\n\n /** Whether the AccordionItem is expanded. */\n @Input()\n get expanded(): any { return this._expanded; }\n set expanded(expanded: any) {\n expanded = coerceBooleanProperty(expanded);\n\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(disabled: any) { this._disabled = coerceBooleanProperty(disabled); }\n private _disabled: boolean = false;\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n constructor(@Optional() @SkipSelf() public accordion: CdkAccordion,\n private _changeDetectorRef: ChangeDetectorRef,\n protected _expansionDispatcher: UniqueSelectionDispatcher) {\n this._removeUniqueSelectionListener =\n _expansionDispatcher.listen((id: string, accordionId: string) => {\n if (this.accordion && !this.accordion.multi &&\n this.accordion.id === accordionId && this.id !== id) {\n this.expanded = false;\n }\n });\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\n });\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/** Used to generate unique ID for each accordion. */\nlet nextId = 0;\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id = `cdk-accordion-${nextId++}`;\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input()\n get multi(): boolean { return this._multi; }\n set multi(multi: boolean) { this._multi = coerceBooleanProperty(multi); }\n private _multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n this._openCloseAll(true);\n }\n\n /** Closes all enabled accordion items in an accordion where multi is enabled. */\n closeAll(): void {\n this._openCloseAll(false);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n private _openCloseAll(expanded: boolean): void {\n if (this.multi) {\n this._openCloseAllActions.next(expanded);\n }\n }\n}\n"],"names":["nextId"],"mappings":";;;;;;;;;;;;;;;;;;;AEaA,IAAI,MAAM,GAAG,CAAC,CAAC;;;;AASf,AAAA,MAAa,YAAY,CAAzB;;;;;QAEE,IAAF,CAAA,aAAA,GAA2B,IAAI,OAAO,EAAiB,CAAC;;;;QAGtD,IAAF,CAAA,oBAAA,GAAoD,IAAI,OAAO,EAAW,CAAC;;;;QAGzE,IAAF,CAAA,EAAA,GAAgB,CAAhB,cAAA,EAAiC,MAAM,EAAE,CAAzC,CAA2C,CAAC;QAM5C,IAAA,CAAA,MAAA,GAA4B,KAAK,CAAjC;;;;;;IAHE,IACI,KAAK,GADX,EACyB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE;;;;;IAC5C,IAAI,KAAK,CAAC,KAAc,EAA1B,EAA8B,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE;;;;;IAIzE,OAAO,GAAT;QACI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;KAC1B;;;;;IAGD,QAAQ,GAAV;QACI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAC3B;;;;;IAED,WAAW,CAAC,OAAsB,EAApC;QACI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAClC;;;;IAED,WAAW,GAAb;QACI,IAAI,CAAC,aAAa,CAAC,QAAQ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AApC,EAA+C,EAAC;iBAC7C;aACF,EAAD,EAAA;;;;IAnBA,EAAA,IAAA,EAAQ,YAAY,EAApB,UAAA,EAAA,CAAA,EAAA,IAAA,EA+Ee,QAAQ,EA/EvB,EAAA,EAAA,IAAA,EA+E2B,QAAQ,EA/EnC,CAAA,EAAA;IAJA,EAAA,IAAA,EAAE,iBAAiB,EAAnB;IAGA,EAAA,IAAA,EAAQ,yBAAyB,EAAjC;;;IAyBA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAG,MAAM,EAAT,CAAA;IAEA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAG,MAAM,EAAT,CAAA;IAEA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAG,MAAM,EAAT,CAAA;IAOA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAG,MAAM,EAAT,CAAA;IAMA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;IA8BA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;;;;;;;ADzEA,MAAa,kBAAkB,CAA/B;;;IAJA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;gBACzC,YAAY,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;aAC/C,EAAD,EAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"accordion.js","sources":["../../../src/cdk/accordion/accordion-module.ts","../../../src/cdk/accordion/accordion-item.ts","../../../src/cdk/accordion/accordion.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 {CdkAccordion} from './accordion';\nimport {CdkAccordionItem} from './accordion-item';\n\n\n@NgModule({\n exports: [CdkAccordion, CdkAccordionItem],\n declarations: [CdkAccordion, CdkAccordionItem],\n})\nexport class CdkAccordionModule {}\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 Output,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n Optional,\n ChangeDetectorRef,\n SkipSelf,\n} from '@angular/core';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {CdkAccordion} from './accordion';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Subscription} from 'rxjs';\n\n/** Used to generate unique ID for each accordion item. */\nlet nextId = 0;\n\n/**\n * An basic directive expected to be extended and decorated as a component. Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\n@Directive({\n selector: 'cdk-accordion-item, [cdkAccordionItem]',\n exportAs: 'cdkAccordionItem',\n providers: [\n // Provide CdkAccordion as undefined to prevent nested accordion items from registering\n // to the same accordion.\n {provide: CdkAccordion, useValue: undefined},\n ],\n})\nexport class CdkAccordionItem implements OnDestroy {\n /** Subscription to openAll/closeAll events. */\n private _openCloseAllSubscription = Subscription.EMPTY;\n /** Event emitted every time the AccordionItem is closed. */\n @Output() closed: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted every time the AccordionItem is opened. */\n @Output() opened: EventEmitter<void> = new EventEmitter<void>();\n /** Event emitted when the AccordionItem is destroyed. */\n @Output() destroyed: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * Emits whenever the expanded state of the accordion changes.\n * Primarily used to facilitate two-way binding.\n * @docs-private\n */\n @Output() expandedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The unique AccordionItem id. */\n readonly id: string = `cdk-accordion-child-${nextId++}`;\n\n /** Whether the AccordionItem is expanded. */\n @Input()\n get expanded(): any { return this._expanded; }\n set expanded(expanded: any) {\n expanded = coerceBooleanProperty(expanded);\n\n // Only emit events and update the internal value if the value changes.\n if (this._expanded !== expanded) {\n this._expanded = expanded;\n this.expandedChange.emit(expanded);\n\n if (expanded) {\n this.opened.emit();\n /**\n * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n * the name value is the id of the accordion.\n */\n const accordionId = this.accordion ? this.accordion.id : this.id;\n this._expansionDispatcher.notify(this.id, accordionId);\n } else {\n this.closed.emit();\n }\n\n // Ensures that the animation will run when the value is set outside of an `@Input`.\n // This includes cases like the open, close and toggle methods.\n this._changeDetectorRef.markForCheck();\n }\n }\n private _expanded = false;\n\n /** Whether the AccordionItem is disabled. */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(disabled: any) { this._disabled = coerceBooleanProperty(disabled); }\n private _disabled: boolean = false;\n\n /** Unregister function for _expansionDispatcher. */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n constructor(@Optional() @SkipSelf() public accordion: CdkAccordion,\n private _changeDetectorRef: ChangeDetectorRef,\n protected _expansionDispatcher: UniqueSelectionDispatcher) {\n this._removeUniqueSelectionListener =\n _expansionDispatcher.listen((id: string, accordionId: string) => {\n if (this.accordion && !this.accordion.multi &&\n this.accordion.id === accordionId && this.id !== id) {\n this.expanded = false;\n }\n });\n\n // When an accordion item is hosted in an accordion, subscribe to open/close events.\n if (this.accordion) {\n this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n }\n }\n\n /** Emits an event for the accordion item being destroyed. */\n ngOnDestroy() {\n this.opened.complete();\n this.closed.complete();\n this.destroyed.emit();\n this.destroyed.complete();\n this._removeUniqueSelectionListener();\n this._openCloseAllSubscription.unsubscribe();\n }\n\n /** Toggles the expanded state of the accordion item. */\n toggle(): void {\n if (!this.disabled) {\n this.expanded = !this.expanded;\n }\n }\n\n /** Sets the expanded state of the accordion item to false. */\n close(): void {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n /** Sets the expanded state of the accordion item to true. */\n open(): void {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n private _subscribeToOpenCloseAllActions(): Subscription {\n return this.accordion._openCloseAllActions.subscribe(expanded => {\n // Only change expanded state if item is enabled\n if (!this.disabled) {\n this.expanded = expanded;\n }\n });\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 {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/** Used to generate unique ID for each accordion. */\nlet nextId = 0;\n\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\n@Directive({\n selector: 'cdk-accordion, [cdkAccordion]',\n exportAs: 'cdkAccordion',\n})\nexport class CdkAccordion implements OnDestroy, OnChanges {\n /** Emits when the state of the accordion changes */\n readonly _stateChanges = new Subject<SimpleChanges>();\n\n /** Stream that emits true/false when openAll/closeAll is triggered. */\n readonly _openCloseAllActions: Subject<boolean> = new Subject<boolean>();\n\n /** A readonly id value to use for unique selection coordination. */\n readonly id = `cdk-accordion-${nextId++}`;\n\n /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n @Input()\n get multi(): boolean { return this._multi; }\n set multi(multi: boolean) { this._multi = coerceBooleanProperty(multi); }\n private _multi: boolean = false;\n\n /** Opens all enabled accordion items in an accordion where multi is enabled. */\n openAll(): void {\n this._openCloseAll(true);\n }\n\n /** Closes all enabled accordion items in an accordion where multi is enabled. */\n closeAll(): void {\n this._openCloseAll(false);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this._stateChanges.next(changes);\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n private _openCloseAll(expanded: boolean): void {\n if (this.multi) {\n this._openCloseAllActions.next(expanded);\n }\n }\n}\n"],"names":["nextId"],"mappings":";;;;;;;;;;;;;;;;;;;;AEaA,IAAI,MAAM,GAAG,CAAC,CAAd;;;;AASA,AAAA,MAAa,YAAY,CAAzB;IAJA,WAAA,GAAA;;;;QAMW,IAAX,CAAA,aAAwB,GAAG,IAAI,OAAO,EAA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MAAM,EAAT,CAAA;IAMA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;IA8BA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;;;;;;;ADzEA,MAAa,kBAAkB,CAA/B;;;IAJA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;gBACzC,YAAY,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;aAC/C,EAAD,EAAA;;;;;;;;;;;;;;;"}
package/esm2015/bidi.js CHANGED
@@ -10,9 +10,9 @@ import { inject, InjectionToken, EventEmitter, Inject, Injectable, Optional, Dir
10
10
 
11
11
  /**
12
12
  * @fileoverview added by tsickle
13
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
13
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
14
14
  */
15
- /** *
15
+ /**
16
16
  * Injection token used to inject the document into Directionality.
17
17
  * This is used so that the value can be faked in tests.
18
18
  *
@@ -26,7 +26,8 @@ import { inject, InjectionToken, EventEmitter, Inject, Injectable, Optional, Dir
26
26
  * https://github.com/angular/angular/issues/22559
27
27
  *
28
28
  * \@docs-private
29
- @type {?} */
29
+ * @type {?}
30
+ */
30
31
  const DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', {
31
32
  providedIn: 'root',
32
33
  factory: DIR_DOCUMENT_FACTORY,
@@ -41,7 +42,7 @@ function DIR_DOCUMENT_FACTORY() {
41
42
 
42
43
  /**
43
44
  * @fileoverview added by tsickle
44
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
45
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
45
46
  */
46
47
  /**
47
48
  * The directionality (LTR / RTL) context for the application (or a subtree of it).
@@ -61,6 +62,10 @@ class Directionality {
61
62
  */
62
63
  this.change = new EventEmitter();
63
64
  if (_document) {
65
+ // TODO: handle 'auto' value -
66
+ // We still need to account for dir="auto".
67
+ // It looks like HTMLElemenet.dir is also "auto" when that's set to the attribute,
68
+ // but getComputedStyle return either "ltr" or "rtl". avoiding getComputedStyle for now
64
69
  /** @type {?} */
65
70
  const bodyDir = _document.body ? _document.body.dir : null;
66
71
  /** @type {?} */
@@ -88,7 +93,7 @@ Directionality.ctorParameters = () => [
88
93
 
89
94
  /**
90
95
  * @fileoverview added by tsickle
91
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
96
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
92
97
  */
93
98
  /**
94
99
  * Directive to listen for changes of direction of part of the DOM.
@@ -163,7 +168,7 @@ Dir.propDecorators = {
163
168
 
164
169
  /**
165
170
  * @fileoverview added by tsickle
166
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
171
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
167
172
  */
168
173
  class BidiModule {
169
174
  }
@@ -176,12 +181,12 @@ BidiModule.decorators = [
176
181
 
177
182
  /**
178
183
  * @fileoverview added by tsickle
179
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
184
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
180
185
  */
181
186
 
182
187
  /**
183
188
  * @fileoverview added by tsickle
184
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
189
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
185
190
  */
186
191
 
187
192
  export { Directionality, DIR_DOCUMENT, Dir, BidiModule, DIR_DOCUMENT_FACTORY as ɵa };
@@ -1 +1 @@
1
- {"version":3,"file":"bidi.js","sources":["../../../src/cdk/bidi/bidi-module.ts","../../../src/cdk/bidi/dir.ts","../../../src/cdk/bidi/directionality.ts","../../../src/cdk/bidi/dir-document-token.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 {Dir} from './dir';\n\n\n@NgModule({\n exports: [Dir],\n declarations: [Dir],\n})\nexport class BidiModule { }\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 Directive,\n Output,\n Input,\n EventEmitter,\n AfterContentInit,\n OnDestroy,\n} from '@angular/core';\n\nimport {Direction, Directionality} from './directionality';\n\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\n@Directive({\n selector: '[dir]',\n providers: [{provide: Directionality, useExisting: Dir}],\n host: {'[attr.dir]': '_rawDir'},\n exportAs: 'dir',\n})\nexport class Dir implements Directionality, AfterContentInit, OnDestroy {\n /** Normalized direction that accounts for invalid/unsupported values. */\n private _dir: Direction = 'ltr';\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Direction as passed in by the consumer. */\n _rawDir: string;\n\n /** Event emitted when the direction changes. */\n @Output('dirChange') change = new EventEmitter<Direction>();\n\n /** @docs-private */\n @Input()\n get dir(): Direction { return this._dir; }\n set dir(value: Direction) {\n const old = this._dir;\n\n this._rawDir = value;\n this._dir = (value === 'ltr' || value === 'rtl') ? value : 'ltr';\n\n if (old !== this._dir && this._isInitialized) {\n this.change.emit(this._dir);\n }\n }\n\n /** Current layout direction of the element. */\n get value(): Direction { return this.dir; }\n\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n this.change.complete();\n }\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 {EventEmitter, Inject, Injectable, Optional, OnDestroy} from '@angular/core';\nimport {DIR_DOCUMENT} from './dir-document-token';\n\n\nexport type Direction = 'ltr' | 'rtl';\n\n\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\n@Injectable({providedIn: 'root'})\nexport class Directionality implements OnDestroy {\n /** The current 'ltr' or 'rtl' value. */\n readonly value: Direction = 'ltr';\n\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n readonly change = new EventEmitter<Direction>();\n\n constructor(@Optional() @Inject(DIR_DOCUMENT) _document?: any) {\n if (_document) {\n // TODO: handle 'auto' value -\n // We still need to account for dir=\"auto\".\n // It looks like HTMLElemenet.dir is also \"auto\" when that's set to the attribute,\n // but getComputedStyle return either \"ltr\" or \"rtl\". avoiding getComputedStyle for now\n const bodyDir = _document.body ? _document.body.dir : null;\n const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n const value = bodyDir || htmlDir;\n this.value = (value === 'ltr' || value === 'rtl') ? value : 'ltr';\n }\n }\n\n ngOnDestroy() {\n this.change.complete();\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 {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\n\n/**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-brower because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nexport const DIR_DOCUMENT = new InjectionToken<Document>('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n});\n\n/** @docs-private */\nexport function DIR_DOCUMENT_FACTORY(): Document {\n return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AAA,CAAA;IAGA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;;;;;;;AD7BA,MAAa,UAAU,CAAvB;;;IAJA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,GAAG,CAAC;gBACd,YAAY,EAAE,CAAC,GAAG,CAAC;aACpB,EAAD,EAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"bidi.js","sources":["../../../src/cdk/bidi/bidi-module.ts","../../../src/cdk/bidi/dir.ts","../../../src/cdk/bidi/directionality.ts","../../../src/cdk/bidi/dir-document-token.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 {Dir} from './dir';\n\n\n@NgModule({\n exports: [Dir],\n declarations: [Dir],\n})\nexport class BidiModule { }\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 Directive,\n Output,\n Input,\n EventEmitter,\n AfterContentInit,\n OnDestroy,\n} from '@angular/core';\n\nimport {Direction, Directionality} from './directionality';\n\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\n@Directive({\n selector: '[dir]',\n providers: [{provide: Directionality, useExisting: Dir}],\n host: {'[attr.dir]': '_rawDir'},\n exportAs: 'dir',\n})\nexport class Dir implements Directionality, AfterContentInit, OnDestroy {\n /** Normalized direction that accounts for invalid/unsupported values. */\n private _dir: Direction = 'ltr';\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Direction as passed in by the consumer. */\n _rawDir: string;\n\n /** Event emitted when the direction changes. */\n @Output('dirChange') change = new EventEmitter<Direction>();\n\n /** @docs-private */\n @Input()\n get dir(): Direction { return this._dir; }\n set dir(value: Direction) {\n const old = this._dir;\n\n this._rawDir = value;\n this._dir = (value === 'ltr' || value === 'rtl') ? value : 'ltr';\n\n if (old !== this._dir && this._isInitialized) {\n this.change.emit(this._dir);\n }\n }\n\n /** Current layout direction of the element. */\n get value(): Direction { return this.dir; }\n\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n this.change.complete();\n }\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 {EventEmitter, Inject, Injectable, Optional, OnDestroy} from '@angular/core';\nimport {DIR_DOCUMENT} from './dir-document-token';\n\n\nexport type Direction = 'ltr' | 'rtl';\n\n\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\n@Injectable({providedIn: 'root'})\nexport class Directionality implements OnDestroy {\n /** The current 'ltr' or 'rtl' value. */\n readonly value: Direction = 'ltr';\n\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n readonly change = new EventEmitter<Direction>();\n\n constructor(@Optional() @Inject(DIR_DOCUMENT) _document?: any) {\n if (_document) {\n // TODO: handle 'auto' value -\n // We still need to account for dir=\"auto\".\n // It looks like HTMLElemenet.dir is also \"auto\" when that's set to the attribute,\n // but getComputedStyle return either \"ltr\" or \"rtl\". avoiding getComputedStyle for now\n const bodyDir = _document.body ? _document.body.dir : null;\n const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n const value = bodyDir || htmlDir;\n this.value = (value === 'ltr' || value === 'rtl') ? value : 'ltr';\n }\n }\n\n ngOnDestroy() {\n this.change.complete();\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 {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\n\n/**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-brower because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nexport const DIR_DOCUMENT = new InjectionToken<Document>('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n});\n\n/** @docs-private */\nexport function DIR_DOCUMENT_FACTORY(): Document {\n return inject(DOCUMENT);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AG2BA,AAAA,MAAa,YAAY,GAAG,IAAI,cAAc,CAAW,aAAa,EAAE;IACtE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAF;;;;;AAGA,AAAA,SAAgB,oBAAoB,GAApC;IACE,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;CACzB;;;;;;;;;;ADfD,AAAA,MAAa,cAAc,CAA3B;;;;IAOE,WAAF,CAAgD,SAAe,EAA/D;;;;QALW,IAAX,CAAA,KAAgB,GAAc,KAAK,CAAC;;;;QAGzB,IAAX,CAAA,MAAiB,GAAG,IAAI,YAAY,EAAa,CAAC;QAG9C,IAAI,SAAS,EAAE;;;;;;YAKnB,MAAY,OAAO,GAAG,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAhE;;YACA,MAAY,OAAO,GAAG,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,GAAG,IAAI,CAAtF;;YACA,MAAY,KAAK,GAAG,OAAO,IAAI,OAAO,CAAtC;YACM,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,KA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,CAAC;KAC5B;;;;IAED,WAAW,GAAb;QACI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;KACxB;;;IA3CH,EAAA,IAAA,EAAC,SAAS,EAAV,IAAA,EAAA,CAAW;gBACT,QAAQ,EAAE,OAAO;gBACjB,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,GAAG,EAAC,CAAC;gBACxD,IAAI,EAAE,EAAC,YAAY,EAAE,SAAS,EAAC;gBAC/B,QAAQ,EAAE,KAAK;aAChB,EAAD,EAAA;;;IAYA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAG,MAAM,EAAT,IAAA,EAAA,CAAU,WAAW,EAArB,EAAA,CAAA;IAGA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;;;;;;;AD7BA,MAAa,UAAU,CAAvB;;;IAJA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,GAAG,CAAC;gBACd,YAAY,EAAE,CAAC,GAAG,CAAC;aACpB,EAAD,EAAA;;;;;;;;;;;;;;;"}
package/esm2015/cdk.js CHANGED
@@ -9,21 +9,22 @@ import { Version } from '@angular/core';
9
9
 
10
10
  /**
11
11
  * @fileoverview added by tsickle
12
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
12
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
13
13
  */
14
- /** *
14
+ /**
15
15
  * Current version of the Angular Component Development Kit.
16
- @type {?} */
17
- const VERSION = new Version('7.0.4');
16
+ * @type {?}
17
+ */
18
+ const VERSION = new Version('7.2.1');
18
19
 
19
20
  /**
20
21
  * @fileoverview added by tsickle
21
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
22
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22
23
  */
23
24
 
24
25
  /**
25
26
  * @fileoverview added by tsickle
26
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
27
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
27
28
  */
28
29
 
29
30
  export { VERSION };
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.js","sources":["../../src/cdk/version.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 {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('7.0.4');\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAWA,AAAA,MAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk.js","sources":["../../src/cdk/version.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 {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('7.2.1');\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAWA,AAAA,MAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;"}
@@ -5,9 +5,11 @@
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
+ import { ElementRef } from '@angular/core';
9
+
8
10
  /**
9
11
  * @fileoverview added by tsickle
10
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
12
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
11
13
  */
12
14
 
13
15
  /**
@@ -21,7 +23,7 @@ function coerceBooleanProperty(value) {
21
23
 
22
24
  /**
23
25
  * @fileoverview added by tsickle
24
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
26
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
25
27
  */
26
28
 
27
29
  /**
@@ -42,12 +44,12 @@ function _isNumberValue(value) {
42
44
  // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,
43
45
  // and other non-number values as NaN, where Number just uses 0) but it considers the string
44
46
  // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.
45
- return !isNaN(parseFloat(/** @type {?} */ (value))) && !isNaN(Number(value));
47
+ return !isNaN(parseFloat((/** @type {?} */ (value)))) && !isNaN(Number(value));
46
48
  }
47
49
 
48
50
  /**
49
51
  * @fileoverview added by tsickle
50
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
52
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
51
53
  */
52
54
 
53
55
  /**
@@ -62,7 +64,7 @@ function coerceArray(value) {
62
64
 
63
65
  /**
64
66
  * @fileoverview added by tsickle
65
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
67
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
66
68
  */
67
69
 
68
70
  /**
@@ -79,13 +81,28 @@ function coerceCssPixelValue(value) {
79
81
 
80
82
  /**
81
83
  * @fileoverview added by tsickle
82
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
84
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
85
+ */
86
+ /**
87
+ * Coerces an ElementRef or an Element into an element.
88
+ * Useful for APIs that can accept either a ref or the native element itself.
89
+ * @template T
90
+ * @param {?} elementOrRef
91
+ * @return {?}
92
+ */
93
+ function coerceElement(elementOrRef) {
94
+ return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;
95
+ }
96
+
97
+ /**
98
+ * @fileoverview added by tsickle
99
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
83
100
  */
84
101
 
85
102
  /**
86
103
  * @fileoverview added by tsickle
87
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
104
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
88
105
  */
89
106
 
90
- export { coerceBooleanProperty, coerceNumberProperty, _isNumberValue, coerceArray, coerceCssPixelValue };
107
+ export { coerceBooleanProperty, coerceNumberProperty, _isNumberValue, coerceArray, coerceCssPixelValue, coerceElement };
91
108
  //# sourceMappingURL=coercion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coercion.js","sources":["../../../src/cdk/coercion/css-pixel-value.ts","../../../src/cdk/coercion/array.ts","../../../src/cdk/coercion/number-property.ts","../../../src/cdk/coercion/boolean-property.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/** Coerces a value to a CSS pixel value. */\nexport function coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\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\n/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\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\n/** Coerces a data-bound value (typically a string) to a number. */\nexport function coerceNumberProperty(value: any): number;\nexport function coerceNumberProperty<D>(value: any, fallback: D): number | D;\nexport function coerceNumberProperty(value: any, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nexport function _isNumberValue(value: any): boolean {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\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\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AGSA,AAAA,SAAgB,qBAAqB,CAAC,KAAU,EAAhD;IACE,OAAO,KAAK,IAAI,IAAI,IAAI,CAA1B,EAA6B,KAAK,CAAlC,CAAoC,KAAK,OAAO,CAAC;CAChD;;;;;;;;;;;;ADAD,AAAA,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAa,GAAG,CAAC,EAAlE;IACE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;;;AAMD,AAAA,SAAgB,cAAc,CAAC,KAAU,EAAzC;;;;IAIE,OAAO,CAAC,KAAK,CAAC,UAAU,mBAAC,KAAY,EAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;CAClE;;;;;;;;;;;;;ADfD,AAAA,SAAgB,WAAW,CAAI,KAAc,EAA7C;IACE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;;;;;;;;;;;ADFD,AAAA,SAAgB,mBAAmB,CAAC,KAAU,EAA9C;IACE,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,CAA7C,EAAgD,KAAK,CAArD,EAAA,CAAyD,CAAC;CACzD;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"coercion.js","sources":["../../../src/cdk/coercion/element.ts","../../../src/cdk/coercion/css-pixel-value.ts","../../../src/cdk/coercion/array.ts","../../../src/cdk/coercion/number-property.ts","../../../src/cdk/coercion/boolean-property.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} from '@angular/core';\n\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nexport function coerceElement<T>(elementOrRef: ElementRef<T> | T): T {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\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\n/** Coerces a value to a CSS pixel value. */\nexport function coerceCssPixelValue(value: any): string {\n if (value == null) {\n return '';\n }\n\n return typeof value === 'string' ? value : `${value}px`;\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\n/** Wraps the provided value in an array, unless the provided value is an array. */\nexport function coerceArray<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value];\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\n/** Coerces a data-bound value (typically a string) to a number. */\nexport function coerceNumberProperty(value: any): number;\nexport function coerceNumberProperty<D>(value: any, fallback: D): number | D;\nexport function coerceNumberProperty(value: any, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nexport function _isNumberValue(value: any): boolean {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));\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\n/** Coerces a data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AISA,AAAA,SAAgB,qBAAqB,CAAC,KAAU,EAAhD;IACE,OAAO,KAAK,IAAI,IAAI,IAAI,CAA1B,EAA6B,KAAK,CAAlC,CAAoC,KAAK,OAAO,CAAC;CAChD;;;;;;;;;;;;ADAD,AAAA,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAa,GAAG,CAAC,EAAlE;IACE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;;;AAMD,AAAA,SAAgB,cAAc,CAAC,KAAU,EAAzC;;;;IAIE,OAAO,CAAC,KAAK,CAAC,UAAU,oBAAC,KAAK,GAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;CAClE;;;;;;;;;;;;;ADfD,AAAA,SAAgB,WAAW,CAAI,KAAc,EAA7C;IACE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;;;;;;;;;;;ADFD,AAAA,SAAgB,mBAAmB,CAAC,KAAU,EAA9C;IACE,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,CAA7C,EAAgD,KAAK,CAArD,EAAA,CAAyD,CAAC;CACzD;;;;;;;;;;;;;ADDD,AAAA,SAAgB,aAAa,CAAI,YAA+B,EAAhE;IACE,OAAO,YAAY,YAAY,UAAU,GAAG,YAAY,CAAC,aAAa,GAAG,YAAY,CAAC;CACvF;;;;;;;;;;;;;;"}
@@ -10,7 +10,7 @@ import { Injectable, defineInjectable } from '@angular/core';
10
10
 
11
11
  /**
12
12
  * @fileoverview added by tsickle
13
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
13
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
14
14
  */
15
15
 
16
16
  /**
@@ -22,7 +22,7 @@ class DataSource {
22
22
 
23
23
  /**
24
24
  * @fileoverview added by tsickle
25
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
25
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
26
26
  */
27
27
  /**
28
28
  * DataSource wrapper for a native array.
@@ -50,7 +50,12 @@ class ArrayDataSource extends DataSource {
50
50
 
51
51
  /**
52
52
  * @fileoverview added by tsickle
53
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
53
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
54
+ */
55
+
56
+ /**
57
+ * @fileoverview added by tsickle
58
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
54
59
  */
55
60
  /**
56
61
  * Class to be used to power selecting one or more options from a list.
@@ -173,7 +178,7 @@ class SelectionModel {
173
178
  */
174
179
  sort(predicate) {
175
180
  if (this._multiple && this.selected) {
176
- /** @type {?} */ ((this._selected)).sort(predicate);
181
+ (/** @type {?} */ (this._selected)).sort(predicate);
177
182
  }
178
183
  }
179
184
  /**
@@ -185,6 +190,7 @@ class SelectionModel {
185
190
  }
186
191
  /**
187
192
  * Emits a change event and clears the records of selected and deselected values.
193
+ * @private
188
194
  * @return {?}
189
195
  */
190
196
  _emitChangeEvent() {
@@ -202,6 +208,7 @@ class SelectionModel {
202
208
  }
203
209
  /**
204
210
  * Selects a value.
211
+ * @private
205
212
  * @param {?} value
206
213
  * @return {?}
207
214
  */
@@ -218,6 +225,7 @@ class SelectionModel {
218
225
  }
219
226
  /**
220
227
  * Deselects a value.
228
+ * @private
221
229
  * @param {?} value
222
230
  * @return {?}
223
231
  */
@@ -231,6 +239,7 @@ class SelectionModel {
231
239
  }
232
240
  /**
233
241
  * Clears out the selected values.
242
+ * @private
234
243
  * @return {?}
235
244
  */
236
245
  _unmarkAll() {
@@ -241,6 +250,7 @@ class SelectionModel {
241
250
  /**
242
251
  * Verifies the value assignment and throws an error if the specified value array is
243
252
  * including multiple values while the selection model is not supporting multiple values.
253
+ * @private
244
254
  * @param {?} values
245
255
  * @return {?}
246
256
  */
@@ -262,7 +272,7 @@ function getMultipleValuesInSingleSelectionError() {
262
272
 
263
273
  /**
264
274
  * @fileoverview added by tsickle
265
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
275
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
266
276
  */
267
277
  /**
268
278
  * Class to coordinate unique selection based on name.
@@ -315,12 +325,17 @@ UniqueSelectionDispatcher.decorators = [
315
325
 
316
326
  /**
317
327
  * @fileoverview added by tsickle
318
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
328
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
329
+ */
330
+
331
+ /**
332
+ * @fileoverview added by tsickle
333
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
319
334
  */
320
335
 
321
336
  /**
322
337
  * @fileoverview added by tsickle
323
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
338
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
324
339
  */
325
340
 
326
341
  export { UniqueSelectionDispatcher, ArrayDataSource, DataSource, getMultipleValuesInSingleSelectionError, SelectionModel };
@@ -1 +1 @@
1
- {"version":3,"file":"collections.js","sources":["../../../src/cdk/collections/unique-selection-dispatcher.ts","../../../src/cdk/collections/selection.ts","../../../src/cdk/collections/array-data-source.ts","../../../src/cdk/collections/data-source.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 {Injectable, 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({providedIn: 'root'})\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 * @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';\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 = new Set<T>();\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 changed: Subject<SelectionChange<T>> = new Subject();\n\n /**\n * Event emitted when the value has changed.\n * @deprecated Use `changed` instead.\n * @breaking-change 8.0.0 To be changed to `changed`\n */\n onChange: Subject<SelectionChange<T>> = this.changed;\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 /**\n * Gets whether multiple values can be selected.\n */\n isMultipleSelection() {\n return this._multiple;\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 this.changed.next({\n source: this,\n added: this._selectedToEmit,\n removed: this._deselectedToEmit\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 * @docs-private\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, of as observableOf} from 'rxjs';\nimport {DataSource} from './data-source';\n\n\n/** DataSource wrapper for a native array. */\nexport class ArrayDataSource<T> extends DataSource<T> {\n constructor(private _data: T[] | ReadonlyArray<T> | Observable<T[] | ReadonlyArray<T>>) {\n super();\n }\n\n connect(): Observable<T[] | ReadonlyArray<T>> {\n return this._data instanceof Observable ? this._data : observableOf(this._data);\n }\n\n disconnect() {}\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';\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[] | ReadonlyArray<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":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;AGWA,AAAA,MAAsB,UAAU,CAAhC;CAmBC;;;;;;;;;;ADjBD,AAAA,MAAa,eAAmB,SAAQ,UAAa,CAArD;;;;IACE,WAAF,CAAsB,KAAkE,EAAxF;QACI,KAAK,EAAE,CAAC;QADU,IAAtB,CAAA,KAA2B,GAAL,KAAK,CAA6D;KAErF;;;;IAED,OAAO,GAAT;QACI,OAAO,IAAI,CAAC,KAAK,YAAY,UAAU,GAAG,IAAI,CAAC,KAAK,GAAGA,EAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACjF;;;;IAED,UAAU,GAAZ,GAAiB;CAChB;;;;;;;;;;ADVD,AAAA,MAAa,cAAc,CAA3B;;;;;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CAAC,yEAAyE,CAAC,CAAC;CACzF;;;;;;;;;;;;;;;AD7LD,AAAA,MAAa,yBAAyB,CAAtC;;QACA,IAAA,CAAA,UAAA,GAA4D,EAAE,CAA9D;;;;;;;;IAOE,MAAM,CAAC,EAAU,EAAE,IAAY,EAAjC;QACI,KAAK,IAAI,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;YACpC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SACpB;KACF;;;;;;IAMD,MAAM,CAAC,QAA2C,EAApD;QACI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,MAAX;YACM,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAA6C,KAA7F;gBACQ,OAAO,QAAQ,KAAK,UAAU,CAAC;aAChC,CAAC,CAAC;SACJ,CAAC;KACH;;;;IAED,WAAW,GAAb;QACI,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;KACtB;;;IA9BH,EAAA,IAAA,EAAC,UAAU,EAAX,IAAA,EAAA,CAAY,EAAC,UAAU,EAAE,MAAM,EAAC,EAAhC,EAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"collections.js","sources":["../../../src/cdk/collections/unique-selection-dispatcher.ts","../../../src/cdk/collections/selection.ts","../../../src/cdk/collections/array-data-source.ts","../../../src/cdk/collections/data-source.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 {Injectable, 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({providedIn: 'root'})\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 * @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';\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 = new Set<T>();\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 changed: Subject<SelectionChange<T>> = new Subject();\n\n /**\n * Event emitted when the value has changed.\n * @deprecated Use `changed` instead.\n * @breaking-change 8.0.0 To be changed to `changed`\n */\n onChange: Subject<SelectionChange<T>> = this.changed;\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 /**\n * Gets whether multiple values can be selected.\n */\n isMultipleSelection() {\n return this._multiple;\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 this.changed.next({\n source: this,\n added: this._selectedToEmit,\n removed: this._deselectedToEmit\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 * @docs-private\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, of as observableOf} from 'rxjs';\nimport {DataSource} from './data-source';\n\n\n/** DataSource wrapper for a native array. */\nexport class ArrayDataSource<T> extends DataSource<T> {\n constructor(private _data: T[] | ReadonlyArray<T> | Observable<T[] | ReadonlyArray<T>>) {\n super();\n }\n\n connect(): Observable<T[] | ReadonlyArray<T>> {\n return this._data instanceof Observable ? this._data : observableOf(this._data);\n }\n\n disconnect() {}\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';\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[] | ReadonlyArray<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":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;AGWA,AAAA,MAAsB,UAAU,CAAhC;CAmBC;;;;;;;;;;ADjBD,AAAA,MAAa,eAAmB,SAAQ,UAAa,CAArD;;;;IACE,WAAF,CAAsB,KAAkE,EAAxF;QACI,KAAK,EAAE,CAAC;QADU,IAAtB,CAAA,KAA2B,GAAL,KAAK,CAA6D;KAErF;;;;IAED,OAAO,GAAT;QACI,OAAO,IAAI,CAAC,KAAK,YAAY,UAAU,GAAG,IAAI,CAAC,KAAK,GAAGA,EAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACjF;;;;IAED,UAAU,GAAZ,GAAiB;CAChB;;;;;;;;;;;;;;;ADVD,AAAA,MAAa,cAAc,CAA3B;;;;;;IAgCE,WAAF,CACY,SADZ,GACwB,KAAK,EACzB,uBAA6B,EACrB,YAHZ,GAG2B,IAAI,EAH/B;QACY,IAAZ,CAAA,SAAqB,GAAT,SAAS,CAAQ;QAEjB,IAAZ,CAAA,YAAwB,GAAZ,YAAY,CAAO;;;;QAjCrB,IAAV,CAAA,UAAoB,GAAG,IAAI,GAAG,EAAK,CAAC;;;;QAG1B,IAAV,CAAA,iBAA2B,GAAQ,EAAE,CAAC;;;;QAG5B,IAAV,CAAA,eAAyB,GAAQ,EAAE,CAAC;;;;QAelC,IAAF,CAAA,OAAS,GAAgC,IAAI,OAAO,EAAE,CAAC;;;;;;QAOrD,IAAF,CAAA,QAAU,GAAgC,IAAI,CAAC,OAAO,CAAC;QAOnD,IAAI,uBAAuB,IAAI,uBAAuB,CAAC,MAA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