igniteui-react-grids
Version:
Ignite UI React grid components.
79 lines (78 loc) • 2.92 kB
JavaScript
import { __extends } from "tslib";
import { IgrColumn } from "./igr-column";
import { IgrBaseEventArgsDetail } from "./igr-base-event-args-detail";
import { ColumnMovingEventArgsDetail as ColumnMovingEventArgsDetail_internal } from "./ColumnMovingEventArgsDetail";
import { ensureBool } from "igniteui-react-core";
/**
* Represents event arguments related to a column moving operation in a grid
*/
var IgrColumnMovingEventArgsDetail = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrColumnMovingEventArgsDetail, _super);
function IgrColumnMovingEventArgsDetail() {
return _super.call(this) || this;
}
IgrColumnMovingEventArgsDetail.prototype.createImplementation = function () {
return new ColumnMovingEventArgsDetail_internal();
};
Object.defineProperty(IgrColumnMovingEventArgsDetail.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnMovingEventArgsDetail.prototype, "source", {
/**
* Represents the column that is being moved.
* The `ColumnType` contains the information (the grid it belongs to, css data, settings, etc.) of the column in its properties
*/
get: function () {
var r = this.i.g;
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.g = null : this.i.g = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnMovingEventArgsDetail.prototype, "cancel", {
/**
* `cancel` returns whether the event has been intercepted and stopped
* If the value becomes "true", it returns/exits from the method, instantiating the interface
*/
get: function () {
return this.i.h;
},
set: function (v) {
this.i.h = ensureBool(v);
},
enumerable: false,
configurable: true
});
IgrColumnMovingEventArgsDetail.prototype.findByName = function (name) {
var baseResult = _super.prototype.findByName.call(this, name);
if (baseResult) {
return baseResult;
}
if (this.source && this.source.name && this.source.name == name) {
return this.source;
}
return null;
};
return IgrColumnMovingEventArgsDetail;
}(IgrBaseEventArgsDetail));
export { IgrColumnMovingEventArgsDetail };