igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
135 lines (134 loc) • 4.72 kB
JavaScript
import { SortIndicatorStyle_$type } from "./SortIndicatorStyle";
import { IgcDefinitionBaseComponent } from "./igc-definition-base-component";
import { getAllPropertyNames, toSpinal, brushToString, stringToBrush, ensureEnum, enumToString } from "igniteui-webcomponents-core";
/**
* Represents a base class used to configure the appearance of the column header cells.
*/
export let IgcHeaderComponent = /*@__PURE__*/ (() => {
class IgcHeaderComponent extends IgcDefinitionBaseComponent {
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
connectedCallback() {
if (super["connectedCallback"]) {
super["connectedCallback"]();
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (this.updateContentChildren) {
this.updateContentChildren();
}
else if (this._updateAdapters) {
this._updateAdapters();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
}
disconnectedCallback() {
if (super["disconnectedCallback"]) {
super["disconnectedCallback"]();
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
}
static get observedAttributes() {
if (IgcHeaderComponent._observedAttributesIgcHeaderComponent == null) {
let names = getAllPropertyNames(IgcHeaderComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcHeaderComponent._observedAttributesIgcHeaderComponent = names;
}
return IgcHeaderComponent._observedAttributesIgcHeaderComponent;
}
/**
* Gets or sets the color to use for the sort indicator icon
*/
get sortIndicatorColor() {
return brushToString(this.i.ho);
}
set sortIndicatorColor(v) {
this.i.ho = stringToBrush(v);
this._a("sortIndicatorColor", brushToString(this.i.ho));
}
/**
* Gets the actual background color that is used for the cells when they are selected
*/
get actualSortIndicatorColor() {
return brushToString(this.i.hm);
}
set actualSortIndicatorColor(v) {
this.i.hm = stringToBrush(v);
this._a("actualSortIndicatorColor", brushToString(this.i.hm));
}
get sortIndicatorStyle() {
return this.i.g1;
}
set sortIndicatorStyle(v) {
this.i.g1 = ensureEnum(SortIndicatorStyle_$type, v);
this._a("sortIndicatorStyle", enumToString(SortIndicatorStyle_$type, this.i.g1));
}
get actualSortIndicatorStyle() {
return this.i.g0;
}
set actualSortIndicatorStyle(v) {
this.i.g0 = ensureEnum(SortIndicatorStyle_$type, v);
this._a("actualSortIndicatorStyle", enumToString(SortIndicatorStyle_$type, this.i.g0));
}
/**
* Gets or sets the amount of left padding to use for the cell content.
*/
get paddingLeft() {
return this.i.g7;
}
set paddingLeft(v) {
this.i.g7 = +v;
this._a("paddingLeft", this.i.g7);
}
/**
* Gets or sets the amount of top padding to use for the cell content.
*/
get paddingTop() {
return this.i.g9;
}
set paddingTop(v) {
this.i.g9 = +v;
this._a("paddingTop", this.i.g9);
}
/**
* Gets or sets the amount of right padding to use for the cell content.
*/
get paddingRight() {
return this.i.g8;
}
set paddingRight(v) {
this.i.g8 = +v;
this._a("paddingRight", this.i.g8);
}
/**
* Gets or sets the amount of bottom padding to use for the cell content.
*/
get paddingBottom() {
return this.i.g6;
}
set paddingBottom(v) {
this.i.g6 = +v;
this._a("paddingBottom", this.i.g6);
}
}
IgcHeaderComponent._observedAttributesIgcHeaderComponent = null;
return IgcHeaderComponent;
})();