@angular/cdk 7.0.4 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/_a11y.scss +1 -1
- package/a11y/typings/focus-monitor/focus-monitor.d.ts +20 -5
- package/a11y/typings/focus-trap/focus-trap.d.ts +2 -0
- package/a11y/typings/index.metadata.json +1 -1
- package/a11y/typings/live-announcer/live-announcer.d.ts +34 -3
- package/bundles/cdk-a11y.umd.js +477 -216
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +16 -9
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +11 -6
- package/bundles/cdk-bidi.umd.js.map +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +25 -9
- package/bundles/cdk-coercion.umd.js.map +1 -1
- package/bundles/cdk-coercion.umd.min.js +1 -1
- package/bundles/cdk-coercion.umd.min.js.map +1 -1
- package/bundles/cdk-collections.umd.js +28 -5
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +2177 -915
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -1
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js +33 -1
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +29 -22
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +26 -7
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +1 -1
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +605 -258
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +50 -28
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +14 -7
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +139 -44
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +103 -19
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +182 -48
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +76 -38
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +1 -1
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +71 -34
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +5 -4
- 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/coercion/typings/element.d.ts +13 -0
- package/coercion/typings/index.metadata.json +1 -1
- package/coercion/typings/public-api.d.ts +1 -0
- package/drag-drop/typings/{drag-handle.d.ts → directives/drag-handle.d.ts} +3 -0
- package/drag-drop/typings/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/drag-drop/typings/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/drag-drop/typings/directives/drag.d.ts +109 -0
- package/{typings/drag-drop → drag-drop/typings/directives}/drop-list-group.d.ts +3 -0
- package/drag-drop/typings/directives/drop-list.d.ts +135 -0
- package/drag-drop/typings/drag-drop-registry.d.ts +8 -3
- package/drag-drop/typings/drag-events.d.ts +14 -7
- package/{typings/esm5/drag-drop/drag.d.ts → drag-drop/typings/drag-ref.d.ts} +152 -82
- package/drag-drop/typings/drop-list-container.d.ts +21 -3
- package/drag-drop/typings/{drop-list.d.ts → drop-list-ref.d.ts} +132 -81
- package/drag-drop/typings/index.d.ts +1 -0
- package/drag-drop/typings/index.metadata.json +1 -1
- package/drag-drop/typings/public-api.d.ts +13 -6
- package/esm2015/a11y.js +337 -190
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +16 -11
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +13 -8
- package/esm2015/bidi.js.map +1 -1
- package/esm2015/cdk.js +7 -6
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +25 -8
- package/esm2015/coercion.js.map +1 -1
- package/esm2015/collections.js +22 -7
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +1587 -691
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +31 -4
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +29 -19
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +15 -10
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +393 -232
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +53 -31
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +13 -9
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +102 -45
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +93 -24
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +89 -45
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +54 -37
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +55 -36
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +481 -220
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +18 -11
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +13 -8
- package/esm5/bidi.es5.js.map +1 -1
- package/esm5/cdk.es5.js +7 -6
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +25 -8
- package/esm5/coercion.es5.js.map +1 -1
- package/esm5/collections.es5.js +35 -7
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +2233 -972
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +35 -4
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +31 -24
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +29 -10
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +609 -262
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +52 -30
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +16 -9
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +141 -46
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +106 -24
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +184 -50
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +75 -37
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +74 -37
- package/esm5/tree.es5.js.map +1 -1
- package/keycodes/typings/index.metadata.json +1 -1
- package/keycodes/typings/modifiers.d.ts +14 -0
- package/keycodes/typings/public-api.d.ts +1 -0
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-directives.d.ts +0 -2
- package/package.json +4 -4
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-update/upgrade-data.js +2 -1
- package/schematics/ng-update/upgrade-data.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/index.js +3 -2
- package/schematics/ng-update/upgrade-rules/index.js.map +1 -1
- package/schematics/utils/ast/ng-module-imports.d.ts +1 -1
- package/schematics/utils/ast/ng-module-imports.js +25 -13
- package/schematics/utils/ast/ng-module-imports.js.map +1 -1
- package/schematics/utils/get-project.js +2 -1
- package/schematics/utils/get-project.js.map +1 -1
- package/schematics/utils/parse5-element.js +3 -2
- package/schematics/utils/parse5-element.js.map +1 -1
- package/schematics/utils/project-targets.js +2 -1
- package/schematics/utils/project-targets.js.map +1 -1
- package/schematics/utils/version-agnostic-typescript.js +3 -2
- package/schematics/utils/version-agnostic-typescript.js.map +1 -1
- package/scrolling/typings/index.metadata.json +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/public-api.d.ts +1 -0
- package/stepper/typings/step-header.d.ts +15 -0
- package/stepper/typings/stepper.d.ts +11 -1
- package/text-field/typings/autosize.d.ts +6 -0
- package/text-field/typings/index.metadata.json +1 -1
- package/tree/typings/control/base-tree-control.d.ts +1 -1
- package/tree/typings/control/nested-tree-control.d.ts +2 -2
- package/tree/typings/control/tree-control.d.ts +1 -1
- package/tree/typings/nested-node.d.ts +5 -5
- package/typings/a11y/focus-monitor/focus-monitor.d.ts +20 -5
- package/typings/a11y/focus-trap/focus-trap.d.ts +2 -0
- package/typings/a11y/index.metadata.json +1 -1
- package/typings/a11y/live-announcer/live-announcer.d.ts +34 -3
- package/typings/coercion/element.d.ts +13 -0
- package/typings/coercion/index.metadata.json +1 -1
- package/typings/coercion/public-api.d.ts +1 -0
- package/typings/{esm5/drag-drop → drag-drop/directives}/drag-handle.d.ts +3 -0
- package/typings/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/typings/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/typings/drag-drop/directives/drag.d.ts +109 -0
- package/typings/{esm5/drag-drop → drag-drop/directives}/drop-list-group.d.ts +3 -0
- package/typings/drag-drop/directives/drop-list.d.ts +135 -0
- package/typings/drag-drop/drag-drop-registry.d.ts +8 -3
- package/typings/drag-drop/drag-events.d.ts +14 -7
- package/typings/drag-drop/{drag.d.ts → drag-ref.d.ts} +152 -82
- package/typings/drag-drop/drop-list-container.d.ts +21 -3
- package/typings/{esm5/drag-drop/drop-list.d.ts → drag-drop/drop-list-ref.d.ts} +132 -81
- package/typings/drag-drop/index.d.ts +1 -0
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/drag-drop/public-api.d.ts +13 -6
- package/typings/esm5/a11y/focus-monitor/focus-monitor.d.ts +20 -5
- package/typings/esm5/a11y/focus-trap/focus-trap.d.ts +2 -0
- package/typings/esm5/a11y/index.metadata.json +1 -1
- package/typings/esm5/a11y/live-announcer/live-announcer.d.ts +34 -3
- package/typings/esm5/coercion/element.d.ts +13 -0
- package/typings/esm5/coercion/index.metadata.json +1 -1
- package/typings/esm5/coercion/public-api.d.ts +1 -0
- package/typings/{drag-drop → esm5/drag-drop/directives}/drag-handle.d.ts +3 -0
- package/typings/esm5/drag-drop/{drag-placeholder.d.ts → directives/drag-placeholder.d.ts} +0 -0
- package/typings/esm5/drag-drop/{drag-preview.d.ts → directives/drag-preview.d.ts} +0 -0
- package/typings/esm5/drag-drop/directives/drag.d.ts +109 -0
- package/{drag-drop/typings → typings/esm5/drag-drop/directives}/drop-list-group.d.ts +3 -0
- package/typings/esm5/drag-drop/directives/drop-list.d.ts +135 -0
- package/typings/esm5/drag-drop/drag-drop-registry.d.ts +8 -3
- package/typings/esm5/drag-drop/drag-events.d.ts +14 -7
- package/{drag-drop/typings/drag.d.ts → typings/esm5/drag-drop/drag-ref.d.ts} +152 -82
- package/typings/esm5/drag-drop/drop-list-container.d.ts +21 -3
- package/typings/{drag-drop/drop-list.d.ts → esm5/drag-drop/drop-list-ref.d.ts} +132 -81
- package/typings/esm5/drag-drop/index.d.ts +1 -0
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/public-api.d.ts +13 -6
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/keycodes/index.metadata.json +1 -1
- package/typings/esm5/keycodes/modifiers.d.ts +14 -0
- package/typings/esm5/keycodes/public-api.d.ts +1 -0
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-directives.d.ts +0 -2
- package/typings/esm5/scrolling/index.metadata.json +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/public-api.d.ts +1 -0
- package/typings/esm5/stepper/step-header.d.ts +15 -0
- package/typings/esm5/stepper/stepper.d.ts +11 -1
- package/typings/esm5/text-field/autosize.d.ts +6 -0
- package/typings/esm5/text-field/index.metadata.json +1 -1
- package/typings/esm5/tree/control/base-tree-control.d.ts +1 -1
- package/typings/esm5/tree/control/nested-tree-control.d.ts +2 -2
- package/typings/esm5/tree/control/tree-control.d.ts +1 -1
- package/typings/esm5/tree/nested-node.d.ts +5 -5
- package/typings/index.metadata.json +1 -1
- package/typings/keycodes/index.metadata.json +1 -1
- package/typings/keycodes/modifiers.d.ts +14 -0
- package/typings/keycodes/public-api.d.ts +1 -0
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-directives.d.ts +0 -2
- package/typings/schematics/utils/ast/ng-module-imports.d.ts +1 -1
- package/typings/scrolling/index.metadata.json +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/public-api.d.ts +1 -0
- package/typings/stepper/step-header.d.ts +15 -0
- package/typings/stepper/stepper.d.ts +11 -1
- package/typings/text-field/autosize.d.ts +6 -0
- package/typings/text-field/index.metadata.json +1 -1
- package/typings/tree/control/base-tree-control.d.ts +1 -1
- package/typings/tree/control/nested-tree-control.d.ts +2 -2
- package/typings/tree/control/tree-control.d.ts +1 -1
- package/typings/tree/nested-node.d.ts +5 -5
package/bundles/cdk-table.umd.js
CHANGED
|
@@ -42,7 +42,7 @@ function __extends(d, b) {
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @fileoverview added by tsickle
|
|
45
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
45
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
46
46
|
*/
|
|
47
47
|
/**
|
|
48
48
|
* Mixin to provide a directive with a function that checks if the sticky input has been
|
|
@@ -122,14 +122,14 @@ function mixinHasStickyInput(base) {
|
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* @fileoverview added by tsickle
|
|
125
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
125
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
126
126
|
*/
|
|
127
127
|
/**
|
|
128
128
|
* Cell definition for a CDK table.
|
|
129
129
|
* Captures the template of a column's data row cell as well as cell-specific properties.
|
|
130
130
|
*/
|
|
131
131
|
var CdkCellDef = /** @class */ (function () {
|
|
132
|
-
function CdkCellDef(template) {
|
|
132
|
+
function CdkCellDef(/** @docs-private */ template) {
|
|
133
133
|
this.template = template;
|
|
134
134
|
}
|
|
135
135
|
CdkCellDef.decorators = [
|
|
@@ -146,7 +146,7 @@ var CdkCellDef = /** @class */ (function () {
|
|
|
146
146
|
* Captures the template of a column's header cell and as well as cell-specific properties.
|
|
147
147
|
*/
|
|
148
148
|
var CdkHeaderCellDef = /** @class */ (function () {
|
|
149
|
-
function CdkHeaderCellDef(template) {
|
|
149
|
+
function CdkHeaderCellDef(/** @docs-private */ template) {
|
|
150
150
|
this.template = template;
|
|
151
151
|
}
|
|
152
152
|
CdkHeaderCellDef.decorators = [
|
|
@@ -163,7 +163,7 @@ var CdkHeaderCellDef = /** @class */ (function () {
|
|
|
163
163
|
* Captures the template of a column's footer cell and as well as cell-specific properties.
|
|
164
164
|
*/
|
|
165
165
|
var CdkFooterCellDef = /** @class */ (function () {
|
|
166
|
-
function CdkFooterCellDef(template) {
|
|
166
|
+
function CdkFooterCellDef(/** @docs-private */ template) {
|
|
167
167
|
this.template = template;
|
|
168
168
|
}
|
|
169
169
|
CdkFooterCellDef.decorators = [
|
|
@@ -175,10 +175,13 @@ var CdkFooterCellDef = /** @class */ (function () {
|
|
|
175
175
|
]; };
|
|
176
176
|
return CdkFooterCellDef;
|
|
177
177
|
}());
|
|
178
|
+
// Boilerplate for applying mixins to CdkColumnDef.
|
|
178
179
|
/**
|
|
179
180
|
* \@docs-private
|
|
180
181
|
*/
|
|
181
|
-
var
|
|
182
|
+
var
|
|
183
|
+
// Boilerplate for applying mixins to CdkColumnDef.
|
|
184
|
+
/**
|
|
182
185
|
* \@docs-private
|
|
183
186
|
*/
|
|
184
187
|
CdkColumnDefBase = /** @class */ (function () {
|
|
@@ -356,12 +359,13 @@ var CdkCell = /** @class */ (function (_super) {
|
|
|
356
359
|
|
|
357
360
|
/**
|
|
358
361
|
* @fileoverview added by tsickle
|
|
359
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
362
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
360
363
|
*/
|
|
361
|
-
/**
|
|
364
|
+
/**
|
|
362
365
|
* The row template that can be used by the mat-table. Should not be used outside of the
|
|
363
366
|
* material library.
|
|
364
|
-
|
|
367
|
+
* @type {?}
|
|
368
|
+
*/
|
|
365
369
|
var CDK_ROW_TEMPLATE = "<ng-container cdkCellOutlet></ng-container>";
|
|
366
370
|
/**
|
|
367
371
|
* Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
|
|
@@ -374,7 +378,7 @@ var /**
|
|
|
374
378
|
* @abstract
|
|
375
379
|
*/
|
|
376
380
|
BaseRowDef = /** @class */ (function () {
|
|
377
|
-
function BaseRowDef(template, _differs) {
|
|
381
|
+
function BaseRowDef(/** @docs-private */ template, _differs) {
|
|
378
382
|
this.template = template;
|
|
379
383
|
this._differs = _differs;
|
|
380
384
|
}
|
|
@@ -437,10 +441,13 @@ BaseRowDef = /** @class */ (function () {
|
|
|
437
441
|
};
|
|
438
442
|
return BaseRowDef;
|
|
439
443
|
}());
|
|
444
|
+
// Boilerplate for applying mixins to CdkHeaderRowDef.
|
|
440
445
|
/**
|
|
441
446
|
* \@docs-private
|
|
442
447
|
*/
|
|
443
|
-
var
|
|
448
|
+
var
|
|
449
|
+
// Boilerplate for applying mixins to CdkHeaderRowDef.
|
|
450
|
+
/**
|
|
444
451
|
* \@docs-private
|
|
445
452
|
*/
|
|
446
453
|
CdkHeaderRowDefBase = /** @class */ (function (_super) {
|
|
@@ -463,11 +470,16 @@ var CdkHeaderRowDef = /** @class */ (function (_super) {
|
|
|
463
470
|
}
|
|
464
471
|
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
465
472
|
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
473
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
474
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
466
475
|
/**
|
|
467
476
|
* @param {?} changes
|
|
468
477
|
* @return {?}
|
|
469
478
|
*/
|
|
470
|
-
CdkHeaderRowDef.prototype.ngOnChanges =
|
|
479
|
+
CdkHeaderRowDef.prototype.ngOnChanges =
|
|
480
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
481
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
482
|
+
/**
|
|
471
483
|
* @param {?} changes
|
|
472
484
|
* @return {?}
|
|
473
485
|
*/
|
|
@@ -487,10 +499,13 @@ var CdkHeaderRowDef = /** @class */ (function (_super) {
|
|
|
487
499
|
]; };
|
|
488
500
|
return CdkHeaderRowDef;
|
|
489
501
|
}(_CdkHeaderRowDefBase));
|
|
502
|
+
// Boilerplate for applying mixins to CdkFooterRowDef.
|
|
490
503
|
/**
|
|
491
504
|
* \@docs-private
|
|
492
505
|
*/
|
|
493
|
-
var
|
|
506
|
+
var
|
|
507
|
+
// Boilerplate for applying mixins to CdkFooterRowDef.
|
|
508
|
+
/**
|
|
494
509
|
* \@docs-private
|
|
495
510
|
*/
|
|
496
511
|
CdkFooterRowDefBase = /** @class */ (function (_super) {
|
|
@@ -513,11 +528,16 @@ var CdkFooterRowDef = /** @class */ (function (_super) {
|
|
|
513
528
|
}
|
|
514
529
|
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
515
530
|
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
531
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
532
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
516
533
|
/**
|
|
517
534
|
* @param {?} changes
|
|
518
535
|
* @return {?}
|
|
519
536
|
*/
|
|
520
|
-
CdkFooterRowDef.prototype.ngOnChanges =
|
|
537
|
+
CdkFooterRowDef.prototype.ngOnChanges =
|
|
538
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
539
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
540
|
+
/**
|
|
521
541
|
* @param {?} changes
|
|
522
542
|
* @return {?}
|
|
523
543
|
*/
|
|
@@ -662,7 +682,7 @@ var CdkRow = /** @class */ (function () {
|
|
|
662
682
|
|
|
663
683
|
/**
|
|
664
684
|
* @fileoverview added by tsickle
|
|
665
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
685
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
666
686
|
*/
|
|
667
687
|
|
|
668
688
|
/**
|
|
@@ -721,12 +741,14 @@ function getTableUnknownDataSourceError() {
|
|
|
721
741
|
|
|
722
742
|
/**
|
|
723
743
|
* @fileoverview added by tsickle
|
|
724
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
744
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
725
745
|
*/
|
|
726
|
-
|
|
746
|
+
|
|
747
|
+
/**
|
|
727
748
|
* List of all possible directions that can be used for sticky positioning.
|
|
728
749
|
* \@docs-private
|
|
729
|
-
|
|
750
|
+
* @type {?}
|
|
751
|
+
*/
|
|
730
752
|
var STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];
|
|
731
753
|
/**
|
|
732
754
|
* Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.
|
|
@@ -784,7 +806,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
784
806
|
this._removeStickyStyle(row, stickyDirections);
|
|
785
807
|
for (var i = 0; i < row.children.length; i++) {
|
|
786
808
|
/** @type {?} */
|
|
787
|
-
var cell = /** @type {?} */ (row.children[i]);
|
|
809
|
+
var cell = (/** @type {?} */ (row.children[i]));
|
|
788
810
|
this._removeStickyStyle(cell, stickyDirections);
|
|
789
811
|
}
|
|
790
812
|
}
|
|
@@ -840,7 +862,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
840
862
|
var row = rows_2[_i];
|
|
841
863
|
for (var i = 0; i < numCells; i++) {
|
|
842
864
|
/** @type {?} */
|
|
843
|
-
var cell = /** @type {?} */ (row.children[i]);
|
|
865
|
+
var cell = (/** @type {?} */ (row.children[i]));
|
|
844
866
|
if (stickyStartStates[i]) {
|
|
845
867
|
this._addStickyStyle(cell, isRtl ? 'right' : 'left', startPositions[i]);
|
|
846
868
|
}
|
|
@@ -890,6 +912,8 @@ StickyStyler = /** @class */ (function () {
|
|
|
890
912
|
if (!this._isBrowser) {
|
|
891
913
|
return;
|
|
892
914
|
}
|
|
915
|
+
// If positioning the rows to the bottom, reverse their order when evaluating the sticky
|
|
916
|
+
// position such that the last row stuck will be "bottom: 0px" and so on.
|
|
893
917
|
/** @type {?} */
|
|
894
918
|
var rows = position === 'bottom' ? rowsToStick.reverse() : rowsToStick;
|
|
895
919
|
/** @type {?} */
|
|
@@ -903,7 +927,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
903
927
|
if (this.isNativeHtmlTable) {
|
|
904
928
|
for (var j = 0; j < row.children.length; j++) {
|
|
905
929
|
/** @type {?} */
|
|
906
|
-
var cell = /** @type {?} */ (row.children[j]);
|
|
930
|
+
var cell = (/** @type {?} */ (row.children[j]));
|
|
907
931
|
this._addStickyStyle(cell, position, stickyHeight);
|
|
908
932
|
}
|
|
909
933
|
}
|
|
@@ -948,7 +972,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
948
972
|
return;
|
|
949
973
|
}
|
|
950
974
|
/** @type {?} */
|
|
951
|
-
var tfoot = /** @type {?} */ (
|
|
975
|
+
var tfoot = (/** @type {?} */ (tableElement.querySelector('tfoot')));
|
|
952
976
|
if (stickyStates.some(function (state) { return !state; })) {
|
|
953
977
|
this._removeStickyStyle(tfoot, ['bottom']);
|
|
954
978
|
}
|
|
@@ -983,6 +1007,8 @@ StickyStyler = /** @class */ (function () {
|
|
|
983
1007
|
element.style[dir] = '';
|
|
984
1008
|
}
|
|
985
1009
|
element.style.zIndex = this._getCalculatedZIndex(element);
|
|
1010
|
+
// If the element no longer has any more sticky directions, remove sticky positioning and
|
|
1011
|
+
// the sticky CSS class.
|
|
986
1012
|
/** @type {?} */
|
|
987
1013
|
var hasDirection = STICKY_DIRECTIONS.some(function (dir) { return !!element.style[dir]; });
|
|
988
1014
|
if (!hasDirection) {
|
|
@@ -1092,7 +1118,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
1092
1118
|
var firstRowCells = row.children;
|
|
1093
1119
|
for (var i = 0; i < firstRowCells.length; i++) {
|
|
1094
1120
|
/** @type {?} */
|
|
1095
|
-
var cell = /** @type {?} */ (firstRowCells[i]);
|
|
1121
|
+
var cell = (/** @type {?} */ (firstRowCells[i]));
|
|
1096
1122
|
cellWidths.push(cell.getBoundingClientRect().width);
|
|
1097
1123
|
}
|
|
1098
1124
|
return cellWidths;
|
|
@@ -1170,7 +1196,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
1170
1196
|
|
|
1171
1197
|
/**
|
|
1172
1198
|
* @fileoverview added by tsickle
|
|
1173
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1199
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1174
1200
|
*/
|
|
1175
1201
|
/**
|
|
1176
1202
|
* Provides a handle for the table to grab the view container's ng-container to insert data rows.
|
|
@@ -1229,11 +1255,12 @@ var FooterRowOutlet = /** @class */ (function () {
|
|
|
1229
1255
|
]; };
|
|
1230
1256
|
return FooterRowOutlet;
|
|
1231
1257
|
}());
|
|
1232
|
-
/**
|
|
1258
|
+
/**
|
|
1233
1259
|
* The table template that can be used by the mat-table. Should not be used outside of the
|
|
1234
1260
|
* material library.
|
|
1235
1261
|
* \@docs-private
|
|
1236
|
-
|
|
1262
|
+
* @type {?}
|
|
1263
|
+
*/
|
|
1237
1264
|
var CDK_TABLE_TEMPLATE = "\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>";
|
|
1238
1265
|
/**
|
|
1239
1266
|
* Class used to conveniently type the embedded view ref for rows with a context.
|
|
@@ -1262,11 +1289,12 @@ RowViewRef = /** @class */ (function (_super) {
|
|
|
1262
1289
|
* @template T
|
|
1263
1290
|
*/
|
|
1264
1291
|
var CdkTable = /** @class */ (function () {
|
|
1265
|
-
function CdkTable(_differs, _changeDetectorRef, _elementRef, role, _dir,
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1292
|
+
function CdkTable(_differs, _changeDetectorRef, _elementRef, role, _dir,
|
|
1293
|
+
/**
|
|
1294
|
+
* @deprecated
|
|
1295
|
+
* @breaking-change 8.0.0 `_document` and `_platform` to
|
|
1296
|
+
* be made into a required parameters.
|
|
1297
|
+
*/
|
|
1270
1298
|
_document, _platform) {
|
|
1271
1299
|
this._differs = _differs;
|
|
1272
1300
|
this._changeDetectorRef = _changeDetectorRef;
|
|
@@ -1337,6 +1365,8 @@ var CdkTable = /** @class */ (function () {
|
|
|
1337
1365
|
*/
|
|
1338
1366
|
this.stickyCssClass = 'cdk-table-sticky';
|
|
1339
1367
|
this._multiTemplateDataRows = false;
|
|
1368
|
+
// TODO(andrewseguin): Remove max value as the end index
|
|
1369
|
+
// and instead calculate the view on init and scroll.
|
|
1340
1370
|
/**
|
|
1341
1371
|
* Stream containing the latest information on what rows are being displayed on screen.
|
|
1342
1372
|
* Can be used by the data source to as a heuristic of what data should be provided.
|
|
@@ -1369,7 +1399,8 @@ var CdkTable = /** @class */ (function () {
|
|
|
1369
1399
|
*/
|
|
1370
1400
|
function (fn) {
|
|
1371
1401
|
if (core.isDevMode() &&
|
|
1372
|
-
fn != null && typeof fn !== 'function' &&
|
|
1402
|
+
fn != null && typeof fn !== 'function' &&
|
|
1403
|
+
(/** @type {?} */ (console)) && (/** @type {?} */ (console.warn))) {
|
|
1373
1404
|
console.warn("trackBy must be a function, but received " + JSON.stringify(fn) + ".");
|
|
1374
1405
|
}
|
|
1375
1406
|
this._trackByFn = fn;
|
|
@@ -1573,15 +1604,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
1573
1604
|
var viewContainer = this._rowOutlet.viewContainer;
|
|
1574
1605
|
changes.forEachOperation(function (record, prevIndex, currentIndex) {
|
|
1575
1606
|
if (record.previousIndex == null) {
|
|
1576
|
-
_this._insertRow(record.item, /** @type {?} */ (
|
|
1607
|
+
_this._insertRow(record.item, (/** @type {?} */ (currentIndex)));
|
|
1577
1608
|
}
|
|
1578
1609
|
else if (currentIndex == null) {
|
|
1579
|
-
viewContainer.remove(/** @type {?} */ (
|
|
1610
|
+
viewContainer.remove((/** @type {?} */ (prevIndex)));
|
|
1580
1611
|
}
|
|
1581
1612
|
else {
|
|
1582
1613
|
/** @type {?} */
|
|
1583
|
-
var view = /** @type {?} */ (viewContainer.get(/** @type {?} */ (
|
|
1584
|
-
viewContainer.move(/** @type {?} */ (
|
|
1614
|
+
var view = (/** @type {?} */ (viewContainer.get((/** @type {?} */ (prevIndex)))));
|
|
1615
|
+
viewContainer.move((/** @type {?} */ (view)), currentIndex);
|
|
1585
1616
|
}
|
|
1586
1617
|
});
|
|
1587
1618
|
// Update the meta context of a row's context data (index, count, first, last, ...)
|
|
@@ -1590,7 +1621,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
1590
1621
|
// e.g. if trackBy matched data on some property but the actual data reference changed.
|
|
1591
1622
|
changes.forEachIdentityChange(function (record) {
|
|
1592
1623
|
/** @type {?} */
|
|
1593
|
-
var rowView = /** @type {?} */ (viewContainer.get(/** @type {?} */ (
|
|
1624
|
+
var rowView = (/** @type {?} */ (viewContainer.get((/** @type {?} */ (record.currentIndex)))));
|
|
1594
1625
|
rowView.context.$implicit = record.item.data;
|
|
1595
1626
|
});
|
|
1596
1627
|
this.updateStickyColumnStyles();
|
|
@@ -1882,6 +1913,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
1882
1913
|
});
|
|
1883
1914
|
// Update the sticky styles for each data row depending on its def's sticky state
|
|
1884
1915
|
this._rowDefs.forEach(function (rowDef) {
|
|
1916
|
+
// Collect all the rows rendered with this row definition.
|
|
1885
1917
|
/** @type {?} */
|
|
1886
1918
|
var rows = [];
|
|
1887
1919
|
for (var i = 0; i < dataRows.length; i++) {
|
|
@@ -1902,17 +1934,26 @@ var CdkTable = /** @class */ (function () {
|
|
|
1902
1934
|
* Get the list of RenderRow objects to render according to the current list of data and defined
|
|
1903
1935
|
* row definitions. If the previous list already contained a particular pair, it should be reused
|
|
1904
1936
|
* so that the differ equates their references.
|
|
1937
|
+
*/
|
|
1938
|
+
/**
|
|
1939
|
+
* Get the list of RenderRow objects to render according to the current list of data and defined
|
|
1940
|
+
* row definitions. If the previous list already contained a particular pair, it should be reused
|
|
1941
|
+
* so that the differ equates their references.
|
|
1942
|
+
* @private
|
|
1905
1943
|
* @return {?}
|
|
1906
1944
|
*/
|
|
1907
1945
|
CdkTable.prototype._getAllRenderRows = /**
|
|
1908
1946
|
* Get the list of RenderRow objects to render according to the current list of data and defined
|
|
1909
1947
|
* row definitions. If the previous list already contained a particular pair, it should be reused
|
|
1910
1948
|
* so that the differ equates their references.
|
|
1949
|
+
* @private
|
|
1911
1950
|
* @return {?}
|
|
1912
1951
|
*/
|
|
1913
1952
|
function () {
|
|
1914
1953
|
/** @type {?} */
|
|
1915
1954
|
var renderRows = [];
|
|
1955
|
+
// Store the cache and create a new one. Any re-used RenderRow objects will be moved into the
|
|
1956
|
+
// new cache while unused ones can be picked up by garbage collection.
|
|
1916
1957
|
/** @type {?} */
|
|
1917
1958
|
var prevCachedRenderRows = this._cachedRenderRowsMap;
|
|
1918
1959
|
this._cachedRenderRowsMap = new Map();
|
|
@@ -1930,9 +1971,9 @@ var CdkTable = /** @class */ (function () {
|
|
|
1930
1971
|
/** @type {?} */
|
|
1931
1972
|
var renderRow = renderRowsForData[j];
|
|
1932
1973
|
/** @type {?} */
|
|
1933
|
-
var cache = /** @type {?} */ (
|
|
1974
|
+
var cache = (/** @type {?} */ (this._cachedRenderRowsMap.get(renderRow.data)));
|
|
1934
1975
|
if (cache.has(renderRow.rowDef)) {
|
|
1935
|
-
/** @type {?} */ (
|
|
1976
|
+
(/** @type {?} */ (cache.get(renderRow.rowDef))).push(renderRow);
|
|
1936
1977
|
}
|
|
1937
1978
|
else {
|
|
1938
1979
|
cache.set(renderRow.rowDef, [renderRow]);
|
|
@@ -1946,6 +1987,12 @@ var CdkTable = /** @class */ (function () {
|
|
|
1946
1987
|
* Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
|
1947
1988
|
* should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
|
1948
1989
|
* `(T, CdkRowDef)` pair.
|
|
1990
|
+
*/
|
|
1991
|
+
/**
|
|
1992
|
+
* Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
|
1993
|
+
* should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
|
1994
|
+
* `(T, CdkRowDef)` pair.
|
|
1995
|
+
* @private
|
|
1949
1996
|
* @param {?} data
|
|
1950
1997
|
* @param {?} dataIndex
|
|
1951
1998
|
* @param {?=} cache
|
|
@@ -1955,6 +2002,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
1955
2002
|
* Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
|
1956
2003
|
* should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
|
1957
2004
|
* `(T, CdkRowDef)` pair.
|
|
2005
|
+
* @private
|
|
1958
2006
|
* @param {?} data
|
|
1959
2007
|
* @param {?} dataIndex
|
|
1960
2008
|
* @param {?=} cache
|
|
@@ -1965,10 +2013,10 @@ var CdkTable = /** @class */ (function () {
|
|
|
1965
2013
|
var rowDefs = this._getRowDefs(data, dataIndex);
|
|
1966
2014
|
return rowDefs.map(function (rowDef) {
|
|
1967
2015
|
/** @type {?} */
|
|
1968
|
-
var cachedRenderRows = (cache && cache.has(rowDef)) ? /** @type {?} */ (
|
|
2016
|
+
var cachedRenderRows = (cache && cache.has(rowDef)) ? (/** @type {?} */ (cache.get(rowDef))) : [];
|
|
1969
2017
|
if (cachedRenderRows.length) {
|
|
1970
2018
|
/** @type {?} */
|
|
1971
|
-
var dataRow = /** @type {?} */ (
|
|
2019
|
+
var dataRow = (/** @type {?} */ (cachedRenderRows.shift()));
|
|
1972
2020
|
dataRow.dataIndex = dataIndex;
|
|
1973
2021
|
return dataRow;
|
|
1974
2022
|
}
|
|
@@ -1977,12 +2025,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
1977
2025
|
}
|
|
1978
2026
|
});
|
|
1979
2027
|
};
|
|
2028
|
+
/** Update the map containing the content's column definitions. */
|
|
1980
2029
|
/**
|
|
1981
2030
|
* Update the map containing the content's column definitions.
|
|
2031
|
+
* @private
|
|
1982
2032
|
* @return {?}
|
|
1983
2033
|
*/
|
|
1984
2034
|
CdkTable.prototype._cacheColumnDefs = /**
|
|
1985
2035
|
* Update the map containing the content's column definitions.
|
|
2036
|
+
* @private
|
|
1986
2037
|
* @return {?}
|
|
1987
2038
|
*/
|
|
1988
2039
|
function () {
|
|
@@ -1997,12 +2048,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
1997
2048
|
_this._columnDefsByName.set(columnDef.name, columnDef);
|
|
1998
2049
|
});
|
|
1999
2050
|
};
|
|
2051
|
+
/** Update the list of all available row definitions that can be used. */
|
|
2000
2052
|
/**
|
|
2001
2053
|
* Update the list of all available row definitions that can be used.
|
|
2054
|
+
* @private
|
|
2002
2055
|
* @return {?}
|
|
2003
2056
|
*/
|
|
2004
2057
|
CdkTable.prototype._cacheRowDefs = /**
|
|
2005
2058
|
* Update the list of all available row definitions that can be used.
|
|
2059
|
+
* @private
|
|
2006
2060
|
* @return {?}
|
|
2007
2061
|
*/
|
|
2008
2062
|
function () {
|
|
@@ -2012,6 +2066,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2012
2066
|
mergeQueryListAndSet(this._contentFooterRowDefs, this._customFooterRowDefs);
|
|
2013
2067
|
this._rowDefs =
|
|
2014
2068
|
mergeQueryListAndSet(this._contentRowDefs, this._customRowDefs);
|
|
2069
|
+
// After all row definitions are determined, find the row definition to be considered default.
|
|
2015
2070
|
/** @type {?} */
|
|
2016
2071
|
var defaultRowDefs = this._rowDefs.filter(function (def) { return !def.when; });
|
|
2017
2072
|
if (!this.multiTemplateDataRows && defaultRowDefs.length > 1) {
|
|
@@ -2023,12 +2078,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
2023
2078
|
* Check if the header, data, or footer rows have changed what columns they want to display or
|
|
2024
2079
|
* whether the sticky states have changed for the header or footer. If there is a diff, then
|
|
2025
2080
|
* re-render that section.
|
|
2081
|
+
*/
|
|
2082
|
+
/**
|
|
2083
|
+
* Check if the header, data, or footer rows have changed what columns they want to display or
|
|
2084
|
+
* whether the sticky states have changed for the header or footer. If there is a diff, then
|
|
2085
|
+
* re-render that section.
|
|
2086
|
+
* @private
|
|
2026
2087
|
* @return {?}
|
|
2027
2088
|
*/
|
|
2028
2089
|
CdkTable.prototype._renderUpdatedColumns = /**
|
|
2029
2090
|
* Check if the header, data, or footer rows have changed what columns they want to display or
|
|
2030
2091
|
* whether the sticky states have changed for the header or footer. If there is a diff, then
|
|
2031
2092
|
* re-render that section.
|
|
2093
|
+
* @private
|
|
2032
2094
|
* @return {?}
|
|
2033
2095
|
*/
|
|
2034
2096
|
function () {
|
|
@@ -2050,6 +2112,12 @@ var CdkTable = /** @class */ (function () {
|
|
|
2050
2112
|
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
2051
2113
|
* render change subscription if one exists. If the data source is null, interpret this by
|
|
2052
2114
|
* clearing the row outlet. Otherwise start listening for new data.
|
|
2115
|
+
*/
|
|
2116
|
+
/**
|
|
2117
|
+
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
2118
|
+
* render change subscription if one exists. If the data source is null, interpret this by
|
|
2119
|
+
* clearing the row outlet. Otherwise start listening for new data.
|
|
2120
|
+
* @private
|
|
2053
2121
|
* @param {?} dataSource
|
|
2054
2122
|
* @return {?}
|
|
2055
2123
|
*/
|
|
@@ -2057,6 +2125,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2057
2125
|
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
2058
2126
|
* render change subscription if one exists. If the data source is null, interpret this by
|
|
2059
2127
|
* clearing the row outlet. Otherwise start listening for new data.
|
|
2128
|
+
* @private
|
|
2060
2129
|
* @param {?} dataSource
|
|
2061
2130
|
* @return {?}
|
|
2062
2131
|
*/
|
|
@@ -2078,12 +2147,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
2078
2147
|
}
|
|
2079
2148
|
this._dataSource = dataSource;
|
|
2080
2149
|
};
|
|
2150
|
+
/** Set up a subscription for the data provided by the data source. */
|
|
2081
2151
|
/**
|
|
2082
2152
|
* Set up a subscription for the data provided by the data source.
|
|
2153
|
+
* @private
|
|
2083
2154
|
* @return {?}
|
|
2084
2155
|
*/
|
|
2085
2156
|
CdkTable.prototype._observeRenderChanges = /**
|
|
2086
2157
|
* Set up a subscription for the data provided by the data source.
|
|
2158
|
+
* @private
|
|
2087
2159
|
* @return {?}
|
|
2088
2160
|
*/
|
|
2089
2161
|
function () {
|
|
@@ -2098,8 +2170,8 @@ var CdkTable = /** @class */ (function () {
|
|
|
2098
2170
|
// Cannot check this.dataSource['connect'] due to potential property renaming, nor can it
|
|
2099
2171
|
// checked as an instanceof DataSource<T> since the table should allow for data sources
|
|
2100
2172
|
// that did not explicitly extend DataSource<T>.
|
|
2101
|
-
if ((/** @type {?} */ (this.dataSource)).connect instanceof Function) {
|
|
2102
|
-
dataStream = (/** @type {?} */ (this.dataSource)).connect(this);
|
|
2173
|
+
if (((/** @type {?} */ (this.dataSource))).connect instanceof Function) {
|
|
2174
|
+
dataStream = ((/** @type {?} */ (this.dataSource))).connect(this);
|
|
2103
2175
|
}
|
|
2104
2176
|
else if (this.dataSource instanceof rxjs.Observable) {
|
|
2105
2177
|
dataStream = this.dataSource;
|
|
@@ -2120,11 +2192,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2120
2192
|
/**
|
|
2121
2193
|
* Clears any existing content in the header row outlet and creates a new embedded view
|
|
2122
2194
|
* in the outlet using the header row definition.
|
|
2195
|
+
*/
|
|
2196
|
+
/**
|
|
2197
|
+
* Clears any existing content in the header row outlet and creates a new embedded view
|
|
2198
|
+
* in the outlet using the header row definition.
|
|
2199
|
+
* @private
|
|
2123
2200
|
* @return {?}
|
|
2124
2201
|
*/
|
|
2125
2202
|
CdkTable.prototype._forceRenderHeaderRows = /**
|
|
2126
2203
|
* Clears any existing content in the header row outlet and creates a new embedded view
|
|
2127
2204
|
* in the outlet using the header row definition.
|
|
2205
|
+
* @private
|
|
2128
2206
|
* @return {?}
|
|
2129
2207
|
*/
|
|
2130
2208
|
function () {
|
|
@@ -2140,11 +2218,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2140
2218
|
/**
|
|
2141
2219
|
* Clears any existing content in the footer row outlet and creates a new embedded view
|
|
2142
2220
|
* in the outlet using the footer row definition.
|
|
2221
|
+
*/
|
|
2222
|
+
/**
|
|
2223
|
+
* Clears any existing content in the footer row outlet and creates a new embedded view
|
|
2224
|
+
* in the outlet using the footer row definition.
|
|
2225
|
+
* @private
|
|
2143
2226
|
* @return {?}
|
|
2144
2227
|
*/
|
|
2145
2228
|
CdkTable.prototype._forceRenderFooterRows = /**
|
|
2146
2229
|
* Clears any existing content in the footer row outlet and creates a new embedded view
|
|
2147
2230
|
* in the outlet using the footer row definition.
|
|
2231
|
+
* @private
|
|
2148
2232
|
* @return {?}
|
|
2149
2233
|
*/
|
|
2150
2234
|
function () {
|
|
@@ -2157,14 +2241,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2157
2241
|
this.updateStickyFooterRowStyles();
|
|
2158
2242
|
this.updateStickyColumnStyles();
|
|
2159
2243
|
};
|
|
2244
|
+
/** Adds the sticky column styles for the rows according to the columns' stick states. */
|
|
2160
2245
|
/**
|
|
2161
2246
|
* Adds the sticky column styles for the rows according to the columns' stick states.
|
|
2247
|
+
* @private
|
|
2162
2248
|
* @param {?} rows
|
|
2163
2249
|
* @param {?} rowDef
|
|
2164
2250
|
* @return {?}
|
|
2165
2251
|
*/
|
|
2166
2252
|
CdkTable.prototype._addStickyColumnStyles = /**
|
|
2167
2253
|
* Adds the sticky column styles for the rows according to the columns' stick states.
|
|
2254
|
+
* @private
|
|
2168
2255
|
* @param {?} rows
|
|
2169
2256
|
* @param {?} rowDef
|
|
2170
2257
|
* @return {?}
|
|
@@ -2172,7 +2259,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2172
2259
|
function (rows, rowDef) {
|
|
2173
2260
|
var _this = this;
|
|
2174
2261
|
/** @type {?} */
|
|
2175
|
-
var columnDefs = Array.from(rowDef.columns || []).map(function (c) { return ((_this._columnDefsByName.get(c))); });
|
|
2262
|
+
var columnDefs = Array.from(rowDef.columns || []).map(function (c) { return (/** @type {?} */ (_this._columnDefsByName.get(c))); });
|
|
2176
2263
|
/** @type {?} */
|
|
2177
2264
|
var stickyStartStates = columnDefs.map(function (columnDef) { return columnDef.sticky; });
|
|
2178
2265
|
/** @type {?} */
|
|
@@ -2195,7 +2282,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2195
2282
|
var renderedRows = [];
|
|
2196
2283
|
for (var i = 0; i < rowOutlet.viewContainer.length; i++) {
|
|
2197
2284
|
/** @type {?} */
|
|
2198
|
-
var viewRef = (/** @type {?} */ (((rowOutlet.viewContainer.get(i)))));
|
|
2285
|
+
var viewRef = ((/** @type {?} */ ((/** @type {?} */ (rowOutlet.viewContainer.get(i))))));
|
|
2199
2286
|
renderedRows.push(viewRef.rootNodes[0]);
|
|
2200
2287
|
}
|
|
2201
2288
|
return renderedRows;
|
|
@@ -2248,6 +2335,11 @@ var CdkTable = /** @class */ (function () {
|
|
|
2248
2335
|
/**
|
|
2249
2336
|
* Create the embedded view for the data row template and place it in the correct index location
|
|
2250
2337
|
* within the data row view container.
|
|
2338
|
+
*/
|
|
2339
|
+
/**
|
|
2340
|
+
* Create the embedded view for the data row template and place it in the correct index location
|
|
2341
|
+
* within the data row view container.
|
|
2342
|
+
* @private
|
|
2251
2343
|
* @param {?} renderRow
|
|
2252
2344
|
* @param {?} renderIndex
|
|
2253
2345
|
* @return {?}
|
|
@@ -2255,6 +2347,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2255
2347
|
CdkTable.prototype._insertRow = /**
|
|
2256
2348
|
* Create the embedded view for the data row template and place it in the correct index location
|
|
2257
2349
|
* within the data row view container.
|
|
2350
|
+
* @private
|
|
2258
2351
|
* @param {?} renderRow
|
|
2259
2352
|
* @param {?} renderIndex
|
|
2260
2353
|
* @return {?}
|
|
@@ -2270,6 +2363,12 @@ var CdkTable = /** @class */ (function () {
|
|
|
2270
2363
|
* Creates a new row template in the outlet and fills it with the set of cell templates.
|
|
2271
2364
|
* Optionally takes a context to provide to the row and cells, as well as an optional index
|
|
2272
2365
|
* of where to place the new row template in the outlet.
|
|
2366
|
+
*/
|
|
2367
|
+
/**
|
|
2368
|
+
* Creates a new row template in the outlet and fills it with the set of cell templates.
|
|
2369
|
+
* Optionally takes a context to provide to the row and cells, as well as an optional index
|
|
2370
|
+
* of where to place the new row template in the outlet.
|
|
2371
|
+
* @private
|
|
2273
2372
|
* @param {?} outlet
|
|
2274
2373
|
* @param {?} rowDef
|
|
2275
2374
|
* @param {?} index
|
|
@@ -2280,6 +2379,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2280
2379
|
* Creates a new row template in the outlet and fills it with the set of cell templates.
|
|
2281
2380
|
* Optionally takes a context to provide to the row and cells, as well as an optional index
|
|
2282
2381
|
* of where to place the new row template in the outlet.
|
|
2382
|
+
* @private
|
|
2283
2383
|
* @param {?} outlet
|
|
2284
2384
|
* @param {?} rowDef
|
|
2285
2385
|
* @param {?} index
|
|
@@ -2301,11 +2401,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2301
2401
|
/**
|
|
2302
2402
|
* Updates the index-related context for each row to reflect any changes in the index of the rows,
|
|
2303
2403
|
* e.g. first/last/even/odd.
|
|
2404
|
+
*/
|
|
2405
|
+
/**
|
|
2406
|
+
* Updates the index-related context for each row to reflect any changes in the index of the rows,
|
|
2407
|
+
* e.g. first/last/even/odd.
|
|
2408
|
+
* @private
|
|
2304
2409
|
* @return {?}
|
|
2305
2410
|
*/
|
|
2306
2411
|
CdkTable.prototype._updateRowIndexContext = /**
|
|
2307
2412
|
* Updates the index-related context for each row to reflect any changes in the index of the rows,
|
|
2308
2413
|
* e.g. first/last/even/odd.
|
|
2414
|
+
* @private
|
|
2309
2415
|
* @return {?}
|
|
2310
2416
|
*/
|
|
2311
2417
|
function () {
|
|
@@ -2313,9 +2419,9 @@ var CdkTable = /** @class */ (function () {
|
|
|
2313
2419
|
var viewContainer = this._rowOutlet.viewContainer;
|
|
2314
2420
|
for (var renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {
|
|
2315
2421
|
/** @type {?} */
|
|
2316
|
-
var viewRef = /** @type {?} */ (viewContainer.get(renderIndex));
|
|
2422
|
+
var viewRef = (/** @type {?} */ (viewContainer.get(renderIndex)));
|
|
2317
2423
|
/** @type {?} */
|
|
2318
|
-
var context = /** @type {?} */ (viewRef.context);
|
|
2424
|
+
var context = (/** @type {?} */ (viewRef.context));
|
|
2319
2425
|
context.count = count;
|
|
2320
2426
|
context.first = renderIndex === 0;
|
|
2321
2427
|
context.last = renderIndex === count - 1;
|
|
@@ -2330,13 +2436,16 @@ var CdkTable = /** @class */ (function () {
|
|
|
2330
2436
|
}
|
|
2331
2437
|
}
|
|
2332
2438
|
};
|
|
2439
|
+
/** Gets the column definitions for the provided row def. */
|
|
2333
2440
|
/**
|
|
2334
2441
|
* Gets the column definitions for the provided row def.
|
|
2442
|
+
* @private
|
|
2335
2443
|
* @param {?} rowDef
|
|
2336
2444
|
* @return {?}
|
|
2337
2445
|
*/
|
|
2338
2446
|
CdkTable.prototype._getCellTemplates = /**
|
|
2339
2447
|
* Gets the column definitions for the provided row def.
|
|
2448
|
+
* @private
|
|
2340
2449
|
* @param {?} rowDef
|
|
2341
2450
|
* @return {?}
|
|
2342
2451
|
*/
|
|
@@ -2354,12 +2463,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
2354
2463
|
return rowDef.extractCellTemplate(column);
|
|
2355
2464
|
});
|
|
2356
2465
|
};
|
|
2466
|
+
/** Adds native table sections (e.g. tbody) and moves the row outlets into them. */
|
|
2357
2467
|
/**
|
|
2358
2468
|
* Adds native table sections (e.g. tbody) and moves the row outlets into them.
|
|
2469
|
+
* @private
|
|
2359
2470
|
* @return {?}
|
|
2360
2471
|
*/
|
|
2361
2472
|
CdkTable.prototype._applyNativeTableSections = /**
|
|
2362
2473
|
* Adds native table sections (e.g. tbody) and moves the row outlets into them.
|
|
2474
|
+
* @private
|
|
2363
2475
|
* @return {?}
|
|
2364
2476
|
*/
|
|
2365
2477
|
function () {
|
|
@@ -2371,6 +2483,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2371
2483
|
];
|
|
2372
2484
|
for (var _a = 0, sections_1 = sections; _a < sections_1.length; _a++) {
|
|
2373
2485
|
var section = sections_1[_a];
|
|
2486
|
+
// @breaking-change 8.0.0 remove the `|| document` once the `_document` is a required param.
|
|
2374
2487
|
/** @type {?} */
|
|
2375
2488
|
var documentRef = this._document || document;
|
|
2376
2489
|
/** @type {?} */
|
|
@@ -2383,12 +2496,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
2383
2496
|
* Forces a re-render of the data rows. Should be called in cases where there has been an input
|
|
2384
2497
|
* change that affects the evaluation of which rows should be rendered, e.g. toggling
|
|
2385
2498
|
* `multiTemplateDataRows` or adding/removing row definitions.
|
|
2499
|
+
*/
|
|
2500
|
+
/**
|
|
2501
|
+
* Forces a re-render of the data rows. Should be called in cases where there has been an input
|
|
2502
|
+
* change that affects the evaluation of which rows should be rendered, e.g. toggling
|
|
2503
|
+
* `multiTemplateDataRows` or adding/removing row definitions.
|
|
2504
|
+
* @private
|
|
2386
2505
|
* @return {?}
|
|
2387
2506
|
*/
|
|
2388
2507
|
CdkTable.prototype._forceRenderDataRows = /**
|
|
2389
2508
|
* Forces a re-render of the data rows. Should be called in cases where there has been an input
|
|
2390
2509
|
* change that affects the evaluation of which rows should be rendered, e.g. toggling
|
|
2391
2510
|
* `multiTemplateDataRows` or adding/removing row definitions.
|
|
2511
|
+
* @private
|
|
2392
2512
|
* @return {?}
|
|
2393
2513
|
*/
|
|
2394
2514
|
function () {
|
|
@@ -2401,12 +2521,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
2401
2521
|
* Checks if there has been a change in sticky states since last check and applies the correct
|
|
2402
2522
|
* sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
|
2403
2523
|
* during a change detection and after the inputs are settled (after content check).
|
|
2524
|
+
*/
|
|
2525
|
+
/**
|
|
2526
|
+
* Checks if there has been a change in sticky states since last check and applies the correct
|
|
2527
|
+
* sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
|
2528
|
+
* during a change detection and after the inputs are settled (after content check).
|
|
2529
|
+
* @private
|
|
2404
2530
|
* @return {?}
|
|
2405
2531
|
*/
|
|
2406
2532
|
CdkTable.prototype._checkStickyStates = /**
|
|
2407
2533
|
* Checks if there has been a change in sticky states since last check and applies the correct
|
|
2408
2534
|
* sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
|
2409
2535
|
* during a change detection and after the inputs are settled (after content check).
|
|
2536
|
+
* @private
|
|
2410
2537
|
* @return {?}
|
|
2411
2538
|
*/
|
|
2412
2539
|
function () {
|
|
@@ -2431,12 +2558,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
2431
2558
|
* Creates the sticky styler that will be used for sticky rows and columns. Listens
|
|
2432
2559
|
* for directionality changes and provides the latest direction to the styler. Re-applies column
|
|
2433
2560
|
* stickiness when directionality changes.
|
|
2561
|
+
*/
|
|
2562
|
+
/**
|
|
2563
|
+
* Creates the sticky styler that will be used for sticky rows and columns. Listens
|
|
2564
|
+
* for directionality changes and provides the latest direction to the styler. Re-applies column
|
|
2565
|
+
* stickiness when directionality changes.
|
|
2566
|
+
* @private
|
|
2434
2567
|
* @return {?}
|
|
2435
2568
|
*/
|
|
2436
2569
|
CdkTable.prototype._setupStickyStyler = /**
|
|
2437
2570
|
* Creates the sticky styler that will be used for sticky rows and columns. Listens
|
|
2438
2571
|
* for directionality changes and provides the latest direction to the styler. Re-applies column
|
|
2439
2572
|
* stickiness when directionality changes.
|
|
2573
|
+
* @private
|
|
2440
2574
|
* @return {?}
|
|
2441
2575
|
*/
|
|
2442
2576
|
function () {
|
|
@@ -2501,7 +2635,7 @@ function mergeQueryListAndSet(queryList, set) {
|
|
|
2501
2635
|
|
|
2502
2636
|
/**
|
|
2503
2637
|
* @fileoverview added by tsickle
|
|
2504
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2638
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2505
2639
|
*/
|
|
2506
2640
|
/** @type {?} */
|
|
2507
2641
|
var EXPORTED_DECLARATIONS = [
|