@angular/cdk 7.1.0 → 7.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/bundles/cdk-a11y.umd.js +428 -197
- 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 +2297 -973
- 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 +12 -2
- package/bundles/cdk-keycodes.umd.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 +27 -8
- 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 +586 -240
- 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 +17 -10
- 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 +148 -50
- 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 +69 -27
- 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 +189 -51
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +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} +6 -2
- 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 +110 -0
- package/{typings/esm5/drag-drop → drag-drop/typings/directives}/drop-list-group.d.ts +3 -0
- package/drag-drop/typings/{drop-list.d.ts → directives/drop-list.d.ts} +32 -72
- 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 -83
- package/drag-drop/typings/drop-list-container.d.ts +19 -3
- package/drag-drop/typings/drop-list-ref.d.ts +234 -0
- 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 +306 -182
- 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 +1774 -864
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +14 -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 +16 -11
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +373 -213
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +53 -31
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +14 -10
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +111 -51
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +56 -30
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +96 -48
- 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 +432 -201
- 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 +2358 -1035
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +14 -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 +30 -11
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +590 -244
- 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 +19 -12
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +150 -52
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +71 -30
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +191 -53
- 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/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/overlay-directives.d.ts +0 -2
- package/overlay/typings/overlay-ref.d.ts +1 -1
- package/package.json +4 -4
- package/portal/typings/portal.d.ts +1 -1
- package/schematics/migration.json +5 -0
- package/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +5 -0
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/target-version.d.ts +7 -1
- package/schematics/ng-update/target-version.js +10 -0
- package/schematics/ng-update/target-version.js.map +1 -1
- 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/stepper.d.ts +13 -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/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/drag-drop/{drag-handle.d.ts → directives/drag-handle.d.ts} +6 -2
- 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 +110 -0
- package/typings/drag-drop/{drop-list-group.d.ts → directives/drop-list-group.d.ts} +3 -0
- package/typings/{esm5/drag-drop → drag-drop/directives}/drop-list.d.ts +32 -72
- 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 -83
- package/typings/drag-drop/drop-list-container.d.ts +19 -3
- package/typings/drag-drop/drop-list-ref.d.ts +234 -0
- 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/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/esm5/drag-drop/{drag-handle.d.ts → directives/drag-handle.d.ts} +6 -2
- 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 +110 -0
- package/{drag-drop/typings → typings/esm5/drag-drop/directives}/drop-list-group.d.ts +3 -0
- package/typings/{drag-drop → esm5/drag-drop/directives}/drop-list.d.ts +32 -72
- 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 -83
- package/typings/esm5/drag-drop/drop-list-container.d.ts +19 -3
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +234 -0
- 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/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/overlay-directives.d.ts +0 -2
- package/typings/esm5/overlay/overlay-ref.d.ts +1 -1
- package/typings/esm5/portal/portal.d.ts +1 -1
- package/typings/esm5/scrolling/index.metadata.json +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/stepper.d.ts +13 -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/overlay/index.metadata.json +1 -1
- package/typings/overlay/overlay-directives.d.ts +0 -2
- package/typings/overlay/overlay-ref.d.ts +1 -1
- package/typings/portal/portal.d.ts +1 -1
- package/typings/schematics/ng-update/index.d.ts +2 -0
- package/typings/schematics/ng-update/target-version.d.ts +7 -1
- 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/stepper.d.ts +13 -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/esm2015/table.js
CHANGED
|
@@ -17,7 +17,7 @@ import { Platform } from '@angular/cdk/platform';
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @fileoverview added by tsickle
|
|
20
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
20
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
23
|
* Mixin to provide a directive with a function that checks if the sticky input has been
|
|
@@ -78,7 +78,7 @@ function mixinHasStickyInput(base) {
|
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* @fileoverview added by tsickle
|
|
81
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
81
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
82
82
|
*/
|
|
83
83
|
/**
|
|
84
84
|
* Cell definition for a CDK table.
|
|
@@ -88,7 +88,7 @@ class CdkCellDef {
|
|
|
88
88
|
/**
|
|
89
89
|
* @param {?} template
|
|
90
90
|
*/
|
|
91
|
-
constructor(template) {
|
|
91
|
+
constructor(/** @docs-private */ template) {
|
|
92
92
|
this.template = template;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -107,7 +107,7 @@ class CdkHeaderCellDef {
|
|
|
107
107
|
/**
|
|
108
108
|
* @param {?} template
|
|
109
109
|
*/
|
|
110
|
-
constructor(template) {
|
|
110
|
+
constructor(/** @docs-private */ template) {
|
|
111
111
|
this.template = template;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -126,7 +126,7 @@ class CdkFooterCellDef {
|
|
|
126
126
|
/**
|
|
127
127
|
* @param {?} template
|
|
128
128
|
*/
|
|
129
|
-
constructor(template) {
|
|
129
|
+
constructor(/** @docs-private */ template) {
|
|
130
130
|
this.template = template;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
@@ -137,6 +137,7 @@ CdkFooterCellDef.decorators = [
|
|
|
137
137
|
CdkFooterCellDef.ctorParameters = () => [
|
|
138
138
|
{ type: TemplateRef }
|
|
139
139
|
];
|
|
140
|
+
// Boilerplate for applying mixins to CdkColumnDef.
|
|
140
141
|
/**
|
|
141
142
|
* \@docs-private
|
|
142
143
|
*/
|
|
@@ -301,12 +302,13 @@ CdkCell.ctorParameters = () => [
|
|
|
301
302
|
|
|
302
303
|
/**
|
|
303
304
|
* @fileoverview added by tsickle
|
|
304
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
305
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
305
306
|
*/
|
|
306
|
-
/**
|
|
307
|
+
/**
|
|
307
308
|
* The row template that can be used by the mat-table. Should not be used outside of the
|
|
308
309
|
* material library.
|
|
309
|
-
|
|
310
|
+
* @type {?}
|
|
311
|
+
*/
|
|
310
312
|
const CDK_ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;
|
|
311
313
|
/**
|
|
312
314
|
* Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
|
|
@@ -318,7 +320,7 @@ class BaseRowDef {
|
|
|
318
320
|
* @param {?} template
|
|
319
321
|
* @param {?} _differs
|
|
320
322
|
*/
|
|
321
|
-
constructor(template, _differs) {
|
|
323
|
+
constructor(/** @docs-private */ template, _differs) {
|
|
322
324
|
this.template = template;
|
|
323
325
|
this._differs = _differs;
|
|
324
326
|
}
|
|
@@ -361,6 +363,7 @@ class BaseRowDef {
|
|
|
361
363
|
}
|
|
362
364
|
}
|
|
363
365
|
}
|
|
366
|
+
// Boilerplate for applying mixins to CdkHeaderRowDef.
|
|
364
367
|
/**
|
|
365
368
|
* \@docs-private
|
|
366
369
|
*/
|
|
@@ -380,6 +383,8 @@ class CdkHeaderRowDef extends _CdkHeaderRowDefBase {
|
|
|
380
383
|
constructor(template, _differs) {
|
|
381
384
|
super(template, _differs);
|
|
382
385
|
}
|
|
386
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
387
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
383
388
|
/**
|
|
384
389
|
* @param {?} changes
|
|
385
390
|
* @return {?}
|
|
@@ -399,6 +404,7 @@ CdkHeaderRowDef.ctorParameters = () => [
|
|
|
399
404
|
{ type: TemplateRef },
|
|
400
405
|
{ type: IterableDiffers }
|
|
401
406
|
];
|
|
407
|
+
// Boilerplate for applying mixins to CdkFooterRowDef.
|
|
402
408
|
/**
|
|
403
409
|
* \@docs-private
|
|
404
410
|
*/
|
|
@@ -418,6 +424,8 @@ class CdkFooterRowDef extends _CdkFooterRowDefBase {
|
|
|
418
424
|
constructor(template, _differs) {
|
|
419
425
|
super(template, _differs);
|
|
420
426
|
}
|
|
427
|
+
// Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
|
|
428
|
+
// Explicitly define it so that the method is called as part of the Angular lifecycle.
|
|
421
429
|
/**
|
|
422
430
|
* @param {?} changes
|
|
423
431
|
* @return {?}
|
|
@@ -444,6 +452,8 @@ CdkFooterRowDef.ctorParameters = () => [
|
|
|
444
452
|
* @template T
|
|
445
453
|
*/
|
|
446
454
|
class CdkRowDef extends BaseRowDef {
|
|
455
|
+
// TODO(andrewseguin): Add an input for providing a switch function to determine
|
|
456
|
+
// if this template should be used.
|
|
447
457
|
/**
|
|
448
458
|
* @param {?} template
|
|
449
459
|
* @param {?} _differs
|
|
@@ -552,7 +562,7 @@ CdkRow.decorators = [
|
|
|
552
562
|
|
|
553
563
|
/**
|
|
554
564
|
* @fileoverview added by tsickle
|
|
555
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
565
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
556
566
|
*/
|
|
557
567
|
|
|
558
568
|
/**
|
|
@@ -611,12 +621,14 @@ function getTableUnknownDataSourceError() {
|
|
|
611
621
|
|
|
612
622
|
/**
|
|
613
623
|
* @fileoverview added by tsickle
|
|
614
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
624
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
615
625
|
*/
|
|
616
|
-
|
|
626
|
+
|
|
627
|
+
/**
|
|
617
628
|
* List of all possible directions that can be used for sticky positioning.
|
|
618
629
|
* \@docs-private
|
|
619
|
-
|
|
630
|
+
* @type {?}
|
|
631
|
+
*/
|
|
620
632
|
const STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];
|
|
621
633
|
/**
|
|
622
634
|
* Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.
|
|
@@ -655,7 +667,7 @@ class StickyStyler {
|
|
|
655
667
|
this._removeStickyStyle(row, stickyDirections);
|
|
656
668
|
for (let i = 0; i < row.children.length; i++) {
|
|
657
669
|
/** @type {?} */
|
|
658
|
-
const cell = /** @type {?} */ (row.children[i]);
|
|
670
|
+
const cell = (/** @type {?} */ (row.children[i]));
|
|
659
671
|
this._removeStickyStyle(cell, stickyDirections);
|
|
660
672
|
}
|
|
661
673
|
}
|
|
@@ -691,7 +703,7 @@ class StickyStyler {
|
|
|
691
703
|
for (const row of rows) {
|
|
692
704
|
for (let i = 0; i < numCells; i++) {
|
|
693
705
|
/** @type {?} */
|
|
694
|
-
const cell = /** @type {?} */ (row.children[i]);
|
|
706
|
+
const cell = (/** @type {?} */ (row.children[i]));
|
|
695
707
|
if (stickyStartStates[i]) {
|
|
696
708
|
this._addStickyStyle(cell, isRtl ? 'right' : 'left', startPositions[i]);
|
|
697
709
|
}
|
|
@@ -718,6 +730,8 @@ class StickyStyler {
|
|
|
718
730
|
if (!this._isBrowser) {
|
|
719
731
|
return;
|
|
720
732
|
}
|
|
733
|
+
// If positioning the rows to the bottom, reverse their order when evaluating the sticky
|
|
734
|
+
// position such that the last row stuck will be "bottom: 0px" and so on.
|
|
721
735
|
/** @type {?} */
|
|
722
736
|
const rows = position === 'bottom' ? rowsToStick.reverse() : rowsToStick;
|
|
723
737
|
/** @type {?} */
|
|
@@ -731,7 +745,7 @@ class StickyStyler {
|
|
|
731
745
|
if (this.isNativeHtmlTable) {
|
|
732
746
|
for (let j = 0; j < row.children.length; j++) {
|
|
733
747
|
/** @type {?} */
|
|
734
|
-
const cell = /** @type {?} */ (row.children[j]);
|
|
748
|
+
const cell = (/** @type {?} */ (row.children[j]));
|
|
735
749
|
this._addStickyStyle(cell, position, stickyHeight);
|
|
736
750
|
}
|
|
737
751
|
}
|
|
@@ -761,7 +775,7 @@ class StickyStyler {
|
|
|
761
775
|
return;
|
|
762
776
|
}
|
|
763
777
|
/** @type {?} */
|
|
764
|
-
const tfoot = /** @type {?} */ (
|
|
778
|
+
const tfoot = (/** @type {?} */ (tableElement.querySelector('tfoot')));
|
|
765
779
|
if (stickyStates.some(state => !state)) {
|
|
766
780
|
this._removeStickyStyle(tfoot, ['bottom']);
|
|
767
781
|
}
|
|
@@ -782,6 +796,8 @@ class StickyStyler {
|
|
|
782
796
|
element.style[dir] = '';
|
|
783
797
|
}
|
|
784
798
|
element.style.zIndex = this._getCalculatedZIndex(element);
|
|
799
|
+
// If the element no longer has any more sticky directions, remove sticky positioning and
|
|
800
|
+
// the sticky CSS class.
|
|
785
801
|
/** @type {?} */
|
|
786
802
|
const hasDirection = STICKY_DIRECTIONS.some(dir => !!element.style[dir]);
|
|
787
803
|
if (!hasDirection) {
|
|
@@ -846,7 +862,7 @@ class StickyStyler {
|
|
|
846
862
|
const firstRowCells = row.children;
|
|
847
863
|
for (let i = 0; i < firstRowCells.length; i++) {
|
|
848
864
|
/** @type {?} */
|
|
849
|
-
let cell = /** @type {?} */ (firstRowCells[i]);
|
|
865
|
+
let cell = (/** @type {?} */ (firstRowCells[i]));
|
|
850
866
|
cellWidths.push(cell.getBoundingClientRect().width);
|
|
851
867
|
}
|
|
852
868
|
return cellWidths;
|
|
@@ -897,7 +913,7 @@ class StickyStyler {
|
|
|
897
913
|
|
|
898
914
|
/**
|
|
899
915
|
* @fileoverview added by tsickle
|
|
900
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
916
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
901
917
|
*/
|
|
902
918
|
/**
|
|
903
919
|
* Provides a handle for the table to grab the view container's ng-container to insert data rows.
|
|
@@ -965,11 +981,12 @@ FooterRowOutlet.ctorParameters = () => [
|
|
|
965
981
|
{ type: ViewContainerRef },
|
|
966
982
|
{ type: ElementRef }
|
|
967
983
|
];
|
|
968
|
-
/**
|
|
984
|
+
/**
|
|
969
985
|
* The table template that can be used by the mat-table. Should not be used outside of the
|
|
970
986
|
* material library.
|
|
971
987
|
* \@docs-private
|
|
972
|
-
|
|
988
|
+
* @type {?}
|
|
989
|
+
*/
|
|
973
990
|
const CDK_TABLE_TEMPLATE = `
|
|
974
991
|
<ng-container headerRowOutlet></ng-container>
|
|
975
992
|
<ng-container rowOutlet></ng-container>
|
|
@@ -991,11 +1008,12 @@ class CdkTable {
|
|
|
991
1008
|
* @param {?=} _document
|
|
992
1009
|
* @param {?=} _platform
|
|
993
1010
|
*/
|
|
994
|
-
constructor(_differs, _changeDetectorRef, _elementRef, role, _dir,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1011
|
+
constructor(_differs, _changeDetectorRef, _elementRef, role, _dir,
|
|
1012
|
+
/**
|
|
1013
|
+
* @deprecated
|
|
1014
|
+
* @breaking-change 8.0.0 `_document` and `_platform` to
|
|
1015
|
+
* be made into a required parameters.
|
|
1016
|
+
*/
|
|
999
1017
|
_document, _platform) {
|
|
1000
1018
|
this._differs = _differs;
|
|
1001
1019
|
this._changeDetectorRef = _changeDetectorRef;
|
|
@@ -1066,6 +1084,8 @@ class CdkTable {
|
|
|
1066
1084
|
*/
|
|
1067
1085
|
this.stickyCssClass = 'cdk-table-sticky';
|
|
1068
1086
|
this._multiTemplateDataRows = false;
|
|
1087
|
+
// TODO(andrewseguin): Remove max value as the end index
|
|
1088
|
+
// and instead calculate the view on init and scroll.
|
|
1069
1089
|
/**
|
|
1070
1090
|
* Stream containing the latest information on what rows are being displayed on screen.
|
|
1071
1091
|
* Can be used by the data source to as a heuristic of what data should be provided.
|
|
@@ -1091,7 +1111,8 @@ class CdkTable {
|
|
|
1091
1111
|
*/
|
|
1092
1112
|
set trackBy(fn) {
|
|
1093
1113
|
if (isDevMode() &&
|
|
1094
|
-
fn != null && typeof fn !== 'function' &&
|
|
1114
|
+
fn != null && typeof fn !== 'function' &&
|
|
1115
|
+
(/** @type {?} */ (console)) && (/** @type {?} */ (console.warn))) {
|
|
1095
1116
|
console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);
|
|
1096
1117
|
}
|
|
1097
1118
|
this._trackByFn = fn;
|
|
@@ -1226,15 +1247,15 @@ class CdkTable {
|
|
|
1226
1247
|
const viewContainer = this._rowOutlet.viewContainer;
|
|
1227
1248
|
changes.forEachOperation((record, prevIndex, currentIndex) => {
|
|
1228
1249
|
if (record.previousIndex == null) {
|
|
1229
|
-
this._insertRow(record.item, /** @type {?} */ (
|
|
1250
|
+
this._insertRow(record.item, (/** @type {?} */ (currentIndex)));
|
|
1230
1251
|
}
|
|
1231
1252
|
else if (currentIndex == null) {
|
|
1232
|
-
viewContainer.remove(/** @type {?} */ (
|
|
1253
|
+
viewContainer.remove((/** @type {?} */ (prevIndex)));
|
|
1233
1254
|
}
|
|
1234
1255
|
else {
|
|
1235
1256
|
/** @type {?} */
|
|
1236
|
-
const view = /** @type {?} */ (viewContainer.get(/** @type {?} */ (
|
|
1237
|
-
viewContainer.move(/** @type {?} */ (
|
|
1257
|
+
const view = (/** @type {?} */ (viewContainer.get((/** @type {?} */ (prevIndex)))));
|
|
1258
|
+
viewContainer.move((/** @type {?} */ (view)), currentIndex);
|
|
1238
1259
|
}
|
|
1239
1260
|
});
|
|
1240
1261
|
// Update the meta context of a row's context data (index, count, first, last, ...)
|
|
@@ -1243,7 +1264,7 @@ class CdkTable {
|
|
|
1243
1264
|
// e.g. if trackBy matched data on some property but the actual data reference changed.
|
|
1244
1265
|
changes.forEachIdentityChange((record) => {
|
|
1245
1266
|
/** @type {?} */
|
|
1246
|
-
const rowView = /** @type {?} */ (viewContainer.get(/** @type {?} */ (
|
|
1267
|
+
const rowView = (/** @type {?} */ (viewContainer.get((/** @type {?} */ (record.currentIndex)))));
|
|
1247
1268
|
rowView.context.$implicit = record.item.data;
|
|
1248
1269
|
});
|
|
1249
1270
|
this.updateStickyColumnStyles();
|
|
@@ -1405,6 +1426,7 @@ class CdkTable {
|
|
|
1405
1426
|
});
|
|
1406
1427
|
// Update the sticky styles for each data row depending on its def's sticky state
|
|
1407
1428
|
this._rowDefs.forEach(rowDef => {
|
|
1429
|
+
// Collect all the rows rendered with this row definition.
|
|
1408
1430
|
/** @type {?} */
|
|
1409
1431
|
const rows = [];
|
|
1410
1432
|
for (let i = 0; i < dataRows.length; i++) {
|
|
@@ -1425,11 +1447,14 @@ class CdkTable {
|
|
|
1425
1447
|
* Get the list of RenderRow objects to render according to the current list of data and defined
|
|
1426
1448
|
* row definitions. If the previous list already contained a particular pair, it should be reused
|
|
1427
1449
|
* so that the differ equates their references.
|
|
1450
|
+
* @private
|
|
1428
1451
|
* @return {?}
|
|
1429
1452
|
*/
|
|
1430
1453
|
_getAllRenderRows() {
|
|
1431
1454
|
/** @type {?} */
|
|
1432
1455
|
const renderRows = [];
|
|
1456
|
+
// Store the cache and create a new one. Any re-used RenderRow objects will be moved into the
|
|
1457
|
+
// new cache while unused ones can be picked up by garbage collection.
|
|
1433
1458
|
/** @type {?} */
|
|
1434
1459
|
const prevCachedRenderRows = this._cachedRenderRowsMap;
|
|
1435
1460
|
this._cachedRenderRowsMap = new Map();
|
|
@@ -1447,9 +1472,9 @@ class CdkTable {
|
|
|
1447
1472
|
/** @type {?} */
|
|
1448
1473
|
let renderRow = renderRowsForData[j];
|
|
1449
1474
|
/** @type {?} */
|
|
1450
|
-
const cache = /** @type {?} */ (
|
|
1475
|
+
const cache = (/** @type {?} */ (this._cachedRenderRowsMap.get(renderRow.data)));
|
|
1451
1476
|
if (cache.has(renderRow.rowDef)) {
|
|
1452
|
-
/** @type {?} */ (
|
|
1477
|
+
(/** @type {?} */ (cache.get(renderRow.rowDef))).push(renderRow);
|
|
1453
1478
|
}
|
|
1454
1479
|
else {
|
|
1455
1480
|
cache.set(renderRow.rowDef, [renderRow]);
|
|
@@ -1463,6 +1488,7 @@ class CdkTable {
|
|
|
1463
1488
|
* Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that
|
|
1464
1489
|
* should be rendered for this data. Reuses the cached RenderRow objects if they match the same
|
|
1465
1490
|
* `(T, CdkRowDef)` pair.
|
|
1491
|
+
* @private
|
|
1466
1492
|
* @param {?} data
|
|
1467
1493
|
* @param {?} dataIndex
|
|
1468
1494
|
* @param {?=} cache
|
|
@@ -1473,10 +1499,10 @@ class CdkTable {
|
|
|
1473
1499
|
const rowDefs = this._getRowDefs(data, dataIndex);
|
|
1474
1500
|
return rowDefs.map(rowDef => {
|
|
1475
1501
|
/** @type {?} */
|
|
1476
|
-
const cachedRenderRows = (cache && cache.has(rowDef)) ? /** @type {?} */ (
|
|
1502
|
+
const cachedRenderRows = (cache && cache.has(rowDef)) ? (/** @type {?} */ (cache.get(rowDef))) : [];
|
|
1477
1503
|
if (cachedRenderRows.length) {
|
|
1478
1504
|
/** @type {?} */
|
|
1479
|
-
const dataRow = /** @type {?} */ (
|
|
1505
|
+
const dataRow = (/** @type {?} */ (cachedRenderRows.shift()));
|
|
1480
1506
|
dataRow.dataIndex = dataIndex;
|
|
1481
1507
|
return dataRow;
|
|
1482
1508
|
}
|
|
@@ -1487,6 +1513,7 @@ class CdkTable {
|
|
|
1487
1513
|
}
|
|
1488
1514
|
/**
|
|
1489
1515
|
* Update the map containing the content's column definitions.
|
|
1516
|
+
* @private
|
|
1490
1517
|
* @return {?}
|
|
1491
1518
|
*/
|
|
1492
1519
|
_cacheColumnDefs() {
|
|
@@ -1502,6 +1529,7 @@ class CdkTable {
|
|
|
1502
1529
|
}
|
|
1503
1530
|
/**
|
|
1504
1531
|
* Update the list of all available row definitions that can be used.
|
|
1532
|
+
* @private
|
|
1505
1533
|
* @return {?}
|
|
1506
1534
|
*/
|
|
1507
1535
|
_cacheRowDefs() {
|
|
@@ -1511,6 +1539,7 @@ class CdkTable {
|
|
|
1511
1539
|
mergeQueryListAndSet(this._contentFooterRowDefs, this._customFooterRowDefs);
|
|
1512
1540
|
this._rowDefs =
|
|
1513
1541
|
mergeQueryListAndSet(this._contentRowDefs, this._customRowDefs);
|
|
1542
|
+
// After all row definitions are determined, find the row definition to be considered default.
|
|
1514
1543
|
/** @type {?} */
|
|
1515
1544
|
const defaultRowDefs = this._rowDefs.filter(def => !def.when);
|
|
1516
1545
|
if (!this.multiTemplateDataRows && defaultRowDefs.length > 1) {
|
|
@@ -1522,6 +1551,7 @@ class CdkTable {
|
|
|
1522
1551
|
* Check if the header, data, or footer rows have changed what columns they want to display or
|
|
1523
1552
|
* whether the sticky states have changed for the header or footer. If there is a diff, then
|
|
1524
1553
|
* re-render that section.
|
|
1554
|
+
* @private
|
|
1525
1555
|
* @return {?}
|
|
1526
1556
|
*/
|
|
1527
1557
|
_renderUpdatedColumns() {
|
|
@@ -1543,6 +1573,7 @@ class CdkTable {
|
|
|
1543
1573
|
* Switch to the provided data source by resetting the data and unsubscribing from the current
|
|
1544
1574
|
* render change subscription if one exists. If the data source is null, interpret this by
|
|
1545
1575
|
* clearing the row outlet. Otherwise start listening for new data.
|
|
1576
|
+
* @private
|
|
1546
1577
|
* @param {?} dataSource
|
|
1547
1578
|
* @return {?}
|
|
1548
1579
|
*/
|
|
@@ -1566,6 +1597,7 @@ class CdkTable {
|
|
|
1566
1597
|
}
|
|
1567
1598
|
/**
|
|
1568
1599
|
* Set up a subscription for the data provided by the data source.
|
|
1600
|
+
* @private
|
|
1569
1601
|
* @return {?}
|
|
1570
1602
|
*/
|
|
1571
1603
|
_observeRenderChanges() {
|
|
@@ -1579,8 +1611,8 @@ class CdkTable {
|
|
|
1579
1611
|
// Cannot check this.dataSource['connect'] due to potential property renaming, nor can it
|
|
1580
1612
|
// checked as an instanceof DataSource<T> since the table should allow for data sources
|
|
1581
1613
|
// that did not explicitly extend DataSource<T>.
|
|
1582
|
-
if ((/** @type {?} */ (this.dataSource)).connect instanceof Function) {
|
|
1583
|
-
dataStream = (/** @type {?} */ (this.dataSource)).connect(this);
|
|
1614
|
+
if (((/** @type {?} */ (this.dataSource))).connect instanceof Function) {
|
|
1615
|
+
dataStream = ((/** @type {?} */ (this.dataSource))).connect(this);
|
|
1584
1616
|
}
|
|
1585
1617
|
else if (this.dataSource instanceof Observable) {
|
|
1586
1618
|
dataStream = this.dataSource;
|
|
@@ -1601,6 +1633,7 @@ class CdkTable {
|
|
|
1601
1633
|
/**
|
|
1602
1634
|
* Clears any existing content in the header row outlet and creates a new embedded view
|
|
1603
1635
|
* in the outlet using the header row definition.
|
|
1636
|
+
* @private
|
|
1604
1637
|
* @return {?}
|
|
1605
1638
|
*/
|
|
1606
1639
|
_forceRenderHeaderRows() {
|
|
@@ -1615,6 +1648,7 @@ class CdkTable {
|
|
|
1615
1648
|
/**
|
|
1616
1649
|
* Clears any existing content in the footer row outlet and creates a new embedded view
|
|
1617
1650
|
* in the outlet using the footer row definition.
|
|
1651
|
+
* @private
|
|
1618
1652
|
* @return {?}
|
|
1619
1653
|
*/
|
|
1620
1654
|
_forceRenderFooterRows() {
|
|
@@ -1628,13 +1662,14 @@ class CdkTable {
|
|
|
1628
1662
|
}
|
|
1629
1663
|
/**
|
|
1630
1664
|
* Adds the sticky column styles for the rows according to the columns' stick states.
|
|
1665
|
+
* @private
|
|
1631
1666
|
* @param {?} rows
|
|
1632
1667
|
* @param {?} rowDef
|
|
1633
1668
|
* @return {?}
|
|
1634
1669
|
*/
|
|
1635
1670
|
_addStickyColumnStyles(rows, rowDef) {
|
|
1636
1671
|
/** @type {?} */
|
|
1637
|
-
const columnDefs = Array.from(rowDef.columns || []).map(c => /** @type {?} */ (
|
|
1672
|
+
const columnDefs = Array.from(rowDef.columns || []).map(c => (/** @type {?} */ (this._columnDefsByName.get(c))));
|
|
1638
1673
|
/** @type {?} */
|
|
1639
1674
|
const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);
|
|
1640
1675
|
/** @type {?} */
|
|
@@ -1651,7 +1686,7 @@ class CdkTable {
|
|
|
1651
1686
|
const renderedRows = [];
|
|
1652
1687
|
for (let i = 0; i < rowOutlet.viewContainer.length; i++) {
|
|
1653
1688
|
/** @type {?} */
|
|
1654
|
-
const viewRef = (/** @type {?} */ (((rowOutlet.viewContainer.get(i)))));
|
|
1689
|
+
const viewRef = ((/** @type {?} */ ((/** @type {?} */ (rowOutlet.viewContainer.get(i))))));
|
|
1655
1690
|
renderedRows.push(viewRef.rootNodes[0]);
|
|
1656
1691
|
}
|
|
1657
1692
|
return renderedRows;
|
|
@@ -1689,6 +1724,7 @@ class CdkTable {
|
|
|
1689
1724
|
/**
|
|
1690
1725
|
* Create the embedded view for the data row template and place it in the correct index location
|
|
1691
1726
|
* within the data row view container.
|
|
1727
|
+
* @private
|
|
1692
1728
|
* @param {?} renderRow
|
|
1693
1729
|
* @param {?} renderIndex
|
|
1694
1730
|
* @return {?}
|
|
@@ -1704,6 +1740,7 @@ class CdkTable {
|
|
|
1704
1740
|
* Creates a new row template in the outlet and fills it with the set of cell templates.
|
|
1705
1741
|
* Optionally takes a context to provide to the row and cells, as well as an optional index
|
|
1706
1742
|
* of where to place the new row template in the outlet.
|
|
1743
|
+
* @private
|
|
1707
1744
|
* @param {?} outlet
|
|
1708
1745
|
* @param {?} rowDef
|
|
1709
1746
|
* @param {?} index
|
|
@@ -1723,6 +1760,7 @@ class CdkTable {
|
|
|
1723
1760
|
/**
|
|
1724
1761
|
* Updates the index-related context for each row to reflect any changes in the index of the rows,
|
|
1725
1762
|
* e.g. first/last/even/odd.
|
|
1763
|
+
* @private
|
|
1726
1764
|
* @return {?}
|
|
1727
1765
|
*/
|
|
1728
1766
|
_updateRowIndexContext() {
|
|
@@ -1730,9 +1768,9 @@ class CdkTable {
|
|
|
1730
1768
|
const viewContainer = this._rowOutlet.viewContainer;
|
|
1731
1769
|
for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {
|
|
1732
1770
|
/** @type {?} */
|
|
1733
|
-
const viewRef = /** @type {?} */ (viewContainer.get(renderIndex));
|
|
1771
|
+
const viewRef = (/** @type {?} */ (viewContainer.get(renderIndex)));
|
|
1734
1772
|
/** @type {?} */
|
|
1735
|
-
const context = /** @type {?} */ (viewRef.context);
|
|
1773
|
+
const context = (/** @type {?} */ (viewRef.context));
|
|
1736
1774
|
context.count = count;
|
|
1737
1775
|
context.first = renderIndex === 0;
|
|
1738
1776
|
context.last = renderIndex === count - 1;
|
|
@@ -1749,6 +1787,7 @@ class CdkTable {
|
|
|
1749
1787
|
}
|
|
1750
1788
|
/**
|
|
1751
1789
|
* Gets the column definitions for the provided row def.
|
|
1790
|
+
* @private
|
|
1752
1791
|
* @param {?} rowDef
|
|
1753
1792
|
* @return {?}
|
|
1754
1793
|
*/
|
|
@@ -1767,9 +1806,15 @@ class CdkTable {
|
|
|
1767
1806
|
}
|
|
1768
1807
|
/**
|
|
1769
1808
|
* Adds native table sections (e.g. tbody) and moves the row outlets into them.
|
|
1809
|
+
* @private
|
|
1770
1810
|
* @return {?}
|
|
1771
1811
|
*/
|
|
1772
1812
|
_applyNativeTableSections() {
|
|
1813
|
+
// @breaking-change 8.0.0 remove the `|| document` once the `_document` is a required param.
|
|
1814
|
+
/** @type {?} */
|
|
1815
|
+
const documentRef = this._document || document;
|
|
1816
|
+
/** @type {?} */
|
|
1817
|
+
const documentFragment = documentRef.createDocumentFragment();
|
|
1773
1818
|
/** @type {?} */
|
|
1774
1819
|
const sections = [
|
|
1775
1820
|
{ tag: 'thead', outlet: this._headerRowOutlet },
|
|
@@ -1777,18 +1822,19 @@ class CdkTable {
|
|
|
1777
1822
|
{ tag: 'tfoot', outlet: this._footerRowOutlet },
|
|
1778
1823
|
];
|
|
1779
1824
|
for (const section of sections) {
|
|
1780
|
-
/** @type {?} */
|
|
1781
|
-
const documentRef = this._document || document;
|
|
1782
1825
|
/** @type {?} */
|
|
1783
1826
|
const element = documentRef.createElement(section.tag);
|
|
1784
1827
|
element.appendChild(section.outlet.elementRef.nativeElement);
|
|
1785
|
-
|
|
1828
|
+
documentFragment.appendChild(element);
|
|
1786
1829
|
}
|
|
1830
|
+
// Use a DocumentFragment so we don't hit the DOM on each iteration.
|
|
1831
|
+
this._elementRef.nativeElement.appendChild(documentFragment);
|
|
1787
1832
|
}
|
|
1788
1833
|
/**
|
|
1789
1834
|
* Forces a re-render of the data rows. Should be called in cases where there has been an input
|
|
1790
1835
|
* change that affects the evaluation of which rows should be rendered, e.g. toggling
|
|
1791
1836
|
* `multiTemplateDataRows` or adding/removing row definitions.
|
|
1837
|
+
* @private
|
|
1792
1838
|
* @return {?}
|
|
1793
1839
|
*/
|
|
1794
1840
|
_forceRenderDataRows() {
|
|
@@ -1801,6 +1847,7 @@ class CdkTable {
|
|
|
1801
1847
|
* Checks if there has been a change in sticky states since last check and applies the correct
|
|
1802
1848
|
* sticky styles. Since checking resets the "dirty" state, this should only be performed once
|
|
1803
1849
|
* during a change detection and after the inputs are settled (after content check).
|
|
1850
|
+
* @private
|
|
1804
1851
|
* @return {?}
|
|
1805
1852
|
*/
|
|
1806
1853
|
_checkStickyStates() {
|
|
@@ -1825,6 +1872,7 @@ class CdkTable {
|
|
|
1825
1872
|
* Creates the sticky styler that will be used for sticky rows and columns. Listens
|
|
1826
1873
|
* for directionality changes and provides the latest direction to the styler. Re-applies column
|
|
1827
1874
|
* stickiness when directionality changes.
|
|
1875
|
+
* @private
|
|
1828
1876
|
* @return {?}
|
|
1829
1877
|
*/
|
|
1830
1878
|
_setupStickyStyler() {
|
|
@@ -1887,7 +1935,7 @@ function mergeQueryListAndSet(queryList, set) {
|
|
|
1887
1935
|
|
|
1888
1936
|
/**
|
|
1889
1937
|
* @fileoverview added by tsickle
|
|
1890
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1938
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1891
1939
|
*/
|
|
1892
1940
|
/** @type {?} */
|
|
1893
1941
|
const EXPORTED_DECLARATIONS = [
|
|
@@ -1922,12 +1970,12 @@ CdkTableModule.decorators = [
|
|
|
1922
1970
|
|
|
1923
1971
|
/**
|
|
1924
1972
|
* @fileoverview added by tsickle
|
|
1925
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1973
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1926
1974
|
*/
|
|
1927
1975
|
|
|
1928
1976
|
/**
|
|
1929
1977
|
* @fileoverview added by tsickle
|
|
1930
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1978
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1931
1979
|
*/
|
|
1932
1980
|
|
|
1933
1981
|
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 };
|