@annalib/anna-core 2.2.0 → 2.3.0

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