@annalib/anna-core 3.0.0 → 3.1.2

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