igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
176 lines (175 loc) • 6.15 kB
JavaScript
import { __extends } from "tslib";
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.
*/
var IgcHeaderComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcHeaderComponent, _super);
function IgcHeaderComponent() {
return _super.call(this) || this;
}
Object.defineProperty(IgcHeaderComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcHeaderComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
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();
}
};
IgcHeaderComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcHeaderComponent, "observedAttributes", {
get: function () {
if (IgcHeaderComponent._observedAttributesIgcHeaderComponent == null) {
var names = getAllPropertyNames(IgcHeaderComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcHeaderComponent._observedAttributesIgcHeaderComponent = names;
}
return IgcHeaderComponent._observedAttributesIgcHeaderComponent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "sortIndicatorColor", {
/**
* Gets or sets the color to use for the sort indicator icon
*/
get: function () {
return brushToString(this.i.ho);
},
set: function (v) {
this.i.ho = stringToBrush(v);
this._a("sortIndicatorColor", brushToString(this.i.ho));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "actualSortIndicatorColor", {
/**
* Gets the actual background color that is used for the cells when they are selected
*/
get: function () {
return brushToString(this.i.hm);
},
set: function (v) {
this.i.hm = stringToBrush(v);
this._a("actualSortIndicatorColor", brushToString(this.i.hm));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "sortIndicatorStyle", {
get: function () {
return this.i.g1;
},
set: function (v) {
this.i.g1 = ensureEnum(SortIndicatorStyle_$type, v);
this._a("sortIndicatorStyle", enumToString(SortIndicatorStyle_$type, this.i.g1));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "actualSortIndicatorStyle", {
get: function () {
return this.i.g0;
},
set: function (v) {
this.i.g0 = ensureEnum(SortIndicatorStyle_$type, v);
this._a("actualSortIndicatorStyle", enumToString(SortIndicatorStyle_$type, this.i.g0));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "paddingLeft", {
/**
* Gets or sets the amount of left padding to use for the cell content.
*/
get: function () {
return this.i.g7;
},
set: function (v) {
this.i.g7 = +v;
this._a("paddingLeft", this.i.g7);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "paddingTop", {
/**
* Gets or sets the amount of top padding to use for the cell content.
*/
get: function () {
return this.i.g9;
},
set: function (v) {
this.i.g9 = +v;
this._a("paddingTop", this.i.g9);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "paddingRight", {
/**
* Gets or sets the amount of right padding to use for the cell content.
*/
get: function () {
return this.i.g8;
},
set: function (v) {
this.i.g8 = +v;
this._a("paddingRight", this.i.g8);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcHeaderComponent.prototype, "paddingBottom", {
/**
* Gets or sets the amount of bottom padding to use for the cell content.
*/
get: function () {
return this.i.g6;
},
set: function (v) {
this.i.g6 = +v;
this._a("paddingBottom", this.i.g6);
},
enumerable: false,
configurable: true
});
IgcHeaderComponent._observedAttributesIgcHeaderComponent = null;
return IgcHeaderComponent;
}(IgcDefinitionBaseComponent));
export { IgcHeaderComponent };