UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

201 lines (200 loc) 8.64 kB
import { __extends } from "tslib"; import { ensureEnum, brushToString, stringToBrush, NamePatcher, toSpinal, enumToString, getAllPropertyNames } from "igniteui-webcomponents-core"; import { WebComponentRenderer, PortalManager } from "igniteui-webcomponents-core"; import { DataGridStylingDefaults } from './DataGridStylingDefaults'; import { RegisterElementHelper } from "igniteui-webcomponents-core"; import { GridColumnSummaryOptions } from "./GridColumnSummaryOptions"; import { IgcGridColumnOptionsSectionBaseComponent } from "./igc-grid-column-options-section-base-component"; import { ControlDisplayDensity_$type } from "igniteui-webcomponents-core"; var IgcGridColumnSummaryOptionsComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcGridColumnSummaryOptionsComponent, _super); function IgcGridColumnSummaryOptionsComponent() { var _this = _super.call(this) || this; _this._disconnected = false; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this._portalManager = new PortalManager("summarySubMenu"); _this._webComponentRenderer = new WebComponentRenderer(_this, document, true, DataGridStylingDefaults, _this._portalManager); _this._webComponentWrapper = _this._webComponentRenderer.createElement("div"); _this._webComponentRenderer.updateRoot(_this._webComponentWrapper); //this._webComponentRenderer.rootWrapper.append(this._webComponentWrapper); _this._webComponentWrapper.setStyleProperty("display", "block"); _this._webComponentWrapper.setStyleProperty("width", "100%"); _this._webComponentWrapper.setStyleProperty("height", "100%"); _this.i.provideRenderer(_this._webComponentRenderer); return _this; } Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "height", { get: function () { return this._height; }, set: function (value) { this._height = value; this.style.height = value; }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "width", { get: function () { return this._width; }, set: function (value) { this._width = value; this.style.width = value; }, enumerable: false, configurable: true }); // supports angular themes or custom properties set in CSS IgcGridColumnSummaryOptionsComponent.prototype.updateStyle = function () { this._styling(this, this); }; IgcGridColumnSummaryOptionsComponent.prototype.destroy = function () { this._implementation.destroy(); this._webComponentRenderer.destroy(); }; IgcGridColumnSummaryOptionsComponent.prototype.createImplementation = function () { return new GridColumnSummaryOptions(); }; Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcGridColumnSummaryOptionsComponent.prototype.disconnectedCallback = function () { this._disconnected = true; }; IgcGridColumnSummaryOptionsComponent.prototype.connectedCallback = function () { if (this._disconnected) { this._disconnected = false; return; } this.classList.add("ig-grid-column-summary-options"); this.classList.add("igc-grid-column-summary-options"); var rootWrapper = this._webComponentRenderer.rootWrapper; var rootElement = rootWrapper.getNativeElement(); this.appendChild(rootElement); this._attached = true; this.style.display = "block"; this.style.height = this._height; this.style.width = this._width; this._flushQueuedAttributes(); // supports themes or custom properties set in CSS this._styling(this, this); this.afterContentInit(); }; IgcGridColumnSummaryOptionsComponent.prototype.afterContentInit = function () { }; Object.defineProperty(IgcGridColumnSummaryOptionsComponent, "observedAttributes", { get: function () { if (IgcGridColumnSummaryOptionsComponent._observedAttributesIgcGridColumnSummaryOptionsComponent == null) { var names = getAllPropertyNames(IgcGridColumnSummaryOptionsComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcGridColumnSummaryOptionsComponent._observedAttributesIgcGridColumnSummaryOptionsComponent = names; } return IgcGridColumnSummaryOptionsComponent._observedAttributesIgcGridColumnSummaryOptionsComponent; }, enumerable: false, configurable: true }); IgcGridColumnSummaryOptionsComponent.register = function () { if (!IgcGridColumnSummaryOptionsComponent._isElementRegistered) { IgcGridColumnSummaryOptionsComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcGridColumnSummaryOptionsComponent.htmlTagName, IgcGridColumnSummaryOptionsComponent); } }; Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "summaryCaption", { /** * Gets or sets the text inside the summary button. */ get: function () { return this.i.cd; }, set: function (v) { this.i.cd = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "summaryListDensity", { /** * Gets or sets the display density used for the summary list. */ get: function () { return this.i.b5; }, set: function (v) { this.i.b5 = ensureEnum(ControlDisplayDensity_$type, v); this._a("summaryListDensity", enumToString(ControlDisplayDensity_$type, this.i.b5)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "actualSummaryListDensity", { /** * Gets the actual display density used for the summary list. */ get: function () { return this.i.b3; }, set: function (v) { this.i.b3 = ensureEnum(ControlDisplayDensity_$type, v); this._a("actualSummaryListDensity", enumToString(ControlDisplayDensity_$type, this.i.b3)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "activeCount", { get: function () { return this.i.b7; }, set: function (v) { this.i.b7 = +v; this._a("activeCount", this.i.b7); }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "summaryListTextColor", { get: function () { return brushToString(this.i.cv); }, set: function (v) { this.i.cv = stringToBrush(v); this._a("summaryListTextColor", brushToString(this.i.cv)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSummaryOptionsComponent.prototype, "summaryListBackground", { get: function () { return brushToString(this.i.cu); }, set: function (v) { this.i.cu = stringToBrush(v); this._a("summaryListBackground", brushToString(this.i.cu)); }, enumerable: false, configurable: true }); IgcGridColumnSummaryOptionsComponent.prototype.onApply = function () { this.i.bt(); }; IgcGridColumnSummaryOptionsComponent.prototype.onCancel = function () { this.i.bu(); }; IgcGridColumnSummaryOptionsComponent.prototype.closeMenu = function () { this.i.cj(); }; IgcGridColumnSummaryOptionsComponent._observedAttributesIgcGridColumnSummaryOptionsComponent = null; IgcGridColumnSummaryOptionsComponent.htmlTagName = "igc-grid-column-summary-options"; IgcGridColumnSummaryOptionsComponent._isElementRegistered = false; return IgcGridColumnSummaryOptionsComponent; }(IgcGridColumnOptionsSectionBaseComponent)); export { IgcGridColumnSummaryOptionsComponent };