logitude-dashboard-library 3.1.68 → 3.1.70

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.
@@ -277,6 +277,10 @@ $dark-grey: #717585;
277
277
  }
278
278
 
279
279
  .pivot-header {
280
+ .widget-table-titles-container {
281
+ padding: 0px 12px 0px 8px !important;
282
+ }
283
+
280
284
  &::after {
281
285
  content: "";
282
286
  border-bottom: 0px !important;
@@ -853,7 +857,7 @@ $dark-grey: #717585;
853
857
  }
854
858
 
855
859
  .pivot-grid-element {
856
- width: 100%;
860
+ width: calc(100% - 16px);
857
861
  height: 100%;
858
862
  margin: 0 auto;
859
863
  overflow-x: auto;
package/dist/index.js CHANGED
@@ -1434,7 +1434,7 @@ var TableChart = function TableChart(props) {
1434
1434
  };
1435
1435
 
1436
1436
  var isClickableCell = function isClickableCell(fieldCode) {
1437
- return fieldCode == "ShipmentNumber" && objectTableName == "Shipment" || fieldCode == "InvoiceNumber" && objectTableName == "APInvoice" || fieldCode == "InvoiceNumber" && objectTableName == "ARInvoice" || fieldCode == "ContainerNumber" && objectTableName == "Container" || fieldCode == "QuoteNumber" && objectTableName == "Quote" || fieldCode == "Subject" && objectTableName == "Opportunity" || fieldCode == "EnglishName" && objectTableName == "Customer";
1437
+ return fieldCode == "ShipmentNumber" && objectTableName == "Shipment" || fieldCode == "InvoiceNumber" && objectTableName == "APInvoice" || fieldCode == "InvoiceNumber" && objectTableName == "ARInvoice" || fieldCode == "ContainerNumber" && objectTableName == "Container" || fieldCode == "QuoteNumber" && objectTableName == "Quote" || fieldCode == "Subject" && objectTableName == "Opportunity" || fieldCode == "TaskNumber" && objectTableName == "Task";
1438
1438
  };
1439
1439
 
1440
1440
  var tableCellClicked = function tableCellClicked(data, fieldCode) {
@@ -1563,6 +1563,7 @@ var TableChart = function TableChart(props) {
1563
1563
 
1564
1564
  var PivotTable = React.forwardRef(function (props, comRef) {
1565
1565
  var _useState = React.useState(),
1566
+ widget = _useState[0],
1566
1567
  setWidget = _useState[1];
1567
1568
 
1568
1569
  var _useState2 = React.useState(true),
@@ -1794,6 +1795,18 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1794
1795
  }
1795
1796
  };
1796
1797
 
1798
+ var canShowRowGrandTotals = function canShowRowGrandTotals() {
1799
+ var pivotRows = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotRows) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotRows) : [];
1800
+ var pivotColumns = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) : [];
1801
+ return (pivotRows === null || pivotRows === void 0 ? void 0 : pivotRows.length) === 0 && (pivotColumns === null || pivotColumns === void 0 ? void 0 : pivotColumns.length) > 0;
1802
+ };
1803
+
1804
+ var canShowColumnGrandTotals = function canShowColumnGrandTotals() {
1805
+ var pivotRows = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotRows) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotRows) : [];
1806
+ var pivotColumns = widget && !isNullOrUndefinedOrEmpty(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) ? JSON.parse(widget === null || widget === void 0 ? void 0 : widget.PivotColumns) : [];
1807
+ return (pivotColumns === null || pivotColumns === void 0 ? void 0 : pivotColumns.length) === 0 && (pivotRows === null || pivotRows === void 0 ? void 0 : pivotRows.length) > 0;
1808
+ };
1809
+
1797
1810
  return React__default.createElement(React__default.Fragment, null, isLoading ? React__default.createElement("div", {
1798
1811
  className: 'dl-full-hight dl-flex-content-center spinner-custome'
1799
1812
  }, React__default.createElement(progressspinner.ProgressSpinner, {
@@ -1811,8 +1824,8 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1811
1824
  showBorders: true,
1812
1825
  className: 'pivot-grid-element',
1813
1826
  onCellClick: onCellClick,
1814
- showRowGrandTotals: false,
1815
- showColumnGrandTotals: false,
1827
+ showRowGrandTotals: canShowRowGrandTotals(),
1828
+ showColumnGrandTotals: canShowColumnGrandTotals(),
1816
1829
  showRowTotals: false,
1817
1830
  showColumnTotals: false,
1818
1831
  wordWrapEnabled: true