logitude-dashboard-library 3.1.72 → 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.
- package/dist/assets/styles/dl-dashboard.scss +10 -0
- package/dist/index.js +48 -10
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +48 -10
- package/dist/index.modern.js.map +1 -1
- package/dist/styles/dl-dashboard.scss +10 -0
- package/dist/types/SeriesMeasure.d.ts +1 -0
- package/dist/types/widget.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
@@ -883,7 +883,7 @@ var KpiChart = function KpiChart(props) {
|
|
|
883
883
|
}
|
|
884
884
|
};
|
|
885
885
|
|
|
886
|
-
var
|
|
886
|
+
var drillDownToKPIValues = function drillDownToKPIValues(isDrillDownToMainValues) {
|
|
887
887
|
var _widget$current2, _widget$current3, _widget$current4, _widget$current4$Widg;
|
|
888
888
|
|
|
889
889
|
var measureFieldId;
|
|
@@ -894,7 +894,8 @@ var KpiChart = function KpiChart(props) {
|
|
|
894
894
|
Widget: calculateWidgetKPISettingsDates(),
|
|
895
895
|
MeasureCode: currentWidgetMeasure.MeasureCode,
|
|
896
896
|
Formula: currentWidgetMeasure.Formula,
|
|
897
|
-
GroupById: data === null || data === void 0 ? void 0 : data.GroupById
|
|
897
|
+
GroupById: data === null || data === void 0 ? void 0 : data.GroupById,
|
|
898
|
+
IsKPISecondaryValues: !isDrillDownToMainValues
|
|
898
899
|
});
|
|
899
900
|
};
|
|
900
901
|
|
|
@@ -966,6 +967,9 @@ var KpiChart = function KpiChart(props) {
|
|
|
966
967
|
var formatedValue = data ? data.ComparisonLabel : "";
|
|
967
968
|
var comparisonValue = data ? data === null || data === void 0 ? void 0 : data.ComparisonValue : "";
|
|
968
969
|
return React__default.createElement("div", {
|
|
970
|
+
onClick: function onClick() {
|
|
971
|
+
return drillDownToKPIValues(false);
|
|
972
|
+
},
|
|
969
973
|
title: formatedValue,
|
|
970
974
|
className: "dl-kpi-prev-container"
|
|
971
975
|
}, React__default.createElement("div", {
|
|
@@ -1008,6 +1012,9 @@ var KpiChart = function KpiChart(props) {
|
|
|
1008
1012
|
|
|
1009
1013
|
function getValueComponent() {
|
|
1010
1014
|
return React__default.createElement("div", {
|
|
1015
|
+
onClick: function onClick() {
|
|
1016
|
+
return drillDownToKPIValues(true);
|
|
1017
|
+
},
|
|
1011
1018
|
className: "dl-kpi-sub-container"
|
|
1012
1019
|
}, getValueData(), (data === null || data === void 0 ? void 0 : data.AbbreviationSymbol) && React__default.createElement("div", {
|
|
1013
1020
|
style: {
|
|
@@ -1062,6 +1069,9 @@ var KpiChart = function KpiChart(props) {
|
|
|
1062
1069
|
var formatedValue = data ? data.Label : "";
|
|
1063
1070
|
var label = getLabelFromKPISettings();
|
|
1064
1071
|
return React__default.createElement("div", {
|
|
1072
|
+
onClick: function onClick() {
|
|
1073
|
+
return drillDownToKPIValues(true);
|
|
1074
|
+
},
|
|
1065
1075
|
className: "dl-kpi-label-container"
|
|
1066
1076
|
}, React__default.createElement("span", {
|
|
1067
1077
|
style: {
|
|
@@ -1096,7 +1106,6 @@ var KpiChart = function KpiChart(props) {
|
|
|
1096
1106
|
animationDuration: "2s"
|
|
1097
1107
|
})) : !error && widget.current ? React__default.createElement("div", {
|
|
1098
1108
|
key: triggerId,
|
|
1099
|
-
onClick: kpiClick,
|
|
1100
1109
|
className: ((_widget$current16 = widget.current) === null || _widget$current16 === void 0 ? void 0 : _widget$current16.Alighnment) == "Left" ? "dl-kpi-container-click db-justify-content-flex-start" : "dl-kpi-container-click"
|
|
1101
1110
|
}, React__default.createElement("div", {
|
|
1102
1111
|
className: isKPICustomSizeNeeded ? "dl-kpi-container kpi-custom-size" : "dl-kpi-container"
|
|
@@ -1795,16 +1804,44 @@ var PivotTable = React.forwardRef(function (props, comRef) {
|
|
|
1795
1804
|
}
|
|
1796
1805
|
};
|
|
1797
1806
|
|
|
1798
|
-
var
|
|
1807
|
+
var isRowsEmptyAndColumnsNotEmpty = function isRowsEmptyAndColumnsNotEmpty() {
|
|
1799
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) : [];
|
|
1800
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) : [];
|
|
1801
1810
|
return (pivotRows === null || pivotRows === void 0 ? void 0 : pivotRows.length) === 0 && (pivotColumns === null || pivotColumns === void 0 ? void 0 : pivotColumns.length) > 0;
|
|
1802
1811
|
};
|
|
1803
1812
|
|
|
1804
|
-
var
|
|
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() {
|
|
1805
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) : [];
|
|
1806
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) : [];
|
|
1807
|
-
return (
|
|
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;
|
|
1808
1845
|
};
|
|
1809
1846
|
|
|
1810
1847
|
return React__default.createElement(React__default.Fragment, null, isLoading ? React__default.createElement("div", {
|
|
@@ -1824,10 +1861,11 @@ var PivotTable = React.forwardRef(function (props, comRef) {
|
|
|
1824
1861
|
showBorders: true,
|
|
1825
1862
|
className: 'pivot-grid-element',
|
|
1826
1863
|
onCellClick: onCellClick,
|
|
1827
|
-
showRowGrandTotals:
|
|
1828
|
-
showColumnGrandTotals:
|
|
1829
|
-
showRowTotals:
|
|
1830
|
-
showColumnTotals:
|
|
1864
|
+
showRowGrandTotals: canShowRowsGrandTotal(),
|
|
1865
|
+
showColumnGrandTotals: canShowColumnsGrandTotal(),
|
|
1866
|
+
showRowTotals: canShowRowsTotal(),
|
|
1867
|
+
showColumnTotals: canShowColumnsTotal(),
|
|
1868
|
+
showTotalsPrior: 'none',
|
|
1831
1869
|
wordWrapEnabled: true
|
|
1832
1870
|
}, React__default.createElement(PivotGrid.FieldPanel, {
|
|
1833
1871
|
showColumnFields: false,
|