@angular/cdk 10.0.2 → 10.1.3

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 (216) hide show
  1. package/a11y/aria-describer/aria-describer.d.ts +10 -1
  2. package/a11y/index.metadata.json +1 -1
  3. package/a11y/interactivity-checker/interactivity-checker.d.ts +11 -1
  4. package/a11y/key-manager/list-key-manager.d.ts +6 -0
  5. package/accordion/accordion.d.ts +7 -1
  6. package/accordion/index.d.ts +1 -0
  7. package/accordion/index.metadata.json +1 -1
  8. package/bundles/cdk-a11y.umd.js +514 -410
  9. package/bundles/cdk-a11y.umd.js.map +1 -1
  10. package/bundles/cdk-a11y.umd.min.js +35 -11
  11. package/bundles/cdk-a11y.umd.min.js.map +1 -1
  12. package/bundles/cdk-accordion.umd.js +47 -39
  13. package/bundles/cdk-accordion.umd.js.map +1 -1
  14. package/bundles/cdk-accordion.umd.min.js +10 -2
  15. package/bundles/cdk-accordion.umd.min.js.map +1 -1
  16. package/bundles/cdk-bidi.umd.js +25 -25
  17. package/bundles/cdk-bidi.umd.js.map +1 -1
  18. package/bundles/cdk-bidi.umd.min.js +5 -4
  19. package/bundles/cdk-bidi.umd.min.js.map +1 -1
  20. package/bundles/cdk-clipboard.umd.js +37 -36
  21. package/bundles/cdk-clipboard.umd.js.map +1 -1
  22. package/bundles/cdk-clipboard.umd.min.js +10 -2
  23. package/bundles/cdk-clipboard.umd.min.js.map +1 -1
  24. package/bundles/cdk-coercion.umd.js.map +1 -1
  25. package/bundles/cdk-collections.umd.js +303 -237
  26. package/bundles/cdk-collections.umd.js.map +1 -1
  27. package/bundles/cdk-collections.umd.min.js +3 -9
  28. package/bundles/cdk-collections.umd.min.js.map +1 -1
  29. package/bundles/cdk-drag-drop.umd.js +1059 -927
  30. package/bundles/cdk-drag-drop.umd.js.map +1 -1
  31. package/bundles/cdk-drag-drop.umd.min.js +72 -10
  32. package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
  33. package/bundles/cdk-keycodes.umd.js.map +1 -1
  34. package/bundles/cdk-layout.umd.js +18 -18
  35. package/bundles/cdk-layout.umd.js.map +1 -1
  36. package/bundles/cdk-layout.umd.min.js +6 -5
  37. package/bundles/cdk-layout.umd.min.js.map +1 -1
  38. package/bundles/cdk-observers.umd.js +34 -34
  39. package/bundles/cdk-observers.umd.js.map +1 -1
  40. package/bundles/cdk-observers.umd.min.js +2 -2
  41. package/bundles/cdk-observers.umd.min.js.map +1 -1
  42. package/bundles/cdk-overlay.umd.js +638 -416
  43. package/bundles/cdk-overlay.umd.js.map +1 -1
  44. package/bundles/cdk-overlay.umd.min.js +51 -12
  45. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  46. package/bundles/cdk-platform.umd.js +10 -10
  47. package/bundles/cdk-platform.umd.js.map +1 -1
  48. package/bundles/cdk-platform.umd.min.js +4 -11
  49. package/bundles/cdk-platform.umd.min.js.map +1 -1
  50. package/bundles/cdk-portal.umd.js +355 -300
  51. package/bundles/cdk-portal.umd.js.map +1 -1
  52. package/bundles/cdk-portal.umd.min.js +4 -5
  53. package/bundles/cdk-portal.umd.min.js.map +1 -1
  54. package/bundles/cdk-scrolling.umd.js +482 -392
  55. package/bundles/cdk-scrolling.umd.js.map +1 -1
  56. package/bundles/cdk-scrolling.umd.min.js +20 -12
  57. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  58. package/bundles/cdk-stepper.umd.js +117 -117
  59. package/bundles/cdk-stepper.umd.js.map +1 -1
  60. package/bundles/cdk-stepper.umd.min.js +11 -2
  61. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  62. package/bundles/cdk-table.umd.js +862 -607
  63. package/bundles/cdk-table.umd.js.map +1 -1
  64. package/bundles/cdk-table.umd.min.js +8 -15
  65. package/bundles/cdk-table.umd.min.js.map +1 -1
  66. package/bundles/cdk-testing-protractor.umd.js +300 -241
  67. package/bundles/cdk-testing-protractor.umd.js.map +1 -1
  68. package/bundles/cdk-testing-protractor.umd.min.js +2 -9
  69. package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
  70. package/bundles/cdk-testing-testbed.umd.js +337 -276
  71. package/bundles/cdk-testing-testbed.umd.js.map +1 -1
  72. package/bundles/cdk-testing-testbed.umd.min.js +7 -30
  73. package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
  74. package/bundles/cdk-testing.umd.js +358 -270
  75. package/bundles/cdk-testing.umd.js.map +1 -1
  76. package/bundles/cdk-testing.umd.min.js +3 -18
  77. package/bundles/cdk-testing.umd.min.js.map +1 -1
  78. package/bundles/cdk-text-field.umd.js +51 -51
  79. package/bundles/cdk-text-field.umd.js.map +1 -1
  80. package/bundles/cdk-text-field.umd.min.js +10 -2
  81. package/bundles/cdk-text-field.umd.min.js.map +1 -1
  82. package/bundles/cdk-tree.umd.js +449 -396
  83. package/bundles/cdk-tree.umd.js.map +1 -1
  84. package/bundles/cdk-tree.umd.min.js +28 -3
  85. package/bundles/cdk-tree.umd.min.js.map +1 -1
  86. package/bundles/cdk.umd.js +1 -1
  87. package/bundles/cdk.umd.js.map +1 -1
  88. package/bundles/cdk.umd.min.js +1 -1
  89. package/bundles/cdk.umd.min.js.map +1 -1
  90. package/drag-drop/clone-node.d.ts +9 -0
  91. package/drag-drop/directives/drag-handle.d.ts +8 -2
  92. package/drag-drop/directives/drag-placeholder.d.ts +7 -1
  93. package/drag-drop/directives/drag-preview.d.ts +7 -1
  94. package/drag-drop/directives/drag.d.ts +3 -7
  95. package/drag-drop/directives/drop-list-group.d.ts +7 -1
  96. package/drag-drop/directives/drop-list.d.ts +7 -1
  97. package/drag-drop/index.d.ts +2 -2
  98. package/drag-drop/index.metadata.json +1 -1
  99. package/drag-drop/parent-position-tracker.d.ts +1 -1
  100. package/esm2015/a11y/aria-describer/aria-describer.js +21 -7
  101. package/esm2015/a11y/focus-trap/configurable-focus-trap-factory.js +3 -3
  102. package/esm2015/a11y/focus-trap/focus-trap.js +1 -1
  103. package/esm2015/a11y/interactivity-checker/interactivity-checker.js +43 -30
  104. package/esm2015/a11y/key-manager/list-key-manager.js +27 -2
  105. package/esm2015/a11y/live-announcer/live-announcer.js +1 -1
  106. package/esm2015/accordion/accordion-item.js +7 -7
  107. package/esm2015/accordion/accordion.js +9 -2
  108. package/esm2015/accordion/index.js +2 -1
  109. package/esm2015/clipboard/pending-copy.js +7 -6
  110. package/esm2015/drag-drop/clone-node.js +54 -0
  111. package/esm2015/drag-drop/directives/drag-handle.js +12 -5
  112. package/esm2015/drag-drop/directives/drag-placeholder.js +10 -3
  113. package/esm2015/drag-drop/directives/drag-preview.js +10 -3
  114. package/esm2015/drag-drop/directives/drag.js +19 -15
  115. package/esm2015/drag-drop/directives/drop-list-group.js +9 -2
  116. package/esm2015/drag-drop/directives/drop-list.js +19 -8
  117. package/esm2015/drag-drop/drag-ref.js +2 -29
  118. package/esm2015/drag-drop/index.js +3 -2
  119. package/esm2015/layout/breakpoints-observer.js +1 -1
  120. package/esm2015/overlay/dispatchers/base-overlay-dispatcher.js +51 -0
  121. package/esm2015/overlay/dispatchers/index.js +10 -0
  122. package/esm2015/overlay/dispatchers/overlay-keyboard-dispatcher.js +79 -0
  123. package/esm2015/overlay/dispatchers/overlay-outside-click-dispatcher.js +94 -0
  124. package/esm2015/overlay/index.js +5 -4
  125. package/esm2015/overlay/overlay-config.js +5 -1
  126. package/esm2015/overlay/overlay-directives.js +34 -8
  127. package/esm2015/overlay/overlay-module.js +2 -2
  128. package/esm2015/overlay/overlay-ref.js +24 -2
  129. package/esm2015/overlay/overlay-reference.js +1 -1
  130. package/esm2015/overlay/overlay.js +10 -5
  131. package/esm2015/overlay/position/connected-position-strategy.js +1 -5
  132. package/esm2015/overlay/position/flexible-connected-position-strategy.js +3 -3
  133. package/esm2015/overlay/position/overlay-position-builder.js +1 -1
  134. package/esm2015/overlay/public-api.js +2 -2
  135. package/esm2015/portal/dom-portal-outlet.js +5 -2
  136. package/esm2015/scrolling/public-api.js +2 -1
  137. package/esm2015/scrolling/scrolling-module.js +4 -1
  138. package/esm2015/scrolling/viewport-ruler.js +24 -10
  139. package/esm2015/scrolling/virtual-for-of.js +26 -12
  140. package/esm2015/scrolling/virtual-scroll-repeater.js +8 -0
  141. package/esm2015/scrolling/virtual-scroll-viewport.js +2 -2
  142. package/esm2015/table/cell.js +18 -3
  143. package/esm2015/table/coalesced-style-scheduler.js +87 -0
  144. package/esm2015/table/public-api.js +2 -1
  145. package/esm2015/table/sticky-styler.js +79 -45
  146. package/esm2015/table/table.js +33 -12
  147. package/esm2015/testing/component-harness.js +19 -1
  148. package/esm2015/testing/harness-environment.js +7 -1
  149. package/esm2015/testing/testbed/fake-events/dispatch-events.js +5 -4
  150. package/esm2015/testing/testbed/fake-events/event-objects.js +10 -7
  151. package/esm2015/testing/testbed/fake-events/type-in-element.js +4 -4
  152. package/esm2015/testing/testbed/unit-test-element.js +20 -12
  153. package/esm2015/tree/control/nested-tree-control.js +7 -3
  154. package/esm2015/tree/tree.js +9 -23
  155. package/esm2015/version.js +1 -1
  156. package/fesm2015/a11y.js +88 -38
  157. package/fesm2015/a11y.js.map +1 -1
  158. package/fesm2015/accordion.js +13 -6
  159. package/fesm2015/accordion.js.map +1 -1
  160. package/fesm2015/cdk.js +1 -1
  161. package/fesm2015/cdk.js.map +1 -1
  162. package/fesm2015/clipboard.js +6 -5
  163. package/fesm2015/clipboard.js.map +1 -1
  164. package/fesm2015/drag-drop.js +669 -600
  165. package/fesm2015/drag-drop.js.map +1 -1
  166. package/fesm2015/overlay.js +215 -40
  167. package/fesm2015/overlay.js.map +1 -1
  168. package/fesm2015/portal.js +4 -1
  169. package/fesm2015/portal.js.map +1 -1
  170. package/fesm2015/scrolling.js +60 -21
  171. package/fesm2015/scrolling.js.map +1 -1
  172. package/fesm2015/table.js +214 -61
  173. package/fesm2015/table.js.map +1 -1
  174. package/fesm2015/testing/testbed.js +35 -23
  175. package/fesm2015/testing/testbed.js.map +1 -1
  176. package/fesm2015/testing.js +25 -1
  177. package/fesm2015/testing.js.map +1 -1
  178. package/fesm2015/tree.js +13 -23
  179. package/fesm2015/tree.js.map +1 -1
  180. package/overlay/dispatchers/base-overlay-dispatcher.d.ts +28 -0
  181. package/overlay/dispatchers/index.d.ts +9 -0
  182. package/overlay/{keyboard → dispatchers}/overlay-keyboard-dispatcher.d.ts +4 -10
  183. package/overlay/dispatchers/overlay-outside-click-dispatcher.d.ts +27 -0
  184. package/overlay/index.d.ts +4 -3
  185. package/overlay/index.metadata.json +1 -1
  186. package/overlay/overlay-config.d.ts +4 -0
  187. package/overlay/overlay-directives.d.ts +5 -0
  188. package/overlay/overlay-ref.d.ts +8 -2
  189. package/overlay/overlay-reference.d.ts +1 -0
  190. package/overlay/overlay.d.ts +4 -2
  191. package/overlay/position/connected-position-strategy.d.ts +0 -2
  192. package/overlay/public-api.d.ts +1 -1
  193. package/package.json +1 -1
  194. package/schematics/ng-add/index.js +1 -1
  195. package/scrolling/index.metadata.json +1 -1
  196. package/scrolling/public-api.d.ts +1 -0
  197. package/scrolling/scrolling-module.d.ts +3 -0
  198. package/scrolling/viewport-ruler.d.ts +2 -2
  199. package/scrolling/virtual-for-of.d.ts +2 -1
  200. package/scrolling/virtual-scroll-repeater.d.ts +16 -0
  201. package/scrolling/virtual-scroll-viewport.d.ts +4 -4
  202. package/table/cell.d.ts +13 -0
  203. package/table/coalesced-style-scheduler.d.ts +41 -0
  204. package/table/index.metadata.json +1 -1
  205. package/table/public-api.d.ts +1 -0
  206. package/table/sticky-styler.d.ts +7 -1
  207. package/table/table.d.ts +9 -1
  208. package/testing/component-harness.d.ts +12 -0
  209. package/testing/harness-environment.d.ts +1 -0
  210. package/testing/testbed/fake-events/dispatch-events.d.ts +3 -2
  211. package/testing/testbed/fake-events/event-objects.d.ts +2 -2
  212. package/testing/testbed/unit-test-element.d.ts +7 -0
  213. package/tree/control/nested-tree-control.d.ts +7 -2
  214. package/tree/index.metadata.json +1 -1
  215. package/tree/tree.d.ts +2 -4
  216. package/esm2015/overlay/keyboard/overlay-keyboard-dispatcher.js +0 -96
