gamma-app-controller 1.2.15 → 1.2.16
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/esm2020/lib/template-module/defaulLandingComponent/landing-component.component.mjs +8 -6
- package/esm2020/lib/template-module/kpiWithSingleLayout/kpi-with-dataset.component.mjs +7 -4
- package/fesm2015/gamma-app-controller.mjs +13 -8
- package/fesm2015/gamma-app-controller.mjs.map +1 -1
- package/fesm2020/gamma-app-controller.mjs +13 -8
- package/fesm2020/gamma-app-controller.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -18624,6 +18624,7 @@ class KpiWithDataSetTestComponent {
|
|
|
18624
18624
|
});
|
|
18625
18625
|
let datasetIds = new Set();
|
|
18626
18626
|
let viewIds = new Set();
|
|
18627
|
+
let datasetIdsSet = new Set();
|
|
18627
18628
|
widget.widgetNode.forEach(node => {
|
|
18628
18629
|
if (node.nodeProperties.display) {
|
|
18629
18630
|
node.compConfig.viewConfig.forEach(view => {
|
|
@@ -18643,6 +18644,7 @@ class KpiWithDataSetTestComponent {
|
|
|
18643
18644
|
viewId: view.viewId,
|
|
18644
18645
|
filter: derivedFilters
|
|
18645
18646
|
};
|
|
18647
|
+
datasetIdsSet.add(view.datasetId);
|
|
18646
18648
|
datasetIds.add(node);
|
|
18647
18649
|
viewIds.add(view.viewId);
|
|
18648
18650
|
});
|
|
@@ -18657,11 +18659,12 @@ class KpiWithDataSetTestComponent {
|
|
|
18657
18659
|
const newViews = this.defaultViewIdsOnPageRefresh.map(item => item.viewId);
|
|
18658
18660
|
this.defaultViewIds = [...this.defaultViewIds, ...newViews.filter(item => !this.defaultViewIds.includes(item))];
|
|
18659
18661
|
}
|
|
18662
|
+
let uniquedatasetIds = Array.from(datasetIdsSet);
|
|
18660
18663
|
let obj = {
|
|
18661
18664
|
widgetId: widget.widgetId,
|
|
18662
18665
|
pageId: widget.pageId,
|
|
18663
18666
|
filters: defaultFilters,
|
|
18664
|
-
datasetIds:
|
|
18667
|
+
datasetIds: uniquedatasetIds
|
|
18665
18668
|
};
|
|
18666
18669
|
this.allWidgetByDataset.push(obj);
|
|
18667
18670
|
});
|
|
@@ -18669,9 +18672,9 @@ class KpiWithDataSetTestComponent {
|
|
|
18669
18672
|
let apiCalls = [];
|
|
18670
18673
|
this.allWidgetByDataset.forEach(view => {
|
|
18671
18674
|
view.datasetIds.forEach(id => {
|
|
18672
|
-
let found = datasetConfig.find(d => d.datasetId === id
|
|
18675
|
+
let found = datasetConfig.find(d => d.datasetId === id);
|
|
18673
18676
|
if (found) {
|
|
18674
|
-
apiCalls.push(this.datasetService.getDataFromDataSet(found, id
|
|
18677
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(found, id, view.filters));
|
|
18675
18678
|
}
|
|
18676
18679
|
});
|
|
18677
18680
|
});
|
|
@@ -22279,6 +22282,7 @@ class LandingComponentComponent {
|
|
|
22279
22282
|
});
|
|
22280
22283
|
let datasetIds = new Set();
|
|
22281
22284
|
let viewIds = new Set();
|
|
22285
|
+
let datasetIdsSet = new Set();
|
|
22282
22286
|
widget.widgetNode.forEach(node => {
|
|
22283
22287
|
if (node.nodeProperties.display) {
|
|
22284
22288
|
node.compConfig.viewConfig.forEach(view => {
|
|
@@ -22298,6 +22302,7 @@ class LandingComponentComponent {
|
|
|
22298
22302
|
viewId: view.viewId,
|
|
22299
22303
|
filter: derivedFilters
|
|
22300
22304
|
};
|
|
22305
|
+
datasetIdsSet.add(view.datasetId);
|
|
22301
22306
|
datasetIds.add(node);
|
|
22302
22307
|
viewIds.add(view.viewId);
|
|
22303
22308
|
});
|
|
@@ -22312,21 +22317,23 @@ class LandingComponentComponent {
|
|
|
22312
22317
|
const newViews = this.defaultViewIdsOnPageRefresh.map(item => item.viewId);
|
|
22313
22318
|
this.defaultViewIds = [...this.defaultViewIds, ...newViews.filter(item => !this.defaultViewIds.includes(item))];
|
|
22314
22319
|
}
|
|
22320
|
+
let uniquedatasetIds = Array.from(datasetIdsSet);
|
|
22315
22321
|
let obj = {
|
|
22316
22322
|
widgetId: widget.widgetId,
|
|
22317
22323
|
pageId: widget.pageId,
|
|
22318
22324
|
filters: defaultFilters,
|
|
22319
|
-
datasetIds:
|
|
22325
|
+
datasetIds: uniquedatasetIds
|
|
22320
22326
|
};
|
|
22321
22327
|
this.allWidgetByDataset.push(obj);
|
|
22322
22328
|
});
|
|
22329
|
+
debugger;
|
|
22323
22330
|
this.uniqueDataSetObject = {};
|
|
22324
22331
|
let apiCalls = [];
|
|
22325
22332
|
this.allWidgetByDataset.forEach(view => {
|
|
22326
22333
|
view.datasetIds.forEach(id => {
|
|
22327
|
-
let found = datasetConfig.find(d => d.datasetId === id
|
|
22334
|
+
let found = datasetConfig.find(d => d.datasetId === id);
|
|
22328
22335
|
if (found) {
|
|
22329
|
-
apiCalls.push(this.datasetService.getDataFromDataSet(found, id
|
|
22336
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(found, id, view.filters));
|
|
22330
22337
|
}
|
|
22331
22338
|
});
|
|
22332
22339
|
});
|
|
@@ -22400,7 +22407,6 @@ class LandingComponentComponent {
|
|
|
22400
22407
|
const itemDiv = document.createElement('div');
|
|
22401
22408
|
itemDiv.id = elementId;
|
|
22402
22409
|
itemDiv.classList.add(item.nodeProperties.width, w_height, 'mb-2');
|
|
22403
|
-
debugger;
|
|
22404
22410
|
if (item.nodeProperties.widgetTitle !== "") {
|
|
22405
22411
|
const widgetDiv = this.getWidgetTitleDiv(item);
|
|
22406
22412
|
itemDiv.appendChild(widgetDiv);
|
|
@@ -22422,7 +22428,6 @@ class LandingComponentComponent {
|
|
|
22422
22428
|
else if (existingElement) {
|
|
22423
22429
|
const itemDiv = existingElement;
|
|
22424
22430
|
itemDiv.innerHTML = '';
|
|
22425
|
-
debugger;
|
|
22426
22431
|
if (item.nodeProperties.widgetTitle !== "") {
|
|
22427
22432
|
const widgetDiv = this.getWidgetTitleDiv(item);
|
|
22428
22433
|
itemDiv.appendChild(widgetDiv);
|