@angular/cdk 7.1.0 → 7.2.2

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 (267) 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/bundles/cdk-a11y.umd.js +428 -197
  7. package/bundles/cdk-a11y.umd.js.map +1 -1
  8. package/bundles/cdk-a11y.umd.min.js +1 -1
  9. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  10. package/bundles/cdk-accordion.umd.js +16 -9
  11. package/bundles/cdk-accordion.umd.js.map +1 -1
  12. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  13. package/bundles/cdk-bidi.umd.js +11 -6
  14. package/bundles/cdk-bidi.umd.js.map +1 -1
  15. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  16. package/bundles/cdk-coercion.umd.js +25 -9
  17. package/bundles/cdk-coercion.umd.js.map +1 -1
  18. package/bundles/cdk-coercion.umd.min.js +1 -1
  19. package/bundles/cdk-coercion.umd.min.js.map +1 -1
  20. package/bundles/cdk-collections.umd.js +28 -5
  21. package/bundles/cdk-collections.umd.js.map +1 -1
  22. package/bundles/cdk-collections.umd.min.js.map +1 -1
  23. package/bundles/cdk-drag-drop.umd.js +2297 -973
  24. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  25. package/bundles/cdk-drag-drop.umd.min.js +2 -1
  26. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  27. package/bundles/cdk-keycodes.umd.js +12 -2
  28. package/bundles/cdk-keycodes.umd.js.map +1 -1
  29. package/bundles/cdk-layout.umd.js +29 -22
  30. package/bundles/cdk-layout.umd.js.map +1 -1
  31. package/bundles/cdk-layout.umd.min.js +1 -1
  32. package/bundles/cdk-layout.umd.min.js.map +1 -1
  33. package/bundles/cdk-observers.umd.js +27 -8
  34. package/bundles/cdk-observers.umd.js.map +1 -1
  35. package/bundles/cdk-observers.umd.min.js +1 -1
  36. package/bundles/cdk-observers.umd.min.js.map +1 -1
  37. package/bundles/cdk-overlay.umd.js +586 -240
  38. package/bundles/cdk-overlay.umd.js.map +1 -1
  39. package/bundles/cdk-overlay.umd.min.js +2 -2
  40. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  41. package/bundles/cdk-platform.umd.js +50 -28
  42. package/bundles/cdk-platform.umd.js.map +1 -1
  43. package/bundles/cdk-platform.umd.min.js.map +1 -1
  44. package/bundles/cdk-portal.umd.js +17 -10
  45. package/bundles/cdk-portal.umd.js.map +1 -1
  46. package/bundles/cdk-portal.umd.min.js.map +1 -1
  47. package/bundles/cdk-scrolling.umd.js +148 -50
  48. package/bundles/cdk-scrolling.umd.js.map +1 -1
  49. package/bundles/cdk-scrolling.umd.min.js +1 -1
  50. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  51. package/bundles/cdk-stepper.umd.js +69 -27
  52. package/bundles/cdk-stepper.umd.js.map +1 -1
  53. package/bundles/cdk-stepper.umd.min.js +1 -1
  54. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  55. package/bundles/cdk-table.umd.js +189 -51
  56. package/bundles/cdk-table.umd.js.map +1 -1
  57. package/bundles/cdk-table.umd.min.js +1 -1
  58. package/bundles/cdk-table.umd.min.js.map +1 -1
  59. package/bundles/cdk-text-field.umd.js +76 -38
  60. package/bundles/cdk-text-field.umd.js.map +1 -1
  61. package/bundles/cdk-text-field.umd.min.js +1 -1
  62. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  63. package/bundles/cdk-tree.umd.js +71 -34
  64. package/bundles/cdk-tree.umd.js.map +1 -1
  65. package/bundles/cdk-tree.umd.min.js +1 -1
  66. package/bundles/cdk-tree.umd.min.js.map +1 -1
  67. package/bundles/cdk.umd.js +5 -4
  68. package/bundles/cdk.umd.js.map +1 -1
  69. package/bundles/cdk.umd.min.js +1 -1
  70. package/bundles/cdk.umd.min.js.map +1 -1
  71. package/coercion/typings/element.d.ts +13 -0
  72. package/coercion/typings/index.metadata.json +1 -1
  73. package/coercion/typings/public-api.d.ts +1 -0
  74. package/drag-drop/typings/{drag-handle.d.ts → directives/drag-handle.d.ts} +6 -2
  75. package/drag-drop/typings/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  76. package/drag-drop/typings/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  77. package/drag-drop/typings/directives/drag.d.ts +110 -0
  78. package/{typings/esm5/drag-drop → drag-drop/typings/directives}/drop-list-group.d.ts +3 -0
  79. package/drag-drop/typings/{drop-list.d.ts → directives/drop-list.d.ts} +32 -72
  80. package/drag-drop/typings/drag-drop-registry.d.ts +8 -3
  81. package/drag-drop/typings/drag-events.d.ts +14 -7
  82. package/{typings/esm5/drag-drop/drag.d.ts → drag-drop/typings/drag-ref.d.ts} +152 -83
  83. package/drag-drop/typings/drop-list-container.d.ts +19 -3
  84. package/drag-drop/typings/drop-list-ref.d.ts +234 -0
  85. package/drag-drop/typings/index.d.ts +1 -0
  86. package/drag-drop/typings/index.metadata.json +1 -1
  87. package/drag-drop/typings/public-api.d.ts +13 -6
  88. package/esm2015/a11y.js +306 -182
  89. package/esm2015/a11y.js.map +1 -1
  90. package/esm2015/accordion.js +16 -11
  91. package/esm2015/accordion.js.map +1 -1
  92. package/esm2015/bidi.js +13 -8
  93. package/esm2015/bidi.js.map +1 -1
  94. package/esm2015/cdk.js +7 -6
  95. package/esm2015/cdk.js.map +1 -1
  96. package/esm2015/coercion.js +25 -8
  97. package/esm2015/coercion.js.map +1 -1
  98. package/esm2015/collections.js +22 -7
  99. package/esm2015/collections.js.map +1 -1
  100. package/esm2015/drag-drop.js +1774 -864
  101. package/esm2015/drag-drop.js.map +1 -1
  102. package/esm2015/keycodes.js +14 -4
  103. package/esm2015/keycodes.js.map +1 -1
  104. package/esm2015/layout.js +29 -19
  105. package/esm2015/layout.js.map +1 -1
  106. package/esm2015/observers.js +16 -11
  107. package/esm2015/observers.js.map +1 -1
  108. package/esm2015/overlay.js +373 -213
  109. package/esm2015/overlay.js.map +1 -1
  110. package/esm2015/platform.js +53 -31
  111. package/esm2015/platform.js.map +1 -1
  112. package/esm2015/portal.js +14 -10
  113. package/esm2015/portal.js.map +1 -1
  114. package/esm2015/scrolling.js +111 -51
  115. package/esm2015/scrolling.js.map +1 -1
  116. package/esm2015/stepper.js +56 -30
  117. package/esm2015/stepper.js.map +1 -1
  118. package/esm2015/table.js +96 -48
  119. package/esm2015/table.js.map +1 -1
  120. package/esm2015/text-field.js +54 -37
  121. package/esm2015/text-field.js.map +1 -1
  122. package/esm2015/tree.js +55 -36
  123. package/esm2015/tree.js.map +1 -1
  124. package/esm5/a11y.es5.js +432 -201
  125. package/esm5/a11y.es5.js.map +1 -1
  126. package/esm5/accordion.es5.js +18 -11
  127. package/esm5/accordion.es5.js.map +1 -1
  128. package/esm5/bidi.es5.js +13 -8
  129. package/esm5/bidi.es5.js.map +1 -1
  130. package/esm5/cdk.es5.js +7 -6
  131. package/esm5/cdk.es5.js.map +1 -1
  132. package/esm5/coercion.es5.js +25 -8
  133. package/esm5/coercion.es5.js.map +1 -1
  134. package/esm5/collections.es5.js +35 -7
  135. package/esm5/collections.es5.js.map +1 -1
  136. package/esm5/drag-drop.es5.js +2358 -1035
  137. package/esm5/drag-drop.es5.js.map +1 -1
  138. package/esm5/keycodes.es5.js +14 -4
  139. package/esm5/keycodes.es5.js.map +1 -1
  140. package/esm5/layout.es5.js +31 -24
  141. package/esm5/layout.es5.js.map +1 -1
  142. package/esm5/observers.es5.js +30 -11
  143. package/esm5/observers.es5.js.map +1 -1
  144. package/esm5/overlay.es5.js +590 -244
  145. package/esm5/overlay.es5.js.map +1 -1
  146. package/esm5/platform.es5.js +52 -30
  147. package/esm5/platform.es5.js.map +1 -1
  148. package/esm5/portal.es5.js +19 -12
  149. package/esm5/portal.es5.js.map +1 -1
  150. package/esm5/scrolling.es5.js +150 -52
  151. package/esm5/scrolling.es5.js.map +1 -1
  152. package/esm5/stepper.es5.js +71 -30
  153. package/esm5/stepper.es5.js.map +1 -1
  154. package/esm5/table.es5.js +191 -53
  155. package/esm5/table.es5.js.map +1 -1
  156. package/esm5/text-field.es5.js +75 -37
  157. package/esm5/text-field.es5.js.map +1 -1
  158. package/esm5/tree.es5.js +74 -37
  159. package/esm5/tree.es5.js.map +1 -1
  160. package/overlay/typings/index.metadata.json +1 -1
  161. package/overlay/typings/overlay-directives.d.ts +0 -2
  162. package/overlay/typings/overlay-ref.d.ts +1 -1
  163. package/package.json +4 -4
  164. package/portal/typings/portal.d.ts +1 -1
  165. package/schematics/migration.json +5 -0
  166. package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
  167. package/schematics/ng-update/index.d.ts +2 -0
  168. package/schematics/ng-update/index.js +5 -0
  169. package/schematics/ng-update/index.js.map +1 -1
  170. package/schematics/ng-update/target-version.d.ts +7 -1
  171. package/schematics/ng-update/target-version.js +10 -0
  172. package/schematics/ng-update/target-version.js.map +1 -1
  173. package/schematics/ng-update/upgrade-data.js +2 -1
  174. package/schematics/ng-update/upgrade-data.js.map +1 -1
  175. package/schematics/ng-update/upgrade-rules/index.js +3 -2
  176. package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
  177. package/schematics/utils/ast/ng-module-imports.d.ts +1 -1
  178. package/schematics/utils/ast/ng-module-imports.js +25 -13
  179. package/schematics/utils/ast/ng-module-imports.js.map +1 -1
  180. package/schematics/utils/get-project.js +2 -1
  181. package/schematics/utils/get-project.js.map +1 -1
  182. package/schematics/utils/parse5-element.js +3 -2
  183. package/schematics/utils/parse5-element.js.map +1 -1
  184. package/schematics/utils/project-targets.js +2 -1
  185. package/schematics/utils/project-targets.js.map +1 -1
  186. package/schematics/utils/version-agnostic-typescript.js +3 -2
  187. package/schematics/utils/version-agnostic-typescript.js.map +1 -1
  188. package/scrolling/typings/index.metadata.json +1 -1
  189. package/stepper/typings/index.metadata.json +1 -1
  190. package/stepper/typings/stepper.d.ts +13 -1
  191. package/text-field/typings/autosize.d.ts +6 -0
  192. package/text-field/typings/index.metadata.json +1 -1
  193. package/tree/typings/control/base-tree-control.d.ts +1 -1
  194. package/tree/typings/control/nested-tree-control.d.ts +2 -2
  195. package/tree/typings/control/tree-control.d.ts +1 -1
  196. package/tree/typings/nested-node.d.ts +5 -5
  197. package/typings/a11y/focus-monitor/focus-monitor.d.ts +20 -5
  198. package/typings/a11y/focus-trap/focus-trap.d.ts +2 -0
  199. package/typings/a11y/index.metadata.json +1 -1
  200. package/typings/coercion/element.d.ts +13 -0
  201. package/typings/coercion/index.metadata.json +1 -1
  202. package/typings/coercion/public-api.d.ts +1 -0
  203. package/typings/drag-drop/{drag-handle.d.ts → directives/drag-handle.d.ts} +6 -2
  204. package/typings/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
  205. package/typings/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
  206. package/typings/drag-drop/directives/drag.d.ts +110 -0
  207. package/typings/drag-drop/{drop-list-group.d.ts → directives/drop-list-group.d.ts} +3 -0
  208. package/typings/{esm5/drag-drop → drag-drop/directives}/drop-list.d.ts +32 -72
  209. package/typings/drag-drop/drag-drop-registry.d.ts +8 -3
  210. package/typings/drag-drop/drag-events.d.ts +14 -7
  211. package/typings/drag-drop/{drag.d.ts → drag-ref.d.ts} +152 -83
  212. package/typings/drag-drop/drop-list-container.d.ts +19 -3
  213. package/typings/drag-drop/drop-list-ref.d.ts +234 -0
  214. package/typings/drag-drop/index.d.ts +1 -0
  215. package/typings/drag-drop/index.metadata.json +1 -1
  216. package/typings/drag-drop/public-api.d.ts +13 -6
  217. package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +20 -5
  218. package/typings/esm5/a11y/focus-trap/focus-trap.d.ts +2 -0
  219. package/typings/esm5/a11y/index.metadata.json +1 -1
  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/esm5/drag-drop/{drag-handle.d.ts → directives/drag-handle.d.ts} +6 -2
  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 +110 -0
  227. package/{drag-drop/typings → typings/esm5/drag-drop/directives}/drop-list-group.d.ts +3 -0
  228. package/typings/{drag-drop → esm5/drag-drop/directives}/drop-list.d.ts +32 -72
  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 -83
  232. package/typings/esm5/drag-drop/drop-list-container.d.ts +19 -3
  233. package/typings/esm5/drag-drop/drop-list-ref.d.ts +234 -0
  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/overlay/index.metadata.json +1 -1
  239. package/typings/esm5/overlay/overlay-directives.d.ts +0 -2
  240. package/typings/esm5/overlay/overlay-ref.d.ts +1 -1
  241. package/typings/esm5/portal/portal.d.ts +1 -1
  242. package/typings/esm5/scrolling/index.metadata.json +1 -1
  243. package/typings/esm5/stepper/index.metadata.json +1 -1
  244. package/typings/esm5/stepper/stepper.d.ts +13 -1
  245. package/typings/esm5/text-field/autosize.d.ts +6 -0
  246. package/typings/esm5/text-field/index.metadata.json +1 -1
  247. package/typings/esm5/tree/control/base-tree-control.d.ts +1 -1
  248. package/typings/esm5/tree/control/nested-tree-control.d.ts +2 -2
  249. package/typings/esm5/tree/control/tree-control.d.ts +1 -1
  250. package/typings/esm5/tree/nested-node.d.ts +5 -5
  251. package/typings/index.metadata.json +1 -1
  252. package/typings/overlay/index.metadata.json +1 -1
  253. package/typings/overlay/overlay-directives.d.ts +0 -2
  254. package/typings/overlay/overlay-ref.d.ts +1 -1
  255. package/typings/portal/portal.d.ts +1 -1
  256. package/typings/schematics/ng-update/index.d.ts +2 -0
  257. package/typings/schematics/ng-update/target-version.d.ts +7 -1
  258. package/typings/schematics/utils/ast/ng-module-imports.d.ts +1 -1
  259. package/typings/scrolling/index.metadata.json +1 -1
  260. package/typings/stepper/index.metadata.json +1 -1
  261. package/typings/stepper/stepper.d.ts +13 -1
  262. package/typings/text-field/autosize.d.ts +6 -0
  263. package/typings/text-field/index.metadata.json +1 -1
  264. package/typings/tree/control/base-tree-control.d.ts +1 -1
  265. package/typings/tree/control/nested-tree-control.d.ts +2 -2
  266. package/typings/tree/control/tree-control.d.ts +1 -1
  267. package/typings/tree/nested-node.d.ts +5 -5
