igniteui-webcomponents-grids
Version:
Ignite UI Web Components grid components.
78 lines (77 loc) • 3.14 kB
JavaScript
import { IgcGridColumnCollection } from "./igc-grid-column-collection";
import { GridColumnsAutoGeneratedEventArgs as GridColumnsAutoGeneratedEventArgs_internal } from "./GridColumnsAutoGeneratedEventArgs";
import { GridColumnCollection as GridColumnCollection_internal } from "./GridColumnCollection";
import { DataGridColumn } from "./DataGridColumn";
import { SyncableObservableCollection$1 } from "igniteui-webcomponents-core";
/**
* Information about the generated columns.
*/
var IgcGridColumnsAutoGeneratedEventArgs = /** @class */ /*@__PURE__*/ (function () {
function IgcGridColumnsAutoGeneratedEventArgs() {
this._columns = null;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
IgcGridColumnsAutoGeneratedEventArgs.prototype.createImplementation = function () {
return new GridColumnsAutoGeneratedEventArgs_internal();
};
Object.defineProperty(IgcGridColumnsAutoGeneratedEventArgs.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcGridColumnsAutoGeneratedEventArgs.prototype.onImplementationCreated = function () {
};
IgcGridColumnsAutoGeneratedEventArgs.prototype._provideImplementation = function (i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
};
Object.defineProperty(IgcGridColumnsAutoGeneratedEventArgs.prototype, "columns", {
get: function () {
if (this._columns === null) {
var coll = new IgcGridColumnCollection();
var innerColl = this.i.columns;
if (!innerColl) {
innerColl = new GridColumnCollection_internal();
}
this._columns = coll._fromInner(innerColl);
this.i.columns = innerColl;
}
return this._columns;
},
set: function (v) {
if (this._columns !== null) {
this._columns._setSyncTarget(null);
this._columns = null;
}
var coll = new IgcGridColumnCollection();
this._columns = coll._fromOuter(v);
var syncColl = new SyncableObservableCollection$1(DataGridColumn.$type);
var innerColl = this.i.columns;
if (!innerColl) {
innerColl = new GridColumnCollection_internal();
}
syncColl._inner = innerColl;
syncColl.clear();
this._columns._setSyncTarget(syncColl);
this.i.columns = innerColl;
},
enumerable: false,
configurable: true
});
return IgcGridColumnsAutoGeneratedEventArgs;
}());
export { IgcGridColumnsAutoGeneratedEventArgs };