logitude-dashboard-library 1.3.64 → 1.3.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.
- package/dist/assets/styles/dl-dashboard.scss +23 -8
- package/dist/features/Dashboard/ChartsComponents/ApexChart.d.ts +0 -1
- package/dist/features/Dashboard/ChartsComponents/CustomChart.d.ts +11 -0
- package/dist/features/Dashboard/ChartsComponents/CustomCharts/CustomChart.d.ts +11 -0
- package/dist/features/Dashboard/ChartsComponents/CustomCharts/KpiChart.d.ts +7 -0
- package/dist/features/Dashboard/DashboardDesigner.d.ts +0 -1
- package/dist/features/Dashboard/WidgetCard.d.ts +0 -1
- package/dist/features/Dashboard/dashboard-dialog/dashboard-dialog-component.d.ts +0 -1
- package/dist/images/Warning.png +0 -0
- package/dist/images/logo.png +0 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +141 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +141 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/services/DashboardAnalyticsService.d.ts +2 -0
- package/dist/styles/colors.scss +10 -0
- package/dist/styles/dl-dashboard.scss +386 -0
- package/dist/styles/fonts.scss +4 -0
- package/dist/styles/global.scss +26 -0
- package/dist/types/KpiChart.d.ts +4 -0
- package/dist/types/widget.d.ts +2 -2
- package/package.json +1 -1
- package/dist/logitude-dashboard-library/src/common/data-contracts/ApiQueryFilter.d.ts +0 -90
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/ApexChart.d.ts +0 -14
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/AreaChartComponent.d.ts +0 -8
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/BarChartComponent.d.ts +0 -9
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/CandleChartComponent.d.ts +0 -6
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/ColumnChartComponent.d.ts +0 -6
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/MixedChartComponent.d.ts +0 -6
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/PieChartComponent.d.ts +0 -6
- package/dist/logitude-dashboard-library/src/features/Dashboard/ChartsComponents/TimelineChartComponent.d.ts +0 -6
- package/dist/logitude-dashboard-library/src/features/Dashboard/DashboardDesigner.d.ts +0 -36
- package/dist/logitude-dashboard-library/src/features/Dashboard/NewWidget.d.ts +0 -0
- package/dist/logitude-dashboard-library/src/features/Dashboard/WidgetCard.d.ts +0 -14
- package/dist/logitude-dashboard-library/src/features/Dashboard/dashboard-dialog/dashboard-dialog-component.d.ts +0 -7
- package/dist/logitude-dashboard-library/src/index.d.ts +0 -18
- package/dist/logitude-dashboard-library/src/index.test.d.ts +0 -0
- package/dist/logitude-dashboard-library/src/services/ApiServices.d.ts +0 -11
- package/dist/logitude-dashboard-library/src/services/DashBoardService.d.ts +0 -10
- package/dist/logitude-dashboard-library/src/services/DashboardAnalyticsService.d.ts +0 -9
- package/dist/logitude-dashboard-library/src/services/DataService.d.ts +0 -10
- package/dist/logitude-dashboard-library/src/services/WidgetTypeListService.d.ts +0 -9
- package/dist/logitude-dashboard-library/src/services/clone.d.ts +0 -1
- package/dist/logitude-dashboard-library/src/services/session.d.ts +0 -5
- package/dist/logitude-dashboard-library/src/services/tools.d.ts +0 -3
- package/dist/logitude-dashboard-library/src/types/APIResult.d.ts +0 -5
- package/dist/logitude-dashboard-library/src/types/ChartComponentProps.d.ts +0 -9
- package/dist/logitude-dashboard-library/src/types/ChartComponentState.d.ts +0 -4
- package/dist/logitude-dashboard-library/src/types/Dashboard.d.ts +0 -22
- package/dist/logitude-dashboard-library/src/types/DashboardDataBinding.d.ts +0 -9
- package/dist/logitude-dashboard-library/src/types/ReactWidgetMeasurePM.d.ts +0 -7
- package/dist/logitude-dashboard-library/src/types/SeriesMeasure.d.ts +0 -15
- package/dist/logitude-dashboard-library/src/types/WidgetComponent.d.ts +0 -4
- package/dist/logitude-dashboard-library/src/types/WidgetType.d.ts +0 -5
- package/dist/logitude-dashboard-library/src/types/widget.d.ts +0 -22
|
@@ -64,7 +64,7 @@ $dark-grey: #717585;
|
|
|
64
64
|
|
|
65
65
|
80%,
|
|
66
66
|
90% {
|
|
67
|
-
stroke
|
|
67
|
+
stroke: #6EB2D6;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -378,9 +378,9 @@ $dark-grey: #717585;
|
|
|
378
378
|
position: relative;
|
|
379
379
|
flex-direction: column;
|
|
380
380
|
align-items: center;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.dl-tooltip .dl-tooltiptext {
|
|
384
384
|
visibility: hidden;
|
|
385
385
|
background-color: #eaeaea;
|
|
386
386
|
color: #c40505;
|
|
@@ -393,8 +393,23 @@ $dark-grey: #717585;
|
|
|
393
393
|
max-width: 400px;
|
|
394
394
|
white-space: pre-wrap;
|
|
395
395
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.dl-tooltip:hover .dl-tooltiptext {
|
|
399
399
|
visibility: visible;
|
|
400
|
-
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
.kpIcontainer {
|
|
404
|
+
height: 100%;
|
|
405
|
+
flex-direction: column;
|
|
406
|
+
box-sizing: border-box;
|
|
407
|
+
display: flex;
|
|
408
|
+
place-content: center;
|
|
409
|
+
align-items: center;
|
|
410
|
+
gap: 20px;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.kpIHeader {
|
|
414
|
+
font-weight: bold;
|
|
415
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DashboardDataBinding } from "../../../types/DashboardDataBinding";
|
|
2
|
+
import { DataPointSelection } from "../../../types/SeriesMeasure";
|
|
3
|
+
import { ReactWidgetPM } from "../../../types/widget";
|
|
4
|
+
declare type CustomChartProps = {
|
|
5
|
+
widget: ReactWidgetPM | undefined;
|
|
6
|
+
widgetRef: ReactWidgetPM | undefined;
|
|
7
|
+
dataBinding: DashboardDataBinding;
|
|
8
|
+
onSelectDataPoint: (dataPointSelection: DataPointSelection) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const CustomChart: (props: CustomChartProps) => JSX.Element;
|
|
11
|
+
export default CustomChart;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DashboardDataBinding } from "../../../../types/DashboardDataBinding";
|
|
2
|
+
import { DataPointSelection } from "../../../../types/SeriesMeasure";
|
|
3
|
+
import { ReactWidgetPM } from "../../../../types/widget";
|
|
4
|
+
export declare type CustomChartProps = {
|
|
5
|
+
widget: ReactWidgetPM | undefined;
|
|
6
|
+
widgetRef: ReactWidgetPM | undefined;
|
|
7
|
+
dataBinding: DashboardDataBinding;
|
|
8
|
+
onSelectDataPoint: (dataPointSelection: DataPointSelection) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const CustomChart: (props: CustomChartProps) => JSX.Element;
|
|
11
|
+
export default CustomChart;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KpiChart } from "../../../../types/KpiChart";
|
|
2
|
+
import { CustomChartProps } from "./CustomChart";
|
|
3
|
+
declare type KpiChartProps = {
|
|
4
|
+
customChartProps: CustomChartProps;
|
|
5
|
+
};
|
|
6
|
+
declare const KpiChart: (props: KpiChartProps) => JSX.Element;
|
|
7
|
+
export default KpiChart;
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -189,6 +189,10 @@ var DashboardAnalyticsService = /*#__PURE__*/function () {
|
|
|
189
189
|
return this._ApiServices.post("/api/" + this.controller + "/PostGetDataAnalytic", widget);
|
|
190
190
|
};
|
|
191
191
|
|
|
192
|
+
_proto.getKpiData = function getKpiData(widget) {
|
|
193
|
+
return this._ApiServices.post("/api/" + this.controller + "/PostGetKpiData", widget);
|
|
194
|
+
};
|
|
195
|
+
|
|
192
196
|
return DashboardAnalyticsService;
|
|
193
197
|
}();
|
|
194
198
|
|
|
@@ -722,8 +726,137 @@ var ApexChart = function ApexChart(props) {
|
|
|
722
726
|
}, error)));
|
|
723
727
|
};
|
|
724
728
|
|
|
729
|
+
var KpiChart = function KpiChart(props) {
|
|
730
|
+
var _useState = React.useState(false),
|
|
731
|
+
isView = _useState[0],
|
|
732
|
+
setisView = _useState[1];
|
|
733
|
+
|
|
734
|
+
var _useState2 = React.useState(false),
|
|
735
|
+
viewError = _useState2[0],
|
|
736
|
+
setViewError = _useState2[1];
|
|
737
|
+
|
|
738
|
+
var isLoadingDrow = React.useRef(true);
|
|
739
|
+
var widget = React.useRef();
|
|
740
|
+
var widgetRef = React.useRef();
|
|
741
|
+
var isDataLoaded = React.useRef(false);
|
|
742
|
+
var hasDataError = React.useRef(false);
|
|
743
|
+
|
|
744
|
+
var _useState3 = React.useState(''),
|
|
745
|
+
error = _useState3[0],
|
|
746
|
+
setEror = _useState3[1];
|
|
747
|
+
|
|
748
|
+
var _useState4 = React.useState(),
|
|
749
|
+
data = _useState4[0],
|
|
750
|
+
setData = _useState4[1];
|
|
751
|
+
|
|
752
|
+
React.useEffect(function () {
|
|
753
|
+
var _props$customChartPro;
|
|
754
|
+
|
|
755
|
+
setTimeout(function () {
|
|
756
|
+
isLoadingDrow.current = false;
|
|
757
|
+
updateView();
|
|
758
|
+
}, 500);
|
|
759
|
+
widget.current = props.customChartProps.widget;
|
|
760
|
+
(_props$customChartPro = props.customChartProps.dataBinding) === null || _props$customChartPro === void 0 ? void 0 : _props$customChartPro.onEditWidget.subscribe(function (e) {
|
|
761
|
+
var _widget$current;
|
|
762
|
+
|
|
763
|
+
if (e.key == ((_widget$current = widget.current) === null || _widget$current === void 0 ? void 0 : _widget$current.key)) {
|
|
764
|
+
Tools.Map(e, widget.current);
|
|
765
|
+
RefreshData();
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
}, []);
|
|
769
|
+
React.useEffect(function () {
|
|
770
|
+
widgetRef.current = props.customChartProps.widgetRef;
|
|
771
|
+
RefreshData();
|
|
772
|
+
}, []);
|
|
773
|
+
React.useEffect(function () {
|
|
774
|
+
widgetRef.current = props.customChartProps.widgetRef;
|
|
775
|
+
}, [props.customChartProps.widgetRef]);
|
|
776
|
+
|
|
777
|
+
var RefreshData = function RefreshData() {
|
|
778
|
+
var dashboardAnalyticsService = new DashboardAnalyticsService();
|
|
779
|
+
|
|
780
|
+
var postWidget = _extends({}, widget.current);
|
|
781
|
+
|
|
782
|
+
postWidget.onChange = undefined;
|
|
783
|
+
dashboardAnalyticsService.getKpiData(postWidget).then(function (result) {
|
|
784
|
+
setData(result.data);
|
|
785
|
+
isDataLoaded.current = true;
|
|
786
|
+
hasDataError.current = false;
|
|
787
|
+
updateView();
|
|
788
|
+
}, function (error) {
|
|
789
|
+
var _error$response, _error$response$data, _error$response2, _error$response2$data;
|
|
790
|
+
|
|
791
|
+
console.log('error', error);
|
|
792
|
+
if (error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && _error$response$data.ErrorMessage) setEror(error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.ErrorMessage);else setEror(error.message);
|
|
793
|
+
isDataLoaded.current = true;
|
|
794
|
+
hasDataError.current = true;
|
|
795
|
+
updateView();
|
|
796
|
+
});
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
var updateView = function updateView() {
|
|
800
|
+
if (isDataLoaded.current && !isLoadingDrow.current && !hasDataError.current) {
|
|
801
|
+
setisView(true);
|
|
802
|
+
setViewError(false);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
if (isDataLoaded.current && !isLoadingDrow.current && hasDataError.current) {
|
|
806
|
+
setisView(false);
|
|
807
|
+
setViewError(true);
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
return !isView && !viewError ? React__default.createElement("div", {
|
|
812
|
+
className: 'dl-full-hight dl-flex-content-center spinner-custome'
|
|
813
|
+
}, React__default.createElement(progressspinner.ProgressSpinner, {
|
|
814
|
+
style: {
|
|
815
|
+
width: '100px',
|
|
816
|
+
height: '100px'
|
|
817
|
+
},
|
|
818
|
+
strokeWidth: "4",
|
|
819
|
+
animationDuration: "2s"
|
|
820
|
+
})) : isView ? React__default.createElement("div", {
|
|
821
|
+
className: "kpIcontainer"
|
|
822
|
+
}, React__default.createElement("div", {
|
|
823
|
+
className: "kpIHeader"
|
|
824
|
+
}, data === null || data === void 0 ? void 0 : data.MeasureLabel), React__default.createElement("div", null, data === null || data === void 0 ? void 0 : data.Value, " ")) : React__default.createElement("div", {
|
|
825
|
+
className: "dl-flex-content-center dl-full-hight "
|
|
826
|
+
}, React__default.createElement("div", {
|
|
827
|
+
className: "dl-tooltip"
|
|
828
|
+
}, React__default.createElement("img", {
|
|
829
|
+
width: 100,
|
|
830
|
+
src: "https://www.seekpng.com/png/full/334-3345964_error-icon-png.png"
|
|
831
|
+
}), React__default.createElement("span", {
|
|
832
|
+
className: "dl-tooltiptext"
|
|
833
|
+
}, error)));
|
|
834
|
+
};
|
|
835
|
+
|
|
836
|
+
var CustomChart = function CustomChart(props) {
|
|
837
|
+
var project = function project() {
|
|
838
|
+
var _props$widget;
|
|
839
|
+
|
|
840
|
+
switch ((_props$widget = props.widget) === null || _props$widget === void 0 ? void 0 : _props$widget.TypeCode) {
|
|
841
|
+
case "kpi":
|
|
842
|
+
return React__default.createElement(KpiChart, {
|
|
843
|
+
customChartProps: props
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
default:
|
|
847
|
+
return React__default.createElement("div", null, "Invalid Type");
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
return React__default.createElement("div", {
|
|
852
|
+
style: {
|
|
853
|
+
height: '100%'
|
|
854
|
+
}
|
|
855
|
+
}, project());
|
|
856
|
+
};
|
|
857
|
+
|
|
725
858
|
var WidgetCard = function WidgetCard(props, state) {
|
|
726
|
-
var _props$widget;
|
|
859
|
+
var _props$widget, _props$widget3;
|
|
727
860
|
|
|
728
861
|
var moreBtnToggle = React.useRef(null);
|
|
729
862
|
|
|
@@ -764,7 +897,12 @@ var WidgetCard = function WidgetCard(props, state) {
|
|
|
764
897
|
}
|
|
765
898
|
}, "Remove")))), React__default.createElement("div", {
|
|
766
899
|
className: "dl-dashboard-widget"
|
|
767
|
-
}, React__default.createElement(
|
|
900
|
+
}, (props === null || props === void 0 ? void 0 : (_props$widget3 = props.widget) === null || _props$widget3 === void 0 ? void 0 : _props$widget3.TypeCode) == "kpi" ? React__default.createElement(CustomChart, {
|
|
901
|
+
dataBinding: props.dataBinding,
|
|
902
|
+
widget: props.widget,
|
|
903
|
+
widgetRef: props.widgetRef,
|
|
904
|
+
onSelectDataPoint: props.onSelectDataPoint
|
|
905
|
+
}) : React__default.createElement(ApexChart, {
|
|
768
906
|
dataBinding: props.dataBinding,
|
|
769
907
|
widget: props.widget,
|
|
770
908
|
widgetRef: props.widgetRef,
|
|
@@ -972,6 +1110,7 @@ var Dashboard = function Dashboard(props) {
|
|
|
972
1110
|
var _useState = React.useState({
|
|
973
1111
|
lg: []
|
|
974
1112
|
});
|
|
1113
|
+
|
|
975
1114
|
var Widgetlayouts = React.useRef({
|
|
976
1115
|
lg: []
|
|
977
1116
|
});
|