@annalib/anna-core 2.7.4 → 3.1.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.
Files changed (151) hide show
  1. package/esm2020/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +69 -0
  2. package/esm2020/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +4 -4
  3. package/esm2020/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.mjs +4 -5
  4. package/esm2020/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +4 -4
  5. package/esm2020/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +4 -4
  6. package/esm2020/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +4 -4
  7. package/esm2020/lib/anna-core-shared-lib/index.mjs +2 -0
  8. package/esm2020/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +1 -1
  9. package/esm2020/lib/anna-core-shared-lib/public-api.mjs +29 -0
  10. package/esm2020/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +5 -1
  11. package/esm2020/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
  12. package/esm2020/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +4 -5
  13. package/esm2020/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +9 -11
  14. package/esm2020/lib/anna-dropdown-lib/index.mjs +2 -0
  15. package/esm2020/lib/anna-dropdown-lib/public-api.mjs +6 -0
  16. package/esm2020/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +111 -0
  17. package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +115 -62
  18. package/esm2020/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +6 -3
  19. package/esm2020/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +3 -3
  20. 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 +2 -2
  21. package/esm2020/lib/anna-generic-table-lib/index.mjs +2 -0
  22. package/esm2020/lib/anna-generic-table-lib/public-api.mjs +10 -0
  23. package/esm2020/public-api.mjs +4 -41
  24. package/esm2020/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +69 -0
  25. package/esm2020/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +5 -0
  26. package/esm2020/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
  27. package/esm2020/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.mjs +35 -0
  28. package/esm2020/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
  29. package/esm2020/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
  30. package/esm2020/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
  31. 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
  32. package/esm2020/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
  33. package/esm2020/src/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
  34. package/esm2020/src/lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive.mjs +27 -0
  35. package/esm2020/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
  36. package/esm2020/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
  37. package/esm2020/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
  38. package/esm2020/src/lib/anna-core-shared-lib/models/anna-sort.model.mjs +2 -0
  39. package/esm2020/src/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +30 -0
  40. package/esm2020/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
  41. package/esm2020/src/lib/anna-core-shared-lib/public-api.mjs +29 -0
  42. package/esm2020/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +184 -0
  43. package/esm2020/src/lib/anna-core-shared-lib/services/anna-filter.service.mjs +419 -0
  44. package/esm2020/src/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +48 -0
  45. package/esm2020/src/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
  46. package/esm2020/src/lib/anna-core-shared-lib/services/anna-sort.service.mjs +147 -0
  47. package/esm2020/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
  48. package/esm2020/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +5 -0
  49. package/esm2020/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +99 -0
  50. package/esm2020/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +360 -0
  51. package/esm2020/src/lib/anna-dropdown-lib/public-api.mjs +6 -0
  52. package/esm2020/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +111 -0
  53. package/esm2020/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +5 -0
  54. package/esm2020/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +1674 -0
  55. package/esm2020/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +70 -0
  56. package/esm2020/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
  57. 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
  58. package/esm2020/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
  59. package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
  60. package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
  61. package/esm2020/src/lib/anna-generic-table-lib/public-api.mjs +10 -0
  62. package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1204 -0
  63. package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
  64. package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +493 -0
  65. package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
  66. package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +2546 -0
  67. package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
  68. package/fesm2015/annalib-anna-core.mjs +3589 -3439
  69. package/fesm2015/annalib-anna-core.mjs.map +1 -1
  70. package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1204 -0
  71. package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
  72. package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +491 -0
  73. package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
  74. package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +2545 -0
  75. package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
  76. package/fesm2020/annalib-anna-core.mjs +2950 -2800
  77. package/fesm2020/annalib-anna-core.mjs.map +1 -1
  78. package/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +16 -0
  79. package/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.d.ts +1 -1
  80. package/lib/anna-core-shared-lib/index.d.ts +1 -0
  81. package/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts +2 -1
  82. package/lib/anna-core-shared-lib/public-api.d.ts +21 -0
  83. package/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
  84. package/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +1 -1
  85. package/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +1 -4
  86. package/lib/anna-dropdown-lib/index.d.ts +1 -0
  87. package/lib/anna-dropdown-lib/public-api.d.ts +3 -0
  88. package/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +23 -0
  89. package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +19 -13
  90. package/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +1 -2
  91. package/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +1 -1
  92. package/lib/anna-generic-table-lib/index.d.ts +1 -0
  93. package/lib/anna-generic-table-lib/public-api.d.ts +6 -0
  94. package/package.json +27 -2
  95. package/public-api.d.ts +3 -28
  96. package/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +16 -0
  97. package/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.d.ts +5 -0
  98. package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
  99. package/src/lib/anna-core-shared-lib/components/anna-icon-column/anna-icon-column.component.d.ts +16 -0
  100. package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
  101. package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
  102. package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
  103. 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
  104. package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
  105. package/src/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
  106. package/src/lib/anna-core-shared-lib/directives/show-ellipsis-text/show-ellipsis-text.directive.d.ts +9 -0
  107. package/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +12 -0
  108. package/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts +95 -0
  109. package/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts +72 -0
  110. package/src/lib/anna-core-shared-lib/models/anna-sort.model.d.ts +6 -0
  111. package/src/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +25 -0
  112. package/src/lib/anna-core-shared-lib/package.json +10 -0
  113. package/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
  114. package/src/lib/anna-core-shared-lib/public-api.d.ts +21 -0
  115. package/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
  116. package/src/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +73 -0
  117. package/src/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
  118. package/src/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
  119. package/src/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +16 -0
  120. package/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
  121. package/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.d.ts +5 -0
  122. package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +34 -0
  123. package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +67 -0
  124. package/src/lib/anna-dropdown-lib/package.json +10 -0
  125. package/src/lib/anna-dropdown-lib/public-api.d.ts +3 -0
  126. package/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +23 -0
  127. package/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.d.ts +5 -0
  128. package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +259 -0
  129. package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +16 -0
  130. package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
  131. 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
  132. package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts +1 -0
  133. package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
  134. package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts +1 -0
  135. package/src/lib/anna-generic-table-lib/package.json +10 -0
  136. package/src/lib/anna-generic-table-lib/public-api.d.ts +6 -0
  137. package/esm2020/lib/anna-core.module.mjs +0 -134
  138. package/lib/anna-core.module.d.ts +0 -30
  139. package/src/lib/anna-assets/images/bg-heads.png +0 -0
  140. package/src/lib/anna-common-scss/_animate.scss +0 -27
  141. package/src/lib/anna-common-scss/_colors.scss +0 -107
  142. package/src/lib/anna-common-scss/_dashboard-partials.scss +0 -104
  143. package/src/lib/anna-common-scss/_filters.scss +0 -596
  144. package/src/lib/anna-common-scss/_font.scss +0 -10
  145. package/src/lib/anna-common-scss/_fonts.scss +0 -86
  146. package/src/lib/anna-common-scss/_legend.scss +0 -11
  147. package/src/lib/anna-common-scss/_modal.scss +0 -37
  148. package/src/lib/anna-common-scss/_ng-select.scss +0 -176
  149. package/src/lib/anna-common-scss/_sort.scss +0 -30
  150. package/src/lib/anna-common-scss/_toggle.scss +0 -84
  151. package/src/lib/anna-common-scss/style.scss +0 -1