@@ -4,241 +4,307 @@
4
4
  (global = global || self, factory((global.ng = global.ng || {}, global.ng.cdk = global.ng.cdk || {}, global.ng.cdk.table = {}), global.ng.cdk.bidi, global.ng.cdk.coercion, global.ng.cdk.collections, global.ng.cdk.platform, global.ng.common, global.ng.core, global.rxjs, global.rxjs.operators));
5
5
  }(this, (function (exports, bidi, coercion, collections, platform, common, core, rxjs, operators) { 'use strict';
6
6
 
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
-
23
- var extendStatics = function(d, b) {
24
- extendStatics = Object.setPrototypeOf ||
25
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
- return extendStatics(d, b);
28
- };
29
-
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
-
36
- var __assign = function() {
37
- __assign = Object.assign || function __assign(t) {
38
- for (var s, i = 1, n = arguments.length; i < n; i++) {
39
- s = arguments[i];
40
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
- }
42
- return t;
43
- };
44
- return __assign.apply(this, arguments);
45
- };
46
-
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- }
58
-
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63
- return c > 3 && r && Object.defineProperty(target, key, r), r;
64
- }
65
-
66
- function __param(paramIndex, decorator) {
67
- return function (target, key) { decorator(target, key, paramIndex); }
68
- }
69
-
70
- function __metadata(metadataKey, metadataValue) {
71
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
- }
73
-
74
- function __awaiter(thisArg, _arguments, P, generator) {
75
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
- return new (P || (P = Promise))(function (resolve, reject) {
77
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
- step((generator = generator.apply(thisArg, _arguments || [])).next());
81
- });
82
- }
83
-
84
- function __generator(thisArg, body) {
85
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
- function verb(n) { return function (v) { return step([n, v]); }; }
88
- function step(op) {
89
- if (f) throw new TypeError("Generator is already executing.");
90
- while (_) try {
91
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
92
- if (y = 0, t) op = [op[0] & 2, t.value];
93
- switch (op[0]) {
94
- case 0: case 1: t = op; break;
95
- case 4: _.label++; return { value: op[1], done: false };
96
- case 5: _.label++; y = op[1]; op = [0]; continue;
97
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
- default:
99
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
- if (t[2]) _.ops.pop();
104
- _.trys.pop(); continue;
105
- }
106
- op = body.call(thisArg, _);
107
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
- }
110
- }
111
-
112
- var __createBinding = Object.create ? (function(o, m, k, k2) {
113
- if (k2 === undefined) k2 = k;
114
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
115
- }) : (function(o, m, k, k2) {
116
- if (k2 === undefined) k2 = k;
117
- o[k2] = m[k];
118
- });
119
-
120
- function __exportStar(m, exports) {
121
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
122
- }
123
-
124
- function __values(o) {
125
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
126
- if (m) return m.call(o);
127
- if (o && typeof o.length === "number") return {
128
- next: function () {
129
- if (o && i >= o.length) o = void 0;
130
- return { value: o && o[i++], done: !o };
131
- }
132
- };
133
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
134
- }
135
-
136
- function __read(o, n) {
137
- var m = typeof Symbol === "function" && o[Symbol.iterator];
138
- if (!m) return o;
139
- var i = m.call(o), r, ar = [], e;
140
- try {
141
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
142
- }
143
- catch (error) { e = { error: error }; }
144
- finally {
145
- try {
146
- if (r && !r.done && (m = i["return"])) m.call(i);
147
- }
148
- finally { if (e) throw e.error; }
149
- }
150
- return ar;
151
- }
152
-
153
- function __spread() {
154
- for (var ar = [], i = 0; i < arguments.length; i++)
155
- ar = ar.concat(__read(arguments[i]));
156
- return ar;
157
- }
158
-
159
- function __spreadArrays() {
160
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
161
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
162
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
163
- r[k] = a[j];
164
- return r;
165
- };
166
-
167
- function __await(v) {
168
- return this instanceof __await ? (this.v = v, this) : new __await(v);
169
- }
170
-
171
- function __asyncGenerator(thisArg, _arguments, generator) {
172
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
173
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
174
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
175
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
176
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
177
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
178
- function fulfill(value) { resume("next", value); }
179
- function reject(value) { resume("throw", value); }
180
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
181
- }
182
-
183
- function __asyncDelegator(o) {
184
- var i, p;
185
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
186
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
187
- }
188
-
189
- function __asyncValues(o) {
190
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
191
- var m = o[Symbol.asyncIterator], i;
192
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
193
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
194
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
195
- }
196
-
197
- function __makeTemplateObject(cooked, raw) {
198
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
199
- return cooked;
200
- };
201
-
202
- var __setModuleDefault = Object.create ? (function(o, v) {
203
- Object.defineProperty(o, "default", { enumerable: true, value: v });
204
- }) : function(o, v) {
205
- o["default"] = v;
206
- };
207
-
208
- function __importStar(mod) {
209
- if (mod && mod.__esModule) return mod;
210
- var result = {};
211
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
212
- __setModuleDefault(result, mod);
213
- return result;
214
- }
215
-
216
- function __importDefault(mod) {
217
- return (mod && mod.__esModule) ? mod : { default: mod };
218
- }
219
-
220
- function __classPrivateFieldGet(receiver, privateMap) {
221
- if (!privateMap.has(receiver)) {
222
- throw new TypeError("attempted to get private field on non-instance");
223
- }
224
- return privateMap.get(receiver);
225
- }
226
-
227
- function __classPrivateFieldSet(receiver, privateMap, value) {
228
- if (!privateMap.has(receiver)) {
229
- throw new TypeError("attempted to set private field on non-instance");
230
- }
231
- privateMap.set(receiver, value);
232
- return value;
7
+ /*! *****************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+ var extendStatics = function (d, b) {
23
+ extendStatics = Object.setPrototypeOf ||
24
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
+ function (d, b) { for (var p in b)
26
+ if (b.hasOwnProperty(p))
27
+ d[p] = b[p]; };
28
+ return extendStatics(d, b);
29
+ };
30
+ function __extends(d, b) {
31
+ extendStatics(d, b);
32
+ function __() { this.constructor = d; }
33
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
+ }
35
+ var __assign = function () {
36
+ __assign = Object.assign || function __assign(t) {
37
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
38
+ s = arguments[i];
39
+ for (var p in s)
40
+ if (Object.prototype.hasOwnProperty.call(s, p))
41
+ t[p] = s[p];
42
+ }
43
+ return t;
44
+ };
45
+ return __assign.apply(this, arguments);
46
+ };
47
+ function __rest(s, e) {
48
+ var t = {};
49
+ for (var p in s)
50
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ }
59
+ function __decorate(decorators, target, key, desc) {
60
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
62
+ r = Reflect.decorate(decorators, target, key, desc);
63
+ else
64
+ for (var i = decorators.length - 1; i >= 0; i--)
65
+ if (d = decorators[i])
66
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
67
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
68
+ }
69
+ function __param(paramIndex, decorator) {
70
+ return function (target, key) { decorator(target, key, paramIndex); };
71
+ }
72
+ function __metadata(metadataKey, metadataValue) {
73
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
74
+ return Reflect.metadata(metadataKey, metadataValue);
75
+ }
76
+ function __awaiter(thisArg, _arguments, P, generator) {
77
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
78
+ return new (P || (P = Promise))(function (resolve, reject) {
79
+ function fulfilled(value) { try {
80
+ step(generator.next(value));
81
+ }
82
+ catch (e) {
83
+ reject(e);
84
+ } }
85
+ function rejected(value) { try {
86
+ step(generator["throw"](value));
87
+ }
88
+ catch (e) {
89
+ reject(e);
90
+ } }
91
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
92
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
93
+ });
94
+ }
95
+ function __generator(thisArg, body) {
96
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
97
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
98
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
99
+ function verb(n) { return function (v) { return step([n, v]); }; }
100
+ function step(op) {
101
+ if (f)
102
+ throw new TypeError("Generator is already executing.");
103
+ while (_)
104
+ try {
105
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
106
+ return t;
107
+ if (y = 0, t)
108
+ op = [op[0] & 2, t.value];
109
+ switch (op[0]) {
110
+ case 0:
111
+ case 1:
112
+ t = op;
113
+ break;
114
+ case 4:
115
+ _.label++;
116
+ return { value: op[1], done: false };
117
+ case 5:
118
+ _.label++;
119
+ y = op[1];
120
+ op = [0];
121
+ continue;
122
+ case 7:
123
+ op = _.ops.pop();
124
+ _.trys.pop();
125
+ continue;
126
+ default:
127
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
128
+ _ = 0;
129
+ continue;
130
+ }
131
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
132
+ _.label = op[1];
133
+ break;
134
+ }
135
+ if (op[0] === 6 && _.label < t[1]) {
136
+ _.label = t[1];
137
+ t = op;
138
+ break;
139
+ }
140
+ if (t && _.label < t[2]) {
141
+ _.label = t[2];
142
+ _.ops.push(op);
143
+ break;
144
+ }
145
+ if (t[2])
146
+ _.ops.pop();
147
+ _.trys.pop();
148
+ continue;
149
+ }
150
+ op = body.call(thisArg, _);
151
+ }
152
+ catch (e) {
153
+ op = [6, e];
154
+ y = 0;
155
+ }
156
+ finally {
157
+ f = t = 0;
158
+ }
159
+ if (op[0] & 5)
160
+ throw op[1];
161
+ return { value: op[0] ? op[1] : void 0, done: true };
162
+ }
163
+ }
164
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
165
+ if (k2 === undefined)
166
+ k2 = k;
167
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
168
+ }) : (function (o, m, k, k2) {
169
+ if (k2 === undefined)
170
+ k2 = k;
171
+ o[k2] = m[k];
172
+ });
173
+ function __exportStar(m, exports) {
174
+ for (var p in m)
175
+ if (p !== "default" && !exports.hasOwnProperty(p))
176
+ __createBinding(exports, m, p);
177
+ }
178
+ function __values(o) {
179
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
180
+ if (m)
181
+ return m.call(o);
182
+ if (o && typeof o.length === "number")
183
+ return {
184
+ next: function () {
185
+ if (o && i >= o.length)
186
+ o = void 0;
187
+ return { value: o && o[i++], done: !o };
188
+ }
189
+ };
190
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
191
+ }
192
+ function __read(o, n) {
193
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
194
+ if (!m)
195
+ return o;
196
+ var i = m.call(o), r, ar = [], e;
197
+ try {
198
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
199
+ ar.push(r.value);
200
+ }
201
+ catch (error) {
202
+ e = { error: error };
203
+ }
204
+ finally {
205
+ try {
206
+ if (r && !r.done && (m = i["return"]))
207
+ m.call(i);
208
+ }
209
+ finally {
210
+ if (e)
211
+ throw e.error;
212
+ }
213
+ }
214
+ return ar;
215
+ }
216
+ function __spread() {
217
+ for (var ar = [], i = 0; i < arguments.length; i++)
218
+ ar = ar.concat(__read(arguments[i]));
219
+ return ar;
220
+ }
221
+ function __spreadArrays() {
222
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
223
+ s += arguments[i].length;
224
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
225
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
226
+ r[k] = a[j];
227
+ return r;
228
+ }
229
+ ;
230
+ function __await(v) {
231
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
232
+ }
233
+ function __asyncGenerator(thisArg, _arguments, generator) {
234
+ if (!Symbol.asyncIterator)
235
+ throw new TypeError("Symbol.asyncIterator is not defined.");
236
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
237
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
238
+ function verb(n) { if (g[n])
239
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
240
+ function resume(n, v) { try {
241
+ step(g[n](v));
242
+ }
243
+ catch (e) {
244
+ settle(q[0][3], e);
245
+ } }
246
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
247
+ function fulfill(value) { resume("next", value); }
248
+ function reject(value) { resume("throw", value); }
249
+ function settle(f, v) { if (f(v), q.shift(), q.length)
250
+ resume(q[0][0], q[0][1]); }
251
+ }
252
+ function __asyncDelegator(o) {
253
+ var i, p;
254
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
255
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
256
+ }
257
+ function __asyncValues(o) {
258
+ if (!Symbol.asyncIterator)
259
+ throw new TypeError("Symbol.asyncIterator is not defined.");
260
+ var m = o[Symbol.asyncIterator], i;
261
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
262
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
263
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
264
+ }
265
+ function __makeTemplateObject(cooked, raw) {
266
+ if (Object.defineProperty) {
267
+ Object.defineProperty(cooked, "raw", { value: raw });
268
+ }
269
+ else {
270
+ cooked.raw = raw;
271
+ }
272
+ return cooked;
273
+ }
274
+ ;
275
+ var __setModuleDefault = Object.create ? (function (o, v) {
276
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
277
+ }) : function (o, v) {
278
+ o["default"] = v;
279
+ };
280
+ function __importStar(mod) {
281
+ if (mod && mod.__esModule)
282
+ return mod;
283
+ var result = {};
284
+ if (mod != null)
285
+ for (var k in mod)
286
+ if (Object.hasOwnProperty.call(mod, k))
287
+ __createBinding(result, mod, k);
288
+ __setModuleDefault(result, mod);
289
+ return result;
290
+ }
291
+ function __importDefault(mod) {
292
+ return (mod && mod.__esModule) ? mod : { default: mod };
293
+ }
294
+ function __classPrivateFieldGet(receiver, privateMap) {
295
+ if (!privateMap.has(receiver)) {
296
+ throw new TypeError("attempted to get private field on non-instance");
297
+ }
298
+ return privateMap.get(receiver);
299
+ }
300
+ function __classPrivateFieldSet(receiver, privateMap, value) {
301
+ if (!privateMap.has(receiver)) {
302
+ throw new TypeError("attempted to set private field on non-instance");
303
+ }
304
+ privateMap.set(receiver, value);
305
+ return value;
233
306
  }
234
307
 
235
- /**
236
- * @license
237
- * Copyright Google LLC All Rights Reserved.
238
- *
239
- * Use of this source code is governed by an MIT-style license that can be
240
- * found in the LICENSE file at https://angular.io/license
241
- */
242
308
  /**
243
309
  * Mixin to provide a directive with a function that checks if the sticky input has been
244
310
  * changed since the last time the function was called. Essentially adds a dirty-check to the
@@ -299,13 +365,6 @@
299
365
  /** Injection token that can be used to specify the text column options. */
300
366
  var TEXT_COLUMN_OPTIONS = new core.InjectionToken('text-column-options');
301
367
 
302
- /**
303
- * @license
304
- * Copyright Google LLC All Rights Reserved.
305
- *
306
- * Use of this source code is governed by an MIT-style license that can be
307
- * found in the LICENSE file at https://angular.io/license
308
- */
309
368
  /**
310
369
  * Cell definition for a CDK table.
311
370
  * Captures the template of a column's data row cell as well as cell-specific properties.
@@ -314,14 +373,14 @@
314
373
  function CdkCellDef(/** @docs-private */ template) {
315
374
  this.template = template;
316
375
  }
317
- CdkCellDef.decorators = [
318
- { type: core.Directive, args: [{ selector: '[cdkCellDef]' },] }
319
- ];
320
- CdkCellDef.ctorParameters = function () { return [
321
- { type: core.TemplateRef }
322
- ]; };
323
376
  return CdkCellDef;
324
377
  }());
