igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
118 lines (117 loc) • 4.87 kB
JavaScript
import { __extends } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { IgcTemplateHeaderCellUpdatingEventArgs } from "./igc-template-header-cell-updating-event-args";
import { IgcHeaderComponent } from "./igc-header-component";
import { TemplateHeader } from "./TemplateHeader";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* A type of header with customizable content.
*/
var IgcTemplateHeaderComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcTemplateHeaderComponent, _super);
function IgcTemplateHeaderComponent() {
var _this = _super.call(this) || this;
_this._cellUpdating = null;
_this._cellUpdating_wrapped = null;
return _this;
}
IgcTemplateHeaderComponent.prototype.createImplementation = function () {
return new TemplateHeader();
};
Object.defineProperty(IgcTemplateHeaderComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcTemplateHeaderComponent.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();
}
};
IgcTemplateHeaderComponent.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(IgcTemplateHeaderComponent, "observedAttributes", {
get: function () {
if (IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent == null) {
var names = getAllPropertyNames(IgcTemplateHeaderComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent = names;
}
return IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent;
},
enumerable: false,
configurable: true
});
IgcTemplateHeaderComponent.register = function () {
if (!IgcTemplateHeaderComponent._isElementRegistered) {
IgcTemplateHeaderComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcTemplateHeaderComponent.htmlTagName, IgcTemplateHeaderComponent);
}
};
Object.defineProperty(IgcTemplateHeaderComponent.prototype, "cellUpdating", {
/**
* Called when the header 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 IgcTemplateHeaderCellUpdatingEventArgs();
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
});
IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent = null;
IgcTemplateHeaderComponent.htmlTagName = "igc-template-header";
IgcTemplateHeaderComponent._isElementRegistered = false;
return IgcTemplateHeaderComponent;
}(IgcHeaderComponent));
export { IgcTemplateHeaderComponent };