UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

112 lines (111 loc) 4.21 kB
import { __extends } from "tslib"; import { delegateCombine, delegateRemove } from "igniteui-react-core"; import { IgrGridBaseDirective } from "./igr-grid-base-directive"; import { IgrForOfStateEventArgs } from "./igr-for-of-state-event-args"; import { ensureBool } from "igniteui-react-core"; var IgrHierarchicalGridBaseDirective = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrHierarchicalGridBaseDirective, _super); function IgrHierarchicalGridBaseDirective(props) { var _this = _super.call(this, props) || this; _this._dataPreLoad = null; _this._dataPreLoad_wrapped = null; return _this; } Object.defineProperty(IgrHierarchicalGridBaseDirective.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrHierarchicalGridBaseDirective.prototype, "hasChildrenKey", { get: function () { return this.i.g3; }, set: function (v) { this.i.g3 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrHierarchicalGridBaseDirective.prototype, "showExpandAll", { get: function () { return this.i.g2; }, set: function (v) { this.i.g2 = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrHierarchicalGridBaseDirective.prototype, "rootGrid", { get: function () { var r = this.i.g1; if (r == null) { return null; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.g1 = null : this.i.g1 = v.i; }, enumerable: false, configurable: true }); IgrHierarchicalGridBaseDirective.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.rootGrid && this.rootGrid.name && this.rootGrid.name == name) { return this.rootGrid; } return null; }; IgrHierarchicalGridBaseDirective.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.rootGrid && this.rootGrid._styling) { this.rootGrid._styling(container, component, this); } this._inStyling = false; }; Object.defineProperty(IgrHierarchicalGridBaseDirective.prototype, "dataPreLoad", { get: function () { return this._dataPreLoad; }, set: function (ev) { var _this = this; if (this._dataPreLoad_wrapped !== null) { this.i.dataPreLoad = delegateRemove(this.i.dataPreLoad, this._dataPreLoad_wrapped); this._dataPreLoad_wrapped = null; this._dataPreLoad = null; } this._dataPreLoad = ev; this._dataPreLoad_wrapped = function (o, e) { var outerArgs = new IgrForOfStateEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeDataPreLoad) { _this.beforeDataPreLoad(_this, outerArgs); } if (_this._dataPreLoad) { _this._dataPreLoad(_this, outerArgs); } }; this.i.dataPreLoad = delegateCombine(this.i.dataPreLoad, this._dataPreLoad_wrapped); if (this.i.dataPreLoadChanged) { this.i.dataPreLoadChanged(); } ; }, enumerable: false, configurable: true }); return IgrHierarchicalGridBaseDirective; }(IgrGridBaseDirective)); export { IgrHierarchicalGridBaseDirective };