@angular/cdk 11.0.4 → 11.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/aria-describer/aria-describer.d.ts +9 -14
- package/a11y/index.metadata.json +1 -1
- package/bundles/cdk-a11y.umd.js +62 -57
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +13 -14
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-bidi.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +9 -1
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +11 -6
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +61 -16
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +8 -8
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +34 -4
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +11 -11
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +9 -1
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js +2 -2
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +16 -8
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +3 -3
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +99 -30
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +7 -7
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.js +59 -13
- package/bundles/cdk-testing-protractor.umd.js.map +1 -1
- package/bundles/cdk-testing-protractor.umd.min.js +2 -2
- package/bundles/cdk-testing-protractor.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +40 -15
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +7 -7
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk-testing.umd.js +11 -10
- package/bundles/cdk-testing.umd.js.map +1 -1
- package/bundles/cdk-testing.umd.min.js +2 -2
- package/bundles/cdk-testing.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +9 -1
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +5 -5
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/collections/index.metadata.json +1 -1
- package/collections/recycle-view-repeater-strategy.d.ts +0 -2
- package/drag-drop/directives/drag.d.ts +3 -1
- package/drag-drop/directives/drop-list.d.ts +4 -1
- package/drag-drop/drag-ref.d.ts +4 -0
- package/drag-drop/drop-list-ref.d.ts +2 -0
- package/drag-drop/index.metadata.json +1 -1
- package/esm2015/a11y/aria-describer/aria-describer.js +50 -55
- package/esm2015/collections/recycle-view-repeater-strategy.js +4 -7
- package/esm2015/drag-drop/directives/drag.js +36 -4
- package/esm2015/drag-drop/directives/drop-list.js +4 -2
- package/esm2015/drag-drop/drag-ref.js +9 -4
- package/esm2015/drag-drop/drop-list-ref.js +8 -10
- package/esm2015/overlay/overlay-ref.js +2 -2
- package/esm2015/overlay/position/flexible-connected-position-strategy.js +25 -3
- package/esm2015/scrolling/scroll-dispatcher.js +9 -8
- package/esm2015/scrolling/virtual-for-of.js +1 -1
- package/esm2015/scrolling/virtual-scroll-viewport.js +1 -1
- package/esm2015/table/public-api.js +2 -1
- package/esm2015/table/sticky-position-listener.js +11 -0
- package/esm2015/table/sticky-styler.js +60 -14
- package/esm2015/table/table.js +9 -4
- package/esm2015/testing/change-detection.js +1 -8
- package/esm2015/testing/harness-environment.js +3 -3
- package/esm2015/testing/protractor/protractor-element.js +29 -13
- package/esm2015/testing/test-element.js +1 -1
- package/esm2015/testing/testbed/fake-events/dispatch-events.js +3 -3
- package/esm2015/testing/testbed/fake-events/event-objects.js +6 -6
- package/esm2015/testing/testbed/unit-test-element.js +21 -9
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +50 -53
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/accordion.js.map +1 -1
- package/fesm2015/bidi.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/collections.js +3 -6
- package/fesm2015/collections.js.map +1 -1
- package/fesm2015/drag-drop.js +52 -15
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +25 -3
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/scrolling.js +8 -8
- package/fesm2015/scrolling.js.map +1 -1
- package/fesm2015/table.js +77 -17
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/testing/protractor.js +27 -11
- package/fesm2015/testing/protractor.js.map +1 -1
- package/fesm2015/testing/testbed.js +25 -13
- package/fesm2015/testing/testbed.js.map +1 -1
- package/fesm2015/testing.js +2 -9
- package/fesm2015/testing.js.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/scrolling/index.metadata.json +1 -1
- package/scrolling/scroll-dispatcher.d.ts +3 -3
- package/table/index.metadata.json +1 -1
- package/table/public-api.d.ts +1 -0
- package/table/sticky-position-listener.d.ts +29 -0
- package/table/sticky-styler.d.ts +7 -2
- package/table/table.d.ts +4 -2
- package/testing/change-detection.d.ts +44 -1
- package/testing/protractor/protractor-element.d.ts +12 -4
- package/testing/test-element.d.ts +11 -5
- package/testing/testbed/fake-events/dispatch-events.d.ts +1 -1
- package/testing/testbed/fake-events/event-objects.d.ts +1 -1
- package/testing/testbed/unit-test-element.d.ts +12 -4
package/bundles/cdk-table.umd.js
CHANGED
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
return extendStatics(d, b);
|
|
29
29
|
};
|
|
30
30
|
function __extends(d, b) {
|
|
31
|
+
if (typeof b !== "function" && b !== null)
|
|
32
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
31
33
|
extendStatics(d, b);
|
|
32
34
|
function __() { this.constructor = d; }
|
|
33
35
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -213,11 +215,13 @@
|
|
|
213
215
|
}
|
|
214
216
|
return ar;
|
|
215
217
|
}
|
|
218
|
+
/** @deprecated */
|
|
216
219
|
function __spread() {
|
|
217
220
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
218
221
|
ar = ar.concat(__read(arguments[i]));
|
|
219
222
|
return ar;
|
|
220
223
|
}
|
|
224
|
+
/** @deprecated */
|
|
221
225
|
function __spreadArrays() {
|
|
222
226
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
223
227
|
s += arguments[i].length;
|
|
@@ -226,7 +230,11 @@
|
|
|
226
230
|
r[k] = a[j];
|
|
227
231
|
return r;
|
|
228
232
|
}
|
|
229
|
-
|
|
233
|
+
function __spreadArray(to, from) {
|
|
234
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
235
|
+
to[j] = from[i];
|
|
236
|
+
return to;
|
|
237
|
+
}
|
|
230
238
|
function __await(v) {
|
|
231
239
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
232
240
|
}
|
|
@@ -984,13 +992,15 @@
|
|
|
984
992
|
* @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells
|
|
985
993
|
* using inline styles. If false, it is assumed that position: sticky is included in
|
|
986
994
|
* the component stylesheet for _stickCellCss.
|
|
995
|
+
* @param _positionListener A listener that is notified of changes to sticky rows/columns
|
|
996
|
+
* and their dimensions.
|
|
987
997
|
*/
|
|
988
998
|
function StickyStyler(_isNativeHtmlTable, _stickCellCss, direction,
|
|
989
999
|
/**
|
|
990
1000
|
* @deprecated `_coalescedStyleScheduler` parameter to become required.
|
|
991
1001
|
* @breaking-change 11.0.0
|
|
992
1002
|
*/
|
|
993
|
-
_coalescedStyleScheduler, _isBrowser, _needsPositionStickyOnElement) {
|
|
1003
|
+
_coalescedStyleScheduler, _isBrowser, _needsPositionStickyOnElement, _positionListener) {
|
|
994
1004
|
if (_isBrowser === void 0) { _isBrowser = true; }
|
|
995
1005
|
if (_needsPositionStickyOnElement === void 0) { _needsPositionStickyOnElement = true; }
|
|
996
1006
|
this._isNativeHtmlTable = _isNativeHtmlTable;
|
|
@@ -999,7 +1009,14 @@
|
|
|
999
1009
|
this._coalescedStyleScheduler = _coalescedStyleScheduler;
|
|
1000
1010
|
this._isBrowser = _isBrowser;
|
|
1001
1011
|
this._needsPositionStickyOnElement = _needsPositionStickyOnElement;
|
|
1012
|
+
this._positionListener = _positionListener;
|
|
1002
1013
|
this._cachedCellWidths = [];
|
|
1014
|
+
this._borderCellCss = {
|
|
1015
|
+
'top': _stickCellCss + "-border-elem-top",
|
|
1016
|
+
'bottom': _stickCellCss + "-border-elem-bottom",
|
|
1017
|
+
'left': _stickCellCss + "-border-elem-left",
|
|
1018
|
+
'right': _stickCellCss + "-border-elem-right",
|
|
1019
|
+
};
|
|
1003
1020
|
}
|
|
1004
1021
|
/**
|
|
1005
1022
|
* Clears the sticky positioning styles from the row and its cells by resetting the `position`
|
|
@@ -1008,7 +1025,7 @@
|
|
|
1008
1025
|
* @param stickyDirections The directions that should no longer be set as sticky on the rows.
|
|
1009
1026
|
*/
|
|
1010
1027
|
StickyStyler.prototype.clearStickyPositioning = function (rows, stickyDirections) {
|
|
1011
|
-
var e_1,
|
|
1028
|
+
var e_1, _c;
|
|
1012
1029
|
var _this = this;
|
|
1013
1030
|
var elementsToClear = [];
|
|
1014
1031
|
try {
|
|
@@ -1028,13 +1045,13 @@
|
|
|
1028
1045
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1029
1046
|
finally {
|
|
1030
1047
|
try {
|
|
1031
|
-
if (rows_1_1 && !rows_1_1.done && (
|
|
1048
|
+
if (rows_1_1 && !rows_1_1.done && (_c = rows_1.return)) _c.call(rows_1);
|
|
1032
1049
|
}
|
|
1033
1050
|
finally { if (e_1) throw e_1.error; }
|
|
1034
1051
|
}
|
|
1035
1052
|
// Coalesce with sticky row/column updates (and potentially other changes like column resize).
|
|
1036
1053
|
this._scheduleStyleChanges(function () {
|
|
1037
|
-
var e_2,
|
|
1054
|
+
var e_2, _c;
|
|
1038
1055
|
try {
|
|
1039
1056
|
for (var elementsToClear_1 = __values(elementsToClear), elementsToClear_1_1 = elementsToClear_1.next(); !elementsToClear_1_1.done; elementsToClear_1_1 = elementsToClear_1.next()) {
|
|
1040
1057
|
var element = elementsToClear_1_1.value;
|
|
@@ -1044,7 +1061,7 @@
|
|
|
1044
1061
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1045
1062
|
finally {
|
|
1046
1063
|
try {
|
|
1047
|
-
if (elementsToClear_1_1 && !elementsToClear_1_1.done && (
|
|
1064
|
+
if (elementsToClear_1_1 && !elementsToClear_1_1.done && (_c = elementsToClear_1.return)) _c.call(elementsToClear_1);
|
|
1048
1065
|
}
|
|
1049
1066
|
finally { if (e_2) throw e_2.error; }
|
|
1050
1067
|
}
|
|
@@ -1066,6 +1083,10 @@
|
|
|
1066
1083
|
if (recalculateCellWidths === void 0) { recalculateCellWidths = true; }
|
|
1067
1084
|
if (!rows.length || !this._isBrowser || !(stickyStartStates.some(function (state) { return state; }) ||
|
|
1068
1085
|
stickyEndStates.some(function (state) { return state; }))) {
|
|
1086
|
+
if (this._positionListener) {
|
|
1087
|
+
this._positionListener.stickyColumnsUpdated({ sizes: [] });
|
|
1088
|
+
this._positionListener.stickyEndColumnsUpdated({ sizes: [] });
|
|
1089
|
+
}
|
|
1069
1090
|
return;
|
|
1070
1091
|
}
|
|
1071
1092
|
var firstRow = rows[0];
|
|
@@ -1073,9 +1094,11 @@
|
|
|
1073
1094
|
var cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);
|
|
1074
1095
|
var startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);
|
|
1075
1096
|
var endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);
|
|
1097
|
+
var lastStickyStart = stickyStartStates.lastIndexOf(true);
|
|
1098
|
+
var firstStickyEnd = stickyEndStates.indexOf(true);
|
|
1076
1099
|
// Coalesce with sticky row updates (and potentially other changes like column resize).
|
|
1077
1100
|
this._scheduleStyleChanges(function () {
|
|
1078
|
-
var e_3,
|
|
1101
|
+
var e_3, _c;
|
|
1079
1102
|
var isRtl = _this.direction === 'rtl';
|
|
1080
1103
|
var start = isRtl ? 'right' : 'left';
|
|
1081
1104
|
var end = isRtl ? 'left' : 'right';
|
|
@@ -1085,10 +1108,10 @@
|
|
|
1085
1108
|
for (var i = 0; i < numCells; i++) {
|
|
1086
1109
|
var cell = row.children[i];
|
|
1087
1110
|
if (stickyStartStates[i]) {
|
|
1088
|
-
_this._addStickyStyle(cell, start, startPositions[i]);
|
|
1111
|
+
_this._addStickyStyle(cell, start, startPositions[i], i === lastStickyStart);
|
|
1089
1112
|
}
|
|
1090
1113
|
if (stickyEndStates[i]) {
|
|
1091
|
-
_this._addStickyStyle(cell, end, endPositions[i]);
|
|
1114
|
+
_this._addStickyStyle(cell, end, endPositions[i], i === firstStickyEnd);
|
|
1092
1115
|
}
|
|
1093
1116
|
}
|
|
1094
1117
|
}
|
|
@@ -1096,10 +1119,27 @@
|
|
|
1096
1119
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1097
1120
|
finally {
|
|
1098
1121
|
try {
|
|
1099
|
-
if (rows_2_1 && !rows_2_1.done && (
|
|
1122
|
+
if (rows_2_1 && !rows_2_1.done && (_c = rows_2.return)) _c.call(rows_2);
|
|
1100
1123
|
}
|
|
1101
1124
|
finally { if (e_3) throw e_3.error; }
|
|
1102
1125
|
}
|
|
1126
|
+
if (_this._positionListener) {
|
|
1127
|
+
_this._positionListener.stickyColumnsUpdated({
|
|
1128
|
+
sizes: lastStickyStart === -1 ?
|
|
1129
|
+
[] :
|
|
1130
|
+
cellWidths
|
|
1131
|
+
.slice(0, lastStickyStart + 1)
|
|
1132
|
+
.map(function (width, index) { return stickyStartStates[index] ? width : null; })
|
|
1133
|
+
});
|
|
1134
|
+
_this._positionListener.stickyEndColumnsUpdated({
|
|
1135
|
+
sizes: firstStickyEnd === -1 ?
|
|
1136
|
+
[] :
|
|
1137
|
+
cellWidths
|
|
1138
|
+
.slice(firstStickyEnd)
|
|
1139
|
+
.map(function (width, index) { return stickyEndStates[index + firstStickyEnd] ? width : null; })
|
|
1140
|
+
.reverse()
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1103
1143
|
});
|
|
1104
1144
|
};
|
|
1105
1145
|
/**
|
|
@@ -1125,43 +1165,53 @@
|
|
|
1125
1165
|
var rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;
|
|
1126
1166
|
var states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;
|
|
1127
1167
|
// Measure row heights all at once before adding sticky styles to reduce layout thrashing.
|
|
1128
|
-
var
|
|
1168
|
+
var stickyOffsets = [];
|
|
1169
|
+
var stickyCellHeights = [];
|
|
1129
1170
|
var elementsToStick = [];
|
|
1130
|
-
for (var rowIndex = 0,
|
|
1131
|
-
|
|
1171
|
+
for (var rowIndex = 0, stickyOffset = 0; rowIndex < rows.length; rowIndex++) {
|
|
1172
|
+
stickyOffsets[rowIndex] = stickyOffset;
|
|
1132
1173
|
if (!states[rowIndex]) {
|
|
1133
1174
|
continue;
|
|
1134
1175
|
}
|
|
1135
1176
|
var row = rows[rowIndex];
|
|
1136
1177
|
elementsToStick[rowIndex] = this._isNativeHtmlTable ?
|
|
1137
1178
|
Array.from(row.children) : [row];
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1179
|
+
var height = row.getBoundingClientRect().height;
|
|
1180
|
+
stickyOffset += height;
|
|
1181
|
+
stickyCellHeights[rowIndex] = height;
|
|
1141
1182
|
}
|
|
1183
|
+
var borderedRowIndex = states.lastIndexOf(true);
|
|
1142
1184
|
// Coalesce with other sticky row updates (top/bottom), sticky columns updates
|
|
1143
1185
|
// (and potentially other changes like column resize).
|
|
1144
1186
|
this._scheduleStyleChanges(function () {
|
|
1145
|
-
var e_4,
|
|
1187
|
+
var e_4, _c;
|
|
1188
|
+
var _a, _b;
|
|
1146
1189
|
for (var rowIndex = 0; rowIndex < rows.length; rowIndex++) {
|
|
1147
1190
|
if (!states[rowIndex]) {
|
|
1148
1191
|
continue;
|
|
1149
1192
|
}
|
|
1150
|
-
var
|
|
1193
|
+
var offset = stickyOffsets[rowIndex];
|
|
1194
|
+
var isBorderedRowIndex = rowIndex === borderedRowIndex;
|
|
1151
1195
|
try {
|
|
1152
|
-
for (var
|
|
1153
|
-
var element =
|
|
1154
|
-
_this._addStickyStyle(element, position,
|
|
1196
|
+
for (var _d = (e_4 = void 0, __values(elementsToStick[rowIndex])), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
1197
|
+
var element = _e.value;
|
|
1198
|
+
_this._addStickyStyle(element, position, offset, isBorderedRowIndex);
|
|
1155
1199
|
}
|
|
1156
1200
|
}
|
|
1157
1201
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
1158
1202
|
finally {
|
|
1159
1203
|
try {
|
|
1160
|
-
if (
|
|
1204
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
1161
1205
|
}
|
|
1162
1206
|
finally { if (e_4) throw e_4.error; }
|
|
1163
1207
|
}
|
|
1164
1208
|
}
|
|
1209
|
+
if (position === 'top') {
|
|
1210
|
+
(_a = _this._positionListener) === null || _a === void 0 ? void 0 : _a.stickyHeaderRowsUpdated({ sizes: stickyCellHeights, elements: elementsToStick });
|
|
1211
|
+
}
|
|
1212
|
+
else {
|
|
1213
|
+
(_b = _this._positionListener) === null || _b === void 0 ? void 0 : _b.stickyFooterRowsUpdated({ sizes: stickyCellHeights, elements: elementsToStick });
|
|
1214
|
+
}
|
|
1165
1215
|
});
|
|
1166
1216
|
};
|
|
1167
1217
|
/**
|
|
@@ -1182,7 +1232,7 @@
|
|
|
1182
1232
|
_this._removeStickyStyle(tfoot, ['bottom']);
|
|
1183
1233
|
}
|
|
1184
1234
|
else {
|
|
1185
|
-
_this._addStickyStyle(tfoot, 'bottom', 0);
|
|
1235
|
+
_this._addStickyStyle(tfoot, 'bottom', 0, false);
|
|
1186
1236
|
}
|
|
1187
1237
|
});
|
|
1188
1238
|
};
|
|
@@ -1192,17 +1242,18 @@
|
|
|
1192
1242
|
* sticky position if there are no more directions.
|
|
1193
1243
|
*/
|
|
1194
1244
|
StickyStyler.prototype._removeStickyStyle = function (element, stickyDirections) {
|
|
1195
|
-
var e_5,
|
|
1245
|
+
var e_5, _c;
|
|
1196
1246
|
try {
|
|
1197
1247
|
for (var stickyDirections_1 = __values(stickyDirections), stickyDirections_1_1 = stickyDirections_1.next(); !stickyDirections_1_1.done; stickyDirections_1_1 = stickyDirections_1.next()) {
|
|
1198
1248
|
var dir = stickyDirections_1_1.value;
|
|
1199
1249
|
element.style[dir] = '';
|
|
1250
|
+
element.classList.remove(this._borderCellCss[dir]);
|
|
1200
1251
|
}
|
|
1201
1252
|
}
|
|
1202
1253
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
1203
1254
|
finally {
|
|
1204
1255
|
try {
|
|
1205
|
-
if (stickyDirections_1_1 && !stickyDirections_1_1.done && (
|
|
1256
|
+
if (stickyDirections_1_1 && !stickyDirections_1_1.done && (_c = stickyDirections_1.return)) _c.call(stickyDirections_1);
|
|
1206
1257
|
}
|
|
1207
1258
|
finally { if (e_5) throw e_5.error; }
|
|
1208
1259
|
}
|
|
@@ -1228,8 +1279,11 @@
|
|
|
1228
1279
|
* to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky
|
|
1229
1280
|
* direction and value.
|
|
1230
1281
|
*/
|
|
1231
|
-
StickyStyler.prototype._addStickyStyle = function (element, dir, dirValue) {
|
|
1282
|
+
StickyStyler.prototype._addStickyStyle = function (element, dir, dirValue, isBorderElement) {
|
|
1232
1283
|
element.classList.add(this._stickCellCss);
|
|
1284
|
+
if (isBorderElement) {
|
|
1285
|
+
element.classList.add(this._borderCellCss[dir]);
|
|
1286
|
+
}
|
|
1233
1287
|
element.style[dir] = dirValue + "px";
|
|
1234
1288
|
element.style.zIndex = this._getCalculatedZIndex(element);
|
|
1235
1289
|
if (this._needsPositionStickyOnElement) {
|
|
@@ -1248,7 +1302,7 @@
|
|
|
1248
1302
|
* elements.
|
|
1249
1303
|
*/
|
|
1250
1304
|
StickyStyler.prototype._getCalculatedZIndex = function (element) {
|
|
1251
|
-
var e_6,
|
|
1305
|
+
var e_6, _c;
|
|
1252
1306
|
var zIndexIncrements = {
|
|
1253
1307
|
top: 100,
|
|
1254
1308
|
bottom: 10,
|
|
@@ -1270,7 +1324,7 @@
|
|
|
1270
1324
|
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
1271
1325
|
finally {
|
|
1272
1326
|
try {
|
|
1273
|
-
if (STICKY_DIRECTIONS_1_1 && !STICKY_DIRECTIONS_1_1.done && (
|
|
1327
|
+
if (STICKY_DIRECTIONS_1_1 && !STICKY_DIRECTIONS_1_1.done && (_c = STICKY_DIRECTIONS_1.return)) _c.call(STICKY_DIRECTIONS_1);
|
|
1274
1328
|
}
|
|
1275
1329
|
finally { if (e_6) throw e_6.error; }
|
|
1276
1330
|
}
|
|
@@ -1406,6 +1460,16 @@
|
|
|
1406
1460
|
return Error("Table text column must have a name.");
|
|
1407
1461
|
}
|
|
1408
1462
|
|
|
1463
|
+
/**
|
|
1464
|
+
* @license
|
|
1465
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1466
|
+
*
|
|
1467
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1468
|
+
* found in the LICENSE file at https://angular.io/license
|
|
1469
|
+
*/
|
|
1470
|
+
/** The injection token used to specify the StickyPositioningListener. */
|
|
1471
|
+
var STICKY_POSITIONING_LISTENER = new core.InjectionToken('CDK_SPL');
|
|
1472
|
+
|
|
1409
1473
|
/**
|
|
1410
1474
|
* Provides a handle for the table to grab the view container's ng-container to insert data rows.
|
|
1411
1475
|
* @docs-private
|
|
@@ -1512,7 +1576,7 @@
|
|
|
1512
1576
|
* parameters to become required.
|
|
1513
1577
|
* @breaking-change 11.0.0
|
|
1514
1578
|
*/
|
|
1515
|
-
_viewRepeater, _coalescedStyleScheduler,
|
|
1579
|
+
_viewRepeater, _coalescedStyleScheduler, _stickyPositioningListener,
|
|
1516
1580
|
// Optional for backwards compatibility. The viewport ruler is provided in root. Therefore,
|
|
1517
1581
|
// this property will never be null.
|
|
1518
1582
|
// tslint:disable-next-line: lightweight-tokens
|
|
@@ -1524,6 +1588,7 @@
|
|
|
1524
1588
|
this._platform = _platform;
|
|
1525
1589
|
this._viewRepeater = _viewRepeater;
|
|
1526
1590
|
this._coalescedStyleScheduler = _coalescedStyleScheduler;
|
|
1591
|
+
this._stickyPositioningListener = _stickyPositioningListener;
|
|
1527
1592
|
this._viewportRuler = _viewportRuler;
|
|
1528
1593
|
/** Subject that emits when the component has been destroyed. */
|
|
1529
1594
|
this._onDestroy = new rxjs.Subject();
|
|
@@ -2352,7 +2417,7 @@
|
|
|
2352
2417
|
CdkTable.prototype._setupStickyStyler = function () {
|
|
2353
2418
|
var _this = this;
|
|
2354
2419
|
var direction = this._dir ? this._dir.value : 'ltr';
|
|
2355
|
-
this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement);
|
|
2420
|
+
this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement, this._stickyPositioningListener);
|
|
2356
2421
|
(this._dir ? this._dir.change : rxjs.of())
|
|
2357
2422
|
.pipe(operators.takeUntil(this._onDestroy))
|
|
2358
2423
|
.subscribe(function (value) {
|
|
@@ -2398,6 +2463,8 @@
|
|
|
2398
2463
|
{ provide: CDK_TABLE, useExisting: CdkTable },
|
|
2399
2464
|
{ provide: collections._VIEW_REPEATER_STRATEGY, useClass: collections._DisposeViewRepeaterStrategy },
|
|
2400
2465
|
{ provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },
|
|
2466
|
+
// Prevent nested tables from seeing this table's StickyPositioningListener.
|
|
2467
|
+
{ provide: STICKY_POSITIONING_LISTENER, useValue: null },
|
|
2401
2468
|
],
|
|
2402
2469
|
styles: [".cdk-table-fixed-layout{table-layout:fixed}\n"]
|
|
2403
2470
|
},] }
|
|
@@ -2412,6 +2479,7 @@
|
|
|
2412
2479
|
{ type: platform.Platform },
|
|
2413
2480
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [collections._VIEW_REPEATER_STRATEGY,] }] },
|
|
2414
2481
|
{ type: _CoalescedStyleScheduler, decorators: [{ type: core.Optional }, { type: core.Inject, args: [_COALESCED_STYLE_SCHEDULER,] }] },
|
|
2482
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.SkipSelf }, { type: core.Inject, args: [STICKY_POSITIONING_LISTENER,] }] },
|
|
2415
2483
|
{ type: scrolling.ViewportRuler, decorators: [{ type: core.Optional }] }
|
|
2416
2484
|
]; };
|
|
2417
2485
|
CdkTable.propDecorators = {
|
|
@@ -2645,6 +2713,7 @@
|
|
|
2645
2713
|
exports.HeaderRowOutlet = HeaderRowOutlet;
|
|
2646
2714
|
exports.NoDataRowOutlet = NoDataRowOutlet;
|
|
2647
2715
|
exports.STICKY_DIRECTIONS = STICKY_DIRECTIONS;
|
|
2716
|
+
exports.STICKY_POSITIONING_LISTENER = STICKY_POSITIONING_LISTENER;
|
|
2648
2717
|
exports.StickyStyler = StickyStyler;
|
|
2649
2718
|
exports.TEXT_COLUMN_OPTIONS = TEXT_COLUMN_OPTIONS;
|
|
2650
2719
|
exports._COALESCED_STYLE_SCHEDULER = _COALESCED_STYLE_SCHEDULER;
|