378
+ CdkCellDef.decorators = [
379
+ { type: core.Directive, args: [{ selector: '[cdkCellDef]' },] }
380
+ ];
381
+ CdkCellDef.ctorParameters = function () { return [
382
+ { type: core.TemplateRef }
383
+ ]; };
325
384
  /**
326
385
  * Header cell definition for a CDK table.
327
386
  * Captures the template of a column's header cell and as well as cell-specific properties.
@@ -330,14 +389,14 @@
330
389
  function CdkHeaderCellDef(/** @docs-private */ template) {
331
390
  this.template = template;
332
391
  }
333
- CdkHeaderCellDef.decorators = [
334
- { type: core.Directive, args: [{ selector: '[cdkHeaderCellDef]' },] }
335
- ];
336
- CdkHeaderCellDef.ctorParameters = function () { return [
337
- { type: core.TemplateRef }
338
- ]; };
339
392
  return CdkHeaderCellDef;
340
393
  }());
394
+ CdkHeaderCellDef.decorators = [
395
+ { type: core.Directive, args: [{ selector: '[cdkHeaderCellDef]' },] }
396
+ ];
397
+ CdkHeaderCellDef.ctorParameters = function () { return [
398
+ { type: core.TemplateRef }
399
+ ]; };
341
400
  /**
342
401
  * Footer cell definition for a CDK table.
343
402
  * Captures the template of a column's footer cell and as well as cell-specific properties.
@@ -346,14 +405,14 @@
346
405
  function CdkFooterCellDef(/** @docs-private */ template) {
347
406
  this.template = template;
348
407
  }
349
- CdkFooterCellDef.decorators = [
350
- { type: core.Directive, args: [{ selector: '[cdkFooterCellDef]' },] }
351
- ];
352
- CdkFooterCellDef.ctorParameters = function () { return [
353
- { type: core.TemplateRef }
354
- ]; };
355
408
  return CdkFooterCellDef;
356
409
  }());
410
+ CdkFooterCellDef.decorators = [
411
+ { type: core.Directive, args: [{ selector: '[cdkFooterCellDef]' },] }
412
+ ];
413
+ CdkFooterCellDef.ctorParameters = function () { return [
414
+ { type: core.TemplateRef }
415
+ ]; };
357
416
  // Boilerplate for applying mixins to CdkColumnDef.
358
417
  /** @docs-private */
359
418
  var CdkColumnDefBase = /** @class */ (function () {
@@ -385,6 +444,7 @@
385
444
  if (name) {
386
445
  this._name = name;
387
446
  this.cssClassFriendlyName = name.replace(/[^a-z0-9_-]/ig, '-');
447
+ this._updateColumnCssClassName();
388
448
  }
389
449
  },
390
450
  enumerable: false,
@@ -407,30 +467,55 @@
407
467
  enumerable: false,
408
468
  configurable: true
409
469
  });
410
- CdkColumnDef.decorators = [
411
- { type: core.Directive, args: [{
412
- selector: '[cdkColumnDef]',
413
- inputs: ['sticky'],
414
- providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],
415
- },] }
416
- ];
417
- CdkColumnDef.ctorParameters = function () { return [
418
- { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
419
- ]; };
420
- CdkColumnDef.propDecorators = {
421
- name: [{ type: core.Input, args: ['cdkColumnDef',] }],
422
- stickyEnd: [{ type: core.Input, args: ['stickyEnd',] }],
423
- cell: [{ type: core.ContentChild, args: [CdkCellDef,] }],
424
- headerCell: [{ type: core.ContentChild, args: [CdkHeaderCellDef,] }],
425
- footerCell: [{ type: core.ContentChild, args: [CdkFooterCellDef,] }]
470
+ /**
471
+ * Overridable method that sets the css classes that will be added to every cell in this
472
+ * column.
473
+ * In the future, columnCssClassName will change from type string[] to string and this
474
+ * will set a single string value.
475
+ * @docs-private
476
+ */
477
+ CdkColumnDef.prototype._updateColumnCssClassName = function () {
478
+ this._columnCssClassName = ["cdk-column-" + this.cssClassFriendlyName];
426
479
  };
427
480
  return CdkColumnDef;
428
481
  }(_CdkColumnDefBase));
482
+ CdkColumnDef.decorators = [
483
+ { type: core.Directive, args: [{
484
+ selector: '[cdkColumnDef]',
485
+ inputs: ['sticky'],
486
+ providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],
487
+ },] }
488
+ ];
489
+ CdkColumnDef.ctorParameters = function () { return [
490
+ { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
491
+ ]; };
492
+ CdkColumnDef.propDecorators = {
493
+ name: [{ type: core.Input, args: ['cdkColumnDef',] }],
494
+ stickyEnd: [{ type: core.Input, args: ['stickyEnd',] }],
495
+ cell: [{ type: core.ContentChild, args: [CdkCellDef,] }],
496
+ headerCell: [{ type: core.ContentChild, args: [CdkHeaderCellDef,] }],
497
+ footerCell: [{ type: core.ContentChild, args: [CdkFooterCellDef,] }]
498
+ };
429
499
  /** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */
430
500
  var BaseCdkCell = /** @class */ (function () {
431
501
  function BaseCdkCell(columnDef, elementRef) {
432
- var columnClassName = "cdk-column-" + columnDef.cssClassFriendlyName;
433
- elementRef.nativeElement.classList.add(columnClassName);
502
+ var e_1, _a;
503
+ // If IE 11 is dropped before we switch to setting a single class name, change to multi param
504
+ // with destructuring.
505
+ var classList = elementRef.nativeElement.classList;
506
+ try {
507
+ for (var _b = __values(columnDef._columnCssClassName), _c = _b.next(); !_c.done; _c = _b.next()) {
508
+ var className = _c.value;
509
+ classList.add(className);
510
+ }
511
+ }
512
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
513
+ finally {
514
+ try {
515
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
516
+ }
517
+ finally { if (e_1) throw e_1.error; }
518
+ }
434
519
  }
435
520
  return BaseCdkCell;
436
521
  }());
@@ -440,71 +525,165 @@
440
525
  function CdkHeaderCell(columnDef, elementRef) {
441
526
  return _super.call(this, columnDef, elementRef) || this;
442
527
  }
443
- CdkHeaderCell.decorators = [
444
- { type: core.Directive, args: [{
445
- selector: 'cdk-header-cell, th[cdk-header-cell]',
446
- host: {
447
- 'class': 'cdk-header-cell',
448
- 'role': 'columnheader',
449
- },
450
- },] }
451
- ];
452
- CdkHeaderCell.ctorParameters = function () { return [
453
- { type: CdkColumnDef },
454
- { type: core.ElementRef }
455
- ]; };
456
528
  return CdkHeaderCell;
457
529
  }(BaseCdkCell));
