igniteui-react-grids
Version:
Ignite UI React grid components.
117 lines (116 loc) • 3.24 kB
JavaScript
import { SortingEventArgsDetail as SortingEventArgsDetail_internal } from "./SortingEventArgsDetail";
import { ensureBool } from "igniteui-react-core";
/**
* Represents event arguments related to sorting and grouping operations
* The event is cancelable
*/
export class IgrSortingEventArgsDetail {
createImplementation() {
return new SortingEventArgsDetail_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();
}
}
/**
* Optional
* Represents the sorting expressions applied to the grid.
* It can be a single sorting expression or an array of them
* The expression contains information like file name, whether the letter case should be taken into account, etc.
*/
get sortingExpressions() {
if (!this.i.b) {
return undefined;
}
let ret = [];
for (let i = 0; i < this.i.b.length; i++) {
let impl = this.i.b[i];
ret.push(impl.nativeElement);
}
return ret;
}
set sortingExpressions(v) {
let arr = [];
for (let i = 0; i < v.length; i++) {
arr.push(v[i]);
}
this.i.b = arr;
}
/**
* Optional
* Represents the grouping expressions applied to the grid.
* It can be a single grouping expression or an array of them
* The expression contains information like the sorting expression and criteria by which the elements will be grouped
*/
get groupingExpressions() {
if (!this.i.a) {
return undefined;
}
let ret = [];
for (let i = 0; i < this.i.a.length; i++) {
let impl = this.i.a[i];
ret.push(impl.nativeElement);
}
return ret;
}
set groupingExpressions(v) {
let arr = [];
for (let i = 0; i < v.length; i++) {
arr.push(v[i]);
}
this.i.a = arr;
}
/**
* Provides reference to the owner component.
*/
get owner() {
return this.i.h;
}
set owner(v) {
this.i.h = v;
}
/**
* Provides the ability to cancel the event.
*/
get cancel() {
return this.i.e;
}
set cancel(v) {
this.i.e = ensureBool(v);
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
}
setNativeElement(element) {
this.i.setNativeElement(element);
}
}