@annalib/anna-core 4.2.1 → 4.2.2

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.
@@ -1184,14 +1184,18 @@ class AnnaFilterService {
1184
1184
  return val;
1185
1185
  };
1186
1186
  this.currencyTranslateFunction = (data) => {
1187
- if (data >= 1000) {
1188
- const val = (data / 1000).toFixed(1) + "k";
1189
- return "$" + val;
1187
+ if (Math.abs(data) >= 1000) {
1188
+ let isNegVal = data < 0;
1189
+ const val = "$" + (Math.abs(data) / 1000).toFixed(1);
1190
+ +"k";
1191
+ return isNegVal ? "-" + val : val;
1190
1192
  }
1191
- else if (data != Math.floor(data)) {
1192
- return data.toFixed(1).toString();
1193
+ else {
1194
+ let isNegVal = data < 0;
1195
+ let isWholeNum = parseInt(data.toString()) == data;
1196
+ let val = isWholeNum ? Math.abs(data).toString() : Math.abs(data).toFixed(1);
1197
+ return isNegVal ? "-$" + val : "$" + val;
1193
1198
  }
1194
- return "$" + data;
1195
1199
  };
1196
1200
  this.normalTranslateFunction = (data) => {
1197
1201
  if (data >= 1000) {
@@ -1746,7 +1750,7 @@ class AnnaNonEditableGenericTableComponent {
1746
1750
  this.isNoDataToDisplaySubject$.next(false);
1747
1751
  this.annaFilterService.initialValueMap = new Map();
1748
1752
  }
1749
- else if (changes["percentDone"] || changes["downloadInProgress"] || changes["starredInProgress"]) {
1753
+ else if (changes["percentDone"] || changes["downloadInProgress"] || (changes["starredInProgress"] && changes["starredInProgress"].currentValue != undefined)) {
1750
1754
  console.log("do nothing");
1751
1755
  }
1752
1756
  else {
@@ -2313,7 +2317,7 @@ class AnnaNonEditableGenericTableComponent {
2313
2317
  this.sliderEnteredMinValue = parseInt(val);
2314
2318
  this.isMinTextBoxEmpty = false;
2315
2319
  if (this.isMaxTextBoxEmpty) {
2316
- if (this.sliderEnteredMinValue > this.options.ceil) {
2320
+ if ((this.sliderEnteredMinValue > this.options.ceil) || (this.sliderEnteredMinValue < this.options.floor)) {
2317
2321
  this.showSliderMinValueError = true;
2318
2322
  this.disableSliderApplyButton = true;
2319
2323
  this.incorrectSliderInput = true;
@@ -2367,7 +2371,7 @@ class AnnaNonEditableGenericTableComponent {
2367
2371
  this.sliderEnteredMaxValue = parseInt(val);
2368
2372
  this.isMaxTextBoxEmpty = false;
2369
2373
  if (this.isMinTextBoxEmpty) {
2370
- if (this.sliderEnteredMaxValue < this.options.floor) {
2374
+ if ((this.sliderEnteredMaxValue < this.options.floor) || (this.sliderEnteredMaxValue > this.options.ceil)) {
2371
2375
  this.showSliderMaxValueError = true;
2372
2376
  this.disableSliderApplyButton = true;
2373
2377
  this.incorrectSliderInput = true;
@@ -2777,7 +2781,10 @@ class AnnaNonEditableGenericTableComponent {
2777
2781
  }
2778
2782
  else {
2779
2783
  values = this.tableData.map((u) => u[key]);
2780
- if (uniq(values).filter(n => n != null).length > 1) {
2784
+ if (item.filter == "CHECKBOX" && uniq(values).filter(n => n != null).length > 1) {
2785
+ item.disableTooltipIcon = false;
2786
+ }
2787
+ else if (item.filter != "CHECKBOX" && uniq(values).filter(n => n != null && n != "-").length > 1) {
2781
2788
  item.disableTooltipIcon = false;
2782
2789
  }
2783
2790
  }
@@ -3278,10 +3285,7 @@ class AnnaNonEditableGenericTableComponent {
3278
3285
  }
3279
3286
  setInitialRowsForTable() {
3280
3287
  this.resetIndex();
3281
- console.log(this.start);
3282
- console.log(this.end);
3283
3288
  this.renderedData = this.getTableData(this.start, this.end);
3284
- console.log(this.renderedData);
3285
3289
  this.updateIndex();
3286
3290
  }
3287
3291
  spotDetailsDownloadClicked(parentChildOrTotalRow, rowdata) {