@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
@@ -13,11 +13,12 @@
13
13
 
14
14
  /**
15
15
  * @fileoverview added by tsickle
16
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
16
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
17
17
  */
18
- /** *
18
+ /**
19
19
  * Used to generate unique ID for each accordion.
20
- @type {?} */
20
+ * @type {?}
21
+ */
21
22
  var nextId = 0;
22
23
  /**
23
24
  * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.
@@ -98,10 +99,12 @@ var CdkAccordion = /** @class */ (function () {
98
99
  this._stateChanges.complete();
99
100
  };
100
101
  /**
102
+ * @private
101
103
  * @param {?} expanded
102
104
  * @return {?}
103
105
  */
104
106
  CdkAccordion.prototype._openCloseAll = /**
107
+ * @private
105
108
  * @param {?} expanded
106
109
  * @return {?}
107
110
  */
@@ -124,11 +127,12 @@ var CdkAccordion = /** @class */ (function () {
124
127
 
125
128
  /**
126
129
  * @fileoverview added by tsickle
127
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
130
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
128
131
  */
129
- /** *
132
+ /**
130
133
  * Used to generate unique ID for each accordion item.
131
- @type {?} */
134
+ * @type {?}
135
+ */
132
136
  var nextId$1 = 0;
133
137
  var ɵ0 = undefined;
134
138
  /**
@@ -204,10 +208,11 @@ var CdkAccordionItem = /** @class */ (function () {
204
208
  this.expandedChange.emit(expanded);
205
209
  if (expanded) {
206
210
  this.opened.emit();
207
- /** *
211
+ /**
208
212
  * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,
209
213
  * the name value is the id of the accordion.
210
- @type {?} */
214
+ * @type {?}
215
+ */
211
216
  var accordionId = this.accordion ? this.accordion.id : this.id;
212
217
  this._expansionDispatcher.notify(this.id, accordionId);
213
218
  }
@@ -297,9 +302,11 @@ var CdkAccordionItem = /** @class */ (function () {
297
302
  }
298
303
  };
299
304
  /**
305
+ * @private
300
306
  * @return {?}
301
307
  */
302
308
  CdkAccordionItem.prototype._subscribeToOpenCloseAllActions = /**
309
+ * @private
303
310
  * @return {?}
304
311
  */
305
312
  function () {
@@ -341,7 +348,7 @@ var CdkAccordionItem = /** @class */ (function () {
341
348
 
342
349
  /**
343
350
  * @fileoverview added by tsickle
344
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
351
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
345
352
  */
346
353
  var CdkAccordionModule = /** @class */ (function () {
347
354
  function CdkAccordionModule() {
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-accordion.umd.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":["NgModule","Input","Output","UniqueSelectionDispatcher","ChangeDetectorRef","Optional","SkipSelf","Directive","coerceBooleanProperty","nextId","EventEmitter","Subscription","Subject"],"mappings":";;;;;;;;;;;;;;;;;;;;AEaA,IAAI,MAAM,GAAG,CAAC,CAAC;;;;;;;;;QAWb,IAAF,CAAA,aAAA,GAA2B,IAAIY,YAAO,EAAiB,CAAC;;;;QAGtD,IAAF,CAAA,oBAAA,GAAoD,IAAIA,YAAO,EAAW,CAAC;;;;QAGzE,IAAF,CAAA,EAAA,GAAgB,gBAAhB,GAAiC,MAAM,EAAI,CAAC;QAM5C,IAAA,CAAA,MAAA,GAA4B,KAAK,CAAjC;;IAHE,MAAF,CAAA,cAAA,CACM,YADN,CAAA,SAAA,EAAA,OACW,EADX;;;;;;QAAE,YAAF,EACyB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE;;;;;QAC5C,UAAU,KAAc,EAA1B,EAA8B,IAAI,CAAC,MAAM,GAAGJ,8BAAqB,CAAC,KAAK,CAAC,CAAC,EAAE;;;KAD3E,CAAA,CAA8C;;;;;;IAK5C,YAAF,CAAA,SAAA,CAAA,OAAS;;;;IAAP,YAAF;QACI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;KAC1B,CAAH;;;;;;IAGE,YAAF,CAAA,SAAA,CAAA,QAAU;;;;IAAR,YAAF;QACI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAC3B,CAAH;;;;;IAEE,YAAF,CAAA,SAAA,CAAA,WAAa;;;;IAAX,UAAY,OAAsB,EAApC;QACI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAClC,CAAH;;;;IAEE,YAAF,CAAA,SAAA,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AAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;iBAC/C,EAAD,EAAA;;IAhBA,OAAA,kBAAA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-accordion.umd.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":["NgModule","Input","Output","UniqueSelectionDispatcher","ChangeDetectorRef","Optional","SkipSelf","Directive","coerceBooleanProperty","nextId","EventEmitter","Subscription","Subject"],"mappings":";;;;;;;;;;;;;;;;;;;;;AEaA,IAAI,MAAM,GAAG,CAAC,CAAd;;;;AAKA,AAAA,IAAA,YAAA,kBAAA,YAAA;IAAA,SAAA,YAAA,GAAA;;;;QAMW,IAAX,CAAA,aAAwB,GAAG,IAAIY,YAAO,EAAiB,CAAC;;;;QAG7C,IAAX,CAAA,oBAA+B,GAAqB,IAAIA,YAAO,EAAW,CAAC;;;;QAGhE,IAAX,CAAA,EAAa,GAAG,gBAAhB,GAAiC,MAAM,EAAI,CAAC;QAMlC,IAAV,CAAA,MAAgB,GAAY,KAAK,CAAC;KAyBjC;IA5BC,MAAF,CAAA,cAAA,CACM,YADN,CAAA,SAAA,EAAA,OACW,EADX;;;;;;QAAE,YAAF,EACyB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE;;;;;QAC5C,UAAU,KAAc,EAA1B,EAA8B,IAAI,CAAC,MAAM,GAAGJ,8BAAqB,CAAC,KAAK,CAAC,CAAC,EAAE;;;KAD3E,CAAA,CAA8C;;;;;;IAK5C,YAAF,CAAA,SAAA,CAAA,OAAS;;;;IAAP,YAAF;QACI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;KAC1B,CAAH;;;;;;IAGE,YAAF,CAAA,SAAA,CAAA,QAAU;;;;I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A,WAAM,EAAT,CAAA;QAEA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAGA,WAAM,EAAT,CAAA;QAOA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAGA,WAAM,EAAT,CAAA;QAMA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAGD,UAAK,EAAR,CAAA;QA8BA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAGA,UAAK,EAAR,CAAA;;IAgEA,OAAA,gBAAC,CAAD;CAAC,EAAD,CAAA,CAAA;;;;;;AD7IA,AAAA,IAAA,kBAAA,kBAAA,YAAA;IAAA,SAAA,kBAAA,GAAA;KAIkC;;QAJlC,EAAA,IAAA,EAACD,aAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;iBAC/C,EAAD,EAAA;;IACiC,OAAjC,kBAAkC,CAAlC;CAAkC,EAAlC,CAAA;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-accordion.umd.min.js","sources":["../../src/cdk/accordion/accordion.ts","../../src/cdk/accordion/accordion-item.ts","../../src/cdk/accordion/accordion-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {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","/**\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 {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"],"names":["nextId","this","_stateChanges","Subject","_openCloseAllActions","id","_multi","Object","defineProperty","CdkAccordion","prototype","multi","coerceBooleanProperty","openAll","_openCloseAll","closeAll","ngOnChanges","changes","next","ngOnDestroy","complete","expanded","type","Directive","args","selector","exportAs","Input","CdkAccordionItem","accordion","_changeDetectorRef","_expansionDispatcher","_this","_openCloseAllSubscription","Subscription","EMPTY","closed","EventEmitter","opened","destroyed","expandedChange","_expanded","_disabled","_removeUniqueSelectionListener","listen","accordionId","_subscribeToOpenCloseAllActions","emit","notify","markForCheck","disabled","unsubscribe","toggle","close","open","subscribe","providers","provide","useValue","undefined","decorators","Optional","SkipSelf","ChangeDetectorRef","UniqueSelectionDispatcher","Output","NgModule","exports","declarations","CdkAccordionModule"],"mappings":";;;;;;;yfAaA,IAAIA,GAAS,4BAWXC,KAAFC,cAA2B,GAAIC,GAAAA,QAG7BF,KAAFG,qBAAoD,GAAID,GAAAA,QAGtDF,KAAFI,GAAgB,iBAAiBL,IAMjCC,KAAAK,QAA4B,EApC5B,MAiCEC,QAAFC,eACMC,EADNC,UAAA,aAAE,WACuB,MAAOT,MAAKK,YACnC,SAAUK,GAAkBV,KAAKK,OAASM,EAAAA,sBAAsBD,oCAIhEF,EAAFC,UAAAG,QAAE,WACEZ,KAAKa,eAAc,IAIrBL,EAAFC,UAAAK,SAAE,WACEd,KAAKa,eAAc,IAGrBL,EAAFC,UAAAM,YAAE,SAAYC,GACVhB,KAAKC,cAAcgB,KAAKD,IAG1BR,EAAFC,UAAAS,YAAE,WACElB,KAAKC,cAAckB,YAGbX,EAAVC,UAAAI,cAAA,SAAwBO,GAChBpB,KAAKU,OACPV,KAAKG,qBAAqBc,KAAKG,mBAxCrCC,KAACC,EAAAA,UAADC,OACEC,SAAU,gCACVC,SAAU,qCAaZf,QAAAW,KAAGK,EAAAA,SAjCHlB,KCwBIT,EAAS,eA0EX,QAAF4B,GAA6CC,EACvBC,EACEC,GAFtB,GAAFC,GAAA/B,IAA6CA,MAA7C4B,UAA6CA,EACvB5B,KAAtB6B,mBAAsBA,EACE7B,KAAxB8B,qBAAwBA,EA3DxB9B,KAAAgC,0BAAsCC,EAAAA,aAAaC,MAEjDlC,KAAFmC,OAAyC,GAAIC,GAAAA,aAE3CpC,KAAFqC,OAAyC,GAAID,GAAAA,aAE3CpC,KAAFsC,UAA4C,GAAIF,GAAAA,aAO9CpC,KAAFuC,eAAoD,GAAIH,GAAAA,aAGtDpC,KAAFI,GAAwB,uBAAuBL,IA8B/CC,KAAAwC,WAAsB,EAMtBxC,KAAAyC,WAA+B,EAG/BzC,KAAA0C,+BAAuD,aAKnD1C,KAA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AAU,SAAAlC,GAE9CW,EAAKkB,WACRlB,EAAKX,SAAWA,qBAxHxBC,KAACC,EAAAA,UAADC,OACEC,SAAU,yCACVC,SAAU,mBACV8B,YAGGC,QAAShD,EAAciD,aAAUC,6CAjBtCrC,KAAQb,EAARmD,aAAAtC,KA+EeuC,EAAAA,WA/EfvC,KA+E2BwC,EAAAA,aAnF3BxC,KAAEyC,EAAAA,oBAGFzC,KAAQ0C,EAAAA,+CAyBR5B,SAAAd,KAAG2C,EAAAA,SAEH3B,SAAAhB,KAAG2C,EAAAA,SAEH1B,YAAAjB,KAAG2C,EAAAA,SAOHzB,iBAAAlB,KAAG2C,EAAAA,SAMH5C,WAAAC,KAAGK,EAAAA,QA8BHuB,WAAA5B,KAAGK,EAAAA,SA1FHC,gCCAA,sBAaAN,KAAC4C,EAAAA,SAAD1C,OACE2C,SAAU1D,EAAcmB,GACxBwC,cAAe3D,EAAcmB,OAf/ByC"}
1
+ {"version":3,"file":"cdk-accordion.umd.min.js","sources":["../../src/cdk/accordion/accordion.ts","../../src/cdk/accordion/accordion-item.ts","../../src/cdk/accordion/accordion-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {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","/**\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 {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"],"names":["nextId","CdkAccordion","this","_stateChanges","Subject","_openCloseAllActions","id","_multi","Object","defineProperty","prototype","multi","coerceBooleanProperty","openAll","_openCloseAll","closeAll","ngOnChanges","changes","next","ngOnDestroy","complete","expanded","type","Directive","args","selector","exportAs","Input","CdkAccordionItem","accordion","_changeDetectorRef","_expansionDispatcher","_this","_openCloseAllSubscription","Subscription","EMPTY","closed","EventEmitter","opened","destroyed","expandedChange","_expanded","_disabled","_removeUniqueSelectionListener","listen","accordionId","_subscribeToOpenCloseAllActions","emit","notify","markForCheck","disabled","unsubscribe","toggle","close","open","subscribe","providers","provide","useValue","undefined","decorators","Optional","SkipSelf","ChangeDetectorRef","UniqueSelectionDispatcher","Output","CdkAccordionModule","NgModule","exports","declarations"],"m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E9CW,EAAKkB,WACRlB,EAAKX,SAAWA,qBAxHxBC,KAACC,EAAAA,UAADC,OACEC,SAAU,yCACVC,SAAU,mBACV8B,YAGGC,QAASxD,EAAcyD,aAAUC,6CAjBtCrC,KAAQrB,EAAR2D,aAAAtC,KA+EeuC,EAAAA,WA/EfvC,KA+E2BwC,EAAAA,aAnF3BxC,KAAEyC,EAAAA,oBAGFzC,KAAQ0C,EAAAA,+CAyBR5B,SAAAd,KAAG2C,EAAAA,SAEH3B,SAAAhB,KAAG2C,EAAAA,SAEH1B,YAAAjB,KAAG2C,EAAAA,SAOHzB,iBAAAlB,KAAG2C,EAAAA,SAMH5C,WAAAC,KAAGK,EAAAA,QA8BHuB,WAAA5B,KAAGK,EAAAA,SAgEHC,KC7IAsC,EAAA,WAAA,QAAAA,MAIiC,sBAJjC5C,KAAC6C,EAAAA,SAAD3C,OACE4C,SAAUnE,EAAc2B,GACxByC,cAAepE,EAAc2B,OAE/BsC"}
@@ -13,9 +13,9 @@
13
13
 
14
14
  /**
15
15
  * @fileoverview added by tsickle
16
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
16
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
17
17
  */
18
- /** *
18
+ /**
19
19
  * Injection token used to inject the document into Directionality.
20
20
  * This is used so that the value can be faked in tests.
21
21
  *
@@ -29,7 +29,8 @@
29
29
  * https://github.com/angular/angular/issues/22559
30
30
  *
31
31
  * \@docs-private
32
- @type {?} */
32
+ * @type {?}
33
+ */
33
34
  var DIR_DOCUMENT = new core.InjectionToken('cdk-dir-doc', {
34
35
  providedIn: 'root',
35
36
  factory: DIR_DOCUMENT_FACTORY,
@@ -44,7 +45,7 @@ function DIR_DOCUMENT_FACTORY() {
44
45
 
45
46
  /**
46
47
  * @fileoverview added by tsickle
47
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
48
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
48
49
  */
49
50
  /**
50
51
  * The directionality (LTR / RTL) context for the application (or a subtree of it).
@@ -61,6 +62,10 @@ var Directionality = /** @class */ (function () {
61
62
  */
62
63
  this.change = new core.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
  var bodyDir = _document.body ? _document.body.dir : null;
66
71
  /** @type {?} */
@@ -92,7 +97,7 @@ var Directionality = /** @class */ (function () {
92
97
 
93
98
  /**
94
99
  * @fileoverview added by tsickle
95
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
100
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
96
101
  */
97
102
  /**
98
103
  * Directive to listen for changes of direction of part of the DOM.
@@ -186,7 +191,7 @@ var Dir = /** @class */ (function () {
186
191
 
187
192
  /**
188
193
  * @fileoverview added by tsickle
189
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
194
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
190
195
  */
191
196
  var BidiModule = /** @class */ (function () {
192
197
  function BidiModule() {
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-bidi.umd.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":["NgModule","Input","Output","Directive","EventEmitter","Optional","Inject","Injectable","inject","DOCUMENT","InjectionToken"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AG2BA,AAAA,IAAa,YAAY,GAAG,IAAIU,mBAAc,CAAW,aAAa,EAAE;IACtE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oBAAoB;CA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AA,EAAGD,WAAM,EAAT,IAAA,EAAA,CAAU,WAAW,EAArB,EAAA,CAAA;QAGA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAGD,UAAK,EAAR,CAAA;;IA7CA,OAAA,GAAA,CAAA;;;;;;;;;;;QDYA,EAAA,IAAA,EAACD,aAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAAC,GAAG,CAAC;oBACd,YAAY,EAAE,CAAC,GAAG,CAAC;iBACpB,EAAD,EAAA;;IAfA,OAAA,UAAA,CAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-bidi.umd.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":["NgModule","Input","Output","Directive","EventEmitter","Optional","Inject","Injectable","inject","DOCUMENT","InjectionToken"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AG2BA,AAAA,IAAa,YAAY,GAAG,IAAIU,mBAAc,CAAW,aAAa,EAAE;IACtE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oBAAoB;CAC9B,CAAC,CAAF;;;;;AAGA,SAAgB,oBAAoB,GAApC;IACE,OAAOF,WAAM,CAACC,eAAQ,CAAC,CAAC;CACzB;;;;;;;;;;ADhBD,AAAA,IAAA,cAAA,kBAAA,YAAA;IAQE,SAAF,cAAA,CAAgD,SAAe,EAA/D;;;;QALW,IAAX,CAAA,KAAgB,GAAc,KAAK,CAAC;;;;QAGzB,IAAX,CAAA,MAAiB,GAAG,IAAIL,iBAAY,EAAa,CAAC;QAG9C,IAAI,SAAS,EAAE;;;;;;YAKnB,IAAY,OAAO,GAAG,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAhE;;YACA,IAAY,OAAO,GAAG,SAAS,CAAC,eAAe,GAAG,SAAS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AC;oBACd,YAAY,EAAE,CAAC,GAAG,CAAC;iBACpB,EAAD,EAAA;;IAC0B,OAA1B,UAA2B,CAA3B;CAA2B,EAA3B,CAAA;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-bidi.umd.min.js","sources":["../../src/cdk/bidi/dir-document-token.ts","../../src/cdk/bidi/directionality.ts","../../src/cdk/bidi/dir.ts","../../src/cdk/bidi/bidi-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {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","/**\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 {\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 {NgModule} from '@angular/core';\nimport {Dir} from './dir';\n\n\n@NgModule({\n exports: [Dir],\n declarations: [Dir],\n})\nexport class BidiModule { }\n"],"names":["DIR_DOCUMENT_FACTORY","inject","DOCUMENT","DIR_DOCUMENT","InjectionToken","providedIn","factory","Directionality","_document","this","value","change","EventEmitter","bodyDir","body","dir","htmlDir","documentElement","prototype","ngOnDestroy","complete","type","Injectable","args","undefined","decorators","Optional","Inject","_dir","_isInitialized","Object","defineProperty","Dir","old","_rawDir","emit","ngAfterContentInit","Directive","selector","providers","provide","useExisting","host","[attr.dir]","exportAs","Output","Input","NgModule","exports","declarations","BidiModule"],"mappings":";;;;;;;uWAiCA,SAAgBA,KACd,MAAOC,GAAAA,OAAOC,EAAAA,UAPhB,GAAaC,GAAe,GAAIC,GAAAA,eAAyB,eACvDC,WAAY,OACZC,QAASN,iBCFT,QAAFO,GAAgDC,GAC5C,GANFC,KAAFC,MAA8B,MAG5BD,KAAFE,OAAoB,GAAIC,GAAAA,aAGhBJ,EAAW,CAKb,GAAMK,GAAUL,EAAUM,KAAON,EAAUM,KAAKC,IAAM,KAChDC,EAAUR,EAAUS,gBAAkBT,EAAUS,gBAAgBF,IAAM,KACtEL,EAAQG,GAAWG,CACzBP,MAAKC,MAAmB,QAAVA,GAA6B,QAAVA,EAAmBA,EAAQ,OApClE,MAwCEH,GAAFW,UAAAC,YAAE,WACEV,KAAKE,OAAOS,2BAtBhBC,KAACC,EAAAA,WAADC,OAAalB,WAAY,+CAQzBgB,SAAAG,GAAAC,aAAAJ,KAAeK,EAAAA,WAAfL,KAA2BM,EAAAA,OAA3BJ,MAAkCpB,0HA3BlCI,+BCiCAE,KAAAmB,KAA4B,MAG5BnB,KAAAoB,gBAAoC,EAMlCpB,KAAFE,OAAgC,GAAIC,GAAAA,aA1CpC,MA6CEkB,QAAFC,eACMC,EADNd,UAAA,WAAE,WACuB,MAAOT,MAAKmB,UACnC,SAAQlB,GACN,GAAMuB,GAAMxB,KAAKmB,IAEjBnB,MAAKyB,QAAUxB,EACfD,KAAKmB,KAAkB,QAAVlB,GAA6B,QAAVA,EAAmBA,EAAQ,MAEvDuB,IAAQxB,KAAKmB,MAAQnB,KAAKoB,gBAC5BpB,KAAKE,OAAOwB,KAAK1B,KAAKmB,uCAK1BE,OAAFC,eAAMC,EAANd,UAAA,aAAE,WAAyB,MAAOT,MAAKM,qCAGrCiB,EAAFd,UAAAkB,mBAAE,WACE3B,KAAKoB,gBAAiB,GAGxBG,EAAFd,UAAAC,YAAE,WACEV,KAAKE,OAAOS,2BA1ChBC,KAACgB,EAAAA,UAADd,OACEe,SAAU,QACVC,YAAaC,QAASjC,EAAgBkC,YAAaT,IACnDU,MAAOC,aAAc,WACrBC,SAAU,4BAaZjC,SAAAU,KAAGwB,EAAAA,OAAHtB,MAAU,eAGVR,MAAAM,KAAGyB,EAAAA,SA7CHd,gCCAA,sBAYAX,KAAC0B,EAAAA,SAADxB,OACEyB,SAAUhB,GACViB,cAAejB,OAdjBkB"}
1
+ {"version":3,"file":"cdk-bidi.umd.min.js","sources":["../../src/cdk/bidi/dir-document-token.ts","../../src/cdk/bidi/directionality.ts","../../src/cdk/bidi/dir.ts","../../src/cdk/bidi/bidi-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {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","/**\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 {\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 {NgModule} from '@angular/core';\nimport {Dir} from './dir';\n\n\n@NgModule({\n exports: [Dir],\n declarations: [Dir],\n})\nexport class BidiModule { }\n"],"names":["DIR_DOCUMENT_FACTORY","inject","DOCUMENT","DIR_DOCUMENT","InjectionToken","providedIn","factory","Directionality","_document","this","value","change","EventEmitter","bodyDir","body","dir","htmlDir","documentElement","prototype","ngOnDestroy","complete","type","Injectable","args","undefined","decorators","Optional","Inject","Dir","_dir","_isInitialized","Object","defineProperty","old","_rawDir","emit","ngAfterContentInit","Directive","selector","providers","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,EAAFV,UAAAC,YAAE,WACEV,KAAKE,OAAOS,2BA1ChBC,KAACgB,EAAAA,UAADd,OACEe,SAAU,QACVC,YAAaC,QAASjC,EAAgBkC,YAAab,IACnDc,MAAOC,aAAc,WACrBC,SAAU,4BAaZjC,SAAAU,KAAGwB,EAAAA,OAAHtB,MAAU,eAGVR,MAAAM,KAAGyB,EAAAA,SAwBHlB,KCzDAmB,EAAA,WAAA,QAAAA,MAI0B,sBAJ1B1B,KAAC2B,EAAAA,SAADzB,OACE0B,SAAUrB,GACVsB,cAAetB,OAEjBmB"}
@@ -6,14 +6,14 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  (function (global, factory) {
9
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
10
- typeof define === 'function' && define.amd ? define('@angular/cdk/coercion', ['exports'], factory) :
11
- (factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.coercion = {})));
12
- }(this, (function (exports) { 'use strict';
9
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
10
+ typeof define === 'function' && define.amd ? define('@angular/cdk/coercion', ['exports', '@angular/core'], factory) :
11
+ (factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.coercion = {}),global.ng.core));
12
+ }(this, (function (exports,core) { 'use strict';
13
13
 
14
14
  /**
15
15
  * @fileoverview added by tsickle
16
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
16
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
17
17
  */
18
18
 
19
19
  /**
@@ -27,7 +27,7 @@ function coerceBooleanProperty(value) {
27
27
 
28
28
  /**
29
29
  * @fileoverview added by tsickle
30
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
30
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
31
31
  */
32
32
 
33
33
  /**
@@ -49,12 +49,12 @@ function _isNumberValue(value) {
49
49
  // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,
50
50
  // and other non-number values as NaN, where Number just uses 0) but it considers the string
51
51
  // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.
52
- return !isNaN(parseFloat(/** @type {?} */ (value))) && !isNaN(Number(value));
52
+ return !isNaN(parseFloat((/** @type {?} */ (value)))) && !isNaN(Number(value));
53
53
  }
54
54
 
55
55
  /**
56
56
  * @fileoverview added by tsickle
57
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
57
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
58
58
  */
59
59
 
60
60
  /**
@@ -69,7 +69,7 @@ function coerceArray(value) {
69
69
 
70
70
  /**
71
71
  * @fileoverview added by tsickle
72
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
72
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
73
73
  */
74
74
 
75
75
  /**
@@ -84,11 +84,27 @@ function coerceCssPixelValue(value) {
84
84
  return typeof value === 'string' ? value : value + "px";
85
85
  }
86
86
 
87
+ /**
88
+ * @fileoverview added by tsickle
89
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
90
+ */
91
+ /**
92
+ * Coerces an ElementRef or an Element into an element.
93
+ * Useful for APIs that can accept either a ref or the native element itself.
94
+ * @template T
95
+ * @param {?} elementOrRef
96
+ * @return {?}
97
+ */
98
+ function coerceElement(elementOrRef) {
99
+ return elementOrRef instanceof core.ElementRef ? elementOrRef.nativeElement : elementOrRef;
100
+ }
101
+
87
102
  exports.coerceBooleanProperty = coerceBooleanProperty;
88
103
  exports.coerceNumberProperty = coerceNumberProperty;
89
104
  exports._isNumberValue = _isNumberValue;
90
105
  exports.coerceArray = coerceArray;
91
106
  exports.coerceCssPixelValue = coerceCssPixelValue;
107
+ exports.coerceElement = coerceElement;
92
108
 
93
109
  Object.defineProperty(exports, '__esModule', { value: true });
94
110
 
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-coercion.umd.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,SAAgB,qBAAqB,CAAC,KAAU,EAAhD;IACE,OAAO,KAAK,IAAI,IAAI,IAAI,EAA1B,GAA6B,KAAO,KAAK,OAAO,CAAC;CAChD;;;;;;;;;;;;ADAD,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAiB,EAAlE;IAAiD,IAAjD,aAAA,KAAA,KAAA,CAAA,EAAiD,EAAA,aAAjD,GAAA,CAAkE,CAAlE,EAAA;IACE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;;;AAMD,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,SAAgB,WAAW,CAAI,KAAc,EAA7C;IACE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;;;;;;;;;;;ADFD,SAAgB,mBAAmB,CAAC,KAAU,EAA9C;IACE,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAM,KAAK,GAArD,IAAyD,CAAC;CACzD;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk-coercion.umd.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":["ElementRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AISA,SAAgB,qBAAqB,CAAC,KAAU,EAAhD;IACE,OAAO,KAAK,IAAI,IAAI,IAAI,EAA1B,GAA6B,KAAO,KAAK,OAAO,CAAC;CAChD;;;;;;;;;;;;ADAD,SAAgB,oBAAoB,CAAC,KAAU,EAAE,aAAiB,EAAlE;IAAiD,IAAjD,aAAA,KAAA,KAAA,CAAA,EAAiD,EAAA,aAAjD,GAAA,CAAkE,CAAlE,EAAA;IACE,OAAO,cAAc,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC;CAC9D;;;;;;;AAMD,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,SAAgB,WAAW,CAAI,KAAc,EAA7C;IACE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;CAC/C;;;;;;;;;;;;ADFD,SAAgB,mBAAmB,CAAC,KAAU,EAA9C;IACE,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAM,KAAK,GAArD,IAAyD,CAAC;CACzD;;;;;;;;;;;;;ADDD,SAAgB,aAAa,CAAI,YAA+B,EAAhE;IACE,OAAO,YAAY,YAAYA,eAAU,GAAG,YAAY,CAAC,aAAa,GAAG,YAAY,CAAC;CACvF;;;;;;;;;;;;;;;;;"}
@@ -5,5 +5,5 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define("@angular/cdk/coercion",["exports"],n):n((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.coercion={}))}(this,function(e){"use strict";function n(e){return null!=e&&""+e!="false"}function r(e,n){return void 0===n&&(n=0),o(e)?Number(e):n}function o(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function t(e){return Array.isArray(e)?e:[e]}function c(e){return null==e?"":"string"==typeof e?e:e+"px"}e.coerceBooleanProperty=n,e.coerceNumberProperty=r,e._isNumberValue=o,e.coerceArray=t,e.coerceCssPixelValue=c,Object.defineProperty(e,"__esModule",{value:!0})});
8
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular/cdk/coercion",["exports","@angular/core"],n):n((e.ng=e.ng||{},e.ng.cdk=e.ng.cdk||{},e.ng.cdk.coercion={}),e.ng.core)}(this,function(e,n){"use strict";function r(e){return null!=e&&""+e!="false"}function o(e,n){return void 0===n&&(n=0),t(e)?Number(e):n}function t(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function c(e){return Array.isArray(e)?e:[e]}function u(e){return null==e?"":"string"==typeof e?e:e+"px"}function i(e){return e instanceof n.ElementRef?e.nativeElement:e}e.coerceBooleanProperty=r,e.coerceNumberProperty=o,e._isNumberValue=t,e.coerceArray=c,e.coerceCssPixelValue=u,e.coerceElement=i,Object.defineProperty(e,"__esModule",{value:!0})});
9
9
  //# sourceMappingURL=cdk-coercion.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdk-coercion.umd.min.js","sources":["../../src/cdk/coercion/boolean-property.ts","../../src/cdk/coercion/number-property.ts","../../src/cdk/coercion/array.ts","../../src/cdk/coercion/css-pixel-value.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 data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\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/** 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 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"],"names":["coerceBooleanProperty","value","coerceNumberProperty","fallbackValue","_isNumberValue","Number","isNaN","parseFloat","coerceArray","Array","isArray","coerceCssPixelValue"],"mappings":";;;;;;;+PASA,SAAgBA,GAAsBC,GACpC,MAAgB,OAATA,GAAiB,GAAGA,GAAY,QCCzC,QAAgBC,GAAqBD,EAAYE,GAC/C,WADF,KAAAA,IAAiDA,EAAjD,GACSC,EAAeH,GAASI,OAAOJ,GAASE,EAOjD,QAAgBC,GAAeH,GAI7B,OAAQK,MAAMC,WAAU,MAAoBD,MAAMD,OAAOJ,ICd3D,QAAgBO,GAAeP,GAC7B,MAAOQ,OAAMC,QAAQT,GAASA,GAASA,GCDzC,QAAgBU,GAAoBV,GAClC,MAAa,OAATA,EACK,GAGe,gBAAVA,GAAqBA,EAAWA,EAAhD"}
1
+ {"version":3,"file":"cdk-coercion.umd.min.js","sources":["../../src/cdk/coercion/boolean-property.ts","../../src/cdk/coercion/number-property.ts","../../src/cdk/coercion/array.ts","../../src/cdk/coercion/css-pixel-value.ts","../../src/cdk/coercion/element.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 data-bound value (typically a string) to a boolean. */\nexport function coerceBooleanProperty(value: any): boolean {\n return value != null && `${value}` !== 'false';\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/** 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 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\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"],"names":["coerceBooleanProperty","value","coerceNumberProperty","fallbackValue","_isNumberValue","Number","isNaN","parseFloat","coerceArray","Array","isArray","coerceCssPixelValue","coerceElement","elementOrRef","ElementRef","nativeElement"],"mappings":";;;;;;;oTASA,SAAgBA,GAAsBC,GACpC,MAAgB,OAATA,GAAiB,GAAGA,GAAY,QCCzC,QAAgBC,GAAqBD,EAAYE,GAC/C,WADF,KAAAA,IAAiDA,EAAjD,GACSC,EAAeH,GAASI,OAAOJ,GAASE,EAOjD,QAAgBC,GAAeH,GAI7B,OAAQK,MAAMC,WAAU,MAAoBD,MAAMD,OAAOJ,ICd3D,QAAgBO,GAAeP,GAC7B,MAAOQ,OAAMC,QAAQT,GAASA,GAASA,GCDzC,QAAgBU,GAAoBV,GAClC,MAAa,OAATA,EACK,GAGe,gBAAVA,GAAqBA,EAAWA,EAAhD,KCAA,QAAgBW,GAAiBC,GAC/B,MAAOA,aAAwBC,GAAAA,WAAaD,EAAaE,cAAgBF"}
@@ -42,7 +42,7 @@ function __extends(d, b) {
42
42
 
43
43
  /**
44
44
  * @fileoverview added by tsickle
45
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
45
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
46
46
  */
47
47
 
48
48
  /**
@@ -61,7 +61,7 @@ DataSource = /** @class */ (function () {
61
61
 
62
62
  /**
63
63
  * @fileoverview added by tsickle
64
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
64
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
65
65
  */
66
66
  /**
67
67
  * DataSource wrapper for a native array.
@@ -99,7 +99,12 @@ ArrayDataSource = /** @class */ (function (_super) {
99
99
 
100
100
  /**
101
101
  * @fileoverview added by tsickle
102
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
102
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
103
+ */
104
+
105
+ /**
106
+ * @fileoverview added by tsickle
107
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
103
108
  */
104
109
  /**
105
110
  * Class to be used to power selecting one or more options from a list.
@@ -300,7 +305,7 @@ SelectionModel = /** @class */ (function () {
300
305
  */
301
306
  function (predicate) {
302
307
  if (this._multiple && this.selected) {
303
- /** @type {?} */ ((this._selected)).sort(predicate);
308
+ (/** @type {?} */ (this._selected)).sort(predicate);
304
309
  }
305
310
  };
306
311
  /**
@@ -317,12 +322,15 @@ SelectionModel = /** @class */ (function () {
317
322
  function () {
318
323
  return this._multiple;
319
324
  };
325
+ /** Emits a change event and clears the records of selected and deselected values. */
320
326
  /**
321
327
  * Emits a change event and clears the records of selected and deselected values.
328
+ * @private
322
329
  * @return {?}
323
330
  */
324
331
  SelectionModel.prototype._emitChangeEvent = /**
325
332
  * Emits a change event and clears the records of selected and deselected values.
333
+ * @private
326
334
  * @return {?}
327
335
  */
328
336
  function () {
@@ -338,13 +346,16 @@ SelectionModel = /** @class */ (function () {
338
346
  this._selectedToEmit = [];
339
347
  }
340
348
  };
349
+ /** Selects a value. */
341
350
  /**
342
351
  * Selects a value.
352
+ * @private
343
353
  * @param {?} value
344
354
  * @return {?}
345
355
  */
346
356
  SelectionModel.prototype._markSelected = /**
347
357
  * Selects a value.
358
+ * @private
348
359
  * @param {?} value
349
360
  * @return {?}
350
361
  */
@@ -359,13 +370,16 @@ SelectionModel = /** @class */ (function () {
359
370
  }
360
371
  }
361
372
  };
373
+ /** Deselects a value. */
362
374
  /**
363
375
  * Deselects a value.
376
+ * @private
364
377
  * @param {?} value
365
378
  * @return {?}
366
379
  */
367
380
  SelectionModel.prototype._unmarkSelected = /**
368
381
  * Deselects a value.
382
+ * @private
369
383
  * @param {?} value
370
384
  * @return {?}
371
385
  */
@@ -377,12 +391,15 @@ SelectionModel = /** @class */ (function () {
377
391
  }
378
392
  }
379
393
  };
394
+ /** Clears out the selected values. */
380
395
  /**
381
396
  * Clears out the selected values.
397
+ * @private
382
398
  * @return {?}
383
399
  */
384
400
  SelectionModel.prototype._unmarkAll = /**
385
401
  * Clears out the selected values.
402
+ * @private
386
403
  * @return {?}
387
404
  */
388
405
  function () {
@@ -394,12 +411,18 @@ SelectionModel = /** @class */ (function () {
394
411
  /**
395
412
  * Verifies the value assignment and throws an error if the specified value array is
396
413
  * including multiple values while the selection model is not supporting multiple values.
414
+ */
415
+ /**
416
+ * Verifies the value assignment and throws an error if the specified value array is
417
+ * including multiple values while the selection model is not supporting multiple values.
418
+ * @private
397
419
  * @param {?} values
398
420
  * @return {?}
399
421
  */
400
422
  SelectionModel.prototype._verifyValueAssignment = /**
401
423
  * Verifies the value assignment and throws an error if the specified value array is
402
424
  * including multiple values while the selection model is not supporting multiple values.
425
+ * @private
403
426
  * @param {?} values
404
427
  * @return {?}
405
428
  */
@@ -422,7 +445,7 @@ function getMultipleValuesInSingleSelectionError() {
422
445
 
423
446
  /**
424
447
  * @fileoverview added by tsickle
425
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
448
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
426
449
  */
427
450
  /**
428
451
  * Class to coordinate unique selection based on name.