igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
87 lines (85 loc) • 2.92 kB
JavaScript
import { ListSortDirection, ListSortDirection_$type } from "igniteui-react-core";
import { ChartSortDescription } from "./ChartSortDescription";
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 IgrChartSortDescription = /** @class */ /*@__PURE__*/ (function () {
function IgrChartSortDescription(field, sortDirection) {
if (field === void 0) {
field = null;
}
if (sortDirection === void 0) {
sortDirection = ListSortDirection.Ascending;
}
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
this.field = field;
this.sortDirection = sortDirection;
}
IgrChartSortDescription.prototype.createImplementation = function () {
return new ChartSortDescription(0);
};
Object.defineProperty(IgrChartSortDescription.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgrChartSortDescription.prototype.onImplementationCreated = function () {
};
IgrChartSortDescription.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
};
Object.defineProperty(IgrChartSortDescription.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(IgrChartSortDescription.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
});
IgrChartSortDescription.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.
*/
IgrChartSortDescription.prototype.equals = function (other) {
var iv = this.i.equals(other);
return (iv);
};
return IgrChartSortDescription;
}());
export { IgrChartSortDescription };