Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ag-grid-enterprise/status-bar

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-grid-enterprise/status-bar - npm Package Compare versions

Comparing version 31.2.1 to 31.3.0

70

dist/package/main.cjs.js

@@ -81,3 +81,3 @@ var __defProp = Object.defineProperty;

var _a;
const statusPanels = (_a = this.gridOptionsService.get("statusBar")) == null ? void 0 : _a.statusPanels;
const statusPanels = (_a = this.gos.get("statusBar")) == null ? void 0 : _a.statusPanels;
if (statusPanels) {

@@ -96,3 +96,3 @@ const leftStatusPanelComponents = statusPanels.filter((componentConfig) => componentConfig.align === "left");

var _a;
const statusPanels = (_a = this.gridOptionsService.get("statusBar")) == null ? void 0 : _a.statusPanels;
const statusPanels = (_a = this.gos.get("statusBar")) == null ? void 0 : _a.statusPanels;
const validStatusBarPanelsProvided = Array.isArray(statusPanels) && statusPanels.length > 0;

@@ -107,3 +107,3 @@ this.setDisplayed(validStatusBarPanelsProvided);

if (existingStatusPanel == null ? void 0 : existingStatusPanel.refresh) {
const newParams = this.gridOptionsService.addGridCommonParams((_b = statusPanelConfig.statusPanelParams) != null ? _b : {});
const newParams = this.gos.addGridCommonParams((_b = statusPanelConfig.statusPanelParams) != null ? _b : {});
const hasRefreshed = existingStatusPanel.refresh(newParams);

@@ -234,4 +234,4 @@ if (hasRefreshed) {

postConstruct() {
if (this.gridApi.__getModel().getType() !== "clientSide") {
console.warn(`AG Grid: agTotalAndFilteredRowCountComponent should only be used with the client side row model.`);
if (this.rowModel.getType() !== "clientSide") {
import_core4._.warnOnce(`agTotalAndFilteredRowCountComponent should only be used with the client side row model.`);
return;

@@ -261,3 +261,3 @@ }

let filteredRowCount = 0;
this.gridApi.forEachNodeAfterFilter((node) => {
this.rowModel.forEachNodeAfterFilter((node) => {
if (!node.group) {

@@ -271,3 +271,3 @@ filteredRowCount++;

let totalRowCount = 0;
this.gridApi.forEachNode((node) => {
this.rowModel.forEachNode((node) => {
if (!node.group) {

@@ -291,4 +291,4 @@ totalRowCount++;

__decorateClass([
(0, import_core4.Autowired)("gridApi")
], TotalAndFilteredRowsComp.prototype, "gridApi", 2);
(0, import_core4.Autowired)("rowModel")
], TotalAndFilteredRowsComp.prototype, "rowModel", 2);
__decorateClass([

@@ -303,4 +303,4 @@ import_core4.PostConstruct

this.setLabel("filteredRows", "Filtered");
if (this.gridApi.__getModel().getType() !== "clientSide") {
console.warn(`AG Grid: agFilteredRowCountComponent should only be used with the client side row model.`);
if (this.rowModel.getType() !== "clientSide") {
import_core5._.warnOnce(`agFilteredRowCountComponent should only be used with the client side row model.`);
return;

@@ -326,3 +326,3 @@ }

let totalRowCount = 0;
this.gridApi.forEachNode((node) => totalRowCount += 1);
this.rowModel.forEachNode((node) => totalRowCount += 1);
return totalRowCount;

@@ -332,3 +332,3 @@ }

let filteredRowCount = 0;
this.gridApi.forEachNodeAfterFilter((node) => {
this.rowModel.forEachNodeAfterFilter((node) => {
if (!node.group) {

@@ -352,4 +352,4 @@ filteredRowCount += 1;

__decorateClass([
(0, import_core5.Autowired)("gridApi")
], FilteredRowsComp.prototype, "gridApi", 2);
(0, import_core5.Autowired)("rowModel")
], FilteredRowsComp.prototype, "rowModel", 2);
__decorateClass([

@@ -364,4 +364,4 @@ import_core5.PostConstruct

this.setLabel("totalRows", "Total Rows");
if (this.gridApi.__getModel().getType() !== "clientSide") {
console.warn(`AG Grid: agTotalRowCountComponent should only be used with the client side row model.`);
if (this.rowModel.getType() !== "clientSide") {
import_core6._.warnOnce("agTotalRowCountComponent should only be used with the client side row model.");
return;

@@ -383,3 +383,3 @@ }

let totalRowCount = 0;
this.gridApi.forEachLeafNode((node) => totalRowCount += 1);
this.rowModel.forEachLeafNode((node) => totalRowCount += 1);
return totalRowCount;

@@ -399,4 +399,4 @@ }

__decorateClass([
(0, import_core6.Autowired)("gridApi")
], TotalRowsComp.prototype, "gridApi", 2);
(0, import_core6.Autowired)("rowModel")
], TotalRowsComp.prototype, "rowModel", 2);
__decorateClass([

@@ -423,3 +423,3 @@ import_core6.PostConstruct

isValidRowModel() {
const rowModelType = this.gridApi.__getModel().getType();
const rowModelType = this.rowModel.getType();
return rowModelType === "clientSide" || rowModelType === "serverSide";

@@ -452,4 +452,4 @@ }

__decorateClass([
(0, import_core7.Autowired)("gridApi")
], SelectedRowsComp.prototype, "gridApi", 2);
(0, import_core7.Autowired)("rowModel")
], SelectedRowsComp.prototype, "rowModel", 2);
__decorateClass([

@@ -487,3 +487,3 @@ (0, import_core7.Autowired)("selectionService")

isValidRowModel() {
const rowModelType = this.gridApi.__getModel().getType();
const rowModelType = this.rowModel.getType();
return rowModelType === "clientSide" || rowModelType === "serverSide";

@@ -524,3 +524,4 @@ }

onRangeSelectionChanged() {
const cellRanges = this.rangeService ? this.rangeService.getCellRanges() : void 0;
var _a;
const cellRanges = (_a = this.rangeService) == null ? void 0 : _a.getCellRanges();
let sum = 0;

@@ -532,4 +533,5 @@ let count = 0;

const cellsSoFar = {};
if (cellRanges && !import_core8._.missingOrEmpty(cellRanges)) {
cellRanges.forEach((cellRange) => {
if (cellRanges && !import_core8._.missingOrEmpty(cellRanges) && this.rangeService) {
for (let i = 0; i < cellRanges.length; i++) {
const cellRange = cellRanges[i];
let currentRow = this.rangeService.getRangeStartRow(cellRange);

@@ -555,3 +557,3 @@ const lastRow = this.rangeService.getRangeEndRow(cellRange);

cellsSoFar[cellId] = true;
const rowNode = this.rowRenderer.getRowNode(currentRow);
const rowNode = this.rowPositionUtils.getRowNode(currentRow);
if (import_core8._.missing(rowNode)) {

@@ -587,3 +589,4 @@ return;

}
});
}
;
}

@@ -617,8 +620,5 @@ const gotResult = count > 1;

__decorateClass([
(0, import_core8.Autowired)("rowRenderer")
], _AggregationComp.prototype, "rowRenderer", 2);
(0, import_core8.Autowired)("rowModel")
], _AggregationComp.prototype, "rowModel", 2);
__decorateClass([
(0, import_core8.Autowired)("gridApi")
], _AggregationComp.prototype, "gridApi", 2);
__decorateClass([
(0, import_core8.Autowired)("cellPositionUtils")

@@ -650,3 +650,3 @@ ], _AggregationComp.prototype, "cellPositionUtils", 2);

// enterprise-modules/status-bar/src/version.ts
var VERSION = "31.2.1";
var VERSION = "31.3.0";

@@ -653,0 +653,0 @@ // enterprise-modules/status-bar/src/statusBarModule.ts

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

var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var o in e)__defProp(t,o,{get:e[o],enumerable:!0})},__copyProps=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of __getOwnPropNames(e))!__hasOwnProp.call(t,a)&&a!==o&&__defProp(t,a,{get:()=>e[a],enumerable:!(s=__getOwnPropDesc(e,a))||s.enumerable});return t},__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),__decorateClass=(t,e,o,s)=>{for(var a=s>1?void 0:s?__getOwnPropDesc(e,o):e,r=t.length-1,n;r>=0;r--)(n=t[r])&&(a=(s?n(e,o,a):n(a))||a);return s&&a&&__defProp(e,o,a),a},main_exports={};__export(main_exports,{StatusBarModule:()=>StatusBarModule}),module.exports=__toCommonJS(main_exports);var import_core9=require("@ag-grid-community/core"),import_core10=require("@ag-grid-enterprise/core"),import_core=require("@ag-grid-community/core"),StatusBarService=class extends import_core.BeanStub{constructor(){super(),this.allComponents=new Map}registerStatusPanel(t,e){this.allComponents.set(t,e)}unregisterStatusPanel(t){this.allComponents.delete(t)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(t){return this.allComponents.get(t)}destroy(){this.unregisterAllComponents(),super.destroy()}};StatusBarService=__decorateClass([(0,import_core.Bean)("statusBarService")],StatusBarService);var import_core2=require("@ag-grid-community/core"),_StatusBar=class C extends import_core2.Component{constructor(){super(C.TEMPLATE),this.compDestroyFunctions={}}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(e){var o;const s=(o=this.gridOptionsService.get("statusBar"))==null?void 0:o.statusPanels;if(s){const a=s.filter(i=>i.align==="left");this.createAndRenderComponents(a,this.eStatusBarLeft,e);const r=s.filter(i=>i.align==="center");this.createAndRenderComponents(r,this.eStatusBarCenter,e);const n=s.filter(i=>!i.align||i.align==="right");this.createAndRenderComponents(n,this.eStatusBarRight,e)}else this.setDisplayed(!1)}handleStatusBarChanged(){var e;const o=(e=this.gridOptionsService.get("statusBar"))==null?void 0:e.statusPanels,s=Array.isArray(o)&&o.length>0;this.setDisplayed(s);const a=new Map;s&&o.forEach(r=>{var n,i;const u=(n=r.key)!=null?n:r.statusPanel,c=this.statusBarService.getStatusPanel(u);if(c?.refresh){const d=this.gridOptionsService.addGridCommonParams((i=r.statusPanelParams)!=null?i:{});c.refresh(d)&&(a.set(u,c),delete this.compDestroyFunctions[u],import_core2._.removeFromParent(c.getGui()))}}),this.resetStatusBar(),s&&this.processStatusPanels(a)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach(e=>e()),this.compDestroyFunctions={}}createAndRenderComponents(e,o,s){const a=[];e.forEach(r=>{const n=r.key||r.statusPanel,i=s.get(n);let u;if(i)u=import_core2.AgPromise.resolve(i);else{const c={};if(u=this.userComponentFactory.getStatusPanelCompDetails(r,c).newAgStackInstance(),!u)return}a.push({key:n,promise:u})}),import_core2.AgPromise.all(a.map(r=>r.promise)).then(()=>{a.forEach(r=>{r.promise.then(n=>{const i=()=>{this.getContext().destroyBean(n)};this.isAlive()?(this.statusBarService.registerStatusPanel(r.key,n),o.appendChild(n.getGui()),this.compDestroyFunctions[r.key]=i):i()})})})}};_StatusBar.TEMPLATE=`<div class="ag-status-bar">
var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var o in e)__defProp(t,o,{get:e[o],enumerable:!0})},__copyProps=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of __getOwnPropNames(e))!__hasOwnProp.call(t,a)&&a!==o&&__defProp(t,a,{get:()=>e[a],enumerable:!(s=__getOwnPropDesc(e,a))||s.enumerable});return t},__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),__decorateClass=(t,e,o,s)=>{for(var a=s>1?void 0:s?__getOwnPropDesc(e,o):e,r=t.length-1,n;r>=0;r--)(n=t[r])&&(a=(s?n(e,o,a):n(a))||a);return s&&a&&__defProp(e,o,a),a},main_exports={};__export(main_exports,{StatusBarModule:()=>StatusBarModule}),module.exports=__toCommonJS(main_exports);var import_core9=require("@ag-grid-community/core"),import_core10=require("@ag-grid-enterprise/core"),import_core=require("@ag-grid-community/core"),StatusBarService=class extends import_core.BeanStub{constructor(){super(),this.allComponents=new Map}registerStatusPanel(t,e){this.allComponents.set(t,e)}unregisterStatusPanel(t){this.allComponents.delete(t)}unregisterAllComponents(){this.allComponents.clear()}getStatusPanel(t){return this.allComponents.get(t)}destroy(){this.unregisterAllComponents(),super.destroy()}};StatusBarService=__decorateClass([(0,import_core.Bean)("statusBarService")],StatusBarService);var import_core2=require("@ag-grid-community/core"),_StatusBar=class S extends import_core2.Component{constructor(){super(S.TEMPLATE),this.compDestroyFunctions={}}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this))}processStatusPanels(e){var o;const s=(o=this.gos.get("statusBar"))==null?void 0:o.statusPanels;if(s){const a=s.filter(i=>i.align==="left");this.createAndRenderComponents(a,this.eStatusBarLeft,e);const r=s.filter(i=>i.align==="center");this.createAndRenderComponents(r,this.eStatusBarCenter,e);const n=s.filter(i=>!i.align||i.align==="right");this.createAndRenderComponents(n,this.eStatusBarRight,e)}else this.setDisplayed(!1)}handleStatusBarChanged(){var e;const o=(e=this.gos.get("statusBar"))==null?void 0:e.statusPanels,s=Array.isArray(o)&&o.length>0;this.setDisplayed(s);const a=new Map;s&&o.forEach(r=>{var n,i;const u=(n=r.key)!=null?n:r.statusPanel,d=this.statusBarService.getStatusPanel(u);if(d?.refresh){const g=this.gos.addGridCommonParams((i=r.statusPanelParams)!=null?i:{});d.refresh(g)&&(a.set(u,d),delete this.compDestroyFunctions[u],import_core2._.removeFromParent(d.getGui()))}}),this.resetStatusBar(),s&&this.processStatusPanels(a)}resetStatusBar(){this.eStatusBarLeft.innerHTML="",this.eStatusBarCenter.innerHTML="",this.eStatusBarRight.innerHTML="",this.destroyComponents(),this.statusBarService.unregisterAllComponents()}destroyComponents(){Object.values(this.compDestroyFunctions).forEach(e=>e()),this.compDestroyFunctions={}}createAndRenderComponents(e,o,s){const a=[];e.forEach(r=>{const n=r.key||r.statusPanel,i=s.get(n);let u;if(i)u=import_core2.AgPromise.resolve(i);else{const d={};if(u=this.userComponentFactory.getStatusPanelCompDetails(r,d).newAgStackInstance(),!u)return}a.push({key:n,promise:u})}),import_core2.AgPromise.all(a.map(r=>r.promise)).then(()=>{a.forEach(r=>{r.promise.then(n=>{const i=()=>{this.getContext().destroyBean(n)};this.isAlive()?(this.statusBarService.registerStatusPanel(r.key,n),o.appendChild(n.getGui()),this.compDestroyFunctions[r.key]=i):i()})})})}};_StatusBar.TEMPLATE=`<div class="ag-status-bar">
<div ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>
<div ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>
<div ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>
</div>`,__decorateClass([(0,import_core2.Autowired)("userComponentFactory")],_StatusBar.prototype,"userComponentFactory",2),__decorateClass([(0,import_core2.Autowired)("statusBarService")],_StatusBar.prototype,"statusBarService",2),__decorateClass([(0,import_core2.RefSelector)("eStatusBarLeft")],_StatusBar.prototype,"eStatusBarLeft",2),__decorateClass([(0,import_core2.RefSelector)("eStatusBarCenter")],_StatusBar.prototype,"eStatusBarCenter",2),__decorateClass([(0,import_core2.RefSelector)("eStatusBarRight")],_StatusBar.prototype,"eStatusBarRight",2),__decorateClass([import_core2.PostConstruct],_StatusBar.prototype,"postConstruct",1),__decorateClass([import_core2.PreDestroy],_StatusBar.prototype,"destroyComponents",1);var StatusBar=_StatusBar,import_core3=require("@ag-grid-community/core"),_NameValueComp=class v extends import_core3.Component{constructor(){super(v.TEMPLATE)}setLabel(e,o){this.setDisplayed(!1);const s=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=s(e,o)}setValue(e){this.eValue.innerHTML=e}};_NameValueComp.TEMPLATE=`<div class="ag-status-name-value">
</div>`,__decorateClass([(0,import_core2.Autowired)("userComponentFactory")],_StatusBar.prototype,"userComponentFactory",2),__decorateClass([(0,import_core2.Autowired)("statusBarService")],_StatusBar.prototype,"statusBarService",2),__decorateClass([(0,import_core2.RefSelector)("eStatusBarLeft")],_StatusBar.prototype,"eStatusBarLeft",2),__decorateClass([(0,import_core2.RefSelector)("eStatusBarCenter")],_StatusBar.prototype,"eStatusBarCenter",2),__decorateClass([(0,import_core2.RefSelector)("eStatusBarRight")],_StatusBar.prototype,"eStatusBarRight",2),__decorateClass([import_core2.PostConstruct],_StatusBar.prototype,"postConstruct",1),__decorateClass([import_core2.PreDestroy],_StatusBar.prototype,"destroyComponents",1);var StatusBar=_StatusBar,import_core3=require("@ag-grid-community/core"),_NameValueComp=class w extends import_core3.Component{constructor(){super(w.TEMPLATE)}setLabel(e,o){this.setDisplayed(!1);const s=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=s(e,o)}setValue(e){this.eValue.innerHTML=e}};_NameValueComp.TEMPLATE=`<div class="ag-status-name-value">
<span ref="eLabel"></span>:&nbsp;
<span ref="eValue" class="ag-status-name-value-value"></span>
</div>`,__decorateClass([(0,import_core3.RefSelector)("eLabel")],_NameValueComp.prototype,"eLabel",2),__decorateClass([(0,import_core3.RefSelector)("eValue")],_NameValueComp.prototype,"eValue",2);var NameValueComp=_NameValueComp,import_core4=require("@ag-grid-community/core"),TotalAndFilteredRowsComp=class extends NameValueComp{postConstruct(){if(this.gridApi.__getModel().getType()!=="clientSide"){console.warn("AG Grid: agTotalAndFilteredRowCountComponent should only be used with the client side row model.");return}this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,import_core4.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()}onDataChanged(){const t=this.localeService.getLocaleTextFunc(),e=t("thousandSeparator",","),o=t("decimalSeparator","."),s=import_core4._.formatNumberCommas(this.getFilteredRowCountValue(),e,o),a=import_core4._.formatNumberCommas(this.getTotalRowCount(),e,o);if(s===a)this.setValue(s);else{const r=this.localeService.getLocaleTextFunc();this.setValue(`${s} ${r("of","of")} ${a}`)}}getFilteredRowCountValue(){let t=0;return this.gridApi.forEachNodeAfterFilter(e=>{e.group||t++}),t}getTotalRowCount(){let t=0;return this.gridApi.forEachNode(e=>{e.group||t++}),t}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core4.Autowired)("gridApi")],TotalAndFilteredRowsComp.prototype,"gridApi",2),__decorateClass([import_core4.PostConstruct],TotalAndFilteredRowsComp.prototype,"postConstruct",1);var import_core5=require("@ag-grid-community/core"),FilteredRowsComp=class extends NameValueComp{postConstruct(){if(this.setLabel("filteredRows","Filtered"),this.gridApi.__getModel().getType()!=="clientSide"){console.warn("AG Grid: agFilteredRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);const t=this.onDataChanged.bind(this);this.addManagedListener(this.eventService,import_core5.Events.EVENT_MODEL_UPDATED,t),t()}onDataChanged(){const t=this.getTotalRowCountValue(),e=this.getFilteredRowCountValue(),o=this.localeService.getLocaleTextFunc(),s=o("thousandSeparator",","),a=o("decimalSeparator",".");this.setValue(import_core5._.formatNumberCommas(e,s,a)),this.setDisplayed(t!==e)}getTotalRowCountValue(){let t=0;return this.gridApi.forEachNode(e=>t+=1),t}getFilteredRowCountValue(){let t=0;return this.gridApi.forEachNodeAfterFilter(e=>{e.group||(t+=1)}),t}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core5.Autowired)("gridApi")],FilteredRowsComp.prototype,"gridApi",2),__decorateClass([import_core5.PostConstruct],FilteredRowsComp.prototype,"postConstruct",1);var import_core6=require("@ag-grid-community/core"),TotalRowsComp=class extends NameValueComp{postConstruct(){if(this.setLabel("totalRows","Total Rows"),this.gridApi.__getModel().getType()!=="clientSide"){console.warn("AG Grid: agTotalRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,import_core6.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()}onDataChanged(){const t=this.localeService.getLocaleTextFunc(),e=t("thousandSeparator",","),o=t("decimalSeparator",".");this.setValue(import_core6._.formatNumberCommas(this.getRowCountValue(),e,o))}getRowCountValue(){let t=0;return this.gridApi.forEachLeafNode(e=>t+=1),t}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core6.Autowired)("gridApi")],TotalRowsComp.prototype,"gridApi",2),__decorateClass([import_core6.PostConstruct],TotalRowsComp.prototype,"postConstruct",1);var import_core7=require("@ag-grid-community/core"),SelectedRowsComp=class extends NameValueComp{postConstruct(){if(!this.isValidRowModel()){console.warn("AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.");return}this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();const t=this.onRowSelectionChanged.bind(this);this.addManagedListener(this.eventService,import_core7.Events.EVENT_MODEL_UPDATED,t),this.addManagedListener(this.eventService,import_core7.Events.EVENT_SELECTION_CHANGED,t)}isValidRowModel(){const t=this.gridApi.__getModel().getType();return t==="clientSide"||t==="serverSide"}onRowSelectionChanged(){const t=this.selectionService.getSelectionCount();if(t<0){this.setValue("?"),this.setDisplayed(!0);return}const e=this.localeService.getLocaleTextFunc(),o=e("thousandSeparator",","),s=e("decimalSeparator",".");this.setValue(import_core7._.formatNumberCommas(t,o,s)),this.setDisplayed(t>0)}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core7.Autowired)("gridApi")],SelectedRowsComp.prototype,"gridApi",2),__decorateClass([(0,import_core7.Autowired)("selectionService")],SelectedRowsComp.prototype,"selectionService",2),__decorateClass([import_core7.PostConstruct],SelectedRowsComp.prototype,"postConstruct",1);var import_core8=require("@ag-grid-community/core"),_AggregationComp=class S extends import_core8.Component{constructor(){super(S.TEMPLATE)}destroy(){super.destroy()}postConstruct(){if(!this.isValidRowModel()){console.warn("AG Grid: agAggregationComponent should only be used with the client and server side row model.");return}this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedListener(this.eventService,import_core8.Events.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.addManagedListener(this.eventService,import_core8.Events.EVENT_MODEL_UPDATED,this.onRangeSelectionChanged.bind(this))}isValidRowModel(){const e=this.gridApi.__getModel().getType();return e==="clientSide"||e==="serverSide"}init(e){this.params=e}refresh(e){return this.params=e,this.onRangeSelectionChanged(),!0}setAggregationComponentValue(e,o,s){var a;const r=this.getAllowedAggregationValueComponent(e);if(import_core8._.exists(r)&&r){const n=this.localeService.getLocaleTextFunc(),i=n("thousandSeparator",","),u=n("decimalSeparator",".");r.setValue(import_core8._.formatNumberTwoDecimalPlacesAndCommas(o,i,u)),r.setDisplayed(s)}else(a=this.getAggregationValueComponent(e))==null||a.setDisplayed(!1)}getAllowedAggregationValueComponent(e){const{aggFuncs:o}=this.params;return!o||o.includes(e)?this.getAggregationValueComponent(e):null}getAggregationValueComponent(e){const o=`${e}AggregationComp`;return this[o]}onRangeSelectionChanged(){const e=this.rangeService?this.rangeService.getCellRanges():void 0;let o=0,s=0,a=0,r=null,n=null;const i={};e&&!import_core8._.missingOrEmpty(e)&&e.forEach(d=>{let g=this.rangeService.getRangeStartRow(d);const A=this.rangeService.getRangeEndRow(d);for(;!(import_core8._.missing(g)||!g||this.rowPositionUtils.before(A,g)||!g||!d.columns);)d.columns.forEach(p=>{if(g===null)return;const m=this.cellPositionUtils.createId({rowPinned:g.rowPinned,column:p,rowIndex:g.rowIndex});if(i[m])return;i[m]=!0;const h=this.rowRenderer.getRowNode(g);if(import_core8._.missing(h))return;let l=this.valueService.getValue(p,h);import_core8._.missing(l)||l===""||(s++,!(typeof l=="object"&&"value"in l&&(l=l.value,l===""))&&(typeof l=="string"&&(l=Number(l)),typeof l=="number"&&!isNaN(l)&&(o+=l,(n===null||l>n)&&(n=l),(r===null||l<r)&&(r=l),a++)))}),g=this.cellNavigationService.getRowBelow(g)});const u=s>1,c=a>1;this.setAggregationComponentValue("count",s,u),this.setAggregationComponentValue("sum",o,c),this.setAggregationComponentValue("min",r,c),this.setAggregationComponentValue("max",n,c),this.setAggregationComponentValue("avg",o/a,c)}};_AggregationComp.TEMPLATE=`<div class="ag-status-panel ag-status-panel-aggregations">
</div>`,__decorateClass([(0,import_core3.RefSelector)("eLabel")],_NameValueComp.prototype,"eLabel",2),__decorateClass([(0,import_core3.RefSelector)("eValue")],_NameValueComp.prototype,"eValue",2);var NameValueComp=_NameValueComp,import_core4=require("@ag-grid-community/core"),TotalAndFilteredRowsComp=class extends NameValueComp{postConstruct(){if(this.rowModel.getType()!=="clientSide"){import_core4._.warnOnce("agTotalAndFilteredRowCountComponent should only be used with the client side row model.");return}this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,import_core4.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()}onDataChanged(){const t=this.localeService.getLocaleTextFunc(),e=t("thousandSeparator",","),o=t("decimalSeparator","."),s=import_core4._.formatNumberCommas(this.getFilteredRowCountValue(),e,o),a=import_core4._.formatNumberCommas(this.getTotalRowCount(),e,o);if(s===a)this.setValue(s);else{const r=this.localeService.getLocaleTextFunc();this.setValue(`${s} ${r("of","of")} ${a}`)}}getFilteredRowCountValue(){let t=0;return this.rowModel.forEachNodeAfterFilter(e=>{e.group||t++}),t}getTotalRowCount(){let t=0;return this.rowModel.forEachNode(e=>{e.group||t++}),t}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core4.Autowired)("rowModel")],TotalAndFilteredRowsComp.prototype,"rowModel",2),__decorateClass([import_core4.PostConstruct],TotalAndFilteredRowsComp.prototype,"postConstruct",1);var import_core5=require("@ag-grid-community/core"),FilteredRowsComp=class extends NameValueComp{postConstruct(){if(this.setLabel("filteredRows","Filtered"),this.rowModel.getType()!=="clientSide"){import_core5._.warnOnce("agFilteredRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);const t=this.onDataChanged.bind(this);this.addManagedListener(this.eventService,import_core5.Events.EVENT_MODEL_UPDATED,t),t()}onDataChanged(){const t=this.getTotalRowCountValue(),e=this.getFilteredRowCountValue(),o=this.localeService.getLocaleTextFunc(),s=o("thousandSeparator",","),a=o("decimalSeparator",".");this.setValue(import_core5._.formatNumberCommas(e,s,a)),this.setDisplayed(t!==e)}getTotalRowCountValue(){let t=0;return this.rowModel.forEachNode(e=>t+=1),t}getFilteredRowCountValue(){let t=0;return this.rowModel.forEachNodeAfterFilter(e=>{e.group||(t+=1)}),t}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core5.Autowired)("rowModel")],FilteredRowsComp.prototype,"rowModel",2),__decorateClass([import_core5.PostConstruct],FilteredRowsComp.prototype,"postConstruct",1);var import_core6=require("@ag-grid-community/core"),TotalRowsComp=class extends NameValueComp{postConstruct(){if(this.setLabel("totalRows","Total Rows"),this.rowModel.getType()!=="clientSide"){import_core6._.warnOnce("agTotalRowCountComponent should only be used with the client side row model.");return}this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,import_core6.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()}onDataChanged(){const t=this.localeService.getLocaleTextFunc(),e=t("thousandSeparator",","),o=t("decimalSeparator",".");this.setValue(import_core6._.formatNumberCommas(this.getRowCountValue(),e,o))}getRowCountValue(){let t=0;return this.rowModel.forEachLeafNode(e=>t+=1),t}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core6.Autowired)("rowModel")],TotalRowsComp.prototype,"rowModel",2),__decorateClass([import_core6.PostConstruct],TotalRowsComp.prototype,"postConstruct",1);var import_core7=require("@ag-grid-community/core"),SelectedRowsComp=class extends NameValueComp{postConstruct(){if(!this.isValidRowModel()){console.warn("AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.");return}this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();const t=this.onRowSelectionChanged.bind(this);this.addManagedListener(this.eventService,import_core7.Events.EVENT_MODEL_UPDATED,t),this.addManagedListener(this.eventService,import_core7.Events.EVENT_SELECTION_CHANGED,t)}isValidRowModel(){const t=this.rowModel.getType();return t==="clientSide"||t==="serverSide"}onRowSelectionChanged(){const t=this.selectionService.getSelectionCount();if(t<0){this.setValue("?"),this.setDisplayed(!0);return}const e=this.localeService.getLocaleTextFunc(),o=e("thousandSeparator",","),s=e("decimalSeparator",".");this.setValue(import_core7._.formatNumberCommas(t,o,s)),this.setDisplayed(t>0)}init(){}refresh(){return!0}destroy(){super.destroy()}};__decorateClass([(0,import_core7.Autowired)("rowModel")],SelectedRowsComp.prototype,"rowModel",2),__decorateClass([(0,import_core7.Autowired)("selectionService")],SelectedRowsComp.prototype,"selectionService",2),__decorateClass([import_core7.PostConstruct],SelectedRowsComp.prototype,"postConstruct",1);var import_core8=require("@ag-grid-community/core"),_AggregationComp=class f extends import_core8.Component{constructor(){super(f.TEMPLATE)}destroy(){super.destroy()}postConstruct(){if(!this.isValidRowModel()){console.warn("AG Grid: agAggregationComponent should only be used with the client and server side row model.");return}this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedListener(this.eventService,import_core8.Events.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.addManagedListener(this.eventService,import_core8.Events.EVENT_MODEL_UPDATED,this.onRangeSelectionChanged.bind(this))}isValidRowModel(){const e=this.rowModel.getType();return e==="clientSide"||e==="serverSide"}init(e){this.params=e}refresh(e){return this.params=e,this.onRangeSelectionChanged(),!0}setAggregationComponentValue(e,o,s){var a;const r=this.getAllowedAggregationValueComponent(e);if(import_core8._.exists(r)&&r){const n=this.localeService.getLocaleTextFunc(),i=n("thousandSeparator",","),u=n("decimalSeparator",".");r.setValue(import_core8._.formatNumberTwoDecimalPlacesAndCommas(o,i,u)),r.setDisplayed(s)}else(a=this.getAggregationValueComponent(e))==null||a.setDisplayed(!1)}getAllowedAggregationValueComponent(e){const{aggFuncs:o}=this.params;return!o||o.includes(e)?this.getAggregationValueComponent(e):null}getAggregationValueComponent(e){const o=`${e}AggregationComp`;return this[o]}onRangeSelectionChanged(){var e;const o=(e=this.rangeService)==null?void 0:e.getCellRanges();let s=0,a=0,r=0,n=null,i=null;const u={};if(o&&!import_core8._.missingOrEmpty(o)&&this.rangeService)for(let p=0;p<o.length;p++){const m=o[p];let c=this.rangeService.getRangeStartRow(m);const y=this.rangeService.getRangeEndRow(m);for(;!(import_core8._.missing(c)||!c||this.rowPositionUtils.before(y,c)||!c||!m.columns);)m.columns.forEach(h=>{if(c===null)return;const C=this.cellPositionUtils.createId({rowPinned:c.rowPinned,column:h,rowIndex:c.rowIndex});if(u[C])return;u[C]=!0;const v=this.rowPositionUtils.getRowNode(c);if(import_core8._.missing(v))return;let l=this.valueService.getValue(h,v);import_core8._.missing(l)||l===""||(a++,!(typeof l=="object"&&"value"in l&&(l=l.value,l===""))&&(typeof l=="string"&&(l=Number(l)),typeof l=="number"&&!isNaN(l)&&(s+=l,(i===null||l>i)&&(i=l),(n===null||l<n)&&(n=l),r++)))}),c=this.cellNavigationService.getRowBelow(c)}const d=a>1,g=r>1;this.setAggregationComponentValue("count",a,d),this.setAggregationComponentValue("sum",s,g),this.setAggregationComponentValue("min",n,g),this.setAggregationComponentValue("max",i,g),this.setAggregationComponentValue("avg",s/r,g)}};_AggregationComp.TEMPLATE=`<div class="ag-status-panel ag-status-panel-aggregations">
<ag-name-value ref="avgAggregationComp"></ag-name-value>

@@ -14,2 +14,2 @@ <ag-name-value ref="countAggregationComp"></ag-name-value>

<ag-name-value ref="sumAggregationComp"></ag-name-value>
</div>`,__decorateClass([(0,import_core8.Optional)("rangeService")],_AggregationComp.prototype,"rangeService",2),__decorateClass([(0,import_core8.Autowired)("valueService")],_AggregationComp.prototype,"valueService",2),__decorateClass([(0,import_core8.Autowired)("cellNavigationService")],_AggregationComp.prototype,"cellNavigationService",2),__decorateClass([(0,import_core8.Autowired)("rowRenderer")],_AggregationComp.prototype,"rowRenderer",2),__decorateClass([(0,import_core8.Autowired)("gridApi")],_AggregationComp.prototype,"gridApi",2),__decorateClass([(0,import_core8.Autowired)("cellPositionUtils")],_AggregationComp.prototype,"cellPositionUtils",2),__decorateClass([(0,import_core8.Autowired)("rowPositionUtils")],_AggregationComp.prototype,"rowPositionUtils",2),__decorateClass([(0,import_core8.RefSelector)("sumAggregationComp")],_AggregationComp.prototype,"sumAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("countAggregationComp")],_AggregationComp.prototype,"countAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("minAggregationComp")],_AggregationComp.prototype,"minAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("maxAggregationComp")],_AggregationComp.prototype,"maxAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("avgAggregationComp")],_AggregationComp.prototype,"avgAggregationComp",2),__decorateClass([import_core8.PostConstruct],_AggregationComp.prototype,"postConstruct",1);var AggregationComp=_AggregationComp,VERSION="31.2.1",StatusBarModule={version:VERSION,moduleName:import_core9.ModuleNames.StatusBarModule,beans:[StatusBarService],agStackComponents:[{componentName:"AgStatusBar",componentClass:StatusBar},{componentName:"AgNameValue",componentClass:NameValueComp}],userComponents:[{componentName:"agAggregationComponent",componentClass:AggregationComp},{componentName:"agSelectedRowCountComponent",componentClass:SelectedRowsComp},{componentName:"agTotalRowCountComponent",componentClass:TotalRowsComp},{componentName:"agFilteredRowCountComponent",componentClass:FilteredRowsComp},{componentName:"agTotalAndFilteredRowCountComponent",componentClass:TotalAndFilteredRowsComp}],dependantModules:[import_core10.EnterpriseCoreModule]};
</div>`,__decorateClass([(0,import_core8.Optional)("rangeService")],_AggregationComp.prototype,"rangeService",2),__decorateClass([(0,import_core8.Autowired)("valueService")],_AggregationComp.prototype,"valueService",2),__decorateClass([(0,import_core8.Autowired)("cellNavigationService")],_AggregationComp.prototype,"cellNavigationService",2),__decorateClass([(0,import_core8.Autowired)("rowModel")],_AggregationComp.prototype,"rowModel",2),__decorateClass([(0,import_core8.Autowired)("cellPositionUtils")],_AggregationComp.prototype,"cellPositionUtils",2),__decorateClass([(0,import_core8.Autowired)("rowPositionUtils")],_AggregationComp.prototype,"rowPositionUtils",2),__decorateClass([(0,import_core8.RefSelector)("sumAggregationComp")],_AggregationComp.prototype,"sumAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("countAggregationComp")],_AggregationComp.prototype,"countAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("minAggregationComp")],_AggregationComp.prototype,"minAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("maxAggregationComp")],_AggregationComp.prototype,"maxAggregationComp",2),__decorateClass([(0,import_core8.RefSelector)("avgAggregationComp")],_AggregationComp.prototype,"avgAggregationComp",2),__decorateClass([import_core8.PostConstruct],_AggregationComp.prototype,"postConstruct",1);var AggregationComp=_AggregationComp,VERSION="31.3.0",StatusBarModule={version:VERSION,moduleName:import_core9.ModuleNames.StatusBarModule,beans:[StatusBarService],agStackComponents:[{componentName:"AgStatusBar",componentClass:StatusBar},{componentName:"AgNameValue",componentClass:NameValueComp}],userComponents:[{componentName:"agAggregationComponent",componentClass:AggregationComp},{componentName:"agSelectedRowCountComponent",componentClass:SelectedRowsComp},{componentName:"agTotalRowCountComponent",componentClass:TotalRowsComp},{componentName:"agFilteredRowCountComponent",componentClass:FilteredRowsComp},{componentName:"agTotalAndFilteredRowCountComponent",componentClass:TotalAndFilteredRowsComp}],dependantModules:[import_core10.EnterpriseCoreModule]};
{
"name": "@ag-grid-enterprise/status-bar",
"version": "31.2.1",
"version": "31.3.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
"dependencies": {
"tslib": "^2.3.0",
"@ag-grid-community/core": "31.2.1",
"@ag-grid-enterprise/core": "31.2.1"
"@ag-grid-community/core": "31.3.0",
"@ag-grid-enterprise/core": "31.3.0"
},

@@ -10,0 +10,0 @@ "main": "./dist/package/main.cjs.js",

{
"name": "@ag-grid-enterprise/status-bar",
"version": "31.2.1",
"version": "31.3.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
"dependencies": {
"tslib": "^2.3.0",
"@ag-grid-community/core": "31.2.1",
"@ag-grid-enterprise/core": "31.2.1"
"@ag-grid-community/core": "31.3.0",
"@ag-grid-enterprise/core": "31.3.0"
},

@@ -10,0 +10,0 @@ "main": "./src/main.js",

import { Component, IStatusPanelComp, CellPositionUtils, RowPositionUtils, AggregationStatusPanelParams } from '@ag-grid-community/core';
export declare class AggregationComp extends Component implements IStatusPanelComp {
private static TEMPLATE;
private rangeService;
private rangeService?;
private valueService;
private cellNavigationService;
private rowRenderer;
private gridApi;
private rowModel;
cellPositionUtils: CellPositionUtils;

@@ -10,0 +9,0 @@ rowPositionUtils: RowPositionUtils;

import { IStatusPanelComp } from '@ag-grid-community/core';
import { NameValueComp } from "./nameValueComp";
export declare class FilteredRowsComp extends NameValueComp implements IStatusPanelComp {
private gridApi;
private rowModel;
protected postConstruct(): void;

@@ -6,0 +6,0 @@ private onDataChanged;

import { IStatusPanelComp } from '@ag-grid-community/core';
import { NameValueComp } from "./nameValueComp";
export declare class SelectedRowsComp extends NameValueComp implements IStatusPanelComp {
private gridApi;
private rowModel;
private selectionService;

@@ -6,0 +6,0 @@ protected postConstruct(): void;

import { IStatusPanelComp } from '@ag-grid-community/core';
import { NameValueComp } from "./nameValueComp";
export declare class TotalAndFilteredRowsComp extends NameValueComp implements IStatusPanelComp {
private gridApi;
private rowModel;
protected postConstruct(): void;

@@ -6,0 +6,0 @@ private onDataChanged;

import { IStatusPanelComp } from '@ag-grid-community/core';
import { NameValueComp } from "./nameValueComp";
export declare class TotalRowsComp extends NameValueComp implements IStatusPanelComp {
private gridApi;
private rowModel;
protected postConstruct(): void;

@@ -6,0 +6,0 @@ private onDataChanged;

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

export declare const VERSION = "31.2.1";
export declare const VERSION = "31.3.0";
{
"name": "@ag-grid-enterprise/status-bar",
"version": "31.2.1",
"version": "31.3.0",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
"dependencies": {
"tslib": "^2.3.0",
"@ag-grid-community/core": "31.2.1",
"@ag-grid-enterprise/core": "31.2.1"
"@ag-grid-community/core": "31.3.0",
"@ag-grid-enterprise/core": "31.3.0"
},

@@ -10,0 +10,0 @@ "main": "./dist/package/main.cjs.js",

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