UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

103 lines (102 loc) 4.17 kB
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. */ export let IgcTemplateHeaderComponent = /*@__PURE__*/ (() => { class IgcTemplateHeaderComponent extends IgcHeaderComponent { createImplementation() { return new TemplateHeader(); } /** * @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 (IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent == null) { let names = getAllPropertyNames(IgcTemplateHeaderComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent = names; } return IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent; } static register() { if (!IgcTemplateHeaderComponent._isElementRegistered) { IgcTemplateHeaderComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcTemplateHeaderComponent.htmlTagName, IgcTemplateHeaderComponent); } } /** * Called when the header 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 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); ; } } IgcTemplateHeaderComponent._observedAttributesIgcTemplateHeaderComponent = null; IgcTemplateHeaderComponent.htmlTagName = "igc-template-header"; IgcTemplateHeaderComponent._isElementRegistered = false; return IgcTemplateHeaderComponent; })();