ag-grid-angular
Version:

1,244 lines (1,239 loc) • 102 kB
JavaScript
import { __rest, __decorate, __metadata, __extends } from 'tslib';
import { ContentChildren, QueryList, Input, Component, NgZone, Injectable, EventEmitter, ElementRef, ViewContainerRef, ComponentFactoryResolver, Output, ViewEncapsulation, ANALYZE_FOR_ENTRY_COMPONENTS, NgModule } from '@angular/core';
import { VanillaFrameworkOverrides, BaseComponentWrapper, AgPromise, ComponentUtil, Grid } from 'ag-grid-community';
var AgGridColumn = /** @class */ (function () {
function AgGridColumn() {
}
AgGridColumn_1 = AgGridColumn;
AgGridColumn.prototype.hasChildColumns = function () {
if (this.childColumns && this.childColumns.length > 0) {
// necessary because of https://github.com/angular/angular/issues/10098
return !(this.childColumns.length === 1 && this.childColumns.first === this);
}
return false;
};
AgGridColumn.prototype.toColDef = function () {
var colDef = this.createColDefFromGridColumn(this);
if (this.hasChildColumns()) {
colDef["children"] = this.getChildColDefs(this.childColumns);
}
return colDef;
};
AgGridColumn.prototype.getChildColDefs = function (childColumns) {
return childColumns
// necessary because of https://github.com/angular/angular/issues/10098
.filter(function (column) { return !column.hasChildColumns(); })
.map(function (column) {
return column.toColDef();
});
};
AgGridColumn.prototype.createColDefFromGridColumn = function (from) {
var childColumns = from.childColumns, colDef = __rest(from, ["childColumns"]);
return colDef;
};
var AgGridColumn_1;
__decorate([
ContentChildren(AgGridColumn_1),
__metadata("design:type", QueryList)
], AgGridColumn.prototype, "childColumns", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "children", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "sortingOrder", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "allowedAggFuncs", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "menuTabs", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellClassRules", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "icons", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerGroupComponent", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerGroupComponentFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerGroupComponentParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellStyle", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellRendererParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellEditorFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellEditorParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pinnedRowCellRendererFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pinnedRowCellRendererParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "filterFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "filterParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerComponent", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerComponentFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerComponentParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "floatingFilterComponent", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "floatingFilterComponentParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "floatingFilterComponentFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "tooltipComponent", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "tooltipComponentParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "tooltipComponentFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "refData", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "columnsMenuParams", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerName", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "columnGroupShow", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerClass", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "toolPanelClass", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerValueGetter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "groupId", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "colId", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "sort", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialSort", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "field", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "type", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "tooltipField", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerTooltip", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellClass", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "showRowGroup", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "filter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialAggFunc", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "aggFunc", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellRenderer", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellEditor", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pinned", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialPinned", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "chartDataType", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "sortedAt", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "sortIndex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialSortIndex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "flex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialFlex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "width", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialWidth", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "minWidth", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "maxWidth", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "rowGroupIndex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialRowGroupIndex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pivotIndex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialPivotIndex", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "dndSourceOnRowDrag", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "valueGetter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "valueSetter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "filterValueGetter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "keyCreator", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellRendererFramework", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pinnedRowCellRenderer", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "valueFormatter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pinnedRowValueFormatter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "valueParser", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "comparator", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "equals", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pivotComparator", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressKeyboardEvent", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressHeaderKeyboardEvent", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "colSpan", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "rowSpan", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "getQuickFilterText", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "newValueHandler", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "onCellValueChanged", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "onCellClicked", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "onCellDoubleClicked", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "onCellContextMenu", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "rowDragText", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "tooltipValueGetter", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellRendererSelector", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "cellEditorSelector", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressCellFlash", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressColumnsToolPanel", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressFiltersToolPanel", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "openByDefault", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "marryChildren", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "hide", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialHide", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "rowGroup", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialRowGroup", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "pivot", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "initialPivot", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "checkboxSelection", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerCheckboxSelection", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "headerCheckboxSelectionFilteredOnly", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressMenu", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressMovable", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "lockPosition", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "lockVisible", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "lockPinned", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "unSortIcon", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressSizeToFit", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressAutoSize", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "enableRowGroup", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "enablePivot", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "enableValue", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "editable", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressPaste", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "suppressNavigable", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "enableCellChangeFlash", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "rowDrag", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "dndSource", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "autoHeight", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "wrapText", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "sortable", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "resizable", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "singleClickEdit", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridColumn.prototype, "floatingFilter", void 0);
AgGridColumn = AgGridColumn_1 = __decorate([
Component({
selector: 'ag-grid-column',
template: ''
})
], AgGridColumn);
return AgGridColumn;
}());
var AngularFrameworkOverrides = /** @class */ (function (_super) {
__extends(AngularFrameworkOverrides, _super);
function AngularFrameworkOverrides(_ngZone) {
var _this = _super.call(this) || this;
_this._ngZone = _ngZone;
return _this;
}
AngularFrameworkOverrides.prototype.setEmitterUsedCallback = function (isEmitterUsed) {
this.isEmitterUsed = isEmitterUsed;
};
AngularFrameworkOverrides.prototype.setTimeout = function (action, timeout) {
if (this._ngZone) {
this._ngZone.runOutsideAngular(function () {
window.setTimeout(function () {
action();
}, timeout);
});
}
else {
window.setTimeout(function () {
action();
}, timeout);
}
};
AngularFrameworkOverrides.prototype.addEventListener = function (element, eventType, listener, useCapture) {
if (this.isOutsideAngular(eventType) && this._ngZone) {
this._ngZone.runOutsideAngular(function () {
element.addEventListener(eventType, listener, useCapture);
});
}
else {
element.addEventListener(eventType, listener, useCapture);
}
};
AngularFrameworkOverrides.prototype.dispatchEvent = function (eventType, listener) {
if (this.isOutsideAngular(eventType)) {
if (this._ngZone) {
this._ngZone.runOutsideAngular(listener);
}
else {
listener();
}
}
else if (this.isEmitterUsed(eventType)) {
// only trigger off events (and potentially change detection) if actually used
if (!NgZone.isInAngularZone() && this._ngZone) {
this._ngZone.run(listener);
}
else {
listener();
}
}
};
AngularFrameworkOverrides.ctorParameters = function () { return [
{ type: NgZone }
]; };
AngularFrameworkOverrides = __decorate([
Injectable(),
__metadata("design:paramtypes", [NgZone])
], AngularFrameworkOverrides);
return AngularFrameworkOverrides;
}(VanillaFrameworkOverrides));
var AngularFrameworkComponentWrapper = /** @class */ (function (_super) {
__extends(AngularFrameworkComponentWrapper, _super);
function AngularFrameworkComponentWrapper() {
return _super !== null && _super.apply(this, arguments) || this;
}
AngularFrameworkComponentWrapper.prototype.setViewContainerRef = function (viewContainerRef) {
this.viewContainerRef = viewContainerRef;
};
AngularFrameworkComponentWrapper.prototype.setComponentFactoryResolver = function (componentFactoryResolver) {
this.componentFactoryResolver = componentFactoryResolver;
};
AngularFrameworkComponentWrapper.prototype.createWrapper = function (OriginalConstructor) {
var that = this;
var DynamicAgNg2Component = /** @class */ (function (_super) {
__extends(DynamicAgNg2Component, _super);
function DynamicAgNg2Component() {
return _super !== null && _super.apply(this, arguments) || this;
}
DynamicAgNg2Component.prototype.init = function (params) {
_super.prototype.init.call(this, params);
this._componentRef.changeDetectorRef.detectChanges();
};
DynamicAgNg2Component.prototype.createComponent = function () {
return that.createComponent(OriginalConstructor);
};
DynamicAgNg2Component.prototype.hasMethod = function (name) {
return wrapper.getFrameworkComponentInstance()[name] != null;
};
DynamicAgNg2Component.prototype.callMethod = function (name, args) {
var componentRef = this.getFrameworkComponentInstance();
return wrapper.getFrameworkComponentInstance()[name].apply(componentRef, args);
};
DynamicAgNg2Component.prototype.addMethod = function (name, callback) {
wrapper[name] = callback;
};
return DynamicAgNg2Component;
}(BaseGuiComponent));
var wrapper = new DynamicAgNg2Component();
return wrapper;
};
AngularFrameworkComponentWrapper.prototype.createComponent = function (componentType) {
// used to cache the factory, but this a) caused issues when used with either webpack/angularcli with --prod
// but more significantly, the underlying implementation of resolveComponentFactory uses a map too, so us
// caching the factory here yields no performance benefits
var factory = this.componentFactoryResolver.resolveComponentFactory(componentType);
return this.viewContainerRef.createComponent(factory);
};
AngularFrameworkComponentWrapper = __decorate([
Injectable()
], AngularFrameworkComponentWrapper);
return AngularFrameworkComponentWrapper;
}(BaseComponentWrapper));
var BaseGuiComponent = /** @class */ (function () {
function BaseGuiComponent() {
}
BaseGuiComponent.prototype.init = function (params) {
this._params = params;
this._componentRef = this.createComponent();
this._agAwareComponent = this._componentRef.instance;
this._frameworkComponentInstance = this._componentRef.instance;
this._eGui = this._componentRef.location.nativeElement;
this._agAwareComponent.agInit(this._params);
};
BaseGuiComponent.prototype.getGui = function () {
return this._eGui;
};
BaseGuiComponent.prototype.destroy = function () {
if (this._componentRef) {
this._componentRef.destroy();
}
};
BaseGuiComponent.prototype.getFrameworkComponentInstance = function () {
return this._frameworkComponentInstance;
};
return BaseGuiComponent;
}());
var AgGridAngular = /** @class */ (function () {
function AgGridAngular(elementDef, viewContainerRef, angularFrameworkOverrides, frameworkComponentWrapper, componentFactoryResolver) {
this.viewContainerRef = viewContainerRef;
this.angularFrameworkOverrides = angularFrameworkOverrides;
this.frameworkComponentWrapper = frameworkComponentWrapper;
this.componentFactoryResolver = componentFactoryResolver;
this._initialised = false;
this._destroyed = false;
// in order to ensure firing of gridReady is deterministic
this._fullyReady = AgPromise.resolve(true);
// @START@
this.alignedGrids = undefined;
this.rowData = undefined;
this.columnDefs = undefined;
this.excelStyles = undefined;
this.pinnedTopRowData = undefined;
this.pinnedBottomRowData = undefined;
this.chartThemes = undefined;
this.components = undefined;
this.frameworkComponents = undefined;
this.rowStyle = undefined;
this.context = undefined;
this.autoGroupColumnDef = undefined;
this.localeText = undefined;
this.icons = undefined;
this.datasource = undefined;
this.serverSideDatasource = undefined;
this.viewportDatasource = undefined;
this.groupRowRendererParams = undefined;
this.aggFuncs = undefined;
this.fullWidthCellRendererParams = undefined;
this.defaultColGroupDef = undefined;
this.defaultColDef = undefined;
this.defaultExportParams = undefined;
this.defaultCsvExportParams = undefined;
this.defaultExcelExportParams = undefined;
this.columnTypes = undefined;
this.rowClassRules = undefined;
this.detailGridOptions = undefined;
this.detailCellRendererParams = undefined;
this.loadingCellRendererParams = undefined;
this.loadingOverlayComponentParams = undefined;
this.noRowsOverlayComponentParams = undefined;
this.popupParent = undefined;
this.colResizeDefault = undefined;
this.reduxStore = undefined;
this.statusBar = undefined;
this.sideBar = undefined;
this.chartThemeOverrides = undefined;
this.customChartThemes = undefined;
this.sortingOrder = undefined;
this.rowClass = undefined;
this.rowSelection = undefined;
this.overlayLoadingTemplate = undefined;
this.overlayNoRowsTemplate = undefined;
this.quickFilterText = undefined;
this.rowModelType = undefined;
this.editType = undefined;
this.domLayout = undefined;
this.clipboardDeliminator = undefined;
this.rowGroupPanelShow = undefined;
this.multiSortKey = undefined;
this.pivotColumnGroupTotals = undefined;
this.pivotRowTotals = undefined;
this.pivotPanelShow = undefined;
this.fillHandleDirection = undefined;
this.serverSideStoreType = undefined;
this.rowHeight = undefined;
this.detailRowHeight = undefined;
this.rowBuffer = undefined;
this.colWidth = undefined;
this.headerHeight = undefined;
this.groupHeaderHeight = undefined;
this.floatingFiltersHeight = undefined;
this.pivotHeaderHeight = undefined;
this.pivotGroupHeaderHeight = undefined;
this.groupDefaultExpanded = undefined;
this.minColWidth = undefined;
this.maxColWidth = undefined;
this.viewportRowModelPageSize = undefined;
this.viewportRowModelBufferSize = undefined;
this.autoSizePadding = undefined;
this.maxBlocksInCache = undefined;
this.maxConcurrentDatasourceRequests = undefined;
this.tooltipShowDelay = undefined;
this.cacheOverflowSize = undefined;
this.paginationPageSize = undefined;
this.cacheBlockSize = undefined;
this.infiniteInitialRowCount = undefined;
this.scrollbarWidth = undefined;
this.batchUpdateWaitMillis = undefined;
this.asyncTransactionWaitMillis = undefined;
this.blockLoadDebounceMillis = undefined;
this.keepDetailRowsCount = undefined;
this.undoRedoCellEditingLimit = undefined;
this.cellFlashDelay = undefined;
this.cellFadeDelay = undefined;
this.tabIndex = undefined;
this.localeTextFunc = undefined;
this.groupRowInnerRenderer = undefined;
this.groupRowInnerRendererFramework = undefined;
this.dateComponent = undefined;
this.dateComponentFramework = undefined;
this.groupRowRenderer = undefined;
this.groupRowRendererFramework = undefined;
this.isExternalFilterPresent = undefined;
this.getRowHeight = undefined;
this.doesExternalFilterPass = undefined;
this.getRowClass = undefined;
this.getRowStyle = undefined;
this.getRowClassRules = undefined;
this.traverseNode = undefined;
this.getContextMenuItems = undefined;
this.getMainMenuItems = undefined;
this.processRowPostCreate = undefined;
this.processCellForClipboard = undefined;
this.groupRowAggNodes = undefined;
this.getRowNodeId = undefined;
this.isFullWidthCell = undefined;
this.fullWidthCellRenderer = undefined;
this.fullWidthCellRendererFramework = undefined;
this.processSecondaryColDef = undefined;
this.processSecondaryColGroupDef = undefined;
this.getBusinessKeyForNode = undefined;
this.sendToClipboard = undefined;
this.navigateToNextHeader = undefined;
this.tabToNextHeader = undefined;
this.navigateToNextCell = undefined;
this.tabToNextCell = undefined;
this.getDetailRowData = undefined;
this.processCellFromClipboard = undefined;
this.getDocument = undefined;
this.postProcessPopup = undefined;
this.getChildCount = undefined;
this.getDataPath = undefined;
this.loadingCellRenderer = undefined;
this.loadingCellRendererFramework = undefined;
this.loadingOverlayComponent = undefined;
this.loadingOverlayComponentFramework = undefined;
this.noRowsOverlayComponent = undefined;
this.noRowsOverlayComponentFramework = undefined;
this.detailCellRenderer = undefined;
this.detailCellRendererFramework = undefined;
this.defaultGroupSortComparator = undefined;
this.isRowMaster = undefined;
this.isRowSelectable = undefined;
this.postSort = undefined;
this.processHeaderForClipboard = undefined;
this.paginationNumberFormatter = undefined;
this.processDataFromClipboard = undefined;
this.getServerSideGroupKey = undefined;
this.isServerSideGroup = undefined;
this.suppressKeyboardEvent = undefined;
this.createChartContainer = undefined;
this.processChartOptions = undefined;
this.getChartToolbarItems = undefined;
this.fillOperation = undefined;
this.isApplyServerSideTransaction = undefined;
this.getServerSideStoreParams = undefined;
this.isServerSideGroupOpenByDefault = undefined;
this.isGroupOpenByDefault = undefined;
this.suppressMakeColumnVisibleAfterUnGroup = undefined;
this.suppressRowClickSelection = undefined;
this.suppressCellSelection = undefined;
this.suppressHorizontalScroll = undefined;
this.alwaysShowHorizontalScroll = undefined;
this.alwaysShowVerticalScroll = undefined;
this.debug = undefined;
this.enableBrowserTooltips = undefined;
this.enableCellExpressions = undefined;
this.angularCompileRows = undefined;
this.angularCompileFilters = undefined;
this.groupSuppressAutoColumn = undefined;
this.groupSelectsChildren = undefined;
this.groupIncludeFooter = undefined;
this.groupIncludeTotalFooter = undefined;
this.groupUseEntireRow = undefined;
this.groupSuppressBlankHeader = undefined;
this.suppressMenuHide = undefined;
this.suppressRowDeselection = undefined;
this.unSortIcon = undefined;
this.suppressMultiSort = undefined;
this.singleClickEdit = undefined;
this.suppressLoadingOverlay = undefined;
this.suppressNoRowsOverlay = undefined;
this.suppressAutoSize = undefined;
this.skipHeaderOnAutoSize = undefined;
this.suppressParentsInRowNodes = undefined;
this.suppressColumnMoveAnimation = undefined;
this.suppressMovableColumns = undefined;
this.suppressFieldDotNotation = undefined;
this.enableRangeSelection = undefined;
this.enableRangeHandle = undefined;
this.enableFillHandle = undefined;
this.suppressClearOnFillReduction = undefined;
this.deltaSort = undefined;
this.suppressTouch = undefined;
this.suppressAsyncEvents = undefined;
this.allowContextMenuWithControlKey = undefined;
this.suppressContextMenu = undefined;
this.rememberGroupStateWhenNewData = undefined;
this.enableCellChangeFlash = undefined;
this.suppressDragLeaveHidesColumns = undefined;
this.suppressMiddleClickScrolls = undefined;
this.suppressPreventDefaultOnMouseWheel = undefined;
this.suppressCopyRowsToClipboard = undefined;
this.copyHeadersToClipboard = undefined;
this.pivotMode = undefined;
this.suppressAggFuncInHeader = undefined;
this.suppressColumnVirtualisation = undefined;
this.suppressAggAtRootLevel = undefined;
this.suppressFocusAfterRefresh = undefined;
this.functionsPassive = undefined;
this.functionsReadOnly = undefined;
this.animateRows = undefined;
this.groupSelectsFiltered = undefined;
this.groupRemoveSingleChildren = undefined;
this.groupRemoveLowestSingleChildren = undefined;
this.enableRtl = undefined;
this.suppressClickEdit = undefined;
this.rowDragManaged = undefined;
this.suppressRowDrag = undefined;
this.suppressMoveWhenRowDragging = undefined;
this.enableMultiRowDragging = undefined;
this.enableGroupEdit = undefined;
this.embedFullWidthRows = undefined;
this.deprecatedEmbedFullWidthRows = undefined;
this.suppressPaginationPanel = undefined;
this.floatingFilter = undefined;
this.groupHideOpenParents = undefined;
this.groupMultiAutoColumn = undefined;
this.pagination = undefined;
this.stopEditingWhenGridLosesFocus = undefined;
this.paginationAutoPageSize = undefined;
this.suppressScrollOnNewData = undefined;
this.purgeClosedRowNodes = undefined;
this.cacheQuickFilter = undefined;
this.deltaRowDataMode = undefined;
this.ensureDomOrder = undefined;
this.accentedSort = undefined;
this.suppressChangeDetection = undefined;
this.valueCache = undefined;
this.valueCacheNeverExpires = undefined;
this.aggregateOnlyChangedColumns = undefined;
this.suppressAnimationFrame = undefined;
this.suppressExcelExport = undefined;
this.suppressCsvExport = undefined;
this.treeData = undefined;
this.masterDetail = undefined;
this.suppressMultiRangeSelection = undefined;
this.enterMovesDownAfterEdit = undefined;
this.enterMovesDown = undefined;
this.suppressPropertyNamesCheck = undefined;
this.rowMultiSelectWithClick = undefined;
this.suppressEnterpriseResetOnNewColumns = undefined;
this.enableOldSetFilterModel = undefined;
this.suppressRowHoverHighlight = undefined;
this.suppressRowTransform = undefined;
this.suppressClipboardPaste = undefined;
this.suppressLastEmptyLineOnPaste = undefined;
this.serverSideSortingAlwaysResets = undefined;
this.reactNext = undefined;
this.suppressSetColumnStateEvents = undefined;
this.suppressColumnStateEvents = undefined;
this.enableCharts = undefined;
this.deltaColumnMode = undefined;
this.suppressMaintainUnsortedOrder = undefined;
this.enableCellTextSelection = undefined;
this.suppressBrowserResizeObserver = undefined;
this.suppressMaxRenderedRowRestriction = undefined;
this.excludeChildrenWhenTreeDataFiltering = undefined;
this.tooltipMouseTrack = undefined;
this.keepDetailRows = undefined;
this.paginateChildRows = undefined;
this.preventDefaultOnContextMenu = undefined;
this.undoRedoCellEditing = undefined;
this.allowDragFromColumnsToolPanel = undefined;
this.immutableData = undefined;
this.immutableColumns = undefined;
this.pivotSuppressAutoColumn = undefined;
this.suppressExpandablePivotGroups = undefined;
this.applyColumnDefOrder = undefined;
this.debounceVerticalScrollbar = undefined;
this.detailRowAutoHeight = undefined;
this.serverSideFilteringAlwaysResets = undefined;
this.suppressAggFilteredOnly = undefined;
this.showOpenedGroup = undefined;
this.suppressClipboardApi = undefined;
this.suppressModelUpdateAfterUpdateTransaction = undefined;
this.stopEditingWhenCellsLoseFocus = undefined;
this.columnEverythingChanged = new EventEmitter();
this.newColumnsLoaded = new EventEmitter();
this.columnPivotModeChanged = new EventEmitter();
this.columnRowGroupChanged = new EventEmitter();
this.expandOrCollapseAll = new EventEmitter();
this.columnPivotChanged = new EventEmitter();
this.gridColumnsChanged = new EventEmitter();
this.columnValueChanged = new EventEmitter();
this.columnMoved = new EventEmitter();
this.columnVisible = new EventEmitter();
this.columnPinned = new EventEmitter();
this.columnGroupOpened = new EventEmitter();
this.columnResized = new EventEmitter();
this.displayedColumnsChanged = new EventEmitter();
this.virtualColumnsChanged = new EventEmitter();
this.asyncTransactionsFlushed = new EventEmitter();
this.rowGroupOpened = new EventEmitter();
this.rowDataChanged = new EventEmitter();
this.rowDataUpdated = new EventEmitter();
this.pinnedRowDataChanged = new EventEmitter();
this.rangeSelectionChanged = new EventEmitter();
this.chartCreated = new EventEmitter();
this.chartRangeSelectionChanged = new EventEmitter();
this.chartOptionsChanged = new EventEmitter();
this.chartDestroyed = new EventEmitter();
this.toolPanelVisibleChanged = new EventEmitter();
this.modelUpdated = new EventEmitter();
this.pasteStart = new EventEmitter();
this.pasteEnd = new EventEmitter();
this.fillStart = new EventEmitter();
this.fillEnd = new EventEmitter();
this.cellClicked = new EventEmitter();
this.cellDoubleClicked = new EventEmitter();
this.cellMouseDown = new EventEmitter();
this.cellContextMenu = new EventEmitter();
this.cellValueChanged = new EventEmitter();
this.rowValueChanged = new EventEmitter();
this.cellFocused = new EventEmitter();
this.rowSelected = new EventEmitter();
this.selectionChanged = new EventEmitter();
this.cellKeyDown = new EventEmitter();
this.cellKeyPress = new EventEmitter();
this.cellMouseOver = new EventEmitter();
this.cellMouseOut = new EventEmitter();
this.filterChanged = new EventEmitter();
this.filterModified = new EventEmitter();
this.filterOpened = new EventEmitter();
this.sortChanged = new EventEmitter();
this.virtualRowRemoved = new EventEmitter();
this.rowClicked = new EventEmitter();
this.rowDoubleClicked = new EventEmitter();
this.gridReady = new EventEmitter();
this.gridSizeChanged = new EventEmitter();
this.viewportChanged = new EventEmitter();
this.scrollbarWidthChanged = new EventEmitter();
this.firstDataRendered = new EventEmitter();
this.dragStarted = new EventEmitter();
this.dragStopped = new EventEmitter();
this.checkboxChanged = new EventEmitter();
this.rowEditingStarted = new EventEmitter();
this.rowEditingStopped = new EventEmitter();
this.cellEditingStarted = new EventEmitter();
this.cellEditingStopped = new EventEmitter();
this.bodyScroll = new EventEmitter();
this.animationQueueEmpty = new EventEmitter();
this.heightScaleChanged = new EventEmitter();
this.paginationChanged = new EventEmitter();
this.componentStateChanged = new EventEmitter();
this.bodyHeightChanged = new EventEmitter();
this.displayedColumnsWidthChanged = new EventEmitter();
this.scrollVisibilityChanged = new EventEmitter();
this.columnHoverChanged = new EventEmitter();
this.flashCells = new EventEmitter();
this.paginationPixelOffsetChanged = new EventEmitter();
this.displayedRowsChanged = new EventEmitter();
this.leftPinnedWidthChanged = new EventEmitter();
this.rightPinnedWidthChanged = new EventEmitter();
this.rowContainerHeightChanged = new EventEmitter();
this.rowDragEnter = new EventEmitter();
this.rowDragMove = new EventEmitter();
this.rowDragLeave = new EventEmitter();
this.rowDragEnd = new EventEmitter();
this.popupToFront = new EventEmitter();
this.columnRowGroupChangeRequest = new EventEmitter();
this.columnPivotChangeRequest = new EventEmitter();
this.columnValueChangeRequest = new EventEmitter();
this.columnAggFuncChangeRequest = new EventEmitter();
this.keyboardFocus = new EventEmitter();
this.mouseFocus = new EventEmitter();
this.storeUpdated = new EventEmitter();
this._nativeElement = elementDef.nativeElement;
}
AgGridAngular.prototype.ngAfterViewInit = function () {
this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef);
this.frameworkComponentWrapper.setComponentFactoryResolver(this.componentFactoryResolver);
this.angularFrameworkOverrides.setEmitterUsedCallback(this.isEmitterUsed.bind(this));
this.gridOptions = ComponentUtil.copyAttributesToGridOptions(this.gridOptions, this, true);
this.gridParams = {
globalEventListener: this.globalEventListener.bind(this),
frameworkOverrides: this.angularFrameworkOverrides,
providedBeanInstances: {
frameworkComponentWrapper: this.frameworkComponentWrapper
},
modules: (this.modules || [])
};
if (this.columns && this.columns.length > 0) {
this.gridOptions.columnDefs = this.columns
.map(function (column) {
return column.toColDef();
});
}
new Grid(this._nativeElement, this.gridOptions, this.gridParams);
if (this.gridOptions.api) {
this.api = this.gridOptions.api;
}
if (this.gridOptions.columnApi) {
this.columnApi = this.gridOptions.columnApi;
}
this._initialised = true;
// sometimes, especially in large client apps gridReady can fire before ngAfterViewInit
// this ties these together so that gridReady will always fire after agGridAngular's ngAfterViewInit
// the actual containing component's ngAfterViewInit will fire just after agGridAngular's
this._fullyReady.resolveNow(null, function (resolve) { return resolve; });
};
AgGridAngular.prototype.ngOnChanges = function (changes) {
if (this._initialised) {
ComponentUtil.processOnChange(changes, this.gridOptions, this.api, this.columnApi);
}
};
AgGridAngular.prototype.ngOnDestroy = function () {
if (this._initialised) {
// need to do this before the destroy, so we know not to emit any events
// while tearing down the grid.
this._destroyed = true;
if (this.api) {
this.api.destroy();
}
}
};
// we'll emit the emit if a user is listening for a given event either on the component via normal angular binding
// or via gridOptions
AgGridAngular.prototype.isEmitterUsed = function (eventType) {
var emitter = this[eventType];
var hasEmitter = !!emitter && emitter.observers && emitter.observers.length > 0;
// gridReady => onGridReady
var asEventName = "on" + eventType.charAt(0).toUpperCase() + eventType.substring(1);
var hasGridOptionListener = !!this.gridOptions && !!this.gridOptions[asEventName];
return hasEmitter || hasGridOptionListener;
};
AgGridAngular.prototype.globalEventListener = function (eventType, event) {
// if we are tearing down, don't emit angular events, as this causes
// problems with the angular router
if (this._destroyed) {
return;
}
// generically look up the eventType
var emitter = this[eventType];
if (emitter && this.isEmitterUsed(eventType)) {
if (eventType === 'gridReady') {
// if the user is listening for gridReady, wait for ngAfterViewInit to fire first, then emit the
// gridReady event
this._fullyReady.then((function (result) {
emitter.emit(event);
}));
}
else {
emitter.emit(event);
}
}
else {
console.log('AG Grid Angular: could not find EventEmitter: ' + eventType);
}
};
AgGridAngular.ctorParameters = function () { return [
{ type: ElementRef },
{ type: ViewContainerRef },
{ type: AngularFrameworkOverrides },
{ type: AngularFrameworkComponentWrapper },
{ type: ComponentFactoryResolver }
]; };
__decorate([
ContentChildren(AgGridColumn),
__metadata("design:type", QueryList)
], AgGridAngular.prototype, "columns", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "gridOptions", void 0);
__decorate([
Input(),
__metadata("design:type", Array)
], AgGridAngular.prototype, "modules", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "alignedGrids", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "rowData", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "columnDefs", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "excelStyles", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "pinnedTopRowData", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "pinnedBottomRowData", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "chartThemes", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "components", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "frameworkComponents", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "rowStyle", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "context", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "autoGroupColumnDef", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "localeText", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "icons", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], AgGridAngular.prototype, "datasource", void 0);
__decorate([