UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

183 lines (182 loc) 7.63 kB
import { DataSourceSchemaPropertyType_$type } from "igniteui-react-core"; import { IgrGridFilterDialogViewModelGroupingLevelCollection } from "./igr-grid-filter-dialog-view-model-grouping-level-collection"; import { IgrGridFilterDialogViewModelRowCollection } from "./igr-grid-filter-dialog-view-model-row-collection"; import { GridFilterDialogViewModel as GridFilterDialogViewModel_internal } from "./GridFilterDialogViewModel"; import { ensureEnum, ensureBool } from "igniteui-react-core"; import { GridFilterDialogViewModelGroupingLevelCollection as GridFilterDialogViewModelGroupingLevelCollection_internal } from "./GridFilterDialogViewModelGroupingLevelCollection"; import { GridFilterDialogViewModelGroupingLevel } from "./GridFilterDialogViewModelGroupingLevel"; import { SyncableObservableCollection$1 } from "igniteui-react-core"; import { GridFilterDialogViewModelRowCollection as GridFilterDialogViewModelRowCollection_internal } from "./GridFilterDialogViewModelRowCollection"; import { GridFilterDialogViewModelRow } from "./GridFilterDialogViewModelRow"; var IgrGridFilterDialogViewModel = /** @class */ /*@__PURE__*/ (function () { function IgrGridFilterDialogViewModel() { this.mounted = false; this._groupingLevels = null; this._rows = null; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrGridFilterDialogViewModel.prototype.createImplementation = function () { return new GridFilterDialogViewModel_internal(); }; Object.defineProperty(IgrGridFilterDialogViewModel.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridFilterDialogViewModel.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrGridFilterDialogViewModel.prototype.onImplementationCreated = function () { }; IgrGridFilterDialogViewModel.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrGridFilterDialogViewModel.prototype, "propertyType", { get: function () { return this.i.a; }, set: function (v) { this.i.a = ensureEnum(DataSourceSchemaPropertyType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridFilterDialogViewModel.prototype, "groupingLevels", { get: function () { if (this._groupingLevels === null) { var coll = new IgrGridFilterDialogViewModelGroupingLevelCollection(); var innerColl = this.i.e; if (!innerColl) { innerColl = new GridFilterDialogViewModelGroupingLevelCollection_internal(); } this._groupingLevels = coll._fromInner(innerColl); this.i.e = innerColl; } return this._groupingLevels; }, set: function (v) { if (this._groupingLevels !== null) { this._groupingLevels._setSyncTarget(null); this._groupingLevels = null; } var coll = new IgrGridFilterDialogViewModelGroupingLevelCollection(); this._groupingLevels = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(GridFilterDialogViewModelGroupingLevel.$type); var innerColl = this.i.e; if (!innerColl) { innerColl = new GridFilterDialogViewModelGroupingLevelCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._groupingLevels._setSyncTarget(syncColl); this.i.e = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridFilterDialogViewModel.prototype, "isTopLevelOr", { get: function () { return this.i.k; }, set: function (v) { this.i.k = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridFilterDialogViewModel.prototype, "maxGroupingLevels", { get: function () { return this.i.m; }, set: function (v) { this.i.m = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridFilterDialogViewModel.prototype, "rows", { get: function () { if (this._rows === null) { var coll = new IgrGridFilterDialogViewModelRowCollection(); var innerColl = this.i.f; if (!innerColl) { innerColl = new GridFilterDialogViewModelRowCollection_internal(); } this._rows = coll._fromInner(innerColl); this.i.f = innerColl; } return this._rows; }, set: function (v) { if (this._rows !== null) { this._rows._setSyncTarget(null); this._rows = null; } var coll = new IgrGridFilterDialogViewModelRowCollection(); this._rows = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(GridFilterDialogViewModelRow.$type); var innerColl = this.i.f; if (!innerColl) { innerColl = new GridFilterDialogViewModelRowCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._rows._setSyncTarget(syncColl); this.i.f = innerColl; }, enumerable: false, configurable: true }); IgrGridFilterDialogViewModel.prototype.findByName = function (name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.rows != null && this.rows.findByName && this.rows.findByName(name)) { return this.rows.findByName(name); } return null; }; IgrGridFilterDialogViewModel.prototype.addNewRow = function () { this.i.n(); }; IgrGridFilterDialogViewModel.prototype.canGroupRange = function (startIndex, endIndex) { var iv = this.i.h(startIndex, endIndex); return (iv); }; IgrGridFilterDialogViewModel.prototype.ungroupRange = function (startIndex, endIndex) { this.i.aa(startIndex, endIndex); }; IgrGridFilterDialogViewModel.prototype.targetingRange = function (startIndex, endIndex) { var iv = this.i.l(startIndex, endIndex); return (iv); }; IgrGridFilterDialogViewModel.prototype.toggleRange = function (startIndex, endIndex) { this.i.z(startIndex, endIndex); }; IgrGridFilterDialogViewModel.prototype.groupRange = function (startIndex, endIndex, isOrGrouping) { this.i.o(startIndex, endIndex, isOrGrouping); }; return IgrGridFilterDialogViewModel; }()); export { IgrGridFilterDialogViewModel };