530
+ CdkHeaderCell.decorators = [
531
+ { type: core.Directive, args: [{
532
+ selector: 'cdk-header-cell, th[cdk-header-cell]',
533
+ host: {
534
+ 'class': 'cdk-header-cell',
535
+ 'role': 'columnheader',
536
+ },
537
+ },] }
538
+ ];
539
+ CdkHeaderCell.ctorParameters = function () { return [
540
+ { type: CdkColumnDef },
541
+ { type: core.ElementRef }
542
+ ]; };
458
543
  /** Footer cell template container that adds the right classes and role. */
459
544
  var CdkFooterCell = /** @class */ (function (_super) {
460
545
  __extends(CdkFooterCell, _super);
461
546
  function CdkFooterCell(columnDef, elementRef) {
462
547
  return _super.call(this, columnDef, elementRef) || this;
463
548
  }
464
- CdkFooterCell.decorators = [
465
- { type: core.Directive, args: [{
466
- selector: 'cdk-footer-cell, td[cdk-footer-cell]',
467
- host: {
468
- 'class': 'cdk-footer-cell',
469
- 'role': 'gridcell',
470
- },
471
- },] }
472
- ];
473
- CdkFooterCell.ctorParameters = function () { return [
474
- { type: CdkColumnDef },
475
- { type: core.ElementRef }
476
- ]; };
477
549
  return CdkFooterCell;
478
550
  }(BaseCdkCell));
551
+ CdkFooterCell.decorators = [
552
+ { type: core.Directive, args: [{
553
+ selector: 'cdk-footer-cell, td[cdk-footer-cell]',
554
+ host: {
555
+ 'class': 'cdk-footer-cell',
556
+ 'role': 'gridcell',
557
+ },
558
+ },] }
559
+ ];
560
+ CdkFooterCell.ctorParameters = function () { return [
561
+ { type: CdkColumnDef },
562
+ { type: core.ElementRef }
563
+ ]; };
479
564
  /** Cell template container that adds the right classes and role. */
480
565
  var CdkCell = /** @class */ (function (_super) {
481
566
  __extends(CdkCell, _super);
482
567
  function CdkCell(columnDef, elementRef) {
483
568
  return _super.call(this, columnDef, elementRef) || this;
484
569
  }
485
- CdkCell.decorators = [
486
- { type: core.Directive, args: [{
487
- selector: 'cdk-cell, td[cdk-cell]',
488
- host: {
489
- 'class': 'cdk-cell',
490
- 'role': 'gridcell',
491
- },
492
- },] }
493
- ];
494
- CdkCell.ctorParameters = function () { return [
495
- { type: CdkColumnDef },
496
- { type: core.ElementRef }
497
- ]; };
498
570
  return CdkCell;
499
571
  }(BaseCdkCell));
572
+ CdkCell.decorators = [
573
+ { type: core.Directive, args: [{
574
+ selector: 'cdk-cell, td[cdk-cell]',
575
+ host: {
576
+ 'class': 'cdk-cell',
577
+ 'role': 'gridcell',
578
+ },
579
+ },] }
580
+ ];
581
+ CdkCell.ctorParameters = function () { return [
582
+ { type: CdkColumnDef },
583
+ { type: core.ElementRef }
584
+ ]; };
500
585
 
501
586
  /**
502
- * @license
503
- * Copyright Google LLC All Rights Reserved.
587
+ * @docs-private
588
+ */
589
+ var _Schedule = /** @class */ (function () {
590
+ function _Schedule() {
591
+ this.tasks = [];
592
+ this.endTasks = [];
593
+ }
594
+ return _Schedule;
595
+ }());
596
+ /**
597
+ * Allows grouping up CSSDom mutations after the current execution context.
598
+ * This can significantly improve performance when separate consecutive functions are
599
+ * reading from the CSSDom and then mutating it.
504
600
  *
505
- * Use of this source code is governed by an MIT-style license that can be
506
- * found in the LICENSE file at https://angular.io/license
601
+ * @docs-private
507
602
  */
603
+ var _CoalescedStyleScheduler = /** @class */ (function () {
604
+ function _CoalescedStyleScheduler(_ngZone) {
605
+ this._ngZone = _ngZone;
606
+ this._currentSchedule = null;
607
+ this._destroyed = new rxjs.Subject();
608
+ }
609
+ /**
610
+ * Schedules the specified task to run at the end of the current VM turn.
611
+ */
612
+ _CoalescedStyleScheduler.prototype.schedule = function (task) {
613
+ this._createScheduleIfNeeded();
614
+ this._currentSchedule.tasks.push(task);
615
+ };
616
+ /**
617
+ * Schedules the specified task to run after other scheduled tasks at the end of the current
618
+ * VM turn.
619
+ */
620
+ _CoalescedStyleScheduler.prototype.scheduleEnd = function (task) {
621
+ this._createScheduleIfNeeded();
622
+ this._currentSchedule.endTasks.push(task);
623
+ };
624
+ /** Prevent any further tasks from running. */
625
+ _CoalescedStyleScheduler.prototype.ngOnDestroy = function () {
626
+ this._destroyed.next();
627
+ this._destroyed.complete();
628
+ };
629
+ _CoalescedStyleScheduler.prototype._createScheduleIfNeeded = function () {
630
+ var _this = this;
631
+ if (this._currentSchedule) {
632
+ return;
633
+ }
634
+ this._currentSchedule = new _Schedule();
635
+ this._getScheduleObservable().pipe(operators.takeUntil(this._destroyed)).subscribe(function () {
636
+ var e_1, _a, e_2, _b;
637
+ while (_this._currentSchedule.tasks.length || _this._currentSchedule.endTasks.length) {
638
+ var schedule = _this._currentSchedule;
639
+ // Capture new tasks scheduled by the current set of tasks.
640
+ _this._currentSchedule = new _Schedule();
641
+ try {
642
+ for (var _c = (e_1 = void 0, __values(schedule.tasks)), _d = _c.next(); !_d.done; _d = _c.next()) {
643
+ var task = _d.value;
644
+ task();
645
+ }
646
+ }
647
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
648
+ finally {
649
+ try {
650
+ if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
651
+ }
652
+ finally { if (e_1) throw e_1.error; }
653
+ }
654
+ try {
655
+ for (var _e = (e_2 = void 0, __values(schedule.endTasks)), _f = _e.next(); !_f.done; _f = _e.next()) {
656
+ var task = _f.value;
657
+ task();
658
+ }
659
+ }
660
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
661
+ finally {
662
+ try {
663
+ if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
664
+ }
665
+ finally { if (e_2) throw e_2.error; }
666
+ }
667
+ }
668
+ _this._currentSchedule = null;
669
+ });
670
+ };
671
+ _CoalescedStyleScheduler.prototype._getScheduleObservable = function () {
672
+ // Use onStable when in the context of an ongoing change detection cycle so that we
673
+ // do not accidentally trigger additional cycles.
674
+ return this._ngZone.isStable ?
675
+ rxjs.from(Promise.resolve(undefined)) :
676
+ this._ngZone.onStable.pipe(operators.take(1));
677
+ };
678
+ return _CoalescedStyleScheduler;
679
+ }());
680
+ _CoalescedStyleScheduler.decorators = [
681
+ { type: core.Injectable }
682
+ ];
683
+ _CoalescedStyleScheduler.ctorParameters = function () { return [
684
+ { type: core.NgZone }
685
+ ]; };
686
+
508
687
  /**
509
688
  * The row template that can be used by the mat-table. Should not be used outside of the
510
689
  * material library.
@@ -548,15 +727,15 @@
548
727
  return column.cell.template;
549
728
  }
550
729
  };
551
- BaseRowDef.decorators = [
552
- { type: core.Directive }
553
- ];
554
- BaseRowDef.ctorParameters = function () { return [
555
- { type: core.TemplateRef },
556
- { type: core.IterableDiffers }
557
- ]; };
558
730
  return BaseRowDef;
559
731
  }());
732
+ BaseRowDef.decorators = [
733
+ { type: core.Directive }
734
+ ];
735
+ BaseRowDef.ctorParameters = function () { return [
736
+ { type: core.TemplateRef },
737
+ { type: core.IterableDiffers }
738
+ ]; };
560
739
  // Boilerplate for applying mixins to CdkHeaderRowDef.
561
740
  /** @docs-private */
