igniteui-react-grids
Version:
Ignite UI React grid components.
57 lines (56 loc) • 2.26 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { JsonDictionaryItem } from "igniteui-react-core";
import { toNullable, markType } from "igniteui-react-core";
import { ListSortDirection_$type } from "igniteui-react-core";
import { nullableNotEquals, unwrapNullable, nullableConcat } from "igniteui-react-core";
/**
* @hidden
*/
var SaveLayoutSortInfo = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SaveLayoutSortInfo, _super);
function SaveLayoutSortInfo() {
var _this = _super.call(this) || this;
_this.f = null;
_this.e = toNullable(ListSortDirection_$type, null);
_this.f = null;
_this.e = toNullable(ListSortDirection_$type, null);
return _this;
}
SaveLayoutSortInfo.prototype.g = function (a) {
var b = a;
if (b.g("ColumnName")) {
var c = b.item("ColumnName");
this.f = c.value.toString();
}
if (b.g("SortDirection")) {
var d = b.item("SortDirection");
this.e = toNullable(ListSortDirection_$type, parseInt(d.value.toString()));
}
else {
this.e = toNullable(ListSortDirection_$type, null);
}
};
SaveLayoutSortInfo.prototype.d = function (a) {
a.i("{");
a.h();
a.g();
a.i("\"ColumnName\": " + "\"" + this.f + "\"");
if (nullableNotEquals(this.e, null)) {
a.i(",");
a.h();
a.i(nullableConcat("\"SortDirection\": ", unwrapNullable(this.e)));
}
a.h();
a.e();
a.i("}");
};
SaveLayoutSortInfo.$t = markType(SaveLayoutSortInfo, 'SaveLayoutSortInfo', JsonDictionaryItem.$);
return SaveLayoutSortInfo;
}(JsonDictionaryItem));
export { SaveLayoutSortInfo };