logitude-dashboard-library 3.1.15 → 3.1.17
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/Utils/General.d.ts +2 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +11 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/types/widget.d.ts +1 -0
- package/package.json +1 -1
package/dist/Utils/General.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -321,6 +321,10 @@ var isNullOrUndefined = function isNullOrUndefined(val) {
|
|
|
321
321
|
return val == null || val == undefined;
|
|
322
322
|
};
|
|
323
323
|
|
|
324
|
+
var isNullOrUndefinedOrEmpty = function isNullOrUndefinedOrEmpty(val) {
|
|
325
|
+
return val == null || val == undefined || val == "";
|
|
326
|
+
};
|
|
327
|
+
|
|
324
328
|
var KpiChart = function KpiChart(props) {
|
|
325
329
|
var _widget$current18;
|
|
326
330
|
|
|
@@ -386,6 +390,7 @@ var KpiChart = function KpiChart(props) {
|
|
|
386
390
|
var postWidget = _extends({}, widget.current);
|
|
387
391
|
|
|
388
392
|
postWidget.onChange = undefined;
|
|
393
|
+
postWidget.EntityId = !isNullOrUndefinedOrEmpty(postWidget.RelatedToEntityId) ? postWidget.RelatedToEntityId : postWidget.EntityId;
|
|
389
394
|
dashboardAnalyticsService.getKpiData(postWidget).then(function (result) {
|
|
390
395
|
setData(result.data);
|
|
391
396
|
setIsLoading(false);
|
|
@@ -474,9 +479,10 @@ var KpiChart = function KpiChart(props) {
|
|
|
474
479
|
}
|
|
475
480
|
|
|
476
481
|
function getPreviousValueComponent() {
|
|
477
|
-
if (isNullOrUndefined(data) || isNullOrUndefined(data === null || data === void 0 ? void 0 : data.ComparisonValue)) return "";
|
|
478
|
-
var
|
|
479
|
-
var
|
|
482
|
+
if (isNullOrUndefined(data) || isNullOrUndefined(data === null || data === void 0 ? void 0 : data.ComparisonValue) || isNullOrUndefined(data === null || data === void 0 ? void 0 : data.ComparisonLabel)) return "";
|
|
483
|
+
var labelFormatByDateGroupType = getLabelFormatByDateGroupType(data.ComparisonLabel, widget.current, false);
|
|
484
|
+
var labelFormated = !isNullOrUndefined(labelFormatByDateGroupType) ? labelFormatByDateGroupType : null;
|
|
485
|
+
var prevtext = labelFormated ? labelFormated + ": " + (data === null || data === void 0 ? void 0 : data.ComparisonValue) : "";
|
|
480
486
|
return React__default.createElement("div", {
|
|
481
487
|
className: "dl-kpi-prev-container"
|
|
482
488
|
}, React__default.createElement("div", {
|
|
@@ -597,6 +603,7 @@ var TableChart = function TableChart(props) {
|
|
|
597
603
|
widget.onChange = undefined;
|
|
598
604
|
widget.PageIndex = 0;
|
|
599
605
|
widget.PageSize = 100;
|
|
606
|
+
widget.EntityId = !isNullOrUndefinedOrEmpty(widget.RelatedToEntityId) ? widget.RelatedToEntityId : widget.EntityId;
|
|
600
607
|
dashboardAnalyticsService.getTableData(widget).then(function (res) {
|
|
601
608
|
if (res && res.data) {
|
|
602
609
|
fillTableData(res.data);
|
|
@@ -1565,6 +1572,7 @@ var FusionChart = React.forwardRef(function (props, comRef) {
|
|
|
1565
1572
|
signal = updatedAxiosController === null || updatedAxiosController === void 0 ? void 0 : updatedAxiosController.signal;
|
|
1566
1573
|
}
|
|
1567
1574
|
|
|
1575
|
+
postWidget.EntityId = !isNullOrUndefinedOrEmpty(postWidget.RelatedToEntityId) ? postWidget.RelatedToEntityId : postWidget.EntityId;
|
|
1568
1576
|
dashboardAnalyticsService.getData(postWidget, signal).then(function (result) {
|
|
1569
1577
|
handleData(result === null || result === void 0 ? void 0 : result.data);
|
|
1570
1578
|
chartData.current = result === null || result === void 0 ? void 0 : result.data;
|