@@ -0,0 +1,2545 @@
1
+ import * as i11 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChildren, ViewEncapsulation, Optional, Inject, ViewChild, forwardRef, Directive, ContentChildren, NgModule } from '@angular/core';
5
+ import * as i13 from '@angular/forms';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i4 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 i2 from '@angular/material/table';
12
+ import { MatHeaderRowDef, MatTableModule } from '@angular/material/table';
13
+ import * as i12 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 i3 from 'ngx-skeleton-loader';
18
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
19
+ import * as i10 from 'ng-circle-progress';
20
+ import { NgCircleProgressModule } from 'ng-circle-progress';
21
+ import moment from 'moment';
22
+ import { cloneDeep, isEqual, uniq, sortBy, map } from 'lodash-es';
23
+ import * as i1 from '@annalib/anna-core/src/lib/anna-core-shared-lib';
24
+ import { radioButtonModel, TooltipModel, AnnaFilterService, AnnaCoreSharedLibModule } from '@annalib/anna-core/src/lib/anna-core-shared-lib';
25
+ import * as i2$1 from '@angular/cdk/scrolling';
26
+ import { CdkScrollable, VIRTUAL_SCROLL_STRATEGY, CdkVirtualScrollViewport, ScrollingModule } from '@angular/cdk/scrolling';
27
+ import * as i8 from '@annalib/anna-core/src/lib/anna-dropdown-lib';
28
+ import { AnnaDropdownLibModule } from '@annalib/anna-core/src/lib/anna-dropdown-lib';
29
+ import * as i1$1 from '@angular/cdk/bidi';
30
+ import { animationFrameScheduler, asapScheduler, Subject, Observable, Subscription, isObservable, of } from 'rxjs';
31
+ import { startWith, auditTime, takeUntil, distinctUntilChanged, pairwise, switchMap, shareReplay, map as map$1 } from 'rxjs/operators';
32
+ import { coerceNumberProperty } from '@angular/cdk/coercion';
33
+ import { isDataSource, ArrayDataSource } from '@angular/cdk/collections';
34
+ import * as i2$2 from '@angular/cdk/table';
35
+ import { _COALESCED_STYLE_SCHEDULER, STICKY_POSITIONING_LISTENER, CdkHeaderRowDef } from '@angular/cdk/table';
36
+
37
+ // Angular import statements
38
+ //sub-entries of anna lib import statement
39
+ //Add onChange push change detection
40
+ class AnnaSortComponent {
41
+ constructor(annaSortService) {
42
+ this.annaSortService = annaSortService;
43
+ this.sortOptionClicked = new EventEmitter();
44
+ this.sortOptions = [
45
+ {
46
+ sortType: 'ASC',
47
+ isOptionActive: false,
48
+ text: 'A to Z',
49
+ },
50
+ {
51
+ sortType: 'DESC',
52
+ isOptionActive: false,
53
+ text: 'Z to A',
54
+ },
55
+ {
56
+ sortType: 'DEFAULT',
57
+ isOptionActive: false,
58
+ text: 'DEFAULT',
59
+ },
60
+ ];
61
+ }
62
+ ngOnChanges(changes) {
63
+ console.log("sort component ngOnChanges");
64
+ console.log(this.sortObjectKey);
65
+ if (changes["sortObjectKey"] && changes["sortObjectKey"].currentValue) {
66
+ console.log("inside sort active func");
67
+ let sortType = this.annaSortService.columnSortState.get(this.sortObjectKey);
68
+ this.setSortType(sortType);
69
+ }
70
+ }
71
+ sortOptionChanged(index, sortType) {
72
+ this.sortOptions.forEach((item) => (item.isOptionActive = false));
73
+ this.sortOptions[index].isOptionActive = true;
74
+ this.sortOptionClicked.emit(sortType);
75
+ }
76
+ ngOnInit() {
77
+ console.log("sort component ngOnInit");
78
+ console.log(this.annaSortService.columnSortState);
79
+ this.annaSortService.updateSortTypeSubject.subscribe((item) => {
80
+ this.setSortType(item);
81
+ });
82
+ }
83
+ setSortType(option) {
84
+ this.sortOptions.forEach(item => item.isOptionActive = false);
85
+ let index = this.sortOptions.findIndex(item => item.sortType == option);
86
+ this.sortOptions[index].isOptionActive = true;
87
+ }
88
+ }
89
+ AnnaSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, deps: [{ token: i1.AnnaSortService }], target: i0.ɵɵFactoryTarget.Component });
90
+ AnnaSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: { sortObjectKey: "sortObjectKey" }, outputs: { sortOptionClicked: "sortOptionClicked" }, usesOnChanges: true, ngImport: i0, template: "<p class=\"sort-container\">\r\n <button\r\n class=\"sort-btn\"\r\n *ngFor=\"let option of sortOptions; let i = index\"\r\n (click)=\"sortOptionChanged(i, option.sortType)\"\r\n [ngClass]=\"{ active: option.isOptionActive }\"\r\n >\r\n {{option.text}}\r\n </button>\r\n</p>", styles: [".sort-btn{background:white;border:none;border-right:1px solid #1b88ff;text-decoration:underline;font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.07;letter-spacing:normal;color:#1b88ff;cursor:pointer;flex:1;text-align:center}.sort-btn:last-of-type{border-right:none}.sort-btn.active{color:#202b47;text-decoration:none}p.sort-container{margin-top:8px;padding-bottom:8px;border-bottom:1px solid #e6e6e6;margin-bottom:0;display:flex}\n"], directives: [{ type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, decorators: [{
92
+ type: Component,
93
+ args: [{ selector: 'anna-core-sort-lib', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p class=\"sort-container\">\r\n <button\r\n class=\"sort-btn\"\r\n *ngFor=\"let option of sortOptions; let i = index\"\r\n (click)=\"sortOptionChanged(i, option.sortType)\"\r\n [ngClass]=\"{ active: option.isOptionActive }\"\r\n >\r\n {{option.text}}\r\n </button>\r\n</p>", styles: [".sort-btn{background:white;border:none;border-right:1px solid #1b88ff;text-decoration:underline;font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.07;letter-spacing:normal;color:#1b88ff;cursor:pointer;flex:1;text-align:center}.sort-btn:last-of-type{border-right:none}.sort-btn.active{color:#202b47;text-decoration:none}p.sort-container{margin-top:8px;padding-bottom:8px;border-bottom:1px solid #e6e6e6;margin-bottom:0;display:flex}\n"] }]
94
+ }], ctorParameters: function () { return [{ type: i1.AnnaSortService }]; }, propDecorators: { sortObjectKey: [{
95
+ type: Input
96
+ }], sortOptionClicked: [{
97
+ type: Output
98
+ }] } });
99
+
100
+ // Angular import statements
101
+ class AnnaNonEditableGenericTableComponent {
102
+ constructor(cdRef, annaSortService, annaDateTimeFormatService, annaFilterService, annaGenericTableService) {
103
+ this.cdRef = cdRef;
104
+ this.annaSortService = annaSortService;
105
+ this.annaDateTimeFormatService = annaDateTimeFormatService;
106
+ this.annaFilterService = annaFilterService;
107
+ this.annaGenericTableService = annaGenericTableService;
108
+ this.maximumRowsWhichCanBeRenderedWithoutScroll = 5;
109
+ this.limit = 30;
110
+ this.includeBorderInTableHeight = true;
111
+ this.toggleCheckbox = new EventEmitter();
112
+ this.toggleRowCheckbox = new EventEmitter();
113
+ this.toggleHeaderCheckbox = new EventEmitter();
114
+ this.undoIconClicked = new EventEmitter();
115
+ this.filterAppliedToTable = new EventEmitter();
116
+ this.sortingAppliedToTable = new EventEmitter();
117
+ this.rowClicked = new EventEmitter();
118
+ this.radioButtonSelected = new EventEmitter();
119
+ this.columnFilterOpened = new EventEmitter();
120
+ this.columnFilterClosed = new EventEmitter();
121
+ this.gtIconClicked = new EventEmitter();
122
+ this.gtSVGIconClicked = new EventEmitter();
123
+ this.gtTextActionClicked = new EventEmitter();
124
+ this.gtViewDetailClicked = new EventEmitter();
125
+ this.downloadSpotDetails = new EventEmitter();
126
+ this.noDataWidth = "55%";
127
+ this.disableClearAllBtn = true;
128
+ this.disableColumnClearAllBtn = true;
129
+ this.allSelected = 0;
130
+ this.options = {
131
+ floor: 0,
132
+ ceil: 0,
133
+ step: 0.1
134
+ };
135
+ this.tableColumns = [];
136
+ this.totalRowColumns = null;
137
+ this.isScrolledLeft = false;
138
+ this.rowBorderWidth = 2;
139
+ this.showSortComponent = false;
140
+ this.showFilterComponent = false;
141
+ this.tempSortOrder = null;
142
+ this.calendarSelection = { fromDate: null, toDate: null };
143
+ this.showNoDataToDisplay = false;
144
+ this.marginTop = "";
145
+ this.start = 0;
146
+ this.end = this.limit + this.start;
147
+ this.setTooltipRadioNames();
148
+ }
149
+ ngAfterViewChecked() {
150
+ if (this.gtGeneralConfig.component && this.gtGeneralConfig.component.includes("ORDER_LISTING") || this.gtGeneralConfig.component == "DRRLISTING") {
151
+ this.setMarginLeftForFilterIcon();
152
+ }
153
+ }
154
+ ngOnInit() {
155
+ }
156
+ ngOnChanges(changes) {
157
+ if (this.showSkeletonLoading) {
158
+ this.tableData = this.numberOfSkeletonColumns;
159
+ this.renderedData = this.numberOfSkeletonColumns;
160
+ this.annaFilterService.initialValueMap = new Map();
161
+ }
162
+ else {
163
+ this.setInitialRowsForTable();
164
+ this.disableEnableEachColumnTooltipIcon();
165
+ this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
166
+ if (this.tableData && this.tableData.length == 0) {
167
+ this.tableData = Array(2).fill(0);
168
+ this.renderedData = cloneDeep(this.tableData);
169
+ this.marginTop = (-this.gtDimension.rowHeight - (this.gtDimension.rowHeight / 2)) + 'px';
170
+ this.showNoDataToDisplay = true;
171
+ }
172
+ else {
173
+ this.showNoDataToDisplay = false;
174
+ }
175
+ this.showSkeletonLoading = false;
176
+ }
177
+ //setting table column here as well because while showing skeleton loader, we should show table headers.
178
+ if (changes['tableHeaders'] && !isEqual(changes['tableHeaders'].currentValue, changes['tableHeaders'].previousValue)) {
179
+ this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
180
+ this.annaSortService.columnSortState = new Map();
181
+ this.setColumnSortStateMap();
182
+ this.setActiveStateObject();
183
+ }
184
+ if (changes['totalRowInfo'] && changes['totalRowInfo'].currentValue) {
185
+ this.totalRowColumns = this.totalRowInfo.map(x => x.colName);
186
+ }
187
+ this.cdRef.detectChanges();
188
+ }
189
+ trackByFn(index) {
190
+ return index;
191
+ }
192
+ setTooltipRadioNames() {
193
+ this.tooltipRadioTextMap = new Map();
194
+ this.tooltipRadioTextMap.set("StartTimeForFilter", "Start Time");
195
+ this.tooltipRadioTextMap.set("EndTimeForFilter", "End Time");
196
+ this.tooltipRadioTextMap.set("start_time_for_filter", "Start Time");
197
+ this.tooltipRadioTextMap.set("end_time_for_filter", "End Time");
198
+ this.tooltipRadioTextMap.set("primaryAEName", "Primary AE");
199
+ this.tooltipRadioTextMap.set("region", "Region");
200
+ this.tooltipRadioTextMap.set("agencyName", "Agency");
201
+ this.tooltipRadioTextMap.set("location", "Location");
202
+ this.tooltipRadioTextMap.set("advertiserName", "Advertiser");
203
+ this.tooltipRadioTextMap.set("productCode", "Product Category");
204
+ this.tooltipRadioTextMap.set("flightStartDate", "Start Date");
205
+ this.tooltipRadioTextMap.set("flightEndDate", "End Date");
206
+ this.tooltipRadioTextMap.set("orderIdAndRevNumber", "STN Order#-Rev#");
207
+ this.tooltipRadioTextMap.set("alternateOrderId", "Alt/Rep Order #");
208
+ this.tooltipRadioTextMap.set("grp", "GRP");
209
+ this.tooltipRadioTextMap.set("cpp", "CPP");
210
+ this.tooltipRadioTextMap.set("imps", "IMPS");
211
+ this.tooltipRadioTextMap.set("cpm", "CPM");
212
+ this.tooltipRadioTextMap.set("offeredMGs", "Offered MG");
213
+ this.tooltipRadioTextMap.set("outstandingPE", "O/S PE");
214
+ this.tooltipRadioTextMap.set("offeredADUs", "Offered ADUs");
215
+ this.tooltipRadioTextMap.set("udDeficitValue", "O/S Aud Delta");
216
+ this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
217
+ this.tooltipRadioTextMap.set("bookedValue", "Booked");
218
+ this.tooltipRadioTextMap.set("bookedSpots", "Spots");
219
+ this.tooltipRadioTextMap.set("userChanges", "Other changes");
220
+ this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
221
+ this.tooltipRadioTextMap.set("program", "Program");
222
+ this.tooltipRadioTextMap.set("agency", "Agency");
223
+ this.tooltipRadioTextMap.set("advertiser", "Advertiser");
224
+ this.tooltipRadioTextMap.set("startDate", "Start Date");
225
+ this.tooltipRadioTextMap.set("endDate", "End Date");
226
+ this.tooltipRadioTextMap.set("rcvPreempt", "$ Madegood PEs");
227
+ this.tooltipRadioTextMap.set("osPreempt", "$ O/S PEs");
228
+ this.tooltipRadioTextMap.set("rcvUnderDly", "Recovered UD");
229
+ this.tooltipRadioTextMap.set("osUnderDly", "O/s Under Dly");
230
+ this.tooltipRadioTextMap.set("primaryAe", "Primary AE");
231
+ this.tooltipRadioTextMap.set("region", "Region");
232
+ this.tooltipRadioTextMap.set("revCode1", "Rev code 1");
233
+ this.tooltipRadioTextMap.set("orderNoRevNo", "STN Order#-Rev#");
234
+ this.tooltipRadioTextMap.set("revCode2", "Rev code 2");
235
+ this.tooltipRadioTextMap.set("revCode3", "Rev code 3");
236
+ this.tooltipRadioTextMap.set("booked", "$ Booked");
237
+ this.tooltipRadioTextMap.set("spots", "Spots");
238
+ this.tooltipRadioTextMap.set("postedAudPercent", "Posted %");
239
+ this.tooltipRadioTextMap.set("revision", "Revision");
240
+ this.tooltipRadioTextMap.set("buyerOrderId", "ALT/REP Order#");
241
+ this.tooltipRadioTextMap.set("demo", "Demo");
242
+ this.tooltipRadioTextMap.set("postedAdu", "$ Posted ADUs");
243
+ this.tooltipRadioTextMap.set("scheduledAdu", "$ Scheduled ADUs");
244
+ this.tooltipRadioTextMap.set("audienceDeficit", "$ O/S Audience");
245
+ this.tooltipRadioTextMap.set("postedAudPercent", "Posted Audience %");
246
+ this.tooltipRadioTextMap.set("potentialUnitsValue", "POT Units");
247
+ this.tooltipRadioTextMap.set("bookedUnitsValue", "Booked Units");
248
+ this.tooltipRadioTextMap.set("bookedAmountWithZeroRatingValue", "Total $ Booked");
249
+ this.tooltipRadioTextMap.set("bookedAmountPercentageWithZeroRatingValue", "% Against All Demos");
250
+ this.tooltipRadioTextMap.set("bookedAmountWithoutZeroRatingValue", "$Booked With Imps(’000)");
251
+ this.tooltipRadioTextMap.set("bookedAmountPercentageWithoutZeroRatingValue", "% Against All Demos");
252
+ this.tooltipRadioTextMap.set("totalBookedAmountValue", "Total $Booked");
253
+ this.tooltipRadioTextMap.set("averageUnitRateValue", "AUR");
254
+ this.tooltipRadioTextMap.set("totalBookedAmountWithRatingValue", "$Booked With Rating");
255
+ this.tooltipRadioTextMap.set("averageUnitRateWithRatingValue", "AUR With Rating");
256
+ this.tooltipRadioTextMap.set("totalBookedAmountWithImpressionValue", "$Booked With IMPS");
257
+ this.tooltipRadioTextMap.set("averageUnitRateWithImpressionValue", "AUR With IMPS");
258
+ this.tooltipRadioTextMap.set("bookedUnitsWithRatingValue", "Booked Units With Rating");
259
+ this.tooltipRadioTextMap.set("postedUnitsWithRatingValue", "Posted Units With Rating");
260
+ this.tooltipRadioTextMap.set("bookedUnitsWithImpressionValue", "Booked Units With IMPS");
261
+ this.tooltipRadioTextMap.set("postedUnitsWithImpressionValue", "Posted Units With IMPS");
262
+ this.tooltipRadioTextMap.set("bookedRatings", "Booked Rating");
263
+ this.tooltipRadioTextMap.set("postedRatings", "Posted Rating");
264
+ this.tooltipRadioTextMap.set("bookedImpressions", "Booked IMPS");
265
+ this.tooltipRadioTextMap.set("postedImpressions", "Posted IMPS");
266
+ this.tooltipRadioTextMap.set("bookedAverageRating", "Booked AVG Rating");
267
+ this.tooltipRadioTextMap.set("postedAverageRating", "Posted AVG Rating");
268
+ this.tooltipRadioTextMap.set("bookedAverageImpression", "Booked AVG IMPS");
269
+ this.tooltipRadioTextMap.set("postedAverageImpression", "Posted AVG IMPS");
270
+ this.tooltipRadioTextMap.set("bookedCppValue", "Booked CPP");
271
+ this.tooltipRadioTextMap.set("bookedEffectiveCppValue", "Effective CPP");
272
+ this.tooltipRadioTextMap.set("bookedCpmValue", "Booked CPM");
273
+ this.tooltipRadioTextMap.set("bookedEffectiveCpmValue", "Effective CPM");
274
+ this.tooltipRadioTextMap.set("orderSource", "Order Source");
275
+ this.tooltipRadioTextMap.set("orderCategory", "Category");
276
+ this.tooltipRadioTextMap.set("cashOrTrade", "C/T");
277
+ }
278
+ generateTableDataWrapper() {
279
+ this.showSkeletonLoading = true;
280
+ this.tableDataWrapper = [];
281
+ let rowObject;
282
+ let columnName;
283
+ let columnObject;
284
+ let columnObjectKey;
285
+ let keysUsedForTableDisplay;
286
+ let keysUsedForColumn;
287
+ let additionalInfoObject;
288
+ let additionalKeys;
289
+ this.tableData.forEach((obj) => {
290
+ rowObject = {};
291
+ keysUsedForTableDisplay = [];
292
+ for (var colNum in this.tableHeaders) {
293
+ columnObject = {};
294
+ if (!this.tableHeaders[colNum].visible) {
295
+ continue;
296
+ }
297
+ columnName = "";
298
+ keysUsedForColumn = [];
299
+ this.tableHeaders[colNum].headerInfo.forEach((header) => {
300
+ if (header.typeOfBodyData === "STRING") {
301
+ columnObjectKey = header.objectKey;
302
+ columnObject[columnObjectKey] = obj[columnObjectKey];
303
+ keysUsedForTableDisplay.push(columnObjectKey);
304
+ keysUsedForColumn.push(columnObjectKey);
305
+ }
306
+ else if (header.typeOfBodyData === "ICON") {
307
+ columnObjectKey = header.typeOfBodyData;
308
+ columnObject[columnObjectKey] = obj[header.objectKey];
309
+ keysUsedForColumn.push(header.objectKey);
310
+ }
311
+ else if (header.typeOfBodyData === "CHECKBOX") {
312
+ columnObjectKey = header.typeOfBodyData;
313
+ columnObject[columnObjectKey] = obj[header.objectKey];
314
+ keysUsedForColumn.push(header.objectKey);
315
+ }
316
+ });
317
+ for (var i = 0; i < keysUsedForColumn.length; i++) {
318
+ columnName += keysUsedForColumn[i];
319
+ if (i !== keysUsedForColumn.length - 1) {
320
+ columnName += ',';
321
+ }
322
+ }
323
+ rowObject[columnName] = columnObject;
324
+ }
325
+ additionalInfoObject = {};
326
+ additionalKeys = Object.keys(obj).filter(key => !keysUsedForTableDisplay.includes(key));
327
+ additionalKeys.forEach(key => {
328
+ additionalInfoObject[key] = obj[key];
329
+ });
330
+ rowObject.AdditionalInfo = additionalInfoObject;
331
+ this.tableDataWrapper.push(rowObject);
332
+ });
333
+ this.tableData = this.tableDataWrapper;
334
+ this.showSkeletonLoading = false;
335
+ }
336
+ selectOrUnselectCheckbox(rowData, columnKeys, isCheckboxSelected) {
337
+ this.toggleCheckbox.emit({ rowData, columnKeys, isCheckboxSelected });
338
+ }
339
+ selectUnselectAllRows() {
340
+ this.toggleHeaderCheckbox.emit();
341
+ }
342
+ selectUnselectRow(rowData) {
343
+ this.toggleRowCheckbox.emit(rowData);
344
+ }
345
+ undoCreditedSpot(data) {
346
+ this.undoIconClicked.emit({ data, mgOrCredit: "Credit" });
347
+ }
348
+ undoMgSpot(data) {
349
+ this.undoIconClicked.emit({ data, mgOrCredit: "MakeGood" });
350
+ }
351
+ //Sort and Filter Logic begins!
352
+ closeTooltip() {
353
+ if (this.tooltip && this.tooltip.isOpen()) {
354
+ this.tooltip.close();
355
+ }
356
+ this.tooltip = null;
357
+ this.disableCheckboxApply = false;
358
+ if (!this.bindValueFuncCalled) {
359
+ this.columnFilterClosed.emit();
360
+ }
361
+ }
362
+ isTooltipActive(header) {
363
+ return this.annaFilterService.isTooltipActive(header, this.annaSortService.columnSortState);
364
+ }
365
+ bindTheValueToToolTip(tooltip, header) {
366
+ this.bindValueFuncCalled = true;
367
+ let containerToScroll;
368
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "DRRLISTING") {
369
+ containerToScroll = document.getElementsByClassName("scrollable-container")[0];
370
+ var mediaQuery = window.matchMedia("(max-width: 1366px)");
371
+ if (mediaQuery.matches) {
372
+ containerToScroll.scroll(0, this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip);
373
+ }
374
+ }
375
+ // if same tooltip opened close it
376
+ if (tooltip == this.tooltip) {
377
+ this.bindValueFuncCalled = false;
378
+ this.closeTooltip();
379
+ }
380
+ else {
381
+ let enabledHeaders = [];
382
+ this.checkIfUniqueValuePresentForTheHeader(header, enabledHeaders);
383
+ this.openTooltip(tooltip, enabledHeaders, header);
384
+ if (window.innerWidth < 1500 && window.innerHeight < 768 && !this.annaFilterService.sliderSet.has(header.filterSortObjectKeys[0])) {
385
+ this.columnFilterOpened.emit();
386
+ }
387
+ this.showFilterTooltipTabs = header.filterSortObjectKeys.length > 1;
388
+ let activeTab = this.filterTabObjects[0];
389
+ this.populateTooltipDataBasedOnSelectedRadio(activeTab);
390
+ this.bindValueFuncCalled = false;
391
+ }
392
+ }
393
+ checkIfUniqueValuePresentForTheHeader(header, enabledHeaders) {
394
+ header.filterSortObjectKeys.forEach((item) => {
395
+ if (item == "period") {
396
+ let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
397
+ let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
398
+ if (uniqStartDate.length > 1 || uniqEndDate.length > 1 || this.isTooltipActive([item])) {
399
+ enabledHeaders.push(item);
400
+ }
401
+ }
402
+ else if (uniq(this.tableData.map((u) => u[item])).length > 1 || this.isTooltipActive([item])) {
403
+ enabledHeaders.push(item);
404
+ }
405
+ });
406
+ }
407
+ openTooltip(tooltip, header, columnHeader) {
408
+ this.closeTooltip();
409
+ this.tooltip = tooltip;
410
+ this.tooltip.open();
411
+ //convert key into the header
412
+ this.filterTabObjects = header.map((key, index) => {
413
+ let value = this.tooltipRadioTextMap.has(key)
414
+ ? this.tooltipRadioTextMap.get(key)
415
+ : key; //change to display name
416
+ return new radioButtonModel(key, value, columnHeader.isSortRequired[index], columnHeader.isFilterRequired[index]);
417
+ });
418
+ }
419
+ clearColumnFilter() {
420
+ this.annaFilterService.clearColumnFilter();
421
+ this.closeTooltip();
422
+ this.tableData = cloneDeep(this.annaFilterService.filterData(this.clonedTableData, ""));
423
+ this.annaSortService.noSortingAppliedData = this.tableData;
424
+ this.checkIfSortingIsApplied();
425
+ this.filterAppliedToTable.emit(this.tableData);
426
+ this.disableEnableEachColumnTooltipIcon();
427
+ this.annaFilterService.updateStateOfTheCurrentFilterTab(this.annaSortService.columnSortState);
428
+ }
429
+ populateTooltipDataBasedOnSelectedRadio(activeTab) {
430
+ let header = activeTab.key;
431
+ this.selectedLabel = activeTab.label;
432
+ this.showSortComponent = false;
433
+ this.showFilterComponent = false;
434
+ this.searchItem = null;
435
+ this.showSortComponent = activeTab.isSortRequired;
436
+ this.showFilterComponent = activeTab.isFilterRequired;
437
+ this.tempSortOrder = null;
438
+ this.isFilterChanged = false;
439
+ this.isSortChanged = false;
440
+ this.annaFilterService.selectedRadio = header;
441
+ this.disableActiveFilterClearButton();
442
+ this.createFilterTooltipData(header);
443
+ }
444
+ createFilterTooltipData(header) {
445
+ if (this.showFilterComponent) {
446
+ this.disableSliderApplyButton = this.disableCheckboxApply = true;
447
+ this.disableCalendarApplyBtn = this.disableTimeFilterApplyBtn = true;
448
+ if (this.annaFilterService.calendarSet.has(header)) {
449
+ this.getCalendarData();
450
+ }
451
+ else if (this.annaFilterService.sliderSet.has(header)) {
452
+ this.getSliderData(header);
453
+ }
454
+ else if (this.annaFilterService.timeSet.has(header)) {
455
+ this.getTimeFilterData(header);
456
+ }
457
+ else {
458
+ this.getCheckboxData(header);
459
+ }
460
+ }
461
+ else if (this.showSortComponent) {
462
+ this.disableSliderApplyButton = this.disableCheckboxApply = true;
463
+ this.disableCalendarApplyBtn = this.disableTimeFilterApplyBtn = true;
464
+ }
465
+ }
466
+ disableActiveFilterClearButton() {
467
+ let selectedFilterSet = new Set(this.annaFilterService.appliedFiltersArray);
468
+ let isSortPresent = (this.annaSortService.columnSortState.size > 0 && this.annaSortService.columnSortState.get(this.annaFilterService.selectedRadio) != "DEFAULT");
469
+ this.disableColumnClearAllBtn = selectedFilterSet.has(this.annaFilterService.selectedRadio) || isSortPresent ? false : true;
470
+ }
471
+ getSliderData(header) {
472
+ this.createOptionsForSlider(header);
473
+ this.setSelectedRangeForSlider(header);
474
+ }
475
+ createOptionsForSlider(header) {
476
+ let translateFunc;
477
+ this.incorrectSliderInput = false;
478
+ this.sliderEnteredMaxValue = this.sliderEnteredMinValue = null;
479
+ this.showSliderMinValueError = this.showSliderMaxValueError = this.isMinTextBoxEmpty = this.isMaxTextBoxEmpty = false;
480
+ if (this.annaFilterService.sliderCurrencySet.has(header)) {
481
+ translateFunc = "currency";
482
+ }
483
+ else if (header == "postedAudPercent") {
484
+ translateFunc = "percent";
485
+ }
486
+ else {
487
+ translateFunc = "normal";
488
+ }
489
+ let optionsData = this.annaFilterService.getFilterOptionsData(this.tableData, this.clonedTableData);
490
+ let minValue = this.annaFilterService.returnMaxAndMinValue(optionsData, header, true);
491
+ let maxValue = this.annaFilterService.returnMaxAndMinValue(optionsData, header, false);
492
+ let obj = this.annaFilterService.setOptionValues(minValue, maxValue);
493
+ if (translateFunc === "normal") {
494
+ obj.translate = this.annaFilterService.normalTranslateFunction;
495
+ }
496
+ else if (translateFunc === "percent") {
497
+ obj.translate = this.annaFilterService.percentTranslateFunction;
498
+ }
499
+ else if (translateFunc === "currency") {
500
+ obj.translate = this.annaFilterService.currencyTranslateFunction;
501
+ }
502
+ this.options = obj;
503
+ this.options.step = 1;
504
+ this.sliderFilterTextBoxStep = "1";
505
+ if (header !== "WeekNumber") {
506
+ this.options.step = 0.1;
507
+ this.sliderFilterTextBoxStep = "0.1";
508
+ }
509
+ }
510
+ setSelectedRangeForSlider(header) {
511
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
512
+ let selectedObj = this.annaFilterService.tooltipSelectedMap.get(header);
513
+ this.sliderMinValue = selectedObj.min < this.options.floor ? this.options.floor : selectedObj.min;
514
+ this.sliderMaxValue = selectedObj.max < this.options.ceil ? selectedObj.max : this.options.ceil;
515
+ this.sliderEnteredMinValue = this.sliderMinValue;
516
+ this.sliderEnteredMaxValue = this.sliderMaxValue;
517
+ }
518
+ else {
519
+ this.sliderMinValue = this.options.floor;
520
+ this.sliderMaxValue = this.options.ceil;
521
+ }
522
+ this.sliderEnteredMinValue = this.sliderMinValue;
523
+ this.sliderEnteredMaxValue = this.sliderMaxValue;
524
+ }
525
+ getCheckboxData(header) {
526
+ let tooltipOptions = this.createListForCheckboxFilter(header);
527
+ let selectedItems = sortBy(tooltipOptions.filter(item => item.isSelected), "label");
528
+ let unselectedItems = sortBy(tooltipOptions.filter(item => !item.isSelected), "label");
529
+ this.clonedTooltipOptions = [...selectedItems, ...unselectedItems];
530
+ this.tooltipOptions = cloneDeep(this.clonedTooltipOptions);
531
+ let margin = 5;
532
+ let dataLength = this.tooltipOptions.length;
533
+ this.heightOfCheckboxTooltipFilter = dataLength > 6 ? 200 : ((26.03 * dataLength) + (margin * dataLength) + margin);
534
+ this.disableSelectAll = unselectedItems.length == 0;
535
+ this.disableClearAll = selectedItems.length == 0;
536
+ this.selectedCheckboxOptionsCount = selectedItems.length;
537
+ }
538
+ createListForCheckboxFilter(header) {
539
+ let optionData = this.annaFilterService.getFilterOptionsData(this.tableData, this.clonedTableData);
540
+ let uniqOptionData = uniq(optionData.map(item => item[header]));
541
+ let tooltipOptions = uniqOptionData.map((item, index) => new TooltipModel(item, index + 1));
542
+ this.selectUnselectListCheckbox(tooltipOptions, header);
543
+ let index = tooltipOptions.findIndex(item => item.value == null);
544
+ if (index != -1) {
545
+ tooltipOptions[index].label = "(Blank)";
546
+ }
547
+ return tooltipOptions;
548
+ }
549
+ selectUnselectListCheckbox(tooltipOptions, header) {
550
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
551
+ let selectedValueSet = new Set(this.annaFilterService.tooltipSelectedMap.get(header));
552
+ tooltipOptions.forEach(item => item.isSelected = selectedValueSet.has(item.value) ? true : false);
553
+ }
554
+ else {
555
+ tooltipOptions.forEach(item => item.isSelected = true);
556
+ }
557
+ }
558
+ getCalendarData() {
559
+ const parsingFormat = "MM/DD/YYYY";
560
+ let minMaxDate = this.createRangeForTheDateFilter();
561
+ this.selectRangeForTheDateFilter(minMaxDate, parsingFormat);
562
+ }
563
+ createRangeForTheDateFilter() {
564
+ let optionData = this.annaFilterService.getFilterOptionsData(this.tableData, this.clonedTableData);
565
+ let minMaxDate;
566
+ //When you want to use startDate and endDate combined as single column then use Period.
567
+ if (this.annaFilterService.selectedRadio == "period") {
568
+ minMaxDate = this.createStartEndDateRange(optionData);
569
+ }
570
+ else {
571
+ minMaxDate = this.annaFilterService.returnMinAndMaxDate(optionData, this.annaFilterService.selectedRadio);
572
+ }
573
+ return minMaxDate;
574
+ }
575
+ createStartEndDateRange(optionData) {
576
+ let minStartDate = this.annaFilterService.returnMinAndMaxDate(optionData, "startDate");
577
+ let maxEndDate = this.annaFilterService.returnMinAndMaxDate(optionData, "endDate");
578
+ return [minStartDate[0], maxEndDate[1]];
579
+ }
580
+ selectRangeForTheDateFilter(minMaxDate, parsingFormat) {
581
+ this.calendarMinEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxDate[0], parsingFormat);
582
+ this.calendarMaxEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxDate[1], parsingFormat);
583
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
584
+ let selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
585
+ if (selectedDateObj.fromDate.isAfter(minMaxDate[0])) {
586
+ this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.fromDate, parsingFormat);
587
+ }
588
+ else {
589
+ this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxDate[0], parsingFormat);
590
+ }
591
+ if (selectedDateObj.toDate.isAfter(minMaxDate[1])) {
592
+ this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxDate[1], parsingFormat);
593
+ }
594
+ else {
595
+ this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.toDate, parsingFormat);
596
+ }
597
+ }
598
+ else {
599
+ this.selectedMinDate = cloneDeep(this.calendarMinEnabledDate);
600
+ this.selectedMaxDate = cloneDeep(this.calendarMaxEnabledDate);
601
+ }
602
+ this.calendarSelection.fromDate = cloneDeep(this.selectedMinDate);
603
+ this.calendarSelection.toDate = cloneDeep(this.selectedMaxDate);
604
+ }
605
+ getTimeFilterData(header) {
606
+ this.startTimeHourErr = this.startTimeMinErr = this.endTimeHourErr = this.endTimeMinErr = false;
607
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
608
+ this.selectedFromTime = this.annaFilterService.tooltipSelectedMap.get(header).fromTime;
609
+ this.selectedToTime = this.annaFilterService.tooltipSelectedMap.get(header).toTime;
610
+ }
611
+ else {
612
+ this.setInitialValueMapForTimeFilter(header);
613
+ this.selectedFromTime = this.annaFilterService.initialValueMap.get(header).fromTime;
614
+ this.selectedToTime = this.annaFilterService.initialValueMap.get(header).toTime;
615
+ }
616
+ if (this.selectedFromTime != undefined || this.selectedToTime != undefined) {
617
+ this.selectedFromTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedFromTime, true);
618
+ this.selectedToTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedToTime, true);
619
+ this.clonedSelectedFromTime = cloneDeep(this.selectedFromTime);
620
+ this.clonedSelectedToTime = cloneDeep(this.selectedToTime);
621
+ }
622
+ else {
623
+ this.selectedFromTime = ["-", "-", "-"];
624
+ this.selectedToTime = ["-", "-", "-"];
625
+ }
626
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
627
+ this.setTimeFilterDataForComponentsOtherThanRatingsPage(header);
628
+ }
629
+ else if (this.gtGeneralConfig.component === "RATING") {
630
+ this.setTimeFilterDataForRatingPageComponent(header);
631
+ }
632
+ }
633
+ //Need to change this method
634
+ setTimeFilterDataForComponentsOtherThanRatingsPage(header) {
635
+ this.showMultiTimeCheckbox = false;
636
+ this.showZeroTimeCheckbox = false;
637
+ this.showEnterTimeCheckbox = false;
638
+ this.multiTimeCheckboxChecked = false;
639
+ this.zeroTimeCheckboxChecked = false;
640
+ this.enterTimeCheckboxChecked = false;
641
+ let optionsData = this.annaFilterService.getFilterOptionsData(this.tableData, this.clonedTableData);
642
+ let selectedObj;
643
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
644
+ selectedObj = this.annaFilterService.tooltipSelectedMap.get(header);
645
+ }
646
+ else {
647
+ selectedObj = this.annaFilterService.initialValueMap.get(header);
648
+ }
649
+ if (optionsData.findIndex(obj => obj[header] == "0") != -1) {
650
+ this.showZeroTimeCheckbox = true;
651
+ this.zeroTimeCheckboxChecked = selectedObj.includeZeroTime;
652
+ }
653
+ if (optionsData.findIndex(obj => obj[header] == "<multi>") != -1) {
654
+ this.showMultiTimeCheckbox = true;
655
+ this.multiTimeCheckboxChecked = selectedObj.includeMulti;
656
+ }
657
+ if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
658
+ this.showEnterTimeCheckbox = true;
659
+ }
660
+ if (optionsData.findIndex(obj => obj[header] != "<multi>" && obj[header] != "0") != -1) {
661
+ this.enterTimeCheckboxChecked = selectedObj.includeTimeRange;
662
+ }
663
+ }
664
+ setTimeFilterDataForRatingPageComponent(header) {
665
+ this.showMultiTimeCheckbox = false;
666
+ this.showZeroTimeCheckbox = false;
667
+ this.showEnterTimeCheckbox = false;
668
+ this.multiTimeCheckboxChecked = false;
669
+ this.zeroTimeCheckboxChecked = false;
670
+ this.enterTimeCheckboxChecked = false;
671
+ let optionsData = this.annaFilterService.getFilterOptionsData(this.tableData, this.clonedTableData);
672
+ let selectedObj;
673
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
674
+ selectedObj = this.annaFilterService.tooltipSelectedMap.get(header);
675
+ }
676
+ else {
677
+ selectedObj = this.annaFilterService.initialValueMap.get(header);
678
+ }
679
+ if (optionsData.findIndex(obj => obj[header][0] == "0") != -1) {
680
+ this.showZeroTimeCheckbox = true;
681
+ this.zeroTimeCheckboxChecked = selectedObj.includeZeroTime;
682
+ }
683
+ if (optionsData.findIndex(obj => obj[header][0] == "<multi>") != -1) {
684
+ this.showMultiTimeCheckbox = true;
685
+ this.multiTimeCheckboxChecked = selectedObj.includeMulti;
686
+ }
687
+ if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
688
+ this.showEnterTimeCheckbox = true;
689
+ }
690
+ if (optionsData.findIndex(obj => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1) {
691
+ this.enterTimeCheckboxChecked = selectedObj.includeTimeRange;
692
+ }
693
+ }
694
+ selectOrUnselectMultiTimeCheckbox() {
695
+ this.multiTimeCheckboxChecked = !this.multiTimeCheckboxChecked;
696
+ this.disableTimeFilterApplyButton();
697
+ }
698
+ selectOrUnselectZeroTimeCheckbox() {
699
+ this.zeroTimeCheckboxChecked = !this.zeroTimeCheckboxChecked;
700
+ this.disableTimeFilterApplyButton();
701
+ }
702
+ selectOrUnselectEnterTimeCheckbox() {
703
+ this.enterTimeCheckboxChecked = !this.enterTimeCheckboxChecked;
704
+ this.disableTimeFilterApplyButton();
705
+ }
706
+ selectUnselectCheckbox(data) {
707
+ data.isSelected = !data.isSelected;
708
+ let index = this.clonedTooltipOptions.findIndex(item => item.id == data.id);
709
+ this.clonedTooltipOptions[index].isSelected = data.isSelected;
710
+ let selectedItems = this.tooltipOptions.filter(item => item.isSelected);
711
+ let unselectedItems = this.tooltipOptions.filter(item => !item.isSelected);
712
+ this.disableClearAll = selectedItems.length == 0;
713
+ this.disableSelectAll = unselectedItems.length == 0;
714
+ this.selectedCheckboxOptionsCount = selectedItems.length;
715
+ this.disableCheckboxFilterApplyButton();
716
+ }
717
+ minValueChanged(val) {
718
+ if (val || val == '0') {
719
+ this.sliderEnteredMinValue = parseInt(val);
720
+ this.isMinTextBoxEmpty = false;
721
+ if (this.isMaxTextBoxEmpty) {
722
+ if (this.sliderEnteredMinValue > this.options.ceil) {
723
+ this.showSliderMinValueError = true;
724
+ this.disableSliderApplyButton = true;
725
+ this.incorrectSliderInput = true;
726
+ }
727
+ else {
728
+ this.showSliderMinValueError = false;
729
+ this.showSliderMaxValueError = false;
730
+ this.disableSliderApplyButton = false;
731
+ this.incorrectSliderInput = false;
732
+ }
733
+ }
734
+ else if (this.sliderEnteredMinValue > this.sliderEnteredMaxValue) {
735
+ if (this.isValueInRange(this.sliderEnteredMaxValue)) {
736
+ this.showSliderMinValueError = true;
737
+ this.showSliderMaxValueError = false;
738
+ }
739
+ else {
740
+ this.showSliderMaxValueError = true;
741
+ if (this.isValueInRange(this.sliderEnteredMinValue)) {
742
+ this.showSliderMinValueError = false;
743
+ }
744
+ else {
745
+ this.showSliderMinValueError = true;
746
+ }
747
+ }
748
+ this.disableSliderApplyButton = true;
749
+ this.incorrectSliderInput = true;
750
+ }
751
+ else if (this.sliderEnteredMinValue < this.options.floor) {
752
+ this.showSliderMinValueError = true;
753
+ this.disableSliderApplyButton = true;
754
+ this.incorrectSliderInput = true;
755
+ }
756
+ else {
757
+ this.showSliderMinValueError = false;
758
+ this.disableSliderApplyButton = false;
759
+ this.incorrectSliderInput = false;
760
+ }
761
+ console.log(this.sliderEnteredMinValue);
762
+ }
763
+ else {
764
+ console.log('inside else condition');
765
+ this.sliderEnteredMinValue = this.options.floor;
766
+ this.isMinTextBoxEmpty = true;
767
+ this.showSliderMinValueError = false;
768
+ }
769
+ this.showErrorForMinAndMaxValue();
770
+ }
771
+ maxValueChanged(val) {
772
+ if (val || val == "0") {
773
+ this.sliderEnteredMaxValue = parseInt(val);
774
+ this.isMaxTextBoxEmpty = false;
775
+ if (this.isMinTextBoxEmpty) {
776
+ if (this.sliderEnteredMaxValue < this.options.floor) {
777
+ this.showSliderMaxValueError = true;
778
+ this.disableSliderApplyButton = true;
779
+ this.incorrectSliderInput = true;
780
+ }
781
+ else {
782
+ this.showSliderMaxValueError = false;
783
+ this.showSliderMinValueError = false;
784
+ this.disableSliderApplyButton = false;
785
+ this.incorrectSliderInput = false;
786
+ }
787
+ }
788
+ else if (this.sliderEnteredMaxValue < this.sliderEnteredMinValue) {
789
+ if (this.isValueInRange(this.sliderEnteredMinValue)) {
790
+ this.showSliderMaxValueError = true;
791
+ this.showSliderMinValueError = false;
792
+ }
793
+ else {
794
+ this.showSliderMinValueError = true;
795
+ if (this.isValueInRange(this.sliderEnteredMaxValue)) {
796
+ this.showSliderMaxValueError = false;
797
+ }
798
+ else {
799
+ this.showSliderMaxValueError = true;
800
+ }
801
+ }
802
+ this.disableSliderApplyButton = true;
803
+ this.incorrectSliderInput = true;
804
+ // this.showMaxError = true;
805
+ }
806
+ else if (this.sliderEnteredMaxValue > this.options.ceil) {
807
+ this.showSliderMaxValueError = true;
808
+ this.disableSliderApplyButton = true;
809
+ this.incorrectSliderInput = true;
810
+ }
811
+ else {
812
+ this.showSliderMaxValueError = false;
813
+ this.disableSliderApplyButton = false;
814
+ this.incorrectSliderInput = false;
815
+ }
816
+ }
817
+ else {
818
+ this.sliderEnteredMaxValue = this.options.ceil;
819
+ this.isMaxTextBoxEmpty = true;
820
+ this.showSliderMaxValueError = false;
821
+ console.log(this.sliderEnteredMaxValue);
822
+ }
823
+ this.showErrorForMinAndMaxValue();
824
+ }
825
+ showErrorForMinAndMaxValue() {
826
+ if (this.isMinTextBoxEmpty && this.isMaxTextBoxEmpty) {
827
+ this.showSliderMinValueError = true;
828
+ this.showSliderMaxValueError = true;
829
+ this.disableSliderApplyButton = true;
830
+ this.incorrectSliderInput = true;
831
+ }
832
+ this.disableSliderApplyBtn();
833
+ }
834
+ isValueInRange(val) {
835
+ return this.options.floor <= val && val <= this.options.ceil;
836
+ }
837
+ disableSliderApplyBtn() {
838
+ if (this.showFilterComponent && this.showSortComponent) {
839
+ let isFilterChanged = this.checkIfSliderTooltipIsFiltered();
840
+ let isSortChanged = this.checkIfSortingChanged();
841
+ this.disableSliderApplyButton = this.incorrectSliderInput || (!isSortChanged && !isFilterChanged);
842
+ }
843
+ else if (this.showFilterComponent) {
844
+ this.disableSliderApplyButton = this.incorrectSliderInput || !this.checkIfSliderTooltipIsFiltered();
845
+ }
846
+ else if (this.showSortComponent) {
847
+ this.disableSliderApplyButton = !this.checkIfSortingChanged();
848
+ }
849
+ }
850
+ sliderValueChange() {
851
+ this.sliderValue = { min: this.sliderMinValue, max: this.sliderMaxValue };
852
+ }
853
+ cancelSliderFilter() {
854
+ this.sliderValue = null;
855
+ this.closeTooltip();
856
+ }
857
+ applyFilters() {
858
+ this.applyListFilters();
859
+ this.applySortingOnFilteredData();
860
+ this.emitData();
861
+ this.setInitialRowsForTable();
862
+ this.disableEnableEachColumnTooltipIcon();
863
+ this.annaFilterService.updateStateOfTheCurrentFilterTab(this.annaSortService.columnSortState);
864
+ this.closeTooltip();
865
+ }
866
+ applyListFilters() {
867
+ if (this.showFilterComponent && this.isFilterChanged) {
868
+ let currentSelectedValue = [];
869
+ if (this.tooltipOptions) {
870
+ currentSelectedValue = sortBy(this.tooltipOptions.filter(item => item.isSelected).map(item => item.value));
871
+ if (!this.searchItem && currentSelectedValue.length == this.tooltipOptions.length && this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
872
+ currentSelectedValue = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
873
+ }
874
+ }
875
+ let blankIndex = currentSelectedValue.findIndex((item) => item == null);
876
+ if (blankIndex != -1) {
877
+ currentSelectedValue = sortBy(currentSelectedValue);
878
+ }
879
+ this.annaFilterService.reOrderAppliedFiltersState(this.clonedTableData, currentSelectedValue);
880
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, currentSelectedValue);
881
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
882
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.tableData);
883
+ }
884
+ }
885
+ applySortingOnFilteredData() {
886
+ if (this.showSortComponent) {
887
+ if (this.isSortChanged) {
888
+ this.updateSortMap();
889
+ }
890
+ else if (this.isFilterChanged) {
891
+ this.checkIfSortingIsApplied();
892
+ }
893
+ }
894
+ else if (this.isFilterChanged) {
895
+ this.checkIfSortingIsApplied();
896
+ }
897
+ }
898
+ emitData() {
899
+ if (this.isFilterChanged && this.isSortChanged) {
900
+ this.filterAppliedToTable.emit(this.tableData);
901
+ }
902
+ else if (this.isFilterChanged) {
903
+ this.filterAppliedToTable.emit(this.tableData);
904
+ }
905
+ else if (this.isSortChanged) {
906
+ this.sortingAppliedToTable.emit(this.tableData);
907
+ }
908
+ }
909
+ applySorting(key) {
910
+ if (this.tempSortOrder == "ASC") {
911
+ this.tableData = cloneDeep(this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(true, this.tableData, key));
912
+ }
913
+ else if (this.tempSortOrder == "DESC") {
914
+ this.tableData = cloneDeep(this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(false, this.tableData, key));
915
+ }
916
+ else if (this.tempSortOrder == "DEFAULT") {
917
+ this.tableData = cloneDeep(this.annaSortService.noSortingAppliedData);
918
+ }
919
+ }
920
+ revert() {
921
+ this.tempTooltipData = cloneDeep(this.toolTipdata);
922
+ this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
923
+ this.toolTipdata = null;
924
+ }
925
+ closeCheckboxFilter() {
926
+ if (this.toolTipdata) {
927
+ this.revert();
928
+ }
929
+ this.closeTooltip();
930
+ }
931
+ applySliderFilter() {
932
+ this.applySliderFilterOnData();
933
+ this.applySortingOnFilteredData();
934
+ this.emitData();
935
+ this.setInitialRowsForTable();
936
+ this.annaFilterService.updateStateOfTheCurrentFilterTab(this.annaSortService.columnSortState);
937
+ this.closeTooltip();
938
+ }
939
+ applySliderFilterOnData() {
940
+ if (this.showFilterComponent && this.isFilterChanged) {
941
+ let currentSliderData = { min: null, max: null };
942
+ // if(this.isMinTextBoxEmpty){
943
+ // currentSliderData.min = this.options.floor;
944
+ // currentSliderData.max = this.sliderMaxValue;
945
+ // }
946
+ // else if(this.isMaxTextBoxEmpty){
947
+ // currentSliderData.max = this.options.ceil;
948
+ // currentSliderData.min = this.sliderMinValue;
949
+ // }
950
+ // else{
951
+ currentSliderData.max = this.sliderEnteredMaxValue;
952
+ currentSliderData.min = this.sliderEnteredMinValue;
953
+ // }
954
+ if (currentSliderData.min == this.options.floor && currentSliderData.max == this.options.ceil && this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
955
+ currentSliderData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
956
+ }
957
+ this.annaFilterService.reOrderAppliedFiltersState(this.clonedTableData, currentSliderData);
958
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, currentSliderData);
959
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
960
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.tableData);
961
+ this.disableEnableEachColumnTooltipIcon();
962
+ }
963
+ }
964
+ cancelInDateFilter() {
965
+ this.closeTooltip();
966
+ }
967
+ updateSortMap() {
968
+ for (let [key, value] of this.annaSortService.columnSortState.entries()) {
969
+ this.annaSortService.columnSortState.set(key, "DEFAULT");
970
+ }
971
+ this.annaSortService.columnSortState.set(this.annaFilterService.selectedRadio, this.tempSortOrder);
972
+ this.applySorting(this.annaFilterService.selectedRadio);
973
+ }
974
+ applyDateFilter() {
975
+ this.applyDateFilterOnData();
976
+ this.applySortingOnFilteredData();
977
+ this.emitData();
978
+ this.setInitialRowsForTable();
979
+ this.annaFilterService.updateStateOfTheCurrentFilterTab(this.annaSortService.columnSortState);
980
+ this.closeTooltip();
981
+ }
982
+ applyDateFilterOnData() {
983
+ if (this.showFilterComponent && this.isFilterChanged) {
984
+ let currentSelectedDate = this.calendarSelection;
985
+ let fromDate = { year: currentSelectedDate.fromDate.year, month: currentSelectedDate.fromDate.month, day: currentSelectedDate.fromDate.day };
986
+ let toDate = { year: currentSelectedDate.toDate.year, month: currentSelectedDate.toDate.month, day: currentSelectedDate.toDate.day };
987
+ if (isEqual(this.calendarMinEnabledDate, fromDate) && isEqual(this.calendarMaxEnabledDate, toDate) && this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
988
+ currentSelectedDate = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
989
+ }
990
+ else {
991
+ currentSelectedDate.fromDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(currentSelectedDate.fromDate));
992
+ currentSelectedDate.toDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(currentSelectedDate.toDate));
993
+ }
994
+ this.annaFilterService.reOrderAppliedFiltersState(this.clonedTableData, currentSelectedDate);
995
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, currentSelectedDate);
996
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
997
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.tableData);
998
+ this.disableEnableEachColumnTooltipIcon();
999
+ }
1000
+ }
1001
+ applyWeekFilter(event) {
1002
+ }
1003
+ incrementHour(arr) {
1004
+ if (arr[0] == "") {
1005
+ arr[0] = 1;
1006
+ }
1007
+ else if (parseInt(arr[0]) < 12) {
1008
+ arr[0] = parseInt(arr[0]) + 1;
1009
+ }
1010
+ else {
1011
+ arr[0] = 1;
1012
+ }
1013
+ }
1014
+ decrementHour(arr) {
1015
+ if (arr[0] == "") {
1016
+ arr[0] = 12;
1017
+ }
1018
+ else if (parseInt(arr[0]) > 1) {
1019
+ arr[0] = parseInt(arr[0]) - 1;
1020
+ }
1021
+ else {
1022
+ arr[0] = 12;
1023
+ }
1024
+ }
1025
+ incrementMinute(arr) {
1026
+ arr[1] = parseInt(arr[1]) + 15;
1027
+ if (parseInt(arr[1]) == 60) {
1028
+ arr[1] = "00";
1029
+ }
1030
+ else if (parseInt(arr[1]) == 0) {
1031
+ arr[1] = "00";
1032
+ }
1033
+ else if (parseInt(arr[1]) > 60) {
1034
+ let res = parseInt(arr[1]) - 60;
1035
+ arr[1] = res < 10 ? `0${res}` : res.toString();
1036
+ }
1037
+ }
1038
+ decrementMinute(arr) {
1039
+ arr[1] = parseInt(arr[1]) - 15;
1040
+ if (parseInt(arr[1]) < 0) {
1041
+ let res = 60 + parseInt(arr[1]);
1042
+ arr[1] = res;
1043
+ }
1044
+ else if (parseInt(arr[1]) == 0) {
1045
+ arr[1] = "00";
1046
+ }
1047
+ else if (arr[1] < 10) {
1048
+ arr[1] = `0${arr[1]}`;
1049
+ }
1050
+ }
1051
+ changeStartTimeHour(increment) {
1052
+ if (increment) {
1053
+ this.incrementHour(this.selectedFromTime);
1054
+ }
1055
+ else {
1056
+ this.decrementHour(this.selectedFromTime);
1057
+ }
1058
+ this.startTimeHourChange(this.selectedFromTime[0].toString());
1059
+ }
1060
+ changeEndTimeHour(increment) {
1061
+ if (increment) {
1062
+ this.incrementHour(this.selectedToTime);
1063
+ }
1064
+ else {
1065
+ this.decrementHour(this.selectedToTime);
1066
+ }
1067
+ this.endTimeHourChange(this.selectedToTime[0].toString());
1068
+ }
1069
+ changeEndTimeMinute(increment) {
1070
+ if (increment) {
1071
+ this.incrementMinute(this.selectedToTime);
1072
+ }
1073
+ else {
1074
+ this.decrementMinute(this.selectedToTime);
1075
+ }
1076
+ this.endTimeMinChange(this.selectedToTime[1].toString());
1077
+ }
1078
+ changeStartTimeMinute(increment) {
1079
+ if (increment) {
1080
+ this.incrementMinute(this.selectedFromTime);
1081
+ }
1082
+ else {
1083
+ this.decrementMinute(this.selectedFromTime);
1084
+ }
1085
+ this.startTimeMinChange(this.selectedFromTime[1].toString());
1086
+ }
1087
+ applyTimeFilters() {
1088
+ this.applyTimeFilterOnData();
1089
+ this.applySortingOnFilteredData();
1090
+ this.emitData();
1091
+ this.setInitialRowsForTable();
1092
+ this.annaFilterService.updateStateOfTheCurrentFilterTab(this.annaSortService.columnSortState);
1093
+ this.closeTooltip();
1094
+ }
1095
+ applyTimeFilterOnData() {
1096
+ if (this.showFilterComponent && this.isFilterChanged) {
1097
+ let currentSelectedTimeFilter = {
1098
+ fromTime: null,
1099
+ toTime: null,
1100
+ includeMulti: false,
1101
+ includeZero: false,
1102
+ includeTimeRange: false,
1103
+ };
1104
+ let fromTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
1105
+ let fromTime24HrFormat = fromTime24HrFormatArr[0] + ":" + fromTime24HrFormatArr[1] + ":00";
1106
+ let toTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
1107
+ let toTime24HrFormat = toTime24HrFormatArr[0] + ":" + toTime24HrFormatArr[1] + ":00";
1108
+ currentSelectedTimeFilter = { fromTime: fromTime24HrFormat, toTime: toTime24HrFormat, includeMulti: this.multiTimeCheckboxChecked,
1109
+ includeZero: this.zeroTimeCheckboxChecked, includeTimeRange: this.enterTimeCheckboxChecked };
1110
+ let isFiltered = this.annaFilterService.reOrderAppliedFiltersState(this.clonedTableData, currentSelectedTimeFilter);
1111
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, currentSelectedTimeFilter);
1112
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1113
+ if (!isFiltered) {
1114
+ this.annaFilterService.tooltipSelectedMap.delete(this.annaFilterService.selectedRadio);
1115
+ }
1116
+ this.annaSortService.noSortingAppliedData = cloneDeep(this.tableData);
1117
+ this.disableEnableEachColumnTooltipIcon();
1118
+ }
1119
+ }
1120
+ closeTimeFilter() {
1121
+ this.selectedFromTime = cloneDeep(this.clonedSelectedFromTime);
1122
+ this.selectedToTime = cloneDeep(this.clonedSelectedToTime);
1123
+ this.closeTooltip();
1124
+ }
1125
+ disableTimeFilterApplyButton() {
1126
+ if (this.showFilterComponent && this.showSortComponent) {
1127
+ let isFilterChanged = this.checkIfTimeTooltipIsFiltered();
1128
+ let isSortChanged = this.checkIfSortingChanged();
1129
+ this.disableTimeFilterApplyBtn = !this.validateTimeFilterInput() || (!isSortChanged && !isFilterChanged);
1130
+ }
1131
+ else if (this.showFilterComponent) {
1132
+ this.disableTimeFilterApplyBtn = !this.validateTimeFilterInput() || !this.checkIfTimeTooltipIsFiltered();
1133
+ }
1134
+ else if (this.showSortComponent) {
1135
+ this.disableTimeFilterApplyBtn = !this.checkIfSortingChanged();
1136
+ }
1137
+ }
1138
+ validateTimeFilterInput() {
1139
+ if (this.startTimeHourErr || this.startTimeMinErr || this.endTimeHourErr || this.endTimeMinErr) {
1140
+ return false;
1141
+ }
1142
+ if (!this.multiTimeCheckboxChecked && !this.zeroTimeCheckboxChecked && !this.enterTimeCheckboxChecked) {
1143
+ return false;
1144
+ }
1145
+ let timeFormat = "HH:mm:ss";
1146
+ let startTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
1147
+ let startTime24HrFormat = startTime24HrFormatArr[0] + ":" + startTime24HrFormatArr[1] + ":00";
1148
+ let endTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
1149
+ let endTime24HrFormat = endTime24HrFormatArr[0] + ":" + endTime24HrFormatArr[1] + ":00";
1150
+ return !(moment(startTime24HrFormat, timeFormat).isAfter(moment(endTime24HrFormat, timeFormat)));
1151
+ }
1152
+ sortedData(event) {
1153
+ if (event.type == "none") {
1154
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1155
+ }
1156
+ else {
1157
+ this.tableData = event.data;
1158
+ }
1159
+ this.sortingAppliedToTable.emit(this.tableData);
1160
+ }
1161
+ checkIfSortingIsApplied() {
1162
+ for (let [key, value] of this.annaSortService.columnSortState.entries()) {
1163
+ if (value == "ASC") {
1164
+ this.tableData = cloneDeep(this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(true, this.tableData, key));
1165
+ }
1166
+ else if (value == "DESC") {
1167
+ this.tableData = cloneDeep(this.annaSortService.sortDataForComponentOtherThanLurAndCsrPage(false, this.tableData, key));
1168
+ }
1169
+ }
1170
+ }
1171
+ disableEnableEachColumnTooltipIcon() {
1172
+ this.tableHeaders.forEach(header => {
1173
+ header.headerInfo.forEach(item => {
1174
+ if (item.showTooltipIcon) {
1175
+ let values = [];
1176
+ item.disableTooltipIcon = true;
1177
+ item.filterSortObjectKeys.forEach(key => {
1178
+ if (key == "period") {
1179
+ let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
1180
+ let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
1181
+ item.disableTooltipIcon = (uniqStartDate.length > 1 || uniqEndDate.length > 1) ? false : true;
1182
+ }
1183
+ else {
1184
+ values = this.tableData.map((u) => u[key]);
1185
+ if (uniq(values).filter(n => n != null).length > 1) {
1186
+ item.disableTooltipIcon = false;
1187
+ }
1188
+ }
1189
+ });
1190
+ }
1191
+ });
1192
+ });
1193
+ }
1194
+ setMarginLeftForFilterIcon() {
1195
+ let elementArr = this.viewChildTableHeaders.toArray();
1196
+ elementArr.forEach((item) => {
1197
+ let childDivElements = item.nativeElement.children;
1198
+ if (childDivElements.length == 2) {
1199
+ let firstParagraphWidth = childDivElements[0].children[0];
1200
+ let secondParagraphWidth = childDivElements[1].children[0];
1201
+ if (firstParagraphWidth.offsetWidth > secondParagraphWidth.offsetWidth) {
1202
+ let diff = firstParagraphWidth.offsetWidth - secondParagraphWidth.offsetWidth;
1203
+ if (childDivElements[0].children.length == 2) {
1204
+ childDivElements[0].children[1].style.marginLeft = 4 + 'px';
1205
+ }
1206
+ if (childDivElements[1].children.length == 2) {
1207
+ childDivElements[1].children[1].style.marginLeft = diff + 4 + 'px';
1208
+ }
1209
+ }
1210
+ else {
1211
+ let diff = secondParagraphWidth.offsetWidth - firstParagraphWidth.offsetWidth;
1212
+ if (childDivElements[0].children.length == 2) {
1213
+ childDivElements[0].children[1].style.marginLeft = diff + 4 + 'px';
1214
+ }
1215
+ if (childDivElements[1].children.length == 2) {
1216
+ childDivElements[1].children[1].style.marginLeft = 4 + 'px';
1217
+ }
1218
+ }
1219
+ }
1220
+ });
1221
+ }
1222
+ dataRowClicked(rowData) {
1223
+ this.rowClicked.emit(rowData);
1224
+ }
1225
+ radioButtonClicked(data, action, isDisabled) {
1226
+ if (!isDisabled) {
1227
+ this.radioButtonSelected.emit({ data, action });
1228
+ }
1229
+ }
1230
+ bindTheValueToSellerGroupTooltip(sellerGroupHierarchy, tooltip) {
1231
+ if (this.hierarchyTooltip && this.hierarchyTooltip.open) {
1232
+ this.hierarchyTooltip.close();
1233
+ }
1234
+ this.sellerGroupHierarchy = sellerGroupHierarchy;
1235
+ this.hierarchyTooltip = tooltip;
1236
+ this.hierarchyTooltip.open();
1237
+ }
1238
+ iconClicked(rowData, iconClass) {
1239
+ this.gtIconClicked.emit({ data: rowData, iconClass: iconClass });
1240
+ }
1241
+ svgIconClicked(data) {
1242
+ this.gtSVGIconClicked.emit(data);
1243
+ }
1244
+ textActionClicked(rowData, id) {
1245
+ this.gtTextActionClicked.emit({ data: rowData, id });
1246
+ }
1247
+ viewDetailsClicked(rowData) {
1248
+ this.gtViewDetailClicked.emit({ data: rowData });
1249
+ }
1250
+ setColumnSortStateMap() {
1251
+ this.tableHeaders.forEach(column => {
1252
+ column.headerInfo.forEach((header) => {
1253
+ if (header.showTooltipIcon && header.isSortRequired) {
1254
+ header.isSortRequired.forEach((item, index) => {
1255
+ if (item) {
1256
+ this.annaSortService.columnSortState.set(header.filterSortObjectKeys[index], "DEFAULT");
1257
+ }
1258
+ });
1259
+ }
1260
+ });
1261
+ });
1262
+ }
1263
+ storeSortTypeInTempVariable(event) {
1264
+ this.tempSortOrder = event;
1265
+ this.disableApplyButtonOfSelectedFilter();
1266
+ }
1267
+ unCheckAllCheckbox() {
1268
+ this.tooltipOptions.forEach(item => {
1269
+ item.isSelected = false;
1270
+ let index = this.clonedTooltipOptions.findIndex(opt => opt.id == item.id);
1271
+ this.clonedTooltipOptions[index].isSelected = false;
1272
+ });
1273
+ this.selectedCheckboxOptionsCount = 0;
1274
+ this.disableSelectAll = false;
1275
+ this.disableClearAll = true;
1276
+ this.disableCheckboxApply = true;
1277
+ }
1278
+ selectAllCheckbox() {
1279
+ this.tooltipOptions.forEach(item => {
1280
+ item.isSelected = true;
1281
+ let index = this.clonedTooltipOptions.findIndex(opt => opt.id == item.id);
1282
+ this.clonedTooltipOptions[index].isSelected = true;
1283
+ });
1284
+ this.selectedCheckboxOptionsCount = this.tooltipOptions.length;
1285
+ this.disableSelectAll = true;
1286
+ this.disableClearAll = false;
1287
+ this.disableCheckboxFilterApplyButton();
1288
+ }
1289
+ searchForTheItem(str) {
1290
+ if (str) {
1291
+ this.tooltipOptions = cloneDeep(this.clonedTooltipOptions.filter(item => item.label.toString().includes(str)));
1292
+ this.tooltipOptions.forEach(element => {
1293
+ element.label = this.boldString(element.label, str);
1294
+ });
1295
+ if (this.tooltipOptions.length > 0) {
1296
+ let unselectedItems = this.tooltipOptions.filter((item) => !item.isSelected);
1297
+ let selectedItems = this.tooltipOptions.filter((item) => item.isSelected);
1298
+ this.disableSelectAll = unselectedItems.length == 0;
1299
+ this.disableClearAll = selectedItems.length == 0;
1300
+ this.selectedCheckboxOptionsCount = selectedItems.length;
1301
+ this.disableCheckboxApply = (selectedItems.length == 0 || !this.checkIfCheckboxTooltipIsFiltered());
1302
+ }
1303
+ else {
1304
+ this.selectedCheckboxOptionsCount = 0;
1305
+ this.disableCheckboxApply = true;
1306
+ this.disableClearAll = true;
1307
+ this.disableSelectAll = true;
1308
+ }
1309
+ }
1310
+ else {
1311
+ this.tooltipOptions = cloneDeep(this.clonedTooltipOptions);
1312
+ let unselectedItems = this.tooltipOptions.filter(item => !item.isSelected);
1313
+ let selectedItems = this.tooltipOptions.filter(item => item.isSelected);
1314
+ this.selectedCheckboxOptionsCount = selectedItems.length;
1315
+ this.disableSelectAll = unselectedItems.length == 0;
1316
+ this.disableClearAll = selectedItems.length == 0;
1317
+ this.disableCheckboxFilterApplyButton();
1318
+ }
1319
+ }
1320
+ boldString(str, find) {
1321
+ var re = new RegExp(find, 'g');
1322
+ return str.replace(re, '<b>' + find + '</b>');
1323
+ }
1324
+ removeBoldElementFromString(originalString) {
1325
+ let firstRegExp = new RegExp('<b>', 'g');
1326
+ let secondRegExp = new RegExp('</b>', 'g');
1327
+ let ret = originalString.replace(firstRegExp, '');
1328
+ return ret.replace(secondRegExp, '');
1329
+ }
1330
+ clearSearchedItem() {
1331
+ this.searchItem = "";
1332
+ this.searchForTheItem("");
1333
+ }
1334
+ calendarDateChanged(event) {
1335
+ this.calendarSelection = event;
1336
+ this.disableCalendarApplyButton();
1337
+ }
1338
+ disableCalendarApplyButton() {
1339
+ if (this.showFilterComponent && this.showSortComponent) {
1340
+ let isFilterChanged = this.checkIfDateTooltipIsFiltered();
1341
+ let isSortChanged = this.checkIfSortingChanged();
1342
+ this.disableCalendarApplyBtn = !(this.calendarSelection.fromDate && this.calendarSelection.toDate) || (!isSortChanged && !isFilterChanged);
1343
+ }
1344
+ else if (this.showFilterComponent) {
1345
+ this.disableCalendarApplyBtn = !(this.calendarSelection.fromDate && this.calendarSelection.toDate) || !this.checkIfDateTooltipIsFiltered();
1346
+ }
1347
+ else if (this.showSortComponent) {
1348
+ this.disableCalendarApplyBtn = !this.checkIfSortingChanged();
1349
+ }
1350
+ }
1351
+ setInitialValueMapForTimeFilter(key) {
1352
+ let data = this.clonedTableData.filter((obj) => !["", "-", null, "0", "<multi>"].includes(obj[key]));
1353
+ let timeArr = map(data, key);
1354
+ timeArr.sort((a, b) => {
1355
+ return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
1356
+ });
1357
+ let obj = {
1358
+ fromTime: timeArr[0],
1359
+ toTime: timeArr[timeArr.length - 1],
1360
+ includeMulti: false,
1361
+ includeZero: false,
1362
+ includeTimeRange: false
1363
+ };
1364
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" ||
1365
+ this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
1366
+ let includeMulti = this.clonedTableData.findIndex((obj) => obj[key] == "<multi>") !=
1367
+ -1;
1368
+ let includeZero = this.clonedTableData.findIndex((obj) => obj[key] == "0") != -1;
1369
+ let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key] != "0" && obj[key] != "<multi>") != -1;
1370
+ let obj = {
1371
+ fromTime: timeArr[0],
1372
+ toTime: timeArr[timeArr.length - 1],
1373
+ includeMulti: includeMulti,
1374
+ includeZero: includeZero,
1375
+ includeTimeRange: includeTimeRange,
1376
+ };
1377
+ this.annaFilterService.initialValueMap.set(key, obj);
1378
+ }
1379
+ else if (this.gtGeneralConfig.component === "RATING") {
1380
+ this.setInitialValueMapForRatingPageTimeFilter(key);
1381
+ }
1382
+ else {
1383
+ this.annaFilterService.initialValueMap.set(key, obj);
1384
+ }
1385
+ }
1386
+ setInitialValueMapForRatingPageTimeFilter(key) {
1387
+ let includeMulti = this.clonedTableData.findIndex((obj) => obj[key][0] == "<multi>") !=
1388
+ -1;
1389
+ let includeZero = this.clonedTableData.findIndex((obj) => obj[key][0] == "0") != -1;
1390
+ let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key][0] != "0" && obj[key][0] != "<multi>") != -1;
1391
+ let startTimeArr = map(this.clonedTableData, "startTime");
1392
+ let endTimeArr = map(this.clonedTableData, "endTime");
1393
+ startTimeArr.sort((a, b) => {
1394
+ return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
1395
+ });
1396
+ endTimeArr.sort((a, b) => {
1397
+ return this.annaDateTimeFormatService.sortByTimeDescending(a, b);
1398
+ });
1399
+ let obj = {
1400
+ fromTime: startTimeArr[0],
1401
+ toTime: endTimeArr[0],
1402
+ includeMulti: includeMulti,
1403
+ includeZero: includeZero,
1404
+ includeTimeRange: includeTimeRange,
1405
+ };
1406
+ this.annaFilterService.initialValueMap.set(key, obj);
1407
+ }
1408
+ startTimeHourChange(val) {
1409
+ if (val.length == 0 || 1 > parseInt(val) || parseInt(val) > 12) {
1410
+ this.startTimeHourErr = true;
1411
+ }
1412
+ else {
1413
+ this.startTimeHourErr = false;
1414
+ }
1415
+ this.disableTimeFilterApplyButton();
1416
+ }
1417
+ startTimeMinChange(val) {
1418
+ if (val.length != 2 || 0 > parseInt(val) || parseInt(val) > 59) {
1419
+ this.startTimeMinErr = true;
1420
+ }
1421
+ else {
1422
+ this.startTimeMinErr = false;
1423
+ }
1424
+ this.disableTimeFilterApplyButton();
1425
+ }
1426
+ endTimeHourChange(val) {
1427
+ if (val.length == 0 || 1 > parseInt(val) || parseInt(val) > 12) {
1428
+ this.endTimeHourErr = true;
1429
+ }
1430
+ else {
1431
+ this.endTimeHourErr = false;
1432
+ }
1433
+ this.disableTimeFilterApplyButton();
1434
+ }
1435
+ endTimeMinChange(val) {
1436
+ if (val.length != 2 || 0 > parseInt(val) || parseInt(val) > 59) {
1437
+ this.endTimeMinErr = true;
1438
+ }
1439
+ else {
1440
+ this.endTimeMinErr = false;
1441
+ }
1442
+ this.disableTimeFilterApplyButton();
1443
+ }
1444
+ checkIfCheckboxTooltipIsFiltered() {
1445
+ let currentSelectedValue = [];
1446
+ let previousSelectedValue = [];
1447
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1448
+ previousSelectedValue = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1449
+ if (!this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1450
+ let initialValue = sortBy(uniq(this.clonedTableData.map(item => item[this.annaFilterService.selectedRadio])));
1451
+ this.annaFilterService.initialValueMap.set(this.annaFilterService.selectedRadio, initialValue);
1452
+ }
1453
+ }
1454
+ else if (this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1455
+ previousSelectedValue = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1456
+ }
1457
+ else {
1458
+ previousSelectedValue = sortBy(uniq(this.clonedTableData.map(item => item[this.annaFilterService.selectedRadio])));
1459
+ this.annaFilterService.initialValueMap.set(this.annaFilterService.selectedRadio, previousSelectedValue);
1460
+ }
1461
+ if (this.tooltipOptions) {
1462
+ currentSelectedValue = sortBy(this.tooltipOptions.filter(item => item.isSelected).map(item => item.value));
1463
+ if (!this.searchItem && currentSelectedValue.length == this.tooltipOptions.length && this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1464
+ currentSelectedValue = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1465
+ }
1466
+ }
1467
+ let blankIndex = currentSelectedValue.findIndex((item) => item == null);
1468
+ if (blankIndex != -1) {
1469
+ currentSelectedValue = sortBy(currentSelectedValue);
1470
+ }
1471
+ this.isFilterChanged = !isEqual(currentSelectedValue, previousSelectedValue);
1472
+ return this.isFilterChanged;
1473
+ }
1474
+ checkIfTimeTooltipIsFiltered() {
1475
+ let currentSelectedTimeFilter = {
1476
+ fromTime: null,
1477
+ toTime: null,
1478
+ includeMulti: false,
1479
+ includeZero: false,
1480
+ includeTimeRange: false,
1481
+ };
1482
+ let previousSelectedTimeFilter;
1483
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1484
+ previousSelectedTimeFilter = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1485
+ }
1486
+ else if (this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1487
+ previousSelectedTimeFilter = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1488
+ }
1489
+ let fromTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
1490
+ let fromTime24HrFormat = fromTime24HrFormatArr[0] + ":" + fromTime24HrFormatArr[1] + ":00";
1491
+ let toTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
1492
+ let toTime24HrFormat = toTime24HrFormatArr[0] + ":" + toTime24HrFormatArr[1] + ":00";
1493
+ currentSelectedTimeFilter = { fromTime: fromTime24HrFormat, toTime: toTime24HrFormat, includeMulti: this.multiTimeCheckboxChecked,
1494
+ includeZero: this.zeroTimeCheckboxChecked, includeTimeRange: this.enterTimeCheckboxChecked };
1495
+ this.isFilterChanged = !isEqual(previousSelectedTimeFilter, currentSelectedTimeFilter);
1496
+ return this.isFilterChanged;
1497
+ }
1498
+ checkIfDateTooltipIsFiltered() {
1499
+ let currentSelectedDate = cloneDeep(this.calendarSelection);
1500
+ let previousSelectedDate = { fromDate: null, toDate: null };
1501
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1502
+ previousSelectedDate = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1503
+ if (!this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1504
+ this.setInitialValueMapForDateFilter();
1505
+ }
1506
+ }
1507
+ else if (this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1508
+ previousSelectedDate = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1509
+ }
1510
+ else {
1511
+ this.setInitialValueMapForDateFilter();
1512
+ previousSelectedDate = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1513
+ }
1514
+ if (currentSelectedDate.fromDate && currentSelectedDate.toDate) {
1515
+ let fromDate = { year: currentSelectedDate.fromDate.year, month: currentSelectedDate.fromDate.month, day: currentSelectedDate.fromDate.day };
1516
+ let toDate = { year: currentSelectedDate.toDate.year, month: currentSelectedDate.toDate.month, day: currentSelectedDate.toDate.day };
1517
+ if (isEqual(this.calendarMinEnabledDate, fromDate) && isEqual(this.calendarMaxEnabledDate, toDate) && this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1518
+ currentSelectedDate = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1519
+ }
1520
+ else {
1521
+ currentSelectedDate.fromDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(currentSelectedDate.fromDate));
1522
+ currentSelectedDate.toDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(currentSelectedDate.toDate));
1523
+ }
1524
+ this.isFilterChanged = !isEqual(previousSelectedDate, currentSelectedDate);
1525
+ }
1526
+ return this.isFilterChanged;
1527
+ }
1528
+ setInitialValueMapForDateFilter() {
1529
+ let minMaxDate;
1530
+ if (this.annaFilterService.selectedRadio == "period") {
1531
+ let minStartDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "startDate");
1532
+ let maxEndDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "endDate");
1533
+ minMaxDate = [minStartDate[0], maxEndDate[1]];
1534
+ }
1535
+ else {
1536
+ minMaxDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, this.annaFilterService.selectedRadio);
1537
+ }
1538
+ let selectedDate = { fromDate: minMaxDate[0], toDate: minMaxDate[1] };
1539
+ this.annaFilterService.initialValueMap.set(this.annaFilterService.selectedRadio, selectedDate);
1540
+ }
1541
+ checkIfSliderTooltipIsFiltered() {
1542
+ let currentSliderData = { min: null, max: null };
1543
+ let previousSliderData = { min: "", max: "" };
1544
+ // if(this.isMinTextBoxEmpty){
1545
+ // currentSliderData.min = this.options.floor;
1546
+ // currentSliderData.max = this.sliderMaxValue;
1547
+ // }
1548
+ // else if(this.isMaxTextBoxEmpty){
1549
+ // currentSliderData.max = this.options.ceil;
1550
+ // currentSliderData.min = this.sliderMinValue;
1551
+ // }
1552
+ // else{
1553
+ currentSliderData.max = this.sliderEnteredMaxValue;
1554
+ currentSliderData.min = this.sliderEnteredMinValue;
1555
+ // }
1556
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1557
+ previousSliderData = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1558
+ if (!this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1559
+ this.setInitialValueMapForSliderFilter();
1560
+ }
1561
+ }
1562
+ else if (this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1563
+ previousSliderData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1564
+ }
1565
+ else {
1566
+ this.setInitialValueMapForSliderFilter();
1567
+ previousSliderData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1568
+ }
1569
+ if (currentSliderData.min == this.options.floor && currentSliderData.max == this.options.ceil && this.annaFilterService.initialValueMap.has(this.annaFilterService.selectedRadio)) {
1570
+ currentSliderData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1571
+ }
1572
+ this.isFilterChanged = !isEqual(previousSliderData, currentSliderData);
1573
+ return this.isFilterChanged;
1574
+ }
1575
+ setInitialValueMapForSliderFilter() {
1576
+ let minValue = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, this.annaFilterService.selectedRadio, true);
1577
+ let maxValue = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, this.annaFilterService.selectedRadio, false);
1578
+ let sliderData = { min: minValue, max: maxValue };
1579
+ this.annaFilterService.initialValueMap.set(this.annaFilterService.selectedRadio, sliderData);
1580
+ }
1581
+ checkIfSortingChanged() {
1582
+ this.isSortChanged = this.tempSortOrder != null && this.tempSortOrder != this.annaSortService.columnSortState.get(this.annaFilterService.selectedRadio);
1583
+ ;
1584
+ console.log(this.isSortChanged);
1585
+ return this.isSortChanged;
1586
+ }
1587
+ disableApplyButtonOfSelectedFilter() {
1588
+ let header = this.annaFilterService.selectedRadio;
1589
+ if (this.annaFilterService.calendarSet.has(header)) {
1590
+ this.disableCalendarApplyButton();
1591
+ }
1592
+ else if (this.annaFilterService.sliderSet.has(header)) {
1593
+ this.disableSliderApplyBtn();
1594
+ }
1595
+ else if (this.annaFilterService.timeSet.has(header)) {
1596
+ this.disableTimeFilterApplyButton();
1597
+ }
1598
+ else {
1599
+ this.disableCheckboxFilterApplyButton();
1600
+ }
1601
+ }
1602
+ disableCheckboxFilterApplyButton() {
1603
+ let selectedItems = this.showFilterComponent ? this.tooltipOptions.filter(item => item.isSelected) : [];
1604
+ if (this.showFilterComponent && this.showSortComponent) {
1605
+ let isFilterChanged = this.checkIfCheckboxTooltipIsFiltered();
1606
+ let isSortChanged = this.checkIfSortingChanged();
1607
+ this.disableCheckboxApply = selectedItems.length == 0 || (!isSortChanged && !isFilterChanged);
1608
+ }
1609
+ else if (this.showFilterComponent) {
1610
+ this.disableCheckboxApply = selectedItems.length == 0 || !this.checkIfCheckboxTooltipIsFiltered();
1611
+ }
1612
+ else if (this.showSortComponent) {
1613
+ this.disableCheckboxApply = !this.checkIfSortingChanged();
1614
+ }
1615
+ }
1616
+ trackByTooltipModelId(index, item) {
1617
+ return item.id;
1618
+ }
1619
+ setActiveStateObject() {
1620
+ this.annaFilterService.isFilterSortActive = {};
1621
+ this.tableHeaders.forEach(item => {
1622
+ item.headerInfo.forEach(header => {
1623
+ if (header.showTooltipIcon) {
1624
+ let key = header.filterSortObjectKeys.join(',');
1625
+ header.joinedFilterSortObjectKeys = key;
1626
+ this.annaFilterService.isFilterSortActive[key] = false;
1627
+ }
1628
+ });
1629
+ });
1630
+ }
1631
+ setIsDifference(value) {
1632
+ this.isDifferenceLessThan25Percent = value;
1633
+ }
1634
+ resetIndex() {
1635
+ this.start = 0;
1636
+ this.end = this.limit + this.start;
1637
+ }
1638
+ onTableContainerScroll(e) {
1639
+ const tableViewHeight = e.target.offsetHeight; // viewport
1640
+ const tableScrollHeight = e.target.scrollHeight; // length of all table
1641
+ const scrollLocation = e.target.scrollTop; // how far user scrolled
1642
+ // If the user has scrolled within 150px of the bottom, add more data
1643
+ const buffer = 150;
1644
+ const limit = tableScrollHeight - tableViewHeight - buffer;
1645
+ if (scrollLocation > limit) {
1646
+ let data = this.getTableData(this.start, this.end);
1647
+ this.renderedData = this.renderedData.concat(data);
1648
+ this.updateIndex();
1649
+ }
1650
+ this.tableContainerScrolled(e);
1651
+ }
1652
+ getTableData(start, end) {
1653
+ return this.tableData.filter((value, index) => index >= start && index < end);
1654
+ }
1655
+ updateIndex() {
1656
+ this.start = this.end;
1657
+ this.end = this.limit + this.start;
1658
+ }
1659
+ setInitialRowsForTable() {
1660
+ this.resetIndex();
1661
+ this.renderedData = this.getTableData(this.start, this.end);
1662
+ this.updateIndex();
1663
+ }
1664
+ spotDetailsDownloadClicked(parentChildOrTotalRow, rowdata) {
1665
+ if (rowdata) {
1666
+ this.selectedInventoryIdForDownload = rowdata.inventoryCodeId;
1667
+ this.selectedDemographicForDownload = rowdata.demographic;
1668
+ }
1669
+ else {
1670
+ this.selectedInventoryIdForDownload = null;
1671
+ this.selectedDemographicForDownload = null;
1672
+ }
1673
+ this.selectedRowTypeForDownload = parentChildOrTotalRow;
1674
+ this.downloadSpotDetails.emit({
1675
+ parentChildOrTotalRow: parentChildOrTotalRow,
1676
+ inventoryCodeId: this.selectedInventoryIdForDownload,
1677
+ demographic: this.selectedDemographicForDownload
1678
+ });
1679
+ }
1680
+ tableContainerScrolled(event) {
1681
+ this.isScrolledLeft = event.target.scrollLeft > 0;
1682
+ }
1683
+ }
1684
+ 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 });
1685
+ 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", limit: "limit", includeBorderInTableHeight: "includeBorderInTableHeight", downloadInProgress: "downloadInProgress", percentDone: "percentDone" }, 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", downloadSpotDetails: "downloadSpotDetails" }, viewQueries: [{ propertyName: "viewChildTableHeaders", predicate: ["tableHeader"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-container {{gtGeneralConfig.tableOuterContainerName}}\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\" (scroll)=\"onTableContainerScroll($event)\">\r\n <div\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n class=\"horizontal-scroll-for-table-container\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + (includeBorderInTableHeight ? rowBorderWidth : 0)) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + ( includeBorderInTableHeight ? (2 * rowBorderWidth) : 0))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [dataSource]=\"renderedData\">\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 (showNoDataToDisplay) || \r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n [ngClass]=\"{'no-border-tr': showNoDataToDisplay}\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"(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 \r\n *ngIf=\"column.colName == 'total-potential-booked-unit' && gtGeneralConfig.component == 'RATING';\r\n else columnLowerData\"\r\n class=\"clickable-data\"\r\n (click)=\"spotDetailsDownloadClicked('TOTALROW')\"\r\n [ngClass]=\"{ 'disabled-clickable-data': downloadInProgress }\"\r\n >{{ column.lowerData }}\r\n <span class=\"material-icons spot-details-download-icons\">get_app</span>\r\n <ng-container *ngIf=\"downloadInProgress \r\n && selectedRowTypeForDownload == 'TOTALROW' \">\r\n <ng-container [ngTemplateOutlet]=\"circularProgressBar\"></ng-container>\r\n </ng-container>\r\n </span>\r\n <ng-template #columnLowerData>\r\n <span>{{ column.lowerData }}</span>\r\n </ng-template>\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 #tableHeader 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 == 'spotsColumnEquivalizationMessageTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"spotsColumnEquivalizationMessageTooltip\"\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 <i *ngIf=\"header.tooltip && header.tooltip.name == 'ongoingRevBookedColumnTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ongoingRevBookedColumnTooltip\"\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 == 'completedRevBookedColumnTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"completedRevBookedColumnTooltip\"\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.showTooltipIcon\">\r\n <!-- Active tooltip Functionality -->\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys], \r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top auto\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-checkbox-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-slider-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-datepicker-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\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)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-time-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!header.showTooltipIcon\">\r\n <span id=\"no-filter-space\"></span><br />\r\n </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 <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + columnDef.headerInfo[0].objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[columnDef.headerInfo[0].objectKey + 'Rowspan']\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\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 <div *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 </div>\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\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\" \r\n [style.border]=\"ROW_DATA.border\"\r\n class=\"{{ROW_DATA.rowClass}}\"\r\n >\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 <ng-container *ngIf=\"tableData.length > 0 && !showNoDataToDisplay\">\r\n <div showEllipsisTextOnHover *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 <anna-core-anna-icon-column [componentName]=\"gtGeneralConfig.component\" [objectKey]=\"subline.objectKey\" [dataObject]=\"ROW_DATA\" (onColumnIconClicked)=\"svgIconClicked($event)\"></anna-core-anna-icon-column>\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 *ngSwitchCase=\"'CLICKABLE_DATA'\">\r\n <span \r\n *ngIf=\"subline.objectKey == 'displayBookedUnits' && gtGeneralConfig.component == 'RATING'\"\r\n class=\"clickable-data\"\r\n (click)=\"spotDetailsDownloadClicked('DATAROW', ROW_DATA)\"\r\n [ngClass]=\"{ 'disabled-clickable-data': downloadInProgress }\"\r\n >{{ ROW_DATA.displayBookedUnits}}\r\n <span class=\"material-icons spot-details-download-icons\">get_app</span>\r\n <ng-container *ngIf=\"downloadInProgress \r\n && ROW_DATA.inventoryCodeId == selectedInventoryIdForDownload \r\n && ROW_DATA.demographic == selectedDemographicForDownload \">\r\n <ng-container [ngTemplateOutlet]=\"circularProgressBar\"></ng-container>\r\n </ng-container>\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n <span>{{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}</span>\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mi mdi-info-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\r\n <i *ngIf=\"subline.objectKey == 'displayBookedAverageRating' && gtGeneralConfig.component == 'RATING' && ROW_DATA['showRatingAverageIcon'] \"\r\n class=\"mi mdi-info-outline seller-tooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n (mouseenter)=\"setIsDifference(ROW_DATA.isDifferenceLessThan25Percent)\"\r\n tooltipClass=\"posted-avg-tooltip\"\r\n [ngbTooltip]=\"postedRatingDifference\"\r\n >\r\n </i>\r\n \r\n <i *ngIf=\"subline.objectKey == 'displayBookedAverageImpression' && gtGeneralConfig.component == 'RATING' && ROW_DATA['showImpressionAverageIcon'] \"\r\n class=\"mi mdi-info-outline seller-tooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n (mouseenter)=\"setIsDifference(ROW_DATA.isDifferenceLessThan25Percent)\"\r\n tooltipClass=\"posted-avg-tooltip\"\r\n [ngbTooltip]=\"postedImpDifference\"\r\n >\r\n </i>\r\n\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 </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"showNoDataToDisplay\">\r\n <div>\r\n {{null}}\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" [marginTop]=\"marginTop\" *ngIf=\"!showSkeletonLoading && showNoDataToDisplay\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n \r\n <div class=\"radio-container\" *ngIf=\"showFilterTooltipTabs\">\r\n <div [ngClass]=\"{'full-width': filterTabObjects.length == 1}\" *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p>\r\n </div>\r\n </div>\r\n \r\n <div class=\"checkbox-sort\" *ngIf=\"showSortComponent\">\r\n <anna-core-sort-lib [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n </div>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\r\n <p class=\"d-flex justify-content-between\">\r\n <button class=\"filter-text-btn\" [disabled]=\"disableClearAll\" (click)=\"unCheckAllCheckbox()\">Clear all</button>\r\n <button class=\"filter-text-btn\" [disabled]=\"disableSelectAll\" (click)=\"selectAllCheckbox()\">Select all</button>\r\n </p>\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)]=\"searchItem\"\r\n (ngModelChange)=\"searchForTheItem($event)\"\r\n />\r\n <i class=\"mdi mdi-close search-bar-close\" [ngClass]=\"{'disable-close-icon': (!searchItem || searchItem.length == 0) }\"\r\n (click)=\"clearSearchedItem()\"></i>\r\n\r\n </p>\r\n <div style=\"position:relative\">\r\n <!-- Track By func -->\r\n <cdk-virtual-scroll-viewport itemSize=\"18\" [style.height.px]=\"heightOfCheckboxTooltipFilter\" class=\"dropdown-data-container\">\r\n <p *cdkVirtualFor=\"let option of tooltipOptions\" class=\"input example-item\" (click)=\"selectUnselectCheckbox(option)\">\r\n <span *ngIf=\"option.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!option.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ option.value }}\" [innerHTML]=\"option.label\"></span>\r\n </p>\r\n </cdk-virtual-scroll-viewport>\r\n <div style=\"position: absolute; top:0; left:0; width:100%; height:100%; pointer-events:none\"></div>\r\n </div>\r\n </ng-container>\r\n\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 <span *ngIf=\"showFilterComponent\">({{ selectedCheckboxOptionsCount == tooltipOptions.length && tooltipOptions.length != 0 && !searchItem? 'All': selectedCheckboxOptionsCount }})</span>\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n \r\n <div class=\"radio-container\" *ngIf=\"showFilterTooltipTabs\">\r\n <div *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p> \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 \r\n <anna-core-sort-lib *ngIf=\"showSortComponent\" [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n class=\"slider-text\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [(ngModel)]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n [ngClass]=\"{'red-border': showSliderMinValueError}\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n class=\"slider-text\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [(ngModel)]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n [ngClass]=\"{'red-border': showSliderMaxValueError}\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n class=\"filter-slider\"\r\n [value]=\"sliderMinValue\"\r\n [highValue]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n ></ngx-slider>\r\n </div>\r\n </ng-container>\r\n \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=\"showFilterTooltipTabs\">\r\n <div *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p>\r\n </div>\r\n </div>\r\n\r\n <anna-core-sort-lib *ngIf=\"showSortComponent\" [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all\" [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 (selectedDate) = \"calendarDateChanged($event)\"\r\n [label]=\"selectedLabel\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelInDateFilter()\">Cancel</button>\r\n <button class=\"button\" (click)=\"applyDateFilter()\" [ngClass]=\"{ disabled: disableCalendarApplyBtn }\"\r\n [disabled]=\"disableCalendarApplyBtn\">Apply</button>\r\n </div>\r\n \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 \r\n <div class=\"radio-container\" *ngIf=\"showFilterTooltipTabs\">\r\n <div *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p>\r\n </div>\r\n </div>\r\n\r\n <anna-core-sort-lib *ngIf=\"showSortComponent\" [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\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\" [ngClass]=\"{'error-border': startTimeHourErr}\" [(ngModel)]=\"selectedFromTime[0]\" type=\"text\" (ngModelChange)=\"startTimeHourChange($event)\" />\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\" [ngClass]=\"{'error-border': startTimeMinErr}\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" (ngModelChange)=\"startTimeMinChange($event)\"/>\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]\" [ngClass]=\"{'error-border': endTimeHourErr}\" (ngModelChange)=\"endTimeHourChange($event)\" 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\" [ngClass]=\"{'error-border': endTimeMinErr}\" [(ngModel)]=\"selectedToTime[1]\" (ngModelChange)=\"endTimeMinChange($event)\" 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 </ng-container>\r\n\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 #spotsColumnEquivalizationMessageTooltip>\r\n <p class=\"spot-column-tooltip-message\" >This consists of equivalized spots and un-equivalized Paid Programs & un-equivalized Non-spots.</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>\r\n\r\n<ng-template #postedRatingDifference>\r\n <p class=\"difference-text\">The difference between posted and booked average rating is {{isDifferenceLessThan25Percent ? 'less' : 'more'}} than 25%.</p>\r\n</ng-template>\r\n\r\n<ng-template #postedImpDifference>\r\n <p class=\"difference-text\">The difference between posted and booked average impression is {{isDifferenceLessThan25Percent ? 'less' : 'more'}} than 25%.</p>\r\n</ng-template>\r\n\r\n<ng-template #ongoingRevBookedColumnTooltip>\r\n <p>The Booked $ value, Spots, GRP, CPP, IMPS, CPM corresponds on the last permanent revision generated</p>\r\n</ng-template>\r\n\r\n<ng-template #completedRevBookedColumnTooltip>\r\n <p>The Booked $ value corresponds on the last permanent revision generated</p>\r\n</ng-template>\r\n\r\n<ng-template #circularProgressBar>\r\n <circle-progress\r\n [percent]=\"percentDone\"\r\n [radius]=\"5\"\r\n [showTitle]=\"false\"\r\n [showUnits]=\"false\"\r\n [showSubtitle]=\"false\"\r\n [outerStrokeWidth]=\"3\"\r\n [innerStrokeWidth]=\"3\"\r\n [space]=\"-3\"\r\n [outerStrokeColor]=\"'#268bff'\"\r\n [innerStrokeColor]=\"'#d5d5d5'\"\r\n [animationDuration]=\"10\"\r\n ></circle-progress>\r\n</ng-template>\r\n", styles: [".sort-btn{background:white;border:none;border-right:1px solid #1b88ff;text-decoration:underline;font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.07;letter-spacing:normal;color:#1b88ff;cursor:pointer;flex:1;text-align:center}.sort-btn:last-of-type{border-right:none}.sort-btn.active{color:#202b47;text-decoration:none}p.sort-container{margin-top:8px;padding-bottom:8px;border-bottom:1px solid #e6e6e6;margin-bottom:0;display:flex}::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:230px;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:100%;overflow:hidden}.check-box{font-size:14px;cursor:pointer;position:relative;top:-1px}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 span.ngx-slider-bubble.ngx-slider-model-value{display:block!important;padding:2px!important;box-shadow:#00000059 0 3px 8px!important;height:20px!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#bdbdbd!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 span.ngx-slider-bar{background:#ededed!important;height:3px!important}::ng-deep .filter-slider span.ngx-slider-bar.ngx-slider-selection{background:#bdbdbd!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;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container div{flex:1;width:50%}div.radio-container div.full-width{width:100%}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:0 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.67;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}cdk-virtual-scroll-viewport.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}cdk-virtual-scroll-viewport.dropdown-data-container p.input{margin-left:0}cdk-virtual-scroll-viewport.dropdown-data-container p.input span.mi{padding-left:.4375rem}cdk-virtual-scroll-viewport.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}cdk-virtual-scroll-viewport.dropdown-data-container::-webkit-scrollbar{width:.188rem}cdk-virtual-scroll-viewport.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3;background:lightgray}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}.column-clear-all{width:94%;text-align:center;border:none;font-size:14px;background:none;text-decoration:underline;color:#268bff}.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:center;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-variant.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}span.mdi-filter-variant{color:#cbcbcb;cursor:pointer;font-size:.875rem}span.mdi-filter-variant.active{color:#000}p.filter-tab{font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:normal;color:#1b88ff;border-radius:5px;background-color:#f4f4f4;padding-inline:8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis}p.filter-tab.active{color:#fff;background-color:#1b88ff}button.filter-text-btn{background:white;text-decoration:underline;font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;border:none;color:#268bff;margin-inline:4px;margin-top:2px}button.filter-text-btn:disabled{color:#b1b1b1;cursor:not-allowed}::ng-deep .non-edit-datepicker-tooltip .tooltip-inner{max-width:310px!important;width:263px!important;overflow-y:initial!important}input.slider-text::-webkit-outer-spin-button,input.slider-text::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input.slider-text{-moz-appearance:textfield}input.slider-text.red-border{border:1px solid #f44336!important}::ng-deep .checkbox-sort p.sort-container{margin-top:8px!important;padding-bottom:8px!important}i.mdi-close{cursor:pointer}i.mdi-close.disable-close-icon{pointer-events:none;cursor:not-allowed}input.error-border{border:1px solid #f44336!important}::ng-deep .non-edit-checkbox-tooltip .tooltip-inner{width:238px!important}::ng-deep .non-edit-slider-tooltip .tooltip-inner{width:238px!important}::ng-deep .non-edit-time-tooltip .tooltip-inner{width:250px!important}::ng-deep .no-bottom-border p.sort-container{border-bottom:none!important}.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;position:-webkit-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}.table-container::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}.table-container::-webkit-scrollbar{width:5px;height:5px}.table-container::-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{top:-1px;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}.spots-info-icon{color:#268bff;cursor:pointer;margin-left:2px;margin-top:1px}::ng-deep .spot-info-tooltip .tooltip-inner{left:60px;position:relative;max-width:220px!important;background:#fff;word-break:break-word;display:flex}::ng-deep .spot-info-tooltip-for-orderlisting-table .tooltip-inner{max-width:220px!important;background:#fff;word-break:break-word;display:flex}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}.difference-text{padding:.5rem;color:#000;text-align:left}::ng-deep .posted-avg-tooltip .tooltip-inner{width:13.8125rem!important}::ng-deep .drrBooked-info-tooltip{transform:translate(26px,6px)}::ng-deep .drrBooked-info-tooltip .tooltip-inner{max-width:307px!important;width:242px!important;background:#fff;word-break:break-word;display:flex;padding:4px!important;text-align:left}::ng-deep .drrBooked-info-tooltip .tooltip-inner p{color:#000}::ng-deep .drrBooked-info-tooltip .arrow:before{border-right-color:#fff!important}.clickable-data{cursor:pointer;color:#268bff!important;display:flex!important;align-items:center}.clickable-data .spot-details-download-icons{font-size:12px}.disabled-clickable-data{pointer-events:none;color:#d4d4d4!important}.spot-column-tooltip-message{color:#000;padding:10px;width:max-content;text-align:left}\n"], components: [{ type: i2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i3.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["appearance", "animation", "theme", "loadingText", "count", "ariaLabel"] }, { type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i1.AnnaIconColumnComponent, selector: "anna-core-anna-icon-column", inputs: ["componentName", "objectKey", "dataObject"], outputs: ["onColumnIconClicked"] }, { type: i1.AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: ["width", "marginTop"] }, { type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: ["sortObjectKey"], outputs: ["sortOptionClicked"] }, { type: i2$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { 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", "label", "minDate", "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"] }, { type: i10.CircleProgressComponent, selector: "circle-progress", inputs: ["name", "class", "backgroundGradient", "backgroundColor", "backgroundGradientStopColor", "backgroundOpacity", "backgroundStroke", "backgroundStrokeWidth", "backgroundPadding", "radius", "space", "percent", "toFixed", "maxPercent", "renderOnClick", "units", "unitsFontSize", "unitsFontWeight", "unitsColor", "outerStrokeGradient", "outerStrokeWidth", "outerStrokeColor", "outerStrokeGradientStopColor", "outerStrokeLinecap", "innerStrokeColor", "innerStrokeWidth", "titleFormat", "title", "titleColor", "titleFontSize", "titleFontWeight", "subtitleFormat", "subtitle", "subtitleColor", "subtitleFontSize", "subtitleFontWeight", "imageSrc", "imageHeight", "imageWidth", "animation", "animateTitle", "animateSubtitle", "animationDuration", "showTitle", "showSubtitle", "showUnits", "showImage", "showBackground", "showInnerStroke", "clockwise", "responsive", "startFromZero", "showZeroOuterStroke", "lazy", "options"], outputs: ["onClick"] }], directives: [{ type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i11.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i12.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i2.MatCellDef, selector: "[matCellDef]" }, { type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i11.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i11.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i13.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i13.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i11.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1.showEllipsisTextOnHoverDirective, selector: "[showEllipsisTextOnHover]" }, { type: i13.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: i2$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { type: i2$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { type: i13.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, decorators: [{
1687
+ type: Component,
1688
+ args: [{ selector: 'anna-core-non-editable-generic-table-lib', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-container {{gtGeneralConfig.tableOuterContainerName}}\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\" (scroll)=\"onTableContainerScroll($event)\">\r\n <div\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n class=\"horizontal-scroll-for-table-container\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + (includeBorderInTableHeight ? rowBorderWidth : 0)) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + ( includeBorderInTableHeight ? (2 * rowBorderWidth) : 0))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [dataSource]=\"renderedData\">\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 (showNoDataToDisplay) || \r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n [ngClass]=\"{'no-border-tr': showNoDataToDisplay}\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"(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 \r\n *ngIf=\"column.colName == 'total-potential-booked-unit' && gtGeneralConfig.component == 'RATING';\r\n else columnLowerData\"\r\n class=\"clickable-data\"\r\n (click)=\"spotDetailsDownloadClicked('TOTALROW')\"\r\n [ngClass]=\"{ 'disabled-clickable-data': downloadInProgress }\"\r\n >{{ column.lowerData }}\r\n <span class=\"material-icons spot-details-download-icons\">get_app</span>\r\n <ng-container *ngIf=\"downloadInProgress \r\n && selectedRowTypeForDownload == 'TOTALROW' \">\r\n <ng-container [ngTemplateOutlet]=\"circularProgressBar\"></ng-container>\r\n </ng-container>\r\n </span>\r\n <ng-template #columnLowerData>\r\n <span>{{ column.lowerData }}</span>\r\n </ng-template>\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 #tableHeader 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 == 'spotsColumnEquivalizationMessageTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"spotsColumnEquivalizationMessageTooltip\"\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 <i *ngIf=\"header.tooltip && header.tooltip.name == 'ongoingRevBookedColumnTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ongoingRevBookedColumnTooltip\"\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 == 'completedRevBookedColumnTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"completedRevBookedColumnTooltip\"\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.showTooltipIcon\">\r\n <!-- Active tooltip Functionality -->\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys], \r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top auto\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-checkbox-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-slider-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-datepicker-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\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)\"\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-variant\"\r\n [ngClass]=\"{\r\n active: annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys],\r\n disabled: header.disableTooltipIcon && !(annaFilterService.isFilterSortActive && annaFilterService.isFilterSortActive[header.joinedFilterSortObjectKeys])\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n tooltipClass=\"non-edit-time-tooltip\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!header.showTooltipIcon\">\r\n <span id=\"no-filter-space\"></span><br />\r\n </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 <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + columnDef.headerInfo[0].objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[columnDef.headerInfo[0].objectKey + 'Rowspan']\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\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 <div *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 </div>\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\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\" \r\n [style.border]=\"ROW_DATA.border\"\r\n class=\"{{ROW_DATA.rowClass}}\"\r\n >\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 <ng-container *ngIf=\"tableData.length > 0 && !showNoDataToDisplay\">\r\n <div showEllipsisTextOnHover *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 <anna-core-anna-icon-column [componentName]=\"gtGeneralConfig.component\" [objectKey]=\"subline.objectKey\" [dataObject]=\"ROW_DATA\" (onColumnIconClicked)=\"svgIconClicked($event)\"></anna-core-anna-icon-column>\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 *ngSwitchCase=\"'CLICKABLE_DATA'\">\r\n <span \r\n *ngIf=\"subline.objectKey == 'displayBookedUnits' && gtGeneralConfig.component == 'RATING'\"\r\n class=\"clickable-data\"\r\n (click)=\"spotDetailsDownloadClicked('DATAROW', ROW_DATA)\"\r\n [ngClass]=\"{ 'disabled-clickable-data': downloadInProgress }\"\r\n >{{ ROW_DATA.displayBookedUnits}}\r\n <span class=\"material-icons spot-details-download-icons\">get_app</span>\r\n <ng-container *ngIf=\"downloadInProgress \r\n && ROW_DATA.inventoryCodeId == selectedInventoryIdForDownload \r\n && ROW_DATA.demographic == selectedDemographicForDownload \">\r\n <ng-container [ngTemplateOutlet]=\"circularProgressBar\"></ng-container>\r\n </ng-container>\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n <span>{{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}</span>\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mi mdi-info-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\r\n <i *ngIf=\"subline.objectKey == 'displayBookedAverageRating' && gtGeneralConfig.component == 'RATING' && ROW_DATA['showRatingAverageIcon'] \"\r\n class=\"mi mdi-info-outline seller-tooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n (mouseenter)=\"setIsDifference(ROW_DATA.isDifferenceLessThan25Percent)\"\r\n tooltipClass=\"posted-avg-tooltip\"\r\n [ngbTooltip]=\"postedRatingDifference\"\r\n >\r\n </i>\r\n \r\n <i *ngIf=\"subline.objectKey == 'displayBookedAverageImpression' && gtGeneralConfig.component == 'RATING' && ROW_DATA['showImpressionAverageIcon'] \"\r\n class=\"mi mdi-info-outline seller-tooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n (mouseenter)=\"setIsDifference(ROW_DATA.isDifferenceLessThan25Percent)\"\r\n tooltipClass=\"posted-avg-tooltip\"\r\n [ngbTooltip]=\"postedImpDifference\"\r\n >\r\n </i>\r\n\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 </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"showNoDataToDisplay\">\r\n <div>\r\n {{null}}\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" [marginTop]=\"marginTop\" *ngIf=\"!showSkeletonLoading && showNoDataToDisplay\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n \r\n <div class=\"radio-container\" *ngIf=\"showFilterTooltipTabs\">\r\n <div [ngClass]=\"{'full-width': filterTabObjects.length == 1}\" *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p>\r\n </div>\r\n </div>\r\n \r\n <div class=\"checkbox-sort\" *ngIf=\"showSortComponent\">\r\n <anna-core-sort-lib [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n </div>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\r\n <p class=\"d-flex justify-content-between\">\r\n <button class=\"filter-text-btn\" [disabled]=\"disableClearAll\" (click)=\"unCheckAllCheckbox()\">Clear all</button>\r\n <button class=\"filter-text-btn\" [disabled]=\"disableSelectAll\" (click)=\"selectAllCheckbox()\">Select all</button>\r\n </p>\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)]=\"searchItem\"\r\n (ngModelChange)=\"searchForTheItem($event)\"\r\n />\r\n <i class=\"mdi mdi-close search-bar-close\" [ngClass]=\"{'disable-close-icon': (!searchItem || searchItem.length == 0) }\"\r\n (click)=\"clearSearchedItem()\"></i>\r\n\r\n </p>\r\n <div style=\"position:relative\">\r\n <!-- Track By func -->\r\n <cdk-virtual-scroll-viewport itemSize=\"18\" [style.height.px]=\"heightOfCheckboxTooltipFilter\" class=\"dropdown-data-container\">\r\n <p *cdkVirtualFor=\"let option of tooltipOptions\" class=\"input example-item\" (click)=\"selectUnselectCheckbox(option)\">\r\n <span *ngIf=\"option.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!option.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ option.value }}\" [innerHTML]=\"option.label\"></span>\r\n </p>\r\n </cdk-virtual-scroll-viewport>\r\n <div style=\"position: absolute; top:0; left:0; width:100%; height:100%; pointer-events:none\"></div>\r\n </div>\r\n </ng-container>\r\n\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 <span *ngIf=\"showFilterComponent\">({{ selectedCheckboxOptionsCount == tooltipOptions.length && tooltipOptions.length != 0 && !searchItem? 'All': selectedCheckboxOptionsCount }})</span>\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n \r\n <div class=\"radio-container\" *ngIf=\"showFilterTooltipTabs\">\r\n <div *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p> \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 \r\n <anna-core-sort-lib *ngIf=\"showSortComponent\" [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n class=\"slider-text\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [(ngModel)]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n [ngClass]=\"{'red-border': showSliderMinValueError}\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n class=\"slider-text\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [(ngModel)]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n [ngClass]=\"{'red-border': showSliderMaxValueError}\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n class=\"filter-slider\"\r\n [value]=\"sliderMinValue\"\r\n [highValue]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n ></ngx-slider>\r\n </div>\r\n </ng-container>\r\n \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=\"showFilterTooltipTabs\">\r\n <div *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p>\r\n </div>\r\n </div>\r\n\r\n <anna-core-sort-lib *ngIf=\"showSortComponent\" [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all\" [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 (selectedDate) = \"calendarDateChanged($event)\"\r\n [label]=\"selectedLabel\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelInDateFilter()\">Cancel</button>\r\n <button class=\"button\" (click)=\"applyDateFilter()\" [ngClass]=\"{ disabled: disableCalendarApplyBtn }\"\r\n [disabled]=\"disableCalendarApplyBtn\">Apply</button>\r\n </div>\r\n \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 \r\n <div class=\"radio-container\" *ngIf=\"showFilterTooltipTabs\">\r\n <div *ngFor=\"let data of filterTabObjects\">\r\n <p class=\"filter-tab\" [title]=\"data.label\" (click)=\"populateTooltipDataBasedOnSelectedRadio(data)\" [ngClass]=\"{'active': annaFilterService.selectedRadio == data.key}\" *ngIf=\"filterTabObjects.length > 0\">{{ data.label }}</p>\r\n </div>\r\n </div>\r\n\r\n <anna-core-sort-lib *ngIf=\"showSortComponent\" [ngClass]=\"{'no-bottom-border': !showFilterComponent}\"\r\n (sortOptionClicked)=\"storeSortTypeInTempVariable($event)\" [sortObjectKey]=\"annaFilterService.selectedRadio\"></anna-core-sort-lib>\r\n \r\n <ng-container *ngIf=\"showFilterComponent\">\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\" [ngClass]=\"{'error-border': startTimeHourErr}\" [(ngModel)]=\"selectedFromTime[0]\" type=\"text\" (ngModelChange)=\"startTimeHourChange($event)\" />\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\" [ngClass]=\"{'error-border': startTimeMinErr}\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" (ngModelChange)=\"startTimeMinChange($event)\"/>\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]\" [ngClass]=\"{'error-border': endTimeHourErr}\" (ngModelChange)=\"endTimeHourChange($event)\" 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\" [ngClass]=\"{'error-border': endTimeMinErr}\" [(ngModel)]=\"selectedToTime[1]\" (ngModelChange)=\"endTimeMinChange($event)\" 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 </ng-container>\r\n\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 #spotsColumnEquivalizationMessageTooltip>\r\n <p class=\"spot-column-tooltip-message\" >This consists of equivalized spots and un-equivalized Paid Programs & un-equivalized Non-spots.</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>\r\n\r\n<ng-template #postedRatingDifference>\r\n <p class=\"difference-text\">The difference between posted and booked average rating is {{isDifferenceLessThan25Percent ? 'less' : 'more'}} than 25%.</p>\r\n</ng-template>\r\n\r\n<ng-template #postedImpDifference>\r\n <p class=\"difference-text\">The difference between posted and booked average impression is {{isDifferenceLessThan25Percent ? 'less' : 'more'}} than 25%.</p>\r\n</ng-template>\r\n\r\n<ng-template #ongoingRevBookedColumnTooltip>\r\n <p>The Booked $ value, Spots, GRP, CPP, IMPS, CPM corresponds on the last permanent revision generated</p>\r\n</ng-template>\r\n\r\n<ng-template #completedRevBookedColumnTooltip>\r\n <p>The Booked $ value corresponds on the last permanent revision generated</p>\r\n</ng-template>\r\n\r\n<ng-template #circularProgressBar>\r\n <circle-progress\r\n [percent]=\"percentDone\"\r\n [radius]=\"5\"\r\n [showTitle]=\"false\"\r\n [showUnits]=\"false\"\r\n [showSubtitle]=\"false\"\r\n [outerStrokeWidth]=\"3\"\r\n [innerStrokeWidth]=\"3\"\r\n [space]=\"-3\"\r\n [outerStrokeColor]=\"'#268bff'\"\r\n [innerStrokeColor]=\"'#d5d5d5'\"\r\n [animationDuration]=\"10\"\r\n ></circle-progress>\r\n</ng-template>\r\n", styles: [".sort-btn{background:white;border:none;border-right:1px solid #1b88ff;text-decoration:underline;font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.07;letter-spacing:normal;color:#1b88ff;cursor:pointer;flex:1;text-align:center}.sort-btn:last-of-type{border-right:none}.sort-btn.active{color:#202b47;text-decoration:none}p.sort-container{margin-top:8px;padding-bottom:8px;border-bottom:1px solid #e6e6e6;margin-bottom:0;display:flex}::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:230px;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:100%;overflow:hidden}.check-box{font-size:14px;cursor:pointer;position:relative;top:-1px}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 span.ngx-slider-bubble.ngx-slider-model-value{display:block!important;padding:2px!important;box-shadow:#00000059 0 3px 8px!important;height:20px!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#bdbdbd!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 span.ngx-slider-bar{background:#ededed!important;height:3px!important}::ng-deep .filter-slider span.ngx-slider-bar.ngx-slider-selection{background:#bdbdbd!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;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container div{flex:1;width:50%}div.radio-container div.full-width{width:100%}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:0 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.67;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}cdk-virtual-scroll-viewport.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}cdk-virtual-scroll-viewport.dropdown-data-container p.input{margin-left:0}cdk-virtual-scroll-viewport.dropdown-data-container p.input span.mi{padding-left:.4375rem}cdk-virtual-scroll-viewport.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}cdk-virtual-scroll-viewport.dropdown-data-container::-webkit-scrollbar{width:.188rem}cdk-virtual-scroll-viewport.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3;background:lightgray}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}.column-clear-all{width:94%;text-align:center;border:none;font-size:14px;background:none;text-decoration:underline;color:#268bff}.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:center;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-variant.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}span.mdi-filter-variant{color:#cbcbcb;cursor:pointer;font-size:.875rem}span.mdi-filter-variant.active{color:#000}p.filter-tab{font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:normal;color:#1b88ff;border-radius:5px;background-color:#f4f4f4;padding-inline:8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis}p.filter-tab.active{color:#fff;background-color:#1b88ff}button.filter-text-btn{background:white;text-decoration:underline;font-family:Roboto;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;border:none;color:#268bff;margin-inline:4px;margin-top:2px}button.filter-text-btn:disabled{color:#b1b1b1;cursor:not-allowed}::ng-deep .non-edit-datepicker-tooltip .tooltip-inner{max-width:310px!important;width:263px!important;overflow-y:initial!important}input.slider-text::-webkit-outer-spin-button,input.slider-text::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input.slider-text{-moz-appearance:textfield}input.slider-text.red-border{border:1px solid #f44336!important}::ng-deep .checkbox-sort p.sort-container{margin-top:8px!important;padding-bottom:8px!important}i.mdi-close{cursor:pointer}i.mdi-close.disable-close-icon{pointer-events:none;cursor:not-allowed}input.error-border{border:1px solid #f44336!important}::ng-deep .non-edit-checkbox-tooltip .tooltip-inner{width:238px!important}::ng-deep .non-edit-slider-tooltip .tooltip-inner{width:238px!important}::ng-deep .non-edit-time-tooltip .tooltip-inner{width:250px!important}::ng-deep .no-bottom-border p.sort-container{border-bottom:none!important}.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;position:-webkit-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}.table-container::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}.table-container::-webkit-scrollbar{width:5px;height:5px}.table-container::-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{top:-1px;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}.spots-info-icon{color:#268bff;cursor:pointer;margin-left:2px;margin-top:1px}::ng-deep .spot-info-tooltip .tooltip-inner{left:60px;position:relative;max-width:220px!important;background:#fff;word-break:break-word;display:flex}::ng-deep .spot-info-tooltip-for-orderlisting-table .tooltip-inner{max-width:220px!important;background:#fff;word-break:break-word;display:flex}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}.difference-text{padding:.5rem;color:#000;text-align:left}::ng-deep .posted-avg-tooltip .tooltip-inner{width:13.8125rem!important}::ng-deep .drrBooked-info-tooltip{transform:translate(26px,6px)}::ng-deep .drrBooked-info-tooltip .tooltip-inner{max-width:307px!important;width:242px!important;background:#fff;word-break:break-word;display:flex;padding:4px!important;text-align:left}::ng-deep .drrBooked-info-tooltip .tooltip-inner p{color:#000}::ng-deep .drrBooked-info-tooltip .arrow:before{border-right-color:#fff!important}.clickable-data{cursor:pointer;color:#268bff!important;display:flex!important;align-items:center}.clickable-data .spot-details-download-icons{font-size:12px}.disabled-clickable-data{pointer-events:none;color:#d4d4d4!important}.spot-column-tooltip-message{color:#000;padding:10px;width:max-content;text-align:left}\n"] }]
1689
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AnnaSortService }, { type: i1.AnnaDateTimeFormatService }, { type: i1.AnnaFilterService }, { type: i1.AnnaGenericTableService }]; }, propDecorators: { showSkeletonLoading: [{
1690
+ type: Input
1691
+ }], tableHeaders: [{
1692
+ type: Input
1693
+ }], tableData: [{
1694
+ type: Input
1695
+ }], clonedTableData: [{
1696
+ type: Input
1697
+ }], numberOfSkeletonRows: [{
1698
+ type: Input
1699
+ }], numberOfSkeletonColumns: [{
1700
+ type: Input
1701
+ }], gtGeneralConfig: [{
1702
+ type: Input
1703
+ }], totalRowInfo: [{
1704
+ type: Input
1705
+ }], gtDimension: [{
1706
+ type: Input
1707
+ }], tableClass: [{
1708
+ type: Input
1709
+ }], maximumRowsWhichCanBeRenderedWithoutScroll: [{
1710
+ type: Input
1711
+ }], limit: [{
1712
+ type: Input
1713
+ }], includeBorderInTableHeight: [{
1714
+ type: Input
1715
+ }], downloadInProgress: [{
1716
+ type: Input
1717
+ }], percentDone: [{
1718
+ type: Input
1719
+ }], toggleCheckbox: [{
1720
+ type: Output
1721
+ }], toggleRowCheckbox: [{
1722
+ type: Output
1723
+ }], toggleHeaderCheckbox: [{
1724
+ type: Output
1725
+ }], undoIconClicked: [{
1726
+ type: Output
1727
+ }], filterAppliedToTable: [{
1728
+ type: Output
1729
+ }], sortingAppliedToTable: [{
1730
+ type: Output
1731
+ }], rowClicked: [{
1732
+ type: Output
1733
+ }], radioButtonSelected: [{
1734
+ type: Output
1735
+ }], columnFilterOpened: [{
1736
+ type: Output
1737
+ }], columnFilterClosed: [{
1738
+ type: Output
1739
+ }], gtIconClicked: [{
1740
+ type: Output
1741
+ }], gtSVGIconClicked: [{
1742
+ type: Output
1743
+ }], gtTextActionClicked: [{
1744
+ type: Output
1745
+ }], gtViewDetailClicked: [{
1746
+ type: Output
1747
+ }], downloadSpotDetails: [{
1748
+ type: Output
1749
+ }], viewChildTableHeaders: [{
1750
+ type: ViewChildren,
1751
+ args: ['tableHeader']
1752
+ }] } });
1753
+
1754
+ /**
1755
+ * @license
1756
+ * Copyright Google LLC All Rights Reserved.
1757
+ *
1758
+ * Use of this source code is governed by an MIT-style license that can be
1759
+ * found in the LICENSE file at https://angular.io/license
1760
+ */
1761
+ /** Checks if the given ranges are equal. */
1762
+ function rangesEqual(r1, r2) {
1763
+ return r1.start == r2.start && r1.end == r2.end;
1764
+ }
1765
+ /**
1766
+ * Scheduler to be used for scroll events. Needs to fall back to
1767
+ * something that doesn't rely on requestAnimationFrame on environments
1768
+ * that don't support it (e.g. server-side rendering).
1769
+ */
1770
+ const SCROLL_SCHEDULER = typeof requestAnimationFrame !== "undefined"
1771
+ ? animationFrameScheduler
1772
+ : asapScheduler;
1773
+ /**
1774
+ * A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`.
1775
+ * Uses `top: #px` instead of `transform: translateY(#px)` like the cdk virtual scroll viewport does
1776
+ * which avoids flickering of elements in the transformed container with `position: sticky`.
1777
+ */
1778
+ class AnnaTableVirtualScrollViewportComponent extends CdkScrollable {
1779
+ constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, annaGtService) {
1780
+ super(elementRef, scrollDispatcher, ngZone, dir);
1781
+ this.elementRef = elementRef;
1782
+ this._changeDetectorRef = _changeDetectorRef;
1783
+ this._scrollStrategy = _scrollStrategy;
1784
+ this.annaGtService = annaGtService;
1785
+ /** Emits when the viewport is detached from a CdkVirtualForOf. */
1786
+ this._detachedSubject = new Subject();
1787
+ /** Emits when the rendered range changes. */
1788
+ this._renderedRangeSubject = new Subject();
1789
+ this._orientation = "vertical";
1790
+ // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
1791
+ // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
1792
+ // depending on how the strategy calculates the scrolled index, it may come at a cost to
1793
+ // performance.
1794
+ /** Emits when the index of the first element visible in the viewport changes. */
1795
+ this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));
1796
+ /** A stream that emits whenever the rendered range changes. */
1797
+ this.renderedRangeStream = this._renderedRangeSubject;
1798
+ /**
1799
+ * The total size of all content (in pixels), including content that is not currently rendered.
1800
+ */
1801
+ this._totalContentSize = 0;
1802
+ /** A string representing the `style.width` property value to be used for the spacer element. */
1803
+ this._totalContentWidth = "";
1804
+ /** A string representing the `style.height` property value to be used for the spacer element. */
1805
+ this._totalContentHeight = "";
1806
+ /** The currently rendered range of indices. */
1807
+ this._renderedRange = { start: 0, end: 0 };
1808
+ /** The length of the data bound to this viewport (in number of items). */
1809
+ this._dataLength = 0;
1810
+ /** The size of the viewport (in pixels). */
1811
+ this._viewportSize = 0;
1812
+ /** The last rendered content offset that was set. */
1813
+ this._renderedContentOffset = 0;
1814
+ /**
1815
+ * Whether the last rendered content offset was to the end of the content (and therefore needs to
1816
+ * be rewritten as an offset to the start of the content).
1817
+ */
1818
+ this._renderedContentOffsetNeedsRewrite = false;
1819
+ /** Whether there is a pending change detection cycle. */
1820
+ this._isChangeDetectionPending = false;
1821
+ /** A list of functions to run after the next change detection cycle. */
1822
+ this._runAfterChangeDetection = [];
1823
+ /** Subscription to changes in the viewport size. */
1824
+ this._viewportChanges = Subscription.EMPTY;
1825
+ if (!_scrollStrategy) {
1826
+ throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
1827
+ }
1828
+ this._viewportChanges = viewportRuler.change().subscribe(() => {
1829
+ this.checkViewportSize();
1830
+ });
1831
+ }
1832
+ /** The direction the viewport scrolls. */
1833
+ get orientation() {
1834
+ return this._orientation;
1835
+ }
1836
+ set orientation(orientation) {
1837
+ if (this._orientation !== orientation) {
1838
+ this._orientation = orientation;
1839
+ this._calculateSpacerSize();
1840
+ }
1841
+ }
1842
+ ngOnInit() {
1843
+ super.ngOnInit();
1844
+ // It's still too early to measure the viewport at this point. Deferring with a promise allows
1845
+ // the Viewport to be rendered with the correct size before we measure. We run this outside the
1846
+ // zone to avoid causing more change detection cycles. We handle the change detection loop
1847
+ // ourselves instead.
1848
+ this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
1849
+ this._measureViewportSize();
1850
+ this._scrollStrategy.attach(this);
1851
+ this.elementScrolled()
1852
+ .pipe(
1853
+ // Start off with a fake scroll event so we properly detect our initial position.
1854
+ startWith(null),
1855
+ // Collect multiple events into one until the next animation frame. This way if
1856
+ // there are multiple scroll events in the same frame we only need to recheck
1857
+ // our layout once.
1858
+ auditTime(0, SCROLL_SCHEDULER))
1859
+ .subscribe(() => { this._scrollStrategy.onContentScrolled(); this.annaGtService.virtualScrollSubject.next(true); });
1860
+ this._markChangeDetectionNeeded();
1861
+ }));
1862
+ }
1863
+ ngOnDestroy() {
1864
+ this.detach();
1865
+ this._scrollStrategy.detach();
1866
+ // Complete all subjects
1867
+ this._renderedRangeSubject.complete();
1868
+ this._detachedSubject.complete();
1869
+ this._viewportChanges.unsubscribe();
1870
+ super.ngOnDestroy();
1871
+ }
1872
+ /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
1873
+ attach(forOf) {
1874
+ if (this._forOf) {
1875
+ throw Error("CdkVirtualScrollViewport is already attached.");
1876
+ }
1877
+ // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
1878
+ // changes. Run outside the zone to avoid triggering change detection, since we're managing the
1879
+ // change detection loop ourselves.
1880
+ this.ngZone.runOutsideAngular(() => {
1881
+ this._forOf = forOf;
1882
+ this._forOf.dataStream
1883
+ .pipe(takeUntil(this._detachedSubject))
1884
+ .subscribe(data => {
1885
+ const newLength = data.length;
1886
+ if (newLength !== this._dataLength) {
1887
+ this._dataLength = newLength;
1888
+ this._scrollStrategy.onDataLengthChanged();
1889
+ }
1890
+ this._doChangeDetection();
1891
+ });
1892
+ });
1893
+ }
1894
+ /** Detaches the current `CdkVirtualForOf`. */
1895
+ detach() {
1896
+ this._forOf = null;
1897
+ this._detachedSubject.next();
1898
+ }
1899
+ /** Gets the length of the data bound to this viewport (in number of items). */
1900
+ getDataLength() {
1901
+ return this._dataLength;
1902
+ }
1903
+ /** Gets the size of the viewport (in pixels). */
1904
+ getViewportSize() {
1905
+ return this._viewportSize;
1906
+ }
1907
+ // TODO(mmalerba): This is technically out of sync with what's really rendered until a render
1908
+ // cycle happens. I'm being careful to only call it after the render cycle is complete and before
1909
+ // setting it to something else, but its error prone and should probably be split into
1910
+ // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
1911
+ /** Get the current rendered range of items. */
1912
+ getRenderedRange() {
1913
+ return this._renderedRange;
1914
+ }
1915
+ /**
1916
+ * Sets the total size of all content (in pixels), including content that is not currently
1917
+ * rendered.
1918
+ */
1919
+ setTotalContentSize(size) {
1920
+ if (this._totalContentSize !== size) {
1921
+ this._totalContentSize = size;
1922
+ this._calculateSpacerSize();
1923
+ this._markChangeDetectionNeeded();
1924
+ }
1925
+ }
1926
+ /** Sets the currently rendered range of indices. */
1927
+ setRenderedRange(range) {
1928
+ if (!rangesEqual(this._renderedRange, range)) {
1929
+ this._renderedRangeSubject.next((this._renderedRange = range));
1930
+ this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());
1931
+ }
1932
+ }
1933
+ /**
1934
+ * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).
1935
+ */
1936
+ getOffsetToRenderedContentStart() {
1937
+ return this._renderedContentOffsetNeedsRewrite
1938
+ ? null
1939
+ : this._renderedContentOffset;
1940
+ }
1941
+ /**
1942
+ * Sets the offset from the start of the viewport to either the start or end of the rendered data
1943
+ * (in pixels).
1944
+ */
1945
+ setRenderedContentOffset(offset) {
1946
+ let top = `${Number(offset)}px`;
1947
+ this._renderedContentOffset = offset;
1948
+ if (this._renderedContentTransform != top) {
1949
+ // We know this value is safe because we parse `offset` with `Number()` before passing it
1950
+ // into the string.
1951
+ this._renderedContentTransform = top;
1952
+ this._markChangeDetectionNeeded(() => {
1953
+ if (this._renderedContentOffsetNeedsRewrite) {
1954
+ this._renderedContentOffset -= this.measureRenderedContentSize();
1955
+ this._renderedContentOffsetNeedsRewrite = false;
1956
+ this.setRenderedContentOffset(this._renderedContentOffset);
1957
+ }
1958
+ else {
1959
+ this._scrollStrategy.onRenderedOffsetChanged();
1960
+ }
1961
+ });
1962
+ }
1963
+ }
1964
+ /**
1965
+ * Scrolls to the given offset from the start of the viewport. Please note that this is not always
1966
+ * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left
1967
+ * direction, this would be the equivalent of setting a fictional `scrollRight` property.
1968
+ * @param offset The offset to scroll to.
1969
+ * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
1970
+ */
1971
+ scrollToOffset(offset, behavior = "auto") {
1972
+ const options = { behavior, top: offset };
1973
+ this.scrollTo(options);
1974
+ }
1975
+ /**
1976
+ * Scrolls to the offset for the given index.
1977
+ * @param index The index of the element to scroll to.
1978
+ * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
1979
+ */
1980
+ scrollToIndex(index, behavior = "auto") {
1981
+ this._scrollStrategy.scrollToIndex(index, behavior);
1982
+ }
1983
+ /**
1984
+ * Gets the current scroll offset from the start of the viewport (in pixels).
1985
+ * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'
1986
+ * in horizontal mode.
1987
+ */
1988
+ // CHANGES@ANNALIB added override to functions
1989
+ measureScrollOffset(from) {
1990
+ return from
1991
+ ? super.measureScrollOffset(from)
1992
+ : super.measureScrollOffset("top");
1993
+ }
1994
+ /** Measure the combined size of all of the rendered items. */
1995
+ measureRenderedContentSize() {
1996
+ const contentEl = this._contentWrapper.nativeElement;
1997
+ return contentEl.offsetHeight;
1998
+ }
1999
+ /**
2000
+ * Measure the total combined size of the given range. Throws if the range includes items that are
2001
+ * not rendered.
2002
+ */
2003
+ measureRangeSize(range) {
2004
+ if (!this._forOf) {
2005
+ return 0;
2006
+ }
2007
+ return this._forOf.measureRangeSize(range, this.orientation);
2008
+ }
2009
+ /** Update the viewport dimensions and re-render. */
2010
+ checkViewportSize() {
2011
+ // TODO: Cleanup later when add logic for handling content resize
2012
+ this._measureViewportSize();
2013
+ this._scrollStrategy.onDataLengthChanged();
2014
+ }
2015
+ /** Measure the viewport size. */
2016
+ _measureViewportSize() {
2017
+ const viewportEl = this.elementRef.nativeElement;
2018
+ this._viewportSize = viewportEl.clientHeight;
2019
+ }
2020
+ /** Queue up change detection to run. */
2021
+ _markChangeDetectionNeeded(runAfter) {
2022
+ if (runAfter) {
2023
+ this._runAfterChangeDetection.push(runAfter);
2024
+ }
2025
+ // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of
2026
+ // properties sequentially we only have to run `_doChangeDetection` once at the end.
2027
+ if (!this._isChangeDetectionPending) {
2028
+ this._isChangeDetectionPending = true;
2029
+ this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
2030
+ this._doChangeDetection();
2031
+ }));
2032
+ }
2033
+ }
2034
+ /** Run change detection. */
2035
+ _doChangeDetection() {
2036
+ this._isChangeDetectionPending = false;
2037
+ // Apply the content transform. The transform can't be set via an Angular binding because
2038
+ // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
2039
+ // string literals, a variable that can only be 'X' or 'Y', and user input that is run through
2040
+ // the `Number` function first to coerce it to a numeric value.
2041
+ this._contentWrapper.nativeElement.style.top = this._renderedContentTransform;
2042
+ // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
2043
+ // from the root, since the repeated items are content projected in. Calling `detectChanges`
2044
+ // instead does not properly check the projected content.
2045
+ this.ngZone.run(() => this._changeDetectorRef.markForCheck());
2046
+ const runAfterChangeDetection = this._runAfterChangeDetection;
2047
+ this._runAfterChangeDetection = [];
2048
+ for (const fn of runAfterChangeDetection) {
2049
+ fn();
2050
+ }
2051
+ }
2052
+ /** Calculates the `style.width` and `style.height` for the spacer element. */
2053
+ _calculateSpacerSize() {
2054
+ this._totalContentHeight = `${this._totalContentSize}px`;
2055
+ this._totalContentWidth = "";
2056
+ }
2057
+ }
2058
+ 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$1.ScrollDispatcher }, { token: i2$1.ViewportRuler }, { token: i1.AnnaGenericTableService }], target: i0.ɵɵFactoryTarget.Component });
2059
+ 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: [
2060
+ {
2061
+ provide: CdkScrollable,
2062
+ useExisting: AnnaTableVirtualScrollViewportComponent
2063
+ },
2064
+ {
2065
+ provide: CdkVirtualScrollViewport,
2066
+ useExisting: AnnaTableVirtualScrollViewportComponent
2067
+ }
2068
+ ], 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 });
2069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaTableVirtualScrollViewportComponent, decorators: [{
2070
+ type: Component,
2071
+ args: [{ selector: "anna-table-virtual-scroll-viewport", host: {
2072
+ class: "anna-table-virtual-scroll-viewport",
2073
+ "[class.anna-table-virtual-scroll-orientation-horizontal]": 'orientation === "horizontal"',
2074
+ "[class.anna-table-virtual-scroll-orientation-vertical]": 'orientation !== "horizontal"'
2075
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
2076
+ {
2077
+ provide: CdkScrollable,
2078
+ useExisting: AnnaTableVirtualScrollViewportComponent
2079
+ },
2080
+ {
2081
+ provide: CdkVirtualScrollViewport,
2082
+ useExisting: AnnaTableVirtualScrollViewportComponent
2083
+ }
2084
+ ], 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"] }]
2085
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
2086
+ type: Optional
2087
+ }, {
2088
+ type: Inject,
2089
+ args: [VIRTUAL_SCROLL_STRATEGY]
2090
+ }] }, { type: i1$1.Directionality, decorators: [{
2091
+ type: Optional
2092
+ }] }, { type: i2$1.ScrollDispatcher }, { type: i2$1.ViewportRuler }, { type: i1.AnnaGenericTableService }]; }, propDecorators: { orientation: [{
2093
+ type: Input
2094
+ }], scrolledIndexChange: [{
2095
+ type: Output
2096
+ }], _contentWrapper: [{
2097
+ type: ViewChild,
2098
+ args: ["contentWrapper", { static: true }]
2099
+ }] } });
2100
+
2101
+ /**
2102
+ * A custom scroll strategy that accepts a static row height, static header height,
2103
+ * and a buffer size. The strategy
2104
+ */
2105
+ class AnnaFixedRowSizeTableVirtualScrollStrategy {
2106
+ constructor(rowHeight, buffer, headerHeight) {
2107
+ this._scrolledIndexChange = new Subject();
2108
+ this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());
2109
+ this.updateRowHeightAndBuffer(rowHeight, buffer, headerHeight);
2110
+ }
2111
+ /**
2112
+ * Attaches this scroll strategy to a viewport.
2113
+ * @param viewport The viewport to attach this strategy to.
2114
+ */
2115
+ attach(viewport) {
2116
+ this.viewport = viewport;
2117
+ this.updateTotalContentSize();
2118
+ this.updateRenderedRange();
2119
+ }
2120
+ /**
2121
+ * Detaches this scroll strategy from the currently attached viewport.
2122
+ */
2123
+ detach() {
2124
+ this._scrolledIndexChange.complete();
2125
+ this.viewport = null;
2126
+ }
2127
+ onContentScrolled() {
2128
+ this.updateRenderedRange();
2129
+ }
2130
+ onDataLengthChanged() {
2131
+ this.updateTotalContentSize();
2132
+ this.updateRenderedRange();
2133
+ }
2134
+ onContentRendered() {
2135
+ // This method is useful for virtual scroll strategies that measure the rendered
2136
+ // content to determine its height. This scroll strategy assumes that rows have
2137
+ // a static height, so there's no need to implement this method.
2138
+ }
2139
+ onRenderedOffsetChanged() {
2140
+ // Similar to onContentRendered, this method is useful for virtual scroll strategies
2141
+ // that need to track the offset as it changes. This scroll strategy is always able
2142
+ // to calculate the correct offset from other values, so there's no need to implement
2143
+ // this method.
2144
+ }
2145
+ scrollToIndex(index, behavior) {
2146
+ this.viewport?.scrollToOffset(index * this.rowHeight, behavior);
2147
+ }
2148
+ /**
2149
+ * Update the item size and buffer size.
2150
+ * @param rowHeight The height of a row in the virtually scrolling table.
2151
+ * @param buffer The number of rows to buffer outside the viewport.
2152
+ * @param headerHeight The total height of the table header, including all header rows.
2153
+ */
2154
+ updateRowHeightAndBuffer(rowHeight, buffer, headerHeight) {
2155
+ this.rowHeight = rowHeight;
2156
+ this.buffer = buffer;
2157
+ this.headerHeight = headerHeight;
2158
+ this.updateTotalContentSize();
2159
+ this.updateRenderedRange();
2160
+ }
2161
+ updateRenderedRange() {
2162
+ if (!this.viewport) {
2163
+ return;
2164
+ }
2165
+ const viewportSize = this.viewport.getViewportSize();
2166
+ const dataLength = this.viewport.getDataLength();
2167
+ const scrollOffset = this.viewport.measureScrollOffset();
2168
+ // the index of the first item that would be at least partially visible in the viewport
2169
+ let firstVisibleIndex = Math.floor((scrollOffset + this.headerHeight) / this.rowHeight);
2170
+ // if the buffer size is 10 but the first visible item is at, say, index 7
2171
+ // then the buffered items must be 7, because we don't have 10 items available to buffer.
2172
+ const bufferedItems = Math.min(AnnaFilterService.bufferSize, firstVisibleIndex);
2173
+ const itemsInViewport = Math.ceil(viewportSize / this.rowHeight);
2174
+ const itemsToRender = itemsInViewport + this.buffer;
2175
+ // Clamp the new range between 0 and dataLength
2176
+ const newStart = Math.max(0, firstVisibleIndex - bufferedItems);
2177
+ const newEnd = Math.min(dataLength, firstVisibleIndex + itemsToRender);
2178
+ const newRange = {
2179
+ start: newStart,
2180
+ end: newEnd
2181
+ };
2182
+ const newOffset = this.rowHeight * (firstVisibleIndex - bufferedItems);
2183
+ this.viewport.setRenderedContentOffset(newOffset);
2184
+ this.viewport.setRenderedRange(newRange);
2185
+ this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));
2186
+ }
2187
+ updateTotalContentSize() {
2188
+ this.viewport?.setTotalContentSize(this.viewport.getDataLength() * this.rowHeight);
2189
+ }
2190
+ }
2191
+ /**
2192
+ * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created
2193
+ * `FixedSizeVirtualScrollStrategy` from the given directive.
2194
+ * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the
2195
+ * `FixedSizeVirtualScrollStrategy` from.
2196
+ */
2197
+ function fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {
2198
+ return fixedSizeDir.scrollStrategy;
2199
+ }
2200
+ class AnnaFixedRowSizeTableVirtualScrollStrategyDirective {
2201
+ constructor() {
2202
+ this._rowHeight = 30;
2203
+ this._headerRowHeight = 30;
2204
+ this._buffer = 20;
2205
+ this._headerRows = null;
2206
+ this.headerRowCount = 1;
2207
+ /** The scroll strategy used by this directive. */
2208
+ this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
2209
+ }
2210
+ /** The height of rows in the table (in pixels). Defaults to 30. */
2211
+ set rowHeight(value) { this._rowHeight = coerceNumberProperty(value); }
2212
+ get rowHeight() { return this._rowHeight; }
2213
+ /**
2214
+ * The height of header rows in the table (in pixels). Defaults to 30.
2215
+ */
2216
+ set headerRowHeight(value) { this._headerRowHeight = coerceNumberProperty(value); }
2217
+ get headerRowHeight() { return this._headerRowHeight; }
2218
+ /**
2219
+ * The number of buffered rows rendered beyond the viewport.
2220
+ * If the number of buffered rows dips below this number, more rows will be rendered. Defaults to 20.
2221
+ */
2222
+ set buffer(value) {
2223
+ this._buffer = coerceNumberProperty(value);
2224
+ }
2225
+ get buffer() { return this._buffer; }
2226
+ set headerRows(value) { this._headerRows = coerceNumberProperty(value, undefined); }
2227
+ get headerRows() { return this._headerRows; }
2228
+ ngOnChanges(change) {
2229
+ if (this.headerRows != undefined || this.headerRowsQuery) {
2230
+ this.handleChange();
2231
+ }
2232
+ if (change['buffer']?.previousValue != change['buffer']?.currentValue) {
2233
+ AnnaFilterService.bufferSize = this.buffer;
2234
+ this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
2235
+ }
2236
+ }
2237
+ ngAfterContentInit() {
2238
+ this.headerRowsQuery.changes.subscribe(() => {
2239
+ this.handleChange();
2240
+ });
2241
+ }
2242
+ handleChange() {
2243
+ this.scrollStrategy.updateRowHeightAndBuffer(this.rowHeight, this.buffer,
2244
+ // Use the explicit headerRows input value if set.
2245
+ // Otherwise, fall back to the QueryList length.
2246
+ this.headerRowHeight * (this._headerRows ?? this.headerRowsQuery.length));
2247
+ }
2248
+ }
2249
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2250
+ 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: [
2251
+ {
2252
+ provide: VIRTUAL_SCROLL_STRATEGY,
2253
+ useFactory: fixedSizeVirtualScrollStrategyFactory,
2254
+ deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
2255
+ }
2256
+ ], queries: [{ propertyName: "headerRowsQuery", predicate: MatHeaderRowDef }], usesOnChanges: true, ngImport: i0 });
2257
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, decorators: [{
2258
+ type: Directive,
2259
+ args: [{
2260
+ selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]",
2261
+ providers: [
2262
+ {
2263
+ provide: VIRTUAL_SCROLL_STRATEGY,
2264
+ useFactory: fixedSizeVirtualScrollStrategyFactory,
2265
+ deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
2266
+ }
2267
+ ]
2268
+ }]
2269
+ }], propDecorators: { rowHeight: [{
2270
+ type: Input
2271
+ }], headerRowHeight: [{
2272
+ type: Input
2273
+ }], buffer: [{
2274
+ type: Input
2275
+ }], headerRows: [{
2276
+ type: Input
2277
+ }], headerRowsQuery: [{
2278
+ type: ContentChildren,
2279
+ args: [MatHeaderRowDef]
2280
+ }] } });
2281
+
2282
+ /**
2283
+ * Directive that wraps a given data source in a "virtual" data source that emits
2284
+ * the slice of the original data source that matches the range that should be rendered
2285
+ * in the containing virtual scroll viewport.
2286
+ */
2287
+ class AnnaVirtualTableDirective {
2288
+ constructor(elementRef, viewport, table, ngZone, _coalescedStyleScheduler) {
2289
+ this.viewport = viewport;
2290
+ this.table = table;
2291
+ this._coalescedStyleScheduler = _coalescedStyleScheduler;
2292
+ this.virtualizedDataStream = new Subject();
2293
+ this.dataSourceChanges = new Subject();
2294
+ /** The raw, unvirtualized data stream. Emits whenever the data in the current DataSource changes. */
2295
+ this.dataStream = this.dataSourceChanges
2296
+ .pipe(
2297
+ // Start off with null data source.
2298
+ startWith(null),
2299
+ // Bundle up the previous and current data sources so we can work with both.
2300
+ pairwise(),
2301
+ // Use `changeDataSource` to disconnect from the previous data source and connect to the
2302
+ // new one, passing back a stream of data changes which we run through `switchMap` to give
2303
+ // us a data stream that emits the latest data from whatever the current data source is.
2304
+ switchMap(([prev, cur]) => this.changeDataSource(prev, cur)),
2305
+ // Replay the last emitted data when someone subscribes.
2306
+ shareReplay(1));
2307
+ this.viewChange = new Subject();
2308
+ this.destroyed$ = new Subject();
2309
+ this.renderedRange = { start: 0, end: 0 };
2310
+ this.isNativeHtmlTable = false;
2311
+ table.dataSource = this.virtualizedDataStream;
2312
+ this.isNativeHtmlTable = elementRef.nativeElement.tagName === 'TABLE';
2313
+ this.dataStream.subscribe(data => {
2314
+ this.data = data;
2315
+ this.onRenderedDataChange();
2316
+ });
2317
+ viewport.renderedRangeStream.pipe(takeUntil(this.destroyed$)).subscribe((range) => {
2318
+ this.renderedRange = range;
2319
+ ngZone.run(() => this.viewChange.next(range));
2320
+ this.onRenderedDataChange();
2321
+ });
2322
+ viewport.attach(this);
2323
+ }
2324
+ set dataSource(value) {
2325
+ this._dataSource = value;
2326
+ if (isDataSource(value)) {
2327
+ this.dataSourceChanges.next(value);
2328
+ }
2329
+ else {
2330
+ this.dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));
2331
+ }
2332
+ }
2333
+ get dataSource() {
2334
+ return this._dataSource;
2335
+ }
2336
+ ngOnInit() {
2337
+ // 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.
2338
+ // This removes the need to account for the translation in the `top` of the sticky header rows.
2339
+ if (this.viewport instanceof AnnaTableVirtualScrollViewportComponent) {
2340
+ return;
2341
+ }
2342
+ this.viewport.scrolledIndexChange
2343
+ .pipe(map$1(() => this.viewport.getOffsetToRenderedContentStart()), takeUntil(this.destroyed$))
2344
+ .subscribe((offset) => {
2345
+ // We need to set the `style.top` property of the sticky header rows
2346
+ // to the negative value of the virtual scroll viewport's offset, so
2347
+ // make the offset negative.
2348
+ offset = -offset;
2349
+ const stickyStates = this.headerRowDefs.map(rowDef => rowDef.sticky);
2350
+ // This logic is exactly the same as what's in the StickyStyler (literally copy + paste).
2351
+ // The only difference is that the `stickyOffset` variable starts at the virtual scroll
2352
+ // viewport container's offset instead of starting at zero.
2353
+ const rows = this.table._getRenderedRows(this.table._headerRowOutlet);
2354
+ const stickyOffsets = [];
2355
+ const stickyCellHeights = [];
2356
+ const elementsToStick = [];
2357
+ for (let rowIndex = 0, stickyOffset = offset; rowIndex < rows.length; rowIndex++) {
2358
+ stickyOffsets[rowIndex] = stickyOffset;
2359
+ if (!stickyStates[rowIndex]) {
2360
+ continue;
2361
+ }
2362
+ const row = rows[rowIndex];
2363
+ elementsToStick[rowIndex] = this.isNativeHtmlTable ? Array.from(row.children) : [row];
2364
+ const height = row.getBoundingClientRect().height;
2365
+ stickyOffset += height;
2366
+ stickyCellHeights[rowIndex] = height;
2367
+ }
2368
+ // Using the CoalescedStyleScheduler here is optional. It'll work without it,
2369
+ // and CoalescedStyleScheduler is not public (yet?), so feel free to remove it.
2370
+ this._coalescedStyleScheduler.schedule(() => {
2371
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
2372
+ if (!stickyStates[rowIndex]) {
2373
+ continue;
2374
+ }
2375
+ for (const element of elementsToStick[rowIndex]) {
2376
+ element.style.top = `${stickyOffsets[rowIndex]}px`;
2377
+ }
2378
+ }
2379
+ });
2380
+ });
2381
+ }
2382
+ ngOnDestroy() {
2383
+ this.destroyed$.next();
2384
+ this.dataSourceChanges.complete();
2385
+ this.virtualizedDataStream.complete();
2386
+ }
2387
+ /** React to scroll state changes in the viewport. */
2388
+ onRenderedDataChange() {
2389
+ if (!this.renderedRange) {
2390
+ return;
2391
+ }
2392
+ this.renderedItems = this.data.slice(this.renderedRange.start, this.renderedRange.end + 1);
2393
+ // delegate rendering to the table by emitting from the virtualizedDataStream
2394
+ this.virtualizedDataStream.next(this.renderedItems);
2395
+ }
2396
+ /** Swap out one data source for another. */
2397
+ changeDataSource(oldDataSource, newDs) {
2398
+ oldDataSource?.disconnect(this);
2399
+ return newDs ? newDs.connect(this) : of();
2400
+ }
2401
+ /**
2402
+ * This method is only used by the experimental AutoSizeVirtualScrollStrategy.
2403
+ * We're not using that strategy, but I've implemented it just to show how it oculd be done.
2404
+ * I'm not actually sure if this works.
2405
+ */
2406
+ measureRangeSize(range, orientation) {
2407
+ if (orientation === 'horizontal' || range.end < range.start) {
2408
+ // virtual scrolling columns are not supported by this directive
2409
+ return 0;
2410
+ }
2411
+ const renderedBodyRows = this.table._getRenderedRows(this.table._rowOutlet);
2412
+ const firstRow = renderedBodyRows[range.start];
2413
+ const lastRow = renderedBodyRows[range.end];
2414
+ if (!firstRow || !lastRow) {
2415
+ return 0;
2416
+ }
2417
+ // We need to include all header and footer rows in the sum, since they're always rendered
2418
+ const renderedHeaderRows = this.table._getRenderedRows(this.table._headerRowOutlet);
2419
+ const renderedFooterRows = this.table._getRenderedRows(this.table._footerRowOutlet);
2420
+ // 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?
2421
+ const headerHeight = renderedHeaderRows.reduce((sum, row) => {
2422
+ return sum += row.getBoundingClientRect().height;
2423
+ }, 0);
2424
+ const footerHeight = renderedFooterRows.reduce((sum, row) => {
2425
+ return sum += row.getBoundingClientRect().height;
2426
+ }, 0);
2427
+ const bodyHeight = lastRow.getBoundingClientRect().bottom - firstRow.getBoundingClientRect().top;
2428
+ return headerHeight + footerHeight + bodyHeight;
2429
+ }
2430
+ }
2431
+ AnnaVirtualTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, deps: [{ token: i0.ElementRef }, { token: i2$1.CdkVirtualScrollViewport }, { token: i2$2.CdkTable }, { token: i0.NgZone }, { token: _COALESCED_STYLE_SCHEDULER }], target: i0.ɵɵFactoryTarget.Directive });
2432
+ 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 });
2433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, decorators: [{
2434
+ type: Directive,
2435
+ args: [{
2436
+ selector: '[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]',
2437
+ providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: AnnaVirtualTableDirective }]
2438
+ }]
2439
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$1.CdkVirtualScrollViewport }, { type: i2$2.CdkTable }, { type: i0.NgZone }, { type: i2$2._CoalescedStyleScheduler, decorators: [{
2440
+ type: Inject,
2441
+ args: [_COALESCED_STYLE_SCHEDULER]
2442
+ }] }]; }, propDecorators: { dataSource: [{
2443
+ type: Input,
2444
+ args: ['appVirtualDataSource']
2445
+ }], headerRowDefs: [{
2446
+ type: ContentChildren,
2447
+ args: [CdkHeaderRowDef]
2448
+ }] } });
2449
+
2450
+ // Angular import statements
2451
+ class AnnaGenericTableLibModule {
2452
+ }
2453
+ AnnaGenericTableLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2454
+ AnnaGenericTableLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, declarations: [AnnaNonEditableGenericTableComponent,
2455
+ AnnaSortComponent,
2456
+ AnnaTableVirtualScrollViewportComponent,
2457
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2458
+ AnnaVirtualTableDirective], imports: [CommonModule,
2459
+ NgbModule,
2460
+ AnnaDropdownLibModule,
2461
+ MatButtonToggleModule,
2462
+ FormsModule,
2463
+ NgxSliderModule,
2464
+ NgxSkeletonLoaderModule,
2465
+ MatTableModule,
2466
+ MatRadioModule,
2467
+ ScrollingModule,
2468
+ AnnaCoreSharedLibModule,
2469
+ AnnaCoreSharedLibModule, i10.NgCircleProgressModule], exports: [AnnaNonEditableGenericTableComponent,
2470
+ AnnaSortComponent,
2471
+ AnnaTableVirtualScrollViewportComponent,
2472
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2473
+ AnnaVirtualTableDirective] });
2474
+ AnnaGenericTableLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, imports: [[
2475
+ CommonModule,
2476
+ NgbModule,
2477
+ AnnaDropdownLibModule,
2478
+ MatButtonToggleModule,
2479
+ FormsModule,
2480
+ NgxSliderModule,
2481
+ NgxSkeletonLoaderModule,
2482
+ MatTableModule,
2483
+ MatRadioModule,
2484
+ ScrollingModule,
2485
+ AnnaCoreSharedLibModule,
2486
+ AnnaCoreSharedLibModule,
2487
+ NgCircleProgressModule.forRoot({
2488
+ radius: 100,
2489
+ outerStrokeWidth: 16,
2490
+ innerStrokeWidth: 8,
2491
+ outerStrokeColor: '#78C000',
2492
+ innerStrokeColor: '#C7E596',
2493
+ animationDuration: 300,
2494
+ }),
2495
+ ]] });
2496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, decorators: [{
2497
+ type: NgModule,
2498
+ args: [{
2499
+ declarations: [
2500
+ AnnaNonEditableGenericTableComponent,
2501
+ AnnaSortComponent,
2502
+ AnnaTableVirtualScrollViewportComponent,
2503
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2504
+ AnnaVirtualTableDirective,
2505
+ ],
2506
+ imports: [
2507
+ CommonModule,
2508
+ NgbModule,
2509
+ AnnaDropdownLibModule,
2510
+ MatButtonToggleModule,
2511
+ FormsModule,
2512
+ NgxSliderModule,
2513
+ NgxSkeletonLoaderModule,
2514
+ MatTableModule,
2515
+ MatRadioModule,
2516
+ ScrollingModule,
2517
+ AnnaCoreSharedLibModule,
2518
+ AnnaCoreSharedLibModule,
2519
+ NgCircleProgressModule.forRoot({
2520
+ radius: 100,
2521
+ outerStrokeWidth: 16,
2522
+ innerStrokeWidth: 8,
2523
+ outerStrokeColor: '#78C000',
2524
+ innerStrokeColor: '#C7E596',
2525
+ animationDuration: 300,
2526
+ }),
2527
+ ],
2528
+ exports: [
2529
+ AnnaNonEditableGenericTableComponent,
2530
+ AnnaSortComponent,
2531
+ AnnaTableVirtualScrollViewportComponent,
2532
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2533
+ AnnaVirtualTableDirective
2534
+ ]
2535
+ }]
2536
+ }] });
2537
+
2538
+ //Modules
2539
+
2540
+ /**
2541
+ * Generated bundle index. Do not edit.
2542
+ */
2543
+
2544
+ export { AnnaFixedRowSizeTableVirtualScrollStrategy, AnnaFixedRowSizeTableVirtualScrollStrategyDirective, AnnaGenericTableLibModule, AnnaNonEditableGenericTableComponent, AnnaSortComponent, AnnaTableVirtualScrollViewportComponent, AnnaVirtualTableDirective, fixedSizeVirtualScrollStrategyFactory };
2545
+ //# sourceMappingURL=annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map