Repository URL to install this package:
|
Version:
1.0.0-next.10 ▾
|
/**
* @license
* FOURBURNER CONFIDENTIAL
* Unpublished Copyright (C) 2021 FourBurner Technologies, Inc. All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property of FOURBURNER TECHNOLOGIES,
* INC. The intellectual and technical concepts contained herein are proprietary to FOURBURNER
* TECHNOLOGIES, INC. and may be covered by U.S. and Foreign Patents, patents in process, and are
* protected by trade secret or copyright law. Dissemination of this information or reproduction of
* this material is strictly forbidden unless prior written permission is obtained from FOURBURNER
* TECHNOLOGIES, INC. Access to the source code contained herein is hereby forbidden to anyone
* except current FOURBURNER TECHNOLOGIES, INC. employees, managers or contractors who have executed
* Confidentiality and Non-disclosure agreements explicitly covering such access.
*
* The copyright notice above does not evidence any actual or intended publication or disclosure of
* this source code, which includes information that is confidential and/or proprietary, and is a
* trade secret, of FOURBURNER TECHNOLOGIES, INC. ANY REPRODUCTION, MODIFICATION, DISTRIBUTION,
* PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT THE EXPRESS
* WRITTEN CONSENT OF FOURBURNER TECHNOLOGIES, INC. IS STRICTLY PROHIBITED, AND IN VIOLATION OF
* APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR
* RELATED INFORMATION DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS
* CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART.
*/
import {Directive, Input} from '@angular/core';
import {
CdkCell,
CdkCellDef,
CdkColumnDef,
CdkFooterCell,
CdkFooterCellDef,
CdkHeaderCell,
CdkHeaderCellDef,
} from '@angular/cdk/table';
/**
* Cell definition for the twnd-table.
* Captures the template of a column's data row cell as well as cell-specific properties.
*/
@Directive({
selector : '[twndCellDef]',
providers : [ {provide : CdkCellDef, useExisting : TWNDCellDef} ],
})
export class TWNDCellDef extends CdkCellDef
{}
/**
* Header cell definition for the twnd-table.
* Captures the template of a column's header cell and as well as cell-specific properties.
*/
@Directive({
selector : '[twndHeaderCellDef]',
providers : [ {provide : CdkHeaderCellDef, useExisting : TWNDHeaderCellDef} ],
})
export class TWNDHeaderCellDef extends CdkHeaderCellDef
{}
/**
* Footer cell definition for the twnd-table.
* Captures the template of a column's footer cell and as well as cell-specific properties.
*/
@Directive({
selector : '[twndFooterCellDef]',
providers : [ {provide : CdkFooterCellDef, useExisting : TWNDFooterCellDef} ],
})
export class TWNDFooterCellDef extends CdkFooterCellDef
{}
/**
* Column definition for the twnd-table.
* Defines a set of cells available for a table column.
*/
@Directive({
selector : '[twndColumnDef]',
inputs : [ 'sticky' ],
providers : [
{provide : CdkColumnDef, useExisting : TWNDColumnDef},
{provide : 'TWND_SORT_HEADER_COLUMN_DEF', useExisting : TWNDColumnDef},
],
})
export class TWNDColumnDef extends CdkColumnDef
{
/** Unique name for this column. */
@Input('twndColumnDef') override get name(): string
{
return this._name;
}
override set name(name: string)
{
this._setNameInput(name);
}
/**
* Add "twnd-column-" prefix in addition to "cdk-column-" prefix.
* In the future, this will only add "twnd-column-" and columnCssClassName
* will change from type string[] to string.
* @docs-private
*/
protected override _updateColumnCssClassName()
{
super._updateColumnCssClassName();
this._columnCssClassName!.push(`twnd-column-${this.cssClassFriendlyName}`);
}
}
/** Header cell template container that adds the right classes and role. */
/* clang-format off */
@Directive({
selector : 'twnd-header-cell, th[twnd-header-cell]',
host : {
'class' : 'twnd-header-cell',
'role' : 'columnheader',
},
})
/* clang-format on */
export class TWNDHeaderCell extends CdkHeaderCell
{}
/** Footer cell template container that adds the right classes and role. */
/* clang-format off */
@Directive({
selector : 'twnd-footer-cell, td[twnd-footer-cell]',
host : {
'class' : 'twnd-footer-cell',
'role' : 'gridcell',
},
})
/* clang-format on */
export class TWNDFooterCell extends CdkFooterCell
{}
/** Cell template container that adds the right classes and role. */
/* clang-format off */
@Directive({
selector : 'twnd-cell, td[twnd-cell]',
host : {
'class' : 'twnd-cell',
'role' : 'gridcell',
},
})
/* clang-format on */
export class TWNDCell extends CdkCell
{}