From 7d723e31b6c25238edc08195756967622e96ae89 Mon Sep 17 00:00:00 2001 From: Zahar Mychka <56361878+Saharij@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:18:34 +0300 Subject: [PATCH] MAR-15 [Data Grid] Add onFiltering event (#917) Co-authored-by: Zakhar Mychka --- components/bl-data-grid/README.md | 35 +++++++++++-------- components/bl-data-grid/component.json | 11 ++++++ components/bl-data-grid/src/index.js | 7 +++- .../src/lib/ag-grid-community.min.js | 2 +- .../bl-data-grid/src/lib/ag-grid-react.min.js | 2 +- 5 files changed, 40 insertions(+), 17 deletions(-) diff --git a/components/bl-data-grid/README.md b/components/bl-data-grid/README.md index f236987a..71f49501 100644 --- a/components/bl-data-grid/README.md +++ b/components/bl-data-grid/README.md @@ -1,6 +1,7 @@ # Data Grid -Data Grid is a component of Backendless UI-Builder designer. The main purpose of the component is to display data, and this data can be sorted and filtered. +Data Grid is a component of Backendless UI-Builder designer. The main purpose of the component is to display data, and +this data can be sorted and filtered. If you want to know more about this component, you can [follow the link.](https://www.ag-grid.com/example/)

@@ -9,7 +10,8 @@ If you want to know more about this component, you can [follow the link.](https: ## Demo -View an example of how to install this component and how it works in your UI [here](https://app.arcade.software/share/CXVuAnEGfiqqQAmlzisU). +View an example of how to install this component and how it works in your +UI [here](https://app.arcade.software/share/CXVuAnEGfiqqQAmlzisU). ## Properties @@ -24,7 +26,7 @@ View an example of how to install this component and how it works in your UI [he | Suppress Cell Focus
`suppressCellFocus` | Checkbox | `false` | Suppress Cell Focus Logic | NO | YES | This handler allows you to disable cell focus and keyboard navigation. | | Multiple Rows Selection
`multipleRowsSelection` | Checkbox | `true` | Multiple Rows Selection Logic | YES | YES | This handler adds the ability to select multiple rows. Watch [Adding Row Selections Guide](#adding-row-selections-guide). | | Column Definition
`columnDefs` | JSON | `[`
`{"field": "name", "flex": 1},`
`{"field": "age", "sortable": true, "flex": 1},`
`{"field": "city", "flex": 1}`
`]` | Column Definition Logic | YES | YES | This handler allows you to define columns for the component. Watch [Codeless Examples](#examples). Signature of column: List of object `{field: String, sortable: Boolean, filter: Boolean}`. | -| Rows Data
`rowsData` | JSON | `[`
`{"name": "Jack", "age": 26, "city": "London"},`
`{"name": "Kate", "age": 22, "city": "New York"},`
`{"name": "Nick", "age": 28, "city": "Kyiv"}`
`]` | Rows Data Logic | YES | YES | This handler allows you to set data to the component. Watch [Codeless Examples](#examples). Signature of data: List of object `{field: String \| Number}` | +| Rows Data
`rowsData` | JSON | `[`
`{"name": "Jack", "age": 26, "city": "London"},`
`{"name": "Kate", "age": 22, "city": "New York"},`
`{"name": "Nick", "age": 28, "city": "Kyiv"}`
`]` | Rows Data Logic | YES | YES | This handler allows you to set data to the component. Watch [Codeless Examples](#examples). Signature of data: List of object `{field: String \ | Number}` | | Height
`height` | Text | "500px" | Height Logic | YES | YES | This handler allows you to specify the height of the component. | | Width
`width` | Text | "750px" | Width Logic | YES | YES | This handler allows you to specify the width of the component. | | Theme
`theme` | Select [Alpine:`alpine`
Alpine Dark:`alpine-dark`
Balham:`balham`
Balham Dark:`balham-dark`
Material:`material`] | Alpine:`alpine` | Theme Logic | YES | YES | This handler allows you to specify the theme of the component. | @@ -36,11 +38,12 @@ View an example of how to install this component and how it works in your UI [he ## Events -| Name | Triggers | Context Blocks | -|-----------------------------|-----------------------------------------------------------------------------|----------------------------------------------------------| -| On Cell Value Changed Event | This event is fired when Enter is pressed after the cell value has changed. | Cell Params: `{key: value}`, Data Object: `{key: value}` | -| On Cell Click Event | This event is fired when the user clicks the mouse or taps the grid cell. | Cell Params: `{key: value}` | -| On Column Moved Event | This event is fired when any column is moved. | Columns: list of moved columns | +| Name | Triggers | Context Blocks | +|-----------------------------|-----------------------------------------------------------------------------|--------------------------------------------------------------------------------------| +| On Cell Value Changed Event | This event is fired when Enter is pressed after the cell value has changed. | Cell Params: `{key: value}`, Data Object: `{key: value}` | +| On Cell Click Event | This event is fired when the user clicks the mouse or taps the grid cell. | Cell Params: `{key: value}` | +| On Column Moved Event | This event is fired when any column is moved. | Columns: list of moved columns | +| On Filtering Event | This event is fired when text is entered into the filter fields. | Filter Model: list of active filters `{filter: Text, filterType: Text, type: Text }` | ## Actions @@ -63,13 +66,15 @@ Adding columns to the component: ![markers example](./example-images/columns.png) -> **If you have nested objects (as shown in the screenshot below) and you want it to display as a group, then you need to do the following:** +> **If you have nested objects (as shown in the screenshot below) and you want it to display as a group, then you need +to do the following:** 1. Add row data with nested objects: ![markers example](./example-images/rows-with-nested-object.png) -2. Add a `children` property for the field with the nested object, and pass a list of nested properties as shown in the screenshot: +2. Add a `children` property for the field with the nested object, and pass a list of nested properties as shown in the + screenshot: ![markers example](./example-images/col-def-with-children-prop.png) @@ -94,11 +99,13 @@ Add `"checkboxSelection": true` property to the desired column: ![guide example](./example-images/add-checkboxSelection.png) -Add `"headerCheckboxSelection": true` to the desired column if you want to add the checkbox to the header to all rows select: +Add `"headerCheckboxSelection": true` to the desired column if you want to add the checkbox to the header to all rows +select: ![guide example](./example-images/add-headerCheckboxSelection.png) -There is also a `Multiple Rows Selection` property for selecting multiple rows. Uncheck the box if you want to make the ability to select only one row: +There is also a `Multiple Rows Selection` property for selecting multiple rows. Uncheck the box if you want to make the +ability to select only one row: ![guide example](./example-images/control-selection-type.png) @@ -111,10 +118,10 @@ Use `Get Selected Rows of Data Grid` action to get all selected rows: For the required column, add a `sort` property with a value of `asc` or `desc` depending on what you need. 1. Using the settings: -![guide example](./example-images/add-default-column-sort-json.png) + ![guide example](./example-images/add-default-column-sort-json.png) 2. Using the codeless: -![guide example](./example-images/add-default-column-sort-codeless.png) + ![guide example](./example-images/add-default-column-sort-codeless.png) ## Adding Selected Rows by Default Guide diff --git a/components/bl-data-grid/component.json b/components/bl-data-grid/component.json index 28ddf04e..22859c54 100644 --- a/components/bl-data-grid/component.json +++ b/components/bl-data-grid/component.json @@ -291,6 +291,17 @@ "label": "Columns" } ] + }, + { + "name": "onFiltering", + "label": "On Filtering", + "contextBlocks": [ + { + "id": "filterModel", + "label": "Filter Model" + } + ], + "handlerDescription": "This event is fired when text is entered into the filter fields." } ], "actions": [ diff --git a/components/bl-data-grid/src/index.js b/components/bl-data-grid/src/index.js index dd579a83..476df1be 100644 --- a/components/bl-data-grid/src/index.js +++ b/components/bl-data-grid/src/index.js @@ -25,7 +25,7 @@ export default function DataGridComponent({ component, eventHandlers }) { editable, resizable, suppressCellFocus, multipleRowsSelection, columnDefs, rowsData, height, width, theme, loadingText, noRowsText, pagination, paginationAutoPageSize, paginationPageSize, } = component; - const { onCellValueChanged, onCellClick, onColumnMoved } = eventHandlers; + const { onCellValueChanged, onCellClick, onColumnMoved, onFiltering } = eventHandlers; const gridRef = useRef(); const [columns, setColumns] = useState([]); @@ -64,6 +64,10 @@ export default function DataGridComponent({ component, eventHandlers }) { onColumnMoved({ columns: gridRef.current.columnApi.getColumnState() }); }, []); + const handleFilterChange = useCallback(() => { + onFiltering({ filterModel: gridRef.current.api.getFilterModel() }); + }, []); + const sortByColumnId = useCallback((columnId, direction) => { gridRef.current.columnApi.applyColumnState({ state: [{ colId: columnId, sort: direction.toLowerCase() }], defaultState: { sort: null }, @@ -123,6 +127,7 @@ export default function DataGridComponent({ component, eventHandlers }) { onCellClicked={ handleCellClick } onCellValueChanged={ handleCellValueChanged } onColumnMoved={ handleColumnMove } + onFilterChanged={ handleFilterChange } onFirstDataRendered={ onFirstDataRendered } /> diff --git a/components/bl-data-grid/src/lib/ag-grid-community.min.js b/components/bl-data-grid/src/lib/ag-grid-community.min.js index 0cd8d5fa..efc4d9ea 100644 --- a/components/bl-data-grid/src/lib/ag-grid-community.min.js +++ b/components/bl-data-grid/src/lib/ag-grid-community.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.agGrid=t():e.agGrid=t()}(self,(function(){return function(){var e={7886:function(e,t,a){var n,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,s=(e,t,a,n)=>{for(var i,l=n>1?void 0:n?o(t,a):t,s=e.length-1;s>=0;s--)(i=e[s])&&(l=(n?i(t,a,l):i(l))||l);return n&&l&&r(t,a,l),l},g={};((e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})})(g,{ClientSideRowModelModule:()=>D}),e.exports=(n=g,((e,t,a,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))l.call(e,s)||s===a||r(e,s,{get:()=>t[s],enumerable:!(n=o(t,s))||n.enumerable});return e})(r({},"__esModule",{value:!0}),n));var d=a(3423),c=a(3423),u=a(3423),h=class e{constructor(t,a,n,r,o,i){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=a,this.eventService=n,this.columnModel=r,this.beans=i,this.selectionService=o,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return u._.cloneObject(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(t){if("string"==typeof t)return void console.warn("AG Grid: rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const a=this.rootNode,n=this.rootNode.sibling;a.childrenAfterFilter=null,a.childrenAfterGroup=null,a.childrenAfterAggFilter=null,a.childrenAfterSort=null,a.childrenMapped=null,a.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?a.allLeafChildren=t.map((t=>this.createNode(t,this.rootNode,e.TOP_LEVEL))):(a.allLeafChildren=[],a.childrenAfterGroup=[]),n&&(n.childrenAfterFilter=a.childrenAfterFilter,n.childrenAfterGroup=a.childrenAfterGroup,n.childrenAfterAggFilter=a.childrenAfterAggFilter,n.childrenAfterSort=a.childrenAfterSort,n.childrenMapped=a.childrenMapped,n.allLeafChildren=a.allLeafChildren)}updateRowData(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const a={remove:[],update:[],add:[]},n=[];return this.executeRemove(e,a,n),this.executeUpdate(e,a,n),this.executeAdd(e,a),this.updateSelection(n,"rowDataChanged"),t&&u._.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),a}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){const t={type:u.Events.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(null==e?void 0:e.length)?e[0]:null};this.eventService.dispatchEvent(t)}updateSelection(e,t){const a=e.length>0;if(a&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),a){const e={type:u.Events.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(e)}}executeAdd(t,a){var n;const{add:r,addIndex:o}=t;if(u._.missingOrEmpty(r))return;const i=r.map((t=>this.createNode(t,this.rootNode,e.TOP_LEVEL)));if("number"==typeof o&&o>=0){const{allLeafChildren:e}=this.rootNode,t=e.length;let a=o;if(this.gos.get("treeData")&&o>0&&t>0)for(let r=0;r{const n=this.lookupRowNode(e);n&&(n.isSelected()&&a.push(n),n.clearRowTopAndRowIndex(),r[n.id]=!0,delete this.allNodesMap[n.id],t.remove.push(n))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter((e=>!r[e.id])),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,a,n){const{update:r}=t;u._.missingOrEmpty(r)||r.forEach((t=>{const r=this.lookupRowNode(t);r&&(r.updateData(t),!r.selectable&&r.isSelected()&&n.push(r),this.setMasterForRow(r,t,e.TOP_LEVEL,!1),a.update.push(r))}))}lookupRowNode(e){const t=this.gos.getCallback("getRowId");let a;if(t){const n=t({data:e,level:0});if(a=this.allNodesMap[n],!a)return console.error(`AG Grid: could not find row id=${n}, data item was not found for this id`),null}else if(a=this.rootNode.allLeafChildren.find((t=>t.data===e)),!a)return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return a||null}createNode(e,t,a){const n=new u.RowNode(this.beans);n.group=!1,this.setMasterForRow(n,e,a,!0);const r=this.gos.get("suppressParentsInRowNodes");return t&&!r&&(n.parent=t),n.level=a,n.setDataAndId(e,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn(`AG Grid: duplicate node id '${n.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[n.id]=n,this.nextId++,n}setMasterForRow(e,t,a,n){if(this.gos.get("treeData"))e.setMaster(!1),n&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){const a=this.gos.get("isRowMaster");a?e.setMaster(a(t)):e.setMaster(!0)}else e.setMaster(!1);if(n){const t=this.columnModel.getRowGroupColumns(),n=a+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(n)}}}isExpanded(e){const t=this.gos.get("groupDefaultExpanded");return-1===t||ethis.onGridReady())),this.addPropertyListeners(),this.rootNode=new c.RowNode(this.beans),this.nodeManager=new p(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),a=new Set(["excludeChildrenWhenTreeDataFiltering"]),n=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),r=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),o=new Set(["postSortRows","groupDisplayType","accentedSort"]),i=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),s=[...e,...t,...a,...n,...n,...r,...o,...i,...l];this.addManagedPropertyListeners(s,(s=>{var g;const d=null==(g=s.changeSet)?void 0:g.properties;if(!d)return;const u=e=>d.some((t=>e.has(t)));u(e)?this.setRowData(this.rootNode.allLeafChildren.map((e=>e.data))):u(t)?this.refreshModel({step:c.ClientSideRowModelSteps.EVERYTHING}):u(a)?this.refreshModel({step:c.ClientSideRowModelSteps.FILTER}):u(n)?this.refreshModel({step:c.ClientSideRowModelSteps.PIVOT}):u(r)?this.refreshModel({step:c.ClientSideRowModelSteps.AGGREGATE}):u(o)?this.refreshModel({step:c.ClientSideRowModelSteps.SORT}):u(i)?this.refreshModel({step:c.ClientSideRowModelSteps.FILTER_AGGREGATES}):u(l)&&this.refreshModel({step:c.ClientSideRowModelSteps.MAP})})),this.addManagedPropertyListener("rowHeight",(()=>this.resetRowHeights()))}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,a,n){let r,o=!1;do{r=!1;const i=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),s=Math.max(i,a),g=Math.min(l,n);for(let e=s;e<=g;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=this.gos.getRowHeightForNode(t);t.setRowHeight(e.height),r=!0,o=!0}}r&&this.setRowTopAndRowIndex()}while(r);return o}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const a=new Set,n=this.gos.isDomLayout("normal");for(let r=0;r{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},r=e=>{if(n(e),n(e.detailNode),n(e.sibling),e.hasChildren()&&e.childrenAfterGroup){const t=-1==e.level;a&&!t&&!e.expanded||e.childrenAfterGroup.forEach(r)}};r(this.rootNode)}ensureRowsAtPixel(e,t,a=0){const n=this.getRowIndexAtPixel(t),r=this.getRow(n),o=!this.gos.get("suppressAnimationFrame");return r!==e[0]&&(e.forEach((e=>{c._.removeFromArray(this.rootNode.allLeafChildren,e)})),e.forEach(((e,t)=>{c._.insertIntoArray(this.rootNode.allLeafChildren,e,Math.max(n+a,0)+t)})),this.refreshModel({step:c.ClientSideRowModelSteps.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:o}),!0)}highlightRowAtPixel(e,t){const a=null!=t?this.getRowIndexAtPixel(t):null,n=null!=a?this.getRow(a):null;if(!n||!e||n===e||null==t)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const r=this.getHighlightPosition(t,n);this.lastHighlightedRow&&this.lastHighlightedRow!==n&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),n.setHighlighted(r),this.lastHighlightedRow=n}getHighlightPosition(e,t){if(!t){const a=this.getRowIndexAtPixel(e);if(!(t=this.getRow(a||0)))return c.RowHighlightPosition.Below}const{rowTop:a,rowHeight:n}=t;return e-a0;)t=t.childrenAfterSort[0];return t.rowIndex}getRowBounds(e){if(c._.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:c.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),a=0===e.columns.length||e.columns.some((e=>e.isPrimary()))?c.ClientSideRowModelSteps.FILTER:c.ClientSideRowModelSteps.FILTER_AGGREGATES;this.refreshModel({step:a,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:c.ClientSideRowModelSteps.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:c.ClientSideRowModelSteps.PIVOT}):this.refreshModel({step:c.ClientSideRowModelSteps.AGGREGATE})}createChangePath(e){const t=c._.missingOrEmpty(e),a=new c.ChangedPath(!1,this.rootNode);return(t||this.gos.get("treeData"))&&a.setInactive(),a}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;const t=e.rowNodeTransactions.filter((e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0));return null==t||0==t.length}buildRefreshModelParams(e){let t=c.ClientSideRowModelSteps.EVERYTHING;const a={everything:c.ClientSideRowModelSteps.EVERYTHING,group:c.ClientSideRowModelSteps.EVERYTHING,filter:c.ClientSideRowModelSteps.FILTER,map:c.ClientSideRowModelSteps.MAP,aggregate:c.ClientSideRowModelSteps.AGGREGATE,sort:c.ClientSideRowModelSteps.SORT,pivot:c.ClientSideRowModelSteps.PIVOT};if(c._.exists(e)&&(t=a[e]),c._.missing(t))return void console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(a).join(", ")}`);return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t)return;if(this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const a=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case c.ClientSideRowModelSteps.EVERYTHING:this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,a,!!t.afterColumnsChanged);case c.ClientSideRowModelSteps.FILTER:this.doFilter(a);case c.ClientSideRowModelSteps.PIVOT:this.doPivot(a);case c.ClientSideRowModelSteps.AGGREGATE:this.doAggregate(a);case c.ClientSideRowModelSteps.FILTER_AGGREGATES:this.doFilterAggregates(a);case c.ClientSideRowModelSteps.SORT:this.doSort(t.rowNodeTransactions,a);case c.ClientSideRowModelSteps.MAP:this.doRowsToDisplay()}const n=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(a,n),this.isRefreshingModel=!1;const r={type:c.Events.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(r)}isEmpty(){const e=c._.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return c._.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return c._.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let a=!t,n=!1;const r=[],o=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort((i=>{if(n)return;if(a&&(i===t||i===e)&&(n=!0,i.group&&o))return void r.push(...i.allLeafChildren);if(!a){if(i!==t&&i!==e)return;a=!0}(!i.group||!o)&&r.push(i)})),r}setDatasource(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;let t=0,a=this.rowsToDisplay.length-1;if(e<=0)return 0;if(c._.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let n=-1,r=-1;for(;;){const o=Math.floor((t+a)/2),i=this.rowsToDisplay[o];if(this.isRowInPixel(i,e))return o;i.rowTope&&(a=o-1);if(n===t&&r===a)return o;n=t,r=a}}isRowInPixel(e,t){const a=e.rowTop,n=e.rowTop+e.rowHeight;return a<=t&&n>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach(((t,a)=>e(t,a)))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:a,recursionType:n,includeFooterNodes:r}=e;let{index:o}=e;const i=e=>{var n;const i=null==(n=t[0])?void 0:n.parent;if(!i)return;const l=r&&this.gos.getGrandTotalRow(),s=this.gos.getGroupTotalRowCallback(),g=r&&s({node:i});i===this.rootNode?l===e&&(i.createFooter(),a(i.sibling,o++)):g===e&&(i.createFooter(),a(i.sibling,o++))};i("top");for(let e=0;e{r&&r.forEach((r=>{const o=()=>{r.expanded=e,n(r.childrenAfterGroup)};if(t){return void(c._.exists(r.childrenAfterGroup)&&o())}if(a){return void(!r.leafGroup&&o())}r.group&&o()}))};this.rootNode&&n(this.rootNode.childrenAfterGroup),this.refreshModel({step:c.ClientSideRowModelSteps.MAP});const r=e?"expandAll":"collapseAll",o={type:c.Events.EVENT_EXPAND_COLLAPSE_ALL,source:r};this.eventService.dispatchEvent(o)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,a,n){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:a}):this.groupStage.execute({rowNode:this.rootNode,changedPath:a,afterColumnsChanged:n}),this.gos.get("groupSelectsChildren")){if(this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",a)){const e={type:c.Events.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(e)}}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:c.Events.EVENT_ROW_COUNT_READY}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var t;null==(t=this.pivotStage)||t.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(c.RowNode.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode((a=>{a.id===e&&(t=a)})),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){const e={type:c.Events.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:c.ClientSideRowModelSteps.EVERYTHING,newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const e=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((()=>{this.executeBatchUpdateRowData()}),e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let a=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((n=>{const r=this.nodeManager.updateRowData(n.rowDataTransaction,void 0);t.push(r),n.callback&&e.push(n.callback.bind(null,r)),"number"==typeof n.rowDataTransaction.addIndex&&(a=!0)})),this.commonUpdateRowData(t,void 0,a),e.length>0&&window.setTimeout((()=>{e.forEach((e=>e()))}),0),t.length>0){const e={type:c.Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(e)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const a=this.nodeManager.updateRowData(e,t),n="number"==typeof e.addIndex;return this.commonUpdateRowData([a],t,n),a}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let t=0;t{t.setRowHeight(t.rowHeight,!0);const a=t.detailNode;a&&a.setRowHeight(a.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0})),e}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};s([(0,c.Autowired)("columnModel")],m.prototype,"columnModel",2),s([(0,c.Autowired)("selectionService")],m.prototype,"selectionService",2),s([(0,c.Autowired)("valueCache")],m.prototype,"valueCache",2),s([(0,c.Autowired)("beans")],m.prototype,"beans",2),s([(0,c.Autowired)("filterStage")],m.prototype,"filterStage",2),s([(0,c.Autowired)("sortStage")],m.prototype,"sortStage",2),s([(0,c.Autowired)("flattenStage")],m.prototype,"flattenStage",2),s([(0,c.Optional)("groupStage")],m.prototype,"groupStage",2),s([(0,c.Optional)("aggregationStage")],m.prototype,"aggregationStage",2),s([(0,c.Optional)("pivotStage")],m.prototype,"pivotStage",2),s([(0,c.Optional)("filterAggregatesStage")],m.prototype,"filterAggregatesStage",2),s([c.PostConstruct],m.prototype,"init",1),m=s([(0,c.Bean)("rowModel")],m);var v=a(3423),f=class extends v.BeanStub{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};s([(0,v.Autowired)("filterService")],f.prototype,"filterService",2),f=s([(0,v.Bean)("filterStage")],f);var w=a(3423),b=class extends w.BeanStub{execute(e){const t=this.sortController.getSortOptions(),a=w._.exists(t)&&t.length>0,n=a&&w._.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),r=t.some((e=>this.gos.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup));this.sortService.sort(t,a,n,e.rowNodeTransactions,e.changedPath,r)}};s([(0,w.Autowired)("sortService")],b.prototype,"sortService",2),s([(0,w.Autowired)("sortController")],b.prototype,"sortController",2),b=s([(0,w.Bean)("sortStage")],b);var y=a(3423),C=class extends y.BeanStub{execute(e){const t=e.rowNode,a=[],n=this.beans.columnModel.isPivotMode(),r=n&&t.leafGroup,o=r?[t]:t.childrenAfterSort,i=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(i,o,a,n,0);if(!r&&a.length>0&&i.grandTotalRow){t.createFooter();const e="top"===i.grandTotalRow;this.addRowNodeToRowsToDisplay(i,t.sibling,a,0,e)}return a}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,t,a,n,r){if(!y._.missingOrEmpty(t))for(let o=0;oe.isRowGroupActive()));let s={};a&&n&&(s=this.calculateDirtyNodes(n));const g=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows"),c=n=>{var c;this.pullDownGroupDataForHideOpenParents(n.childrenAfterAggFilter,!0);const u=g&&n.leafGroup;if(i&&l&&!n.leafGroup&&!o){const e=null==(c=this.columnModel.getRowGroupColumns())?void 0:c[n.level+1],t=null===(null==e?void 0:e.getSort()),a=n.childrenAfterAggFilter.slice(0);if(n.childrenAfterSort&&!t){const e={};n.childrenAfterSort.forEach(((t,a)=>{e[t.id]=a})),a.sort(((t,a)=>{var n,r;return(null!=(n=e[t.id])?n:0)-(null!=(r=e[a.id])?r:0)}))}n.childrenAfterSort=a}else n.childrenAfterSort=!t||u?n.childrenAfterAggFilter.slice(0):a?this.doDeltaSort(n,s,r,e):this.rowNodeSorter.doFullSort(n.childrenAfterAggFilter,e);if(n.sibling&&(n.sibling.childrenAfterSort=n.childrenAfterSort),this.updateChildIndexes(n),d){const e={nodes:n.childrenAfterSort};d(e)}};r&&r.forEachChangedNodeDepthFirst(c),this.updateGroupDataForHideOpenParents(r)}calculateDirtyNodes(e){const t={},a=e=>{e&&e.forEach((e=>t[e.id]=!0))};return e&&e.forEach((e=>{a(e.add),a(e.update),a(e.remove)})),t}doDeltaSort(e,t,a,n){const r=e.childrenAfterAggFilter,o=e.childrenAfterSort;if(!o)return this.rowNodeSorter.doFullSort(r,n);const i={},l=[];r.forEach((e=>{t[e.id]||!a.canSkip(e)?l.push(e):i[e.id]=!0}));const s=o.filter((e=>i[e.id])),g=(e,t)=>({currentPos:t,rowNode:e}),d=l.map(g).sort(((e,t)=>this.rowNodeSorter.compareRowNodes(n,e,t)));return this.mergeSortedArrays(n,d,s.map(g)).map((({rowNode:e})=>e))}mergeSortedArrays(e,t,a){const n=[];let r=0,o=0;for(;r{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((e=>{e.hasChildren()&&t(e)}))};e&&e.executeFromRootNode((e=>t(e)))}pullDownGroupDataForHideOpenParents(e,t){this.gos.get("groupHideOpenParents")&&!E._.missing(e)&&e.forEach((e=>{this.columnModel.getGroupDisplayColumns().forEach((a=>{const n=a.getColDef().showRowGroup;if("string"!=typeof n)return void console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const r=n,o=this.columnModel.getPrimaryColumn(r);if(!(o===e.rowGroupColumn))if(t)e.setGroupValue(a.getId(),void 0);else{const t=e.getFirstChildOfFirstChild(o);t&&e.setGroupValue(a.getId(),t.key)}}))}))}};s([(0,E.Autowired)("columnModel")],S.prototype,"columnModel",2),s([(0,E.Autowired)("rowNodeSorter")],S.prototype,"rowNodeSorter",2),S=s([(0,E.Bean)("sortService")],S);var k=a(3423),x=class extends k.BeanStub{filter(e){const t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const a=(t,a)=>{t.hasChildren()?t.childrenAfterFilter=e&&!a?t.childrenAfterGroup.filter((e=>{const t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,a=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||a})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const e=(t,n)=>{if(t.childrenAfterGroup)for(let r=0;re(t,!1);t.executeFromRootNode(n)}else{const e=e=>a(e,!1);t.forEachChangedNodeDepthFirst(e,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}};s([(0,k.Autowired)("filterManager")],x.prototype,"filterManager",2),x=s([(0,k.Bean)("filterService")],x);var z=a(3423),R=class extends z.BeanStub{postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",(()=>this.onRowDataUpdated())))}isActive(){const e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const[a,n]=t;this.clientSideRowModel.updateRowData(a,n)}createTransactionForRowData(e){if(z._.missing(this.clientSideRowModel))return void console.error("AG Grid: ImmutableService only works with ClientSideRowModel");const t=this.gos.getCallback("getRowId");if(null==t)return void console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const a={remove:[],update:[],add:[]},n=this.clientSideRowModel.getCopyOfNodesMap(),r=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return z._.exists(e)&&e.forEach(((e,o)=>{const i=t({data:e,level:0}),l=n[i];if(r&&(r[i]=o),l){l.data!==e&&a.update.push(e),n[i]=void 0}else a.add.push(e)})),z._.iterateObject(n,((e,t)=>{t&&a.remove.push(t.data)})),[a,r]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};s([(0,z.Autowired)("rowModel")],R.prototype,"rowModel",2),s([(0,z.Autowired)("rowRenderer")],R.prototype,"rowRenderer",2),s([(0,z.Autowired)("selectionService")],R.prototype,"selectionService",2),s([z.PostConstruct],R.prototype,"postConstruct",1),R=s([(0,z.Bean)("immutableService")],R);var D={version:"31.3.4",moduleName:d.ModuleNames.ClientSideRowModelModule,rowModel:"clientSide",beans:[m,f,b,C,S,x,R]}},3423:function(e,t,a){var n,r=Object.defineProperty,o=Object.defineProperties,i=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,a)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,h=(e,t)=>{for(var a in t||(t={}))d.call(t,a)&&u(e,a,t[a]);if(g)for(var a of g(t))c.call(t,a)&&u(e,a,t[a]);return e},p=(e,t)=>o(e,l(t)),m=(e,t)=>{for(var a in t)r(e,a,{get:t[a],enumerable:!0})},v=(e,t,a,n)=>{for(var o,l=n>1?void 0:n?i(t,a):t,s=e.length-1;s>=0;s--)(o=e[s])&&(l=(n?o(t,a,l):o(l))||l);return n&&l&&r(t,a,l),l},f=(e,t)=>(a,n)=>t(a,n,e),w={};m(w,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ut,AbstractHeaderCellCtrl:()=>ss,AgAbstractField:()=>Wr,AgAbstractLabel:()=>qr,AgAutocomplete:()=>zg,AgCheckbox:()=>Zr,AgDialog:()=>bg,AgGroupComponent:()=>gg,AgInputDateField:()=>eg,AgInputNumberField:()=>uo,AgInputRange:()=>tg,AgInputTextArea:()=>$s,AgInputTextField:()=>co,AgMenuItemComponent:()=>vg,AgMenuItemRenderer:()=>yi,AgMenuList:()=>hg,AgMenuPanel:()=>pg,AgPanel:()=>wg,AgPickerField:()=>Ur,AgPromise:()=>yr,AgPromiseStatus:()=>br,AgRadioButton:()=>Jr,AgRichSelect:()=>og,AgSelect:()=>Qr,AgSlider:()=>lg,AgStackComponentsRegistry:()=>Ot,AgToggleButton:()=>Js,AlignedGridsService:()=>Lg,AnimateShowChangeCellRenderer:()=>_o,AnimateSlideCellRenderer:()=>Ho,AnimationFrameService:()=>Is,AutoScrollService:()=>Ui,AutoWidthCalculator:()=>_s,Autowired:()=>he,BarColumnLabelPlacement:()=>$d,BaseComponentWrapper:()=>Xd,Bean:()=>ue,BeanStub:()=>it,Beans:()=>vl,BodyDropPivotTarget:()=>Xl,BodyDropTarget:()=>$l,CellComp:()=>Kl,CellCtrl:()=>Sl,CellNavigationService:()=>Fg,CellPositionUtils:()=>ld,CellRangeType:()=>cl,ChangedPath:()=>js,ChartMappings:()=>Zd,CheckboxCellEditor:()=>bi,CheckboxCellRenderer:()=>wi,CheckboxSelectionComponent:()=>Wo,ClientSideRowModelSteps:()=>Os,Column:()=>ke,ColumnApi:()=>Ig,ColumnFactory:()=>lt,ColumnGroup:()=>dt,ColumnKeyCreator:()=>M,ColumnModel:()=>Dt,Component:()=>Dr,ComponentUtil:()=>It,Context:()=>se,CssClassApplier:()=>yl,CssClassManager:()=>Er,CtrlsService:()=>fd,DataTypeService:()=>Id,DateCellEditor:()=>pi,DateFilter:()=>io,DateStringCellEditor:()=>vi,DisplayedGroupCreator:()=>Mt,DragAndDropService:()=>Yo,DragService:()=>Ki,DragSourceType:()=>Ko,Environment:()=>ed,EventService:()=>we,Events:()=>ct,ExcelFactoryMode:()=>qi,ExpansionService:()=>Gs,ExpressionService:()=>Gg,FilterManager:()=>$i,FilterWrapperComp:()=>el,FloatingFilterMapper:()=>Hi,FocusService:()=>Wg,GROUP_AUTO_COLUMN_ID:()=>pt,Grid:()=>Kd,GridApi:()=>Zi,GridBodyComp:()=>Hl,GridBodyCtrl:()=>gl,GridComp:()=>Bg,GridCoreCreator:()=>Qd,GridCtrl:()=>Hg,GridHeaderComp:()=>Rs,GridHeaderCtrl:()=>xs,GridOptionsService:()=>Td,GroupCellRenderer:()=>ti,GroupCellRendererCtrl:()=>$o,GroupInstanceIdCreator:()=>ht,HeaderCellCtrl:()=>ps,HeaderFilterCellComp:()=>nl,HeaderFilterCellCtrl:()=>cs,HeaderGroupCellCtrl:()=>fs,HeaderNavigationDirection:()=>Ss,HeaderNavigationService:()=>ks,HeaderPositionUtils:()=>hd,HeaderRowComp:()=>os,HeaderRowContainerComp:()=>Es,HeaderRowContainerCtrl:()=>ys,HeaderRowCtrl:()=>bs,HeaderRowType:()=>rs,HorizontalDirection:()=>jo,HorizontalResizeService:()=>Ds,KeyCode:()=>$n,LargeTextCellEditor:()=>No,LayoutCssClasses:()=>rl,LocaleService:()=>Md,Logger:()=>_g,LoggerFactory:()=>Vg,ManagedFocusFeature:()=>Or,MenuService:()=>Vs,ModuleNames:()=>oe,ModuleRegistry:()=>le,MouseEventService:()=>ql,MoveColumnFeature:()=>Jl,NavigationService:()=>Wl,NumberCellEditor:()=>ui,NumberFilter:()=>vo,NumberSequence:()=>wr,Optional:()=>pe,PaginationProxy:()=>Xs,PillDragComp:()=>Dg,PillDropZonePanel:()=>Tg,PinnedRowModel:()=>Ws,PopupComponent:()=>Fo,PopupEditorWrapper:()=>jl,PopupService:()=>Cg,PositionableFeature:()=>_r,PostConstruct:()=>de,PreConstruct:()=>ge,PreDestroy:()=>ce,PropertyKeys:()=>Lt,ProvidedColumnGroup:()=>ze,ProvidedFilter:()=>Br,Qualifier:()=>ve,QuerySelector:()=>Ar,RefSelector:()=>Tr,ResizeObserverService:()=>Ns,RowAnimationCssClasses:()=>ll,RowContainerComp:()=>Ql,RowContainerCtrl:()=>_l,RowContainerName:()=>Ll,RowContainerType:()=>Nl,RowCtrl:()=>zl,RowHighlightPosition:()=>Wi,RowNode:()=>qo,RowNodeBlock:()=>Ys,RowNodeBlockLoader:()=>Qs,RowNodeSorter:()=>vd,RowPositionUtils:()=>id,RowRenderer:()=>Bs,ScalarFilter:()=>ao,ScrollVisibleService:()=>Bl,SelectCellEditor:()=>Io,SelectableService:()=>ad,SelectionHandleType:()=>dl,ServerSideTransactionResultStatus:()=>Us,SetLeftFeature:()=>gs,SimpleFilter:()=>to,SortController:()=>qg,SortIndicatorComp:()=>Do,StandardMenuFactory:()=>As,StylingService:()=>Zs,TabGuardClassNames:()=>Ts,TabGuardComp:()=>Ps,TabGuardCtrl:()=>Ms,TabbedLayout:()=>Ls,TextCellEditor:()=>Vo,TextFilter:()=>bo,TextFloatingFilter:()=>ko,Timer:()=>Cr,TooltipFeature:()=>xr,TooltipStateManager:()=>kr,TouchListener:()=>zo,UserComponentFactory:()=>Bi,UserComponentRegistry:()=>Ci,ValueCache:()=>Yg,ValueService:()=>Og,VanillaFrameworkOverrides:()=>Pg,VerticalDirection:()=>Uo,VirtualList:()=>rg,VirtualListDragFeature:()=>Qi,_:()=>fr,__FORCE_MODULE_DETECTION:()=>Jd,createGrid:()=>jd,getRowContainerTypeForName:()=>Il,provideGlobalGridOptions:()=>Ud}),e.exports=(n=w,((e,t,a,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))d.call(e,o)||o===a||r(e,o,{get:()=>t[o],enumerable:!(n=i(t,o))||n.enumerable});return e})(r({},"__esModule",{value:!0}),n));var b={};function y(e){return null==e||""===e?null:e}function C(e,t=!1){return null!=e&&(""!==e||t)}function E(e){return!C(e)}function S(e){return null==e||0===e.length}function k(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function x(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function z(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function R(e){if(null!=e&&""!==e)return e}function D(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function A(e,t,a=!1){const n=null==e,r=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&r)return 0;if(n)return-1;if(r)return 1;function o(e,t){return e>t?1:et.push(e))),t}return Object.values(e)}m(b,{attrToBoolean:()=>z,attrToNumber:()=>x,attrToString:()=>R,defaultComparator:()=>A,exists:()=>C,jsonEquals:()=>D,makeNull:()=>y,missing:()=>E,missingOrEmpty:()=>S,toStringOrNull:()=>k,values:()=>T});var M=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;tF,cloneObject:()=>N,deepCloneDefinition:()=>I,getAllValuesInObject:()=>O,getValueUsingField:()=>V,isNonNullObject:()=>H,iterateObject:()=>L,mergeDeep:()=>G,removeAllReferences:()=>_});var F=new Set(["__proto__","constructor","prototype"]);function L(e,t){if(null!=e)if(Array.isArray(e))for(let a=0;a{if(t&&t.indexOf(e)>=0||F.has(e))return;const r=a[e],o=H(r)&&r.constructor===Object;n[e]=o?I(r):r})),n}function O(e){if(!e)return[];const t=Object;if("function"==typeof t.values)return t.values(e);const a=[];for(const t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&a.push(e[t]);return a}function G(e,t,a=!0,n=!1){C(t)&&L(t,((t,r)=>{if(F.has(t))return;let o=e[t];if(o!==r){if(n){if(null==o&&null!=r){"object"==typeof r&&r.constructor===Object&&(o={},e[t]=o)}}H(r)&&H(o)&&!Array.isArray(o)?G(o,r,a,n):(a||void 0!==r)&&(e[t]=r)}}))}function V(e,t,a){if(!t||!e)return;if(!a)return e[t];const n=t.split(".");let r=e;for(let e=0;e{"object"!=typeof e[a]||t.includes(a)||(e[a]=void 0)}));const n=Object.getPrototypeOf(e),r={};Object.getOwnPropertyNames(n).forEach((e=>{if("function"==typeof n[e]&&!t.includes(e)){const t=()=>{console.warn((e=>`AG Grid: Grid API function ${e}() cannot be called as the grid has been destroyed.\n It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${a}`)(e))};r[e]={value:t,writable:!0}}})),Object.defineProperties(e,r)}function H(e){return"object"==typeof e&&null!==e}var B={};m(B,{compose:()=>ne,debounce:()=>ee,doOnce:()=>W,errorOnce:()=>j,executeAfter:()=>$,executeInAWhile:()=>Q,executeNextVMTurn:()=>J,getFunctionName:()=>K,isFunction:()=>Y,noop:()=>re,throttle:()=>te,waitUntil:()=>ae,warnOnce:()=>U});var q={};function W(e,t){q[t]||(e(),q[t]=!0)}function U(e){W((()=>console.warn("AG Grid: "+e)),e)}function j(e){W((()=>console.error("AG Grid: "+e)),e)}function K(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function Y(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Q(e){$(e,400)}var X=[],Z=!1;function J(e){X.push(e),Z||(Z=!0,window.setTimeout((()=>{const e=X.slice();X.length=0,Z=!1,e.forEach((e=>e()))}),0))}function $(e,t=0){e.length>0&&window.setTimeout((()=>e.forEach((e=>e()))),t)}function ee(e,t){let a;return function(...n){const r=this;window.clearTimeout(a),a=window.setTimeout((function(){e.apply(r,n)}),t)}}function te(e,t){let a=0;return function(...n){const r=(new Date).getTime();r-a{const l=(new Date).getTime()-r>a;(e()||l)&&(t(),i=!0,null!=o&&(window.clearInterval(o),o=null),l&&n&&console.warn(n))};l(),i||(o=window.setInterval(l,10))}function ne(...e){return t=>e.reduce(((e,t)=>t(e)),t)}var re=()=>{},oe=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(oe||{}),ie=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,a,n){e.runVersionChecks(t),void 0!==n?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[n]&&(e.gridModulesMap[n]={}),e.gridModulesMap[n][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(a)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,a,n){e.setModuleBased(a),t&&t.forEach((t=>e.__register(t,a,n)))}static isValidModuleVersion(t){const[a,n]=t.version.split(".")||[],[r,o]=e.currentModuleVersion.split(".")||[];return a===r&&n===o}static runVersionChecks(t){if(e.currentModuleVersion||(e.currentModuleVersion=t.version),t.version?e.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){const e=t.validate();if(!e.isValid){const t=e;console.error(`AG Grid: ${t.message}`)}}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&W((()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information.")}),"ModulePackageCheck")}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,a,n){var r;if(this.__isRegistered(t,n))return!0;const o=a+t;let i;if(e.isBundled)i=`AG Grid: unable to use ${a} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n \n