package/esm5/tree.es5.js CHANGED
@@ -8,7 +8,7 @@
8
8
  import { SelectionModel } from '@angular/cdk/collections';
9
9
  import { __extends } from 'tslib';
10
10
  import { Observable, BehaviorSubject, of, Subject } from 'rxjs';
11
- import { take, takeUntil } from 'rxjs/operators';
11
+ import { take, filter, takeUntil } from 'rxjs/operators';
12
12
  import { Directive, TemplateRef, ViewContainerRef, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, ElementRef, Input, IterableDiffers, ViewChild, ViewEncapsulation, Optional, Renderer2, NgModule } from '@angular/core';
13
13
  import { Directionality } from '@angular/cdk/bidi';
14
14
  import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
@@ -17,7 +17,7 @@ import { CommonModule } from '@angular/common';
17
17
 
18
18
  /**
19
19
  * @fileoverview added by tsickle
20
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
20
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
21
21
  */
22
22
  /**
23
23
  * Base tree control. It has basic toggle/expand/collapse operations on a single data node.
@@ -161,7 +161,7 @@ BaseTreeControl = /** @class */ (function () {
161
161
 
162
162
  /**
163
163
  * @fileoverview added by tsickle
164
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
164
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
165
165
  */
166
166
  /**
167
167
  * Flat tree control. Able to expand/collapse a subtree recursively for flattened tree.
@@ -247,7 +247,7 @@ FlatTreeControl = /** @class */ (function (_super) {
247
247
 
248
248
  /**
249
249
  * @fileoverview added by tsickle
250
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
250
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
251
251
  */
252
252
  /**
253
253
  * Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type.
@@ -316,12 +316,14 @@ NestedTreeControl = /** @class */ (function (_super) {
316
316
  /** A helper function to get descendants recursively. */
317
317
  /**
318
318
  * A helper function to get descendants recursively.
319
+ * @protected
319
320
  * @param {?} descendants
320
321
  * @param {?} dataNode
321
322
  * @return {?}
322
323
  */
323
324
  NestedTreeControl.prototype._getDescendants = /**
324
325
  * A helper function to get descendants recursively.
326
+ * @protected
325
327
  * @param {?} descendants
326
328
  * @param {?} dataNode
327
329
  * @return {?}
@@ -335,7 +337,7 @@ NestedTreeControl = /** @class */ (function (_super) {
335
337
  childrenNodes.forEach(function (child) { return _this._getDescendants(descendants, child); });
336
338
  }
337
339
  else if (childrenNodes instanceof Observable) {
338
- childrenNodes.pipe(take(1)).subscribe(function (children) {
340
+ childrenNodes.pipe(take(1), filter(Boolean)).subscribe(function (children) {
339
341
  children.forEach(function (child) { return _this._getDescendants(descendants, child); });
340
342
  });
341
343
  }
@@ -345,7 +347,12 @@ NestedTreeControl = /** @class */ (function (_super) {
345
347
 
346
348
  /**
347
349
  * @fileoverview added by tsickle
348
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
350
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
351
+ */
352
+
353
+ /**
354
+ * @fileoverview added by tsickle
355
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
349
356
  */
350
357
  /**
351
358
  * Context provided to the tree node component.
@@ -388,7 +395,7 @@ var CdkTreeNodeDef = /** @class */ (function () {
388
395
 
389
396
  /**
390
397
  * @fileoverview added by tsickle
391
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
398
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
392
399
  */
393
400
  /**
394
401
  * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes
@@ -412,7 +419,7 @@ var CdkTreeNodeOutlet = /** @class */ (function () {
412
419
 
413
420
  /**
414
421
  * @fileoverview added by tsickle
415
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
422
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
416
423
  */
417
424
 
418
425
  /**
@@ -458,7 +465,7 @@ function getTreeControlFunctionsMissingError() {
458
465
 
459
466
  /**
460
467
  * @fileoverview added by tsickle
461
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
468
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
462
469
  */
463
470
  /**
464
471
  * CDK tree component that connects with a data source to retrieve data of type `T` and renders
@@ -477,6 +484,8 @@ var CdkTree = /** @class */ (function () {
477
484
  * Level of nodes
478
485
  */
479
486
  this._levels = new Map();
487
+ // TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.
488
+ // Remove the MAX_VALUE in viewChange
480
489
  /**
481
490
  * Stream containing the latest information on what rows are being displayed on screen.
482
491
  * Can be used by the data source to as a heuristic of what data should be provided.
@@ -530,8 +539,8 @@ var CdkTree = /** @class */ (function () {
530
539
  this._nodeOutlet.viewContainer.clear();
531
540
  this._onDestroy.next();
532
541
  this._onDestroy.complete();
533
- if (this._dataSource && typeof (/** @type {?} */ (this._dataSource)).disconnect === 'function') {
534
- (/** @type {?} */ (this.dataSource)).disconnect(this);
542
+ if (this._dataSource && typeof ((/** @type {?} */ (this._dataSource))).disconnect === 'function') {
543
+ ((/** @type {?} */ (this.dataSource))).disconnect(this);
535
544
  }
536
545
  if (this._dataSubscription) {
537
546
  this._dataSubscription.unsubscribe();
@@ -555,23 +564,37 @@ var CdkTree = /** @class */ (function () {
555
564
  this._observeRenderChanges();
556
565
  }
557
566
  };
567
+ // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL
568
+ // and nested trees.
558
569
  /**
559
570
  * Switch to the provided data source by resetting the data and unsubscribing from the current
560
571
  * render change subscription if one exists. If the data source is null, interpret this by
561
572
  * clearing the node outlet. Otherwise start listening for new data.
573
+ */
574
+ // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL
575
+ // and nested trees.
576
+ /**
577
+ * Switch to the provided data source by resetting the data and unsubscribing from the current
578
+ * render change subscription if one exists. If the data source is null, interpret this by
579
+ * clearing the node outlet. Otherwise start listening for new data.
580
+ * @private
562
581
  * @param {?} dataSource
563
582
  * @return {?}
564
583
  */
565
- CdkTree.prototype._switchDataSource = /**
584
+ CdkTree.prototype._switchDataSource =
585
+ // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL
586
+ // and nested trees.
587
+ /**
566
588
  * Switch to the provided data source by resetting the data and unsubscribing from the current
567
589
  * render change subscription if one exists. If the data source is null, interpret this by
568
590
  * clearing the node outlet. Otherwise start listening for new data.
591
+ * @private
569
592
  * @param {?} dataSource
570
593
  * @return {?}
571
594
  */
572
595
  function (dataSource) {
573
- if (this._dataSource && typeof (/** @type {?} */ (this._dataSource)).disconnect === 'function') {
574
- (/** @type {?} */ (this.dataSource)).disconnect(this);
596
+ if (this._dataSource && typeof ((/** @type {?} */ (this._dataSource))).disconnect === 'function') {
597
+ ((/** @type {?} */ (this.dataSource))).disconnect(this);
575
598
  }
576
599
  if (this._dataSubscription) {
577
600
  this._dataSubscription.unsubscribe();
@@ -586,12 +609,15 @@ var CdkTree = /** @class */ (function () {
586
609
  this._observeRenderChanges();
587
610
  }
588
611
  };
612
+ /** Set up a subscription for the data provided by the data source. */
589
613
  /**
590
614
  * Set up a subscription for the data provided by the data source.
615
+ * @private
591
616
  * @return {?}
592
617
  */
593
618
  CdkTree.prototype._observeRenderChanges = /**
594
619
  * Set up a subscription for the data provided by the data source.
620
+ * @private
595
621
  * @return {?}
596
622
  */
597
623
  function () {
@@ -600,8 +626,8 @@ var CdkTree = /** @class */ (function () {
600
626
  var dataStream;
601
627
  // Cannot use `instanceof DataSource` since the data source could be a literal with
602
628
  // `connect` function and may not extends DataSource.
603
- if (typeof (/** @type {?} */ (this._dataSource)).connect === 'function') {
604
- dataStream = (/** @type {?} */ (this._dataSource)).connect(this);
629
+ if (typeof ((/** @type {?} */ (this._dataSource))).connect === 'function') {
630
+ dataStream = ((/** @type {?} */ (this._dataSource))).connect(this);
605
631
  }
606
632
  else if (this._dataSource instanceof Observable) {
607
633
  dataStream = this._dataSource;
@@ -645,16 +671,16 @@ var CdkTree = /** @class */ (function () {
645
671
  }
646
672
  changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {
647
673
  if (item.previousIndex == null) {
648
- _this.insertNode(data[/** @type {?} */ ((currentIndex))], /** @type {?} */ ((currentIndex)), viewContainer, parentData);
674
+ _this.insertNode(data[(/** @type {?} */ (currentIndex))], (/** @type {?} */ (currentIndex)), viewContainer, parentData);
649
675
  }
650
676
  else if (currentIndex == null) {
651
- viewContainer.remove(/** @type {?} */ ((adjustedPreviousIndex)));
677
+ viewContainer.remove((/** @type {?} */ (adjustedPreviousIndex)));
652
678
  _this._levels.delete(item.item);
653
679
  }
654
680
  else {
655
681
  /** @type {?} */
656
- var view = viewContainer.get(/** @type {?} */ ((adjustedPreviousIndex)));
657
- viewContainer.move(/** @type {?} */ ((view)), currentIndex);
682
+ var view = viewContainer.get((/** @type {?} */ (adjustedPreviousIndex)));
683
+ viewContainer.move((/** @type {?} */ (view)), currentIndex);
658
684
  }
659
685
  });
660
686
  this._changeDetectorRef.detectChanges();
@@ -719,6 +745,7 @@ var CdkTree = /** @class */ (function () {
719
745
  function (nodeData, index, viewContainer, parentData) {
720
746
  /** @type {?} */
721
747
  var node = this._getNodeDef(nodeData, index);
748
+ // Node context that will be provided to created embedded view
722
749
  /** @type {?} */
723
750
  var context = new CdkTreeNodeOutletContext(nodeData);
724
751
  // If the tree is flat tree, then use the `getLevel` function in flat tree control
@@ -727,12 +754,13 @@ var CdkTree = /** @class */ (function () {
727
754
  context.level = this.treeControl.getLevel(nodeData);
728
755
  }
729
756
  else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {
730
- context.level = /** @type {?} */ ((this._levels.get(parentData))) + 1;
757
+ context.level = (/** @type {?} */ (this._levels.get(parentData))) + 1;
731
758
  }
732
759
  else {
733
760
  context.level = 0;
734
761
  }
735
762
  this._levels.set(nodeData, context.level);
763
+ // Use default tree nodeOutlet, or nested node's nodeOutlet
736
764
  /** @type {?} */
737
765
  var container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;
738
766
  container.createEmbeddedView(node.template, context, index);
@@ -786,7 +814,7 @@ var CdkTreeNode = /** @class */ (function () {
786
814
  * and 'treeitem' if it's a leaf node.
787
815
  */
788
816
  this.role = 'treeitem';
789
- CdkTreeNode.mostRecentTreeNode = /** @type {?} */ (this);
817
+ CdkTreeNode.mostRecentTreeNode = (/** @type {?} */ (this));
790
818
  }
791
819
  Object.defineProperty(CdkTreeNode.prototype, "data", {
792
820
  /** The tree node's data. */
@@ -854,9 +882,11 @@ var CdkTreeNode = /** @class */ (function () {
854
882
  this._elementRef.nativeElement.focus();
855
883
  };
856
884
  /**
885
+ * @protected
857
886
  * @return {?}
858
887
  */
859
888
  CdkTreeNode.prototype._setRoleFromData = /**
889
+ * @protected
860
890
  * @return {?}
861
891
  */
862
892
  function () {
@@ -871,7 +901,7 @@ var CdkTreeNode = /** @class */ (function () {
871
901
  /** @type {?} */
872
902
  var childrenNodes = this._tree.treeControl.getChildren(this._data);
873
903
  if (Array.isArray(childrenNodes)) {
874
- this._setRoleFromChildren(/** @type {?} */ (childrenNodes));
904
+ this._setRoleFromChildren((/** @type {?} */ (childrenNodes)));
875
905
  }
876
906
  else if (childrenNodes instanceof Observable) {
877
907
  childrenNodes.pipe(takeUntil(this._destroyed))
@@ -880,10 +910,12 @@ var CdkTreeNode = /** @class */ (function () {
880
910
  }
881
911
  };
882
912
  /**
913
+ * @protected
883
914
  * @param {?} children
884
915
  * @return {?}
885
916
  */
886
917
  CdkTreeNode.prototype._setRoleFromChildren = /**
918
+ * @protected
887
919
  * @param {?} children
888
920
  * @return {?}
889
921
  */
@@ -920,7 +952,7 @@ var CdkTreeNode = /** @class */ (function () {
920
952
 
921
953
  /**
922
954
  * @fileoverview added by tsickle
923
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
955
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
924
956
  */
925
957
  /**
926
958
  * Nested node is a child of `<cdk-tree>`. It works with nested tree.
@@ -928,19 +960,19 @@ var CdkTreeNode = /** @class */ (function () {
928
960
  * be added in the `cdkTreeNodeOutlet` in tree node template.
929
961
  * For example:
930
962
  * ```html
931
- * <cdk-mested-tree-node>
963
+ * <cdk-nested-tree-node>
932
964
  * {{node.name}}
933
965
  * <ng-template cdkTreeNodeOutlet></ng-template>
934
- * </cdk-tree-node>
966
+ * </cdk-nested-tree-node>
935
967
  * ```
936
968
  * The children of node will be automatically added to `cdkTreeNodeOutlet`, the result dom will be
937
969
  * like this:
938
970
  * ```html
939
971
  * <cdk-nested-tree-node>
940
972
  * {{node.name}}
941
- * <cdk-nested-tree-node>{{child1.name}}</cdk-tree-node>
942
- * <cdk-nested-tree-node>{{child2.name}}</cdk-tree-node>
943
- * </cdk-tree-node>
973
+ * <cdk-nested-tree-node>{{child1.name}}</cdk-nested-tree-node>
974
+ * <cdk-nested-tree-node>{{child2.name}}</cdk-nested-tree-node>
975
+ * </cdk-nested-tree-node>
944
976
  * ```
945
977
  * @template T
946
978
  */
@@ -968,7 +1000,7 @@ var CdkNestedTreeNode = /** @class */ (function (_super) {
968
1000
  /** @type {?} */
969
1001
  var childrenNodes = this._tree.treeControl.getChildren(this.data);
970
1002
  if (Array.isArray(childrenNodes)) {
971
- this.updateChildrenNodes(/** @type {?} */ (childrenNodes));
1003
+ this.updateChildrenNodes((/** @type {?} */ (childrenNodes)));
972
1004
  }
973
1005
  else if (childrenNodes instanceof Observable) {
974
1006
  childrenNodes.pipe(takeUntil(this._destroyed))
@@ -990,11 +1022,13 @@ var CdkNestedTreeNode = /** @class */ (function (_super) {
990
1022
  /** Add children dataNodes to the NodeOutlet */
991
1023
  /**
992
1024
  * Add children dataNodes to the NodeOutlet
1025
+ * @protected
993
1026
  * @param {?=} children
994
1027
  * @return {?}
995
1028
  */
996
1029
  CdkNestedTreeNode.prototype.updateChildrenNodes = /**
997
1030
  * Add children dataNodes to the NodeOutlet
1031
+ * @protected
998
1032
  * @param {?=} children
999
1033
  * @return {?}
1000
1034
  */
@@ -1015,10 +1049,12 @@ var CdkNestedTreeNode = /** @class */ (function (_super) {
1015
1049
  /** Clear the children dataNodes. */
1016
1050
  /**
1017
1051
  * Clear the children dataNodes.
1052
+ * @protected
1018
1053
  * @return {?}
1019
1054
  */
1020
1055
  CdkNestedTreeNode.prototype._clear = /**
1021
1056
  * Clear the children dataNodes.
1057
+ * @protected
1022
1058
  * @return {?}
1023
1059
  */
1024
1060
  function () {
@@ -1053,11 +1089,12 @@ var CdkNestedTreeNode = /** @class */ (function (_super) {
1053
1089
 
1054
1090
  /**
1055
1091
  * @fileoverview added by tsickle
1056
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1092
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1057
1093
  */
1058
- /** *
1094
+ /**
1059
1095
  * Regex used to split a string on its CSS units.
1060
- @type {?} */
1096
+ * @type {?}
1097
+ */
1061
1098
  var cssUnitPattern = /([A-Za-z%]+)$/;
1062
1099
  /**
1063
1100
  * Indent for the children tree dataNodes.
@@ -1200,7 +1237,7 @@ var CdkTreeNodePadding = /** @class */ (function () {
1200
1237
 
1201
1238
  /**
1202
1239
  * @fileoverview added by tsickle
1203
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1240
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1204
1241
  */
1205
1242
  /**
1206
1243
  * Node toggle to expand/collapse the node.
@@ -1262,7 +1299,7 @@ var CdkTreeNodeToggle = /** @class */ (function () {
1262
1299
 
1263
1300
  /**
1264
1301
  * @fileoverview added by tsickle
1265
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1302
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1266
1303
  */
1267
1304
  /** @type {?} */
1268
1305
  var EXPORTED_DECLARATIONS = [
@@ -1290,12 +1327,12 @@ var CdkTreeModule = /** @class */ (function () {
1290
1327
 
1291
1328
  /**
1292
1329
  * @fileoverview added by tsickle
1293
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1330
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1294
1331
  */
1295
1332
 
1296
1333
  /**
1297
1334
  * @fileoverview added by tsickle
1298
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1335
+ * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1299
1336
  */
1300
1337
 
1301
1338
  export { BaseTreeControl, FlatTreeControl, NestedTreeControl, CdkNestedTreeNode, CdkTreeNodeOutletContext, CdkTreeNodeDef, CdkTreeNodePadding, CdkTreeNodeOutlet, CdkTree, CdkTreeNode, getTreeNoValidDataSourceError, getTreeMultipleDefaultNodeDefsError, getTreeMissingMatchingNodeDefError, getTreeControlMissingError, getTreeControlFunctionsMissingError, CdkTreeModule, CdkTreeNodeToggle };