gamma-app-controller 1.2.7 → 1.2.9

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.
@@ -1030,15 +1030,6 @@ class CommonService {
1030
1030
  return percent * (xMax - xMin) + xMin;
1031
1031
  }
1032
1032
  }
1033
- ThousandSeparator(value) {
1034
- if (Number(value)) {
1035
- if (value > 0 && value < 1) {
1036
- return value;
1037
- }
1038
- return Number(value).toLocaleString();
1039
- }
1040
- return value;
1041
- }
1042
1033
  reformatNumberWithThousandSeparator(value) {
1043
1034
  if (Number(value)) {
1044
1035
  if (value > 0 && value < 1) {
@@ -1991,11 +1982,11 @@ class CommonService {
1991
1982
  return result;
1992
1983
  return result;
1993
1984
  }
1994
- ThousandSeparatorWithTwoDecimals(value) {
1985
+ formatNumberWithDecimalPlaces(value, numberOfDigits) {
1995
1986
  let val;
1996
1987
  const numericValue = Number(value);
1997
1988
  if (!isNaN(numericValue)) {
1998
- val = numericValue.toFixed(2);
1989
+ val = numericValue.toFixed(numberOfDigits);
1999
1990
  }
2000
1991
  else {
2001
1992
  if (value == "-") {
@@ -2006,7 +1997,21 @@ class CommonService {
2006
1997
  return NaN;
2007
1998
  }
2008
1999
  }
2009
- return Number(val);
2000
+ var parts = val.toString().split(".");
2001
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
2002
+ return parts.join(".");
2003
+ }
2004
+ ThousandSeparatorWithTwoDecimals(value) {
2005
+ return this.formatNumberWithDecimalPlaces(value, 2);
2006
+ }
2007
+ ThousandSeparator(value) {
2008
+ if (Number(value)) {
2009
+ if (value > 0 && value < 1) {
2010
+ return value;
2011
+ }
2012
+ return Number(value).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
2013
+ }
2014
+ return value;
2010
2015
  }
2011
2016
  }
2012
2017
  CommonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonService, deps: [{ token: i1.HttpClient }, { token: i3$1.ToastrService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -8579,7 +8584,6 @@ class GammaAdvanceOperatorTableComponent {
8579
8584
  return;
8580
8585
  }
8581
8586
  else {
8582
- debugger;
8583
8587
  this.isLoader = true;
8584
8588
  this.page_config = value;
8585
8589
  this.page_parms = value.titleParams;
@@ -18368,9 +18372,9 @@ class KpiWithDataSetTestComponent {
18368
18372
  let apiCalls = [];
18369
18373
  this.allWidgetByDataset.forEach(view => {
18370
18374
  view.datasetIds.forEach(id => {
18371
- let found = this.dataSetModal.find(d => d.datasetId === id);
18375
+ let found = this.dataSetModal.find(d => d.datasetId === id.datasetId);
18372
18376
  if (found) {
18373
- apiCalls.push(this.datasetService.getDataFromDataSet(found, id, filter));
18377
+ apiCalls.push(this.datasetService.getDataFromDataSet(found, id.datasetId, filter));
18374
18378
  }
18375
18379
  });
18376
18380
  });
@@ -19269,9 +19273,9 @@ class KpiWithDataSetTestComponent {
19269
19273
  let apiCalls = [];
19270
19274
  this.allWidgetByDataset.forEach(view => {
19271
19275
  view.datasetIds.forEach(id => {
19272
- let found = this.dataSetModal.find(d => d.datasetId === id);
19276
+ let found = this.dataSetModal.find(d => d.datasetId === id.datasetId);
19273
19277
  if (found) {
19274
- apiCalls.push(this.datasetService.getDataFromDataSet(found, id, filter));
19278
+ apiCalls.push(this.datasetService.getDataFromDataSet(found, id.datasetId, filter));
19275
19279
  }
19276
19280
  });
19277
19281
  });
@@ -19302,9 +19306,9 @@ class KpiWithDataSetTestComponent {
19302
19306
  let apiCalls = [];
19303
19307
  this.allWidgetByDataset.forEach(view => {
19304
19308
  view.datasetIds.forEach(id => {
19305
- let found = this.dataSetModal.find(d => d.datasetId === id);
19309
+ let found = this.dataSetModal.find(d => d.datasetId === id.datasetId);
19306
19310
  if (found) {
19307
- apiCalls.push(this.datasetService.getDataFromDataSet(found, id, filter));
19311
+ apiCalls.push(this.datasetService.getDataFromDataSet(found, id.datasetId, filter));
19308
19312
  }
19309
19313
  });
19310
19314
  });
@@ -19329,6 +19333,7 @@ class KpiWithDataSetTestComponent {
19329
19333
  this.defaultViewIdsOnPageRefresh = [];
19330
19334
  const params = this.activatedRoute.snapshot.queryParams;
19331
19335
  this.defaultViewIdsOnPageRefresh = (params['views'] && params['views'] !== "") ? JSON.parse(decodeURIComponent(params['views'])) : [];
19336
+ debugger;
19332
19337
  all_views.forEach(element => {
19333
19338
  for (let entry of element.widgetNode) {
19334
19339
  let shouldDisplay = false;
@@ -19376,7 +19381,7 @@ class KpiWithDataSetTestComponent {
19376
19381
  currentViews.push(filterData);
19377
19382
  }
19378
19383
  const encodedViews = encodeURIComponent(JSON.stringify(currentViews));
19379
- const mergedParams = Object.assign({}, currentParams);
19384
+ const mergedParams = Object.assign(Object.assign({}, currentParams), { views: encodedViews });
19380
19385
  const navigation = {
19381
19386
  queryParams: mergedParams,
19382
19387
  queryParamsHandling: 'merge'