@ag-grid-enterprise/server-side-row-model
Advanced tools
Comparing version 27.2.1 to 27.3.0
@@ -271,3 +271,3 @@ "use strict"; | ||
if (!rootStore) { | ||
return 1; | ||
return 0; | ||
} | ||
@@ -274,0 +274,0 @@ return rootStore.getDisplayIndexEnd(); |
@@ -352,3 +352,5 @@ "use strict"; | ||
return this.storeUtils.getChildStore(keys, this, function (key) { | ||
var rowNode = _this.allRowNodes.find(function (currentRowNode) { return currentRowNode.key === key; }); | ||
var rowNode = _this.allRowNodes.find(function (currentRowNode) { | ||
return currentRowNode.key == key; | ||
}); | ||
return rowNode; | ||
@@ -355,0 +357,0 @@ }); |
@@ -53,3 +53,4 @@ "use strict"; | ||
api: this.gridApi, | ||
columnApi: this.columnApi | ||
columnApi: this.columnApi, | ||
context: this.gridOptionsWrapper.getContext() | ||
}; | ||
@@ -56,0 +57,0 @@ window.setTimeout(function () { |
@@ -254,3 +254,3 @@ "use strict"; | ||
if (!rootStore) { | ||
return 1; | ||
return 0; | ||
} | ||
@@ -257,0 +257,0 @@ return rootStore.getDisplayIndexEnd(); |
@@ -324,3 +324,5 @@ "use strict"; | ||
return this.storeUtils.getChildStore(keys, this, (key) => { | ||
const rowNode = this.allRowNodes.find(currentRowNode => currentRowNode.key === key); | ||
const rowNode = this.allRowNodes.find(currentRowNode => { | ||
return currentRowNode.key == key; | ||
}); | ||
return rowNode; | ||
@@ -327,0 +329,0 @@ }); |
@@ -36,3 +36,4 @@ "use strict"; | ||
api: this.gridApi, | ||
columnApi: this.columnApi | ||
columnApi: this.columnApi, | ||
context: this.gridOptionsWrapper.getContext() | ||
}; | ||
@@ -39,0 +40,0 @@ window.setTimeout(() => { |
@@ -269,3 +269,3 @@ var __extends = (this && this.__extends) || (function () { | ||
if (!rootStore) { | ||
return 1; | ||
return 0; | ||
} | ||
@@ -272,0 +272,0 @@ return rootStore.getDisplayIndexEnd(); |
@@ -350,3 +350,5 @@ var __extends = (this && this.__extends) || (function () { | ||
return this.storeUtils.getChildStore(keys, this, function (key) { | ||
var rowNode = _this.allRowNodes.find(function (currentRowNode) { return currentRowNode.key === key; }); | ||
var rowNode = _this.allRowNodes.find(function (currentRowNode) { | ||
return currentRowNode.key == key; | ||
}); | ||
return rowNode; | ||
@@ -353,0 +355,0 @@ }); |
@@ -51,3 +51,4 @@ var __extends = (this && this.__extends) || (function () { | ||
api: this.gridApi, | ||
columnApi: this.columnApi | ||
columnApi: this.columnApi, | ||
context: this.gridOptionsWrapper.getContext() | ||
}; | ||
@@ -54,0 +55,0 @@ window.setTimeout(function () { |
@@ -252,3 +252,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
if (!rootStore) { | ||
return 1; | ||
return 0; | ||
} | ||
@@ -255,0 +255,0 @@ return rootStore.getDisplayIndexEnd(); |
@@ -322,3 +322,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
return this.storeUtils.getChildStore(keys, this, (key) => { | ||
const rowNode = this.allRowNodes.find(currentRowNode => currentRowNode.key === key); | ||
const rowNode = this.allRowNodes.find(currentRowNode => { | ||
return currentRowNode.key == key; | ||
}); | ||
return rowNode; | ||
@@ -325,0 +327,0 @@ }); |
@@ -34,3 +34,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
api: this.gridApi, | ||
columnApi: this.columnApi | ||
columnApi: this.columnApi, | ||
context: this.gridOptionsWrapper.getContext() | ||
}; | ||
@@ -37,0 +38,0 @@ window.setTimeout(() => { |
/** | ||
* @ag-grid-enterprise/server-side-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.2.1 | ||
* @link http://www.ag-grid.com/ | ||
* @ag-grid-enterprise/server-side-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.3.0 | ||
* @link https://www.ag-grid.com/ | ||
* @license Commercial | ||
*/ | ||
/** | ||
* @ag-grid-enterprise/server-side-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.2.1 | ||
* @link http://www.ag-grid.com/ | ||
* @ag-grid-enterprise/server-side-row-model - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v27.3.0 | ||
* @link https://www.ag-grid.com/ | ||
* @license Commercial | ||
*/ | ||
import{Events as t,_ as e,RowNode as o,NumberSequence as r,Constants as n,Autowired as i,PreDestroy as s,PostConstruct as a,Bean as l,BeanStub as d,ServerSideTransactionResultStatus as c,RowNodeBlock as p,Qualifier as u,ModuleNames as h}from"@ag-grid-community/core";import{EnterpriseCoreModule as f}from"@ag-grid-enterprise/core";var y,g,v=(y=function(t,e){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),w=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},S=function(d){function c(){var t=null!==d&&d.apply(this,arguments)||this;return t.pauseStoreUpdateListening=!1,t.started=!1,t}return v(c,d),c.prototype.ensureRowHeightsValid=function(){return!1},c.prototype.start=function(){this.started=!0;var t=this.gridOptionsWrapper.getServerSideDatasource();t&&this.setDatasource(t)},c.prototype.destroyDatasource=function(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)},c.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,t.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,t.EVENT_STORE_UPDATED,this.onStoreUpdated.bind(this));var e=this.resetRootStore.bind(this);this.addManagedListener(this.eventService,t.EVENT_COLUMN_VALUE_CHANGED,e),this.addManagedListener(this.eventService,t.EVENT_COLUMN_PIVOT_CHANGED,e),this.addManagedListener(this.eventService,t.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,t.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.verifyProps()},c.prototype.verifyProps=function(){if(null!=this.gridOptionsWrapper.getInitialGroupOrderComparator()){e.doOnce((function(){return console.warn("AG Grid: initialGroupOrderComparator cannot be used with Server Side Row Model. If using Full Store, then provide the rows to the grid in the desired sort order. If using Partial Store, then sorting is done on the server side, nothing to do with the client.")}),"SSRM.InitialGroupOrderComparator")}if(this.gridOptionsWrapper.isRowSelection()&&null==this.gridOptionsWrapper.getRowIdFunc()){e.doOnce((function(){return console.warn("AG Grid: getRowId callback must be provided for Server Side Row Model selection to work correctly.")}),"SSRM.SelectionNeedsRowNodeIdFunc")}},c.prototype.setDatasource=function(t){this.started&&(this.destroyDatasource(),this.datasource=t,this.resetRootStore())},c.prototype.isLastRowIndexKnown=function(){var t=this.getRootStore();return!!t&&t.isLastRowIndexKnown()},c.prototype.onColumnEverything=function(){if(!this.gridOptionsWrapper.isSuppressEnterpriseResetOnNewColumns())if(this.storeParams){var t=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),o=this.columnsToValueObjects(this.columnModel.getValueColumns()),r=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=!e.jsonEquals(this.storeParams.sortModel,this.sortController.getSortModel()),i=!e.jsonEquals(this.storeParams.rowGroupCols,t),s=!e.jsonEquals(this.storeParams.pivotCols,r),a=!e.jsonEquals(this.storeParams.valueCols,o);(n||i||s||a)&&this.resetRootStore()}else this.resetRootStore()},c.prototype.destroyRootStore=function(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())},c.prototype.refreshAfterSort=function(t,e){this.storeParams&&(this.storeParams.sortModel=t);var o=this.getRootStore();o&&(o.refreshAfterSort(e),this.onStoreUpdated())},c.prototype.resetRootStore=function(){this.destroyRootStore(),this.rootNode=new o(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds());var e={type:t.EVENT_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e),this.dispatchModelUpdated(!0)},c.prototype.columnsToValueObjects=function(t){var e=this;return t.map((function(t){return{id:t.getId(),aggFunc:t.getAggFunc(),displayName:e.columnModel.getDisplayNameForColumn(t,"model"),field:t.getColDef().field}}))},c.prototype.createStoreParams=function(){var t=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),e=this.columnsToValueObjects(this.columnModel.getValueColumns()),o=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=this.gridOptionsWrapper.isDynamicRowHeight();return{valueCols:e,rowGroupCols:t,pivotCols:o,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager.getFilterModel(),sortModel:this.sortListener.extractSortModel(),datasource:this.datasource,lastAccessedSequence:new r,dynamicRowHeight:n}},c.prototype.getParams=function(){return this.storeParams},c.prototype.dispatchModelUpdated=function(e){void 0===e&&(e=!1);var o={type:t.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1};this.eventService.dispatchEvent(o)},c.prototype.onStoreUpdated=function(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())},c.prototype.onRowHeightChanged=function(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()},c.prototype.updateRowIndexesAndBounds=function(){var t=this.getRootStore();t&&t.setDisplayIndexes(new r,{value:0})},c.prototype.retryLoads=function(){var t=this.getRootStore();t&&(t.retryLoads(),this.onStoreUpdated())},c.prototype.getRow=function(t){var e=this.getRootStore();if(e)return e.getRowUsingDisplayIndex(t)},c.prototype.expandAll=function(t){this.pauseStoreUpdateListening=!0,this.forEachNode((function(e){e.group&&e.setExpanded(t)})),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()},c.prototype.refreshAfterFilter=function(t,e){this.storeParams&&(this.storeParams.filterModel=t);var o=this.getRootStore();o&&(o.refreshAfterFilter(e),this.onStoreUpdated())},c.prototype.getRootStore=function(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore},c.prototype.getRowCount=function(){var t=this.getRootStore();return t?t.getDisplayIndexEnd():1},c.prototype.getTopLevelRowCount=function(){var t=this.getRootStore();return t?t.getRowCount():1},c.prototype.getTopLevelRowDisplayedIndex=function(t){var e=this.getRootStore();return e?e.getTopLevelRowDisplayedIndex(t):t},c.prototype.getRowBounds=function(t){var e=this.getRootStore();return e?e.getRowBounds(t):{rowTop:0,rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber()}},c.prototype.getRowIndexAtPixel=function(t){var e=this.getRootStore();return t<=0||!e?0:e.getRowIndexAtPixel(t)},c.prototype.isEmpty=function(){return!1},c.prototype.isRowsToRender=function(){return null!=this.getRootStore()&&this.getRowCount()>0},c.prototype.getType=function(){return n.ROW_MODEL_TYPE_SERVER_SIDE},c.prototype.forEachNode=function(t){var e=this.getRootStore();e&&e.forEachNodeDeep(t)},c.prototype.forEachNodeAfterFilterAndSort=function(t){var e=this.getRootStore();e&&e.forEachNodeDeepAfterFilterAndSort(t)},c.prototype.executeOnStore=function(t,e){var o=this.getRootStore();if(o){var r=o.getChildStore(t);r&&e(r)}},c.prototype.refreshStore=function(t){void 0===t&&(t={});var e=t.route?t.route:[];this.executeOnStore(e,(function(e){return e.refreshStore(1==t.purge)}))},c.prototype.getStoreState=function(){var t=[],e=this.getRootStore();return e&&e.addStoreStates(t),t},c.prototype.getNodesInRangeForSelection=function(t,o){return e.exists(o)&&t.parent!==o.parent?[]:t.parent.childStore.getRowNodesInRange(o,t)},c.prototype.getRowNode=function(t){var e;return this.forEachNode((function(o){o.id===t&&(e=o),o.detailNode&&o.detailNode.id===t&&(e=o.detailNode)})),e},c.prototype.isRowPresent=function(t){return!!this.getRowNode(t.id)},w([i("columnModel")],c.prototype,"columnModel",void 0),w([i("filterManager")],c.prototype,"filterManager",void 0),w([i("sortController")],c.prototype,"sortController",void 0),w([i("gridApi")],c.prototype,"gridApi",void 0),w([i("columnApi")],c.prototype,"columnApi",void 0),w([i("rowRenderer")],c.prototype,"rowRenderer",void 0),w([i("ssrmSortService")],c.prototype,"sortListener",void 0),w([i("ssrmNodeManager")],c.prototype,"nodeManager",void 0),w([i("ssrmStoreFactory")],c.prototype,"storeFactory",void 0),w([i("beans")],c.prototype,"beans",void 0),w([s],c.prototype,"destroyDatasource",null),w([a],c.prototype,"addEventListeners",null),w([s],c.prototype,"destroyRootStore",null),c=w([l("rowModel")],c)}(d),R=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),I=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},N=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return R(o,t),o.prototype.loadFromDatasource=function(t){var e=t.storeParams,o=t.parentBlock,r=t.parentNode.getGroupKeys();if(e.datasource){var n={startRow:t.startRow,endRow:t.endRow,rowGroupCols:e.rowGroupCols,valueCols:e.valueCols,pivotCols:e.pivotCols,pivotMode:e.pivotMode,groupKeys:r,filterModel:e.filterModel,sortModel:e.sortModel},i={successCallback:t.successCallback,success:t.success,failCallback:t.failCallback,fail:t.fail,request:n,parentNode:t.parentNode,api:this.gridApi,columnApi:this.columnApi};window.setTimeout((function(){e.datasource&&o.isAlive()?e.datasource.getRows(i):t.failCallback()}),0)}},o.prototype.getChildStore=function(t,o,r){if(e.missingOrEmpty(t))return o;var n=r(t[0]);if(n){var i=t.slice(1,t.length),s=n.childStore;return s?s.getChildStore(i):null}return null},o.prototype.isServerRefreshNeeded=function(t,e,o){if(o.alwaysReset||o.valueColChanged||o.secondaryColChanged)return!0;var r=t.level+1;if(!(r<e.length))return!0;var n=e[r].id;return!!(o.changedColumns.indexOf(n)>-1)},I([i("columnApi")],o.prototype,"columnApi",void 0),I([i("gridApi")],o.prototype,"gridApi",void 0),o=I([l("ssrmStoreUtils")],o)}(d),m=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),x=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},C=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return m(r,t),r.prototype.postConstruct=function(){this.rowHeight=this.gridOptionsWrapper.getRowHeightAsNumber(),this.usingTreeData=this.gridOptionsWrapper.isTreeData(),this.usingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},r.prototype.createRowNode=function(t){var e=new o(this.beans),r=null!=t.rowHeight?t.rowHeight:this.rowHeight;return e.setRowHeight(r),e.group=t.group,e.leafGroup=t.leafGroup,e.level=t.level,e.uiLevel=t.level,e.parent=t.parent,e.stub=!0,e.group&&(e.expanded=!1,e.field=t.field,e.rowGroupColumn=t.rowGroupColumn),e},r.prototype.destroyRowNodes=function(t){t&&t.forEach(this.destroyRowNode.bind(this))},r.prototype.destroyRowNode=function(t){t.childStore&&(this.destroyBean(t.childStore),t.childStore=null),t.clearRowTopAndRowIndex(),null!=t.id&&this.nodeManager.removeNode(t)},r.prototype.setTreeGroupInfo=function(t){var e=this.gridOptionsWrapper.getIsServerSideGroupFunc(),o=this.gridOptionsWrapper.getServerSideGroupKeyFunc();null!=e&&(t.setGroup(e(t.data)),t.group&&null!=o&&(t.key=o(t.data))),t.group||null==t.childStore||(this.destroyBean(t.childStore),t.childStore=null)},r.prototype.setRowGroupInfo=function(t){t.key=this.valueService.getValue(t.rowGroupColumn,t),null!==t.key&&void 0!==t.key||e.doOnce((function(){console.warn("AG Grid: null and undefined values are not allowed for server side row model keys"),t.rowGroupColumn&&console.warn("column = "+t.rowGroupColumn.getId()),console.warn("data is ",t.data)}),"ServerSideBlock-CannotHaveNullOrUndefinedForKey")},r.prototype.setMasterDetailInfo=function(t){var e=this.gridOptionsWrapper.getIsRowMasterFunc();t.master=null==e||e(t.data)},r.prototype.updateDataIntoRowNode=function(t,e){t.updateData(e),this.usingTreeData?this.setTreeGroupInfo(t):t.group||this.usingMasterDetail},r.prototype.setDataIntoRowNode=function(t,o,r,n){t.stub=!1,e.exists(o)?(t.setDataAndId(o,r),this.usingTreeData?this.setTreeGroupInfo(t):t.group?this.setRowGroupInfo(t):this.usingMasterDetail&&this.setMasterDetailInfo(t)):(t.setDataAndId(void 0,void 0),t.key=null),(this.usingTreeData||t.group)&&(this.setGroupDataIntoRowNode(t),this.setChildCountIntoRowNode(t)),e.exists(o)&&t.setRowHeight(this.gridOptionsWrapper.getRowHeightForNode(t,!1,n).height)},r.prototype.setChildCountIntoRowNode=function(t){var e=this.gridOptionsWrapper.getChildCountFunc();e&&(t.allChildrenCount=e(t.data))},r.prototype.setGroupDataIntoRowNode=function(t){var e=this,o=this.columnModel.getGroupDisplayColumns(),r=this.gridOptionsWrapper.isTreeData();o.forEach((function(o){if(null==t.groupData&&(t.groupData={}),r)t.groupData[o.getColId()]=t.key;else if(o.isRowGroupDisplayed(t.rowGroupColumn.getId())){var n=e.valueService.getValue(t.rowGroupColumn,t);t.groupData[o.getColId()]=n}}))},r.prototype.clearDisplayIndex=function(t){(t.clearRowTopAndRowIndex(),t.group&&e.exists(t.childStore))&&t.childStore.clearDisplayIndexes();t.master&&t.detailNode&&t.detailNode.clearRowTopAndRowIndex()},r.prototype.setDisplayIndex=function(t,o,r){if(t.setRowIndex(o.next()),t.setRowTop(r.value),r.value+=t.rowHeight,t.master&&(t.expanded&&t.detailNode?(t.detailNode.setRowIndex(o.next()),t.detailNode.setRowTop(r.value),r.value+=t.detailNode.rowHeight):t.detailNode&&t.detailNode.clearRowTopAndRowIndex()),t.group&&e.exists(t.childStore)){var n=t.childStore;t.expanded?n.setDisplayIndexes(o,r):n.clearDisplayIndexes()}},r.prototype.binarySearchForDisplayIndex=function(t,o){var r=0,n=o.length-1;if(e.missing(n)||e.missing(r))console.warn("AG Grid: error: topPointer = "+n+", bottomPointer = "+r);else for(;;){var i=Math.floor((r+n)/2),s=o[i];if(s.rowIndex===t)return s;var a=s.master&&s.expanded,l=s.detailNode;if(a&&l&&l.rowIndex===t)return s.detailNode;var d=s.childStore;if(s.expanded&&d&&d.isDisplayIndexInStore(t))return d.getRowUsingDisplayIndex(t);if(s.rowIndex<t)r=i+1;else{if(!(s.rowIndex>t))return void console.warn("AG Grid: error: unable to locate rowIndex = "+t+" in cache");n=i-1}}},r.prototype.extractRowBounds=function(t,o){var r=function(t){return{rowHeight:t.rowHeight,rowTop:t.rowTop}};if(t.rowIndex===o)return r(t);if(t.group&&t.expanded&&e.exists(t.childStore)){var n=t.childStore;if(n.isDisplayIndexInStore(o))return n.getRowBounds(o)}else if(t.master&&t.expanded&&e.exists(t.detailNode)&&t.detailNode.rowIndex===o)return r(t.detailNode)},r.prototype.getIndexAtPixel=function(t,o){if(t.isPixelInRange(o))return t.rowIndex;var r=t.master&&t.expanded,n=t.detailNode;if(r&&n&&n.isPixelInRange(o))return t.detailNode.rowIndex;if(t.group&&t.expanded&&e.exists(t.childStore)){var i=t.childStore;if(i.isPixelInRange(o))return i.getRowIndexAtPixel(o)}return null},r.prototype.createNodeIdPrefix=function(t){for(var e=[],o=t;o&&o.level>=0;)e.push(o.key),o=o.parent;if(e.length>0)return e.reverse().join("-")},r.prototype.checkOpenByDefault=function(t){if(t.isExpandable()){var e=this.gridOptionsWrapper.getIsServerSideGroupOpenByDefaultFunc();if(e)e({data:t.data,rowNode:t})&&window.setTimeout((function(){return t.setExpanded(!0)}),0)}},x([i("valueService")],r.prototype,"valueService",void 0),x([i("columnModel")],r.prototype,"columnModel",void 0),x([i("ssrmNodeManager")],r.prototype,"nodeManager",void 0),x([i("beans")],r.prototype,"beans",void 0),x([a],r.prototype,"postConstruct",null),r=x([l("ssrmBlockUtils")],r)}(d),O=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},A=function(){function t(){this.rowNodes={}}return t.prototype.addRowNode=function(t){var e=t.id;this.rowNodes[e]&&(console.warn("AG Grid: Duplicate node id "+t.id+". Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values."),console.warn("first instance",this.rowNodes[e].data),console.warn("second instance",t.data)),this.rowNodes[e]=t},t.prototype.removeNode=function(t){var e=t.id;this.rowNodes[e]&&(this.rowNodes[e]=void 0)},t.prototype.clear=function(){this.rowNodes={}},O([s],t.prototype,"clear",null),t=O([l("ssrmNodeManager")],t)}(),E=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),D=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},k=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.asyncTransactions=[],t}return E(o,e),o.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()},o.prototype.applyTransactionAsync=function(t,e){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:t,callback:e})},o.prototype.scheduleExecuteAsync=function(){var t=this,e=this.gridOptionsWrapper.getAsyncTransactionWaitMillis();this.asyncTransactionsTimeout=window.setTimeout((function(){t.executeAsyncTransactions()}),e)},o.prototype.executeAsyncTransactions=function(){var e=this;if(this.asyncTransactions){var o=[],r=[],n=[],i=!1;if(this.asyncTransactions.forEach((function(t){var s;e.serverSideRowModel.executeOnStore(t.transaction.route,(function(e){s=e.applyTransaction(t.transaction)})),null==s&&(s={status:c.StoreNotFound}),r.push(s),s.status==c.StoreLoading?n.push(t):(t.callback&&o.push((function(){return t.callback(s)})),s.status===c.Applied&&(i=!0))})),o.length>0&&window.setTimeout((function(){o.forEach((function(t){return t()}))}),0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=n,i&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:t.EVENT_STORE_UPDATED})),r.length>0){var s={api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),type:t.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:r};this.eventService.dispatchEvent(s)}}},o.prototype.flushAsyncTransactions=function(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()},o.prototype.applyTransaction=function(e){var o;return this.serverSideRowModel.executeOnStore(e.route,(function(t){o=t.applyTransaction(e)})),o?(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:t.EVENT_STORE_UPDATED}),o):{status:c.StoreNotFound}},D([i("rowNodeBlockLoader")],o.prototype,"rowNodeBlockLoader",void 0),D([i("valueCache")],o.prototype,"valueCache",void 0),D([i("rowModel")],o.prototype,"serverSideRowModel",void 0),D([a],o.prototype,"postConstruct",null),o=D([l("ssrmTransactionManager")],o)}(d),P=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),T=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},b=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return P(n,r),n.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()&&this.addManagedListener(this.eventService,t.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this))},n.prototype.onRowGroupOpened=function(o){var r=o.node;if(r.expanded){if(r.master)this.createDetailNode(r);else if(e.missing(r.childStore)){var n=this.serverSideRowModel.getParams();r.childStore=this.createBean(this.storeFactory.createStore(n,r))}}else this.gridOptionsWrapper.isPurgeClosedRowNodes()&&e.exists(r.childStore)&&(r.childStore=this.destroyBean(r.childStore));var i={type:t.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(i)},n.prototype.createDetailNode=function(t){if(e.exists(t.detailNode))return t.detailNode;var r=new o(this.beans);r.detail=!0,r.selectable=!1,r.parent=t,e.exists(t.id)&&(r.id="detail_"+t.id),r.data=t.data,r.level=t.level+1;var n=this.gridOptionsWrapper.getRowHeightForNode(r).height;return r.rowHeight=n||200,t.detailNode=r,r},T([i("rowModel")],n.prototype,"serverSideRowModel",void 0),T([i("ssrmStoreFactory")],n.prototype,"storeFactory",void 0),T([i("beans")],n.prototype,"beans",void 0),T([a],n.prototype,"postConstruct",null),n=T([l("ssrmExpandListener")],n)}(d),_=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),M=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},B=function(o){function r(){return null!==o&&o.apply(this,arguments)||this}return _(r,o),r.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()&&this.addManagedListener(this.eventService,t.EVENT_SORT_CHANGED,this.onSortChanged.bind(this))},r.prototype.extractSortModel=function(){var t=this.sortController.getSortModel();return this.gridOptionsWrapper.isTreeData()||(this.replaceAutoGroupColumnWithActualRowGroupColumns(t),this.removeMultiColumnPrefixOnColumnIds(t)),t},r.prototype.removeMultiColumnPrefixOnColumnIds=function(t){if(this.gridOptionsWrapper.isGroupMultiAutoColumn())for(var e=n.GROUP_AUTO_COLUMN_ID+"-",o=0;o<t.length;++o)t[o].colId.indexOf(e)>-1&&(t[o].colId=t[o].colId.substr(e.length))},r.prototype.replaceAutoGroupColumnWithActualRowGroupColumns=function(t){var o=t.find((function(t){return t.colId==n.GROUP_AUTO_COLUMN_ID}));if(o){var r=t.indexOf(o);e.removeFromArray(t,o);var i=this.columnModel.getRowGroupColumns().filter((function(e){return 0==t.filter((function(t){return t.colId===e.getColId()})).length})).map((function(t){return{colId:t.getId(),sort:o.sort}}));e.insertArrayIntoArray(t,i,r)}},r.prototype.onSortChanged=function(){var t=this.serverSideRowModel.getParams();if(t){var e=this.extractSortModel(),o=t.sortModel,r=this.findChangedColumnsInSort(e,o),n={valueColChanged:this.listenerUtils.isSortingWithValueColumn(r),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(r),alwaysReset:this.gridOptionsWrapper.isServerSideSortingAlwaysResets(),changedColumns:r};this.serverSideRowModel.refreshAfterSort(e,n)}},r.prototype.findChangedColumnsInSort=function(t,e){var o=[];[t,e].forEach((function(t){if(t){var e=t.map((function(t){return t.colId}));o=o.concat(e)}}));return o.filter((function(o){var r=e.find((function(t){return t.colId===o})),n=t.find((function(t){return t.colId===o}));return function(t,e){return(t?t.sort:null)!==(e?e.sort:null)}(r,n)||function(o,r){return(o?e.indexOf(o):-1)!==(r?t.indexOf(r):-1)}(r,n)}))},M([i("sortController")],r.prototype,"sortController",void 0),M([i("columnModel")],r.prototype,"columnModel",void 0),M([i("rowModel")],r.prototype,"serverSideRowModel",void 0),M([i("ssrmListenerUtils")],r.prototype,"listenerUtils",void 0),M([a],r.prototype,"postConstruct",null),r=M([l("ssrmSortService")],r)}(d),L=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),U=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},G=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return L(o,e),o.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()&&this.addManagedListener(this.eventService,t.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this))},o.prototype.onFilterChanged=function(){var t=this.serverSideRowModel.getParams();if(t){var e=this.filterManager.getFilterModel(),o=t?t.filterModel:{},r=this.findChangedColumns(e,o),n={valueColChanged:this.listenerUtils.isSortingWithValueColumn(r),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(r),alwaysReset:this.gridOptionsWrapper.isServerSideFilteringAlwaysResets(),changedColumns:r};this.serverSideRowModel.refreshAfterFilter(e,n)}},o.prototype.findChangedColumns=function(t,e){var o={};Object.keys(t).forEach((function(t){return o[t]=!0})),Object.keys(e).forEach((function(t){return o[t]=!0}));var r=[];return Object.keys(o).forEach((function(o){JSON.stringify(t[o])!=JSON.stringify(e[o])&&r.push(o)})),r},U([i("rowModel")],o.prototype,"serverSideRowModel",void 0),U([i("filterManager")],o.prototype,"filterManager",void 0),U([i("ssrmListenerUtils")],o.prototype,"listenerUtils",void 0),U([a],o.prototype,"postConstruct",null),o=U([l("ssrmFilterListener")],o)}(d),F=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),j=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},W=function(t,e){return function(o,r){e(o,r,t)}},H=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},V=function(t){function e(e,o,r,n,i){var s=t.call(this,e)||this;return s.ssrmParams=r,s.storeParams=n,s.parentRowNode=o,s.startRow=e*n.cacheBlockSize,s.parentStore=i,s.level=o.level+1,s.groupLevel=r.rowGroupCols?s.level<r.rowGroupCols.length:void 0,s.leafGroup=!!r.rowGroupCols&&s.level===r.rowGroupCols.length-1,s}return F(e,t),e.prototype.postConstruct=function(){if(this.usingTreeData=this.gridOptionsWrapper.isTreeData(),!this.usingTreeData&&this.groupLevel){var t=this.ssrmParams.rowGroupCols[this.level];this.groupField=t.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),this.setData([])},e.prototype.isDisplayIndexInBlock=function(t){return t>=this.displayIndexStart&&t<this.displayIndexEnd},e.prototype.isBlockBefore=function(t){return t>=this.displayIndexEnd},e.prototype.getDisplayIndexStart=function(){return this.displayIndexStart},e.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},e.prototype.getBlockHeightPx=function(){return this.blockHeightPx},e.prototype.getBlockTopPx=function(){return this.blockTopPx},e.prototype.isGroupLevel=function(){return this.groupLevel},e.prototype.getGroupField=function(){return this.groupField},e.prototype.prefixId=function(t){return null!=this.nodeIdPrefix?this.nodeIdPrefix+"-"+t:t.toString()},e.prototype.getBlockStateJson=function(){return{id:this.prefixId(this.getId()),state:{blockNumber:this.getId(),startRow:this.startRow,endRow:this.startRow+this.storeParams.cacheBlockSize,pageStatus:this.getState()}}},e.prototype.isAnyNodeOpen=function(){return this.rowNodes.filter((function(t){return t.expanded})).length>0},e.prototype.forEachNode=function(t,e,o,n){void 0===e&&(e=new r),this.rowNodes.forEach((function(r){if(t(r,e.next()),o&&r.childStore){var i=r.childStore;n?i.forEachNodeDeepAfterFilterAndSort(t,e):i.forEachNodeDeep(t,e)}}))},e.prototype.forEachNodeDeep=function(t,e){this.forEachNode(t,e,!0,!1)},e.prototype.forEachNodeAfterFilterAndSort=function(t,e){this.forEachNode(t,e,!0,!0)},e.prototype.forEachNodeShallow=function(t,e){this.forEachNode(t,e,!1,!1)},e.prototype.getLastAccessed=function(){return this.lastAccessed},e.prototype.getRowUsingLocalIndex=function(t){return this.rowNodes[t-this.startRow]},e.prototype.touchLastAccessed=function(){this.lastAccessed=this.ssrmParams.lastAccessedSequence.next()},e.prototype.processServerFail=function(){this.parentStore.onBlockLoadFailed(this)},e.prototype.retryLoads=function(){this.getState()===p.STATE_FAILED&&(this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad(),this.setData()),this.forEachNodeShallow((function(t){t.childStore&&t.childStore.retryLoads()}))},e.prototype.processServerResult=function(t){this.parentStore.onBlockLoaded(this,t)},e.prototype.setData=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=!1),this.destroyRowNodes();for(var o=this.parentStore.getRowCount(),r=this.getId()*this.storeParams.cacheBlockSize,n=Math.min(r+this.storeParams.cacheBlockSize,o)-r,i=this.columnModel.getAllDisplayedAutoHeightCols().length>0?this.parentStore.getCachedBlockHeight(this.getId()):void 0,s=i?Math.round(i/n):void 0,a=0;a<n;a++){var l=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn,rowHeight:s});if(a<t.length){var d=t[a],c=this.prefixId(this.startRow+a);this.blockUtils.setDataIntoRowNode(l,d,c,s);var p=l.id;this.parentStore.removeDuplicateNode(p),this.nodeManager.addRowNode(l),this.allNodesMap[l.id]=l,this.blockUtils.checkOpenByDefault(l)}this.rowNodes.push(l),e&&(l.failedLoad=!0)}},e.prototype.removeDuplicateNode=function(t){if(this.getState()!=p.STATE_LOADED){var e=this.allNodesMap[t];if(e){this.blockUtils.destroyRowNode(e);var o=this.rowNodes.indexOf(e),r=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});this.rowNodes[o]=r}}},e.prototype.refresh=function(){this.getState()!==p.STATE_WAITING_TO_LOAD&&this.setStateWaitingToLoad()},e.prototype.destroyRowNodes=function(){this.blockUtils.destroyRowNodes(this.rowNodes),this.rowNodes=[],this.allNodesMap={}},e.prototype.setBeans=function(t){this.logger=t.create("ServerSideBlock")},e.prototype.getRowUsingDisplayIndex=function(t){return this.touchLastAccessed(),this.blockUtils.binarySearchForDisplayIndex(t,this.rowNodes)},e.prototype.loadFromDatasource=function(){this.storeUtils.loadFromDatasource({startRow:this.startRow,endRow:this.startRow+this.storeParams.cacheBlockSize,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,successCallback:this.pageLoaded.bind(this,this.getVersion()),success:this.success.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})},e.prototype.isPixelInRange=function(t){return t>=this.blockTopPx&&t<this.blockTopPx+this.blockHeightPx},e.prototype.getRowBounds=function(t){var e,o,r;this.touchLastAccessed();try{for(var n=H(this.rowNodes),i=n.next();!i.done;i=n.next()){var s=i.value;if(null!=(r=this.blockUtils.extractRowBounds(s,t)))break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}return r},e.prototype.getRowIndexAtPixel=function(t){var e,o;this.touchLastAccessed();var r=null;try{for(var n=H(this.rowNodes),i=n.next();!i.done;i=n.next()){var s=i.value;if(null!=(r=this.blockUtils.getIndexAtPixel(s,t)))break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}return r},e.prototype.clearDisplayIndexes=function(){var t=this;this.displayIndexEnd=void 0,this.displayIndexStart=void 0,this.rowNodes.forEach((function(e){return t.blockUtils.clearDisplayIndex(e)}))},e.prototype.setDisplayIndexes=function(t,e){var o=this;this.displayIndexStart=t.peek(),this.blockTopPx=e.value,this.rowNodes.forEach((function(r){return o.blockUtils.setDisplayIndex(r,t,e)})),this.displayIndexEnd=t.peek(),this.blockHeightPx=e.value-this.blockTopPx},j([i("columnModel")],e.prototype,"columnModel",void 0),j([i("ssrmStoreUtils")],e.prototype,"storeUtils",void 0),j([i("ssrmBlockUtils")],e.prototype,"blockUtils",void 0),j([i("ssrmNodeManager")],e.prototype,"nodeManager",void 0),j([i("rowNodeBlockLoader")],e.prototype,"rowNodeBlockLoader",void 0),j([a],e.prototype,"postConstruct",null),j([s],e.prototype,"destroyRowNodes",null),j([W(0,u("loggerFactory"))],e.prototype,"setBeans",null),e}(p),K=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),z=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},q=function(t,e){return function(o,r){e(o,r,t)}};!function(t){t[t.FOUND=0]="FOUND",t[t.CONTINUE_FIND=1]="CONTINUE_FIND",t[t.BREAK_FIND=2]="BREAK_FIND"}(g||(g={}));var J=function(o){function n(t,e,r){var i=o.call(this)||this;return i.blocks={},i.blockHeights={},i.lastRowIndexKnown=!1,i.displayIndexStart=0,i.displayIndexEnd=0,i.cacheTopPixel=0,i.info={},i.ssrmParams=t,i.storeParams=e,i.parentRowNode=r,i.rowCount=n.INITIAL_ROW_COUNT,i}return K(n,o),n.prototype.postConstruct=function(){this.defaultRowHeight=this.gridOptionsWrapper.getRowHeightAsNumber()},n.prototype.destroyAllBlocks=function(){var t=this;this.getBlocksInOrder().forEach((function(e){return t.destroyBlock(e)}))},n.prototype.setBeans=function(t){this.logger=t.create("ServerSideCache")},n.prototype.getRowCount=function(){return this.rowCount},n.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown},n.prototype.retryLoads=function(){this.getBlocksInOrder().forEach((function(t){return t.retryLoads()}))},n.prototype.onBlockLoadFailed=function(t){t.setData([],!0),this.fireCacheUpdatedEvent()},n.prototype.onBlockLoaded=function(t,o){if(this.logger.log("onPageLoaded: page = "+t.getId()+", lastRow = "+o.rowCount),o.storeInfo&&Object.assign(this.info,o.storeInfo),!o.rowData){e.doOnce((function(){return console.warn('AG Grid: "params.rowData" is missing from Server-Side Row Model success() callback. Please use the "rowData" attribute. If no data is returned, set an empty list.',o)}),"InfiniteStore.noData")}var r=null!=o.rowCount&&o.rowCount>=0?o.rowCount:void 0;this.isAlive()&&(this.checkRowCount(t,r),t.setData(o.rowData),this.destroyAllBlocksPastVirtualRowCount(),this.fireCacheUpdatedEvent())},n.prototype.purgeBlocksIfNeeded=function(t){var e=this,o=this.getBlocksInOrder().filter((function(e){return e!=t}));o.sort((function(t,e){return e.getLastAccessed()-t.getLastAccessed()}));var r=this.storeParams.maxBlocksInCache>0,i=r?this.storeParams.maxBlocksInCache-1:null,s=n.MAX_EMPTY_BLOCKS_TO_KEEP-1;o.forEach((function(t,o){if(t.getState()===V.STATE_WAITING_TO_LOAD&&o>=s||!!r&&o>=i){if(t.isAnyNodeOpen())return;if(e.isBlockCurrentlyDisplayed(t))return;if(e.isBlockFocused(t))return;e.destroyBlock(t)}}))},n.prototype.isBlockFocused=function(t){var e=this.focusService.getFocusCellToUseAfterRefresh();if(!e)return!1;if(null!=e.rowPinned)return!1;var o=t.getDisplayIndexStart(),r=t.getDisplayIndexEnd();return null!=r&&null!=o&&(e.rowIndex>=o&&e.rowIndex<r)},n.prototype.isBlockCurrentlyDisplayed=function(t){var e=t.getDisplayIndexStart(),o=t.getDisplayIndexEnd()-1;return this.rowRenderer.isRangeInRenderedViewport(e,o)},n.prototype.removeDuplicateNode=function(t){this.getBlocksInOrder().forEach((function(e){return e.removeDuplicateNode(t)}))},n.prototype.checkRowCount=function(t,e){if("number"==typeof e&&e>=0)this.rowCount=e,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var o=(t.getId()+1)*this.storeParams.cacheBlockSize+n.OVERFLOW_SIZE;this.rowCount<o&&(this.rowCount=o)}},n.prototype.forEachNodeDeep=function(t,e){void 0===e&&(e=new r),this.getBlocksInOrder().forEach((function(o){return o.forEachNodeDeep(t,e)}))},n.prototype.forEachNodeDeepAfterFilterAndSort=function(t,e){void 0===e&&(e=new r),this.getBlocksInOrder().forEach((function(o){return o.forEachNodeAfterFilterAndSort(t,e)}))},n.prototype.getBlocksInOrder=function(){return e.getAllValuesInObject(this.blocks).sort((function(t,e){return t.getId()-e.getId()}))},n.prototype.destroyBlock=function(t){delete this.blocks[t.getId()],this.destroyBean(t),this.rowNodeBlockLoader.removeBlock(t)},n.prototype.fireCacheUpdatedEvent=function(){var e={type:t.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},n.prototype.destroyAllBlocksPastVirtualRowCount=function(){var t=this,e=[];this.getBlocksInOrder().forEach((function(o){o.getId()*t.storeParams.cacheBlockSize>=t.rowCount&&e.push(o)})),e.length>0&&e.forEach((function(e){return t.destroyBlock(e)}))},n.prototype.refreshStore=function(t){0==this.getRowCount()||t?this.resetStore():this.refreshBlocks(),this.fireCacheUpdatedEvent()},n.prototype.refreshBlocks=function(){this.getBlocksInOrder().forEach((function(t){t.refresh()})),this.lastRowIndexKnown=!1,this.rowNodeBlockLoader.checkBlockToLoad()},n.prototype.resetStore=function(){this.destroyAllBlocks(),this.lastRowIndexKnown=!1,(this.columnModel.isAutoRowHeightActive||0===this.rowCount)&&(this.rowCount=n.INITIAL_ROW_COUNT)},n.prototype.getRowNodesInRange=function(t,o){var r=[],n=-1,i=!1;e.missing(t)&&(i=!0);var s=!1;return this.getBlocksInOrder().forEach((function(e){s||(i&&n+1!==e.getId()?s=!0:(n=e.getId(),e.forEachNodeShallow((function(e){var n=e===t||e===o;(i||n)&&r.push(e),n&&(i=!i)}))))})),s||i?[]:r},n.prototype.findBlockAndExecute=function(t,e,o){var r,n=!1,i=!1,s=null;return this.getBlocksInOrder().forEach((function(o){if(!n&&!i){var a=t(o);a==g.FOUND?(r=e(o),n=!0):a==g.CONTINUE_FIND?s=o:a==g.BREAK_FIND&&(i=!0)}})),n||(r=o(s)),r},n.prototype.getRowBounds=function(t){var e=this;return this.findBlockAndExecute((function(e){return e.isDisplayIndexInBlock(t)?g.FOUND:e.isBlockBefore(t)?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowBounds(t)}),(function(o){var r,n;null!==o?(r=o.getBlockTopPx()+o.getBlockHeightPx(),n=o.getDisplayIndexEnd()):(r=e.cacheTopPixel,n=e.displayIndexStart);var i=t-n;return{rowHeight:e.defaultRowHeight,rowTop:r+i*e.defaultRowHeight}}))},n.prototype.getRowIndexAtPixel=function(t){var e=this,o=this.findBlockAndExecute((function(e){return e.isPixelInRange(t)?g.FOUND:e.getBlockTopPx()<t?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowIndexAtPixel(t)}),(function(o){var r,n;o?(r=o.getBlockTopPx()+o.getBlockHeightPx(),n=o.getDisplayIndexEnd()):(r=e.cacheTopPixel,n=e.displayIndexStart);for(var i=e.storeParams.cacheBlockSize,s=e.defaultRowHeight*i,a=o?o.getId()+1:0,l=function(o){var n=e.getCachedBlockHeight(o),i=null!=n?n:s;return{height:i,pixelInBlock:t<=i+r}},d=l(a);!d.pixelInBlock;)r+=d.height,n+=i,d=l(++a);var c=t-r,p=d.height/i;return n+(0|Math.floor(c/p))})),r=this.getDisplayIndexEnd()-1;return o=Math.min(o,r)},n.prototype.clearDisplayIndexes=function(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.getBlocksInOrder().forEach((function(t){return t.clearDisplayIndexes()}))},n.prototype.setDisplayIndexes=function(t,o){var r=this;this.displayIndexStart=t.peek(),this.cacheTopPixel=o.value;var n=-1,i=this.storeParams.cacheBlockSize;this.getBlocksInOrder().forEach((function(s){var a=s.getId(),l=a-n-1,d=l*i;d>0&&t.skip(d);for(var c=1;c<=l;c++){var p=a-c;e.exists(r.blockHeights[p])?o.value+=r.blockHeights[p]:o.value+=i*r.defaultRowHeight}n=a,s.setDisplayIndexes(t,o),r.blockHeights[a]=s.getBlockHeightPx()}));var s=(n+1)*i-1,a=this.getRowCount()-s-1;a>0&&(t.skip(a),o.value+=a*this.defaultRowHeight),this.displayIndexEnd=t.peek(),this.cacheHeightPixels=o.value-this.cacheTopPixel},n.prototype.getRowUsingDisplayIndex=function(t,o){var r=this;if(void 0===o&&(o=!1),this.isDisplayIndexInStore(t)){return this.findBlockAndExecute((function(e){return e.isDisplayIndexInBlock(t)?g.FOUND:e.isBlockBefore(t)?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowUsingDisplayIndex(t)}),(function(n){if(!o){var i,s,a,l=r.storeParams.cacheBlockSize;if(n){i=n.getId()+1,s=n.getDisplayIndexEnd(),a=n.getBlockHeightPx()+n.getBlockTopPx();for(;!(t>=s&&t<s+l);){s+=l;var d=r.blockHeights[i];e.exists(d)?a+=d:a+=r.defaultRowHeight*l,i++}}else{var c=t-r.displayIndexStart;i=Math.floor(c/l),s=r.displayIndexStart+i*l,a=r.cacheTopPixel+i*l*r.defaultRowHeight}return r.logger.log("block missing, rowIndex = "+t+", creating #"+i+", displayIndexStart = "+s),r.createBlock(i,s,{value:a}).getRowUsingDisplayIndex(t)}}))}},n.prototype.getTopLevelRowDisplayedIndex=function(t){var e=this.storeParams.cacheBlockSize,o=Math.floor(t/e);return this.findBlockAndExecute((function(t){return t.getId()===o?g.FOUND:t.getId()<o?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowUsingLocalIndex(t).rowIndex}),(function(o){if(!o)return t;var r,n=e*(o.getId()+1)-1,i=o.getRowUsingLocalIndex(n);i.expanded&&i.childStore?r=i.childStore.getDisplayIndexEnd()-1:r=i.expanded&&i.detailNode?i.detailNode.rowIndex:i.rowIndex;return r+(t-n)}))},n.prototype.addStoreStates=function(t){t.push({type:"partial",route:this.parentRowNode.getGroupKeys(),rowCount:this.rowCount,lastRowIndexKnown:this.lastRowIndexKnown,info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow((function(e){return e.addStoreStates(t)}))},n.prototype.getCachedBlockHeight=function(t){return this.blockHeights[t]},n.prototype.createBlock=function(t,e,o){var n=this.createBean(new V(t,this.parentRowNode,this.ssrmParams,this.storeParams,this));return n.setDisplayIndexes(new r(e),o),this.blocks[n.getId()]=n,this.purgeBlocksIfNeeded(n),this.rowNodeBlockLoader.addBlock(n),n},n.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},n.prototype.isDisplayIndexInStore=function(t){return 0!==this.getRowCount()&&(t>=this.displayIndexStart&&t<this.displayIndexEnd)},n.prototype.applyTransaction=function(t){return{status:c.StoreWrongType}},n.prototype.getChildStore=function(t){var e=this;return this.storeUtils.getChildStore(t,this,(function(t){var o=null;return e.getBlocksInOrder().forEach((function(e){e.forEachNodeShallow((function(e){e.key===t&&(o=e)}),new r)})),o}))},n.prototype.isPixelInRange=function(t){return 0!==this.getRowCount()&&(t>=this.cacheTopPixel&&t<this.cacheTopPixel+this.cacheHeightPixels)},n.prototype.refreshAfterFilter=function(t){this.resetStore()},n.prototype.refreshAfterSort=function(t){this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,t)?this.resetStore():this.forEachChildStoreShallow((function(e){return e.refreshAfterSort(t)}))},n.prototype.forEachChildStoreShallow=function(t){this.getBlocksInOrder().forEach((function(e){if(e.isGroupLevel()){e.forEachNodeShallow((function(e){var o=e.childStore;o&&t(o)}),new r)}}))},n.MAX_EMPTY_BLOCKS_TO_KEEP=2,n.INITIAL_ROW_COUNT=1,n.OVERFLOW_SIZE=1,z([i("rowRenderer")],n.prototype,"rowRenderer",void 0),z([i("rowNodeBlockLoader")],n.prototype,"rowNodeBlockLoader",void 0),z([i("ssrmStoreUtils")],n.prototype,"storeUtils",void 0),z([i("focusService")],n.prototype,"focusService",void 0),z([i("columnModel")],n.prototype,"columnModel",void 0),z([a],n.prototype,"postConstruct",null),z([s],n.prototype,"destroyAllBlocks",null),z([q(0,u("loggerFactory"))],n.prototype,"setBeans",null),n}(d),Y=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),X=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},Z=function(o){function n(t,e,n){var i=o.call(this,0)||this;return i.nodeIdSequence=new r,i.info={},i.ssrmParams=t,i.parentRowNode=n,i.level=n.level+1,i.groupLevel=t.rowGroupCols?i.level<t.rowGroupCols.length:void 0,i.leafGroup=!!t.rowGroupCols&&i.level===t.rowGroupCols.length-1,i}return Y(n,o),n.prototype.postConstruct=function(){var t=this;if(this.usingTreeData=this.gridOptionsWrapper.isTreeData(),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){var e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}this.initialiseRowNodes(),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc((function(){return t.rowNodeBlockLoader.removeBlock(t)}))},n.prototype.destroyRowNodes=function(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}},n.prototype.initialiseRowNodes=function(t,e){void 0===t&&(t=1),void 0===e&&(e=!1),this.destroyRowNodes();for(var o=0;o<t;o++){var r=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});e&&(r.failedLoad=!0),this.allRowNodes.push(r),this.nodesAfterFilter.push(r),this.nodesAfterSort.push(r)}},n.prototype.getBlockStateJson=function(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}},n.prototype.loadFromDatasource=function(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,successCallback:this.pageLoaded.bind(this,this.getVersion()),success:this.success.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})},n.prototype.getStartRow=function(){return 0},n.prototype.getEndRow=function(){return this.nodesAfterSort.length},n.prototype.createDataNode=function(t,o){var r=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=o?e.insertIntoArray(this.allRowNodes,r,o):this.allRowNodes.push(r);var n=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(r,t,n,void 0),this.nodeManager.addRowNode(r),this.blockUtils.checkOpenByDefault(r),this.allNodesMap[r.id]=r,r},n.prototype.prefixId=function(t){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+t:t.toString()},n.prototype.processServerFail=function(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()},n.prototype.processServerResult=function(t){if(this.isAlive()){t.storeInfo&&Object.assign(this.info,t.storeInfo);var o=this.allRowNodes.length>0?this.allNodesMap:void 0;if(this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},!t.rowData){e.doOnce((function(){return console.warn('AG Grid: "params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.',t)}),"FullStore.noData")}this.createOrRecycleNodes(o,t.rowData),o&&this.blockUtils.destroyRowNodes(e.getAllValuesInObject(o)),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}},n.prototype.createOrRecycleNodes=function(t,e){var o=this;if(e){e.forEach((function(e){var r=function(e){if(t){var r=o.gridOptionsWrapper.getRowIdFunc();if(r){var n=o.parentRowNode.getGroupKeys(),i=o.level,s=r({data:e,parentKeys:n.length>0?n:void 0,level:i}),a=t[s];if(a)return delete t[s],a}}}(e);r?function(t,e){o.allNodesMap[t.id]=t,o.blockUtils.updateDataIntoRowNode(t,e),o.allRowNodes.push(t)}(r,e):o.createDataNode(e)}))}},n.prototype.flushAsyncTransactions=function(){var t=this;window.setTimeout((function(){return t.transactionManager.flushAsyncTransactions()}),0)},n.prototype.filterAndSortNodes=function(){this.filterRowNodes(),this.sortRowNodes()},n.prototype.sortRowNodes=function(){var t=this.sortController.getSortOptions(),e=!t||0==t.length,o=this.gridOptionsWrapper.isServerSideSortingAlwaysResets();this.nodesAfterSort=e||o?this.nodesAfterFilter:this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t)},n.prototype.filterRowNodes=function(){var t=this,e=this.gridOptionsWrapper.isServerSideFilteringAlwaysResets(),o=this.groupLevel;this.nodesAfterFilter=e||o?this.allRowNodes:this.allRowNodes.filter((function(e){return t.filterManager.doesRowPassFilter({rowNode:e})}))},n.prototype.clearDisplayIndexes=function(){var t=this;this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEach((function(e){return t.blockUtils.clearDisplayIndex(e)}))},n.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},n.prototype.isDisplayIndexInStore=function(t){return 0!==this.getRowCount()&&(t>=this.displayIndexStart&&t<this.displayIndexEnd)},n.prototype.setDisplayIndexes=function(t,e){var o=this;this.displayIndexStart=t.peek(),this.topPx=e.value;var r={};this.nodesAfterSort.forEach((function(n){o.blockUtils.setDisplayIndex(n,t,e),r[n.id]=!0})),this.allRowNodes.forEach((function(t){r[t.id]||o.blockUtils.clearDisplayIndex(t)})),this.displayIndexEnd=t.peek(),this.heightPx=e.value-this.topPx},n.prototype.forEachNodeDeep=function(t,e){void 0===e&&(e=new r),this.allRowNodes.forEach((function(o){t(o,e.next());var r=o.childStore;r&&r.forEachNodeDeep(t,e)}))},n.prototype.forEachNodeDeepAfterFilterAndSort=function(t,e){void 0===e&&(e=new r),this.nodesAfterSort.forEach((function(o){t(o,e.next());var r=o.childStore;r&&r.forEachNodeDeepAfterFilterAndSort(t,e)}))},n.prototype.getRowUsingDisplayIndex=function(t){if(this.isDisplayIndexInStore(t))return this.blockUtils.binarySearchForDisplayIndex(t,this.nodesAfterSort)},n.prototype.getRowBounds=function(t){for(var e=0;e<this.nodesAfterSort.length;e++){var o=this.nodesAfterSort[e],r=this.blockUtils.extractRowBounds(o,t);if(r)return r}return null},n.prototype.isPixelInRange=function(t){return t>=this.topPx&&t<this.topPx+this.heightPx},n.prototype.getRowIndexAtPixel=function(t){var e=this;if(t<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(t>=this.topPx+this.heightPx){var o=this.nodesAfterSort[this.nodesAfterSort.length-1],r=o.rowTop+o.rowHeight;if(t>=r&&o.expanded){if(o.childStore&&o.childStore.getRowCount()>0)return o.childStore.getRowIndexAtPixel(t);if(o.detailNode)return o.detailNode.rowIndex}return o.rowIndex}var n=null;return this.nodesAfterSort.forEach((function(o){var r=e.blockUtils.getIndexAtPixel(o,t);null!=r&&(n=r)})),null==n?this.displayIndexEnd-1:n},n.prototype.getChildStore=function(t){var e=this;return this.storeUtils.getChildStore(t,this,(function(t){return e.allRowNodes.find((function(e){return e.key===t}))}))},n.prototype.forEachChildStoreShallow=function(t){this.allRowNodes.forEach((function(e){var o=e.childStore;o&&t(o)}))},n.prototype.refreshAfterFilter=function(t){t.alwaysReset||this.gridOptionsWrapper.isTreeData()?this.refreshStore(!0):(this.filterAndSortNodes(),this.forEachChildStoreShallow((function(e){return e.refreshAfterFilter(t)})))},n.prototype.refreshAfterSort=function(t){t.alwaysReset?this.refreshStore(!0):(this.sortRowNodes(),this.forEachChildStoreShallow((function(e){return e.refreshAfterSort(t)})))},n.prototype.applyTransaction=function(t){switch(this.getState()){case p.STATE_FAILED:return{status:c.StoreLoadingFailed};case p.STATE_LOADING:return{status:c.StoreLoading};case p.STATE_WAITING_TO_LOAD:return{status:c.StoreWaitingToLoad}}var e=this.gridOptionsWrapper.getIsApplyServerSideTransactionFunc();if(e&&!e({transaction:t,parentNode:this.parentRowNode,storeInfo:this.info}))return{status:c.Cancelled};var o={status:c.Applied,remove:[],update:[],add:[]},r=[];return this.executeAdd(t,o),this.executeRemove(t,o,r),this.executeUpdate(t,o,r),this.filterAndSortNodes(),this.updateSelection(r),o},n.prototype.updateSelection=function(e){if(e.length>0){e.forEach((function(t){t.setSelected(!1,!1,!0)}));var o={type:t.EVENT_SELECTION_CHANGED,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()};this.eventService.dispatchEvent(o)}},n.prototype.executeAdd=function(t,o){var r=this,n=t.add,i=t.addIndex;e.missingOrEmpty(n)||("number"==typeof i&&i>=0?n.reverse().forEach((function(t){var e=r.createDataNode(t,i);o.add.push(e)})):n.forEach((function(t){var e=r.createDataNode(t);o.add.push(e)})))},n.prototype.executeRemove=function(t,e,o){var r=this,n=t.remove;if(null!=n){var i={};n.forEach((function(t){var n=r.lookupRowNode(t);n&&(n.isSelected()&&o.push(n),n.clearRowTopAndRowIndex(),i[n.id]=!0,delete r.allNodesMap[n.id],e.remove.push(n),r.nodeManager.removeNode(n))})),this.allRowNodes=this.allRowNodes.filter((function(t){return!i[t.id]}))}},n.prototype.executeUpdate=function(t,e,o){var r=this,n=t.update;null!=n&&n.forEach((function(t){var n=r.lookupRowNode(t);n&&(n.updateData(t),!n.selectable&&n.isSelected()&&o.push(n),e.update.push(n))}))},n.prototype.lookupRowNode=function(t){var e,o=this.gridOptionsWrapper.getRowIdFunc();if(null!=o){var r=this.level,n=this.parentRowNode.getGroupKeys(),i=o({data:t,parentKeys:n.length>0?n:void 0,level:r});if(!(e=this.allNodesMap[i]))return console.error("AG Grid: could not find row id="+i+", data item was not found for this id"),null}else if(!(e=this.allRowNodes.find((function(e){return e.data===t}))))return console.error("AG Grid: could not find data item as object was not found",t),null;return e},n.prototype.addStoreStates=function(t){t.push({type:"full",route:this.parentRowNode.getGroupKeys(),rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow((function(e){return e.addStoreStates(t)}))},n.prototype.refreshStore=function(t){if(t){var e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()},n.prototype.retryLoads=function(){this.getState()===p.STATE_FAILED&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow((function(t){return t.retryLoads()}))},n.prototype.scheduleLoad=function(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()},n.prototype.fireStoreUpdatedEvent=function(){var e={type:t.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},n.prototype.getRowCount=function(){return this.nodesAfterSort.length},n.prototype.getTopLevelRowDisplayedIndex=function(t){return this.nodesAfterSort[t].rowIndex},n.prototype.isLastRowIndexKnown=function(){return this.getState()==p.STATE_LOADED},n.prototype.getRowNodesInRange=function(t,o){var r=[],n=!1;return e.missing(t)&&(n=!0),this.nodesAfterSort.forEach((function(e){var i=e===t||e===o;(n||i)&&r.push(e),i&&(n=!n)})),n?[]:r},X([i("ssrmStoreUtils")],n.prototype,"storeUtils",void 0),X([i("ssrmBlockUtils")],n.prototype,"blockUtils",void 0),X([i("columnModel")],n.prototype,"columnModel",void 0),X([i("rowNodeBlockLoader")],n.prototype,"rowNodeBlockLoader",void 0),X([i("rowNodeSorter")],n.prototype,"rowNodeSorter",void 0),X([i("sortController")],n.prototype,"sortController",void 0),X([i("ssrmNodeManager")],n.prototype,"nodeManager",void 0),X([i("filterManager")],n.prototype,"filterManager",void 0),X([i("ssrmTransactionManager")],n.prototype,"transactionManager",void 0),X([i("columnApi")],n.prototype,"columnApi",void 0),X([i("gridApi")],n.prototype,"gridApi",void 0),X([a],n.prototype,"postConstruct",null),X([s],n.prototype,"destroyRowNodes",null),n}(p),Q=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},$=function(){function t(){}return t.prototype.createStore=function(t,e){var o=this.getStoreParams(t,e);return new("partial"===o.storeType?J:Z)(t,o,e)},t.prototype.getStoreParams=function(t,e){var o=this.getLevelSpecificParams(e),r=this.getStoreType(o);return{storeType:r,cacheBlockSize:this.getBlockSize(r,o),maxBlocksInCache:this.getMaxBlocksInCache(r,t,o)}},t.prototype.getMaxBlocksInCache=function(t,o,r){if("full"!=t){var n=r&&null!=r.maxBlocksInCache?r.maxBlocksInCache:this.gridOptionsWrapper.getMaxBlocksInCache();if(null!=n&&n>=0)if(o.dynamicRowHeight){e.doOnce((function(){return console.warn("AG Grid: Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.")}),"storeFactory.maxBlocksInCache.dynamicRowHeight")}else{if(!this.columnModel.isAutoRowHeightActive())return n;e.doOnce((function(){return console.warn("AG Grid: Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.")}),"storeFactory.maxBlocksInCache.autoRowHeightActive")}}},t.prototype.getBlockSize=function(t,e){if("full"!=t){var o=e&&null!=e.cacheBlockSize?e.cacheBlockSize:this.gridOptionsWrapper.getCacheBlockSize();return null!=o&&o>0?o:100}},t.prototype.getLevelSpecificParams=function(t){var e=this.gridOptionsWrapper.getServerSideStoreParamsFunc();if(e)return e({level:t.level+1,parentRowNode:t.level>=0?t:void 0,rowGroupColumns:this.columnModel.getRowGroupColumns(),pivotColumns:this.columnModel.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()})},t.prototype.getStoreType=function(t){var e=t&&null!=t.storeType?t.storeType:this.gridOptionsWrapper.getServerSideStoreType();switch(e){case"partial":case"full":return e;case null:case void 0:return"full";default:var o=["full","partial"].join(", ");return console.warn("AG Grid: invalid Server Side Store Type "+e+", valid types are ["+o+"]"),"partial"}},Q([i("gridOptionsWrapper")],t.prototype,"gridOptionsWrapper",void 0),Q([i("columnModel")],t.prototype,"columnModel",void 0),t=Q([l("ssrmStoreFactory")],t)}(),tt=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},et=function(){function t(){}return t.prototype.isSortingWithValueColumn=function(t){for(var e=this.columnModel.getValueColumns().map((function(t){return t.getColId()})),o=0;o<t.length;o++)if(e.indexOf(t[o])>-1)return!0;return!1},t.prototype.isSortingWithSecondaryColumn=function(t){if(!this.columnModel.getSecondaryColumns())return!1;for(var e=this.columnModel.getSecondaryColumns().map((function(t){return t.getColId()})),o=0;o<t.length;o++)if(e.indexOf(t[o])>-1)return!0;return!1},tt([i("columnModel")],t.prototype,"columnModel",void 0),t=tt([l("ssrmListenerUtils")],t)}(),ot={moduleName:h.ServerSideRowModelModule,rowModels:{serverSide:S},beans:[b,B,N,C,A,k,G,$,et],dependantModules:[f]};export{ot as ServerSideRowModelModule}; | ||
import{Events as t,_ as e,RowNode as o,NumberSequence as r,Constants as n,Autowired as i,PreDestroy as s,PostConstruct as a,Bean as l,BeanStub as d,ServerSideTransactionResultStatus as c,RowNodeBlock as p,Qualifier as u,ModuleNames as h}from"@ag-grid-community/core";import{EnterpriseCoreModule as f}from"@ag-grid-enterprise/core";var y,g,v=(y=function(t,e){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),w=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},S=function(d){function c(){var t=null!==d&&d.apply(this,arguments)||this;return t.pauseStoreUpdateListening=!1,t.started=!1,t}return v(c,d),c.prototype.ensureRowHeightsValid=function(){return!1},c.prototype.start=function(){this.started=!0;var t=this.gridOptionsWrapper.getServerSideDatasource();t&&this.setDatasource(t)},c.prototype.destroyDatasource=function(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)},c.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,t.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,t.EVENT_STORE_UPDATED,this.onStoreUpdated.bind(this));var e=this.resetRootStore.bind(this);this.addManagedListener(this.eventService,t.EVENT_COLUMN_VALUE_CHANGED,e),this.addManagedListener(this.eventService,t.EVENT_COLUMN_PIVOT_CHANGED,e),this.addManagedListener(this.eventService,t.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,t.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.verifyProps()},c.prototype.verifyProps=function(){if(null!=this.gridOptionsWrapper.getInitialGroupOrderComparator()){e.doOnce((function(){return console.warn("AG Grid: initialGroupOrderComparator cannot be used with Server Side Row Model. If using Full Store, then provide the rows to the grid in the desired sort order. If using Partial Store, then sorting is done on the server side, nothing to do with the client.")}),"SSRM.InitialGroupOrderComparator")}if(this.gridOptionsWrapper.isRowSelection()&&null==this.gridOptionsWrapper.getRowIdFunc()){e.doOnce((function(){return console.warn("AG Grid: getRowId callback must be provided for Server Side Row Model selection to work correctly.")}),"SSRM.SelectionNeedsRowNodeIdFunc")}},c.prototype.setDatasource=function(t){this.started&&(this.destroyDatasource(),this.datasource=t,this.resetRootStore())},c.prototype.isLastRowIndexKnown=function(){var t=this.getRootStore();return!!t&&t.isLastRowIndexKnown()},c.prototype.onColumnEverything=function(){if(!this.gridOptionsWrapper.isSuppressEnterpriseResetOnNewColumns())if(this.storeParams){var t=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),o=this.columnsToValueObjects(this.columnModel.getValueColumns()),r=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=!e.jsonEquals(this.storeParams.sortModel,this.sortController.getSortModel()),i=!e.jsonEquals(this.storeParams.rowGroupCols,t),s=!e.jsonEquals(this.storeParams.pivotCols,r),a=!e.jsonEquals(this.storeParams.valueCols,o);(n||i||s||a)&&this.resetRootStore()}else this.resetRootStore()},c.prototype.destroyRootStore=function(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())},c.prototype.refreshAfterSort=function(t,e){this.storeParams&&(this.storeParams.sortModel=t);var o=this.getRootStore();o&&(o.refreshAfterSort(e),this.onStoreUpdated())},c.prototype.resetRootStore=function(){this.destroyRootStore(),this.rootNode=new o(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds());var e={type:t.EVENT_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e),this.dispatchModelUpdated(!0)},c.prototype.columnsToValueObjects=function(t){var e=this;return t.map((function(t){return{id:t.getId(),aggFunc:t.getAggFunc(),displayName:e.columnModel.getDisplayNameForColumn(t,"model"),field:t.getColDef().field}}))},c.prototype.createStoreParams=function(){var t=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),e=this.columnsToValueObjects(this.columnModel.getValueColumns()),o=this.columnsToValueObjects(this.columnModel.getPivotColumns()),n=this.gridOptionsWrapper.isDynamicRowHeight();return{valueCols:e,rowGroupCols:t,pivotCols:o,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager.getFilterModel(),sortModel:this.sortListener.extractSortModel(),datasource:this.datasource,lastAccessedSequence:new r,dynamicRowHeight:n}},c.prototype.getParams=function(){return this.storeParams},c.prototype.dispatchModelUpdated=function(e){void 0===e&&(e=!1);var o={type:t.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1};this.eventService.dispatchEvent(o)},c.prototype.onStoreUpdated=function(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())},c.prototype.onRowHeightChanged=function(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()},c.prototype.updateRowIndexesAndBounds=function(){var t=this.getRootStore();t&&t.setDisplayIndexes(new r,{value:0})},c.prototype.retryLoads=function(){var t=this.getRootStore();t&&(t.retryLoads(),this.onStoreUpdated())},c.prototype.getRow=function(t){var e=this.getRootStore();if(e)return e.getRowUsingDisplayIndex(t)},c.prototype.expandAll=function(t){this.pauseStoreUpdateListening=!0,this.forEachNode((function(e){e.group&&e.setExpanded(t)})),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()},c.prototype.refreshAfterFilter=function(t,e){this.storeParams&&(this.storeParams.filterModel=t);var o=this.getRootStore();o&&(o.refreshAfterFilter(e),this.onStoreUpdated())},c.prototype.getRootStore=function(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore},c.prototype.getRowCount=function(){var t=this.getRootStore();return t?t.getDisplayIndexEnd():0},c.prototype.getTopLevelRowCount=function(){var t=this.getRootStore();return t?t.getRowCount():1},c.prototype.getTopLevelRowDisplayedIndex=function(t){var e=this.getRootStore();return e?e.getTopLevelRowDisplayedIndex(t):t},c.prototype.getRowBounds=function(t){var e=this.getRootStore();return e?e.getRowBounds(t):{rowTop:0,rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber()}},c.prototype.getRowIndexAtPixel=function(t){var e=this.getRootStore();return t<=0||!e?0:e.getRowIndexAtPixel(t)},c.prototype.isEmpty=function(){return!1},c.prototype.isRowsToRender=function(){return null!=this.getRootStore()&&this.getRowCount()>0},c.prototype.getType=function(){return n.ROW_MODEL_TYPE_SERVER_SIDE},c.prototype.forEachNode=function(t){var e=this.getRootStore();e&&e.forEachNodeDeep(t)},c.prototype.forEachNodeAfterFilterAndSort=function(t){var e=this.getRootStore();e&&e.forEachNodeDeepAfterFilterAndSort(t)},c.prototype.executeOnStore=function(t,e){var o=this.getRootStore();if(o){var r=o.getChildStore(t);r&&e(r)}},c.prototype.refreshStore=function(t){void 0===t&&(t={});var e=t.route?t.route:[];this.executeOnStore(e,(function(e){return e.refreshStore(1==t.purge)}))},c.prototype.getStoreState=function(){var t=[],e=this.getRootStore();return e&&e.addStoreStates(t),t},c.prototype.getNodesInRangeForSelection=function(t,o){return e.exists(o)&&t.parent!==o.parent?[]:t.parent.childStore.getRowNodesInRange(o,t)},c.prototype.getRowNode=function(t){var e;return this.forEachNode((function(o){o.id===t&&(e=o),o.detailNode&&o.detailNode.id===t&&(e=o.detailNode)})),e},c.prototype.isRowPresent=function(t){return!!this.getRowNode(t.id)},w([i("columnModel")],c.prototype,"columnModel",void 0),w([i("filterManager")],c.prototype,"filterManager",void 0),w([i("sortController")],c.prototype,"sortController",void 0),w([i("gridApi")],c.prototype,"gridApi",void 0),w([i("columnApi")],c.prototype,"columnApi",void 0),w([i("rowRenderer")],c.prototype,"rowRenderer",void 0),w([i("ssrmSortService")],c.prototype,"sortListener",void 0),w([i("ssrmNodeManager")],c.prototype,"nodeManager",void 0),w([i("ssrmStoreFactory")],c.prototype,"storeFactory",void 0),w([i("beans")],c.prototype,"beans",void 0),w([s],c.prototype,"destroyDatasource",null),w([a],c.prototype,"addEventListeners",null),w([s],c.prototype,"destroyRootStore",null),c=w([l("rowModel")],c)}(d),R=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),I=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},N=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return R(o,t),o.prototype.loadFromDatasource=function(t){var e=t.storeParams,o=t.parentBlock,r=t.parentNode.getGroupKeys();if(e.datasource){var n={startRow:t.startRow,endRow:t.endRow,rowGroupCols:e.rowGroupCols,valueCols:e.valueCols,pivotCols:e.pivotCols,pivotMode:e.pivotMode,groupKeys:r,filterModel:e.filterModel,sortModel:e.sortModel},i={successCallback:t.successCallback,success:t.success,failCallback:t.failCallback,fail:t.fail,request:n,parentNode:t.parentNode,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()};window.setTimeout((function(){e.datasource&&o.isAlive()?e.datasource.getRows(i):t.failCallback()}),0)}},o.prototype.getChildStore=function(t,o,r){if(e.missingOrEmpty(t))return o;var n=r(t[0]);if(n){var i=t.slice(1,t.length),s=n.childStore;return s?s.getChildStore(i):null}return null},o.prototype.isServerRefreshNeeded=function(t,e,o){if(o.alwaysReset||o.valueColChanged||o.secondaryColChanged)return!0;var r=t.level+1;if(!(r<e.length))return!0;var n=e[r].id;return!!(o.changedColumns.indexOf(n)>-1)},I([i("columnApi")],o.prototype,"columnApi",void 0),I([i("gridApi")],o.prototype,"gridApi",void 0),o=I([l("ssrmStoreUtils")],o)}(d),m=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),x=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},C=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return m(r,t),r.prototype.postConstruct=function(){this.rowHeight=this.gridOptionsWrapper.getRowHeightAsNumber(),this.usingTreeData=this.gridOptionsWrapper.isTreeData(),this.usingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},r.prototype.createRowNode=function(t){var e=new o(this.beans),r=null!=t.rowHeight?t.rowHeight:this.rowHeight;return e.setRowHeight(r),e.group=t.group,e.leafGroup=t.leafGroup,e.level=t.level,e.uiLevel=t.level,e.parent=t.parent,e.stub=!0,e.group&&(e.expanded=!1,e.field=t.field,e.rowGroupColumn=t.rowGroupColumn),e},r.prototype.destroyRowNodes=function(t){t&&t.forEach(this.destroyRowNode.bind(this))},r.prototype.destroyRowNode=function(t){t.childStore&&(this.destroyBean(t.childStore),t.childStore=null),t.clearRowTopAndRowIndex(),null!=t.id&&this.nodeManager.removeNode(t)},r.prototype.setTreeGroupInfo=function(t){var e=this.gridOptionsWrapper.getIsServerSideGroupFunc(),o=this.gridOptionsWrapper.getServerSideGroupKeyFunc();null!=e&&(t.setGroup(e(t.data)),t.group&&null!=o&&(t.key=o(t.data))),t.group||null==t.childStore||(this.destroyBean(t.childStore),t.childStore=null)},r.prototype.setRowGroupInfo=function(t){t.key=this.valueService.getValue(t.rowGroupColumn,t),null!==t.key&&void 0!==t.key||e.doOnce((function(){console.warn("AG Grid: null and undefined values are not allowed for server side row model keys"),t.rowGroupColumn&&console.warn("column = "+t.rowGroupColumn.getId()),console.warn("data is ",t.data)}),"ServerSideBlock-CannotHaveNullOrUndefinedForKey")},r.prototype.setMasterDetailInfo=function(t){var e=this.gridOptionsWrapper.getIsRowMasterFunc();t.master=null==e||e(t.data)},r.prototype.updateDataIntoRowNode=function(t,e){t.updateData(e),this.usingTreeData?this.setTreeGroupInfo(t):t.group||this.usingMasterDetail},r.prototype.setDataIntoRowNode=function(t,o,r,n){t.stub=!1,e.exists(o)?(t.setDataAndId(o,r),this.usingTreeData?this.setTreeGroupInfo(t):t.group?this.setRowGroupInfo(t):this.usingMasterDetail&&this.setMasterDetailInfo(t)):(t.setDataAndId(void 0,void 0),t.key=null),(this.usingTreeData||t.group)&&(this.setGroupDataIntoRowNode(t),this.setChildCountIntoRowNode(t)),e.exists(o)&&t.setRowHeight(this.gridOptionsWrapper.getRowHeightForNode(t,!1,n).height)},r.prototype.setChildCountIntoRowNode=function(t){var e=this.gridOptionsWrapper.getChildCountFunc();e&&(t.allChildrenCount=e(t.data))},r.prototype.setGroupDataIntoRowNode=function(t){var e=this,o=this.columnModel.getGroupDisplayColumns(),r=this.gridOptionsWrapper.isTreeData();o.forEach((function(o){if(null==t.groupData&&(t.groupData={}),r)t.groupData[o.getColId()]=t.key;else if(o.isRowGroupDisplayed(t.rowGroupColumn.getId())){var n=e.valueService.getValue(t.rowGroupColumn,t);t.groupData[o.getColId()]=n}}))},r.prototype.clearDisplayIndex=function(t){(t.clearRowTopAndRowIndex(),t.group&&e.exists(t.childStore))&&t.childStore.clearDisplayIndexes();t.master&&t.detailNode&&t.detailNode.clearRowTopAndRowIndex()},r.prototype.setDisplayIndex=function(t,o,r){if(t.setRowIndex(o.next()),t.setRowTop(r.value),r.value+=t.rowHeight,t.master&&(t.expanded&&t.detailNode?(t.detailNode.setRowIndex(o.next()),t.detailNode.setRowTop(r.value),r.value+=t.detailNode.rowHeight):t.detailNode&&t.detailNode.clearRowTopAndRowIndex()),t.group&&e.exists(t.childStore)){var n=t.childStore;t.expanded?n.setDisplayIndexes(o,r):n.clearDisplayIndexes()}},r.prototype.binarySearchForDisplayIndex=function(t,o){var r=0,n=o.length-1;if(e.missing(n)||e.missing(r))console.warn("AG Grid: error: topPointer = "+n+", bottomPointer = "+r);else for(;;){var i=Math.floor((r+n)/2),s=o[i];if(s.rowIndex===t)return s;var a=s.master&&s.expanded,l=s.detailNode;if(a&&l&&l.rowIndex===t)return s.detailNode;var d=s.childStore;if(s.expanded&&d&&d.isDisplayIndexInStore(t))return d.getRowUsingDisplayIndex(t);if(s.rowIndex<t)r=i+1;else{if(!(s.rowIndex>t))return void console.warn("AG Grid: error: unable to locate rowIndex = "+t+" in cache");n=i-1}}},r.prototype.extractRowBounds=function(t,o){var r=function(t){return{rowHeight:t.rowHeight,rowTop:t.rowTop}};if(t.rowIndex===o)return r(t);if(t.group&&t.expanded&&e.exists(t.childStore)){var n=t.childStore;if(n.isDisplayIndexInStore(o))return n.getRowBounds(o)}else if(t.master&&t.expanded&&e.exists(t.detailNode)&&t.detailNode.rowIndex===o)return r(t.detailNode)},r.prototype.getIndexAtPixel=function(t,o){if(t.isPixelInRange(o))return t.rowIndex;var r=t.master&&t.expanded,n=t.detailNode;if(r&&n&&n.isPixelInRange(o))return t.detailNode.rowIndex;if(t.group&&t.expanded&&e.exists(t.childStore)){var i=t.childStore;if(i.isPixelInRange(o))return i.getRowIndexAtPixel(o)}return null},r.prototype.createNodeIdPrefix=function(t){for(var e=[],o=t;o&&o.level>=0;)e.push(o.key),o=o.parent;if(e.length>0)return e.reverse().join("-")},r.prototype.checkOpenByDefault=function(t){if(t.isExpandable()){var e=this.gridOptionsWrapper.getIsServerSideGroupOpenByDefaultFunc();if(e)e({data:t.data,rowNode:t})&&window.setTimeout((function(){return t.setExpanded(!0)}),0)}},x([i("valueService")],r.prototype,"valueService",void 0),x([i("columnModel")],r.prototype,"columnModel",void 0),x([i("ssrmNodeManager")],r.prototype,"nodeManager",void 0),x([i("beans")],r.prototype,"beans",void 0),x([a],r.prototype,"postConstruct",null),r=x([l("ssrmBlockUtils")],r)}(d),O=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},A=function(){function t(){this.rowNodes={}}return t.prototype.addRowNode=function(t){var e=t.id;this.rowNodes[e]&&(console.warn("AG Grid: Duplicate node id "+t.id+". Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values."),console.warn("first instance",this.rowNodes[e].data),console.warn("second instance",t.data)),this.rowNodes[e]=t},t.prototype.removeNode=function(t){var e=t.id;this.rowNodes[e]&&(this.rowNodes[e]=void 0)},t.prototype.clear=function(){this.rowNodes={}},O([s],t.prototype,"clear",null),t=O([l("ssrmNodeManager")],t)}(),E=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),D=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},k=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.asyncTransactions=[],t}return E(o,e),o.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()},o.prototype.applyTransactionAsync=function(t,e){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:t,callback:e})},o.prototype.scheduleExecuteAsync=function(){var t=this,e=this.gridOptionsWrapper.getAsyncTransactionWaitMillis();this.asyncTransactionsTimeout=window.setTimeout((function(){t.executeAsyncTransactions()}),e)},o.prototype.executeAsyncTransactions=function(){var e=this;if(this.asyncTransactions){var o=[],r=[],n=[],i=!1;if(this.asyncTransactions.forEach((function(t){var s;e.serverSideRowModel.executeOnStore(t.transaction.route,(function(e){s=e.applyTransaction(t.transaction)})),null==s&&(s={status:c.StoreNotFound}),r.push(s),s.status==c.StoreLoading?n.push(t):(t.callback&&o.push((function(){return t.callback(s)})),s.status===c.Applied&&(i=!0))})),o.length>0&&window.setTimeout((function(){o.forEach((function(t){return t()}))}),0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=n,i&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:t.EVENT_STORE_UPDATED})),r.length>0){var s={api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),type:t.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:r};this.eventService.dispatchEvent(s)}}},o.prototype.flushAsyncTransactions=function(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()},o.prototype.applyTransaction=function(e){var o;return this.serverSideRowModel.executeOnStore(e.route,(function(t){o=t.applyTransaction(e)})),o?(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:t.EVENT_STORE_UPDATED}),o):{status:c.StoreNotFound}},D([i("rowNodeBlockLoader")],o.prototype,"rowNodeBlockLoader",void 0),D([i("valueCache")],o.prototype,"valueCache",void 0),D([i("rowModel")],o.prototype,"serverSideRowModel",void 0),D([a],o.prototype,"postConstruct",null),o=D([l("ssrmTransactionManager")],o)}(d),P=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),T=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},b=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return P(n,r),n.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()&&this.addManagedListener(this.eventService,t.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this))},n.prototype.onRowGroupOpened=function(o){var r=o.node;if(r.expanded){if(r.master)this.createDetailNode(r);else if(e.missing(r.childStore)){var n=this.serverSideRowModel.getParams();r.childStore=this.createBean(this.storeFactory.createStore(n,r))}}else this.gridOptionsWrapper.isPurgeClosedRowNodes()&&e.exists(r.childStore)&&(r.childStore=this.destroyBean(r.childStore));var i={type:t.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(i)},n.prototype.createDetailNode=function(t){if(e.exists(t.detailNode))return t.detailNode;var r=new o(this.beans);r.detail=!0,r.selectable=!1,r.parent=t,e.exists(t.id)&&(r.id="detail_"+t.id),r.data=t.data,r.level=t.level+1;var n=this.gridOptionsWrapper.getRowHeightForNode(r).height;return r.rowHeight=n||200,t.detailNode=r,r},T([i("rowModel")],n.prototype,"serverSideRowModel",void 0),T([i("ssrmStoreFactory")],n.prototype,"storeFactory",void 0),T([i("beans")],n.prototype,"beans",void 0),T([a],n.prototype,"postConstruct",null),n=T([l("ssrmExpandListener")],n)}(d),_=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),M=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},B=function(o){function r(){return null!==o&&o.apply(this,arguments)||this}return _(r,o),r.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()&&this.addManagedListener(this.eventService,t.EVENT_SORT_CHANGED,this.onSortChanged.bind(this))},r.prototype.extractSortModel=function(){var t=this.sortController.getSortModel();return this.gridOptionsWrapper.isTreeData()||(this.replaceAutoGroupColumnWithActualRowGroupColumns(t),this.removeMultiColumnPrefixOnColumnIds(t)),t},r.prototype.removeMultiColumnPrefixOnColumnIds=function(t){if(this.gridOptionsWrapper.isGroupMultiAutoColumn())for(var e=n.GROUP_AUTO_COLUMN_ID+"-",o=0;o<t.length;++o)t[o].colId.indexOf(e)>-1&&(t[o].colId=t[o].colId.substr(e.length))},r.prototype.replaceAutoGroupColumnWithActualRowGroupColumns=function(t){var o=t.find((function(t){return t.colId==n.GROUP_AUTO_COLUMN_ID}));if(o){var r=t.indexOf(o);e.removeFromArray(t,o);var i=this.columnModel.getRowGroupColumns().filter((function(e){return 0==t.filter((function(t){return t.colId===e.getColId()})).length})).map((function(t){return{colId:t.getId(),sort:o.sort}}));e.insertArrayIntoArray(t,i,r)}},r.prototype.onSortChanged=function(){var t=this.serverSideRowModel.getParams();if(t){var e=this.extractSortModel(),o=t.sortModel,r=this.findChangedColumnsInSort(e,o),n={valueColChanged:this.listenerUtils.isSortingWithValueColumn(r),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(r),alwaysReset:this.gridOptionsWrapper.isServerSideSortingAlwaysResets(),changedColumns:r};this.serverSideRowModel.refreshAfterSort(e,n)}},r.prototype.findChangedColumnsInSort=function(t,e){var o=[];[t,e].forEach((function(t){if(t){var e=t.map((function(t){return t.colId}));o=o.concat(e)}}));return o.filter((function(o){var r=e.find((function(t){return t.colId===o})),n=t.find((function(t){return t.colId===o}));return function(t,e){return(t?t.sort:null)!==(e?e.sort:null)}(r,n)||function(o,r){return(o?e.indexOf(o):-1)!==(r?t.indexOf(r):-1)}(r,n)}))},M([i("sortController")],r.prototype,"sortController",void 0),M([i("columnModel")],r.prototype,"columnModel",void 0),M([i("rowModel")],r.prototype,"serverSideRowModel",void 0),M([i("ssrmListenerUtils")],r.prototype,"listenerUtils",void 0),M([a],r.prototype,"postConstruct",null),r=M([l("ssrmSortService")],r)}(d),L=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),U=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},G=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return L(o,e),o.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelServerSide()&&this.addManagedListener(this.eventService,t.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this))},o.prototype.onFilterChanged=function(){var t=this.serverSideRowModel.getParams();if(t){var e=this.filterManager.getFilterModel(),o=t?t.filterModel:{},r=this.findChangedColumns(e,o),n={valueColChanged:this.listenerUtils.isSortingWithValueColumn(r),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(r),alwaysReset:this.gridOptionsWrapper.isServerSideFilteringAlwaysResets(),changedColumns:r};this.serverSideRowModel.refreshAfterFilter(e,n)}},o.prototype.findChangedColumns=function(t,e){var o={};Object.keys(t).forEach((function(t){return o[t]=!0})),Object.keys(e).forEach((function(t){return o[t]=!0}));var r=[];return Object.keys(o).forEach((function(o){JSON.stringify(t[o])!=JSON.stringify(e[o])&&r.push(o)})),r},U([i("rowModel")],o.prototype,"serverSideRowModel",void 0),U([i("filterManager")],o.prototype,"filterManager",void 0),U([i("ssrmListenerUtils")],o.prototype,"listenerUtils",void 0),U([a],o.prototype,"postConstruct",null),o=U([l("ssrmFilterListener")],o)}(d),F=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),j=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},W=function(t,e){return function(o,r){e(o,r,t)}},H=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},V=function(t){function e(e,o,r,n,i){var s=t.call(this,e)||this;return s.ssrmParams=r,s.storeParams=n,s.parentRowNode=o,s.startRow=e*n.cacheBlockSize,s.parentStore=i,s.level=o.level+1,s.groupLevel=r.rowGroupCols?s.level<r.rowGroupCols.length:void 0,s.leafGroup=!!r.rowGroupCols&&s.level===r.rowGroupCols.length-1,s}return F(e,t),e.prototype.postConstruct=function(){if(this.usingTreeData=this.gridOptionsWrapper.isTreeData(),!this.usingTreeData&&this.groupLevel){var t=this.ssrmParams.rowGroupCols[this.level];this.groupField=t.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),this.setData([])},e.prototype.isDisplayIndexInBlock=function(t){return t>=this.displayIndexStart&&t<this.displayIndexEnd},e.prototype.isBlockBefore=function(t){return t>=this.displayIndexEnd},e.prototype.getDisplayIndexStart=function(){return this.displayIndexStart},e.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},e.prototype.getBlockHeightPx=function(){return this.blockHeightPx},e.prototype.getBlockTopPx=function(){return this.blockTopPx},e.prototype.isGroupLevel=function(){return this.groupLevel},e.prototype.getGroupField=function(){return this.groupField},e.prototype.prefixId=function(t){return null!=this.nodeIdPrefix?this.nodeIdPrefix+"-"+t:t.toString()},e.prototype.getBlockStateJson=function(){return{id:this.prefixId(this.getId()),state:{blockNumber:this.getId(),startRow:this.startRow,endRow:this.startRow+this.storeParams.cacheBlockSize,pageStatus:this.getState()}}},e.prototype.isAnyNodeOpen=function(){return this.rowNodes.filter((function(t){return t.expanded})).length>0},e.prototype.forEachNode=function(t,e,o,n){void 0===e&&(e=new r),this.rowNodes.forEach((function(r){if(t(r,e.next()),o&&r.childStore){var i=r.childStore;n?i.forEachNodeDeepAfterFilterAndSort(t,e):i.forEachNodeDeep(t,e)}}))},e.prototype.forEachNodeDeep=function(t,e){this.forEachNode(t,e,!0,!1)},e.prototype.forEachNodeAfterFilterAndSort=function(t,e){this.forEachNode(t,e,!0,!0)},e.prototype.forEachNodeShallow=function(t,e){this.forEachNode(t,e,!1,!1)},e.prototype.getLastAccessed=function(){return this.lastAccessed},e.prototype.getRowUsingLocalIndex=function(t){return this.rowNodes[t-this.startRow]},e.prototype.touchLastAccessed=function(){this.lastAccessed=this.ssrmParams.lastAccessedSequence.next()},e.prototype.processServerFail=function(){this.parentStore.onBlockLoadFailed(this)},e.prototype.retryLoads=function(){this.getState()===p.STATE_FAILED&&(this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad(),this.setData()),this.forEachNodeShallow((function(t){t.childStore&&t.childStore.retryLoads()}))},e.prototype.processServerResult=function(t){this.parentStore.onBlockLoaded(this,t)},e.prototype.setData=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=!1),this.destroyRowNodes();for(var o=this.parentStore.getRowCount(),r=this.getId()*this.storeParams.cacheBlockSize,n=Math.min(r+this.storeParams.cacheBlockSize,o)-r,i=this.columnModel.getAllDisplayedAutoHeightCols().length>0?this.parentStore.getCachedBlockHeight(this.getId()):void 0,s=i?Math.round(i/n):void 0,a=0;a<n;a++){var l=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn,rowHeight:s});if(a<t.length){var d=t[a],c=this.prefixId(this.startRow+a);this.blockUtils.setDataIntoRowNode(l,d,c,s);var p=l.id;this.parentStore.removeDuplicateNode(p),this.nodeManager.addRowNode(l),this.allNodesMap[l.id]=l,this.blockUtils.checkOpenByDefault(l)}this.rowNodes.push(l),e&&(l.failedLoad=!0)}},e.prototype.removeDuplicateNode=function(t){if(this.getState()!=p.STATE_LOADED){var e=this.allNodesMap[t];if(e){this.blockUtils.destroyRowNode(e);var o=this.rowNodes.indexOf(e),r=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});this.rowNodes[o]=r}}},e.prototype.refresh=function(){this.getState()!==p.STATE_WAITING_TO_LOAD&&this.setStateWaitingToLoad()},e.prototype.destroyRowNodes=function(){this.blockUtils.destroyRowNodes(this.rowNodes),this.rowNodes=[],this.allNodesMap={}},e.prototype.setBeans=function(t){this.logger=t.create("ServerSideBlock")},e.prototype.getRowUsingDisplayIndex=function(t){return this.touchLastAccessed(),this.blockUtils.binarySearchForDisplayIndex(t,this.rowNodes)},e.prototype.loadFromDatasource=function(){this.storeUtils.loadFromDatasource({startRow:this.startRow,endRow:this.startRow+this.storeParams.cacheBlockSize,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,successCallback:this.pageLoaded.bind(this,this.getVersion()),success:this.success.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})},e.prototype.isPixelInRange=function(t){return t>=this.blockTopPx&&t<this.blockTopPx+this.blockHeightPx},e.prototype.getRowBounds=function(t){var e,o,r;this.touchLastAccessed();try{for(var n=H(this.rowNodes),i=n.next();!i.done;i=n.next()){var s=i.value;if(null!=(r=this.blockUtils.extractRowBounds(s,t)))break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}return r},e.prototype.getRowIndexAtPixel=function(t){var e,o;this.touchLastAccessed();var r=null;try{for(var n=H(this.rowNodes),i=n.next();!i.done;i=n.next()){var s=i.value;if(null!=(r=this.blockUtils.getIndexAtPixel(s,t)))break}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}return r},e.prototype.clearDisplayIndexes=function(){var t=this;this.displayIndexEnd=void 0,this.displayIndexStart=void 0,this.rowNodes.forEach((function(e){return t.blockUtils.clearDisplayIndex(e)}))},e.prototype.setDisplayIndexes=function(t,e){var o=this;this.displayIndexStart=t.peek(),this.blockTopPx=e.value,this.rowNodes.forEach((function(r){return o.blockUtils.setDisplayIndex(r,t,e)})),this.displayIndexEnd=t.peek(),this.blockHeightPx=e.value-this.blockTopPx},j([i("columnModel")],e.prototype,"columnModel",void 0),j([i("ssrmStoreUtils")],e.prototype,"storeUtils",void 0),j([i("ssrmBlockUtils")],e.prototype,"blockUtils",void 0),j([i("ssrmNodeManager")],e.prototype,"nodeManager",void 0),j([i("rowNodeBlockLoader")],e.prototype,"rowNodeBlockLoader",void 0),j([a],e.prototype,"postConstruct",null),j([s],e.prototype,"destroyRowNodes",null),j([W(0,u("loggerFactory"))],e.prototype,"setBeans",null),e}(p),K=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),z=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},q=function(t,e){return function(o,r){e(o,r,t)}};!function(t){t[t.FOUND=0]="FOUND",t[t.CONTINUE_FIND=1]="CONTINUE_FIND",t[t.BREAK_FIND=2]="BREAK_FIND"}(g||(g={}));var J=function(o){function n(t,e,r){var i=o.call(this)||this;return i.blocks={},i.blockHeights={},i.lastRowIndexKnown=!1,i.displayIndexStart=0,i.displayIndexEnd=0,i.cacheTopPixel=0,i.info={},i.ssrmParams=t,i.storeParams=e,i.parentRowNode=r,i.rowCount=n.INITIAL_ROW_COUNT,i}return K(n,o),n.prototype.postConstruct=function(){this.defaultRowHeight=this.gridOptionsWrapper.getRowHeightAsNumber()},n.prototype.destroyAllBlocks=function(){var t=this;this.getBlocksInOrder().forEach((function(e){return t.destroyBlock(e)}))},n.prototype.setBeans=function(t){this.logger=t.create("ServerSideCache")},n.prototype.getRowCount=function(){return this.rowCount},n.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown},n.prototype.retryLoads=function(){this.getBlocksInOrder().forEach((function(t){return t.retryLoads()}))},n.prototype.onBlockLoadFailed=function(t){t.setData([],!0),this.fireCacheUpdatedEvent()},n.prototype.onBlockLoaded=function(t,o){if(this.logger.log("onPageLoaded: page = "+t.getId()+", lastRow = "+o.rowCount),o.storeInfo&&Object.assign(this.info,o.storeInfo),!o.rowData){e.doOnce((function(){return console.warn('AG Grid: "params.rowData" is missing from Server-Side Row Model success() callback. Please use the "rowData" attribute. If no data is returned, set an empty list.',o)}),"InfiniteStore.noData")}var r=null!=o.rowCount&&o.rowCount>=0?o.rowCount:void 0;this.isAlive()&&(this.checkRowCount(t,r),t.setData(o.rowData),this.destroyAllBlocksPastVirtualRowCount(),this.fireCacheUpdatedEvent())},n.prototype.purgeBlocksIfNeeded=function(t){var e=this,o=this.getBlocksInOrder().filter((function(e){return e!=t}));o.sort((function(t,e){return e.getLastAccessed()-t.getLastAccessed()}));var r=this.storeParams.maxBlocksInCache>0,i=r?this.storeParams.maxBlocksInCache-1:null,s=n.MAX_EMPTY_BLOCKS_TO_KEEP-1;o.forEach((function(t,o){if(t.getState()===V.STATE_WAITING_TO_LOAD&&o>=s||!!r&&o>=i){if(t.isAnyNodeOpen())return;if(e.isBlockCurrentlyDisplayed(t))return;if(e.isBlockFocused(t))return;e.destroyBlock(t)}}))},n.prototype.isBlockFocused=function(t){var e=this.focusService.getFocusCellToUseAfterRefresh();if(!e)return!1;if(null!=e.rowPinned)return!1;var o=t.getDisplayIndexStart(),r=t.getDisplayIndexEnd();return null!=r&&null!=o&&(e.rowIndex>=o&&e.rowIndex<r)},n.prototype.isBlockCurrentlyDisplayed=function(t){var e=t.getDisplayIndexStart(),o=t.getDisplayIndexEnd()-1;return this.rowRenderer.isRangeInRenderedViewport(e,o)},n.prototype.removeDuplicateNode=function(t){this.getBlocksInOrder().forEach((function(e){return e.removeDuplicateNode(t)}))},n.prototype.checkRowCount=function(t,e){if("number"==typeof e&&e>=0)this.rowCount=e,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){var o=(t.getId()+1)*this.storeParams.cacheBlockSize+n.OVERFLOW_SIZE;this.rowCount<o&&(this.rowCount=o)}},n.prototype.forEachNodeDeep=function(t,e){void 0===e&&(e=new r),this.getBlocksInOrder().forEach((function(o){return o.forEachNodeDeep(t,e)}))},n.prototype.forEachNodeDeepAfterFilterAndSort=function(t,e){void 0===e&&(e=new r),this.getBlocksInOrder().forEach((function(o){return o.forEachNodeAfterFilterAndSort(t,e)}))},n.prototype.getBlocksInOrder=function(){return e.getAllValuesInObject(this.blocks).sort((function(t,e){return t.getId()-e.getId()}))},n.prototype.destroyBlock=function(t){delete this.blocks[t.getId()],this.destroyBean(t),this.rowNodeBlockLoader.removeBlock(t)},n.prototype.fireCacheUpdatedEvent=function(){var e={type:t.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},n.prototype.destroyAllBlocksPastVirtualRowCount=function(){var t=this,e=[];this.getBlocksInOrder().forEach((function(o){o.getId()*t.storeParams.cacheBlockSize>=t.rowCount&&e.push(o)})),e.length>0&&e.forEach((function(e){return t.destroyBlock(e)}))},n.prototype.refreshStore=function(t){0==this.getRowCount()||t?this.resetStore():this.refreshBlocks(),this.fireCacheUpdatedEvent()},n.prototype.refreshBlocks=function(){this.getBlocksInOrder().forEach((function(t){t.refresh()})),this.lastRowIndexKnown=!1,this.rowNodeBlockLoader.checkBlockToLoad()},n.prototype.resetStore=function(){this.destroyAllBlocks(),this.lastRowIndexKnown=!1,(this.columnModel.isAutoRowHeightActive||0===this.rowCount)&&(this.rowCount=n.INITIAL_ROW_COUNT)},n.prototype.getRowNodesInRange=function(t,o){var r=[],n=-1,i=!1;e.missing(t)&&(i=!0);var s=!1;return this.getBlocksInOrder().forEach((function(e){s||(i&&n+1!==e.getId()?s=!0:(n=e.getId(),e.forEachNodeShallow((function(e){var n=e===t||e===o;(i||n)&&r.push(e),n&&(i=!i)}))))})),s||i?[]:r},n.prototype.findBlockAndExecute=function(t,e,o){var r,n=!1,i=!1,s=null;return this.getBlocksInOrder().forEach((function(o){if(!n&&!i){var a=t(o);a==g.FOUND?(r=e(o),n=!0):a==g.CONTINUE_FIND?s=o:a==g.BREAK_FIND&&(i=!0)}})),n||(r=o(s)),r},n.prototype.getRowBounds=function(t){var e=this;return this.findBlockAndExecute((function(e){return e.isDisplayIndexInBlock(t)?g.FOUND:e.isBlockBefore(t)?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowBounds(t)}),(function(o){var r,n;null!==o?(r=o.getBlockTopPx()+o.getBlockHeightPx(),n=o.getDisplayIndexEnd()):(r=e.cacheTopPixel,n=e.displayIndexStart);var i=t-n;return{rowHeight:e.defaultRowHeight,rowTop:r+i*e.defaultRowHeight}}))},n.prototype.getRowIndexAtPixel=function(t){var e=this,o=this.findBlockAndExecute((function(e){return e.isPixelInRange(t)?g.FOUND:e.getBlockTopPx()<t?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowIndexAtPixel(t)}),(function(o){var r,n;o?(r=o.getBlockTopPx()+o.getBlockHeightPx(),n=o.getDisplayIndexEnd()):(r=e.cacheTopPixel,n=e.displayIndexStart);for(var i=e.storeParams.cacheBlockSize,s=e.defaultRowHeight*i,a=o?o.getId()+1:0,l=function(o){var n=e.getCachedBlockHeight(o),i=null!=n?n:s;return{height:i,pixelInBlock:t<=i+r}},d=l(a);!d.pixelInBlock;)r+=d.height,n+=i,d=l(++a);var c=t-r,p=d.height/i;return n+(0|Math.floor(c/p))})),r=this.getDisplayIndexEnd()-1;return o=Math.min(o,r)},n.prototype.clearDisplayIndexes=function(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.getBlocksInOrder().forEach((function(t){return t.clearDisplayIndexes()}))},n.prototype.setDisplayIndexes=function(t,o){var r=this;this.displayIndexStart=t.peek(),this.cacheTopPixel=o.value;var n=-1,i=this.storeParams.cacheBlockSize;this.getBlocksInOrder().forEach((function(s){var a=s.getId(),l=a-n-1,d=l*i;d>0&&t.skip(d);for(var c=1;c<=l;c++){var p=a-c;e.exists(r.blockHeights[p])?o.value+=r.blockHeights[p]:o.value+=i*r.defaultRowHeight}n=a,s.setDisplayIndexes(t,o),r.blockHeights[a]=s.getBlockHeightPx()}));var s=(n+1)*i-1,a=this.getRowCount()-s-1;a>0&&(t.skip(a),o.value+=a*this.defaultRowHeight),this.displayIndexEnd=t.peek(),this.cacheHeightPixels=o.value-this.cacheTopPixel},n.prototype.getRowUsingDisplayIndex=function(t,o){var r=this;if(void 0===o&&(o=!1),this.isDisplayIndexInStore(t)){return this.findBlockAndExecute((function(e){return e.isDisplayIndexInBlock(t)?g.FOUND:e.isBlockBefore(t)?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowUsingDisplayIndex(t)}),(function(n){if(!o){var i,s,a,l=r.storeParams.cacheBlockSize;if(n){i=n.getId()+1,s=n.getDisplayIndexEnd(),a=n.getBlockHeightPx()+n.getBlockTopPx();for(;!(t>=s&&t<s+l);){s+=l;var d=r.blockHeights[i];e.exists(d)?a+=d:a+=r.defaultRowHeight*l,i++}}else{var c=t-r.displayIndexStart;i=Math.floor(c/l),s=r.displayIndexStart+i*l,a=r.cacheTopPixel+i*l*r.defaultRowHeight}return r.logger.log("block missing, rowIndex = "+t+", creating #"+i+", displayIndexStart = "+s),r.createBlock(i,s,{value:a}).getRowUsingDisplayIndex(t)}}))}},n.prototype.getTopLevelRowDisplayedIndex=function(t){var e=this.storeParams.cacheBlockSize,o=Math.floor(t/e);return this.findBlockAndExecute((function(t){return t.getId()===o?g.FOUND:t.getId()<o?g.CONTINUE_FIND:g.BREAK_FIND}),(function(e){return e.getRowUsingLocalIndex(t).rowIndex}),(function(o){if(!o)return t;var r,n=e*(o.getId()+1)-1,i=o.getRowUsingLocalIndex(n);i.expanded&&i.childStore?r=i.childStore.getDisplayIndexEnd()-1:r=i.expanded&&i.detailNode?i.detailNode.rowIndex:i.rowIndex;return r+(t-n)}))},n.prototype.addStoreStates=function(t){t.push({type:"partial",route:this.parentRowNode.getGroupKeys(),rowCount:this.rowCount,lastRowIndexKnown:this.lastRowIndexKnown,info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow((function(e){return e.addStoreStates(t)}))},n.prototype.getCachedBlockHeight=function(t){return this.blockHeights[t]},n.prototype.createBlock=function(t,e,o){var n=this.createBean(new V(t,this.parentRowNode,this.ssrmParams,this.storeParams,this));return n.setDisplayIndexes(new r(e),o),this.blocks[n.getId()]=n,this.purgeBlocksIfNeeded(n),this.rowNodeBlockLoader.addBlock(n),n},n.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},n.prototype.isDisplayIndexInStore=function(t){return 0!==this.getRowCount()&&(t>=this.displayIndexStart&&t<this.displayIndexEnd)},n.prototype.applyTransaction=function(t){return{status:c.StoreWrongType}},n.prototype.getChildStore=function(t){var e=this;return this.storeUtils.getChildStore(t,this,(function(t){var o=null;return e.getBlocksInOrder().forEach((function(e){e.forEachNodeShallow((function(e){e.key===t&&(o=e)}),new r)})),o}))},n.prototype.isPixelInRange=function(t){return 0!==this.getRowCount()&&(t>=this.cacheTopPixel&&t<this.cacheTopPixel+this.cacheHeightPixels)},n.prototype.refreshAfterFilter=function(t){this.resetStore()},n.prototype.refreshAfterSort=function(t){this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,t)?this.resetStore():this.forEachChildStoreShallow((function(e){return e.refreshAfterSort(t)}))},n.prototype.forEachChildStoreShallow=function(t){this.getBlocksInOrder().forEach((function(e){if(e.isGroupLevel()){e.forEachNodeShallow((function(e){var o=e.childStore;o&&t(o)}),new r)}}))},n.MAX_EMPTY_BLOCKS_TO_KEEP=2,n.INITIAL_ROW_COUNT=1,n.OVERFLOW_SIZE=1,z([i("rowRenderer")],n.prototype,"rowRenderer",void 0),z([i("rowNodeBlockLoader")],n.prototype,"rowNodeBlockLoader",void 0),z([i("ssrmStoreUtils")],n.prototype,"storeUtils",void 0),z([i("focusService")],n.prototype,"focusService",void 0),z([i("columnModel")],n.prototype,"columnModel",void 0),z([a],n.prototype,"postConstruct",null),z([s],n.prototype,"destroyAllBlocks",null),z([q(0,u("loggerFactory"))],n.prototype,"setBeans",null),n}(d),Y=function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(e,o)};return function(e,o){function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),X=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},Z=function(o){function n(t,e,n){var i=o.call(this,0)||this;return i.nodeIdSequence=new r,i.info={},i.ssrmParams=t,i.parentRowNode=n,i.level=n.level+1,i.groupLevel=t.rowGroupCols?i.level<t.rowGroupCols.length:void 0,i.leafGroup=!!t.rowGroupCols&&i.level===t.rowGroupCols.length-1,i}return Y(n,o),n.prototype.postConstruct=function(){var t=this;if(this.usingTreeData=this.gridOptionsWrapper.isTreeData(),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){var e=this.ssrmParams.rowGroupCols[this.level];this.groupField=e.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}this.initialiseRowNodes(),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc((function(){return t.rowNodeBlockLoader.removeBlock(t)}))},n.prototype.destroyRowNodes=function(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}},n.prototype.initialiseRowNodes=function(t,e){void 0===t&&(t=1),void 0===e&&(e=!1),this.destroyRowNodes();for(var o=0;o<t;o++){var r=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});e&&(r.failedLoad=!0),this.allRowNodes.push(r),this.nodesAfterFilter.push(r),this.nodesAfterSort.push(r)}},n.prototype.getBlockStateJson=function(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}},n.prototype.loadFromDatasource=function(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,successCallback:this.pageLoaded.bind(this,this.getVersion()),success:this.success.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})},n.prototype.getStartRow=function(){return 0},n.prototype.getEndRow=function(){return this.nodesAfterSort.length},n.prototype.createDataNode=function(t,o){var r=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=o?e.insertIntoArray(this.allRowNodes,r,o):this.allRowNodes.push(r);var n=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(r,t,n,void 0),this.nodeManager.addRowNode(r),this.blockUtils.checkOpenByDefault(r),this.allNodesMap[r.id]=r,r},n.prototype.prefixId=function(t){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+t:t.toString()},n.prototype.processServerFail=function(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()},n.prototype.processServerResult=function(t){if(this.isAlive()){t.storeInfo&&Object.assign(this.info,t.storeInfo);var o=this.allRowNodes.length>0?this.allNodesMap:void 0;if(this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},!t.rowData){e.doOnce((function(){return console.warn('AG Grid: "params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.',t)}),"FullStore.noData")}this.createOrRecycleNodes(o,t.rowData),o&&this.blockUtils.destroyRowNodes(e.getAllValuesInObject(o)),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}},n.prototype.createOrRecycleNodes=function(t,e){var o=this;if(e){e.forEach((function(e){var r=function(e){if(t){var r=o.gridOptionsWrapper.getRowIdFunc();if(r){var n=o.parentRowNode.getGroupKeys(),i=o.level,s=r({data:e,parentKeys:n.length>0?n:void 0,level:i}),a=t[s];if(a)return delete t[s],a}}}(e);r?function(t,e){o.allNodesMap[t.id]=t,o.blockUtils.updateDataIntoRowNode(t,e),o.allRowNodes.push(t)}(r,e):o.createDataNode(e)}))}},n.prototype.flushAsyncTransactions=function(){var t=this;window.setTimeout((function(){return t.transactionManager.flushAsyncTransactions()}),0)},n.prototype.filterAndSortNodes=function(){this.filterRowNodes(),this.sortRowNodes()},n.prototype.sortRowNodes=function(){var t=this.sortController.getSortOptions(),e=!t||0==t.length,o=this.gridOptionsWrapper.isServerSideSortingAlwaysResets();this.nodesAfterSort=e||o?this.nodesAfterFilter:this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t)},n.prototype.filterRowNodes=function(){var t=this,e=this.gridOptionsWrapper.isServerSideFilteringAlwaysResets(),o=this.groupLevel;this.nodesAfterFilter=e||o?this.allRowNodes:this.allRowNodes.filter((function(e){return t.filterManager.doesRowPassFilter({rowNode:e})}))},n.prototype.clearDisplayIndexes=function(){var t=this;this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEach((function(e){return t.blockUtils.clearDisplayIndex(e)}))},n.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},n.prototype.isDisplayIndexInStore=function(t){return 0!==this.getRowCount()&&(t>=this.displayIndexStart&&t<this.displayIndexEnd)},n.prototype.setDisplayIndexes=function(t,e){var o=this;this.displayIndexStart=t.peek(),this.topPx=e.value;var r={};this.nodesAfterSort.forEach((function(n){o.blockUtils.setDisplayIndex(n,t,e),r[n.id]=!0})),this.allRowNodes.forEach((function(t){r[t.id]||o.blockUtils.clearDisplayIndex(t)})),this.displayIndexEnd=t.peek(),this.heightPx=e.value-this.topPx},n.prototype.forEachNodeDeep=function(t,e){void 0===e&&(e=new r),this.allRowNodes.forEach((function(o){t(o,e.next());var r=o.childStore;r&&r.forEachNodeDeep(t,e)}))},n.prototype.forEachNodeDeepAfterFilterAndSort=function(t,e){void 0===e&&(e=new r),this.nodesAfterSort.forEach((function(o){t(o,e.next());var r=o.childStore;r&&r.forEachNodeDeepAfterFilterAndSort(t,e)}))},n.prototype.getRowUsingDisplayIndex=function(t){if(this.isDisplayIndexInStore(t))return this.blockUtils.binarySearchForDisplayIndex(t,this.nodesAfterSort)},n.prototype.getRowBounds=function(t){for(var e=0;e<this.nodesAfterSort.length;e++){var o=this.nodesAfterSort[e],r=this.blockUtils.extractRowBounds(o,t);if(r)return r}return null},n.prototype.isPixelInRange=function(t){return t>=this.topPx&&t<this.topPx+this.heightPx},n.prototype.getRowIndexAtPixel=function(t){var e=this;if(t<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(t>=this.topPx+this.heightPx){var o=this.nodesAfterSort[this.nodesAfterSort.length-1],r=o.rowTop+o.rowHeight;if(t>=r&&o.expanded){if(o.childStore&&o.childStore.getRowCount()>0)return o.childStore.getRowIndexAtPixel(t);if(o.detailNode)return o.detailNode.rowIndex}return o.rowIndex}var n=null;return this.nodesAfterSort.forEach((function(o){var r=e.blockUtils.getIndexAtPixel(o,t);null!=r&&(n=r)})),null==n?this.displayIndexEnd-1:n},n.prototype.getChildStore=function(t){var e=this;return this.storeUtils.getChildStore(t,this,(function(t){return e.allRowNodes.find((function(e){return e.key==t}))}))},n.prototype.forEachChildStoreShallow=function(t){this.allRowNodes.forEach((function(e){var o=e.childStore;o&&t(o)}))},n.prototype.refreshAfterFilter=function(t){t.alwaysReset||this.gridOptionsWrapper.isTreeData()?this.refreshStore(!0):(this.filterAndSortNodes(),this.forEachChildStoreShallow((function(e){return e.refreshAfterFilter(t)})))},n.prototype.refreshAfterSort=function(t){t.alwaysReset?this.refreshStore(!0):(this.sortRowNodes(),this.forEachChildStoreShallow((function(e){return e.refreshAfterSort(t)})))},n.prototype.applyTransaction=function(t){switch(this.getState()){case p.STATE_FAILED:return{status:c.StoreLoadingFailed};case p.STATE_LOADING:return{status:c.StoreLoading};case p.STATE_WAITING_TO_LOAD:return{status:c.StoreWaitingToLoad}}var e=this.gridOptionsWrapper.getIsApplyServerSideTransactionFunc();if(e&&!e({transaction:t,parentNode:this.parentRowNode,storeInfo:this.info}))return{status:c.Cancelled};var o={status:c.Applied,remove:[],update:[],add:[]},r=[];return this.executeAdd(t,o),this.executeRemove(t,o,r),this.executeUpdate(t,o,r),this.filterAndSortNodes(),this.updateSelection(r),o},n.prototype.updateSelection=function(e){if(e.length>0){e.forEach((function(t){t.setSelected(!1,!1,!0)}));var o={type:t.EVENT_SELECTION_CHANGED,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()};this.eventService.dispatchEvent(o)}},n.prototype.executeAdd=function(t,o){var r=this,n=t.add,i=t.addIndex;e.missingOrEmpty(n)||("number"==typeof i&&i>=0?n.reverse().forEach((function(t){var e=r.createDataNode(t,i);o.add.push(e)})):n.forEach((function(t){var e=r.createDataNode(t);o.add.push(e)})))},n.prototype.executeRemove=function(t,e,o){var r=this,n=t.remove;if(null!=n){var i={};n.forEach((function(t){var n=r.lookupRowNode(t);n&&(n.isSelected()&&o.push(n),n.clearRowTopAndRowIndex(),i[n.id]=!0,delete r.allNodesMap[n.id],e.remove.push(n),r.nodeManager.removeNode(n))})),this.allRowNodes=this.allRowNodes.filter((function(t){return!i[t.id]}))}},n.prototype.executeUpdate=function(t,e,o){var r=this,n=t.update;null!=n&&n.forEach((function(t){var n=r.lookupRowNode(t);n&&(n.updateData(t),!n.selectable&&n.isSelected()&&o.push(n),e.update.push(n))}))},n.prototype.lookupRowNode=function(t){var e,o=this.gridOptionsWrapper.getRowIdFunc();if(null!=o){var r=this.level,n=this.parentRowNode.getGroupKeys(),i=o({data:t,parentKeys:n.length>0?n:void 0,level:r});if(!(e=this.allNodesMap[i]))return console.error("AG Grid: could not find row id="+i+", data item was not found for this id"),null}else if(!(e=this.allRowNodes.find((function(e){return e.data===t}))))return console.error("AG Grid: could not find data item as object was not found",t),null;return e},n.prototype.addStoreStates=function(t){t.push({type:"full",route:this.parentRowNode.getGroupKeys(),rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow((function(e){return e.addStoreStates(t)}))},n.prototype.refreshStore=function(t){if(t){var e=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(e)}this.scheduleLoad(),this.fireStoreUpdatedEvent()},n.prototype.retryLoads=function(){this.getState()===p.STATE_FAILED&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow((function(t){return t.retryLoads()}))},n.prototype.scheduleLoad=function(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()},n.prototype.fireStoreUpdatedEvent=function(){var e={type:t.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},n.prototype.getRowCount=function(){return this.nodesAfterSort.length},n.prototype.getTopLevelRowDisplayedIndex=function(t){return this.nodesAfterSort[t].rowIndex},n.prototype.isLastRowIndexKnown=function(){return this.getState()==p.STATE_LOADED},n.prototype.getRowNodesInRange=function(t,o){var r=[],n=!1;return e.missing(t)&&(n=!0),this.nodesAfterSort.forEach((function(e){var i=e===t||e===o;(n||i)&&r.push(e),i&&(n=!n)})),n?[]:r},X([i("ssrmStoreUtils")],n.prototype,"storeUtils",void 0),X([i("ssrmBlockUtils")],n.prototype,"blockUtils",void 0),X([i("columnModel")],n.prototype,"columnModel",void 0),X([i("rowNodeBlockLoader")],n.prototype,"rowNodeBlockLoader",void 0),X([i("rowNodeSorter")],n.prototype,"rowNodeSorter",void 0),X([i("sortController")],n.prototype,"sortController",void 0),X([i("ssrmNodeManager")],n.prototype,"nodeManager",void 0),X([i("filterManager")],n.prototype,"filterManager",void 0),X([i("ssrmTransactionManager")],n.prototype,"transactionManager",void 0),X([i("columnApi")],n.prototype,"columnApi",void 0),X([i("gridApi")],n.prototype,"gridApi",void 0),X([a],n.prototype,"postConstruct",null),X([s],n.prototype,"destroyRowNodes",null),n}(p),Q=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},$=function(){function t(){}return t.prototype.createStore=function(t,e){var o=this.getStoreParams(t,e);return new("partial"===o.storeType?J:Z)(t,o,e)},t.prototype.getStoreParams=function(t,e){var o=this.getLevelSpecificParams(e),r=this.getStoreType(o);return{storeType:r,cacheBlockSize:this.getBlockSize(r,o),maxBlocksInCache:this.getMaxBlocksInCache(r,t,o)}},t.prototype.getMaxBlocksInCache=function(t,o,r){if("full"!=t){var n=r&&null!=r.maxBlocksInCache?r.maxBlocksInCache:this.gridOptionsWrapper.getMaxBlocksInCache();if(null!=n&&n>=0)if(o.dynamicRowHeight){e.doOnce((function(){return console.warn("AG Grid: Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.")}),"storeFactory.maxBlocksInCache.dynamicRowHeight")}else{if(!this.columnModel.isAutoRowHeightActive())return n;e.doOnce((function(){return console.warn("AG Grid: Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.")}),"storeFactory.maxBlocksInCache.autoRowHeightActive")}}},t.prototype.getBlockSize=function(t,e){if("full"!=t){var o=e&&null!=e.cacheBlockSize?e.cacheBlockSize:this.gridOptionsWrapper.getCacheBlockSize();return null!=o&&o>0?o:100}},t.prototype.getLevelSpecificParams=function(t){var e=this.gridOptionsWrapper.getServerSideStoreParamsFunc();if(e)return e({level:t.level+1,parentRowNode:t.level>=0?t:void 0,rowGroupColumns:this.columnModel.getRowGroupColumns(),pivotColumns:this.columnModel.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()})},t.prototype.getStoreType=function(t){var e=t&&null!=t.storeType?t.storeType:this.gridOptionsWrapper.getServerSideStoreType();switch(e){case"partial":case"full":return e;case null:case void 0:return"full";default:var o=["full","partial"].join(", ");return console.warn("AG Grid: invalid Server Side Store Type "+e+", valid types are ["+o+"]"),"partial"}},Q([i("gridOptionsWrapper")],t.prototype,"gridOptionsWrapper",void 0),Q([i("columnModel")],t.prototype,"columnModel",void 0),t=Q([l("ssrmStoreFactory")],t)}(),tt=function(t,e,o,r){var n,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(i<3?n(s):i>3?n(e,o,s):n(e,o))||s);return i>3&&s&&Object.defineProperty(e,o,s),s},et=function(){function t(){}return t.prototype.isSortingWithValueColumn=function(t){for(var e=this.columnModel.getValueColumns().map((function(t){return t.getColId()})),o=0;o<t.length;o++)if(e.indexOf(t[o])>-1)return!0;return!1},t.prototype.isSortingWithSecondaryColumn=function(t){if(!this.columnModel.getSecondaryColumns())return!1;for(var e=this.columnModel.getSecondaryColumns().map((function(t){return t.getColId()})),o=0;o<t.length;o++)if(e.indexOf(t[o])>-1)return!0;return!1},tt([i("columnModel")],t.prototype,"columnModel",void 0),t=tt([l("ssrmListenerUtils")],t)}(),ot={moduleName:h.ServerSideRowModelModule,rowModels:{serverSide:S},beans:[b,B,N,C,A,k,G,$,et],dependantModules:[f]};export{ot as ServerSideRowModelModule}; |
{ | ||
"name": "@ag-grid-enterprise/server-side-row-model", | ||
"version": "27.2.1", | ||
"version": "27.3.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -12,4 +12,7 @@ "main": "./dist/cjs/es5/main.js", | ||
"build-esm": "npx tsc -p tsconfig.esm.es5.json && npx tsc -p tsconfig.esm.es6.json", | ||
"build-cjs-prod": "npx tsc -p tsconfig.cjs.es5.json --sourceMap false && npx tsc -p tsconfig.cjs.es6.json --sourceMap false", | ||
"build-esm-prod": "npx tsc -p tsconfig.esm.es5.json --sourceMap false && npx tsc -p tsconfig.esm.es6.json --sourceMap false", | ||
"package": "node ../../module-build/rollup/build.js", | ||
"build": "npm run build-cjs && npm run build-esm && npm run hash", | ||
"build-prod": "npm run build-cjs-prod && npm run build-esm-prod && npm run hash", | ||
"hash": "sh ../../scripts/hashDirectory.sh > .hash" | ||
@@ -46,6 +49,6 @@ }, | ||
], | ||
"homepage": "http://www.ag-grid.com/", | ||
"homepage": "https://www.ag-grid.com/", | ||
"dependencies": { | ||
"@ag-grid-community/core": "~27.2.0", | ||
"@ag-grid-enterprise/core": "~27.2.0" | ||
"@ag-grid-community/core": "~27.3.0", | ||
"@ag-grid-enterprise/core": "~27.3.0" | ||
}, | ||
@@ -59,2 +62,2 @@ "devDependencies": { | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1520573
20285
+ Added@ag-grid-community/core@27.3.0(transitive)
+ Added@ag-grid-enterprise/core@27.3.0(transitive)
- Removed@ag-grid-community/core@27.2.1(transitive)
- Removed@ag-grid-enterprise/core@27.2.1(transitive)