igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
103 lines (102 loc) • 4.38 kB
JavaScript
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.
*/
export let IgcTemplateSectionHeaderComponent = /*@__PURE__*/ (() => {
class IgcTemplateSectionHeaderComponent extends IgcSectionHeaderComponent {
createImplementation() {
return new TemplateSectionHeader();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
this._cellUpdating = null;
this._cellUpdating_wrapped = null;
}
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 (IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent == null) {
let names = getAllPropertyNames(IgcTemplateSectionHeaderComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent = names;
}
return IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent;
}
static register() {
if (!IgcTemplateSectionHeaderComponent._isElementRegistered) {
IgcTemplateSectionHeaderComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcTemplateSectionHeaderComponent.htmlTagName, IgcTemplateSectionHeaderComponent);
}
}
/**
* Called when the cell content is being created or updated.
*/
get cellUpdating() {
return this._cellUpdating;
}
set cellUpdating(ev) {
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 = (o, e) => {
let 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);
;
}
}
IgcTemplateSectionHeaderComponent._observedAttributesIgcTemplateSectionHeaderComponent = null;
IgcTemplateSectionHeaderComponent.htmlTagName = "igc-template-section-header";
IgcTemplateSectionHeaderComponent._isElementRegistered = false;
return IgcTemplateSectionHeaderComponent;
})();