igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
183 lines (182 loc) • 6.79 kB
JavaScript
import { __extends } from "tslib";
import { GroupSummaryDisplayMode_$type } from "./GroupSummaryDisplayMode";
import { IgcDefinitionBaseComponent } from "./igc-definition-base-component";
import { SectionHeader } from "./SectionHeader";
import { getAllPropertyNames, toSpinal, brushToString, stringToBrush, ensureBool, ensureEnum, enumToString } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Used to configure the appearance of the section header cells.
*/
var IgcSectionHeaderComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcSectionHeaderComponent, _super);
function IgcSectionHeaderComponent() {
return _super.call(this) || this;
}
IgcSectionHeaderComponent.prototype.createImplementation = function () {
return new SectionHeader();
};
Object.defineProperty(IgcSectionHeaderComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcSectionHeaderComponent.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();
}
};
IgcSectionHeaderComponent.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(IgcSectionHeaderComponent, "observedAttributes", {
get: function () {
if (IgcSectionHeaderComponent._observedAttributesIgcSectionHeaderComponent == null) {
var names = getAllPropertyNames(IgcSectionHeaderComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcSectionHeaderComponent._observedAttributesIgcSectionHeaderComponent = names;
}
return IgcSectionHeaderComponent._observedAttributesIgcSectionHeaderComponent;
},
enumerable: false,
configurable: true
});
IgcSectionHeaderComponent.register = function () {
if (!IgcSectionHeaderComponent._isElementRegistered) {
IgcSectionHeaderComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcSectionHeaderComponent.htmlTagName, IgcSectionHeaderComponent);
}
};
Object.defineProperty(IgcSectionHeaderComponent.prototype, "selectedBackground", {
get: function () {
return brushToString(this.i.hs);
},
set: function (v) {
this.i.hs = stringToBrush(v);
this._a("selectedBackground", brushToString(this.i.hs));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcSectionHeaderComponent.prototype, "actualSelectedBackground", {
get: function () {
return brushToString(this.i.hr);
},
set: function (v) {
this.i.hr = stringToBrush(v);
this._a("actualSelectedBackground", brushToString(this.i.hr));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcSectionHeaderComponent.prototype, "paddingLeft", {
/**
* Gets or sets the amount of left padding to use for the cell content for this column.
*/
get: function () {
return this.i.ha;
},
set: function (v) {
this.i.ha = +v;
this._a("paddingLeft", this.i.ha);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcSectionHeaderComponent.prototype, "paddingTop", {
/**
* Gets or sets the amount of top padding to use for the cell content for this column.
*/
get: function () {
return this.i.hc;
},
set: function (v) {
this.i.hc = +v;
this._a("paddingTop", this.i.hc);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcSectionHeaderComponent.prototype, "paddingRight", {
/**
* Gets or sets the amount of right padding to use for the cell content of this column.
*/
get: function () {
return this.i.hb;
},
set: function (v) {
this.i.hb = +v;
this._a("paddingRight", this.i.hb);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcSectionHeaderComponent.prototype, "paddingBottom", {
/**
* Gets or sets the amount of bottom padding to use for the cell content of this column.
*/
get: function () {
return this.i.g9;
},
set: function (v) {
this.i.g9 = +v;
this._a("paddingBottom", this.i.g9);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcSectionHeaderComponent.prototype, "isCollapsable", {
get: function () {
return this.i.g3;
},
set: function (v) {
this.i.g3 = ensureBool(v);
this._a("isCollapsable", this.i.g3);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcSectionHeaderComponent.prototype, "summaryDisplayMode", {
get: function () {
return this.i.g0;
},
set: function (v) {
this.i.g0 = ensureEnum(GroupSummaryDisplayMode_$type, v);
this._a("summaryDisplayMode", enumToString(GroupSummaryDisplayMode_$type, this.i.g0));
},
enumerable: false,
configurable: true
});
IgcSectionHeaderComponent._observedAttributesIgcSectionHeaderComponent = null;
IgcSectionHeaderComponent.htmlTagName = "igc-section-header";
IgcSectionHeaderComponent._isElementRegistered = false;
return IgcSectionHeaderComponent;
}(IgcDefinitionBaseComponent));
export { IgcSectionHeaderComponent };