UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

358 lines (357 loc) 12.5 kB
/* 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 { GridBaseDirective } from "./GridBaseDirective"; import { markType } from "igniteui-react-core"; import { GridMasterDetailContext } from "./GridMasterDetailContext"; import { GroupByRecord } from "./GroupByRecord"; import { GroupingExpression } from "./GroupingExpression"; import { GroupByExpandState } from "./GroupByExpandState"; import { GridGroupingStrategy } from "./GridGroupingStrategy"; import { GroupByRowSelectorTemplateContext } from "./GroupByRowSelectorTemplateContext"; import { GroupByRowTemplateContext } from "./GroupByRowTemplateContext"; import { CellType } from "./CellType"; import { ForOfStateEventArgs } from "./ForOfStateEventArgs"; import { GroupingDoneEventArgs } from "./GroupingDoneEventArgs"; import { RowType } from "./RowType"; import { stringStartsWith } from "igniteui-react-core"; import { parseBool } from "igniteui-react-core"; /** * @hidden */ var Grid = /** @class */ /*@__PURE__*/ (function (_super) { __extends(Grid, _super); function Grid() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.hm = null; _this.hl = null; _this.hn = null; _this.ho = null; _this.dataPreLoad = null; _this.groupingDone = null; return _this; } Object.defineProperty(Grid.prototype, "hd", { get: function () { var ret_ = this.b9.n("groupsExpanded"); return ret_; }, set: function (a) { var value_ = a; this.b9.w("groupsExpanded", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "hq", { get: function () { return this.hm; }, set: function (a) { this.hm = a; this.b9.t("dropAreaTemplate", function (b) { return b; }, this.hm); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "hp", { get: function () { return this.hl; }, set: function (a) { this.hl = a; this.b9.t("detailTemplate", function (b) { return new GridMasterDetailContext(); }, this.hl); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "hu", { get: function () { var ret_ = this.b9.n("id"); return ret_; }, set: function (a) { var value_ = a; this.b9.w("id", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "g4", { get: function () { var ret_ = this.b9.m("groupsRecords", function (a) { return new GroupByRecord(); }); return ret_; }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "g0", { get: function () { var ret_ = this.b9.n("data"); return ret_; }, set: function (a) { var value_ = a; this.b9.w("data", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "hj", { get: function () { var ret_ = this.b9.n("totalItemCount"); return ret_; }, set: function (a) { var value_ = a; this.b9.w("totalItemCount", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "g3", { get: function () { var ret_ = this.b9.m("groupingExpressions", function (a) { return new GroupingExpression(); }); return ret_; }, set: function (a) { var value_ = a; this.b9.w("groupingExpressions", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "g2", { get: function () { var ret_ = this.b9.m("groupingExpansionState", function (a) { return new GroupByExpandState(); }); return ret_; }, set: function (a) { var value_ = a; this.b9.w("groupingExpansionState", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "he", { get: function () { var ret_ = this.b9.n("hideGroupedColumns"); return ret_; }, set: function (a) { var value_ = a; this.b9.w("hideGroupedColumns", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "g9", { get: function () { var ret_ = this.b9.m("groupStrategy", function (a) { return new GridGroupingStrategy(); }); return ret_; }, set: function (a) { var value_ = a; this.b9.w("groupStrategy", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "ht", { get: function () { var ret_ = this.b9.n("dropAreaMessage"); return ret_; }, set: function (a) { var value_ = a; this.b9.w("dropAreaMessage", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "hr", { get: function () { return this.hn; }, set: function (a) { this.hn = a; this.b9.t("groupByRowSelectorTemplate", function (b) { return new GroupByRowSelectorTemplateContext(); }, this.hn); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "hs", { get: function () { return this.ho; }, set: function (a) { this.ho = a; this.b9.t("groupRowTemplate", function (b) { return new GroupByRowTemplateContext(); }, this.ho); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "hh", { get: function () { var ret_ = this.b9.n("showGroupArea"); return ret_; }, set: function (a) { var value_ = a; this.b9.w("showGroupArea", value_); }, enumerable: false, configurable: true }); Object.defineProperty(Grid.prototype, "g5", { get: function () { var ret_ = this.b9.m("selectedCells", function (a) { return new CellType(); }); return ret_; }, enumerable: false, configurable: true }); Grid.prototype.dataPreLoadChanged = function () { var _this = this; if (this.dataPreLoad != null) { this.b9.s("dataPreLoad", function (a) { return _this.dataPreLoad(_this, ForOfStateEventArgs.b(a)); }, false); } else { this.b9.v("dataPreLoad"); } }; Grid.prototype.groupingDoneChanged = function () { var _this = this; if (this.groupingDone != null) { this.b9.s("groupingDone", function (a) { return _this.groupingDone(_this, GroupingDoneEventArgs.a(a)); }, false); } else { this.b9.v("groupingDone"); } }; Grid.prototype.h2 = function (a) { this.nativeElement.groupBy(this.b9.i(a)); }; Grid.prototype.hy = function (a) { this.nativeElement.clearGrouping(this.b9.i(a)); }; Grid.prototype.hf = function (a) { return (this.nativeElement.isExpandedGroup(this.b9.i(a))); }; Grid.prototype.h6 = function (a) { this.nativeElement.toggleGroup(this.b9.i(a)); }; Grid.prototype.h4 = function (a, b) { if (b === void 0) { b = false; } this.nativeElement.selectRowsInGroup(this.b9.i(a), this.b9.i(b)); }; Grid.prototype.h0 = function (a) { this.nativeElement.deselectRowsInGroup(this.b9.i(a)); }; Grid.prototype.h1 = function (a) { this.nativeElement.fullyExpandGroup(this.b9.i(a)); }; Grid.prototype.h5 = function () { this.nativeElement.toggleAllGroupRows(); }; Grid.prototype.g1 = function (a, b) { if (a === void 0) { a = false; } if (b === void 0) { b = false; } return (this.nativeElement.getSelectedData(this.b9.i(a), this.b9.i(b))); }; Grid.prototype.hb = function (a) { return this.b9.g(this.nativeElement.getRowByIndex(this.b9.i(a)), function (b) { return new RowType(); }); }; Grid.prototype.hc = function (a) { return this.b9.g(this.nativeElement.getRowByKey(this.b9.i(a)), function (b) { return new RowType(); }); }; Grid.prototype.g6 = function (a, b) { return this.b9.g(this.nativeElement.getCellByColumn(this.b9.i(a), this.b9.i(b)), function (c) { return new CellType(); }); }; Grid.prototype.g7 = function (a, b) { return this.b9.g(this.nativeElement.getCellByKey(this.b9.i(a), this.b9.i(b)), function (c) { return new CellType(); }); }; Grid.prototype.hg = function (a, b) { if (b === void 0) { b = -1; } return (this.nativeElement.pinRow(this.b9.i(a), this.b9.i(b))); }; Grid.prototype.hi = function (a) { return (this.nativeElement.unpinRow(this.b9.i(a))); }; Grid.prototype.beforeColumnInit = function (a, b) { var _a; var c = a; var d = b; var e = (_a = c.combinedColumnList) === null || _a === void 0 ? void 0 : _a.find(function (x) { return x.nativeElement === d.externalObject.detail.nativeElement; }); var f = (d.externalObject); if (e != null) { f.a = e; } }; Grid.prototype.hk = function (a) { if (a == null) { return null; } if (!stringStartsWith(a, "@@e:")) { return null; } a = a.substr(4); var b = a.split('@'); var c = b[0]; var d = b[1]; switch (c) { case "RowType": if (stringStartsWith(d, "Index:")) { d = d.substr(6); return this.externalObject.getRowByIndex(parseInt(d)); } else if (stringStartsWith(d, "Key:")) { d = d.substr(4); var g = this.g0; for (var f = 0; f < g.length; f++) { var e = g[f]; var h = e[this.ee]; if (h != null) { if ((typeof h == "string")) { return this.externalObject.getRowByKey(d); } if ((typeof h == "number")) { return this.externalObject.getRowByKey(parseFloat(d)); } if ((typeof h == "boolean")) { return this.externalObject.getRowByKey(parseBool(d)); } if ((h instanceof Date)) { return this.externalObject.getRowByKey(new Date(d)); } break; } } return this.externalObject.getRowByKey(d); } return null; } return null; }; Grid.prototype.hv = function (a) { this.nativeElement.addRow(a); }; Grid.prototype.hx = function (a) { this.nativeElement.beginAddRowByIndex(a); }; Grid.$t = markType(Grid, 'Grid', GridBaseDirective.$); return Grid; }(GridBaseDirective)); export { Grid };