igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
108 lines (107 loc) • 4.7 kB
JavaScript
import { NamePatcher, toSpinal, getAllPropertyNames } from "igniteui-webcomponents-core";
import { WebComponentRenderer } from "igniteui-webcomponents-core";
import { DataGridStylingDefaults } from './DataGridStylingDefaults';
import { RegisterElementHelper } from "igniteui-webcomponents-core";
import { GridColumnMoveOptions } from "./GridColumnMoveOptions";
import { IgcGridColumnOptionsSimpleSectionBaseComponent } from "./igc-grid-column-options-simple-section-base-component";
export let IgcGridColumnMoveOptionsComponent = /*@__PURE__*/ (() => {
class IgcGridColumnMoveOptionsComponent extends IgcGridColumnOptionsSimpleSectionBaseComponent {
set height(value) {
this._height = value;
this.style.height = value;
}
get height() {
return this._height;
}
set width(value) {
this._width = value;
this.style.width = value;
}
get width() {
return this._width;
}
constructor() {
super();
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);
}
// supports angular themes or custom properties set in CSS
updateStyle() {
this._styling(this, this);
}
destroy() {
this._implementation.destroy();
this._webComponentRenderer.destroy();
}
createImplementation() {
return new GridColumnMoveOptions();
}
get i() {
return this._implementation;
}
disconnectedCallback() {
this._disconnected = true;
}
connectedCallback() {
if (this._disconnected) {
this._disconnected = false;
return;
}
this.classList.add("ig-grid-column-move-options");
this.classList.add("igc-grid-column-move-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();
}
afterContentInit() {
}
static get observedAttributes() {
if (IgcGridColumnMoveOptionsComponent._observedAttributesIgcGridColumnMoveOptionsComponent == null) {
let names = getAllPropertyNames(IgcGridColumnMoveOptionsComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcGridColumnMoveOptionsComponent._observedAttributesIgcGridColumnMoveOptionsComponent = names;
}
return IgcGridColumnMoveOptionsComponent._observedAttributesIgcGridColumnMoveOptionsComponent;
}
static register() {
if (!IgcGridColumnMoveOptionsComponent._isElementRegistered) {
IgcGridColumnMoveOptionsComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcGridColumnMoveOptionsComponent.htmlTagName, IgcGridColumnMoveOptionsComponent);
}
}
get moveLeftCaption() {
return this.i.b8;
}
set moveLeftCaption(v) {
this.i.b8 = v;
}
get moveRightCaption() {
return this.i.cc;
}
set moveRightCaption(v) {
this.i.cc = v;
}
}
IgcGridColumnMoveOptionsComponent._observedAttributesIgcGridColumnMoveOptionsComponent = null;
IgcGridColumnMoveOptionsComponent.htmlTagName = "igc-grid-column-move-options";
IgcGridColumnMoveOptionsComponent._isElementRegistered = false;
return IgcGridColumnMoveOptionsComponent;
})();