@ag-grid-enterprise/column-tool-panel
Advanced tools
Comparing version 31.2.0 to 31.2.1
@@ -20,2 +20,2 @@ var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,e,t)=>e in o?__defProp(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,__spreadValues=(o,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(o,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(o,t,e[t]);return o},__export=(o,e)=>{for(var t in e)__defProp(o,t,{get:e[t],enumerable:!0})},__copyProps=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of __getOwnPropNames(e))!__hasOwnProp.call(o,i)&&i!==t&&__defProp(o,i,{get:()=>e[i],enumerable:!(s=__getOwnPropDesc(e,i))||s.enumerable});return o},__toCommonJS=o=>__copyProps(__defProp({},"__esModule",{value:!0}),o),__decorateClass=(o,e,t,s)=>{for(var i=s>1?void 0:s?__getOwnPropDesc(e,t):e,n=o.length-1,a;n>=0;n--)(a=o[n])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&__defProp(e,t,i),i},main_exports={};__export(main_exports,{ColumnsToolPanelModule:()=>ColumnsToolPanelModule,PrimaryColsPanel:()=>PrimaryColsPanel}),module.exports=__toCommonJS(main_exports);var import_core12=require("@ag-grid-community/core"),import_core13=require("@ag-grid-enterprise/core"),import_core=require("@ag-grid-community/core"),_PrimaryColsHeaderPanel=class h extends import_core.Component{constructor(){super(h.TEMPLATE)}postConstruct(){this.createExpandIcons(),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eExpand,"keydown",t=>{t.key===import_core.KeyCode.SPACE&&(t.preventDefault(),this.onExpandClicked())}),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedListener(this.eFilterTextField.getInputElement(),"keydown",this.onMiniFilterKeyDown.bind(this)),this.addManagedListener(this.eventService,import_core.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));const e=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gridOptionsService.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=import_core._.createIconNoSpan("columnSelectOpen",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandUnchecked=import_core._.createIconNoSpan("columnSelectClosed",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandIndeterminate=import_core._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsService)),this.setExpandState(0)}showOrHideOptions(){const e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,s=!this.params.suppressColumnExpandAll,i=this.columnModel.isPrimaryColumnGroupsPresent(),n=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(n("searchOoo","Search...")),import_core._.setDisplayed(this.eFilterTextField.getGui(),e),import_core._.setDisplayed(this.eSelect.getGui(),t),import_core._.setDisplayed(this.eExpand,s&&i)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=import_core._.debounce(()=>{const e=this.eFilterTextField.getValue();this.dispatchEvent({type:"filterChanged",filterText:e})},h.DEBOUNCE_DELAY)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(e){e.key===import_core.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),h.DEBOUNCE_DELAY)}onSelectClicked(){this.dispatchEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,import_core._.setDisplayed(this.eExpandChecked,this.expandState===0),import_core._.setDisplayed(this.eExpandUnchecked,this.expandState===1),import_core._.setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}};_PrimaryColsHeaderPanel.DEBOUNCE_DELAY=300,_PrimaryColsHeaderPanel.TEMPLATE=`<div class="ag-column-select-header" role="presentation"> | ||
<ag-primary-cols-list ref="primaryColsListPanel"></ag-primary-cols-list> | ||
</div>`,__decorateClass([(0,import_core9.RefSelector)("primaryColsHeaderPanel")],_PrimaryColsPanel.prototype,"primaryColsHeaderPanel",2),__decorateClass([(0,import_core9.RefSelector)("primaryColsListPanel")],_PrimaryColsPanel.prototype,"primaryColsListPanel",2);var PrimaryColsPanel=_PrimaryColsPanel,_ColumnToolPanel=class E extends import_core10.Component{constructor(){super(E.TEMPLATE),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}init(e){const t=this.gridOptionsService.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params=__spreadValues(__spreadValues({},t),e),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new PivotModePanel),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new PrimaryColsPanel),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new import_row_grouping.RowGroupDropZonePanel(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new import_row_grouping.ValuesDropZonePanel(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new import_row_grouping.PivotDropZonePanel(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const s=this.addManagedListener(this.eventService,import_core10.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>{this.resetChildrenHeight(),this.setLastVisible()});this.childDestroyFuncs.push(()=>s())}this.initialised=!0}setPivotModeSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new PivotModePanel),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new import_row_grouping.RowGroupDropZonePanel(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new import_row_grouping.ValuesDropZonePanel(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new import_row_grouping.PivotDropZonePanel(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(e=>{if(!e)return;const t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))})}setLastVisible(){const e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach(n=>n.classList.remove("ag-last-column-drop"));const s=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),i=import_core10._.last(s);i&&i.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const t=this.getGui().children;for(let s=0;s<t.length;s++){const i=t[s];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return import_core10.ModuleRegistry.__assertRegistered(import_core10.ModuleNames.RowGroupingModule,"Row Grouping",this.context.getGridId())}expandColumnGroups(e){this.primaryColsPanel.expandGroups(e)}collapseColumnGroups(e){this.primaryColsPanel.collapseGroups(e)}setColumnLayout(e){this.primaryColsPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(e=>e()),this.childDestroyFuncs.length=0,import_core10._.clearElement(this.getGui())}refresh(e){return this.destroyChildren(),this.init(e),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}};_ColumnToolPanel.TEMPLATE='<div class="ag-column-panel"></div>';var ColumnToolPanel=_ColumnToolPanel,import_row_grouping2=require("@ag-grid-enterprise/row-grouping"),import_side_bar=require("@ag-grid-enterprise/side-bar"),import_core11=require("@ag-grid-community/core"),ModelItemUtils=class{selectAllChildren(o,e,t){const s=this.extractAllLeafColumns(o);this.setAllColumns(s,e,t)}setColumn(o,e,t){this.setAllColumns([o],e,t)}setAllColumns(o,e,t){this.columnModel.isPivotMode()?this.setAllPivot(o,e,t):this.setAllVisible(o,e,t)}extractAllLeafColumns(o){const e=[],t=s=>{s.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))})};return t(o),e}setAllVisible(o,e,t){const s=[];o.forEach(i=>{i.getColDef().lockVisible||i.isVisible()!=e&&s.push({colId:i.getId(),hide:!e})}),s.length>0&&this.columnModel.applyColumnState({state:s},t)}setAllPivot(o,e,t){this.gridOptionsService.get("functionsPassive")?this.setAllPivotPassive(o,e):this.setAllPivotActive(o,e,t)}setAllPivotPassive(o,e){const t=this.columnModel.getPivotColumns().slice(),s=this.columnModel.getValueColumns().slice(),i=this.columnModel.getRowGroupColumns().slice();let n=!1,a=!1,l=!1;const u=e?d=>{d.isAnyFunctionActive()||(d.isAllowValue()?(s.push(d),a=!0):d.isAllowRowGroup()?(i.push(d),n=!0):d.isAllowPivot()&&(t.push(d),l=!0))}:d=>{d.isAnyFunctionActive()&&(t.indexOf(d)>=0&&(import_core11._.removeFromArray(t,d),n=!0),s.indexOf(d)>=0&&(import_core11._.removeFromArray(s,d),a=!0),i.indexOf(d)>=0&&(import_core11._.removeFromArray(i,d),l=!0))};if(o.forEach(u),n){const d={type:import_core11.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:t};this.eventService.dispatchEvent(d)}if(l){const d={type:import_core11.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(d)}if(a){const d={type:import_core11.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(d)}}setAllPivotActive(o,e,t){const s=[],a=e?l=>{if(!l.isAnyFunctionActive())if(l.isAllowValue()){const r=typeof l.getAggFunc()=="string"?l.getAggFunc():this.aggFuncService.getDefaultAggFunc(l);s.push({colId:l.getId(),aggFunc:r})}else l.isAllowRowGroup()?s.push({colId:l.getId(),rowGroup:!0}):l.isAllowPivot()&&s.push({colId:l.getId(),pivot:!0})}:l=>{(l.isPivotActive()||l.isRowGroupActive()||l.isValueActive())&&s.push({colId:l.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};o.forEach(a),s.length>0&&this.columnModel.applyColumnState({state:s},t)}updateColumns(o){const{columns:e,visibleState:t,pivotState:s,eventType:i}=o,n=e.map(a=>{const l=a.getColId();if(this.columnModel.isPivotMode()){const r=s?.[l];return{colId:l,pivot:r?.pivot,rowGroup:r?.rowGroup,aggFunc:r?.aggFunc}}else return{colId:l,hide:!t?.[l]}});this.columnModel.applyColumnState({state:n},i)}createPivotState(o){return{pivot:o.isPivotActive(),rowGroup:o.isRowGroupActive(),aggFunc:o.isValueActive()?o.getAggFunc():void 0}}};__decorateClass([(0,import_core11.Autowired)("aggFuncService")],ModelItemUtils.prototype,"aggFuncService",2),__decorateClass([(0,import_core11.Autowired)("columnModel")],ModelItemUtils.prototype,"columnModel",2),__decorateClass([(0,import_core11.Autowired)("gridOptionsService")],ModelItemUtils.prototype,"gridOptionsService",2),__decorateClass([(0,import_core11.Autowired)("eventService")],ModelItemUtils.prototype,"eventService",2),ModelItemUtils=__decorateClass([(0,import_core11.Bean)("modelItemUtils")],ModelItemUtils);var VERSION="31.2.0",ColumnsToolPanelModule={version:VERSION,moduleName:import_core12.ModuleNames.ColumnsToolPanelModule,beans:[ModelItemUtils],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:PrimaryColsHeaderPanel},{componentName:"AgPrimaryColsList",componentClass:PrimaryColsListPanel},{componentName:"AgPrimaryCols",componentClass:PrimaryColsPanel}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:ColumnToolPanel}],dependantModules:[import_core13.EnterpriseCoreModule,import_row_grouping2.RowGroupingModule,import_side_bar.SideBarModule]}; | ||
</div>`,__decorateClass([(0,import_core9.RefSelector)("primaryColsHeaderPanel")],_PrimaryColsPanel.prototype,"primaryColsHeaderPanel",2),__decorateClass([(0,import_core9.RefSelector)("primaryColsListPanel")],_PrimaryColsPanel.prototype,"primaryColsListPanel",2);var PrimaryColsPanel=_PrimaryColsPanel,_ColumnToolPanel=class E extends import_core10.Component{constructor(){super(E.TEMPLATE),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(e){super.setDisplayed(e),e&&!this.initialised&&this.init(this.params)}init(e){const t=this.gridOptionsService.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params=__spreadValues(__spreadValues({},t),e),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new PivotModePanel),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new PrimaryColsPanel),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new import_row_grouping.RowGroupDropZonePanel(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new import_row_grouping.ValuesDropZonePanel(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new import_row_grouping.PivotDropZonePanel(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const s=this.addManagedListener(this.eventService,import_core10.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>{this.resetChildrenHeight(),this.setLastVisible()});this.childDestroyFuncs.push(()=>s())}this.initialised=!0}setPivotModeSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new PivotModePanel),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new import_row_grouping.RowGroupDropZonePanel(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new import_row_grouping.ValuesDropZonePanel(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new import_row_grouping.PivotDropZonePanel(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(e=>{if(!e)return;const t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))})}setLastVisible(){const e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEach(n=>n.classList.remove("ag-last-column-drop"));const s=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),i=import_core10._.last(s);i&&i.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const t=this.getGui().children;for(let s=0;s<t.length;s++){const i=t[s];i.style.removeProperty("height"),i.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return import_core10.ModuleRegistry.__assertRegistered(import_core10.ModuleNames.RowGroupingModule,"Row Grouping",this.context.getGridId())}expandColumnGroups(e){this.primaryColsPanel.expandGroups(e)}collapseColumnGroups(e){this.primaryColsPanel.collapseGroups(e)}setColumnLayout(e){this.primaryColsPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(e=>e()),this.childDestroyFuncs.length=0,import_core10._.clearElement(this.getGui())}refresh(e){return this.destroyChildren(),this.init(e),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}};_ColumnToolPanel.TEMPLATE='<div class="ag-column-panel"></div>';var ColumnToolPanel=_ColumnToolPanel,import_row_grouping2=require("@ag-grid-enterprise/row-grouping"),import_side_bar=require("@ag-grid-enterprise/side-bar"),import_core11=require("@ag-grid-community/core"),ModelItemUtils=class{selectAllChildren(o,e,t){const s=this.extractAllLeafColumns(o);this.setAllColumns(s,e,t)}setColumn(o,e,t){this.setAllColumns([o],e,t)}setAllColumns(o,e,t){this.columnModel.isPivotMode()?this.setAllPivot(o,e,t):this.setAllVisible(o,e,t)}extractAllLeafColumns(o){const e=[],t=s=>{s.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?t(i.getChildren()):e.push(i.getColumn()))})};return t(o),e}setAllVisible(o,e,t){const s=[];o.forEach(i=>{i.getColDef().lockVisible||i.isVisible()!=e&&s.push({colId:i.getId(),hide:!e})}),s.length>0&&this.columnModel.applyColumnState({state:s},t)}setAllPivot(o,e,t){this.gridOptionsService.get("functionsPassive")?this.setAllPivotPassive(o,e):this.setAllPivotActive(o,e,t)}setAllPivotPassive(o,e){const t=this.columnModel.getPivotColumns().slice(),s=this.columnModel.getValueColumns().slice(),i=this.columnModel.getRowGroupColumns().slice();let n=!1,a=!1,l=!1;const u=e?d=>{d.isAnyFunctionActive()||(d.isAllowValue()?(s.push(d),a=!0):d.isAllowRowGroup()?(i.push(d),n=!0):d.isAllowPivot()&&(t.push(d),l=!0))}:d=>{d.isAnyFunctionActive()&&(t.indexOf(d)>=0&&(import_core11._.removeFromArray(t,d),n=!0),s.indexOf(d)>=0&&(import_core11._.removeFromArray(s,d),a=!0),i.indexOf(d)>=0&&(import_core11._.removeFromArray(i,d),l=!0))};if(o.forEach(u),n){const d={type:import_core11.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:t};this.eventService.dispatchEvent(d)}if(l){const d={type:import_core11.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(d)}if(a){const d={type:import_core11.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(d)}}setAllPivotActive(o,e,t){const s=[],a=e?l=>{if(!l.isAnyFunctionActive())if(l.isAllowValue()){const r=typeof l.getAggFunc()=="string"?l.getAggFunc():this.aggFuncService.getDefaultAggFunc(l);s.push({colId:l.getId(),aggFunc:r})}else l.isAllowRowGroup()?s.push({colId:l.getId(),rowGroup:!0}):l.isAllowPivot()&&s.push({colId:l.getId(),pivot:!0})}:l=>{(l.isPivotActive()||l.isRowGroupActive()||l.isValueActive())&&s.push({colId:l.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};o.forEach(a),s.length>0&&this.columnModel.applyColumnState({state:s},t)}updateColumns(o){const{columns:e,visibleState:t,pivotState:s,eventType:i}=o,n=e.map(a=>{const l=a.getColId();if(this.columnModel.isPivotMode()){const r=s?.[l];return{colId:l,pivot:r?.pivot,rowGroup:r?.rowGroup,aggFunc:r?.aggFunc}}else return{colId:l,hide:!t?.[l]}});this.columnModel.applyColumnState({state:n},i)}createPivotState(o){return{pivot:o.isPivotActive(),rowGroup:o.isRowGroupActive(),aggFunc:o.isValueActive()?o.getAggFunc():void 0}}};__decorateClass([(0,import_core11.Autowired)("aggFuncService")],ModelItemUtils.prototype,"aggFuncService",2),__decorateClass([(0,import_core11.Autowired)("columnModel")],ModelItemUtils.prototype,"columnModel",2),__decorateClass([(0,import_core11.Autowired)("gridOptionsService")],ModelItemUtils.prototype,"gridOptionsService",2),__decorateClass([(0,import_core11.Autowired)("eventService")],ModelItemUtils.prototype,"eventService",2),ModelItemUtils=__decorateClass([(0,import_core11.Bean)("modelItemUtils")],ModelItemUtils);var VERSION="31.2.1",ColumnsToolPanelModule={version:VERSION,moduleName:import_core12.ModuleNames.ColumnsToolPanelModule,beans:[ModelItemUtils],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:PrimaryColsHeaderPanel},{componentName:"AgPrimaryColsList",componentClass:PrimaryColsListPanel},{componentName:"AgPrimaryCols",componentClass:PrimaryColsPanel}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:ColumnToolPanel}],dependantModules:[import_core13.EnterpriseCoreModule,import_row_grouping2.RowGroupingModule,import_side_bar.SideBarModule]}; |
{ | ||
"name": "@ag-grid-enterprise/column-tool-panel", | ||
"version": "31.2.0", | ||
"version": "31.2.1", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -15,6 +15,6 @@ "main": "./dist/package/main.cjs.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "31.2.0", | ||
"@ag-grid-enterprise/core": "31.2.0", | ||
"@ag-grid-enterprise/row-grouping": "31.2.0", | ||
"@ag-grid-enterprise/side-bar": "31.2.0" | ||
"@ag-grid-community/core": "31.2.1", | ||
"@ag-grid-enterprise/core": "31.2.1", | ||
"@ag-grid-enterprise/row-grouping": "31.2.1", | ||
"@ag-grid-enterprise/side-bar": "31.2.1" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
{ | ||
"name": "@ag-grid-enterprise/column-tool-panel", | ||
"version": "31.2.0", | ||
"version": "31.2.1", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -15,6 +15,6 @@ "main": "./src/main.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "31.2.0", | ||
"@ag-grid-enterprise/core": "31.2.0", | ||
"@ag-grid-enterprise/row-grouping": "31.2.0", | ||
"@ag-grid-enterprise/side-bar": "31.2.0" | ||
"@ag-grid-community/core": "31.2.1", | ||
"@ag-grid-enterprise/core": "31.2.1", | ||
"@ag-grid-enterprise/row-grouping": "31.2.1", | ||
"@ag-grid-enterprise/side-bar": "31.2.1" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "31.2.0"; | ||
export declare const VERSION = "31.2.1"; |
{ | ||
"name": "@ag-grid-enterprise/column-tool-panel", | ||
"version": "31.2.0", | ||
"version": "31.2.1", | ||
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue", | ||
@@ -15,6 +15,6 @@ "main": "./dist/package/main.cjs.js", | ||
"dependencies": { | ||
"@ag-grid-community/core": "31.2.0", | ||
"@ag-grid-enterprise/core": "31.2.0", | ||
"@ag-grid-enterprise/row-grouping": "31.2.0", | ||
"@ag-grid-enterprise/side-bar": "31.2.0" | ||
"@ag-grid-community/core": "31.2.1", | ||
"@ag-grid-enterprise/core": "31.2.1", | ||
"@ag-grid-enterprise/row-grouping": "31.2.1", | ||
"@ag-grid-enterprise/side-bar": "31.2.1" | ||
}, | ||
@@ -21,0 +21,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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
+ Added@ag-grid-community/core@31.2.1(transitive)
+ Added@ag-grid-enterprise/core@31.2.1(transitive)
+ Added@ag-grid-enterprise/row-grouping@31.2.1(transitive)
+ Added@ag-grid-enterprise/side-bar@31.2.1(transitive)
- Removed@ag-grid-community/core@31.2.0(transitive)
- Removed@ag-grid-enterprise/core@31.2.0(transitive)
- Removed@ag-grid-enterprise/row-grouping@31.2.0(transitive)
- Removed@ag-grid-enterprise/side-bar@31.2.0(transitive)