igniteui-react-grids
Version:
Ignite UI React grid components.
130 lines (129 loc) • 4.82 kB
JavaScript
import { IgrColumn } from "./igr-column";
import { PinColumnCancellableEventArgsDetail as PinColumnCancellableEventArgsDetail_internal } from "./PinColumnCancellableEventArgsDetail";
import { ensureBool } from "igniteui-react-core";
/**
* The event arguments before a column's pin state is changed.
* `insertAtIndex`specifies at which index in the pinned/unpinned area the column is inserted.
* Can be changed in the `columnPin` event.
* `isPinned` returns the actual pin state of the column. When pinning/unpinning is successful,
* the value of `isPinned` will change accordingly when read in the "-ing" and "-ed" event.
*/
var IgrPinColumnCancellableEventArgsDetail = /** @class */ /*@__PURE__*/ (function () {
function IgrPinColumnCancellableEventArgsDetail() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgrPinColumnCancellableEventArgsDetail.prototype.createImplementation = function () {
return new PinColumnCancellableEventArgsDetail_internal();
};
Object.defineProperty(IgrPinColumnCancellableEventArgsDetail.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPinColumnCancellableEventArgsDetail.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrPinColumnCancellableEventArgsDetail.prototype.onImplementationCreated = function () {
};
IgrPinColumnCancellableEventArgsDetail.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
};
Object.defineProperty(IgrPinColumnCancellableEventArgsDetail.prototype, "column", {
get: function () {
var r = this.i.a;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgrColumn._createFromInternal(r);
if (e) {
e._implementation = 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(IgrPinColumnCancellableEventArgsDetail.prototype, "insertAtIndex", {
/**
* If pinned, specifies at which index in the pinned area the column is inserted.
* If unpinned, specifies at which index in the unpinned area the column is inserted.
*/
get: function () {
return this.i.f;
},
set: function (v) {
this.i.f = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPinColumnCancellableEventArgsDetail.prototype, "isPinned", {
/**
* Returns the actual pin state of the column.
* If pinning/unpinning is successful, value of `isPinned` will change accordingly when read in the "-ing" and "-ed" event.
*/
get: function () {
return this.i.e;
},
set: function (v) {
this.i.e = ensureBool(v);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPinColumnCancellableEventArgsDetail.prototype, "cancel", {
/**
* Provides the ability to cancel the event.
*/
get: function () {
return this.i.d;
},
set: function (v) {
this.i.d = ensureBool(v);
},
enumerable: false,
configurable: true
});
IgrPinColumnCancellableEventArgsDetail.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.column && this.column.name && this.column.name == name) {
return this.column;
}
return null;
};
IgrPinColumnCancellableEventArgsDetail.prototype.setNativeElement = function (element) {
this.i.setNativeElement(element);
};
return IgrPinColumnCancellableEventArgsDetail;
}());
export { IgrPinColumnCancellableEventArgsDetail };