igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
79 lines (77 loc) • 2.75 kB
JavaScript
import { ListSortDirection_$type } from "./ListSortDirection";
import { DataSourceSortDescription as DataSourceSortDescription_internal } from "./DataSourceSortDescription";
import { ensureEnum } from "./componentUtil";
var IgxDataSourceSortDescription = /** @class */ /*@__PURE__*/ (function () {
function IgxDataSourceSortDescription() {
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgxDataSourceSortDescription.prototype.createImplementation = function () {
return new DataSourceSortDescription_internal(0);
};
Object.defineProperty(IgxDataSourceSortDescription.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgxDataSourceSortDescription.prototype.onImplementationCreated = function () {
};
IgxDataSourceSortDescription.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
};
Object.defineProperty(IgxDataSourceSortDescription.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(IgxDataSourceSortDescription.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
});
IgxDataSourceSortDescription.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.
*/
IgxDataSourceSortDescription.prototype.equals = function (other) {
var iv = this.i.equals(other);
return (iv);
};
return IgxDataSourceSortDescription;
}());
export { IgxDataSourceSortDescription };