@annalib/anna-core 0.0.1
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/README.md +24 -0
- package/annalib-anna-core.d.ts +5 -0
- package/esm2020/annalib-anna-core.mjs +5 -0
- package/esm2020/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +59 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.mjs +21 -0
- package/esm2020/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
- package/esm2020/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
- package/esm2020/lib/anna-core-shared-lib/index.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
- package/esm2020/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +26 -0
- package/esm2020/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
- package/esm2020/lib/anna-core-shared-lib/public-api.mjs +25 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +180 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-filter.service.mjs +537 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +52 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
- package/esm2020/lib/anna-core-shared-lib/services/anna-sort.service.mjs +185 -0
- package/esm2020/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
- package/esm2020/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +76 -0
- package/esm2020/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +360 -0
- package/esm2020/lib/anna-dropdown-lib/index.mjs +2 -0
- package/esm2020/lib/anna-dropdown-lib/public-api.mjs +6 -0
- package/esm2020/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +86 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +991 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +125 -0
- package/esm2020/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.mjs +189 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
- package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
- package/esm2020/lib/anna-generic-table-lib/index.mjs +2 -0
- package/esm2020/lib/anna-generic-table-lib/public-api.mjs +10 -0
- package/esm2020/public-api.mjs +7 -0
- package/esm2020/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +59 -0
- package/esm2020/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +5 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.mjs +21 -0
- package/esm2020/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
- package/esm2020/src/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
- package/esm2020/src/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +26 -0
- package/esm2020/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
- package/esm2020/src/lib/anna-core-shared-lib/public-api.mjs +25 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +180 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-filter.service.mjs +537 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +52 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
- package/esm2020/src/lib/anna-core-shared-lib/services/anna-sort.service.mjs +185 -0
- package/esm2020/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
- package/esm2020/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +5 -0
- package/esm2020/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +76 -0
- package/esm2020/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +360 -0
- package/esm2020/src/lib/anna-dropdown-lib/public-api.mjs +6 -0
- package/esm2020/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +86 -0
- package/esm2020/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +5 -0
- package/esm2020/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +991 -0
- package/esm2020/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +125 -0
- package/esm2020/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.mjs +189 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
- package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
- package/esm2020/src/lib/anna-generic-table-lib/public-api.mjs +10 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1295 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +474 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +1887 -0
- package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
- package/fesm2015/annalib-anna-core.mjs +3630 -0
- package/fesm2015/annalib-anna-core.mjs.map +1 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1295 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +472 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +1886 -0
- package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
- package/fesm2020/annalib-anna-core.mjs +3627 -0
- package/fesm2020/annalib-anna-core.mjs.map +1 -0
- package/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +14 -0
- package/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
- package/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts +11 -0
- package/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
- package/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
- package/lib/anna-core-shared-lib/index.d.ts +1 -0
- package/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +8 -0
- package/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts +95 -0
- package/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts +70 -0
- package/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +21 -0
- package/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
- package/lib/anna-core-shared-lib/public-api.d.ts +18 -0
- package/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
- package/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +68 -0
- package/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
- package/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
- package/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +23 -0
- package/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
- package/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +29 -0
- package/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +67 -0
- package/lib/anna-dropdown-lib/index.d.ts +1 -0
- package/lib/anna-dropdown-lib/public-api.d.ts +3 -0
- package/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +21 -0
- package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +171 -0
- package/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +27 -0
- package/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
- package/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.d.ts +89 -0
- package/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts +1 -0
- package/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
- package/lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts +1 -0
- package/lib/anna-generic-table-lib/index.d.ts +1 -0
- package/lib/anna-generic-table-lib/public-api.d.ts +6 -0
- package/package.json +61 -0
- package/public-api.d.ts +3 -0
- package/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +14 -0
- package/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.d.ts +5 -0
- package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
- package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts +11 -0
- package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
- package/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +8 -0
- package/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts +95 -0
- package/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts +70 -0
- package/src/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +21 -0
- package/src/lib/anna-core-shared-lib/package.json +10 -0
- package/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
- package/src/lib/anna-core-shared-lib/public-api.d.ts +18 -0
- package/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
- package/src/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +68 -0
- package/src/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
- package/src/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
- package/src/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +23 -0
- package/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
- package/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.d.ts +5 -0
- package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +29 -0
- package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +67 -0
- package/src/lib/anna-dropdown-lib/package.json +10 -0
- package/src/lib/anna-dropdown-lib/public-api.d.ts +3 -0
- package/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +21 -0
- package/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.d.ts +5 -0
- package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +171 -0
- package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +27 -0
- package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
- package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.d.ts +89 -0
- package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts +1 -0
- package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
- package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts +1 -0
- package/src/lib/anna-generic-table-lib/package.json +10 -0
- package/src/lib/anna-generic-table-lib/public-api.d.ts +6 -0
|
@@ -0,0 +1,1887 @@
|
|
|
1
|
+
import * as i10 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, forwardRef, Directive, ContentChildren, ViewChildren, NgModule } from '@angular/core';
|
|
5
|
+
import * as i14 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import * as i6 from '@angular/material/radio';
|
|
8
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
9
|
+
import * as i9 from '@angular/material/button-toggle';
|
|
10
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
11
|
+
import * as i3$1 from '@angular/material/table';
|
|
12
|
+
import { MatHeaderRowDef, MatTableModule } from '@angular/material/table';
|
|
13
|
+
import * as i3 from '@ng-bootstrap/ng-bootstrap';
|
|
14
|
+
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
15
|
+
import * as i7 from '@angular-slider/ngx-slider';
|
|
16
|
+
import { NgxSliderModule } from '@angular-slider/ngx-slider';
|
|
17
|
+
import * as i5 from 'ngx-skeleton-loader';
|
|
18
|
+
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
|
|
19
|
+
import moment from 'moment';
|
|
20
|
+
import { cloneDeep, map as map$1, uniq, isEqual } from 'lodash-es';
|
|
21
|
+
import * as i1 from '@annalib/anna-core/src/lib/anna-core-shared-lib';
|
|
22
|
+
import { AnnaFilterService, radioButtonModel, AnnaCoreSharedLibModule } from '@annalib/anna-core/src/lib/anna-core-shared-lib';
|
|
23
|
+
import { animationFrameScheduler, asapScheduler, Subject, Observable, Subscription, isObservable, of } from 'rxjs';
|
|
24
|
+
import { startWith, auditTime, takeUntil, distinctUntilChanged, pairwise, switchMap, shareReplay, map } from 'rxjs/operators';
|
|
25
|
+
import * as i2 from '@angular/cdk/scrolling';
|
|
26
|
+
import { CdkScrollable, VIRTUAL_SCROLL_STRATEGY, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
27
|
+
import * as i1$1 from '@angular/cdk/bidi';
|
|
28
|
+
import * as i8 from '@annalib/anna-core/src/lib/anna-dropdown-lib';
|
|
29
|
+
import { AnnaDropdownLibModule } from '@annalib/anna-core/src/lib/anna-dropdown-lib';
|
|
30
|
+
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
31
|
+
import { isDataSource, ArrayDataSource } from '@angular/cdk/collections';
|
|
32
|
+
import * as i2$1 from '@angular/cdk/table';
|
|
33
|
+
import { _COALESCED_STYLE_SCHEDULER, STICKY_POSITIONING_LISTENER, CdkHeaderRowDef } from '@angular/cdk/table';
|
|
34
|
+
|
|
35
|
+
// Angular import statements
|
|
36
|
+
;
|
|
37
|
+
class AnnaSortComponent {
|
|
38
|
+
constructor(annaSortService) {
|
|
39
|
+
this.annaSortService = annaSortService;
|
|
40
|
+
this.firstSortApplied = false;
|
|
41
|
+
this.sortedData = new EventEmitter();
|
|
42
|
+
}
|
|
43
|
+
ngOnChanges(changes) {
|
|
44
|
+
if (!this.firstSortApplied && changes['data'] && changes['data'].currentValue) {
|
|
45
|
+
this.clonedData = cloneDeep(this.data);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
isFirstTimeSorting() {
|
|
49
|
+
this.firstSortApplied = true;
|
|
50
|
+
this.clonedData = cloneDeep(this.data);
|
|
51
|
+
}
|
|
52
|
+
sortByAscending() {
|
|
53
|
+
if (!this.firstSortApplied) {
|
|
54
|
+
this.isFirstTimeSorting();
|
|
55
|
+
}
|
|
56
|
+
const isAsc = true;
|
|
57
|
+
if (this.sortBy === "dates") {
|
|
58
|
+
this.sortBy = "startDate";
|
|
59
|
+
}
|
|
60
|
+
this.setAscState();
|
|
61
|
+
this.setDescState();
|
|
62
|
+
this.annaSortService.sortByAsc.set(this.sortBy, true);
|
|
63
|
+
this.annaSortService.isAsc = true;
|
|
64
|
+
this.annaSortService.keySorted = this.sortBy;
|
|
65
|
+
this.sortedData.emit(this.annaSortService.sort(isAsc, this.data, this.sortBy));
|
|
66
|
+
this.closeTooltip();
|
|
67
|
+
}
|
|
68
|
+
sortByDescending() {
|
|
69
|
+
if (!this.firstSortApplied) {
|
|
70
|
+
this.isFirstTimeSorting();
|
|
71
|
+
}
|
|
72
|
+
const isAsc = false;
|
|
73
|
+
if (this.sortBy === "dates") {
|
|
74
|
+
this.sortBy = "endDate";
|
|
75
|
+
}
|
|
76
|
+
this.setDescState();
|
|
77
|
+
this.setAscState();
|
|
78
|
+
this.annaSortService.sortByDesc.set(this.sortBy, true);
|
|
79
|
+
this.annaSortService.isAsc = false;
|
|
80
|
+
this.annaSortService.keySorted = this.sortBy;
|
|
81
|
+
this.sortedData.emit(this.annaSortService.sort(isAsc, this.data, this.sortBy));
|
|
82
|
+
this.closeTooltip();
|
|
83
|
+
}
|
|
84
|
+
setAscState() {
|
|
85
|
+
this.annaSortService.sortByAsc.forEach((value, key) => {
|
|
86
|
+
this.annaSortService.sortByAsc.set(key, false);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
setDescState() {
|
|
90
|
+
this.annaSortService.sortByDesc.forEach((value, key) => {
|
|
91
|
+
this.annaSortService.sortByDesc.set(key, false);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
removeSorting() {
|
|
95
|
+
this.firstSortApplied = false;
|
|
96
|
+
this.annaSortService.sortByAsc = new Map();
|
|
97
|
+
this.annaSortService.sortByDesc = new Map();
|
|
98
|
+
this.sortedData.emit({ data: this.clonedData, type: "none" });
|
|
99
|
+
this.closeTooltip();
|
|
100
|
+
}
|
|
101
|
+
bindTheValueToToolTip(tooltip) {
|
|
102
|
+
if (this.annaSortService.tooltip == tooltip) {
|
|
103
|
+
this.closeTooltip();
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
this.closeTooltip();
|
|
107
|
+
this.annaSortService.tooltip = tooltip;
|
|
108
|
+
this.annaSortService.tooltip.open();
|
|
109
|
+
this.selectRadioButton();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
selectRadioButton() {
|
|
113
|
+
if (this.annaSortService.sortByAsc.has(this.sortBy) && this.annaSortService.sortByAsc.get(this.sortBy)) {
|
|
114
|
+
this.selectedRadio = "ascending";
|
|
115
|
+
}
|
|
116
|
+
else if (this.annaSortService.sortByDesc.has(this.sortBy) && this.annaSortService.sortByDesc.get(this.sortBy)) {
|
|
117
|
+
this.selectedRadio = "descending";
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
this.selectedRadio = "none";
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
closeTooltip() {
|
|
124
|
+
if (this.annaSortService.tooltip && this.annaSortService.tooltip.isOpen()) {
|
|
125
|
+
this.annaSortService.tooltip.close();
|
|
126
|
+
}
|
|
127
|
+
this.annaSortService.tooltip = null;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
AnnaSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, deps: [{ token: i1.AnnaSortService }], target: i0.ɵɵFactoryTarget.Component });
|
|
131
|
+
AnnaSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: { data: "data", sortBy: "sortBy", disableSort: "disableSort", placement: "placement" }, outputs: { sortedData: "sort" }, usesOnChanges: true, ngImport: i0, template: "<p class=\"sort\">\r\n <i\r\n class=\"mdi mdi-sort\"\r\n [ngClass]=\"{\r\n active: this.annaSortService.sortByDesc.get(this.sortBy) || this.annaSortService.sortByAsc.get(this.sortBy),\r\n disable: disableSort\r\n }\"\r\n [ngbTooltip]=\"sortTooltip\"\r\n placement=\"{{ placement != undefined ? 'auto' : 'bottom' }}\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n #sort=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(sort)\"\r\n ></i>\r\n</p>\r\n\r\n<ng-template #sortTooltip>\r\n <section class=\"sort-container\">\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"ascending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"ascending\"\r\n (click)=\"sortByAscending()\"\r\n />\r\n <label for=\"ascending\">Ascending</label>\r\n </div>\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"descending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"descending\"\r\n (click)=\"sortByDescending()\"\r\n />\r\n <label for=\"descending\">Descending</label>\r\n </div>\r\n <div>\r\n <input type=\"radio\" id=\"none\" [ngModel]=\"selectedRadio\" name=\"sortToolTip\" value=\"none\" (click)=\"removeSorting()\" />\r\n <label for=\"none\">None</label>\r\n </div>\r\n </section>\r\n</ng-template>\r\n", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}\n"], directives: [{ type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i14.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, decorators: [{
|
|
133
|
+
type: Component,
|
|
134
|
+
args: [{ selector: "anna-core-sort-lib", template: "<p class=\"sort\">\r\n <i\r\n class=\"mdi mdi-sort\"\r\n [ngClass]=\"{\r\n active: this.annaSortService.sortByDesc.get(this.sortBy) || this.annaSortService.sortByAsc.get(this.sortBy),\r\n disable: disableSort\r\n }\"\r\n [ngbTooltip]=\"sortTooltip\"\r\n placement=\"{{ placement != undefined ? 'auto' : 'bottom' }}\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n #sort=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(sort)\"\r\n ></i>\r\n</p>\r\n\r\n<ng-template #sortTooltip>\r\n <section class=\"sort-container\">\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"ascending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"ascending\"\r\n (click)=\"sortByAscending()\"\r\n />\r\n <label for=\"ascending\">Ascending</label>\r\n </div>\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"descending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"descending\"\r\n (click)=\"sortByDescending()\"\r\n />\r\n <label for=\"descending\">Descending</label>\r\n </div>\r\n <div>\r\n <input type=\"radio\" id=\"none\" [ngModel]=\"selectedRadio\" name=\"sortToolTip\" value=\"none\" (click)=\"removeSorting()\" />\r\n <label for=\"none\">None</label>\r\n </div>\r\n </section>\r\n</ng-template>\r\n", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}\n"] }]
|
|
135
|
+
}], ctorParameters: function () { return [{ type: i1.AnnaSortService }]; }, propDecorators: { data: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], sortBy: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], disableSort: [{
|
|
140
|
+
type: Input
|
|
141
|
+
}], placement: [{
|
|
142
|
+
type: Input,
|
|
143
|
+
args: ["placement"]
|
|
144
|
+
}], sortedData: [{
|
|
145
|
+
type: Output,
|
|
146
|
+
args: ["sort"]
|
|
147
|
+
}] } });
|
|
148
|
+
|
|
149
|
+
/** Checks if the given ranges are equal. */
|
|
150
|
+
function rangesEqual(r1, r2) {
|
|
151
|
+
return r1.start == r2.start && r1.end == r2.end;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Scheduler to be used for scroll events. Needs to fall back to
|
|
155
|
+
* something that doesn't rely on requestAnimationFrame on environments
|
|
156
|
+
* that don't support it (e.g. server-side rendering).
|
|
157
|
+
*/
|
|
158
|
+
const SCROLL_SCHEDULER = typeof requestAnimationFrame !== "undefined"
|
|
159
|
+
? animationFrameScheduler
|
|
160
|
+
: asapScheduler;
|
|
161
|
+
/**
|
|
162
|
+
* A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`.
|
|
163
|
+
* Uses `top: #px` instead of `transform: translateY(#px)` like the cdk virtual scroll viewport does
|
|
164
|
+
* which avoids flickering of elements in the transformed container with `position: sticky`.
|
|
165
|
+
*/
|
|
166
|
+
class AnnaTableVirtualScrollViewportComponent extends CdkScrollable {
|
|
167
|
+
constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, annaGtService) {
|
|
168
|
+
super(elementRef, scrollDispatcher, ngZone, dir);
|
|
169
|
+
this.elementRef = elementRef;
|
|
170
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
171
|
+
this._scrollStrategy = _scrollStrategy;
|
|
172
|
+
this.annaGtService = annaGtService;
|
|
173
|
+
/** Emits when the viewport is detached from a CdkVirtualForOf. */
|
|
174
|
+
this._detachedSubject = new Subject();
|
|
175
|
+
/** Emits when the rendered range changes. */
|
|
176
|
+
this._renderedRangeSubject = new Subject();
|
|
177
|
+
this._orientation = "vertical";
|
|
178
|
+
// Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
|
|
179
|
+
// strategy lazily (i.e. only if the user is actually listening to the events). We do this because
|
|
180
|
+
// depending on how the strategy calculates the scrolled index, it may come at a cost to
|
|
181
|
+
// performance.
|
|
182
|
+
/** Emits when the index of the first element visible in the viewport changes. */
|
|
183
|
+
this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));
|
|
184
|
+
/** A stream that emits whenever the rendered range changes. */
|
|
185
|
+
this.renderedRangeStream = this._renderedRangeSubject;
|
|
186
|
+
/**
|
|
187
|
+
* The total size of all content (in pixels), including content that is not currently rendered.
|
|
188
|
+
*/
|
|
189
|
+
this._totalContentSize = 0;
|
|
190
|
+
/** A string representing the `style.width` property value to be used for the spacer element. */
|
|
191
|
+
this._totalContentWidth = "";
|
|
192
|
+
/** A string representing the `style.height` property value to be used for the spacer element. */
|
|
193
|
+
this._totalContentHeight = "";
|
|
194
|
+
/** The currently rendered range of indices. */
|
|
195
|
+
this._renderedRange = { start: 0, end: 0 };
|
|
196
|
+
/** The length of the data bound to this viewport (in number of items). */
|
|
197
|
+
this._dataLength = 0;
|
|
198
|
+
/** The size of the viewport (in pixels). */
|
|
199
|
+
this._viewportSize = 0;
|
|
200
|
+
/** The last rendered content offset that was set. */
|
|
201
|
+
this._renderedContentOffset = 0;
|
|
202
|
+
/**
|
|
203
|
+
* Whether the last rendered content offset was to the end of the content (and therefore needs to
|
|
204
|
+
* be rewritten as an offset to the start of the content).
|
|
205
|
+
*/
|
|
206
|
+
this._renderedContentOffsetNeedsRewrite = false;
|
|
207
|
+
/** Whether there is a pending change detection cycle. */
|
|
208
|
+
this._isChangeDetectionPending = false;
|
|
209
|
+
/** A list of functions to run after the next change detection cycle. */
|
|
210
|
+
this._runAfterChangeDetection = [];
|
|
211
|
+
/** Subscription to changes in the viewport size. */
|
|
212
|
+
this._viewportChanges = Subscription.EMPTY;
|
|
213
|
+
if (!_scrollStrategy) {
|
|
214
|
+
throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
|
|
215
|
+
}
|
|
216
|
+
this._viewportChanges = viewportRuler.change().subscribe(() => {
|
|
217
|
+
this.checkViewportSize();
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/** The direction the viewport scrolls. */
|
|
221
|
+
get orientation() {
|
|
222
|
+
return this._orientation;
|
|
223
|
+
}
|
|
224
|
+
set orientation(orientation) {
|
|
225
|
+
if (this._orientation !== orientation) {
|
|
226
|
+
this._orientation = orientation;
|
|
227
|
+
this._calculateSpacerSize();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
ngOnInit() {
|
|
231
|
+
super.ngOnInit();
|
|
232
|
+
// It's still too early to measure the viewport at this point. Deferring with a promise allows
|
|
233
|
+
// the Viewport to be rendered with the correct size before we measure. We run this outside the
|
|
234
|
+
// zone to avoid causing more change detection cycles. We handle the change detection loop
|
|
235
|
+
// ourselves instead.
|
|
236
|
+
this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
|
|
237
|
+
this._measureViewportSize();
|
|
238
|
+
this._scrollStrategy.attach(this);
|
|
239
|
+
this.elementScrolled()
|
|
240
|
+
.pipe(
|
|
241
|
+
// Start off with a fake scroll event so we properly detect our initial position.
|
|
242
|
+
startWith(null),
|
|
243
|
+
// Collect multiple events into one until the next animation frame. This way if
|
|
244
|
+
// there are multiple scroll events in the same frame we only need to recheck
|
|
245
|
+
// our layout once.
|
|
246
|
+
auditTime(0, SCROLL_SCHEDULER))
|
|
247
|
+
.subscribe(() => { this._scrollStrategy.onContentScrolled(); this.annaGtService.virtualScrollSubject.next(true); });
|
|
248
|
+
this._markChangeDetectionNeeded();
|
|
249
|
+
}));
|
|
250
|
+
}
|
|
251
|
+
ngOnDestroy() {
|
|
252
|
+
this.detach();
|
|
253
|
+
this._scrollStrategy.detach();
|
|
254
|
+
// Complete all subjects
|
|
255
|
+
this._renderedRangeSubject.complete();
|
|
256
|
+
this._detachedSubject.complete();
|
|
257
|
+
this._viewportChanges.unsubscribe();
|
|
258
|
+
super.ngOnDestroy();
|
|
259
|
+
}
|
|
260
|
+
/** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
|
|
261
|
+
attach(forOf) {
|
|
262
|
+
if (this._forOf) {
|
|
263
|
+
throw Error("CdkVirtualScrollViewport is already attached.");
|
|
264
|
+
}
|
|
265
|
+
// Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
|
|
266
|
+
// changes. Run outside the zone to avoid triggering change detection, since we're managing the
|
|
267
|
+
// change detection loop ourselves.
|
|
268
|
+
this.ngZone.runOutsideAngular(() => {
|
|
269
|
+
this._forOf = forOf;
|
|
270
|
+
this._forOf.dataStream
|
|
271
|
+
.pipe(takeUntil(this._detachedSubject))
|
|
272
|
+
.subscribe(data => {
|
|
273
|
+
const newLength = data.length;
|
|
274
|
+
if (newLength !== this._dataLength) {
|
|
275
|
+
this._dataLength = newLength;
|
|
276
|
+
this._scrollStrategy.onDataLengthChanged();
|
|
277
|
+
}
|
|
278
|
+
this._doChangeDetection();
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/** Detaches the current `CdkVirtualForOf`. */
|
|
283
|
+
detach() {
|
|
284
|
+
this._forOf = null;
|
|
285
|
+
this._detachedSubject.next();
|
|
286
|
+
}
|
|
287
|
+
/** Gets the length of the data bound to this viewport (in number of items). */
|
|
288
|
+
getDataLength() {
|
|
289
|
+
return this._dataLength;
|
|
290
|
+
}
|
|
291
|
+
/** Gets the size of the viewport (in pixels). */
|
|
292
|
+
getViewportSize() {
|
|
293
|
+
return this._viewportSize;
|
|
294
|
+
}
|
|
295
|
+
// TODO(mmalerba): This is technically out of sync with what's really rendered until a render
|
|
296
|
+
// cycle happens. I'm being careful to only call it after the render cycle is complete and before
|
|
297
|
+
// setting it to something else, but its error prone and should probably be split into
|
|
298
|
+
// `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
|
|
299
|
+
/** Get the current rendered range of items. */
|
|
300
|
+
getRenderedRange() {
|
|
301
|
+
return this._renderedRange;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Sets the total size of all content (in pixels), including content that is not currently
|
|
305
|
+
* rendered.
|
|
306
|
+
*/
|
|
307
|
+
setTotalContentSize(size) {
|
|
308
|
+
if (this._totalContentSize !== size) {
|
|
309
|
+
this._totalContentSize = size;
|
|
310
|
+
this._calculateSpacerSize();
|
|
311
|
+
this._markChangeDetectionNeeded();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
/** Sets the currently rendered range of indices. */
|
|
315
|
+
setRenderedRange(range) {
|
|
316
|
+
if (!rangesEqual(this._renderedRange, range)) {
|
|
317
|
+
this._renderedRangeSubject.next((this._renderedRange = range));
|
|
318
|
+
this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Gets the offset from the start of the viewport to the start of the rendered data (in pixels).
|
|
323
|
+
*/
|
|
324
|
+
getOffsetToRenderedContentStart() {
|
|
325
|
+
return this._renderedContentOffsetNeedsRewrite
|
|
326
|
+
? null
|
|
327
|
+
: this._renderedContentOffset;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Sets the offset from the start of the viewport to either the start or end of the rendered data
|
|
331
|
+
* (in pixels).
|
|
332
|
+
*/
|
|
333
|
+
setRenderedContentOffset(offset) {
|
|
334
|
+
let top = `${Number(offset)}px`;
|
|
335
|
+
this._renderedContentOffset = offset;
|
|
336
|
+
if (this._renderedContentTransform != top) {
|
|
337
|
+
// We know this value is safe because we parse `offset` with `Number()` before passing it
|
|
338
|
+
// into the string.
|
|
339
|
+
this._renderedContentTransform = top;
|
|
340
|
+
this._markChangeDetectionNeeded(() => {
|
|
341
|
+
if (this._renderedContentOffsetNeedsRewrite) {
|
|
342
|
+
this._renderedContentOffset -= this.measureRenderedContentSize();
|
|
343
|
+
this._renderedContentOffsetNeedsRewrite = false;
|
|
344
|
+
this.setRenderedContentOffset(this._renderedContentOffset);
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
this._scrollStrategy.onRenderedOffsetChanged();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Scrolls to the given offset from the start of the viewport. Please note that this is not always
|
|
354
|
+
* the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left
|
|
355
|
+
* direction, this would be the equivalent of setting a fictional `scrollRight` property.
|
|
356
|
+
* @param offset The offset to scroll to.
|
|
357
|
+
* @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
|
|
358
|
+
*/
|
|
359
|
+
scrollToOffset(offset, behavior = "auto") {
|
|
360
|
+
const options = { behavior, top: offset };
|
|
361
|
+
this.scrollTo(options);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Scrolls to the offset for the given index.
|
|
365
|
+
* @param index The index of the element to scroll to.
|
|
366
|
+
* @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
|
|
367
|
+
*/
|
|
368
|
+
scrollToIndex(index, behavior = "auto") {
|
|
369
|
+
this._scrollStrategy.scrollToIndex(index, behavior);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Gets the current scroll offset from the start of the viewport (in pixels).
|
|
373
|
+
* @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'
|
|
374
|
+
* in horizontal mode.
|
|
375
|
+
*/
|
|
376
|
+
// CHANGES@ANNALIB added override to functions
|
|
377
|
+
measureScrollOffset(from) {
|
|
378
|
+
return from
|
|
379
|
+
? super.measureScrollOffset(from)
|
|
380
|
+
: super.measureScrollOffset("top");
|
|
381
|
+
}
|
|
382
|
+
/** Measure the combined size of all of the rendered items. */
|
|
383
|
+
measureRenderedContentSize() {
|
|
384
|
+
const contentEl = this._contentWrapper.nativeElement;
|
|
385
|
+
return contentEl.offsetHeight;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Measure the total combined size of the given range. Throws if the range includes items that are
|
|
389
|
+
* not rendered.
|
|
390
|
+
*/
|
|
391
|
+
measureRangeSize(range) {
|
|
392
|
+
if (!this._forOf) {
|
|
393
|
+
return 0;
|
|
394
|
+
}
|
|
395
|
+
return this._forOf.measureRangeSize(range, this.orientation);
|
|
396
|
+
}
|
|
397
|
+
/** Update the viewport dimensions and re-render. */
|
|
398
|
+
checkViewportSize() {
|
|
399
|
+
// TODO: Cleanup later when add logic for handling content resize
|
|
400
|
+
this._measureViewportSize();
|
|
401
|
+
this._scrollStrategy.onDataLengthChanged();
|
|
402
|
+
}
|
|
403
|
+
/** Measure the viewport size. */
|
|
404
|
+
_measureViewportSize() {
|
|
405
|
+
const viewportEl = this.elementRef.nativeElement;
|
|
406
|
+
this._viewportSize = viewportEl.clientHeight;
|
|
407
|
+
}
|
|
408
|
+
/** Queue up change detection to run. */
|
|
409
|
+
_markChangeDetectionNeeded(runAfter) {
|
|
410
|
+
if (runAfter) {
|
|
411
|
+
this._runAfterChangeDetection.push(runAfter);
|
|
412
|
+
}
|
|
413
|
+
// Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of
|
|
414
|
+
// properties sequentially we only have to run `_doChangeDetection` once at the end.
|
|
415
|
+
if (!this._isChangeDetectionPending) {
|
|
416
|
+
this._isChangeDetectionPending = true;
|
|
417
|
+
this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
|
|
418
|
+
this._doChangeDetection();
|
|
419
|
+
}));
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
/** Run change detection. */
|
|
423
|
+
_doChangeDetection() {
|
|
424
|
+
this._isChangeDetectionPending = false;
|
|
425
|
+
// Apply the content transform. The transform can't be set via an Angular binding because
|
|
426
|
+
// bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
|
|
427
|
+
// string literals, a variable that can only be 'X' or 'Y', and user input that is run through
|
|
428
|
+
// the `Number` function first to coerce it to a numeric value.
|
|
429
|
+
this._contentWrapper.nativeElement.style.top = this._renderedContentTransform;
|
|
430
|
+
// Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
|
|
431
|
+
// from the root, since the repeated items are content projected in. Calling `detectChanges`
|
|
432
|
+
// instead does not properly check the projected content.
|
|
433
|
+
this.ngZone.run(() => this._changeDetectorRef.markForCheck());
|
|
434
|
+
const runAfterChangeDetection = this._runAfterChangeDetection;
|
|
435
|
+
this._runAfterChangeDetection = [];
|
|
436
|
+
for (const fn of runAfterChangeDetection) {
|
|
437
|
+
fn();
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/** Calculates the `style.width` and `style.height` for the spacer element. */
|
|
441
|
+
_calculateSpacerSize() {
|
|
442
|
+
this._totalContentHeight = `${this._totalContentSize}px`;
|
|
443
|
+
this._totalContentWidth = "";
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
AnnaTableVirtualScrollViewportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaTableVirtualScrollViewportComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }, { token: i1$1.Directionality, optional: true }, { token: i2.ScrollDispatcher }, { token: i2.ViewportRuler }, { token: i1.AnnaGenericTableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
447
|
+
AnnaTableVirtualScrollViewportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaTableVirtualScrollViewportComponent, selector: "anna-table-virtual-scroll-viewport", inputs: { orientation: "orientation" }, outputs: { scrolledIndexChange: "scrolledIndexChange" }, host: { properties: { "class.anna-table-virtual-scroll-orientation-horizontal": "orientation === \"horizontal\"", "class.anna-table-virtual-scroll-orientation-vertical": "orientation !== \"horizontal\"" }, classAttribute: "anna-table-virtual-scroll-viewport" }, providers: [
|
|
448
|
+
{
|
|
449
|
+
provide: CdkScrollable,
|
|
450
|
+
useExisting: AnnaTableVirtualScrollViewportComponent
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
provide: CdkVirtualScrollViewport,
|
|
454
|
+
useExisting: AnnaTableVirtualScrollViewportComponent
|
|
455
|
+
}
|
|
456
|
+
], viewQueries: [{ propertyName: "_contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Wrap the rendered content in an element that will be used to offset it based on the scroll\r\n position.\r\n-->\r\n<div #contentWrapper class=\"anna-table-virtual-scroll-content-wrapper\">\r\n\t<ng-content></ng-content>\r\n</div>\r\n<!--\r\n Spacer used to force the scrolling container to the correct size for the *total* number of items\r\n so that the scrollbar captures the size of the entire data set.\r\n-->\r\n<div class=\"app-table-virtual-scroll-spacer\" [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\">\r\n</div>", styles: ["anna-table-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;will-change:scroll-position;-webkit-overflow-scrolling:touch}.anna-table-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .anna-table-virtual-scroll-content-wrapper{right:0;left:auto}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper{min-height:100%}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper{min-width:100%}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.app-table-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .app-table-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaTableVirtualScrollViewportComponent, decorators: [{
|
|
458
|
+
type: Component,
|
|
459
|
+
args: [{ selector: "anna-table-virtual-scroll-viewport", host: {
|
|
460
|
+
class: "anna-table-virtual-scroll-viewport",
|
|
461
|
+
"[class.anna-table-virtual-scroll-orientation-horizontal]": 'orientation === "horizontal"',
|
|
462
|
+
"[class.anna-table-virtual-scroll-orientation-vertical]": 'orientation !== "horizontal"'
|
|
463
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
464
|
+
{
|
|
465
|
+
provide: CdkScrollable,
|
|
466
|
+
useExisting: AnnaTableVirtualScrollViewportComponent
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
provide: CdkVirtualScrollViewport,
|
|
470
|
+
useExisting: AnnaTableVirtualScrollViewportComponent
|
|
471
|
+
}
|
|
472
|
+
], template: "<!--\r\n Wrap the rendered content in an element that will be used to offset it based on the scroll\r\n position.\r\n-->\r\n<div #contentWrapper class=\"anna-table-virtual-scroll-content-wrapper\">\r\n\t<ng-content></ng-content>\r\n</div>\r\n<!--\r\n Spacer used to force the scrolling container to the correct size for the *total* number of items\r\n so that the scrollbar captures the size of the entire data set.\r\n-->\r\n<div class=\"app-table-virtual-scroll-spacer\" [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\">\r\n</div>", styles: ["anna-table-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;will-change:scroll-position;-webkit-overflow-scrolling:touch}.anna-table-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .anna-table-virtual-scroll-content-wrapper{right:0;left:auto}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper{min-height:100%}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper{min-width:100%}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.app-table-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .app-table-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"] }]
|
|
473
|
+
}], ctorParameters: function () {
|
|
474
|
+
return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
475
|
+
type: Optional
|
|
476
|
+
}, {
|
|
477
|
+
type: Inject,
|
|
478
|
+
args: [VIRTUAL_SCROLL_STRATEGY]
|
|
479
|
+
}] }, { type: i1$1.Directionality, decorators: [{
|
|
480
|
+
type: Optional
|
|
481
|
+
}] }, { type: i2.ScrollDispatcher }, { type: i2.ViewportRuler }, { type: i1.AnnaGenericTableService }];
|
|
482
|
+
}, propDecorators: { orientation: [{
|
|
483
|
+
type: Input
|
|
484
|
+
}], scrolledIndexChange: [{
|
|
485
|
+
type: Output
|
|
486
|
+
}], _contentWrapper: [{
|
|
487
|
+
type: ViewChild,
|
|
488
|
+
args: ["contentWrapper", { static: true }]
|
|
489
|
+
}] } });
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* A custom scroll strategy that accepts a static row height, static header height,
|
|
493
|
+
* and a buffer size. The strategy
|
|
494
|
+
*/
|
|
495
|
+
class AnnaFixedRowSizeTableVirtualScrollStrategy {
|
|
496
|
+
constructor(rowHeight, buffer, headerHeight) {
|
|
497
|
+
this._scrolledIndexChange = new Subject();
|
|
498
|
+
this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());
|
|
499
|
+
this.updateRowHeightAndBuffer(rowHeight, buffer, headerHeight);
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Attaches this scroll strategy to a viewport.
|
|
503
|
+
* @param viewport The viewport to attach this strategy to.
|
|
504
|
+
*/
|
|
505
|
+
attach(viewport) {
|
|
506
|
+
this.viewport = viewport;
|
|
507
|
+
this.updateTotalContentSize();
|
|
508
|
+
this.updateRenderedRange();
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Detaches this scroll strategy from the currently attached viewport.
|
|
512
|
+
*/
|
|
513
|
+
detach() {
|
|
514
|
+
this._scrolledIndexChange.complete();
|
|
515
|
+
this.viewport = null;
|
|
516
|
+
}
|
|
517
|
+
onContentScrolled() {
|
|
518
|
+
this.updateRenderedRange();
|
|
519
|
+
}
|
|
520
|
+
onDataLengthChanged() {
|
|
521
|
+
this.updateTotalContentSize();
|
|
522
|
+
this.updateRenderedRange();
|
|
523
|
+
}
|
|
524
|
+
onContentRendered() {
|
|
525
|
+
// This method is useful for virtual scroll strategies that measure the rendered
|
|
526
|
+
// content to determine its height. This scroll strategy assumes that rows have
|
|
527
|
+
// a static height, so there's no need to implement this method.
|
|
528
|
+
}
|
|
529
|
+
onRenderedOffsetChanged() {
|
|
530
|
+
// Similar to onContentRendered, this method is useful for virtual scroll strategies
|
|
531
|
+
// that need to track the offset as it changes. This scroll strategy is always able
|
|
532
|
+
// to calculate the correct offset from other values, so there's no need to implement
|
|
533
|
+
// this method.
|
|
534
|
+
}
|
|
535
|
+
scrollToIndex(index, behavior) {
|
|
536
|
+
var _a;
|
|
537
|
+
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.scrollToOffset(index * this.rowHeight, behavior);
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Update the item size and buffer size.
|
|
541
|
+
* @param rowHeight The height of a row in the virtually scrolling table.
|
|
542
|
+
* @param buffer The number of rows to buffer outside the viewport.
|
|
543
|
+
* @param headerHeight The total height of the table header, including all header rows.
|
|
544
|
+
*/
|
|
545
|
+
updateRowHeightAndBuffer(rowHeight, buffer, headerHeight) {
|
|
546
|
+
this.rowHeight = rowHeight;
|
|
547
|
+
this.buffer = buffer;
|
|
548
|
+
this.headerHeight = headerHeight;
|
|
549
|
+
this.updateTotalContentSize();
|
|
550
|
+
this.updateRenderedRange();
|
|
551
|
+
}
|
|
552
|
+
updateRenderedRange() {
|
|
553
|
+
if (!this.viewport) {
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
const viewportSize = this.viewport.getViewportSize();
|
|
557
|
+
const dataLength = this.viewport.getDataLength();
|
|
558
|
+
const scrollOffset = this.viewport.measureScrollOffset();
|
|
559
|
+
// the index of the first item that would be at least partially visible in the viewport
|
|
560
|
+
let firstVisibleIndex = Math.floor((scrollOffset + this.headerHeight) / this.rowHeight);
|
|
561
|
+
// if the buffer size is 10 but the first visible item is at, say, index 7
|
|
562
|
+
// then the buffered items must be 7, because we don't have 10 items available to buffer.
|
|
563
|
+
const bufferedItems = Math.min(AnnaFilterService.bufferSize, firstVisibleIndex);
|
|
564
|
+
const itemsInViewport = Math.ceil(viewportSize / this.rowHeight);
|
|
565
|
+
const itemsToRender = itemsInViewport + this.buffer;
|
|
566
|
+
// Clamp the new range between 0 and dataLength
|
|
567
|
+
const newStart = Math.max(0, firstVisibleIndex - bufferedItems);
|
|
568
|
+
const newEnd = Math.min(dataLength, firstVisibleIndex + itemsToRender);
|
|
569
|
+
const newRange = {
|
|
570
|
+
start: newStart,
|
|
571
|
+
end: newEnd
|
|
572
|
+
};
|
|
573
|
+
const newOffset = this.rowHeight * (firstVisibleIndex - bufferedItems);
|
|
574
|
+
this.viewport.setRenderedContentOffset(newOffset);
|
|
575
|
+
this.viewport.setRenderedRange(newRange);
|
|
576
|
+
this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));
|
|
577
|
+
}
|
|
578
|
+
updateTotalContentSize() {
|
|
579
|
+
var _a;
|
|
580
|
+
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.setTotalContentSize(this.viewport.getDataLength() * this.rowHeight);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created
|
|
585
|
+
* `FixedSizeVirtualScrollStrategy` from the given directive.
|
|
586
|
+
* @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the
|
|
587
|
+
* `FixedSizeVirtualScrollStrategy` from.
|
|
588
|
+
*/
|
|
589
|
+
function fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {
|
|
590
|
+
return fixedSizeDir.scrollStrategy;
|
|
591
|
+
}
|
|
592
|
+
class AnnaFixedRowSizeTableVirtualScrollStrategyDirective {
|
|
593
|
+
constructor() {
|
|
594
|
+
this._rowHeight = 30;
|
|
595
|
+
this._headerRowHeight = 30;
|
|
596
|
+
this._buffer = 20;
|
|
597
|
+
this._headerRows = null;
|
|
598
|
+
this.headerRowCount = 1;
|
|
599
|
+
/** The scroll strategy used by this directive. */
|
|
600
|
+
this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
|
|
601
|
+
}
|
|
602
|
+
/** The height of rows in the table (in pixels). Defaults to 30. */
|
|
603
|
+
set rowHeight(value) { this._rowHeight = coerceNumberProperty(value); }
|
|
604
|
+
get rowHeight() { return this._rowHeight; }
|
|
605
|
+
/**
|
|
606
|
+
* The height of header rows in the table (in pixels). Defaults to 30.
|
|
607
|
+
*/
|
|
608
|
+
set headerRowHeight(value) { this._headerRowHeight = coerceNumberProperty(value); }
|
|
609
|
+
get headerRowHeight() { return this._headerRowHeight; }
|
|
610
|
+
/**
|
|
611
|
+
* The number of buffered rows rendered beyond the viewport.
|
|
612
|
+
* If the number of buffered rows dips below this number, more rows will be rendered. Defaults to 20.
|
|
613
|
+
*/
|
|
614
|
+
set buffer(value) {
|
|
615
|
+
this._buffer = coerceNumberProperty(value);
|
|
616
|
+
}
|
|
617
|
+
get buffer() { return this._buffer; }
|
|
618
|
+
set headerRows(value) { this._headerRows = coerceNumberProperty(value, undefined); }
|
|
619
|
+
get headerRows() { return this._headerRows; }
|
|
620
|
+
ngOnChanges(change) {
|
|
621
|
+
var _a, _b;
|
|
622
|
+
if (this.headerRows != undefined || this.headerRowsQuery) {
|
|
623
|
+
this.handleChange();
|
|
624
|
+
}
|
|
625
|
+
if (((_a = change['buffer']) === null || _a === void 0 ? void 0 : _a.previousValue) != ((_b = change['buffer']) === null || _b === void 0 ? void 0 : _b.currentValue)) {
|
|
626
|
+
AnnaFilterService.bufferSize = this.buffer;
|
|
627
|
+
this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
ngAfterContentInit() {
|
|
631
|
+
this.headerRowsQuery.changes.subscribe(() => {
|
|
632
|
+
this.handleChange();
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
handleChange() {
|
|
636
|
+
var _a;
|
|
637
|
+
this.scrollStrategy.updateRowHeightAndBuffer(this.rowHeight, this.buffer,
|
|
638
|
+
// Use the explicit headerRows input value if set.
|
|
639
|
+
// Otherwise, fall back to the QueryList length.
|
|
640
|
+
this.headerRowHeight * ((_a = this._headerRows) !== null && _a !== void 0 ? _a : this.headerRowsQuery.length));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
AnnaFixedRowSizeTableVirtualScrollStrategyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
644
|
+
AnnaFixedRowSizeTableVirtualScrollStrategyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]", inputs: { rowHeight: "rowHeight", headerRowHeight: "headerRowHeight", buffer: "buffer", headerRows: "headerRows" }, providers: [
|
|
645
|
+
{
|
|
646
|
+
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
647
|
+
useFactory: fixedSizeVirtualScrollStrategyFactory,
|
|
648
|
+
deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
|
|
649
|
+
}
|
|
650
|
+
], queries: [{ propertyName: "headerRowsQuery", predicate: MatHeaderRowDef }], usesOnChanges: true, ngImport: i0 });
|
|
651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, decorators: [{
|
|
652
|
+
type: Directive,
|
|
653
|
+
args: [{
|
|
654
|
+
selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]",
|
|
655
|
+
providers: [
|
|
656
|
+
{
|
|
657
|
+
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
658
|
+
useFactory: fixedSizeVirtualScrollStrategyFactory,
|
|
659
|
+
deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
|
|
660
|
+
}
|
|
661
|
+
]
|
|
662
|
+
}]
|
|
663
|
+
}], propDecorators: { rowHeight: [{
|
|
664
|
+
type: Input
|
|
665
|
+
}], headerRowHeight: [{
|
|
666
|
+
type: Input
|
|
667
|
+
}], buffer: [{
|
|
668
|
+
type: Input
|
|
669
|
+
}], headerRows: [{
|
|
670
|
+
type: Input
|
|
671
|
+
}], headerRowsQuery: [{
|
|
672
|
+
type: ContentChildren,
|
|
673
|
+
args: [MatHeaderRowDef]
|
|
674
|
+
}] } });
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Directive that wraps a given data source in a "virtual" data source that emits
|
|
678
|
+
* the slice of the original data source that matches the range that should be rendered
|
|
679
|
+
* in the containing virtual scroll viewport.
|
|
680
|
+
*/
|
|
681
|
+
class AnnaVirtualTableDirective {
|
|
682
|
+
constructor(elementRef, viewport, table, ngZone, _coalescedStyleScheduler) {
|
|
683
|
+
this.viewport = viewport;
|
|
684
|
+
this.table = table;
|
|
685
|
+
this._coalescedStyleScheduler = _coalescedStyleScheduler;
|
|
686
|
+
this.virtualizedDataStream = new Subject();
|
|
687
|
+
this.dataSourceChanges = new Subject();
|
|
688
|
+
/** The raw, unvirtualized data stream. Emits whenever the data in the current DataSource changes. */
|
|
689
|
+
this.dataStream = this.dataSourceChanges
|
|
690
|
+
.pipe(
|
|
691
|
+
// Start off with null data source.
|
|
692
|
+
startWith(null),
|
|
693
|
+
// Bundle up the previous and current data sources so we can work with both.
|
|
694
|
+
pairwise(),
|
|
695
|
+
// Use `changeDataSource` to disconnect from the previous data source and connect to the
|
|
696
|
+
// new one, passing back a stream of data changes which we run through `switchMap` to give
|
|
697
|
+
// us a data stream that emits the latest data from whatever the current data source is.
|
|
698
|
+
switchMap(([prev, cur]) => this.changeDataSource(prev, cur)),
|
|
699
|
+
// Replay the last emitted data when someone subscribes.
|
|
700
|
+
shareReplay(1));
|
|
701
|
+
this.viewChange = new Subject();
|
|
702
|
+
this.destroyed$ = new Subject();
|
|
703
|
+
this.renderedRange = { start: 0, end: 0 };
|
|
704
|
+
this.isNativeHtmlTable = false;
|
|
705
|
+
table.dataSource = this.virtualizedDataStream;
|
|
706
|
+
this.isNativeHtmlTable = elementRef.nativeElement.tagName === 'TABLE';
|
|
707
|
+
this.dataStream.subscribe(data => {
|
|
708
|
+
this.data = data;
|
|
709
|
+
this.onRenderedDataChange();
|
|
710
|
+
});
|
|
711
|
+
viewport.renderedRangeStream.pipe(takeUntil(this.destroyed$)).subscribe((range) => {
|
|
712
|
+
this.renderedRange = range;
|
|
713
|
+
ngZone.run(() => this.viewChange.next(range));
|
|
714
|
+
this.onRenderedDataChange();
|
|
715
|
+
});
|
|
716
|
+
viewport.attach(this);
|
|
717
|
+
}
|
|
718
|
+
set dataSource(value) {
|
|
719
|
+
this._dataSource = value;
|
|
720
|
+
if (isDataSource(value)) {
|
|
721
|
+
this.dataSourceChanges.next(value);
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
this.dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
get dataSource() {
|
|
728
|
+
return this._dataSource;
|
|
729
|
+
}
|
|
730
|
+
ngOnInit() {
|
|
731
|
+
// This is just a proof of concept, but the AnnaTableVirtualScrollViewportComponent uses `position: absolute` and `top: #px` instead of `transform: translateY(#px)` to position the viewport.
|
|
732
|
+
// This removes the need to account for the translation in the `top` of the sticky header rows.
|
|
733
|
+
if (this.viewport instanceof AnnaTableVirtualScrollViewportComponent) {
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
this.viewport.scrolledIndexChange
|
|
737
|
+
.pipe(map(() => this.viewport.getOffsetToRenderedContentStart()), takeUntil(this.destroyed$))
|
|
738
|
+
.subscribe((offset) => {
|
|
739
|
+
// We need to set the `style.top` property of the sticky header rows
|
|
740
|
+
// to the negative value of the virtual scroll viewport's offset, so
|
|
741
|
+
// make the offset negative.
|
|
742
|
+
offset = -offset;
|
|
743
|
+
const stickyStates = this.headerRowDefs.map(rowDef => rowDef.sticky);
|
|
744
|
+
// This logic is exactly the same as what's in the StickyStyler (literally copy + paste).
|
|
745
|
+
// The only difference is that the `stickyOffset` variable starts at the virtual scroll
|
|
746
|
+
// viewport container's offset instead of starting at zero.
|
|
747
|
+
const rows = this.table._getRenderedRows(this.table._headerRowOutlet);
|
|
748
|
+
const stickyOffsets = [];
|
|
749
|
+
const stickyCellHeights = [];
|
|
750
|
+
const elementsToStick = [];
|
|
751
|
+
for (let rowIndex = 0, stickyOffset = offset; rowIndex < rows.length; rowIndex++) {
|
|
752
|
+
stickyOffsets[rowIndex] = stickyOffset;
|
|
753
|
+
if (!stickyStates[rowIndex]) {
|
|
754
|
+
continue;
|
|
755
|
+
}
|
|
756
|
+
const row = rows[rowIndex];
|
|
757
|
+
elementsToStick[rowIndex] = this.isNativeHtmlTable ? Array.from(row.children) : [row];
|
|
758
|
+
const height = row.getBoundingClientRect().height;
|
|
759
|
+
stickyOffset += height;
|
|
760
|
+
stickyCellHeights[rowIndex] = height;
|
|
761
|
+
}
|
|
762
|
+
// Using the CoalescedStyleScheduler here is optional. It'll work without it,
|
|
763
|
+
// and CoalescedStyleScheduler is not public (yet?), so feel free to remove it.
|
|
764
|
+
this._coalescedStyleScheduler.schedule(() => {
|
|
765
|
+
for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
|
|
766
|
+
if (!stickyStates[rowIndex]) {
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
for (const element of elementsToStick[rowIndex]) {
|
|
770
|
+
element.style.top = `${stickyOffsets[rowIndex]}px`;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
});
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
ngOnDestroy() {
|
|
777
|
+
this.destroyed$.next();
|
|
778
|
+
this.dataSourceChanges.complete();
|
|
779
|
+
this.virtualizedDataStream.complete();
|
|
780
|
+
}
|
|
781
|
+
/** React to scroll state changes in the viewport. */
|
|
782
|
+
onRenderedDataChange() {
|
|
783
|
+
if (!this.renderedRange) {
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
this.renderedItems = this.data.slice(this.renderedRange.start, this.renderedRange.end + 1);
|
|
787
|
+
// delegate rendering to the table by emitting from the virtualizedDataStream
|
|
788
|
+
this.virtualizedDataStream.next(this.renderedItems);
|
|
789
|
+
}
|
|
790
|
+
/** Swap out one data source for another. */
|
|
791
|
+
changeDataSource(oldDataSource, newDs) {
|
|
792
|
+
oldDataSource === null || oldDataSource === void 0 ? void 0 : oldDataSource.disconnect(this);
|
|
793
|
+
return newDs ? newDs.connect(this) : of();
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* This method is only used by the experimental AutoSizeVirtualScrollStrategy.
|
|
797
|
+
* We're not using that strategy, but I've implemented it just to show how it oculd be done.
|
|
798
|
+
* I'm not actually sure if this works.
|
|
799
|
+
*/
|
|
800
|
+
measureRangeSize(range, orientation) {
|
|
801
|
+
if (orientation === 'horizontal' || range.end < range.start) {
|
|
802
|
+
// virtual scrolling columns are not supported by this directive
|
|
803
|
+
return 0;
|
|
804
|
+
}
|
|
805
|
+
const renderedBodyRows = this.table._getRenderedRows(this.table._rowOutlet);
|
|
806
|
+
const firstRow = renderedBodyRows[range.start];
|
|
807
|
+
const lastRow = renderedBodyRows[range.end];
|
|
808
|
+
if (!firstRow || !lastRow) {
|
|
809
|
+
return 0;
|
|
810
|
+
}
|
|
811
|
+
// We need to include all header and footer rows in the sum, since they're always rendered
|
|
812
|
+
const renderedHeaderRows = this.table._getRenderedRows(this.table._headerRowOutlet);
|
|
813
|
+
const renderedFooterRows = this.table._getRenderedRows(this.table._footerRowOutlet);
|
|
814
|
+
// TODO (performance): Can we just measure the offset of the first and last items and do some math to avoid having to measure each row individually?
|
|
815
|
+
const headerHeight = renderedHeaderRows.reduce((sum, row) => {
|
|
816
|
+
return sum += row.getBoundingClientRect().height;
|
|
817
|
+
}, 0);
|
|
818
|
+
const footerHeight = renderedFooterRows.reduce((sum, row) => {
|
|
819
|
+
return sum += row.getBoundingClientRect().height;
|
|
820
|
+
}, 0);
|
|
821
|
+
const bodyHeight = lastRow.getBoundingClientRect().bottom - firstRow.getBoundingClientRect().top;
|
|
822
|
+
return headerHeight + footerHeight + bodyHeight;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
AnnaVirtualTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, deps: [{ token: i0.ElementRef }, { token: i2.CdkVirtualScrollViewport }, { token: i2$1.CdkTable }, { token: i0.NgZone }, { token: _COALESCED_STYLE_SCHEDULER }], target: i0.ɵɵFactoryTarget.Directive });
|
|
826
|
+
AnnaVirtualTableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: AnnaVirtualTableDirective, selector: "[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]", inputs: { dataSource: ["appVirtualDataSource", "dataSource"] }, providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: AnnaVirtualTableDirective }], queries: [{ propertyName: "headerRowDefs", predicate: CdkHeaderRowDef }], ngImport: i0 });
|
|
827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, decorators: [{
|
|
828
|
+
type: Directive,
|
|
829
|
+
args: [{
|
|
830
|
+
selector: '[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]',
|
|
831
|
+
providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: AnnaVirtualTableDirective }]
|
|
832
|
+
}]
|
|
833
|
+
}], ctorParameters: function () {
|
|
834
|
+
return [{ type: i0.ElementRef }, { type: i2.CdkVirtualScrollViewport }, { type: i2$1.CdkTable }, { type: i0.NgZone }, { type: i2$1._CoalescedStyleScheduler, decorators: [{
|
|
835
|
+
type: Inject,
|
|
836
|
+
args: [_COALESCED_STYLE_SCHEDULER]
|
|
837
|
+
}] }];
|
|
838
|
+
}, propDecorators: { dataSource: [{
|
|
839
|
+
type: Input,
|
|
840
|
+
args: ['appVirtualDataSource']
|
|
841
|
+
}], headerRowDefs: [{
|
|
842
|
+
type: ContentChildren,
|
|
843
|
+
args: [CdkHeaderRowDef]
|
|
844
|
+
}] } });
|
|
845
|
+
|
|
846
|
+
// Angular import statements
|
|
847
|
+
class AnnaNonEditableGenericTableComponent {
|
|
848
|
+
constructor(cdRef, annaSortService, annaDateTimeFormatService, annaFilterService, annaGenericTableService) {
|
|
849
|
+
this.cdRef = cdRef;
|
|
850
|
+
this.annaSortService = annaSortService;
|
|
851
|
+
this.annaDateTimeFormatService = annaDateTimeFormatService;
|
|
852
|
+
this.annaFilterService = annaFilterService;
|
|
853
|
+
this.annaGenericTableService = annaGenericTableService;
|
|
854
|
+
this.maximumRowsWhichCanBeRenderedWithoutScroll = 5;
|
|
855
|
+
this.toggleCheckbox = new EventEmitter();
|
|
856
|
+
this.toggleRowCheckbox = new EventEmitter();
|
|
857
|
+
this.toggleHeaderCheckbox = new EventEmitter();
|
|
858
|
+
this.undoIconClicked = new EventEmitter();
|
|
859
|
+
this.filterAppliedToTable = new EventEmitter();
|
|
860
|
+
this.sortingAppliedToTable = new EventEmitter();
|
|
861
|
+
this.rowClicked = new EventEmitter();
|
|
862
|
+
this.radioButtonSelected = new EventEmitter();
|
|
863
|
+
this.columnFilterOpened = new EventEmitter();
|
|
864
|
+
this.columnFilterClosed = new EventEmitter();
|
|
865
|
+
this.gtIconClicked = new EventEmitter();
|
|
866
|
+
this.gtSVGIconClicked = new EventEmitter();
|
|
867
|
+
this.gtTextActionClicked = new EventEmitter();
|
|
868
|
+
this.gtViewDetailClicked = new EventEmitter();
|
|
869
|
+
this.noDataWidth = "55%";
|
|
870
|
+
this.disableClearAllBtn = true;
|
|
871
|
+
this.disableColumnClearAllBtn = true;
|
|
872
|
+
this.allSelected = 0;
|
|
873
|
+
this.options = {
|
|
874
|
+
floor: 0,
|
|
875
|
+
ceil: 0,
|
|
876
|
+
step: 0.1
|
|
877
|
+
};
|
|
878
|
+
this.tableColumns = [];
|
|
879
|
+
this.totalRowColumns = null;
|
|
880
|
+
this.isScrolledLeft = false;
|
|
881
|
+
this.rowBorderWidth = 2;
|
|
882
|
+
this.PfpIconActiveColor = "#9B1B93";
|
|
883
|
+
this.PfpIconDisableColor = "rgba(189,189,189,0.5)";
|
|
884
|
+
this.setTooltipRadioNames();
|
|
885
|
+
}
|
|
886
|
+
ngOnInit() {
|
|
887
|
+
// this.tableData = this.numberOfSkeletonColumns;
|
|
888
|
+
}
|
|
889
|
+
ngOnChanges(changes) {
|
|
890
|
+
// console.log("generic");
|
|
891
|
+
// console.log(this.tableHeaders);
|
|
892
|
+
// console.log(JSON.stringify(this.tableData));
|
|
893
|
+
if (this.showSkeletonLoading) {
|
|
894
|
+
this.tableData = this.numberOfSkeletonColumns;
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
this.setInitialValueMapData();
|
|
898
|
+
this.disableEnableEachColumnFilters();
|
|
899
|
+
this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
|
|
900
|
+
this.showSkeletonLoading = false;
|
|
901
|
+
}
|
|
902
|
+
//setting table column here as well because while showing skeleton loader, we should show table headers.
|
|
903
|
+
if (changes['tableHeaders'] && changes['tableHeaders'].currentValue) {
|
|
904
|
+
this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
|
|
905
|
+
}
|
|
906
|
+
if (changes['totalRowInfo'] && changes['totalRowInfo'].currentValue) {
|
|
907
|
+
this.totalRowColumns = this.totalRowInfo.map(x => x.colName);
|
|
908
|
+
}
|
|
909
|
+
this.cdRef.detectChanges();
|
|
910
|
+
}
|
|
911
|
+
trackByFn(index) {
|
|
912
|
+
return index;
|
|
913
|
+
}
|
|
914
|
+
setTooltipRadioNames() {
|
|
915
|
+
this.tooltipRadioTextMap = new Map();
|
|
916
|
+
this.tooltipRadioTextMap.set("StartTimeForFilter", "Start Time");
|
|
917
|
+
this.tooltipRadioTextMap.set("EndTimeForFilter", "End Time");
|
|
918
|
+
this.tooltipRadioTextMap.set("start_time_for_filter", "Start Time");
|
|
919
|
+
this.tooltipRadioTextMap.set("end_time_for_filter", "End Time");
|
|
920
|
+
this.tooltipRadioTextMap.set("primaryAEName", "Primary AE");
|
|
921
|
+
this.tooltipRadioTextMap.set("region", "Region");
|
|
922
|
+
this.tooltipRadioTextMap.set("agencyName", "Agency");
|
|
923
|
+
this.tooltipRadioTextMap.set("location", "Location");
|
|
924
|
+
this.tooltipRadioTextMap.set("advertiserName", "Advertiser");
|
|
925
|
+
this.tooltipRadioTextMap.set("productCode", "Product Code");
|
|
926
|
+
this.tooltipRadioTextMap.set("flightStartDate", "Start Date");
|
|
927
|
+
this.tooltipRadioTextMap.set("flightEndDate", "End Date");
|
|
928
|
+
this.tooltipRadioTextMap.set("orderIdAndRevNumber", "STN Order#-Rev#");
|
|
929
|
+
this.tooltipRadioTextMap.set("alternateOrderId", "Buyer Order#");
|
|
930
|
+
this.tooltipRadioTextMap.set("grp", "GRP");
|
|
931
|
+
this.tooltipRadioTextMap.set("cpp", "CPP");
|
|
932
|
+
this.tooltipRadioTextMap.set("imps", "IMPS");
|
|
933
|
+
this.tooltipRadioTextMap.set("cpm", "CPM");
|
|
934
|
+
this.tooltipRadioTextMap.set("offeredMGs", "Offered MG");
|
|
935
|
+
this.tooltipRadioTextMap.set("outstandingPE", "O/S PE");
|
|
936
|
+
this.tooltipRadioTextMap.set("offeredADUs", "Offered ADUs");
|
|
937
|
+
this.tooltipRadioTextMap.set("udDeficitValue", "Pending Audience Delta");
|
|
938
|
+
this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
|
|
939
|
+
this.tooltipRadioTextMap.set("bookedValue", "Booked");
|
|
940
|
+
this.tooltipRadioTextMap.set("bookedSpots", "Spots");
|
|
941
|
+
this.tooltipRadioTextMap.set("userChanges", "Other changes");
|
|
942
|
+
this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
|
|
943
|
+
this.tooltipRadioTextMap.set("program", "Program");
|
|
944
|
+
this.tooltipRadioTextMap.set("agency", "Agency");
|
|
945
|
+
this.tooltipRadioTextMap.set("advertiser", "Advertiser");
|
|
946
|
+
this.tooltipRadioTextMap.set("startDate", "Start Date");
|
|
947
|
+
this.tooltipRadioTextMap.set("endDate", "End Date");
|
|
948
|
+
this.tooltipRadioTextMap.set("rcvPreempt", "Madegood PE");
|
|
949
|
+
this.tooltipRadioTextMap.set("osPreempt", "O/S PE");
|
|
950
|
+
this.tooltipRadioTextMap.set("rcvUnderDly", "Recovered UD");
|
|
951
|
+
this.tooltipRadioTextMap.set("osUnderDly", "O/s Under Dly");
|
|
952
|
+
this.tooltipRadioTextMap.set("primaryAe", "Primary AE");
|
|
953
|
+
this.tooltipRadioTextMap.set("region", "Region");
|
|
954
|
+
this.tooltipRadioTextMap.set("revCode1", "Rev code 1");
|
|
955
|
+
this.tooltipRadioTextMap.set("orderNoRevNo", "STN Order#-Rev#");
|
|
956
|
+
this.tooltipRadioTextMap.set("revCode2", "Rev code 2");
|
|
957
|
+
this.tooltipRadioTextMap.set("revCode3", "Rev code 3");
|
|
958
|
+
this.tooltipRadioTextMap.set("booked", "Booked");
|
|
959
|
+
this.tooltipRadioTextMap.set("spots", "Spots");
|
|
960
|
+
this.tooltipRadioTextMap.set("postedAudPercent", "Posted %");
|
|
961
|
+
this.tooltipRadioTextMap.set("revision", "Revision");
|
|
962
|
+
this.tooltipRadioTextMap.set("productCode", "Product Code");
|
|
963
|
+
this.tooltipRadioTextMap.set("buyerOrderId", "ALT Order#");
|
|
964
|
+
this.tooltipRadioTextMap.set("demo", "Demo");
|
|
965
|
+
this.tooltipRadioTextMap.set("postedAdu", "Posted ADUs");
|
|
966
|
+
this.tooltipRadioTextMap.set("scheduledAdu", "Scheduled ADUs");
|
|
967
|
+
this.tooltipRadioTextMap.set("audienceDeficit", "Audience Deficit");
|
|
968
|
+
this.tooltipRadioTextMap.set("postedAudPercent", "Posted Audience %");
|
|
969
|
+
}
|
|
970
|
+
generateTableDataWrapper() {
|
|
971
|
+
this.showSkeletonLoading = true;
|
|
972
|
+
this.tableDataWrapper = [];
|
|
973
|
+
let rowObject;
|
|
974
|
+
let columnName;
|
|
975
|
+
let columnObject;
|
|
976
|
+
let columnObjectKey;
|
|
977
|
+
let keysUsedForTableDisplay;
|
|
978
|
+
let keysUsedForColumn;
|
|
979
|
+
let additionalInfoObject;
|
|
980
|
+
let additionalKeys;
|
|
981
|
+
this.tableData.forEach((obj) => {
|
|
982
|
+
rowObject = {};
|
|
983
|
+
keysUsedForTableDisplay = [];
|
|
984
|
+
for (var colNum in this.tableHeaders) {
|
|
985
|
+
columnObject = {};
|
|
986
|
+
if (!this.tableHeaders[colNum].visible) {
|
|
987
|
+
continue;
|
|
988
|
+
}
|
|
989
|
+
columnName = "";
|
|
990
|
+
keysUsedForColumn = [];
|
|
991
|
+
this.tableHeaders[colNum].headerInfo.forEach((header) => {
|
|
992
|
+
if (header.typeOfBodyData === "STRING") {
|
|
993
|
+
columnObjectKey = header.objectKey;
|
|
994
|
+
columnObject[columnObjectKey] = obj[columnObjectKey];
|
|
995
|
+
keysUsedForTableDisplay.push(columnObjectKey);
|
|
996
|
+
keysUsedForColumn.push(columnObjectKey);
|
|
997
|
+
}
|
|
998
|
+
else if (header.typeOfBodyData === "ICON") {
|
|
999
|
+
columnObjectKey = header.typeOfBodyData;
|
|
1000
|
+
columnObject[columnObjectKey] = obj[header.objectKey];
|
|
1001
|
+
keysUsedForColumn.push(header.objectKey);
|
|
1002
|
+
}
|
|
1003
|
+
else if (header.typeOfBodyData === "CHECKBOX") {
|
|
1004
|
+
columnObjectKey = header.typeOfBodyData;
|
|
1005
|
+
columnObject[columnObjectKey] = obj[header.objectKey];
|
|
1006
|
+
keysUsedForColumn.push(header.objectKey);
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
for (var i = 0; i < keysUsedForColumn.length; i++) {
|
|
1010
|
+
columnName += keysUsedForColumn[i];
|
|
1011
|
+
if (i !== keysUsedForColumn.length - 1) {
|
|
1012
|
+
columnName += ',';
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
rowObject[columnName] = columnObject;
|
|
1016
|
+
}
|
|
1017
|
+
additionalInfoObject = {};
|
|
1018
|
+
additionalKeys = Object.keys(obj).filter(key => !keysUsedForTableDisplay.includes(key));
|
|
1019
|
+
additionalKeys.forEach(key => {
|
|
1020
|
+
additionalInfoObject[key] = obj[key];
|
|
1021
|
+
});
|
|
1022
|
+
rowObject.AdditionalInfo = additionalInfoObject;
|
|
1023
|
+
this.tableDataWrapper.push(rowObject);
|
|
1024
|
+
});
|
|
1025
|
+
this.tableData = this.tableDataWrapper;
|
|
1026
|
+
this.showSkeletonLoading = false;
|
|
1027
|
+
// console.log(JSON.stringify(this.tableDataWrapper));
|
|
1028
|
+
}
|
|
1029
|
+
selectOrUnselectCheckbox(rowData, columnKeys, isCheckboxSelected) {
|
|
1030
|
+
this.toggleCheckbox.emit({ rowData, columnKeys, isCheckboxSelected });
|
|
1031
|
+
}
|
|
1032
|
+
selectUnselectAllRows() {
|
|
1033
|
+
this.toggleHeaderCheckbox.emit();
|
|
1034
|
+
}
|
|
1035
|
+
selectUnselectRow(rowData) {
|
|
1036
|
+
this.toggleRowCheckbox.emit(rowData);
|
|
1037
|
+
}
|
|
1038
|
+
undoCreditedSpot(data) {
|
|
1039
|
+
this.undoIconClicked.emit({ data, mgOrCredit: "Credit" });
|
|
1040
|
+
}
|
|
1041
|
+
undoMgSpot(data) {
|
|
1042
|
+
this.undoIconClicked.emit({ data, mgOrCredit: "MakeGood" });
|
|
1043
|
+
}
|
|
1044
|
+
//Sort and Filter Logic begins!
|
|
1045
|
+
closeTooltip() {
|
|
1046
|
+
if (this.tooltip && this.tooltip.isOpen()) {
|
|
1047
|
+
this.tooltip.close();
|
|
1048
|
+
}
|
|
1049
|
+
this.tooltip = null;
|
|
1050
|
+
this.disableCheckboxApply = false;
|
|
1051
|
+
if (!this.bindValueFuncCalled) {
|
|
1052
|
+
this.columnFilterClosed.emit();
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
closeSortTooltip() {
|
|
1056
|
+
if (this.annaSortService.tooltip && this.annaSortService.tooltip.isOpen()) {
|
|
1057
|
+
this.annaSortService.tooltip.close();
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
initFilters() {
|
|
1061
|
+
this.annaFilterService.tooltipMap = new Map();
|
|
1062
|
+
this.annaFilterService.tooltipSelectedMap = new Map();
|
|
1063
|
+
this.annaSortService.sortByAsc = new Map();
|
|
1064
|
+
this.annaSortService.sortByDesc = new Map();
|
|
1065
|
+
this.annaFilterService.selectedRadio = null;
|
|
1066
|
+
this.annaFilterService.appliedFiltersArray = [];
|
|
1067
|
+
//closing the sort tooltip if we route on the same route or if we click dropdown filters
|
|
1068
|
+
this.closeSortTooltip();
|
|
1069
|
+
this.annaSortService.tooltip = null;
|
|
1070
|
+
this.disableClearAllBtn = true;
|
|
1071
|
+
this.disableTimeFilterApplyBtn = false;
|
|
1072
|
+
}
|
|
1073
|
+
setInitialValueMapData() {
|
|
1074
|
+
this.annaFilterService.initialValueMap = new Map();
|
|
1075
|
+
this.tableHeaders.forEach((column) => {
|
|
1076
|
+
column.headerInfo.forEach((header) => {
|
|
1077
|
+
if (header.filter === "SLIDER") {
|
|
1078
|
+
header.filterObjectKeys.forEach((key) => {
|
|
1079
|
+
let min = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, true);
|
|
1080
|
+
let max = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, false);
|
|
1081
|
+
let obj = { min, max };
|
|
1082
|
+
this.annaFilterService.initialValueMap.set(key, obj);
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
else if (header.filter === "DATE") {
|
|
1086
|
+
header.filterObjectKeys.forEach((key) => {
|
|
1087
|
+
if (key == "period") {
|
|
1088
|
+
const minMaxStartDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "startDate");
|
|
1089
|
+
const minMaxEndDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "endDate");
|
|
1090
|
+
let dateObj = { minSelectedDate: minMaxStartDate[0], maxSelectedDate: minMaxEndDate[1] };
|
|
1091
|
+
this.annaFilterService.initialValueMap.set(key, dateObj);
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
const minMaxDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, key);
|
|
1095
|
+
let obj = { minSelectedDate: minMaxDate[0], maxSelectedDate: minMaxDate[1] };
|
|
1096
|
+
this.annaFilterService.initialValueMap.set(key, obj);
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
else if (header.filter === "TIME") {
|
|
1101
|
+
header.filterObjectKeys.forEach((key) => {
|
|
1102
|
+
let data = this.clonedTableData.filter((obj) => !["", "-", null, "0", "<multi>"].includes(obj[key]));
|
|
1103
|
+
let timeArr = map$1(data, key);
|
|
1104
|
+
timeArr.sort((a, b) => {
|
|
1105
|
+
return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
|
|
1106
|
+
});
|
|
1107
|
+
let obj = {
|
|
1108
|
+
fromTime: timeArr[0],
|
|
1109
|
+
toTime: timeArr[timeArr.length - 1],
|
|
1110
|
+
};
|
|
1111
|
+
if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
|
|
1112
|
+
let includeMulti = this.clonedTableData.findIndex((obj) => obj[key] == "<multi>") != -1;
|
|
1113
|
+
let includeZero = this.clonedTableData.findIndex((obj) => obj[key] == "0") != -1;
|
|
1114
|
+
let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key] != "0" && obj[key] != "<multi>") != -1;
|
|
1115
|
+
let obj = {
|
|
1116
|
+
fromTime: timeArr[0],
|
|
1117
|
+
toTime: timeArr[timeArr.length - 1],
|
|
1118
|
+
includeMulti: includeMulti,
|
|
1119
|
+
includeZero: includeZero,
|
|
1120
|
+
includeTimeRange: includeTimeRange
|
|
1121
|
+
};
|
|
1122
|
+
this.annaFilterService.initialValueMap.set(key, obj);
|
|
1123
|
+
}
|
|
1124
|
+
else if (this.gtGeneralConfig.component === "RATING") {
|
|
1125
|
+
let includeMulti = this.clonedTableData.findIndex((obj) => obj[key][0] == "<multi>") != -1;
|
|
1126
|
+
let includeZero = this.clonedTableData.findIndex((obj) => obj[key][0] == "0") != -1;
|
|
1127
|
+
let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key][0] != "0" && obj[key][0] != "<multi>") != -1;
|
|
1128
|
+
let startTimeArr = map$1(this.clonedTableData, "startTime");
|
|
1129
|
+
let endTimeArr = map$1(this.clonedTableData, "endTime");
|
|
1130
|
+
startTimeArr.sort((a, b) => {
|
|
1131
|
+
return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
|
|
1132
|
+
});
|
|
1133
|
+
endTimeArr.sort((a, b) => {
|
|
1134
|
+
return this.annaDateTimeFormatService.sortByTimeDescending(a, b);
|
|
1135
|
+
});
|
|
1136
|
+
let obj = {
|
|
1137
|
+
fromTime: startTimeArr[0],
|
|
1138
|
+
toTime: endTimeArr[0],
|
|
1139
|
+
includeMulti: includeMulti,
|
|
1140
|
+
includeZero: includeZero,
|
|
1141
|
+
includeTimeRange: includeTimeRange
|
|
1142
|
+
};
|
|
1143
|
+
this.annaFilterService.initialValueMap.set(key, obj);
|
|
1144
|
+
}
|
|
1145
|
+
else {
|
|
1146
|
+
this.annaFilterService.initialValueMap.set(key, obj);
|
|
1147
|
+
}
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
});
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
isTooltipActive(header) {
|
|
1154
|
+
return this.annaFilterService.isTooltipActive(header);
|
|
1155
|
+
}
|
|
1156
|
+
bindTheValueToToolTip(tooltip, header) {
|
|
1157
|
+
this.bindValueFuncCalled = true;
|
|
1158
|
+
let containerToScroll;
|
|
1159
|
+
if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "DRRLISTING") {
|
|
1160
|
+
containerToScroll = document.getElementsByClassName("scrollable-container")[0];
|
|
1161
|
+
var mediaQuery = window.matchMedia("(max-width: 1366px)");
|
|
1162
|
+
if (mediaQuery.matches) {
|
|
1163
|
+
containerToScroll.scroll(0, this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
// if same tooltip opened close it
|
|
1167
|
+
if (tooltip == this.tooltip) {
|
|
1168
|
+
this.bindValueFuncCalled = false;
|
|
1169
|
+
this.closeTooltip();
|
|
1170
|
+
}
|
|
1171
|
+
else {
|
|
1172
|
+
this.searchBar = '';
|
|
1173
|
+
let enabledHeaders = [];
|
|
1174
|
+
header.forEach((item) => {
|
|
1175
|
+
if (item == "period") {
|
|
1176
|
+
let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
|
|
1177
|
+
let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
|
|
1178
|
+
if (uniqStartDate.length > 1 || uniqEndDate.length > 1 || this.isTooltipActive([item])) {
|
|
1179
|
+
enabledHeaders.push(item);
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
else if (uniq(this.tableData.map((u) => u[item])).length > 1 || this.isTooltipActive([item])) {
|
|
1183
|
+
enabledHeaders.push(item);
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
this.openTooltip(tooltip, enabledHeaders);
|
|
1187
|
+
if (window.innerWidth < 1500 && window.innerHeight < 768 && !this.annaFilterService.sliderSet.has(header[0])) {
|
|
1188
|
+
this.columnFilterOpened.emit();
|
|
1189
|
+
}
|
|
1190
|
+
this.showCheckboxFilterRadioButtons = enabledHeaders.length > 1;
|
|
1191
|
+
this.populateTooltipDataBasedOnSelectedRadio(enabledHeaders[0]);
|
|
1192
|
+
this.bindValueFuncCalled = false;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
openTooltip(tooltip, header) {
|
|
1196
|
+
this.closeTooltip();
|
|
1197
|
+
this.tooltip = tooltip;
|
|
1198
|
+
this.tooltip.open();
|
|
1199
|
+
//convert key into the header
|
|
1200
|
+
this.radioButtons = header.map((key) => {
|
|
1201
|
+
let value = this.tooltipRadioTextMap.has(key)
|
|
1202
|
+
? this.tooltipRadioTextMap.get(key)
|
|
1203
|
+
: key; //change to display name
|
|
1204
|
+
return new radioButtonModel(key, value);
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
clearColumnFilter() {
|
|
1208
|
+
this.annaFilterService.clearColumnFilter();
|
|
1209
|
+
this.toolTipdata = null;
|
|
1210
|
+
this.tempTooltipData = null;
|
|
1211
|
+
this.closeTooltip();
|
|
1212
|
+
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
1213
|
+
this.checkIfSortingIsApplied();
|
|
1214
|
+
this.filterAppliedToTable.emit(this.tableData);
|
|
1215
|
+
this.disableEnableEachColumnFilters();
|
|
1216
|
+
}
|
|
1217
|
+
populateTooltipDataBasedOnSelectedRadio(header) {
|
|
1218
|
+
this.disableSliderApplyButton = false;
|
|
1219
|
+
this.disableCheckboxApply = false;
|
|
1220
|
+
if (this.toolTipdata) {
|
|
1221
|
+
this.revert();
|
|
1222
|
+
}
|
|
1223
|
+
this.annaFilterService.selectedRadio = header;
|
|
1224
|
+
let selectedFilterSet = new Set(this.annaFilterService.appliedFiltersArray);
|
|
1225
|
+
this.disableColumnClearAllBtn = selectedFilterSet.has(this.annaFilterService.selectedRadio) ? false : true;
|
|
1226
|
+
if (this.annaFilterService.calendarSet.has(header)) {
|
|
1227
|
+
this.getCalendarData();
|
|
1228
|
+
}
|
|
1229
|
+
else if (this.annaFilterService.sliderSet.has(header)) {
|
|
1230
|
+
this.getSliderData(header);
|
|
1231
|
+
}
|
|
1232
|
+
else if (this.annaFilterService.timeSet.has(header)) {
|
|
1233
|
+
this.getTimeFilterData(header);
|
|
1234
|
+
}
|
|
1235
|
+
else {
|
|
1236
|
+
this.getCheckboxData(header);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
getSliderData(header) {
|
|
1240
|
+
if (header === "Rate") {
|
|
1241
|
+
this.annaFilterService.translateFunc = "currency";
|
|
1242
|
+
}
|
|
1243
|
+
else {
|
|
1244
|
+
this.annaFilterService.translateFunc = "normal";
|
|
1245
|
+
}
|
|
1246
|
+
this.options = this.annaFilterService.populateSliderTooltip(this.clonedTableData, this.tableData);
|
|
1247
|
+
this.disableSliderApplyButton = this.disableSliderApplyBtn();
|
|
1248
|
+
let selectedTooltipObj;
|
|
1249
|
+
if (this.annaFilterService.tooltipSelectedMap.has(header)) {
|
|
1250
|
+
selectedTooltipObj = this.annaFilterService.tooltipSelectedMap.get(header);
|
|
1251
|
+
}
|
|
1252
|
+
else {
|
|
1253
|
+
selectedTooltipObj = this.annaFilterService.initialValueMap.get(header);
|
|
1254
|
+
}
|
|
1255
|
+
this.sliderMinValue = selectedTooltipObj.min < this.options.floor ? this.options.floor : selectedTooltipObj.min;
|
|
1256
|
+
this.sliderMaxValue = selectedTooltipObj.max < this.options.ceil ? selectedTooltipObj.max : this.options.ceil;
|
|
1257
|
+
//default step values
|
|
1258
|
+
this.options.step = 1;
|
|
1259
|
+
this.sliderFilterTextBoxStep = "1";
|
|
1260
|
+
if (header !== "WeekNumber") {
|
|
1261
|
+
this.options.step = 0.1;
|
|
1262
|
+
this.sliderFilterTextBoxStep = "0.1";
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
getCheckboxData(header) {
|
|
1266
|
+
this.tempTooltipData = this.annaFilterService.populateTooltip(header, this.clonedTableData, this.tableData);
|
|
1267
|
+
this.allSelected = this.annaFilterService.isAllOptionsSelected();
|
|
1268
|
+
this.showAll = this.tempTooltipData.filter((x) => !x.isHidden).length > 1 ? true : false;
|
|
1269
|
+
this.toolTipdata = cloneDeep(this.tempTooltipData);
|
|
1270
|
+
}
|
|
1271
|
+
getCalendarData() {
|
|
1272
|
+
const parsingFormat = "MM/DD/YYYY";
|
|
1273
|
+
let minMaxdate = this.annaFilterService.populateDatePickerTooltipWithData(this.clonedTableData, this.tableData);
|
|
1274
|
+
let selectedDateObj;
|
|
1275
|
+
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
1276
|
+
selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
selectedDateObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
|
|
1280
|
+
}
|
|
1281
|
+
// For startDate
|
|
1282
|
+
// selected date is less than date which we get
|
|
1283
|
+
if ((selectedDateObj.minSelectedDate).isAfter(minMaxdate.minStartDate)) {
|
|
1284
|
+
this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.minSelectedDate, parsingFormat);
|
|
1285
|
+
}
|
|
1286
|
+
else {
|
|
1287
|
+
this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
|
|
1288
|
+
}
|
|
1289
|
+
// For endData
|
|
1290
|
+
// selectedDate is less than date which we get
|
|
1291
|
+
if ((selectedDateObj.maxSelectedDate).isAfter(minMaxdate.maxEndDate)) {
|
|
1292
|
+
this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
|
|
1293
|
+
}
|
|
1294
|
+
else {
|
|
1295
|
+
this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.maxSelectedDate, parsingFormat);
|
|
1296
|
+
}
|
|
1297
|
+
this.calendarMinEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
|
|
1298
|
+
this.calendarMaxEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
|
|
1299
|
+
}
|
|
1300
|
+
getTimeFilterData(header) {
|
|
1301
|
+
if (this.annaFilterService.tooltipSelectedMap.has(header)) {
|
|
1302
|
+
this.selectedFromTime = this.annaFilterService.tooltipSelectedMap.get(header).fromTime;
|
|
1303
|
+
this.selectedToTime = this.annaFilterService.tooltipSelectedMap.get(header).toTime;
|
|
1304
|
+
}
|
|
1305
|
+
else {
|
|
1306
|
+
this.selectedFromTime = this.annaFilterService.initialValueMap.get(header).fromTime;
|
|
1307
|
+
this.selectedToTime = this.annaFilterService.initialValueMap.get(header).toTime;
|
|
1308
|
+
}
|
|
1309
|
+
if (this.selectedFromTime != undefined || this.selectedToTime != undefined) {
|
|
1310
|
+
this.selectedFromTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedFromTime, true);
|
|
1311
|
+
this.selectedToTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedToTime, true);
|
|
1312
|
+
this.clonedSelectedFromTime = cloneDeep(this.selectedFromTime);
|
|
1313
|
+
this.clonedSelectedToTime = cloneDeep(this.selectedToTime);
|
|
1314
|
+
}
|
|
1315
|
+
else {
|
|
1316
|
+
this.selectedFromTime = ["-", "-", "-"];
|
|
1317
|
+
this.selectedToTime = ["-", "-", "-"];
|
|
1318
|
+
this.disableTimeFilterApplyBtn = true;
|
|
1319
|
+
}
|
|
1320
|
+
if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
|
|
1321
|
+
this.showMultiTimeCheckbox = false;
|
|
1322
|
+
this.showZeroTimeCheckbox = false;
|
|
1323
|
+
this.showEnterTimeCheckbox = false;
|
|
1324
|
+
if (this.clonedTableData.findIndex((obj) => obj[header] == "0") != -1) {
|
|
1325
|
+
this.showZeroTimeCheckbox = true;
|
|
1326
|
+
this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header] == "0") != -1;
|
|
1327
|
+
this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
|
|
1328
|
+
}
|
|
1329
|
+
if (this.clonedTableData.findIndex((obj) => obj[header] == "<multi>") != -1) {
|
|
1330
|
+
this.showMultiTimeCheckbox = true;
|
|
1331
|
+
this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header] == "<multi>") != -1;
|
|
1332
|
+
this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
|
|
1333
|
+
}
|
|
1334
|
+
if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
|
|
1335
|
+
this.showEnterTimeCheckbox = true;
|
|
1336
|
+
}
|
|
1337
|
+
if (this.clonedTableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1) {
|
|
1338
|
+
this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1;
|
|
1339
|
+
this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
else if (this.gtGeneralConfig.component === "RATING") {
|
|
1343
|
+
this.showMultiTimeCheckbox = false;
|
|
1344
|
+
this.showZeroTimeCheckbox = false;
|
|
1345
|
+
this.showEnterTimeCheckbox = false;
|
|
1346
|
+
if (this.clonedTableData.findIndex((obj) => obj[header][0] == "0") != -1) {
|
|
1347
|
+
this.showZeroTimeCheckbox = true;
|
|
1348
|
+
this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header][0] == "0") != -1;
|
|
1349
|
+
this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
|
|
1350
|
+
}
|
|
1351
|
+
if (this.clonedTableData.findIndex((obj) => obj[header][0] == "<multi>") != -1) {
|
|
1352
|
+
this.showMultiTimeCheckbox = true;
|
|
1353
|
+
this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header][0] == "<multi>") != -1;
|
|
1354
|
+
this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
|
|
1355
|
+
}
|
|
1356
|
+
if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
|
|
1357
|
+
this.showEnterTimeCheckbox = true;
|
|
1358
|
+
}
|
|
1359
|
+
if (this.clonedTableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1) {
|
|
1360
|
+
this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1;
|
|
1361
|
+
this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
selectOrUnselectMultiTimeCheckbox() {
|
|
1366
|
+
this.multiTimeCheckboxChecked = !this.multiTimeCheckboxChecked;
|
|
1367
|
+
this.annaFilterService.includeMultiTime = !this.annaFilterService.includeMultiTime;
|
|
1368
|
+
this.disableTimeFilterApplyButton();
|
|
1369
|
+
}
|
|
1370
|
+
selectOrUnselectZeroTimeCheckbox() {
|
|
1371
|
+
this.zeroTimeCheckboxChecked = !this.zeroTimeCheckboxChecked;
|
|
1372
|
+
this.annaFilterService.includeZeroTime = !this.annaFilterService.includeZeroTime;
|
|
1373
|
+
this.disableTimeFilterApplyButton();
|
|
1374
|
+
}
|
|
1375
|
+
selectOrUnselectEnterTimeCheckbox() {
|
|
1376
|
+
this.enterTimeCheckboxChecked = !this.enterTimeCheckboxChecked;
|
|
1377
|
+
this.annaFilterService.includeTimeRange = !this.annaFilterService.includeTimeRange;
|
|
1378
|
+
this.disableTimeFilterApplyButton();
|
|
1379
|
+
}
|
|
1380
|
+
disableSliderApplyBtn() {
|
|
1381
|
+
return this.options.floor === this.options.ceil;
|
|
1382
|
+
}
|
|
1383
|
+
isCheckboxSelected(data) {
|
|
1384
|
+
this.allSelected = this.annaFilterService.isCheckboxSelected(data);
|
|
1385
|
+
if (this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected && !x.isHidden).length == 0) {
|
|
1386
|
+
this.disableCheckboxApply = true;
|
|
1387
|
+
}
|
|
1388
|
+
else {
|
|
1389
|
+
this.disableCheckboxApply = false;
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
minValueChanged(value) {
|
|
1393
|
+
if (isNaN(+value)) {
|
|
1394
|
+
this.sliderMinValue = +this.options.floor;
|
|
1395
|
+
}
|
|
1396
|
+
else {
|
|
1397
|
+
if (+value > this.sliderMaxValue) {
|
|
1398
|
+
this.sliderMinValue = this.sliderMaxValue;
|
|
1399
|
+
}
|
|
1400
|
+
else if (+value < this.options.floor) {
|
|
1401
|
+
this.sliderMinValue = this.options.floor;
|
|
1402
|
+
}
|
|
1403
|
+
else {
|
|
1404
|
+
this.sliderMinValue = +value;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
maxValueChanged(value) {
|
|
1409
|
+
if (isNaN(+value)) {
|
|
1410
|
+
this.sliderMaxValue = +this.options.ceil;
|
|
1411
|
+
}
|
|
1412
|
+
else {
|
|
1413
|
+
if (+value < this.sliderMinValue) {
|
|
1414
|
+
this.sliderMaxValue = this.sliderMinValue;
|
|
1415
|
+
}
|
|
1416
|
+
else if (+value > this.options.ceil) {
|
|
1417
|
+
this.sliderMinValue = this.options.ceil;
|
|
1418
|
+
}
|
|
1419
|
+
else {
|
|
1420
|
+
this.sliderMaxValue = +value;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
sliderValueChange() {
|
|
1425
|
+
this.sliderValue = { min: this.sliderMinValue, max: this.sliderMaxValue };
|
|
1426
|
+
}
|
|
1427
|
+
cancelSliderFilter() {
|
|
1428
|
+
this.sliderValue = null;
|
|
1429
|
+
this.closeTooltip();
|
|
1430
|
+
}
|
|
1431
|
+
allOptionClicked() {
|
|
1432
|
+
if (this.allSelected == 0 || this.allSelected == 2) {
|
|
1433
|
+
this.allSelected = 1;
|
|
1434
|
+
this.disableCheckboxApply = false;
|
|
1435
|
+
}
|
|
1436
|
+
else {
|
|
1437
|
+
this.allSelected = 0;
|
|
1438
|
+
this.disableCheckboxApply = true;
|
|
1439
|
+
}
|
|
1440
|
+
this.annaFilterService.allOptionsClicked(this.allSelected);
|
|
1441
|
+
}
|
|
1442
|
+
applyFilters() {
|
|
1443
|
+
let isSame = isEqual(this.toolTipdata, this.tempTooltipData);
|
|
1444
|
+
this.toolTipdata = cloneDeep(this.tempTooltipData);
|
|
1445
|
+
this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
|
|
1446
|
+
if (!isSame) {
|
|
1447
|
+
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
1448
|
+
}
|
|
1449
|
+
let tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected).map((x) => x.data);
|
|
1450
|
+
if (tooltipSelectedDataArray.length == 0) {
|
|
1451
|
+
tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).map((x) => x.data);
|
|
1452
|
+
}
|
|
1453
|
+
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, tooltipSelectedDataArray);
|
|
1454
|
+
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
1455
|
+
this.checkIfSortingIsApplied();
|
|
1456
|
+
this.filterAppliedToTable.emit(this.tableData);
|
|
1457
|
+
// this.generateTableDataWrapper();
|
|
1458
|
+
this.disableEnableEachColumnFilters();
|
|
1459
|
+
this.closeTooltip();
|
|
1460
|
+
}
|
|
1461
|
+
revert() {
|
|
1462
|
+
this.tempTooltipData = cloneDeep(this.toolTipdata);
|
|
1463
|
+
this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
|
|
1464
|
+
this.toolTipdata = null;
|
|
1465
|
+
}
|
|
1466
|
+
closeCheckboxFilter() {
|
|
1467
|
+
if (this.toolTipdata) {
|
|
1468
|
+
this.revert();
|
|
1469
|
+
}
|
|
1470
|
+
this.closeTooltip();
|
|
1471
|
+
}
|
|
1472
|
+
applySliderFilter() {
|
|
1473
|
+
if (this.sliderValue) {
|
|
1474
|
+
let selectedDataObj;
|
|
1475
|
+
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
1476
|
+
selectedDataObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
1477
|
+
}
|
|
1478
|
+
else {
|
|
1479
|
+
selectedDataObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
|
|
1480
|
+
}
|
|
1481
|
+
let isSame = isEqual(selectedDataObj, this.sliderValue);
|
|
1482
|
+
if (!isSame) {
|
|
1483
|
+
this.annaFilterService.sliderData = { min: this.options.floor, max: this.options.ceil };
|
|
1484
|
+
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, this.sliderValue);
|
|
1485
|
+
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
1486
|
+
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
1487
|
+
this.checkIfSortingIsApplied();
|
|
1488
|
+
this.filterAppliedToTable.emit(this.tableData);
|
|
1489
|
+
// this.generateTableDataWrapper();
|
|
1490
|
+
this.disableEnableEachColumnFilters();
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
this.sliderValue = null;
|
|
1494
|
+
this.closeTooltip();
|
|
1495
|
+
}
|
|
1496
|
+
cancelInDateFilter() {
|
|
1497
|
+
this.closeTooltip();
|
|
1498
|
+
}
|
|
1499
|
+
applyDateFilter(selectedDate) {
|
|
1500
|
+
let selectedDateObj;
|
|
1501
|
+
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
1502
|
+
selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
1503
|
+
}
|
|
1504
|
+
else {
|
|
1505
|
+
selectedDateObj = cloneDeep(this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio));
|
|
1506
|
+
}
|
|
1507
|
+
let isStartDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate), selectedDateObj.minSelectedDate);
|
|
1508
|
+
let isEndDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate), selectedDateObj.maxSelectedDate);
|
|
1509
|
+
if (!isStartDateSame || !isEndDateSame) {
|
|
1510
|
+
selectedDateObj.minSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate));
|
|
1511
|
+
selectedDateObj.maxSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate));
|
|
1512
|
+
this.annaFilterService.flightDateRange = {
|
|
1513
|
+
minSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMinEnabledDate)),
|
|
1514
|
+
maxSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMaxEnabledDate))
|
|
1515
|
+
};
|
|
1516
|
+
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedDateObj);
|
|
1517
|
+
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
1518
|
+
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
1519
|
+
this.checkIfSortingIsApplied();
|
|
1520
|
+
this.filterAppliedToTable.emit(this.tableData);
|
|
1521
|
+
// this.generateTableDataWrapper();
|
|
1522
|
+
this.disableEnableEachColumnFilters();
|
|
1523
|
+
}
|
|
1524
|
+
this.closeTooltip();
|
|
1525
|
+
}
|
|
1526
|
+
applyWeekFilter(event) {
|
|
1527
|
+
}
|
|
1528
|
+
incrementHour(arr) {
|
|
1529
|
+
if (arr[0] == "") {
|
|
1530
|
+
arr[0] = 1;
|
|
1531
|
+
}
|
|
1532
|
+
else if (parseInt(arr[0]) < 12) {
|
|
1533
|
+
arr[0] = parseInt(arr[0]) + 1;
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
arr[0] = 1;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
decrementHour(arr) {
|
|
1540
|
+
if (arr[0] == "") {
|
|
1541
|
+
arr[0] = 12;
|
|
1542
|
+
}
|
|
1543
|
+
else if (parseInt(arr[0]) > 1) {
|
|
1544
|
+
arr[0] = parseInt(arr[0]) - 1;
|
|
1545
|
+
}
|
|
1546
|
+
else {
|
|
1547
|
+
arr[0] = 12;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
incrementMinute(arr) {
|
|
1551
|
+
if (arr[1] == "" || parseInt(arr[1]) == 0) {
|
|
1552
|
+
arr[1] = 30;
|
|
1553
|
+
}
|
|
1554
|
+
else {
|
|
1555
|
+
arr[1] = "00";
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
decrementMinute(arr) {
|
|
1559
|
+
if (arr[1] == "" || parseInt(arr[1]) == 30) {
|
|
1560
|
+
arr[1] = "00";
|
|
1561
|
+
}
|
|
1562
|
+
else {
|
|
1563
|
+
arr[1] = 30;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
changeStartTimeHour(increment) {
|
|
1567
|
+
if (increment) {
|
|
1568
|
+
this.incrementHour(this.selectedFromTime);
|
|
1569
|
+
}
|
|
1570
|
+
else {
|
|
1571
|
+
this.decrementHour(this.selectedFromTime);
|
|
1572
|
+
}
|
|
1573
|
+
this.disableTimeFilterApplyButton();
|
|
1574
|
+
}
|
|
1575
|
+
changeEndTimeHour(increment) {
|
|
1576
|
+
if (increment) {
|
|
1577
|
+
this.incrementHour(this.selectedToTime);
|
|
1578
|
+
}
|
|
1579
|
+
else {
|
|
1580
|
+
this.decrementHour(this.selectedToTime);
|
|
1581
|
+
}
|
|
1582
|
+
this.disableTimeFilterApplyButton();
|
|
1583
|
+
}
|
|
1584
|
+
changeEndTimeMinute(increment) {
|
|
1585
|
+
if (increment) {
|
|
1586
|
+
this.incrementMinute(this.selectedToTime);
|
|
1587
|
+
}
|
|
1588
|
+
else {
|
|
1589
|
+
this.decrementMinute(this.selectedToTime);
|
|
1590
|
+
}
|
|
1591
|
+
this.disableTimeFilterApplyButton();
|
|
1592
|
+
}
|
|
1593
|
+
changeStartTimeMinute(increment) {
|
|
1594
|
+
if (increment) {
|
|
1595
|
+
this.incrementMinute(this.selectedFromTime);
|
|
1596
|
+
}
|
|
1597
|
+
else {
|
|
1598
|
+
this.decrementMinute(this.selectedFromTime);
|
|
1599
|
+
}
|
|
1600
|
+
this.disableTimeFilterApplyButton();
|
|
1601
|
+
}
|
|
1602
|
+
applyTimeFilters() {
|
|
1603
|
+
let fromTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
|
|
1604
|
+
let fromTime24HrFormat = fromTime24HrFormatArr[0] + ":" + fromTime24HrFormatArr[1] + ":00";
|
|
1605
|
+
let toTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
|
|
1606
|
+
let toTime24HrFormat = toTime24HrFormatArr[0] + ":" + toTime24HrFormatArr[1] + ":00";
|
|
1607
|
+
let previousSelectedData;
|
|
1608
|
+
if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
|
|
1609
|
+
previousSelectedData = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
|
|
1610
|
+
}
|
|
1611
|
+
else {
|
|
1612
|
+
previousSelectedData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
|
|
1613
|
+
}
|
|
1614
|
+
let selectedData = {
|
|
1615
|
+
fromTime: fromTime24HrFormat, toTime: toTime24HrFormat, includeMulti: this.annaFilterService.includeMultiTime,
|
|
1616
|
+
includeZero: this.annaFilterService.includeZeroTime, includeTimeRange: this.annaFilterService.includeTimeRange
|
|
1617
|
+
};
|
|
1618
|
+
if (!isEqual(previousSelectedData, selectedData)) {
|
|
1619
|
+
this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedData);
|
|
1620
|
+
this.annaFilterService.reOrderAppliedFiltersArray(false);
|
|
1621
|
+
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
1622
|
+
this.checkIfSortingIsApplied();
|
|
1623
|
+
this.filterAppliedToTable.emit(this.tableData);
|
|
1624
|
+
// this.generateTableDataWrapper();
|
|
1625
|
+
this.disableEnableEachColumnFilters();
|
|
1626
|
+
}
|
|
1627
|
+
this.closeTooltip();
|
|
1628
|
+
}
|
|
1629
|
+
closeTimeFilter() {
|
|
1630
|
+
this.selectedFromTime = cloneDeep(this.clonedSelectedFromTime);
|
|
1631
|
+
this.selectedToTime = cloneDeep(this.clonedSelectedToTime);
|
|
1632
|
+
this.closeTooltip();
|
|
1633
|
+
}
|
|
1634
|
+
disableTimeFilterApplyButton() {
|
|
1635
|
+
let timeFormat = "HH:mm:ss";
|
|
1636
|
+
let startTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
|
|
1637
|
+
let startTime24HrFormat = startTime24HrFormatArr[0] + ":" + startTime24HrFormatArr[1] + ":00";
|
|
1638
|
+
let endTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
|
|
1639
|
+
let endTime24HrFormat = endTime24HrFormatArr[0] + ":" + endTime24HrFormatArr[1] + ":00";
|
|
1640
|
+
this.disableTimeFilterApplyBtn = moment(startTime24HrFormat, timeFormat).isAfter(moment(endTime24HrFormat, timeFormat));
|
|
1641
|
+
if (!this.multiTimeCheckboxChecked && !this.zeroTimeCheckboxChecked && !this.enterTimeCheckboxChecked) {
|
|
1642
|
+
this.disableTimeFilterApplyBtn = true;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
sortedData(event) {
|
|
1646
|
+
if (event.type == "none") {
|
|
1647
|
+
this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
|
|
1648
|
+
}
|
|
1649
|
+
else {
|
|
1650
|
+
this.tableData = event.data;
|
|
1651
|
+
}
|
|
1652
|
+
this.sortingAppliedToTable.emit(this.tableData);
|
|
1653
|
+
// this.generateTableDataWrapper();
|
|
1654
|
+
}
|
|
1655
|
+
checkIfSortingIsApplied() {
|
|
1656
|
+
let appliedkey;
|
|
1657
|
+
let isAsc;
|
|
1658
|
+
const arr = this.sortComponent.toArray();
|
|
1659
|
+
let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByAsc, true);
|
|
1660
|
+
appliedkey = obj.key;
|
|
1661
|
+
isAsc = obj.setValueTo;
|
|
1662
|
+
if (!appliedkey) {
|
|
1663
|
+
let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByDesc, false);
|
|
1664
|
+
appliedkey = obj.key;
|
|
1665
|
+
isAsc = obj.setValueTo;
|
|
1666
|
+
}
|
|
1667
|
+
if (appliedkey) {
|
|
1668
|
+
this.applySorting(arr, appliedkey, isAsc);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
applySorting(sortComponentArr, appliedKey, isAsc) {
|
|
1672
|
+
sortComponentArr.forEach((component) => {
|
|
1673
|
+
if (component.sortBy === appliedKey) {
|
|
1674
|
+
this.setSortComponentDataProperty(component);
|
|
1675
|
+
isAsc ? component.sortByAscending() : component.sortByDescending();
|
|
1676
|
+
}
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
setSortComponentDataProperty(sortComponent) {
|
|
1680
|
+
sortComponent.data = this.tableData;
|
|
1681
|
+
sortComponent.clonedData = cloneDeep(this.tableData);
|
|
1682
|
+
}
|
|
1683
|
+
disableEnableEachColumnFilters() {
|
|
1684
|
+
this.tableHeaders.forEach(header => {
|
|
1685
|
+
header.headerInfo.forEach(item => {
|
|
1686
|
+
if (item.filter != "") {
|
|
1687
|
+
let values = [];
|
|
1688
|
+
item.disableFilter = true;
|
|
1689
|
+
item.filterObjectKeys.forEach(key => {
|
|
1690
|
+
if (key == "period") {
|
|
1691
|
+
let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
|
|
1692
|
+
let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
|
|
1693
|
+
item.disableFilter = (uniqStartDate.length > 1 || uniqEndDate.length > 1) ? false : true;
|
|
1694
|
+
}
|
|
1695
|
+
else {
|
|
1696
|
+
values = this.tableData.map((u) => u[key]);
|
|
1697
|
+
if (uniq(values).filter(n => n != null).length > 1) {
|
|
1698
|
+
item.disableFilter = false;
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
});
|
|
1702
|
+
// if(uniq(values).length > 1){
|
|
1703
|
+
// item.disableFilter = false;
|
|
1704
|
+
// }else{
|
|
1705
|
+
// item.disableFilter = true;
|
|
1706
|
+
// }
|
|
1707
|
+
}
|
|
1708
|
+
if (item.sort) {
|
|
1709
|
+
if (uniq(this.tableData.map((u) => u[item.objectKey])).length > 1) {
|
|
1710
|
+
item.disableSort = false;
|
|
1711
|
+
}
|
|
1712
|
+
else {
|
|
1713
|
+
item.disableSort = true;
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
});
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
ngAfterViewInit() {
|
|
1720
|
+
this.annaGenericTableService.virtualScrollSubject.subscribe((val) => {
|
|
1721
|
+
this.isScrolledLeft = document.getElementsByClassName("anna-table-virtual-scroll-viewport")[0].scrollLeft > 0;
|
|
1722
|
+
this.cdRef.detectChanges();
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
dataRowClicked(rowData) {
|
|
1726
|
+
this.rowClicked.emit(rowData);
|
|
1727
|
+
}
|
|
1728
|
+
radioButtonClicked(data, action, isDisabled) {
|
|
1729
|
+
if (!isDisabled) {
|
|
1730
|
+
this.radioButtonSelected.emit({ data, action });
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
bindTheValueToSellerGroupTooltip(sellerGroupHierarchy, tooltip) {
|
|
1734
|
+
if (this.hierarchyTooltip && this.hierarchyTooltip.open) {
|
|
1735
|
+
this.hierarchyTooltip.close();
|
|
1736
|
+
}
|
|
1737
|
+
this.sellerGroupHierarchy = sellerGroupHierarchy;
|
|
1738
|
+
this.hierarchyTooltip = tooltip;
|
|
1739
|
+
this.hierarchyTooltip.open();
|
|
1740
|
+
}
|
|
1741
|
+
iconClicked(rowData, iconClass) {
|
|
1742
|
+
this.gtIconClicked.emit({ data: rowData, iconClass: iconClass });
|
|
1743
|
+
}
|
|
1744
|
+
svgIconClicked(rowData, key) {
|
|
1745
|
+
this.gtSVGIconClicked.emit({ data: rowData, key: key });
|
|
1746
|
+
}
|
|
1747
|
+
textActionClicked(rowData, id) {
|
|
1748
|
+
this.gtTextActionClicked.emit({ data: rowData, id });
|
|
1749
|
+
}
|
|
1750
|
+
viewDetailsClicked(rowData) {
|
|
1751
|
+
this.gtViewDetailClicked.emit({ data: rowData });
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
AnnaNonEditableGenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.AnnaSortService }, { token: i1.AnnaDateTimeFormatService }, { token: i1.AnnaFilterService }, { token: i1.AnnaGenericTableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1755
|
+
AnnaNonEditableGenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaNonEditableGenericTableComponent, selector: "anna-core-non-editable-generic-table-lib", inputs: { showSkeletonLoading: "showSkeletonLoading", tableHeaders: "tableHeaders", tableData: "tableData", clonedTableData: "clonedTableData", numberOfSkeletonRows: "numberOfSkeletonRows", numberOfSkeletonColumns: "numberOfSkeletonColumns", gtGeneralConfig: "gtGeneralConfig", totalRowInfo: "totalRowInfo", gtDimension: "gtDimension", tableClass: "tableClass", maximumRowsWhichCanBeRenderedWithoutScroll: "maximumRowsWhichCanBeRenderedWithoutScroll" }, outputs: { toggleCheckbox: "toggleCheckbox", toggleRowCheckbox: "toggleRowCheckbox", toggleHeaderCheckbox: "toggleHeaderCheckbox", undoIconClicked: "undoIconClicked", filterAppliedToTable: "filterAppliedToTable", sortingAppliedToTable: "sortingAppliedToTable", rowClicked: "rowClicked", radioButtonSelected: "radioButtonSelected", columnFilterOpened: "columnFilterOpened", columnFilterClosed: "columnFilterClosed", gtIconClicked: "gtIconClicked", gtSVGIconClicked: "gtSVGIconClicked", gtTextActionClicked: "gtTextActionClicked", gtViewDetailClicked: "gtViewDetailClicked" }, viewQueries: [{ propertyName: "sortComponent", predicate: AnnaSortComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-container\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\">\r\n <anna-table-virtual-scroll-viewport\r\n [buffer]=\"gtGeneralConfig.bufferSize\"\r\n [rowHeight]=\"gtDimension.rowHeight\"\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [appVirtualDataSource]=\"tableData\">\r\n <tr\r\n class=\"header-row\"\r\n mat-header-row\r\n *matHeaderRowDef=\"tableColumns; sticky: true\"\r\n [style.height.px]=\"gtDimension.headerHeight\"\r\n ></tr>\r\n <tr\r\n class=\"total-row\"\r\n mat-header-row\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n *matHeaderRowDef=\"totalRowColumns; sticky: true\"\r\n [class.hidden]=\"\r\n showSkeletonLoading ||\r\n (!showSkeletonLoading && !tableData.length) ||\r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n {{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </anna-table-virtual-scroll-viewport>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;top:0;border-top:none!important;border-bottom:none!important;outline:none!important;box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4}:host ::ng-deep .gt thead tr th br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt thead tr th div.row{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}:host ::ng-deep .gt thead tr th div.sort-filter-container{display:flex;flex-wrap:nowrap;align-items:center}:host ::ng-deep .gt thead tr th:first-of-type{box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4,inset 1px 0 #d4d4d4}:host ::ng-deep .gt tbody tr td:first-of-type{box-shadow:inset 1px 0 #d4d4d4,inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td:nth-of-type(n + 2){box-shadow:inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td .upper-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#000;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr td .lower-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#a7a7a7;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt tbody tr:nth-of-type(1) td{border-top:none!important}:host ::ng-deep .gt .custom-column-checkbox-checked,:host ::ng-deep .gt .custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}:host ::ng-deep .gt .custom-column-checkbox-checked{color:#268bff}:host ::ng-deep .gt .custom-column-checkbox-unchecked{color:#4a4a4a}anna-table-virtual-scroll-viewport::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}anna-table-virtual-scroll-viewport::-webkit-scrollbar{width:5px;height:5px}anna-table-virtual-scroll-viewport::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0006!important;border:1px solid rgba(0,0,0,.2)}.table-container{overflow-x:auto;overflow-y:auto}.rowSelectCheckbox,#selectAllRowsCheckbox{cursor:pointer}.disable-checkbox{color:#dedede!important;pointer-events:none!important}.mdi-warning{color:#f3c639;font-size:16px;line-height:28px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1}.redcolor-status{color:#c62a2a}.redcolor-cell-border{outline:1px solid #ff5353!important;outline-offset:-1px!important}#no-filter-space{width:.875rem}::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:1.875rem!important;width:2.625rem;padding:0 .625rem}input.numberInput{margin-right:-.8125rem;padding:0 0 0 .625rem;height:1.875rem}::ng-deep .mat-button-toggle-checked{background-color:#268bff!important;color:#fff!important}::ng-deep .mat-button-toggle-group-appearance-standard{border-radius:0}.hidden{display:none}.no-data-div{margin-top:2.5px}.no-data-div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:.3125rem 1.125rem;border-radius:.25rem}.column-values:nth-of-type(2){color:#a7a7a7!important}.custom-column-checkbox-checked,.custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}.custom-column-checkbox-checked{color:#268bff}.custom-column-checkbox-unchecked{color:#4a4a4a}.time-filter-checkboxes>div>p{color:#151b1e}.radio-button-dimension,::ng-deep .markForCredit .mat-radio-inner-circle,::ng-deep .markForCredit .mat-radio-outer-circle,::ng-deep .mark-for-credit .mat-radio-inner-circle,::ng-deep .mark-for-credit .mat-radio-outer-circle,::ng-deep .markForMakeGood .mat-radio-inner-circle,::ng-deep .markForMakeGood .mat-radio-outer-circle,::ng-deep .noAction .mat-radio-inner-circle,::ng-deep .noAction .mat-radio-outer-circle,::ng-deep .credit .mat-radio-inner-circle,::ng-deep .credit .mat-radio-outer-circle,::ng-deep .approve .mat-radio-inner-circle,::ng-deep .approve .mat-radio-outer-circle,::ng-deep .reject .mat-radio-inner-circle,::ng-deep .reject .mat-radio-outer-circle,::ng-deep .resubmit .mat-radio-inner-circle,::ng-deep .resubmit .mat-radio-outer-circle,::ng-deep .rejectCreditRequest .mat-radio-inner-circle,::ng-deep .rejectCreditRequest .mat-radio-outer-circle{height:18px!important;width:18px!important}::ng-deep .margin-bottom-zero .mat-radio-label{margin-bottom:0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:red}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:red}::ng-deep .mat-radio-button.mat-radio-disabled .mat-radio-outer-circle{border-color:#00000061!important}::ng-deep .mat-radio-button.mat-radio-disabled.mat-radio-checked .mat-radio-inner-circle{background-color:#00000061!important}::ng-deep tr.white-background-row{background:white}::ng-deep tr.gray-background-row{background:rgba(233,233,233,.5)}.remarks-tooltip,.seller-tooltip{font-size:.875rem;color:#268bff;position:relative;top:.1875rem;cursor:pointer}.seller-tooltip{float:right}::ng-deep .remarks-info-tooltip .tooltip-inner{max-width:19.25rem!important}.rating-icon,.lur-violation-icon{color:#268bff;cursor:pointer;margin-left:2px;position:relative;left:-2px}::ng-deep .rating-info-tooltip .tooltip-inner{max-width:800px!important}p.first-row{padding:.5rem .5rem 0;color:#000;white-space:nowrap;text-align:left}p.second-row{padding:2px .5rem .5rem;color:#000;white-space:nowrap;text-align:left}::ng-deep .gt-total-row-tooltip{opacity:1!important}::ng-deep .gt-total-row-tooltip .tooltip-inner{color:#000;box-shadow:0 6px 10px #0000004d,0 2px 2px #0003;background-color:#fff;padding:4px!important;width:100%;border-radius:2px!important}::ng-deep .gt-total-row-tooltip .arrow:before{border-top-color:#fff!important}.info-label{margin-left:4px;color:#268bff;vertical-align:text-top}::ng-deep .hierarchy-tooltip .tooltip-inner{padding:4px!important}table.seller-hierarchy-table{table-layout:fixed;margin:.625rem .625rem .625rem .8125rem}table.seller-hierarchy-table tr th{font-family:Roboto;font-size:.75rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.67;letter-spacing:normal;color:#5e5e5e;white-space:nowrap;background:#ededed;box-shadow:none!important;border-top:1px solid #d4d4d4}table.seller-hierarchy-table tr th:first-of-type,table.seller-hierarchy-table tr td:first-of-type{border-left:1px solid #d4d4d4}table.seller-hierarchy-table tr th:last-of-type,table.seller-hierarchy-table tr td:last-of-type{border-right:1px solid #d4d4d4;width:7.875rem!important}table.seller-hierarchy-table tr th:nth-of-type(2){width:7.75rem!important}table.seller-hierarchy-table tr td{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;box-shadow:none!important;border-top:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4}table.seller-hierarchy-table tr td:nth-of-type(2),table.seller-hierarchy-table tr td:nth-of-type(3){padding-top:.25rem}table.seller-hierarchy-table tr td span{display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}\n"], components: [{ type: AnnaTableVirtualScrollViewportComponent, selector: "anna-table-virtual-scroll-viewport", inputs: ["orientation"], outputs: ["scrolledIndexChange"] }, { type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: ["data", "sortBy", "disableSort", "placement"], outputs: ["sort"] }, { type: i5.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["appearance", "animation", "theme", "loadingText", "count", "ariaLabel"] }, { type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i1.AnnaPayForPerformanceIconTemplateComponent, selector: "anna-pay-for-performance-icon-template", inputs: ["color", "width", "height"] }, { type: i1.AnnaLiveIconTemplateComponent, selector: "anna-live-icon-template" }, { type: i1.AnnaRejectedIconTemplateComponent, selector: "anna-rejected-icon-template" }, { type: i1.AnnaNotifyIconTemplateComponent, selector: "anna-notify-icon-template" }, { type: i1.AnnaBuyerApprovalIconTemplateComponent, selector: "anna-buyer-approval-icon-template" }, { type: i1.AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: ["width", "marginTop"] }, { type: i7.ɵa, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { type: i8.AnnaCalendarFilterComponent, selector: "anna-core-calendar-filter-lib", inputs: ["maxDate", "minDate", "showDate", "selectedFromDate", "selectedToDate"], outputs: ["selectedDate", "apply", "cancel"] }, { type: i8.AnnaWeekCalendarComponent, selector: "anna-core-week-calendar-filter-lib", inputs: ["from-date", "to-date", "disabled-dates", "maxDate", "minDate", "week-calendar-config"], outputs: ["apply", "toggle-calendar"] }, { type: i9.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }], directives: [{ type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]", inputs: ["rowHeight", "headerRowHeight", "buffer", "headerRows"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: AnnaVirtualTableDirective, selector: "[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]", inputs: ["appVirtualDataSource"] }, { type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i3$1.MatCellDef, selector: "[matCellDef]" }, { type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i14.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i9.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], pipes: { "AnnafilterSearchedText": i1.AnnaFilterSearchedTextPipe } });
|
|
1756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, decorators: [{
|
|
1757
|
+
type: Component,
|
|
1758
|
+
args: [{ selector: 'anna-core-non-editable-generic-table-lib', template: "<div class=\"table-container\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\">\r\n <anna-table-virtual-scroll-viewport\r\n [buffer]=\"gtGeneralConfig.bufferSize\"\r\n [rowHeight]=\"gtDimension.rowHeight\"\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [appVirtualDataSource]=\"tableData\">\r\n <tr\r\n class=\"header-row\"\r\n mat-header-row\r\n *matHeaderRowDef=\"tableColumns; sticky: true\"\r\n [style.height.px]=\"gtDimension.headerHeight\"\r\n ></tr>\r\n <tr\r\n class=\"total-row\"\r\n mat-header-row\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n *matHeaderRowDef=\"totalRowColumns; sticky: true\"\r\n [class.hidden]=\"\r\n showSkeletonLoading ||\r\n (!showSkeletonLoading && !tableData.length) ||\r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n {{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </anna-table-virtual-scroll-viewport>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;top:0;border-top:none!important;border-bottom:none!important;outline:none!important;box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4}:host ::ng-deep .gt thead tr th br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt thead tr th div.row{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}:host ::ng-deep .gt thead tr th div.sort-filter-container{display:flex;flex-wrap:nowrap;align-items:center}:host ::ng-deep .gt thead tr th:first-of-type{box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4,inset 1px 0 #d4d4d4}:host ::ng-deep .gt tbody tr td:first-of-type{box-shadow:inset 1px 0 #d4d4d4,inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td:nth-of-type(n + 2){box-shadow:inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td .upper-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#000;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr td .lower-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#a7a7a7;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt tbody tr:nth-of-type(1) td{border-top:none!important}:host ::ng-deep .gt .custom-column-checkbox-checked,:host ::ng-deep .gt .custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}:host ::ng-deep .gt .custom-column-checkbox-checked{color:#268bff}:host ::ng-deep .gt .custom-column-checkbox-unchecked{color:#4a4a4a}anna-table-virtual-scroll-viewport::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}anna-table-virtual-scroll-viewport::-webkit-scrollbar{width:5px;height:5px}anna-table-virtual-scroll-viewport::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0006!important;border:1px solid rgba(0,0,0,.2)}.table-container{overflow-x:auto;overflow-y:auto}.rowSelectCheckbox,#selectAllRowsCheckbox{cursor:pointer}.disable-checkbox{color:#dedede!important;pointer-events:none!important}.mdi-warning{color:#f3c639;font-size:16px;line-height:28px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1}.redcolor-status{color:#c62a2a}.redcolor-cell-border{outline:1px solid #ff5353!important;outline-offset:-1px!important}#no-filter-space{width:.875rem}::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:1.875rem!important;width:2.625rem;padding:0 .625rem}input.numberInput{margin-right:-.8125rem;padding:0 0 0 .625rem;height:1.875rem}::ng-deep .mat-button-toggle-checked{background-color:#268bff!important;color:#fff!important}::ng-deep .mat-button-toggle-group-appearance-standard{border-radius:0}.hidden{display:none}.no-data-div{margin-top:2.5px}.no-data-div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:.3125rem 1.125rem;border-radius:.25rem}.column-values:nth-of-type(2){color:#a7a7a7!important}.custom-column-checkbox-checked,.custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}.custom-column-checkbox-checked{color:#268bff}.custom-column-checkbox-unchecked{color:#4a4a4a}.time-filter-checkboxes>div>p{color:#151b1e}.radio-button-dimension,::ng-deep .markForCredit .mat-radio-inner-circle,::ng-deep .markForCredit .mat-radio-outer-circle,::ng-deep .mark-for-credit .mat-radio-inner-circle,::ng-deep .mark-for-credit .mat-radio-outer-circle,::ng-deep .markForMakeGood .mat-radio-inner-circle,::ng-deep .markForMakeGood .mat-radio-outer-circle,::ng-deep .noAction .mat-radio-inner-circle,::ng-deep .noAction .mat-radio-outer-circle,::ng-deep .credit .mat-radio-inner-circle,::ng-deep .credit .mat-radio-outer-circle,::ng-deep .approve .mat-radio-inner-circle,::ng-deep .approve .mat-radio-outer-circle,::ng-deep .reject .mat-radio-inner-circle,::ng-deep .reject .mat-radio-outer-circle,::ng-deep .resubmit .mat-radio-inner-circle,::ng-deep .resubmit .mat-radio-outer-circle,::ng-deep .rejectCreditRequest .mat-radio-inner-circle,::ng-deep .rejectCreditRequest .mat-radio-outer-circle{height:18px!important;width:18px!important}::ng-deep .margin-bottom-zero .mat-radio-label{margin-bottom:0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:red}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:red}::ng-deep .mat-radio-button.mat-radio-disabled .mat-radio-outer-circle{border-color:#00000061!important}::ng-deep .mat-radio-button.mat-radio-disabled.mat-radio-checked .mat-radio-inner-circle{background-color:#00000061!important}::ng-deep tr.white-background-row{background:white}::ng-deep tr.gray-background-row{background:rgba(233,233,233,.5)}.remarks-tooltip,.seller-tooltip{font-size:.875rem;color:#268bff;position:relative;top:.1875rem;cursor:pointer}.seller-tooltip{float:right}::ng-deep .remarks-info-tooltip .tooltip-inner{max-width:19.25rem!important}.rating-icon,.lur-violation-icon{color:#268bff;cursor:pointer;margin-left:2px;position:relative;left:-2px}::ng-deep .rating-info-tooltip .tooltip-inner{max-width:800px!important}p.first-row{padding:.5rem .5rem 0;color:#000;white-space:nowrap;text-align:left}p.second-row{padding:2px .5rem .5rem;color:#000;white-space:nowrap;text-align:left}::ng-deep .gt-total-row-tooltip{opacity:1!important}::ng-deep .gt-total-row-tooltip .tooltip-inner{color:#000;box-shadow:0 6px 10px #0000004d,0 2px 2px #0003;background-color:#fff;padding:4px!important;width:100%;border-radius:2px!important}::ng-deep .gt-total-row-tooltip .arrow:before{border-top-color:#fff!important}.info-label{margin-left:4px;color:#268bff;vertical-align:text-top}::ng-deep .hierarchy-tooltip .tooltip-inner{padding:4px!important}table.seller-hierarchy-table{table-layout:fixed;margin:.625rem .625rem .625rem .8125rem}table.seller-hierarchy-table tr th{font-family:Roboto;font-size:.75rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.67;letter-spacing:normal;color:#5e5e5e;white-space:nowrap;background:#ededed;box-shadow:none!important;border-top:1px solid #d4d4d4}table.seller-hierarchy-table tr th:first-of-type,table.seller-hierarchy-table tr td:first-of-type{border-left:1px solid #d4d4d4}table.seller-hierarchy-table tr th:last-of-type,table.seller-hierarchy-table tr td:last-of-type{border-right:1px solid #d4d4d4;width:7.875rem!important}table.seller-hierarchy-table tr th:nth-of-type(2){width:7.75rem!important}table.seller-hierarchy-table tr td{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;box-shadow:none!important;border-top:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4}table.seller-hierarchy-table tr td:nth-of-type(2),table.seller-hierarchy-table tr td:nth-of-type(3){padding-top:.25rem}table.seller-hierarchy-table tr td span{display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}\n"] }]
|
|
1759
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AnnaSortService }, { type: i1.AnnaDateTimeFormatService }, { type: i1.AnnaFilterService }, { type: i1.AnnaGenericTableService }]; }, propDecorators: { showSkeletonLoading: [{
|
|
1760
|
+
type: Input
|
|
1761
|
+
}], tableHeaders: [{
|
|
1762
|
+
type: Input
|
|
1763
|
+
}], tableData: [{
|
|
1764
|
+
type: Input
|
|
1765
|
+
}], clonedTableData: [{
|
|
1766
|
+
type: Input
|
|
1767
|
+
}], numberOfSkeletonRows: [{
|
|
1768
|
+
type: Input
|
|
1769
|
+
}], numberOfSkeletonColumns: [{
|
|
1770
|
+
type: Input
|
|
1771
|
+
}], gtGeneralConfig: [{
|
|
1772
|
+
type: Input
|
|
1773
|
+
}], totalRowInfo: [{
|
|
1774
|
+
type: Input
|
|
1775
|
+
}], gtDimension: [{
|
|
1776
|
+
type: Input
|
|
1777
|
+
}], tableClass: [{
|
|
1778
|
+
type: Input
|
|
1779
|
+
}], maximumRowsWhichCanBeRenderedWithoutScroll: [{
|
|
1780
|
+
type: Input
|
|
1781
|
+
}], toggleCheckbox: [{
|
|
1782
|
+
type: Output
|
|
1783
|
+
}], toggleRowCheckbox: [{
|
|
1784
|
+
type: Output
|
|
1785
|
+
}], toggleHeaderCheckbox: [{
|
|
1786
|
+
type: Output
|
|
1787
|
+
}], undoIconClicked: [{
|
|
1788
|
+
type: Output
|
|
1789
|
+
}], filterAppliedToTable: [{
|
|
1790
|
+
type: Output
|
|
1791
|
+
}], sortingAppliedToTable: [{
|
|
1792
|
+
type: Output
|
|
1793
|
+
}], rowClicked: [{
|
|
1794
|
+
type: Output
|
|
1795
|
+
}], radioButtonSelected: [{
|
|
1796
|
+
type: Output
|
|
1797
|
+
}], columnFilterOpened: [{
|
|
1798
|
+
type: Output
|
|
1799
|
+
}], columnFilterClosed: [{
|
|
1800
|
+
type: Output
|
|
1801
|
+
}], gtIconClicked: [{
|
|
1802
|
+
type: Output
|
|
1803
|
+
}], gtSVGIconClicked: [{
|
|
1804
|
+
type: Output
|
|
1805
|
+
}], gtTextActionClicked: [{
|
|
1806
|
+
type: Output
|
|
1807
|
+
}], gtViewDetailClicked: [{
|
|
1808
|
+
type: Output
|
|
1809
|
+
}], sortComponent: [{
|
|
1810
|
+
type: ViewChildren,
|
|
1811
|
+
args: [AnnaSortComponent]
|
|
1812
|
+
}] } });
|
|
1813
|
+
|
|
1814
|
+
// Angular import statements
|
|
1815
|
+
class AnnaGenericTableLibModule {
|
|
1816
|
+
}
|
|
1817
|
+
AnnaGenericTableLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1818
|
+
AnnaGenericTableLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, declarations: [AnnaNonEditableGenericTableComponent,
|
|
1819
|
+
AnnaSortComponent,
|
|
1820
|
+
AnnaTableVirtualScrollViewportComponent,
|
|
1821
|
+
AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
|
|
1822
|
+
AnnaVirtualTableDirective], imports: [CommonModule,
|
|
1823
|
+
NgbModule,
|
|
1824
|
+
AnnaDropdownLibModule,
|
|
1825
|
+
MatButtonToggleModule,
|
|
1826
|
+
FormsModule,
|
|
1827
|
+
NgxSliderModule,
|
|
1828
|
+
NgxSkeletonLoaderModule,
|
|
1829
|
+
MatTableModule,
|
|
1830
|
+
MatRadioModule,
|
|
1831
|
+
AnnaCoreSharedLibModule], exports: [AnnaNonEditableGenericTableComponent,
|
|
1832
|
+
AnnaSortComponent,
|
|
1833
|
+
AnnaTableVirtualScrollViewportComponent,
|
|
1834
|
+
AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
|
|
1835
|
+
AnnaVirtualTableDirective] });
|
|
1836
|
+
AnnaGenericTableLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, imports: [[
|
|
1837
|
+
CommonModule,
|
|
1838
|
+
NgbModule,
|
|
1839
|
+
AnnaDropdownLibModule,
|
|
1840
|
+
MatButtonToggleModule,
|
|
1841
|
+
FormsModule,
|
|
1842
|
+
NgxSliderModule,
|
|
1843
|
+
NgxSkeletonLoaderModule,
|
|
1844
|
+
MatTableModule,
|
|
1845
|
+
MatRadioModule,
|
|
1846
|
+
AnnaCoreSharedLibModule
|
|
1847
|
+
]] });
|
|
1848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, decorators: [{
|
|
1849
|
+
type: NgModule,
|
|
1850
|
+
args: [{
|
|
1851
|
+
declarations: [
|
|
1852
|
+
AnnaNonEditableGenericTableComponent,
|
|
1853
|
+
AnnaSortComponent,
|
|
1854
|
+
AnnaTableVirtualScrollViewportComponent,
|
|
1855
|
+
AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
|
|
1856
|
+
AnnaVirtualTableDirective,
|
|
1857
|
+
],
|
|
1858
|
+
imports: [
|
|
1859
|
+
CommonModule,
|
|
1860
|
+
NgbModule,
|
|
1861
|
+
AnnaDropdownLibModule,
|
|
1862
|
+
MatButtonToggleModule,
|
|
1863
|
+
FormsModule,
|
|
1864
|
+
NgxSliderModule,
|
|
1865
|
+
NgxSkeletonLoaderModule,
|
|
1866
|
+
MatTableModule,
|
|
1867
|
+
MatRadioModule,
|
|
1868
|
+
AnnaCoreSharedLibModule
|
|
1869
|
+
],
|
|
1870
|
+
exports: [
|
|
1871
|
+
AnnaNonEditableGenericTableComponent,
|
|
1872
|
+
AnnaSortComponent,
|
|
1873
|
+
AnnaTableVirtualScrollViewportComponent,
|
|
1874
|
+
AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
|
|
1875
|
+
AnnaVirtualTableDirective
|
|
1876
|
+
]
|
|
1877
|
+
}]
|
|
1878
|
+
}] });
|
|
1879
|
+
|
|
1880
|
+
//Modules
|
|
1881
|
+
|
|
1882
|
+
/**
|
|
1883
|
+
* Generated bundle index. Do not edit.
|
|
1884
|
+
*/
|
|
1885
|
+
|
|
1886
|
+
export { AnnaFixedRowSizeTableVirtualScrollStrategy, AnnaFixedRowSizeTableVirtualScrollStrategyDirective, AnnaGenericTableLibModule, AnnaNonEditableGenericTableComponent, AnnaSortComponent, AnnaTableVirtualScrollViewportComponent, AnnaVirtualTableDirective, fixedSizeVirtualScrollStrategyFactory };
|
|
1887
|
+
//# sourceMappingURL=annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map
|