UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

138 lines (137 loc) 4.78 kB
import { FilteringExpressionsTreeType_$type } from "./FilteringExpressionsTreeType"; import { FilteringLogic_$type } from "./FilteringLogic"; import { FilteringExpressionsTree as FilteringExpressionsTree_internal } from "./FilteringExpressionsTree"; import { ensureEnum } from "igniteui-react-core"; import { IgrFilteringExpressionsTreeOrFilteringExpression } from "./igr-filtering-expressions-tree-or-filtering-expression"; var IgrFilteringExpressionsTree = /** @class */ /*@__PURE__*/ (function () { function IgrFilteringExpressionsTree() { this.mounted = false; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrFilteringExpressionsTree.prototype.createImplementation = function () { var impl = new FilteringExpressionsTree_internal(); if (impl.setNativeElement) { impl.setNativeElement({}); } return impl; }; Object.defineProperty(IgrFilteringExpressionsTree.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrFilteringExpressionsTree.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrFilteringExpressionsTree.prototype.onImplementationCreated = function () { }; IgrFilteringExpressionsTree.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrFilteringExpressionsTree.prototype, "filteringOperands", { get: function () { if (!this.i.a) { return undefined; } var ret = []; for (var i = 0; i < this.i.a.length; i++) { var impl = this.i.a[i]; if (!impl.externalObject) { if (impl instanceof IgrFilteringExpressionsTreeOrFilteringExpression) { ret.push(impl); continue; } var e = new IgrFilteringExpressionsTreeOrFilteringExpression(); e._implementation = impl; impl.externalObject = e; } ret.push(impl.externalObject); } return ret; }, set: function (v) { var arr = []; for (var i = 0; i < v.length; i++) { arr.push(v[i].i); } this.i.a = arr; }, enumerable: false, configurable: true }); Object.defineProperty(IgrFilteringExpressionsTree.prototype, "type", { get: function () { return this.i.b; }, set: function (v) { this.i.b = ensureEnum(FilteringExpressionsTreeType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrFilteringExpressionsTree.prototype, "owner", { /** * Provides reference to the owner component. */ get: function () { return this.i.h; }, set: function (v) { this.i.h = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrFilteringExpressionsTree.prototype, "operator", { get: function () { return this.i.c; }, set: function (v) { this.i.c = ensureEnum(FilteringLogic_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrFilteringExpressionsTree.prototype, "fieldName", { get: function () { return this.i.i; }, set: function (v) { this.i.i = v; }, enumerable: false, configurable: true }); IgrFilteringExpressionsTree.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } return null; }; IgrFilteringExpressionsTree.prototype.setNativeElement = function (element) { this.i.setNativeElement(element); }; return IgrFilteringExpressionsTree; }()); export { IgrFilteringExpressionsTree };