UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

200 lines (199 loc) 8.35 kB
import { IgrGridSelectedCellRangesCollection } from "./igr-grid-selected-cell-ranges-collection"; import { GridSelectedCellRangesChangedEventArgs as GridSelectedCellRangesChangedEventArgs_internal } from "./GridSelectedCellRangesChangedEventArgs"; import { GridSelectedCellRangesCollection as GridSelectedCellRangesCollection_internal } from "./GridSelectedCellRangesCollection"; import { CellRange } from "./CellRange"; import { SyncableObservableCollection$1 } from "igniteui-react-core"; /** * Information about the change to the selected cell ranges in the grid. */ var IgrGridSelectedCellRangesChangedEventArgs = /** @class */ /*@__PURE__*/ (function () { function IgrGridSelectedCellRangesChangedEventArgs() { this.mounted = false; this._currentRanges = null; this._addedRanges = null; this._removedRanges = null; this._updatedRanges = null; this._implementation = this.createImplementation(); this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } } IgrGridSelectedCellRangesChangedEventArgs.prototype.createImplementation = function () { return new GridSelectedCellRangesChangedEventArgs_internal(); }; Object.defineProperty(IgrGridSelectedCellRangesChangedEventArgs.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridSelectedCellRangesChangedEventArgs.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgrGridSelectedCellRangesChangedEventArgs.prototype.onImplementationCreated = function () { }; IgrGridSelectedCellRangesChangedEventArgs.prototype._provideImplementation = function (i) { this._implementation = i; this._implementation.externalObject = this; this.onImplementationCreated(); if (this._initializeAdapters) { this._initializeAdapters(); } }; Object.defineProperty(IgrGridSelectedCellRangesChangedEventArgs.prototype, "currentRanges", { /** * The cell ranges currently in the selection. */ get: function () { if (this._currentRanges === null) { var coll = new IgrGridSelectedCellRangesCollection(); var innerColl = this.i.currentRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } this._currentRanges = coll._fromInner(innerColl); this.i.currentRanges = innerColl; } return this._currentRanges; }, set: function (v) { if (this._currentRanges !== null) { this._currentRanges._setSyncTarget(null); this._currentRanges = null; } var coll = new IgrGridSelectedCellRangesCollection(); this._currentRanges = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(CellRange.$type); var innerColl = this.i.currentRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._currentRanges._setSyncTarget(syncColl); this.i.currentRanges = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridSelectedCellRangesChangedEventArgs.prototype, "addedRanges", { /** * The cell ranges added to the selection. */ get: function () { if (this._addedRanges === null) { var coll = new IgrGridSelectedCellRangesCollection(); var innerColl = this.i.addedRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } this._addedRanges = coll._fromInner(innerColl); this.i.addedRanges = innerColl; } return this._addedRanges; }, set: function (v) { if (this._addedRanges !== null) { this._addedRanges._setSyncTarget(null); this._addedRanges = null; } var coll = new IgrGridSelectedCellRangesCollection(); this._addedRanges = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(CellRange.$type); var innerColl = this.i.addedRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._addedRanges._setSyncTarget(syncColl); this.i.addedRanges = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridSelectedCellRangesChangedEventArgs.prototype, "removedRanges", { /** * The cell ranges removed from the selection. */ get: function () { if (this._removedRanges === null) { var coll = new IgrGridSelectedCellRangesCollection(); var innerColl = this.i.removedRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } this._removedRanges = coll._fromInner(innerColl); this.i.removedRanges = innerColl; } return this._removedRanges; }, set: function (v) { if (this._removedRanges !== null) { this._removedRanges._setSyncTarget(null); this._removedRanges = null; } var coll = new IgrGridSelectedCellRangesCollection(); this._removedRanges = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(CellRange.$type); var innerColl = this.i.removedRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._removedRanges._setSyncTarget(syncColl); this.i.removedRanges = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridSelectedCellRangesChangedEventArgs.prototype, "updatedRanges", { /** * The cell ranges that have been updated by the grid. */ get: function () { if (this._updatedRanges === null) { var coll = new IgrGridSelectedCellRangesCollection(); var innerColl = this.i.updatedRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } this._updatedRanges = coll._fromInner(innerColl); this.i.updatedRanges = innerColl; } return this._updatedRanges; }, set: function (v) { if (this._updatedRanges !== null) { this._updatedRanges._setSyncTarget(null); this._updatedRanges = null; } var coll = new IgrGridSelectedCellRangesCollection(); this._updatedRanges = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(CellRange.$type); var innerColl = this.i.updatedRanges; if (!innerColl) { innerColl = new GridSelectedCellRangesCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._updatedRanges._setSyncTarget(syncColl); this.i.updatedRanges = innerColl; }, enumerable: false, configurable: true }); return IgrGridSelectedCellRangesChangedEventArgs; }()); export { IgrGridSelectedCellRangesChangedEventArgs };