principal-dashboard-lib-v2 0.0.39 → 0.0.40
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/bundles/principal-dashboard-lib-v2.umd.js +23 -8
- package/bundles/principal-dashboard-lib-v2.umd.js.map +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js.map +1 -1
- package/esm2015/lib/chartview/chartview.component.js +2 -2
- package/esm2015/lib/full-table-view/full-table-view.component.js +2 -3
- package/esm2015/lib/header/header.component.js +2 -2
- package/esm2015/lib/insights/insights.component.js +4 -2
- package/esm2015/lib/principal-dashboard-lib-v2.service.js +15 -1
- package/esm2015/lib/small-table-view/small-table-view.component.js +2 -2
- package/esm2015/lib/tableview/tableview.component.js +2 -2
- package/esm2015/lib/version.js +2 -2
- package/fesm2015/principal-dashboard-lib-v2.js +23 -8
- package/fesm2015/principal-dashboard-lib-v2.js.map +1 -1
- package/lib/principal-dashboard-lib-v2.service.d.ts +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.d.ts.map +1 -0
- package/package.json +1 -1
- package/principal-dashboard-lib-v2.d.ts.map +1 -0
- package/principal-dashboard-lib-v2.metadata.json +1 -1
|
@@ -43,6 +43,20 @@
|
|
|
43
43
|
this.detailRowRequest = null;
|
|
44
44
|
this.openSmallTable$ = this.openSmallTable.asObservable();
|
|
45
45
|
}
|
|
46
|
+
// the host may pass the day's data as a JSON string or as an already-parsed object
|
|
47
|
+
PrincipalDashboardLibV2Service.prototype.parseData = function (res) {
|
|
48
|
+
if (!res)
|
|
49
|
+
return null;
|
|
50
|
+
if (typeof res !== 'string')
|
|
51
|
+
return res;
|
|
52
|
+
try {
|
|
53
|
+
return JSON.parse(res);
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
console.error('principal-dashboard: could not parse data', e);
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
46
60
|
PrincipalDashboardLibV2Service.prototype.genarateResourseReqiuredData = function (data) {
|
|
47
61
|
this.isResoureMetaDataReady.next(false);
|
|
48
62
|
var resourceMetadataMatrix = new Array();
|
|
@@ -903,7 +917,7 @@
|
|
|
903
917
|
};
|
|
904
918
|
|
|
905
919
|
// Generated by scripts/lib-version.js from the library's package.json. Do not edit by hand.
|
|
906
|
-
var LIB_VERSION = '0.0.
|
|
920
|
+
var LIB_VERSION = '0.0.40';
|
|
907
921
|
|
|
908
922
|
var ChartheaderComponent = /** @class */ (function () {
|
|
909
923
|
function ChartheaderComponent(pdService) {
|
|
@@ -1337,7 +1351,7 @@
|
|
|
1337
1351
|
this.myDataList = document.getElementById('pd-xmlData');
|
|
1338
1352
|
// let parse = new DOMParser();
|
|
1339
1353
|
if (response) {
|
|
1340
|
-
this.myXmlData =
|
|
1354
|
+
this.myXmlData = this.pdService.parseData(response);
|
|
1341
1355
|
}
|
|
1342
1356
|
if (this.myXmlData) {
|
|
1343
1357
|
this.currentdataList = this.pdService.genarateUserReqiuredData(this.myXmlData);
|
|
@@ -2775,7 +2789,7 @@
|
|
|
2775
2789
|
// currentResoursedataList:any;
|
|
2776
2790
|
HeaderComponent.prototype.loadData = function (response) {
|
|
2777
2791
|
if (response) {
|
|
2778
|
-
this.mydata =
|
|
2792
|
+
this.mydata = this.pdService.parseData(response);
|
|
2779
2793
|
if (this.mydata) {
|
|
2780
2794
|
//get current data list
|
|
2781
2795
|
var genarateUserReqiuredData = this.excelService.genarateUserReqiuredData_Excel(this.mydata);
|
|
@@ -2850,7 +2864,7 @@
|
|
|
2850
2864
|
// let parse = new DOMParser();
|
|
2851
2865
|
// this.myXmlData = parse.parseFromString(response, 'application/xml');
|
|
2852
2866
|
if (response) {
|
|
2853
|
-
this.myXmlData =
|
|
2867
|
+
this.myXmlData = this.pdService.parseData(response);
|
|
2854
2868
|
if (this.myXmlData) {
|
|
2855
2869
|
// get current data list
|
|
2856
2870
|
//console.log("AAA myXmlData-->>",this.myXmlData)
|
|
@@ -3067,8 +3081,7 @@
|
|
|
3067
3081
|
Object.defineProperty(FullTableViewComponent.prototype, "data", {
|
|
3068
3082
|
set: function (res) {
|
|
3069
3083
|
if (res !== null) {
|
|
3070
|
-
|
|
3071
|
-
this.jsonResponse = JSON.parse(res);
|
|
3084
|
+
this.jsonResponse = this.pdService.parseData(res);
|
|
3072
3085
|
// rebuild rows when new data arrives (date change / refresh)
|
|
3073
3086
|
if (this.isInitialized) {
|
|
3074
3087
|
this.loadUserData();
|
|
@@ -3399,7 +3412,7 @@
|
|
|
3399
3412
|
set: function (res) {
|
|
3400
3413
|
if (res !== null) {
|
|
3401
3414
|
//console.log('smallTable',JSON.parse(res));
|
|
3402
|
-
this.jsonResponse =
|
|
3415
|
+
this.jsonResponse = this.pdService.parseData(res);
|
|
3403
3416
|
}
|
|
3404
3417
|
},
|
|
3405
3418
|
enumerable: false,
|
|
@@ -3992,7 +4005,9 @@
|
|
|
3992
4005
|
Object.defineProperty(InsightsComponent.prototype, "data", {
|
|
3993
4006
|
set: function (res) {
|
|
3994
4007
|
if (res) {
|
|
3995
|
-
|
|
4008
|
+
var json = this.pdService.parseData(res);
|
|
4009
|
+
if (json)
|
|
4010
|
+
this.build(json);
|
|
3996
4011
|
}
|
|
3997
4012
|
},
|
|
3998
4013
|
enumerable: false,
|