@annalib/anna-core 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +24 -0
  2. package/annalib-anna-core.d.ts +5 -0
  3. package/esm2020/annalib-anna-core.mjs +5 -0
  4. package/esm2020/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +59 -0
  5. package/esm2020/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
  6. package/esm2020/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
  7. package/esm2020/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
  8. package/esm2020/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
  9. package/esm2020/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.mjs +21 -0
  10. package/esm2020/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
  11. package/esm2020/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
  12. package/esm2020/lib/anna-core-shared-lib/index.mjs +2 -0
  13. package/esm2020/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
  14. package/esm2020/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
  15. package/esm2020/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
  16. package/esm2020/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +26 -0
  17. package/esm2020/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
  18. package/esm2020/lib/anna-core-shared-lib/public-api.mjs +25 -0
  19. package/esm2020/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +180 -0
  20. package/esm2020/lib/anna-core-shared-lib/services/anna-filter.service.mjs +537 -0
  21. package/esm2020/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +52 -0
  22. package/esm2020/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
  23. package/esm2020/lib/anna-core-shared-lib/services/anna-sort.service.mjs +185 -0
  24. package/esm2020/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
  25. package/esm2020/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +76 -0
  26. package/esm2020/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +360 -0
  27. package/esm2020/lib/anna-dropdown-lib/index.mjs +2 -0
  28. package/esm2020/lib/anna-dropdown-lib/public-api.mjs +6 -0
  29. package/esm2020/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +86 -0
  30. package/esm2020/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +991 -0
  31. package/esm2020/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +125 -0
  32. package/esm2020/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
  33. package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.mjs +189 -0
  34. package/esm2020/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
  35. package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
  36. package/esm2020/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
  37. package/esm2020/lib/anna-generic-table-lib/index.mjs +2 -0
  38. package/esm2020/lib/anna-generic-table-lib/public-api.mjs +10 -0
  39. package/esm2020/public-api.mjs +7 -0
  40. package/esm2020/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.mjs +59 -0
  41. package/esm2020/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +5 -0
  42. package/esm2020/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.mjs +15 -0
  43. package/esm2020/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.mjs +15 -0
  44. package/esm2020/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.mjs +22 -0
  45. package/esm2020/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.mjs +15 -0
  46. package/esm2020/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.mjs +21 -0
  47. package/esm2020/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.mjs +15 -0
  48. package/esm2020/src/lib/anna-core-shared-lib/constants/shared.constant.mjs +34 -0
  49. package/esm2020/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.mjs +2 -0
  50. package/esm2020/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.mjs +2 -0
  51. package/esm2020/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.mjs +3 -0
  52. package/esm2020/src/lib/anna-core-shared-lib/models/anna-tooltip.model.mjs +26 -0
  53. package/esm2020/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.mjs +31 -0
  54. package/esm2020/src/lib/anna-core-shared-lib/public-api.mjs +25 -0
  55. package/esm2020/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.mjs +180 -0
  56. package/esm2020/src/lib/anna-core-shared-lib/services/anna-filter.service.mjs +537 -0
  57. package/esm2020/src/lib/anna-core-shared-lib/services/anna-generic-table.service.mjs +52 -0
  58. package/esm2020/src/lib/anna-core-shared-lib/services/anna-global-config.service.mjs +133 -0
  59. package/esm2020/src/lib/anna-core-shared-lib/services/anna-sort.service.mjs +185 -0
  60. package/esm2020/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.mjs +43 -0
  61. package/esm2020/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +5 -0
  62. package/esm2020/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.mjs +76 -0
  63. package/esm2020/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.mjs +360 -0
  64. package/esm2020/src/lib/anna-dropdown-lib/public-api.mjs +6 -0
  65. package/esm2020/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.mjs +86 -0
  66. package/esm2020/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +5 -0
  67. package/esm2020/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.mjs +991 -0
  68. package/esm2020/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.mjs +125 -0
  69. package/esm2020/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.mjs +357 -0
  70. package/esm2020/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.mjs +189 -0
  71. package/esm2020/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.mjs +2 -0
  72. package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.mjs +178 -0
  73. package/esm2020/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.mjs +2 -0
  74. package/esm2020/src/lib/anna-generic-table-lib/public-api.mjs +10 -0
  75. package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1295 -0
  76. package/fesm2015/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
  77. package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +474 -0
  78. package/fesm2015/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
  79. package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +1887 -0
  80. package/fesm2015/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
  81. package/fesm2015/annalib-anna-core.mjs +3630 -0
  82. package/fesm2015/annalib-anna-core.mjs.map +1 -0
  83. package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs +1295 -0
  84. package/fesm2020/annalib-anna-core-src-lib-anna-core-shared-lib.mjs.map +1 -0
  85. package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs +472 -0
  86. package/fesm2020/annalib-anna-core-src-lib-anna-dropdown-lib.mjs.map +1 -0
  87. package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs +1886 -0
  88. package/fesm2020/annalib-anna-core-src-lib-anna-generic-table-lib.mjs.map +1 -0
  89. package/fesm2020/annalib-anna-core.mjs +3627 -0
  90. package/fesm2020/annalib-anna-core.mjs.map +1 -0
  91. package/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +14 -0
  92. package/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
  93. package/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
  94. package/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
  95. package/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
  96. package/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts +11 -0
  97. package/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
  98. package/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
  99. package/lib/anna-core-shared-lib/index.d.ts +1 -0
  100. package/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +8 -0
  101. package/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts +95 -0
  102. package/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts +70 -0
  103. package/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +21 -0
  104. package/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
  105. package/lib/anna-core-shared-lib/public-api.d.ts +18 -0
  106. package/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
  107. package/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +68 -0
  108. package/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
  109. package/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
  110. package/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +23 -0
  111. package/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
  112. package/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +29 -0
  113. package/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +67 -0
  114. package/lib/anna-dropdown-lib/index.d.ts +1 -0
  115. package/lib/anna-dropdown-lib/public-api.d.ts +3 -0
  116. package/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +21 -0
  117. package/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +171 -0
  118. package/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +27 -0
  119. package/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
  120. package/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.d.ts +89 -0
  121. package/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts +1 -0
  122. package/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
  123. package/lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts +1 -0
  124. package/lib/anna-generic-table-lib/index.d.ts +1 -0
  125. package/lib/anna-generic-table-lib/public-api.d.ts +6 -0
  126. package/package.json +61 -0
  127. package/public-api.d.ts +3 -0
  128. package/src/lib/anna-core-shared-lib/anna-core-shared-lib.module.d.ts +14 -0
  129. package/src/lib/anna-core-shared-lib/annalib-anna-core-src-lib-anna-core-shared-lib.d.ts +5 -0
  130. package/src/lib/anna-core-shared-lib/components/anna-buyer-approval-icon-template/anna-buyer-approval-icon-template.component.d.ts +8 -0
  131. package/src/lib/anna-core-shared-lib/components/anna-live-icon-template/anna-live-icon-template.component.d.ts +8 -0
  132. package/src/lib/anna-core-shared-lib/components/anna-no-data/anna-no-data.component.d.ts +11 -0
  133. package/src/lib/anna-core-shared-lib/components/anna-notify-icon-template/anna-notify-icon-template.component.d.ts +8 -0
  134. package/src/lib/anna-core-shared-lib/components/anna-pay-for-performance-icon-template/anna-pay-for-performance-icon-template.component.d.ts +11 -0
  135. package/src/lib/anna-core-shared-lib/components/anna-rejected-icon-template/anna-rejected-icon-template.component.d.ts +8 -0
  136. package/src/lib/anna-core-shared-lib/constants/shared.constant.d.ts +32 -0
  137. package/src/lib/anna-core-shared-lib/models/anna-generic-data-type.model.d.ts +8 -0
  138. package/src/lib/anna-core-shared-lib/models/anna-global-dropdown-config.model.d.ts +95 -0
  139. package/src/lib/anna-core-shared-lib/models/anna-non-editable-gt-models.d.ts +70 -0
  140. package/src/lib/anna-core-shared-lib/models/anna-tooltip.model.d.ts +21 -0
  141. package/src/lib/anna-core-shared-lib/package.json +10 -0
  142. package/src/lib/anna-core-shared-lib/pipes/annaFilterSearchedText.pipe.d.ts +9 -0
  143. package/src/lib/anna-core-shared-lib/public-api.d.ts +18 -0
  144. package/src/lib/anna-core-shared-lib/services/anna-date-time-format.service.d.ts +25 -0
  145. package/src/lib/anna-core-shared-lib/services/anna-filter.service.d.ts +68 -0
  146. package/src/lib/anna-core-shared-lib/services/anna-generic-table.service.d.ts +14 -0
  147. package/src/lib/anna-core-shared-lib/services/anna-global-config.service.d.ts +21 -0
  148. package/src/lib/anna-core-shared-lib/services/anna-sort.service.d.ts +23 -0
  149. package/src/lib/anna-dropdown-lib/anna-dropdown-lib.module.d.ts +11 -0
  150. package/src/lib/anna-dropdown-lib/annalib-anna-core-src-lib-anna-dropdown-lib.d.ts +5 -0
  151. package/src/lib/anna-dropdown-lib/components/anna-calendar-filter/anna-calendar-filter.component.d.ts +29 -0
  152. package/src/lib/anna-dropdown-lib/components/anna-week-calendar-filter/anna-week-calendar-filter.component.d.ts +67 -0
  153. package/src/lib/anna-dropdown-lib/package.json +10 -0
  154. package/src/lib/anna-dropdown-lib/public-api.d.ts +3 -0
  155. package/src/lib/anna-generic-table-lib/anna-generic-table-lib.module.d.ts +21 -0
  156. package/src/lib/anna-generic-table-lib/annalib-anna-core-src-lib-anna-generic-table-lib.d.ts +5 -0
  157. package/src/lib/anna-generic-table-lib/components/anna-non-editable-generic-table/anna-non-editable-generic-table.component.d.ts +171 -0
  158. package/src/lib/anna-generic-table-lib/components/anna-sort/anna-sort.component.d.ts +27 -0
  159. package/src/lib/anna-generic-table-lib/components/anna-table-virtual-scroll-viewport/anna-table-virtual-scroll-viewport.component.d.ts +141 -0
  160. package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/anna-fixed-row-size-table-virtual-scroll-strategy.directive.d.ts +89 -0
  161. package/src/lib/anna-generic-table-lib/directives/anna-fixed-row-size-table-virtual-scroll-strategy/index.d.ts +1 -0
  162. package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/anna-virtual-table.directive.d.ts +45 -0
  163. package/src/lib/anna-generic-table-lib/directives/anna-virtual-table/index.d.ts +1 -0
  164. package/src/lib/anna-generic-table-lib/package.json +10 -0
  165. package/src/lib/anna-generic-table-lib/public-api.d.ts +6 -0
