igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
198 lines (197 loc) • 9.13 kB
JavaScript
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 { GridColumnFilterOptions } from "./GridColumnFilterOptions";
import { IgcGridColumnOptionsSectionBaseComponent } from "./igc-grid-column-options-section-base-component";
import { ControlDisplayDensity_$type } from "igniteui-webcomponents-core";
var IgcGridColumnFilterOptionsComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcGridColumnFilterOptionsComponent, _super);
function IgcGridColumnFilterOptionsComponent() {
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(IgcGridColumnFilterOptionsComponent.prototype, "height", {
get: function () {
return this._height;
},
set: function (value) {
this._height = value;
this.style.height = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcGridColumnFilterOptionsComponent.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
IgcGridColumnFilterOptionsComponent.prototype.updateStyle = function () {
this._styling(this, this);
};
IgcGridColumnFilterOptionsComponent.prototype.destroy = function () {
this._implementation.destroy();
this._webComponentRenderer.destroy();
};
IgcGridColumnFilterOptionsComponent.prototype.createImplementation = function () {
return new GridColumnFilterOptions();
};
Object.defineProperty(IgcGridColumnFilterOptionsComponent.prototype, "i", {
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcGridColumnFilterOptionsComponent.prototype.disconnectedCallback = function () {
this._disconnected = true;
};
IgcGridColumnFilterOptionsComponent.prototype.connectedCallback = function () {
if (this._disconnected) {
this._disconnected = false;
return;
}
this.classList.add("ig-grid-column-filter-options");
this.classList.add("igc-grid-column-filter-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;
var clearFiltersSection = document.createElement("div");
clearFiltersSection.setAttribute("key", "clearFiltersSection");
rootElement.appendChild(clearFiltersSection);
var clearFiltersSectionWrapper = this._webComponentRenderer.getWrapper(clearFiltersSection);
this.i.provideClearFiltersSection(clearFiltersSectionWrapper);
var filtersSection = document.createElement("div");
filtersSection.setAttribute("key", "filtersSection");
rootElement.appendChild(filtersSection);
var filtersSectionWrapper = this._webComponentRenderer.getWrapper(filtersSection);
this.i.provideFilterSection(filtersSectionWrapper);
var filterCheckboxListSection = this._webComponentRenderer.createElement("igc-checkbox-list");
filterCheckboxListSection.setAttribute("key", "filterCheckboxListSection");
filterCheckboxListSection.setAttribute("height", "195px");
rootWrapper.append(filterCheckboxListSection);
this.i.provideFilterCheckboxListSection(filterCheckboxListSection.getNativeElement().i);
var filterButtonsSection = document.createElement("div");
filterButtonsSection.setAttribute("key", "filterButtonsSection");
rootElement.appendChild(filterButtonsSection);
var filterButtonsSectionWrapper = this._webComponentRenderer.getWrapper(filterButtonsSection);
this.i.provideFilterButtonSection(filterButtonsSectionWrapper);
this._flushQueuedAttributes();
// supports themes or custom properties set in CSS
this._styling(this, this);
this.afterContentInit();
};
IgcGridColumnFilterOptionsComponent.prototype.afterContentInit = function () {
};
Object.defineProperty(IgcGridColumnFilterOptionsComponent, "observedAttributes", {
get: function () {
if (IgcGridColumnFilterOptionsComponent._observedAttributesIgcGridColumnFilterOptionsComponent == null) {
var names = getAllPropertyNames(IgcGridColumnFilterOptionsComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcGridColumnFilterOptionsComponent._observedAttributesIgcGridColumnFilterOptionsComponent = names;
}
return IgcGridColumnFilterOptionsComponent._observedAttributesIgcGridColumnFilterOptionsComponent;
},
enumerable: false,
configurable: true
});
IgcGridColumnFilterOptionsComponent.register = function () {
if (!IgcGridColumnFilterOptionsComponent._isElementRegistered) {
IgcGridColumnFilterOptionsComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcGridColumnFilterOptionsComponent.htmlTagName, IgcGridColumnFilterOptionsComponent);
}
};
Object.defineProperty(IgcGridColumnFilterOptionsComponent.prototype, "clearColumnFiltersCaption", {
get: function () {
return this.i.b7;
},
set: function (v) {
this.i.b7 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcGridColumnFilterOptionsComponent.prototype, "filterListPlaceholderText", {
get: function () {
return this.i.cc;
},
set: function (v) {
this.i.cc = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcGridColumnFilterOptionsComponent.prototype, "filterListDensity", {
/**
* Gets or sets the display Density to use for the buttons in the component.
*/
get: function () {
return this.i.b2;
},
set: function (v) {
this.i.b2 = ensureEnum(ControlDisplayDensity_$type, v);
this._a("filterListDensity", enumToString(ControlDisplayDensity_$type, this.i.b2));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcGridColumnFilterOptionsComponent.prototype, "actualFilterListDensity", {
/**
* Gets the actual display filterListDensity to use for the component.
*/
get: function () {
return this.i.b0;
},
set: function (v) {
this.i.b0 = ensureEnum(ControlDisplayDensity_$type, v);
this._a("actualFilterListDensity", enumToString(ControlDisplayDensity_$type, this.i.b0));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcGridColumnFilterOptionsComponent.prototype, "textFilterCaption", {
get: function () {
return this.i.cg;
},
set: function (v) {
this.i.cg = v;
},
enumerable: false,
configurable: true
});
IgcGridColumnFilterOptionsComponent.prototype.onApply = function () {
this.i.bt();
};
IgcGridColumnFilterOptionsComponent._observedAttributesIgcGridColumnFilterOptionsComponent = null;
IgcGridColumnFilterOptionsComponent.htmlTagName = "igc-grid-column-filter-options";
IgcGridColumnFilterOptionsComponent._isElementRegistered = false;
return IgcGridColumnFilterOptionsComponent;
}(IgcGridColumnOptionsSectionBaseComponent));
export { IgcGridColumnFilterOptionsComponent };