igniteui-react-grids
Version:
Ignite UI React grid components.
80 lines (79 loc) • 2.16 kB
JavaScript
import { ValuesChangeDetail as ValuesChangeDetail_internal } from "./ValuesChangeDetail";
import { IgrPivotValue } from "./igr-pivot-value";
/**
* Event emitted when values list is changed.
*/
export class IgrValuesChangeDetail {
createImplementation() {
return new ValuesChangeDetail_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();
}
}
/**
* The new list of values.
*/
get values() {
if (!this.i.a) {
return undefined;
}
let ret = [];
for (let i = 0; i < this.i.a.length; i++) {
let impl = this.i.a[i];
if (!impl.externalObject) {
if (impl instanceof IgrPivotValue) {
ret.push(impl);
continue;
}
let e = new IgrPivotValue();
e._implementation = impl;
impl.externalObject = e;
}
ret.push(impl.externalObject);
}
return ret;
}
set values(v) {
let arr = [];
for (let i = 0; i < v.length; i++) {
arr.push(v[i].i);
}
this.i.a = arr;
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
}
setNativeElement(element) {
this.i.setNativeElement(element);
}
}