Socket
Socket
Sign inDemoInstall

@ag-grid-enterprise/row-grouping

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/row-grouping - npm Package Compare versions

Comparing version 31.3.3 to 31.3.4

2

dist/package/main.cjs.min.js

@@ -8,3 +8,3 @@ 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,`

</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.3",import_core12=require("@ag-grid-community/core"),_GroupFilter=class G extends import_core12.TabGuardComp{constructor(){super(`
`),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.4",import_core12=require("@ag-grid-community/core"),_GroupFilter=class G extends import_core12.TabGuardComp{constructor(){super(`
<div class="ag-group-filter">

@@ -11,0 +11,0 @@ <div ref="eGroupField"></div>

{
"name": "@ag-grid-enterprise/row-grouping",
"version": "31.3.3",
"version": "31.3.4",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,4 +15,4 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "31.3.3",
"@ag-grid-enterprise/core": "31.3.3"
"@ag-grid-community/core": "31.3.4",
"@ag-grid-enterprise/core": "31.3.4"
},

@@ -19,0 +19,0 @@ "devDependencies": {

{
"name": "@ag-grid-enterprise/row-grouping",
"version": "31.3.3",
"version": "31.3.4",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,4 +15,4 @@ "main": "./src/main.js",

"dependencies": {
"@ag-grid-community/core": "31.3.3",
"@ag-grid-enterprise/core": "31.3.3"
"@ag-grid-community/core": "31.3.4",
"@ag-grid-enterprise/core": "31.3.4"
},

@@ -19,0 +19,0 @@ "devDependencies": {

@@ -1,1 +0,1 @@

export declare const VERSION = "31.3.3";
export declare const VERSION = "31.3.4";
{
"name": "@ag-grid-enterprise/row-grouping",
"version": "31.3.3",
"version": "31.3.4",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",

@@ -15,4 +15,4 @@ "main": "./dist/package/main.cjs.js",

"dependencies": {
"@ag-grid-community/core": "31.3.3",
"@ag-grid-enterprise/core": "31.3.3"
"@ag-grid-community/core": "31.3.4",
"@ag-grid-enterprise/core": "31.3.4"
},

@@ -19,0 +19,0 @@ "devDependencies": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc