@ag-grid-enterprise/row-grouping
Advanced tools
Comparing version 31.3.2 to 32.0.0
@@ -5,6 +5,4 @@ # Contributing to AG Grid Enterprise | ||
Retention of Intellectual Property Rights for AG Grid Enterprise component | ||
============== | ||
# Retention of Intellectual Property Rights for AG Grid Enterprise component | ||
1.DEFINITIONS | ||
@@ -27,9 +25,9 @@ | ||
- [Question or Problem?](#question) | ||
- [Issues and Bugs](#issue) | ||
- [Feature Requests](#feature) | ||
- [Submission Guidelines](#submit) | ||
- [Coding Rules](#rules) | ||
- [Commit Message Guidelines](#commit) | ||
- [Signing the CLA](#cla) | ||
- [Question or Problem?](#question) | ||
- [Issues and Bugs](#issue) | ||
- [Feature Requests](#feature) | ||
- [Submission Guidelines](#submit) | ||
- [Coding Rules](#rules) | ||
- [Commit Message Guidelines](#commit) | ||
- [Signing the CLA](#cla) | ||
@@ -45,2 +43,3 @@ ## <a name="question"></a> Got a Question or Problem? | ||
## <a name="issue"></a> Found a Bug? | ||
If you find a bug in the source code, you can help us by | ||
@@ -50,3 +49,4 @@ [submitting an issue](#submit-issue) to our [GitHub Repository][github]. | ||
## <a name="feature"></a> Missing a Feature? | ||
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub | ||
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub | ||
Repository. | ||
@@ -62,5 +62,5 @@ | ||
- version of AG Grid Enterprise used | ||
- 3rd-party libraries and their versions | ||
- and most importantly - a use-case that fails | ||
- version of AG Grid Enterprise used | ||
- 3rd-party libraries and their versions | ||
- and most importantly - a use-case that fails | ||
@@ -78,3 +78,1 @@ A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. If plunker is not a suitable way to demonstrate the problem (for example for issues related to our npm packaging), please create a standalone git repository demonstrating the problem. | ||
[stackoverflow]: http://stackoverflow.com/questions/tagged/ag-grid | ||
@@ -1,15 +0,15 @@ | ||
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropNames=Object.getOwnPropertyNames,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of __getOwnPropNames(t))!__hasOwnProp.call(e,n)&&n!==o&&__defProp(e,n,{get:()=>t[n],enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__decorateClass=(e,t,o,r)=>{for(var n=r>1?void 0:r?__getOwnPropDesc(t,o):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(r?s(t,o,n):s(n))||n);return r&&n&&__defProp(t,o,n),n},main_exports={};__export(main_exports,{PivotDropZonePanel:()=>PivotDropZonePanel,RowGroupDropZonePanel:()=>RowGroupDropZonePanel,RowGroupingModule:()=>RowGroupingModule,ValuesDropZonePanel:()=>ValuesDropZonePanel}),module.exports=__toCommonJS(main_exports);var import_core14=require("@ag-grid-community/core"),import_core15=require("@ag-grid-enterprise/core"),import_core=require("@ag-grid-community/core"),AggregationStage=class extends import_core.BeanStub{execute(e){const t=import_core._.missingOrEmpty(this.columnModel.getValueColumns()),o=!this.gos.getCallback("getGroupRowAgg"),r=e.changedPath&&e.changedPath.isActive();if(t&&o&&r)return;const n=this.createAggDetails(e);this.recursivelyCreateAggData(n)}createAggDetails(e){const t=this.columnModel.isPivotActive(),o=this.columnModel.getValueColumns(),r=t?this.columnModel.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!this.gos.getGrandTotalRow(),changedPath:e.changedPath,valueColumns:o,pivotColumns:r,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return this.gos.getGroupAggFiltering()!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){const t=o=>{if(!o.hasChildren()){o.aggData&&o.setAggData(null);return}if(o.level===-1&&!e.groupIncludeTotalFooter){const i=!this.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&i){o.setAggData(null);return}}this.aggregateRowNode(o,e)};e.changedPath.forEachChangedNodeDepthFirst(t,!0)}aggregateRowNode(e,t){const o=t.valueColumns.length===0,r=t.pivotColumns.length===0;let n;t.userAggFunc?n=t.userAggFunc({nodes:e.childrenAfterFilter}):o?n=null:r?n=this.aggregateRowNodeUsingValuesOnly(e,t):n=this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(n),e.sibling&&e.sibling.setAggData(n)}aggregateRowNodeUsingValuesAndPivot(e){var t,o;const r={},n=(t=this.columnModel.getSecondaryColumns())!=null?t:[];let i=!0;for(let s=0;s<n.length;s++){const l=n[s],u=l.getColDef();if(u.pivotTotalColumnIds!=null){i=!1;continue}const a=(o=u.pivotKeys)!=null?o:[];let c;e.leafGroup?c=this.getValuesFromMappedSet(e.childrenMapped,a,u.pivotValueColumn):c=this.getValuesPivotNonLeaf(e,u.colId),r[u.colId]=this.aggregateValues(c,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,e,l)}if(!i)for(let s=0;s<n.length;s++){const l=n[s],u=l.getColDef();if(u.pivotTotalColumnIds==null||!u.pivotTotalColumnIds.length)continue;const a=u.pivotTotalColumnIds.map(c=>r[c]);r[u.colId]=this.aggregateValues(a,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,e,l)}return r}aggregateRowNodeUsingValuesOnly(e,t){const o={},r=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,n=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,i=this.getValuesNormal(e,r,t.filteredOnly),s=e.aggData;return r.forEach((l,u)=>{o[l.getId()]=this.aggregateValues(i[u],l.getAggFunc(),l,e)}),n&&s&&n.forEach(l=>{o[l.getId()]=s[l.getId()]}),o}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(o=>o.aggData[t])}getValuesFromMappedSet(e,t,o){let r=e;for(let n=0;n<t.length;n++){const i=t[n];r=r?r[i]:null}return r?r.map(n=>this.valueService.getValue(o,n)):[]}getValuesNormal(e,t,o){const r=[];t.forEach(()=>r.push([]));const n=t.length,i=o?e.childrenAfterFilter:e.childrenAfterGroup,s=i.length;for(let l=0;l<s;l++){const u=i[l];for(let a=0;a<n;a++){const c=t[a],d=this.valueService.getValue(c,u);r[a].push(d)}}return r}aggregateValues(e,t,o,r,n){const i=typeof t=="string"?this.aggFuncService.getAggFunc(t):t;if(typeof i!="function")return console.error(`AG Grid: unrecognised aggregation function ${t}`),null;const s=i,l=this.gos.addGridCommonParams({values:e,column:o,colDef:o?o.getColDef():void 0,pivotResultColumn:n,rowNode:r,data:r?r.data:void 0});return s(l)}};__decorateClass([(0,import_core.Autowired)("columnModel")],AggregationStage.prototype,"columnModel",2),__decorateClass([(0,import_core.Autowired)("valueService")],AggregationStage.prototype,"valueService",2),__decorateClass([(0,import_core.Autowired)("aggFuncService")],AggregationStage.prototype,"aggFuncService",2),AggregationStage=__decorateClass([(0,import_core.Bean)("aggregationStage")],AggregationStage);var import_core2=require("@ag-grid-community/core"),BatchRemover=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(e,t){const o=this.getSet(e);o.removeFromChildrenAfterGroup[t.id]=!0}isRemoveFromAllLeafChildren(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]}preventRemoveFromAllLeafChildren(e,t){const o=this.getSet(e);delete o.removeFromAllLeafChildren[t.id]}removeFromAllLeafChildren(e,t){const o=this.getSet(e);o.removeFromAllLeafChildren[t.id]=!0}getSet(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(e=>{const t=this.allSets[e.id];e.childrenAfterGroup=e.childrenAfterGroup.filter(o=>!t.removeFromChildrenAfterGroup[o.id]),e.allLeafChildren=e.allLeafChildren.filter(o=>!t.removeFromAllLeafChildren[o.id]),e.updateHasChildren(),e.sibling&&(e.sibling.childrenAfterGroup=e.childrenAfterGroup,e.sibling.allLeafChildren=e.allLeafChildren)}),this.allSets={},this.allParents.length=0}},GroupStage=class extends import_core2.BeanStub{execute(e){const t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{const o=e.afterColumnsChanged===!0;this.shotgunResetEverything(t,o)}t.usingTreeData||(this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)),this.selectableService.updateSelectableAfterGrouping()}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(t=>{if(t.childrenAfterGroup){const o=[],r=[];let n;t.childrenAfterGroup.forEach(i=>{var s;(s=i.childrenAfterGroup)!=null&&s.length?i.key===""&&!n?n=i:r.push(i):o.push(i)}),n&&r.push(n),t.childrenAfterGroup=[...o,...r]}},!1)}createGroupingDetails(e){var t;const{rowNode:o,changedPath:r,rowNodeTransactions:n,rowNodeOrder:i}=e,s=this.gos.get("treeData"),l=s?null:this.columnModel.getRowGroupColumns();return{includeParents:!this.gos.get("suppressParentsInRowNodes"),expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:l,rootNode:o,pivotMode:this.columnModel.isPivotMode(),groupedColCount:s||!l?0:l.length,rowNodeOrder:i,transactions:n,changedPath:r,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),usingTreeData:s,suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),getDataPath:s?this.gos.get("getDataPath"):void 0,keyCreators:(t=l?.map(a=>a.getColDef().keyCreator))!=null?t:[]}}handleTransaction(e){e.transactions.forEach(t=>{const o=e.usingTreeData?void 0:new BatchRemover;if(import_core2._.existsAndNotEmpty(t.remove)&&this.removeNodes(t.remove,e,o),import_core2._.existsAndNotEmpty(t.update)&&this.moveNodesInWrongPath(t.update,e,o),import_core2._.existsAndNotEmpty(t.add)&&this.insertNodes(t.add,e,!1),o){const r=o.getAllParents().slice();o.flush(),this.removeEmptyGroups(r,e)}}),e.rowNodeOrder&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{if(!t.childrenAfterGroup)return;import_core2._.sortRowNodesByOrder(t.childrenAfterGroup,e.rowNodeOrder)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;import_core2._.exists(t)&&o(e.rootNode);function o(r){import_core2._.exists(r.childrenAfterGroup)&&!r.leafGroup&&(r.childrenAfterGroup.sort((i,s)=>t({nodeA:i,nodeB:s})),r.childrenAfterGroup.forEach(i=>o(i)))}}getExistingPathForNode(e,t){const o=[];let r=t.usingTreeData?e:e.parent;for(;r&&r!==t.rootNode;)o.push({key:r.key,rowGroupColumn:r.rowGroupColumn,field:r.field}),r=r.parent;return o.reverse(),o}moveNodesInWrongPath(e,t,o){e.forEach(r=>{t.changedPath.isActive()&&t.changedPath.addParentNode(r.parent);const n=u=>u.key,i=this.getExistingPathForNode(r,t).map(n),s=this.getGroupInfo(r,t).map(n);import_core2._.areEqual(i,s)||this.moveNode(r,t,o)})}moveNode(e,t,o){if(this.removeNodesInStages([e],t,o),this.insertOneNode(e,t,!0,o),e.setData(e.data),t.changedPath.isActive()){const r=e.parent;t.changedPath.addParentNode(r)}}removeNodes(e,t,o){this.removeNodesInStages(e,t,o),t.changedPath.isActive()&&e.forEach(r=>t.changedPath.addParentNode(r.parent))}removeNodesInStages(e,t,o){if(this.removeNodesFromParents(e,t,o),t.usingTreeData){this.postRemoveCreateFillerNodes(e,t);const r=e.map(n=>n.parent);this.removeEmptyGroups(r,t)}}forEachParentGroup(e,t,o){let r=t;for(;r&&r!==e.rootNode;)o(r),r=r.parent}removeNodesFromParents(e,t,o){const r=o==null,n=o||new BatchRemover;e.forEach(i=>{this.removeFromParent(i,n),this.forEachParentGroup(t,i.parent,s=>{n.removeFromAllLeafChildren(s,i)})}),r&&n.flush()}postRemoveCreateFillerNodes(e,t){e.forEach(o=>{if(o.hasChildren()){const n=this.getExistingPathForNode(o,t),i=this.findParentForNode(o,n,t);i.expanded=o.expanded,i.allLeafChildren=o.allLeafChildren,i.childrenAfterGroup=o.childrenAfterGroup,i.childrenMapped=o.childrenMapped,i.updateHasChildren(),i.childrenAfterGroup.forEach(s=>s.parent=i)}})}removeEmptyGroups(e,t){let o=!0;const r=n=>{const i=this.getChildrenMappedKey(n.key,n.rowGroupColumn),s=n.parent;return(s&&s.childrenMapped?!s.childrenMapped[i]:!0)?!1:!!n.isEmptyRowGroupNode()};for(;o;){o=!1;const n=new BatchRemover;e.forEach(i=>{this.forEachParentGroup(t,i,s=>{r(s)&&(o=!0,this.removeFromParent(s,n),s.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),n.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(import_core2._.removeFromArray(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent&&e.parent.childrenMapped&&(e.parent.childrenMapped[o]=void 0),e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t&&(t.childrenMapped!=null&&(t.childrenMapped[o]=e),t.childrenAfterGroup.push(e),t.updateHasChildren())}areGroupColsEqual(e,t){return e==null||t==null||e.pivotMode!==t.pivotMode?!1:import_core2._.areEqual(e.groupedCols,t.groupedCols)&&import_core2._.areEqual(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=o=>{o&&o.forEach(r=>{if(!e.usingTreeData&&!r.group)return;const i={field:r.field,key:r.key,rowGroupColumn:r.rowGroupColumn,leafNode:r.allLeafChildren[0]};this.setGroupData(r,i,e),t(r.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionService.filterFromSelection(i=>i&&!i.group);const{rootNode:o,groupedCols:r}=e;o.leafGroup=e.usingTreeData?!1:r.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const n=o.sibling;n&&(n.childrenAfterGroup=o.childrenAfterGroup,n.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,e,!1)}noChangeInGroupingColumns(e,t){let o=!1;const r=this.columnModel.getGroupDisplayColumns(),n=r?r.map(i=>i.getId()).join("-"):"";return t&&(o=e.usingTreeData||this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==n&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=n,o}insertNodes(e,t,o){e.forEach(r=>{this.insertOneNode(r,t,o),t.changedPath.isActive()&&t.changedPath.addParentNode(r.parent)})}insertOneNode(e,t,o,r){const n=this.getGroupInfo(e,t),i=this.findParentForNode(e,n,t,r);i.group||console.warn("AG Grid: duplicate group keys for row data, keys should be unique",[i.data,e.data]),t.usingTreeData?this.swapGroupWithUserNode(i,e,o):(e.parent=i,e.level=n.length,i.childrenAfterGroup.push(e),i.updateHasChildren())}findParentForNode(e,t,o,r){let n=o.rootNode;return t.forEach((i,s)=>{n=this.getOrCreateNextNode(n,i,s,o),r?.isRemoveFromAllLeafChildren(n,e)?r?.preventRemoveFromAllLeafChildren(n,e):n.allLeafChildren.push(e)}),n}swapGroupWithUserNode(e,t,o){t.parent=e.parent,t.key=e.key,t.field=e.field,t.groupData=e.groupData,t.level=e.level,o||(t.expanded=e.expanded),t.leafGroup=e.leafGroup,t.rowGroupIndex=e.rowGroupIndex,t.allLeafChildren=e.allLeafChildren,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenMapped=e.childrenMapped,t.sibling=e.sibling,t.updateHasChildren(),this.removeFromParent(e),t.childrenAfterGroup.forEach(r=>r.parent=t),this.addToParent(t,e.parent)}getOrCreateNextNode(e,t,o,r){const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let i=e.childrenMapped?e.childrenMapped[n]:void 0;return i||(i=this.createGroup(t,e,o,r),this.addToParent(i,e)),i}createGroup(e,t,o,r){const n=new import_core2.RowNode(this.beans);return n.group=!0,n.field=e.field,n.rowGroupColumn=e.rowGroupColumn,this.setGroupData(n,e,r),n.key=e.key,n.id=this.createGroupId(n,t,r.usingTreeData,o),n.level=o,n.leafGroup=r.usingTreeData?!1:o===r.groupedColCount-1,n.allLeafChildren=[],n.setAllChildrenCount(0),n.rowGroupIndex=r.usingTreeData?null:o,n.childrenAfterGroup=[],n.childrenMapped={},n.updateHasChildren(),n.parent=r.includeParents?t:null,this.setExpandedInitialValue(r,n),n}createGroupId(e,t,o,r){let n;return o?n=(i,s,l)=>{if(l<0)return null;const u=s?n(s,s.parent,l-1):null;return`${u==null?"":u+"-"}${l}-${i.key}`}:n=(i,s)=>{if(!i.rowGroupColumn)return null;const l=s?n(s,s.parent,0):null;return`${l==null?"":l+"-"}${i.rowGroupColumn.getColId()}-${i.key}`},import_core2.RowNode.ID_PREFIX_ROW_GROUP+n(e,t,r)}setGroupData(e,t,o){e.groupData={},this.columnModel.getGroupDisplayColumns().forEach(n=>{if(o.usingTreeData){e.groupData[n.getColId()]=t.key;return}const s=e.rowGroupColumn;s!==null&&n.isRowGroupDisplayed(s.getId())&&(o.suppressGroupMaintainValueType?e.groupData[n.getColId()]=t.key:e.groupData[n.getColId()]=this.valueService.getValue(s,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}const o=e.isGroupOpenByDefault;if(o){const n={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=o(n)==!0;return}const{expandByDefault:r}=e;if(e.expandByDefault===-1){t.expanded=!0;return}t.expanded=t.level<r}getGroupInfo(e,t){return t.usingTreeData?this.getGroupInfoFromCallback(e,t):this.getGroupInfoFromGroupColumns(e,t)}getGroupInfoFromCallback(e,t){const o=t.getDataPath?t.getDataPath(e.data):null;(o==null||o.length===0)&&import_core2._.warnOnce(`getDataPath() should not return an empty path for data ${e.data}`);const r=n=>({key:n,field:null,rowGroupColumn:null});return o?o.map(r):[]}getGroupInfoFromGroupColumns(e,t){const o=[];return t.groupedCols.forEach(r=>{let n=this.valueService.getKeyForNode(r,e),i=n!=null&&n!=="";if((t.pivotMode||!t.groupAllowUnbalanced)&&!i&&(n="",i=!0),i){const l={key:n,field:r.getColDef().field,rowGroupColumn:r,leafNode:e};o.push(l)}}),o}};__decorateClass([(0,import_core2.Autowired)("columnModel")],GroupStage.prototype,"columnModel",2),__decorateClass([(0,import_core2.Autowired)("selectableService")],GroupStage.prototype,"selectableService",2),__decorateClass([(0,import_core2.Autowired)("valueService")],GroupStage.prototype,"valueService",2),__decorateClass([(0,import_core2.Autowired)("beans")],GroupStage.prototype,"beans",2),__decorateClass([(0,import_core2.Autowired)("selectionService")],GroupStage.prototype,"selectionService",2),GroupStage=__decorateClass([(0,import_core2.Bean)("groupStage")],GroupStage);var import_core3=require("@ag-grid-community/core"),PivotColDefService=class extends import_core3.BeanStub{init(){const e=()=>{var o;return(o=this.gos.get("serverSidePivotResultFieldSeparator"))!=null?o:"_"};this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e);function o(i,s=[]){return i.forEach(l=>{l.children!==void 0?o(l.children,s):s.push(l)}),s}const r=o(t);this.addRowGroupTotals(t,r),this.addExpandablePivotGroups(t,r),this.addPivotTotalsToGroups(t,r);const n=r.map(i=>import_core3._.cloneObject(i));return{pivotColumnGroupDefs:t,pivotColumnDefs:n}}createPivotColumnsFromUniqueValues(e){const t=this.columnModel.getPivotColumns(),o=t.length;return this.recursivelyBuildGroup(0,e,[],o,t)}recursivelyBuildGroup(e,t,o,r,n){const i=this.columnModel.getValueColumns();if(e>=r)return this.buildMeasureCols(o);const s=n[e].getColDef(),l=this.headerNameComparator.bind(this,s.pivotComparator);if(i.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===r-1){const a=[];return import_core3._.iterateObject(t,c=>{const d=[...o,c],p=this.createColDef(i[0],c,d);p.columnGroupShow="open",a.push(p)}),a.sort(l),a}const u=[];return import_core3._.iterateObject(t,(a,c)=>{const d=this.pivotDefaultExpanded===-1||e<this.pivotDefaultExpanded,p=[...o,a];u.push({children:this.recursivelyBuildGroup(e+1,c,p,r,n),headerName:a,pivotKeys:p,columnGroupShow:"open",openByDefault:d,groupId:this.generateColumnGroupId(p)})}),u.sort(l),u}buildMeasureCols(e){const t=this.columnModel.getValueColumns();return t.length===0?[this.createColDef(null,"-",e)]:t.map(o=>{const r=this.columnModel.getDisplayNameForColumn(o,"header");return __spreadProps(__spreadValues({},this.createColDef(o,r,e)),{columnGroupShow:"open"})})}addExpandablePivotGroups(e,t){if(this.gos.get("suppressExpandablePivotGroups")||this.gos.get("pivotColumnGroupTotals"))return;const o=(r,n,i)=>{const s=r;if(s.children){const l=new Map;s.children.forEach(a=>{o(a,n,l)});const u=!s.children.some(a=>a.children);this.columnModel.getValueColumns().forEach(a=>{const c=this.columnModel.getDisplayNameForColumn(a,"header"),d=this.createColDef(a,c,r.pivotKeys);d.pivotTotalColumnIds=l.get(a.getColId()),d.columnGroupShow="closed",d.aggFunc=a.getAggFunc(),u||(r.children.push(d),n.push(d))}),this.merge(i,l)}else{const l=r;if(!l.pivotValueColumn)return;const u=l.pivotValueColumn.getColId(),a=i.has(u)?i.get(u):[];a.push(l.colId),i.set(u,a)}};e.forEach(r=>{o(r,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const o=this.gos.get("pivotColumnGroupTotals")==="after",r=this.columnModel.getValueColumns(),n=r.map(s=>s.getAggFunc());if(!n||n.length<1||!this.sameAggFuncs(n))return;const i=r[0];e.forEach(s=>{this.recursivelyAddPivotTotal(s,t,i,o)})}recursivelyAddPivotTotal(e,t,o,r){const n=e;if(!n.children){const s=e;return s.colId?[s.colId]:null}let i=[];if(n.children.forEach(s=>{const l=this.recursivelyAddPivotTotal(s,t,o,r);l&&(i=i.concat(l))}),n.children.length>1){const l=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),u=this.createColDef(o,l,e.pivotKeys,!0);u.pivotTotalColumnIds=i,u.aggFunc=o.getAggFunc();const a=e.children;r?a.push(u):a.unshift(u),t.push(u)}return i}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const o=this.gos.get("pivotRowTotals")==="after",r=this.columnModel.getValueColumns(),n=o?r.slice():r.slice().reverse();for(let i=0;i<n.length;i++){const s=n[i];let l=[];e.forEach(a=>{l=l.concat(this.extractColIdsForValueColumn(a,s))});const u=n.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");this.createRowGroupTotal(e,t,s,l,o,u)}}extractColIdsForValueColumn(e,t){const o=e;if(!o.children){const n=o;return n.pivotValueColumn===t&&n.colId?[n.colId]:[]}let r=[];return o.children.forEach(n=>{this.extractColIdsForValueColumn(n,t);const i=this.extractColIdsForValueColumn(n,t);r=r.concat(i)}),r}createRowGroupTotal(e,t,o,r,n,i){const s=this.columnModel.getValueColumns();let l;if(s.length===0)l=this.createColDef(null,"-",[]);else{const a=this.columnModel.getDisplayNameForColumn(o,"header");l=this.createColDef(o,a,[]),l.pivotTotalColumnIds=r}l.colId=PivotColDefService.PIVOT_ROW_TOTAL_PREFIX+l.colId,t.push(l);const u=i?{children:[l],pivotKeys:[],groupId:`${PivotColDefService.PIVOT_ROW_TOTAL_PREFIX}_pivotGroup_${o.getColId()}`}:l;n?e.push(u):e.unshift(u)}createColDef(e,t,o,r=!1){const n={};if(e){const i=e.getColDef();Object.assign(n,i),n.hide=!1}return n.headerName=t,n.colId=this.generateColumnId(o||[],e&&!r?e.getColId():""),n.field=n.colId,n.valueGetter=i=>{var s;return(s=i.data)==null?void 0:s[i.colDef.field]},n.pivotKeys=o,n.pivotValueColumn=e,n.filter===!0&&(n.filter="agNumberColumnFilter"),n}sameAggFuncs(e){if(e.length==1)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}headerNameComparator(e,t,o){return e?e(t.headerName,o.headerName):t.headerName&&!o.headerName?1:!t.headerName&&o.headerName?-1:!t.headerName||!o.headerName?0:t.headerName<o.headerName?-1:t.headerName>o.headerName?1:0}merge(e,t){t.forEach((o,r,n)=>{const s=[...e.has(r)?e.get(r):[],...o];e.set(r,s)})}generateColumnGroupId(e){return`pivotGroup_${this.columnModel.getPivotColumns().map(o=>o.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${this.columnModel.getPivotColumns().map(r=>r.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let n=0;n<e.length;n++){const s=e[n].split(this.fieldSeparator);let l=t;for(let u=0;u<s.length;u++){const a=s[u];l[a]==null&&(l[a]={}),l=l[a]}}const o=(n,i,s,l)=>{var u;const a=[];for(let p in s){const f=s[p],m=o(`${n}${this.fieldSeparator}${p}`,p,f,l+1);a.push(m)}if(a.length===0){const p=this.columnModel.getPrimaryColumn(i);if(p){const m=(u=this.columnModel.getDisplayNameForColumn(p,"header"))!=null?u:i,h=this.createColDef(p,m,void 0,!1);return h.colId=n,h.aggFunc=p.getAggFunc(),h.valueGetter=C=>{var v;return(v=C.data)==null?void 0:v[n]},h}return{colId:n,headerName:i,valueGetter:m=>{var h;return(h=m.data)==null?void 0:h[n]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&a.length===1&&"colId"in a[0]?(a[0].headerName=i,a[0]):{openByDefault:this.pivotDefaultExpanded===-1||l<this.pivotDefaultExpanded,groupId:n,headerName:i,children:a}},r=[];for(let n in t){const i=t[n],s=o(n,n,i,0);r.push(s)}return r}};PivotColDefService.PIVOT_ROW_TOTAL_PREFIX="PivotRowTotal_",__decorateClass([(0,import_core3.Autowired)("columnModel")],PivotColDefService.prototype,"columnModel",2),__decorateClass([import_core3.PostConstruct],PivotColDefService.prototype,"init",1),PivotColDefService=__decorateClass([(0,import_core3.Bean)("pivotColDefService")],PivotColDefService);var import_core4=require("@ag-grid-community/core"),PivotStage=class extends import_core4.BeanStub{constructor(){super(...arguments),this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}execute(e){const t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)}executePivotOff(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.columnModel.isSecondaryColumnsPresent()&&(this.columnModel.setSecondaryColumns(null,"rowModelUpdated"),e&&e.setInactive())}executePivotOn(e){var t;const o=(t=this.columnModel.getValueColumns().length)!=null?t:1,r=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=r===-1?-1:r/o;let n;try{n=this.bucketUpRowNodes(e)}catch(g){if(g.message===PivotStage.EXCEEDED_MAX_UNIQUE_VALUES){this.columnModel.setSecondaryColumns([],"rowModelUpdated");const F={type:import_core4.Events.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED,message:g.message};this.eventService.dispatchEvent(F),this.lastTimeFailed=!0;return}throw g}const i=this.setUniqueValues(n),s=this.columnModel.getValueColumns(),l=s.map(g=>`${g.getId()}-${g.getColDef().headerName}`).join("#"),u=s.map(g=>g.getAggFunc().toString()).join("#"),a=this.aggregationColumnsHashLastTime!==l,c=this.aggregationFuncsHashLastTime!==u;this.aggregationColumnsHashLastTime=l,this.aggregationFuncsHashLastTime=u;const d=this.columnModel.getRowGroupColumns().map(g=>g.getId()).join("#"),p=d!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=d;const f=this.gos.get("pivotRowTotals"),m=this.gos.get("pivotColumnGroupTotals"),h=this.gos.get("suppressExpandablePivotGroups"),C=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),v=f!==this.pivotRowTotalsLastTime||m!==this.pivotColumnGroupTotalsLastTime||h!==this.suppressExpandablePivotGroupsLastTime||C!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=f,this.pivotColumnGroupTotalsLastTime=m,this.suppressExpandablePivotGroupsLastTime=h,this.removePivotHeaderRowWhenSingleValueColumnLastTime=C,this.lastTimeFailed||i||a||p||c||v){const{pivotColumnGroupDefs:g,pivotColumnDefs:F}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=F,this.columnModel.setSecondaryColumns(g,"rowModelUpdated"),e&&e.setInactive()}this.lastTimeFailed=!1}setUniqueValues(e){const t=JSON.stringify(e),o=JSON.stringify(this.uniqueValues);return t!==o?(this.uniqueValues=e,!0):!1}bucketUpRowNodes(e){this.currentUniqueCount=0;const t={};e.forEachChangedNodeDepthFirst(r=>{r.leafGroup&&(r.childrenMapped=null)});const o=r=>{var n;r.leafGroup?this.bucketRowNode(r,t):(n=r.childrenAfterFilter)==null||n.forEach(o)};return e.executeFromRootNode(o),t}bucketRowNode(e,t){const o=this.columnModel.getPivotColumns();o.length===0?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,o,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)}bucketChildren(e,t,o,r){const n={},i=t[o];if(e.forEach(s=>{let l=this.valueService.getKeyForNode(i,s);if(import_core4._.missing(l)&&(l=""),!r[l]){this.currentUniqueCount+=1,r[l]={};const u=this.maxUniqueValues!==-1,a=this.currentUniqueCount>this.maxUniqueValues;if(u&&a)throw Error(PivotStage.EXCEEDED_MAX_UNIQUE_VALUES)}n[l]||(n[l]=[]),n[l].push(s)}),o===t.length-1)return n;{const s={};return import_core4._.iterateObject(n,(l,u)=>{s[l]=this.bucketChildren(u,t,o+1,r[l])}),s}}getPivotColumnDefs(){return this.pivotColumnDefs}};PivotStage.EXCEEDED_MAX_UNIQUE_VALUES="Exceeded maximum allowed pivot column count.",__decorateClass([(0,import_core4.Autowired)("valueService")],PivotStage.prototype,"valueService",2),__decorateClass([(0,import_core4.Autowired)("columnModel")],PivotStage.prototype,"columnModel",2),__decorateClass([(0,import_core4.Autowired)("pivotColDefService")],PivotStage.prototype,"pivotColDefService",2),PivotStage=__decorateClass([(0,import_core4.Bean)("pivotStage")],PivotStage);var import_core5=require("@ag-grid-community/core"),defaultAggFuncNames={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},AggFuncService=class extends import_core5.BeanStub{constructor(){super(...arguments),this.aggFuncsMap={},this.initialised=!1}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){this.aggFuncsMap[AggFuncService.AGG_SUM]=aggSum,this.aggFuncsMap[AggFuncService.AGG_FIRST]=aggFirst,this.aggFuncsMap[AggFuncService.AGG_LAST]=aggLast,this.aggFuncsMap[AggFuncService.AGG_MIN]=aggMin,this.aggFuncsMap[AggFuncService.AGG_MAX]=aggMax,this.aggFuncsMap[AggFuncService.AGG_COUNT]=aggCount,this.aggFuncsMap[AggFuncService.AGG_AVG]=aggAvg,this.initialised=!0}isAggFuncPossible(e,t){const o=this.getFuncNames(e),r=import_core5._.includes(o,t),n=import_core5._.exists(this.aggFuncsMap[t]);return r&&n}getDefaultFuncLabel(e){var t;return(t=defaultAggFuncNames[e])!=null?t:e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(import_core5._.exists(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,AggFuncService.AGG_SUM))return AggFuncService.AGG_SUM;const o=this.getFuncNames(e);return import_core5._.existsAndNotEmpty(o)?o[0]:null}addAggFuncs(e){this.init(),import_core5._.iterateObject(e,(t,o)=>{this.aggFuncsMap[t]=o})}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return t??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};AggFuncService.AGG_SUM="sum",AggFuncService.AGG_FIRST="first",AggFuncService.AGG_LAST="last",AggFuncService.AGG_MIN="min",AggFuncService.AGG_MAX="max",AggFuncService.AGG_COUNT="count",AggFuncService.AGG_AVG="avg",__decorateClass([import_core5.PostConstruct],AggFuncService.prototype,"init",1),AggFuncService=__decorateClass([(0,import_core5.Bean)("aggFuncService")],AggFuncService);function aggSum(e){const{values:t}=e;let o=null;for(let r=0;r<t.length;r++){const n=t[r];typeof n=="number"?o===null?o=n:o+=typeof o=="number"?n:BigInt(n):typeof n=="bigint"&&(o===null?o=n:o=(typeof o=="bigint"?o:BigInt(o))+n)}return o}function aggFirst(e){return e.values.length>0?e.values[0]:null}function aggLast(e){return e.values.length>0?import_core5._.last(e.values):null}function aggMin(e){const{values:t}=e;let o=null;for(let r=0;r<t.length;r++){const n=t[r];(typeof n=="number"||typeof n=="bigint")&&(o===null||o>n)&&(o=n)}return o}function aggMax(e){const{values:t}=e;let o=null;for(let r=0;r<t.length;r++){const n=t[r];(typeof n=="number"||typeof n=="bigint")&&(o===null||o<n)&&(o=n)}return o}function aggCount(e){var t,o;const{values:r}=e;let n=0;for(let s=0;s<r.length;s++){const l=r[s];n+=l!=null&&typeof l.value=="number"?l.value:1}const i=(o=(t=e.rowNode)==null?void 0:t.aggData)==null?void 0:o[e.column.getColId()];return i&&i.value===n?i:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function aggAvg(e){var t,o,r;const{values:n}=e;let i=0,s=0;for(let a=0;a<n.length;a++){const c=n[a];let d=null;typeof c=="number"||typeof c=="bigint"?(d=c,s++):c!=null&&(typeof c.value=="number"||typeof c.value=="bigint")&&typeof c.count=="number"&&(d=c.value*(typeof c.value=="number"?c.count:BigInt(c.count)),s+=c.count),typeof d=="number"?i+=typeof i=="number"?d:BigInt(d):typeof d=="bigint"&&(i=(typeof i=="bigint"?i:BigInt(i))+d)}let l=null;s>0&&(l=i/(typeof i=="number"?s:BigInt(s)));const u=(r=(t=e.rowNode)==null?void 0:t.aggData)==null?void 0:r[(o=e.column)==null?void 0:o.getColId()];return u&&u.count===s&&u.value===l?u:{count:s,value:l,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var import_core10=require("@ag-grid-community/core"),import_core8=require("@ag-grid-community/core"),import_core7=require("@ag-grid-community/core"),import_core6=require("@ag-grid-community/core"),DropZoneColumnComp=class extends import_core6.PillDragComp{constructor(e,t,o,r,n){super(t,o,n,` | ||
var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of __getOwnPropNames(t))!__hasOwnProp.call(e,s)&&s!==o&&__defProp(e,s,{get:()=>t[s],enumerable:!(r=__getOwnPropDesc(t,s))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),main_exports={};__export(main_exports,{PivotDropZonePanel:()=>PivotDropZonePanel,RowGroupDropZonePanel:()=>RowGroupDropZonePanel,RowGroupingModule:()=>RowGroupingModule,ValuesDropZonePanel:()=>ValuesDropZonePanel}),module.exports=__toCommonJS(main_exports);var import_core19=require("@ag-grid-community/core"),import_core20=require("@ag-grid-enterprise/core"),import_core=require("@ag-grid-community/core"),defaultAggFuncNames={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},AggFuncService=class extends import_core.BeanStub{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const e=this.aggFuncsMap;e.sum=aggSum,e.first=aggFirst,e.last=aggLast,e.min=aggMin,e.max=aggMax,e.count=aggCount,e.avg=aggAvg,this.initialised=!0}isAggFuncPossible(e,t){const o=this.getFuncNames(e),r=(0,import_core._includes)(o,t),s=(0,import_core._exists)(this.aggFuncsMap[t]);return r&&s}getDefaultFuncLabel(e){return defaultAggFuncNames[e]??e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if((0,import_core._exists)(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";const o=this.getFuncNames(e);return(0,import_core._existsAndNotEmpty)(o)?o[0]:null}addAggFuncs(e){this.init(),(0,import_core._iterateObject)(e,(t,o)=>{this.aggFuncsMap[t]=o})}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return t??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function aggSum(e){const{values:t}=e;let o=null;for(let r=0;r<t.length;r++){const s=t[r];typeof s=="number"?o===null?o=s:o+=typeof o=="number"?s:BigInt(s):typeof s=="bigint"&&(o===null?o=s:o=(typeof o=="bigint"?o:BigInt(o))+s)}return o}function aggFirst(e){return e.values.length>0?e.values[0]:null}function aggLast(e){return e.values.length>0?(0,import_core._last)(e.values):null}function aggMin(e){const{values:t}=e;let o=null;for(let r=0;r<t.length;r++){const s=t[r];(typeof s=="number"||typeof s=="bigint")&&(o===null||o>s)&&(o=s)}return o}function aggMax(e){const{values:t}=e;let o=null;for(let r=0;r<t.length;r++){const s=t[r];(typeof s=="number"||typeof s=="bigint")&&(o===null||o<s)&&(o=s)}return o}function aggCount(e){const{values:t}=e;let o=0;for(let s=0;s<t.length;s++){const i=t[s];o+=i!=null&&typeof i.value=="number"?i.value:1}const r=e.rowNode?.aggData?.[e.column.getColId()];return r&&r.value===o?r:{value:o,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function aggAvg(e){const{values:t}=e;let o=0,r=0;for(let n=0;n<t.length;n++){const l=t[n];let a=null;typeof l=="number"||typeof l=="bigint"?(a=l,r++):l!=null&&(typeof l.value=="number"||typeof l.value=="bigint")&&typeof l.count=="number"&&(a=l.value*(typeof l.value=="number"?l.count:BigInt(l.count)),r+=l.count),typeof a=="number"?o+=typeof o=="number"?a:BigInt(a):typeof a=="bigint"&&(o=(typeof o=="bigint"?o:BigInt(o))+a)}let s=null;r>0&&(s=o/(typeof o=="number"?r:BigInt(r)));const i=e.rowNode?.aggData?.[e.column?.getColId()];return i&&i.count===r&&i.value===s?i:{count:r,value:s,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var import_core2=require("@ag-grid-community/core"),AggregationStage=class extends import_core2.BeanStub{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(e){this.columnModel=e.columnModel,this.aggFuncService=e.aggFuncService,this.funcColsService=e.funcColsService,this.pivotResultColsService=e.pivotResultColsService,this.valueService=e.valueService}execute(e){const t=(0,import_core2._missingOrEmpty)(this.funcColsService.getValueColumns()),o=!this.gos.getCallback("getGroupRowAgg"),r=e.changedPath&&e.changedPath.isActive();if(t&&o&&r)return;const s=this.createAggDetails(e);this.recursivelyCreateAggData(s)}createAggDetails(e){const t=this.columnModel.isPivotActive(),o=this.funcColsService.getValueColumns(),r=t?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!this.gos.getGrandTotalRow(),changedPath:e.changedPath,valueColumns:o,pivotColumns:r,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return this.gos.getGroupAggFiltering()!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){const t=o=>{if(!o.hasChildren()){o.aggData&&o.setAggData(null);return}if(o.level===-1&&!e.groupIncludeTotalFooter){const i=!this.columnModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&i){o.setAggData(null);return}}this.aggregateRowNode(o,e)};e.changedPath.forEachChangedNodeDepthFirst(t,!0)}aggregateRowNode(e,t){const o=t.valueColumns.length===0,r=t.pivotColumns.length===0;let s;t.userAggFunc?s=t.userAggFunc({nodes:e.childrenAfterFilter}):o?s=null:r?s=this.aggregateRowNodeUsingValuesOnly(e,t):s=this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(s),e.sibling&&e.sibling.setAggData(s)}aggregateRowNodeUsingValuesAndPivot(e){const t={},o=this.pivotResultColsService.getPivotResultCols()?.list??[];let r=!0;for(let s=0;s<o.length;s++){const i=o[s],n=i.getColDef();if(n.pivotTotalColumnIds!=null){r=!1;continue}const l=n.pivotKeys??[];let a;e.leafGroup?a=this.getValuesFromMappedSet(e.childrenMapped,l,n.pivotValueColumn):a=this.getValuesPivotNonLeaf(e,n.colId),t[n.colId]=this.aggregateValues(a,n.pivotValueColumn.getAggFunc(),n.pivotValueColumn,e,i)}if(!r)for(let s=0;s<o.length;s++){const i=o[s],n=i.getColDef();if(n.pivotTotalColumnIds==null||!n.pivotTotalColumnIds.length)continue;const l=n.pivotTotalColumnIds.map(a=>t[a]);t[n.colId]=this.aggregateValues(l,n.pivotValueColumn.getAggFunc(),n.pivotValueColumn,e,i)}return t}aggregateRowNodeUsingValuesOnly(e,t){const o={},r=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,s=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,i=this.getValuesNormal(e,r,t.filteredOnly),n=e.aggData;return r.forEach((l,a)=>{o[l.getId()]=this.aggregateValues(i[a],l.getAggFunc(),l,e)}),s&&n&&s.forEach(l=>{o[l.getId()]=n[l.getId()]}),o}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(o=>o.aggData[t])}getValuesFromMappedSet(e,t,o){let r=e;for(let s=0;s<t.length;s++){const i=t[s];r=r?r[i]:null}return r?r.map(s=>this.valueService.getValue(o,s)):[]}getValuesNormal(e,t,o){const r=[];t.forEach(()=>r.push([]));const s=t.length,i=o?e.childrenAfterFilter:e.childrenAfterGroup,n=i.length;for(let l=0;l<n;l++){const a=i[l];for(let u=0;u<s;u++){const c=t[u],h=this.valueService.getValue(c,a);r[u].push(h)}}return r}aggregateValues(e,t,o,r,s){const i=typeof t=="string"?this.aggFuncService.getAggFunc(t):t;if(typeof i!="function")return(0,import_core2._errorOnce)(`unrecognised aggregation function ${t}`),null;const n=i,l=this.gos.addGridCommonParams({values:e,column:o,colDef:o?o.getColDef():void 0,pivotResultColumn:s,rowNode:r,data:r?r.data:void 0});return n(l)}},import_core3=require("@ag-grid-community/core"),AutoColService=class extends import_core3.BeanStub{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(e){this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.columnFactory=e.columnFactory}createAutoCols(e){const t=[],o=this.gos.get("treeData");let r=this.gos.isGroupMultiAutoColumn();return o&&r&&((0,import_core3._warnOnce)('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),r=!1),r?e.forEach((s,i)=>{t.push(this.createOneAutoCol(s,i))}):t.push(this.createOneAutoCol()),t}updateAutoCols(e,t){e.forEach((o,r)=>this.updateOneAutoCol(o,r,t))}createOneAutoCol(e,t){let o;e?o=`${import_core3.GROUP_AUTO_COLUMN_ID}-${e.getId()}`:o=import_core3.GROUP_AUTO_COLUMN_ID;const r=this.createAutoColDef(o,e,t);r.colId=o;const s=new import_core3.AgColumn(r,null,o,!0);return this.createBean(s),s}updateOneAutoCol(e,t,o){const r=e.getColDef(),s=typeof r.showRowGroup=="string"?r.showRowGroup:void 0,i=s!=null?this.columnModel.getColDefCol(s):void 0,n=this.createAutoColDef(e.getId(),i??void 0,t);e.setColDef(n,null,o),this.columnFactory.applyColumnState(e,n,o)}createAutoColDef(e,t,o){let r=this.createBaseColDef(t);const s=this.gos.get("autoGroupColumnDef");(0,import_core3._mergeDeep)(r,s),r=this.columnFactory.addColumnDefaultAndTypes(r,e),this.gos.get("treeData")||(0,import_core3._missing)(r.field)&&(0,import_core3._missing)(r.valueGetter)&&(0,import_core3._missing)(r.filterValueGetter)&&r.filter!=="agGroupColumnFilter"&&(r.filter=!1),o&&o>0&&(r.headerCheckboxSelection=!1);const i=this.gos.isColumnsSortingCoupledToGroup(),n=r.valueGetter||r.field!=null;return i&&!n&&(r.sortIndex=void 0,r.initialSort=void 0),r}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),r={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(r.cellRenderer="agGroupCellRenderer"),e){const i=e.getColDef();Object.assign(r,{headerName:this.columnNameService.getDisplayNameForColumn(e,"header"),headerValueGetter:i.headerValueGetter}),i.cellRenderer&&Object.assign(r,{cellRendererParams:{innerRenderer:i.cellRenderer,innerRendererParams:i.cellRendererParams}}),r.showRowGroup=e.getColId()}else r.showRowGroup=!0;return r}},import_core11=require("@ag-grid-community/core"),import_core10=require("@ag-grid-community/core"),import_core8=require("@ag-grid-community/core"),import_core6=require("@ag-grid-community/core"),import_core7=require("@ag-grid-enterprise/core"),import_core4=require("@ag-grid-community/core"),import_core5=require("@ag-grid-enterprise/core"),DropZoneColumnComp=class extends import_core5.PillDragComp{constructor(e,t,o,r,s){super(t,o,s,` | ||
<span role="option"> | ||
<span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span> | ||
<span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span> | ||
<ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator> | ||
<span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span> | ||
<span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span> | ||
<span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span> | ||
<ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator> | ||
<span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span> | ||
</span> | ||
`),this.column=e,this.dropZonePurpose=r,this.popupShowing=!1}init(){this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnDrop"),super.init(),this.setupSort(),this.addManagedListener(this.eventService,import_core6.Column.EVENT_SORT_CHANGED,()=>{this.setupAria()}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(e,t){const o=this.gos.get("rowGroupPanelSuppressSort"),r=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!r){const n=t("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");e.push(n)}if(this.isGroupingZone()&&this.column.isSortable()&&!o){const n=t("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");e.push(n)}super.addAdditionalAriaInstructions(e,t)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const e=this.localeService.getLocaleTextFunc(),{name:t,aggFuncName:o}=this.getColumnAndAggFuncName(),r=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),n={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},i=this.column.getSort(),s=this.gos.get("rowGroupPanelSuppressSort");return[o&&`${o}${r}`,t,this.isGroupingZone()&&!s&&i&&`, ${n[i]}`].filter(l=>!!l).join("")}getColumnAndAggFuncName(){const e=this.displayName;let t="";if(this.isAggregationZone()){const o=this.column.getAggFunc(),r=typeof o=="string"?o:"agg";t=this.localeService.getLocaleTextFunc()(r,r)}return{name:e,aggFuncName:t}}setupSort(){const e=this.column.isSortable(),t=this.isGroupingZone();if(!(!e||!t)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const o=r=>{r.preventDefault();const i=this.gos.get("multiSortKey")==="ctrl"?r.ctrlKey||r.metaKey:r.shiftKey;this.sortController.progressSort(this.column,i,"uiColumnSorted")};this.addGuiEventListener("click",o),this.addGuiEventListener("keydown",r=>{r.key===import_core6.KeyCode.ENTER&&this.isGroupingZone()&&o(r)})}}getDefaultIconName(){return import_core6.DragAndDropService.ICON_HIDE}createGetDragItem(){const{column:e}=this;return()=>{const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(e){super.onKeyDown(e),e.key===import_core6.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(e.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:e,aggFuncName:t}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${t}(${e})`:e}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const e=new import_core6.VirtualList({cssIdentifier:"select-agg-func"}),t=this.aggFuncService.getFuncNames(this.column),o=this.getGui(),r=e.getGui();e.setModel({getRow:function(c){return t[c]},getRowCount:function(){return t.length}}),this.getContext().createBean(e);const n=import_core6._.loadTemplate('<div class="ag-select-agg-func-popup"></div>');n.style.top="0px",n.style.left="0px",n.appendChild(r),n.style.width=`${o.clientWidth}px`;const i=this.addManagedListener(n,"focusout",c=>{!n.contains(c.relatedTarget)&&u&&u.hideFunc()}),s=c=>{this.destroyBean(e),this.popupShowing=!1,c?.key==="Escape"&&o.focus(),i&&i()},l=this.localeService.getLocaleTextFunc(),u=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,closedCallback:s,ariaLabel:l("ariaLabelAggregationFunction","Aggregation Function")});u&&e.setComponentCreator(this.createAggSelect.bind(this,u.hideFunc)),e.addGuiEventListener("keydown",c=>{if(c.key===import_core6.KeyCode.ENTER||c.key===import_core6.KeyCode.SPACE){const d=e.getLastFocusedRow();if(d==null)return;const p=e.getComponentAt(d);p&&p.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:o,ePopup:n,keepWithinBounds:!0,column:this.column,position:"under"}),e.refresh();let a=t.findIndex(c=>c===this.column.getAggFunc());a===-1&&(a=0),e.focusRow(a)}createAggSelect(e,t){const o=()=>{if(e(),this.gos.get("functionsPassive")){const l={type:import_core6.Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,columns:[this.column],aggFunc:t};this.eventService.dispatchEvent(l)}else this.columnModel.setColumnAggFunc(this.column,t,"toolPanelDragAndDrop")},r=this.localeService.getLocaleTextFunc(),n=t.toString(),i=r(n,n);return new AggItemComp(o,i)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColumnGroupingLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return import_core6.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}};__decorateClass([(0,import_core6.Autowired)("popupService")],DropZoneColumnComp.prototype,"popupService",2),__decorateClass([(0,import_core6.Autowired)("sortController")],DropZoneColumnComp.prototype,"sortController",2),__decorateClass([(0,import_core6.Autowired)("columnModel")],DropZoneColumnComp.prototype,"columnModel",2),__decorateClass([(0,import_core6.Optional)("aggFuncService")],DropZoneColumnComp.prototype,"aggFuncService",2),__decorateClass([(0,import_core6.RefSelector)("eSortIndicator")],DropZoneColumnComp.prototype,"eSortIndicator",2);var AggItemComp=class extends import_core6.Component{constructor(e,t){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=e,this.getGui().innerText=t,this.addGuiEventListener("click",this.selectItem)}},BaseDropZonePanel=class extends import_core7.PillDropZonePanel{constructor(e,t){super(e),this.dropZonePurpose=t}init(e){super.init(e),this.addManagedListener(this.eventService,import_core7.Events.EVENT_NEW_COLUMNS_LOADED,this.refreshGui.bind(this)),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(e){var t;return(t=e.columns)!=null?t:[]}isInterestedIn(e){return e===import_core7.DragSourceType.HeaderCell||e===import_core7.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const e=this.gos.get("groupLockGroupColumns"),t=this.columnModel.getRowGroupColumns().length;return e===-1?t:Math.min(e,t)}showOrHideColumnOnExit(e){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!e.fromNudge}handleDragEnterEnd(e){if(this.showOrHideColumnOnExit(e)){const r=e.dragSource.getDragItem().columns;this.setColumnsVisible(r,!1,"uiColumnDragged")}}handleDragLeaveEnd(e){if(this.showOrHideColumnOnExit(e)){const o=e.dragSource.getDragItem();this.setColumnsVisible(o.columns,!0,"uiColumnDragged")}}setColumnsVisible(e,t,o){if(e){const r=e.filter(n=>!n.getColDef().lockVisible);this.columnModel.setColumnsVisible(r,t,o)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}refreshOnDragStop(){return!this.gos.get("functionsPassive")}createPillComponent(e,t,o,r){return new DropZoneColumnComp(e,t,o,this.dropZonePurpose,r)}};__decorateClass([(0,import_core7.Autowired)("columnModel")],BaseDropZonePanel.prototype,"columnModel",2);var RowGroupDropZonePanel=class extends BaseDropZonePanel{constructor(e){super(e,"rowGroup")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("rowGroupColumnsEmptyMessage","Drag here to set row groups"),o=e("groups","Row Groups");super.init({icon:import_core8._.createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:t,title:o}),this.addManagedListener(this.eventService,import_core8.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.refreshGui.bind(this))}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const e=super.getTooltipParams();return e.location="rowGroupColumnsList",e}isItemDroppable(e,t){return this.gos.get("functionsReadOnly")||!e.isPrimary()?!1:e.isAllowRowGroup()&&(!e.isRowGroupActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:import_core8.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setRowGroupColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?import_core8.DragAndDropService.ICON_GROUP:import_core8.DragAndDropService.ICON_NOT_ALLOWED}getExistingItems(){return this.columnModel.getRowGroupColumns()}};__decorateClass([import_core8.PostConstruct],RowGroupDropZonePanel.prototype,"passBeansUp",1);var import_core9=require("@ag-grid-community/core"),PivotDropZonePanel=class extends BaseDropZonePanel{constructor(e){super(e,"pivot")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("pivotColumnsEmptyMessage","Drag here to set column labels"),o=e("pivots","Column Labels");super.init({icon:import_core9._.createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:t,title:o}),this.addManagedListener(this.eventService,import_core9.Events.EVENT_NEW_COLUMNS_LOADED,this.refresh.bind(this)),this.addManagedListener(this.eventService,import_core9.Events.EVENT_COLUMN_PIVOT_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,import_core9.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.checkVisibility.bind(this)),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const e=super.getTooltipParams();return e.location="pivotColumnsList",e}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":const t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break;default:this.setDisplayed(!1);break}else this.setDisplayed(e)}isItemDroppable(e,t){return this.gos.get("functionsReadOnly")||!e.isPrimary()?!1:e.isAllowPivot()&&(!e.isPivotActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:import_core9.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setPivotColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?import_core9.DragAndDropService.ICON_PIVOT:import_core9.DragAndDropService.ICON_NOT_ALLOWED}getExistingItems(){return this.columnModel.getPivotColumns()}};__decorateClass([import_core9.PostConstruct],PivotDropZonePanel.prototype,"passBeansUp",1);var GridHeaderDropZones=class extends import_core10.Component{constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel()),this.addManagedListener(this.eventService,import_core10.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onRowGroupChanged()),this.addManagedListener(this.eventService,import_core10.Events.EVENT_NEW_COLUMNS_LOADED,()=>this.onRowGroupChanged()),this.addManagedPropertyListener("rowGroupPanelShow",()=>this.onRowGroupChanged()),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const e=document.createElement("div");return e.classList.add("ag-column-drop-wrapper"),import_core10._.setAriaRole(e,"presentation"),this.rowGroupComp=new RowGroupDropZonePanel(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new PivotDropZonePanel(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui()),this.addManagedListener(this.rowGroupComp,import_core10.Component.EVENT_DISPLAYED_CHANGED,()=>this.onDropPanelVisible()),this.addManagedListener(this.pivotComp,import_core10.Component.EVENT_DISPLAYED_CHANGED,()=>this.onDropPanelVisible()),this.onDropPanelVisible(),e}onDropPanelVisible(){const e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed();this.rowGroupComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e),this.pivotComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e)}onRowGroupChanged(){if(!this.rowGroupComp)return;const e=this.gos.get("rowGroupPanelShow");if(e==="always")this.rowGroupComp.setDisplayed(!0);else if(e==="onlyWhenGrouping"){const t=!this.columnModel.isRowGroupEmpty();this.rowGroupComp.setDisplayed(t)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const e=this.gos.get("pivotPanelShow");if(e==="always")this.pivotComp.setDisplayed(!0);else if(e==="onlyWhenPivoting"){const t=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(t)}else this.pivotComp.setDisplayed(!1)}};__decorateClass([(0,import_core10.Autowired)("columnModel")],GridHeaderDropZones.prototype,"columnModel",2),__decorateClass([import_core10.PostConstruct],GridHeaderDropZones.prototype,"postConstruct",1);var import_core11=require("@ag-grid-community/core"),FilterAggregatesStage=class extends import_core11.BeanStub{execute(e){const t=this.columnModel.isPivotMode(),o=this.filterManager.isAggregateFilterPresent()||this.filterManager.isAggregateQuickFilterPresent(),r=a=>!a.node.group,n=a=>a.node.leafGroup,i=this.gos.getGroupAggFiltering()||(t?n:r),{changedPath:s}=e,l=(a,c=!1)=>{a.childrenAfterFilter&&(a.childrenAfterAggFilter=a.childrenAfterFilter,c&&a.childrenAfterAggFilter.forEach(d=>l(d,c)),this.setAllChildrenCount(a)),a.sibling&&(a.sibling.childrenAfterAggFilter=a.childrenAfterAggFilter)},u=a=>{var c;a.childrenAfterAggFilter=((c=a.childrenAfterFilter)==null?void 0:c.filter(d=>{var p;return i({node:d})&&this.filterManager.doesRowPassAggregateFilters({rowNode:d})?(l(d,!0),!0):(p=d.childrenAfterAggFilter)==null?void 0:p.length}))||null,this.setAllChildrenCount(a),a.sibling&&(a.sibling.childrenAfterAggFilter=a.childrenAfterAggFilter)};s.forEachChangedNodeDepthFirst(o?u:l,!0)}setAllChildrenCountTreeData(e){let t=0;e.childrenAfterAggFilter.forEach(o=>{t++,t+=o.allChildrenCount}),e.setAllChildrenCount(t)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(o=>{o.group?t+=o.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){if(!e.hasChildren()){e.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)}};__decorateClass([(0,import_core11.Autowired)("filterManager")],FilterAggregatesStage.prototype,"filterManager",2),__decorateClass([(0,import_core11.Autowired)("columnModel")],FilterAggregatesStage.prototype,"columnModel",2),FilterAggregatesStage=__decorateClass([(0,import_core11.Bean)("filterAggregatesStage")],FilterAggregatesStage);var VERSION="31.3.2",import_core12=require("@ag-grid-community/core"),_GroupFilter=class G extends import_core12.TabGuardComp{constructor(){super(` | ||
`,[import_core4.SortIndicatorSelector]),this.column=e,this.dropZonePurpose=r,this.eSortIndicator=import_core4.RefPlaceholder,this.popupShowing=!1}wireBeans(e){super.wireBeans(e),this.popupService=e.popupService,this.sortController=e.sortController,this.columnModel=e.columnModel,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService,this.aggFuncService=e.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(e,t){const o=this.gos.get("rowGroupPanelSuppressSort"),r=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!r){const s=t("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");e.push(s)}if(this.isGroupingZone()&&this.column.isSortable()&&!o){const s=t("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");e.push(s)}super.addAdditionalAriaInstructions(e,t)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const e=this.localeService.getLocaleTextFunc(),{name:t,aggFuncName:o}=this.getColumnAndAggFuncName(),r=e("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},i=this.column.getSort(),n=this.gos.get("rowGroupPanelSuppressSort");return[o&&`${o}${r}`,t,this.isGroupingZone()&&!n&&i&&`, ${s[i]}`].filter(l=>!!l).join("")}getColumnAndAggFuncName(){const e=this.displayName;let t="";if(this.isAggregationZone()){const o=this.column.getAggFunc(),r=typeof o=="string"?o:"agg";t=this.localeService.getLocaleTextFunc()(r,r)}return{name:e,aggFuncName:t}}setupSort(){const e=this.column.isSortable(),t=this.isGroupingZone();if(!(!e||!t)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const o=r=>{r.preventDefault();const i=this.gos.get("multiSortKey")==="ctrl"?r.ctrlKey||r.metaKey:r.shiftKey;this.sortController.progressSort(this.column,i,"uiColumnSorted")};this.addGuiEventListener("click",o),this.addGuiEventListener("keydown",r=>{r.key===import_core4.KeyCode.ENTER&&this.isGroupingZone()&&o(r)})}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:e}=this;return()=>{const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(e){super.onKeyDown(e),e.key===import_core4.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(e.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:e,aggFuncName:t}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${t}(${e})`:e}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const e=new import_core5.VirtualList({cssIdentifier:"select-agg-func"}),t=this.aggFuncService.getFuncNames(this.column),o=this.getGui(),r=e.getGui();e.setModel({getRow:function(c){return t[c]},getRowCount:function(){return t.length}}),this.createBean(e);const s=(0,import_core4._loadTemplate)('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(r),s.style.width=`${o.clientWidth}px`;const[i]=this.addManagedElementListeners(s,{focusout:c=>{!s.contains(c.relatedTarget)&&a&&a.hideFunc()}}),n=c=>{this.destroyBean(e),this.popupShowing=!1,c?.key==="Escape"&&o.focus(),i&&i()},l=this.localeService.getLocaleTextFunc(),a=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:n,ariaLabel:l("ariaLabelAggregationFunction","Aggregation Function")});a&&e.setComponentCreator(this.createAggSelect.bind(this,a.hideFunc)),e.addGuiEventListener("keydown",c=>{if(c.key===import_core4.KeyCode.ENTER||c.key===import_core4.KeyCode.SPACE){const h=e.getLastFocusedRow();if(h==null)return;const g=e.getComponentAt(h);g&&g.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:o,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),e.refresh();let u=t.findIndex(c=>c===this.column.getAggFunc());u===-1&&(u=0),e.focusRow(u)}createAggSelect(e,t){const o=()=>{e(),this.funcColsService.setColumnAggFunc(this.column,t,"toolPanelDragAndDrop")},r=this.localeService.getLocaleTextFunc(),s=t.toString(),i=r(s,s);return new AggItemComp(o,i)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return import_core4.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},AggItemComp=class extends import_core4.Component{constructor(e,t){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=e,this.getGui().innerText=t,this.addGuiEventListener("click",this.selectItem)}},BaseDropZonePanel=class extends import_core7.PillDropZonePanel{constructor(e,t){super(e),this.dropZonePurpose=t}wireBeans(e){super.wireBeans(e),this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}init(e){super.init(e),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(e){return e.columns??[]}isInterestedIn(e){return e===import_core6.DragSourceType.HeaderCell||e===import_core6.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const e=this.gos.get("groupLockGroupColumns"),t=this.funcColsService.getRowGroupColumns().length;return e===-1?t:Math.min(e,t)}showOrHideColumnOnExit(e){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!e.fromNudge}handleDragEnterEnd(e){if(this.showOrHideColumnOnExit(e)){const r=e.dragSource.getDragItem().columns;this.setColumnsVisible(r,!1,"uiColumnDragged")}}handleDragLeaveEnd(e){if(this.showOrHideColumnOnExit(e)){const o=e.dragSource.getDragItem();this.setColumnsVisible(o.columns,!0,"uiColumnDragged")}}setColumnsVisible(e,t,o){if(e){const r=e.filter(s=>!s.getColDef().lockVisible);this.columnModel.setColsVisible(r,t,o)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(e,t,o,r){return new DropZoneColumnComp(e,t,o,this.dropZonePurpose,r)}},PivotDropZonePanel=class extends BaseDropZonePanel{constructor(e){super(e,"pivot")}postConstruct(){const e=this.localeService.getLocaleTextFunc(),t=e("pivotColumnsEmptyMessage","Drag here to set column labels"),o=e("pivots","Column Labels");super.init({icon:(0,import_core8._createIconNoSpan)("pivotPanel",this.gos,null),emptyMessage:t,title:o}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const e=super.getTooltipParams();return e.location="pivotColumnsList",e}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":{const t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break}default:this.setDisplayed(!1);break}else this.setDisplayed(e)}isItemDroppable(e,t){return this.gos.get("functionsReadOnly")||!e.isPrimary()?!1:e.isAllowPivot()&&(!e.isPivotActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setPivotColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},import_core9=require("@ag-grid-community/core"),RowGroupDropZonePanel=class extends BaseDropZonePanel{constructor(e){super(e,"rowGroup")}postConstruct(){const e=this.localeService.getLocaleTextFunc(),t=e("rowGroupColumnsEmptyMessage","Drag here to set row groups"),o=e("groups","Row Groups");super.init({icon:(0,import_core9._createIconNoSpan)("rowGroupPanel",this.gos,null),emptyMessage:t,title:o}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const e=super.getTooltipParams();return e.location="rowGroupColumnsList",e}isItemDroppable(e,t){return this.gos.get("functionsReadOnly")||!e.isPrimary()?!1:e.isAllowRowGroup()&&(!e.isRowGroupActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setRowGroupColumns(e,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},AgGridHeaderDropZones=class extends import_core10.Component{wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const e=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:e,newColumnsLoaded:e}),this.addManagedPropertyListener("rowGroupPanelShow",e),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const e=document.createElement("div");e.classList.add("ag-column-drop-wrapper"),(0,import_core10._setAriaRole)(e,"presentation"),this.rowGroupComp=new RowGroupDropZonePanel(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new PivotDropZonePanel(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui());const t=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:t}),this.addManagedListeners(this.pivotComp,{displayChanged:t}),this.onDropPanelVisible(),e}onDropPanelVisible(){const e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),t="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(t,e),this.pivotComp.addOrRemoveCssClass(t,e)}onRowGroupChanged(){if(!this.rowGroupComp)return;const e=this.gos.get("rowGroupPanelShow");if(e==="always")this.rowGroupComp.setDisplayed(!0);else if(e==="onlyWhenGrouping"){const t=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(t)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const e=this.gos.get("pivotPanelShow");if(e==="always")this.pivotComp.setDisplayed(!0);else if(e==="onlyWhenPivoting"){const t=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(t)}else this.pivotComp.setDisplayed(!1)}},AgGridHeaderDropZonesSelector={selector:"AG-GRID-HEADER-DROP-ZONES",component:AgGridHeaderDropZones},ColumnDropZoneService=class extends import_core11.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return AgGridHeaderDropZonesSelector}},import_core12=require("@ag-grid-community/core"),FilterAggregatesStage=class extends import_core12.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(e){this.filterManager=e.filterManager,this.columnModel=e.columnModel}execute(e){const t=this.columnModel.isPivotMode(),o=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),r=u=>!u.node.group,s=u=>u.node.leafGroup,i=this.gos.getGroupAggFiltering()||(t?s:r),{changedPath:n}=e,l=(u,c=!1)=>{u.childrenAfterFilter&&(u.childrenAfterAggFilter=u.childrenAfterFilter,c&&u.childrenAfterAggFilter.forEach(h=>l(h,c)),this.setAllChildrenCount(u)),u.sibling&&(u.sibling.childrenAfterAggFilter=u.childrenAfterAggFilter)},a=u=>{u.childrenAfterAggFilter=u.childrenAfterFilter?.filter(c=>i({node:c})&&this.filterManager.doesRowPassAggregateFilters({rowNode:c})?(l(c,!0),!0):c.childrenAfterAggFilter?.length)||null,this.setAllChildrenCount(u),u.sibling&&(u.sibling.childrenAfterAggFilter=u.childrenAfterAggFilter)};n.forEachChangedNodeDepthFirst(o?a:l,!0)}setAllChildrenCountTreeData(e){let t=0;e.childrenAfterAggFilter.forEach(o=>{t++,t+=o.allChildrenCount}),e.setAllChildrenCount(t)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(o=>{o.group?t+=o.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){if(!e.hasChildren()){e.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)}},import_core13=require("@ag-grid-community/core"),GroupFilter=class extends import_core13.TabGuardComp{constructor(){super(` | ||
<div class="ag-group-filter"> | ||
<div ref="eGroupField"></div> | ||
<div ref="eUnderlyingFilter"></div> | ||
<div data-ref="eGroupField"></div> | ||
<div data-ref="eUnderlyingFilter"></div> | ||
</div> | ||
`)}postConstruct(){this.initialiseTabGuard({})}init(t){return this.params=t,this.validateParams(),this.updateGroups().then(()=>{this.addManagedListener(this.eventService,import_core12.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onColumnRowGroupChanged())})}validateParams(){const{colDef:t}=this.params;t.field&&import_core12._.warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&import_core12._.warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&import_core12._.warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const t=this.updateGroupField();return this.getUnderlyingFilters(t)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return import_core12._.warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const t=this.columnModel.getSourceColumnsForGroupColumn(this.groupColumn);return t||(import_core12._.warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){import_core12._.clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const t=this.getSourceColumns(),o=t.filter(r=>r.isFilterAllowed());return o.length?(t.length===1?(this.selectedColumn=o[0],import_core12._.setDisplayed(this.eGroupField,!1)):((!this.selectedColumn||!o.some(r=>r.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=o[0]),this.createGroupFieldSelectElement(o),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(import_core12._.loadTemplate('<div class="ag-filter-separator"></div>')),import_core12._.setDisplayed(this.eGroupField,!0)),o):(this.selectedColumn=void 0,import_core12._.setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new import_core12.AgSelect);const o=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(o("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(t.map(r=>{var n;return{value:r.getId(),text:(n=this.columnModel.getDisplayNameForColumn(r,"groupFilter",!1))!=null?n:void 0}})),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(r=>this.updateSelectedColumn(r)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),t.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(t){if(!t)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),import_core12.AgPromise.resolve();const o=[],r=[];return t.forEach(n=>{const i=this.filterManager.getOrCreateFilterWrapper(n,"COLUMN_MENU");i?.filterPromise&&o.push(i.filterPromise.then(s=>(s&&r.push({filter:s,column:n}),n.getId()===this.selectedColumn.getId()&&(this.selectedFilter=s??void 0),s)))}),import_core12.AgPromise.all(o).then(()=>{this.filterColumnPairs=r,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var t,o;if(import_core12._.clearElement(this.eUnderlyingFilter),!this.selectedColumn)return import_core12.AgPromise.resolve();const r=this.createManagedBean(new import_core12.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=r,r.hasFilter()?(this.eUnderlyingFilter.appendChild(r.getGui()),(o=(t=r.getFilter())==null?void 0:t.then(()=>{var n,i;(n=r.afterGuiAttached)==null||n.call(r,this.afterGuiAttachedParams),!((i=this.afterGuiAttachedParams)!=null&&i.suppressFocus)&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()}))!=null?o:import_core12.AgPromise.resolve()):import_core12.AgPromise.resolve()}updateSelectedColumn(t){var o;if(!t)return;(o=this.filterWrapperComp)==null||o.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const r=this.getFilterColumnPair(t);this.selectedColumn=r?.column,this.selectedFilter=r?.filter,this.dispatchEvent({type:G.EVENT_SELECTED_COLUMN_CHANGED}),this.addUnderlyingFilterElement()}isFilterActive(){var t;return!!((t=this.filterColumnPairs)!=null&&t.some(({filter:o})=>o.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return import_core12.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,o;import_core12._.clearElement(this.eUnderlyingFilter),(o=(t=this.selectedFilter)==null?void 0:t.afterGuiDetached)==null||o.call(t)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchEvent({type:G.EVENT_COLUMN_ROW_GROUP_CHANGED}),this.eventService.dispatchEvent({type:"filterAllowedUpdated"})})}getFilterColumnPair(t){var o;if(t)return(o=this.filterColumnPairs)==null?void 0:o.find(({column:r})=>r.getId()===t)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}};_GroupFilter.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",_GroupFilter.EVENT_SELECTED_COLUMN_CHANGED="selectedColumnChanged",__decorateClass([(0,import_core12.Autowired)("filterManager")],_GroupFilter.prototype,"filterManager",2),__decorateClass([(0,import_core12.Autowired)("columnModel")],_GroupFilter.prototype,"columnModel",2),__decorateClass([(0,import_core12.RefSelector)("eGroupField")],_GroupFilter.prototype,"eGroupField",2),__decorateClass([(0,import_core12.RefSelector)("eUnderlyingFilter")],_GroupFilter.prototype,"eUnderlyingFilter",2),__decorateClass([import_core12.PostConstruct],_GroupFilter.prototype,"postConstruct",1);var GroupFilter=_GroupFilter,import_core13=require("@ag-grid-community/core"),GroupFloatingFilterComp=class extends import_core13.Component{constructor(){super(` | ||
<div ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div> | ||
`),this.haveAddedColumnListeners=!1}init(e){this.params=e;const t=this.gos.get("groupDisplayType")==="multipleColumns";return new import_core13.AgPromise(o=>{this.params.parentFilterInstance(r=>{this.parentFilterInstance=r,t?this.setupUnderlyingFloatingFilterElement().then(()=>o()):(this.setupReadOnlyFloatingFilterElement(),o())})}).then(()=>{this.addManagedListener(this.parentFilterInstance,GroupFilter.EVENT_SELECTED_COLUMN_CHANGED,()=>this.onSelectedColumnChanged()),this.addManagedListener(this.parentFilterInstance,GroupFilter.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onColumnRowGroupChanged())})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams()}setParams(){var e;const t=this.columnModel.getDisplayNameForColumn(this.params.column,"header",!0),o=this.localeService.getLocaleTextFunc();(e=this.eFloatingFilterText)==null||e.setInputAriaLabel(`${t} ${o("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new import_core13.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,import_core13._.clearElement(this.eFloatingFilter);const e=this.parentFilterInstance.getSelectedColumn();if(e&&!e.isVisible()){const t=this.filterManager.getFloatingFilterCompDetails(e,this.params.showParentFilter);if(t)return this.compDetails=t,this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListener(e,import_core13.Column.EVENT_VISIBLE_CHANGED,this.onColumnVisibleChanged.bind(this)),this.addManagedListener(e,import_core13.Column.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))),t.newAgStackInstance().then(o=>{var r,n;this.underlyingFloatingFilter=o,(n=this.underlyingFloatingFilter)==null||n.onParentModelChanged((r=this.parentFilterInstance.getSelectedFilter())==null?void 0:r.getModel()),this.appendChild(o.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),import_core13.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(e){var t,o,r;if(!e.column)return;const n=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);n&&((t=this.underlyingFloatingFilter)!=null&&t.refresh?this.underlyingFloatingFilter.refresh(n.params):(r=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||r.call(o,n.params))}onParentModelChanged(e,t){var o,r;this.showingUnderlyingFloatingFilter?(r=this.underlyingFloatingFilter)==null||r.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel(),t):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const e=this.parentFilterInstance.getSelectedFilter();if(!e){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){const t=e.getModel();this.eFloatingFilterText.setValue(t==null?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}};__decorateClass([(0,import_core13.Autowired)("columnModel")],GroupFloatingFilterComp.prototype,"columnModel",2),__decorateClass([(0,import_core13.Autowired)("filterManager")],GroupFloatingFilterComp.prototype,"filterManager",2),__decorateClass([(0,import_core13.RefSelector)("eFloatingFilter")],GroupFloatingFilterComp.prototype,"eFloatingFilter",2);var RowGroupingModule={version:VERSION,moduleName:import_core14.ModuleNames.RowGroupingModule,beans:[AggregationStage,FilterAggregatesStage,GroupStage,PivotColDefService,PivotStage,AggFuncService],agStackComponents:[{componentName:"AgGridHeaderDropZones",componentClass:GridHeaderDropZones}],userComponents:[{componentName:"agGroupColumnFilter",componentClass:GroupFilter},{componentName:"agGroupColumnFloatingFilter",componentClass:GroupFloatingFilterComp}],dependantModules:[import_core15.EnterpriseCoreModule]},import_core16=require("@ag-grid-community/core"),ValuesDropZonePanel=class extends BaseDropZonePanel{constructor(e){super(e,"aggregation")}passBeansUp(){const e=this.localeService.getLocaleTextFunc(),t=e("valueColumnsEmptyMessage","Drag here to aggregate"),o=e("values","Values");super.init({icon:import_core16._.createIconNoSpan("valuePanel",this.gos,null),emptyMessage:t,title:o}),this.addManagedListener(this.eventService,import_core16.Events.EVENT_COLUMN_VALUE_CHANGED,this.refreshGui.bind(this))}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const e=super.getTooltipParams();return e.location="valueColumnsList",e}getIconName(){return this.isPotentialDndItems()?import_core16.DragAndDropService.ICON_AGGREGATE:import_core16.DragAndDropService.ICON_NOT_ALLOWED}isItemDroppable(e,t){return this.gos.get("functionsReadOnly")||!e.isPrimary()?!1:e.isAllowValue()&&(!e.isValueActive()||this.isSourceEventFromTarget(t))}updateItems(e){if(this.gos.get("functionsPassive")){const t={type:import_core16.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setValueColumns(e,"toolPanelUi")}getExistingItems(){return this.columnModel.getValueColumns()}};__decorateClass([import_core16.PostConstruct],ValuesDropZonePanel.prototype,"passBeansUp",1); | ||
`),this.eGroupField=import_core13.RefPlaceholder,this.eUnderlyingFilter=import_core13.RefPlaceholder}wireBeans(e){this.filterManager=e.filterManager,this.columnNameService=e.columnNameService,this.funcColsService=e.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(e){return this.params=e,this.validateParams(),this.updateGroups().then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged()})})}validateParams(){const{colDef:e}=this.params;e.field&&(0,import_core13._warnOnce)('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),e.filterValueGetter&&(0,import_core13._warnOnce)('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),e.filterParams&&(0,import_core13._warnOnce)('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const e=this.updateGroupField();return this.getUnderlyingFilters(e)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return(0,import_core13._warnOnce)("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const e=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return e||((0,import_core13._warnOnce)("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){(0,import_core13._clearElement)(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const e=this.getSourceColumns(),t=e.filter(o=>o.isFilterAllowed());return t.length?(e.length===1?(this.selectedColumn=t[0],(0,import_core13._setDisplayed)(this.eGroupField,!1)):((!this.selectedColumn||!t.some(o=>o.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=t[0]),this.createGroupFieldSelectElement(t),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild((0,import_core13._loadTemplate)('<div class="ag-filter-separator"></div>')),(0,import_core13._setDisplayed)(this.eGroupField,!0)),t):(this.selectedColumn=void 0,(0,import_core13._setDisplayed)(this.eGroupField,!1),null)}createGroupFieldSelectElement(e){this.eGroupFieldSelect=this.createManagedBean(new import_core13.AgSelect);const t=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(t("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map(o=>({value:o.getId(),text:this.columnNameService.getDisplayNameForColumn(o,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(o=>this.updateSelectedColumn(o)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),e.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(e){if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),import_core13.AgPromise.resolve();const t=[],o=[];return e.forEach(r=>{const s=this.filterManager.getOrCreateFilterWrapper(r);s?.filterPromise&&t.push(s.filterPromise.then(i=>(i&&o.push({filter:i,column:r}),r.getId()===this.selectedColumn.getId()&&(this.selectedFilter=i??void 0),i)))}),import_core13.AgPromise.all(t).then(()=>{this.filterColumnPairs=o,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){if((0,import_core13._clearElement)(this.eUnderlyingFilter),!this.selectedColumn)return import_core13.AgPromise.resolve();const e=this.createManagedBean(new import_core13.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=e,e.hasFilter()?(this.eUnderlyingFilter.appendChild(e.getGui()),e.getFilter()?.then(()=>{e.afterGuiAttached?.(this.afterGuiAttachedParams),!this.afterGuiAttachedParams?.suppressFocus&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()})??import_core13.AgPromise.resolve()):import_core13.AgPromise.resolve()}updateSelectedColumn(e){if(!e)return;this.filterWrapperComp?.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const t=this.getFilterColumnPair(e);this.selectedColumn=t?.column,this.selectedFilter=t?.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){return!!this.filterColumnPairs?.some(({filter:e})=>e.isFilterActive())}doesFilterPass(){return!0}getModel(){return null}setModel(){return import_core13.AgPromise.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()}afterGuiDetached(){(0,import_core13._clearElement)(this.eUnderlyingFilter),this.selectedFilter?.afterGuiDetached?.()}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}getFilterColumnPair(e){if(e)return this.filterColumnPairs?.find(({column:t})=>t.getId()===e)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},import_core14=require("@ag-grid-community/core"),GroupFloatingFilterComp=class extends import_core14.Component{constructor(){super(` | ||
<div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div> | ||
`),this.eFloatingFilter=import_core14.RefPlaceholder,this.haveAddedColumnListeners=!1}wireBeans(e){this.columnNameService=e.columnNameService,this.filterManager=e.filterManager}init(e){this.params=e;const t=this.gos.get("groupDisplayType")==="multipleColumns";return new import_core14.AgPromise(o=>{this.params.parentFilterInstance(r=>{this.parentFilterInstance=r,t?this.setupUnderlyingFloatingFilterElement().then(()=>o()):(this.setupReadOnlyFloatingFilterElement(),o())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams()}setParams(){const e=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),t=this.localeService.getLocaleTextFunc();this.eFloatingFilterText?.setInputAriaLabel(`${e} ${t("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new import_core14.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,(0,import_core14._clearElement)(this.eFloatingFilter);const e=this.parentFilterInstance.getSelectedColumn();if(e&&!e.isVisible()){const t=this.filterManager.getFloatingFilterCompDetails(e,this.params.showParentFilter);if(t)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(e,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),t.newAgStackInstance().then(o=>{this.underlyingFloatingFilter=o,this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel()),this.appendChild(o.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),import_core14.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(e){if(!e.column)return;const t=this.filterManager.getFloatingFilterCompDetails(e.column,this.params.showParentFilter);t&&(this.underlyingFloatingFilter?.refresh?this.underlyingFloatingFilter.refresh(t.params):this.underlyingFloatingFilter?.onParamsUpdated?.(t.params))}onParentModelChanged(e,t){this.showingUnderlyingFloatingFilter?this.underlyingFloatingFilter?.onParentModelChanged(this.parentFilterInstance.getSelectedFilter()?.getModel(),t):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const e=this.parentFilterInstance.getSelectedFilter();if(!e){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){const t=e.getModel();this.eFloatingFilterText.setValue(t==null?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},import_core15=require("@ag-grid-community/core"),BatchRemover=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(e,t){const o=this.getSet(e);o.removeFromChildrenAfterGroup[t.id]=!0}isRemoveFromAllLeafChildren(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]}preventRemoveFromAllLeafChildren(e,t){const o=this.getSet(e);delete o.removeFromAllLeafChildren[t.id]}removeFromAllLeafChildren(e,t){const o=this.getSet(e);o.removeFromAllLeafChildren[t.id]=!0}getSet(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(e=>{const t=this.allSets[e.id];e.childrenAfterGroup=e.childrenAfterGroup.filter(o=>!t.removeFromChildrenAfterGroup[o.id]),e.allLeafChildren=e.allLeafChildren?.filter(o=>!t.removeFromAllLeafChildren[o.id])??null,e.updateHasChildren(),e.sibling&&(e.sibling.childrenAfterGroup=e.childrenAfterGroup,e.sibling.allLeafChildren=e.allLeafChildren)}),this.allSets={},this.allParents.length=0}},GroupStage=class extends import_core15.BeanStub{constructor(){super(...arguments),this.beanName="groupStage",this.treeNodeCache=new TreeDataNodeCache}wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.selectableService=e.selectableService,this.valueService=e.valueService,this.selectionService=e.selectionService,this.showRowGroupColsService=e.showRowGroupColsService}execute(e){const t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{const o=e.afterColumnsChanged===!0;this.shotgunResetEverything(t,o)}t.usingTreeData||(this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t)),this.selectableService.updateSelectableAfterGrouping()}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(t=>{if(t.childrenAfterGroup){const o=[],r=[];let s;t.childrenAfterGroup.forEach(i=>{i.childrenAfterGroup?.length?i.key===""&&!s?s=i:r.push(i):o.push(i)}),s&&r.push(s),t.childrenAfterGroup=[...o,...r]}},!1)}createGroupingDetails(e){const{rowNode:t,changedPath:o,rowNodeTransactions:r,rowNodeOrder:s}=e,i=this.gos.get("treeData"),n=i?null:this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:n,rootNode:t,pivotMode:this.columnModel.isPivotMode(),groupedColCount:i||!n?0:n.length,rowNodeOrder:s,transactions:r,changedPath:o,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),usingTreeData:i,suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),getDataPath:i?this.gos.get("getDataPath"):void 0,keyCreators:n?.map(a=>a.getColDef().keyCreator)??[]}}handleTransaction(e){e.transactions.forEach(t=>{const o=e.usingTreeData?void 0:new BatchRemover;if((0,import_core15._existsAndNotEmpty)(t.remove)&&this.removeNodes(t.remove,e,o),(0,import_core15._existsAndNotEmpty)(t.update)&&this.moveNodesInWrongPath(t.update,e,o),(0,import_core15._existsAndNotEmpty)(t.add)&&this.insertNodes(t.add,e,!1),o){const r=o.getAllParents().slice();o.flush(),this.removeEmptyGroups(r,e)}}),e.rowNodeOrder&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{(0,import_core15._sortRowNodesByOrder)(t.childrenAfterGroup,e.rowNodeOrder)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;(0,import_core15._exists)(t)&&o(e.rootNode);function o(r){(0,import_core15._exists)(r.childrenAfterGroup)&&!r.leafGroup&&(r.childrenAfterGroup.sort((i,n)=>t({nodeA:i,nodeB:n})),r.childrenAfterGroup.forEach(i=>o(i)))}}getExistingPathForNode(e,t){const o=[];let r=t.usingTreeData?e:e.parent;for(;r&&r!==t.rootNode;)o.push({key:r.key,rowGroupColumn:r.rowGroupColumn,field:r.field}),r=r.parent;return o.reverse(),o}topoSort(e,t){const o=[],r=Object.fromEntries(e.map((l,a)=>[l.id,a])),s=new Set(Object.keys(r)),i=[t.rootNode];let n=0;for(;n<i.length;){const l=i[n];if(n++,l===void 0)continue;if(l.id&&l.id in r&&(o.push(e[r[l.id]]),s.delete(l.id)),s.size===0)return o;const a=l.childrenAfterGroup??[];for(let u=0;u<a.length;u++)i.push(a[u])}return o}moveNodesInWrongPath(e,t,o){(t.usingTreeData?this.topoSort(e,t):e).forEach(s=>{t.changedPath.isActive()&&t.changedPath.addParentNode(s.parent);const i=u=>u.key,n=this.getExistingPathForNode(s,t).map(i),l=this.getGroupInfo(s,t).map(i);(0,import_core15._areEqual)(n,l)||this.moveNode(s,t,o)})}moveNode(e,t,o){if(this.removeNodesInStages([e],t,o),this.insertOneNode(e,t,!0,o),e.setData(e.data),t.changedPath.isActive()){const r=e.parent;t.changedPath.addParentNode(r)}}removeNodes(e,t,o){this.removeNodesInStages(e,t,o),t.changedPath.isActive()&&e.forEach(r=>t.changedPath.addParentNode(r.parent))}removeNodesInStages(e,t,o){if(this.removeNodesFromParents(e,t,o),t.usingTreeData){const r=e.map(s=>s.parent);this.removeEmptyGroups(r,t)}}forEachParentGroup(e,t,o){let r=t;for(;r&&r!==e.rootNode;)o(r),r=r.parent}removeNodesFromParents(e,t,o){const r=o==null,s=o||new BatchRemover;e.forEach(i=>{this.removeFromParent(i,s),this.forEachParentGroup(t,i.parent,n=>{s.removeFromAllLeafChildren(n,i)})}),r&&s.flush()}removeEmptyGroups(e,t){let o=!0;const r=s=>{const i=this.getChildrenMappedKey(s.key,s.rowGroupColumn),n=s.parent;return(n?.childrenMapped?!n.childrenMapped[i]:!0)?!1:s.isEmptyRowGroupNode()};for(;o;){o=!1;const s=new BatchRemover;e.forEach(i=>{this.forEachParentGroup(t,i,n=>{const l=r(n);l&&t.usingTreeData&&n.data&&t.getDataPath?.(n.data)?n.setGroup((n.childrenAfterGroup&&n.childrenAfterGroup.length>0)??!1):l&&(o=!0,this.removeFromParent(n,s),n.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):((0,import_core15._removeFromArray)(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent?.childrenMapped!=null&&delete e.parent.childrenMapped[o],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t?.childrenMapped!=null&&t?.childrenMapped?.[o]!==e&&(t.childrenMapped[o]=e,t.childrenAfterGroup.push(e),t.setGroup(!0))}areGroupColsEqual(e,t){return e==null||t==null||e.pivotMode!==t.pivotMode?!1:(0,import_core15._areEqual)(e.groupedCols,t.groupedCols)&&(0,import_core15._areEqual)(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=o=>{o&&o.forEach(r=>{if(!e.usingTreeData&&!r.group)return;const i={field:r.field,key:r.key,rowGroupColumn:r.rowGroupColumn,leafNode:r.allLeafChildren?.[0]};this.setGroupData(r,i,e),t(r.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionService.filterFromSelection(i=>i&&!i.group);const{rootNode:o,groupedCols:r}=e;o.leafGroup=e.usingTreeData?!1:r.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const s=o.sibling;s&&(s.childrenAfterGroup=o.childrenAfterGroup,s.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,e,!1)}noChangeInGroupingColumns(e,t){let o=!1;const r=this.showRowGroupColsService.getShowRowGroupCols(),s=r?r.map(i=>i.getId()).join("-"):"";return t&&(o=e.usingTreeData||this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=s,o}insertNodes(e,t,o){t.usingTreeData?this.buildNodeCacheFromRows(e,t):this.treeNodeCache.clear(),e.forEach(r=>{this.insertOneNode(r,t,o),t.changedPath.isActive()&&t.changedPath.addParentNode(r.parent)})}insertOneNode(e,t,o,r){const s=this.getGroupInfo(e,t),i=t.usingTreeData?s.length-1:void 0,n=this.findParentForNode(e,s,t,r,i);if(t.usingTreeData){const l=(0,import_core15._last)(s);e.parent=n,e.level=s.length,this.ensureRowNodeFields(e,this.getChildrenMappedKey(l.key,l.rowGroupColumn)),this.setGroupData(e,l,t),o||this.setExpandedInitialValue(t,e),this.addToParent(e,n)}else n.group||(0,import_core15._warnOnce)("duplicate group keys for row data, keys should be unique",[n.data,e.data]),e.parent=n,e.level=s.length,n.childrenAfterGroup.push(e),n.updateHasChildren()}findParentForNode(e,t,o,r,s){let i=o.rootNode;return t.forEach((n,l)=>{s!==void 0&&l>=s||(i=this.getOrCreateNextNode(i,t,n,l,o),r?.isRemoveFromAllLeafChildren(i,e)?r?.preventRemoveFromAllLeafChildren(i,e):i.allLeafChildren.push(e))}),i}getOrCreateNextNode(e,t,o,r,s){const i=this.getChildrenMappedKey(o.key,o.rowGroupColumn);let n=e?.childrenMapped?.[i];return n||(s.usingTreeData&&this.treeNodeCache.has(t,r,i)?(n=this.treeNodeCache.get(t,r,i),n.parent=e):n=this.createGroup(o,e,r,s),this.addToParent(n,e)),n}buildNodeCacheFromRows(e,t){let o=0;const r=e.map(s=>{const i=this.getGroupInfo(s,t);return o=Math.max(o,i.length),i});this.treeNodeCache.clear();for(let s=0;s<o;s++)for(const[i,n]of r.entries()){const l=n[s]!==void 0,a=n[s+1]===void 0;if(!l)continue;const u=n[s];this.treeNodeCache.get(n,s,u.key)==null&&this.treeNodeCache.set(n,s,u.key,a?this.ensureRowNodeFields(e[i],u.key):null)}this.backfillGroups(this.treeNodeCache.inner(),t.rootNode,0,t)}ensureRowNodeFields(e,t){return t!==void 0&&(e.key=t),e.childrenMapped??(e.childrenMapped={}),e.allLeafChildren??(e.allLeafChildren=[]),e.childrenAfterGroup??(e.childrenAfterGroup=[]),e}backfillGroups(e,t,o,r){for(const[s,i]of Object.entries(e))i.node===null&&(i.node=this.createGroup({key:s,rowGroupColumn:null,field:null},t,o,r)),this.backfillGroups(i.subtree,i.node,o+1,r)}createGroup(e,t,o,r){const s=new import_core15.RowNode(this.beans);return s.group=!0,s.field=e.field,s.rowGroupColumn=e.rowGroupColumn,this.setGroupData(s,e,r),s.key=e.key,s.id=this.createGroupId(s,t,r.usingTreeData,o),s.level=o,s.leafGroup=r.usingTreeData?!1:o===r.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=r.usingTreeData?null:o,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=t,this.setExpandedInitialValue(r,s),s}createGroupId(e,t,o,r){let s;return o?s=(i,n,l)=>{if(l<0)return null;const a=n?s(n,n.parent,l-1):null;return`${a==null?"":a+"-"}${l}-${i.key}`}:s=(i,n)=>{if(!i.rowGroupColumn)return null;const l=n?s(n,n.parent,0):null;return`${l==null?"":l+"-"}${i.rowGroupColumn.getColId()}-${i.key}`},import_core15.RowNode.ID_PREFIX_ROW_GROUP+s(e,t,r)}setGroupData(e,t,o){e.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(s=>{if(o.usingTreeData){e.groupData[s.getColId()]=t.key;return}const n=e.rowGroupColumn;n!==null&&s.isRowGroupDisplayed(n.getId())&&(o.suppressGroupMaintainValueType?e.groupData[s.getColId()]=t.key:e.groupData[s.getColId()]=this.valueService.getValue(n,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}const o=e.isGroupOpenByDefault;if(o){const r={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=o(r)==!0;return}if(e.expandByDefault===-1){t.expanded=!0;return}t.expanded=t.level<e.expandByDefault}getGroupInfo(e,t){return t.usingTreeData?this.getGroupInfoFromCallback(e,t):this.getGroupInfoFromGroupColumns(e,t)}getGroupInfoFromCallback(e,t){const o=t.getDataPath?.(e.data);return(o===void 0||o.length===0)&&(0,import_core15._warnOnce)(`getDataPath() should not return an empty path for data ${e.data}`),o?.map(r=>({key:r,field:null,rowGroupColumn:null}))??[]}getGroupInfoFromGroupColumns(e,t){const o=[];return t.groupedCols.forEach(r=>{let s=this.valueService.getKeyForNode(r,e),i=s!=null&&s!=="";if((t.pivotMode||!t.groupAllowUnbalanced)&&!i&&(s="",i=!0),i){const l={key:s,field:r.getColDef().field,rowGroupColumn:r,leafNode:e};o.push(l)}}),o}},TreeDataNodeCache=class{constructor(){this.cache={}}traverse(e,t){let o=this.cache,r=0;for(;r<=t;){const s=e[r].key;s in o||(o[s]={node:null,subtree:{}}),o=o[s].subtree,r++}return o}set(e,t,o,r){const s=this.traverse(e,t-1);s[o]={node:r,subtree:{}}}has(e,t,o){const r=this.traverse(e,t-1);return o in r}get(e,t,o){return this.traverse(e,t-1)[o]?.node}clear(){this.cache={}}inner(){return this.cache}},import_core16=require("@ag-grid-community/core"),PIVOT_ROW_TOTAL_PREFIX="PivotRowTotal_",PivotColDefService=class extends import_core16.BeanStub{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.columnNameService=e.columnNameService}postConstruct(){const e=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e);function o(i,n=[]){return i.forEach(l=>{l.children!==void 0?o(l.children,n):n.push(l)}),n}const r=o(t);this.addRowGroupTotals(t,r),this.addExpandablePivotGroups(t,r),this.addPivotTotalsToGroups(t,r);const s=r.map(i=>(0,import_core16._cloneObject)(i));return{pivotColumnGroupDefs:t,pivotColumnDefs:s}}createPivotColumnsFromUniqueValues(e){const t=this.funcColsService.getPivotColumns(),o=t.length;return this.recursivelyBuildGroup(0,e,[],o,t)}recursivelyBuildGroup(e,t,o,r,s){const i=this.funcColsService.getValueColumns();if(e>=r)return this.buildMeasureCols(o);const n=s[e].getColDef(),l=this.headerNameComparator.bind(this,n.pivotComparator);if(i.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===r-1){const u=[];return(0,import_core16._iterateObject)(t,c=>{const h=[...o,c],g=this.createColDef(i[0],c,h);g.columnGroupShow="open",u.push(g)}),u.sort(l),u}const a=[];return(0,import_core16._iterateObject)(t,(u,c)=>{const h=this.pivotDefaultExpanded===-1||e<this.pivotDefaultExpanded,g=[...o,u];a.push({children:this.recursivelyBuildGroup(e+1,c,g,r,s),headerName:u,pivotKeys:g,columnGroupShow:"open",openByDefault:h,groupId:this.generateColumnGroupId(g)})}),a.sort(l),a}buildMeasureCols(e){const t=this.funcColsService.getValueColumns();return t.length===0?[this.createColDef(null,"-",e)]:t.map(o=>{const r=this.columnNameService.getDisplayNameForColumn(o,"header");return{...this.createColDef(o,r,e),columnGroupShow:"open"}})}addExpandablePivotGroups(e,t){if(this.gos.get("suppressExpandablePivotGroups")||this.gos.get("pivotColumnGroupTotals"))return;const o=(r,s,i)=>{const n=r;if(n.children){const l=new Map;n.children.forEach(u=>{o(u,s,l)});const a=!n.children.some(u=>u.children);this.funcColsService.getValueColumns().forEach(u=>{const c=this.columnNameService.getDisplayNameForColumn(u,"header"),h=this.createColDef(u,c,r.pivotKeys);h.pivotTotalColumnIds=l.get(u.getColId()),h.columnGroupShow="closed",h.aggFunc=u.getAggFunc(),a||(r.children.push(h),s.push(h))}),this.merge(i,l)}else{const l=r;if(!l.pivotValueColumn)return;const a=l.pivotValueColumn.getColId(),u=i.has(a)?i.get(a):[];u.push(l.colId),i.set(a,u)}};e.forEach(r=>{o(r,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const o=this.gos.get("pivotColumnGroupTotals")==="after",r=this.funcColsService.getValueColumns(),s=r.map(n=>n.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;const i=r[0];e.forEach(n=>{this.recursivelyAddPivotTotal(n,t,i,o)})}recursivelyAddPivotTotal(e,t,o,r){const s=e;if(!s.children){const n=e;return n.colId?[n.colId]:null}let i=[];if(s.children.forEach(n=>{const l=this.recursivelyAddPivotTotal(n,t,o,r);l&&(i=i.concat(l))}),s.children.length>1){const l=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),a=this.createColDef(o,l,e.pivotKeys,!0);a.pivotTotalColumnIds=i,a.aggFunc=o.getAggFunc();const u=e.children;r?u.push(a):u.unshift(a),t.push(a)}return i}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const o=this.gos.get("pivotRowTotals")==="after",r=this.funcColsService.getValueColumns(),s=o?r.slice():r.slice().reverse();for(let i=0;i<s.length;i++){const n=s[i];let l=[];e.forEach(u=>{l=l.concat(this.extractColIdsForValueColumn(u,n))});const a=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");this.createRowGroupTotal(e,t,n,l,o,a)}}extractColIdsForValueColumn(e,t){const o=e;if(!o.children){const s=o;return s.pivotValueColumn===t&&s.colId?[s.colId]:[]}let r=[];return o.children.forEach(s=>{this.extractColIdsForValueColumn(s,t);const i=this.extractColIdsForValueColumn(s,t);r=r.concat(i)}),r}createRowGroupTotal(e,t,o,r,s,i){const n=this.funcColsService.getValueColumns();let l;if(n.length===0)l=this.createColDef(null,"-",[]);else{const u=this.columnNameService.getDisplayNameForColumn(o,"header");l=this.createColDef(o,u,[]),l.pivotTotalColumnIds=r}l.colId=PIVOT_ROW_TOTAL_PREFIX+l.colId,t.push(l);const a=i?{children:[l],pivotKeys:[],groupId:`${PIVOT_ROW_TOTAL_PREFIX}_pivotGroup_${o.getColId()}`}:l;s?e.push(a):e.unshift(a)}createColDef(e,t,o,r=!1){const s={};if(e){const i=e.getColDef();Object.assign(s,i),s.hide=!1}return s.headerName=t,s.colId=this.generateColumnId(o||[],e&&!r?e.getColId():""),s.field=s.colId,s.valueGetter=i=>i.data?.[i.colDef.field],s.pivotKeys=o,s.pivotValueColumn=e,s.filter===!0&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(e){if(e.length==1)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}headerNameComparator(e,t,o){return e?e(t.headerName,o.headerName):t.headerName&&!o.headerName?1:!t.headerName&&o.headerName?-1:!t.headerName||!o.headerName?0:t.headerName<o.headerName?-1:t.headerName>o.headerName?1:0}merge(e,t){t.forEach((o,r)=>{const i=[...e.has(r)?e.get(r):[],...o];e.set(r,i)})}generateColumnGroupId(e){return`pivotGroup_${this.funcColsService.getPivotColumns().map(o=>o.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${this.funcColsService.getPivotColumns().map(r=>r.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let s=0;s<e.length;s++){const n=e[s].split(this.fieldSeparator);let l=t;for(let a=0;a<n.length;a++){const u=n[a];l[u]==null&&(l[u]={}),l=l[u]}}const o=(s,i,n,l)=>{const a=[];for(const h in n){const g=n[h],p=o(`${s}${this.fieldSeparator}${h}`,h,g,l+1);a.push(p)}if(a.length===0){const h=this.columnModel.getColDefCol(i);if(h){const p=this.columnNameService.getDisplayNameForColumn(h,"header")??i,m=this.createColDef(h,p,void 0,!1);return m.colId=s,m.aggFunc=h.getAggFunc(),m.valueGetter=f=>f.data?.[s],m}return{colId:s,headerName:i,valueGetter:p=>p.data?.[s]}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&a.length===1&&"colId"in a[0]?(a[0].headerName=i,a[0]):{openByDefault:this.pivotDefaultExpanded===-1||l<this.pivotDefaultExpanded,groupId:s,headerName:i,children:a}},r=[];for(const s in t){const i=t[s],n=o(s,s,i,0);r.push(n)}return r}},import_core17=require("@ag-grid-community/core"),EXCEEDED_MAX_UNIQUE_VALUES="Exceeded maximum allowed pivot column count.",PivotStage=class extends import_core17.BeanStub{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(e){this.valueService=e.valueService,this.columnModel=e.columnModel,this.pivotResultColsService=e.pivotResultColsService,this.funcColsService=e.funcColsService,this.pivotColDefService=e.pivotColDefService}execute(e){const t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)}executePivotOff(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),e&&e.setInactive())}executePivotOn(e){const t=this.funcColsService.getValueColumns().length??1,o=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=o===-1?-1:o/t;let r;try{r=this.bucketUpRowNodes(e)}catch(d){if(d.message===EXCEEDED_MAX_UNIQUE_VALUES){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated");const C={type:"pivotMaxColumnsExceeded",message:d.message};this.eventService.dispatchEvent(C),this.lastTimeFailed=!0;return}throw d}const s=this.setUniqueValues(r),i=this.funcColsService.getValueColumns(),n=i.map(d=>`${d.getId()}-${d.getColDef().headerName}`).join("#"),l=i.map(d=>d.getAggFunc().toString()).join("#"),a=this.aggregationColumnsHashLastTime!==n,u=this.aggregationFuncsHashLastTime!==l;this.aggregationColumnsHashLastTime=n,this.aggregationFuncsHashLastTime=l;const c=this.funcColsService.getRowGroupColumns().map(d=>d.getId()).join("#"),h=c!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=c;const g=this.gos.get("pivotRowTotals"),p=this.gos.get("pivotColumnGroupTotals"),m=this.gos.get("suppressExpandablePivotGroups"),f=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),v=g!==this.pivotRowTotalsLastTime||p!==this.pivotColumnGroupTotalsLastTime||m!==this.suppressExpandablePivotGroupsLastTime||f!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=g,this.pivotColumnGroupTotalsLastTime=p,this.suppressExpandablePivotGroupsLastTime=m,this.removePivotHeaderRowWhenSingleValueColumnLastTime=f,this.lastTimeFailed||s||a||h||u||v){const{pivotColumnGroupDefs:d,pivotColumnDefs:C}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=C,this.pivotResultColsService.setPivotResultCols(d,"rowModelUpdated"),e&&e.setInactive()}this.lastTimeFailed=!1}setUniqueValues(e){const t=JSON.stringify(e),o=JSON.stringify(this.uniqueValues);return t!==o?(this.uniqueValues=e,!0):!1}bucketUpRowNodes(e){this.currentUniqueCount=0;const t={};e.forEachChangedNodeDepthFirst(r=>{r.leafGroup&&(r.childrenMapped=null)});const o=r=>{r.leafGroup?this.bucketRowNode(r,t):r.childrenAfterFilter?.forEach(o)};return e.executeFromRootNode(o),t}bucketRowNode(e,t){const o=this.funcColsService.getPivotColumns();o.length===0?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,o,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)}bucketChildren(e,t,o,r){const s={},i=t[o];if(e.forEach(n=>{let l=this.valueService.getKeyForNode(i,n);if((0,import_core17._missing)(l)&&(l=""),!r[l]){this.currentUniqueCount+=1,r[l]={};const a=this.maxUniqueValues!==-1,u=this.currentUniqueCount>this.maxUniqueValues;if(a&&u)throw Error(EXCEEDED_MAX_UNIQUE_VALUES)}s[l]||(s[l]=[]),s[l].push(n)}),o===t.length-1)return s;{const n={};return(0,import_core17._iterateObject)(s,(l,a)=>{n[l]=this.bucketChildren(a,t,o+1,r[l])}),n}}getPivotColumnDefs(){return this.pivotColumnDefs}};function addAggFunc(e,t,o){e.aggFuncService&&e.aggFuncService.addAggFuncs({key:o})}function addAggFuncs(e,t){e.aggFuncService&&e.aggFuncService.addAggFuncs(t)}function clearAggFuncs(e){e.aggFuncService&&e.aggFuncService.clear()}function setColumnAggFunc(e,t,o){e.funcColsService.setColumnAggFunc(t,o,"api")}function isPivotMode(e){return e.columnModel.isPivotMode()}function getPivotResultColumn(e,t,o){return e.pivotResultColsService.lookupPivotResultCol(t,o)}function setValueColumns(e,t){e.funcColsService.setValueColumns(t,"api")}function getValueColumns(e){return e.funcColsService.getValueColumns()}function removeValueColumn(e,t){e.funcColsService.removeValueColumns([t],"api")}function removeValueColumns(e,t){e.funcColsService.removeValueColumns(t,"api")}function addValueColumn(e,t){e.funcColsService.addValueColumns([t],"api")}function addValueColumns(e,t){e.funcColsService.addValueColumns(t,"api")}function setRowGroupColumns(e,t){e.funcColsService.setRowGroupColumns(t,"api")}function removeRowGroupColumn(e,t){e.funcColsService.removeRowGroupColumns([t],"api")}function removeRowGroupColumns(e,t){e.funcColsService.removeRowGroupColumns(t,"api")}function addRowGroupColumn(e,t){e.funcColsService.addRowGroupColumns([t],"api")}function addRowGroupColumns(e,t){e.funcColsService.addRowGroupColumns(t,"api")}function moveRowGroupColumn(e,t,o){e.funcColsService.moveRowGroupColumn(t,o,"api")}function getRowGroupColumns(e){return e.funcColsService.getRowGroupColumns()}function setPivotColumns(e,t){e.funcColsService.setPivotColumns(t,"api")}function removePivotColumn(e,t){e.funcColsService.removePivotColumns([t],"api")}function removePivotColumns(e,t){e.funcColsService.removePivotColumns(t,"api")}function addPivotColumn(e,t){e.funcColsService.addPivotColumns([t],"api")}function addPivotColumns(e,t){e.funcColsService.addPivotColumns(t,"api")}function getPivotColumns(e){return e.funcColsService.getPivotColumns()}function setPivotResultColumns(e,t){e.pivotResultColsService.setPivotResultCols(t,"api")}function getPivotResultColumns(e){const t=e.pivotResultColsService.getPivotResultCols();return t?t.list:null}var import_core18=require("@ag-grid-community/core"),ShowRowGroupColsService=class extends import_core18.BeanStub{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(e=>{const o=e.getColDef().showRowGroup,r=typeof o=="string";!r&&!(o===!0)||(this.showRowGroupCols.push(e),r?this.showRowGroupColsMap[o]=e:this.funcColsService.getRowGroupColumns().forEach(n=>{this.showRowGroupColsMap[n.getId()]=e}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}},VERSION="32.0.0",RowGroupingCoreModule={version:VERSION,moduleName:`${import_core19.ModuleNames.RowGroupingModule}-core`,beans:[AggregationStage,FilterAggregatesStage,GroupStage,PivotColDefService,PivotStage,AggFuncService,AutoColService,ShowRowGroupColsService,ColumnDropZoneService],userComponents:[{name:"agGroupRowRenderer",classImp:import_core20.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:import_core20.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:import_core20.GroupCellRendererCtrl}],dependantModules:[import_core20.EnterpriseCoreModule]},RowGroupingApiModule={version:VERSION,moduleName:`${import_core19.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc,addAggFuncs,clearAggFuncs,setColumnAggFunc,isPivotMode,getPivotResultColumn,setValueColumns,getValueColumns,removeValueColumn,removeValueColumns,addValueColumn,addValueColumns,setRowGroupColumns,removeRowGroupColumn,removeRowGroupColumns,addRowGroupColumn,addRowGroupColumns,getRowGroupColumns,moveRowGroupColumn,setPivotColumns,removePivotColumn,removePivotColumns,addPivotColumn,addPivotColumns,getPivotColumns,setPivotResultColumns,getPivotResultColumns},dependantModules:[RowGroupingCoreModule]},GroupFilterModule={version:VERSION,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:GroupFilter}],dependantModules:[RowGroupingCoreModule,import_core19._ColumnFilterModule]},GroupFloatingFilterModule={version:VERSION,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:GroupFloatingFilterComp}],dependantModules:[GroupFilterModule,import_core19._FloatingFilterModule]},RowGroupingModule={version:VERSION,moduleName:import_core19.ModuleNames.RowGroupingModule,dependantModules:[RowGroupingCoreModule,RowGroupingApiModule,GroupFilterModule,GroupFloatingFilterModule]},import_core21=require("@ag-grid-community/core"),ValuesDropZonePanel=class extends BaseDropZonePanel{constructor(e){super(e,"aggregation")}postConstruct(){const e=this.localeService.getLocaleTextFunc(),t=e("valueColumnsEmptyMessage","Drag here to aggregate"),o=e("values","Values");super.init({icon:(0,import_core21._createIconNoSpan)("valuePanel",this.gos,null),emptyMessage:t,title:o}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const e=super.getTooltipParams();return e.location="valueColumnsList",e}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(e,t){return this.gos.get("functionsReadOnly")||!e.isPrimary()?!1:e.isAllowValue()&&(!e.isValueActive()||this.isSourceEventFromTarget(t))}updateItems(e){this.funcColsService.setValueColumns(e,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}}; |
{ | ||
"name": "@ag-grid-enterprise/row-grouping", | ||
"version": "31.3.2", | ||
"version": "32.0.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -14,5 +14,6 @@ "main": "./dist/package/main.cjs.js", | ||
}, | ||
"sideEffects": false, | ||
"dependencies": { | ||
"@ag-grid-community/core": "31.3.2", | ||
"@ag-grid-enterprise/core": "31.3.2" | ||
"@ag-grid-community/core": "32.0.0", | ||
"@ag-grid-enterprise/core": "32.0.0" | ||
}, | ||
@@ -19,0 +20,0 @@ "devDependencies": { |
{ | ||
"name": "@ag-grid-enterprise/row-grouping", | ||
"version": "31.3.2", | ||
"version": "32.0.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -14,5 +14,6 @@ "main": "./src/main.js", | ||
}, | ||
"sideEffects": false, | ||
"dependencies": { | ||
"@ag-grid-community/core": "31.3.2", | ||
"@ag-grid-enterprise/core": "31.3.2" | ||
"@ag-grid-community/core": "32.0.0", | ||
"@ag-grid-enterprise/core": "32.0.0" | ||
}, | ||
@@ -19,0 +20,0 @@ "devDependencies": { |
@@ -1,4 +0,4 @@ | ||
export { RowGroupingModule } from "./rowGroupingModule"; | ||
export { RowGroupDropZonePanel } from "./rowGrouping/columnDropZones/rowGroupDropZonePanel"; | ||
export { ValuesDropZonePanel } from "./rowGrouping/columnDropZones/valueDropZonePanel"; | ||
export { PivotDropZonePanel } from "./rowGrouping/columnDropZones/pivotDropZonePanel"; | ||
export { RowGroupingModule } from './rowGroupingModule'; | ||
export { RowGroupDropZonePanel } from './rowGrouping/columnDropZones/rowGroupDropZonePanel'; | ||
export { ValuesDropZonePanel } from './rowGrouping/columnDropZones/valueDropZonePanel'; | ||
export { PivotDropZonePanel } from './rowGrouping/columnDropZones/pivotDropZonePanel'; |
@@ -1,17 +0,23 @@ | ||
import { BeanStub, Column, IAggFunc, IAggFuncService } from '@ag-grid-community/core'; | ||
export declare class AggFuncService extends BeanStub implements IAggFuncService { | ||
private static AGG_SUM; | ||
private static AGG_FIRST; | ||
private static AGG_LAST; | ||
private static AGG_MIN; | ||
private static AGG_MAX; | ||
private static AGG_COUNT; | ||
private static AGG_AVG; | ||
import type { AgColumn, IAggFunc, IAggFuncService, NamedBean } from '@ag-grid-community/core'; | ||
import { BeanStub } from '@ag-grid-community/core'; | ||
declare const defaultAggFuncNames: { | ||
readonly sum: "Sum"; | ||
readonly first: "First"; | ||
readonly last: "Last"; | ||
readonly min: "Min"; | ||
readonly max: "Max"; | ||
readonly count: "Count"; | ||
readonly avg: "Average"; | ||
}; | ||
type DefaultAggFuncName = keyof typeof defaultAggFuncNames; | ||
export declare class AggFuncService extends BeanStub implements NamedBean, IAggFuncService { | ||
beanName: "aggFuncService"; | ||
private aggFuncsMap; | ||
private initialised; | ||
postConstruct(): void; | ||
private init; | ||
private initialiseWithDefaultAggregations; | ||
private isAggFuncPossible; | ||
getDefaultFuncLabel(fctName: string): string; | ||
getDefaultAggFunc(column: Column): string | null; | ||
getDefaultFuncLabel(fctName: DefaultAggFuncName): string; | ||
getDefaultAggFunc(column: AgColumn): string | null; | ||
addAggFuncs(aggFuncs?: { | ||
@@ -21,4 +27,5 @@ [key: string]: IAggFunc; | ||
getAggFunc(name: string): IAggFunc; | ||
getFuncNames(column: Column): string[]; | ||
getFuncNames(column: AgColumn): string[]; | ||
clear(): void; | ||
} | ||
export {}; |
@@ -1,6 +0,11 @@ | ||
import { BeanStub, IRowNodeStage, RowNode, Column, StageExecuteParams, IAggFunc } from "@ag-grid-community/core"; | ||
export declare class AggregationStage extends BeanStub implements IRowNodeStage { | ||
import type { AgColumn, BeanCollection, IAggFunc, IRowNodeStage, NamedBean, RowNode, StageExecuteParams } from '@ag-grid-community/core'; | ||
import { BeanStub } from '@ag-grid-community/core'; | ||
export declare class AggregationStage extends BeanStub implements NamedBean, IRowNodeStage { | ||
beanName: "aggregationStage"; | ||
private columnModel; | ||
private valueService; | ||
private aggFuncService; | ||
private funcColsService; | ||
private pivotResultColsService; | ||
wireBeans(beans: BeanCollection): void; | ||
execute(params: StageExecuteParams): any; | ||
@@ -16,3 +21,3 @@ private createAggDetails; | ||
private getValuesNormal; | ||
aggregateValues(values: any[], aggFuncOrString: string | IAggFunc, column?: Column, rowNode?: RowNode, pivotResultColumn?: Column): any; | ||
aggregateValues(values: any[], aggFuncOrString: string | IAggFunc, column?: AgColumn, rowNode?: RowNode, pivotResultColumn?: AgColumn): any; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { RowNode } from "@ag-grid-community/core"; | ||
import type { RowNode } from '@ag-grid-community/core'; | ||
export declare class BatchRemover { | ||
@@ -3,0 +3,0 @@ private allSets; |
@@ -1,10 +0,15 @@ | ||
import { Column, DraggingEvent, DropTarget, PillDropZonePanel, PillDropZonePanelParams, DragItem, ColumnModel, ColumnEventType, DragSourceType } from "@ag-grid-community/core"; | ||
import { DropZoneColumnComp } from "./dropZoneColumnComp"; | ||
import type { AgColumn, BeanCollection, ColumnEventType, ColumnModel, DragItem, DraggingEvent, DropTarget, FuncColsService } from '@ag-grid-community/core'; | ||
import { DragSourceType } from '@ag-grid-community/core'; | ||
import type { PillDropZonePanelParams } from '@ag-grid-enterprise/core'; | ||
import { PillDropZonePanel } from '@ag-grid-enterprise/core'; | ||
import { DropZoneColumnComp } from './dropZoneColumnComp'; | ||
export type TDropZone = 'rowGroup' | 'pivot' | 'aggregation'; | ||
export declare abstract class BaseDropZonePanel extends PillDropZonePanel<DropZoneColumnComp, Column> { | ||
export declare abstract class BaseDropZonePanel extends PillDropZonePanel<DropZoneColumnComp, AgColumn> { | ||
private dropZonePurpose; | ||
protected readonly columnModel: ColumnModel; | ||
protected columnModel: ColumnModel; | ||
protected funcColsService: FuncColsService; | ||
wireBeans(beans: BeanCollection): void; | ||
constructor(horizontal: boolean, dropZonePurpose: TDropZone); | ||
init(params: PillDropZonePanelParams): void; | ||
protected getItems(dragItem: DragItem): Column[]; | ||
protected getItems(dragItem: DragItem): AgColumn[]; | ||
protected isInterestedIn(type: DragSourceType): boolean; | ||
@@ -15,6 +20,5 @@ protected minimumAllowedNewInsertIndex(): number; | ||
protected handleDragLeaveEnd(draggingEvent: DraggingEvent): void; | ||
setColumnsVisible(columns: Column[] | null | undefined, visible: boolean, source: ColumnEventType): void; | ||
setColumnsVisible(columns: AgColumn[] | null | undefined, visible: boolean, source: ColumnEventType): void; | ||
private isRowGroupPanel; | ||
protected refreshOnDragStop(): boolean; | ||
protected createPillComponent(column: Column, dropTarget: DropTarget, ghost: boolean, horizontal: boolean): DropZoneColumnComp; | ||
protected createPillComponent(column: AgColumn, dropTarget: DropTarget, ghost: boolean, horizontal: boolean): DropZoneColumnComp; | ||
} |
@@ -1,16 +0,21 @@ | ||
import { DropTarget, Column, PillDragComp, ColumnModel, DragItem, DragSourceType } from "@ag-grid-community/core"; | ||
import { TDropZone } from "./baseDropZonePanel"; | ||
export declare class DropZoneColumnComp extends PillDragComp<Column> { | ||
import type { AgColumn, BeanCollection, DragAndDropIcon, DragItem, DropTarget } from '@ag-grid-community/core'; | ||
import { DragSourceType } from '@ag-grid-community/core'; | ||
import { PillDragComp } from '@ag-grid-enterprise/core'; | ||
import type { TDropZone } from './baseDropZonePanel'; | ||
export declare class DropZoneColumnComp extends PillDragComp<AgColumn> { | ||
private column; | ||
private dropZonePurpose; | ||
private readonly popupService; | ||
private readonly sortController; | ||
protected readonly columnModel: ColumnModel; | ||
private readonly aggFuncService?; | ||
private eSortIndicator; | ||
private popupService; | ||
private sortController; | ||
private columnModel; | ||
private columnNameService; | ||
private funcColsService; | ||
private aggFuncService?; | ||
wireBeans(beans: BeanCollection): void; | ||
private readonly eSortIndicator; | ||
private displayName; | ||
private popupShowing; | ||
constructor(column: Column, dragSourceDropTarget: DropTarget, ghost: boolean, dropZonePurpose: TDropZone, horizontal: boolean); | ||
init(): void; | ||
getItem(): Column; | ||
constructor(column: AgColumn, dragSourceDropTarget: DropTarget, ghost: boolean, dropZonePurpose: TDropZone, horizontal: boolean); | ||
postConstruct(): void; | ||
getItem(): AgColumn; | ||
protected getDisplayName(): string; | ||
@@ -25,3 +30,3 @@ protected getTooltip(): string | null | undefined; | ||
setupSort(): void; | ||
protected getDefaultIconName(): string; | ||
protected getDefaultIconName(): DragAndDropIcon; | ||
protected createGetDragItem(): () => DragItem; | ||
@@ -37,3 +42,3 @@ protected setupComponents(): void; | ||
protected getDragSourceType(): DragSourceType; | ||
protected destroy(): void; | ||
destroy(): void; | ||
} |
@@ -1,6 +0,6 @@ | ||
import { Column, DraggingEvent, ITooltipParams, WithoutGridCommon } from "@ag-grid-community/core"; | ||
import { BaseDropZonePanel } from "./baseDropZonePanel"; | ||
import type { AgColumn, DragAndDropIcon, DraggingEvent, ITooltipParams, WithoutGridCommon } from '@ag-grid-community/core'; | ||
import { BaseDropZonePanel } from './baseDropZonePanel'; | ||
export declare class PivotDropZonePanel extends BaseDropZonePanel { | ||
constructor(horizontal: boolean); | ||
private passBeansUp; | ||
postConstruct(): void; | ||
protected getAriaLabel(): string; | ||
@@ -10,6 +10,6 @@ getTooltipParams(): WithoutGridCommon<ITooltipParams>; | ||
private checkVisibility; | ||
protected isItemDroppable(column: Column, draggingEvent: DraggingEvent): boolean; | ||
protected updateItems(columns: Column[]): void; | ||
protected getIconName(): string; | ||
protected getExistingItems(): Column[]; | ||
protected isItemDroppable(column: AgColumn, draggingEvent: DraggingEvent): boolean; | ||
protected updateItems(columns: AgColumn[]): void; | ||
protected getIconName(): DragAndDropIcon; | ||
protected getExistingItems(): AgColumn[]; | ||
} |
@@ -1,12 +0,12 @@ | ||
import { Column, DraggingEvent, ITooltipParams, WithoutGridCommon } from "@ag-grid-community/core"; | ||
import { BaseDropZonePanel } from "./baseDropZonePanel"; | ||
import type { AgColumn, DragAndDropIcon, DraggingEvent, ITooltipParams, WithoutGridCommon } from '@ag-grid-community/core'; | ||
import { BaseDropZonePanel } from './baseDropZonePanel'; | ||
export declare class RowGroupDropZonePanel extends BaseDropZonePanel { | ||
constructor(horizontal: boolean); | ||
private passBeansUp; | ||
postConstruct(): void; | ||
protected getAriaLabel(): string; | ||
getTooltipParams(): WithoutGridCommon<ITooltipParams>; | ||
protected isItemDroppable(column: Column, draggingEvent: DraggingEvent): boolean; | ||
protected updateItems(columns: Column[]): void; | ||
protected getIconName(): string; | ||
protected getExistingItems(): Column[]; | ||
protected isItemDroppable(column: AgColumn, draggingEvent: DraggingEvent): boolean; | ||
protected updateItems(columns: AgColumn[]): void; | ||
protected getIconName(): DragAndDropIcon; | ||
protected getExistingItems(): AgColumn[]; | ||
} |
@@ -1,12 +0,12 @@ | ||
import { Column, DraggingEvent, ITooltipParams, WithoutGridCommon } from "@ag-grid-community/core"; | ||
import { BaseDropZonePanel } from "./baseDropZonePanel"; | ||
import type { AgColumn, DragAndDropIcon, DraggingEvent, ITooltipParams, WithoutGridCommon } from '@ag-grid-community/core'; | ||
import { BaseDropZonePanel } from './baseDropZonePanel'; | ||
export declare class ValuesDropZonePanel extends BaseDropZonePanel { | ||
constructor(horizontal: boolean); | ||
private passBeansUp; | ||
postConstruct(): void; | ||
protected getAriaLabel(): string; | ||
getTooltipParams(): WithoutGridCommon<ITooltipParams>; | ||
protected getIconName(): string; | ||
protected isItemDroppable(column: Column, draggingEvent: DraggingEvent): boolean; | ||
protected updateItems(columns: Column[]): void; | ||
protected getExistingItems(): Column[]; | ||
protected getIconName(): DragAndDropIcon; | ||
protected isItemDroppable(column: AgColumn, draggingEvent: DraggingEvent): boolean; | ||
protected updateItems(columns: AgColumn[]): void; | ||
protected getExistingItems(): AgColumn[]; | ||
} |
@@ -1,5 +0,8 @@ | ||
import { IRowNodeStage, StageExecuteParams, BeanStub } from "@ag-grid-community/core"; | ||
export declare class FilterAggregatesStage extends BeanStub implements IRowNodeStage { | ||
private filterManager; | ||
import type { BeanCollection, IRowNodeStage, NamedBean, StageExecuteParams } from '@ag-grid-community/core'; | ||
import { BeanStub } from '@ag-grid-community/core'; | ||
export declare class FilterAggregatesStage extends BeanStub implements NamedBean, IRowNodeStage { | ||
beanName: "filterAggregatesStage"; | ||
private filterManager?; | ||
private columnModel; | ||
wireBeans(beans: BeanCollection): void; | ||
execute(params: StageExecuteParams): void; | ||
@@ -6,0 +9,0 @@ private setAllChildrenCountTreeData; |
@@ -1,7 +0,9 @@ | ||
import { AgPromise, Column, IAfterGuiAttachedParams, IFilterComp, IFilterParams, TabGuardComp } from '@ag-grid-community/core'; | ||
export declare class GroupFilter extends TabGuardComp implements IFilterComp { | ||
static EVENT_COLUMN_ROW_GROUP_CHANGED: string; | ||
static EVENT_SELECTED_COLUMN_CHANGED: string; | ||
private readonly filterManager; | ||
private readonly columnModel; | ||
import type { AgColumn, BeanCollection, IAfterGuiAttachedParams, IFilterComp, IFilterParams } from '@ag-grid-community/core'; | ||
import { AgPromise, TabGuardComp } from '@ag-grid-community/core'; | ||
export type GroupFilterEvent = 'columnRowGroupChanged' | 'selectedColumnChanged'; | ||
export declare class GroupFilter extends TabGuardComp<GroupFilterEvent> implements IFilterComp { | ||
private filterManager?; | ||
private columnNameService; | ||
private funcColsService; | ||
wireBeans(beans: BeanCollection): void; | ||
private readonly eGroupField; | ||
@@ -18,3 +20,3 @@ private readonly eUnderlyingFilter; | ||
constructor(); | ||
private postConstruct; | ||
postConstruct(): void; | ||
init(params: IFilterParams): AgPromise<void>; | ||
@@ -38,5 +40,5 @@ private validateParams; | ||
getSelectedFilter(): IFilterComp | undefined; | ||
getSelectedColumn(): Column | undefined; | ||
getSelectedColumn(): AgColumn | undefined; | ||
isFilterAllowed(): boolean; | ||
destroy(): void; | ||
} |
@@ -1,6 +0,8 @@ | ||
import { AgPromise, Component, FilterChangedEvent, IFloatingFilterComp, IFloatingFilterParams } from '@ag-grid-community/core'; | ||
import { GroupFilter } from './groupFilter'; | ||
import type { BeanCollection, FilterChangedEvent, IFloatingFilterComp, IFloatingFilterParams } from '@ag-grid-community/core'; | ||
import { AgPromise, Component } from '@ag-grid-community/core'; | ||
import type { GroupFilter } from './groupFilter'; | ||
export declare class GroupFloatingFilterComp extends Component implements IFloatingFilterComp<GroupFilter> { | ||
private readonly columnModel; | ||
private readonly filterManager; | ||
private columnNameService; | ||
private filterManager?; | ||
wireBeans(beans: BeanCollection): void; | ||
private readonly eFloatingFilter; | ||
@@ -12,3 +14,2 @@ private params; | ||
private showingUnderlyingFloatingFilter; | ||
private compDetails; | ||
private haveAddedColumnListeners; | ||
@@ -15,0 +16,0 @@ constructor(); |
@@ -1,4 +0,7 @@ | ||
import { BeanStub, IRowNodeStage, StageExecuteParams } from "@ag-grid-community/core"; | ||
export declare class GroupStage extends BeanStub implements IRowNodeStage { | ||
import type { BeanCollection, IRowNodeStage, NamedBean, StageExecuteParams } from '@ag-grid-community/core'; | ||
import { BeanStub } from '@ag-grid-community/core'; | ||
export declare class GroupStage extends BeanStub implements NamedBean, IRowNodeStage { | ||
beanName: "groupStage"; | ||
private columnModel; | ||
private funcColsService; | ||
private selectableService; | ||
@@ -8,4 +11,8 @@ private valueService; | ||
private selectionService; | ||
private showRowGroupColsService; | ||
wireBeans(beans: BeanCollection): void; | ||
private oldGroupingDetails; | ||
private oldGroupDisplayColIds; | ||
/** Hierarchical node cache to speed up tree data node insertion */ | ||
private treeNodeCache; | ||
execute(params: StageExecuteParams): void; | ||
@@ -18,2 +25,7 @@ private positionLeafsAndGroups; | ||
private getExistingPathForNode; | ||
/** | ||
* Topological sort of the given row nodes based on the grouping hierarchy, where parents come before children. | ||
* Used to ensure tree data is moved in the correct order (see AG-11678) | ||
*/ | ||
private topoSort; | ||
private moveNodesInWrongPath; | ||
@@ -25,5 +37,7 @@ private moveNode; | ||
private removeNodesFromParents; | ||
private postRemoveCreateFillerNodes; | ||
private removeEmptyGroups; | ||
private removeFromParent; | ||
/** | ||
* This is idempotent, but relies on the `key` field being the same throughout a RowNode's lifetime | ||
*/ | ||
private addToParent; | ||
@@ -37,4 +51,10 @@ private areGroupColsEqual; | ||
private findParentForNode; | ||
private swapGroupWithUserNode; | ||
private getOrCreateNextNode; | ||
/** | ||
* Directly re-initialises the `TreeDataNodeCache` | ||
*/ | ||
private buildNodeCacheFromRows; | ||
private ensureRowNodeFields; | ||
/** Walks the TreeDataNodeCache recursively and backfills `null` entries with filler group nodes */ | ||
private backfillGroups; | ||
private createGroup; | ||
@@ -41,0 +61,0 @@ private createGroupId; |
@@ -1,2 +0,3 @@ | ||
import { BeanStub, ColDef, ColGroupDef, IPivotColDefService } from "@ag-grid-community/core"; | ||
import type { BeanCollection, ColDef, ColGroupDef, IPivotColDefService, NamedBean } from '@ag-grid-community/core'; | ||
import { BeanStub } from '@ag-grid-community/core'; | ||
export interface PivotColDefServiceResult { | ||
@@ -6,8 +7,11 @@ pivotColumnGroupDefs: (ColDef | ColGroupDef)[]; | ||
} | ||
export declare class PivotColDefService extends BeanStub implements IPivotColDefService { | ||
static PIVOT_ROW_TOTAL_PREFIX: string; | ||
export declare class PivotColDefService extends BeanStub implements NamedBean, IPivotColDefService { | ||
beanName: "pivotColDefService"; | ||
private columnModel; | ||
private funcColsService; | ||
private columnNameService; | ||
wireBeans(beans: BeanCollection): void; | ||
private fieldSeparator; | ||
private pivotDefaultExpanded; | ||
init(): void; | ||
postConstruct(): void; | ||
createPivotColumnDefs(uniqueValues: any): PivotColDefServiceResult; | ||
@@ -14,0 +18,0 @@ private createPivotColumnsFromUniqueValues; |
@@ -1,6 +0,11 @@ | ||
import { BeanStub, ColDef, IRowNodeStage, StageExecuteParams } from "@ag-grid-community/core"; | ||
export declare class PivotStage extends BeanStub implements IRowNodeStage { | ||
import type { BeanCollection, ColDef, IRowNodeStage, NamedBean, StageExecuteParams } from '@ag-grid-community/core'; | ||
import { BeanStub } from '@ag-grid-community/core'; | ||
export declare class PivotStage extends BeanStub implements NamedBean, IRowNodeStage { | ||
beanName: "pivotStage"; | ||
private valueService; | ||
private columnModel; | ||
private pivotResultColsService; | ||
private funcColsService; | ||
private pivotColDefService; | ||
wireBeans(beans: BeanCollection): void; | ||
private uniqueValues; | ||
@@ -17,3 +22,2 @@ private pivotColumnDefs; | ||
private maxUniqueValues; | ||
private static EXCEEDED_MAX_UNIQUE_VALUES; | ||
execute(params: StageExecuteParams): void; | ||
@@ -20,0 +24,0 @@ private executePivotOff; |
@@ -1,2 +0,6 @@ | ||
import { Module } from "@ag-grid-community/core"; | ||
import type { Module } from '@ag-grid-community/core'; | ||
export declare const RowGroupingCoreModule: Module; | ||
export declare const RowGroupingApiModule: Module; | ||
export declare const GroupFilterModule: Module; | ||
export declare const GroupFloatingFilterModule: Module; | ||
export declare const RowGroupingModule: Module; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "31.3.2"; | ||
export declare const VERSION = "32.0.0"; |
{ | ||
"name": "@ag-grid-enterprise/row-grouping", | ||
"version": "31.3.2", | ||
"version": "32.0.0", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -14,5 +14,6 @@ "main": "./dist/package/main.cjs.js", | ||
}, | ||
"sideEffects": false, | ||
"dependencies": { | ||
"@ag-grid-community/core": "31.3.2", | ||
"@ag-grid-enterprise/core": "31.3.2" | ||
"@ag-grid-community/core": "32.0.0", | ||
"@ag-grid-enterprise/core": "32.0.0" | ||
}, | ||
@@ -19,0 +20,0 @@ "devDependencies": { |
@@ -1,3 +0,2 @@ | ||
AG Grid Enterprise | ||
============== | ||
# AG Grid Enterprise | ||
@@ -8,4 +7,4 @@ This project contains AG Grid Enterprise features. | ||
Frameworks Supported | ||
==================== | ||
# Frameworks Supported | ||
Framework specific Getting Started guides: | ||
@@ -21,4 +20,3 @@ | ||
Issue Reporting | ||
============== | ||
# Issue Reporting | ||
@@ -29,2 +27,1 @@ If you are an Enterprise customer (or are evaluating AG Grid Enterprise) and wish to report a Bug or raise a new Feature Request please do so on our [Support Portal](https://ag-grid.zendesk.com/). | ||
Send an email to accounts@ag-grid.com with your license key | ||
@@ -1,2 +0,1 @@ | ||
Support and Maintenance document is now merged into the licence document. Please see the licence. |
Sorry, the diff of this file is too big to display
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
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
502253
34
7052
25
+ Added@ag-grid-community/core@32.0.0(transitive)
+ Added@ag-grid-enterprise/core@32.0.0(transitive)
+ Addedag-charts-types@10.0.0(transitive)
- Removed@ag-grid-community/core@31.3.2(transitive)
- Removed@ag-grid-enterprise/core@31.3.2(transitive)