562
741
  var CdkHeaderRowDefBase = /** @class */ (function (_super) {
@@ -583,19 +762,19 @@
583
762
  CdkHeaderRowDef.prototype.ngOnChanges = function (changes) {
584
763
  _super.prototype.ngOnChanges.call(this, changes);
585
764
  };
586
- CdkHeaderRowDef.decorators = [
587
- { type: core.Directive, args: [{
588
- selector: '[cdkHeaderRowDef]',
589
- inputs: ['columns: cdkHeaderRowDef', 'sticky: cdkHeaderRowDefSticky'],
590
- },] }
591
- ];
592
- CdkHeaderRowDef.ctorParameters = function () { return [
593
- { type: core.TemplateRef },
594
- { type: core.IterableDiffers },
595
- { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
596
- ]; };
597
765
  return CdkHeaderRowDef;
598
766
  }(_CdkHeaderRowDefBase));
767
+ CdkHeaderRowDef.decorators = [
768
+ { type: core.Directive, args: [{
769
+ selector: '[cdkHeaderRowDef]',
770
+ inputs: ['columns: cdkHeaderRowDef', 'sticky: cdkHeaderRowDefSticky'],
771
+ },] }
772
+ ];
773
+ CdkHeaderRowDef.ctorParameters = function () { return [
774
+ { type: core.TemplateRef },
775
+ { type: core.IterableDiffers },
776
+ { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
777
+ ]; };
599
778
  // Boilerplate for applying mixins to CdkFooterRowDef.
600
779
  /** @docs-private */
601
780
  var CdkFooterRowDefBase = /** @class */ (function (_super) {
@@ -622,19 +801,19 @@
622
801
  CdkFooterRowDef.prototype.ngOnChanges = function (changes) {
623
802
  _super.prototype.ngOnChanges.call(this, changes);
624
803
  };
625
- CdkFooterRowDef.decorators = [
626
- { type: core.Directive, args: [{
627
- selector: '[cdkFooterRowDef]',
628
- inputs: ['columns: cdkFooterRowDef', 'sticky: cdkFooterRowDefSticky'],
629
- },] }
630
- ];
631
- CdkFooterRowDef.ctorParameters = function () { return [
632
- { type: core.TemplateRef },
633
- { type: core.IterableDiffers },
634
- { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
635
- ]; };
636
804
  return CdkFooterRowDef;
637
805
  }(_CdkFooterRowDefBase));
806
+ CdkFooterRowDef.decorators = [
807
+ { type: core.Directive, args: [{
808
+ selector: '[cdkFooterRowDef]',
809
+ inputs: ['columns: cdkFooterRowDef', 'sticky: cdkFooterRowDefSticky'],
810
+ },] }
811
+ ];
812
+ CdkFooterRowDef.ctorParameters = function () { return [
813
+ { type: core.TemplateRef },
814
+ { type: core.IterableDiffers },
815
+ { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
816
+ ]; };
638
817
  /**
639
818
  * Data row definition for the CDK table.
640
819
  * Captures the header row's template and other row properties such as the columns to display and
@@ -649,19 +828,19 @@
649
828
  _this._table = _table;
650
829
  return _this;
651
830
  }
652
- CdkRowDef.decorators = [
653
- { type: core.Directive, args: [{
654
- selector: '[cdkRowDef]',
655
- inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],
656
- },] }
657
- ];
658
- CdkRowDef.ctorParameters = function () { return [
659
- { type: core.TemplateRef },
660
- { type: core.IterableDiffers },
661
- { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
662
- ]; };
663
831
  return CdkRowDef;
664
832
  }(BaseRowDef));
833
+ CdkRowDef.decorators = [
834
+ { type: core.Directive, args: [{
835
+ selector: '[cdkRowDef]',
836
+ inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],
837
+ },] }
838
+ ];
839
+ CdkRowDef.ctorParameters = function () { return [
840
+ { type: core.TemplateRef },
841
+ { type: core.IterableDiffers },
842
+ { type: undefined, decorators: [{ type: core.Inject, args: [CDK_TABLE,] }, { type: core.Optional }] }
843
+ ]; };
665
844
  /**
666
845
  * Outlet for rendering cells inside of a row or header row.
667
846
  * @docs-private
@@ -678,97 +857,97 @@
678
857
  CdkCellOutlet.mostRecentCellOutlet = null;
679
858
  }
680
859
  };
681
- /**
682
- * Static property containing the latest constructed instance of this class.
683
- * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using
684
- * createEmbeddedView. After one of these components are created, this property will provide
685
- * a handle to provide that component's cells and context. After init, the CdkCellOutlet will
686
- * construct the cells with the provided context.
687
- */
688
- CdkCellOutlet.mostRecentCellOutlet = null;
689
- CdkCellOutlet.decorators = [
690
- { type: core.Directive, args: [{ selector: '[cdkCellOutlet]' },] }
691
- ];
692
- CdkCellOutlet.ctorParameters = function () { return [
693
- { type: core.ViewContainerRef }
694
- ]; };
695
860
  return CdkCellOutlet;
696
861
  }());
862
+ /**
863
+ * Static property containing the latest constructed instance of this class.
864
+ * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using
865
+ * createEmbeddedView. After one of these components are created, this property will provide
866
+ * a handle to provide that component's cells and context. After init, the CdkCellOutlet will
867
+ * construct the cells with the provided context.
868
+ */
869
+ CdkCellOutlet.mostRecentCellOutlet = null;
870
+ CdkCellOutlet.decorators = [
871
+ { type: core.Directive, args: [{ selector: '[cdkCellOutlet]' },] }
872
+ ];
873
+ CdkCellOutlet.ctorParameters = function () { return [
874
+ { type: core.ViewContainerRef }
875
+ ]; };
697
876
  /** Header template container that contains the cell outlet. Adds the right class and role. */
698
877
  var CdkHeaderRow = /** @class */ (function () {
699
878
  function CdkHeaderRow() {
700
879
  }
701
- CdkHeaderRow.decorators = [
702
- { type: core.Component, args: [{
703
- selector: 'cdk-header-row, tr[cdk-header-row]',
704
- template: CDK_ROW_TEMPLATE,
705
- host: {
706
- 'class': 'cdk-header-row',
707
- 'role': 'row',
708
- },
709
- // See note on CdkTable for explanation on why this uses the default change detection strategy.
710
- // tslint:disable-next-line:validate-decorators
711
- changeDetection: core.ChangeDetectionStrategy.Default,
712
- encapsulation: core.ViewEncapsulation.None
713
- },] }
714
- ];
715
880
  return CdkHeaderRow;
716
881
  }());
882
+ CdkHeaderRow.decorators = [
883
+ { type: core.Component, args: [{
884
+ selector: 'cdk-header-row, tr[cdk-header-row]',
885
+ template: CDK_ROW_TEMPLATE,
886
+ host: {
887
+ 'class': 'cdk-header-row',
888
+ 'role': 'row',
889
+ },
890
+ // See note on CdkTable for explanation on why this uses the default change detection strategy.
891
+ // tslint:disable-next-line:validate-decorators
892
+ changeDetection: core.ChangeDetectionStrategy.Default,
893
+ encapsulation: core.ViewEncapsulation.None
894
+ },] }
895
+ ];
717
896
  /** Footer template container that contains the cell outlet. Adds the right class and role. */
718
897
  var CdkFooterRow = /** @class */ (function () {
719
898
  function CdkFooterRow() {
720
899
  }
721
- CdkFooterRow.decorators = [
722
- { type: core.Component, args: [{
723
- selector: 'cdk-footer-row, tr[cdk-footer-row]',
724
- template: CDK_ROW_TEMPLATE,
725
- host: {
726
- 'class': 'cdk-footer-row',
727
- 'role': 'row',
728
- },
729
- // See note on CdkTable for explanation on why this uses the default change detection strategy.
730
- // tslint:disable-next-line:validate-decorators
731
- changeDetection: core.ChangeDetectionStrategy.Default,
732
- encapsulation: core.ViewEncapsulation.None
733
- },] }
734
- ];
735
900
  return CdkFooterRow;
736
901
  }());
902
+ CdkFooterRow.decorators = [
903
+ { type: core.Component, args: [{
904
+ selector: 'cdk-footer-row, tr[cdk-footer-row]',
905
+ template: CDK_ROW_TEMPLATE,
906
+ host: {
907
+ 'class': 'cdk-footer-row',
908
+ 'role': 'row',
909
+ },
910
+ // See note on CdkTable for explanation on why this uses the default change detection strategy.
911
+ // tslint:disable-next-line:validate-decorators
912
+ changeDetection: core.ChangeDetectionStrategy.Default,
913
+ encapsulation: core.ViewEncapsulation.None
914
+ },] }
915
+ ];
737
916
  /** Data row template container that contains the cell outlet. Adds the right class and role. */
738
917
  var CdkRow = /** @class */ (function () {
739
918
  function CdkRow() {
740
919
  }
741
- CdkRow.decorators = [
742
- { type: core.Component, args: [{
743
- selector: 'cdk-row, tr[cdk-row]',
744
- template: CDK_ROW_TEMPLATE,
745
- host: {
746
- 'class': 'cdk-row',
747
- 'role': 'row',
748
- },
749
- // See note on CdkTable for explanation on why this uses the default change detection strategy.
750
- // tslint:disable-next-line:validate-decorators
751
- changeDetection: core.ChangeDetectionStrategy.Default,
752
- encapsulation: core.ViewEncapsulation.None
753
- },] }
754
- ];
755
920
  return CdkRow;
756
921
  }());
922
+ CdkRow.decorators = [
923
+ { type: core.Component, args: [{
924
+ selector: 'cdk-row, tr[cdk-row]',
925
+ template: CDK_ROW_TEMPLATE,
926
+ host: {
927
+ 'class': 'cdk-row',
928
+ 'role': 'row',
929
+ },
930
+ // See note on CdkTable for explanation on why this uses the default change detection strategy.
931
+ // tslint:disable-next-line:validate-decorators
932
+ changeDetection: core.ChangeDetectionStrategy.Default,
933
+ encapsulation: core.ViewEncapsulation.None
934
+ },] }
935
+ ];
757
936
  /** Row that can be used to display a message when no data is shown in the table. */
758
937
  var CdkNoDataRow = /** @class */ (function () {
759
938
  function CdkNoDataRow(templateRef) {
760
939
  this.templateRef = templateRef;
761
940
  }
762
- CdkNoDataRow.decorators = [
763
- { type: core.Directive, args: [{
764
- selector: 'ng-template[cdkNoDataRow]'
765
- },] }
766
- ];
767
- CdkNoDataRow.ctorParameters = function () { return [
768
- { type: core.TemplateRef }
769
- ]; };
770
941
  return CdkNoDataRow;
771
942
  }());
943
+ CdkNoDataRow.decorators = [
944
+ { type: core.Directive, args: [{
945
+ selector: 'ng-template[cdkNoDataRow]'
946
+ },] }
947
+ ];
948
+ CdkNoDataRow.ctorParameters = function () { return [
949
+ { type: core.TemplateRef }
950
+ ]; };
772
951
 
773
952
  /**
774
953
  * @license
@@ -795,13 +974,19 @@
795
974
  * @param direction The directionality context of the table (ltr/rtl); affects column positioning
796
975
  * by reversing left/right positions.
797
976
  * @param _isBrowser Whether the table is currently being rendered on the server or the client.
977
+ * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells
978
+ * using inline styles. If false, it is assumed that position: sticky is included in
979
+ * the component stylesheet for _stickCellCss.
798
980
  */
799
- function StickyStyler(_isNativeHtmlTable, _stickCellCss, direction, _isBrowser) {
981
+ function StickyStyler(_isNativeHtmlTable, _stickCellCss, direction, _coalescedStyleScheduler, _isBrowser, _needsPositionStickyOnElement) {
800
982
  if (_isBrowser === void 0) { _isBrowser = true; }
983
+ if (_needsPositionStickyOnElement === void 0) { _needsPositionStickyOnElement = true; }
801
984
  this._isNativeHtmlTable = _isNativeHtmlTable;
802
985
  this._stickCellCss = _stickCellCss;
803
986
  this.direction = direction;
987
+ this._coalescedStyleScheduler = _coalescedStyleScheduler;
804
988
  this._isBrowser = _isBrowser;
989
+ this._needsPositionStickyOnElement = _needsPositionStickyOnElement;
805
990
  }
806
991
  /**
807
992
  * Clears the sticky positioning styles from the row and its cells by resetting the `position`
@@ -811,6 +996,8 @@
811
996
  */
812
997
  StickyStyler.prototype.clearStickyPositioning = function (rows, stickyDirections) {
813
998
  var e_1, _a;
999
+ var _this = this;
1000
+ var elementsToClear = [];
814
1001
  try {
815
1002
  for (var rows_1 = __values(rows), rows_1_1 = rows_1.next(); !rows_1_1.done; rows_1_1 = rows_1.next()) {
816
1003
  var row = rows_1_1.value;
@@ -819,10 +1006,9 @@
819
1006
  if (row.nodeType !== row.ELEMENT_NODE) {
820
1007
  continue;
821
1008
  }
822
- this._removeStickyStyle(row, stickyDirections);
1009
+ elementsToClear.push(row);
823
1010
  for (var i = 0; i < row.children.length; i++) {
824
- var cell = row.children[i];
825
- this._removeStickyStyle(cell, stickyDirections);
1011
+ elementsToClear.push(row.children[i]);
826
1012
  }
827
1013
  }
828
1014
  }
@@ -833,6 +1019,23 @@
833
1019
  }
834
1020
  finally { if (e_1) throw e_1.error; }
835
1021
  }
1022
+ // Coalesce with sticky row/column updates (and potentially other changes like column resize).
1023
+ this._coalescedStyleScheduler.schedule(function () {
1024
+ var e_2, _a;
1025
+ try {
1026
+ for (var elementsToClear_1 = __values(elementsToClear), elementsToClear_1_1 = elementsToClear_1.next(); !elementsToClear_1_1.done; elementsToClear_1_1 = elementsToClear_1.next()) {
1027
+ var element = elementsToClear_1_1.value;
1028
+ _this._removeStickyStyle(element, stickyDirections);
1029
+ }
1030
+ }
1031
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1032
+ finally {
1033
+ try {
1034
+ if (elementsToClear_1_1 && !elementsToClear_1_1.done && (_a = elementsToClear_1.return)) _a.call(elementsToClear_1);
1035
+ }
1036
+ finally { if (e_2) throw e_2.error; }
1037
+ }
1038
+ });
836
1039
  };
837
1040
  /**
838
1041
  * Applies sticky left and right positions to the cells of each row according to the sticky
@@ -844,9 +1047,9 @@
844
1047
  * in this index position should be stuck to the end of the row.
845
1048
  */
846
1049
  StickyStyler.prototype.updateStickyColumns = function (rows, stickyStartStates, stickyEndStates) {
847
- var e_2, _a;
848
- var hasStickyColumns = stickyStartStates.some(function (state) { return state; }) || stickyEndStates.some(function (state) { return state; });
849
- if (!rows.length || !hasStickyColumns || !this._isBrowser) {
1050
+ var _this = this;
1051
+ if (!rows.length || !this._isBrowser || !(stickyStartStates.some(function (state) { return state; }) ||
1052
+ stickyEndStates.some(function (state) { return state; }))) {
850
1053
  return;
851
1054
  }
852
1055
  var firstRow = rows[0];
@@ -854,28 +1057,34 @@
854
1057
  var cellWidths = this._getCellWidths(firstRow);
855
1058
  var startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);
856
1059
  var endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);
857
- var isRtl = this.direction === 'rtl';
858
- try {
859
- for (var rows_2 = __values(rows), rows_2_1 = rows_2.next(); !rows_2_1.done; rows_2_1 = rows_2.next()) {
860
- var row = rows_2_1.value;
861
- for (var i = 0; i < numCells; i++) {
862
- var cell = row.children[i];
863
- if (stickyStartStates[i]) {
864
- this._addStickyStyle(cell, isRtl ? 'right' : 'left', startPositions[i]);
865
- }
866
- if (stickyEndStates[i]) {
867
- this._addStickyStyle(cell, isRtl ? 'left' : 'right', endPositions[i]);
1060
+ // Coalesce with sticky row updates (and potentially other changes like column resize).
1061
+ this._coalescedStyleScheduler.schedule(function () {
1062
+ var e_3, _a;
1063
+ var isRtl = _this.direction === 'rtl';
1064
+ var start = isRtl ? 'right' : 'left';
1065
+ var end = isRtl ? 'left' : 'right';
1066
+ try {
1067
+ for (var rows_2 = __values(rows), rows_2_1 = rows_2.next(); !rows_2_1.done; rows_2_1 = rows_2.next()) {
1068
+ var row = rows_2_1.value;
1069
+ for (var i = 0; i < numCells; i++) {
1070
+ var cell = row.children[i];
1071
+ if (stickyStartStates[i]) {
1072
+ _this._addStickyStyle(cell, start, startPositions[i]);
1073
+ }
1074
+ if (stickyEndStates[i]) {
1075
+ _this._addStickyStyle(cell, end, endPositions[i]);
1076
+ }
868
1077
  }
869
1078
  }
870
1079
  }
871
- }
872
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
873
- finally {
874
- try {
875
- if (rows_2_1 && !rows_2_1.done && (_a = rows_2.return)) _a.call(rows_2);
1080
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
1081
+ finally {
1082
+ try {
1083
+ if (rows_2_1 && !rows_2_1.done && (_a = rows_2.return)) _a.call(rows_2);
1084
+ }
1085
+ finally { if (e_3) throw e_3.error; }
876
1086
  }
877
- finally { if (e_2) throw e_2.error; }
878
- }
1087
+ });
879
1088
  };
880
1089
  /**
881
1090
  * Applies sticky positioning to the row's cells if using the native table layout, and to the
@@ -889,6 +1098,7 @@
889
1098
  *
890
1099
  */
891
1100
  StickyStyler.prototype.stickRows = function (rowsToStick, stickyStates, position) {
1101
+ var _this = this;
892
1102
  // Since we can't measure the rows on the server, we can't stick the rows properly.
893
1103
  if (!this._isBrowser) {
894
1104
  return;
@@ -898,29 +1108,45 @@
898
1108
  // sticky states need to be reversed as well.
899
1109
  var rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;
900
1110
  var states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;
901
- var stickyHeight = 0;
902
- for (var rowIndex = 0; rowIndex < rows.length; rowIndex++) {
1111
+ // Measure row heights all at once before adding sticky styles to reduce layout thrashing.
1112
+ var stickyHeights = [];
1113
+ var elementsToStick = [];
1114
+ for (var rowIndex = 0, stickyHeight = 0; rowIndex < rows.length; rowIndex++) {
1115
+ stickyHeights[rowIndex] = stickyHeight;
903
1116
  if (!states[rowIndex]) {
904
1117
  continue;
905
1118
  }
906
1119
  var row = rows[rowIndex];
907
- if (this._isNativeHtmlTable) {
908
- for (var j = 0; j < row.children.length; j++) {
909
- var cell = row.children[j];
910
- this._addStickyStyle(cell, position, stickyHeight);
911
- }
912
- }
913
- else {
914
- // Flex does not respect the stick positioning on the cells, needs to be applied to the row.
915
- // If this is applied on a native table, Safari causes the header to fly in wrong direction.
916
- this._addStickyStyle(row, position, stickyHeight);
917
- }
918
- if (rowIndex === rows.length - 1) {
919
- // prevent unnecessary reflow from getBoundingClientRect()
920
- return;
1120
+ elementsToStick[rowIndex] = this._isNativeHtmlTable ?
1121
+ Array.from(row.children) : [row];
1122
+ if (rowIndex !== rows.length - 1) {
1123
+ stickyHeight += row.getBoundingClientRect().height;
921
1124
  }
922
- stickyHeight += row.getBoundingClientRect().height;
923
1125
  }
1126
+ // Coalesce with other sticky row updates (top/bottom), sticky columns updates
1127
+ // (and potentially other changes like column resize).
1128
+ this._coalescedStyleScheduler.schedule(function () {
1129
+ var e_4, _a;
1130
+ for (var rowIndex = 0; rowIndex < rows.length; rowIndex++) {
1131
+ if (!states[rowIndex]) {
1132
+ continue;
1133
+ }
1134
+ var height = stickyHeights[rowIndex];
1135
+ try {
1136
+ for (var _b = (e_4 = void 0, __values(elementsToStick[rowIndex])), _c = _b.next(); !_c.done; _c = _b.next()) {
1137
+ var element = _c.value;
1138
+ _this._addStickyStyle(element, position, height);
1139
+ }
1140
+ }
1141
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
1142
+ finally {
1143
+ try {
1144
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1145
+ }
1146
+ finally { if (e_4) throw e_4.error; }
1147
+ }
1148
+ }
1149
+ });
924
1150
  };
925
1151
  /**
926
1152
  * When using the native table in Safari, sticky footer cells do not stick. The only way to stick
@@ -929,16 +1155,20 @@
929
1155
  * the tfoot element.
930
1156
  */
931
1157
  StickyStyler.prototype.updateStickyFooterContainer = function (tableElement, stickyStates) {
1158
+ var _this = this;
932
1159
  if (!this._isNativeHtmlTable) {
933
1160
  return;
934
1161
  }
935
1162
  var tfoot = tableElement.querySelector('tfoot');
936
- if (stickyStates.some(function (state) { return !state; })) {
937
- this._removeStickyStyle(tfoot, ['bottom']);
938
- }
939
- else {
940
- this._addStickyStyle(tfoot, 'bottom', 0);
941
- }
1163
+ // Coalesce with other sticky updates (and potentially other changes like column resize).
1164
+ this._coalescedStyleScheduler.schedule(function () {
1165
+ if (stickyStates.some(function (state) { return !state; })) {
1166
+ _this._removeStickyStyle(tfoot, ['bottom']);
1167
+ }
1168
+ else {
1169
+ _this._addStickyStyle(tfoot, 'bottom', 0);
1170
+ }
1171
+ });
942
1172
  };
943
1173
  /**
944
1174
  * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating
@@ -946,26 +1176,34 @@
946
1176
  * sticky position if there are no more directions.
947
1177
  */
948
1178
  StickyStyler.prototype._removeStickyStyle = function (element, stickyDirections) {
949
- var e_3, _a;
1179
+ var e_5, _a;
950
1180
  try {
951
1181
  for (var stickyDirections_1 = __values(stickyDirections), stickyDirections_1_1 = stickyDirections_1.next(); !stickyDirections_1_1.done; stickyDirections_1_1 = stickyDirections_1.next()) {
952
1182
  var dir = stickyDirections_1_1.value;
953
1183
  element.style[dir] = '';
954
1184
  }
955
1185
  }
956
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
1186
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
957
1187
  finally {
958
1188
  try {
959
1189
  if (stickyDirections_1_1 && !stickyDirections_1_1.done && (_a = stickyDirections_1.return)) _a.call(stickyDirections_1);
960
1190
  }
961
- finally { if (e_3) throw e_3.error; }
1191
+ finally { if (e_5) throw e_5.error; }
962
1192
  }
963
- element.style.zIndex = this._getCalculatedZIndex(element);
964
1193
  // If the element no longer has any more sticky directions, remove sticky positioning and
965
1194
  // the sticky CSS class.
966
- var hasDirection = STICKY_DIRECTIONS.some(function (dir) { return !!element.style[dir]; });
967
- if (!hasDirection) {
968
- element.style.position = '';
1195
+ // Short-circuit checking element.style[dir] for stickyDirections as they
1196
+ // were already removed above.
1197
+ var hasDirection = STICKY_DIRECTIONS.some(function (dir) { return stickyDirections.indexOf(dir) === -1 && element.style[dir]; });
1198
+ if (hasDirection) {
1199
+ element.style.zIndex = this._getCalculatedZIndex(element);
1200
+ }
1201
+ else {
1202
+ // When not hasDirection, _getCalculatedZIndex will always return ''.
1203
+ element.style.zIndex = '';
1204
+ if (this._needsPositionStickyOnElement) {
1205
+ element.style.position = '';
1206
+ }
969
1207
  element.classList.remove(this._stickCellCss);
970
1208
  }
971
1209
  };
@@ -977,8 +1215,10 @@
977
1215
  StickyStyler.prototype._addStickyStyle = function (element, dir, dirValue) {
978
1216
  element.classList.add(this._stickCellCss);
979
1217
  element.style[dir] = dirValue + "px";
980
- element.style.cssText += 'position: -webkit-sticky; position: sticky; ';
981
1218
  element.style.zIndex = this._getCalculatedZIndex(element);
1219
+ if (this._needsPositionStickyOnElement) {
1220
+ element.style.cssText += 'position: -webkit-sticky; position: sticky; ';
1221
+ }
982
1222
  };
983
1223
  /**
984
1224
  * Calculate what the z-index should be for the element, depending on what directions (top,
@@ -992,7 +1232,7 @@
992
1232
  * elements.
993
1233
  */
994
1234
  StickyStyler.prototype._getCalculatedZIndex = function (element) {
995
- var e_4, _a;
1235
+ var e_6, _a;
996
1236
  var zIndexIncrements = {
997
1237
  top: 100,
998
1238
  bottom: 10,
@@ -1004,19 +1244,19 @@
1004
1244
  // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,
1005
1245
  // loses the array generic type in the `for of`. But we *also* have to use `Array` because
1006
1246
  // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`
1007
- for (var _b = __values(STICKY_DIRECTIONS), _c = _b.next(); !_c.done; _c = _b.next()) {
1008
- var dir = _c.value;
1247
+ for (var STICKY_DIRECTIONS_1 = __values(STICKY_DIRECTIONS), STICKY_DIRECTIONS_1_1 = STICKY_DIRECTIONS_1.next(); !STICKY_DIRECTIONS_1_1.done; STICKY_DIRECTIONS_1_1 = STICKY_DIRECTIONS_1.next()) {
1248
+ var dir = STICKY_DIRECTIONS_1_1.value;
1009
1249
  if (element.style[dir]) {
1010
1250
  zIndex += zIndexIncrements[dir];
1011
1251
  }
1012
1252
  }
1013
1253
  }
1014
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
1254
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
1015
1255
  finally {
1016
1256
  try {
1017
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1257
+ if (STICKY_DIRECTIONS_1_1 && !STICKY_DIRECTIONS_1_1.done && (_a = STICKY_DIRECTIONS_1.return)) _a.call(STICKY_DIRECTIONS_1);
1018
1258
  }
1019
- finally { if (e_4) throw e_4.error; }
1259
+ finally { if (e_6) throw e_6.error; }
1020
1260
  }
1021
1261
  return zIndex ? "" + zIndex : '';
1022
1262
  };
@@ -1132,13 +1372,6 @@
1132
1372
  return Error("Table text column must have a name.");
1133
1373
  }
1134
1374
 
1135
- /**
1136
- * @license
1137
- * Copyright Google LLC All Rights Reserved.
1138
- *
1139
- * Use of this source code is governed by an MIT-style license that can be
1140
- * found in the LICENSE file at https://angular.io/license
1141
- */
1142
1375
  /**
1143
1376
  * Provides a handle for the table to grab the view container's ng-container to insert data rows.
1144
1377
  * @docs-private
@@ -1148,15 +1381,15 @@
1148
1381
  this.viewContainer = viewContainer;
1149
1382
  this.elementRef = elementRef;
1150
1383
  }
1151
- DataRowOutlet.decorators = [
1152
- { type: core.Directive, args: [{ selector: '[rowOutlet]' },] }
1153
- ];
1154
- DataRowOutlet.ctorParameters = function () { return [
1155
- { type: core.ViewContainerRef },
1156
- { type: core.ElementRef }
1157
- ]; };
1158
1384
  return DataRowOutlet;
1159
1385
  }());
1386
+ DataRowOutlet.decorators = [
1387
+ { type: core.Directive, args: [{ selector: '[rowOutlet]' },] }
1388
+ ];
1389
+ DataRowOutlet.ctorParameters = function () { return [
1390
+ { type: core.ViewContainerRef },
1391
+ { type: core.ElementRef }
1392
+ ]; };
1160
1393
  /**
1161
1394
  * Provides a handle for the table to grab the view container's ng-container to insert the header.
1162
1395
  * @docs-private
@@ -1166,15 +1399,15 @@
1166
1399
  this.viewContainer = viewContainer;
1167
1400
  this.elementRef = elementRef;
1168
1401
  }
1169
- HeaderRowOutlet.decorators = [
1170
- { type: core.Directive, args: [{ selector: '[headerRowOutlet]' },] }
1171
- ];
1172
- HeaderRowOutlet.ctorParameters = function () { return [
1173
- { type: core.ViewContainerRef },
1174
- { type: core.ElementRef }
1175
- ]; };
1176
1402
  return HeaderRowOutlet;
1177
1403
  }());
1404
+ HeaderRowOutlet.decorators = [
1405
+ { type: core.Directive, args: [{ selector: '[headerRowOutlet]' },] }
1406
+ ];
1407
+ HeaderRowOutlet.ctorParameters = function () { return [
1408
+ { type: core.ViewContainerRef },
1409
+ { type: core.ElementRef }
1410
+ ]; };
1178
1411
  /**
1179
1412
  * Provides a handle for the table to grab the view container's ng-container to insert the footer.
1180
1413
  * @docs-private
@@ -1184,15 +1417,15 @@
1184
1417
  this.viewContainer = viewContainer;
1185
1418
  this.elementRef = elementRef;
1186
1419
  }
1187
- FooterRowOutlet.decorators = [
1188
- { type: core.Directive, args: [{ selector: '[footerRowOutlet]' },] }
1189
- ];
1190
- FooterRowOutlet.ctorParameters = function () { return [
1191
- { type: core.ViewContainerRef },
1192
- { type: core.ElementRef }
1193
- ]; };
1194
1420
  return FooterRowOutlet;
1195
1421
  }());
1422
+ FooterRowOutlet.decorators = [
1423
+ { type: core.Directive, args: [{ selector: '[footerRowOutlet]' },] }
1424
+ ];
1425
+ FooterRowOutlet.ctorParameters = function () { return [
1426
+ { type: core.ViewContainerRef },
1427
+ { type: core.ElementRef }
1428
+ ]; };
1196
1429
  /**
1197
1430
  * Provides a handle for the table to grab the view
1198
1431
  * container's ng-container to insert the no data row.
@@ -1203,15 +1436,15 @@
1203
1436
  this.viewContainer = viewContainer;
1204
1437
  this.elementRef = elementRef;
1205
1438
  }
1206
- NoDataRowOutlet.decorators = [
1207
- { type: core.Directive, args: [{ selector: '[noDataRowOutlet]' },] }
1208
- ];
1209
- NoDataRowOutlet.ctorParameters = function () { return [
1210
- { type: core.ViewContainerRef },
1211
- { type: core.ElementRef }
1212
- ]; };
1213
1439
  return NoDataRowOutlet;
1214
1440
  }());
1441
+ NoDataRowOutlet.decorators = [
1442
+ { type: core.Directive, args: [{ selector: '[noDataRowOutlet]' },] }
1443
+ ];
1444
+ NoDataRowOutlet.ctorParameters = function () { return [
1445
+ { type: core.ViewContainerRef },
1446
+ { type: core.ElementRef }
1447
+ ]; };
1215
1448
  /**
1216
1449
  * The table template that can be used by the mat-table. Should not be used outside of the
1217
1450
  * material library.
@@ -1239,9 +1472,10 @@
1239
1472
  * connect function that will return an Observable stream that emits the data array to render.
1240
1473
  */
1241
1474
  var CdkTable = /** @class */ (function () {
1242
- function CdkTable(_differs, _changeDetectorRef, _elementRef, role, _dir, _document, _platform) {
1475
+ function CdkTable(_differs, _changeDetectorRef, _coalescedStyleScheduler, _elementRef, role, _dir, _document, _platform) {
1243
1476
  this._differs = _differs;
1244
1477
  this._changeDetectorRef = _changeDetectorRef;
1478
+ this._coalescedStyleScheduler = _coalescedStyleScheduler;
1245
1479
  this._elementRef = _elementRef;
1246
1480
  this._dir = _dir;
1247
1481
  this._platform = _platform;
@@ -1306,6 +1540,12 @@
1306
1540
  * table subclasses.
1307
1541
  */
1308
1542
  this.stickyCssClass = 'cdk-table-sticky';
1543
+ /**
1544
+ * Whether to manually add positon: sticky to all sticky cell elements. Not needed if
1545
+ * the position is set in a selector associated with the value of stickyCssClass. May be
1546
+ * overridden by table subclasses
1547
+ */
1548
+ this.needsPositionStickyOnElement = true;
1309
1549
  /** Whether the no data row is currently showing anything. */
1310
1550
  this._isShowingNoDataRow = false;
1311
1551
  this._multiTemplateDataRows = false;
@@ -1392,6 +1632,7 @@
1392
1632
  // this setter will be invoked before the row outlet has been defined hence the null check.
1393
1633
  if (this._rowOutlet && this._rowOutlet.viewContainer.length) {
1394
1634
  this._forceRenderDataRows();
1635
+ this.updateStickyColumnStyles();
1395
1636
  }
1396
1637
  },
1397
1638
  enumerable: false,
@@ -1419,7 +1660,8 @@
1419
1660
  throw getTableMissingRowDefsError();
1420
1661
  }
1421
1662
  // Render updates if the list of columns have been changed for the header, row, or footer defs.
1422
- this._renderUpdatedColumns();
1663
+ var columnsChanged = this._renderUpdatedColumns();
1664
+ var stickyColumnStyleUpdateNeeded = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;
1423
1665
  // If the header row definition has been changed, trigger a render to the header row.
1424
1666
  if (this._headerRowDefChanged) {
1425
1667
  this._forceRenderHeaderRows();
@@ -1435,6 +1677,11 @@
1435
1677
  if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {
1436
1678
  this._observeRenderChanges();
1437
1679
  }
1680
+ else if (stickyColumnStyleUpdateNeeded) {
1681
+ // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being
1682
+ // called when it row data arrives. Otherwise, we need to call it proactively.
1683
+ this.updateStickyColumnStyles();
1684
+ }
1438
1685
  this._checkStickyStates();
1439
1686
  };
1440
1687
  CdkTable.prototype.ngOnDestroy = function () {
@@ -1464,6 +1711,7 @@
1464
1711
  this._renderRows = this._getAllRenderRows();
1465
1712
  var changes = this._dataDiffer.diff(this._renderRows);
1466
1713
  if (!changes) {
1714
+ this._updateNoDataRow();
1467
1715
  return;
1468
1716
  }
1469
1717
  var viewContainer = this._rowOutlet.viewContainer;
@@ -1694,16 +1942,20 @@
1694
1942
  CdkTable.prototype._renderUpdatedColumns = function () {
1695
1943
  var columnsDiffReducer = function (acc, def) { return acc || !!def.getColumnsDiff(); };
1696
1944
  // Force re-render data rows if the list of column definitions have changed.
1697
- if (this._rowDefs.reduce(columnsDiffReducer, false)) {
1945
+ var dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);
1946
+ if (dataColumnsChanged) {
1698
1947
  this._forceRenderDataRows();
1699
1948
  }
1700
- // Force re-render header/footer rows if the list of column definitions have changed..
1701
- if (this._headerRowDefs.reduce(columnsDiffReducer, false)) {
1949
+ // Force re-render header/footer rows if the list of column definitions have changed.
1950
+ var headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);
1951
+ if (headerColumnsChanged) {
1702
1952
  this._forceRenderHeaderRows();
1703
1953
  }
1704
- if (this._footerRowDefs.reduce(columnsDiffReducer, false)) {
1954
+ var footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);
1955
+ if (footerColumnsChanged) {
1705
1956
  this._forceRenderFooterRows();
1706
1957
  }
1958
+ return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;
1707
1959
  };
1708
1960
  /**
1709
1961
  * Switch to the provided data source by resetting the data and unsubscribing from the current
@@ -1765,7 +2017,6 @@
1765
2017
  }
1766
2018
  this._headerRowDefs.forEach(function (def, i) { return _this._renderRow(_this._headerRowOutlet, def, i); });
1767
2019
  this.updateStickyHeaderRowStyles();
1768
- this.updateStickyColumnStyles();
1769
2020
  };
1770
2021
  /**
1771
2022
  * Clears any existing content in the footer row outlet and creates a new embedded view
@@ -1779,7 +2030,6 @@
1779
2030
  }
1780
2031
  this._footerRowDefs.forEach(function (def, i) { return _this._renderRow(_this._footerRowOutlet, def, i); });
1781
2032
  this.updateStickyFooterRowStyles();
1782
- this.updateStickyColumnStyles();
1783
2033
  };
1784
2034
  /** Adds the sticky column styles for the rows according to the columns' stick states. */
1785
2035
  CdkTable.prototype._addStickyColumnStyles = function (rows, rowDef) {
@@ -1951,7 +2201,6 @@
1951
2201
  this._dataDiffer.diff([]);
1952
2202
  this._rowOutlet.viewContainer.clear();
1953
2203
  this.renderRows();
1954
- this.updateStickyColumnStyles();
1955
2204
  };
1956
2205
  /**
1957
2206
  * Checks if there has been a change in sticky states since last check and applies the correct
@@ -1983,7 +2232,7 @@
1983
2232
  CdkTable.prototype._setupStickyStyler = function () {
1984
2233
  var _this = this;
1985
2234
  var direction = this._dir ? this._dir.value : 'ltr';
1986
- this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._platform.isBrowser);
2235
+ this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement);
1987
2236
  (this._dir ? this._dir.change : rxjs.of())
1988
2237
  .pipe(operators.takeUntil(this._onDestroy))
1989
2238
  .subscribe(function (value) {
@@ -2007,52 +2256,56 @@
2007
2256
  }
2008
2257
  }
2009
2258
  };
2010
- CdkTable.decorators = [
2011
- { type: core.Component, args: [{
2012
- selector: 'cdk-table, table[cdk-table]',
2013
- exportAs: 'cdkTable',
2014
- template: CDK_TABLE_TEMPLATE,
2015
- host: {
2016
- 'class': 'cdk-table',
2017
- },
2018
- encapsulation: core.ViewEncapsulation.None,
2019
- // The "OnPush" status for the `MatTable` component is effectively a noop, so we are removing it.
2020
- // The view for `MatTable` consists entirely of templates declared in other views. As they are
2021
- // declared elsewhere, they are checked when their declaration points are checked.
2022
- // tslint:disable-next-line:validate-decorators
2023
- changeDetection: core.ChangeDetectionStrategy.Default,
2024
- providers: [{ provide: CDK_TABLE, useExisting: CdkTable }]
2025
- },] }
2026
- ];
2027
- CdkTable.ctorParameters = function () { return [
2028
- { type: core.IterableDiffers },
2029
- { type: core.ChangeDetectorRef },
2030
- { type: core.ElementRef },
2031
- { type: String, decorators: [{ type: core.Attribute, args: ['role',] }] },
2032
- { type: bidi.Directionality, decorators: [{ type: core.Optional }] },
2033
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
2034
- { type: platform.Platform }
2035
- ]; };
2036
- CdkTable.propDecorators = {
2037
- trackBy: [{ type: core.Input }],
2038
- dataSource: [{ type: core.Input }],
2039
- multiTemplateDataRows: [{ type: core.Input }],
2040
- _rowOutlet: [{ type: core.ViewChild, args: [DataRowOutlet, { static: true },] }],
2041
- _headerRowOutlet: [{ type: core.ViewChild, args: [HeaderRowOutlet, { static: true },] }],
2042
- _footerRowOutlet: [{ type: core.ViewChild, args: [FooterRowOutlet, { static: true },] }],
2043
- _noDataRowOutlet: [{ type: core.ViewChild, args: [NoDataRowOutlet, { static: true },] }],
2044
- _contentColumnDefs: [{ type: core.ContentChildren, args: [CdkColumnDef, { descendants: true },] }],
2045
- _contentRowDefs: [{ type: core.ContentChildren, args: [CdkRowDef, { descendants: true },] }],
2046
- _contentHeaderRowDefs: [{ type: core.ContentChildren, args: [CdkHeaderRowDef, {
2047
- descendants: true
2048
- },] }],
2049
- _contentFooterRowDefs: [{ type: core.ContentChildren, args: [CdkFooterRowDef, {
2050
- descendants: true
2051
- },] }],
2052
- _noDataRow: [{ type: core.ContentChild, args: [CdkNoDataRow,] }]
2053
- };
2054
2259
  return CdkTable;
2055
2260
  }());
2261
+ CdkTable.decorators = [
2262
+ { type: core.Component, args: [{
2263
+ selector: 'cdk-table, table[cdk-table]',
2264
+ exportAs: 'cdkTable',
2265
+ template: CDK_TABLE_TEMPLATE,
2266
+ host: {
2267
+ 'class': 'cdk-table',
2268
+ },
2269
+ encapsulation: core.ViewEncapsulation.None,
2270
+ // The "OnPush" status for the `MatTable` component is effectively a noop, so we are removing it.
2271
+ // The view for `MatTable` consists entirely of templates declared in other views. As they are
2272
+ // declared elsewhere, they are checked when their declaration points are checked.
2273
+ // tslint:disable-next-line:validate-decorators
2274
+ changeDetection: core.ChangeDetectionStrategy.Default,
2275
+ providers: [
2276
+ { provide: CDK_TABLE, useExisting: CdkTable },
2277
+ _CoalescedStyleScheduler,
2278
+ ]
2279
+ },] }
2280
+ ];
2281
+ CdkTable.ctorParameters = function () { return [
2282
+ { type: core.IterableDiffers },
2283
+ { type: core.ChangeDetectorRef },
2284
+ { type: _CoalescedStyleScheduler },
2285
+ { type: core.ElementRef },
2286
+ { type: String, decorators: [{ type: core.Attribute, args: ['role',] }] },
2287
+ { type: bidi.Directionality, decorators: [{ type: core.Optional }] },
2288
+ { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
2289
+ { type: platform.Platform }
2290
+ ]; };
2291
+ CdkTable.propDecorators = {
2292
+ trackBy: [{ type: core.Input }],
2293
+ dataSource: [{ type: core.Input }],
2294
+ multiTemplateDataRows: [{ type: core.Input }],
2295
+ _rowOutlet: [{ type: core.ViewChild, args: [DataRowOutlet, { static: true },] }],
2296
+ _headerRowOutlet: [{ type: core.ViewChild, args: [HeaderRowOutlet, { static: true },] }],
2297
+ _footerRowOutlet: [{ type: core.ViewChild, args: [FooterRowOutlet, { static: true },] }],
2298
+ _noDataRowOutlet: [{ type: core.ViewChild, args: [NoDataRowOutlet, { static: true },] }],
2299
+ _contentColumnDefs: [{ type: core.ContentChildren, args: [CdkColumnDef, { descendants: true },] }],
2300
+ _contentRowDefs: [{ type: core.ContentChildren, args: [CdkRowDef, { descendants: true },] }],
2301
+ _contentHeaderRowDefs: [{ type: core.ContentChildren, args: [CdkHeaderRowDef, {
2302
+ descendants: true
2303
+ },] }],
2304
+ _contentFooterRowDefs: [{ type: core.ContentChildren, args: [CdkFooterRowDef, {
2305
+ descendants: true
2306
+ },] }],
2307
+ _noDataRow: [{ type: core.ContentChild, args: [CdkNoDataRow,] }]
2308
+ };
2056
2309
  /** Utility function that gets a merged list of the entries in an array and values of a Set. */
2057
2310
  function mergeArrayAndSet(array, set) {
2058
2311
  return array.concat(Array.from(set));
@@ -2142,35 +2395,35 @@
2142
2395
  this.columnDef.name = this.name;
2143
2396
  }
2144
2397
  };
2145
- CdkTextColumn.decorators = [
2146
- { type: core.Component, args: [{
2147
- selector: 'cdk-text-column',
2148
- template: "\n <ng-container cdkColumnDef>\n <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n {{headerText}}\n </th>\n <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n ",
2149
- encapsulation: core.ViewEncapsulation.None,
2150
- // Change detection is intentionally not set to OnPush. This component's template will be provided
2151
- // to the table to be inserted into its view. This is problematic when change detection runs since
2152
- // the bindings in this template will be evaluated _after_ the table's view is evaluated, which
2153
- // mean's the template in the table's view will not have the updated value (and in fact will cause
2154
- // an ExpressionChangedAfterItHasBeenCheckedError).
2155
- // tslint:disable-next-line:validate-decorators
2156
- changeDetection: core.ChangeDetectionStrategy.Default
2157
- },] }
2158
- ];
2159
- CdkTextColumn.ctorParameters = function () { return [
2160
- { type: CdkTable, decorators: [{ type: core.Optional }] },
2161
- { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [TEXT_COLUMN_OPTIONS,] }] }
2162
- ]; };
2163
- CdkTextColumn.propDecorators = {
2164
- name: [{ type: core.Input }],
2165
- headerText: [{ type: core.Input }],
2166
- dataAccessor: [{ type: core.Input }],
2167
- justify: [{ type: core.Input }],
2168
- columnDef: [{ type: core.ViewChild, args: [CdkColumnDef, { static: true },] }],
2169
- cell: [{ type: core.ViewChild, args: [CdkCellDef, { static: true },] }],
2170
- headerCell: [{ type: core.ViewChild, args: [CdkHeaderCellDef, { static: true },] }]
2171
- };
2172
2398
  return CdkTextColumn;
2173
2399
  }());
2400
+ CdkTextColumn.decorators = [
2401
+ { type: core.Component, args: [{
2402
+ selector: 'cdk-text-column',
2403
+ template: "\n <ng-container cdkColumnDef>\n <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n {{headerText}}\n </th>\n <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n ",
2404
+ encapsulation: core.ViewEncapsulation.None,
2405
+ // Change detection is intentionally not set to OnPush. This component's template will be provided
2406
+ // to the table to be inserted into its view. This is problematic when change detection runs since
2407
+ // the bindings in this template will be evaluated _after_ the table's view is evaluated, which
2408
+ // mean's the template in the table's view will not have the updated value (and in fact will cause
2409
+ // an ExpressionChangedAfterItHasBeenCheckedError).
2410
+ // tslint:disable-next-line:validate-decorators
2411
+ changeDetection: core.ChangeDetectionStrategy.Default
2412
+ },] }
2413
+ ];
2414
+ CdkTextColumn.ctorParameters = function () { return [
2415
+ { type: CdkTable, decorators: [{ type: core.Optional }] },
2416
+ { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [TEXT_COLUMN_OPTIONS,] }] }
2417
+ ]; };
2418
+ CdkTextColumn.propDecorators = {
2419
+ name: [{ type: core.Input }],
2420
+ headerText: [{ type: core.Input }],
2421
+ dataAccessor: [{ type: core.Input }],
2422
+ justify: [{ type: core.Input }],
2423
+ columnDef: [{ type: core.ViewChild, args: [CdkColumnDef, { static: true },] }],
2424
+ cell: [{ type: core.ViewChild, args: [CdkCellDef, { static: true },] }],
2425
+ headerCell: [{ type: core.ViewChild, args: [CdkHeaderCellDef, { static: true },] }]
2426
+ };
2174
2427
 
2175
2428
  /**
2176
2429
  * @license
@@ -2205,14 +2458,14 @@
2205
2458
  var CdkTableModule = /** @class */ (function () {
2206
2459
  function CdkTableModule() {
2207
2460
  }
2208
- CdkTableModule.decorators = [
2209
- { type: core.NgModule, args: [{
2210
- exports: EXPORTED_DECLARATIONS,
2211
- declarations: EXPORTED_DECLARATIONS
2212
- },] }
2213
- ];
2214
2461
  return CdkTableModule;
2215
2462
  }());
2463
+ CdkTableModule.decorators = [
2464
+ { type: core.NgModule, args: [{
2465
+ exports: EXPORTED_DECLARATIONS,
2466
+ declarations: EXPORTED_DECLARATIONS
2467
+ },] }
2468
+ ];
2216
2469
 
2217
2470
  /**
2218
2471
  * @license
@@ -2262,6 +2515,8 @@
2262
2515
  exports.STICKY_DIRECTIONS = STICKY_DIRECTIONS;
2263
2516
  exports.StickyStyler = StickyStyler;
2264
2517
  exports.TEXT_COLUMN_OPTIONS = TEXT_COLUMN_OPTIONS;
2518
+ exports._CoalescedStyleScheduler = _CoalescedStyleScheduler;
2519
+ exports._Schedule = _Schedule;
2265
2520
  exports.mixinHasStickyInput = mixinHasStickyInput;
2266
2521
 
2267
2522
  Object.defineProperty(exports, '__esModule', { value: true });