@annalib/anna-core 4.4.3 → 4.4.4
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/anna-core-shared-lib/services/anna-date-time-format.service.mjs +14 -12
- package/esm2020/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +8 -6
- package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +5 -1
- package/fesm2015/annalib-anna-core.mjs +24 -16
- package/fesm2015/annalib-anna-core.mjs.map +1 -1
- package/fesm2020/annalib-anna-core.mjs +24 -16
- package/fesm2020/annalib-anna-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -346,11 +346,11 @@ class AnnaDateTimeFormatService {
|
|
|
346
346
|
a = dayjs(a, format);
|
|
347
347
|
b = dayjs(b, format);
|
|
348
348
|
let results;
|
|
349
|
-
results = a.hours() > b.hours() ? 1 : a.hours() < b.hours() ? -1 : 0;
|
|
349
|
+
results = a.duration().hours() > b.duration().hours() ? 1 : a.duration().hours() < b.duration().hours() ? -1 : 0;
|
|
350
350
|
if (results === 0)
|
|
351
|
-
results = a.minutes() > b.minutes() ? 1 : a.minutes() < b.minutes() ? -1 : 0;
|
|
351
|
+
results = a.duration().minutes() > b.duration().minutes() ? 1 : a.duration().minutes() < b.duration().minutes() ? -1 : 0;
|
|
352
352
|
if (results === 0)
|
|
353
|
-
results = a.seconds() > b.seconds() ? 1 : a.seconds() < b.seconds() ? -1 : 0;
|
|
353
|
+
results = a.duration().seconds() > b.duration().seconds() ? 1 : a.duration().seconds() < b.duration().seconds() ? -1 : 0;
|
|
354
354
|
return results;
|
|
355
355
|
}
|
|
356
356
|
sortByTimeDescending(a, b) {
|
|
@@ -358,19 +358,21 @@ class AnnaDateTimeFormatService {
|
|
|
358
358
|
a = dayjs(a, format);
|
|
359
359
|
b = dayjs(b, format);
|
|
360
360
|
let results;
|
|
361
|
-
results = a.hours() < b.hours() ? 1 : a.hours() > b.hours() ? -1 : 0;
|
|
361
|
+
results = a.duration().hours() < b.duration().hours() ? 1 : a.duration().hours() > b.duration().hours() ? -1 : 0;
|
|
362
362
|
if (results === 0)
|
|
363
|
-
results = a.minutes() < b.minutes() ? 1 : a.minutes() > b.minutes() ? -1 : 0;
|
|
363
|
+
results = a.duration().minutes() < b.duration().minutes() ? 1 : a.duration().minutes() > b.duration().minutes() ? -1 : 0;
|
|
364
364
|
if (results === 0)
|
|
365
|
-
results = a.seconds() < b.seconds() ? 1 : a.seconds() > b.seconds() ? -1 : 0;
|
|
365
|
+
results = a.duration().seconds() < b.duration().seconds() ? 1 : a.duration().seconds() > b.duration().seconds() ? -1 : 0;
|
|
366
366
|
return results;
|
|
367
367
|
}
|
|
368
368
|
convertNgbDateToMoment(ngbDate) {
|
|
369
|
-
let
|
|
370
|
-
converted
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
369
|
+
let formatType = "MM/DD/YYYY";
|
|
370
|
+
let converted = null;
|
|
371
|
+
if (ngbDate && ngbDate.month && ngbDate.day && ngbDate.year) {
|
|
372
|
+
converted = ngbDate.month + "/" + ngbDate.day + "/" + ngbDate.year;
|
|
373
|
+
converted = dayjs(converted).format(formatType);
|
|
374
|
+
}
|
|
375
|
+
return converted;
|
|
374
376
|
}
|
|
375
377
|
compareDate(a, b, isAsc) {
|
|
376
378
|
return isAsc ? dayjs(a).diff(b) : dayjs(b).diff(a);
|
|
@@ -607,11 +609,13 @@ class AnnaWeekCalendarComponent {
|
|
|
607
609
|
const weekDay = yearStartDate.day();
|
|
608
610
|
const noOfDays = weekStartDate.diff(yearStartDate, "d") + 1;
|
|
609
611
|
function convertNgbDateToMoment(ngbDate) {
|
|
610
|
-
let
|
|
611
|
-
converted
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
612
|
+
let formatType = "MM/DD/YYYY";
|
|
613
|
+
let converted = null;
|
|
614
|
+
if (ngbDate && ngbDate.month && ngbDate.day && ngbDate.year) {
|
|
615
|
+
converted = ngbDate.month + "/" + ngbDate.day + "/" + ngbDate.year;
|
|
616
|
+
converted = dayjs(converted).format(formatType);
|
|
617
|
+
}
|
|
618
|
+
return converted;
|
|
615
619
|
}
|
|
616
620
|
function checkIfYearIsBroadcastLeapYear() {
|
|
617
621
|
let isLeapYear = (weekYear % 4 == 0 && weekYear % 100 != 0) || weekYear % 400 == 0;
|
|
@@ -2418,8 +2422,10 @@ class AnnaNonEditableGenericTableComponent {
|
|
|
2418
2422
|
this.disableSliderApplyButton = false;
|
|
2419
2423
|
this.incorrectSliderInput = false;
|
|
2420
2424
|
}
|
|
2425
|
+
console.log(this.sliderEnteredMinValue);
|
|
2421
2426
|
}
|
|
2422
2427
|
else {
|
|
2428
|
+
console.log('inside else condition');
|
|
2423
2429
|
this.sliderEnteredMinValue = this.options.floor;
|
|
2424
2430
|
this.isMinTextBoxEmpty = true;
|
|
2425
2431
|
this.showSliderMinValueError = false;
|
|
@@ -2476,6 +2482,7 @@ class AnnaNonEditableGenericTableComponent {
|
|
|
2476
2482
|
this.sliderEnteredMaxValue = this.options.ceil;
|
|
2477
2483
|
this.isMaxTextBoxEmpty = true;
|
|
2478
2484
|
this.showSliderMaxValueError = false;
|
|
2485
|
+
console.log(this.sliderEnteredMaxValue);
|
|
2479
2486
|
}
|
|
2480
2487
|
this.showErrorForMinAndMaxValue();
|
|
2481
2488
|
}
|
|
@@ -3276,6 +3283,7 @@ class AnnaNonEditableGenericTableComponent {
|
|
|
3276
3283
|
checkIfSortingChanged() {
|
|
3277
3284
|
this.isSortChanged = this.tempSortOrder != null && this.tempSortOrder != this.annaSortService.columnSortState.get(this.annaFilterService.selectedRadio);
|
|
3278
3285
|
;
|
|
3286
|
+
console.log(this.isSortChanged);
|
|
3279
3287
|
return this.isSortChanged;
|
|
3280
3288
|
}
|
|
3281
3289
|
disableApplyButtonOfSelectedFilter() {
|