@angular/cdk 2.0.0-beta.11 → 2.0.0-beta.12

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 (306) hide show
  1. package/_a11y.scss +23 -0
  2. package/_overlay.scss +93 -0
  3. package/a11y/index.metadata.json +2 -1
  4. package/a11y/typings/a11y-module.d.ts +2 -0
  5. package/a11y/typings/focus-monitor.d.ts +1 -1
  6. package/a11y/typings/index.d.ts +1 -1
  7. package/a11y/typings/index.metadata.json +1 -1
  8. package/a11y/typings/{public_api.d.ts → public-api.d.ts} +8 -2
  9. package/a11y-prebuilt.css +1 -0
  10. package/a11y.metadata.json +2 -1
  11. package/bidi/index.metadata.json +2 -1
  12. package/bidi/typings/bidi-module.d.ts +2 -0
  13. package/bidi/typings/index.d.ts +1 -1
  14. package/bidi/typings/index.metadata.json +1 -1
  15. package/bidi/typings/public-api.d.ts +10 -0
  16. package/bidi.metadata.json +2 -1
  17. package/bundles/cdk-a11y.umd.js +1368 -1357
  18. package/bundles/cdk-a11y.umd.js.map +1 -1
  19. package/bundles/cdk-a11y.umd.min.js +2 -2
  20. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  21. package/bundles/cdk-bidi.umd.js +42 -40
  22. package/bundles/cdk-bidi.umd.js.map +1 -1
  23. package/bundles/cdk-bidi.umd.min.js +2 -2
  24. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  25. package/bundles/cdk-coercion.umd.js +12 -0
  26. package/bundles/cdk-coercion.umd.js.map +1 -1
  27. package/bundles/cdk-coercion.umd.min.js +2 -2
  28. package/bundles/cdk-coercion.umd.min.js.map +1 -1
  29. package/bundles/cdk-collections.umd.js +113 -11
  30. package/bundles/cdk-collections.umd.js.map +1 -1
  31. package/bundles/cdk-collections.umd.min.js +2 -2
  32. package/bundles/cdk-collections.umd.min.js.map +1 -1
  33. package/bundles/cdk-keycodes.umd.js.map +1 -1
  34. package/bundles/cdk-keycodes.umd.min.js +1 -1
  35. package/bundles/cdk-keycodes.umd.min.js.map +1 -1
  36. package/bundles/cdk-layout.umd.js +235 -0
  37. package/bundles/cdk-layout.umd.js.map +1 -0
  38. package/bundles/cdk-layout.umd.min.js +9 -0
  39. package/bundles/cdk-layout.umd.min.js.map +1 -0
  40. package/bundles/cdk-observers.umd.js +41 -40
  41. package/bundles/cdk-observers.umd.js.map +1 -1
  42. package/bundles/cdk-observers.umd.min.js +2 -2
  43. package/bundles/cdk-observers.umd.min.js.map +1 -1
  44. package/bundles/cdk-overlay.umd.js +306 -265
  45. package/bundles/cdk-overlay.umd.js.map +1 -1
  46. package/bundles/cdk-overlay.umd.min.js +2 -2
  47. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  48. package/bundles/cdk-platform.umd.js +19 -17
  49. package/bundles/cdk-platform.umd.js.map +1 -1
  50. package/bundles/cdk-platform.umd.min.js +2 -2
  51. package/bundles/cdk-platform.umd.min.js.map +1 -1
  52. package/bundles/cdk-portal.umd.js +71 -37
  53. package/bundles/cdk-portal.umd.js.map +1 -1
  54. package/bundles/cdk-portal.umd.min.js +2 -2
  55. package/bundles/cdk-portal.umd.min.js.map +1 -1
  56. package/bundles/cdk-rxjs.umd.js +13 -4
  57. package/bundles/cdk-rxjs.umd.js.map +1 -1
  58. package/bundles/cdk-rxjs.umd.min.js +2 -2
  59. package/bundles/cdk-rxjs.umd.min.js.map +1 -1
  60. package/bundles/cdk-scrolling.umd.js +89 -54
  61. package/bundles/cdk-scrolling.umd.js.map +1 -1
  62. package/bundles/cdk-scrolling.umd.min.js +2 -2
  63. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  64. package/bundles/cdk-stepper.umd.js +115 -90
  65. package/bundles/cdk-stepper.umd.js.map +1 -1
  66. package/bundles/cdk-stepper.umd.min.js +2 -2
  67. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  68. package/bundles/cdk-table.umd.js +261 -218
  69. package/bundles/cdk-table.umd.js.map +1 -1
  70. package/bundles/cdk-table.umd.min.js +2 -2
  71. package/bundles/cdk-table.umd.min.js.map +1 -1
  72. package/bundles/cdk.umd.js +1 -1
  73. package/bundles/cdk.umd.js.map +1 -1
  74. package/bundles/cdk.umd.min.js +2 -2
  75. package/bundles/cdk.umd.min.js.map +1 -1
  76. package/cdk.metadata.json +2 -1
  77. package/coercion/index.metadata.json +2 -1
  78. package/coercion/typings/array.d.ts +9 -0
  79. package/coercion/typings/index.d.ts +1 -1
  80. package/coercion/typings/index.metadata.json +1 -1
  81. package/{typings/coercion/public_api.d.ts → coercion/typings/public-api.d.ts} +1 -0
  82. package/coercion.metadata.json +2 -1
  83. package/collections/index.metadata.json +2 -1
  84. package/collections/typings/index.d.ts +2 -1
  85. package/collections/typings/index.metadata.json +1 -1
  86. package/{typings/collections/public_api.d.ts → collections/typings/public-api.d.ts} +1 -0
  87. package/collections/typings/selection.d.ts +13 -3
  88. package/collections/typings/unique-selection-dispatcher.d.ts +40 -0
  89. package/collections.metadata.json +2 -1
  90. package/esm2015/a11y.js +1252 -1250
  91. package/esm2015/a11y.js.map +1 -1
  92. package/esm2015/bidi.js +1 -1
  93. package/esm2015/bidi.js.map +1 -1
  94. package/esm2015/cdk.js +1 -1
  95. package/esm2015/cdk.js.map +1 -1
  96. package/esm2015/coercion.js +11 -1
  97. package/esm2015/coercion.js.map +1 -1
  98. package/esm2015/collections.js +93 -8
  99. package/esm2015/collections.js.map +1 -1
  100. package/esm2015/keycodes.js.map +1 -1
  101. package/esm2015/layout.js +226 -0
  102. package/esm2015/layout.js.map +1 -0
  103. package/esm2015/observers.js +8 -7
  104. package/esm2015/observers.js.map +1 -1
  105. package/esm2015/overlay.js +157 -136
  106. package/esm2015/overlay.js.map +1 -1
  107. package/esm2015/platform.js +1 -1
  108. package/esm2015/platform.js.map +1 -1
  109. package/esm2015/portal.js +30 -1
  110. package/esm2015/portal.js.map +1 -1
  111. package/esm2015/rxjs.js +5 -1
  112. package/esm2015/rxjs.js.map +1 -1
  113. package/esm2015/scrolling.js +39 -8
  114. package/esm2015/scrolling.js.map +1 -1
  115. package/esm2015/stepper.js +27 -5
  116. package/esm2015/stepper.js.map +1 -1
  117. package/esm2015/table.js +68 -29
  118. package/esm2015/table.js.map +1 -1
  119. package/esm5/a11y.es5.js +1372 -1357
  120. package/esm5/a11y.es5.js.map +1 -1
  121. package/esm5/bidi.es5.js +45 -40
  122. package/esm5/bidi.es5.js.map +1 -1
  123. package/esm5/cdk.es5.js +4 -1
  124. package/esm5/cdk.es5.js.map +1 -1
  125. package/esm5/coercion.es5.js +14 -1
  126. package/esm5/coercion.es5.js.map +1 -1
  127. package/esm5/collections.es5.js +110 -8
  128. package/esm5/collections.es5.js.map +1 -1
  129. package/esm5/keycodes.es5.js +2 -0
  130. package/esm5/keycodes.es5.js.map +1 -1
  131. package/esm5/layout.es5.js +234 -0
  132. package/esm5/layout.es5.js.map +1 -0
  133. package/esm5/observers.es5.js +44 -40
  134. package/esm5/observers.es5.js.map +1 -1
  135. package/esm5/overlay.es5.js +304 -259
  136. package/esm5/overlay.es5.js.map +1 -1
  137. package/esm5/platform.es5.js +22 -17
  138. package/esm5/platform.es5.js.map +1 -1
  139. package/esm5/portal.es5.js +81 -44
  140. package/esm5/portal.es5.js.map +1 -1
  141. package/esm5/rxjs.es5.js +12 -1
  142. package/esm5/rxjs.es5.js.map +1 -1
  143. package/esm5/scrolling.es5.js +89 -51
  144. package/esm5/scrolling.es5.js.map +1 -1
  145. package/esm5/stepper.es5.js +119 -91
  146. package/esm5/stepper.es5.js.map +1 -1
  147. package/esm5/table.es5.js +265 -218
  148. package/esm5/table.es5.js.map +1 -1
  149. package/keycodes/index.metadata.json +2 -1
  150. package/keycodes/typings/index.d.ts +1 -1
  151. package/keycodes/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  152. package/keycodes.metadata.json +2 -1
  153. package/layout/index.d.ts +8 -0
  154. package/layout/index.metadata.json +12 -0
  155. package/layout/package.json +7 -0
  156. package/layout/typings/breakpoints-observer.d.ts +37 -0
  157. package/layout/typings/breakpoints.d.ts +18 -0
  158. package/layout/typings/index.d.ts +4 -0
  159. package/layout/typings/index.metadata.json +1 -0
  160. package/layout/typings/media-matcher.d.ts +15 -0
  161. package/layout/typings/public-api.d.ts +5 -0
  162. package/layout.d.ts +8 -0
  163. package/layout.metadata.json +12 -0
  164. package/observers/index.metadata.json +2 -1
  165. package/observers/typings/index.d.ts +1 -1
  166. package/observers/typings/index.metadata.json +1 -1
  167. package/observers/typings/observe-content.d.ts +3 -3
  168. package/observers/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  169. package/observers.metadata.json +2 -1
  170. package/overlay/index.metadata.json +2 -1
  171. package/overlay/typings/index.d.ts +2 -2
  172. package/overlay/typings/index.metadata.json +1 -1
  173. package/overlay/typings/overlay-config.d.ts +1 -1
  174. package/overlay/typings/overlay-directives.d.ts +3 -3
  175. package/overlay/typings/overlay-module.d.ts +11 -0
  176. package/overlay/typings/overlay-ref.d.ts +6 -6
  177. package/overlay/typings/overlay.d.ts +2 -2
  178. package/overlay/typings/position/connected-position-strategy.d.ts +5 -0
  179. package/overlay/typings/position/position-strategy.d.ts +2 -0
  180. package/overlay/typings/{public_api.d.ts → public-api.d.ts} +1 -4
  181. package/overlay/typings/scroll/scroll-strategy.d.ts +1 -1
  182. package/overlay-prebuilt.css +1 -0
  183. package/overlay.metadata.json +2 -1
  184. package/package.json +3 -3
  185. package/platform/index.metadata.json +2 -1
  186. package/platform/typings/index.d.ts +1 -1
  187. package/platform/typings/index.metadata.json +1 -1
  188. package/platform/typings/platform-module.d.ts +2 -0
  189. package/platform/typings/public-api.d.ts +10 -0
  190. package/platform.metadata.json +2 -1
  191. package/portal/index.metadata.json +2 -1
  192. package/portal/typings/index.d.ts +1 -1
  193. package/portal/typings/index.metadata.json +1 -1
  194. package/portal/typings/{public_api.d.ts → public-api.d.ts} +1 -0
  195. package/portal.metadata.json +2 -1
  196. package/rxjs/index.metadata.json +2 -1
  197. package/rxjs/typings/index.d.ts +1 -1
  198. package/rxjs/typings/index.metadata.json +1 -1
  199. package/rxjs/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  200. package/rxjs/typings/rx-operators.d.ts +7 -0
  201. package/rxjs.metadata.json +2 -1
  202. package/scrolling/index.metadata.json +2 -1
  203. package/scrolling/typings/index.d.ts +1 -1
  204. package/scrolling/typings/index.metadata.json +1 -1
  205. package/scrolling/typings/public-api.d.ts +11 -0
  206. package/scrolling/typings/scrolling-module.d.ts +2 -0
  207. package/scrolling/typings/viewport-ruler.d.ts +20 -6
  208. package/scrolling.metadata.json +2 -1
  209. package/stepper/index.metadata.json +2 -1
  210. package/stepper/typings/index.d.ts +1 -1
  211. package/stepper/typings/index.metadata.json +1 -1
  212. package/stepper/typings/public-api.d.ts +11 -0
  213. package/stepper/typings/stepper-module.d.ts +2 -0
  214. package/stepper/typings/stepper.d.ts +8 -4
  215. package/stepper.metadata.json +2 -1
  216. package/table/index.metadata.json +2 -1
  217. package/table/typings/index.d.ts +1 -1
  218. package/table/typings/index.metadata.json +1 -1
  219. package/table/typings/public-api.d.ts +13 -0
  220. package/table/typings/row.d.ts +11 -3
  221. package/table/typings/table-errors.d.ts +10 -0
  222. package/table/typings/table-module.d.ts +2 -0
  223. package/table/typings/table.d.ts +17 -8
  224. package/table.metadata.json +2 -1
  225. package/typings/a11y/a11y-module.d.ts +2 -0
  226. package/typings/a11y/focus-monitor.d.ts +1 -1
  227. package/typings/a11y/index.d.ts +1 -1
  228. package/typings/a11y/index.metadata.json +1 -1
  229. package/typings/a11y/{public_api.d.ts → public-api.d.ts} +8 -2
  230. package/typings/bidi/bidi-module.d.ts +2 -0
  231. package/typings/bidi/index.d.ts +1 -1
  232. package/typings/bidi/index.metadata.json +1 -1
  233. package/typings/bidi/public-api.d.ts +10 -0
  234. package/typings/coercion/array.d.ts +9 -0
  235. package/typings/coercion/index.d.ts +1 -1
  236. package/typings/coercion/index.metadata.json +1 -1
  237. package/{coercion/typings/public_api.d.ts → typings/coercion/public-api.d.ts} +1 -0
  238. package/typings/collections/index.d.ts +2 -1
  239. package/typings/collections/index.metadata.json +1 -1
  240. package/{collections/typings/public_api.d.ts → typings/collections/public-api.d.ts} +1 -0
  241. package/typings/collections/selection.d.ts +13 -3
  242. package/typings/collections/unique-selection-dispatcher.d.ts +40 -0
  243. package/typings/index.d.ts +1 -1
  244. package/typings/index.metadata.json +1 -1
  245. package/typings/keycodes/index.d.ts +1 -1
  246. package/typings/keycodes/{public_api.d.ts → public-api.d.ts} +0 -0
  247. package/typings/layout/breakpoints-observer.d.ts +37 -0
  248. package/typings/layout/breakpoints.d.ts +18 -0
  249. package/typings/layout/index.d.ts +4 -0
  250. package/typings/layout/index.metadata.json +1 -0
  251. package/typings/layout/media-matcher.d.ts +15 -0
  252. package/typings/layout/public-api.d.ts +5 -0
  253. package/typings/observers/index.d.ts +1 -1
  254. package/typings/observers/index.metadata.json +1 -1
  255. package/typings/observers/observe-content.d.ts +3 -3
  256. package/typings/observers/{public_api.d.ts → public-api.d.ts} +0 -0
  257. package/typings/overlay/index.d.ts +2 -2
  258. package/typings/overlay/index.metadata.json +1 -1
  259. package/typings/overlay/overlay-config.d.ts +1 -1
  260. package/typings/overlay/overlay-directives.d.ts +3 -3
  261. package/typings/overlay/overlay-module.d.ts +11 -0
  262. package/typings/overlay/overlay-ref.d.ts +6 -6
  263. package/typings/overlay/overlay.d.ts +2 -2
  264. package/typings/overlay/position/connected-position-strategy.d.ts +5 -0
  265. package/typings/overlay/position/position-strategy.d.ts +2 -0
  266. package/typings/overlay/{public_api.d.ts → public-api.d.ts} +1 -4
  267. package/typings/overlay/scroll/scroll-strategy.d.ts +1 -1
  268. package/typings/platform/index.d.ts +1 -1
  269. package/typings/platform/index.metadata.json +1 -1
  270. package/typings/platform/platform-module.d.ts +2 -0
  271. package/typings/platform/public-api.d.ts +10 -0
  272. package/typings/portal/index.d.ts +1 -1
  273. package/typings/portal/index.metadata.json +1 -1
  274. package/typings/portal/{public_api.d.ts → public-api.d.ts} +1 -0
  275. package/typings/{public_api.d.ts → public-api.d.ts} +0 -0
  276. package/typings/rxjs/index.d.ts +1 -1
  277. package/typings/rxjs/index.metadata.json +1 -1
  278. package/typings/rxjs/{public_api.d.ts → public-api.d.ts} +0 -0
  279. package/typings/rxjs/rx-operators.d.ts +7 -0
  280. package/typings/scrolling/index.d.ts +1 -1
  281. package/typings/scrolling/index.metadata.json +1 -1
  282. package/typings/scrolling/public-api.d.ts +11 -0
  283. package/typings/scrolling/scrolling-module.d.ts +2 -0
  284. package/typings/scrolling/viewport-ruler.d.ts +20 -6
  285. package/typings/stepper/index.d.ts +1 -1
  286. package/typings/stepper/index.metadata.json +1 -1
  287. package/typings/stepper/public-api.d.ts +11 -0
  288. package/typings/stepper/stepper-module.d.ts +2 -0
  289. package/typings/stepper/stepper.d.ts +8 -4
  290. package/typings/table/index.d.ts +1 -1
  291. package/typings/table/index.metadata.json +1 -1
  292. package/typings/table/public-api.d.ts +13 -0
  293. package/typings/table/row.d.ts +11 -3
  294. package/typings/table/table-errors.d.ts +10 -0
  295. package/typings/table/table-module.d.ts +2 -0
  296. package/typings/table/table.d.ts +17 -8
  297. package/bidi/typings/public_api.d.ts +0 -4
  298. package/platform/typings/public_api.d.ts +0 -4
  299. package/scrolling/typings/public_api.d.ts +0 -5
  300. package/stepper/typings/public_api.d.ts +0 -5
  301. package/table/typings/public_api.d.ts +0 -7
  302. package/typings/bidi/public_api.d.ts +0 -4
  303. package/typings/platform/public_api.d.ts +0 -4
  304. package/typings/scrolling/public_api.d.ts +0 -5
  305. package/typings/stepper/public_api.d.ts +0 -5
  306. package/typings/table/public_api.d.ts +0 -7
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { Component, ContentChild, ContentChildren, Directive, EventEmitter, Inject, Input, NgModule, Optional, Output, TemplateRef, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';
8
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, Directive, EventEmitter, Inject, Input, NgModule, Optional, Output, TemplateRef, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';
9
9
  import { ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE } from '@angular/cdk/keycodes';
10
10
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
11
11
  import { BidiModule, Directionality } from '@angular/cdk/bidi';
@@ -47,7 +47,7 @@ class CdkStep {
47
47
  constructor(_stepper) {
48
48
  this._stepper = _stepper;
49
49
  /**
50
- * Whether user has seen the expanded step content or not .
50
+ * Whether user has seen the expanded step content or not.
51
51
  */
52
52
  this.interacted = false;
53
53
  this._editable = true;
@@ -104,12 +104,22 @@ class CdkStep {
104
104
  select() {
105
105
  this._stepper.selected = this;
106
106
  }
107
+ /**
108
+ * @return {?}
109
+ */
110
+ ngOnChanges() {
111
+ // Since basically all inputs of the MdStep get proxied through the view down to the
112
+ // underlying MdStepHeader, we have to make sure that change detection runs correctly.
113
+ this._stepper._stateChanged();
114
+ }
107
115
  }
108
116
  CdkStep.decorators = [
109
117
  { type: Component, args: [{selector: 'cdk-step',
118
+ exportAs: 'cdkStep',
110
119
  template: "<ng-template><ng-content></ng-content></ng-template>",
111
120
  encapsulation: ViewEncapsulation.None,
112
121
  preserveWhitespaces: false,
122
+ changeDetection: ChangeDetectionStrategy.OnPush,
113
123
  },] },
114
124
  ];
115
125
  /**
@@ -130,9 +140,11 @@ CdkStep.propDecorators = {
130
140
  class CdkStepper {
131
141
  /**
132
142
  * @param {?} _dir
143
+ * @param {?} _changeDetectorRef
133
144
  */
134
- constructor(_dir) {
145
+ constructor(_dir, _changeDetectorRef) {
135
146
  this._dir = _dir;
147
+ this._changeDetectorRef = _changeDetectorRef;
136
148
  this._linear = false;
137
149
  this._selectedIndex = 0;
138
150
  /**
@@ -179,7 +191,7 @@ class CdkStepper {
179
191
  * The step that is selected.
180
192
  * @return {?}
181
193
  */
182
- get selected() { return this._steps[this.selectedIndex]; }
194
+ get selected() { return this._steps.toArray()[this.selectedIndex]; }
183
195
  /**
184
196
  * @param {?} step
185
197
  * @return {?}
@@ -217,6 +229,13 @@ class CdkStepper {
217
229
  _getStepContentId(i) {
218
230
  return `mat-step-content-${this._groupId}-${i}`;
219
231
  }
232
+ /**
233
+ * Marks the component to be change detected.
234
+ * @return {?}
235
+ */
236
+ _stateChanged() {
237
+ this._changeDetectorRef.markForCheck();
238
+ }
220
239
  /**
221
240
  * Returns position state of the step with the given index.
222
241
  * @param {?} index
@@ -259,6 +278,7 @@ class CdkStepper {
259
278
  previouslySelectedStep: stepsArray[this._selectedIndex],
260
279
  });
261
280
  this._selectedIndex = newIndex;
281
+ this._stateChanged();
262
282
  }
263
283
  /**
264
284
  * @param {?} event
@@ -333,6 +353,7 @@ class CdkStepper {
333
353
  CdkStepper.decorators = [
334
354
  { type: Directive, args: [{
335
355
  selector: '[cdkStepper]',
356
+ exportAs: 'cdkStepper',
336
357
  },] },
337
358
  ];
338
359
  /**
@@ -340,6 +361,7 @@ CdkStepper.decorators = [
340
361
  */
341
362
  CdkStepper.ctorParameters = () => [
342
363
  { type: Directionality, decorators: [{ type: Optional },] },
364
+ { type: ChangeDetectorRef, },
343
365
  ];
344
366
  CdkStepper.propDecorators = {
345
367
  '_steps': [{ type: ContentChildren, args: [CdkStep,] },],
@@ -414,5 +436,5 @@ CdkStepperModule.ctorParameters = () => [];
414
436
  * Generated bundle index. Do not edit.
415
437
  */
416
438
 
417
- export { CdkStepperModule, StepperSelectionEvent, CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious };
439
+ export { StepperSelectionEvent, CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious, CdkStepperModule };
418
440
  //# sourceMappingURL=stepper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.js","sources":["../../../src/cdk/stepper/index.ts","../../../src/cdk/stepper/public_api.ts","../../../src/cdk/stepper/stepper-button.ts","../../../src/cdk/stepper/stepper.ts","../../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport {CdkStepperModule,StepContentPositionState,StepperSelectionEvent,CdkStep,CdkStepper,CdkStepLabel,CdkStepperNext,CdkStepperPrevious} from './public_api';\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {BidiModule} from '@angular/cdk/bidi';\nexport class CdkStepperModule {static decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n imports: [BidiModule, CommonModule],\n exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],\n declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction CdkStepperModule_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepperModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepperModule.ctorParameters;\n}\n\n\nexport {StepContentPositionState,StepperSelectionEvent,CdkStep,CdkStepper} from './stepper';\nexport {CdkStepLabel} from './step-label';\nexport {CdkStepperNext,CdkStepperPrevious} from './stepper-button';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {Directive} from '@angular/core';\nimport {CdkStepper} from './stepper';\n/**\n * Button that moves to the next step in a stepper workflow.\n */\nexport class CdkStepperNext {\n/**\n * @param {?} _stepper\n */\nconstructor(public _stepper: CdkStepper) { }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: 'button[cdkStepperNext]',\n host: {'(click)': '_stepper.next()'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CdkStepper, },\n];\n}\n\nfunction CdkStepperNext_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepperNext.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepperNext.ctorParameters;\n/** @type {?} */\nCdkStepperNext.prototype._stepper;\n}\n\n/**\n * Button that moves to the previous step in a stepper workflow.\n */\nexport class CdkStepperPrevious {\n/**\n * @param {?} _stepper\n */\nconstructor(public _stepper: CdkStepper) { }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: 'button[cdkStepperPrevious]',\n host: {'(click)': '_stepper.previous()'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CdkStepper, },\n];\n}\n\nfunction CdkStepperPrevious_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepperPrevious.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepperPrevious.ctorParameters;\n/** @type {?} */\nCdkStepperPrevious.prototype._stepper;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {\n ContentChildren,\n EventEmitter,\n Input,\n Output,\n QueryList,\n Directive,\n // This import is only used to define a generic type. The current TypeScript version incorrectly\n // considers such imports as unused (https://github.com/Microsoft/TypeScript/issues/14953)\n // tslint:disable-next-line:no-unused-variable\n ElementRef,\n Component,\n ContentChild,\n ViewChild,\n TemplateRef,\n ViewEncapsulation,\n Optional,\n Inject,\n forwardRef\n} from '@angular/core';\nimport {LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE} from '@angular/cdk/keycodes';\nimport {CdkStepLabel} from './step-label';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {AbstractControl} from '@angular/forms';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\n/**\n * Used to generate unique ID for each stepper component.\n */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n/**\n * Change event emitted on selection changes.\n */\nexport class StepperSelectionEvent {\n/**\n * Index of the step now selected.\n */\nselectedIndex: number;\n/**\n * Index of the step previously selected.\n */\npreviouslySelectedIndex: number;\n/**\n * The step instance now selected.\n */\nselectedStep: CdkStep;\n/**\n * The step instance previously selected.\n */\npreviouslySelectedStep: CdkStep;\n}\n\nfunction StepperSelectionEvent_tsickle_Closure_declarations() {\n/**\n * Index of the step now selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.selectedIndex;\n/**\n * Index of the step previously selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.previouslySelectedIndex;\n/**\n * The step instance now selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.selectedStep;\n/**\n * The step instance previously selected.\n * @type {?}\n */\nStepperSelectionEvent.prototype.previouslySelectedStep;\n}\n\nexport class CdkStep {\n/**\n * Template for step label if it exists.\n */\nstepLabel: CdkStepLabel;\n/**\n * Template for step content.\n */\ncontent: TemplateRef<any>;\n/**\n * The top level abstract control of the step.\n */\nstepControl: AbstractControl;\n/**\n * Whether user has seen the expanded step content or not .\n */\ninteracted = false;\n/**\n * Label of the step.\n */\nlabel: string;\n/**\n * @return {?}\n */\nget editable() { return this._editable; }\n/**\n * @param {?} value\n * @return {?}\n */\nset editable(value: any) {\n this._editable = coerceBooleanProperty(value);\n }\nprivate _editable = true;\n/**\n * Whether the completion of step is optional or not.\n * @return {?}\n */\nget optional() { return this._optional; }\n/**\n * @param {?} value\n * @return {?}\n */\nset optional(value: any) {\n this._optional = coerceBooleanProperty(value);\n }\nprivate _optional = false;\n/**\n * Return whether step is completed or not.\n * @return {?}\n */\nget completed() {\n return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;\n }\n/**\n * @param {?} value\n * @return {?}\n */\nset completed(value: any) {\n this._customCompleted = coerceBooleanProperty(value);\n }\nprivate _customCompleted: boolean | null = null;\n/**\n * @return {?}\n */\nprivate get _defaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n/**\n * @param {?} _stepper\n */\nconstructor(\nprivate _stepper: CdkStepper) { }\n/**\n * Selects this step component.\n * @return {?}\n */\nselect(): void {\n this._stepper.selected = this;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Component, args: [{\n moduleId: module.id,\n selector: 'cdk-step',\n templateUrl: 'step.html',\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: CdkStepper, decorators: [{ type: Inject, args: [forwardRef(() => CdkStepper), ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'stepLabel': [{ type: ContentChild, args: [CdkStepLabel, ] },],\n'content': [{ type: ViewChild, args: [TemplateRef, ] },],\n'stepControl': [{ type: Input },],\n'label': [{ type: Input },],\n'editable': [{ type: Input },],\n'optional': [{ type: Input },],\n'completed': [{ type: Input },],\n};\n}\n\nfunction CdkStep_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStep.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStep.ctorParameters;\n/** @type {?} */\nCdkStep.propDecorators;\n/**\n * Template for step label if it exists.\n * @type {?}\n */\nCdkStep.prototype.stepLabel;\n/**\n * Template for step content.\n * @type {?}\n */\nCdkStep.prototype.content;\n/**\n * The top level abstract control of the step.\n * @type {?}\n */\nCdkStep.prototype.stepControl;\n/**\n * Whether user has seen the expanded step content or not .\n * @type {?}\n */\nCdkStep.prototype.interacted;\n/**\n * Label of the step.\n * @type {?}\n */\nCdkStep.prototype.label;\n/** @type {?} */\nCdkStep.prototype._editable;\n/** @type {?} */\nCdkStep.prototype._optional;\n/** @type {?} */\nCdkStep.prototype._customCompleted;\n/** @type {?} */\nCdkStep.prototype._stepper;\n}\n\nexport class CdkStepper {\n/**\n * The list of step components that the stepper is holding.\n */\n_steps: QueryList<CdkStep>;\n/**\n * The list of step headers of the steps in the stepper.\n */\n_stepHeader: QueryList<ElementRef>;\n/**\n * Whether the validity of previous steps should be checked or not.\n * @return {?}\n */\nget linear() { return this._linear; }\n/**\n * @param {?} value\n * @return {?}\n */\nset linear(value: any) { this._linear = coerceBooleanProperty(value); }\nprivate _linear = false;\n/**\n * The index of the selected step.\n * @return {?}\n */\nget selectedIndex() { return this._selectedIndex; }\n/**\n * @param {?} index\n * @return {?}\n */\nset selectedIndex(index: number) {\n if (this._anyControlsInvalid(index)\n || index < this._selectedIndex && !this._steps.toArray()[index].editable) {\n // remove focus from clicked step header if the step is not able to be selected\n this._stepHeader.toArray()[index].nativeElement.blur();\n } else if (this._selectedIndex != index) {\n this._emitStepperSelectionEvent(index);\n this._focusIndex = this._selectedIndex;\n }\n }\nprivate _selectedIndex: number = 0;\n/**\n * The step that is selected.\n * @return {?}\n */\nget selected() { return this._steps[this.selectedIndex]; }\n/**\n * @param {?} step\n * @return {?}\n */\nset selected(step: CdkStep) {\n this.selectedIndex = this._steps.toArray().indexOf(step);\n }\n/**\n * Event emitted when the selected step has changed.\n */\nselectionChange = new EventEmitter<StepperSelectionEvent>();\n/**\n * The index of the step that the focus can be set.\n */\n_focusIndex: number = 0;\n/**\n * Used to track unique ID for each stepper component.\n */\n_groupId: number;\n/**\n * @param {?} _dir\n */\nconstructor(\nprivate _dir: Directionality) {\n this._groupId = nextId++;\n }\n/**\n * Selects and focuses the next step in list.\n * @return {?}\n */\nnext(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);\n }\n/**\n * Selects and focuses the previous step in list.\n * @return {?}\n */\nprevious(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n/**\n * Returns a unique id for each step label element.\n * @param {?} i\n * @return {?}\n */\n_getStepLabelId(i: number): string {\n return `mat-step-label-${this._groupId}-${i}`;\n }\n/**\n * Returns unique id for each step content element.\n * @param {?} i\n * @return {?}\n */\n_getStepContentId(i: number): string {\n return `mat-step-content-${this._groupId}-${i}`;\n }\n/**\n * Returns position state of the step with the given index.\n * @param {?} index\n * @return {?}\n */\n_getAnimationDirection(index: number): StepContentPositionState {\n const /** @type {?} */ position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n/**\n * Returns the type of icon to be displayed.\n * @param {?} index\n * @return {?}\n */\n_getIndicatorType(index: number): 'number' | 'edit' | 'done' {\n const /** @type {?} */ step = this._steps.toArray()[index];\n if (!step.completed || this._selectedIndex == index) {\n return 'number';\n } else {\n return step.editable ? 'edit' : 'done';\n }\n }\n/**\n * @param {?} newIndex\n * @return {?}\n */\nprivate _emitStepperSelectionEvent(newIndex: number): void {\n const /** @type {?} */ stepsArray = this._steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n this._selectedIndex = newIndex;\n }\n/**\n * @param {?} event\n * @return {?}\n */\n_onKeydown(event: KeyboardEvent) {\n switch (event.keyCode) {\n case RIGHT_ARROW:\n if (this._layoutDirection() === 'rtl') {\n this._focusPreviousStep();\n } else {\n this._focusNextStep();\n }\n break;\n case LEFT_ARROW:\n if (this._layoutDirection() === 'rtl') {\n this._focusNextStep();\n } else {\n this._focusPreviousStep();\n }\n break;\n case SPACE:\n case ENTER:\n this.selectedIndex = this._focusIndex;\n break;\n default:\n // Return to avoid calling preventDefault on keys that are not explicitly handled.\n return;\n }\n event.preventDefault();\n }\n/**\n * @return {?}\n */\nprivate _focusNextStep() {\n this._focusStep((this._focusIndex + 1) % this._steps.length);\n }\n/**\n * @return {?}\n */\nprivate _focusPreviousStep() {\n this._focusStep((this._focusIndex + this._steps.length - 1) % this._steps.length);\n }\n/**\n * @param {?} index\n * @return {?}\n */\nprivate _focusStep(index: number) {\n this._focusIndex = index;\n this._stepHeader.toArray()[this._focusIndex].nativeElement.focus();\n }\n/**\n * @param {?} index\n * @return {?}\n */\nprivate _anyControlsInvalid(index: number): boolean {\n this._steps.toArray()[this._selectedIndex].interacted = true;\n if (this._linear && index >= 0) {\n return this._steps.toArray().slice(0, index).some(step => step.stepControl.invalid);\n }\n return false;\n }\n/**\n * @return {?}\n */\nprivate _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[cdkStepper]',\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Directionality, decorators: [{ type: Optional }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'_steps': [{ type: ContentChildren, args: [CdkStep, ] },],\n'linear': [{ type: Input },],\n'selectedIndex': [{ type: Input },],\n'selected': [{ type: Input },],\n'selectionChange': [{ type: Output },],\n};\n}\n\nfunction CdkStepper_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepper.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepper.ctorParameters;\n/** @type {?} */\nCdkStepper.propDecorators;\n/**\n * The list of step components that the stepper is holding.\n * @type {?}\n */\nCdkStepper.prototype._steps;\n/**\n * The list of step headers of the steps in the stepper.\n * @type {?}\n */\nCdkStepper.prototype._stepHeader;\n/** @type {?} */\nCdkStepper.prototype._linear;\n/** @type {?} */\nCdkStepper.prototype._selectedIndex;\n/**\n * Event emitted when the selected step has changed.\n * @type {?}\n */\nCdkStepper.prototype.selectionChange;\n/**\n * The index of the step that the focus can be set.\n * @type {?}\n */\nCdkStepper.prototype._focusIndex;\n/**\n * Used to track unique ID for each stepper component.\n * @type {?}\n */\nCdkStepper.prototype._groupId;\n/** @type {?} */\nCdkStepper.prototype._dir;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. 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\nimport {Directive, TemplateRef} from '@angular/core';\nexport class CdkStepLabel {\n/**\n * @param {?} template\n */\nconstructor(public template: TemplateRef<any>) { }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[cdkStepLabel]',\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: TemplateRef, },\n];\n}\n\nfunction CdkStepLabel_tsickle_Closure_declarations() {\n/** @type {?} */\nCdkStepLabel.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCdkStepLabel.ctorParameters;\n/** @type {?} */\nCdkStepLabel.prototype.template;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AIUA,MAAA,YAAA,CAAA;;;;IAIA,WAAA,CAFqB,QAA0B,EAE/C;QAFqB,IAArB,CAAA,QAAqB,GAAA,QAAA,CAA0B;KAAC;;AACzC,YAAP,CAAA,UAAO,GAAoC;IAG3C,EAFE,IAAA,EAAM,SAAA,EAAW,IAAA,EAAM,CAAA;gBAGvB,QAAQ,EAFE,gBAAA;aAGX,EAFC,EAAG;CAGJ,CAFC;;;;AAED,YAAD,CAAA,cAAC,GAAA,MAAA;IAKD,E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A,EAAW,IAAA,EAAM,CAAA;gBAuBvB,QAAQ,EAtBE,4BAAA;gBAuBV,IAAI,EAtBE,EAAA,SAAE,EAAU,qBAAA,EAAsB;aAuBzC,EAtBC,EAAG;CAuBJ,CAtBC;;;;AAED,kBAAD,CAAA,cAAC,GAAA,MAAA;IAyBD,EAAC,IAAI,EAAE,UAAU,GAAG;CACnB,CAAC,AAGF,AAUC;;AD9DD,MAAA,gBAAA,CAAA;;AACsC,gBAAtC,CAAA,UAAsC,GAAoC;IAA1E,EACE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAM,CAAA;gBAAtB,OAAO,EACE,CAAA,UAAE,EAAW,YAAA,CAAa;gBAAnC,OAAO,EACE,CAAA,OAAE,EAAQ,UAAA,EAAY,YAAA,EAAc,cAAA,EAAgB,kBAAA,CAAmB;gBAAhF,YAAY,EACE,CAAA,OAAE,EAAQ,UAAA,EAAY,YAAA,EAAc,cAAA,EAAgB,kBAAA,CAAmB;aAAtF,EACC,EAAG;CAAJ,CACC;;;;AAED,gBAAD,CAAA,cAAC,GAAA,MAAA,EAEA,CANgC,AASjC,AAWA,AACA,AACA,AAAmE;;AD1CnE;;GAEG,AAEH,AAA+J;;"}
1
+ {"version":3,"file":"stepper.js","sources":["../../packages/cdk/stepper/step-label.js","../../packages/cdk/stepper/stepper.js","../../packages/cdk/stepper/stepper-button.js","../../packages/cdk/stepper/stepper-module.js","../../packages/cdk/stepper/index.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. 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 */\nimport { Directive, TemplateRef } from '@angular/core';\nexport class CdkStepLabel {\n /**\n * @param {?} template\n */\n constructor(template) {\n this.template = template;\n }\n}\nCdkStepLabel.decorators = [\n { type: Directive, args: [{\n selector: '[cdkStepLabel]',\n },] },\n];\n/**\n * @nocollapse\n */\nCdkStepLabel.ctorParameters = () => [\n { type: TemplateRef, },\n];\nfunction CdkStepLabel_tsickle_Closure_declarations() {\n /** @type {?} */\n CdkStepLabel.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n CdkStepLabel.ctorParameters;\n /** @type {?} */\n CdkStepLabel.prototype.template;\n}\n//# sourceMappingURL=step-label.js.map","/**\n * @license\n * Copyright Google Inc. 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 */\nimport { ContentChildren, EventEmitter, Input, Output, Directive, Component, ContentChild, ViewChild, TemplateRef, ViewEncapsulation, Optional, Inject, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, } from '@angular/core';\nimport { LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE } from '@angular/cdk/keycodes';\nimport { CdkStepLabel } from './step-label';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directionality } from '@angular/cdk/bidi';\n/**\n * Used to generate unique ID for each stepper component.\n */\nlet nextId = 0;\n/**\n * Change event emitted on selection changes.\n */\nexport class StepperSelectionEvent {\n}\nfunction StepperSelectionEvent_tsickle_Closure_declarations() {\n /**\n * Index of the step now selected.\n * @type {?}\n */\n StepperSelectionEvent.prototype.selectedIndex;\n /**\n * Index of the step previously selected.\n * @type {?}\n */\n StepperSelectionEvent.prototype.previouslySelectedIndex;\n /**\n * The step instance now selected.\n * @type {?}\n */\n StepperSelectionEvent.prototype.selectedStep;\n /**\n * The step instance previously selected.\n * @type {?}\n */\n StepperSelectionEvent.prototype.previouslySelectedStep;\n}\nexport class CdkStep {\n /**\n * @param {?} _stepper\n */\n constructor(_stepper) {\n this._stepper = _stepper;\n /**\n * Whether user has seen the expanded step content or not.\n */\n this.interacted = false;\n this._editable = true;\n this._optional = false;\n this._customCompleted = null;\n }\n /**\n * @return {?}\n */\n get editable() { return this._editable; }\n /**\n * @param {?} value\n * @return {?}\n */\n set editable(value) {\n this._editable = coerceBooleanProperty(value);\n }\n /**\n * Whether the completion of step is optional or not.\n * @return {?}\n */\n get optional() { return this._optional; }\n /**\n * @param {?} value\n * @return {?}\n */\n set optional(value) {\n this._optional = coerceBooleanProperty(value);\n }\n /**\n * Return whether step is completed or not.\n * @return {?}\n */\n get completed() {\n return this._customCompleted == null ? this._defaultCompleted : this._customCompleted;\n }\n /**\n * @param {?} value\n * @return {?}\n */\n set completed(value) {\n this._customCompleted = coerceBooleanProperty(value);\n }\n /**\n * @return {?}\n */\n get _defaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n /**\n * Selects this step component.\n * @return {?}\n */\n select() {\n this._stepper.selected = this;\n }\n /**\n * @return {?}\n */\n ngOnChanges() {\n // Since basically all inputs of the MdStep get proxied through the view down to the\n // underlying MdStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n}\nCdkStep.decorators = [\n { type: Component, args: [{selector: 'cdk-step',\n exportAs: 'cdkStep',\n template: \"<ng-template><ng-content></ng-content></ng-template>\",\n encapsulation: ViewEncapsulation.None,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n },] },\n];\n/**\n * @nocollapse\n */\nCdkStep.ctorParameters = () => [\n { type: CdkStepper, decorators: [{ type: Inject, args: [forwardRef(() => CdkStepper),] },] },\n];\nCdkStep.propDecorators = {\n 'stepLabel': [{ type: ContentChild, args: [CdkStepLabel,] },],\n 'content': [{ type: ViewChild, args: [TemplateRef,] },],\n 'stepControl': [{ type: Input },],\n 'label': [{ type: Input },],\n 'editable': [{ type: Input },],\n 'optional': [{ type: Input },],\n 'completed': [{ type: Input },],\n};\nfunction CdkStep_tsickle_Closure_declarations() {\n /** @type {?} */\n CdkStep.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n CdkStep.ctorParameters;\n /** @type {?} */\n CdkStep.propDecorators;\n /**\n * Template for step label if it exists.\n * @type {?}\n */\n CdkStep.prototype.stepLabel;\n /**\n * Template for step content.\n * @type {?}\n */\n CdkStep.prototype.content;\n /**\n * The top level abstract control of the step.\n * @type {?}\n */\n CdkStep.prototype.stepControl;\n /**\n * Whether user has seen the expanded step content or not.\n * @type {?}\n */\n CdkStep.prototype.interacted;\n /**\n * Label of the step.\n * @type {?}\n */\n CdkStep.prototype.label;\n /** @type {?} */\n CdkStep.prototype._editable;\n /** @type {?} */\n CdkStep.prototype._optional;\n /** @type {?} */\n CdkStep.prototype._customCompleted;\n /** @type {?} */\n CdkStep.prototype._stepper;\n}\nexport class CdkStepper {\n /**\n * @param {?} _dir\n * @param {?} _changeDetectorRef\n */\n constructor(_dir, _changeDetectorRef) {\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._linear = false;\n this._selectedIndex = 0;\n /**\n * Event emitted when the selected step has changed.\n */\n this.selectionChange = new EventEmitter();\n /**\n * The index of the step that the focus can be set.\n */\n this._focusIndex = 0;\n this._groupId = nextId++;\n }\n /**\n * Whether the validity of previous steps should be checked or not.\n * @return {?}\n */\n get linear() { return this._linear; }\n /**\n * @param {?} value\n * @return {?}\n */\n set linear(value) { this._linear = coerceBooleanProperty(value); }\n /**\n * The index of the selected step.\n * @return {?}\n */\n get selectedIndex() { return this._selectedIndex; }\n /**\n * @param {?} index\n * @return {?}\n */\n set selectedIndex(index) {\n if (this._anyControlsInvalid(index)\n || index < this._selectedIndex && !this._steps.toArray()[index].editable) {\n // remove focus from clicked step header if the step is not able to be selected\n this._stepHeader.toArray()[index].nativeElement.blur();\n }\n else if (this._selectedIndex != index) {\n this._emitStepperSelectionEvent(index);\n this._focusIndex = this._selectedIndex;\n }\n }\n /**\n * The step that is selected.\n * @return {?}\n */\n get selected() { return this._steps.toArray()[this.selectedIndex]; }\n /**\n * @param {?} step\n * @return {?}\n */\n set selected(step) {\n this.selectedIndex = this._steps.toArray().indexOf(step);\n }\n /**\n * Selects and focuses the next step in list.\n * @return {?}\n */\n next() {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this._steps.length - 1);\n }\n /**\n * Selects and focuses the previous step in list.\n * @return {?}\n */\n previous() {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n /**\n * Returns a unique id for each step label element.\n * @param {?} i\n * @return {?}\n */\n _getStepLabelId(i) {\n return `mat-step-label-${this._groupId}-${i}`;\n }\n /**\n * Returns unique id for each step content element.\n * @param {?} i\n * @return {?}\n */\n _getStepContentId(i) {\n return `mat-step-content-${this._groupId}-${i}`;\n }\n /**\n * Marks the component to be change detected.\n * @return {?}\n */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n /**\n * Returns position state of the step with the given index.\n * @param {?} index\n * @return {?}\n */\n _getAnimationDirection(index) {\n const /** @type {?} */ position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n }\n else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n /**\n * Returns the type of icon to be displayed.\n * @param {?} index\n * @return {?}\n */\n _getIndicatorType(index) {\n const /** @type {?} */ step = this._steps.toArray()[index];\n if (!step.completed || this._selectedIndex == index) {\n return 'number';\n }\n else {\n return step.editable ? 'edit' : 'done';\n }\n }\n /**\n * @param {?} newIndex\n * @return {?}\n */\n _emitStepperSelectionEvent(newIndex) {\n const /** @type {?} */ stepsArray = this._steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n /**\n * @param {?} event\n * @return {?}\n */\n _onKeydown(event) {\n switch (event.keyCode) {\n case RIGHT_ARROW:\n if (this._layoutDirection() === 'rtl') {\n this._focusPreviousStep();\n }\n else {\n this._focusNextStep();\n }\n break;\n case LEFT_ARROW:\n if (this._layoutDirection() === 'rtl') {\n this._focusNextStep();\n }\n else {\n this._focusPreviousStep();\n }\n break;\n case SPACE:\n case ENTER:\n this.selectedIndex = this._focusIndex;\n break;\n default:\n // Return to avoid calling preventDefault on keys that are not explicitly handled.\n return;\n }\n event.preventDefault();\n }\n /**\n * @return {?}\n */\n _focusNextStep() {\n this._focusStep((this._focusIndex + 1) % this._steps.length);\n }\n /**\n * @return {?}\n */\n _focusPreviousStep() {\n this._focusStep((this._focusIndex + this._steps.length - 1) % this._steps.length);\n }\n /**\n * @param {?} index\n * @return {?}\n */\n _focusStep(index) {\n this._focusIndex = index;\n this._stepHeader.toArray()[this._focusIndex].nativeElement.focus();\n }\n /**\n * @param {?} index\n * @return {?}\n */\n _anyControlsInvalid(index) {\n this._steps.toArray()[this._selectedIndex].interacted = true;\n if (this._linear && index >= 0) {\n return this._steps.toArray().slice(0, index).some(step => step.stepControl.invalid);\n }\n return false;\n }\n /**\n * @return {?}\n */\n _layoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n}\nCdkStepper.decorators = [\n { type: Directive, args: [{\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n },] },\n];\n/**\n * @nocollapse\n */\nCdkStepper.ctorParameters = () => [\n { type: Directionality, decorators: [{ type: Optional },] },\n { type: ChangeDetectorRef, },\n];\nCdkStepper.propDecorators = {\n '_steps': [{ type: ContentChildren, args: [CdkStep,] },],\n 'linear': [{ type: Input },],\n 'selectedIndex': [{ type: Input },],\n 'selected': [{ type: Input },],\n 'selectionChange': [{ type: Output },],\n};\nfunction CdkStepper_tsickle_Closure_declarations() {\n /** @type {?} */\n CdkStepper.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n CdkStepper.ctorParameters;\n /** @type {?} */\n CdkStepper.propDecorators;\n /**\n * The list of step components that the stepper is holding.\n * @type {?}\n */\n CdkStepper.prototype._steps;\n /**\n * The list of step headers of the steps in the stepper.\n * @type {?}\n */\n CdkStepper.prototype._stepHeader;\n /** @type {?} */\n CdkStepper.prototype._linear;\n /** @type {?} */\n CdkStepper.prototype._selectedIndex;\n /**\n * Event emitted when the selected step has changed.\n * @type {?}\n */\n CdkStepper.prototype.selectionChange;\n /**\n * The index of the step that the focus can be set.\n * @type {?}\n */\n CdkStepper.prototype._focusIndex;\n /**\n * Used to track unique ID for each stepper component.\n * @type {?}\n */\n CdkStepper.prototype._groupId;\n /** @type {?} */\n CdkStepper.prototype._dir;\n /** @type {?} */\n CdkStepper.prototype._changeDetectorRef;\n}\n//# sourceMappingURL=stepper.js.map","/**\n * @license\n * Copyright Google Inc. 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 */\nimport { Directive } from '@angular/core';\nimport { CdkStepper } from './stepper';\n/**\n * Button that moves to the next step in a stepper workflow.\n */\nexport class CdkStepperNext {\n /**\n * @param {?} _stepper\n */\n constructor(_stepper) {\n this._stepper = _stepper;\n }\n}\nCdkStepperNext.decorators = [\n { type: Directive, args: [{\n selector: 'button[cdkStepperNext]',\n host: { '(click)': '_stepper.next()' }\n },] },\n];\n/**\n * @nocollapse\n */\nCdkStepperNext.ctorParameters = () => [\n { type: CdkStepper, },\n];\nfunction CdkStepperNext_tsickle_Closure_declarations() {\n /** @type {?} */\n CdkStepperNext.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n CdkStepperNext.ctorParameters;\n /** @type {?} */\n CdkStepperNext.prototype._stepper;\n}\n/**\n * Button that moves to the previous step in a stepper workflow.\n */\nexport class CdkStepperPrevious {\n /**\n * @param {?} _stepper\n */\n constructor(_stepper) {\n this._stepper = _stepper;\n }\n}\nCdkStepperPrevious.decorators = [\n { type: Directive, args: [{\n selector: 'button[cdkStepperPrevious]',\n host: { '(click)': '_stepper.previous()' }\n },] },\n];\n/**\n * @nocollapse\n */\nCdkStepperPrevious.ctorParameters = () => [\n { type: CdkStepper, },\n];\nfunction CdkStepperPrevious_tsickle_Closure_declarations() {\n /** @type {?} */\n CdkStepperPrevious.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n CdkStepperPrevious.ctorParameters;\n /** @type {?} */\n CdkStepperPrevious.prototype._stepper;\n}\n//# sourceMappingURL=stepper-button.js.map","/**\n * @license\n * Copyright Google Inc. 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 */\nimport { NgModule } from '@angular/core';\nimport { CdkStepper, CdkStep } from './stepper';\nimport { CommonModule } from '@angular/common';\nimport { CdkStepLabel } from './step-label';\nimport { CdkStepperNext, CdkStepperPrevious } from './stepper-button';\nimport { BidiModule } from '@angular/cdk/bidi';\nexport class CdkStepperModule {\n}\nCdkStepperModule.decorators = [\n { type: NgModule, args: [{\n imports: [BidiModule, CommonModule],\n exports: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious],\n declarations: [CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious]\n },] },\n];\n/**\n * @nocollapse\n */\nCdkStepperModule.ctorParameters = () => [];\nfunction CdkStepperModule_tsickle_Closure_declarations() {\n /** @type {?} */\n CdkStepperModule.decorators;\n /**\n * @nocollapse\n * @type {?}\n */\n CdkStepperModule.ctorParameters;\n}\n//# sourceMappingURL=stepper-module.js.map","/**\n * Generated bundle index. Do not edit.\n */\nexport { StepperSelectionEvent, CdkStep, CdkStepper, CdkStepLabel, CdkStepperNext, CdkStepperPrevious, CdkStepperModule } from './public-api';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;;;;;;;;;AAQO,MAAM,YAAY,CAAC;;;;IAItB,WAAW,CAAC,QAAQ,EAAE;QAClB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;KAC5B;CACJ;AACD,YAAY,CAAC,UAAU,GAAG;IACtB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACd,QAAQ,EAAE,gBAAgB;aAC7B,EAAE,EAAE;CAChB,CAAC;;;;AAIF,YAAY,CAAC,cAAc,GAAG,MAAM;IAChC,EAAE,IAAI,EAAE,WAAW,GAAG;CACzB,CAAC,AACF,AAUC,AACD;;AC1BA;;;AAGA,IAAI,MAAM,GAAG,CAAC,CAAC;;;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BACtC,IAAI,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE;aAC7C,EAAE,EAAE;CAChB,CAAC;;;;AAIF,kBAAkB,CAAC,cAAc,GAAG,MAAM;IACtC,EAAE,IAAI,EAAE,UAAU,GAAG;CACxB,CAAC,AACF,AAUC,AACD;;AChEO,MAAM,gBAAgB,CAAC;CAC7B;AACD,gBAAgB,CAAC,UAAU,GAAG;IAC1B,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBACb,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;gBACnC,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,CAAC;gBAChF,YAAY,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,CAAC;aACxF,EAAE,EAAE;CAChB,CAAC;;;;AAIF,gBAAgB,CAAC,cAAc,GAAG,MAAM,EAAE,CAAC,AAC3C,AAQC,AACD;;ACnCA;;GAEG,AACH,AAA8I,AAC9I;;"}
package/esm2015/table.js CHANGED
@@ -5,15 +5,15 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { CommonModule } from '@angular/common';
9
8
  import { Attribute, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, Directive, ElementRef, Input, IterableDiffers, NgModule, Renderer2, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation, isDevMode } from '@angular/core';
10
9
  import { takeUntil } from 'rxjs/operator/takeUntil';
11
10
  import { BehaviorSubject } from 'rxjs/BehaviorSubject';
12
11
  import { Subject } from 'rxjs/Subject';
12
+ import { CommonModule } from '@angular/common';
13
13
  import { DataSource } from '@angular/cdk/collections';
14
14
 
15
15
  /**
16
- * The row template that can be used by the md-table. Should not be used outside of the
16
+ * The row template that can be used by the mat-table. Should not be used outside of the
17
17
  * material library.
18
18
  */
19
19
  const CDK_ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;
@@ -39,7 +39,7 @@ class BaseRowDef {
39
39
  // Create a new columns differ if one does not yet exist. Initialize it based on initial value
40
40
  // of the columns property or an empty array if none is provided.
41
41
  const /** @type {?} */ columns = changes['columns'].currentValue || [];
42
- if (!this._columnsDiffer && columns) {
42
+ if (!this._columnsDiffer) {
43
43
  this._columnsDiffer = this._differs.find(columns).create();
44
44
  this._columnsDiffer.diff(columns);
45
45
  }
@@ -81,7 +81,8 @@ CdkHeaderRowDef.ctorParameters = () => [
81
81
  ];
82
82
  /**
83
83
  * Data row definition for the CDK table.
84
- * Captures the header row's template and other row properties such as the columns to display.
84
+ * Captures the header row's template and other row properties such as the columns to display and
85
+ * a when predicate that describes when this row should be used.
85
86
  */
86
87
  class CdkRowDef extends BaseRowDef {
87
88
  /**
@@ -95,7 +96,7 @@ class CdkRowDef extends BaseRowDef {
95
96
  CdkRowDef.decorators = [
96
97
  { type: Directive, args: [{
97
98
  selector: '[cdkRowDef]',
98
- inputs: ['columns: cdkRowDefColumns'],
99
+ inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],
99
100
  },] },
100
101
  ];
101
102
  /**
@@ -322,6 +323,22 @@ function getTableUnknownColumnError(id) {
322
323
  function getTableDuplicateColumnNameError(name) {
323
324
  return Error(`cdk-table: Duplicate column definition name provided: "${name}".`);
324
325
  }
326
+ /**
327
+ * Returns an error to be thrown when there are multiple rows that are missing a when function.
328
+ * \@docs-private
329
+ * @return {?}
330
+ */
331
+ function getTableMultipleDefaultRowDefsError() {
332
+ return Error(`cdk-table: There can only be one default row without a when predicate function.`);
333
+ }
334
+ /**
335
+ * Returns an error to be thrown when there are no matching row defs for a particular set of data.
336
+ * \@docs-private
337
+ * @return {?}
338
+ */
339
+ function getTableMissingMatchingRowDefError() {
340
+ return Error(`cdk-table: Could not find a matching row definition for the provided row data.`);
341
+ }
325
342
 
326
343
  /**
327
344
  * Provides a handle for the table to grab the view container's ng-container to insert data rows.
@@ -366,7 +383,7 @@ HeaderRowPlaceholder.ctorParameters = () => [
366
383
  { type: ViewContainerRef, },
367
384
  ];
368
385
  /**
369
- * The table template that can be used by the md-table. Should not be used outside of the
386
+ * The table template that can be used by the mat-table. Should not be used outside of the
370
387
  * material library.
371
388
  */
372
389
  const CDK_TABLE_TEMPLATE = `
@@ -398,7 +415,7 @@ class CdkTable {
398
415
  /**
399
416
  * Map of all the user's defined columns (header and data cell template) identified by name.
400
417
  */
401
- this._columnDefinitionsByName = new Map();
418
+ this._columnDefsByName = new Map();
402
419
  /**
403
420
  * Stream containing the latest information on what rows are being displayed on screen.
404
421
  * Can be used by the data source to as a heuristic of what data should be provided.
@@ -453,8 +470,8 @@ class CdkTable {
453
470
  * @return {?}
454
471
  */
455
472
  ngAfterContentInit() {
456
- this._cacheColumnDefinitionsByName();
457
- this._columnDefinitions.changes.subscribe(() => this._cacheColumnDefinitionsByName());
473
+ this._cacheColumnDefsByName();
474
+ this._columnDefs.changes.subscribe(() => this._cacheColumnDefsByName());
458
475
  this._renderHeaderRow();
459
476
  }
460
477
  /**
@@ -462,6 +479,11 @@ class CdkTable {
462
479
  */
463
480
  ngAfterContentChecked() {
464
481
  this._renderUpdatedColumns();
482
+ const /** @type {?} */ defaultRowDefs = this._rowDefs.filter(def => !def.when);
483
+ if (defaultRowDefs.length > 1) {
484
+ throw getTableMultipleDefaultRowDefsError();
485
+ }
486
+ this._defaultRowDef = defaultRowDefs[0];
465
487
  if (this.dataSource && !this._renderChangeSubscription) {
466
488
  this._observeRenderChanges();
467
489
  }
@@ -482,13 +504,13 @@ class CdkTable {
482
504
  * Update the map containing the content's column definitions.
483
505
  * @return {?}
484
506
  */
485
- _cacheColumnDefinitionsByName() {
486
- this._columnDefinitionsByName.clear();
487
- this._columnDefinitions.forEach(columnDef => {
488
- if (this._columnDefinitionsByName.has(columnDef.name)) {
507
+ _cacheColumnDefsByName() {
508
+ this._columnDefsByName.clear();
509
+ this._columnDefs.forEach(columnDef => {
510
+ if (this._columnDefsByName.has(columnDef.name)) {
489
511
  throw getTableDuplicateColumnNameError(columnDef.name);
490
512
  }
491
- this._columnDefinitionsByName.set(columnDef.name, columnDef);
513
+ this._columnDefsByName.set(columnDef.name, columnDef);
492
514
  });
493
515
  }
494
516
  /**
@@ -498,8 +520,8 @@ class CdkTable {
498
520
  */
499
521
  _renderUpdatedColumns() {
500
522
  // Re-render the rows when the row definition columns change.
501
- this._rowDefinitions.forEach(rowDefinition => {
502
- if (!!rowDefinition.getColumnsDiff()) {
523
+ this._rowDefs.forEach(def => {
524
+ if (!!def.getColumnsDiff()) {
503
525
  // Reset the data to an empty array so that renderRowChanges will re-render all new rows.
504
526
  this._dataDiffer.diff([]);
505
527
  this._rowPlaceholder.viewContainer.clear();
@@ -507,7 +529,7 @@ class CdkTable {
507
529
  }
508
530
  });
509
531
  // Re-render the header row if there is a difference in its columns.
510
- if (this._headerDefinition.getColumnsDiff()) {
532
+ if (this._headerDef.getColumnsDiff()) {
511
533
  this._headerRowPlaceholder.viewContainer.clear();
512
534
  this._renderHeaderRow();
513
535
  }
@@ -551,7 +573,7 @@ class CdkTable {
551
573
  * @return {?}
552
574
  */
553
575
  _renderHeaderRow() {
554
- const /** @type {?} */ cells = this._getHeaderCellTemplatesForRow(this._headerDefinition);
576
+ const /** @type {?} */ cells = this._getHeaderCellTemplatesForRow(this._headerDef);
555
577
  if (!cells.length) {
556
578
  return;
557
579
  }
@@ -559,7 +581,7 @@ class CdkTable {
559
581
  // one CdkCellOutlet was instantiated as a result
560
582
  // of `createEmbeddedView`.
561
583
  this._headerRowPlaceholder.viewContainer
562
- .createEmbeddedView(this._headerDefinition.template, { cells });
584
+ .createEmbeddedView(this._headerDef.template, { cells });
563
585
  cells.forEach(cell => {
564
586
  CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cell.template, {});
565
587
  });
@@ -589,6 +611,25 @@ class CdkTable {
589
611
  });
590
612
  this._updateRowContext();
591
613
  }
614
+ /**
615
+ * Finds the matching row definition that should be used for this row data. If there is only
616
+ * one row definition, it is returned. Otherwise, find the row definition that has a when
617
+ * predicate that returns true with the data. If none return true, return the default row
618
+ * definition.
619
+ * @param {?} data
620
+ * @param {?} i
621
+ * @return {?}
622
+ */
623
+ _getRowDef(data, i) {
624
+ if (this._rowDefs.length == 1) {
625
+ return this._rowDefs.first;
626
+ }
627
+ let /** @type {?} */ rowDef = this._rowDefs.find(def => def.when && def.when(data, i)) || this._defaultRowDef;
628
+ if (!rowDef) {
629
+ throw getTableMissingMatchingRowDefError();
630
+ }
631
+ return rowDef;
632
+ }
592
633
  /**
593
634
  * Create the embedded view for the data row template and place it in the correct index location
594
635
  * within the data row view container.
@@ -597,10 +638,7 @@ class CdkTable {
597
638
  * @return {?}
598
639
  */
599
640
  _insertRow(rowData, index) {
600
- // TODO(andrewseguin): Add when predicates to the row definitions
601
- // to find the right template to used based on
602
- // the data rather than choosing the first row definition.
603
- const /** @type {?} */ row = this._rowDefinitions.first;
641
+ const /** @type {?} */ row = this._getRowDef(rowData, index);
604
642
  // Row context that will be provided to both the created embedded row view and its cells.
605
643
  const /** @type {?} */ context = { $implicit: rowData };
606
644
  // TODO(andrewseguin): add some code to enforce that exactly one
@@ -642,7 +680,7 @@ class CdkTable {
642
680
  return [];
643
681
  }
644
682
  return headerDef.columns.map(columnId => {
645
- const /** @type {?} */ column = this._columnDefinitionsByName.get(columnId);
683
+ const /** @type {?} */ column = this._columnDefsByName.get(columnId);
646
684
  if (!column) {
647
685
  throw getTableUnknownColumnError(columnId);
648
686
  }
@@ -660,7 +698,7 @@ class CdkTable {
660
698
  return [];
661
699
  }
662
700
  return rowDef.columns.map(columnId => {
663
- const /** @type {?} */ column = this._columnDefinitionsByName.get(columnId);
701
+ const /** @type {?} */ column = this._columnDefsByName.get(columnId);
664
702
  if (!column) {
665
703
  throw getTableUnknownColumnError(columnId);
666
704
  }
@@ -670,6 +708,7 @@ class CdkTable {
670
708
  }
671
709
  CdkTable.decorators = [
672
710
  { type: Component, args: [{selector: 'cdk-table',
711
+ exportAs: 'cdkTable',
673
712
  template: CDK_TABLE_TEMPLATE,
674
713
  host: {
675
714
  'class': 'cdk-table',
@@ -694,9 +733,9 @@ CdkTable.propDecorators = {
694
733
  'dataSource': [{ type: Input },],
695
734
  '_rowPlaceholder': [{ type: ViewChild, args: [RowPlaceholder,] },],
696
735
  '_headerRowPlaceholder': [{ type: ViewChild, args: [HeaderRowPlaceholder,] },],
697
- '_columnDefinitions': [{ type: ContentChildren, args: [CdkColumnDef,] },],
698
- '_headerDefinition': [{ type: ContentChild, args: [CdkHeaderRowDef,] },],
699
- '_rowDefinitions': [{ type: ContentChildren, args: [CdkRowDef,] },],
736
+ '_columnDefs': [{ type: ContentChildren, args: [CdkColumnDef,] },],
737
+ '_headerDef': [{ type: ContentChild, args: [CdkHeaderRowDef,] },],
738
+ '_rowDefs': [{ type: ContentChildren, args: [CdkRowDef,] },],
700
739
  };
701
740
 
702
741
  const EXPORTED_DECLARATIONS = [
@@ -732,5 +771,5 @@ CdkTableModule.ctorParameters = () => [];
732
771
  * Generated bundle index. Do not edit.
733
772
  */
734
773
 
735
- export { DataSource, CdkTableModule, RowPlaceholder, HeaderRowPlaceholder, CDK_TABLE_TEMPLATE, CdkTable, CdkCellDef, CdkHeaderCellDef, CdkColumnDef, CdkHeaderCell, CdkCell, CDK_ROW_TEMPLATE, BaseRowDef, CdkHeaderRowDef, CdkRowDef, CdkCellOutlet, CdkHeaderRow, CdkRow };
774
+ export { DataSource, RowPlaceholder, HeaderRowPlaceholder, CDK_TABLE_TEMPLATE, CdkTable, CdkCellDef, CdkHeaderCellDef, CdkColumnDef, CdkHeaderCell, CdkCell, CDK_ROW_TEMPLATE, BaseRowDef, CdkHeaderRowDef, CdkRowDef, CdkCellOutlet, CdkHeaderRow, CdkRow, CdkTableModule };
736
775
  //# sourceMappingURL=table.js.map