igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
1,135 lines (1,130 loc) • 41.6 kB
JavaScript
import { __extends, __values } from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core";
import { CellContentHorizontalAlignment_$type } from "./CellContentHorizontalAlignment";
import { CellContentVerticalAlignment_$type } from "./CellContentVerticalAlignment";
import { TextCellLineBreakMode_$type } from "./TextCellLineBreakMode";
import { IgcDataBindingEventArgs } from "./igc-data-binding-event-args";
import { IgcCellStyleRequestedEventArgs } from "./igc-cell-style-requested-event-args";
import { TypeRegistrar } from "igniteui-webcomponents-core";
import { ensureBool, NamePatcher, getAllPropertyNames, fromSpinal, toSpinal, brushToString, stringToBrush, ensureEnum, enumToString, initializePropertiesFromCss, CollectionAdapter } from "igniteui-webcomponents-core";
import { FontInfo } from "igniteui-webcomponents-core";
import { ColumnPropertyUpdatingAnimationMode } from "./ColumnPropertyUpdatingAnimationMode";
import { IgcHTMLElement } from "igniteui-webcomponents-core";
import { IgcGridConditionalStyleCollection } from './igc-grid-conditional-style-collection';
import { IgcGridConditionalStyleComponent } from './igc-grid-conditional-style-component';
import { NotifyCollectionChangedAction } from "igniteui-webcomponents-core";
/**
* Base class for various definition types for the grid.
*/
var IgcDefinitionBaseComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcDefinitionBaseComponent, _super);
function IgcDefinitionBaseComponent() {
var _this = _super.call(this) || this;
_this._renderer = null;
_this.__p = null;
_this._hasUserValues = new Set();
_this._stylingContainer = null;
_this._stylingParent = null;
_this._inStyling = false;
_this._settingAttributes = false;
_this._attached = false;
_this._queuedSetAttributes = [];
_this._updatingFromAttribute = false;
_this._conditionalStyles = null;
_this._dataBinding = null;
_this._dataBinding_wrapped = null;
_this._dataBound = null;
_this._dataBound_wrapped = null;
_this._cellStyleKeyRequested = null;
_this._cellStyleKeyRequested_wrapped = null;
if (_this._styling) {
NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this));
}
_this._implementation = _this.createImplementation();
_this._implementation.externalObject = _this;
_this.onImplementationCreated();
if (_this._initializeAdapters) {
_this._initializeAdapters();
}
return _this;
}
IgcDefinitionBaseComponent.prototype.createImplementation = function () {
return null;
};
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
} /**
* @hidden
*/,
enumerable: false,
configurable: true
});
IgcDefinitionBaseComponent._createFromInternal = function (internal) {
if (!internal) {
return null;
}
if (!internal.$type) {
return null;
}
var name = internal.$type.name;
var externalName = "Igc" + name + "Component";
if (!TypeRegistrar.isRegistered(externalName)) {
return null;
}
return TypeRegistrar.create(externalName);
};
IgcDefinitionBaseComponent.prototype.onImplementationCreated = function () {
};
IgcDefinitionBaseComponent.prototype._initializeAdapters = function () {
var _this = this;
if (!this.__observingChildren) {
this.__observingChildren = true;
var mut = new MutationObserver(function (list) {
var e_1, _b;
try {
for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
var mutation = list_1_1.value;
if (mutation.type == 'childList') {
if (_this.updateContentChildren) {
_this.updateContentChildren();
}
else if (_this._initializeAdapters) {
_this.initializeAdapters();
}
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (list_1_1 && !list_1_1.done && (_b = list_1.return))
_b.call(list_1);
}
finally {
if (e_1)
throw e_1.error;
}
}
});
mut.observe(this, {
childList: true
});
}
this._conditionalStylesAdapter = new CollectionAdapter(this.contentConditionalStyles, this.i.conditionalStyles, this.actualConditionalStyles, function (c) { return c.i; }, function (i) {
if (_this._initializeElement) {
_this._initializeElement(i);
}
}, function (i) {
if (_this._destroyElement) {
_this._destroyElement(i);
}
});
if (_super.prototype["_initializeAdapters"]) {
_super.prototype["_initializeAdapters"].call(this);
}
};
IgcDefinitionBaseComponent.prototype._updateAdapters = function () {
if (_super.prototype["_updateAdapters"]) {
_super.prototype["_updateAdapters"].call(this);
}
this.contentConditionalStyles.length = 0;
for (var i = 0; i < this.children.length; i++) {
if (this.children[i] instanceof IgcGridConditionalStyleComponent) {
this.contentConditionalStyles.push(this.children[i]);
}
}
if (this._conditionalStylesAdapter != null) {
this._conditionalStylesAdapter.notifyContentChanged();
}
};
IgcDefinitionBaseComponent.prototype._provideRenderer = function (renderer) {
this._renderer = renderer;
};
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "hasUserValues", {
get: function () {
return this._hasUserValues;
},
enumerable: false,
configurable: true
});
IgcDefinitionBaseComponent.prototype.__m = function (propertyName) {
if (!this._inStyling) {
this._hasUserValues.add(propertyName);
}
};
IgcDefinitionBaseComponent.prototype._styling = function (container, component, parent) {
this._stylingContainer = container;
this._stylingParent = component;
if (this._inStyling) {
return;
}
this._inStyling = true;
var grid = component._grid;
var prev;
if (grid) {
prev = grid.columnPropertyUpdatingAnimationMode;
grid.columnPropertyUpdatingAnimationMode = ColumnPropertyUpdatingAnimationMode.None;
}
var genericPrefix = "";
var typeName = this.i.$type.name;
var lowerTypeName = typeName.toLowerCase();
if (lowerTypeName.indexOf("column") >= 0) {
genericPrefix = "column";
}
else if (lowerTypeName.indexOf("sectionheader") >= 0) {
genericPrefix = "section-header";
}
else if (lowerTypeName.indexOf("sectionfooter") >= 0) {
genericPrefix = "section-footer";
}
else if (lowerTypeName.indexOf("rowseparator") >= 0) {
genericPrefix = "row-separator";
}
else if (lowerTypeName.indexOf("summaryrowroot") >= 0) {
genericPrefix = "summary-row-root";
}
else if (lowerTypeName.indexOf("summaryrowsection") >= 0) {
genericPrefix = "summary-row-section";
}
else if (lowerTypeName.indexOf("headerseparator") >= 0) {
genericPrefix = "header-separator";
}
else {
genericPrefix = "header";
}
var additionalPrefixes = [];
var prefix = toSpinal(typeName);
additionalPrefixes.push(prefix + "-");
if (parent) {
var parentTypeName = parent.i.$type.name;
if (parentTypeName == "Grid") {
parentTypeName = "DataGrid";
}
var parentPrefix = toSpinal(parentTypeName);
additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-");
additionalPrefixes.push(parentPrefix + "-" + prefix + "-");
}
initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes);
if (grid) {
grid.columnPropertyUpdatingAnimationMode = prev;
}
this._inStyling = false;
};
IgcDefinitionBaseComponent.prototype._enqueueSetAttribute = function (attrName, attrValue) {
this._queuedSetAttributes.push({ attrName: attrName, attrValue: attrValue });
};
IgcDefinitionBaseComponent.prototype._flushQueuedAttributes = function () {
this._settingAttributes = true;
for (var i = 0; i < this._queuedSetAttributes.length; i++) {
this.setAttribute(this._queuedSetAttributes[i].attrName, this._queuedSetAttributes[i].attrValue);
}
this._settingAttributes = false;
this._queuedSetAttributes.length = 0;
};
IgcDefinitionBaseComponent.prototype._a = function (attrName, attrValue) {
if (this._updatingFromAttribute) {
return;
}
if (attrValue) {
attrValue = attrValue.toString();
}
this._settingAttributes = true;
attrName = toSpinal(attrName);
if (this._attached) {
this.setAttribute(attrName, attrValue);
}
else {
this._enqueueSetAttribute(attrName, attrValue);
}
this._settingAttributes = false;
};
IgcDefinitionBaseComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
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();
}
};
IgcDefinitionBaseComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcDefinitionBaseComponent, "observedAttributes", {
get: function () {
if (IgcDefinitionBaseComponent._observedAttributesIgcDefinitionBaseComponent == null) {
var names = getAllPropertyNames(IgcDefinitionBaseComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcDefinitionBaseComponent._observedAttributesIgcDefinitionBaseComponent = names;
}
return IgcDefinitionBaseComponent._observedAttributesIgcDefinitionBaseComponent;
},
enumerable: false,
configurable: true
});
IgcDefinitionBaseComponent.prototype.attributeChangedCallback = function (name, oldValue, newValue) {
if (this._settingAttributes) {
return;
}
var setName = fromSpinal(name);
this._updatingFromAttribute = true;
this[setName] = newValue;
this._updatingFromAttribute = false;
};
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "background", {
/**
* Gets or sets the background color to use.
*/
get: function () {
return brushToString(this.i.ge);
},
set: function (v) {
this.i.ge = stringToBrush(v);
this._a("background", brushToString(this.i.ge));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualConditionalStyles", {
get: function () {
if (!this._actualConditionalStyles) {
this._actualConditionalStyles = [];
}
return this._actualConditionalStyles;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "contentConditionalStyles", {
get: function () {
if (!this._contentConditionalStyles) {
this._contentConditionalStyles = [];
}
return this._contentConditionalStyles;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "conditionalStyles", {
/**
* Gets the style key information to use for judging when a property will be set later by a style
*/
get: function () {
var _this = this;
if (this._conditionalStyles === null) {
var coll = new IgcGridConditionalStyleCollection();
var inner = coll._innerColl;
this._conditionalStyles = coll;
inner.addListener(function (sender, e) {
switch (e.action) {
case NotifyCollectionChangedAction.Add:
_this._conditionalStylesAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
break;
case NotifyCollectionChangedAction.Remove:
_this._conditionalStylesAdapter.removeManualItemAt(e.oldStartingIndex);
break;
case NotifyCollectionChangedAction.Replace:
_this._conditionalStylesAdapter.removeManualItemAt(e.oldStartingIndex);
_this._conditionalStylesAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0));
break;
case NotifyCollectionChangedAction.Reset:
_this._conditionalStylesAdapter.clearManualItems();
break;
}
});
;
}
return this._conditionalStyles;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "border", {
/**
* Gets or sets the background color to use.
*/
get: function () {
return brushToString(this.i.gh);
},
set: function (v) {
this.i.gh = stringToBrush(v);
this._a("border", brushToString(this.i.gh));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "activationBorder", {
/**
* Gets or sets the background color to use.
*/
get: function () {
return brushToString(this.i.f3);
},
set: function (v) {
this.i.f3 = stringToBrush(v);
this._a("activationBorder", brushToString(this.i.f3));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "errorBorder", {
/**
* Gets or sets the error border color to use.
*/
get: function () {
return brushToString(this.i.gi);
},
set: function (v) {
this.i.gi = stringToBrush(v);
this._a("errorBorder", brushToString(this.i.gi));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualBorder", {
/**
* Gets the actual border color that will be used.
*/
get: function () {
return brushToString(this.i.f8);
},
set: function (v) {
this.i.f8 = stringToBrush(v);
this._a("actualBorder", brushToString(this.i.f8));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "borderLeftWidth", {
/**
* Gets or sets the amount of left border to use for the cell content for this column.
*/
get: function () {
return this.i.cc;
},
set: function (v) {
this.i.cc = +v;
this._a("borderLeftWidth", this.i.cc);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "borderTopWidth", {
/**
* Gets or sets the amount of top border to use for the cell content for this column.
*/
get: function () {
return this.i.ce;
},
set: function (v) {
this.i.ce = +v;
this._a("borderTopWidth", this.i.ce);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "borderRightWidth", {
/**
* Gets or sets the amount of right border to use for the cell content of this column.
*/
get: function () {
return this.i.cd;
},
set: function (v) {
this.i.cd = +v;
this._a("borderRightWidth", this.i.cd);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "borderBottomWidth", {
/**
* Gets or sets the amount of bottom border to use for the cell content of this column.
*/
get: function () {
return this.i.cb;
},
set: function (v) {
this.i.cb = +v;
this._a("borderBottomWidth", this.i.cb);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "activationBorderLeftWidth", {
/**
* Gets or sets the amount of left activation border to use for the cell content for this column.
*/
get: function () {
return this.i.b4;
},
set: function (v) {
this.i.b4 = +v;
this._a("activationBorderLeftWidth", this.i.b4);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "activationBorderTopWidth", {
/**
* Gets or sets the amount of top activation border to use for the cell content for this column.
*/
get: function () {
return this.i.b6;
},
set: function (v) {
this.i.b6 = +v;
this._a("activationBorderTopWidth", this.i.b6);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "activationBorderRightWidth", {
/**
* Gets or sets the amount of right activation border to use for the cell content of this column.
*/
get: function () {
return this.i.b5;
},
set: function (v) {
this.i.b5 = +v;
this._a("activationBorderRightWidth", this.i.b5);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "activationBorderBottomWidth", {
/**
* Gets or sets the amount of bottom activation border to use for the cell content of this column.
*/
get: function () {
return this.i.b3;
},
set: function (v) {
this.i.b3 = +v;
this._a("activationBorderBottomWidth", this.i.b3);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "errorBorderLeftWidth", {
get: function () {
return this.i.cg;
},
set: function (v) {
this.i.cg = +v;
this._a("errorBorderLeftWidth", this.i.cg);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "errorBorderTopWidth", {
get: function () {
return this.i.ci;
},
set: function (v) {
this.i.ci = +v;
this._a("errorBorderTopWidth", this.i.ci);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "errorBorderRightWidth", {
get: function () {
return this.i.ch;
},
set: function (v) {
this.i.ch = +v;
this._a("errorBorderRightWidth", this.i.ch);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "errorBorderBottomWidth", {
get: function () {
return this.i.cf;
},
set: function (v) {
this.i.cf = +v;
this._a("errorBorderBottomWidth", this.i.cf);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualBackground", {
/**
* Gets the actual background color that will be used.
*/
get: function () {
return brushToString(this.i.f5);
},
set: function (v) {
this.i.f5 = stringToBrush(v);
this._a("actualBackground", brushToString(this.i.f5));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualActivationBorder", {
/**
* Gets the actual background color that will be used.
*/
get: function () {
return brushToString(this.i.f4);
},
set: function (v) {
this.i.f4 = stringToBrush(v);
this._a("actualActivationBorder", brushToString(this.i.f4));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualErrorBorder", {
/**
* Gets the actual error border color that will be used.
*/
get: function () {
return brushToString(this.i.f9);
},
set: function (v) {
this.i.f9 = stringToBrush(v);
this._a("actualErrorBorder", brushToString(this.i.f9));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "stickyRowBackground", {
/**
* Gets or sets the background color for content that sticks to the top of the grid.
*/
get: function () {
return brushToString(this.i.gw);
},
set: function (v) {
this.i.gw = stringToBrush(v);
this._a("stickyRowBackground", brushToString(this.i.gw));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualStickyRowBackground", {
/**
* Gets the actual background color for content that sticks to the top of the grid.
*/
get: function () {
return brushToString(this.i.gc);
},
set: function (v) {
this.i.gc = stringToBrush(v);
this._a("actualStickyRowBackground", brushToString(this.i.gc));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "pinnedRowBackground", {
/**
* Gets or sets the background color for cells belonging to rows marked as pinned.
*/
get: function () {
return brushToString(this.i.gv);
},
set: function (v) {
this.i.gv = stringToBrush(v);
this._a("pinnedRowBackground", brushToString(this.i.gv));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualPinnedRowBackground", {
/**
* Gets the actual background color for cells belonging to rows marked as pinned.
*/
get: function () {
return brushToString(this.i.gb);
},
set: function (v) {
this.i.gb = stringToBrush(v);
this._a("actualPinnedRowBackground", brushToString(this.i.gb));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "lastStickyRowBackground", {
/**
* Gets or sets the color for the last row in the sticky row area.
*/
get: function () {
return brushToString(this.i.gu);
},
set: function (v) {
this.i.gu = stringToBrush(v);
this._a("lastStickyRowBackground", brushToString(this.i.gu));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualLastStickyRowBackground", {
/**
* Gets the actual color for the last row in the sticky row area.
*/
get: function () {
return brushToString(this.i.ga);
},
set: function (v) {
this.i.ga = stringToBrush(v);
this._a("actualLastStickyRowBackground", brushToString(this.i.ga));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "contentOpacity", {
/**
* Gets or sets the opacity of the content.
*/
get: function () {
return this.i.bh;
},
set: function (v) {
this.i.bh = +v;
this._a("contentOpacity", this.i.bh);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "horizontalAlignment", {
/**
* Gets or sets the horizontal alignment to use for the cell content.
*/
get: function () {
return this.i.g;
},
set: function (v) {
this.i.g = ensureEnum(CellContentHorizontalAlignment_$type, v);
this._a("horizontalAlignment", enumToString(CellContentHorizontalAlignment_$type, this.i.g));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "verticalAlignment", {
/**
* Gets or sets the vertical alignment to use for the cell content.
*/
get: function () {
return this.i.l;
},
set: function (v) {
this.i.l = ensureEnum(CellContentVerticalAlignment_$type, v);
this._a("verticalAlignment", enumToString(CellContentVerticalAlignment_$type, this.i.l));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "lineBreakMode", {
/**
* Gets or sets the line breaking mode to use if text is present in the cell.
*/
get: function () {
return this.i.ac;
},
set: function (v) {
this.i.ac = ensureEnum(TextCellLineBreakMode_$type, v);
this._a("lineBreakMode", enumToString(TextCellLineBreakMode_$type, this.i.ac));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualLineBreakMode", {
/**
* Gets the actual line break mode which will be used if text is present in the cell.
*/
get: function () {
return this.i.ab;
},
set: function (v) {
this.i.ab = ensureEnum(TextCellLineBreakMode_$type, v);
this._a("actualLineBreakMode", enumToString(TextCellLineBreakMode_$type, this.i.ab));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "textColor", {
/**
* Gets or sets the color to use for displaying text.
*/
get: function () {
return brushToString(this.i.gx);
},
set: function (v) {
this.i.gx = stringToBrush(v);
this._a("textColor", brushToString(this.i.gx));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualTextColor", {
/**
* Gets the actual color used for displaying text.
*/
get: function () {
return brushToString(this.i.gd);
},
set: function (v) {
this.i.gd = stringToBrush(v);
this._a("actualTextColor", brushToString(this.i.gd));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "isBarSupported", {
/**
* Gets or sets whether the bar is supported.
*/
get: function () {
return this.i.ar;
},
set: function (v) {
this.i.ar = ensureBool(v);
this._a("isBarSupported", this.i.ar);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "barBackground", {
/**
* Gets or sets the color to use for value bars.
*/
get: function () {
return brushToString(this.i.gf);
},
set: function (v) {
this.i.gf = stringToBrush(v);
this._a("barBackground", brushToString(this.i.gf));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualBarBackground", {
/**
* Gets the actual color used for value bars.
*/
get: function () {
return brushToString(this.i.f6);
},
set: function (v) {
this.i.f6 = stringToBrush(v);
this._a("actualBarBackground", brushToString(this.i.f6));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "barOutline", {
/**
* Gets or sets the Outline color to use for value bars.
*/
get: function () {
return brushToString(this.i.gg);
},
set: function (v) {
this.i.gg = stringToBrush(v);
this._a("barOutline", brushToString(this.i.gg));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualBarOutline", {
/**
* Gets the actual Outline color used for value bars.
*/
get: function () {
return brushToString(this.i.f7);
},
set: function (v) {
this.i.f7 = stringToBrush(v);
this._a("actualBarOutline", brushToString(this.i.f7));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "barStrokeThickness", {
/**
* Gets or sets the stroke thickness to use for value bars.
*/
get: function () {
return this.i.ca;
},
set: function (v) {
this.i.ca = +v;
this._a("barStrokeThickness", this.i.ca);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualBarStrokeThickness", {
/**
* Gets the actual stroke thickness used for value bars.
*/
get: function () {
return this.i.b8;
},
set: function (v) {
this.i.b8 = +v;
this._a("actualBarStrokeThickness", this.i.b8);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "barCornerRadius", {
/**
* Gets or sets the stroke thickness to use for value bars.
*/
get: function () {
return this.i.b9;
},
set: function (v) {
this.i.b9 = +v;
this._a("barCornerRadius", this.i.b9);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualBarCornerRadius", {
/**
* Gets the actual stroke thickness used for value bars.
*/
get: function () {
return this.i.b7;
},
set: function (v) {
this.i.b7 = +v;
this._a("actualBarCornerRadius", this.i.b7);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "pinnedRowOpacity", {
/**
* Gets or sets the color to use for displaying text.
*/
get: function () {
return this.i.bm;
},
set: function (v) {
this.i.bm = +v;
this._a("pinnedRowOpacity", this.i.bm);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "actualPinnedRowOpacity", {
/**
* Gets or sets the color to use for displaying text.
*/
get: function () {
return this.i.bf;
},
set: function (v) {
this.i.bf = +v;
this._a("actualPinnedRowOpacity", this.i.bf);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "textStyle", {
get: function () {
if (this.i.textStyle == null) {
return null;
}
return this.i.textStyle.fontString;
},
set: function (v) {
var fi = new FontInfo();
fi.fontString = v;
this.i.textStyle = fi;
this._a("textStyle", this.i.textStyle != null ? this.i.textStyle.fontString : "");
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "isBarRequired", {
get: function () {
return this.i.aq;
},
enumerable: false,
configurable: true
});
IgcDefinitionBaseComponent.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.conditionalStyles != null && this.conditionalStyles.findByName && this.conditionalStyles.findByName(name)) {
return this.conditionalStyles.findByName(name);
}
return null;
};
IgcDefinitionBaseComponent.prototype.transitionStyleOut = function (style) {
this.i.e3((style == null ? null : style.i));
};
IgcDefinitionBaseComponent.prototype.transitionStyleIn = function (style) {
this.i.e2((style == null ? null : style.i));
};
IgcDefinitionBaseComponent.prototype.isStyleTransitioningOut = function (style) {
var iv = this.i.as((style == null ? null : style.i));
return (iv);
};
IgcDefinitionBaseComponent.prototype.setNamedValue = function (valueName, animationType, value) {
this.i.e1(valueName, (animationType == null ? null : animationType), value);
};
/**
* Returns if this definition has named value.
*/
IgcDefinitionBaseComponent.prototype.hasNamedValues = function () {
var iv = this.i.ap();
return (iv);
};
/**
* Returns if this definition has a named value with a given name.
* @param valueName * The named value name to check for.
*/
IgcDefinitionBaseComponent.prototype.hasNamedValue = function (valueName) {
var iv = this.i.ao(valueName);
return (iv);
};
/**
* Removes the named value from this definition by name.
* @param valueName * The named value name to remove.
*/
IgcDefinitionBaseComponent.prototype.removeNamedValue = function (valueName) {
this.i.ew(valueName);
};
/**
* Gets the value for a named value from this definition.
* @param valueName * The named value name to check for.
*/
IgcDefinitionBaseComponent.prototype.getNamedValue = function (valueName) {
var iv = this.i.co(valueName);
return (iv);
};
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "dataBinding", {
/**
* Called when a cell is data binding.
*/
get: function () {
return this._dataBinding;
},
set: function (ev) {
var _this = this;
if (this._dataBinding_wrapped !== null) {
this.i.dataBinding = delegateRemove(this.i.dataBinding, this._dataBinding_wrapped);
this._dataBinding_wrapped = null;
this._dataBinding = null;
}
this._dataBinding = ev;
this._dataBinding_wrapped = function (o, e) {
var outerArgs = new IgcDataBindingEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeDataBinding) {
_this.beforeDataBinding(_this, outerArgs);
}
if (_this._dataBinding) {
_this._dataBinding(_this, outerArgs);
}
};
this.i.dataBinding = delegateCombine(this.i.dataBinding, this._dataBinding_wrapped);
;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "dataBound", {
/**
* Called when a cell has been data bound.
*/
get: function () {
return this._dataBound;
},
set: function (ev) {
var _this = this;
if (this._dataBound_wrapped !== null) {
this.i.dataBound = delegateRemove(this.i.dataBound, this._dataBound_wrapped);
this._dataBound_wrapped = null;
this._dataBound = null;
}
this._dataBound = ev;
this._dataBound_wrapped = function (o, e) {
var outerArgs = new IgcDataBindingEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeDataBound) {
_this.beforeDataBound(_this, outerArgs);
}
if (_this._dataBound) {
_this._dataBound(_this, outerArgs);
}
};
this.i.dataBound = delegateCombine(this.i.dataBound, this._dataBound_wrapped);
;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcDefinitionBaseComponent.prototype, "cellStyleKeyRequested", {
/**
* Called when the style key for a cell is needed. Used for recycling the cell.
*/
get: function () {
return this._cellStyleKeyRequested;
},
set: function (ev) {
var _this = this;
if (this._cellStyleKeyRequested_wrapped !== null) {
this.i.cellStyleKeyRequested = delegateRemove(this.i.cellStyleKeyRequested, this._cellStyleKeyRequested_wrapped);
this._cellStyleKeyRequested_wrapped = null;
this._cellStyleKeyRequested = null;
}
this._cellStyleKeyRequested = ev;
this._cellStyleKeyRequested_wrapped = function (o, e) {
var outerArgs = new IgcCellStyleRequestedEventArgs();
outerArgs._provideImplementation(e);
if (_this.beforeCellStyleKeyRequested) {
_this.beforeCellStyleKeyRequested(_this, outerArgs);
}
if (_this._cellStyleKeyRequested) {
_this._cellStyleKeyRequested(_this, outerArgs);
}
};
this.i.cellStyleKeyRequested = delegateCombine(this.i.cellStyleKeyRequested, this._cellStyleKeyRequested_wrapped);
;
},
enumerable: false,
configurable: true
});
IgcDefinitionBaseComponent._observedAttributesIgcDefinitionBaseComponent = null;
return IgcDefinitionBaseComponent;
}(IgcHTMLElement));
export { IgcDefinitionBaseComponent };