igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
118 lines (117 loc) • 5.14 kB
JavaScript
import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { IgcTemplateSectionHeaderCellUpdatingEventArgs } from "./igc-template-section-header-cell-updating-event-args";
import { IgcSectionHeaderComponent } from "./igc-section-header-component";
import { TemplateSectionHeader } from "./TemplateSectionHeader";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Used to configure the appearance of the section header cells.
*/
var IgcTemplateSectionHeaderComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcTemplateSectionHeaderComponent, _super);
function IgcTemplateSectionHeaderComponent() {
var _this = _super.call(this) || this;
_this._cellUpdating = null;
_this._cellUpdating_wrapped = null;
return _this;
}
IgcTemplateSectionHeaderComponent.prototype.createImplementation = function () {
return new TemplateSectionHeader();
};
Object.defineProperty(IgcTemplateSectionHeaderComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcTemplateSectionHeaderComponent.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();
}
};
IgcTemplateSectionHeaderComponent.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(IgcTemplateSectionHeaderComponent, "observedAttributes", {
get: function () {
if (IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent == null) {
var names = getAllPropertyNames(IgcTemplateSectionHeaderComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent = names;
}
return IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent;
},
enumerable: false,
configurable: true
});
IgcTemplateSectionHeaderComponent.register = function () {
if (!IgcTemplateSectionHeaderComponent._isElementRegistered) {
IgcTemplateSectionHeaderComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcTemplateSectionHeaderComponent.htmlTagName, IgcTemplateSectionHeaderComponent);
}
};
Object.defineProperty(IgcTemplateSectionHeaderComponent.prototype, "cellUpdating", {
/**
* Called when the cell content is being created or updated.
*/
get: function () {
return this._cellUpdating;
},
set: function (ev) {
var _this = this;
if (this._cellUpdating_wrapped !== null) {
this.i.cellUpdating = delegateRemove(this.i.cellUpdating, this._cellUpdating_wrapped);
this._cellUpdating_wrapped = null;
this._cellUpdating = null;
}
this._cellUpdating = ev;
this._cellUpdating_wrapped = function (o, e) {
var outerArgs = new IgcTemplateSectionHeaderCellUpdatingEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeCellUpdating) {
_this.beforeCellUpdating(_this, outerArgs);
}
if (_this._cellUpdating) {
_this._cellUpdating(_this, outerArgs);
}
};
this.i.cellUpdating = delegateCombine(this.i.cellUpdating, this._cellUpdating_wrapped);
;
},
enumerable: false,
configurable: true
});
IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent = null;
IgcTemplateSectionHeaderComponent.htmlTagName = "igc-template-section-header";
IgcTemplateSectionHeaderComponent._isElementRegistered = false;
return IgcTemplateSectionHeaderComponent;
}(IgcSectionHeaderComponent));
export { IgcTemplateSectionHeaderComponent };