@@ -0,0 +1,3627 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, ChangeDetectionStrategy, NgModule, ViewEncapsulation, Optional, Inject, ViewChild, forwardRef, Directive, ContentChildren, ViewChildren, Pipe, Injectable } from '@angular/core';
3
+ import * as i10 from '@angular/common';
4
+ import { DatePipe, CommonModule } from '@angular/common';
5
+ import * as i1 from '@ng-bootstrap/ng-bootstrap';
6
+ import { NgbDate, NgbModule } from '@ng-bootstrap/ng-bootstrap';
7
+ import moment from 'moment';
8
+ import * as i1$1 from '@annalib/anna-core/src/lib/anna-core-shared-lib';
9
+ import { AnnaCoreSharedLibModule as AnnaCoreSharedLibModule$1, AnnaFilterService as AnnaFilterService$1, radioButtonModel as radioButtonModel$1 } from '@annalib/anna-core/src/lib/anna-core-shared-lib';
10
+ import * as i14 from '@angular/forms';
11
+ import { FormsModule } from '@angular/forms';
12
+ import * as i6 from '@angular/material/radio';
13
+ import { MatRadioModule } from '@angular/material/radio';
14
+ import * as i9 from '@angular/material/button-toggle';
15
+ import { MatButtonToggleModule } from '@angular/material/button-toggle';
16
+ import * as i3 from '@angular/material/table';
17
+ import { MatHeaderRowDef, MatTableModule } from '@angular/material/table';
18
+ import * as i7 from '@angular-slider/ngx-slider';
19
+ import { NgxSliderModule } from '@angular-slider/ngx-slider';
20
+ import * as i5 from 'ngx-skeleton-loader';
21
+ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
22
+ import { cloneDeep, map as map$1, uniq, isEqual, memoize, min, max, sortBy } from 'lodash-es';
23
+ import * as i1$2 from '@angular/cdk/bidi';
24
+ import { animationFrameScheduler, asapScheduler, Subject, Observable, Subscription, isObservable, of } from 'rxjs';
25
+ import { startWith, auditTime, takeUntil, distinctUntilChanged, pairwise, switchMap, shareReplay, map } from 'rxjs/operators';
26
+ import * as i2 from '@angular/cdk/scrolling';
27
+ import { CdkScrollable, VIRTUAL_SCROLL_STRATEGY, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
28
+ import * as i8 from '@annalib/anna-core/src/lib/anna-dropdown-lib';
29
+ import { AnnaDropdownLibModule as AnnaDropdownLibModule$1 } from '@annalib/anna-core/src/lib/anna-dropdown-lib';
30
+ import { coerceNumberProperty } from '@angular/cdk/coercion';
31
+ import { isDataSource, ArrayDataSource } from '@angular/cdk/collections';
32
+ import * as i2$1 from '@angular/cdk/table';
33
+ import { _COALESCED_STYLE_SCHEDULER, STICKY_POSITIONING_LISTENER, CdkHeaderRowDef } from '@angular/cdk/table';
34
+
35
+ // Angular import statements
36
+ class AnnaWeekCalendarComponent {
37
+ constructor(calendar, datePickerConfig, annaDateTimeFormatService, globalConfigService) {
38
+ this.calendar = calendar;
39
+ this.datePickerConfig = datePickerConfig;
40
+ this.annaDateTimeFormatService = annaDateTimeFormatService;
41
+ this.globalConfigService = globalConfigService;
42
+ this.hoveredDate = null;
43
+ this.toDate = null;
44
+ this.weekNumbers = [];
45
+ this.dateToDisplay = "";
46
+ this.multiSelectDropdownOpen = false;
47
+ this.calendarMap = new Map();
48
+ this.disabledDates = [];
49
+ this.applyWeekCalendarChanges = new EventEmitter();
50
+ this.calendarToggled = new EventEmitter();
51
+ }
52
+ ngOnChanges(changes) {
53
+ //if some values are not sent, setting the default values
54
+ this._defaultValues = this.globalConfigService.defaultWeekCalendarConfig;
55
+ this.config = { ...this._defaultValues, ...this.config };
56
+ if (this.config.selectCurrentWeek) {
57
+ this.initializeWeekData();
58
+ this.fromDate && this.selectWeek(this.fromDate);
59
+ }
60
+ this.formatter = this.formattedDates();
61
+ if (this.selectedFromDate && this.selectedEndDate && this.config) {
62
+ // this.selectWeek(this.fromDate);
63
+ this.fromDate = NgbDate.from(this.selectedFromDate);
64
+ this.toDate = NgbDate.from(this.selectedEndDate);
65
+ this.weekNumberGenerator();
66
+ this.displayToUI();
67
+ this.setCalendarMap();
68
+ }
69
+ if (this.disabledDates.length > 0) {
70
+ this.disabledFunc = (date, current) => {
71
+ return this.checkIfDateIsDisabled(date);
72
+ };
73
+ }
74
+ }
75
+ getWeekNumber(week, firstDayOfWeek) {
76
+ const weekStartDate = moment(convertNgbDateToMoment(week[0]), "MM/DD/YYYY");
77
+ const weekYear = weekStartDate.year();
78
+ const yearStartDate = moment(`01/01/${weekYear}`, "MM/DD/YYYY");
79
+ const weekDay = yearStartDate.day();
80
+ const noOfDays = weekStartDate.diff(yearStartDate, "d") + 1;
81
+ function convertNgbDateToMoment(ngbDate) {
82
+ let converted = moment();
83
+ converted.month(ngbDate.month - 1);
84
+ converted.date(ngbDate.day);
85
+ converted.year(ngbDate.year);
86
+ return converted.format("MM/DD/YYYY");
87
+ }
88
+ function checkIfYearIsBroadcastLeapYear() {
89
+ let isLeapYear = (weekYear % 4 == 0 && weekYear % 100 != 0) || weekYear % 400 == 0;
90
+ return (isLeapYear && (weekDay == 0 || weekDay == 6)) || (!isLeapYear && weekDay == 0);
91
+ }
92
+ const isLeapYear = checkIfYearIsBroadcastLeapYear();
93
+ const divider = isLeapYear ? 53 : 52;
94
+ const adder = isLeapYear ? 2 : 1;
95
+ let broadcastNumberOfDays = weekDay + noOfDays;
96
+ let broadcastWeekNumber = broadcastNumberOfDays % 7 > 0 ? broadcastNumberOfDays / 7 + adder : broadcastNumberOfDays / 7;
97
+ if (Math.floor(broadcastWeekNumber % divider) === 0) {
98
+ return divider;
99
+ }
100
+ return Math.floor(broadcastWeekNumber % divider);
101
+ }
102
+ ngAfterViewInit() {
103
+ // CHANGES@ANNALIB Changed this.
104
+ // this.calendar["__proto__"].getWeekNumber = this.getWeekNumber;
105
+ Object.setPrototypeOf(this.calendar, { getWeekNumber: this.getWeekNumber });
106
+ }
107
+ ngOnInit() {
108
+ // this.selectWeek(this.fromDate);
109
+ this.setCalendarMap();
110
+ }
111
+ initializeWeekData() {
112
+ this.weekObjects = [];
113
+ this.fromDate = this.calendar.getToday();
114
+ this.today = this.calendar.getToday();
115
+ let backDatedPeriod = JSON.parse(localStorage.getItem("userDetails") || '{}').locking_period_days;
116
+ if (backDatedPeriod < 0) {
117
+ let date = this.calendar.getPrev(this.calendar.getToday(), "d", Math.abs(backDatedPeriod));
118
+ this.today = NgbDate.from(date);
119
+ this.fromDate = NgbDate.from(date);
120
+ }
121
+ // Disable months before numberOfMonthsToEnable
122
+ this.datePickerConfig.markDisabled = (date) => {
123
+ let previousMonth = this.calendar.getPrev(this.today, "m", this.config.numberOfMonthsToEnableInPast);
124
+ let previousDay = this.calendar.getPrev(previousMonth, "d", 1);
125
+ return !NgbDate.from(previousDay).before(date);
126
+ };
127
+ this.formatter = this.formattedDates();
128
+ this.flag1 = false;
129
+ this.flag2 = false;
130
+ }
131
+ selectWeek(date) {
132
+ const dateObject = new Date(date.year, date.month - 1, date.day);
133
+ let constructDate = this.buildDate(dateObject);
134
+ if (!this.config.selectMultipleWeeks) {
135
+ //Single week selection
136
+ this.fromDate = this.constructStartDate(dateObject)(constructDate);
137
+ this.toDate = this.constructEndDate(dateObject)(constructDate);
138
+ this.weekNumberGenerator();
139
+ }
140
+ else {
141
+ if (date.before(this.fromDate)) {
142
+ this.fromDate = this.constructStartDate(dateObject)(constructDate);
143
+ if (this.flag1) {
144
+ this.toDate = this.constructEndDate(dateObject)(constructDate);
145
+ }
146
+ this.flag1 = !this.flag1;
147
+ }
148
+ else if (date.after(this.toDate)) {
149
+ if (this.flag2) {
150
+ this.fromDate = this.constructStartDate(dateObject)(constructDate);
151
+ //this.toDate = this.constructEndDate(dateObject)(constructDate);
152
+ }
153
+ this.flag2 = !this.flag2;
154
+ this.toDate = this.constructEndDate(dateObject)(constructDate);
155
+ }
156
+ else {
157
+ this.fromDate = this.constructStartDate(dateObject)(constructDate);
158
+ this.toDate = this.constructEndDate(dateObject)(constructDate);
159
+ }
160
+ if (this.disabledDates.length > 0) {
161
+ let momentStartDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.fromDate), "MM/DD/YYYY");
162
+ let momentEndDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.toDate), "MM/DD/YYYY");
163
+ let ngbDate;
164
+ while (!momentStartDate.isSame(momentEndDate)) {
165
+ ngbDate = this.annaDateTimeFormatService.convertToNgbDate(momentStartDate, "MM/DD/YYYY");
166
+ if (this.checkIfDateIsDisabled(ngbDate)) {
167
+ break;
168
+ }
169
+ momentStartDate.add(1, "d");
170
+ }
171
+ let newDateObject = new Date(ngbDate.year, ngbDate.month - 1, ngbDate.day - 1);
172
+ let constructDate = this.buildDate(newDateObject);
173
+ this.toDate = this.constructEndDate(newDateObject)(constructDate);
174
+ }
175
+ this.weekNumberGenerator();
176
+ }
177
+ if (!this.config.showAsDropdown) {
178
+ this.applyChanges();
179
+ }
180
+ }
181
+ weekNumberGenerator() {
182
+ let dates = [];
183
+ let week = [];
184
+ let startDate = NgbDate.from(this.fromDate);
185
+ let endDate = NgbDate.from(this.toDate);
186
+ week.push(startDate);
187
+ while (endDate != null && !startDate.equals(endDate)) {
188
+ let date = this.calendar.getNext(startDate, "d", 1);
189
+ startDate = date;
190
+ week.push(date);
191
+ // Collect all days in week to calculate the week number
192
+ if (week.length == 7) {
193
+ dates.push(week);
194
+ week = [];
195
+ }
196
+ }
197
+ if (((this.config.maxWeeksToSelect ?? 0) > 0 && dates.length > (this.config.maxWeeksToSelect ?? 0))) {
198
+ dates.splice((this.config.maxWeeksToSelect ?? 0), dates.length - (this.config.maxWeeksToSelect ?? 0));
199
+ }
200
+ this.selectedDates(dates);
201
+ this.weekNumbers = [];
202
+ this.weekObjects = [];
203
+ if (dates.length > 0) {
204
+ for (let date of dates) {
205
+ this.weekNumbers.push(" Week " + this.calendar.getWeekNumber(date, this.config.firstDayOfWeek));
206
+ let dates = this.formatter(date[0], date[6]);
207
+ let dateObjects = { startDate: dates.formattedStartDate, endDate: dates.formattedEndDate };
208
+ this.weekObjects.push(dateObjects);
209
+ }
210
+ }
211
+ this.displayToUI();
212
+ }
213
+ selectedDates(dates) {
214
+ this.fromDate = dates[0][0];
215
+ this.toDate = dates[dates.length - 1][6];
216
+ }
217
+ formattedDates() {
218
+ let pipe = new DatePipe("en-US");
219
+ let thisObj = this;
220
+ return function (fromDate, toDate) {
221
+ let fromDateObject = new Date(fromDate.year, fromDate.month - 1, fromDate.day);
222
+ let toDateObject = new Date(toDate.year, toDate.month - 1, toDate.day);
223
+ thisObj.formattedStartDate = pipe.transform(fromDateObject, thisObj.config.dateFormatForRequest);
224
+ thisObj.formattedEndDate = pipe.transform(toDateObject, thisObj.config.dateFormatForRequest);
225
+ thisObj.dateToDisplay =
226
+ pipe.transform(fromDateObject, thisObj.config.dateFormatToDisplay) +
227
+ " to " +
228
+ pipe.transform(toDateObject, thisObj.config.dateFormatToDisplay);
229
+ return thisObj;
230
+ };
231
+ }
232
+ displayToUI() {
233
+ if (!this.config.selectMultipleWeeks && this.fromDate && this.toDate) {
234
+ // Display for only Single Week
235
+ this.formatter(this.fromDate, this.toDate);
236
+ }
237
+ else {
238
+ // Display for Multiple Weeks
239
+ if (this.weekNumbers.length > (this.config.maxWeeksToShowWithRemainingCount ?? 0)) {
240
+ let weekDisplay = [];
241
+ for (let i = 0; i < (this.config.maxWeeksToShowWithRemainingCount ?? 0); i++) {
242
+ weekDisplay.push(this.weekNumbers.shift());
243
+ }
244
+ let remainingWeeks = this.weekNumbers.length;
245
+ this.weekNumbers = [];
246
+ this.weekNumbers.push(weekDisplay + " +" + remainingWeeks);
247
+ }
248
+ }
249
+ }
250
+ constructStartDate(date) {
251
+ let firstDayOfWeek = this.config.firstDayOfWeek;
252
+ return function (constructDate) {
253
+ let startDay = date.getDay() != 0 ? (firstDayOfWeek ?? 0) - date.getDay() : -6;
254
+ return constructDate(startDay);
255
+ };
256
+ }
257
+ constructEndDate(date) {
258
+ let firstDayOfWeek = this.config.firstDayOfWeek;
259
+ return function (constructDate) {
260
+ let endDay = date.getDay() != 0 ? (firstDayOfWeek ?? 0) + 6 - date.getDay() : 0;
261
+ return constructDate(endDay);
262
+ };
263
+ }
264
+ buildDate(date) {
265
+ return function (number) {
266
+ let day = date.getDate() + number;
267
+ const dateObject = new Date(date.getFullYear(), date.getMonth(), day);
268
+ let ngbDateObject = {};
269
+ ngbDateObject.day = day;
270
+ if (ngbDateObject.day > 31 || ngbDateObject.day < 1) {
271
+ ngbDateObject.day = dateObject.getDate();
272
+ }
273
+ ngbDateObject.month = dateObject.getMonth() + 1;
274
+ ngbDateObject.year = dateObject.getFullYear();
275
+ return NgbDate.from(ngbDateObject);
276
+ };
277
+ }
278
+ isHovered(date) {
279
+ return this.fromDate && !this.toDate && this.hoveredDate && date.after(this.fromDate) && date.before(this.hoveredDate);
280
+ }
281
+ isInside(date) {
282
+ return this.toDate && date.after(this.fromDate) && date.before(this.toDate);
283
+ }
284
+ isRange(date) {
285
+ return (date.equals(this.fromDate) || (this.toDate && date.equals(this.toDate)) || this.isInside(date) || this.isHovered(date));
286
+ }
287
+ previousWeek() {
288
+ if (this.fromDate) {
289
+ this.toDate = this.calendar.getPrev(this.fromDate, "d", 1);
290
+ this.fromDate = this.calendar.getPrev(this.fromDate, "d", this.calendar.getDaysPerWeek());
291
+ }
292
+ this.weekNumberGenerator();
293
+ this.applyChanges();
294
+ }
295
+ nextWeek() {
296
+ if (this.fromDate) {
297
+ this.fromDate = this.calendar.getNext(this.fromDate, "d", this.calendar.getDaysPerWeek());
298
+ this.toDate = this.calendar.getNext(this.fromDate, "d", this.calendar.getDaysPerWeek() - 1);
299
+ }
300
+ this.weekNumberGenerator();
301
+ this.applyChanges();
302
+ }
303
+ setCalendarMap() {
304
+ let dateObj = { fromDate: this.fromDate, toDate: this.toDate };
305
+ this.calendarMap.set("oldDates", dateObj);
306
+ }
307
+ applyChanges() {
308
+ this.multiSelectDropdownOpen = false;
309
+ if (!this.config.emitMultipleWeekObjects) {
310
+ let dates = {};
311
+ let formattedDates = this.formatter(this.fromDate, this.toDate);
312
+ dates.startDate = formattedDates.formattedStartDate;
313
+ dates.endDate = formattedDates.formattedEndDate;
314
+ this.applyWeekCalendarChanges.emit(dates);
315
+ }
316
+ else {
317
+ this.applyWeekCalendarChanges.emit(this.weekObjects);
318
+ }
319
+ this.setCalendarMap();
320
+ }
321
+ isFocused(value) {
322
+ this.calendarToggled.emit(value);
323
+ }
324
+ isDropdownOpenedForCalendar(datepicker) {
325
+ this.datepicker = datepicker;
326
+ if (this.datepicker.isOpen()) {
327
+ this.revertDates();
328
+ this.datepicker.close();
329
+ this.multiSelectDropdownOpen = false;
330
+ }
331
+ else {
332
+ this.datepicker.open();
333
+ this.multiSelectDropdownOpen = true;
334
+ }
335
+ }
336
+ revertDates() {
337
+ this.multiSelectDropdownOpen = false;
338
+ if (this.calendarMap.get("oldDates")) {
339
+ let dateObj = this.calendarMap.get("oldDates");
340
+ this.fromDate = dateObj.fromDate;
341
+ this.toDate = dateObj.toDate;
342
+ this.weekNumberGenerator();
343
+ this.displayToUI();
344
+ }
345
+ }
346
+ checkIfDateIsDisabled(date) {
347
+ const validatorFunc = (ngbDate) => ngbDate.year === date.year && ngbDate.month === date.month && ngbDate.day === date.day;
348
+ return this.disabledDates.some(validatorFunc);
349
+ }
350
+ closeDatepicker(datepickerRef) {
351
+ datepickerRef.close();
352
+ }
353
+ }
354
+ AnnaWeekCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaWeekCalendarComponent, deps: [{ token: i1.NgbCalendar }, { token: i1.NgbDatepickerConfig }, { token: i1$1.AnnaDateTimeFormatService }, { token: i1$1.AnnaGlobalConfigService }], target: i0.ɵɵFactoryTarget.Component });
355
+ AnnaWeekCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaWeekCalendarComponent, selector: "anna-core-week-calendar-filter-lib", inputs: { selectedFromDate: ["from-date", "selectedFromDate"], selectedEndDate: ["to-date", "selectedEndDate"], disabledDates: ["disabled-dates", "disabledDates"], maxDate: "maxDate", minDate: "minDate", config: ["week-calendar-config", "config"] }, outputs: { applyWeekCalendarChanges: "apply", calendarToggled: "toggle-calendar" }, usesOnChanges: true, ngImport: i0, template: "<form class=\"form-inline\" *ngIf=\"config.showAsDropdown\">\r\n <div class=\"form-group hidden\">\r\n <div class=\"input-group\">\r\n <input\r\n name=\"datepicker\"\r\n class=\"form-control\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n [autoClose]=\"false\"\r\n (dateSelect)=\"selectWeek($event)\"\r\n (closed)=\"isFocused(false)\"\r\n [displayMonths]=\"1\"\r\n [dayTemplate]=\"t\"\r\n [startDate]=\"fromDate!\"\r\n [firstDayOfWeek]=\"config.firstDayOfWeek\"\r\n [showWeekNumbers]=\"config.showWeekNumbers\"\r\n tabindex=\"-1\"\r\n style=\"display: none\"\r\n [footerTemplate]=\"footerTemplate\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <!--Single week select-->\r\n <div *ngIf=\"!config.selectMultipleWeeks\">\r\n <span style=\"position: relative; left: 30px; font-size: 12px\"> &nbsp;{{ weekNumbers }} </span>\r\n <div class=\"form-group\">\r\n <div class=\"input-group\">\r\n <div class=\"single-week\">\r\n <div class=\"left\">\r\n <span class=\"material-icons next-round-btn\" (click)=\"previousWeek()\"> navigate_next </span>\r\n </div>\r\n <input\r\n #dpFromDate\r\n class=\"form-control\"\r\n placeholder=\"Select Weeks\"\r\n [ngClass]=\"[config.customClass == '' ? '' : config.customClass]\"\r\n name=\"dpFromDate\"\r\n [value]=\"dateToDisplay\"\r\n [readonly]=\"true\"\r\n (click)=\"isFocused(true); isDropdownOpenedForCalendar(datepicker)\"\r\n />\r\n <i class=\"mdi mdi-menu-down\" *ngIf='!datepicker.isOpen()' (click)=\"datepicker.open()\"></i>\r\n <i class='mdi mdi-menu-up' *ngIf=\"datepicker.isOpen()\" (click)=\"isDropdownOpenedForCalendar(datepicker)\"></i>\r\n <div class=\"right\">\r\n <span class=\"material-icons round-btn\" (click)=\"nextWeek()\"> navigate_next </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!--Multiple week select-->\r\n <div class=\"form-group\" *ngIf=\"config.selectMultipleWeeks\">\r\n <div class=\"input-group\">\r\n <div class=\"multiple-weeks\">\r\n <input\r\n #dpFromDate\r\n class=\"form-control\"\r\n placeholder=\"Select Weeks\"\r\n [ngClass]=\"[config.customClass == '' ? '' : config.customClass]\"\r\n name=\"dpFromDate\"\r\n [readonly]=\"true\"\r\n [value]=\"weekNumbers\"\r\n (click)=\"isFocused(true); isDropdownOpenedForCalendar(datepicker)\"\r\n />\r\n <i *ngIf=\"!multiSelectDropdownOpen\" class=\"mdi mdi-menu-down multiselect-input-arrow\"></i>\r\n <i *ngIf=\"multiSelectDropdownOpen\" class=\"mdi mdi-menu-up multiselect-input-arrow\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n\r\n<ngb-datepicker\r\n #weekPicker\r\n *ngIf=\"!config.showAsDropdown\"\r\n [displayMonths]=\"1\"\r\n [startDate]=\"fromDate!\"\r\n [firstDayOfWeek]=\"config.firstDayOfWeek\"\r\n [showWeekNumbers]=\"config.showWeekNumbers\"\r\n [dayTemplate]=\"t\"\r\n [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\"\r\n (dateSelect)=\"selectWeek($event)\"\r\n [markDisabled]=\"disabledFunc\"\r\n>\r\n</ngb-datepicker>\r\n\r\n<ng-template #footerTemplate>\r\n <hr class=\"my-0\" />\r\n <button\r\n class=\"btn btn-primary btn-sm m-2 float-right\"\r\n (click)=\"applyChanges(); closeDatepicker(datepicker)\"\r\n style=\"background-color: #268bff; color: #ffffff\"\r\n >\r\n Apply\r\n </button>\r\n <button\r\n class=\"btn btn-primary btn-sm m-2 float-right\"\r\n (click)=\"revertDates(); closeDatepicker(datepicker)\"\r\n style=\"background-color: rgba(38, 139, 255, 0.12); color: #268bff\"\r\n >\r\n Cancel\r\n </button>\r\n</ng-template>\r\n\r\n<ng-template #t let-date let-focused=\"focused\" let-disabled=\"disabled\">\r\n <span\r\n class=\"custom-day\"\r\n [class.focused]=\"focused\"\r\n [class.range]=\"isRange(date)\"\r\n [class.faded]=\"isHovered(date) || isInside(date)\"\r\n [class.disabled]=\"disabled\"\r\n (mouseenter)=\"hoveredDate = date\"\r\n (mouseleave)=\"hoveredDate = null\"\r\n >\r\n {{ date.day }}\r\n </span>\r\n</ng-template>\r\n\r\n<!--\r\n\r\n<hr>\r\n\r\n<pre>From: {{ fromDate | json }} </pre>\r\n<pre>To: {{ toDate | json }} </pre>\r\n<pre>weekNumbers: {{ weekNumbers | json }} </pre>\r\n\r\n-->\r\n", styles: [":host::ng-deep .right{width:unset!important;background-color:#fff!important}:host::ng-deep .ngb-dp-day,:host::ng-deep .ngb-dp-weekday{width:3rem!important;font-style:unset!important;color:#8bac2a;outline:none}:host::ng-deep .ngb-dp-day:first-child{border:1px solid black}:host::ng-deep .ngb-dp-day.disabled{color:#d4d4d4;cursor:not-allowed}:host::ng-deep .ngb-dp-showweek:before{content:\"Weeks\";margin-right:5px}:host::ng-deep .ngb-dp-week-number{font-style:unset!important;width:4rem!important;margin-right:5px;font-weight:700;color:#000!important;border-right:1px solid rgba(0,0,0,.125)}:host::ng-deep .ngb-dp-week-number:before{font-style:unset!important;content:\"Week \"}:host::ng-deep .ngb-dp-weekday.ngb-dp-showweek{margin-right:5px;width:4rem!important;border-right:1px solid rgba(0,0,0,.125)}:host::ng-deep .dropdown-menu{box-shadow:none}:host::ng-deep .dropdown-menu.show{top:15px!important}:host::ng-deep .bg-light{background-color:#fff!important}:host::ng-deep .ngb-dp-weekdays{border-top:1px solid rgba(0,0,0,.125)}:host::ng-deep .ngb-dp-arrow-btn:focus{box-shadow:none}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:1.75rem;font-weight:700;color:#222b45;width:3rem!important}.custom-day.focused{background-color:#fff}.custom-day.faded{background-color:#0275d880!important}.custom-day.faded:focus{outline:none!important}.custom-day:hover{background-color:#268bff1f!important;color:#4a4a4a!important}.custom-day:focus{outline:none!important}.custom-day.range{background-color:#268bff1f!important;color:#4a4a4a!important}.custom-day.range:focus{outline:none!important}.custom-day.disabled{color:#d3d3d3}.input-group>.single-week,.input-group .multiple-weeks{display:inline-flex!important}.input-group>.single-week>.form-control,.input-group .multiple-weeks>.form-control{width:212px;border-radius:2px;border:solid 1px #b3b3b3;height:1.875rem;cursor:pointer}.input-group>.form-control{width:212px;border-radius:2px;border:solid 1px #b3b3b3;height:1.875rem;cursor:pointer}.form-control[readonly]{background-color:#fff!important}.next-round-btn{transform:rotate(180deg);margin-left:.125rem;line-height:1.3;border-radius:50%;cursor:pointer}.round-btn{line-height:1.3;border-radius:50%;cursor:pointer;margin-left:.25rem}:host::ng-deep select.custom-select{background:none;-webkit-appearance:auto;appearance:auto}.left,.right{width:1.875rem!important;height:1.875rem;background:#d8d8d8!important;border-radius:50%}.left{margin-right:.3125rem}.right{margin-left:.3125rem}:host::ng-deep .right .ngb-dp-navigation-chevron,:host::ng-deep .ngb-dp-navigation-chevron{color:#268bff}:host::ng-deep .ngb-dp-arrow-btn:focus{outline-width:0px}.custom-day.faded{background-color:#268bff33;color:#000;font-weight:600}.custom-day{text-align:center;padding:.185rem .25rem;color:#000;display:inline-block;line-height:1.9;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:#268bff;color:#fff;font-weight:600}:host::ng-deep div.ngb-dp-weekday{color:#8bac2a;font-family:Roboto;font-size:.8125rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:2.6;letter-spacing:normal}.mdi-menu-up,.mdi-menu-down{position:absolute;right:2.438rem;top:1px;font-size:1.375rem;cursor:pointer}.multiselect-input-arrow{position:absolute;right:.75rem;top:3px;font-size:1.25rem;cursor:pointer;pointer-events:none}button:focus{outline:none;box-shadow:none;border-color:transparent}::ng-deep .ngb-dp-header,::ng-deep .ngb-dp-week{background:white!important}\n"], components: [{ type: i1.NgbDatepicker, selector: "ngb-datepicker", inputs: ["dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "maxDate", "minDate", "navigation", "outsideDays", "showWeekdays", "showWeekNumbers", "startDate"], outputs: ["navigate", "dateSelect"], exportAs: ["ngbDatepicker"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["disabled", "autoClose", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "restoreFocus", "showWeekdays", "showWeekNumbers", "startDate", "container", "positionTarget"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaWeekCalendarComponent, decorators: [{
357
+ type: Component,
358
+ args: [{ selector: "anna-core-week-calendar-filter-lib", template: "<form class=\"form-inline\" *ngIf=\"config.showAsDropdown\">\r\n <div class=\"form-group hidden\">\r\n <div class=\"input-group\">\r\n <input\r\n name=\"datepicker\"\r\n class=\"form-control\"\r\n ngbDatepicker\r\n #datepicker=\"ngbDatepicker\"\r\n [autoClose]=\"false\"\r\n (dateSelect)=\"selectWeek($event)\"\r\n (closed)=\"isFocused(false)\"\r\n [displayMonths]=\"1\"\r\n [dayTemplate]=\"t\"\r\n [startDate]=\"fromDate!\"\r\n [firstDayOfWeek]=\"config.firstDayOfWeek\"\r\n [showWeekNumbers]=\"config.showWeekNumbers\"\r\n tabindex=\"-1\"\r\n style=\"display: none\"\r\n [footerTemplate]=\"footerTemplate\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <!--Single week select-->\r\n <div *ngIf=\"!config.selectMultipleWeeks\">\r\n <span style=\"position: relative; left: 30px; font-size: 12px\"> &nbsp;{{ weekNumbers }} </span>\r\n <div class=\"form-group\">\r\n <div class=\"input-group\">\r\n <div class=\"single-week\">\r\n <div class=\"left\">\r\n <span class=\"material-icons next-round-btn\" (click)=\"previousWeek()\"> navigate_next </span>\r\n </div>\r\n <input\r\n #dpFromDate\r\n class=\"form-control\"\r\n placeholder=\"Select Weeks\"\r\n [ngClass]=\"[config.customClass == '' ? '' : config.customClass]\"\r\n name=\"dpFromDate\"\r\n [value]=\"dateToDisplay\"\r\n [readonly]=\"true\"\r\n (click)=\"isFocused(true); isDropdownOpenedForCalendar(datepicker)\"\r\n />\r\n <i class=\"mdi mdi-menu-down\" *ngIf='!datepicker.isOpen()' (click)=\"datepicker.open()\"></i>\r\n <i class='mdi mdi-menu-up' *ngIf=\"datepicker.isOpen()\" (click)=\"isDropdownOpenedForCalendar(datepicker)\"></i>\r\n <div class=\"right\">\r\n <span class=\"material-icons round-btn\" (click)=\"nextWeek()\"> navigate_next </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!--Multiple week select-->\r\n <div class=\"form-group\" *ngIf=\"config.selectMultipleWeeks\">\r\n <div class=\"input-group\">\r\n <div class=\"multiple-weeks\">\r\n <input\r\n #dpFromDate\r\n class=\"form-control\"\r\n placeholder=\"Select Weeks\"\r\n [ngClass]=\"[config.customClass == '' ? '' : config.customClass]\"\r\n name=\"dpFromDate\"\r\n [readonly]=\"true\"\r\n [value]=\"weekNumbers\"\r\n (click)=\"isFocused(true); isDropdownOpenedForCalendar(datepicker)\"\r\n />\r\n <i *ngIf=\"!multiSelectDropdownOpen\" class=\"mdi mdi-menu-down multiselect-input-arrow\"></i>\r\n <i *ngIf=\"multiSelectDropdownOpen\" class=\"mdi mdi-menu-up multiselect-input-arrow\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n\r\n<ngb-datepicker\r\n #weekPicker\r\n *ngIf=\"!config.showAsDropdown\"\r\n [displayMonths]=\"1\"\r\n [startDate]=\"fromDate!\"\r\n [firstDayOfWeek]=\"config.firstDayOfWeek\"\r\n [showWeekNumbers]=\"config.showWeekNumbers\"\r\n [dayTemplate]=\"t\"\r\n [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\"\r\n (dateSelect)=\"selectWeek($event)\"\r\n [markDisabled]=\"disabledFunc\"\r\n>\r\n</ngb-datepicker>\r\n\r\n<ng-template #footerTemplate>\r\n <hr class=\"my-0\" />\r\n <button\r\n class=\"btn btn-primary btn-sm m-2 float-right\"\r\n (click)=\"applyChanges(); closeDatepicker(datepicker)\"\r\n style=\"background-color: #268bff; color: #ffffff\"\r\n >\r\n Apply\r\n </button>\r\n <button\r\n class=\"btn btn-primary btn-sm m-2 float-right\"\r\n (click)=\"revertDates(); closeDatepicker(datepicker)\"\r\n style=\"background-color: rgba(38, 139, 255, 0.12); color: #268bff\"\r\n >\r\n Cancel\r\n </button>\r\n</ng-template>\r\n\r\n<ng-template #t let-date let-focused=\"focused\" let-disabled=\"disabled\">\r\n <span\r\n class=\"custom-day\"\r\n [class.focused]=\"focused\"\r\n [class.range]=\"isRange(date)\"\r\n [class.faded]=\"isHovered(date) || isInside(date)\"\r\n [class.disabled]=\"disabled\"\r\n (mouseenter)=\"hoveredDate = date\"\r\n (mouseleave)=\"hoveredDate = null\"\r\n >\r\n {{ date.day }}\r\n </span>\r\n</ng-template>\r\n\r\n<!--\r\n\r\n<hr>\r\n\r\n<pre>From: {{ fromDate | json }} </pre>\r\n<pre>To: {{ toDate | json }} </pre>\r\n<pre>weekNumbers: {{ weekNumbers | json }} </pre>\r\n\r\n-->\r\n", styles: [":host::ng-deep .right{width:unset!important;background-color:#fff!important}:host::ng-deep .ngb-dp-day,:host::ng-deep .ngb-dp-weekday{width:3rem!important;font-style:unset!important;color:#8bac2a;outline:none}:host::ng-deep .ngb-dp-day:first-child{border:1px solid black}:host::ng-deep .ngb-dp-day.disabled{color:#d4d4d4;cursor:not-allowed}:host::ng-deep .ngb-dp-showweek:before{content:\"Weeks\";margin-right:5px}:host::ng-deep .ngb-dp-week-number{font-style:unset!important;width:4rem!important;margin-right:5px;font-weight:700;color:#000!important;border-right:1px solid rgba(0,0,0,.125)}:host::ng-deep .ngb-dp-week-number:before{font-style:unset!important;content:\"Week \"}:host::ng-deep .ngb-dp-weekday.ngb-dp-showweek{margin-right:5px;width:4rem!important;border-right:1px solid rgba(0,0,0,.125)}:host::ng-deep .dropdown-menu{box-shadow:none}:host::ng-deep .dropdown-menu.show{top:15px!important}:host::ng-deep .bg-light{background-color:#fff!important}:host::ng-deep .ngb-dp-weekdays{border-top:1px solid rgba(0,0,0,.125)}:host::ng-deep .ngb-dp-arrow-btn:focus{box-shadow:none}.custom-day{text-align:center;padding:.185rem .25rem;display:inline-block;height:1.75rem;font-weight:700;color:#222b45;width:3rem!important}.custom-day.focused{background-color:#fff}.custom-day.faded{background-color:#0275d880!important}.custom-day.faded:focus{outline:none!important}.custom-day:hover{background-color:#268bff1f!important;color:#4a4a4a!important}.custom-day:focus{outline:none!important}.custom-day.range{background-color:#268bff1f!important;color:#4a4a4a!important}.custom-day.range:focus{outline:none!important}.custom-day.disabled{color:#d3d3d3}.input-group>.single-week,.input-group .multiple-weeks{display:inline-flex!important}.input-group>.single-week>.form-control,.input-group .multiple-weeks>.form-control{width:212px;border-radius:2px;border:solid 1px #b3b3b3;height:1.875rem;cursor:pointer}.input-group>.form-control{width:212px;border-radius:2px;border:solid 1px #b3b3b3;height:1.875rem;cursor:pointer}.form-control[readonly]{background-color:#fff!important}.next-round-btn{transform:rotate(180deg);margin-left:.125rem;line-height:1.3;border-radius:50%;cursor:pointer}.round-btn{line-height:1.3;border-radius:50%;cursor:pointer;margin-left:.25rem}:host::ng-deep select.custom-select{background:none;-webkit-appearance:auto;appearance:auto}.left,.right{width:1.875rem!important;height:1.875rem;background:#d8d8d8!important;border-radius:50%}.left{margin-right:.3125rem}.right{margin-left:.3125rem}:host::ng-deep .right .ngb-dp-navigation-chevron,:host::ng-deep .ngb-dp-navigation-chevron{color:#268bff}:host::ng-deep .ngb-dp-arrow-btn:focus{outline-width:0px}.custom-day.faded{background-color:#268bff33;color:#000;font-weight:600}.custom-day{text-align:center;padding:.185rem .25rem;color:#000;display:inline-block;line-height:1.9;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range,.custom-day:hover{background-color:#268bff;color:#fff;font-weight:600}:host::ng-deep div.ngb-dp-weekday{color:#8bac2a;font-family:Roboto;font-size:.8125rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:2.6;letter-spacing:normal}.mdi-menu-up,.mdi-menu-down{position:absolute;right:2.438rem;top:1px;font-size:1.375rem;cursor:pointer}.multiselect-input-arrow{position:absolute;right:.75rem;top:3px;font-size:1.25rem;cursor:pointer;pointer-events:none}button:focus{outline:none;box-shadow:none;border-color:transparent}::ng-deep .ngb-dp-header,::ng-deep .ngb-dp-week{background:white!important}\n"] }]
359
+ }], ctorParameters: function () { return [{ type: i1.NgbCalendar }, { type: i1.NgbDatepickerConfig }, { type: i1$1.AnnaDateTimeFormatService }, { type: i1$1.AnnaGlobalConfigService }]; }, propDecorators: { selectedFromDate: [{
360
+ type: Input,
361
+ args: ["from-date"]
362
+ }], selectedEndDate: [{
363
+ type: Input,
364
+ args: ["to-date"]
365
+ }], disabledDates: [{
366
+ type: Input,
367
+ args: ["disabled-dates"]
368
+ }], maxDate: [{
369
+ type: Input
370
+ }], minDate: [{
371
+ type: Input
372
+ }], config: [{
373
+ type: Input,
374
+ args: ["week-calendar-config"]
375
+ }], applyWeekCalendarChanges: [{
376
+ type: Output,
377
+ args: ["apply"]
378
+ }], calendarToggled: [{
379
+ type: Output,
380
+ args: ["toggle-calendar"]
381
+ }] } });
382
+
383
+ // Angular import statements
384
+ class AnnaCalendarFilterComponent {
385
+ constructor() {
386
+ this.selectedDate = new EventEmitter();
387
+ this.apply = new EventEmitter();
388
+ this.cancel = new EventEmitter();
389
+ this.disableApplyBtn = false;
390
+ }
391
+ ngOnInit() {
392
+ this.fromDate = this.selectedFromDate;
393
+ this.toDate = this.selectedToDate;
394
+ }
395
+ dateSelected(event) {
396
+ this.selectedDate.emit(event);
397
+ }
398
+ onDateSelection(date) {
399
+ if (!this.fromDate && !this.toDate) {
400
+ this.fromDate = date;
401
+ }
402
+ else if (this.fromDate && !this.toDate && (date.after(this.fromDate) || date.equals(this.fromDate))) {
403
+ this.toDate = date;
404
+ }
405
+ else {
406
+ this.toDate = null;
407
+ this.fromDate = date;
408
+ }
409
+ this.disableCalendarApplyBtn();
410
+ }
411
+ isHovered(date) {
412
+ return this.fromDate && !this.toDate && this.hoveredDate && date.after(this.fromDate) && date.before(this.hoveredDate);
413
+ }
414
+ isInside(date) {
415
+ return this.toDate && date.after(this.fromDate) && date.before(this.toDate);
416
+ }
417
+ isRange(date) {
418
+ return (date.equals(this.fromDate) || (this.toDate && date.equals(this.toDate)) || this.isInside(date) || this.isHovered(date));
419
+ }
420
+ cancelSelection() {
421
+ this.cancel.emit();
422
+ }
423
+ applySelection() {
424
+ if (this.fromDate && this.toDate) {
425
+ let dateObj = { fromDate: this.fromDate, toDate: this.toDate };
426
+ this.apply.emit(dateObj);
427
+ }
428
+ }
429
+ disableCalendarApplyBtn() {
430
+ this.disableApplyBtn = !(this.fromDate && this.toDate);
431
+ }
432
+ }
433
+ AnnaCalendarFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaCalendarFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
434
+ AnnaCalendarFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaCalendarFilterComponent, selector: "anna-core-calendar-filter-lib", inputs: { maxDate: "maxDate", minDate: "minDate", showDate: "showDate", selectedFromDate: "selectedFromDate", selectedToDate: "selectedToDate" }, outputs: { selectedDate: "selectedDate", apply: "apply", cancel: "cancel" }, ngImport: i0, template: "<ngb-datepicker\r\n class=\"custom-datepicker\"\r\n #dp\r\n [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\"\r\n [displayMonths]=\"1\"\r\n [dayTemplate]=\"t\"\r\n [startDate]=\"fromDate\"\r\n (dateSelect)=\"onDateSelection($event)\"\r\n navigation=\"select\"\r\n>\r\n</ngb-datepicker>\r\n<div class=\"buttons\">\r\n <button class=\"btn\" (click)=\"cancelSelection()\">Cancel</button>\r\n <button class=\"btn\" (click)=\"applySelection()\" [disabled]=\"disableApplyBtn\">Apply</button>\r\n</div>\r\n\r\n<ng-template #t let-date let-focused=\"focused\">\r\n <span\r\n class=\"custom-day\"\r\n [class.focused]=\"focused\"\r\n [class.range]=\"isRange(date)\"\r\n [class.faded]=\"isHovered(date) || isInside(date)\"\r\n (mouseenter)=\"hoveredDate = date\"\r\n (mouseleave)=\"hoveredDate = null\"\r\n >\r\n {{ date.day }}\r\n </span>\r\n</ng-template>\r\n", styles: [":host::ng-deep div.ngb-dp-arrow.right{width:2.4375rem!important;background-color:#fff!important}:host::ng-deep div.ngb-dp-weekday{color:#8bac2a;border-top:1px solid rgba(183,183,183,.6);margin-top:.5rem;font-family:Roboto;font-size:.8125rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:2.6;letter-spacing:normal}:host::ng-deep div.ngb-dp-week{background-color:#fff!important}:host::ng-deep div.ngb-dp-header{background-color:#fff!important}:host::ng-deep div.bg-primary{background-color:#d9e1e6!important;border-radius:.25rem}:host::ng-deep .ngb-dp-arrow-btn:focus{outline-width:0px}:host::ng-deep .right .ngb-dp-navigation-chevron,:host::ng-deep .ngb-dp-navigation-chevron{color:#000}:host::ng-deep .custom-select{border:1px solid rgba(183,183,183,.6);box-shadow:none}:host::ng-deep .btn:focus{box-shadow:none}div{margin:0 .3125rem}.custom-day{text-align:center;padding:.185rem .25rem;color:#000;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range{background-color:#268bff;color:#fff}.custom-day:hover{background-color:#d9e1e6;border-radius:.25rem;color:#bdbdbd}:host::ng-deep div.ngb-dp-day.disabled{cursor:not-allowed}.custom-day.faded{background-color:#268bff33;color:#000;font-weight:600}:host::ng-deep div.ngb-dp-week div.ngb-dp-day.disabled .custom-day{color:#bdbdbd;opacity:50%}.buttons{display:flex;margin:0px auto .4375rem;margin-bottom:0;justify-content:center}.buttons button.btn:disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.buttons .btn{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;text-align:center;outline:none;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.buttons .btn:last-of-type{background-color:#268bff;color:#fff}:host::ng-deep .ngb-dp-day{font-weight:700}\n"], components: [{ type: i1.NgbDatepicker, selector: "ngb-datepicker", inputs: ["dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "maxDate", "minDate", "navigation", "outsideDays", "showWeekdays", "showWeekNumbers", "startDate"], outputs: ["navigate", "dateSelect"], exportAs: ["ngbDatepicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaCalendarFilterComponent, decorators: [{
436
+ type: Component,
437
+ args: [{ selector: "anna-core-calendar-filter-lib", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngb-datepicker\r\n class=\"custom-datepicker\"\r\n #dp\r\n [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\"\r\n [displayMonths]=\"1\"\r\n [dayTemplate]=\"t\"\r\n [startDate]=\"fromDate\"\r\n (dateSelect)=\"onDateSelection($event)\"\r\n navigation=\"select\"\r\n>\r\n</ngb-datepicker>\r\n<div class=\"buttons\">\r\n <button class=\"btn\" (click)=\"cancelSelection()\">Cancel</button>\r\n <button class=\"btn\" (click)=\"applySelection()\" [disabled]=\"disableApplyBtn\">Apply</button>\r\n</div>\r\n\r\n<ng-template #t let-date let-focused=\"focused\">\r\n <span\r\n class=\"custom-day\"\r\n [class.focused]=\"focused\"\r\n [class.range]=\"isRange(date)\"\r\n [class.faded]=\"isHovered(date) || isInside(date)\"\r\n (mouseenter)=\"hoveredDate = date\"\r\n (mouseleave)=\"hoveredDate = null\"\r\n >\r\n {{ date.day }}\r\n </span>\r\n</ng-template>\r\n", styles: [":host::ng-deep div.ngb-dp-arrow.right{width:2.4375rem!important;background-color:#fff!important}:host::ng-deep div.ngb-dp-weekday{color:#8bac2a;border-top:1px solid rgba(183,183,183,.6);margin-top:.5rem;font-family:Roboto;font-size:.8125rem;font-weight:700;font-stretch:normal;font-style:normal;line-height:2.6;letter-spacing:normal}:host::ng-deep div.ngb-dp-week{background-color:#fff!important}:host::ng-deep div.ngb-dp-header{background-color:#fff!important}:host::ng-deep div.bg-primary{background-color:#d9e1e6!important;border-radius:.25rem}:host::ng-deep .ngb-dp-arrow-btn:focus{outline-width:0px}:host::ng-deep .right .ngb-dp-navigation-chevron,:host::ng-deep .ngb-dp-navigation-chevron{color:#000}:host::ng-deep .custom-select{border:1px solid rgba(183,183,183,.6);box-shadow:none}:host::ng-deep .btn:focus{box-shadow:none}div{margin:0 .3125rem}.custom-day{text-align:center;padding:.185rem .25rem;color:#000;display:inline-block;height:2rem;width:2rem}.custom-day.focused{background-color:#e6e6e6}.custom-day.range{background-color:#268bff;color:#fff}.custom-day:hover{background-color:#d9e1e6;border-radius:.25rem;color:#bdbdbd}:host::ng-deep div.ngb-dp-day.disabled{cursor:not-allowed}.custom-day.faded{background-color:#268bff33;color:#000;font-weight:600}:host::ng-deep div.ngb-dp-week div.ngb-dp-day.disabled .custom-day{color:#bdbdbd;opacity:50%}.buttons{display:flex;margin:0px auto .4375rem;margin-bottom:0;justify-content:center}.buttons button.btn:disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.buttons .btn{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;text-align:center;outline:none;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.buttons .btn:last-of-type{background-color:#268bff;color:#fff}:host::ng-deep .ngb-dp-day{font-weight:700}\n"] }]
438
+ }], ctorParameters: function () { return []; }, propDecorators: { maxDate: [{
439
+ type: Input
440
+ }], minDate: [{
441
+ type: Input
442
+ }], showDate: [{
443
+ type: Input
444
+ }], selectedDate: [{
445
+ type: Output
446
+ }], selectedFromDate: [{
447
+ type: Input
448
+ }], selectedToDate: [{
449
+ type: Input
450
+ }], apply: [{
451
+ type: Output
452
+ }], cancel: [{
453
+ type: Output
454
+ }] } });
455
+
456
+ // Angular import statements
457
+ class AnnaDropdownLibModule {
458
+ }
459
+ AnnaDropdownLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaDropdownLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
460
+ AnnaDropdownLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaDropdownLibModule, declarations: [AnnaWeekCalendarComponent,
461
+ AnnaCalendarFilterComponent], imports: [CommonModule,
462
+ NgbModule,
463
+ AnnaCoreSharedLibModule$1], exports: [AnnaWeekCalendarComponent,
464
+ AnnaCalendarFilterComponent] });
465
+ AnnaDropdownLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaDropdownLibModule, imports: [[
466
+ CommonModule,
467
+ NgbModule,
468
+ AnnaCoreSharedLibModule$1
469
+ ]] });
470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaDropdownLibModule, decorators: [{
471
+ type: NgModule,
472
+ args: [{
473
+ declarations: [
474
+ AnnaWeekCalendarComponent,
475
+ AnnaCalendarFilterComponent
476
+ ],
477
+ imports: [
478
+ CommonModule,
479
+ NgbModule,
480
+ AnnaCoreSharedLibModule$1
481
+ ],
482
+ exports: [
483
+ AnnaWeekCalendarComponent,
484
+ AnnaCalendarFilterComponent
485
+ ]
486
+ }]
487
+ }] });
488
+
489
+ //Modules
490
+
491
+ // Angular import statements
492
+ ;
493
+ class AnnaSortComponent {
494
+ constructor(annaSortService) {
495
+ this.annaSortService = annaSortService;
496
+ this.firstSortApplied = false;
497
+ this.sortedData = new EventEmitter();
498
+ }
499
+ ngOnChanges(changes) {
500
+ if (!this.firstSortApplied && changes['data'] && changes['data'].currentValue) {
501
+ this.clonedData = cloneDeep(this.data);
502
+ }
503
+ }
504
+ isFirstTimeSorting() {
505
+ this.firstSortApplied = true;
506
+ this.clonedData = cloneDeep(this.data);
507
+ }
508
+ sortByAscending() {
509
+ if (!this.firstSortApplied) {
510
+ this.isFirstTimeSorting();
511
+ }
512
+ const isAsc = true;
513
+ if (this.sortBy === "dates") {
514
+ this.sortBy = "startDate";
515
+ }
516
+ this.setAscState();
517
+ this.setDescState();
518
+ this.annaSortService.sortByAsc.set(this.sortBy, true);
519
+ this.annaSortService.isAsc = true;
520
+ this.annaSortService.keySorted = this.sortBy;
521
+ this.sortedData.emit(this.annaSortService.sort(isAsc, this.data, this.sortBy));
522
+ this.closeTooltip();
523
+ }
524
+ sortByDescending() {
525
+ if (!this.firstSortApplied) {
526
+ this.isFirstTimeSorting();
527
+ }
528
+ const isAsc = false;
529
+ if (this.sortBy === "dates") {
530
+ this.sortBy = "endDate";
531
+ }
532
+ this.setDescState();
533
+ this.setAscState();
534
+ this.annaSortService.sortByDesc.set(this.sortBy, true);
535
+ this.annaSortService.isAsc = false;
536
+ this.annaSortService.keySorted = this.sortBy;
537
+ this.sortedData.emit(this.annaSortService.sort(isAsc, this.data, this.sortBy));
538
+ this.closeTooltip();
539
+ }
540
+ setAscState() {
541
+ this.annaSortService.sortByAsc.forEach((value, key) => {
542
+ this.annaSortService.sortByAsc.set(key, false);
543
+ });
544
+ }
545
+ setDescState() {
546
+ this.annaSortService.sortByDesc.forEach((value, key) => {
547
+ this.annaSortService.sortByDesc.set(key, false);
548
+ });
549
+ }
550
+ removeSorting() {
551
+ this.firstSortApplied = false;
552
+ this.annaSortService.sortByAsc = new Map();
553
+ this.annaSortService.sortByDesc = new Map();
554
+ this.sortedData.emit({ data: this.clonedData, type: "none" });
555
+ this.closeTooltip();
556
+ }
557
+ bindTheValueToToolTip(tooltip) {
558
+ if (this.annaSortService.tooltip == tooltip) {
559
+ this.closeTooltip();
560
+ }
561
+ else {
562
+ this.closeTooltip();
563
+ this.annaSortService.tooltip = tooltip;
564
+ this.annaSortService.tooltip.open();
565
+ this.selectRadioButton();
566
+ }
567
+ }
568
+ selectRadioButton() {
569
+ if (this.annaSortService.sortByAsc.has(this.sortBy) && this.annaSortService.sortByAsc.get(this.sortBy)) {
570
+ this.selectedRadio = "ascending";
571
+ }
572
+ else if (this.annaSortService.sortByDesc.has(this.sortBy) && this.annaSortService.sortByDesc.get(this.sortBy)) {
573
+ this.selectedRadio = "descending";
574
+ }
575
+ else {
576
+ this.selectedRadio = "none";
577
+ }
578
+ }
579
+ closeTooltip() {
580
+ if (this.annaSortService.tooltip && this.annaSortService.tooltip.isOpen()) {
581
+ this.annaSortService.tooltip.close();
582
+ }
583
+ this.annaSortService.tooltip = null;
584
+ }
585
+ }
586
+ AnnaSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, deps: [{ token: i1$1.AnnaSortService }], target: i0.ɵɵFactoryTarget.Component });
587
+ AnnaSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: { data: "data", sortBy: "sortBy", disableSort: "disableSort", placement: "placement" }, outputs: { sortedData: "sort" }, usesOnChanges: true, ngImport: i0, template: "<p class=\"sort\">\r\n <i\r\n class=\"mdi mdi-sort\"\r\n [ngClass]=\"{\r\n active: this.annaSortService.sortByDesc.get(this.sortBy) || this.annaSortService.sortByAsc.get(this.sortBy),\r\n disable: disableSort\r\n }\"\r\n [ngbTooltip]=\"sortTooltip\"\r\n placement=\"{{ placement != undefined ? 'auto' : 'bottom' }}\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n #sort=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(sort)\"\r\n ></i>\r\n</p>\r\n\r\n<ng-template #sortTooltip>\r\n <section class=\"sort-container\">\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"ascending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"ascending\"\r\n (click)=\"sortByAscending()\"\r\n />\r\n <label for=\"ascending\">Ascending</label>\r\n </div>\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"descending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"descending\"\r\n (click)=\"sortByDescending()\"\r\n />\r\n <label for=\"descending\">Descending</label>\r\n </div>\r\n <div>\r\n <input type=\"radio\" id=\"none\" [ngModel]=\"selectedRadio\" name=\"sortToolTip\" value=\"none\" (click)=\"removeSorting()\" />\r\n <label for=\"none\">None</label>\r\n </div>\r\n </section>\r\n</ng-template>\r\n", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}\n"], directives: [{ type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i14.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, decorators: [{
589
+ type: Component,
590
+ args: [{ selector: "anna-core-sort-lib", template: "<p class=\"sort\">\r\n <i\r\n class=\"mdi mdi-sort\"\r\n [ngClass]=\"{\r\n active: this.annaSortService.sortByDesc.get(this.sortBy) || this.annaSortService.sortByAsc.get(this.sortBy),\r\n disable: disableSort\r\n }\"\r\n [ngbTooltip]=\"sortTooltip\"\r\n placement=\"{{ placement != undefined ? 'auto' : 'bottom' }}\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n #sort=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(sort)\"\r\n ></i>\r\n</p>\r\n\r\n<ng-template #sortTooltip>\r\n <section class=\"sort-container\">\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"ascending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"ascending\"\r\n (click)=\"sortByAscending()\"\r\n />\r\n <label for=\"ascending\">Ascending</label>\r\n </div>\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"descending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"descending\"\r\n (click)=\"sortByDescending()\"\r\n />\r\n <label for=\"descending\">Descending</label>\r\n </div>\r\n <div>\r\n <input type=\"radio\" id=\"none\" [ngModel]=\"selectedRadio\" name=\"sortToolTip\" value=\"none\" (click)=\"removeSorting()\" />\r\n <label for=\"none\">None</label>\r\n </div>\r\n </section>\r\n</ng-template>\r\n", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}\n"] }]
591
+ }], ctorParameters: function () { return [{ type: i1$1.AnnaSortService }]; }, propDecorators: { data: [{
592
+ type: Input
593
+ }], sortBy: [{
594
+ type: Input
595
+ }], disableSort: [{
596
+ type: Input
597
+ }], placement: [{
598
+ type: Input,
599
+ args: ["placement"]
600
+ }], sortedData: [{
601
+ type: Output,
602
+ args: ["sort"]
603
+ }] } });
604
+
605
+ /**
606
+ * @license
607
+ * Copyright Google LLC All Rights Reserved.
608
+ *
609
+ * Use of this source code is governed by an MIT-style license that can be
610
+ * found in the LICENSE file at https://angular.io/license
611
+ */
612
+ /** Checks if the given ranges are equal. */
613
+ function rangesEqual(r1, r2) {
614
+ return r1.start == r2.start && r1.end == r2.end;
615
+ }
616
+ /**
617
+ * Scheduler to be used for scroll events. Needs to fall back to
618
+ * something that doesn't rely on requestAnimationFrame on environments
619
+ * that don't support it (e.g. server-side rendering).
620
+ */
621
+ const SCROLL_SCHEDULER = typeof requestAnimationFrame !== "undefined"
622
+ ? animationFrameScheduler
623
+ : asapScheduler;
624
+ /**
625
+ * A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`.
626
+ * Uses `top: #px` instead of `transform: translateY(#px)` like the cdk virtual scroll viewport does
627
+ * which avoids flickering of elements in the transformed container with `position: sticky`.
628
+ */
629
+ class AnnaTableVirtualScrollViewportComponent extends CdkScrollable {
630
+ constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, annaGtService) {
631
+ super(elementRef, scrollDispatcher, ngZone, dir);
632
+ this.elementRef = elementRef;
633
+ this._changeDetectorRef = _changeDetectorRef;
634
+ this._scrollStrategy = _scrollStrategy;
635
+ this.annaGtService = annaGtService;
636
+ /** Emits when the viewport is detached from a CdkVirtualForOf. */
637
+ this._detachedSubject = new Subject();
638
+ /** Emits when the rendered range changes. */
639
+ this._renderedRangeSubject = new Subject();
640
+ this._orientation = "vertical";
641
+ // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
642
+ // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
643
+ // depending on how the strategy calculates the scrolled index, it may come at a cost to
644
+ // performance.
645
+ /** Emits when the index of the first element visible in the viewport changes. */
646
+ this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));
647
+ /** A stream that emits whenever the rendered range changes. */
648
+ this.renderedRangeStream = this._renderedRangeSubject;
649
+ /**
650
+ * The total size of all content (in pixels), including content that is not currently rendered.
651
+ */
652
+ this._totalContentSize = 0;
653
+ /** A string representing the `style.width` property value to be used for the spacer element. */
654
+ this._totalContentWidth = "";
655
+ /** A string representing the `style.height` property value to be used for the spacer element. */
656
+ this._totalContentHeight = "";
657
+ /** The currently rendered range of indices. */
658
+ this._renderedRange = { start: 0, end: 0 };
659
+ /** The length of the data bound to this viewport (in number of items). */
660
+ this._dataLength = 0;
661
+ /** The size of the viewport (in pixels). */
662
+ this._viewportSize = 0;
663
+ /** The last rendered content offset that was set. */
664
+ this._renderedContentOffset = 0;
665
+ /**
666
+ * Whether the last rendered content offset was to the end of the content (and therefore needs to
667
+ * be rewritten as an offset to the start of the content).
668
+ */
669
+ this._renderedContentOffsetNeedsRewrite = false;
670
+ /** Whether there is a pending change detection cycle. */
671
+ this._isChangeDetectionPending = false;
672
+ /** A list of functions to run after the next change detection cycle. */
673
+ this._runAfterChangeDetection = [];
674
+ /** Subscription to changes in the viewport size. */
675
+ this._viewportChanges = Subscription.EMPTY;
676
+ if (!_scrollStrategy) {
677
+ throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
678
+ }
679
+ this._viewportChanges = viewportRuler.change().subscribe(() => {
680
+ this.checkViewportSize();
681
+ });
682
+ }
683
+ /** The direction the viewport scrolls. */
684
+ get orientation() {
685
+ return this._orientation;
686
+ }
687
+ set orientation(orientation) {
688
+ if (this._orientation !== orientation) {
689
+ this._orientation = orientation;
690
+ this._calculateSpacerSize();
691
+ }
692
+ }
693
+ ngOnInit() {
694
+ super.ngOnInit();
695
+ // It's still too early to measure the viewport at this point. Deferring with a promise allows
696
+ // the Viewport to be rendered with the correct size before we measure. We run this outside the
697
+ // zone to avoid causing more change detection cycles. We handle the change detection loop
698
+ // ourselves instead.
699
+ this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
700
+ this._measureViewportSize();
701
+ this._scrollStrategy.attach(this);
702
+ this.elementScrolled()
703
+ .pipe(
704
+ // Start off with a fake scroll event so we properly detect our initial position.
705
+ startWith(null),
706
+ // Collect multiple events into one until the next animation frame. This way if
707
+ // there are multiple scroll events in the same frame we only need to recheck
708
+ // our layout once.
709
+ auditTime(0, SCROLL_SCHEDULER))
710
+ .subscribe(() => { this._scrollStrategy.onContentScrolled(); this.annaGtService.virtualScrollSubject.next(true); });
711
+ this._markChangeDetectionNeeded();
712
+ }));
713
+ }
714
+ ngOnDestroy() {
715
+ this.detach();
716
+ this._scrollStrategy.detach();
717
+ // Complete all subjects
718
+ this._renderedRangeSubject.complete();
719
+ this._detachedSubject.complete();
720
+ this._viewportChanges.unsubscribe();
721
+ super.ngOnDestroy();
722
+ }
723
+ /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
724
+ attach(forOf) {
725
+ if (this._forOf) {
726
+ throw Error("CdkVirtualScrollViewport is already attached.");
727
+ }
728
+ // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
729
+ // changes. Run outside the zone to avoid triggering change detection, since we're managing the
730
+ // change detection loop ourselves.
731
+ this.ngZone.runOutsideAngular(() => {
732
+ this._forOf = forOf;
733
+ this._forOf.dataStream
734
+ .pipe(takeUntil(this._detachedSubject))
735
+ .subscribe(data => {
736
+ const newLength = data.length;
737
+ if (newLength !== this._dataLength) {
738
+ this._dataLength = newLength;
739
+ this._scrollStrategy.onDataLengthChanged();
740
+ }
741
+ this._doChangeDetection();
742
+ });
743
+ });
744
+ }
745
+ /** Detaches the current `CdkVirtualForOf`. */
746
+ detach() {
747
+ this._forOf = null;
748
+ this._detachedSubject.next();
749
+ }
750
+ /** Gets the length of the data bound to this viewport (in number of items). */
751
+ getDataLength() {
752
+ return this._dataLength;
753
+ }
754
+ /** Gets the size of the viewport (in pixels). */
755
+ getViewportSize() {
756
+ return this._viewportSize;
757
+ }
758
+ // TODO(mmalerba): This is technically out of sync with what's really rendered until a render
759
+ // cycle happens. I'm being careful to only call it after the render cycle is complete and before
760
+ // setting it to something else, but its error prone and should probably be split into
761
+ // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
762
+ /** Get the current rendered range of items. */
763
+ getRenderedRange() {
764
+ return this._renderedRange;
765
+ }
766
+ /**
767
+ * Sets the total size of all content (in pixels), including content that is not currently
768
+ * rendered.
769
+ */
770
+ setTotalContentSize(size) {
771
+ if (this._totalContentSize !== size) {
772
+ this._totalContentSize = size;
773
+ this._calculateSpacerSize();
774
+ this._markChangeDetectionNeeded();
775
+ }
776
+ }
777
+ /** Sets the currently rendered range of indices. */
778
+ setRenderedRange(range) {
779
+ if (!rangesEqual(this._renderedRange, range)) {
780
+ this._renderedRangeSubject.next((this._renderedRange = range));
781
+ this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());
782
+ }
783
+ }
784
+ /**
785
+ * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).
786
+ */
787
+ getOffsetToRenderedContentStart() {
788
+ return this._renderedContentOffsetNeedsRewrite
789
+ ? null
790
+ : this._renderedContentOffset;
791
+ }
792
+ /**
793
+ * Sets the offset from the start of the viewport to either the start or end of the rendered data
794
+ * (in pixels).
795
+ */
796
+ setRenderedContentOffset(offset) {
797
+ let top = `${Number(offset)}px`;
798
+ this._renderedContentOffset = offset;
799
+ if (this._renderedContentTransform != top) {
800
+ // We know this value is safe because we parse `offset` with `Number()` before passing it
801
+ // into the string.
802
+ this._renderedContentTransform = top;
803
+ this._markChangeDetectionNeeded(() => {
804
+ if (this._renderedContentOffsetNeedsRewrite) {
805
+ this._renderedContentOffset -= this.measureRenderedContentSize();
806
+ this._renderedContentOffsetNeedsRewrite = false;
807
+ this.setRenderedContentOffset(this._renderedContentOffset);
808
+ }
809
+ else {
810
+ this._scrollStrategy.onRenderedOffsetChanged();
811
+ }
812
+ });
813
+ }
814
+ }
815
+ /**
816
+ * Scrolls to the given offset from the start of the viewport. Please note that this is not always
817
+ * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left
818
+ * direction, this would be the equivalent of setting a fictional `scrollRight` property.
819
+ * @param offset The offset to scroll to.
820
+ * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
821
+ */
822
+ scrollToOffset(offset, behavior = "auto") {
823
+ const options = { behavior, top: offset };
824
+ this.scrollTo(options);
825
+ }
826
+ /**
827
+ * Scrolls to the offset for the given index.
828
+ * @param index The index of the element to scroll to.
829
+ * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
830
+ */
831
+ scrollToIndex(index, behavior = "auto") {
832
+ this._scrollStrategy.scrollToIndex(index, behavior);
833
+ }
834
+ /**
835
+ * Gets the current scroll offset from the start of the viewport (in pixels).
836
+ * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'
837
+ * in horizontal mode.
838
+ */
839
+ // CHANGES@ANNALIB added override to functions
840
+ measureScrollOffset(from) {
841
+ return from
842
+ ? super.measureScrollOffset(from)
843
+ : super.measureScrollOffset("top");
844
+ }
845
+ /** Measure the combined size of all of the rendered items. */
846
+ measureRenderedContentSize() {
847
+ const contentEl = this._contentWrapper.nativeElement;
848
+ return contentEl.offsetHeight;
849
+ }
850
+ /**
851
+ * Measure the total combined size of the given range. Throws if the range includes items that are
852
+ * not rendered.
853
+ */
854
+ measureRangeSize(range) {
855
+ if (!this._forOf) {
856
+ return 0;
857
+ }
858
+ return this._forOf.measureRangeSize(range, this.orientation);
859
+ }
860
+ /** Update the viewport dimensions and re-render. */
861
+ checkViewportSize() {
862
+ // TODO: Cleanup later when add logic for handling content resize
863
+ this._measureViewportSize();
864
+ this._scrollStrategy.onDataLengthChanged();
865
+ }
866
+ /** Measure the viewport size. */
867
+ _measureViewportSize() {
868
+ const viewportEl = this.elementRef.nativeElement;
869
+ this._viewportSize = viewportEl.clientHeight;
870
+ }
871
+ /** Queue up change detection to run. */
872
+ _markChangeDetectionNeeded(runAfter) {
873
+ if (runAfter) {
874
+ this._runAfterChangeDetection.push(runAfter);
875
+ }
876
+ // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of
877
+ // properties sequentially we only have to run `_doChangeDetection` once at the end.
878
+ if (!this._isChangeDetectionPending) {
879
+ this._isChangeDetectionPending = true;
880
+ this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
881
+ this._doChangeDetection();
882
+ }));
883
+ }
884
+ }
885
+ /** Run change detection. */
886
+ _doChangeDetection() {
887
+ this._isChangeDetectionPending = false;
888
+ // Apply the content transform. The transform can't be set via an Angular binding because
889
+ // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
890
+ // string literals, a variable that can only be 'X' or 'Y', and user input that is run through
891
+ // the `Number` function first to coerce it to a numeric value.
892
+ this._contentWrapper.nativeElement.style.top = this._renderedContentTransform;
893
+ // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
894
+ // from the root, since the repeated items are content projected in. Calling `detectChanges`
895
+ // instead does not properly check the projected content.
896
+ this.ngZone.run(() => this._changeDetectorRef.markForCheck());
897
+ const runAfterChangeDetection = this._runAfterChangeDetection;
898
+ this._runAfterChangeDetection = [];
899
+ for (const fn of runAfterChangeDetection) {
900
+ fn();
901
+ }
902
+ }
903
+ /** Calculates the `style.width` and `style.height` for the spacer element. */
904
+ _calculateSpacerSize() {
905
+ this._totalContentHeight = `${this._totalContentSize}px`;
906
+ this._totalContentWidth = "";
907
+ }
908
+ }
909
+ 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$2.Directionality, optional: true }, { token: i2.ScrollDispatcher }, { token: i2.ViewportRuler }, { token: i1$1.AnnaGenericTableService }], target: i0.ɵɵFactoryTarget.Component });
910
+ 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: [
911
+ {
912
+ provide: CdkScrollable,
913
+ useExisting: AnnaTableVirtualScrollViewportComponent
914
+ },
915
+ {
916
+ provide: CdkVirtualScrollViewport,
917
+ useExisting: AnnaTableVirtualScrollViewportComponent
918
+ }
919
+ ], 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 });
920
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaTableVirtualScrollViewportComponent, decorators: [{
921
+ type: Component,
922
+ args: [{ selector: "anna-table-virtual-scroll-viewport", host: {
923
+ class: "anna-table-virtual-scroll-viewport",
924
+ "[class.anna-table-virtual-scroll-orientation-horizontal]": 'orientation === "horizontal"',
925
+ "[class.anna-table-virtual-scroll-orientation-vertical]": 'orientation !== "horizontal"'
926
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
927
+ {
928
+ provide: CdkScrollable,
929
+ useExisting: AnnaTableVirtualScrollViewportComponent
930
+ },
931
+ {
932
+ provide: CdkVirtualScrollViewport,
933
+ useExisting: AnnaTableVirtualScrollViewportComponent
934
+ }
935
+ ], 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"] }]
936
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
937
+ type: Optional
938
+ }, {
939
+ type: Inject,
940
+ args: [VIRTUAL_SCROLL_STRATEGY]
941
+ }] }, { type: i1$2.Directionality, decorators: [{
942
+ type: Optional
943
+ }] }, { type: i2.ScrollDispatcher }, { type: i2.ViewportRuler }, { type: i1$1.AnnaGenericTableService }]; }, propDecorators: { orientation: [{
944
+ type: Input
945
+ }], scrolledIndexChange: [{
946
+ type: Output
947
+ }], _contentWrapper: [{
948
+ type: ViewChild,
949
+ args: ["contentWrapper", { static: true }]
950
+ }] } });
951
+
952
+ /**
953
+ * A custom scroll strategy that accepts a static row height, static header height,
954
+ * and a buffer size. The strategy
955
+ */
956
+ class AnnaFixedRowSizeTableVirtualScrollStrategy {
957
+ constructor(rowHeight, buffer, headerHeight) {
958
+ this._scrolledIndexChange = new Subject();
959
+ this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());
960
+ this.updateRowHeightAndBuffer(rowHeight, buffer, headerHeight);
961
+ }
962
+ /**
963
+ * Attaches this scroll strategy to a viewport.
964
+ * @param viewport The viewport to attach this strategy to.
965
+ */
966
+ attach(viewport) {
967
+ this.viewport = viewport;
968
+ this.updateTotalContentSize();
969
+ this.updateRenderedRange();
970
+ }
971
+ /**
972
+ * Detaches this scroll strategy from the currently attached viewport.
973
+ */
974
+ detach() {
975
+ this._scrolledIndexChange.complete();
976
+ this.viewport = null;
977
+ }
978
+ onContentScrolled() {
979
+ this.updateRenderedRange();
980
+ }
981
+ onDataLengthChanged() {
982
+ this.updateTotalContentSize();
983
+ this.updateRenderedRange();
984
+ }
985
+ onContentRendered() {
986
+ // This method is useful for virtual scroll strategies that measure the rendered
987
+ // content to determine its height. This scroll strategy assumes that rows have
988
+ // a static height, so there's no need to implement this method.
989
+ }
990
+ onRenderedOffsetChanged() {
991
+ // Similar to onContentRendered, this method is useful for virtual scroll strategies
992
+ // that need to track the offset as it changes. This scroll strategy is always able
993
+ // to calculate the correct offset from other values, so there's no need to implement
994
+ // this method.
995
+ }
996
+ scrollToIndex(index, behavior) {
997
+ this.viewport?.scrollToOffset(index * this.rowHeight, behavior);
998
+ }
999
+ /**
1000
+ * Update the item size and buffer size.
1001
+ * @param rowHeight The height of a row in the virtually scrolling table.
1002
+ * @param buffer The number of rows to buffer outside the viewport.
1003
+ * @param headerHeight The total height of the table header, including all header rows.
1004
+ */
1005
+ updateRowHeightAndBuffer(rowHeight, buffer, headerHeight) {
1006
+ this.rowHeight = rowHeight;
1007
+ this.buffer = buffer;
1008
+ this.headerHeight = headerHeight;
1009
+ this.updateTotalContentSize();
1010
+ this.updateRenderedRange();
1011
+ }
1012
+ updateRenderedRange() {
1013
+ if (!this.viewport) {
1014
+ return;
1015
+ }
1016
+ const viewportSize = this.viewport.getViewportSize();
1017
+ const dataLength = this.viewport.getDataLength();
1018
+ const scrollOffset = this.viewport.measureScrollOffset();
1019
+ // the index of the first item that would be at least partially visible in the viewport
1020
+ let firstVisibleIndex = Math.floor((scrollOffset + this.headerHeight) / this.rowHeight);
1021
+ // if the buffer size is 10 but the first visible item is at, say, index 7
1022
+ // then the buffered items must be 7, because we don't have 10 items available to buffer.
1023
+ const bufferedItems = Math.min(AnnaFilterService$1.bufferSize, firstVisibleIndex);
1024
+ const itemsInViewport = Math.ceil(viewportSize / this.rowHeight);
1025
+ const itemsToRender = itemsInViewport + this.buffer;
1026
+ // Clamp the new range between 0 and dataLength
1027
+ const newStart = Math.max(0, firstVisibleIndex - bufferedItems);
1028
+ const newEnd = Math.min(dataLength, firstVisibleIndex + itemsToRender);
1029
+ const newRange = {
1030
+ start: newStart,
1031
+ end: newEnd
1032
+ };
1033
+ const newOffset = this.rowHeight * (firstVisibleIndex - bufferedItems);
1034
+ this.viewport.setRenderedContentOffset(newOffset);
1035
+ this.viewport.setRenderedRange(newRange);
1036
+ this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));
1037
+ }
1038
+ updateTotalContentSize() {
1039
+ this.viewport?.setTotalContentSize(this.viewport.getDataLength() * this.rowHeight);
1040
+ }
1041
+ }
1042
+ /**
1043
+ * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created
1044
+ * `FixedSizeVirtualScrollStrategy` from the given directive.
1045
+ * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the
1046
+ * `FixedSizeVirtualScrollStrategy` from.
1047
+ */
1048
+ function fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {
1049
+ return fixedSizeDir.scrollStrategy;
1050
+ }
1051
+ class AnnaFixedRowSizeTableVirtualScrollStrategyDirective {
1052
+ constructor() {
1053
+ this._rowHeight = 30;
1054
+ this._headerRowHeight = 30;
1055
+ this._buffer = 20;
1056
+ this._headerRows = null;
1057
+ this.headerRowCount = 1;
1058
+ /** The scroll strategy used by this directive. */
1059
+ this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
1060
+ }
1061
+ /** The height of rows in the table (in pixels). Defaults to 30. */
1062
+ set rowHeight(value) { this._rowHeight = coerceNumberProperty(value); }
1063
+ get rowHeight() { return this._rowHeight; }
1064
+ /**
1065
+ * The height of header rows in the table (in pixels). Defaults to 30.
1066
+ */
1067
+ set headerRowHeight(value) { this._headerRowHeight = coerceNumberProperty(value); }
1068
+ get headerRowHeight() { return this._headerRowHeight; }
1069
+ /**
1070
+ * The number of buffered rows rendered beyond the viewport.
1071
+ * If the number of buffered rows dips below this number, more rows will be rendered. Defaults to 20.
1072
+ */
1073
+ set buffer(value) {
1074
+ this._buffer = coerceNumberProperty(value);
1075
+ }
1076
+ get buffer() { return this._buffer; }
1077
+ set headerRows(value) { this._headerRows = coerceNumberProperty(value, undefined); }
1078
+ get headerRows() { return this._headerRows; }
1079
+ ngOnChanges(change) {
1080
+ if (this.headerRows != undefined || this.headerRowsQuery) {
1081
+ this.handleChange();
1082
+ }
1083
+ if (change['buffer']?.previousValue != change['buffer']?.currentValue) {
1084
+ AnnaFilterService$1.bufferSize = this.buffer;
1085
+ this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
1086
+ }
1087
+ }
1088
+ ngAfterContentInit() {
1089
+ this.headerRowsQuery.changes.subscribe(() => {
1090
+ this.handleChange();
1091
+ });
1092
+ }
1093
+ handleChange() {
1094
+ this.scrollStrategy.updateRowHeightAndBuffer(this.rowHeight, this.buffer,
1095
+ // Use the explicit headerRows input value if set.
1096
+ // Otherwise, fall back to the QueryList length.
1097
+ this.headerRowHeight * (this._headerRows ?? this.headerRowsQuery.length));
1098
+ }
1099
+ }
1100
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1101
+ 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: [
1102
+ {
1103
+ provide: VIRTUAL_SCROLL_STRATEGY,
1104
+ useFactory: fixedSizeVirtualScrollStrategyFactory,
1105
+ deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
1106
+ }
1107
+ ], queries: [{ propertyName: "headerRowsQuery", predicate: MatHeaderRowDef }], usesOnChanges: true, ngImport: i0 });
1108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, decorators: [{
1109
+ type: Directive,
1110
+ args: [{
1111
+ selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]",
1112
+ providers: [
1113
+ {
1114
+ provide: VIRTUAL_SCROLL_STRATEGY,
1115
+ useFactory: fixedSizeVirtualScrollStrategyFactory,
1116
+ deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
1117
+ }
1118
+ ]
1119
+ }]
1120
+ }], propDecorators: { rowHeight: [{
1121
+ type: Input
1122
+ }], headerRowHeight: [{
1123
+ type: Input
1124
+ }], buffer: [{
1125
+ type: Input
1126
+ }], headerRows: [{
1127
+ type: Input
1128
+ }], headerRowsQuery: [{
1129
+ type: ContentChildren,
1130
+ args: [MatHeaderRowDef]
1131
+ }] } });
1132
+
1133
+ /**
1134
+ * Directive that wraps a given data source in a "virtual" data source that emits
1135
+ * the slice of the original data source that matches the range that should be rendered
1136
+ * in the containing virtual scroll viewport.
1137
+ */
1138
+ class AnnaVirtualTableDirective {
1139
+ constructor(elementRef, viewport, table, ngZone, _coalescedStyleScheduler) {
1140
+ this.viewport = viewport;
1141
+ this.table = table;
1142
+ this._coalescedStyleScheduler = _coalescedStyleScheduler;
1143
+ this.virtualizedDataStream = new Subject();
1144
+ this.dataSourceChanges = new Subject();
1145
+ /** The raw, unvirtualized data stream. Emits whenever the data in the current DataSource changes. */
1146
+ this.dataStream = this.dataSourceChanges
1147
+ .pipe(
1148
+ // Start off with null data source.
1149
+ startWith(null),
1150
+ // Bundle up the previous and current data sources so we can work with both.
1151
+ pairwise(),
1152
+ // Use `changeDataSource` to disconnect from the previous data source and connect to the
1153
+ // new one, passing back a stream of data changes which we run through `switchMap` to give
1154
+ // us a data stream that emits the latest data from whatever the current data source is.
1155
+ switchMap(([prev, cur]) => this.changeDataSource(prev, cur)),
1156
+ // Replay the last emitted data when someone subscribes.
1157
+ shareReplay(1));
1158
+ this.viewChange = new Subject();
1159
+ this.destroyed$ = new Subject();
1160
+ this.renderedRange = { start: 0, end: 0 };
1161
+ this.isNativeHtmlTable = false;
1162
+ table.dataSource = this.virtualizedDataStream;
1163
+ this.isNativeHtmlTable = elementRef.nativeElement.tagName === 'TABLE';
1164
+ this.dataStream.subscribe(data => {
1165
+ this.data = data;
1166
+ this.onRenderedDataChange();
1167
+ });
1168
+ viewport.renderedRangeStream.pipe(takeUntil(this.destroyed$)).subscribe((range) => {
1169
+ this.renderedRange = range;
1170
+ ngZone.run(() => this.viewChange.next(range));
1171
+ this.onRenderedDataChange();
1172
+ });
1173
+ viewport.attach(this);
1174
+ }
1175
+ set dataSource(value) {
1176
+ this._dataSource = value;
1177
+ if (isDataSource(value)) {
1178
+ this.dataSourceChanges.next(value);
1179
+ }
1180
+ else {
1181
+ this.dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));
1182
+ }
1183
+ }
1184
+ get dataSource() {
1185
+ return this._dataSource;
1186
+ }
1187
+ ngOnInit() {
1188
+ // 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.
1189
+ // This removes the need to account for the translation in the `top` of the sticky header rows.
1190
+ if (this.viewport instanceof AnnaTableVirtualScrollViewportComponent) {
1191
+ return;
1192
+ }
1193
+ this.viewport.scrolledIndexChange
1194
+ .pipe(map(() => this.viewport.getOffsetToRenderedContentStart()), takeUntil(this.destroyed$))
1195
+ .subscribe((offset) => {
1196
+ // We need to set the `style.top` property of the sticky header rows
1197
+ // to the negative value of the virtual scroll viewport's offset, so
1198
+ // make the offset negative.
1199
+ offset = -offset;
1200
+ const stickyStates = this.headerRowDefs.map(rowDef => rowDef.sticky);
1201
+ // This logic is exactly the same as what's in the StickyStyler (literally copy + paste).
1202
+ // The only difference is that the `stickyOffset` variable starts at the virtual scroll
1203
+ // viewport container's offset instead of starting at zero.
1204
+ const rows = this.table._getRenderedRows(this.table._headerRowOutlet);
1205
+ const stickyOffsets = [];
1206
+ const stickyCellHeights = [];
1207
+ const elementsToStick = [];
1208
+ for (let rowIndex = 0, stickyOffset = offset; rowIndex < rows.length; rowIndex++) {
1209
+ stickyOffsets[rowIndex] = stickyOffset;
1210
+ if (!stickyStates[rowIndex]) {
1211
+ continue;
1212
+ }
1213
+ const row = rows[rowIndex];
1214
+ elementsToStick[rowIndex] = this.isNativeHtmlTable ? Array.from(row.children) : [row];
1215
+ const height = row.getBoundingClientRect().height;
1216
+ stickyOffset += height;
1217
+ stickyCellHeights[rowIndex] = height;
1218
+ }
1219
+ // Using the CoalescedStyleScheduler here is optional. It'll work without it,
1220
+ // and CoalescedStyleScheduler is not public (yet?), so feel free to remove it.
1221
+ this._coalescedStyleScheduler.schedule(() => {
1222
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
1223
+ if (!stickyStates[rowIndex]) {
1224
+ continue;
1225
+ }
1226
+ for (const element of elementsToStick[rowIndex]) {
1227
+ element.style.top = `${stickyOffsets[rowIndex]}px`;
1228
+ }
1229
+ }
1230
+ });
1231
+ });
1232
+ }
1233
+ ngOnDestroy() {
1234
+ this.destroyed$.next();
1235
+ this.dataSourceChanges.complete();
1236
+ this.virtualizedDataStream.complete();
1237
+ }
1238
+ /** React to scroll state changes in the viewport. */
1239
+ onRenderedDataChange() {
1240
+ if (!this.renderedRange) {
1241
+ return;
1242
+ }
1243
+ this.renderedItems = this.data.slice(this.renderedRange.start, this.renderedRange.end + 1);
1244
+ // delegate rendering to the table by emitting from the virtualizedDataStream
1245
+ this.virtualizedDataStream.next(this.renderedItems);
1246
+ }
1247
+ /** Swap out one data source for another. */
1248
+ changeDataSource(oldDataSource, newDs) {
1249
+ oldDataSource?.disconnect(this);
1250
+ return newDs ? newDs.connect(this) : of();
1251
+ }
1252
+ /**
1253
+ * This method is only used by the experimental AutoSizeVirtualScrollStrategy.
1254
+ * We're not using that strategy, but I've implemented it just to show how it oculd be done.
1255
+ * I'm not actually sure if this works.
1256
+ */
1257
+ measureRangeSize(range, orientation) {
1258
+ if (orientation === 'horizontal' || range.end < range.start) {
1259
+ // virtual scrolling columns are not supported by this directive
1260
+ return 0;
1261
+ }
1262
+ const renderedBodyRows = this.table._getRenderedRows(this.table._rowOutlet);
1263
+ const firstRow = renderedBodyRows[range.start];
1264
+ const lastRow = renderedBodyRows[range.end];
1265
+ if (!firstRow || !lastRow) {
1266
+ return 0;
1267
+ }
1268
+ // We need to include all header and footer rows in the sum, since they're always rendered
1269
+ const renderedHeaderRows = this.table._getRenderedRows(this.table._headerRowOutlet);
1270
+ const renderedFooterRows = this.table._getRenderedRows(this.table._footerRowOutlet);
1271
+ // 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?
1272
+ const headerHeight = renderedHeaderRows.reduce((sum, row) => {
1273
+ return sum += row.getBoundingClientRect().height;
1274
+ }, 0);
1275
+ const footerHeight = renderedFooterRows.reduce((sum, row) => {
1276
+ return sum += row.getBoundingClientRect().height;
1277
+ }, 0);
1278
+ const bodyHeight = lastRow.getBoundingClientRect().bottom - firstRow.getBoundingClientRect().top;
1279
+ return headerHeight + footerHeight + bodyHeight;
1280
+ }
1281
+ }
1282
+ AnnaVirtualTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, deps: [{ token: i0.ElementRef }, { token: i2.CdkVirtualScrollViewport }, { token: i2$1.CdkTable }, { token: i0.NgZone }, { token: _COALESCED_STYLE_SCHEDULER }], target: i0.ɵɵFactoryTarget.Directive });
1283
+ 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 });
1284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, decorators: [{
1285
+ type: Directive,
1286
+ args: [{
1287
+ selector: '[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]',
1288
+ providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: AnnaVirtualTableDirective }]
1289
+ }]
1290
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.CdkVirtualScrollViewport }, { type: i2$1.CdkTable }, { type: i0.NgZone }, { type: i2$1._CoalescedStyleScheduler, decorators: [{
1291
+ type: Inject,
1292
+ args: [_COALESCED_STYLE_SCHEDULER]
1293
+ }] }]; }, propDecorators: { dataSource: [{
1294
+ type: Input,
1295
+ args: ['appVirtualDataSource']
1296
+ }], headerRowDefs: [{
1297
+ type: ContentChildren,
1298
+ args: [CdkHeaderRowDef]
1299
+ }] } });
1300
+
1301
+ // Angular import statements
1302
+ class AnnaNonEditableGenericTableComponent {
1303
+ constructor(cdRef, annaSortService, annaDateTimeFormatService, annaFilterService, annaGenericTableService) {
1304
+ this.cdRef = cdRef;
1305
+ this.annaSortService = annaSortService;
1306
+ this.annaDateTimeFormatService = annaDateTimeFormatService;
1307
+ this.annaFilterService = annaFilterService;
1308
+ this.annaGenericTableService = annaGenericTableService;
1309
+ this.maximumRowsWhichCanBeRenderedWithoutScroll = 5;
1310
+ this.toggleCheckbox = new EventEmitter();
1311
+ this.toggleRowCheckbox = new EventEmitter();
1312
+ this.toggleHeaderCheckbox = new EventEmitter();
1313
+ this.undoIconClicked = new EventEmitter();
1314
+ this.filterAppliedToTable = new EventEmitter();
1315
+ this.sortingAppliedToTable = new EventEmitter();
1316
+ this.rowClicked = new EventEmitter();
1317
+ this.radioButtonSelected = new EventEmitter();
1318
+ this.columnFilterOpened = new EventEmitter();
1319
+ this.columnFilterClosed = new EventEmitter();
1320
+ this.gtIconClicked = new EventEmitter();
1321
+ this.gtSVGIconClicked = new EventEmitter();
1322
+ this.gtTextActionClicked = new EventEmitter();
1323
+ this.gtViewDetailClicked = new EventEmitter();
1324
+ this.noDataWidth = "55%";
1325
+ this.disableClearAllBtn = true;
1326
+ this.disableColumnClearAllBtn = true;
1327
+ this.allSelected = 0;
1328
+ this.options = {
1329
+ floor: 0,
1330
+ ceil: 0,
1331
+ step: 0.1
1332
+ };
1333
+ this.tableColumns = [];
1334
+ this.totalRowColumns = null;
1335
+ this.isScrolledLeft = false;
1336
+ this.rowBorderWidth = 2;
1337
+ this.PfpIconActiveColor = "#9B1B93";
1338
+ this.PfpIconDisableColor = "rgba(189,189,189,0.5)";
1339
+ this.setTooltipRadioNames();
1340
+ }
1341
+ ngOnInit() {
1342
+ // this.tableData = this.numberOfSkeletonColumns;
1343
+ }
1344
+ ngOnChanges(changes) {
1345
+ // console.log("generic");
1346
+ // console.log(this.tableHeaders);
1347
+ // console.log(JSON.stringify(this.tableData));
1348
+ if (this.showSkeletonLoading) {
1349
+ this.tableData = this.numberOfSkeletonColumns;
1350
+ }
1351
+ else {
1352
+ this.setInitialValueMapData();
1353
+ this.disableEnableEachColumnFilters();
1354
+ this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
1355
+ this.showSkeletonLoading = false;
1356
+ }
1357
+ //setting table column here as well because while showing skeleton loader, we should show table headers.
1358
+ if (changes['tableHeaders'] && changes['tableHeaders'].currentValue) {
1359
+ this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
1360
+ }
1361
+ if (changes['totalRowInfo'] && changes['totalRowInfo'].currentValue) {
1362
+ this.totalRowColumns = this.totalRowInfo.map(x => x.colName);
1363
+ }
1364
+ this.cdRef.detectChanges();
1365
+ }
1366
+ trackByFn(index) {
1367
+ return index;
1368
+ }
1369
+ setTooltipRadioNames() {
1370
+ this.tooltipRadioTextMap = new Map();
1371
+ this.tooltipRadioTextMap.set("StartTimeForFilter", "Start Time");
1372
+ this.tooltipRadioTextMap.set("EndTimeForFilter", "End Time");
1373
+ this.tooltipRadioTextMap.set("start_time_for_filter", "Start Time");
1374
+ this.tooltipRadioTextMap.set("end_time_for_filter", "End Time");
1375
+ this.tooltipRadioTextMap.set("primaryAEName", "Primary AE");
1376
+ this.tooltipRadioTextMap.set("region", "Region");
1377
+ this.tooltipRadioTextMap.set("agencyName", "Agency");
1378
+ this.tooltipRadioTextMap.set("location", "Location");
1379
+ this.tooltipRadioTextMap.set("advertiserName", "Advertiser");
1380
+ this.tooltipRadioTextMap.set("productCode", "Product Code");
1381
+ this.tooltipRadioTextMap.set("flightStartDate", "Start Date");
1382
+ this.tooltipRadioTextMap.set("flightEndDate", "End Date");
1383
+ this.tooltipRadioTextMap.set("orderIdAndRevNumber", "STN Order#-Rev#");
1384
+ this.tooltipRadioTextMap.set("alternateOrderId", "Buyer Order#");
1385
+ this.tooltipRadioTextMap.set("grp", "GRP");
1386
+ this.tooltipRadioTextMap.set("cpp", "CPP");
1387
+ this.tooltipRadioTextMap.set("imps", "IMPS");
1388
+ this.tooltipRadioTextMap.set("cpm", "CPM");
1389
+ this.tooltipRadioTextMap.set("offeredMGs", "Offered MG");
1390
+ this.tooltipRadioTextMap.set("outstandingPE", "O/S PE");
1391
+ this.tooltipRadioTextMap.set("offeredADUs", "Offered ADUs");
1392
+ this.tooltipRadioTextMap.set("udDeficitValue", "Pending Audience Delta");
1393
+ this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
1394
+ this.tooltipRadioTextMap.set("bookedValue", "Booked");
1395
+ this.tooltipRadioTextMap.set("bookedSpots", "Spots");
1396
+ this.tooltipRadioTextMap.set("userChanges", "Other changes");
1397
+ this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
1398
+ this.tooltipRadioTextMap.set("program", "Program");
1399
+ this.tooltipRadioTextMap.set("agency", "Agency");
1400
+ this.tooltipRadioTextMap.set("advertiser", "Advertiser");
1401
+ this.tooltipRadioTextMap.set("startDate", "Start Date");
1402
+ this.tooltipRadioTextMap.set("endDate", "End Date");
1403
+ this.tooltipRadioTextMap.set("rcvPreempt", "Madegood PE");
1404
+ this.tooltipRadioTextMap.set("osPreempt", "O/S PE");
1405
+ this.tooltipRadioTextMap.set("rcvUnderDly", "Recovered UD");
1406
+ this.tooltipRadioTextMap.set("osUnderDly", "O/s Under Dly");
1407
+ this.tooltipRadioTextMap.set("primaryAe", "Primary AE");
1408
+ this.tooltipRadioTextMap.set("region", "Region");
1409
+ this.tooltipRadioTextMap.set("revCode1", "Rev code 1");
1410
+ this.tooltipRadioTextMap.set("orderNoRevNo", "STN Order#-Rev#");
1411
+ this.tooltipRadioTextMap.set("revCode2", "Rev code 2");
1412
+ this.tooltipRadioTextMap.set("revCode3", "Rev code 3");
1413
+ this.tooltipRadioTextMap.set("booked", "Booked");
1414
+ this.tooltipRadioTextMap.set("spots", "Spots");
1415
+ this.tooltipRadioTextMap.set("postedAudPercent", "Posted %");
1416
+ this.tooltipRadioTextMap.set("revision", "Revision");
1417
+ this.tooltipRadioTextMap.set("productCode", "Product Code");
1418
+ this.tooltipRadioTextMap.set("buyerOrderId", "ALT Order#");
1419
+ this.tooltipRadioTextMap.set("demo", "Demo");
1420
+ this.tooltipRadioTextMap.set("postedAdu", "Posted ADUs");
1421
+ this.tooltipRadioTextMap.set("scheduledAdu", "Scheduled ADUs");
1422
+ this.tooltipRadioTextMap.set("audienceDeficit", "Audience Deficit");
1423
+ this.tooltipRadioTextMap.set("postedAudPercent", "Posted Audience %");
1424
+ }
1425
+ generateTableDataWrapper() {
1426
+ this.showSkeletonLoading = true;
1427
+ this.tableDataWrapper = [];
1428
+ let rowObject;
1429
+ let columnName;
1430
+ let columnObject;
1431
+ let columnObjectKey;
1432
+ let keysUsedForTableDisplay;
1433
+ let keysUsedForColumn;
1434
+ let additionalInfoObject;
1435
+ let additionalKeys;
1436
+ this.tableData.forEach((obj) => {
1437
+ rowObject = {};
1438
+ keysUsedForTableDisplay = [];
1439
+ for (var colNum in this.tableHeaders) {
1440
+ columnObject = {};
1441
+ if (!this.tableHeaders[colNum].visible) {
1442
+ continue;
1443
+ }
1444
+ columnName = "";
1445
+ keysUsedForColumn = [];
1446
+ this.tableHeaders[colNum].headerInfo.forEach((header) => {
1447
+ if (header.typeOfBodyData === "STRING") {
1448
+ columnObjectKey = header.objectKey;
1449
+ columnObject[columnObjectKey] = obj[columnObjectKey];
1450
+ keysUsedForTableDisplay.push(columnObjectKey);
1451
+ keysUsedForColumn.push(columnObjectKey);
1452
+ }
1453
+ else if (header.typeOfBodyData === "ICON") {
1454
+ columnObjectKey = header.typeOfBodyData;
1455
+ columnObject[columnObjectKey] = obj[header.objectKey];
1456
+ keysUsedForColumn.push(header.objectKey);
1457
+ }
1458
+ else if (header.typeOfBodyData === "CHECKBOX") {
1459
+ columnObjectKey = header.typeOfBodyData;
1460
+ columnObject[columnObjectKey] = obj[header.objectKey];
1461
+ keysUsedForColumn.push(header.objectKey);
1462
+ }
1463
+ });
1464
+ for (var i = 0; i < keysUsedForColumn.length; i++) {
1465
+ columnName += keysUsedForColumn[i];
1466
+ if (i !== keysUsedForColumn.length - 1) {
1467
+ columnName += ',';
1468
+ }
1469
+ }
1470
+ rowObject[columnName] = columnObject;
1471
+ }
1472
+ additionalInfoObject = {};
1473
+ additionalKeys = Object.keys(obj).filter(key => !keysUsedForTableDisplay.includes(key));
1474
+ additionalKeys.forEach(key => {
1475
+ additionalInfoObject[key] = obj[key];
1476
+ });
1477
+ rowObject.AdditionalInfo = additionalInfoObject;
1478
+ this.tableDataWrapper.push(rowObject);
1479
+ });
1480
+ this.tableData = this.tableDataWrapper;
1481
+ this.showSkeletonLoading = false;
1482
+ // console.log(JSON.stringify(this.tableDataWrapper));
1483
+ }
1484
+ selectOrUnselectCheckbox(rowData, columnKeys, isCheckboxSelected) {
1485
+ this.toggleCheckbox.emit({ rowData, columnKeys, isCheckboxSelected });
1486
+ }
1487
+ selectUnselectAllRows() {
1488
+ this.toggleHeaderCheckbox.emit();
1489
+ }
1490
+ selectUnselectRow(rowData) {
1491
+ this.toggleRowCheckbox.emit(rowData);
1492
+ }
1493
+ undoCreditedSpot(data) {
1494
+ this.undoIconClicked.emit({ data, mgOrCredit: "Credit" });
1495
+ }
1496
+ undoMgSpot(data) {
1497
+ this.undoIconClicked.emit({ data, mgOrCredit: "MakeGood" });
1498
+ }
1499
+ //Sort and Filter Logic begins!
1500
+ closeTooltip() {
1501
+ if (this.tooltip && this.tooltip.isOpen()) {
1502
+ this.tooltip.close();
1503
+ }
1504
+ this.tooltip = null;
1505
+ this.disableCheckboxApply = false;
1506
+ if (!this.bindValueFuncCalled) {
1507
+ this.columnFilterClosed.emit();
1508
+ }
1509
+ }
1510
+ closeSortTooltip() {
1511
+ if (this.annaSortService.tooltip && this.annaSortService.tooltip.isOpen()) {
1512
+ this.annaSortService.tooltip.close();
1513
+ }
1514
+ }
1515
+ initFilters() {
1516
+ this.annaFilterService.tooltipMap = new Map();
1517
+ this.annaFilterService.tooltipSelectedMap = new Map();
1518
+ this.annaSortService.sortByAsc = new Map();
1519
+ this.annaSortService.sortByDesc = new Map();
1520
+ this.annaFilterService.selectedRadio = null;
1521
+ this.annaFilterService.appliedFiltersArray = [];
1522
+ //closing the sort tooltip if we route on the same route or if we click dropdown filters
1523
+ this.closeSortTooltip();
1524
+ this.annaSortService.tooltip = null;
1525
+ this.disableClearAllBtn = true;
1526
+ this.disableTimeFilterApplyBtn = false;
1527
+ }
1528
+ setInitialValueMapData() {
1529
+ this.annaFilterService.initialValueMap = new Map();
1530
+ this.tableHeaders.forEach((column) => {
1531
+ column.headerInfo.forEach((header) => {
1532
+ if (header.filter === "SLIDER") {
1533
+ header.filterObjectKeys.forEach((key) => {
1534
+ let min = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, true);
1535
+ let max = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, false);
1536
+ let obj = { min, max };
1537
+ this.annaFilterService.initialValueMap.set(key, obj);
1538
+ });
1539
+ }
1540
+ else if (header.filter === "DATE") {
1541
+ header.filterObjectKeys.forEach((key) => {
1542
+ if (key == "period") {
1543
+ const minMaxStartDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "startDate");
1544
+ const minMaxEndDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "endDate");
1545
+ let dateObj = { minSelectedDate: minMaxStartDate[0], maxSelectedDate: minMaxEndDate[1] };
1546
+ this.annaFilterService.initialValueMap.set(key, dateObj);
1547
+ }
1548
+ else {
1549
+ const minMaxDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, key);
1550
+ let obj = { minSelectedDate: minMaxDate[0], maxSelectedDate: minMaxDate[1] };
1551
+ this.annaFilterService.initialValueMap.set(key, obj);
1552
+ }
1553
+ });
1554
+ }
1555
+ else if (header.filter === "TIME") {
1556
+ header.filterObjectKeys.forEach((key) => {
1557
+ let data = this.clonedTableData.filter((obj) => !["", "-", null, "0", "<multi>"].includes(obj[key]));
1558
+ let timeArr = map$1(data, key);
1559
+ timeArr.sort((a, b) => {
1560
+ return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
1561
+ });
1562
+ let obj = {
1563
+ fromTime: timeArr[0],
1564
+ toTime: timeArr[timeArr.length - 1],
1565
+ };
1566
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
1567
+ let includeMulti = this.clonedTableData.findIndex((obj) => obj[key] == "<multi>") != -1;
1568
+ let includeZero = this.clonedTableData.findIndex((obj) => obj[key] == "0") != -1;
1569
+ let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key] != "0" && obj[key] != "<multi>") != -1;
1570
+ let obj = {
1571
+ fromTime: timeArr[0],
1572
+ toTime: timeArr[timeArr.length - 1],
1573
+ includeMulti: includeMulti,
1574
+ includeZero: includeZero,
1575
+ includeTimeRange: includeTimeRange
1576
+ };
1577
+ this.annaFilterService.initialValueMap.set(key, obj);
1578
+ }
1579
+ else if (this.gtGeneralConfig.component === "RATING") {
1580
+ let includeMulti = this.clonedTableData.findIndex((obj) => obj[key][0] == "<multi>") != -1;
1581
+ let includeZero = this.clonedTableData.findIndex((obj) => obj[key][0] == "0") != -1;
1582
+ let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key][0] != "0" && obj[key][0] != "<multi>") != -1;
1583
+ let startTimeArr = map$1(this.clonedTableData, "startTime");
1584
+ let endTimeArr = map$1(this.clonedTableData, "endTime");
1585
+ startTimeArr.sort((a, b) => {
1586
+ return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
1587
+ });
1588
+ endTimeArr.sort((a, b) => {
1589
+ return this.annaDateTimeFormatService.sortByTimeDescending(a, b);
1590
+ });
1591
+ let obj = {
1592
+ fromTime: startTimeArr[0],
1593
+ toTime: endTimeArr[0],
1594
+ includeMulti: includeMulti,
1595
+ includeZero: includeZero,
1596
+ includeTimeRange: includeTimeRange
1597
+ };
1598
+ this.annaFilterService.initialValueMap.set(key, obj);
1599
+ }
1600
+ else {
1601
+ this.annaFilterService.initialValueMap.set(key, obj);
1602
+ }
1603
+ });
1604
+ }
1605
+ });
1606
+ });
1607
+ }
1608
+ isTooltipActive(header) {
1609
+ return this.annaFilterService.isTooltipActive(header);
1610
+ }
1611
+ bindTheValueToToolTip(tooltip, header) {
1612
+ this.bindValueFuncCalled = true;
1613
+ let containerToScroll;
1614
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "DRRLISTING") {
1615
+ containerToScroll = document.getElementsByClassName("scrollable-container")[0];
1616
+ var mediaQuery = window.matchMedia("(max-width: 1366px)");
1617
+ if (mediaQuery.matches) {
1618
+ containerToScroll.scroll(0, this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip);
1619
+ }
1620
+ }
1621
+ // if same tooltip opened close it
1622
+ if (tooltip == this.tooltip) {
1623
+ this.bindValueFuncCalled = false;
1624
+ this.closeTooltip();
1625
+ }
1626
+ else {
1627
+ this.searchBar = '';
1628
+ let enabledHeaders = [];
1629
+ header.forEach((item) => {
1630
+ if (item == "period") {
1631
+ let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
1632
+ let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
1633
+ if (uniqStartDate.length > 1 || uniqEndDate.length > 1 || this.isTooltipActive([item])) {
1634
+ enabledHeaders.push(item);
1635
+ }
1636
+ }
1637
+ else if (uniq(this.tableData.map((u) => u[item])).length > 1 || this.isTooltipActive([item])) {
1638
+ enabledHeaders.push(item);
1639
+ }
1640
+ });
1641
+ this.openTooltip(tooltip, enabledHeaders);
1642
+ if (window.innerWidth < 1500 && window.innerHeight < 768 && !this.annaFilterService.sliderSet.has(header[0])) {
1643
+ this.columnFilterOpened.emit();
1644
+ }
1645
+ this.showCheckboxFilterRadioButtons = enabledHeaders.length > 1;
1646
+ this.populateTooltipDataBasedOnSelectedRadio(enabledHeaders[0]);
1647
+ this.bindValueFuncCalled = false;
1648
+ }
1649
+ }
1650
+ openTooltip(tooltip, header) {
1651
+ this.closeTooltip();
1652
+ this.tooltip = tooltip;
1653
+ this.tooltip.open();
1654
+ //convert key into the header
1655
+ this.radioButtons = header.map((key) => {
1656
+ let value = this.tooltipRadioTextMap.has(key)
1657
+ ? this.tooltipRadioTextMap.get(key)
1658
+ : key; //change to display name
1659
+ return new radioButtonModel$1(key, value);
1660
+ });
1661
+ }
1662
+ clearColumnFilter() {
1663
+ this.annaFilterService.clearColumnFilter();
1664
+ this.toolTipdata = null;
1665
+ this.tempTooltipData = null;
1666
+ this.closeTooltip();
1667
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1668
+ this.checkIfSortingIsApplied();
1669
+ this.filterAppliedToTable.emit(this.tableData);
1670
+ this.disableEnableEachColumnFilters();
1671
+ }
1672
+ populateTooltipDataBasedOnSelectedRadio(header) {
1673
+ this.disableSliderApplyButton = false;
1674
+ this.disableCheckboxApply = false;
1675
+ if (this.toolTipdata) {
1676
+ this.revert();
1677
+ }
1678
+ this.annaFilterService.selectedRadio = header;
1679
+ let selectedFilterSet = new Set(this.annaFilterService.appliedFiltersArray);
1680
+ this.disableColumnClearAllBtn = selectedFilterSet.has(this.annaFilterService.selectedRadio) ? false : true;
1681
+ if (this.annaFilterService.calendarSet.has(header)) {
1682
+ this.getCalendarData();
1683
+ }
1684
+ else if (this.annaFilterService.sliderSet.has(header)) {
1685
+ this.getSliderData(header);
1686
+ }
1687
+ else if (this.annaFilterService.timeSet.has(header)) {
1688
+ this.getTimeFilterData(header);
1689
+ }
1690
+ else {
1691
+ this.getCheckboxData(header);
1692
+ }
1693
+ }
1694
+ getSliderData(header) {
1695
+ if (header === "Rate") {
1696
+ this.annaFilterService.translateFunc = "currency";
1697
+ }
1698
+ else {
1699
+ this.annaFilterService.translateFunc = "normal";
1700
+ }
1701
+ this.options = this.annaFilterService.populateSliderTooltip(this.clonedTableData, this.tableData);
1702
+ this.disableSliderApplyButton = this.disableSliderApplyBtn();
1703
+ let selectedTooltipObj;
1704
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
1705
+ selectedTooltipObj = this.annaFilterService.tooltipSelectedMap.get(header);
1706
+ }
1707
+ else {
1708
+ selectedTooltipObj = this.annaFilterService.initialValueMap.get(header);
1709
+ }
1710
+ this.sliderMinValue = selectedTooltipObj.min < this.options.floor ? this.options.floor : selectedTooltipObj.min;
1711
+ this.sliderMaxValue = selectedTooltipObj.max < this.options.ceil ? selectedTooltipObj.max : this.options.ceil;
1712
+ //default step values
1713
+ this.options.step = 1;
1714
+ this.sliderFilterTextBoxStep = "1";
1715
+ if (header !== "WeekNumber") {
1716
+ this.options.step = 0.1;
1717
+ this.sliderFilterTextBoxStep = "0.1";
1718
+ }
1719
+ }
1720
+ getCheckboxData(header) {
1721
+ this.tempTooltipData = this.annaFilterService.populateTooltip(header, this.clonedTableData, this.tableData);
1722
+ this.allSelected = this.annaFilterService.isAllOptionsSelected();
1723
+ this.showAll = this.tempTooltipData.filter((x) => !x.isHidden).length > 1 ? true : false;
1724
+ this.toolTipdata = cloneDeep(this.tempTooltipData);
1725
+ }
1726
+ getCalendarData() {
1727
+ const parsingFormat = "MM/DD/YYYY";
1728
+ let minMaxdate = this.annaFilterService.populateDatePickerTooltipWithData(this.clonedTableData, this.tableData);
1729
+ let selectedDateObj;
1730
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1731
+ selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1732
+ }
1733
+ else {
1734
+ selectedDateObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1735
+ }
1736
+ // For startDate
1737
+ // selected date is less than date which we get
1738
+ if ((selectedDateObj.minSelectedDate).isAfter(minMaxdate.minStartDate)) {
1739
+ this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.minSelectedDate, parsingFormat);
1740
+ }
1741
+ else {
1742
+ this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
1743
+ }
1744
+ // For endData
1745
+ // selectedDate is less than date which we get
1746
+ if ((selectedDateObj.maxSelectedDate).isAfter(minMaxdate.maxEndDate)) {
1747
+ this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
1748
+ }
1749
+ else {
1750
+ this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.maxSelectedDate, parsingFormat);
1751
+ }
1752
+ this.calendarMinEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
1753
+ this.calendarMaxEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
1754
+ }
1755
+ getTimeFilterData(header) {
1756
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
1757
+ this.selectedFromTime = this.annaFilterService.tooltipSelectedMap.get(header).fromTime;
1758
+ this.selectedToTime = this.annaFilterService.tooltipSelectedMap.get(header).toTime;
1759
+ }
1760
+ else {
1761
+ this.selectedFromTime = this.annaFilterService.initialValueMap.get(header).fromTime;
1762
+ this.selectedToTime = this.annaFilterService.initialValueMap.get(header).toTime;
1763
+ }
1764
+ if (this.selectedFromTime != undefined || this.selectedToTime != undefined) {
1765
+ this.selectedFromTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedFromTime, true);
1766
+ this.selectedToTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedToTime, true);
1767
+ this.clonedSelectedFromTime = cloneDeep(this.selectedFromTime);
1768
+ this.clonedSelectedToTime = cloneDeep(this.selectedToTime);
1769
+ }
1770
+ else {
1771
+ this.selectedFromTime = ["-", "-", "-"];
1772
+ this.selectedToTime = ["-", "-", "-"];
1773
+ this.disableTimeFilterApplyBtn = true;
1774
+ }
1775
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
1776
+ this.showMultiTimeCheckbox = false;
1777
+ this.showZeroTimeCheckbox = false;
1778
+ this.showEnterTimeCheckbox = false;
1779
+ if (this.clonedTableData.findIndex((obj) => obj[header] == "0") != -1) {
1780
+ this.showZeroTimeCheckbox = true;
1781
+ this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header] == "0") != -1;
1782
+ this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
1783
+ }
1784
+ if (this.clonedTableData.findIndex((obj) => obj[header] == "<multi>") != -1) {
1785
+ this.showMultiTimeCheckbox = true;
1786
+ this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header] == "<multi>") != -1;
1787
+ this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
1788
+ }
1789
+ if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
1790
+ this.showEnterTimeCheckbox = true;
1791
+ }
1792
+ if (this.clonedTableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1) {
1793
+ this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1;
1794
+ this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
1795
+ }
1796
+ }
1797
+ else if (this.gtGeneralConfig.component === "RATING") {
1798
+ this.showMultiTimeCheckbox = false;
1799
+ this.showZeroTimeCheckbox = false;
1800
+ this.showEnterTimeCheckbox = false;
1801
+ if (this.clonedTableData.findIndex((obj) => obj[header][0] == "0") != -1) {
1802
+ this.showZeroTimeCheckbox = true;
1803
+ this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header][0] == "0") != -1;
1804
+ this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
1805
+ }
1806
+ if (this.clonedTableData.findIndex((obj) => obj[header][0] == "<multi>") != -1) {
1807
+ this.showMultiTimeCheckbox = true;
1808
+ this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header][0] == "<multi>") != -1;
1809
+ this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
1810
+ }
1811
+ if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
1812
+ this.showEnterTimeCheckbox = true;
1813
+ }
1814
+ if (this.clonedTableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1) {
1815
+ this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1;
1816
+ this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
1817
+ }
1818
+ }
1819
+ }
1820
+ selectOrUnselectMultiTimeCheckbox() {
1821
+ this.multiTimeCheckboxChecked = !this.multiTimeCheckboxChecked;
1822
+ this.annaFilterService.includeMultiTime = !this.annaFilterService.includeMultiTime;
1823
+ this.disableTimeFilterApplyButton();
1824
+ }
1825
+ selectOrUnselectZeroTimeCheckbox() {
1826
+ this.zeroTimeCheckboxChecked = !this.zeroTimeCheckboxChecked;
1827
+ this.annaFilterService.includeZeroTime = !this.annaFilterService.includeZeroTime;
1828
+ this.disableTimeFilterApplyButton();
1829
+ }
1830
+ selectOrUnselectEnterTimeCheckbox() {
1831
+ this.enterTimeCheckboxChecked = !this.enterTimeCheckboxChecked;
1832
+ this.annaFilterService.includeTimeRange = !this.annaFilterService.includeTimeRange;
1833
+ this.disableTimeFilterApplyButton();
1834
+ }
1835
+ disableSliderApplyBtn() {
1836
+ return this.options.floor === this.options.ceil;
1837
+ }
1838
+ isCheckboxSelected(data) {
1839
+ this.allSelected = this.annaFilterService.isCheckboxSelected(data);
1840
+ if (this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected && !x.isHidden).length == 0) {
1841
+ this.disableCheckboxApply = true;
1842
+ }
1843
+ else {
1844
+ this.disableCheckboxApply = false;
1845
+ }
1846
+ }
1847
+ minValueChanged(value) {
1848
+ if (isNaN(+value)) {
1849
+ this.sliderMinValue = +this.options.floor;
1850
+ }
1851
+ else {
1852
+ if (+value > this.sliderMaxValue) {
1853
+ this.sliderMinValue = this.sliderMaxValue;
1854
+ }
1855
+ else if (+value < this.options.floor) {
1856
+ this.sliderMinValue = this.options.floor;
1857
+ }
1858
+ else {
1859
+ this.sliderMinValue = +value;
1860
+ }
1861
+ }
1862
+ }
1863
+ maxValueChanged(value) {
1864
+ if (isNaN(+value)) {
1865
+ this.sliderMaxValue = +this.options.ceil;
1866
+ }
1867
+ else {
1868
+ if (+value < this.sliderMinValue) {
1869
+ this.sliderMaxValue = this.sliderMinValue;
1870
+ }
1871
+ else if (+value > this.options.ceil) {
1872
+ this.sliderMinValue = this.options.ceil;
1873
+ }
1874
+ else {
1875
+ this.sliderMaxValue = +value;
1876
+ }
1877
+ }
1878
+ }
1879
+ sliderValueChange() {
1880
+ this.sliderValue = { min: this.sliderMinValue, max: this.sliderMaxValue };
1881
+ }
1882
+ cancelSliderFilter() {
1883
+ this.sliderValue = null;
1884
+ this.closeTooltip();
1885
+ }
1886
+ allOptionClicked() {
1887
+ if (this.allSelected == 0 || this.allSelected == 2) {
1888
+ this.allSelected = 1;
1889
+ this.disableCheckboxApply = false;
1890
+ }
1891
+ else {
1892
+ this.allSelected = 0;
1893
+ this.disableCheckboxApply = true;
1894
+ }
1895
+ this.annaFilterService.allOptionsClicked(this.allSelected);
1896
+ }
1897
+ applyFilters() {
1898
+ let isSame = isEqual(this.toolTipdata, this.tempTooltipData);
1899
+ this.toolTipdata = cloneDeep(this.tempTooltipData);
1900
+ this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
1901
+ if (!isSame) {
1902
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
1903
+ }
1904
+ let tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected).map((x) => x.data);
1905
+ if (tooltipSelectedDataArray.length == 0) {
1906
+ tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).map((x) => x.data);
1907
+ }
1908
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, tooltipSelectedDataArray);
1909
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1910
+ this.checkIfSortingIsApplied();
1911
+ this.filterAppliedToTable.emit(this.tableData);
1912
+ // this.generateTableDataWrapper();
1913
+ this.disableEnableEachColumnFilters();
1914
+ this.closeTooltip();
1915
+ }
1916
+ revert() {
1917
+ this.tempTooltipData = cloneDeep(this.toolTipdata);
1918
+ this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
1919
+ this.toolTipdata = null;
1920
+ }
1921
+ closeCheckboxFilter() {
1922
+ if (this.toolTipdata) {
1923
+ this.revert();
1924
+ }
1925
+ this.closeTooltip();
1926
+ }
1927
+ applySliderFilter() {
1928
+ if (this.sliderValue) {
1929
+ let selectedDataObj;
1930
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1931
+ selectedDataObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1932
+ }
1933
+ else {
1934
+ selectedDataObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1935
+ }
1936
+ let isSame = isEqual(selectedDataObj, this.sliderValue);
1937
+ if (!isSame) {
1938
+ this.annaFilterService.sliderData = { min: this.options.floor, max: this.options.ceil };
1939
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, this.sliderValue);
1940
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
1941
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1942
+ this.checkIfSortingIsApplied();
1943
+ this.filterAppliedToTable.emit(this.tableData);
1944
+ // this.generateTableDataWrapper();
1945
+ this.disableEnableEachColumnFilters();
1946
+ }
1947
+ }
1948
+ this.sliderValue = null;
1949
+ this.closeTooltip();
1950
+ }
1951
+ cancelInDateFilter() {
1952
+ this.closeTooltip();
1953
+ }
1954
+ applyDateFilter(selectedDate) {
1955
+ let selectedDateObj;
1956
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1957
+ selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1958
+ }
1959
+ else {
1960
+ selectedDateObj = cloneDeep(this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio));
1961
+ }
1962
+ let isStartDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate), selectedDateObj.minSelectedDate);
1963
+ let isEndDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate), selectedDateObj.maxSelectedDate);
1964
+ if (!isStartDateSame || !isEndDateSame) {
1965
+ selectedDateObj.minSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate));
1966
+ selectedDateObj.maxSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate));
1967
+ this.annaFilterService.flightDateRange = {
1968
+ minSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMinEnabledDate)),
1969
+ maxSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMaxEnabledDate))
1970
+ };
1971
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedDateObj);
1972
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
1973
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1974
+ this.checkIfSortingIsApplied();
1975
+ this.filterAppliedToTable.emit(this.tableData);
1976
+ // this.generateTableDataWrapper();
1977
+ this.disableEnableEachColumnFilters();
1978
+ }
1979
+ this.closeTooltip();
1980
+ }
1981
+ applyWeekFilter(event) {
1982
+ }
1983
+ incrementHour(arr) {
1984
+ if (arr[0] == "") {
1985
+ arr[0] = 1;
1986
+ }
1987
+ else if (parseInt(arr[0]) < 12) {
1988
+ arr[0] = parseInt(arr[0]) + 1;
1989
+ }
1990
+ else {
1991
+ arr[0] = 1;
1992
+ }
1993
+ }
1994
+ decrementHour(arr) {
1995
+ if (arr[0] == "") {
1996
+ arr[0] = 12;
1997
+ }
1998
+ else if (parseInt(arr[0]) > 1) {
1999
+ arr[0] = parseInt(arr[0]) - 1;
2000
+ }
2001
+ else {
2002
+ arr[0] = 12;
2003
+ }
2004
+ }
2005
+ incrementMinute(arr) {
2006
+ if (arr[1] == "" || parseInt(arr[1]) == 0) {
2007
+ arr[1] = 30;
2008
+ }
2009
+ else {
2010
+ arr[1] = "00";
2011
+ }
2012
+ }
2013
+ decrementMinute(arr) {
2014
+ if (arr[1] == "" || parseInt(arr[1]) == 30) {
2015
+ arr[1] = "00";
2016
+ }
2017
+ else {
2018
+ arr[1] = 30;
2019
+ }
2020
+ }
2021
+ changeStartTimeHour(increment) {
2022
+ if (increment) {
2023
+ this.incrementHour(this.selectedFromTime);
2024
+ }
2025
+ else {
2026
+ this.decrementHour(this.selectedFromTime);
2027
+ }
2028
+ this.disableTimeFilterApplyButton();
2029
+ }
2030
+ changeEndTimeHour(increment) {
2031
+ if (increment) {
2032
+ this.incrementHour(this.selectedToTime);
2033
+ }
2034
+ else {
2035
+ this.decrementHour(this.selectedToTime);
2036
+ }
2037
+ this.disableTimeFilterApplyButton();
2038
+ }
2039
+ changeEndTimeMinute(increment) {
2040
+ if (increment) {
2041
+ this.incrementMinute(this.selectedToTime);
2042
+ }
2043
+ else {
2044
+ this.decrementMinute(this.selectedToTime);
2045
+ }
2046
+ this.disableTimeFilterApplyButton();
2047
+ }
2048
+ changeStartTimeMinute(increment) {
2049
+ if (increment) {
2050
+ this.incrementMinute(this.selectedFromTime);
2051
+ }
2052
+ else {
2053
+ this.decrementMinute(this.selectedFromTime);
2054
+ }
2055
+ this.disableTimeFilterApplyButton();
2056
+ }
2057
+ applyTimeFilters() {
2058
+ let fromTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
2059
+ let fromTime24HrFormat = fromTime24HrFormatArr[0] + ":" + fromTime24HrFormatArr[1] + ":00";
2060
+ let toTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
2061
+ let toTime24HrFormat = toTime24HrFormatArr[0] + ":" + toTime24HrFormatArr[1] + ":00";
2062
+ let previousSelectedData;
2063
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
2064
+ previousSelectedData = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
2065
+ }
2066
+ else {
2067
+ previousSelectedData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
2068
+ }
2069
+ let selectedData = {
2070
+ fromTime: fromTime24HrFormat, toTime: toTime24HrFormat, includeMulti: this.annaFilterService.includeMultiTime,
2071
+ includeZero: this.annaFilterService.includeZeroTime, includeTimeRange: this.annaFilterService.includeTimeRange
2072
+ };
2073
+ if (!isEqual(previousSelectedData, selectedData)) {
2074
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedData);
2075
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
2076
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
2077
+ this.checkIfSortingIsApplied();
2078
+ this.filterAppliedToTable.emit(this.tableData);
2079
+ // this.generateTableDataWrapper();
2080
+ this.disableEnableEachColumnFilters();
2081
+ }
2082
+ this.closeTooltip();
2083
+ }
2084
+ closeTimeFilter() {
2085
+ this.selectedFromTime = cloneDeep(this.clonedSelectedFromTime);
2086
+ this.selectedToTime = cloneDeep(this.clonedSelectedToTime);
2087
+ this.closeTooltip();
2088
+ }
2089
+ disableTimeFilterApplyButton() {
2090
+ let timeFormat = "HH:mm:ss";
2091
+ let startTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
2092
+ let startTime24HrFormat = startTime24HrFormatArr[0] + ":" + startTime24HrFormatArr[1] + ":00";
2093
+ let endTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
2094
+ let endTime24HrFormat = endTime24HrFormatArr[0] + ":" + endTime24HrFormatArr[1] + ":00";
2095
+ this.disableTimeFilterApplyBtn = moment(startTime24HrFormat, timeFormat).isAfter(moment(endTime24HrFormat, timeFormat));
2096
+ if (!this.multiTimeCheckboxChecked && !this.zeroTimeCheckboxChecked && !this.enterTimeCheckboxChecked) {
2097
+ this.disableTimeFilterApplyBtn = true;
2098
+ }
2099
+ }
2100
+ sortedData(event) {
2101
+ if (event.type == "none") {
2102
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
2103
+ }
2104
+ else {
2105
+ this.tableData = event.data;
2106
+ }
2107
+ this.sortingAppliedToTable.emit(this.tableData);
2108
+ // this.generateTableDataWrapper();
2109
+ }
2110
+ checkIfSortingIsApplied() {
2111
+ let appliedkey;
2112
+ let isAsc;
2113
+ const arr = this.sortComponent.toArray();
2114
+ let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByAsc, true);
2115
+ appliedkey = obj.key;
2116
+ isAsc = obj.setValueTo;
2117
+ if (!appliedkey) {
2118
+ let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByDesc, false);
2119
+ appliedkey = obj.key;
2120
+ isAsc = obj.setValueTo;
2121
+ }
2122
+ if (appliedkey) {
2123
+ this.applySorting(arr, appliedkey, isAsc);
2124
+ }
2125
+ }
2126
+ applySorting(sortComponentArr, appliedKey, isAsc) {
2127
+ sortComponentArr.forEach((component) => {
2128
+ if (component.sortBy === appliedKey) {
2129
+ this.setSortComponentDataProperty(component);
2130
+ isAsc ? component.sortByAscending() : component.sortByDescending();
2131
+ }
2132
+ });
2133
+ }
2134
+ setSortComponentDataProperty(sortComponent) {
2135
+ sortComponent.data = this.tableData;
2136
+ sortComponent.clonedData = cloneDeep(this.tableData);
2137
+ }
2138
+ disableEnableEachColumnFilters() {
2139
+ this.tableHeaders.forEach(header => {
2140
+ header.headerInfo.forEach(item => {
2141
+ if (item.filter != "") {
2142
+ let values = [];
2143
+ item.disableFilter = true;
2144
+ item.filterObjectKeys.forEach(key => {
2145
+ if (key == "period") {
2146
+ let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
2147
+ let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
2148
+ item.disableFilter = (uniqStartDate.length > 1 || uniqEndDate.length > 1) ? false : true;
2149
+ }
2150
+ else {
2151
+ values = this.tableData.map((u) => u[key]);
2152
+ if (uniq(values).filter(n => n != null).length > 1) {
2153
+ item.disableFilter = false;
2154
+ }
2155
+ }
2156
+ });
2157
+ // if(uniq(values).length > 1){
2158
+ // item.disableFilter = false;
2159
+ // }else{
2160
+ // item.disableFilter = true;
2161
+ // }
2162
+ }
2163
+ if (item.sort) {
2164
+ if (uniq(this.tableData.map((u) => u[item.objectKey])).length > 1) {
2165
+ item.disableSort = false;
2166
+ }
2167
+ else {
2168
+ item.disableSort = true;
2169
+ }
2170
+ }
2171
+ });
2172
+ });
2173
+ }
2174
+ ngAfterViewInit() {
2175
+ this.annaGenericTableService.virtualScrollSubject.subscribe((val) => {
2176
+ this.isScrolledLeft = document.getElementsByClassName("anna-table-virtual-scroll-viewport")[0].scrollLeft > 0;
2177
+ this.cdRef.detectChanges();
2178
+ });
2179
+ }
2180
+ dataRowClicked(rowData) {
2181
+ this.rowClicked.emit(rowData);
2182
+ }
2183
+ radioButtonClicked(data, action, isDisabled) {
2184
+ if (!isDisabled) {
2185
+ this.radioButtonSelected.emit({ data, action });
2186
+ }
2187
+ }
2188
+ bindTheValueToSellerGroupTooltip(sellerGroupHierarchy, tooltip) {
2189
+ if (this.hierarchyTooltip && this.hierarchyTooltip.open) {
2190
+ this.hierarchyTooltip.close();
2191
+ }
2192
+ this.sellerGroupHierarchy = sellerGroupHierarchy;
2193
+ this.hierarchyTooltip = tooltip;
2194
+ this.hierarchyTooltip.open();
2195
+ }
2196
+ iconClicked(rowData, iconClass) {
2197
+ this.gtIconClicked.emit({ data: rowData, iconClass: iconClass });
2198
+ }
2199
+ svgIconClicked(rowData, key) {
2200
+ this.gtSVGIconClicked.emit({ data: rowData, key: key });
2201
+ }
2202
+ textActionClicked(rowData, id) {
2203
+ this.gtTextActionClicked.emit({ data: rowData, id });
2204
+ }
2205
+ viewDetailsClicked(rowData) {
2206
+ this.gtViewDetailClicked.emit({ data: rowData });
2207
+ }
2208
+ }
2209
+ AnnaNonEditableGenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.AnnaSortService }, { token: i1$1.AnnaDateTimeFormatService }, { token: i1$1.AnnaFilterService }, { token: i1$1.AnnaGenericTableService }], target: i0.ɵɵFactoryTarget.Component });
2210
+ AnnaNonEditableGenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaNonEditableGenericTableComponent, selector: "anna-core-non-editable-generic-table-lib", inputs: { showSkeletonLoading: "showSkeletonLoading", tableHeaders: "tableHeaders", tableData: "tableData", clonedTableData: "clonedTableData", numberOfSkeletonRows: "numberOfSkeletonRows", numberOfSkeletonColumns: "numberOfSkeletonColumns", gtGeneralConfig: "gtGeneralConfig", totalRowInfo: "totalRowInfo", gtDimension: "gtDimension", tableClass: "tableClass", maximumRowsWhichCanBeRenderedWithoutScroll: "maximumRowsWhichCanBeRenderedWithoutScroll" }, outputs: { toggleCheckbox: "toggleCheckbox", toggleRowCheckbox: "toggleRowCheckbox", toggleHeaderCheckbox: "toggleHeaderCheckbox", undoIconClicked: "undoIconClicked", filterAppliedToTable: "filterAppliedToTable", sortingAppliedToTable: "sortingAppliedToTable", rowClicked: "rowClicked", radioButtonSelected: "radioButtonSelected", columnFilterOpened: "columnFilterOpened", columnFilterClosed: "columnFilterClosed", gtIconClicked: "gtIconClicked", gtSVGIconClicked: "gtSVGIconClicked", gtTextActionClicked: "gtTextActionClicked", gtViewDetailClicked: "gtViewDetailClicked" }, viewQueries: [{ propertyName: "sortComponent", predicate: AnnaSortComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-container\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\">\r\n <anna-table-virtual-scroll-viewport\r\n [buffer]=\"gtGeneralConfig.bufferSize\"\r\n [rowHeight]=\"gtDimension.rowHeight\"\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [appVirtualDataSource]=\"tableData\">\r\n <tr\r\n class=\"header-row\"\r\n mat-header-row\r\n *matHeaderRowDef=\"tableColumns; sticky: true\"\r\n [style.height.px]=\"gtDimension.headerHeight\"\r\n ></tr>\r\n <tr\r\n class=\"total-row\"\r\n mat-header-row\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n *matHeaderRowDef=\"totalRowColumns; sticky: true\"\r\n [class.hidden]=\"\r\n showSkeletonLoading ||\r\n (!showSkeletonLoading && !tableData.length) ||\r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n {{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </anna-table-virtual-scroll-viewport>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;top:0;border-top:none!important;border-bottom:none!important;outline:none!important;box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4}:host ::ng-deep .gt thead tr th br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt thead tr th div.row{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}:host ::ng-deep .gt thead tr th div.sort-filter-container{display:flex;flex-wrap:nowrap;align-items:center}:host ::ng-deep .gt thead tr th:first-of-type{box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4,inset 1px 0 #d4d4d4}:host ::ng-deep .gt tbody tr td:first-of-type{box-shadow:inset 1px 0 #d4d4d4,inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td:nth-of-type(n + 2){box-shadow:inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td .upper-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#000;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr td .lower-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#a7a7a7;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt tbody tr:nth-of-type(1) td{border-top:none!important}:host ::ng-deep .gt .custom-column-checkbox-checked,:host ::ng-deep .gt .custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}:host ::ng-deep .gt .custom-column-checkbox-checked{color:#268bff}:host ::ng-deep .gt .custom-column-checkbox-unchecked{color:#4a4a4a}anna-table-virtual-scroll-viewport::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}anna-table-virtual-scroll-viewport::-webkit-scrollbar{width:5px;height:5px}anna-table-virtual-scroll-viewport::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0006!important;border:1px solid rgba(0,0,0,.2)}.table-container{overflow-x:auto;overflow-y:auto}.rowSelectCheckbox,#selectAllRowsCheckbox{cursor:pointer}.disable-checkbox{color:#dedede!important;pointer-events:none!important}.mdi-warning{color:#f3c639;font-size:16px;line-height:28px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1}.redcolor-status{color:#c62a2a}.redcolor-cell-border{outline:1px solid #ff5353!important;outline-offset:-1px!important}#no-filter-space{width:.875rem}::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:1.875rem!important;width:2.625rem;padding:0 .625rem}input.numberInput{margin-right:-.8125rem;padding:0 0 0 .625rem;height:1.875rem}::ng-deep .mat-button-toggle-checked{background-color:#268bff!important;color:#fff!important}::ng-deep .mat-button-toggle-group-appearance-standard{border-radius:0}.hidden{display:none}.no-data-div{margin-top:2.5px}.no-data-div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:.3125rem 1.125rem;border-radius:.25rem}.column-values:nth-of-type(2){color:#a7a7a7!important}.custom-column-checkbox-checked,.custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}.custom-column-checkbox-checked{color:#268bff}.custom-column-checkbox-unchecked{color:#4a4a4a}.time-filter-checkboxes>div>p{color:#151b1e}.radio-button-dimension,::ng-deep .markForCredit .mat-radio-inner-circle,::ng-deep .markForCredit .mat-radio-outer-circle,::ng-deep .mark-for-credit .mat-radio-inner-circle,::ng-deep .mark-for-credit .mat-radio-outer-circle,::ng-deep .markForMakeGood .mat-radio-inner-circle,::ng-deep .markForMakeGood .mat-radio-outer-circle,::ng-deep .noAction .mat-radio-inner-circle,::ng-deep .noAction .mat-radio-outer-circle,::ng-deep .credit .mat-radio-inner-circle,::ng-deep .credit .mat-radio-outer-circle,::ng-deep .approve .mat-radio-inner-circle,::ng-deep .approve .mat-radio-outer-circle,::ng-deep .reject .mat-radio-inner-circle,::ng-deep .reject .mat-radio-outer-circle,::ng-deep .resubmit .mat-radio-inner-circle,::ng-deep .resubmit .mat-radio-outer-circle,::ng-deep .rejectCreditRequest .mat-radio-inner-circle,::ng-deep .rejectCreditRequest .mat-radio-outer-circle{height:18px!important;width:18px!important}::ng-deep .margin-bottom-zero .mat-radio-label{margin-bottom:0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:red}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:red}::ng-deep .mat-radio-button.mat-radio-disabled .mat-radio-outer-circle{border-color:#00000061!important}::ng-deep .mat-radio-button.mat-radio-disabled.mat-radio-checked .mat-radio-inner-circle{background-color:#00000061!important}::ng-deep tr.white-background-row{background:white}::ng-deep tr.gray-background-row{background:rgba(233,233,233,.5)}.remarks-tooltip,.seller-tooltip{font-size:.875rem;color:#268bff;position:relative;top:.1875rem;cursor:pointer}.seller-tooltip{float:right}::ng-deep .remarks-info-tooltip .tooltip-inner{max-width:19.25rem!important}.rating-icon,.lur-violation-icon{color:#268bff;cursor:pointer;margin-left:2px;position:relative;left:-2px}::ng-deep .rating-info-tooltip .tooltip-inner{max-width:800px!important}p.first-row{padding:.5rem .5rem 0;color:#000;white-space:nowrap;text-align:left}p.second-row{padding:2px .5rem .5rem;color:#000;white-space:nowrap;text-align:left}::ng-deep .gt-total-row-tooltip{opacity:1!important}::ng-deep .gt-total-row-tooltip .tooltip-inner{color:#000;box-shadow:0 6px 10px #0000004d,0 2px 2px #0003;background-color:#fff;padding:4px!important;width:100%;border-radius:2px!important}::ng-deep .gt-total-row-tooltip .arrow:before{border-top-color:#fff!important}.info-label{margin-left:4px;color:#268bff;vertical-align:text-top}::ng-deep .hierarchy-tooltip .tooltip-inner{padding:4px!important}table.seller-hierarchy-table{table-layout:fixed;margin:.625rem .625rem .625rem .8125rem}table.seller-hierarchy-table tr th{font-family:Roboto;font-size:.75rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.67;letter-spacing:normal;color:#5e5e5e;white-space:nowrap;background:#ededed;box-shadow:none!important;border-top:1px solid #d4d4d4}table.seller-hierarchy-table tr th:first-of-type,table.seller-hierarchy-table tr td:first-of-type{border-left:1px solid #d4d4d4}table.seller-hierarchy-table tr th:last-of-type,table.seller-hierarchy-table tr td:last-of-type{border-right:1px solid #d4d4d4;width:7.875rem!important}table.seller-hierarchy-table tr th:nth-of-type(2){width:7.75rem!important}table.seller-hierarchy-table tr td{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;box-shadow:none!important;border-top:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4}table.seller-hierarchy-table tr td:nth-of-type(2),table.seller-hierarchy-table tr td:nth-of-type(3){padding-top:.25rem}table.seller-hierarchy-table tr td span{display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}\n"], components: [{ type: AnnaTableVirtualScrollViewportComponent, selector: "anna-table-virtual-scroll-viewport", inputs: ["orientation"], outputs: ["scrolledIndexChange"] }, { type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: ["data", "sortBy", "disableSort", "placement"], outputs: ["sort"] }, { type: i5.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["appearance", "animation", "theme", "loadingText", "count", "ariaLabel"] }, { type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i1$1.AnnaPayForPerformanceIconTemplateComponent, selector: "anna-pay-for-performance-icon-template", inputs: ["color", "width", "height"] }, { type: i1$1.AnnaLiveIconTemplateComponent, selector: "anna-live-icon-template" }, { type: i1$1.AnnaRejectedIconTemplateComponent, selector: "anna-rejected-icon-template" }, { type: i1$1.AnnaNotifyIconTemplateComponent, selector: "anna-notify-icon-template" }, { type: i1$1.AnnaBuyerApprovalIconTemplateComponent, selector: "anna-buyer-approval-icon-template" }, { type: i1$1.AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: ["width", "marginTop"] }, { type: i7.ɵa, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { type: i8.AnnaCalendarFilterComponent, selector: "anna-core-calendar-filter-lib", inputs: ["maxDate", "minDate", "showDate", "selectedFromDate", "selectedToDate"], outputs: ["selectedDate", "apply", "cancel"] }, { type: i8.AnnaWeekCalendarComponent, selector: "anna-core-week-calendar-filter-lib", inputs: ["from-date", "to-date", "disabled-dates", "maxDate", "minDate", "week-calendar-config"], outputs: ["apply", "toggle-calendar"] }, { type: i9.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }], directives: [{ type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]", inputs: ["rowHeight", "headerRowHeight", "buffer", "headerRows"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: AnnaVirtualTableDirective, selector: "[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]", inputs: ["appVirtualDataSource"] }, { type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i3.MatCellDef, selector: "[matCellDef]" }, { type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i14.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i9.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], pipes: { "AnnafilterSearchedText": i1$1.AnnaFilterSearchedTextPipe } });
2211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, decorators: [{
2212
+ type: Component,
2213
+ args: [{ selector: 'anna-core-non-editable-generic-table-lib', template: "<div class=\"table-container\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\">\r\n <anna-table-virtual-scroll-viewport\r\n [buffer]=\"gtGeneralConfig.bufferSize\"\r\n [rowHeight]=\"gtDimension.rowHeight\"\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [appVirtualDataSource]=\"tableData\">\r\n <tr\r\n class=\"header-row\"\r\n mat-header-row\r\n *matHeaderRowDef=\"tableColumns; sticky: true\"\r\n [style.height.px]=\"gtDimension.headerHeight\"\r\n ></tr>\r\n <tr\r\n class=\"total-row\"\r\n mat-header-row\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n *matHeaderRowDef=\"totalRowColumns; sticky: true\"\r\n [class.hidden]=\"\r\n showSkeletonLoading ||\r\n (!showSkeletonLoading && !tableData.length) ||\r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n {{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </anna-table-virtual-scroll-viewport>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;top:0;border-top:none!important;border-bottom:none!important;outline:none!important;box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4}:host ::ng-deep .gt thead tr th br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt thead tr th div.row{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}:host ::ng-deep .gt thead tr th div.sort-filter-container{display:flex;flex-wrap:nowrap;align-items:center}:host ::ng-deep .gt thead tr th:first-of-type{box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4,inset 1px 0 #d4d4d4}:host ::ng-deep .gt tbody tr td:first-of-type{box-shadow:inset 1px 0 #d4d4d4,inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td:nth-of-type(n + 2){box-shadow:inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td .upper-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#000;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr td .lower-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#a7a7a7;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt tbody tr:nth-of-type(1) td{border-top:none!important}:host ::ng-deep .gt .custom-column-checkbox-checked,:host ::ng-deep .gt .custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}:host ::ng-deep .gt .custom-column-checkbox-checked{color:#268bff}:host ::ng-deep .gt .custom-column-checkbox-unchecked{color:#4a4a4a}anna-table-virtual-scroll-viewport::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}anna-table-virtual-scroll-viewport::-webkit-scrollbar{width:5px;height:5px}anna-table-virtual-scroll-viewport::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0006!important;border:1px solid rgba(0,0,0,.2)}.table-container{overflow-x:auto;overflow-y:auto}.rowSelectCheckbox,#selectAllRowsCheckbox{cursor:pointer}.disable-checkbox{color:#dedede!important;pointer-events:none!important}.mdi-warning{color:#f3c639;font-size:16px;line-height:28px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1}.redcolor-status{color:#c62a2a}.redcolor-cell-border{outline:1px solid #ff5353!important;outline-offset:-1px!important}#no-filter-space{width:.875rem}::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:1.875rem!important;width:2.625rem;padding:0 .625rem}input.numberInput{margin-right:-.8125rem;padding:0 0 0 .625rem;height:1.875rem}::ng-deep .mat-button-toggle-checked{background-color:#268bff!important;color:#fff!important}::ng-deep .mat-button-toggle-group-appearance-standard{border-radius:0}.hidden{display:none}.no-data-div{margin-top:2.5px}.no-data-div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:.3125rem 1.125rem;border-radius:.25rem}.column-values:nth-of-type(2){color:#a7a7a7!important}.custom-column-checkbox-checked,.custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}.custom-column-checkbox-checked{color:#268bff}.custom-column-checkbox-unchecked{color:#4a4a4a}.time-filter-checkboxes>div>p{color:#151b1e}.radio-button-dimension,::ng-deep .markForCredit .mat-radio-inner-circle,::ng-deep .markForCredit .mat-radio-outer-circle,::ng-deep .mark-for-credit .mat-radio-inner-circle,::ng-deep .mark-for-credit .mat-radio-outer-circle,::ng-deep .markForMakeGood .mat-radio-inner-circle,::ng-deep .markForMakeGood .mat-radio-outer-circle,::ng-deep .noAction .mat-radio-inner-circle,::ng-deep .noAction .mat-radio-outer-circle,::ng-deep .credit .mat-radio-inner-circle,::ng-deep .credit .mat-radio-outer-circle,::ng-deep .approve .mat-radio-inner-circle,::ng-deep .approve .mat-radio-outer-circle,::ng-deep .reject .mat-radio-inner-circle,::ng-deep .reject .mat-radio-outer-circle,::ng-deep .resubmit .mat-radio-inner-circle,::ng-deep .resubmit .mat-radio-outer-circle,::ng-deep .rejectCreditRequest .mat-radio-inner-circle,::ng-deep .rejectCreditRequest .mat-radio-outer-circle{height:18px!important;width:18px!important}::ng-deep .margin-bottom-zero .mat-radio-label{margin-bottom:0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:red}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:red}::ng-deep .mat-radio-button.mat-radio-disabled .mat-radio-outer-circle{border-color:#00000061!important}::ng-deep .mat-radio-button.mat-radio-disabled.mat-radio-checked .mat-radio-inner-circle{background-color:#00000061!important}::ng-deep tr.white-background-row{background:white}::ng-deep tr.gray-background-row{background:rgba(233,233,233,.5)}.remarks-tooltip,.seller-tooltip{font-size:.875rem;color:#268bff;position:relative;top:.1875rem;cursor:pointer}.seller-tooltip{float:right}::ng-deep .remarks-info-tooltip .tooltip-inner{max-width:19.25rem!important}.rating-icon,.lur-violation-icon{color:#268bff;cursor:pointer;margin-left:2px;position:relative;left:-2px}::ng-deep .rating-info-tooltip .tooltip-inner{max-width:800px!important}p.first-row{padding:.5rem .5rem 0;color:#000;white-space:nowrap;text-align:left}p.second-row{padding:2px .5rem .5rem;color:#000;white-space:nowrap;text-align:left}::ng-deep .gt-total-row-tooltip{opacity:1!important}::ng-deep .gt-total-row-tooltip .tooltip-inner{color:#000;box-shadow:0 6px 10px #0000004d,0 2px 2px #0003;background-color:#fff;padding:4px!important;width:100%;border-radius:2px!important}::ng-deep .gt-total-row-tooltip .arrow:before{border-top-color:#fff!important}.info-label{margin-left:4px;color:#268bff;vertical-align:text-top}::ng-deep .hierarchy-tooltip .tooltip-inner{padding:4px!important}table.seller-hierarchy-table{table-layout:fixed;margin:.625rem .625rem .625rem .8125rem}table.seller-hierarchy-table tr th{font-family:Roboto;font-size:.75rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.67;letter-spacing:normal;color:#5e5e5e;white-space:nowrap;background:#ededed;box-shadow:none!important;border-top:1px solid #d4d4d4}table.seller-hierarchy-table tr th:first-of-type,table.seller-hierarchy-table tr td:first-of-type{border-left:1px solid #d4d4d4}table.seller-hierarchy-table tr th:last-of-type,table.seller-hierarchy-table tr td:last-of-type{border-right:1px solid #d4d4d4;width:7.875rem!important}table.seller-hierarchy-table tr th:nth-of-type(2){width:7.75rem!important}table.seller-hierarchy-table tr td{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;box-shadow:none!important;border-top:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4}table.seller-hierarchy-table tr td:nth-of-type(2),table.seller-hierarchy-table tr td:nth-of-type(3){padding-top:.25rem}table.seller-hierarchy-table tr td span{display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}\n"] }]
2214
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.AnnaSortService }, { type: i1$1.AnnaDateTimeFormatService }, { type: i1$1.AnnaFilterService }, { type: i1$1.AnnaGenericTableService }]; }, propDecorators: { showSkeletonLoading: [{
2215
+ type: Input
2216
+ }], tableHeaders: [{
2217
+ type: Input
2218
+ }], tableData: [{
2219
+ type: Input
2220
+ }], clonedTableData: [{
2221
+ type: Input
2222
+ }], numberOfSkeletonRows: [{
2223
+ type: Input
2224
+ }], numberOfSkeletonColumns: [{
2225
+ type: Input
2226
+ }], gtGeneralConfig: [{
2227
+ type: Input
2228
+ }], totalRowInfo: [{
2229
+ type: Input
2230
+ }], gtDimension: [{
2231
+ type: Input
2232
+ }], tableClass: [{
2233
+ type: Input
2234
+ }], maximumRowsWhichCanBeRenderedWithoutScroll: [{
2235
+ type: Input
2236
+ }], toggleCheckbox: [{
2237
+ type: Output
2238
+ }], toggleRowCheckbox: [{
2239
+ type: Output
2240
+ }], toggleHeaderCheckbox: [{
2241
+ type: Output
2242
+ }], undoIconClicked: [{
2243
+ type: Output
2244
+ }], filterAppliedToTable: [{
2245
+ type: Output
2246
+ }], sortingAppliedToTable: [{
2247
+ type: Output
2248
+ }], rowClicked: [{
2249
+ type: Output
2250
+ }], radioButtonSelected: [{
2251
+ type: Output
2252
+ }], columnFilterOpened: [{
2253
+ type: Output
2254
+ }], columnFilterClosed: [{
2255
+ type: Output
2256
+ }], gtIconClicked: [{
2257
+ type: Output
2258
+ }], gtSVGIconClicked: [{
2259
+ type: Output
2260
+ }], gtTextActionClicked: [{
2261
+ type: Output
2262
+ }], gtViewDetailClicked: [{
2263
+ type: Output
2264
+ }], sortComponent: [{
2265
+ type: ViewChildren,
2266
+ args: [AnnaSortComponent]
2267
+ }] } });
2268
+
2269
+ // Angular import statements
2270
+ class AnnaGenericTableLibModule {
2271
+ }
2272
+ AnnaGenericTableLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2273
+ AnnaGenericTableLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, declarations: [AnnaNonEditableGenericTableComponent,
2274
+ AnnaSortComponent,
2275
+ AnnaTableVirtualScrollViewportComponent,
2276
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2277
+ AnnaVirtualTableDirective], imports: [CommonModule,
2278
+ NgbModule,
2279
+ AnnaDropdownLibModule$1,
2280
+ MatButtonToggleModule,
2281
+ FormsModule,
2282
+ NgxSliderModule,
2283
+ NgxSkeletonLoaderModule,
2284
+ MatTableModule,
2285
+ MatRadioModule,
2286
+ AnnaCoreSharedLibModule$1], exports: [AnnaNonEditableGenericTableComponent,
2287
+ AnnaSortComponent,
2288
+ AnnaTableVirtualScrollViewportComponent,
2289
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2290
+ AnnaVirtualTableDirective] });
2291
+ AnnaGenericTableLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, imports: [[
2292
+ CommonModule,
2293
+ NgbModule,
2294
+ AnnaDropdownLibModule$1,
2295
+ MatButtonToggleModule,
2296
+ FormsModule,
2297
+ NgxSliderModule,
2298
+ NgxSkeletonLoaderModule,
2299
+ MatTableModule,
2300
+ MatRadioModule,
2301
+ AnnaCoreSharedLibModule$1
2302
+ ]] });
2303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableLibModule, decorators: [{
2304
+ type: NgModule,
2305
+ args: [{
2306
+ declarations: [
2307
+ AnnaNonEditableGenericTableComponent,
2308
+ AnnaSortComponent,
2309
+ AnnaTableVirtualScrollViewportComponent,
2310
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2311
+ AnnaVirtualTableDirective,
2312
+ ],
2313
+ imports: [
2314
+ CommonModule,
2315
+ NgbModule,
2316
+ AnnaDropdownLibModule$1,
2317
+ MatButtonToggleModule,
2318
+ FormsModule,
2319
+ NgxSliderModule,
2320
+ NgxSkeletonLoaderModule,
2321
+ MatTableModule,
2322
+ MatRadioModule,
2323
+ AnnaCoreSharedLibModule$1
2324
+ ],
2325
+ exports: [
2326
+ AnnaNonEditableGenericTableComponent,
2327
+ AnnaSortComponent,
2328
+ AnnaTableVirtualScrollViewportComponent,
2329
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective,
2330
+ AnnaVirtualTableDirective
2331
+ ]
2332
+ }]
2333
+ }] });
2334
+
2335
+ //Modules
2336
+
2337
+ class AnnaNoDataComponent {
2338
+ constructor() {
2339
+ this.width = "46%";
2340
+ this.marginTop = "1.25rem";
2341
+ }
2342
+ ngOnInit() {
2343
+ this.message = "No data to display";
2344
+ }
2345
+ }
2346
+ AnnaNoDataComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNoDataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2347
+ AnnaNoDataComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: { width: "width", marginTop: "marginTop" }, ngImport: i0, template: "<div [style.width]=\"width\" [style.marginTop]=\"marginTop\" class=\"no-data\">\r\n <label>{{ message }}</label>\r\n</div>\r\n", styles: ["div{right:0;position:absolute;width:46%;margin:20px}div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:5px 18px;border-radius:4px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNoDataComponent, decorators: [{
2349
+ type: Component,
2350
+ args: [{ selector: "anna-core-no-data-lib", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.width]=\"width\" [style.marginTop]=\"marginTop\" class=\"no-data\">\r\n <label>{{ message }}</label>\r\n</div>\r\n", styles: ["div{right:0;position:absolute;width:46%;margin:20px}div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:5px 18px;border-radius:4px}\n"] }]
2351
+ }], ctorParameters: function () { return []; }, propDecorators: { width: [{
2352
+ type: Input
2353
+ }], marginTop: [{
2354
+ type: Input
2355
+ }] } });
2356
+
2357
+ class AnnaFilterSearchedTextPipe {
2358
+ constructor() {
2359
+ this.callFilter = memoize(this.filter, (...args) => this.filter(args[0], args[1], args[2]));
2360
+ }
2361
+ transform(items, searchText, keyName) {
2362
+ return this.callFilter(items, searchText, keyName);
2363
+ }
2364
+ filter(items, searchText, keyName) {
2365
+ if (!items)
2366
+ return [];
2367
+ if (!searchText)
2368
+ return items;
2369
+ searchText = searchText.toString().toLowerCase();
2370
+ //if keyName is undefined every key will be considered for filtering.
2371
+ if (!keyName)
2372
+ return items.filter((item) => Object.values(item).filter((n) => n.toString().toLowerCase().includes(searchText)).length > 0);
2373
+ return items.filter((item) => item[keyName].toString().toLowerCase().startsWith(searchText));
2374
+ }
2375
+ }
2376
+ AnnaFilterSearchedTextPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFilterSearchedTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2377
+ AnnaFilterSearchedTextPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFilterSearchedTextPipe, name: "AnnafilterSearchedText" });
2378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFilterSearchedTextPipe, decorators: [{
2379
+ type: Pipe,
2380
+ args: [{
2381
+ name: "AnnafilterSearchedText",
2382
+ }]
2383
+ }] });
2384
+
2385
+ class AnnaBuyerApprovalIconTemplateComponent {
2386
+ constructor() { }
2387
+ ngOnInit() {
2388
+ }
2389
+ }
2390
+ AnnaBuyerApprovalIconTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaBuyerApprovalIconTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2391
+ AnnaBuyerApprovalIconTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaBuyerApprovalIconTemplateComponent, selector: "anna-buyer-approval-icon-template", ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"buyerApprovalIcon\"></ng-container>\r\n\r\n<ng-template #buyerApprovalIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Awaiting-Buyer-Approval-icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"time-left\" transform=\"translate(3.000000, 2.000000)\" fill=\"#4A4A4A\" fill-rule=\"nonzero\">\r\n <path\r\n d=\"M6.23157622,14.1696467 C5.70535057,14.0721422 5.2005579,13.9061054 4.72188769,13.6745242 C4.71622258,13.6714711 4.71115545,13.6679958 4.70520709,13.6652025 C4.59240848,13.6104091 4.47979871,13.551718 4.37065094,13.4903961 C4.37027327,13.4899414 4.36958087,13.4896491 4.36898288,13.4893893 C4.16872129,13.37558 3.97327504,13.2496557 3.78339947,13.1117139 C1.01467199,11.0989392 0.348958764,7.13679055 2.29945571,4.27950803 C2.72358352,3.65842885 3.23684237,3.14027823 3.80904983,2.72960334 C3.81609974,2.72453649 3.82314965,2.71950212 3.83013662,2.71440279 C5.84650619,1.28061347 8.58442178,1.183986 10.7254867,2.65733574 L10.2656372,3.34301728 C10.1377946,3.53386873 10.2164452,3.67294733 10.4402485,3.65216024 L12.4377343,3.46760989 C12.6618209,3.4468228 12.7958322,3.24677957 12.7355617,3.0234483 L12.1991703,1.02899228 C12.1391202,0.805401178 11.9853754,0.778637804 11.8574069,0.969456765 L11.3964873,1.6567623 C9.82523796,0.568265989 7.94067659,0.153206329 6.0701521,0.487943386 C5.88175576,0.521592483 5.69600314,0.562776899 5.51279981,0.610717118 C5.51138354,0.610976957 5.51025052,0.611139356 5.50911749,0.611399194 C5.50203611,0.613185585 5.4948603,0.615556612 5.48796775,0.617537881 C3.8749854,1.04500483 2.46767797,2.01585923 1.46347449,3.40105873 C1.4550083,3.41141979 1.44629033,3.4215535 1.43829623,3.432824 C1.40490356,3.47923766 1.37176268,3.52672316 1.33931419,3.57420867 C1.28625101,3.65203032 1.23394317,3.73180077 1.18390138,3.81157121 C1.17763828,3.82118524 1.17285441,3.83096167 1.16737814,3.84067314 C0.338698623,5.1658824 -0.0610062726,6.69795566 0.00754154337,8.25770173 C0.00769890751,8.26283354 0.00741565207,8.26799784 0.00754154337,8.27325957 C0.0141823097,8.42562242 0.0258902012,8.58009646 0.0417839785,8.73216699 C0.0426337448,8.7419759 0.0447424242,8.75126512 0.0463475384,8.76107403 C0.0627763537,8.91398904 0.0833910551,9.06726132 0.109230246,9.22050113 C0.371839509,10.7840149 1.08652445,12.1909434 2.15745032,13.2856758 C2.15993667,13.2882417 2.16251744,13.291035 2.16503527,13.2936983 C2.16591651,13.2947052 2.16689216,13.2952249 2.16774193,13.2961668 C2.45546651,13.5890373 2.7684323,13.8599191 3.10541185,14.1048494 C3.98728044,14.7461311 4.9692641,15.1700252 6.02385557,15.3653264 C6.3438398,15.424667 6.64950389,15.2048436 6.70691032,14.8747836 C6.76428528,14.5444963 6.55146603,14.2287924 6.23157622,14.1696467 Z\"\r\n id=\"Path\"\r\n ></path>\r\n <path\r\n d=\"M9.22237925,14.6588011 C9.29073073,14.9263505 9.1292489,15.198652 8.86169949,15.2670034 C8.51639563,15.355219 8.1641424,15.4188128 7.8069689,15.4570516 C7.53239558,15.4864472 7.28598003,15.2876915 7.25658436,15.0131182 C7.22718869,14.7385449 7.42594445,14.4921293 7.70051776,14.4627336 C8.01004537,14.4295958 8.31515603,14.3745129 8.61417689,14.2981213 C8.8817263,14.2297698 9.15402777,14.3912517 9.22237925,14.6588011 Z M12.5552524,12.2886551 C12.7611952,12.4726175 12.7790139,12.7886982 12.5950515,12.994641 C12.3569806,13.2611574 12.1001968,13.5104915 11.8267859,13.7406023 C11.6155121,13.9184167 11.3000937,13.8912925 11.1222793,13.6800187 C10.9444648,13.4687448 10.9715891,13.1533264 11.1828629,12.975512 C11.4200152,12.7759175 11.6427598,12.5596351 11.8492666,12.3284542 C12.033229,12.1225114 12.3493096,12.1046927 12.5552524,12.2886551 Z M13.9945063,8.57622811 C14.2674538,8.61811209 14.4547678,8.87333344 14.4128838,9.14628095 C14.3584322,9.50112883 14.2787427,9.85020038 14.1746496,10.1914009 C14.0940709,10.4555252 13.8146338,10.6043183 13.5505094,10.5237395 C13.2863851,10.4431608 13.137592,10.1637237 13.2181708,9.89959931 C13.3082912,9.6041989 13.3772907,9.30195366 13.4244534,8.99460564 C13.4663374,8.72165813 13.7215588,8.53434413 13.9945063,8.57622811 Z M13.8741743,4.99628976 C14.0173723,5.32357494 14.1370467,5.66111195 14.2320931,6.00667963 C14.305325,6.27293459 14.1488489,6.54814305 13.8825939,6.62137492 C13.6163389,6.6946068 13.3411305,6.53813067 13.2678986,6.27187571 C13.1856167,5.97271686 13.0820133,5.68050756 12.958028,5.39713383 C12.847338,5.14414702 12.9626923,4.84932868 13.2156791,4.73863865 C13.4686659,4.62794862 13.7634843,4.74330295 13.8741743,4.99628976 Z\"\r\n id=\"Combined-Shape\"\r\n ></path>\r\n <path\r\n d=\"M6.49684035,4 C6.22234237,4 6,4.21290493 6,4.47514225 L6,9.20888548 L10.5252942,11.4469308 C10.5981282,11.4830116 10.6761155,11.5 10.7528554,11.5 C10.9325937,11.5 11.106194,11.4063595 11.1944548,11.2429754 C11.3203307,11.0097848 11.2250786,10.7233052 10.9813357,10.6028789 L6.9931227,8.63027395 L6.9931227,4.47514225 C6.99308988,4.21290493 6.77101009,4 6.49684035,4 Z\"\r\n id=\"Path\"\r\n ></path>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>\r\n", styles: [""], directives: [{ type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaBuyerApprovalIconTemplateComponent, decorators: [{
2393
+ type: Component,
2394
+ args: [{ selector: 'anna-buyer-approval-icon-template', template: "<ng-container [ngTemplateOutlet]=\"buyerApprovalIcon\"></ng-container>\r\n\r\n<ng-template #buyerApprovalIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Awaiting-Buyer-Approval-icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"time-left\" transform=\"translate(3.000000, 2.000000)\" fill=\"#4A4A4A\" fill-rule=\"nonzero\">\r\n <path\r\n d=\"M6.23157622,14.1696467 C5.70535057,14.0721422 5.2005579,13.9061054 4.72188769,13.6745242 C4.71622258,13.6714711 4.71115545,13.6679958 4.70520709,13.6652025 C4.59240848,13.6104091 4.47979871,13.551718 4.37065094,13.4903961 C4.37027327,13.4899414 4.36958087,13.4896491 4.36898288,13.4893893 C4.16872129,13.37558 3.97327504,13.2496557 3.78339947,13.1117139 C1.01467199,11.0989392 0.348958764,7.13679055 2.29945571,4.27950803 C2.72358352,3.65842885 3.23684237,3.14027823 3.80904983,2.72960334 C3.81609974,2.72453649 3.82314965,2.71950212 3.83013662,2.71440279 C5.84650619,1.28061347 8.58442178,1.183986 10.7254867,2.65733574 L10.2656372,3.34301728 C10.1377946,3.53386873 10.2164452,3.67294733 10.4402485,3.65216024 L12.4377343,3.46760989 C12.6618209,3.4468228 12.7958322,3.24677957 12.7355617,3.0234483 L12.1991703,1.02899228 C12.1391202,0.805401178 11.9853754,0.778637804 11.8574069,0.969456765 L11.3964873,1.6567623 C9.82523796,0.568265989 7.94067659,0.153206329 6.0701521,0.487943386 C5.88175576,0.521592483 5.69600314,0.562776899 5.51279981,0.610717118 C5.51138354,0.610976957 5.51025052,0.611139356 5.50911749,0.611399194 C5.50203611,0.613185585 5.4948603,0.615556612 5.48796775,0.617537881 C3.8749854,1.04500483 2.46767797,2.01585923 1.46347449,3.40105873 C1.4550083,3.41141979 1.44629033,3.4215535 1.43829623,3.432824 C1.40490356,3.47923766 1.37176268,3.52672316 1.33931419,3.57420867 C1.28625101,3.65203032 1.23394317,3.73180077 1.18390138,3.81157121 C1.17763828,3.82118524 1.17285441,3.83096167 1.16737814,3.84067314 C0.338698623,5.1658824 -0.0610062726,6.69795566 0.00754154337,8.25770173 C0.00769890751,8.26283354 0.00741565207,8.26799784 0.00754154337,8.27325957 C0.0141823097,8.42562242 0.0258902012,8.58009646 0.0417839785,8.73216699 C0.0426337448,8.7419759 0.0447424242,8.75126512 0.0463475384,8.76107403 C0.0627763537,8.91398904 0.0833910551,9.06726132 0.109230246,9.22050113 C0.371839509,10.7840149 1.08652445,12.1909434 2.15745032,13.2856758 C2.15993667,13.2882417 2.16251744,13.291035 2.16503527,13.2936983 C2.16591651,13.2947052 2.16689216,13.2952249 2.16774193,13.2961668 C2.45546651,13.5890373 2.7684323,13.8599191 3.10541185,14.1048494 C3.98728044,14.7461311 4.9692641,15.1700252 6.02385557,15.3653264 C6.3438398,15.424667 6.64950389,15.2048436 6.70691032,14.8747836 C6.76428528,14.5444963 6.55146603,14.2287924 6.23157622,14.1696467 Z\"\r\n id=\"Path\"\r\n ></path>\r\n <path\r\n d=\"M9.22237925,14.6588011 C9.29073073,14.9263505 9.1292489,15.198652 8.86169949,15.2670034 C8.51639563,15.355219 8.1641424,15.4188128 7.8069689,15.4570516 C7.53239558,15.4864472 7.28598003,15.2876915 7.25658436,15.0131182 C7.22718869,14.7385449 7.42594445,14.4921293 7.70051776,14.4627336 C8.01004537,14.4295958 8.31515603,14.3745129 8.61417689,14.2981213 C8.8817263,14.2297698 9.15402777,14.3912517 9.22237925,14.6588011 Z M12.5552524,12.2886551 C12.7611952,12.4726175 12.7790139,12.7886982 12.5950515,12.994641 C12.3569806,13.2611574 12.1001968,13.5104915 11.8267859,13.7406023 C11.6155121,13.9184167 11.3000937,13.8912925 11.1222793,13.6800187 C10.9444648,13.4687448 10.9715891,13.1533264 11.1828629,12.975512 C11.4200152,12.7759175 11.6427598,12.5596351 11.8492666,12.3284542 C12.033229,12.1225114 12.3493096,12.1046927 12.5552524,12.2886551 Z M13.9945063,8.57622811 C14.2674538,8.61811209 14.4547678,8.87333344 14.4128838,9.14628095 C14.3584322,9.50112883 14.2787427,9.85020038 14.1746496,10.1914009 C14.0940709,10.4555252 13.8146338,10.6043183 13.5505094,10.5237395 C13.2863851,10.4431608 13.137592,10.1637237 13.2181708,9.89959931 C13.3082912,9.6041989 13.3772907,9.30195366 13.4244534,8.99460564 C13.4663374,8.72165813 13.7215588,8.53434413 13.9945063,8.57622811 Z M13.8741743,4.99628976 C14.0173723,5.32357494 14.1370467,5.66111195 14.2320931,6.00667963 C14.305325,6.27293459 14.1488489,6.54814305 13.8825939,6.62137492 C13.6163389,6.6946068 13.3411305,6.53813067 13.2678986,6.27187571 C13.1856167,5.97271686 13.0820133,5.68050756 12.958028,5.39713383 C12.847338,5.14414702 12.9626923,4.84932868 13.2156791,4.73863865 C13.4686659,4.62794862 13.7634843,4.74330295 13.8741743,4.99628976 Z\"\r\n id=\"Combined-Shape\"\r\n ></path>\r\n <path\r\n d=\"M6.49684035,4 C6.22234237,4 6,4.21290493 6,4.47514225 L6,9.20888548 L10.5252942,11.4469308 C10.5981282,11.4830116 10.6761155,11.5 10.7528554,11.5 C10.9325937,11.5 11.106194,11.4063595 11.1944548,11.2429754 C11.3203307,11.0097848 11.2250786,10.7233052 10.9813357,10.6028789 L6.9931227,8.63027395 L6.9931227,4.47514225 C6.99308988,4.21290493 6.77101009,4 6.49684035,4 Z\"\r\n id=\"Path\"\r\n ></path>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>\r\n", styles: [""] }]
2395
+ }], ctorParameters: function () { return []; } });
2396
+
2397
+ class AnnaLiveIconTemplateComponent {
2398
+ constructor() { }
2399
+ ngOnInit() {
2400
+ }
2401
+ }
2402
+ AnnaLiveIconTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaLiveIconTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2403
+ AnnaLiveIconTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaLiveIconTemplateComponent, selector: "anna-live-icon-template", ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"liveIcon\"></ng-container>\r\n<ng-template #liveIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Live-Icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"next\" transform=\"translate(2.000000, 2.000000)\" fill-rule=\"nonzero\">\r\n <path\r\n d=\"M8,0 C3.58171139,0 0,3.58171139 0,8 C0,12.4182886 3.58171139,16 8,16 C12.4182886,16 16,12.4182886 16,8 C15.9950435,3.58379835 12.4162343,0.00498913721 8,0 Z\"\r\n id=\"Path\"\r\n fill=\"#C2E361\"\r\n ></path>\r\n <path\r\n d=\"M8,16 C3.58171139,16 0,12.4182633 0,7.9999837 C0,3.58170409 3.58171139,0 8,0 C12.4182886,0 16,3.58170409 16,7.9999837 C15.9950435,12.416209 12.4162343,15.9950109 8,16 Z M8,0.695640832 C3.96590756,0.695640832 0.69564225,3.96589948 0.69564225,7.9999837 C0.69564225,12.0340679 3.96590756,15.3043266 8,15.3043266 C12.0340924,15.3043266 15.3043578,12.0340679 15.3043578,7.9999837 C15.2997599,3.96782339 12.0322011,0.700238655 8,0.695640832 Z\"\r\n id=\"Shape\"\r\n fill=\"#8BAC2A\"\r\n ></path>\r\n <circle id=\"Oval\" fill=\"#8BAC2A\" cx=\"8\" cy=\"8\" r=\"4\"></circle>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>", styles: [""], directives: [{ type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaLiveIconTemplateComponent, decorators: [{
2405
+ type: Component,
2406
+ args: [{ selector: 'anna-live-icon-template', template: "<ng-container [ngTemplateOutlet]=\"liveIcon\"></ng-container>\r\n<ng-template #liveIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Live-Icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"next\" transform=\"translate(2.000000, 2.000000)\" fill-rule=\"nonzero\">\r\n <path\r\n d=\"M8,0 C3.58171139,0 0,3.58171139 0,8 C0,12.4182886 3.58171139,16 8,16 C12.4182886,16 16,12.4182886 16,8 C15.9950435,3.58379835 12.4162343,0.00498913721 8,0 Z\"\r\n id=\"Path\"\r\n fill=\"#C2E361\"\r\n ></path>\r\n <path\r\n d=\"M8,16 C3.58171139,16 0,12.4182633 0,7.9999837 C0,3.58170409 3.58171139,0 8,0 C12.4182886,0 16,3.58170409 16,7.9999837 C15.9950435,12.416209 12.4162343,15.9950109 8,16 Z M8,0.695640832 C3.96590756,0.695640832 0.69564225,3.96589948 0.69564225,7.9999837 C0.69564225,12.0340679 3.96590756,15.3043266 8,15.3043266 C12.0340924,15.3043266 15.3043578,12.0340679 15.3043578,7.9999837 C15.2997599,3.96782339 12.0322011,0.700238655 8,0.695640832 Z\"\r\n id=\"Shape\"\r\n fill=\"#8BAC2A\"\r\n ></path>\r\n <circle id=\"Oval\" fill=\"#8BAC2A\" cx=\"8\" cy=\"8\" r=\"4\"></circle>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>", styles: [""] }]
2407
+ }], ctorParameters: function () { return []; } });
2408
+
2409
+ class AnnaNotifyIconTemplateComponent {
2410
+ constructor() { }
2411
+ ngOnInit() {
2412
+ }
2413
+ }
2414
+ AnnaNotifyIconTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNotifyIconTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2415
+ AnnaNotifyIconTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaNotifyIconTemplateComponent, selector: "anna-notify-icon-template", ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"notifyIcon\"></ng-container>\r\n\r\n<ng-template #notifyIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Notify-buyer-icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"notification\" transform=\"translate(3.000000, 1.000000)\" fill=\"#4A4A4A\" fill-rule=\"nonzero\">\r\n <path\r\n d=\"M12.6666669,8.66366455 L12.6666669,7.08618164 C12.6666669,4.78491943 11.1196383,2.8344397 9.0000114,2.19737549 L9.0000114,1.4831543 C9.0000114,0.665343018 8.32711346,8.52651283e-13 7.50001599,8.52651283e-13 C6.67291852,8.52651283e-13 6.00002058,0.665343018 6.00002058,1.4831543 L6.00002058,2.19737549 C3.8803604,2.8344397 2.33336513,4.78488647 2.33336513,7.08618164 L2.33336513,8.66366455 C2.33336513,10.685105 1.55410085,12.6018677 0.139138508,14.060896 C0.000472265053,14.2038721 -0.0384942824,14.4148425 0.0401054772,14.5970398 C0.118705237,14.7792371 0.299704683,14.8974609 0.500037404,14.8974609 L5.05032349,14.8974609 C5.28258944,16.0243945 6.29271969,16.875 7.50001599,16.875 C8.70734563,16.875 9.71740921,16.0243945 9.9497085,14.8974609 L14.5,14.8974609 C14.7003273,14.8974609 14.8812934,14.7792371 14.9598932,14.5970398 C15.0384929,14.4148425 14.9995264,14.2038721 14.8608935,14.060896 C13.4459311,12.6018677 12.6666669,10.685072 12.6666669,8.66366455 Z M7.00001752,1.4831543 C7.00001752,1.21055054 7.22431684,0.988769531 7.50001752,0.988769531 C7.77571515,0.988769531 8.00001752,1.21055054 8.00001752,1.4831543 L8.00001752,2.0015332 C7.8354483,1.98584473 7.66868214,1.97753906 7.50001752,1.97753906 C7.33134984,1.97753906 7.16458369,1.98584473 7.00001752,2.0015332 L7.00001752,1.4831543 Z M7.50001599,15.8862305 C6.84818465,15.8862305 6.29241969,15.4728918 6.08602032,14.8974609 L8.91401167,14.8974609 C8.7076123,15.4728918 8.15184733,15.8862305 7.50001599,15.8862305 L7.50001599,15.8862305 Z M1.57770077,13.9086914 C2.71639729,12.3994336 3.33336207,10.5729785 3.33336207,8.66366455 L3.33336207,7.08618164 C3.33336207,4.81448364 5.20252302,2.96630859 7.50001599,2.96630859 C9.79750897,2.96630859 11.6666699,4.81448364 11.6666699,7.08618164 L11.6666699,8.66366455 C11.6666699,10.5729785 12.2836347,12.3994336 13.4223645,13.9086914\"\r\n id=\"Shape\"\r\n ></path>\r\n <path\r\n d=\"M13.7705926,7.02729272 C13.7705926,7.28835319 14.0458159,7.5 14.3852963,7.5 C14.7247767,7.5 15,7.28835319 15,7.02729272 C15,5.13331221 14.0408983,3.3526869 12.2993607,2.01344415 C12.0593394,1.82886771 11.670109,1.82883619 11.4300467,2.01344415 C11.1899844,2.1980521 11.1899844,2.49733883 11.4300467,2.68194678 C12.9393902,3.84263224 13.7705926,5.38583244 13.7705926,7.02729272 L13.7705926,7.02729272 Z\"\r\n id=\"Path\"\r\n ></path>\r\n <path\r\n d=\"M0.614703713,7.5 C0.954184083,7.5 1.22940743,7.28835245 1.22940743,7.02729106 C1.22940743,5.38585655 2.06065077,3.84265095 3.56995328,2.68196143 C3.81001557,2.49735283 3.81001557,2.19806504 3.56995328,2.01345645 C3.32993197,1.82884785 2.94070158,1.82884785 2.70063929,2.01345645 C0.959101713,3.3527039 0,5.13330392 0,7.02729106 C0,7.28835245 0.275223342,7.5 0.614703713,7.5 Z\"\r\n id=\"Path\"\r\n ></path>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>\r\n\r\n", styles: [""], directives: [{ type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNotifyIconTemplateComponent, decorators: [{
2417
+ type: Component,
2418
+ args: [{ selector: 'anna-notify-icon-template', template: "<ng-container [ngTemplateOutlet]=\"notifyIcon\"></ng-container>\r\n\r\n<ng-template #notifyIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Notify-buyer-icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"notification\" transform=\"translate(3.000000, 1.000000)\" fill=\"#4A4A4A\" fill-rule=\"nonzero\">\r\n <path\r\n d=\"M12.6666669,8.66366455 L12.6666669,7.08618164 C12.6666669,4.78491943 11.1196383,2.8344397 9.0000114,2.19737549 L9.0000114,1.4831543 C9.0000114,0.665343018 8.32711346,8.52651283e-13 7.50001599,8.52651283e-13 C6.67291852,8.52651283e-13 6.00002058,0.665343018 6.00002058,1.4831543 L6.00002058,2.19737549 C3.8803604,2.8344397 2.33336513,4.78488647 2.33336513,7.08618164 L2.33336513,8.66366455 C2.33336513,10.685105 1.55410085,12.6018677 0.139138508,14.060896 C0.000472265053,14.2038721 -0.0384942824,14.4148425 0.0401054772,14.5970398 C0.118705237,14.7792371 0.299704683,14.8974609 0.500037404,14.8974609 L5.05032349,14.8974609 C5.28258944,16.0243945 6.29271969,16.875 7.50001599,16.875 C8.70734563,16.875 9.71740921,16.0243945 9.9497085,14.8974609 L14.5,14.8974609 C14.7003273,14.8974609 14.8812934,14.7792371 14.9598932,14.5970398 C15.0384929,14.4148425 14.9995264,14.2038721 14.8608935,14.060896 C13.4459311,12.6018677 12.6666669,10.685072 12.6666669,8.66366455 Z M7.00001752,1.4831543 C7.00001752,1.21055054 7.22431684,0.988769531 7.50001752,0.988769531 C7.77571515,0.988769531 8.00001752,1.21055054 8.00001752,1.4831543 L8.00001752,2.0015332 C7.8354483,1.98584473 7.66868214,1.97753906 7.50001752,1.97753906 C7.33134984,1.97753906 7.16458369,1.98584473 7.00001752,2.0015332 L7.00001752,1.4831543 Z M7.50001599,15.8862305 C6.84818465,15.8862305 6.29241969,15.4728918 6.08602032,14.8974609 L8.91401167,14.8974609 C8.7076123,15.4728918 8.15184733,15.8862305 7.50001599,15.8862305 L7.50001599,15.8862305 Z M1.57770077,13.9086914 C2.71639729,12.3994336 3.33336207,10.5729785 3.33336207,8.66366455 L3.33336207,7.08618164 C3.33336207,4.81448364 5.20252302,2.96630859 7.50001599,2.96630859 C9.79750897,2.96630859 11.6666699,4.81448364 11.6666699,7.08618164 L11.6666699,8.66366455 C11.6666699,10.5729785 12.2836347,12.3994336 13.4223645,13.9086914\"\r\n id=\"Shape\"\r\n ></path>\r\n <path\r\n d=\"M13.7705926,7.02729272 C13.7705926,7.28835319 14.0458159,7.5 14.3852963,7.5 C14.7247767,7.5 15,7.28835319 15,7.02729272 C15,5.13331221 14.0408983,3.3526869 12.2993607,2.01344415 C12.0593394,1.82886771 11.670109,1.82883619 11.4300467,2.01344415 C11.1899844,2.1980521 11.1899844,2.49733883 11.4300467,2.68194678 C12.9393902,3.84263224 13.7705926,5.38583244 13.7705926,7.02729272 L13.7705926,7.02729272 Z\"\r\n id=\"Path\"\r\n ></path>\r\n <path\r\n d=\"M0.614703713,7.5 C0.954184083,7.5 1.22940743,7.28835245 1.22940743,7.02729106 C1.22940743,5.38585655 2.06065077,3.84265095 3.56995328,2.68196143 C3.81001557,2.49735283 3.81001557,2.19806504 3.56995328,2.01345645 C3.32993197,1.82884785 2.94070158,1.82884785 2.70063929,2.01345645 C0.959101713,3.3527039 0,5.13330392 0,7.02729106 C0,7.28835245 0.275223342,7.5 0.614703713,7.5 Z\"\r\n id=\"Path\"\r\n ></path>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>\r\n\r\n", styles: [""] }]
2419
+ }], ctorParameters: function () { return []; } });
2420
+
2421
+ class AnnaPayForPerformanceIconTemplateComponent {
2422
+ constructor() { }
2423
+ ngOnInit() {
2424
+ }
2425
+ }
2426
+ AnnaPayForPerformanceIconTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaPayForPerformanceIconTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2427
+ AnnaPayForPerformanceIconTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaPayForPerformanceIconTemplateComponent, selector: "anna-pay-for-performance-icon-template", inputs: { color: "color", width: "width", height: "height" }, ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"PayForPerformanceIcon\"\r\n [ngTemplateOutletContext]=\"{ color: color,width: width,height:height}\"> \r\n</ng-container>\r\n\r\n<ng-template #PayForPerformanceIcon let-color=\"color\" let-width=\"width\" let-height=\"height\">\r\n <svg [attr.width]=\"width\" [attr.height]=\"height\" viewBox=\"0 0 20 20\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"02.-PAY-FOR-PERFORMANCE-MARKED\" transform=\"translate(-100.000000, -537.000000)\" [attr.fill]=\"color\" fill-rule=\"nonzero\">\r\n <g id=\"PFP\" transform=\"translate(100.000000, 537.000000)\">\r\n <path d=\"M20,3.125 L20,8.3984375 C20,8.82995605 19.6502686,9.1796875 19.21875,9.1796875 C18.7872314,9.1796875 18.4375,8.82995605 18.4375,8.3984375 L18.4375,3.125 C18.4375,2.26348875 17.7365112,1.5625 16.875,1.5625 L3.125,1.5625 C2.26348875,1.5625 1.5625,2.26348875 1.5625,3.125 L1.5625,16.875 C1.5625,17.7365112 2.26348875,18.4375 3.125,18.4375 L12.96875,18.4375 C13.4002686,18.4375 13.75,18.7872314 13.75,19.21875 C13.75,19.6502686 13.4002686,20 12.96875,20 L3.125,20 C1.40182496,20 0,18.598175 0,16.875 L0,3.125 C0,1.40182496 1.40182496,0 3.125,0 L16.875,0 C18.598175,0 20,1.40182496 20,3.125 Z M15.9622314,5.43584332 C15.9447753,5.38514929 15.9230346,5.33649554 15.8936766,5.29255022 C15.8924071,5.290196 15.891455,5.28799875 15.8901855,5.28580147 C15.8589232,5.23981585 15.8206786,5.19995115 15.7789427,5.16322545 C15.7689451,5.15427945 15.7584715,5.1459612 15.7475217,5.13764299 C15.7022947,5.10280065 15.6545285,5.07203893 15.6008908,5.04975236 C15.6008908,5.04975236 15.6008908,5.04975236 15.6005734,5.04975236 C15.5488399,5.02825056 15.4929805,5.01600867 15.4358516,5.00863213 C15.4218867,5.00674875 15.4082392,5.00549317 15.3942744,5.00455147 C15.3791987,5.0036098 15.3652338,5 15.3499994,5 L13.0749975,5 C12.7161959,5 12.4249969,5.28799875 12.4249969,5.64285714 C12.4249969,5.99771553 12.7161959,6.28571429 13.0749975,6.28571429 L13.7624492,6.28571429 L11.4499961,8.53571429 C11.4415854,8.52708216 11.4320639,8.5182931 11.4230185,8.5102888 L10.4034253,7.61160714 C9.89545371,7.12554061 9.08263561,7.13071987 8.58291595,7.62416295 L3.19264032,12.9001116 C2.937623,13.1498152 2.93555998,13.557094 3.18787956,13.8094657 C3.31530888,13.9362793 3.48225238,14 3.64998933,14 C3.8153459,14 3.98054383,13.9383196 4.10733834,13.8141741 L9.5,8.53571429 C9.50840503,8.54434641 9.51792652,8.55313547 9.52697193,8.56113977 L10.5462477,9.45982143 C10.7899979,9.69320244 11.1100788,9.82142857 11.4499961,9.82142857 C11.7970545,9.82142857 12.1233243,9.68770926 12.3651702,9.44852121 L14.6999989,7.1770194 L14.6999989,7.89285714 C14.6999989,8.24771553 14.9911979,8.53571429 15.3499994,8.53571429 C15.708801,8.53571429 16,8.24771553 16,7.89285714 L16,5.64285714 C16,5.58431572 15.9895264,5.52844239 15.9746094,5.47445244 C15.9711181,5.46126884 15.9668335,5.44871304 15.9622314,5.43584332 Z M17.7789307,14.21875 L17.0629883,14.21875 C16.71875,14.21875 16.4280701,13.9146423 16.4280701,13.5546875 L16.4280701,13.2698059 C16.4280701,12.9200745 16.7010498,12.65625 17.0629883,12.65625 L17.7400207,12.65625 C17.9388428,12.65625 18.1446838,12.7894592 18.1446838,13.0123902 C18.1446838,13.4437561 18.4945679,13.7936402 18.9259338,13.7936402 C19.3574524,13.7936402 19.7071838,13.4437561 19.7071838,13.0123902 C19.7071838,12.0761109 19.0158081,11.2947082 18.1048584,11.1273193 L18.1048584,10.625 C18.1048584,10.1934814 17.755127,9.84375 17.3236084,9.84375 C16.8920898,9.84375 16.5423584,10.1934814 16.5423584,10.625 L16.5423584,11.1541748 C16.1557007,11.2454223 15.8015442,11.4382934 15.5142212,11.7193604 C15.0959778,12.1286011 14.8655701,12.6792908 14.8655701,13.2696533 L14.8655701,13.5546875 C14.8655701,14.7824097 15.8512879,15.78125 17.0629883,15.78125 L17.7789307,15.78125 C18.1373596,15.78125 18.4181213,16.053009 18.4181213,16.3999939 L18.4181213,16.5917969 C18.4181213,16.9313049 18.1433105,17.1875 17.7789307,17.1875 L16.615448,17.1875 C16.4233398,17.1875 16.2290955,17.0666504 16.2290955,16.8359375 C16.2290955,16.4044189 15.879364,16.0546875 15.4478455,16.0546875 C15.0163269,16.0546875 14.6665955,16.4044189 14.6665955,16.8359375 C14.6665955,17.8851318 15.4847717,18.7117004 16.5423584,18.7481689 L16.5423584,19.1796875 C16.5423584,19.6112061 16.8920898,19.9609375 17.3236084,19.9609375 C17.755127,19.9609375 18.1048584,19.6112061 18.1048584,19.1796875 L18.1048584,18.7272644 C19.1795349,18.5771179 19.9806213,17.6931763 19.9806213,16.5917969 L19.9806213,16.3999939 C19.9806213,15.8096313 19.7496033,15.2581787 19.3299866,14.8472595 C18.9161682,14.4419861 18.3653259,14.21875 17.7789307,14.21875 Z\" id=\"Shape-Copy-9\"></path>\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>", styles: [""], directives: [{ type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaPayForPerformanceIconTemplateComponent, decorators: [{
2429
+ type: Component,
2430
+ args: [{ selector: 'anna-pay-for-performance-icon-template', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngTemplateOutlet]=\"PayForPerformanceIcon\"\r\n [ngTemplateOutletContext]=\"{ color: color,width: width,height:height}\"> \r\n</ng-container>\r\n\r\n<ng-template #PayForPerformanceIcon let-color=\"color\" let-width=\"width\" let-height=\"height\">\r\n <svg [attr.width]=\"width\" [attr.height]=\"height\" viewBox=\"0 0 20 20\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\r\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <g id=\"02.-PAY-FOR-PERFORMANCE-MARKED\" transform=\"translate(-100.000000, -537.000000)\" [attr.fill]=\"color\" fill-rule=\"nonzero\">\r\n <g id=\"PFP\" transform=\"translate(100.000000, 537.000000)\">\r\n <path d=\"M20,3.125 L20,8.3984375 C20,8.82995605 19.6502686,9.1796875 19.21875,9.1796875 C18.7872314,9.1796875 18.4375,8.82995605 18.4375,8.3984375 L18.4375,3.125 C18.4375,2.26348875 17.7365112,1.5625 16.875,1.5625 L3.125,1.5625 C2.26348875,1.5625 1.5625,2.26348875 1.5625,3.125 L1.5625,16.875 C1.5625,17.7365112 2.26348875,18.4375 3.125,18.4375 L12.96875,18.4375 C13.4002686,18.4375 13.75,18.7872314 13.75,19.21875 C13.75,19.6502686 13.4002686,20 12.96875,20 L3.125,20 C1.40182496,20 0,18.598175 0,16.875 L0,3.125 C0,1.40182496 1.40182496,0 3.125,0 L16.875,0 C18.598175,0 20,1.40182496 20,3.125 Z M15.9622314,5.43584332 C15.9447753,5.38514929 15.9230346,5.33649554 15.8936766,5.29255022 C15.8924071,5.290196 15.891455,5.28799875 15.8901855,5.28580147 C15.8589232,5.23981585 15.8206786,5.19995115 15.7789427,5.16322545 C15.7689451,5.15427945 15.7584715,5.1459612 15.7475217,5.13764299 C15.7022947,5.10280065 15.6545285,5.07203893 15.6008908,5.04975236 C15.6008908,5.04975236 15.6008908,5.04975236 15.6005734,5.04975236 C15.5488399,5.02825056 15.4929805,5.01600867 15.4358516,5.00863213 C15.4218867,5.00674875 15.4082392,5.00549317 15.3942744,5.00455147 C15.3791987,5.0036098 15.3652338,5 15.3499994,5 L13.0749975,5 C12.7161959,5 12.4249969,5.28799875 12.4249969,5.64285714 C12.4249969,5.99771553 12.7161959,6.28571429 13.0749975,6.28571429 L13.7624492,6.28571429 L11.4499961,8.53571429 C11.4415854,8.52708216 11.4320639,8.5182931 11.4230185,8.5102888 L10.4034253,7.61160714 C9.89545371,7.12554061 9.08263561,7.13071987 8.58291595,7.62416295 L3.19264032,12.9001116 C2.937623,13.1498152 2.93555998,13.557094 3.18787956,13.8094657 C3.31530888,13.9362793 3.48225238,14 3.64998933,14 C3.8153459,14 3.98054383,13.9383196 4.10733834,13.8141741 L9.5,8.53571429 C9.50840503,8.54434641 9.51792652,8.55313547 9.52697193,8.56113977 L10.5462477,9.45982143 C10.7899979,9.69320244 11.1100788,9.82142857 11.4499961,9.82142857 C11.7970545,9.82142857 12.1233243,9.68770926 12.3651702,9.44852121 L14.6999989,7.1770194 L14.6999989,7.89285714 C14.6999989,8.24771553 14.9911979,8.53571429 15.3499994,8.53571429 C15.708801,8.53571429 16,8.24771553 16,7.89285714 L16,5.64285714 C16,5.58431572 15.9895264,5.52844239 15.9746094,5.47445244 C15.9711181,5.46126884 15.9668335,5.44871304 15.9622314,5.43584332 Z M17.7789307,14.21875 L17.0629883,14.21875 C16.71875,14.21875 16.4280701,13.9146423 16.4280701,13.5546875 L16.4280701,13.2698059 C16.4280701,12.9200745 16.7010498,12.65625 17.0629883,12.65625 L17.7400207,12.65625 C17.9388428,12.65625 18.1446838,12.7894592 18.1446838,13.0123902 C18.1446838,13.4437561 18.4945679,13.7936402 18.9259338,13.7936402 C19.3574524,13.7936402 19.7071838,13.4437561 19.7071838,13.0123902 C19.7071838,12.0761109 19.0158081,11.2947082 18.1048584,11.1273193 L18.1048584,10.625 C18.1048584,10.1934814 17.755127,9.84375 17.3236084,9.84375 C16.8920898,9.84375 16.5423584,10.1934814 16.5423584,10.625 L16.5423584,11.1541748 C16.1557007,11.2454223 15.8015442,11.4382934 15.5142212,11.7193604 C15.0959778,12.1286011 14.8655701,12.6792908 14.8655701,13.2696533 L14.8655701,13.5546875 C14.8655701,14.7824097 15.8512879,15.78125 17.0629883,15.78125 L17.7789307,15.78125 C18.1373596,15.78125 18.4181213,16.053009 18.4181213,16.3999939 L18.4181213,16.5917969 C18.4181213,16.9313049 18.1433105,17.1875 17.7789307,17.1875 L16.615448,17.1875 C16.4233398,17.1875 16.2290955,17.0666504 16.2290955,16.8359375 C16.2290955,16.4044189 15.879364,16.0546875 15.4478455,16.0546875 C15.0163269,16.0546875 14.6665955,16.4044189 14.6665955,16.8359375 C14.6665955,17.8851318 15.4847717,18.7117004 16.5423584,18.7481689 L16.5423584,19.1796875 C16.5423584,19.6112061 16.8920898,19.9609375 17.3236084,19.9609375 C17.755127,19.9609375 18.1048584,19.6112061 18.1048584,19.1796875 L18.1048584,18.7272644 C19.1795349,18.5771179 19.9806213,17.6931763 19.9806213,16.5917969 L19.9806213,16.3999939 C19.9806213,15.8096313 19.7496033,15.2581787 19.3299866,14.8472595 C18.9161682,14.4419861 18.3653259,14.21875 17.7789307,14.21875 Z\" id=\"Shape-Copy-9\"></path>\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n</ng-template>", styles: [""] }]
2431
+ }], ctorParameters: function () { return []; }, propDecorators: { color: [{
2432
+ type: Input
2433
+ }], width: [{
2434
+ type: Input
2435
+ }], height: [{
2436
+ type: Input
2437
+ }] } });
2438
+
2439
+ class AnnaRejectedIconTemplateComponent {
2440
+ constructor() { }
2441
+ ngOnInit() {
2442
+ }
2443
+ }
2444
+ AnnaRejectedIconTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaRejectedIconTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2445
+ AnnaRejectedIconTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaRejectedIconTemplateComponent, selector: "anna-rejected-icon-template", ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"rejectedIcon\"></ng-container>\r\n\r\n<ng-template #rejectedIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Buyer-rejected-icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path\r\n d=\"M15.7822266,4.21777344 C14.3671875,2.80276367 12.4951465,2 10.5,2 C6.37918945,2 3,5.37253906 3,9.5 C3,13.6296289 6.37133789,17 10.5,17 C14.6105273,17 18,13.6429004 18,9.5 C18,7.50485352 17.1972656,5.6327832 15.7822266,4.21777344 Z M10.5,15.2128906 C7.34220703,15.2128906 4.78710938,12.664502 4.78710938,9.5 C4.78710938,8.26950195 5.17382812,7.10055664 5.88574219,6.13375977 L13.8662402,14.1054395 C12.8993848,14.8261719 11.730498,15.2128906 10.5,15.2128906 Z M15.1054688,12.8661816 L7.13375977,4.88574219 C8.10061523,4.17382813 9.26950195,3.78710938 10.5,3.78710938 C13.6578809,3.78710938 16.2128906,6.33549805 16.2128906,9.5 C16.2128906,10.7304395 15.8261719,11.8993848 15.1054688,12.8661816 Z\"\r\n id=\"Shape\"\r\n fill=\"#4A4A4A\"\r\n fill-rule=\"nonzero\"\r\n ></path>\r\n </g>\r\n </svg>\r\n</ng-template>\r\n", styles: [""], directives: [{ type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
2446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaRejectedIconTemplateComponent, decorators: [{
2447
+ type: Component,
2448
+ args: [{ selector: 'anna-rejected-icon-template', template: "<ng-container [ngTemplateOutlet]=\"rejectedIcon\"></ng-container>\r\n\r\n<ng-template #rejectedIcon>\r\n <svg width=\"15px\" height=\"15px\" viewBox=\"0 0 20 20\">\r\n <g id=\"Buyer-rejected-icon\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <path\r\n d=\"M15.7822266,4.21777344 C14.3671875,2.80276367 12.4951465,2 10.5,2 C6.37918945,2 3,5.37253906 3,9.5 C3,13.6296289 6.37133789,17 10.5,17 C14.6105273,17 18,13.6429004 18,9.5 C18,7.50485352 17.1972656,5.6327832 15.7822266,4.21777344 Z M10.5,15.2128906 C7.34220703,15.2128906 4.78710938,12.664502 4.78710938,9.5 C4.78710938,8.26950195 5.17382812,7.10055664 5.88574219,6.13375977 L13.8662402,14.1054395 C12.8993848,14.8261719 11.730498,15.2128906 10.5,15.2128906 Z M15.1054688,12.8661816 L7.13375977,4.88574219 C8.10061523,4.17382813 9.26950195,3.78710938 10.5,3.78710938 C13.6578809,3.78710938 16.2128906,6.33549805 16.2128906,9.5 C16.2128906,10.7304395 15.8261719,11.8993848 15.1054688,12.8661816 Z\"\r\n id=\"Shape\"\r\n fill=\"#4A4A4A\"\r\n fill-rule=\"nonzero\"\r\n ></path>\r\n </g>\r\n </svg>\r\n</ng-template>\r\n", styles: [""] }]
2449
+ }], ctorParameters: function () { return []; } });
2450
+
2451
+ // Angular import statements
2452
+ class AnnaCoreSharedLibModule {
2453
+ }
2454
+ AnnaCoreSharedLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaCoreSharedLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2455
+ AnnaCoreSharedLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaCoreSharedLibModule, declarations: [AnnaNoDataComponent,
2456
+ AnnaFilterSearchedTextPipe,
2457
+ AnnaBuyerApprovalIconTemplateComponent,
2458
+ AnnaLiveIconTemplateComponent,
2459
+ AnnaNotifyIconTemplateComponent,
2460
+ AnnaPayForPerformanceIconTemplateComponent,
2461
+ AnnaRejectedIconTemplateComponent], imports: [CommonModule], exports: [AnnaNoDataComponent,
2462
+ AnnaFilterSearchedTextPipe,
2463
+ AnnaBuyerApprovalIconTemplateComponent,
2464
+ AnnaLiveIconTemplateComponent,
2465
+ AnnaNotifyIconTemplateComponent,
2466
+ AnnaPayForPerformanceIconTemplateComponent,
2467
+ AnnaRejectedIconTemplateComponent] });
2468
+ AnnaCoreSharedLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaCoreSharedLibModule, imports: [[
2469
+ CommonModule
2470
+ ]] });
2471
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaCoreSharedLibModule, decorators: [{
2472
+ type: NgModule,
2473
+ args: [{
2474
+ declarations: [
2475
+ AnnaNoDataComponent,
2476
+ AnnaFilterSearchedTextPipe,
2477
+ AnnaBuyerApprovalIconTemplateComponent,
2478
+ AnnaLiveIconTemplateComponent,
2479
+ AnnaNotifyIconTemplateComponent,
2480
+ AnnaPayForPerformanceIconTemplateComponent,
2481
+ AnnaRejectedIconTemplateComponent
2482
+ ],
2483
+ imports: [
2484
+ CommonModule
2485
+ ],
2486
+ exports: [
2487
+ AnnaNoDataComponent,
2488
+ AnnaFilterSearchedTextPipe,
2489
+ AnnaBuyerApprovalIconTemplateComponent,
2490
+ AnnaLiveIconTemplateComponent,
2491
+ AnnaNotifyIconTemplateComponent,
2492
+ AnnaPayForPerformanceIconTemplateComponent,
2493
+ AnnaRejectedIconTemplateComponent
2494
+ ]
2495
+ }]
2496
+ }] });
2497
+
2498
+ // Angular import statements
2499
+ class AnnaDateTimeFormatService {
2500
+ constructor() {
2501
+ console.log("AnnaDateTimeFormatService service created.");
2502
+ }
2503
+ convertToNgbDateStandardFormat(date) {
2504
+ return {
2505
+ year: parseInt(moment(date, "MM/DD/YYYY").format("YYYY")),
2506
+ month: parseInt(moment(date, "MM/DD/YYYY").format("M")),
2507
+ day: parseInt(moment(date, "MM/DD/YYYY").format("D")),
2508
+ };
2509
+ }
2510
+ convertToNgbDate(date, parseFormat) {
2511
+ return {
2512
+ year: parseInt(moment(date, parseFormat).format("YYYY")),
2513
+ month: parseInt(moment(date, parseFormat).format("M")),
2514
+ day: parseInt(moment(date, parseFormat).format("D")),
2515
+ };
2516
+ }
2517
+ formatToTwelveHrs(time, callRemoveZero) {
2518
+ if (time.endsWith('A') || time.endsWith('P')) {
2519
+ time = time.substring(0, time.length - 1);
2520
+ }
2521
+ let tmp = time.split(":");
2522
+ let formattedTime = [];
2523
+ if (+tmp[0] > 12) {
2524
+ formattedTime[0] = (+tmp[0] - 12).toString();
2525
+ if (+tmp[0] == 24)
2526
+ formattedTime[2] = "AM";
2527
+ else
2528
+ formattedTime[2] = "PM";
2529
+ }
2530
+ else if (tmp[0] == "12") {
2531
+ formattedTime[0] = tmp[0];
2532
+ formattedTime[2] = "PM";
2533
+ }
2534
+ else if (tmp[0] == "00") {
2535
+ formattedTime[0] = "12";
2536
+ formattedTime[2] = "AM";
2537
+ }
2538
+ else {
2539
+ formattedTime[0] = tmp[0];
2540
+ formattedTime[2] = "AM";
2541
+ }
2542
+ formattedTime[1] = tmp[1];
2543
+ if (callRemoveZero)
2544
+ formattedTime = this.removeZero(formattedTime);
2545
+ return formattedTime;
2546
+ }
2547
+ convertTotwentyFourHrsFormat(time, callAddZero) {
2548
+ let tmp = time.split(/[ :]+/);
2549
+ let formattedTime = [];
2550
+ if (tmp[0] != "12" && tmp[2] == "PM") {
2551
+ formattedTime[0] = (+tmp[0] + 12).toString();
2552
+ }
2553
+ else if (tmp[0] == "12" && tmp[2] == "AM") {
2554
+ formattedTime[0] = "00";
2555
+ }
2556
+ else
2557
+ formattedTime[0] = tmp[0].toString();
2558
+ formattedTime[1] = tmp[1].toString();
2559
+ if (callAddZero)
2560
+ formattedTime = this.addZero(formattedTime);
2561
+ return formattedTime;
2562
+ }
2563
+ removeZero(time) {
2564
+ let removedZero;
2565
+ let formattedTime = time;
2566
+ if (time[0] == "01" ||
2567
+ time[0] == "02" ||
2568
+ time[0] == "03" ||
2569
+ time[0] == "04" ||
2570
+ time[0] == "05" ||
2571
+ time[0] == "06" ||
2572
+ time[0] == "07" ||
2573
+ time[0] == "08" ||
2574
+ time[0] == "09") {
2575
+ removedZero = time[0].toString();
2576
+ formattedTime[0] = removedZero.charAt(1);
2577
+ formattedTime[1] = time[1];
2578
+ formattedTime[2] = time[2];
2579
+ }
2580
+ return formattedTime;
2581
+ }
2582
+ addZero(time) {
2583
+ let addedZero;
2584
+ let formattedTime = time;
2585
+ if (time[1] == "0")
2586
+ time[1] = "0" + time[1];
2587
+ if (time[0] == "0" ||
2588
+ time[0] == "1" ||
2589
+ time[0] == "2" ||
2590
+ time[0] == "3" ||
2591
+ time[0] == "4" ||
2592
+ time[0] == "5" ||
2593
+ time[0] == "6" ||
2594
+ time[0] == "7" ||
2595
+ time[0] == "8" ||
2596
+ time[0] == "9") {
2597
+ addedZero = "0" + time[0];
2598
+ formattedTime[0] = addedZero;
2599
+ formattedTime[1] = time[1];
2600
+ }
2601
+ return formattedTime;
2602
+ }
2603
+ sortByTimeAscending(a, b) {
2604
+ let format = "HH:mm:ss";
2605
+ a = moment(a, format);
2606
+ b = moment(b, format);
2607
+ let results;
2608
+ results = a.hours() > b.hours() ? 1 : a.hours() < b.hours() ? -1 : 0;
2609
+ if (results === 0)
2610
+ results = a.minutes() > b.minutes() ? 1 : a.minutes() < b.minutes() ? -1 : 0;
2611
+ if (results === 0)
2612
+ results = a.seconds() > b.seconds() ? 1 : a.seconds() < b.seconds() ? -1 : 0;
2613
+ return results;
2614
+ }
2615
+ sortByTimeDescending(a, b) {
2616
+ let format = "HH:mm:ss";
2617
+ a = moment(a, format);
2618
+ b = moment(b, format);
2619
+ let results;
2620
+ results = a.hours() < b.hours() ? 1 : a.hours() > b.hours() ? -1 : 0;
2621
+ if (results === 0)
2622
+ results = a.minutes() < b.minutes() ? 1 : a.minutes() > b.minutes() ? -1 : 0;
2623
+ if (results === 0)
2624
+ results = a.seconds() < b.seconds() ? 1 : a.seconds() > b.seconds() ? -1 : 0;
2625
+ return results;
2626
+ }
2627
+ convertNgbDateToMoment(ngbDate) {
2628
+ let converted = moment();
2629
+ converted.month(ngbDate.month - 1);
2630
+ converted.date(ngbDate.day);
2631
+ converted.year(ngbDate.year);
2632
+ return converted.format("MM/DD/YYYY");
2633
+ }
2634
+ compareDate(a, b, isAsc) {
2635
+ return isAsc ? moment(a).diff(b) : moment(b).diff(a);
2636
+ }
2637
+ formatDateAndHHMMATimeToStandardFormat(dateAndTime) {
2638
+ let standardFormat, date, time;
2639
+ if (dateAndTime.includes("|")) {
2640
+ date = dateAndTime.slice(0, dateAndTime.indexOf("|"));
2641
+ time = dateAndTime.slice(dateAndTime.indexOf('|') + 1, dateAndTime.length).trim();
2642
+ time = time.slice(0, 2) + ":" + time.slice(2, 4) + " " + time.slice(4, 5);
2643
+ time = time + "M";
2644
+ standardFormat = date + time;
2645
+ }
2646
+ else {
2647
+ standardFormat = dateAndTime + " 00:00 AM";
2648
+ }
2649
+ return moment(standardFormat).format("MM/DD/YYYY hh:mm A");
2650
+ }
2651
+ compare(a, b, isAsc) {
2652
+ return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
2653
+ }
2654
+ sortDataByBroadcastTimeAsc(firstParamTime, secondParamTime, broadcastTime) {
2655
+ let format = "HH:mm:ss";
2656
+ let a = moment(firstParamTime, format);
2657
+ let b = moment(secondParamTime, format);
2658
+ let broadcastMomentDateTime = moment(broadcastTime, "HH:mm:ss");
2659
+ a = a.isBefore(broadcastMomentDateTime) ? a.add(1, "d") : a;
2660
+ b = b.isBefore(broadcastMomentDateTime) ? b.add(1, "d") : b;
2661
+ let result = a.isBefore(b) ? -1 : a.isAfter(b) ? 1 : 0;
2662
+ return result;
2663
+ }
2664
+ }
2665
+ AnnaDateTimeFormatService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaDateTimeFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2666
+ AnnaDateTimeFormatService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaDateTimeFormatService, providedIn: 'root' });
2667
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaDateTimeFormatService, decorators: [{
2668
+ type: Injectable,
2669
+ args: [{
2670
+ providedIn: 'root'
2671
+ }]
2672
+ }], ctorParameters: function () { return []; } });
2673
+
2674
+ class AnnaGlobalConfigService {
2675
+ /*
2676
+ Initializing all default settings
2677
+ */
2678
+ constructor() {
2679
+ console.log("AnnaGlobalConfigService service created.");
2680
+ this.defaultAngular2MultiSelectSettings = {
2681
+ text: "Select option",
2682
+ selectAllText: "Select All",
2683
+ unSelectAllText: "UnSelect All",
2684
+ badgeShowLimit: 1,
2685
+ singleSelection: false,
2686
+ classes: "filter-dropdowns",
2687
+ enableSearchFilter: true,
2688
+ enableCheckAll: true,
2689
+ autoPosition: false,
2690
+ disabled: false,
2691
+ position: "bottom",
2692
+ lazyLoading: false,
2693
+ showCheckbox: true,
2694
+ maxHeight: 300,
2695
+ enableFilterSelectAll: true,
2696
+ };
2697
+ this.defaultNgxAsideSettings = {
2698
+ title: '"Filters"',
2699
+ cancelButtonTitle: '"Cancel"',
2700
+ submitButtonTitle: '"Apply"',
2701
+ closeOnEscape: false,
2702
+ showOverlay: false,
2703
+ showDefaultFooter: false,
2704
+ showDefaultHeader: false,
2705
+ };
2706
+ this.defaultNgbDatePickerSettings = {
2707
+ autoClose: false,
2708
+ placeholder: "mm-dd-yyyy",
2709
+ displayMonths: 1,
2710
+ firstDayOfWeek: 1,
2711
+ showWeekNumbers: false,
2712
+ readonly: true,
2713
+ };
2714
+ this.defaultNgSelectSettings = {
2715
+ allowClear: false,
2716
+ placeholder: "Select",
2717
+ };
2718
+ this.defaultNgxInfiniteScrollSettings = {
2719
+ infiniteScrollDistance: 1,
2720
+ infiniteScrollUpDistance: 2,
2721
+ infiniteScrollThrottle: 300,
2722
+ scrollWindow: false,
2723
+ };
2724
+ this.defaultNgxSkeletonLoaderSettings = {
2725
+ numberOfSkeletonRows: Array(6).fill(0),
2726
+ };
2727
+ this.defaultRadioButtonsComponentConfig = {
2728
+ heading: "Select Option",
2729
+ radioButtons: [
2730
+ {
2731
+ value: "Yes",
2732
+ isDisabled: false,
2733
+ label: "Yes",
2734
+ class: "",
2735
+ },
2736
+ {
2737
+ value: "No",
2738
+ isDisabled: false,
2739
+ label: "No",
2740
+ class: "",
2741
+ },
2742
+ ],
2743
+ };
2744
+ this.defaultConfirmationPopupConfig = {
2745
+ showCancelButton: true,
2746
+ title: "Are you sure ?",
2747
+ showConfirmButton: true,
2748
+ cancelButtonLabel: "No",
2749
+ confirmButtonLabel: "Yes",
2750
+ showCloseIcon: true,
2751
+ backdrop: "static",
2752
+ windowClass: "",
2753
+ size: "sm",
2754
+ keyboard: false,
2755
+ };
2756
+ this.defaultWeekCalendarConfig = {
2757
+ firstDayOfWeek: 1,
2758
+ showWeekNumbers: true,
2759
+ dateFormatToDisplay: "d MMM y",
2760
+ dateFormatForRequest: "y-MM-dd",
2761
+ maxWeeksToShowWithRemainingCount: 2,
2762
+ numberOfMonthsToEnableInPast: 1,
2763
+ selectMultipleWeeks: false,
2764
+ customClass: "",
2765
+ emitMultipleWeekObjects: true,
2766
+ maxWeeksToSelect: 0,
2767
+ showAsDropdown: true,
2768
+ selectCurrentWeek: true,
2769
+ };
2770
+ this.defaultGtHeaderConfig = {
2771
+ iconColumn: false,
2772
+ checkboxColumn: false,
2773
+ lastColumnKeys: []
2774
+ };
2775
+ this.defaultGtGeneralConfig = {
2776
+ component: "",
2777
+ totalRow: false,
2778
+ isHeaderChecked: false,
2779
+ disableHeaderCheckbox: false,
2780
+ verticalScrollOffsetForFilterTooltip: 0,
2781
+ isGrouped: false,
2782
+ showAllColumnFilter: true,
2783
+ bufferSize: 20,
2784
+ page: ""
2785
+ };
2786
+ this.defaultSingleSelectConfig = {
2787
+ showSearchBar: false,
2788
+ placeholder: "Select",
2789
+ classes: "",
2790
+ position: "BOTTOM",
2791
+ maxHeightOfList: 200
2792
+ };
2793
+ this.defaultMultiSelectConfig = { ...this.defaultSingleSelectConfig, ...{ showErrorWhenNoOptionSelected: true } };
2794
+ }
2795
+ }
2796
+ AnnaGlobalConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGlobalConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2797
+ AnnaGlobalConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGlobalConfigService, providedIn: "root" });
2798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGlobalConfigService, decorators: [{
2799
+ type: Injectable,
2800
+ args: [{
2801
+ providedIn: "root",
2802
+ }]
2803
+ }], ctorParameters: function () { return []; } });
2804
+
2805
+ class tooltipModel {
2806
+ constructor(obj) {
2807
+ this.data = obj;
2808
+ this.isSelected = false;
2809
+ }
2810
+ }
2811
+ class tooltipModelForColumnLevelFiltering {
2812
+ constructor(data) {
2813
+ this.data = data;
2814
+ this.isSelected = true;
2815
+ this.isHidden = false;
2816
+ }
2817
+ }
2818
+ class radioButtonModel {
2819
+ constructor(key, value) {
2820
+ this.key = key;
2821
+ this.label = value;
2822
+ }
2823
+ }
2824
+ var AllSelectedStatus;
2825
+ (function (AllSelectedStatus) {
2826
+ AllSelectedStatus[AllSelectedStatus["none"] = 0] = "none";
2827
+ AllSelectedStatus[AllSelectedStatus["allSelected"] = 1] = "allSelected";
2828
+ AllSelectedStatus[AllSelectedStatus["fewSelected"] = 2] = "fewSelected";
2829
+ })(AllSelectedStatus || (AllSelectedStatus = {}));
2830
+
2831
+ class AnnaFilterService {
2832
+ constructor(dateTimeFormatService) {
2833
+ this.dateTimeFormatService = dateTimeFormatService;
2834
+ this.tooltipMap = new Map();
2835
+ this.tooltipSelectedMap = new Map();
2836
+ this.appliedFiltersArray = [];
2837
+ this.percentTranslateFunction = (data) => {
2838
+ const val = data.toFixed(1) + "%";
2839
+ return val;
2840
+ };
2841
+ this.currencyTranslateFunction = (data) => {
2842
+ if (data >= 1000) {
2843
+ const val = (data / 1000).toFixed(1) + "k";
2844
+ return "$" + val;
2845
+ }
2846
+ else if (data != Math.floor(data)) {
2847
+ return data.toFixed(1).toString();
2848
+ }
2849
+ return "$" + data;
2850
+ };
2851
+ this.normalTranslateFunction = (data) => {
2852
+ if (data >= 1000) {
2853
+ const val = (data / 1000).toFixed(1) + "k";
2854
+ return val;
2855
+ }
2856
+ else if (data != Math.floor(data)) {
2857
+ return data.toFixed(1).toString();
2858
+ }
2859
+ return data.toString();
2860
+ };
2861
+ console.log("AnnaFilterService service created.");
2862
+ const sliderArr = [
2863
+ "rcvPreempt",
2864
+ "osPreempt",
2865
+ "rcvUnderDly",
2866
+ "postedAudPercent",
2867
+ "booked",
2868
+ "spots",
2869
+ "grp",
2870
+ "cpp",
2871
+ "imps",
2872
+ "cpm",
2873
+ "osUnderDly",
2874
+ "totalWeeks",
2875
+ "WeekNumber",
2876
+ "Rate",
2877
+ "OrderedRatingsOrImpressions",
2878
+ "PostedRatingsOrImpressions", ,
2879
+ "postedAudPercent",
2880
+ "postedAdu",
2881
+ "scheduledAdu",
2882
+ "audienceDeficit",
2883
+ "offeredMGs",
2884
+ "outstandingPE",
2885
+ "offeredADUs",
2886
+ "udDeficitValue",
2887
+ "bookedValue",
2888
+ "bookedSpots",
2889
+ "userChanges"
2890
+ ];
2891
+ const calendarArr = ["period", "AirDate", "flightStartDate", "flightEndDate", "date"];
2892
+ const timeArr = ["StartTimeForFilter", "EndTimeForFilter",
2893
+ "start_time_for_filter", "end_time_for_filter", "startEndTimeMulti"];
2894
+ this.sliderSet = new Set(sliderArr);
2895
+ this.calendarSet = new Set(calendarArr);
2896
+ this.timeSet = new Set(timeArr);
2897
+ }
2898
+ returnMaxAndMinValue(data, key, isMin) {
2899
+ data = data.filter((obj) => !["", "-", null].includes(obj[key]));
2900
+ const values = data.map((x) => x[key]);
2901
+ let valueToReturn = isMin ? min(values) : max(values);
2902
+ return valueToReturn;
2903
+ }
2904
+ returnMinAndMaxDate(data, key) {
2905
+ data = data.filter((obj) => !["", "-", null].includes(obj[key]));
2906
+ let DateArr = data.map((obj) => moment(obj[key]));
2907
+ let minDate = moment.min(DateArr);
2908
+ let maxDate = moment.max(DateArr);
2909
+ return [minDate, maxDate];
2910
+ }
2911
+ isTooltipActive(header) {
2912
+ let set = new Set(this.appliedFiltersArray);
2913
+ return (set.has(header[0])) || (set.has(header[1]));
2914
+ }
2915
+ clearColumnFilter() {
2916
+ this.tooltipSelectedMap.delete(this.selectedRadio);
2917
+ if (this.tooltipMap.has(this.selectedRadio)) {
2918
+ this.tooltipMap.delete(this.selectedRadio);
2919
+ }
2920
+ if (this.selectedRadio === "postedAdu") {
2921
+ this.subRadioButton = "required";
2922
+ this.tooltipSelectedMap.delete("isAudRequired");
2923
+ }
2924
+ let appliedFilterSet = new Set(this.appliedFiltersArray);
2925
+ appliedFilterSet.delete(this.selectedRadio);
2926
+ this.appliedFiltersArray = [...appliedFilterSet];
2927
+ }
2928
+ populateSliderTooltip(completeData, filteredData) {
2929
+ let obj;
2930
+ let minValue;
2931
+ let maxValue;
2932
+ if (this.appliedFiltersArray.length > 0 &&
2933
+ this.appliedFiltersArray[this.appliedFiltersArray.length - 1] === this.selectedRadio) {
2934
+ let subsetData;
2935
+ let subfilterApplied = false;
2936
+ //applying all filterexcept the current filter
2937
+ if (this.selectedRadio === "postedAdu" && this.tooltipSelectedMap.has("isAudRequired")) {
2938
+ this.tooltipSelectedMap.delete("isAudRequired");
2939
+ subfilterApplied = true;
2940
+ }
2941
+ subsetData = this.filterData(completeData, this.selectedRadio);
2942
+ //need to find min and max value for
2943
+ minValue = this.returnMaxAndMinValue(subsetData, this.selectedRadio, true);
2944
+ maxValue = this.returnMaxAndMinValue(subsetData, this.selectedRadio, false);
2945
+ if (this.selectedRadio === "postedAdu" && subfilterApplied) {
2946
+ this.tooltipSelectedMap.set("isAudRequired", [false]);
2947
+ }
2948
+ }
2949
+ else {
2950
+ minValue = this.returnMaxAndMinValue(filteredData, this.selectedRadio, true);
2951
+ maxValue = this.returnMaxAndMinValue(filteredData, this.selectedRadio, false);
2952
+ }
2953
+ this.ngxSliderObj = this.setOptionValues(minValue, maxValue);
2954
+ if (this.translateFunc === "normal") {
2955
+ this.ngxSliderObj.translate = this.normalTranslateFunction;
2956
+ }
2957
+ else if (this.translateFunc === "percent") {
2958
+ this.ngxSliderObj.translate = this.percentTranslateFunction;
2959
+ }
2960
+ else if (this.translateFunc === "currency") {
2961
+ this.ngxSliderObj.translate = this.currencyTranslateFunction;
2962
+ }
2963
+ return obj;
2964
+ }
2965
+ setOptionValues(minValue, maxValue) {
2966
+ return {
2967
+ floor: minValue,
2968
+ ceil: maxValue
2969
+ };
2970
+ }
2971
+ populateTooltip(selectedColumnName, completeData, filteredData) {
2972
+ let tooltipData;
2973
+ if (this.appliedFiltersArray.length === 0) {
2974
+ tooltipData = this.populateTooltipDataBasedOnSelectedRadio([selectedColumnName], completeData);
2975
+ tooltipData.forEach((item) => (item.isHidden = false));
2976
+ }
2977
+ else if (selectedColumnName === this.appliedFiltersArray[this.appliedFiltersArray.length - 1]) {
2978
+ let subsetData = this.filterData(completeData, selectedColumnName); //filter the data without applying the latest filter
2979
+ tooltipData = this.showHideFilterCheckbox(subsetData, selectedColumnName);
2980
+ }
2981
+ else {
2982
+ //if it is not the latest filter
2983
+ //then filtered Data will be used
2984
+ //create the option data
2985
+ if (!this.tooltipMap.has(selectedColumnName)) {
2986
+ this.populateTooltipDataBasedOnSelectedRadio([selectedColumnName], completeData);
2987
+ }
2988
+ tooltipData = this.showHideFilterCheckbox(filteredData, selectedColumnName);
2989
+ }
2990
+ return tooltipData;
2991
+ }
2992
+ populateTooltipDataBasedOnSelectedRadio(value, originalData) {
2993
+ //if the initial tooltip data is already present fetch from the map
2994
+ if (this.tooltipMap.has(value[0])) {
2995
+ return this.tooltipMap.get(value[0]);
2996
+ }
2997
+ else {
2998
+ //get the unique values from the column and save it in the map
2999
+ this.selectedRadio = value[0];
3000
+ const data = sortBy(originalData.map((u) => u[this.selectedRadio])).filter(n => n !== null); //sorting the data in alphabetical order
3001
+ const dataSet = new Set(data); //created a set from the data
3002
+ const toolTipdata = [...dataSet].map((x) => new tooltipModelForColumnLevelFiltering(x));
3003
+ this.tooltipMap.set(value[0], toolTipdata); //setting the key value pair in the tooltipMap
3004
+ this.tooltipSelectedMap.set(value[0], map$1(toolTipdata, "data")); //setting the key value pair in tooltipSelectedMap
3005
+ return toolTipdata;
3006
+ }
3007
+ }
3008
+ showHideFilterCheckbox(arr, selectedColumnName) {
3009
+ let currentSubsetData = uniq(arr.map((u) => u[selectedColumnName]));
3010
+ //get the initial tooltip Data
3011
+ let tooltipData = this.tooltipMap.get(selectedColumnName);
3012
+ //show or hide the value
3013
+ tooltipData.forEach((value) => {
3014
+ //if the element is not present then hide the element
3015
+ let elementToFindIndex = currentSubsetData.findIndex((n) => n === value.data);
3016
+ if (elementToFindIndex === -1) {
3017
+ value.isHidden = true;
3018
+ }
3019
+ else {
3020
+ //show the element
3021
+ value.isHidden = false;
3022
+ }
3023
+ });
3024
+ return tooltipData;
3025
+ }
3026
+ isAllOptionsSelected() {
3027
+ let allSelected;
3028
+ let totalOptionsCount = this.tooltipMap.get(this.selectedRadio).filter((x) => !x.isHidden).length;
3029
+ let selectedOptionsCount = this.tooltipMap.get(this.selectedRadio).filter((x) => !x.isHidden && x.isSelected).length;
3030
+ if (selectedOptionsCount === 0) {
3031
+ allSelected = AllSelectedStatus.none;
3032
+ }
3033
+ else if (selectedOptionsCount > 0 && selectedOptionsCount < totalOptionsCount) {
3034
+ allSelected = AllSelectedStatus.fewSelected;
3035
+ }
3036
+ else {
3037
+ allSelected = AllSelectedStatus.allSelected;
3038
+ }
3039
+ return allSelected;
3040
+ }
3041
+ populateDatePickerTooltipWithData(completeData, filteredData) {
3042
+ let enabledDates;
3043
+ //some filter is applied and the latest filter is the date filter
3044
+ if (this.appliedFiltersArray.length > 0 &&
3045
+ this.appliedFiltersArray[this.appliedFiltersArray.length - 1] === this.selectedRadio) {
3046
+ let subsetData;
3047
+ //applying all filterexcept thec current filter
3048
+ if (this.selectedRadio === "period") {
3049
+ subsetData = this.filterData(completeData, "period");
3050
+ let minStartDate = this.returnMinAndMaxDate(subsetData, "startDate");
3051
+ let maxEndDate = this.returnMinAndMaxDate(subsetData, "endDate");
3052
+ enabledDates = { minStartDate: minStartDate[0], maxEndDate: maxEndDate[1] };
3053
+ }
3054
+ else if (this.selectedRadio === "AirDate" || this.selectedRadio === "flightStartDate" ||
3055
+ this.selectedRadio === "flightEndDate" || this.selectedRadio == "date") {
3056
+ subsetData = this.filterData(completeData, this.selectedRadio);
3057
+ let minAndMaxDate = this.returnMinAndMaxDate(subsetData, this.selectedRadio);
3058
+ enabledDates = { minStartDate: minAndMaxDate[0], maxEndDate: minAndMaxDate[1] };
3059
+ }
3060
+ else {
3061
+ subsetData = this.filterData(completeData, this.selectedRadio);
3062
+ //need to find min and max date for start and end date
3063
+ //enabledDates is an arr of minDate and maxDate
3064
+ enabledDates = this.returnMinAndMaxDate(subsetData, this.selectedRadio);
3065
+ }
3066
+ }
3067
+ else {
3068
+ if (this.selectedRadio === "period") {
3069
+ let minStartDate = this.returnMinAndMaxDate(filteredData, "startDate");
3070
+ let maxEndDate = this.returnMinAndMaxDate(filteredData, "endDate");
3071
+ enabledDates = { minStartDate: minStartDate[0], maxEndDate: maxEndDate[1] };
3072
+ }
3073
+ else if (this.selectedRadio === "AirDate" || this.selectedRadio === "flightStartDate" ||
3074
+ this.selectedRadio === "flightEndDate" || this.selectedRadio == "date") {
3075
+ let minAndMaxDate = this.returnMinAndMaxDate(filteredData, this.selectedRadio);
3076
+ enabledDates = { minStartDate: minAndMaxDate[0], maxEndDate: minAndMaxDate[1] };
3077
+ }
3078
+ else {
3079
+ //need to find min and max date for start and end date.
3080
+ // enabledDates is an arr of minDate and maxDate
3081
+ enabledDates = this.returnMinAndMaxDate(filteredData, this.selectedRadio);
3082
+ }
3083
+ }
3084
+ return enabledDates;
3085
+ }
3086
+ findUniqueDatesWithData(data) {
3087
+ let uniqueDates = uniq(data.map((u) => u["date"]));
3088
+ let uniqueDatesInNgbDateFormat = [];
3089
+ uniqueDates.forEach((date) => {
3090
+ uniqueDatesInNgbDateFormat.push(this.dateTimeFormatService.convertToNgbDateStandardFormat(moment(date, "MM/DD/YY").format("MM/DD/YYYY")));
3091
+ });
3092
+ return uniqueDatesInNgbDateFormat;
3093
+ }
3094
+ isCheckboxSelected(selectedData) {
3095
+ selectedData.isSelected = !selectedData.isSelected;
3096
+ let allSelected = this.isAllOptionsSelected();
3097
+ return allSelected;
3098
+ }
3099
+ allOptionsClicked(status) {
3100
+ let header = this.selectedRadio;
3101
+ if (status === 1) {
3102
+ this.tooltipMap.get(header).forEach((item) => {
3103
+ if (!item.isHidden) {
3104
+ item.isSelected = true;
3105
+ }
3106
+ });
3107
+ this.tooltipSelectedMap.set(header, this.tooltipMap
3108
+ .get(header)
3109
+ .filter((x) => x.isSelected)
3110
+ .map((x) => x.data));
3111
+ }
3112
+ else {
3113
+ this.tooltipMap.get(header).forEach((item) => {
3114
+ if (!item.isHidden) {
3115
+ item.isSelected = false;
3116
+ }
3117
+ });
3118
+ this.tooltipSelectedMap.delete(header);
3119
+ }
3120
+ }
3121
+ reOrderAppliedFiltersArray(isHierarchialUserFiltered, date) {
3122
+ let isFiltered = true;
3123
+ isFiltered = this.checkIfDataIsFiltered(isFiltered, isHierarchialUserFiltered, date);
3124
+ this.removeOrChangeLatestFilterIndex(isFiltered);
3125
+ }
3126
+ checkIfDataIsFiltered(isFiltered, isHierarchialUserFiltered, date) {
3127
+ if (this.selectedRadio == "user" && !this.tooltipMap.has("user")) {
3128
+ isFiltered = cloneDeep(isHierarchialUserFiltered);
3129
+ }
3130
+ else if (this.selectedRadio == "StartTimeForFilter" || this.selectedRadio == "EndTimeForFilter"
3131
+ || this.selectedRadio == "start_time_for_filter" || this.selectedRadio == "end_time_for_filter" || this.selectedRadio == "startEndTimeMulti") {
3132
+ isFiltered = !isEqual(this.initialValueMap.get(this.selectedRadio), this.tooltipSelectedMap.get(this.selectedRadio)) || !this.includeZeroTime || !this.includeMultiTime;
3133
+ }
3134
+ else if (this.selectedRadio == "startEndTime" || this.selectedRadio == "TimeBand") {
3135
+ isFiltered = !isEqual(this.initialValueMap.get(this.selectedRadio), this.tooltipSelectedMap.get(this.selectedRadio)) || !this.includeZeroTime || !this.includeMultiTime;
3136
+ }
3137
+ else if (this.sliderSet.has(this.selectedRadio)) {
3138
+ isFiltered = !isEqual(this.initialValueMap.get(this.selectedRadio), this.tooltipSelectedMap.get(this.selectedRadio)) && !isEqual(this.tooltipSelectedMap.get(this.selectedRadio), this.sliderData);
3139
+ if (this.selectedRadio == "postedAdu" && this.subRadioButton == "notRequired") {
3140
+ isFiltered = true;
3141
+ }
3142
+ if (!isFiltered && this.tooltipSelectedMap.has(this.selectedRadio)) {
3143
+ this.tooltipSelectedMap.delete(this.selectedRadio);
3144
+ }
3145
+ }
3146
+ else if (this.selectedRadio == "startDate" ||
3147
+ this.selectedRadio == "endDate" ||
3148
+ this.selectedRadio == "period" ||
3149
+ this.selectedRadio == "AirDate" ||
3150
+ this.selectedRadio === "flightStartDate" ||
3151
+ this.selectedRadio === "flightEndDate" ||
3152
+ this.selectedRadio == "date") {
3153
+ isFiltered =
3154
+ !isEqual(this.initialValueMap.get(this.selectedRadio), this.tooltipSelectedMap.get(this.selectedRadio)) &&
3155
+ !isEqual(this.tooltipSelectedMap.get(this.selectedRadio), this.flightDateRange);
3156
+ if (!isFiltered && this.tooltipSelectedMap.has(this.selectedRadio)) {
3157
+ this.tooltipSelectedMap.delete(this.selectedRadio);
3158
+ }
3159
+ }
3160
+ else {
3161
+ let totalOptionsCount = this.tooltipMap.get(this.selectedRadio).filter((x) => !x.isHidden).length;
3162
+ let selectedOptionsCount = this.tooltipMap.get(this.selectedRadio).filter((x) => !x.isHidden && x.isSelected).length;
3163
+ isFiltered = selectedOptionsCount > 0 && selectedOptionsCount != totalOptionsCount ? true : false;
3164
+ }
3165
+ return isFiltered;
3166
+ }
3167
+ removeOrChangeLatestFilterIndex(isFiltered) {
3168
+ let set = new Set(this.appliedFiltersArray);
3169
+ if (isFiltered && !set.has(this.selectedRadio)) {
3170
+ set.add(this.selectedRadio);
3171
+ }
3172
+ else if (isFiltered && set.has(this.selectedRadio)) {
3173
+ set.delete(this.selectedRadio);
3174
+ set.add(this.selectedRadio);
3175
+ }
3176
+ else {
3177
+ set.delete(this.selectedRadio);
3178
+ }
3179
+ this.appliedFiltersArray = [...set];
3180
+ }
3181
+ filterData(originalData, keyToSkip) {
3182
+ let filteredData = originalData;
3183
+ this.tooltipSelectedMap.forEach((value, key) => {
3184
+ if (key != keyToSkip) {
3185
+ if (this.sliderSet.has(key)) {
3186
+ filteredData = filteredData.filter((obj) => obj[key] >= value.min && obj[key] <= value.max);
3187
+ }
3188
+ else if (key === "startDate" || key === "endDate") {
3189
+ filteredData = filteredData.filter((obj) => this.returnOrdersInTheRange(obj, value, key));
3190
+ }
3191
+ else if (key === "period" || key === "AirDate" || key === "flightStartDate" || key === "flightEndDate" || key == "date") {
3192
+ filteredData = filteredData.filter((obj) => this.getDataInTheDateRange(obj, value, key));
3193
+ }
3194
+ else if (key === "StartTimeForFilter" || key === "EndTimeForFilter"
3195
+ || key === "start_time_for_filter" || key === "end_time_for_filter") {
3196
+ filteredData = filteredData.filter((obj) => this.returnDataForFromAndToTimeRange(obj, value, key));
3197
+ }
3198
+ else if (key === "startEndTimeMulti") {
3199
+ filteredData = filteredData.filter((obj) => this.returnDataForStartAndEndTimeRange(obj, value, key));
3200
+ }
3201
+ else if (key === "startEndTime" || key === "TimeBand") {
3202
+ let filteredMulti = [];
3203
+ let filteredZero = [];
3204
+ let filteredTimeRange = [];
3205
+ if (this.includeTimeRange) {
3206
+ filteredTimeRange = filteredData.filter((obj) => this.returnDataForTimeRange(obj, value));
3207
+ }
3208
+ if (this.includeMultiTime) {
3209
+ filteredMulti = filteredData.filter((obj) => obj[key][0] == "<multi>");
3210
+ }
3211
+ if (this.includeZeroTime) {
3212
+ filteredZero = filteredData.filter((obj) => obj[key][0] == "0");
3213
+ }
3214
+ filteredData = [...filteredMulti, ...filteredZero, ...filteredTimeRange];
3215
+ }
3216
+ else if (value.length > 0) {
3217
+ filteredData = filteredData.filter((u) => value.includes(u[key]));
3218
+ }
3219
+ }
3220
+ });
3221
+ return filteredData;
3222
+ }
3223
+ returnOrdersInTheRange(order, range, key) {
3224
+ let isDateBetweenTheSelectedRange = moment(order[key]).isBetween(range.minSelectedDate, range.maxSelectedDate);
3225
+ let isDateSameAsTheMinSelectedDate = moment(order[key]).isSame(range.minSelectedDate);
3226
+ let isDateSameAsTheMaxSelectedDate = moment(order[key]).isSame(range.maxSelectedDate);
3227
+ return isDateBetweenTheSelectedRange || isDateSameAsTheMinSelectedDate || isDateSameAsTheMaxSelectedDate;
3228
+ }
3229
+ returnDataForTimeRange(obj, selectedData) {
3230
+ let format = "HH:mm:ss";
3231
+ let selectedStartDate = moment(selectedData.startTime, format);
3232
+ let selectedEndDate = moment(selectedData.endTime, format);
3233
+ let startTime = moment(obj.startTime, format);
3234
+ let endTime = moment(obj.endTime, format);
3235
+ let isStartTimeSameAsSelectedStartTime = startTime.isSame(selectedStartDate);
3236
+ let isStartTimeBetweenSelectedStartAndEndTime = startTime.isBetween(selectedStartDate, selectedEndDate);
3237
+ let isEndTimeSameAsSelectedEndTime = endTime.isSame(selectedEndDate);
3238
+ let isEndTimeBetweenSelectedStartAndEndTime = endTime.isBetween(selectedStartDate, selectedEndDate);
3239
+ return ((isStartTimeBetweenSelectedStartAndEndTime && isEndTimeBetweenSelectedStartAndEndTime) ||
3240
+ (isStartTimeSameAsSelectedStartTime && isEndTimeSameAsSelectedEndTime) ||
3241
+ (isStartTimeSameAsSelectedStartTime && isEndTimeBetweenSelectedStartAndEndTime) ||
3242
+ (isStartTimeBetweenSelectedStartAndEndTime && isEndTimeSameAsSelectedEndTime));
3243
+ }
3244
+ returnDataForFromAndToTimeRange(obj, selectedData, key) {
3245
+ let format = "HH:mm:ss";
3246
+ let selectedFromTime = moment(selectedData.fromTime, format);
3247
+ let selectedToTime = moment(selectedData.toTime, format);
3248
+ let objTime = obj[key];
3249
+ if (["", "-", null].includes(objTime)) {
3250
+ return false;
3251
+ }
3252
+ if (this.includeMultiTime && obj[key] == "<multi>") {
3253
+ return true;
3254
+ }
3255
+ if (!this.includeMultiTime && obj[key] == "<multi>") {
3256
+ return false;
3257
+ }
3258
+ if (this.includeZeroTime && obj[key] == "0") {
3259
+ return true;
3260
+ }
3261
+ if (!this.includeZeroTime && obj[key] == "0") {
3262
+ return false;
3263
+ }
3264
+ if (!this.includeTimeRange) {
3265
+ return false;
3266
+ }
3267
+ objTime = this.dateTimeFormatService.formatToTwelveHrs(objTime, true);
3268
+ objTime = this.dateTimeFormatService.convertTotwentyFourHrsFormat(objTime[0] + ":" + objTime[1] + " " + objTime[2], true);
3269
+ objTime = objTime[0] + ":" + objTime[1] + ":00";
3270
+ objTime = moment(objTime, format);
3271
+ let isObjTimeSameAsSelectedFromTime = objTime.isSame(selectedFromTime);
3272
+ let isObjTimeSameAsSelectedToTime = objTime.isSame(selectedToTime);
3273
+ let isObjTimeBetweenSelectedFromTimeAndToTime = objTime.isBetween(selectedFromTime, selectedToTime);
3274
+ return (isObjTimeSameAsSelectedFromTime ||
3275
+ isObjTimeSameAsSelectedToTime ||
3276
+ isObjTimeBetweenSelectedFromTimeAndToTime);
3277
+ }
3278
+ returnDataForStartAndEndTimeRange(obj, selectedData, key) {
3279
+ let format = "HH:mm:ss";
3280
+ let selectedFromTime = moment(selectedData.fromTime, format);
3281
+ let selectedToTime = moment(selectedData.toTime, format);
3282
+ let objTime = obj[key];
3283
+ if (this.includeMultiTime && obj[key][0] == "<multi>") {
3284
+ return true;
3285
+ }
3286
+ if (!this.includeMultiTime && obj[key][0] == "<multi>") {
3287
+ return false;
3288
+ }
3289
+ if (this.includeZeroTime && obj[key][0] == "0") {
3290
+ return true;
3291
+ }
3292
+ if (!this.includeZeroTime && obj[key][0] == "0") {
3293
+ return false;
3294
+ }
3295
+ if (!this.includeTimeRange) {
3296
+ return false;
3297
+ }
3298
+ let startTime = moment(obj[key][1], format);
3299
+ let endTime = moment(obj[key][2], format);
3300
+ let isStartTimeSameAsSelectedStartTime = startTime.isSame(selectedFromTime);
3301
+ let isStartTimeBetweenSelectedStartAndEndTime = startTime.isBetween(selectedFromTime, selectedToTime);
3302
+ let isEndTimeSameAsSelectedEndTime = endTime.isSame(selectedToTime);
3303
+ let isEndTimeBetweenSelectedStartAndEndTime = endTime.isBetween(selectedFromTime, selectedToTime);
3304
+ return ((isStartTimeBetweenSelectedStartAndEndTime && isEndTimeBetweenSelectedStartAndEndTime) ||
3305
+ (isStartTimeSameAsSelectedStartTime && isEndTimeSameAsSelectedEndTime) ||
3306
+ (isStartTimeSameAsSelectedStartTime && isEndTimeBetweenSelectedStartAndEndTime) ||
3307
+ (isStartTimeBetweenSelectedStartAndEndTime && isEndTimeSameAsSelectedEndTime));
3308
+ }
3309
+ getDataInTheDateRange(obj, value, key) {
3310
+ let parsingFormat;
3311
+ if (key === "period") {
3312
+ parsingFormat = "YYYY-MM-DD";
3313
+ let startDateIsBetweenSelDate = moment(obj.startDate, parsingFormat).isBetween(value.minSelectedDate, value.maxSelectedDate);
3314
+ let endDateIsBetweenSelDate = moment(obj.endDate, parsingFormat).isBetween(value.minSelectedDate, value.maxSelectedDate);
3315
+ let startDateIsSameAsSelStartDate = moment(obj.startDate, parsingFormat).isSame(value.minSelectedDate);
3316
+ let endDateIsSameAsSelEndDate = moment(obj.endDate, parsingFormat).isSame(value.maxSelectedDate);
3317
+ return ((startDateIsBetweenSelDate || startDateIsSameAsSelStartDate) &&
3318
+ (endDateIsBetweenSelDate || endDateIsSameAsSelEndDate));
3319
+ }
3320
+ else if (key === "AirDate" || key === "flightStartDate" || key === "flightEndDate") {
3321
+ parsingFormat = "MM/DD/YYYY";
3322
+ let dateIsBetweenSelDate = moment(obj[key], parsingFormat).isBetween(value.minSelectedDate, value.maxSelectedDate);
3323
+ let dateIsSameAsSelStartDate = moment(obj[key], parsingFormat).isSame(value.minSelectedDate);
3324
+ let dateIsSameAsSelEndDate = moment(obj[key], parsingFormat).isSame(value.maxSelectedDate);
3325
+ return dateIsBetweenSelDate || dateIsSameAsSelStartDate || dateIsSameAsSelEndDate;
3326
+ }
3327
+ else {
3328
+ }
3329
+ }
3330
+ initializeTimeFilterData(clonedData, key = "startEndTime") {
3331
+ let startTimeArr = map$1(clonedData, "startTime");
3332
+ let endTimeArr = map$1(clonedData, "endTime");
3333
+ startTimeArr.sort((a, b) => {
3334
+ return this.dateTimeFormatService.sortByTimeAscending(a, b);
3335
+ });
3336
+ endTimeArr.sort((a, b) => {
3337
+ return this.dateTimeFormatService.sortByTimeDescending(a, b);
3338
+ });
3339
+ let initialStartEndTime = {
3340
+ startTime: startTimeArr[0],
3341
+ endTime: endTimeArr[0],
3342
+ };
3343
+ this.initialValueMap.set(key, initialStartEndTime);
3344
+ }
3345
+ returnColumnFilterStatus(data, headername) {
3346
+ return uniq(data.map((u) => u[headername])).length > 1 ? false : true;
3347
+ }
3348
+ }
3349
+ AnnaFilterService.bufferSize = 20;
3350
+ AnnaFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFilterService, deps: [{ token: AnnaDateTimeFormatService }], target: i0.ɵɵFactoryTarget.Injectable });
3351
+ AnnaFilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFilterService, providedIn: 'root' });
3352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFilterService, decorators: [{
3353
+ type: Injectable,
3354
+ args: [{
3355
+ providedIn: 'root'
3356
+ }]
3357
+ }], ctorParameters: function () { return [{ type: AnnaDateTimeFormatService }]; } });
3358
+
3359
+ class Constants {
3360
+ }
3361
+ Constants.SUCCESS_STRING = "success";
3362
+ Constants.BACKEND_SERVER_URL = "/server/public/index.php/api";
3363
+ Constants.ERROR_MSG = "Error occurred please try again.";
3364
+ Constants.NO_DATA_MSG = "No Data to display";
3365
+ Constants.SERVER_ERROR = "Server error. Please try Again";
3366
+ Constants.USER_ORIGIN = "ANNA";
3367
+ Constants.ACTIVE_USER_STATUS = "active";
3368
+ Constants.DELETED_USER_STATUS = "deleted";
3369
+ Constants.INACTIVE_USER_STATUS = "inactive";
3370
+ Constants.OGAdminRole = "OG-admin";
3371
+ Constants.dollars = "$";
3372
+ class ErrorCodes {
3373
+ }
3374
+ ErrorCodes.BAD_REQUEST = 400;
3375
+ ErrorCodes.SERVER_ERROR = 500;
3376
+ ErrorCodes.SUCCESS_CODE = 200;
3377
+ ErrorCodes.SUCCESS_CODE_GET = 200;
3378
+ ErrorCodes.SUCCESS_CODE_POST = 201;
3379
+ ErrorCodes.SUCCESS_CODE_PATCH = 204;
3380
+ ErrorCodes.NO_CONTENT = 204;
3381
+ ErrorCodes.under_review = 409;
3382
+ var Days;
3383
+ (function (Days) {
3384
+ Days[Days["M"] = 1] = "M";
3385
+ Days[Days["Tu"] = 2] = "Tu";
3386
+ Days[Days["We"] = 3] = "We";
3387
+ Days[Days["Th"] = 4] = "Th";
3388
+ Days[Days["F"] = 5] = "F";
3389
+ Days[Days["Sa"] = 6] = "Sa";
3390
+ Days[Days["Su"] = 7] = "Su";
3391
+ })(Days || (Days = {}));
3392
+
3393
+ // Angular import statements
3394
+ class AnnaSortService {
3395
+ constructor(annaDateTimeFormatService) {
3396
+ this.annaDateTimeFormatService = annaDateTimeFormatService;
3397
+ this.sortByAsc = new Map();
3398
+ this.sortByDesc = new Map();
3399
+ this.dateSet = new Set(["endDate", "startDate", "end_date", "start_date", "flightStartDate", "flightEndDate"]);
3400
+ console.log("AnnaTableColumnSortService sevice created.");
3401
+ }
3402
+ checkIfSortingIsApplied(sortMap, setValueTo) {
3403
+ let obj = { key: "", setValueTo: null };
3404
+ for (let [key, value] of sortMap.entries()) {
3405
+ if (value) {
3406
+ obj = { key, setValueTo };
3407
+ break;
3408
+ }
3409
+ }
3410
+ return obj;
3411
+ }
3412
+ sort(isAsc, data, sortBy) {
3413
+ const dataToExclude = [];
3414
+ const dataToInclude = [];
3415
+ let param1;
3416
+ let param2;
3417
+ if (this.dateSet.has(sortBy)) {
3418
+ data.sort((a, b) => {
3419
+ return this.annaDateTimeFormatService.compareDate(a[sortBy], b[sortBy], isAsc);
3420
+ });
3421
+ }
3422
+ else if (sortBy === "AirDateAndTime") {
3423
+ data.sort((a, b) => {
3424
+ let first, second;
3425
+ if (a[sortBy] == "-") {
3426
+ return 1;
3427
+ }
3428
+ if (b[sortBy] == "-") {
3429
+ return -1;
3430
+ }
3431
+ else {
3432
+ first = this.annaDateTimeFormatService.formatDateAndHHMMATimeToStandardFormat(a[sortBy]);
3433
+ second = this.annaDateTimeFormatService.formatDateAndHHMMATimeToStandardFormat(b[sortBy]);
3434
+ let compareDate = this.annaDateTimeFormatService.compareDate(first, second, isAsc);
3435
+ return compareDate;
3436
+ }
3437
+ });
3438
+ }
3439
+ else if (sortBy === "startEndTime" || sortBy === "TimeBand") {
3440
+ data.sort((a, b) => {
3441
+ if (isAsc) {
3442
+ param1 = a[sortBy][1];
3443
+ param2 = b[sortBy][1];
3444
+ }
3445
+ else {
3446
+ param1 = a[sortBy][2];
3447
+ param2 = b[sortBy][2];
3448
+ }
3449
+ let val = isAsc
3450
+ ? this.annaDateTimeFormatService.sortByTimeAscending(param1, param2)
3451
+ : this.annaDateTimeFormatService.sortByTimeDescending(param1, param2);
3452
+ return val;
3453
+ });
3454
+ }
3455
+ else if (sortBy === "days") {
3456
+ data.sort((a, b) => {
3457
+ param1 = a[sortBy].includes("-") ? Days[a[sortBy].split("-")[0]] : Days[a[sortBy]];
3458
+ param2 = b[sortBy].includes("-") ? Days[b[sortBy].split("-")[0]] : Days[b[sortBy]];
3459
+ return this.annaDateTimeFormatService.compare(param1, param2, isAsc);
3460
+ });
3461
+ }
3462
+ //sort by string or number
3463
+ else {
3464
+ data.forEach((a) => {
3465
+ // if(a['sort'] == undefined) //
3466
+ //for component other than enter/edit lur page
3467
+ if (!("sort" in a)) {
3468
+ dataToInclude.push(a);
3469
+ }
3470
+ //for enter/edit lur page
3471
+ else {
3472
+ dataToExclude.push(a);
3473
+ }
3474
+ });
3475
+ data = [];
3476
+ data = dataToInclude;
3477
+ data.sort((a, b) => {
3478
+ param1 = a[sortBy];
3479
+ param2 = b[sortBy];
3480
+ if (Array.isArray(a[sortBy])) {
3481
+ param1 = a[sortBy][0] === "-" ? 0 : a[sortBy][0];
3482
+ if (a[sortBy][0].includes(Constants.dollars)) {
3483
+ param1 = +a[sortBy][0].split(Constants.dollars)[1];
3484
+ }
3485
+ }
3486
+ if (Array.isArray(b[sortBy])) {
3487
+ param2 = b[sortBy][0] == "-" ? 0 : b[sortBy][0];
3488
+ if (b[sortBy][0].includes(Constants.dollars)) {
3489
+ param2 = +b[sortBy][0].split(Constants.dollars)[1];
3490
+ }
3491
+ }
3492
+ if (param1 !== param2) {
3493
+ return this.annaDateTimeFormatService.compare(param1, param2, isAsc);
3494
+ }
3495
+ // CHANGES@ANNALIB changed it to from false to 0
3496
+ return 0;
3497
+ });
3498
+ if (dataToExclude.length > 0) {
3499
+ if (sortBy.includes("_")) {
3500
+ let keys = sortBy.split("_");
3501
+ let weekNumber = keys[0];
3502
+ let sortKey = keys[1];
3503
+ if (keys.length > 2) {
3504
+ sortKey = keys[2] == true ? "BookedAurIncludingNoChargeSpots" : "BookedAurExcludingNoChargeSpots";
3505
+ }
3506
+ dataToExclude.sort((a, b) => {
3507
+ let aInventoryCodeWeekWiseKey = Object.keys(a.WeekWiseInventoryCodeData).filter((key) => key.split("_")[1] == weekNumber);
3508
+ let bInventoryCodeWeekWiseKey = Object.keys(b.WeekWiseInventoryCodeData).filter((key) => key.split("_")[1] == weekNumber);
3509
+ param1 = null;
3510
+ param2 = null;
3511
+ if (aInventoryCodeWeekWiseKey.length > 0) {
3512
+ param1 = a.WeekWiseInventoryCodeData[aInventoryCodeWeekWiseKey[0]][sortKey][1];
3513
+ }
3514
+ if (bInventoryCodeWeekWiseKey.length > 0) {
3515
+ param2 = b.WeekWiseInventoryCodeData[bInventoryCodeWeekWiseKey[0]][sortKey][1];
3516
+ }
3517
+ if (param1 !== param2) {
3518
+ return this.annaDateTimeFormatService.compare(param1, param2, isAsc);
3519
+ }
3520
+ return 0;
3521
+ });
3522
+ }
3523
+ else {
3524
+ dataToExclude.sort((a, b) => {
3525
+ param1 = a[sortBy];
3526
+ param2 = b[sortBy];
3527
+ if (param1 !== param2) {
3528
+ return this.annaDateTimeFormatService.compare(param1, param2, isAsc);
3529
+ }
3530
+ return 0;
3531
+ });
3532
+ }
3533
+ }
3534
+ }
3535
+ return { data: [...data, ...dataToExclude], type: isAsc };
3536
+ }
3537
+ callSort(data) {
3538
+ let sortBy = null;
3539
+ let isAsc;
3540
+ this.sortByAsc.forEach((value, key) => {
3541
+ if (value === true) {
3542
+ sortBy = key;
3543
+ isAsc = true;
3544
+ }
3545
+ });
3546
+ if (sortBy == null) {
3547
+ this.sortByDesc.forEach((value, key) => {
3548
+ if (value === true) {
3549
+ sortBy = key;
3550
+ isAsc = false;
3551
+ }
3552
+ });
3553
+ }
3554
+ if (sortBy != null) {
3555
+ return this.sort(isAsc, data, sortBy).data;
3556
+ }
3557
+ else {
3558
+ return data;
3559
+ }
3560
+ }
3561
+ }
3562
+ AnnaSortService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortService, deps: [{ token: AnnaDateTimeFormatService }], target: i0.ɵɵFactoryTarget.Injectable });
3563
+ AnnaSortService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortService, providedIn: "root" });
3564
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortService, decorators: [{
3565
+ type: Injectable,
3566
+ args: [{
3567
+ providedIn: "root",
3568
+ }]
3569
+ }], ctorParameters: function () { return [{ type: AnnaDateTimeFormatService }]; } });
3570
+
3571
+ // Angular import statements
3572
+ class AnnaGenericTableService {
3573
+ constructor(annaFilterService, annaSortService) {
3574
+ this.annaFilterService = annaFilterService;
3575
+ this.annaSortService = annaSortService;
3576
+ this.virtualScrollSubject = new Subject();
3577
+ }
3578
+ calculateNumberOfSkeletonColumnsForTable(tableHeaders) {
3579
+ let numberOfSkeletonColumns = [];
3580
+ var headersInEachColumn = 0;
3581
+ tableHeaders.forEach((column) => {
3582
+ if (column.visible) {
3583
+ headersInEachColumn = 0;
3584
+ column.headerInfo.forEach(() => {
3585
+ headersInEachColumn++;
3586
+ });
3587
+ numberOfSkeletonColumns.push(Array(headersInEachColumn).fill(0));
3588
+ }
3589
+ });
3590
+ return numberOfSkeletonColumns;
3591
+ }
3592
+ initColumnFilterAndSorting() {
3593
+ this.annaFilterService.tooltipMap = new Map();
3594
+ this.annaFilterService.tooltipSelectedMap = new Map();
3595
+ this.annaFilterService.selectedRadio = null;
3596
+ this.annaFilterService.appliedFiltersArray = [];
3597
+ this.annaFilterService.initialValueMap = new Map();
3598
+ this.annaSortService.tooltip = null;
3599
+ this.annaSortService.sortByAsc = new Map();
3600
+ this.annaSortService.sortByDesc = new Map();
3601
+ this.annaSortService.keySorted = null;
3602
+ this.annaSortService.isAsc = false;
3603
+ }
3604
+ }
3605
+ AnnaGenericTableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableService, deps: [{ token: AnnaFilterService }, { token: AnnaSortService }], target: i0.ɵɵFactoryTarget.Injectable });
3606
+ AnnaGenericTableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableService, providedIn: "root" });
3607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaGenericTableService, decorators: [{
3608
+ type: Injectable,
3609
+ args: [{
3610
+ providedIn: "root",
3611
+ }]
3612
+ }], ctorParameters: function () { return [{ type: AnnaFilterService }, { type: AnnaSortService }]; } });
3613
+
3614
+ ;
3615
+
3616
+ //Modules
3617
+
3618
+ /*
3619
+ * Public API Surface of anna-core
3620
+ */
3621
+
3622
+ /**
3623
+ * Generated bundle index. Do not edit.
3624
+ */
3625
+
3626
+ export { AllSelectedStatus, AnnaBuyerApprovalIconTemplateComponent, AnnaCalendarFilterComponent, AnnaCoreSharedLibModule, AnnaDateTimeFormatService, AnnaDropdownLibModule, AnnaFilterSearchedTextPipe, AnnaFilterService, AnnaFixedRowSizeTableVirtualScrollStrategy, AnnaFixedRowSizeTableVirtualScrollStrategyDirective, AnnaGenericTableLibModule, AnnaGenericTableService, AnnaGlobalConfigService, AnnaLiveIconTemplateComponent, AnnaNoDataComponent, AnnaNonEditableGenericTableComponent, AnnaNotifyIconTemplateComponent, AnnaPayForPerformanceIconTemplateComponent, AnnaRejectedIconTemplateComponent, AnnaSortComponent, AnnaSortService, AnnaTableVirtualScrollViewportComponent, AnnaVirtualTableDirective, AnnaWeekCalendarComponent, Constants, Days, ErrorCodes, fixedSizeVirtualScrollStrategyFactory, radioButtonModel, tooltipModel, tooltipModelForColumnLevelFiltering };
3627
+ //# sourceMappingURL=annalib-anna-core.mjs.map