igniteui-react-grids
Version:
Ignite UI React grid components.
93 lines (91 loc) • 3.16 kB
JavaScript
import { ListSortDirection_$type } from "igniteui-react-core";
import { ColumnSortDescription as ColumnSortDescription_internal } from "./ColumnSortDescription";
import { ensureEnum } from "igniteui-react-core";
/**
* Represents an element in the current sort applied to a data source or provider. Changes to this object are not observed or expected after it is initially assigned to a collection.
*/
var IgrColumnSortDescription = /** @class */ /*@__PURE__*/ (function () {
function IgrColumnSortDescription() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgrColumnSortDescription.prototype.createImplementation = function () {
return new ColumnSortDescription_internal(0);
};
Object.defineProperty(IgrColumnSortDescription.prototype, "nativeElement", {
get: function () {
return this._implementation.nativeElement;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnSortDescription.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrColumnSortDescription.prototype.onImplementationCreated = function () {
};
IgrColumnSortDescription.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
};
Object.defineProperty(IgrColumnSortDescription.prototype, "field", {
/**
* Gets or sets the property being sorted.
*/
get: function () {
return this.i.f;
},
set: function (v) {
this.i.f = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrColumnSortDescription.prototype, "sortDirection", {
/**
* Gets or sets the direction to sort based on the property.
*/
get: function () {
return this.i.c;
},
set: function (v) {
this.i.c = ensureEnum(ListSortDirection_$type, v);
},
enumerable: false,
configurable: true
});
IgrColumnSortDescription.prototype.findByName = function (name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
};
/**
* Returns if the SortDescription is equal to another.
* @param other * The SortDescription to compare to.
*/
IgrColumnSortDescription.prototype.equals = function (other) {
var iv = this.i.equals(other);
return (iv);
};
return IgrColumnSortDescription;
}());
export { IgrColumnSortDescription };