source: trip-planner-front/node_modules/@angular/cdk/esm2015/table/cell.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 21.6 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { coerceBooleanProperty } from '@angular/cdk/coercion';
9import { ContentChild, Directive, ElementRef, Inject, Input, Optional, TemplateRef, } from '@angular/core';
10import { mixinHasStickyInput } from './can-stick';
11import { CDK_TABLE } from './tokens';
12/**
13 * Cell definition for a CDK table.
14 * Captures the template of a column's data row cell as well as cell-specific properties.
15 */
16export class CdkCellDef {
17 constructor(/** @docs-private */ template) {
18 this.template = template;
19 }
20}
21CdkCellDef.decorators = [
22 { type: Directive, args: [{ selector: '[cdkCellDef]' },] }
23];
24CdkCellDef.ctorParameters = () => [
25 { type: TemplateRef }
26];
27/**
28 * Header cell definition for a CDK table.
29 * Captures the template of a column's header cell and as well as cell-specific properties.
30 */
31export class CdkHeaderCellDef {
32 constructor(/** @docs-private */ template) {
33 this.template = template;
34 }
35}
36CdkHeaderCellDef.decorators = [
37 { type: Directive, args: [{ selector: '[cdkHeaderCellDef]' },] }
38];
39CdkHeaderCellDef.ctorParameters = () => [
40 { type: TemplateRef }
41];
42/**
43 * Footer cell definition for a CDK table.
44 * Captures the template of a column's footer cell and as well as cell-specific properties.
45 */
46export class CdkFooterCellDef {
47 constructor(/** @docs-private */ template) {
48 this.template = template;
49 }
50}
51CdkFooterCellDef.decorators = [
52 { type: Directive, args: [{ selector: '[cdkFooterCellDef]' },] }
53];
54CdkFooterCellDef.ctorParameters = () => [
55 { type: TemplateRef }
56];
57// Boilerplate for applying mixins to CdkColumnDef.
58/** @docs-private */
59class CdkColumnDefBase {
60}
61const _CdkColumnDefBase = mixinHasStickyInput(CdkColumnDefBase);
62/**
63 * Column definition for the CDK table.
64 * Defines a set of cells available for a table column.
65 */
66export class CdkColumnDef extends _CdkColumnDefBase {
67 constructor(_table) {
68 super();
69 this._table = _table;
70 this._stickyEnd = false;
71 }
72 /** Unique name for this column. */
73 get name() { return this._name; }
74 set name(name) { this._setNameInput(name); }
75 /**
76 * Whether this column should be sticky positioned on the end of the row. Should make sure
77 * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value
78 * has been changed.
79 */
80 get stickyEnd() {
81 return this._stickyEnd;
82 }
83 set stickyEnd(v) {
84 const prevValue = this._stickyEnd;
85 this._stickyEnd = coerceBooleanProperty(v);
86 this._hasStickyChanged = prevValue !== this._stickyEnd;
87 }
88 /**
89 * Overridable method that sets the css classes that will be added to every cell in this
90 * column.
91 * In the future, columnCssClassName will change from type string[] to string and this
92 * will set a single string value.
93 * @docs-private
94 */
95 _updateColumnCssClassName() {
96 this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`];
97 }
98 /**
99 * This has been extracted to a util because of TS 4 and VE.
100 * View Engine doesn't support property rename inheritance.
101 * TS 4.0 doesn't allow properties to override accessors or vice-versa.
102 * @docs-private
103 */
104 _setNameInput(value) {
105 // If the directive is set without a name (updated programmatically), then this setter will
106 // trigger with an empty string and should not overwrite the programmatically set value.
107 if (value) {
108 this._name = value;
109 this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/ig, '-');
110 this._updateColumnCssClassName();
111 }
112 }
113}
114CdkColumnDef.decorators = [
115 { type: Directive, args: [{
116 selector: '[cdkColumnDef]',
117 inputs: ['sticky'],
118 providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],
119 },] }
120];
121CdkColumnDef.ctorParameters = () => [
122 { type: undefined, decorators: [{ type: Inject, args: [CDK_TABLE,] }, { type: Optional }] }
123];
124CdkColumnDef.propDecorators = {
125 name: [{ type: Input, args: ['cdkColumnDef',] }],
126 stickyEnd: [{ type: Input, args: ['stickyEnd',] }],
127 cell: [{ type: ContentChild, args: [CdkCellDef,] }],
128 headerCell: [{ type: ContentChild, args: [CdkHeaderCellDef,] }],
129 footerCell: [{ type: ContentChild, args: [CdkFooterCellDef,] }]
130};
131/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */
132export class BaseCdkCell {
133 constructor(columnDef, elementRef) {
134 // If IE 11 is dropped before we switch to setting a single class name, change to multi param
135 // with destructuring.
136 const classList = elementRef.nativeElement.classList;
137 for (const className of columnDef._columnCssClassName) {
138 classList.add(className);
139 }
140 }
141}
142/** Header cell template container that adds the right classes and role. */
143export class CdkHeaderCell extends BaseCdkCell {
144 constructor(columnDef, elementRef) {
145 super(columnDef, elementRef);
146 }
147}
148CdkHeaderCell.decorators = [
149 { type: Directive, args: [{
150 selector: 'cdk-header-cell, th[cdk-header-cell]',
151 host: {
152 'class': 'cdk-header-cell',
153 'role': 'columnheader',
154 },
155 },] }
156];
157CdkHeaderCell.ctorParameters = () => [
158 { type: CdkColumnDef },
159 { type: ElementRef }
160];
161/** Footer cell template container that adds the right classes and role. */
162export class CdkFooterCell extends BaseCdkCell {
163 constructor(columnDef, elementRef) {
164 var _a;
165 super(columnDef, elementRef);
166 if (((_a = columnDef._table) === null || _a === void 0 ? void 0 : _a._elementRef.nativeElement.nodeType) === 1) {
167 const tableRole = columnDef._table._elementRef.nativeElement
168 .getAttribute('role');
169 const role = (tableRole === 'grid' || tableRole === 'treegrid') ? 'gridcell' : 'cell';
170 elementRef.nativeElement.setAttribute('role', role);
171 }
172 }
173}
174CdkFooterCell.decorators = [
175 { type: Directive, args: [{
176 selector: 'cdk-footer-cell, td[cdk-footer-cell]',
177 host: {
178 'class': 'cdk-footer-cell',
179 },
180 },] }
181];
182CdkFooterCell.ctorParameters = () => [
183 { type: CdkColumnDef },
184 { type: ElementRef }
185];
186/** Cell template container that adds the right classes and role. */
187export class CdkCell extends BaseCdkCell {
188 constructor(columnDef, elementRef) {
189 var _a;
190 super(columnDef, elementRef);
191 if (((_a = columnDef._table) === null || _a === void 0 ? void 0 : _a._elementRef.nativeElement.nodeType) === 1) {
192 const tableRole = columnDef._table._elementRef.nativeElement
193 .getAttribute('role');
194 const role = (tableRole === 'grid' || tableRole === 'treegrid') ? 'gridcell' : 'cell';
195 elementRef.nativeElement.setAttribute('role', role);
196 }
197 }
198}
199CdkCell.decorators = [
200 { type: Directive, args: [{
201 selector: 'cdk-cell, td[cdk-cell]',
202 host: {
203 'class': 'cdk-cell',
204 },
205 },] }
206];
207CdkCell.ctorParameters = () => [
208 { type: CdkColumnDef },
209 { type: ElementRef }
210];
211//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jZGsvdGFibGUvY2VsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQWUscUJBQXFCLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUMxRSxPQUFPLEVBQ0wsWUFBWSxFQUNaLFNBQVMsRUFDVCxVQUFVLEVBQ1YsTUFBTSxFQUNOLEtBQUssRUFDTCxRQUFRLEVBQ1IsV0FBVyxHQUNaLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBeUIsbUJBQW1CLEVBQUMsTUFBTSxhQUFhLENBQUM7QUFDeEUsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLFVBQVUsQ0FBQztBQVFuQzs7O0dBR0c7QUFFSCxNQUFNLE9BQU8sVUFBVTtJQUNyQixZQUFZLG9CQUFvQixDQUFRLFFBQTBCO1FBQTFCLGFBQVEsR0FBUixRQUFRLENBQWtCO0lBQUcsQ0FBQzs7O1lBRnZFLFNBQVMsU0FBQyxFQUFDLFFBQVEsRUFBRSxjQUFjLEVBQUM7OztZQWZuQyxXQUFXOztBQW9CYjs7O0dBR0c7QUFFSCxNQUFNLE9BQU8sZ0JBQWdCO0lBQz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