@annalib/anna-core 4.2.0 → 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.
@@ -379,6 +379,12 @@ class AnnaDateTimeFormatService {
379
379
  ? moment(value, ["HH:mm:ss"]).format("hA").slice(0, -1)
380
380
  : moment(value, ["HH:mm:ss"]).format("h:mmA").slice(0, -1);
381
381
  }
382
+ static formatTwelveHourTimeToHHMMAFormat(value) {
383
+ value = moment(value, ["HH:mm:A"]).format("HH:mm:ss");
384
+ return value[3] == "0" && value[4] == "0"
385
+ ? moment(value, ["HH:mm:ss"]).format("hA").slice(0, -1)
386
+ : moment(value, ["HH:mm:ss"]).format("h:mmA").slice(0, -1);
387
+ }
382
388
  formatDateAndHHMMATimeToStandardFormat(dateAndTime) {
383
389
  let standardFormat, date, time;
384
390
  if (dateAndTime.includes("|")) {
@@ -1178,14 +1184,18 @@ class AnnaFilterService {
1178
1184
  return val;
1179
1185
  };
1180
1186
  this.currencyTranslateFunction = (data) => {
1181
- if (data >= 1000) {
1182
- const val = (data / 1000).toFixed(1) + "k";
1183
- 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;
1184
1192
  }
1185
- else if (data != Math.floor(data)) {
1186
- 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;
1187
1198
  }
1188
- return "$" + data;
1189
1199
  };
1190
1200
  this.normalTranslateFunction = (data) => {
1191
1201
  if (data >= 1000) {
@@ -1740,7 +1750,7 @@ class AnnaNonEditableGenericTableComponent {
1740
1750
  this.isNoDataToDisplaySubject$.next(false);
1741
1751
  this.annaFilterService.initialValueMap = new Map();
1742
1752
  }
1743
- else if (changes["percentDone"] || changes["downloadInProgress"] || changes["starredInProgress"]) {
1753
+ else if (changes["percentDone"] || changes["downloadInProgress"] || (changes["starredInProgress"] && changes["starredInProgress"].currentValue != undefined)) {
1744
1754
  console.log("do nothing");
1745
1755
  }
1746
1756
  else {
@@ -2307,7 +2317,7 @@ class AnnaNonEditableGenericTableComponent {
2307
2317
  this.sliderEnteredMinValue = parseInt(val);
2308
2318
  this.isMinTextBoxEmpty = false;
2309
2319
  if (this.isMaxTextBoxEmpty) {
2310
- if (this.sliderEnteredMinValue > this.options.ceil) {
2320
+ if ((this.sliderEnteredMinValue > this.options.ceil) || (this.sliderEnteredMinValue < this.options.floor)) {
2311
2321
  this.showSliderMinValueError = true;
2312
2322
  this.disableSliderApplyButton = true;
2313
2323
  this.incorrectSliderInput = true;
@@ -2361,7 +2371,7 @@ class AnnaNonEditableGenericTableComponent {
2361
2371
  this.sliderEnteredMaxValue = parseInt(val);
2362
2372
  this.isMaxTextBoxEmpty = false;
2363
2373
  if (this.isMinTextBoxEmpty) {
2364
- if (this.sliderEnteredMaxValue < this.options.floor) {
2374
+ if ((this.sliderEnteredMaxValue < this.options.floor) || (this.sliderEnteredMaxValue > this.options.ceil)) {
2365
2375
  this.showSliderMaxValueError = true;
2366
2376
  this.disableSliderApplyButton = true;
2367
2377
  this.incorrectSliderInput = true;
@@ -2771,7 +2781,10 @@ class AnnaNonEditableGenericTableComponent {
2771
2781
  }
2772
2782
  else {
2773
2783
  values = this.tableData.map((u) => u[key]);
2774
- 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) {
2775
2788
  item.disableTooltipIcon = false;
2776
2789
  }
2777
2790
  }
@@ -3272,10 +3285,7 @@ class AnnaNonEditableGenericTableComponent {
3272
3285
  }
3273
3286
  setInitialRowsForTable() {
3274
3287
  this.resetIndex();
3275
- console.log(this.start);
3276
- console.log(this.end);
3277
3288
  this.renderedData = this.getTableData(this.start, this.end);
3278
- console.log(this.renderedData);
3279
3289
  this.updateIndex();
3280
3290
  }
3281
3291
  spotDetailsDownloadClicked(parentChildOrTotalRow, rowdata) {