@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/esm5/table.es5.js
CHANGED
|
@@ -18,7 +18,7 @@ import { Platform } from '@angular/cdk/platform';
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @fileoverview added by tsickle
|
|
21
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
21
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
22
22
|
*/
|
|
23
23
|
/**
|
|
24
24
|
* Mixin to provide a directive with a function that checks if the sticky input has been
|
|
@@ -98,14 +98,14 @@ function mixinHasStickyInput(base) {
|
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* @fileoverview added by tsickle
|
|
101
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
101
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
102
102
|
*/
|
|
103
103
|
/**
|
|
104
104
|
* Cell definition for a CDK table.
|
|
105
105
|
* Captures the template of a column's data row cell as well as cell-specific properties.
|
|
106
106
|
*/
|
|
107
107
|
var CdkCellDef = /** @class */ (function () {
|
|
108
|
-
function CdkCellDef(template) {
|
|
108
|
+
function CdkCellDef(/** @docs-private */ template) {
|
|
109
109
|
this.template = template;
|
|
110
110
|
}
|
|
111
111
|
CdkCellDef.decorators = [
|
|
@@ -122,7 +122,7 @@ var CdkCellDef = /** @class */ (function () {
|
|
|
122
122
|
* Captures the template of a column's header cell and as well as cell-specific properties.
|
|
123
123
|
*/
|
|
124
124
|
var CdkHeaderCellDef = /** @class */ (function () {
|
|
125
|
-
function CdkHeaderCellDef(template) {
|
|
125
|
+
function CdkHeaderCellDef(/** @docs-private */ template) {
|
|
126
126
|
this.template = template;
|
|
127
127
|
}
|
|
128
128
|
CdkHeaderCellDef.decorators = [
|
|
@@ -139,7 +139,7 @@ var CdkHeaderCellDef = /** @class */ (function () {
|
|
|
139
139
|
* Captures the template of a column's footer cell and as well as cell-specific properties.
|
|
140
140
|
*/
|
|
141
141
|
var CdkFooterCellDef = /** @class */ (function () {
|
|
142
|
-
function CdkFooterCellDef(template) {
|
|
142
|
+
function CdkFooterCellDef(/** @docs-private */ template) {
|
|
143
143
|
this.template = template;
|
|
144
144
|
}
|
|
145
145
|
CdkFooterCellDef.decorators = [
|
|
@@ -151,10 +151,13 @@ var CdkFooterCellDef = /** @class */ (function () {
|
|
|
151
151
|
]; };
|
|
152
152
|
return CdkFooterCellDef;
|
|
153
153
|
}());
|
|
154
|
+
// Boilerplate for applying mixins to CdkColumnDef.
|
|
154
155
|
/**
|
|
155
156
|
* \@docs-private
|
|
156
157
|
*/
|
|
157
|
-
var
|
|
158
|
+
var
|
|
159
|
+
// Boilerplate for applying mixins to CdkColumnDef.
|
|
160
|
+
/**
|
|
158
161
|
* \@docs-private
|
|
159
162
|
*/
|
|
160
163
|
CdkColumnDefBase = /** @class */ (function () {
|
|
@@ -332,12 +335,13 @@ var CdkCell = /** @class */ (function (_super) {
|
|
|
332
335
|
|
|
333
336
|
/**
|
|
334
337
|
* @fileoverview added by tsickle
|
|
335
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
338
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
336
339
|
*/
|
|
337
|
-
/**
|
|
340
|
+
/**
|
|
338
341
|
* The row template that can be used by the mat-table. Should not be used outside of the
|
|
339
342
|
* material library.
|
|
340
|
-
|
|
343
|
+
* @type {?}
|
|
344
|
+
*/
|
|
341
345
|
var CDK_ROW_TEMPLATE = "<ng-container cdkCellOutlet></ng-container>";
|
|
342
346
|
/**
|
|
343
347
|
* Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
|
|
@@ -350,7 +354,7 @@ var /**
|
|
|
350
354
|
* @abstract
|
|
351
355
|
*/
|
|
352
356
|
BaseRowDef = /** @class */ (function () {
|
|
353
|
-
function BaseRowDef(template, _differs) {
|
|
357
|
+
function BaseRowDef(/** @docs-private */ template, _differs) {
|
|
354
358
|
this.template = template;
|
|
355
359
|
this._differs = _differs;
|
|
356
360
|
}
|
|
@@ -413,10 +417,13 @@ BaseRowDef = /** @class */ (function () {
|
|
|
413
417
|
};
|
|
414
418
|
return BaseRowDef;
|
|
415
419
|
}());
|
|
420
|
+
// Boilerplate for applying mixins to CdkHeaderRowDef.
|
|
416
421
|
/**
|
|
417
422
|
* \@docs-private
|
|
418
423
|
*/
|
|
419
|
-
var
|
|
424
|
+
var
|
|
425
|
+
// Boilerplate for applying mixins to CdkHeaderRowDef.
|
|
426
|
+
/**
|
|
420
427
|
* \@docs-private
|
|
421
428
|
*/
|
|
422
429
|
CdkHeaderRowDefBase = /** @class */ (function (_super) {
|
|
@@ -439,11 +446,16 @@ var CdkHeaderRowDef = /** @class */ (function (_super) {
|
|
|
439
446
|
}
|
|
440
447
|
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
441
448
|
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
449
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
450
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
442
451
|
/**
|
|
443
452
|
* @param {?} changes
|
|
444
453
|
* @return {?}
|
|
445
454
|
*/
|
|
446
|
-
CdkHeaderRowDef.prototype.ngOnChanges =
|
|
455
|
+
CdkHeaderRowDef.prototype.ngOnChanges =
|
|
456
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
457
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
458
|
+
/**
|
|
447
459
|
* @param {?} changes
|
|
448
460
|
* @return {?}
|
|
449
461
|
*/
|
|
@@ -463,10 +475,13 @@ var CdkHeaderRowDef = /** @class */ (function (_super) {
|
|
|
463
475
|
]; };
|
|
464
476
|
return CdkHeaderRowDef;
|
|
465
477
|
}(_CdkHeaderRowDefBase));
|
|
478
|
+
// Boilerplate for applying mixins to CdkFooterRowDef.
|
|
466
479
|
/**
|
|
467
480
|
* \@docs-private
|
|
468
481
|
*/
|
|
469
|
-
var
|
|
482
|
+
var
|
|
483
|
+
// Boilerplate for applying mixins to CdkFooterRowDef.
|
|
484
|
+
/**
|
|
470
485
|
* \@docs-private
|
|
471
486
|
*/
|
|
472
487
|
CdkFooterRowDefBase = /** @class */ (function (_super) {
|
|
@@ -489,11 +504,16 @@ var CdkFooterRowDef = /** @class */ (function (_super) {
|
|
|
489
504
|
}
|
|
490
505
|
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
491
506
|
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
507
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
508
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
492
509
|
/**
|
|
493
510
|
* @param {?} changes
|
|
494
511
|
* @return {?}
|
|
495
512
|
*/
|
|
496
|
-
CdkFooterRowDef.prototype.ngOnChanges =
|
|
513
|
+
CdkFooterRowDef.prototype.ngOnChanges =
|
|
514
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
515
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
516
|
+
/**
|
|
497
517
|
* @param {?} changes
|
|
498
518
|
* @return {?}
|
|
499
519
|
*/
|
|
@@ -638,7 +658,7 @@ var CdkRow = /** @class */ (function () {
|
|
|
638
658
|
|
|
639
659
|
/**
|
|
640
660
|
* @fileoverview added by tsickle
|
|
641
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
661
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
642
662
|
*/
|
|
643
663
|
|
|
644
664
|
/**
|
|
@@ -697,12 +717,14 @@ function getTableUnknownDataSourceError() {
|
|
|
697
717
|
|
|
698
718
|
/**
|
|
699
719
|
* @fileoverview added by tsickle
|
|
700
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
720
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
701
721
|
*/
|
|
702
|
-
|
|
722
|
+
|
|
723
|
+
/**
|
|
703
724
|
* List of all possible directions that can be used for sticky positioning.
|
|
704
725
|
* \@docs-private
|
|
705
|
-
|
|
726
|
+
* @type {?}
|
|
727
|
+
*/
|
|
706
728
|
var STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];
|
|
707
729
|
/**
|
|
708
730
|
* Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.
|
|
@@ -760,7 +782,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
760
782
|
this._removeStickyStyle(row, stickyDirections);
|
|
761
783
|
for (var i = 0; i < row.children.length; i++) {
|
|
762
784
|
/** @type {?} */
|
|
763
|
-
var cell = /** @type {?} */ (row.children[i]);
|
|
785
|
+
var cell = (/** @type {?} */ (row.children[i]));
|
|
764
786
|
this._removeStickyStyle(cell, stickyDirections);
|
|
765
787
|
}
|
|
766
788
|
}
|
|
@@ -816,7 +838,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
816
838
|
var row = rows_2[_i];
|
|
817
839
|
for (var i = 0; i < numCells; i++) {
|
|
818
840
|
/** @type {?} */
|
|
819
|
-
var cell = /** @type {?} */ (row.children[i]);
|
|
841
|
+
var cell = (/** @type {?} */ (row.children[i]));
|
|
820
842
|
if (stickyStartStates[i]) {
|
|
821
843
|
this._addStickyStyle(cell, isRtl ? 'right' : 'left', startPositions[i]);
|
|
822
844
|
}
|
|
@@ -866,6 +888,8 @@ StickyStyler = /** @class */ (function () {
|
|
|
866
888
|
if (!this._isBrowser) {
|
|
867
889
|
return;
|
|
868
890
|
}
|
|
891
|
+
// If positioning the rows to the bottom, reverse their order when evaluating the sticky
|
|
892
|
+
// position such that the last row stuck will be "bottom: 0px" and so on.
|
|
869
893
|
/** @type {?} */
|
|
870
894
|
var rows = position === 'bottom' ? rowsToStick.reverse() : rowsToStick;
|
|
871
895
|
/** @type {?} */
|
|
@@ -879,7 +903,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
879
903
|
if (this.isNativeHtmlTable) {
|
|
880
904
|
for (var j = 0; j < row.children.length; j++) {
|
|
881
905
|
/** @type {?} */
|
|
882
|
-
var cell = /** @type {?} */ (row.children[j]);
|
|
906
|
+
var cell = (/** @type {?} */ (row.children[j]));
|
|
883
907
|
this._addStickyStyle(cell, position, stickyHeight);
|
|
884
908
|
}
|
|
885
909
|
}
|
|
@@ -924,7 +948,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
924
948
|
return;
|
|
925
949
|
}
|
|
926
950
|
/** @type {?} */
|
|
927
|
-
var tfoot = /** @type {?} */ (
|
|
951
|
+
var tfoot = (/** @type {?} */ (tableElement.querySelector('tfoot')));
|
|
928
952
|
if (stickyStates.some(function (state) { return !state; })) {
|
|
929
953
|
this._removeStickyStyle(tfoot, ['bottom']);
|
|
930
954
|
}
|
|
@@ -959,6 +983,8 @@ StickyStyler = /** @class */ (function () {
|
|
|
959
983
|
element.style[dir] = '';
|
|
960
984
|
}
|
|
961
985
|
element.style.zIndex = this._getCalculatedZIndex(element);
|
|
986
|
+
// If the element no longer has any more sticky directions, remove sticky positioning and
|
|
987
|
+
// the sticky CSS class.
|
|
962
988
|
/** @type {?} */
|
|
963
989
|
var hasDirection = STICKY_DIRECTIONS.some(function (dir) { return !!element.style[dir]; });
|
|
964
990
|
if (!hasDirection) {
|
|
@@ -1068,7 +1094,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
1068
1094
|
var firstRowCells = row.children;
|
|
1069
1095
|
for (var i = 0; i < firstRowCells.length; i++) {
|
|
1070
1096
|
/** @type {?} */
|
|
1071
|
-
var cell = /** @type {?} */ (firstRowCells[i]);
|
|
1097
|
+
var cell = (/** @type {?} */ (firstRowCells[i]));
|
|
1072
1098
|
cellWidths.push(cell.getBoundingClientRect().width);
|
|
1073
1099
|
}
|
|
1074
1100
|
return cellWidths;
|
|
@@ -1146,7 +1172,7 @@ StickyStyler = /** @class */ (function () {
|
|
|
1146
1172
|
|
|
1147
1173
|
/**
|
|
1148
1174
|
* @fileoverview added by tsickle
|
|
1149
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1175
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1150
1176
|
*/
|
|
1151
1177
|
/**
|
|
1152
1178
|
* Provides a handle for the table to grab the view container's ng-container to insert data rows.
|
|
@@ -1205,11 +1231,12 @@ var FooterRowOutlet = /** @class */ (function () {
|
|
|
1205
1231
|
]; };
|
|
1206
1232
|
return FooterRowOutlet;
|
|
1207
1233
|
}());
|
|
1208
|
-
/**
|
|
1234
|
+
/**
|
|
1209
1235
|
* The table template that can be used by the mat-table. Should not be used outside of the
|
|
1210
1236
|
* material library.
|
|
1211
1237
|
* \@docs-private
|
|
1212
|
-
|
|
1238
|
+
* @type {?}
|
|
1239
|
+
*/
|
|
1213
1240
|
var CDK_TABLE_TEMPLATE = "\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>";
|
|
1214
1241
|
/**
|
|
1215
1242
|
* Class used to conveniently type the embedded view ref for rows with a context.
|
|
@@ -1238,11 +1265,12 @@ RowViewRef = /** @class */ (function (_super) {
|
|
|
1238
1265
|
* @template T
|
|
1239
1266
|
*/
|
|
1240
1267
|
var CdkTable = /** @class */ (function () {
|
|
1241
|
-
function CdkTable(_differs, _changeDetectorRef, _elementRef, role, _dir,
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1268
|
+
function CdkTable(_differs, _changeDetectorRef, _elementRef, role, _dir,
|
|
1269
|
+
/**
|
|
1270
|
+
* @deprecated
|
|
1271
|
+
* @breaking-change 8.0.0 `_document` and `_platform` to
|
|
1272
|
+
* be made into a required parameters.
|
|
1273
|
+
*/
|
|
1246
1274
|
_document, _platform) {
|
|
1247
1275
|
this._differs = _differs;
|
|
1248
1276
|
this._changeDetectorRef = _changeDetectorRef;
|
|
@@ -1313,6 +1341,8 @@ var CdkTable = /** @class */ (function () {
|
|
|
1313
1341
|
*/
|
|
1314
1342
|
this.stickyCssClass = 'cdk-table-sticky';
|
|
1315
1343
|
this._multiTemplateDataRows = false;
|
|
1344
|
+
// TODO(andrewseguin): Remove max value as the end index
|
|
1345
|
+
// and instead calculate the view on init and scroll.
|
|
1316
1346
|
/**
|
|
1317
1347
|
* Stream containing the latest information on what rows are being displayed on screen.
|
|
1318
1348
|
* Can be used by the data source to as a heuristic of what data should be provided.
|
|
@@ -1345,7 +1375,8 @@ var CdkTable = /** @class */ (function () {
|
|
|
1345
1375
|
*/
|
|
1346
1376
|
function (fn) {
|
|
1347
1377
|
if (isDevMode() &&
|
|
1348
|
-
fn != null && typeof fn !== 'function' &&
|
|
1378
|
+
fn != null && typeof fn !== 'function' &&
|
|
1379
|
+
(/** @type {?} */ (console)) && (/** @type {?} */ (console.warn))) {
|
|
1349
1380
|
console.warn("trackBy must be a function, but received " + JSON.stringify(fn) + ".");
|
|
1350
1381
|
}
|
|
1351
1382
|
this._trackByFn = fn;
|
|
@@ -1549,15 +1580,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
1549
1580
|
var viewContainer = this._rowOutlet.viewContainer;
|
|
1550
1581
|
changes.forEachOperation(function (record, prevIndex, currentIndex) {
|
|
1551
1582
|
if (record.previousIndex == null) {
|
|
1552
|
-
_this._insertRow(record.item, /** @type {?} */ (
|
|
1583
|
+
_this._insertRow(record.item, (/** @type {?} */ (currentIndex)));
|
|
1553
1584
|
}
|
|
1554
1585
|
else if (currentIndex == null) {
|
|
1555
|
-
viewContainer.remove(/** @type {?} */ (
|
|
1586
|
+
viewContainer.remove((/** @type {?} */ (prevIndex)));
|
|
1556
1587
|
}
|
|
1557
1588
|
else {
|
|
1558
1589
|
/** @type {?} */
|
|
1559
|
-
var view = /** @type {?} */ (viewContainer.get(/** @type {?} */ (
|
|
1560
|
-
viewContainer.move(/** @type {?} */ (
|
|
1590
|
+
var view = (/** @type {?} */ (viewContainer.get((/** @type {?} */ (prevIndex)))));
|
|
1591
|
+
viewContainer.move((/** @type {?} */ (view)), currentIndex);
|
|
1561
1592
|
}
|
|
1562
1593
|
});
|
|
1563
1594
|
// Update the meta context of a row's context data (index, count, first, last, ...)
|
|
@@ -1566,7 +1597,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
1566
1597
|
// e.g. if trackBy matched data on some property but the actual data reference changed.
|
|
1567
1598
|
changes.forEachIdentityChange(function (record) {
|
|
1568
1599
|
/** @type {?} */
|
|
1569
|
-
var rowView = /** @type {?} */ (viewContainer.get(/** @type {?} */ (
|
|
1600
|
+
var rowView = (/** @type {?} */ (viewContainer.get((/** @type {?} */ (record.currentIndex)))));
|
|
1570
1601
|
rowView.context.$implicit = record.item.data;
|
|
1571
1602
|
});
|
|
1572
1603
|
this.updateStickyColumnStyles();
|
|
@@ -1858,6 +1889,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
1858
1889
|
});
|
|
1859
1890
|
// Update the sticky styles for each data row depending on its def's sticky state
|
|
1860
1891
|
this._rowDefs.forEach(function (rowDef) {
|
|
1892
|
+
// Collect all the rows rendered with this row definition.
|
|
1861
1893
|
/** @type {?} */
|
|
1862
1894
|
var rows = [];
|
|
1863
1895
|
for (var i = 0; i < dataRows.length; i++) {
|
|
@@ -1878,17 +1910,26 @@ var CdkTable = /** @class */ (function () {
|
|
|
1878
1910
|
* Get the list of RenderRow objects to render according to the current list of data and defined
|
|
1879
1911
|
* row definitions. If the previous list already contained a particular pair, it should be reused
|
|
1880
1912
|
* so that the differ equates their references.
|
|
1913
|
+
*/
|
|
1914
|
+
/**
|
|
1915
|
+
* Get the list of RenderRow objects to render according to the current list of data and defined
|
|
1916
|
+
* row definitions. If the previous list already contained a particular pair, it should be reused
|
|
1917
|
+
* so that the differ equates their references.
|
|
1918
|
+
* @private
|
|
1881
1919
|
* @return {?}
|
|
1882
1920
|
*/
|
|
1883
1921
|
CdkTable.prototype._getAllRenderRows = /**
|
|
1884
1922
|
* Get the list of RenderRow objects to render according to the current list of data and defined
|
|
1885
1923
|
* row definitions. If the previous list already contained a particular pair, it should be reused
|
|
1886
1924
|
* so that the differ equates their references.
|
|
1925
|
+
* @private
|
|
1887
1926
|
* @return {?}
|
|
1888
1927
|
*/
|
|
1889
1928
|
function () {
|
|
1890
1929
|
/** @type {?} */
|
|
1891
1930
|
var renderRows = [];
|
|
1931
|
+
// Store the cache and create a new one. Any re-used RenderRow objects will be moved into the
|
|
1932
|
+
// new cache while unused ones can be picked up by garbage collection.
|
|
1892
1933
|
/** @type {?} */
|
|
1893
1934
|
var prevCachedRenderRows = this._cachedRenderRowsMap;
|
|
1894
1935
|
this._cachedRenderRowsMap = new Map();
|
|
@@ -1906,9 +1947,9 @@ var CdkTable = /** @class */ (function () {
|
|
|
1906
1947
|
/** @type {?} */
|
|
1907
1948
|
var renderRow = renderRowsForData[j];
|
|
1908
1949
|
/** @type {?} */
|
|
1909
|
-
var cache = /** @type {?} */ (
|
|
1950
|
+
var cache = (/** @type {?} */ (this._cachedRenderRowsMap.get(renderRow.data)));
|
|
1910
1951
|
if (cache.has(renderRow.rowDef)) {
|
|
1911
|
-
/** @type {?} */ (
|
|
1952
|
+
(/** @type {?} */ (cache.get(renderRow.rowDef))).push(renderRow);
|
|
1912
1953
|
}
|
|
1913
1954
|
else {
|
|
1914
1955
|
cache.set(renderRow.rowDef, [renderRow]);
|
|
@@ -1922,6 +1963,12 @@ var CdkTable = /** @class */ (function () {
|
|
|
1922
1963
|
* Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
|
1923
1964
|
* should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
|
1924
1965
|
* `(T, CdkRowDef)` pair.
|
|
1966
|
+
*/
|
|
1967
|
+
/**
|
|
1968
|
+
* Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
|
1969
|
+
* should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
|
1970
|
+
* `(T, CdkRowDef)` pair.
|
|
1971
|
+
* @private
|
|
1925
1972
|
* @param {?} data
|
|
1926
1973
|
* @param {?} dataIndex
|
|
1927
1974
|
* @param {?=} cache
|
|
@@ -1931,6 +1978,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
1931
1978
|
* Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
|
1932
1979
|
* should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
|
1933
1980
|
* `(T, CdkRowDef)` pair.
|
|
1981
|
+
* @private
|
|
1934
1982
|
* @param {?} data
|
|
1935
1983
|
* @param {?} dataIndex
|
|
1936
1984
|
* @param {?=} cache
|
|
@@ -1941,10 +1989,10 @@ var CdkTable = /** @class */ (function () {
|
|
|
1941
1989
|
var rowDefs = this._getRowDefs(data, dataIndex);
|
|
1942
1990
|
return rowDefs.map(function (rowDef) {
|
|
1943
1991
|
/** @type {?} */
|
|
1944
|
-
var cachedRenderRows = (cache && cache.has(rowDef)) ? /** @type {?} */ (
|
|
1992
|
+
var cachedRenderRows = (cache && cache.has(rowDef)) ? (/** @type {?} */ (cache.get(rowDef))) : [];
|
|
1945
1993
|
if (cachedRenderRows.length) {
|
|
1946
1994
|
/** @type {?} */
|
|
1947
|
-
var dataRow = /** @type {?} */ (
|
|
1995
|
+
var dataRow = (/** @type {?} */ (cachedRenderRows.shift()));
|
|
1948
1996
|
dataRow.dataIndex = dataIndex;
|
|
1949
1997
|
return dataRow;
|
|
1950
1998
|
}
|
|
@@ -1953,12 +2001,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
1953
2001
|
}
|
|
1954
2002
|
});
|
|
1955
2003
|
};
|
|
2004
|
+
/** Update the map containing the content's column definitions. */
|
|
1956
2005
|
/**
|
|
1957
2006
|
* Update the map containing the content's column definitions.
|
|
2007
|
+
* @private
|
|
1958
2008
|
* @return {?}
|
|
1959
2009
|
*/
|
|
1960
2010
|
CdkTable.prototype._cacheColumnDefs = /**
|
|
1961
2011
|
* Update the map containing the content's column definitions.
|
|
2012
|
+
* @private
|
|
1962
2013
|
* @return {?}
|
|
1963
2014
|
*/
|
|
1964
2015
|
function () {
|
|
@@ -1973,12 +2024,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
1973
2024
|
_this._columnDefsByName.set(columnDef.name, columnDef);
|
|
1974
2025
|
});
|
|
1975
2026
|
};
|
|
2027
|
+
/** Update the list of all available row definitions that can be used. */
|
|
1976
2028
|
/**
|
|
1977
2029
|
* Update the list of all available row definitions that can be used.
|
|
2030
|
+
* @private
|
|
1978
2031
|
* @return {?}
|
|
1979
2032
|
*/
|
|
1980
2033
|
CdkTable.prototype._cacheRowDefs = /**
|
|
1981
2034
|
* Update the list of all available row definitions that can be used.
|
|
2035
|
+
* @private
|
|
1982
2036
|
* @return {?}
|
|
1983
2037
|
*/
|
|
1984
2038
|
function () {
|
|
@@ -1988,6 +2042,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
1988
2042
|
mergeQueryListAndSet(this._contentFooterRowDefs, this._customFooterRowDefs);
|
|
1989
2043
|
this._rowDefs =
|
|
1990
2044
|
mergeQueryListAndSet(this._contentRowDefs, this._customRowDefs);
|
|
2045
|
+
// After all row definitions are determined, find the row definition to be considered default.
|
|
1991
2046
|
/** @type {?} */
|
|
1992
2047
|
var defaultRowDefs = this._rowDefs.filter(function (def) { return !def.when; });
|
|
1993
2048
|
if (!this.multiTemplateDataRows && defaultRowDefs.length > 1) {
|
|
@@ -1999,12 +2054,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
1999
2054
|
* Check if the header, data, or footer rows have changed what columns they want to display or
|
|
2000
2055
|
* whether the sticky states have changed for the header or footer. If there is a diff, then
|
|
2001
2056
|
* re-render that section.
|
|
2057
|
+
*/
|
|
2058
|
+
/**
|
|
2059
|
+
* Check if the header, data, or footer rows have changed what columns they want to display or
|
|
2060
|
+
* whether the sticky states have changed for the header or footer. If there is a diff, then
|
|
2061
|
+
* re-render that section.
|
|
2062
|
+
* @private
|
|
2002
2063
|
* @return {?}
|
|
2003
2064
|
*/
|
|
2004
2065
|
CdkTable.prototype._renderUpdatedColumns = /**
|
|
2005
2066
|
* Check if the header, data, or footer rows have changed what columns they want to display or
|
|
2006
2067
|
* whether the sticky states have changed for the header or footer. If there is a diff, then
|
|
2007
2068
|
* re-render that section.
|
|
2069
|
+
* @private
|
|
2008
2070
|
* @return {?}
|
|
2009
2071
|
*/
|
|
2010
2072
|
function () {
|
|
@@ -2026,6 +2088,12 @@ var CdkTable = /** @class */ (function () {
|
|
|
2026
2088
|
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
2027
2089
|
* render change subscription if one exists. If the data source is null, interpret this by
|
|
2028
2090
|
* clearing the row outlet. Otherwise start listening for new data.
|
|
2091
|
+
*/
|
|
2092
|
+
/**
|
|
2093
|
+
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
2094
|
+
* render change subscription if one exists. If the data source is null, interpret this by
|
|
2095
|
+
* clearing the row outlet. Otherwise start listening for new data.
|
|
2096
|
+
* @private
|
|
2029
2097
|
* @param {?} dataSource
|
|
2030
2098
|
* @return {?}
|
|
2031
2099
|
*/
|
|
@@ -2033,6 +2101,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2033
2101
|
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
2034
2102
|
* render change subscription if one exists. If the data source is null, interpret this by
|
|
2035
2103
|
* clearing the row outlet. Otherwise start listening for new data.
|
|
2104
|
+
* @private
|
|
2036
2105
|
* @param {?} dataSource
|
|
2037
2106
|
* @return {?}
|
|
2038
2107
|
*/
|
|
@@ -2054,12 +2123,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
2054
2123
|
}
|
|
2055
2124
|
this._dataSource = dataSource;
|
|
2056
2125
|
};
|
|
2126
|
+
/** Set up a subscription for the data provided by the data source. */
|
|
2057
2127
|
/**
|
|
2058
2128
|
* Set up a subscription for the data provided by the data source.
|
|
2129
|
+
* @private
|
|
2059
2130
|
* @return {?}
|
|
2060
2131
|
*/
|
|
2061
2132
|
CdkTable.prototype._observeRenderChanges = /**
|
|
2062
2133
|
* Set up a subscription for the data provided by the data source.
|
|
2134
|
+
* @private
|
|
2063
2135
|
* @return {?}
|
|
2064
2136
|
*/
|
|
2065
2137
|
function () {
|
|
@@ -2074,8 +2146,8 @@ var CdkTable = /** @class */ (function () {
|
|
|
2074
2146
|
// Cannot check this.dataSource['connect'] due to potential property renaming, nor can it
|
|
2075
2147
|
// checked as an instanceof DataSource<T> since the table should allow for data sources
|
|
2076
2148
|
// that did not explicitly extend DataSource<T>.
|
|
2077
|
-
if ((/** @type {?} */ (this.dataSource)).connect instanceof Function) {
|
|
2078
|
-
dataStream = (/** @type {?} */ (this.dataSource)).connect(this);
|
|
2149
|
+
if (((/** @type {?} */ (this.dataSource))).connect instanceof Function) {
|
|
2150
|
+
dataStream = ((/** @type {?} */ (this.dataSource))).connect(this);
|
|
2079
2151
|
}
|
|
2080
2152
|
else if (this.dataSource instanceof Observable) {
|
|
2081
2153
|
dataStream = this.dataSource;
|
|
@@ -2096,11 +2168,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2096
2168
|
/**
|
|
2097
2169
|
* Clears any existing content in the header row outlet and creates a new embedded view
|
|
2098
2170
|
* in the outlet using the header row definition.
|
|
2171
|
+
*/
|
|
2172
|
+
/**
|
|
2173
|
+
* Clears any existing content in the header row outlet and creates a new embedded view
|
|
2174
|
+
* in the outlet using the header row definition.
|
|
2175
|
+
* @private
|
|
2099
2176
|
* @return {?}
|
|
2100
2177
|
*/
|
|
2101
2178
|
CdkTable.prototype._forceRenderHeaderRows = /**
|
|
2102
2179
|
* Clears any existing content in the header row outlet and creates a new embedded view
|
|
2103
2180
|
* in the outlet using the header row definition.
|
|
2181
|
+
* @private
|
|
2104
2182
|
* @return {?}
|
|
2105
2183
|
*/
|
|
2106
2184
|
function () {
|
|
@@ -2116,11 +2194,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2116
2194
|
/**
|
|
2117
2195
|
* Clears any existing content in the footer row outlet and creates a new embedded view
|
|
2118
2196
|
* in the outlet using the footer row definition.
|
|
2197
|
+
*/
|
|
2198
|
+
/**
|
|
2199
|
+
* Clears any existing content in the footer row outlet and creates a new embedded view
|
|
2200
|
+
* in the outlet using the footer row definition.
|
|
2201
|
+
* @private
|
|
2119
2202
|
* @return {?}
|
|
2120
2203
|
*/
|
|
2121
2204
|
CdkTable.prototype._forceRenderFooterRows = /**
|
|
2122
2205
|
* Clears any existing content in the footer row outlet and creates a new embedded view
|
|
2123
2206
|
* in the outlet using the footer row definition.
|
|
2207
|
+
* @private
|
|
2124
2208
|
* @return {?}
|
|
2125
2209
|
*/
|
|
2126
2210
|
function () {
|
|
@@ -2133,14 +2217,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2133
2217
|
this.updateStickyFooterRowStyles();
|
|
2134
2218
|
this.updateStickyColumnStyles();
|
|
2135
2219
|
};
|
|
2220
|
+
/** Adds the sticky column styles for the rows according to the columns' stick states. */
|
|
2136
2221
|
/**
|
|
2137
2222
|
* Adds the sticky column styles for the rows according to the columns' stick states.
|
|
2223
|
+
* @private
|
|
2138
2224
|
* @param {?} rows
|
|
2139
2225
|
* @param {?} rowDef
|
|
2140
2226
|
* @return {?}
|
|
2141
2227
|
*/
|
|
2142
2228
|
CdkTable.prototype._addStickyColumnStyles = /**
|
|
2143
2229
|
* Adds the sticky column styles for the rows according to the columns' stick states.
|
|
2230
|
+
* @private
|
|
2144
2231
|
* @param {?} rows
|
|
2145
2232
|
* @param {?} rowDef
|
|
2146
2233
|
* @return {?}
|
|
@@ -2148,7 +2235,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2148
2235
|
function (rows, rowDef) {
|
|
2149
2236
|
var _this = this;
|
|
2150
2237
|
/** @type {?} */
|
|
2151
|
-
var columnDefs = Array.from(rowDef.columns || []).map(function (c) { return ((_this._columnDefsByName.get(c))); });
|
|
2238
|
+
var columnDefs = Array.from(rowDef.columns || []).map(function (c) { return (/** @type {?} */ (_this._columnDefsByName.get(c))); });
|
|
2152
2239
|
/** @type {?} */
|
|
2153
2240
|
var stickyStartStates = columnDefs.map(function (columnDef) { return columnDef.sticky; });
|
|
2154
2241
|
/** @type {?} */
|
|
@@ -2171,7 +2258,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2171
2258
|
var renderedRows = [];
|
|
2172
2259
|
for (var i = 0; i < rowOutlet.viewContainer.length; i++) {
|
|
2173
2260
|
/** @type {?} */
|
|
2174
|
-
var viewRef = (/** @type {?} */ (((rowOutlet.viewContainer.get(i)))));
|
|
2261
|
+
var viewRef = ((/** @type {?} */ ((/** @type {?} */ (rowOutlet.viewContainer.get(i))))));
|
|
2175
2262
|
renderedRows.push(viewRef.rootNodes[0]);
|
|
2176
2263
|
}
|
|
2177
2264
|
return renderedRows;
|
|
@@ -2224,6 +2311,11 @@ var CdkTable = /** @class */ (function () {
|
|
|
2224
2311
|
/**
|
|
2225
2312
|
* Create the embedded view for the data row template and place it in the correct index location
|
|
2226
2313
|
* within the data row view container.
|
|
2314
|
+
*/
|
|
2315
|
+
/**
|
|
2316
|
+
* Create the embedded view for the data row template and place it in the correct index location
|
|
2317
|
+
* within the data row view container.
|
|
2318
|
+
* @private
|
|
2227
2319
|
* @param {?} renderRow
|
|
2228
2320
|
* @param {?} renderIndex
|
|
2229
2321
|
* @return {?}
|
|
@@ -2231,6 +2323,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2231
2323
|
CdkTable.prototype._insertRow = /**
|
|
2232
2324
|
* Create the embedded view for the data row template and place it in the correct index location
|
|
2233
2325
|
* within the data row view container.
|
|
2326
|
+
* @private
|
|
2234
2327
|
* @param {?} renderRow
|
|
2235
2328
|
* @param {?} renderIndex
|
|
2236
2329
|
* @return {?}
|
|
@@ -2246,6 +2339,12 @@ var CdkTable = /** @class */ (function () {
|
|
|
2246
2339
|
* Creates a new row template in the outlet and fills it with the set of cell templates.
|
|
2247
2340
|
* Optionally takes a context to provide to the row and cells, as well as an optional index
|
|
2248
2341
|
* of where to place the new row template in the outlet.
|
|
2342
|
+
*/
|
|
2343
|
+
/**
|
|
2344
|
+
* Creates a new row template in the outlet and fills it with the set of cell templates.
|
|
2345
|
+
* Optionally takes a context to provide to the row and cells, as well as an optional index
|
|
2346
|
+
* of where to place the new row template in the outlet.
|
|
2347
|
+
* @private
|
|
2249
2348
|
* @param {?} outlet
|
|
2250
2349
|
* @param {?} rowDef
|
|
2251
2350
|
* @param {?} index
|
|
@@ -2256,6 +2355,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2256
2355
|
* Creates a new row template in the outlet and fills it with the set of cell templates.
|
|
2257
2356
|
* Optionally takes a context to provide to the row and cells, as well as an optional index
|
|
2258
2357
|
* of where to place the new row template in the outlet.
|
|
2358
|
+
* @private
|
|
2259
2359
|
* @param {?} outlet
|
|
2260
2360
|
* @param {?} rowDef
|
|
2261
2361
|
* @param {?} index
|
|
@@ -2277,11 +2377,17 @@ var CdkTable = /** @class */ (function () {
|
|
|
2277
2377
|
/**
|
|
2278
2378
|
* Updates the index-related context for each row to reflect any changes in the index of the rows,
|
|
2279
2379
|
* e.g. first/last/even/odd.
|
|
2380
|
+
*/
|
|
2381
|
+
/**
|
|
2382
|
+
* Updates the index-related context for each row to reflect any changes in the index of the rows,
|
|
2383
|
+
* e.g. first/last/even/odd.
|
|
2384
|
+
* @private
|
|
2280
2385
|
* @return {?}
|
|
2281
2386
|
*/
|
|
2282
2387
|
CdkTable.prototype._updateRowIndexContext = /**
|
|
2283
2388
|
* Updates the index-related context for each row to reflect any changes in the index of the rows,
|
|
2284
2389
|
* e.g. first/last/even/odd.
|
|
2390
|
+
* @private
|
|
2285
2391
|
* @return {?}
|
|
2286
2392
|
*/
|
|
2287
2393
|
function () {
|
|
@@ -2289,9 +2395,9 @@ var CdkTable = /** @class */ (function () {
|
|
|
2289
2395
|
var viewContainer = this._rowOutlet.viewContainer;
|
|
2290
2396
|
for (var renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {
|
|
2291
2397
|
/** @type {?} */
|
|
2292
|
-
var viewRef = /** @type {?} */ (viewContainer.get(renderIndex));
|
|
2398
|
+
var viewRef = (/** @type {?} */ (viewContainer.get(renderIndex)));
|
|
2293
2399
|
/** @type {?} */
|
|
2294
|
-
var context = /** @type {?} */ (viewRef.context);
|
|
2400
|
+
var context = (/** @type {?} */ (viewRef.context));
|
|
2295
2401
|
context.count = count;
|
|
2296
2402
|
context.first = renderIndex === 0;
|
|
2297
2403
|
context.last = renderIndex === count - 1;
|
|
@@ -2306,13 +2412,16 @@ var CdkTable = /** @class */ (function () {
|
|
|
2306
2412
|
}
|
|
2307
2413
|
}
|
|
2308
2414
|
};
|
|
2415
|
+
/** Gets the column definitions for the provided row def. */
|
|
2309
2416
|
/**
|
|
2310
2417
|
* Gets the column definitions for the provided row def.
|
|
2418
|
+
* @private
|
|
2311
2419
|
* @param {?} rowDef
|
|
2312
2420
|
* @return {?}
|
|
2313
2421
|
*/
|
|
2314
2422
|
CdkTable.prototype._getCellTemplates = /**
|
|
2315
2423
|
* Gets the column definitions for the provided row def.
|
|
2424
|
+
* @private
|
|
2316
2425
|
* @param {?} rowDef
|
|
2317
2426
|
* @return {?}
|
|
2318
2427
|
*/
|
|
@@ -2330,12 +2439,15 @@ var CdkTable = /** @class */ (function () {
|
|
|
2330
2439
|
return rowDef.extractCellTemplate(column);
|
|
2331
2440
|
});
|
|
2332
2441
|
};
|
|
2442
|
+
/** Adds native table sections (e.g. tbody) and moves the row outlets into them. */
|
|
2333
2443
|
/**
|
|
2334
2444
|
* Adds native table sections (e.g. tbody) and moves the row outlets into them.
|
|
2445
|
+
* @private
|
|
2335
2446
|
* @return {?}
|
|
2336
2447
|
*/
|
|
2337
2448
|
CdkTable.prototype._applyNativeTableSections = /**
|
|
2338
2449
|
* Adds native table sections (e.g. tbody) and moves the row outlets into them.
|
|
2450
|
+
* @private
|
|
2339
2451
|
* @return {?}
|
|
2340
2452
|
*/
|
|
2341
2453
|
function () {
|
|
@@ -2347,6 +2459,7 @@ var CdkTable = /** @class */ (function () {
|
|
|
2347
2459
|
];
|
|
2348
2460
|
for (var _a = 0, sections_1 = sections; _a < sections_1.length; _a++) {
|
|
2349
2461
|
var section = sections_1[_a];
|
|
2462
|
+
// @breaking-change 8.0.0 remove the `|| document` once the `_document` is a required param.
|
|
2350
2463
|
/** @type {?} */
|
|
2351
2464
|
var documentRef = this._document || document;
|
|
2352
2465
|
/** @type {?} */
|
|
@@ -2359,12 +2472,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
2359
2472
|
* Forces a re-render of the data rows. Should be called in cases where there has been an input
|
|
2360
2473
|
* change that affects the evaluation of which rows should be rendered, e.g. toggling
|
|
2361
2474
|
* `multiTemplateDataRows` or adding/removing row definitions.
|
|
2475
|
+
*/
|
|
2476
|
+
/**
|
|
2477
|
+
* Forces a re-render of the data rows. Should be called in cases where there has been an input
|
|
2478
|
+
* change that affects the evaluation of which rows should be rendered, e.g. toggling
|
|
2479
|
+
* `multiTemplateDataRows` or adding/removing row definitions.
|
|
2480
|
+
* @private
|
|
2362
2481
|
* @return {?}
|
|
2363
2482
|
*/
|
|
2364
2483
|
CdkTable.prototype._forceRenderDataRows = /**
|
|
2365
2484
|
* Forces a re-render of the data rows. Should be called in cases where there has been an input
|
|
2366
2485
|
* change that affects the evaluation of which rows should be rendered, e.g. toggling
|
|
2367
2486
|
* `multiTemplateDataRows` or adding/removing row definitions.
|
|
2487
|
+
* @private
|
|
2368
2488
|
* @return {?}
|
|
2369
2489
|
*/
|
|
2370
2490
|
function () {
|
|
@@ -2377,12 +2497,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
2377
2497
|
* Checks if there has been a change in sticky states since last check and applies the correct
|
|
2378
2498
|
* sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
|
2379
2499
|
* during a change detection and after the inputs are settled (after content check).
|
|
2500
|
+
*/
|
|
2501
|
+
/**
|
|
2502
|
+
* Checks if there has been a change in sticky states since last check and applies the correct
|
|
2503
|
+
* sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
|
2504
|
+
* during a change detection and after the inputs are settled (after content check).
|
|
2505
|
+
* @private
|
|
2380
2506
|
* @return {?}
|
|
2381
2507
|
*/
|
|
2382
2508
|
CdkTable.prototype._checkStickyStates = /**
|
|
2383
2509
|
* Checks if there has been a change in sticky states since last check and applies the correct
|
|
2384
2510
|
* sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
|
2385
2511
|
* during a change detection and after the inputs are settled (after content check).
|
|
2512
|
+
* @private
|
|
2386
2513
|
* @return {?}
|
|
2387
2514
|
*/
|
|
2388
2515
|
function () {
|
|
@@ -2407,12 +2534,19 @@ var CdkTable = /** @class */ (function () {
|
|
|
2407
2534
|
* Creates the sticky styler that will be used for sticky rows and columns. Listens
|
|
2408
2535
|
* for directionality changes and provides the latest direction to the styler. Re-applies column
|
|
2409
2536
|
* stickiness when directionality changes.
|
|
2537
|
+
*/
|
|
2538
|
+
/**
|
|
2539
|
+
* Creates the sticky styler that will be used for sticky rows and columns. Listens
|
|
2540
|
+
* for directionality changes and provides the latest direction to the styler. Re-applies column
|
|
2541
|
+
* stickiness when directionality changes.
|
|
2542
|
+
* @private
|
|
2410
2543
|
* @return {?}
|
|
2411
2544
|
*/
|
|
2412
2545
|
CdkTable.prototype._setupStickyStyler = /**
|
|
2413
2546
|
* Creates the sticky styler that will be used for sticky rows and columns. Listens
|
|
2414
2547
|
* for directionality changes and provides the latest direction to the styler. Re-applies column
|
|
2415
2548
|
* stickiness when directionality changes.
|
|
2549
|
+
* @private
|
|
2416
2550
|
* @return {?}
|
|
2417
2551
|
*/
|
|
2418
2552
|
function () {
|
|
@@ -2477,7 +2611,7 @@ function mergeQueryListAndSet(queryList, set) {
|
|
|
2477
2611
|
|
|
2478
2612
|
/**
|
|
2479
2613
|
* @fileoverview added by tsickle
|
|
2480
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2614
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2481
2615
|
*/
|
|
2482
2616
|
/** @type {?} */
|
|
2483
2617
|
var EXPORTED_DECLARATIONS = [
|
|
@@ -2515,12 +2649,12 @@ var CdkTableModule = /** @class */ (function () {
|
|
|
2515
2649
|
|
|
2516
2650
|
/**
|
|
2517
2651
|
* @fileoverview added by tsickle
|
|
2518
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2652
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2519
2653
|
*/
|
|
2520
2654
|
|
|
2521
2655
|
/**
|
|
2522
2656
|
* @fileoverview added by tsickle
|
|
2523
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2657
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2524
2658
|
*/
|
|
2525
2659
|
|
|
2526
2660
|
export { DataRowOutlet, HeaderRowOutlet, FooterRowOutlet, CDK_TABLE_TEMPLATE, CdkTable, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDefBase, _CdkColumnDefBase, CdkColumnDef, BaseCdkCell, CdkHeaderCell, CdkFooterCell, CdkCell, CDK_ROW_TEMPLATE, BaseRowDef, CdkHeaderRowDefBase, _CdkHeaderRowDefBase, CdkHeaderRowDef, CdkFooterRowDefBase, _CdkFooterRowDefBase, CdkFooterRowDef, CdkRowDef, CdkCellOutlet, CdkHeaderRow, CdkFooterRow, CdkRow, CdkTableModule, STICKY_DIRECTIONS, StickyStyler, mixinHasStickyInput };
|