igniteui-react-grids
Version:
Ignite UI React grid components.
147 lines (142 loc) • 3.81 kB
JavaScript
import { IgrColumnPropertySetter } from "./igr-column-property-setter";
import { ResponsivePhase as ResponsivePhase_internal } from "./ResponsivePhase";
/**
* Describes one phase of a responsive state to apply to the grid.
*/
export class IgrResponsivePhase {
createImplementation() {
return new ResponsivePhase_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 name of this responsive phase
*/
get name() {
return this.i.k;
}
set name(v) {
this.i.k = v;
}
/**
* The amount of time to delay the responsive phase from starting, in milliseconds
*/
get delayMilliseconds() {
return this.i.i;
}
set delayMilliseconds(v) {
this.i.i = +v;
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
}
/**
* Adds a column property setter to the phase.
* @param setter * The setter to add.
*/
addColumnPropertySetter(setter) {
let iv = this.i.g((setter == null ? null : setter.i));
let ret = null;
if (iv && iv.externalObject) {
ret = iv.externalObject;
}
else {
if (iv) {
let e = new IgrResponsivePhase();
e._implementation = iv;
iv.externalObject = e;
ret = e;
}
}
return ret;
}
/**
* Adds a column property setter to the phase, and returns it.
*/
columnPropertySetter() {
let iv = this.i.c();
let ret = null;
if (iv && iv.externalObject) {
ret = iv.externalObject;
}
else {
if (iv) {
let e = new IgrColumnPropertySetter();
e._implementation = iv;
iv.externalObject = e;
ret = e;
}
}
return ret;
}
/**
* Adds a column exchanger the the phase.
* @param exchanger * The exchanger to add.
*/
addColumnExchanger(exchanger) {
let iv = this.i.f((exchanger == null ? null : exchanger.i));
let ret = null;
if (iv && iv.externalObject) {
ret = iv.externalObject;
}
else {
if (iv) {
let e = new IgrResponsivePhase();
e._implementation = iv;
iv.externalObject = e;
ret = e;
}
}
return ret;
}
/**
* Adds a column exchanger to the phase and returns it.
*/
columnExchanger() {
let iv = this.i.h();
let ret = null;
if (iv && iv.externalObject) {
ret = iv.externalObject;
}
else {
if (iv) {
let e = new IgrResponsivePhase();
e._implementation = iv;
iv.externalObject = e;
ret = e;
}
}
return ret;
}
}