igniteui-react-grids
Version:
Ignite UI React grid components.
99 lines (98 loc) • 2.83 kB
JavaScript
import { IgrFilteringExpressionsTree } from "./igr-filtering-expressions-tree";
import { FilteringEventArgsDetail as FilteringEventArgsDetail_internal } from "./FilteringEventArgsDetail";
import { ensureBool } from "igniteui-react-core";
/**
* Represents event arguments related to filtering operations
* The event is cancelable
*/
export class IgrFilteringEventArgsDetail {
createImplementation() {
return new FilteringEventArgsDetail_internal();
}
get nativeElement() {
return this._implementation.nativeElement;
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
onImplementationCreated() {
}
constructor() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
_provideImplementation(i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
/**
* Represents the filtering expressions applied to the grid.
* The expression contains information like filtering operands and operator, an expression or condition, etc.
*/
get filteringExpressions() {
const r = this.i.a;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = new IgrFilteringExpressionsTree();
if (r.$type) {
e._implementation = r;
}
else {
if (e.i.setNativeElement) {
e.i.setNativeElement(r);
}
}
r.externalObject = e;
}
return r.externalObject;
}
set filteringExpressions(v) {
v == null ? this.i.a = null : this.i.a = v.i;
}
/**
* Provides reference to the owner component.
*/
get owner() {
return this.i.g;
}
set owner(v) {
this.i.g = v;
}
/**
* Provides the ability to cancel the event.
*/
get cancel() {
return this.i.d;
}
set cancel(v) {
this.i.d = ensureBool(v);
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.filteringExpressions && this.filteringExpressions.name && this.filteringExpressions.name == name) {
return this.filteringExpressions;
}
return null;
}
setNativeElement(element) {
this.i.setNativeElement(element);
}
}