UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

146 lines (145 loc) 6.45 kB
import { __extends } from "tslib"; import { ensureEnum, NamePatcher, toSpinal, enumToString, getAllPropertyNames } from "igniteui-webcomponents-core"; import { WebComponentRenderer } from "igniteui-webcomponents-core"; import { DataGridStylingDefaults } from './DataGridStylingDefaults'; import { RegisterElementHelper } from "igniteui-webcomponents-core"; import { GridColumnSortOptions } from "./GridColumnSortOptions"; import { IgcGridColumnOptionsSimpleSectionBaseComponent } from "./igc-grid-column-options-simple-section-base-component"; import { ColumnSortDirection_$type } from "./ColumnSortDirection"; var IgcGridColumnSortOptionsComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcGridColumnSortOptionsComponent, _super); function IgcGridColumnSortOptionsComponent() { var _this = _super.call(this) || this; _this._disconnected = false; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this._webComponentRenderer = new WebComponentRenderer(_this, document, true, DataGridStylingDefaults); _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(IgcGridColumnSortOptionsComponent.prototype, "height", { get: function () { return this._height; }, set: function (value) { this._height = value; this.style.height = value; }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSortOptionsComponent.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 IgcGridColumnSortOptionsComponent.prototype.updateStyle = function () { this._styling(this, this); }; IgcGridColumnSortOptionsComponent.prototype.destroy = function () { this._implementation.destroy(); this._webComponentRenderer.destroy(); }; IgcGridColumnSortOptionsComponent.prototype.createImplementation = function () { return new GridColumnSortOptions(); }; Object.defineProperty(IgcGridColumnSortOptionsComponent.prototype, "i", { get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcGridColumnSortOptionsComponent.prototype.disconnectedCallback = function () { this._disconnected = true; }; IgcGridColumnSortOptionsComponent.prototype.connectedCallback = function () { if (this._disconnected) { this._disconnected = false; return; } this.classList.add("ig-grid-column-sort-options"); this.classList.add("igc-grid-column-sort-options"); this.appendChild(this._webComponentRenderer.rootWrapper.getNativeElement()); 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(); }; IgcGridColumnSortOptionsComponent.prototype.afterContentInit = function () { }; Object.defineProperty(IgcGridColumnSortOptionsComponent, "observedAttributes", { get: function () { if (IgcGridColumnSortOptionsComponent._observedAttributesIgcGridColumnSortOptionsComponent == null) { var names = getAllPropertyNames(IgcGridColumnSortOptionsComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcGridColumnSortOptionsComponent._observedAttributesIgcGridColumnSortOptionsComponent = names; } return IgcGridColumnSortOptionsComponent._observedAttributesIgcGridColumnSortOptionsComponent; }, enumerable: false, configurable: true }); IgcGridColumnSortOptionsComponent.register = function () { if (!IgcGridColumnSortOptionsComponent._isElementRegistered) { IgcGridColumnSortOptionsComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcGridColumnSortOptionsComponent.htmlTagName, IgcGridColumnSortOptionsComponent); } }; Object.defineProperty(IgcGridColumnSortOptionsComponent.prototype, "ascendingCaption", { get: function () { return this.i.b5; }, set: function (v) { this.i.b5 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSortOptionsComponent.prototype, "descendingCaption", { get: function () { return this.i.b9; }, set: function (v) { this.i.b9 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcGridColumnSortOptionsComponent.prototype, "sortDirection", { get: function () { return this.i.b2; }, set: function (v) { this.i.b2 = ensureEnum(ColumnSortDirection_$type, v); this._a("sortDirection", enumToString(ColumnSortDirection_$type, this.i.b2)); }, enumerable: false, configurable: true }); IgcGridColumnSortOptionsComponent._observedAttributesIgcGridColumnSortOptionsComponent = null; IgcGridColumnSortOptionsComponent.htmlTagName = "igc-grid-column-sort-options"; IgcGridColumnSortOptionsComponent._isElementRegistered = false; return IgcGridColumnSortOptionsComponent; }(IgcGridColumnOptionsSimpleSectionBaseComponent)); export { IgcGridColumnSortOptionsComponent };