logitude-dashboard-library 3.1.63 → 3.1.65

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.
@@ -920,6 +920,7 @@ $dark-grey: #717585;
920
920
  font-weight: 500;
921
921
  text-align: right;
922
922
  color: #46494A;
923
+ cursor: pointer;
923
924
  }
924
925
 
925
926
  .dx-widget {
package/dist/index.js CHANGED
@@ -1630,7 +1630,33 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1630
1630
  }, []);
1631
1631
  var onCellClick = React.useCallback(function (e) {
1632
1632
  if (e.area === 'data') {
1633
- console.log("Pivot Cell Data", e);
1633
+ var pivotFields = [];
1634
+ e.columnFields.forEach(function (c, index) {
1635
+ var fieldValue = e.cell.columnPath[index];
1636
+
1637
+ if (fieldValue !== undefined) {
1638
+ pivotFields.push(_extends({}, c.fieldData, {
1639
+ FieldValue: fieldValue
1640
+ }));
1641
+ }
1642
+ });
1643
+ e.rowFields.forEach(function (r, index) {
1644
+ var fieldValue = e.cell.rowPath[index];
1645
+
1646
+ if (fieldValue !== undefined) {
1647
+ pivotFields.push(_extends({}, r.fieldData, {
1648
+ FieldValue: fieldValue
1649
+ }));
1650
+ }
1651
+ });
1652
+ props.customChartProps.onSelectDataPoint({
1653
+ MeasureFieldId: '',
1654
+ Widget: props.customChartProps.widget,
1655
+ MeasureCode: '',
1656
+ Formula: '',
1657
+ GroupById: '',
1658
+ PivotFields: pivotFields
1659
+ });
1634
1660
  }
1635
1661
  }, []);
1636
1662
 
@@ -1701,6 +1727,12 @@ var PivotTable = React.forwardRef(function (props, comRef) {
1701
1727
  },
1702
1728
  expanded: false,
1703
1729
  wordWrapEnabled: true,
1730
+ fieldData: {
1731
+ FieldId: field.FieldId,
1732
+ FieldType: field.FieldType ? field.FieldType : "Field",
1733
+ FieldValue: '',
1734
+ DateCode: field.DateCode
1735
+ },
1704
1736
  customizeText: function customizeText(cellInfo) {
1705
1737
  return getColumnNameByColumnId(field.PivotName, field.PivotCode, cellInfo.value);
1706
1738
  }