igniteui-react-grids
Version:
Ignite UI React grid components.
127 lines (126 loc) • 4.24 kB
JavaScript
import { __extends } from "tslib";
import { IgrExpressionTree } from "./igr-expression-tree";
import { IgrFilteringExpressionsTreeOrFilteringExpression } from "./igr-filtering-expressions-tree-or-filtering-expression";
import { FilteringExpression as FilteringExpression_internal } from "./FilteringExpression";
import { interfaceToInternal, ensureBool } from "igniteui-react-core";
import { FilteringOperation } from "./FilteringOperation";
/**
* Represents filtering expressions.
*/
var IgrFilteringExpression = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrFilteringExpression, _super);
function IgrFilteringExpression() {
return _super.call(this) || this;
}
IgrFilteringExpression.prototype.createImplementation = function () {
var impl = new FilteringExpression_internal();
if (impl.setNativeElement) {
impl.setNativeElement({});
}
return impl;
};
Object.defineProperty(IgrFilteringExpression.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFilteringExpression.prototype, "fieldName", {
get: function () {
return this.i.j;
},
set: function (v) {
this.i.j = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFilteringExpression.prototype, "condition", {
get: function () {
return this.i.b.nativeElement;
},
set: function (v) {
this.i.b = interfaceToInternal(v, function () { return new FilteringOperation(); });
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFilteringExpression.prototype, "conditionName", {
get: function () {
return this.i.i;
},
set: function (v) {
this.i.i = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFilteringExpression.prototype, "searchVal", {
get: function () {
return this.i.h;
},
set: function (v) {
this.i.h = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFilteringExpression.prototype, "searchTree", {
get: function () {
var r = this.i.a;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = new IgrExpressionTree();
if (r.$type) {
e._implementation = r;
}
else {
if (e.i.setNativeElement) {
e.i.setNativeElement(r);
}
}
r.externalObject = e;
}
return r.externalObject;
},
set: function (v) {
v == null ? this.i.a = null : this.i.a = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrFilteringExpression.prototype, "ignoreCase", {
get: function () {
return this.i.e;
},
set: function (v) {
this.i.e = ensureBool(v);
},
enumerable: false,
configurable: true
});
IgrFilteringExpression.prototype.findByName = function (name) {
var baseResult = _super.prototype.findByName.call(this, name);
if (baseResult) {
return baseResult;
}
if (this.condition && this.condition.name && this.condition.name == name) {
return this.condition;
}
if (this.searchTree && this.searchTree.name && this.searchTree.name == name) {
return this.searchTree;
}
return null;
};
IgrFilteringExpression.prototype.setNativeElement = function (element) {
this.i.setNativeElement(element);
};
return IgrFilteringExpression;
}(IgrFilteringExpressionsTreeOrFilteringExpression));
export { IgrFilteringExpression };