logitude-dashboard-library 3.1.73 → 3.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -905,6 +905,16 @@ $dark-grey: #717585;
905
905
  background: #FFFFFF;
906
906
  }
907
907
 
908
+ .dx-pivotgrid .dx-column-header,
909
+ .dx-pivotgrid .dx-data-header,
910
+ .dx-pivotgrid .dx-total {
911
+ background-color: rgba(221, 221, 221, .2) !important;
912
+ }
913
+
914
+ .dx-pivotgrid .dx-grandtotal {
915
+ background-color: #f5f5f5 !important;
916
+ }
917
+
908
918
  .dx-pivotgrid .dx-pivotgrid-vertical-headers td > span {
909
919
  font-family: "Manrope";
910
920
  font-size: 12px;
package/dist/index.js CHANGED
@@ -1804,16 +1804,44 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1804
1804
  }
1805
1805
  };
1806
1806
 
1807
- var canShowRowGrandTotals = function canShowRowGrandTotals() {
1807
+ var isRowsEmptyAndColumnsNotEmpty = function isRowsEmptyAndColumnsNotEmpty() {
1808
1808
  var pivotRows = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotRows) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotRows) : [];
1809
1809
  var pivotColumns = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) : [];
1810
1810
  return (pivotRows === null || pivotRows === void 0 ? void 0 : pivotRows.length) === 0 && (pivotColumns === null || pivotColumns === void 0 ? void 0 : pivotColumns.length) > 0;
1811
1811
  };
1812
1812
 
1813
- var canShowColumnGrandTotals = function canShowColumnGrandTotals() {
1813
+ var canShowRowsGrandTotal = function canShowRowsGrandTotal() {
1814
+ if (isRowsEmptyAndColumnsNotEmpty()) {
1815
+ return true;
1816
+ }
1817
+
1818
+ var pivotTotalsSettings = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) : {};
1819
+ return !isNullOrUndefinedOrEmpty(pivotTotalsSettings.ShowRowsGrandTotal) ? pivotTotalsSettings.ShowRowsGrandTotal : false;
1820
+ };
1821
+
1822
+ var isRowsNotEmptyAndColumnsEmpty = function isRowsNotEmptyAndColumnsEmpty() {
1814
1823
  var pivotRows = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotRows) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotRows) : [];
1815
1824
  var pivotColumns = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) : [];
1816
- return (pivotColumns === null || pivotColumns === void 0 ? void 0 : pivotColumns.length) === 0 && (pivotRows === null || pivotRows === void 0 ? void 0 : pivotRows.length) > 0;
1825
+ return (pivotRows === null || pivotRows === void 0 ? void 0 : pivotRows.length) > 0 && (pivotColumns === null || pivotColumns === void 0 ? void 0 : pivotColumns.length) === 0;
1826
+ };
1827
+
1828
+ var canShowColumnsGrandTotal = function canShowColumnsGrandTotal() {
1829
+ if (isRowsNotEmptyAndColumnsEmpty()) {
1830
+ return true;
1831
+ }
1832
+
1833
+ var pivotTotalsSettings = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) : {};
1834
+ return !isNullOrUndefinedOrEmpty(pivotTotalsSettings.ShowColumnsGrandTotal) ? pivotTotalsSettings.ShowColumnsGrandTotal : false;
1835
+ };
1836
+
1837
+ var canShowRowsTotal = function canShowRowsTotal() {
1838
+ var pivotTotalsSettings = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) : {};
1839
+ return !isNullOrUndefinedOrEmpty(pivotTotalsSettings.ShowRowsTotal) ? pivotTotalsSettings.ShowRowsTotal : false;
1840
+ };
1841
+
1842
+ var canShowColumnsTotal = function canShowColumnsTotal() {
1843
+ var pivotTotalsSettings = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotTotalsSettings) : {};
1844
+ return !isNullOrUndefinedOrEmpty(pivotTotalsSettings.ShowColumnsTotal) ? pivotTotalsSettings.ShowColumnsTotal : false;
1817
1845
  };
1818
1846
 
1819
1847
  return React__default.createElement(React__default.Fragment, null, isLoading ? React__default.createElement("div", {
@@ -1833,10 +1861,11 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1833
1861
  showBorders: true,
1834
1862
  className: 'pivot-grid-element',
1835
1863
  onCellClick: onCellClick,
1836
- showRowGrandTotals: canShowRowGrandTotals(),
1837
- showColumnGrandTotals: canShowColumnGrandTotals(),
1838
- showRowTotals: false,
1839
- showColumnTotals: false,
1864
+ showRowGrandTotals: canShowRowsGrandTotal(),
1865
+ showColumnGrandTotals: canShowColumnsGrandTotal(),
1866
+ showRowTotals: canShowRowsTotal(),
1867
+ showColumnTotals: canShowColumnsTotal(),
1868
+ showTotalsPrior: 'none',
1840
1869
  wordWrapEnabled: true
1841
1870
  }, React__default.createElement(PivotGrid.FieldPanel, {
1842
1871
  showColumnFields: false,