@annalib/anna-core 0.0.4 → 0.0.7

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.
@@ -1,35 +1,35 @@
1
- import * as i10 from '@angular/common';
1
+ import * as i9 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, forwardRef, Directive, ContentChildren, ViewChildren, NgModule } from '@angular/core';
5
- import * as i14 from '@angular/forms';
4
+ import { EventEmitter, Component, Input, Output, ViewChildren, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, forwardRef, Directive, ContentChildren, NgModule } from '@angular/core';
5
+ import * as i11 from '@angular/forms';
6
6
  import { FormsModule } from '@angular/forms';
7
- import * as i6 from '@angular/material/radio';
7
+ import * as i5 from '@angular/material/radio';
8
8
  import { MatRadioModule } from '@angular/material/radio';
9
- import * as i9 from '@angular/material/button-toggle';
9
+ import * as i8 from '@angular/material/button-toggle';
10
10
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
11
- import * as i3$1 from '@angular/material/table';
11
+ import * as i2 from '@angular/material/table';
12
12
  import { MatHeaderRowDef, MatTableModule } from '@angular/material/table';
13
13
  import * as i3 from '@ng-bootstrap/ng-bootstrap';
14
14
  import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
15
- import * as i7 from '@angular-slider/ngx-slider';
15
+ import * as i6 from '@angular-slider/ngx-slider';
16
16
  import { NgxSliderModule } from '@angular-slider/ngx-slider';
17
- import * as i5 from 'ngx-skeleton-loader';
17
+ import * as i4 from 'ngx-skeleton-loader';
18
18
  import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
19
19
  import moment from 'moment';
20
- import { cloneDeep, map as map$1, uniq, isEqual } from 'lodash-es';
20
+ import { cloneDeep, map, uniq, isEqual } from 'lodash-es';
21
21
  import * as i1 from '@annalib/anna-core/src/lib/anna-core-shared-lib';
22
- import { AnnaFilterService, radioButtonModel, AnnaCoreSharedLibModule } from '@annalib/anna-core/src/lib/anna-core-shared-lib';
23
- import { animationFrameScheduler, asapScheduler, Subject, Observable, Subscription, isObservable, of } from 'rxjs';
24
- import { startWith, auditTime, takeUntil, distinctUntilChanged, pairwise, switchMap, shareReplay, map } from 'rxjs/operators';
25
- import * as i2 from '@angular/cdk/scrolling';
22
+ import { radioButtonModel, 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';
26
28
  import { CdkScrollable, VIRTUAL_SCROLL_STRATEGY, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
27
29
  import * as i1$1 from '@angular/cdk/bidi';
28
- import * as i8 from '@annalib/anna-core/src/lib/anna-dropdown-lib';
29
- import { AnnaDropdownLibModule } from '@annalib/anna-core/src/lib/anna-dropdown-lib';
30
30
  import { coerceNumberProperty } from '@angular/cdk/coercion';
31
31
  import { isDataSource, ArrayDataSource } from '@angular/cdk/collections';
32
- import * as i2$1 from '@angular/cdk/table';
32
+ import * as i2$2 from '@angular/cdk/table';
33
33
  import { _COALESCED_STYLE_SCHEDULER, STICKY_POSITIONING_LISTENER, CdkHeaderRowDef } from '@angular/cdk/table';
34
34
 
35
35
  // Angular import statements
@@ -128,7 +128,7 @@ class AnnaSortComponent {
128
128
  }
129
129
  }
130
130
  AnnaSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, deps: [{ token: i1.AnnaSortService }], target: i0.ɵɵFactoryTarget.Component });
131
- AnnaSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: { data: "data", sortBy: "sortBy", disableSort: "disableSort", placement: "placement" }, outputs: { sortedData: "sort" }, usesOnChanges: true, ngImport: i0, template: "<p class=\"sort\">\r\n <i\r\n class=\"mdi mdi-sort\"\r\n [ngClass]=\"{\r\n active: this.annaSortService.sortByDesc.get(this.sortBy) || this.annaSortService.sortByAsc.get(this.sortBy),\r\n disable: disableSort\r\n }\"\r\n [ngbTooltip]=\"sortTooltip\"\r\n placement=\"{{ placement != undefined ? 'auto' : 'bottom' }}\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n #sort=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(sort)\"\r\n ></i>\r\n</p>\r\n\r\n<ng-template #sortTooltip>\r\n <section class=\"sort-container\">\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"ascending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"ascending\"\r\n (click)=\"sortByAscending()\"\r\n />\r\n <label for=\"ascending\">Ascending</label>\r\n </div>\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"descending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"descending\"\r\n (click)=\"sortByDescending()\"\r\n />\r\n <label for=\"descending\">Descending</label>\r\n </div>\r\n <div>\r\n <input type=\"radio\" id=\"none\" [ngModel]=\"selectedRadio\" name=\"sortToolTip\" value=\"none\" (click)=\"removeSorting()\" />\r\n <label for=\"none\">None</label>\r\n </div>\r\n </section>\r\n</ng-template>\r\n", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}\n"], directives: [{ type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i14.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
131
+ AnnaSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: { data: "data", sortBy: "sortBy", disableSort: "disableSort", placement: "placement" }, outputs: { sortedData: "sort" }, usesOnChanges: true, ngImport: i0, template: "<p class=\"sort\">\r\n <i\r\n class=\"mdi mdi-sort\"\r\n [ngClass]=\"{\r\n active: this.annaSortService.sortByDesc.get(this.sortBy) || this.annaSortService.sortByAsc.get(this.sortBy),\r\n disable: disableSort\r\n }\"\r\n [ngbTooltip]=\"sortTooltip\"\r\n placement=\"{{ placement != undefined ? 'auto' : 'bottom' }}\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n #sort=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(sort)\"\r\n ></i>\r\n</p>\r\n\r\n<ng-template #sortTooltip>\r\n <section class=\"sort-container\">\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"ascending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"ascending\"\r\n (click)=\"sortByAscending()\"\r\n />\r\n <label for=\"ascending\">Ascending</label>\r\n </div>\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"descending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"descending\"\r\n (click)=\"sortByDescending()\"\r\n />\r\n <label for=\"descending\">Descending</label>\r\n </div>\r\n <div>\r\n <input type=\"radio\" id=\"none\" [ngModel]=\"selectedRadio\" name=\"sortToolTip\" value=\"none\" (click)=\"removeSorting()\" />\r\n <label for=\"none\">None</label>\r\n </div>\r\n </section>\r\n</ng-template>\r\n", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}\n"], directives: [{ type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i11.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i11.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
132
132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaSortComponent, decorators: [{
133
133
  type: Component,
134
134
  args: [{ selector: "anna-core-sort-lib", template: "<p class=\"sort\">\r\n <i\r\n class=\"mdi mdi-sort\"\r\n [ngClass]=\"{\r\n active: this.annaSortService.sortByDesc.get(this.sortBy) || this.annaSortService.sortByAsc.get(this.sortBy),\r\n disable: disableSort\r\n }\"\r\n [ngbTooltip]=\"sortTooltip\"\r\n placement=\"{{ placement != undefined ? 'auto' : 'bottom' }}\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n #sort=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(sort)\"\r\n ></i>\r\n</p>\r\n\r\n<ng-template #sortTooltip>\r\n <section class=\"sort-container\">\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"ascending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"ascending\"\r\n (click)=\"sortByAscending()\"\r\n />\r\n <label for=\"ascending\">Ascending</label>\r\n </div>\r\n <div>\r\n <input\r\n type=\"radio\"\r\n id=\"descending\"\r\n [ngModel]=\"selectedRadio\"\r\n name=\"sortToolTip\"\r\n value=\"descending\"\r\n (click)=\"sortByDescending()\"\r\n />\r\n <label for=\"descending\">Descending</label>\r\n </div>\r\n <div>\r\n <input type=\"radio\" id=\"none\" [ngModel]=\"selectedRadio\" name=\"sortToolTip\" value=\"none\" (click)=\"removeSorting()\" />\r\n <label for=\"none\">None</label>\r\n </div>\r\n </section>\r\n</ng-template>\r\n", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}\n"] }]
@@ -146,1669 +146,1677 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImpor
146
146
  args: ["sort"]
147
147
  }] } });
148
148
 
149
- /** Checks if the given ranges are equal. */
150
- function rangesEqual(r1, r2) {
151
- return r1.start == r2.start && r1.end == r2.end;
152
- }
153
- /**
154
- * Scheduler to be used for scroll events. Needs to fall back to
155
- * something that doesn't rely on requestAnimationFrame on environments
156
- * that don't support it (e.g. server-side rendering).
157
- */
158
- const SCROLL_SCHEDULER = typeof requestAnimationFrame !== "undefined"
159
- ? animationFrameScheduler
160
- : asapScheduler;
161
- /**
162
- * A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`.
163
- * Uses `top: #px` instead of `transform: translateY(#px)` like the cdk virtual scroll viewport does
164
- * which avoids flickering of elements in the transformed container with `position: sticky`.
165
- */
166
- class AnnaTableVirtualScrollViewportComponent extends CdkScrollable {
167
- constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, annaGtService) {
168
- super(elementRef, scrollDispatcher, ngZone, dir);
169
- this.elementRef = elementRef;
170
- this._changeDetectorRef = _changeDetectorRef;
171
- this._scrollStrategy = _scrollStrategy;
172
- this.annaGtService = annaGtService;
173
- /** Emits when the viewport is detached from a CdkVirtualForOf. */
174
- this._detachedSubject = new Subject();
175
- /** Emits when the rendered range changes. */
176
- this._renderedRangeSubject = new Subject();
177
- this._orientation = "vertical";
178
- // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
179
- // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
180
- // depending on how the strategy calculates the scrolled index, it may come at a cost to
181
- // performance.
182
- /** Emits when the index of the first element visible in the viewport changes. */
183
- this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));
184
- /** A stream that emits whenever the rendered range changes. */
185
- this.renderedRangeStream = this._renderedRangeSubject;
186
- /**
187
- * The total size of all content (in pixels), including content that is not currently rendered.
188
- */
189
- this._totalContentSize = 0;
190
- /** A string representing the `style.width` property value to be used for the spacer element. */
191
- this._totalContentWidth = "";
192
- /** A string representing the `style.height` property value to be used for the spacer element. */
193
- this._totalContentHeight = "";
194
- /** The currently rendered range of indices. */
195
- this._renderedRange = { start: 0, end: 0 };
196
- /** The length of the data bound to this viewport (in number of items). */
197
- this._dataLength = 0;
198
- /** The size of the viewport (in pixels). */
199
- this._viewportSize = 0;
200
- /** The last rendered content offset that was set. */
201
- this._renderedContentOffset = 0;
202
- /**
203
- * Whether the last rendered content offset was to the end of the content (and therefore needs to
204
- * be rewritten as an offset to the start of the content).
205
- */
206
- this._renderedContentOffsetNeedsRewrite = false;
207
- /** Whether there is a pending change detection cycle. */
208
- this._isChangeDetectionPending = false;
209
- /** A list of functions to run after the next change detection cycle. */
210
- this._runAfterChangeDetection = [];
211
- /** Subscription to changes in the viewport size. */
212
- this._viewportChanges = Subscription.EMPTY;
213
- if (!_scrollStrategy) {
214
- throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
215
- }
216
- this._viewportChanges = viewportRuler.change().subscribe(() => {
217
- this.checkViewportSize();
218
- });
219
- }
220
- /** The direction the viewport scrolls. */
221
- get orientation() {
222
- return this._orientation;
223
- }
224
- set orientation(orientation) {
225
- if (this._orientation !== orientation) {
226
- this._orientation = orientation;
227
- this._calculateSpacerSize();
228
- }
149
+ // Angular import statements
150
+ class AnnaNonEditableGenericTableComponent {
151
+ constructor(cdRef, annaSortService, annaDateTimeFormatService, annaFilterService, annaGenericTableService) {
152
+ this.cdRef = cdRef;
153
+ this.annaSortService = annaSortService;
154
+ this.annaDateTimeFormatService = annaDateTimeFormatService;
155
+ this.annaFilterService = annaFilterService;
156
+ this.annaGenericTableService = annaGenericTableService;
157
+ this.maximumRowsWhichCanBeRenderedWithoutScroll = 5;
158
+ this.toggleCheckbox = new EventEmitter();
159
+ this.toggleRowCheckbox = new EventEmitter();
160
+ this.toggleHeaderCheckbox = new EventEmitter();
161
+ this.undoIconClicked = new EventEmitter();
162
+ this.filterAppliedToTable = new EventEmitter();
163
+ this.sortingAppliedToTable = new EventEmitter();
164
+ this.rowClicked = new EventEmitter();
165
+ this.radioButtonSelected = new EventEmitter();
166
+ this.columnFilterOpened = new EventEmitter();
167
+ this.columnFilterClosed = new EventEmitter();
168
+ this.gtIconClicked = new EventEmitter();
169
+ this.gtSVGIconClicked = new EventEmitter();
170
+ this.gtTextActionClicked = new EventEmitter();
171
+ this.gtViewDetailClicked = new EventEmitter();
172
+ this.noDataWidth = "55%";
173
+ this.disableClearAllBtn = true;
174
+ this.disableColumnClearAllBtn = true;
175
+ this.allSelected = 0;
176
+ this.options = {
177
+ floor: 0,
178
+ ceil: 0,
179
+ step: 0.1
180
+ };
181
+ this.tableColumns = [];
182
+ this.totalRowColumns = null;
183
+ this.isScrolledLeft = false;
184
+ this.rowBorderWidth = 2;
185
+ this.PfpIconActiveColor = "#9B1B93";
186
+ this.PfpIconDisableColor = "rgba(189,189,189,0.5)";
187
+ this.setTooltipRadioNames();
229
188
  }
230
189
  ngOnInit() {
231
- super.ngOnInit();
232
- // It's still too early to measure the viewport at this point. Deferring with a promise allows
233
- // the Viewport to be rendered with the correct size before we measure. We run this outside the
234
- // zone to avoid causing more change detection cycles. We handle the change detection loop
235
- // ourselves instead.
236
- this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
237
- this._measureViewportSize();
238
- this._scrollStrategy.attach(this);
239
- this.elementScrolled()
240
- .pipe(
241
- // Start off with a fake scroll event so we properly detect our initial position.
242
- startWith(null),
243
- // Collect multiple events into one until the next animation frame. This way if
244
- // there are multiple scroll events in the same frame we only need to recheck
245
- // our layout once.
246
- auditTime(0, SCROLL_SCHEDULER))
247
- .subscribe(() => { this._scrollStrategy.onContentScrolled(); this.annaGtService.virtualScrollSubject.next(true); });
248
- this._markChangeDetectionNeeded();
249
- }));
250
- }
251
- ngOnDestroy() {
252
- this.detach();
253
- this._scrollStrategy.detach();
254
- // Complete all subjects
255
- this._renderedRangeSubject.complete();
256
- this._detachedSubject.complete();
257
- this._viewportChanges.unsubscribe();
258
- super.ngOnDestroy();
190
+ // this.tableData = this.numberOfSkeletonColumns;
259
191
  }
260
- /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
261
- attach(forOf) {
262
- if (this._forOf) {
263
- throw Error("CdkVirtualScrollViewport is already attached.");
192
+ ngOnChanges(changes) {
193
+ // console.log("generic");
194
+ // console.log(this.tableHeaders);
195
+ // console.log(JSON.stringify(this.tableData));
196
+ if (this.showSkeletonLoading) {
197
+ this.tableData = this.numberOfSkeletonColumns;
264
198
  }
265
- // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
266
- // changes. Run outside the zone to avoid triggering change detection, since we're managing the
267
- // change detection loop ourselves.
268
- this.ngZone.runOutsideAngular(() => {
269
- this._forOf = forOf;
270
- this._forOf.dataStream
271
- .pipe(takeUntil(this._detachedSubject))
272
- .subscribe(data => {
273
- const newLength = data.length;
274
- if (newLength !== this._dataLength) {
275
- this._dataLength = newLength;
276
- this._scrollStrategy.onDataLengthChanged();
277
- }
278
- this._doChangeDetection();
279
- });
280
- });
281
- }
282
- /** Detaches the current `CdkVirtualForOf`. */
283
- detach() {
284
- this._forOf = null;
285
- this._detachedSubject.next();
286
- }
287
- /** Gets the length of the data bound to this viewport (in number of items). */
288
- getDataLength() {
289
- return this._dataLength;
290
- }
291
- /** Gets the size of the viewport (in pixels). */
292
- getViewportSize() {
293
- return this._viewportSize;
294
- }
295
- // TODO(mmalerba): This is technically out of sync with what's really rendered until a render
296
- // cycle happens. I'm being careful to only call it after the render cycle is complete and before
297
- // setting it to something else, but its error prone and should probably be split into
298
- // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
299
- /** Get the current rendered range of items. */
300
- getRenderedRange() {
301
- return this._renderedRange;
302
- }
303
- /**
304
- * Sets the total size of all content (in pixels), including content that is not currently
305
- * rendered.
306
- */
307
- setTotalContentSize(size) {
308
- if (this._totalContentSize !== size) {
309
- this._totalContentSize = size;
310
- this._calculateSpacerSize();
311
- this._markChangeDetectionNeeded();
199
+ else {
200
+ this.setInitialValueMapData();
201
+ this.disableEnableEachColumnFilters();
202
+ this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
203
+ this.showSkeletonLoading = false;
312
204
  }
313
- }
314
- /** Sets the currently rendered range of indices. */
315
- setRenderedRange(range) {
316
- if (!rangesEqual(this._renderedRange, range)) {
317
- this._renderedRangeSubject.next((this._renderedRange = range));
318
- this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());
205
+ //setting table column here as well because while showing skeleton loader, we should show table headers.
206
+ if (changes['tableHeaders'] && changes['tableHeaders'].currentValue) {
207
+ this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
319
208
  }
320
- }
321
- /**
322
- * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).
323
- */
324
- getOffsetToRenderedContentStart() {
325
- return this._renderedContentOffsetNeedsRewrite
326
- ? null
327
- : this._renderedContentOffset;
328
- }
329
- /**
330
- * Sets the offset from the start of the viewport to either the start or end of the rendered data
331
- * (in pixels).
332
- */
333
- setRenderedContentOffset(offset) {
334
- let top = `${Number(offset)}px`;
335
- this._renderedContentOffset = offset;
336
- if (this._renderedContentTransform != top) {
337
- // We know this value is safe because we parse `offset` with `Number()` before passing it
338
- // into the string.
339
- this._renderedContentTransform = top;
340
- this._markChangeDetectionNeeded(() => {
341
- if (this._renderedContentOffsetNeedsRewrite) {
342
- this._renderedContentOffset -= this.measureRenderedContentSize();
343
- this._renderedContentOffsetNeedsRewrite = false;
344
- this.setRenderedContentOffset(this._renderedContentOffset);
345
- }
346
- else {
347
- this._scrollStrategy.onRenderedOffsetChanged();
348
- }
349
- });
209
+ if (changes['totalRowInfo'] && changes['totalRowInfo'].currentValue) {
210
+ this.totalRowColumns = this.totalRowInfo.map(x => x.colName);
350
211
  }
212
+ this.cdRef.detectChanges();
351
213
  }
352
- /**
353
- * Scrolls to the given offset from the start of the viewport. Please note that this is not always
354
- * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left
355
- * direction, this would be the equivalent of setting a fictional `scrollRight` property.
356
- * @param offset The offset to scroll to.
357
- * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
358
- */
359
- scrollToOffset(offset, behavior = "auto") {
360
- const options = { behavior, top: offset };
361
- this.scrollTo(options);
214
+ trackByFn(index) {
215
+ return index;
362
216
  }
363
- /**
364
- * Scrolls to the offset for the given index.
365
- * @param index The index of the element to scroll to.
366
- * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
367
- */
368
- scrollToIndex(index, behavior = "auto") {
369
- this._scrollStrategy.scrollToIndex(index, behavior);
217
+ setTooltipRadioNames() {
218
+ this.tooltipRadioTextMap = new Map();
219
+ this.tooltipRadioTextMap.set("StartTimeForFilter", "Start Time");
220
+ this.tooltipRadioTextMap.set("EndTimeForFilter", "End Time");
221
+ this.tooltipRadioTextMap.set("start_time_for_filter", "Start Time");
222
+ this.tooltipRadioTextMap.set("end_time_for_filter", "End Time");
223
+ this.tooltipRadioTextMap.set("primaryAEName", "Primary AE");
224
+ this.tooltipRadioTextMap.set("region", "Region");
225
+ this.tooltipRadioTextMap.set("agencyName", "Agency");
226
+ this.tooltipRadioTextMap.set("location", "Location");
227
+ this.tooltipRadioTextMap.set("advertiserName", "Advertiser");
228
+ this.tooltipRadioTextMap.set("productCode", "Product Code");
229
+ this.tooltipRadioTextMap.set("flightStartDate", "Start Date");
230
+ this.tooltipRadioTextMap.set("flightEndDate", "End Date");
231
+ this.tooltipRadioTextMap.set("orderIdAndRevNumber", "STN Order#-Rev#");
232
+ this.tooltipRadioTextMap.set("alternateOrderId", "Buyer Order#");
233
+ this.tooltipRadioTextMap.set("grp", "GRP");
234
+ this.tooltipRadioTextMap.set("cpp", "CPP");
235
+ this.tooltipRadioTextMap.set("imps", "IMPS");
236
+ this.tooltipRadioTextMap.set("cpm", "CPM");
237
+ this.tooltipRadioTextMap.set("offeredMGs", "Offered MG");
238
+ this.tooltipRadioTextMap.set("outstandingPE", "O/S PE");
239
+ this.tooltipRadioTextMap.set("offeredADUs", "Offered ADUs");
240
+ this.tooltipRadioTextMap.set("udDeficitValue", "Pending Audience Delta");
241
+ this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
242
+ this.tooltipRadioTextMap.set("bookedValue", "Booked");
243
+ this.tooltipRadioTextMap.set("bookedSpots", "Spots");
244
+ this.tooltipRadioTextMap.set("userChanges", "Other changes");
245
+ this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
246
+ this.tooltipRadioTextMap.set("program", "Program");
247
+ this.tooltipRadioTextMap.set("agency", "Agency");
248
+ this.tooltipRadioTextMap.set("advertiser", "Advertiser");
249
+ this.tooltipRadioTextMap.set("startDate", "Start Date");
250
+ this.tooltipRadioTextMap.set("endDate", "End Date");
251
+ this.tooltipRadioTextMap.set("rcvPreempt", "Madegood PE");
252
+ this.tooltipRadioTextMap.set("osPreempt", "O/S PE");
253
+ this.tooltipRadioTextMap.set("rcvUnderDly", "Recovered UD");
254
+ this.tooltipRadioTextMap.set("osUnderDly", "O/s Under Dly");
255
+ this.tooltipRadioTextMap.set("primaryAe", "Primary AE");
256
+ this.tooltipRadioTextMap.set("region", "Region");
257
+ this.tooltipRadioTextMap.set("revCode1", "Rev code 1");
258
+ this.tooltipRadioTextMap.set("orderNoRevNo", "STN Order#-Rev#");
259
+ this.tooltipRadioTextMap.set("revCode2", "Rev code 2");
260
+ this.tooltipRadioTextMap.set("revCode3", "Rev code 3");
261
+ this.tooltipRadioTextMap.set("booked", "Booked");
262
+ this.tooltipRadioTextMap.set("spots", "Spots");
263
+ this.tooltipRadioTextMap.set("postedAudPercent", "Posted %");
264
+ this.tooltipRadioTextMap.set("revision", "Revision");
265
+ this.tooltipRadioTextMap.set("productCode", "Product Code");
266
+ this.tooltipRadioTextMap.set("buyerOrderId", "ALT Order#");
267
+ this.tooltipRadioTextMap.set("demo", "Demo");
268
+ this.tooltipRadioTextMap.set("postedAdu", "Posted ADUs");
269
+ this.tooltipRadioTextMap.set("scheduledAdu", "Scheduled ADUs");
270
+ this.tooltipRadioTextMap.set("audienceDeficit", "Audience Deficit");
271
+ this.tooltipRadioTextMap.set("postedAudPercent", "Posted Audience %");
370
272
  }
371
- /**
372
- * Gets the current scroll offset from the start of the viewport (in pixels).
373
- * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'
374
- * in horizontal mode.
375
- */
376
- // CHANGES@ANNALIB added override to functions
377
- measureScrollOffset(from) {
378
- return from
379
- ? super.measureScrollOffset(from)
380
- : super.measureScrollOffset("top");
273
+ generateTableDataWrapper() {
274
+ this.showSkeletonLoading = true;
275
+ this.tableDataWrapper = [];
276
+ let rowObject;
277
+ let columnName;
278
+ let columnObject;
279
+ let columnObjectKey;
280
+ let keysUsedForTableDisplay;
281
+ let keysUsedForColumn;
282
+ let additionalInfoObject;
283
+ let additionalKeys;
284
+ this.tableData.forEach((obj) => {
285
+ rowObject = {};
286
+ keysUsedForTableDisplay = [];
287
+ for (var colNum in this.tableHeaders) {
288
+ columnObject = {};
289
+ if (!this.tableHeaders[colNum].visible) {
290
+ continue;
291
+ }
292
+ columnName = "";
293
+ keysUsedForColumn = [];
294
+ this.tableHeaders[colNum].headerInfo.forEach((header) => {
295
+ if (header.typeOfBodyData === "STRING") {
296
+ columnObjectKey = header.objectKey;
297
+ columnObject[columnObjectKey] = obj[columnObjectKey];
298
+ keysUsedForTableDisplay.push(columnObjectKey);
299
+ keysUsedForColumn.push(columnObjectKey);
300
+ }
301
+ else if (header.typeOfBodyData === "ICON") {
302
+ columnObjectKey = header.typeOfBodyData;
303
+ columnObject[columnObjectKey] = obj[header.objectKey];
304
+ keysUsedForColumn.push(header.objectKey);
305
+ }
306
+ else if (header.typeOfBodyData === "CHECKBOX") {
307
+ columnObjectKey = header.typeOfBodyData;
308
+ columnObject[columnObjectKey] = obj[header.objectKey];
309
+ keysUsedForColumn.push(header.objectKey);
310
+ }
311
+ });
312
+ for (var i = 0; i < keysUsedForColumn.length; i++) {
313
+ columnName += keysUsedForColumn[i];
314
+ if (i !== keysUsedForColumn.length - 1) {
315
+ columnName += ',';
316
+ }
317
+ }
318
+ rowObject[columnName] = columnObject;
319
+ }
320
+ additionalInfoObject = {};
321
+ additionalKeys = Object.keys(obj).filter(key => !keysUsedForTableDisplay.includes(key));
322
+ additionalKeys.forEach(key => {
323
+ additionalInfoObject[key] = obj[key];
324
+ });
325
+ rowObject.AdditionalInfo = additionalInfoObject;
326
+ this.tableDataWrapper.push(rowObject);
327
+ });
328
+ this.tableData = this.tableDataWrapper;
329
+ this.showSkeletonLoading = false;
330
+ // console.log(JSON.stringify(this.tableDataWrapper));
381
331
  }
382
- /** Measure the combined size of all of the rendered items. */
383
- measureRenderedContentSize() {
384
- const contentEl = this._contentWrapper.nativeElement;
385
- return contentEl.offsetHeight;
332
+ selectOrUnselectCheckbox(rowData, columnKeys, isCheckboxSelected) {
333
+ this.toggleCheckbox.emit({ rowData, columnKeys, isCheckboxSelected });
386
334
  }
387
- /**
388
- * Measure the total combined size of the given range. Throws if the range includes items that are
389
- * not rendered.
390
- */
391
- measureRangeSize(range) {
392
- if (!this._forOf) {
393
- return 0;
394
- }
395
- return this._forOf.measureRangeSize(range, this.orientation);
335
+ selectUnselectAllRows() {
336
+ this.toggleHeaderCheckbox.emit();
396
337
  }
397
- /** Update the viewport dimensions and re-render. */
398
- checkViewportSize() {
399
- // TODO: Cleanup later when add logic for handling content resize
400
- this._measureViewportSize();
401
- this._scrollStrategy.onDataLengthChanged();
338
+ selectUnselectRow(rowData) {
339
+ this.toggleRowCheckbox.emit(rowData);
402
340
  }
403
- /** Measure the viewport size. */
404
- _measureViewportSize() {
405
- const viewportEl = this.elementRef.nativeElement;
406
- this._viewportSize = viewportEl.clientHeight;
341
+ undoCreditedSpot(data) {
342
+ this.undoIconClicked.emit({ data, mgOrCredit: "Credit" });
407
343
  }
408
- /** Queue up change detection to run. */
409
- _markChangeDetectionNeeded(runAfter) {
410
- if (runAfter) {
411
- this._runAfterChangeDetection.push(runAfter);
344
+ undoMgSpot(data) {
345
+ this.undoIconClicked.emit({ data, mgOrCredit: "MakeGood" });
346
+ }
347
+ //Sort and Filter Logic begins!
348
+ closeTooltip() {
349
+ if (this.tooltip && this.tooltip.isOpen()) {
350
+ this.tooltip.close();
412
351
  }
413
- // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of
414
- // properties sequentially we only have to run `_doChangeDetection` once at the end.
415
- if (!this._isChangeDetectionPending) {
416
- this._isChangeDetectionPending = true;
417
- this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
418
- this._doChangeDetection();
419
- }));
352
+ this.tooltip = null;
353
+ this.disableCheckboxApply = false;
354
+ if (!this.bindValueFuncCalled) {
355
+ this.columnFilterClosed.emit();
420
356
  }
421
357
  }
422
- /** Run change detection. */
423
- _doChangeDetection() {
424
- this._isChangeDetectionPending = false;
425
- // Apply the content transform. The transform can't be set via an Angular binding because
426
- // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
427
- // string literals, a variable that can only be 'X' or 'Y', and user input that is run through
428
- // the `Number` function first to coerce it to a numeric value.
429
- this._contentWrapper.nativeElement.style.top = this._renderedContentTransform;
430
- // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
431
- // from the root, since the repeated items are content projected in. Calling `detectChanges`
432
- // instead does not properly check the projected content.
433
- this.ngZone.run(() => this._changeDetectorRef.markForCheck());
434
- const runAfterChangeDetection = this._runAfterChangeDetection;
435
- this._runAfterChangeDetection = [];
436
- for (const fn of runAfterChangeDetection) {
437
- fn();
358
+ closeSortTooltip() {
359
+ if (this.annaSortService.tooltip && this.annaSortService.tooltip.isOpen()) {
360
+ this.annaSortService.tooltip.close();
438
361
  }
439
362
  }
440
- /** Calculates the `style.width` and `style.height` for the spacer element. */
441
- _calculateSpacerSize() {
442
- this._totalContentHeight = `${this._totalContentSize}px`;
443
- this._totalContentWidth = "";
363
+ initFilters() {
364
+ this.annaFilterService.tooltipMap = new Map();
365
+ this.annaFilterService.tooltipSelectedMap = new Map();
366
+ this.annaSortService.sortByAsc = new Map();
367
+ this.annaSortService.sortByDesc = new Map();
368
+ this.annaFilterService.selectedRadio = null;
369
+ this.annaFilterService.appliedFiltersArray = [];
370
+ //closing the sort tooltip if we route on the same route or if we click dropdown filters
371
+ this.closeSortTooltip();
372
+ this.annaSortService.tooltip = null;
373
+ this.disableClearAllBtn = true;
374
+ this.disableTimeFilterApplyBtn = false;
444
375
  }
445
- }
446
- AnnaTableVirtualScrollViewportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaTableVirtualScrollViewportComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }, { token: i1$1.Directionality, optional: true }, { token: i2.ScrollDispatcher }, { token: i2.ViewportRuler }, { token: i1.AnnaGenericTableService }], target: i0.ɵɵFactoryTarget.Component });
447
- AnnaTableVirtualScrollViewportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaTableVirtualScrollViewportComponent, selector: "anna-table-virtual-scroll-viewport", inputs: { orientation: "orientation" }, outputs: { scrolledIndexChange: "scrolledIndexChange" }, host: { properties: { "class.anna-table-virtual-scroll-orientation-horizontal": "orientation === \"horizontal\"", "class.anna-table-virtual-scroll-orientation-vertical": "orientation !== \"horizontal\"" }, classAttribute: "anna-table-virtual-scroll-viewport" }, providers: [
448
- {
449
- provide: CdkScrollable,
450
- useExisting: AnnaTableVirtualScrollViewportComponent
451
- },
452
- {
453
- provide: CdkVirtualScrollViewport,
454
- useExisting: AnnaTableVirtualScrollViewportComponent
455
- }
456
- ], viewQueries: [{ propertyName: "_contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!--\r\n Wrap the rendered content in an element that will be used to offset it based on the scroll\r\n position.\r\n-->\r\n<div #contentWrapper class=\"anna-table-virtual-scroll-content-wrapper\">\r\n\t<ng-content></ng-content>\r\n</div>\r\n<!--\r\n Spacer used to force the scrolling container to the correct size for the *total* number of items\r\n so that the scrollbar captures the size of the entire data set.\r\n-->\r\n<div class=\"app-table-virtual-scroll-spacer\" [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\">\r\n</div>", styles: ["anna-table-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;will-change:scroll-position;-webkit-overflow-scrolling:touch}.anna-table-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .anna-table-virtual-scroll-content-wrapper{right:0;left:auto}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper{min-height:100%}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper{min-width:100%}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.app-table-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .app-table-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaTableVirtualScrollViewportComponent, decorators: [{
458
- type: Component,
459
- args: [{ selector: "anna-table-virtual-scroll-viewport", host: {
460
- class: "anna-table-virtual-scroll-viewport",
461
- "[class.anna-table-virtual-scroll-orientation-horizontal]": 'orientation === "horizontal"',
462
- "[class.anna-table-virtual-scroll-orientation-vertical]": 'orientation !== "horizontal"'
463
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
464
- {
465
- provide: CdkScrollable,
466
- useExisting: AnnaTableVirtualScrollViewportComponent
467
- },
468
- {
469
- provide: CdkVirtualScrollViewport,
470
- useExisting: AnnaTableVirtualScrollViewportComponent
471
- }
472
- ], template: "<!--\r\n Wrap the rendered content in an element that will be used to offset it based on the scroll\r\n position.\r\n-->\r\n<div #contentWrapper class=\"anna-table-virtual-scroll-content-wrapper\">\r\n\t<ng-content></ng-content>\r\n</div>\r\n<!--\r\n Spacer used to force the scrolling container to the correct size for the *total* number of items\r\n so that the scrollbar captures the size of the entire data set.\r\n-->\r\n<div class=\"app-table-virtual-scroll-spacer\" [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\">\r\n</div>", styles: ["anna-table-virtual-scroll-viewport{display:block;position:relative;overflow:auto;contain:strict;will-change:scroll-position;-webkit-overflow-scrolling:touch}.anna-table-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .anna-table-virtual-scroll-content-wrapper{right:0;left:auto}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper{min-height:100%}.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-horizontal .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper{min-width:100%}.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.app-table-virtual-scroll-orientation-vertical .anna-table-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.app-table-virtual-scroll-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0}[dir=rtl] .app-table-virtual-scroll-spacer{right:0;left:auto;transform-origin:100% 0}\n"] }]
473
- }], ctorParameters: function () {
474
- return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
475
- type: Optional
476
- }, {
477
- type: Inject,
478
- args: [VIRTUAL_SCROLL_STRATEGY]
479
- }] }, { type: i1$1.Directionality, decorators: [{
480
- type: Optional
481
- }] }, { type: i2.ScrollDispatcher }, { type: i2.ViewportRuler }, { type: i1.AnnaGenericTableService }];
482
- }, propDecorators: { orientation: [{
483
- type: Input
484
- }], scrolledIndexChange: [{
485
- type: Output
486
- }], _contentWrapper: [{
487
- type: ViewChild,
488
- args: ["contentWrapper", { static: true }]
489
- }] } });
490
-
491
- /**
492
- * A custom scroll strategy that accepts a static row height, static header height,
493
- * and a buffer size. The strategy
494
- */
495
- class AnnaFixedRowSizeTableVirtualScrollStrategy {
496
- constructor(rowHeight, buffer, headerHeight) {
497
- this._scrolledIndexChange = new Subject();
498
- this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());
499
- this.updateRowHeightAndBuffer(rowHeight, buffer, headerHeight);
500
- }
501
- /**
502
- * Attaches this scroll strategy to a viewport.
503
- * @param viewport The viewport to attach this strategy to.
504
- */
505
- attach(viewport) {
506
- this.viewport = viewport;
507
- this.updateTotalContentSize();
508
- this.updateRenderedRange();
509
- }
510
- /**
511
- * Detaches this scroll strategy from the currently attached viewport.
512
- */
513
- detach() {
514
- this._scrolledIndexChange.complete();
515
- this.viewport = null;
516
- }
517
- onContentScrolled() {
518
- this.updateRenderedRange();
519
- }
520
- onDataLengthChanged() {
521
- this.updateTotalContentSize();
522
- this.updateRenderedRange();
523
- }
524
- onContentRendered() {
525
- // This method is useful for virtual scroll strategies that measure the rendered
526
- // content to determine its height. This scroll strategy assumes that rows have
527
- // a static height, so there's no need to implement this method.
528
- }
529
- onRenderedOffsetChanged() {
530
- // Similar to onContentRendered, this method is useful for virtual scroll strategies
531
- // that need to track the offset as it changes. This scroll strategy is always able
532
- // to calculate the correct offset from other values, so there's no need to implement
533
- // this method.
534
- }
535
- scrollToIndex(index, behavior) {
536
- var _a;
537
- (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.scrollToOffset(index * this.rowHeight, behavior);
376
+ setInitialValueMapData() {
377
+ this.annaFilterService.initialValueMap = new Map();
378
+ this.tableHeaders.forEach((column) => {
379
+ column.headerInfo.forEach((header) => {
380
+ if (header.filter === "SLIDER") {
381
+ header.filterObjectKeys.forEach((key) => {
382
+ let min = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, true);
383
+ let max = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, false);
384
+ let obj = { min, max };
385
+ this.annaFilterService.initialValueMap.set(key, obj);
386
+ });
387
+ }
388
+ else if (header.filter === "DATE") {
389
+ header.filterObjectKeys.forEach((key) => {
390
+ if (key == "period") {
391
+ const minMaxStartDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "startDate");
392
+ const minMaxEndDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "endDate");
393
+ let dateObj = { minSelectedDate: minMaxStartDate[0], maxSelectedDate: minMaxEndDate[1] };
394
+ this.annaFilterService.initialValueMap.set(key, dateObj);
395
+ }
396
+ else {
397
+ const minMaxDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, key);
398
+ let obj = { minSelectedDate: minMaxDate[0], maxSelectedDate: minMaxDate[1] };
399
+ this.annaFilterService.initialValueMap.set(key, obj);
400
+ }
401
+ });
402
+ }
403
+ else if (header.filter === "TIME") {
404
+ header.filterObjectKeys.forEach((key) => {
405
+ let data = this.clonedTableData.filter((obj) => !["", "-", null, "0", "<multi>"].includes(obj[key]));
406
+ let timeArr = map(data, key);
407
+ timeArr.sort((a, b) => {
408
+ return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
409
+ });
410
+ let obj = {
411
+ fromTime: timeArr[0],
412
+ toTime: timeArr[timeArr.length - 1],
413
+ };
414
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
415
+ let includeMulti = this.clonedTableData.findIndex((obj) => obj[key] == "<multi>") != -1;
416
+ let includeZero = this.clonedTableData.findIndex((obj) => obj[key] == "0") != -1;
417
+ let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key] != "0" && obj[key] != "<multi>") != -1;
418
+ let obj = {
419
+ fromTime: timeArr[0],
420
+ toTime: timeArr[timeArr.length - 1],
421
+ includeMulti: includeMulti,
422
+ includeZero: includeZero,
423
+ includeTimeRange: includeTimeRange
424
+ };
425
+ this.annaFilterService.initialValueMap.set(key, obj);
426
+ }
427
+ else if (this.gtGeneralConfig.component === "RATING") {
428
+ let includeMulti = this.clonedTableData.findIndex((obj) => obj[key][0] == "<multi>") != -1;
429
+ let includeZero = this.clonedTableData.findIndex((obj) => obj[key][0] == "0") != -1;
430
+ let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key][0] != "0" && obj[key][0] != "<multi>") != -1;
431
+ let startTimeArr = map(this.clonedTableData, "startTime");
432
+ let endTimeArr = map(this.clonedTableData, "endTime");
433
+ startTimeArr.sort((a, b) => {
434
+ return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
435
+ });
436
+ endTimeArr.sort((a, b) => {
437
+ return this.annaDateTimeFormatService.sortByTimeDescending(a, b);
438
+ });
439
+ let obj = {
440
+ fromTime: startTimeArr[0],
441
+ toTime: endTimeArr[0],
442
+ includeMulti: includeMulti,
443
+ includeZero: includeZero,
444
+ includeTimeRange: includeTimeRange
445
+ };
446
+ this.annaFilterService.initialValueMap.set(key, obj);
447
+ }
448
+ else {
449
+ this.annaFilterService.initialValueMap.set(key, obj);
450
+ }
451
+ });
452
+ }
453
+ });
454
+ });
538
455
  }
539
- /**
540
- * Update the item size and buffer size.
541
- * @param rowHeight The height of a row in the virtually scrolling table.
542
- * @param buffer The number of rows to buffer outside the viewport.
543
- * @param headerHeight The total height of the table header, including all header rows.
544
- */
545
- updateRowHeightAndBuffer(rowHeight, buffer, headerHeight) {
546
- this.rowHeight = rowHeight;
547
- this.buffer = buffer;
548
- this.headerHeight = headerHeight;
549
- this.updateTotalContentSize();
550
- this.updateRenderedRange();
456
+ isTooltipActive(header) {
457
+ return this.annaFilterService.isTooltipActive(header);
551
458
  }
552
- updateRenderedRange() {
553
- if (!this.viewport) {
554
- return;
459
+ bindTheValueToToolTip(tooltip, header) {
460
+ this.bindValueFuncCalled = true;
461
+ let containerToScroll;
462
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "DRRLISTING") {
463
+ containerToScroll = document.getElementsByClassName("scrollable-container")[0];
464
+ var mediaQuery = window.matchMedia("(max-width: 1366px)");
465
+ if (mediaQuery.matches) {
466
+ containerToScroll.scroll(0, this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip);
467
+ }
468
+ }
469
+ // if same tooltip opened close it
470
+ if (tooltip == this.tooltip) {
471
+ this.bindValueFuncCalled = false;
472
+ this.closeTooltip();
473
+ }
474
+ else {
475
+ this.searchBar = '';
476
+ let enabledHeaders = [];
477
+ header.forEach((item) => {
478
+ if (item == "period") {
479
+ let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
480
+ let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
481
+ if (uniqStartDate.length > 1 || uniqEndDate.length > 1 || this.isTooltipActive([item])) {
482
+ enabledHeaders.push(item);
483
+ }
484
+ }
485
+ else if (uniq(this.tableData.map((u) => u[item])).length > 1 || this.isTooltipActive([item])) {
486
+ enabledHeaders.push(item);
487
+ }
488
+ });
489
+ this.openTooltip(tooltip, enabledHeaders);
490
+ if (window.innerWidth < 1500 && window.innerHeight < 768 && !this.annaFilterService.sliderSet.has(header[0])) {
491
+ this.columnFilterOpened.emit();
492
+ }
493
+ this.showCheckboxFilterRadioButtons = enabledHeaders.length > 1;
494
+ this.populateTooltipDataBasedOnSelectedRadio(enabledHeaders[0]);
495
+ this.bindValueFuncCalled = false;
555
496
  }
556
- const viewportSize = this.viewport.getViewportSize();
557
- const dataLength = this.viewport.getDataLength();
558
- const scrollOffset = this.viewport.measureScrollOffset();
559
- // the index of the first item that would be at least partially visible in the viewport
560
- let firstVisibleIndex = Math.floor((scrollOffset + this.headerHeight) / this.rowHeight);
561
- // if the buffer size is 10 but the first visible item is at, say, index 7
562
- // then the buffered items must be 7, because we don't have 10 items available to buffer.
563
- const bufferedItems = Math.min(AnnaFilterService.bufferSize, firstVisibleIndex);
564
- const itemsInViewport = Math.ceil(viewportSize / this.rowHeight);
565
- const itemsToRender = itemsInViewport + this.buffer;
566
- // Clamp the new range between 0 and dataLength
567
- const newStart = Math.max(0, firstVisibleIndex - bufferedItems);
568
- const newEnd = Math.min(dataLength, firstVisibleIndex + itemsToRender);
569
- const newRange = {
570
- start: newStart,
571
- end: newEnd
572
- };
573
- const newOffset = this.rowHeight * (firstVisibleIndex - bufferedItems);
574
- this.viewport.setRenderedContentOffset(newOffset);
575
- this.viewport.setRenderedRange(newRange);
576
- this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));
577
- }
578
- updateTotalContentSize() {
579
- var _a;
580
- (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.setTotalContentSize(this.viewport.getDataLength() * this.rowHeight);
581
497
  }
582
- }
583
- /**
584
- * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created
585
- * `FixedSizeVirtualScrollStrategy` from the given directive.
586
- * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the
587
- * `FixedSizeVirtualScrollStrategy` from.
588
- */
589
- function fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {
590
- return fixedSizeDir.scrollStrategy;
591
- }
592
- class AnnaFixedRowSizeTableVirtualScrollStrategyDirective {
593
- constructor() {
594
- this._rowHeight = 30;
595
- this._headerRowHeight = 30;
596
- this._buffer = 20;
597
- this._headerRows = null;
598
- this.headerRowCount = 1;
599
- /** The scroll strategy used by this directive. */
600
- this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
498
+ openTooltip(tooltip, header) {
499
+ this.closeTooltip();
500
+ this.tooltip = tooltip;
501
+ this.tooltip.open();
502
+ //convert key into the header
503
+ this.radioButtons = header.map((key) => {
504
+ let value = this.tooltipRadioTextMap.has(key)
505
+ ? this.tooltipRadioTextMap.get(key)
506
+ : key; //change to display name
507
+ return new radioButtonModel(key, value);
508
+ });
601
509
  }
602
- /** The height of rows in the table (in pixels). Defaults to 30. */
603
- set rowHeight(value) { this._rowHeight = coerceNumberProperty(value); }
604
- get rowHeight() { return this._rowHeight; }
605
- /**
606
- * The height of header rows in the table (in pixels). Defaults to 30.
607
- */
608
- set headerRowHeight(value) { this._headerRowHeight = coerceNumberProperty(value); }
609
- get headerRowHeight() { return this._headerRowHeight; }
610
- /**
611
- * The number of buffered rows rendered beyond the viewport.
612
- * If the number of buffered rows dips below this number, more rows will be rendered. Defaults to 20.
613
- */
614
- set buffer(value) {
615
- this._buffer = coerceNumberProperty(value);
510
+ clearColumnFilter() {
511
+ this.annaFilterService.clearColumnFilter();
512
+ this.toolTipdata = null;
513
+ this.tempTooltipData = null;
514
+ this.closeTooltip();
515
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
516
+ this.checkIfSortingIsApplied();
517
+ this.filterAppliedToTable.emit(this.tableData);
518
+ this.disableEnableEachColumnFilters();
616
519
  }
617
- get buffer() { return this._buffer; }
618
- set headerRows(value) { this._headerRows = coerceNumberProperty(value, undefined); }
619
- get headerRows() { return this._headerRows; }
620
- ngOnChanges(change) {
621
- var _a, _b;
622
- if (this.headerRows != undefined || this.headerRowsQuery) {
623
- this.handleChange();
520
+ populateTooltipDataBasedOnSelectedRadio(header) {
521
+ this.disableSliderApplyButton = false;
522
+ this.disableCheckboxApply = false;
523
+ if (this.toolTipdata) {
524
+ this.revert();
624
525
  }
625
- if (((_a = change['buffer']) === null || _a === void 0 ? void 0 : _a.previousValue) != ((_b = change['buffer']) === null || _b === void 0 ? void 0 : _b.currentValue)) {
626
- AnnaFilterService.bufferSize = this.buffer;
627
- this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
526
+ this.annaFilterService.selectedRadio = header;
527
+ let selectedFilterSet = new Set(this.annaFilterService.appliedFiltersArray);
528
+ this.disableColumnClearAllBtn = selectedFilterSet.has(this.annaFilterService.selectedRadio) ? false : true;
529
+ if (this.annaFilterService.calendarSet.has(header)) {
530
+ this.getCalendarData();
531
+ }
532
+ else if (this.annaFilterService.sliderSet.has(header)) {
533
+ this.getSliderData(header);
534
+ }
535
+ else if (this.annaFilterService.timeSet.has(header)) {
536
+ this.getTimeFilterData(header);
537
+ }
538
+ else {
539
+ this.getCheckboxData(header);
628
540
  }
629
541
  }
630
- ngAfterContentInit() {
631
- this.headerRowsQuery.changes.subscribe(() => {
632
- this.handleChange();
633
- });
542
+ getSliderData(header) {
543
+ if (header === "Rate") {
544
+ this.annaFilterService.translateFunc = "currency";
545
+ }
546
+ else {
547
+ this.annaFilterService.translateFunc = "normal";
548
+ }
549
+ this.options = this.annaFilterService.populateSliderTooltip(this.clonedTableData, this.tableData);
550
+ this.disableSliderApplyButton = this.disableSliderApplyBtn();
551
+ let selectedTooltipObj;
552
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
553
+ selectedTooltipObj = this.annaFilterService.tooltipSelectedMap.get(header);
554
+ }
555
+ else {
556
+ selectedTooltipObj = this.annaFilterService.initialValueMap.get(header);
557
+ }
558
+ this.sliderMinValue = selectedTooltipObj.min < this.options.floor ? this.options.floor : selectedTooltipObj.min;
559
+ this.sliderMaxValue = selectedTooltipObj.max < this.options.ceil ? selectedTooltipObj.max : this.options.ceil;
560
+ //default step values
561
+ this.options.step = 1;
562
+ this.sliderFilterTextBoxStep = "1";
563
+ if (header !== "WeekNumber") {
564
+ this.options.step = 0.1;
565
+ this.sliderFilterTextBoxStep = "0.1";
566
+ }
634
567
  }
635
- handleChange() {
636
- var _a;
637
- this.scrollStrategy.updateRowHeightAndBuffer(this.rowHeight, this.buffer,
638
- // Use the explicit headerRows input value if set.
639
- // Otherwise, fall back to the QueryList length.
640
- this.headerRowHeight * ((_a = this._headerRows) !== null && _a !== void 0 ? _a : this.headerRowsQuery.length));
568
+ getCheckboxData(header) {
569
+ this.tempTooltipData = this.annaFilterService.populateTooltip(header, this.clonedTableData, this.tableData);
570
+ this.allSelected = this.annaFilterService.isAllOptionsSelected();
571
+ this.showAll = this.tempTooltipData.filter((x) => !x.isHidden).length > 1 ? true : false;
572
+ this.toolTipdata = cloneDeep(this.tempTooltipData);
641
573
  }
642
- }
643
- AnnaFixedRowSizeTableVirtualScrollStrategyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
644
- AnnaFixedRowSizeTableVirtualScrollStrategyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]", inputs: { rowHeight: "rowHeight", headerRowHeight: "headerRowHeight", buffer: "buffer", headerRows: "headerRows" }, providers: [
645
- {
646
- provide: VIRTUAL_SCROLL_STRATEGY,
647
- useFactory: fixedSizeVirtualScrollStrategyFactory,
648
- deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
574
+ getCalendarData() {
575
+ const parsingFormat = "MM/DD/YYYY";
576
+ let minMaxdate = this.annaFilterService.populateDatePickerTooltipWithData(this.clonedTableData, this.tableData);
577
+ let selectedDateObj;
578
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
579
+ selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
649
580
  }
650
- ], queries: [{ propertyName: "headerRowsQuery", predicate: MatHeaderRowDef }], usesOnChanges: true, ngImport: i0 });
651
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, decorators: [{
652
- type: Directive,
653
- args: [{
654
- selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]",
655
- providers: [
656
- {
657
- provide: VIRTUAL_SCROLL_STRATEGY,
658
- useFactory: fixedSizeVirtualScrollStrategyFactory,
659
- deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
660
- }
661
- ]
662
- }]
663
- }], propDecorators: { rowHeight: [{
664
- type: Input
665
- }], headerRowHeight: [{
666
- type: Input
667
- }], buffer: [{
668
- type: Input
669
- }], headerRows: [{
670
- type: Input
671
- }], headerRowsQuery: [{
672
- type: ContentChildren,
673
- args: [MatHeaderRowDef]
674
- }] } });
675
-
676
- /**
677
- * Directive that wraps a given data source in a "virtual" data source that emits
678
- * the slice of the original data source that matches the range that should be rendered
679
- * in the containing virtual scroll viewport.
680
- */
681
- class AnnaVirtualTableDirective {
682
- constructor(elementRef, viewport, table, ngZone, _coalescedStyleScheduler) {
683
- this.viewport = viewport;
684
- this.table = table;
685
- this._coalescedStyleScheduler = _coalescedStyleScheduler;
686
- this.virtualizedDataStream = new Subject();
687
- this.dataSourceChanges = new Subject();
688
- /** The raw, unvirtualized data stream. Emits whenever the data in the current DataSource changes. */
689
- this.dataStream = this.dataSourceChanges
690
- .pipe(
691
- // Start off with null data source.
692
- startWith(null),
693
- // Bundle up the previous and current data sources so we can work with both.
694
- pairwise(),
695
- // Use `changeDataSource` to disconnect from the previous data source and connect to the
696
- // new one, passing back a stream of data changes which we run through `switchMap` to give
697
- // us a data stream that emits the latest data from whatever the current data source is.
698
- switchMap(([prev, cur]) => this.changeDataSource(prev, cur)),
699
- // Replay the last emitted data when someone subscribes.
700
- shareReplay(1));
701
- this.viewChange = new Subject();
702
- this.destroyed$ = new Subject();
703
- this.renderedRange = { start: 0, end: 0 };
704
- this.isNativeHtmlTable = false;
705
- table.dataSource = this.virtualizedDataStream;
706
- this.isNativeHtmlTable = elementRef.nativeElement.tagName === 'TABLE';
707
- this.dataStream.subscribe(data => {
708
- this.data = data;
709
- this.onRenderedDataChange();
710
- });
711
- viewport.renderedRangeStream.pipe(takeUntil(this.destroyed$)).subscribe((range) => {
712
- this.renderedRange = range;
713
- ngZone.run(() => this.viewChange.next(range));
714
- this.onRenderedDataChange();
715
- });
716
- viewport.attach(this);
581
+ else {
582
+ selectedDateObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
583
+ }
584
+ // For startDate
585
+ // selected date is less than date which we get
586
+ if ((selectedDateObj.minSelectedDate).isAfter(minMaxdate.minStartDate)) {
587
+ this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.minSelectedDate, parsingFormat);
588
+ }
589
+ else {
590
+ this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
591
+ }
592
+ // For endData
593
+ // selectedDate is less than date which we get
594
+ if ((selectedDateObj.maxSelectedDate).isAfter(minMaxdate.maxEndDate)) {
595
+ this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
596
+ }
597
+ else {
598
+ this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.maxSelectedDate, parsingFormat);
599
+ }
600
+ this.calendarMinEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
601
+ this.calendarMaxEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
717
602
  }
718
- set dataSource(value) {
719
- this._dataSource = value;
720
- if (isDataSource(value)) {
721
- this.dataSourceChanges.next(value);
603
+ getTimeFilterData(header) {
604
+ if (this.annaFilterService.tooltipSelectedMap.has(header)) {
605
+ this.selectedFromTime = this.annaFilterService.tooltipSelectedMap.get(header).fromTime;
606
+ this.selectedToTime = this.annaFilterService.tooltipSelectedMap.get(header).toTime;
607
+ }
608
+ else {
609
+ this.selectedFromTime = this.annaFilterService.initialValueMap.get(header).fromTime;
610
+ this.selectedToTime = this.annaFilterService.initialValueMap.get(header).toTime;
611
+ }
612
+ if (this.selectedFromTime != undefined || this.selectedToTime != undefined) {
613
+ this.selectedFromTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedFromTime, true);
614
+ this.selectedToTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedToTime, true);
615
+ this.clonedSelectedFromTime = cloneDeep(this.selectedFromTime);
616
+ this.clonedSelectedToTime = cloneDeep(this.selectedToTime);
722
617
  }
723
618
  else {
724
- this.dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));
619
+ this.selectedFromTime = ["-", "-", "-"];
620
+ this.selectedToTime = ["-", "-", "-"];
621
+ this.disableTimeFilterApplyBtn = true;
725
622
  }
726
- }
727
- get dataSource() {
728
- return this._dataSource;
729
- }
730
- ngOnInit() {
731
- // This is just a proof of concept, but the AnnaTableVirtualScrollViewportComponent uses `position: absolute` and `top: #px` instead of `transform: translateY(#px)` to position the viewport.
732
- // This removes the need to account for the translation in the `top` of the sticky header rows.
733
- if (this.viewport instanceof AnnaTableVirtualScrollViewportComponent) {
734
- return;
623
+ if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
624
+ this.showMultiTimeCheckbox = false;
625
+ this.showZeroTimeCheckbox = false;
626
+ this.showEnterTimeCheckbox = false;
627
+ if (this.clonedTableData.findIndex((obj) => obj[header] == "0") != -1) {
628
+ this.showZeroTimeCheckbox = true;
629
+ this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header] == "0") != -1;
630
+ this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
631
+ }
632
+ if (this.clonedTableData.findIndex((obj) => obj[header] == "<multi>") != -1) {
633
+ this.showMultiTimeCheckbox = true;
634
+ this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header] == "<multi>") != -1;
635
+ this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
636
+ }
637
+ if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
638
+ this.showEnterTimeCheckbox = true;
639
+ }
640
+ if (this.clonedTableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1) {
641
+ this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1;
642
+ this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
643
+ }
735
644
  }
736
- this.viewport.scrolledIndexChange
737
- .pipe(map(() => this.viewport.getOffsetToRenderedContentStart()), takeUntil(this.destroyed$))
738
- .subscribe((offset) => {
739
- // We need to set the `style.top` property of the sticky header rows
740
- // to the negative value of the virtual scroll viewport's offset, so
741
- // make the offset negative.
742
- offset = -offset;
743
- const stickyStates = this.headerRowDefs.map(rowDef => rowDef.sticky);
744
- // This logic is exactly the same as what's in the StickyStyler (literally copy + paste).
745
- // The only difference is that the `stickyOffset` variable starts at the virtual scroll
746
- // viewport container's offset instead of starting at zero.
747
- const rows = this.table._getRenderedRows(this.table._headerRowOutlet);
748
- const stickyOffsets = [];
749
- const stickyCellHeights = [];
750
- const elementsToStick = [];
751
- for (let rowIndex = 0, stickyOffset = offset; rowIndex < rows.length; rowIndex++) {
752
- stickyOffsets[rowIndex] = stickyOffset;
753
- if (!stickyStates[rowIndex]) {
754
- continue;
755
- }
756
- const row = rows[rowIndex];
757
- elementsToStick[rowIndex] = this.isNativeHtmlTable ? Array.from(row.children) : [row];
758
- const height = row.getBoundingClientRect().height;
759
- stickyOffset += height;
760
- stickyCellHeights[rowIndex] = height;
645
+ else if (this.gtGeneralConfig.component === "RATING") {
646
+ this.showMultiTimeCheckbox = false;
647
+ this.showZeroTimeCheckbox = false;
648
+ this.showEnterTimeCheckbox = false;
649
+ if (this.clonedTableData.findIndex((obj) => obj[header][0] == "0") != -1) {
650
+ this.showZeroTimeCheckbox = true;
651
+ this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header][0] == "0") != -1;
652
+ this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
761
653
  }
762
- // Using the CoalescedStyleScheduler here is optional. It'll work without it,
763
- // and CoalescedStyleScheduler is not public (yet?), so feel free to remove it.
764
- this._coalescedStyleScheduler.schedule(() => {
765
- for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
766
- if (!stickyStates[rowIndex]) {
767
- continue;
768
- }
769
- for (const element of elementsToStick[rowIndex]) {
770
- element.style.top = `${stickyOffsets[rowIndex]}px`;
771
- }
772
- }
773
- });
774
- });
654
+ if (this.clonedTableData.findIndex((obj) => obj[header][0] == "<multi>") != -1) {
655
+ this.showMultiTimeCheckbox = true;
656
+ this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header][0] == "<multi>") != -1;
657
+ this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
658
+ }
659
+ if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
660
+ this.showEnterTimeCheckbox = true;
661
+ }
662
+ if (this.clonedTableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1) {
663
+ this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1;
664
+ this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
665
+ }
666
+ }
775
667
  }
776
- ngOnDestroy() {
777
- this.destroyed$.next();
778
- this.dataSourceChanges.complete();
779
- this.virtualizedDataStream.complete();
668
+ selectOrUnselectMultiTimeCheckbox() {
669
+ this.multiTimeCheckboxChecked = !this.multiTimeCheckboxChecked;
670
+ this.annaFilterService.includeMultiTime = !this.annaFilterService.includeMultiTime;
671
+ this.disableTimeFilterApplyButton();
780
672
  }
781
- /** React to scroll state changes in the viewport. */
782
- onRenderedDataChange() {
783
- if (!this.renderedRange) {
784
- return;
673
+ selectOrUnselectZeroTimeCheckbox() {
674
+ this.zeroTimeCheckboxChecked = !this.zeroTimeCheckboxChecked;
675
+ this.annaFilterService.includeZeroTime = !this.annaFilterService.includeZeroTime;
676
+ this.disableTimeFilterApplyButton();
677
+ }
678
+ selectOrUnselectEnterTimeCheckbox() {
679
+ this.enterTimeCheckboxChecked = !this.enterTimeCheckboxChecked;
680
+ this.annaFilterService.includeTimeRange = !this.annaFilterService.includeTimeRange;
681
+ this.disableTimeFilterApplyButton();
682
+ }
683
+ disableSliderApplyBtn() {
684
+ return this.options.floor === this.options.ceil;
685
+ }
686
+ isCheckboxSelected(data) {
687
+ this.allSelected = this.annaFilterService.isCheckboxSelected(data);
688
+ if (this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected && !x.isHidden).length == 0) {
689
+ this.disableCheckboxApply = true;
690
+ }
691
+ else {
692
+ this.disableCheckboxApply = false;
785
693
  }
786
- this.renderedItems = this.data.slice(this.renderedRange.start, this.renderedRange.end + 1);
787
- // delegate rendering to the table by emitting from the virtualizedDataStream
788
- this.virtualizedDataStream.next(this.renderedItems);
789
694
  }
790
- /** Swap out one data source for another. */
791
- changeDataSource(oldDataSource, newDs) {
792
- oldDataSource === null || oldDataSource === void 0 ? void 0 : oldDataSource.disconnect(this);
793
- return newDs ? newDs.connect(this) : of();
695
+ minValueChanged(value) {
696
+ if (isNaN(+value)) {
697
+ this.sliderMinValue = +this.options.floor;
698
+ }
699
+ else {
700
+ if (+value > this.sliderMaxValue) {
701
+ this.sliderMinValue = this.sliderMaxValue;
702
+ }
703
+ else if (+value < this.options.floor) {
704
+ this.sliderMinValue = this.options.floor;
705
+ }
706
+ else {
707
+ this.sliderMinValue = +value;
708
+ }
709
+ }
794
710
  }
795
- /**
796
- * This method is only used by the experimental AutoSizeVirtualScrollStrategy.
797
- * We're not using that strategy, but I've implemented it just to show how it oculd be done.
798
- * I'm not actually sure if this works.
799
- */
800
- measureRangeSize(range, orientation) {
801
- if (orientation === 'horizontal' || range.end < range.start) {
802
- // virtual scrolling columns are not supported by this directive
803
- return 0;
711
+ maxValueChanged(value) {
712
+ if (isNaN(+value)) {
713
+ this.sliderMaxValue = +this.options.ceil;
804
714
  }
805
- const renderedBodyRows = this.table._getRenderedRows(this.table._rowOutlet);
806
- const firstRow = renderedBodyRows[range.start];
807
- const lastRow = renderedBodyRows[range.end];
808
- if (!firstRow || !lastRow) {
809
- return 0;
715
+ else {
716
+ if (+value < this.sliderMinValue) {
717
+ this.sliderMaxValue = this.sliderMinValue;
718
+ }
719
+ else if (+value > this.options.ceil) {
720
+ this.sliderMinValue = this.options.ceil;
721
+ }
722
+ else {
723
+ this.sliderMaxValue = +value;
724
+ }
810
725
  }
811
- // We need to include all header and footer rows in the sum, since they're always rendered
812
- const renderedHeaderRows = this.table._getRenderedRows(this.table._headerRowOutlet);
813
- const renderedFooterRows = this.table._getRenderedRows(this.table._footerRowOutlet);
814
- // TODO (performance): Can we just measure the offset of the first and last items and do some math to avoid having to measure each row individually?
815
- const headerHeight = renderedHeaderRows.reduce((sum, row) => {
816
- return sum += row.getBoundingClientRect().height;
817
- }, 0);
818
- const footerHeight = renderedFooterRows.reduce((sum, row) => {
819
- return sum += row.getBoundingClientRect().height;
820
- }, 0);
821
- const bodyHeight = lastRow.getBoundingClientRect().bottom - firstRow.getBoundingClientRect().top;
822
- return headerHeight + footerHeight + bodyHeight;
823
726
  }
824
- }
825
- AnnaVirtualTableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, deps: [{ token: i0.ElementRef }, { token: i2.CdkVirtualScrollViewport }, { token: i2$1.CdkTable }, { token: i0.NgZone }, { token: _COALESCED_STYLE_SCHEDULER }], target: i0.ɵɵFactoryTarget.Directive });
826
- AnnaVirtualTableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: AnnaVirtualTableDirective, selector: "[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]", inputs: { dataSource: ["appVirtualDataSource", "dataSource"] }, providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: AnnaVirtualTableDirective }], queries: [{ propertyName: "headerRowDefs", predicate: CdkHeaderRowDef }], ngImport: i0 });
827
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, decorators: [{
828
- type: Directive,
829
- args: [{
830
- selector: '[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]',
831
- providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: AnnaVirtualTableDirective }]
832
- }]
833
- }], ctorParameters: function () {
834
- return [{ type: i0.ElementRef }, { type: i2.CdkVirtualScrollViewport }, { type: i2$1.CdkTable }, { type: i0.NgZone }, { type: i2$1._CoalescedStyleScheduler, decorators: [{
835
- type: Inject,
836
- args: [_COALESCED_STYLE_SCHEDULER]
837
- }] }];
838
- }, propDecorators: { dataSource: [{
839
- type: Input,
840
- args: ['appVirtualDataSource']
841
- }], headerRowDefs: [{
842
- type: ContentChildren,
843
- args: [CdkHeaderRowDef]
844
- }] } });
845
-
846
- // Angular import statements
847
- class AnnaNonEditableGenericTableComponent {
848
- constructor(cdRef, annaSortService, annaDateTimeFormatService, annaFilterService, annaGenericTableService) {
849
- this.cdRef = cdRef;
850
- this.annaSortService = annaSortService;
851
- this.annaDateTimeFormatService = annaDateTimeFormatService;
852
- this.annaFilterService = annaFilterService;
853
- this.annaGenericTableService = annaGenericTableService;
854
- this.maximumRowsWhichCanBeRenderedWithoutScroll = 5;
855
- this.toggleCheckbox = new EventEmitter();
856
- this.toggleRowCheckbox = new EventEmitter();
857
- this.toggleHeaderCheckbox = new EventEmitter();
858
- this.undoIconClicked = new EventEmitter();
859
- this.filterAppliedToTable = new EventEmitter();
860
- this.sortingAppliedToTable = new EventEmitter();
861
- this.rowClicked = new EventEmitter();
862
- this.radioButtonSelected = new EventEmitter();
863
- this.columnFilterOpened = new EventEmitter();
864
- this.columnFilterClosed = new EventEmitter();
865
- this.gtIconClicked = new EventEmitter();
866
- this.gtSVGIconClicked = new EventEmitter();
867
- this.gtTextActionClicked = new EventEmitter();
868
- this.gtViewDetailClicked = new EventEmitter();
869
- this.noDataWidth = "55%";
870
- this.disableClearAllBtn = true;
871
- this.disableColumnClearAllBtn = true;
872
- this.allSelected = 0;
873
- this.options = {
874
- floor: 0,
875
- ceil: 0,
876
- step: 0.1
877
- };
878
- this.tableColumns = [];
879
- this.totalRowColumns = null;
880
- this.isScrolledLeft = false;
881
- this.rowBorderWidth = 2;
882
- this.PfpIconActiveColor = "#9B1B93";
883
- this.PfpIconDisableColor = "rgba(189,189,189,0.5)";
884
- this.setTooltipRadioNames();
727
+ sliderValueChange() {
728
+ this.sliderValue = { min: this.sliderMinValue, max: this.sliderMaxValue };
729
+ }
730
+ cancelSliderFilter() {
731
+ this.sliderValue = null;
732
+ this.closeTooltip();
885
733
  }
886
- ngOnInit() {
887
- // this.tableData = this.numberOfSkeletonColumns;
734
+ allOptionClicked() {
735
+ if (this.allSelected == 0 || this.allSelected == 2) {
736
+ this.allSelected = 1;
737
+ this.disableCheckboxApply = false;
738
+ }
739
+ else {
740
+ this.allSelected = 0;
741
+ this.disableCheckboxApply = true;
742
+ }
743
+ this.annaFilterService.allOptionsClicked(this.allSelected);
888
744
  }
889
- ngOnChanges(changes) {
890
- // console.log("generic");
891
- // console.log(this.tableHeaders);
892
- // console.log(JSON.stringify(this.tableData));
893
- if (this.showSkeletonLoading) {
894
- this.tableData = this.numberOfSkeletonColumns;
745
+ applyFilters() {
746
+ let isSame = isEqual(this.toolTipdata, this.tempTooltipData);
747
+ this.toolTipdata = cloneDeep(this.tempTooltipData);
748
+ this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
749
+ if (!isSame) {
750
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
751
+ }
752
+ let tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected).map((x) => x.data);
753
+ if (tooltipSelectedDataArray.length == 0) {
754
+ tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).map((x) => x.data);
755
+ }
756
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, tooltipSelectedDataArray);
757
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
758
+ this.checkIfSortingIsApplied();
759
+ this.filterAppliedToTable.emit(this.tableData);
760
+ // this.generateTableDataWrapper();
761
+ this.disableEnableEachColumnFilters();
762
+ this.closeTooltip();
763
+ }
764
+ revert() {
765
+ this.tempTooltipData = cloneDeep(this.toolTipdata);
766
+ this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
767
+ this.toolTipdata = null;
768
+ }
769
+ closeCheckboxFilter() {
770
+ if (this.toolTipdata) {
771
+ this.revert();
772
+ }
773
+ this.closeTooltip();
774
+ }
775
+ applySliderFilter() {
776
+ if (this.sliderValue) {
777
+ let selectedDataObj;
778
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
779
+ selectedDataObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
780
+ }
781
+ else {
782
+ selectedDataObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
783
+ }
784
+ let isSame = isEqual(selectedDataObj, this.sliderValue);
785
+ if (!isSame) {
786
+ this.annaFilterService.sliderData = { min: this.options.floor, max: this.options.ceil };
787
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, this.sliderValue);
788
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
789
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
790
+ this.checkIfSortingIsApplied();
791
+ this.filterAppliedToTable.emit(this.tableData);
792
+ // this.generateTableDataWrapper();
793
+ this.disableEnableEachColumnFilters();
794
+ }
795
+ }
796
+ this.sliderValue = null;
797
+ this.closeTooltip();
798
+ }
799
+ cancelInDateFilter() {
800
+ this.closeTooltip();
801
+ }
802
+ applyDateFilter(selectedDate) {
803
+ let selectedDateObj;
804
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
805
+ selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
895
806
  }
896
807
  else {
897
- this.setInitialValueMapData();
808
+ selectedDateObj = cloneDeep(this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio));
809
+ }
810
+ let isStartDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate), selectedDateObj.minSelectedDate);
811
+ let isEndDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate), selectedDateObj.maxSelectedDate);
812
+ if (!isStartDateSame || !isEndDateSame) {
813
+ selectedDateObj.minSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate));
814
+ selectedDateObj.maxSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate));
815
+ this.annaFilterService.flightDateRange = {
816
+ minSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMinEnabledDate)),
817
+ maxSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMaxEnabledDate))
818
+ };
819
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedDateObj);
820
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
821
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
822
+ this.checkIfSortingIsApplied();
823
+ this.filterAppliedToTable.emit(this.tableData);
824
+ // this.generateTableDataWrapper();
898
825
  this.disableEnableEachColumnFilters();
899
- this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
900
- this.showSkeletonLoading = false;
901
826
  }
902
- //setting table column here as well because while showing skeleton loader, we should show table headers.
903
- if (changes['tableHeaders'] && changes['tableHeaders'].currentValue) {
904
- this.tableColumns = this.tableHeaders.filter(x => x.visible).map(x => x.headerInfo[0].objectKey);
827
+ this.closeTooltip();
828
+ }
829
+ applyWeekFilter(event) {
830
+ }
831
+ incrementHour(arr) {
832
+ if (arr[0] == "") {
833
+ arr[0] = 1;
905
834
  }
906
- if (changes['totalRowInfo'] && changes['totalRowInfo'].currentValue) {
907
- this.totalRowColumns = this.totalRowInfo.map(x => x.colName);
835
+ else if (parseInt(arr[0]) < 12) {
836
+ arr[0] = parseInt(arr[0]) + 1;
837
+ }
838
+ else {
839
+ arr[0] = 1;
908
840
  }
909
- this.cdRef.detectChanges();
910
841
  }
911
- trackByFn(index) {
912
- return index;
842
+ decrementHour(arr) {
843
+ if (arr[0] == "") {
844
+ arr[0] = 12;
845
+ }
846
+ else if (parseInt(arr[0]) > 1) {
847
+ arr[0] = parseInt(arr[0]) - 1;
848
+ }
849
+ else {
850
+ arr[0] = 12;
851
+ }
913
852
  }
914
- setTooltipRadioNames() {
915
- this.tooltipRadioTextMap = new Map();
916
- this.tooltipRadioTextMap.set("StartTimeForFilter", "Start Time");
917
- this.tooltipRadioTextMap.set("EndTimeForFilter", "End Time");
918
- this.tooltipRadioTextMap.set("start_time_for_filter", "Start Time");
919
- this.tooltipRadioTextMap.set("end_time_for_filter", "End Time");
920
- this.tooltipRadioTextMap.set("primaryAEName", "Primary AE");
921
- this.tooltipRadioTextMap.set("region", "Region");
922
- this.tooltipRadioTextMap.set("agencyName", "Agency");
923
- this.tooltipRadioTextMap.set("location", "Location");
924
- this.tooltipRadioTextMap.set("advertiserName", "Advertiser");
925
- this.tooltipRadioTextMap.set("productCode", "Product Code");
926
- this.tooltipRadioTextMap.set("flightStartDate", "Start Date");
927
- this.tooltipRadioTextMap.set("flightEndDate", "End Date");
928
- this.tooltipRadioTextMap.set("orderIdAndRevNumber", "STN Order#-Rev#");
929
- this.tooltipRadioTextMap.set("alternateOrderId", "Buyer Order#");
930
- this.tooltipRadioTextMap.set("grp", "GRP");
931
- this.tooltipRadioTextMap.set("cpp", "CPP");
932
- this.tooltipRadioTextMap.set("imps", "IMPS");
933
- this.tooltipRadioTextMap.set("cpm", "CPM");
934
- this.tooltipRadioTextMap.set("offeredMGs", "Offered MG");
935
- this.tooltipRadioTextMap.set("outstandingPE", "O/S PE");
936
- this.tooltipRadioTextMap.set("offeredADUs", "Offered ADUs");
937
- this.tooltipRadioTextMap.set("udDeficitValue", "Pending Audience Delta");
938
- this.tooltipRadioTextMap.set("startEndTimeMulti", "Time");
939
- this.tooltipRadioTextMap.set("bookedValue", "Booked");
940
- this.tooltipRadioTextMap.set("bookedSpots", "Spots");
941
- this.tooltipRadioTextMap.set("userChanges", "Other changes");
942
- this.tooltipRadioTextMap.set("inventoryCode", "Inventory Code");
943
- this.tooltipRadioTextMap.set("program", "Program");
944
- this.tooltipRadioTextMap.set("agency", "Agency");
945
- this.tooltipRadioTextMap.set("advertiser", "Advertiser");
946
- this.tooltipRadioTextMap.set("startDate", "Start Date");
947
- this.tooltipRadioTextMap.set("endDate", "End Date");
948
- this.tooltipRadioTextMap.set("rcvPreempt", "Madegood PE");
949
- this.tooltipRadioTextMap.set("osPreempt", "O/S PE");
950
- this.tooltipRadioTextMap.set("rcvUnderDly", "Recovered UD");
951
- this.tooltipRadioTextMap.set("osUnderDly", "O/s Under Dly");
952
- this.tooltipRadioTextMap.set("primaryAe", "Primary AE");
953
- this.tooltipRadioTextMap.set("region", "Region");
954
- this.tooltipRadioTextMap.set("revCode1", "Rev code 1");
955
- this.tooltipRadioTextMap.set("orderNoRevNo", "STN Order#-Rev#");
956
- this.tooltipRadioTextMap.set("revCode2", "Rev code 2");
957
- this.tooltipRadioTextMap.set("revCode3", "Rev code 3");
958
- this.tooltipRadioTextMap.set("booked", "Booked");
959
- this.tooltipRadioTextMap.set("spots", "Spots");
960
- this.tooltipRadioTextMap.set("postedAudPercent", "Posted %");
961
- this.tooltipRadioTextMap.set("revision", "Revision");
962
- this.tooltipRadioTextMap.set("productCode", "Product Code");
963
- this.tooltipRadioTextMap.set("buyerOrderId", "ALT Order#");
964
- this.tooltipRadioTextMap.set("demo", "Demo");
965
- this.tooltipRadioTextMap.set("postedAdu", "Posted ADUs");
966
- this.tooltipRadioTextMap.set("scheduledAdu", "Scheduled ADUs");
967
- this.tooltipRadioTextMap.set("audienceDeficit", "Audience Deficit");
968
- this.tooltipRadioTextMap.set("postedAudPercent", "Posted Audience %");
853
+ incrementMinute(arr) {
854
+ if (arr[1] == "" || parseInt(arr[1]) == 0) {
855
+ arr[1] = 30;
856
+ }
857
+ else {
858
+ arr[1] = "00";
859
+ }
969
860
  }
970
- generateTableDataWrapper() {
971
- this.showSkeletonLoading = true;
972
- this.tableDataWrapper = [];
973
- let rowObject;
974
- let columnName;
975
- let columnObject;
976
- let columnObjectKey;
977
- let keysUsedForTableDisplay;
978
- let keysUsedForColumn;
979
- let additionalInfoObject;
980
- let additionalKeys;
981
- this.tableData.forEach((obj) => {
982
- rowObject = {};
983
- keysUsedForTableDisplay = [];
984
- for (var colNum in this.tableHeaders) {
985
- columnObject = {};
986
- if (!this.tableHeaders[colNum].visible) {
987
- continue;
988
- }
989
- columnName = "";
990
- keysUsedForColumn = [];
991
- this.tableHeaders[colNum].headerInfo.forEach((header) => {
992
- if (header.typeOfBodyData === "STRING") {
993
- columnObjectKey = header.objectKey;
994
- columnObject[columnObjectKey] = obj[columnObjectKey];
995
- keysUsedForTableDisplay.push(columnObjectKey);
996
- keysUsedForColumn.push(columnObjectKey);
997
- }
998
- else if (header.typeOfBodyData === "ICON") {
999
- columnObjectKey = header.typeOfBodyData;
1000
- columnObject[columnObjectKey] = obj[header.objectKey];
1001
- keysUsedForColumn.push(header.objectKey);
1002
- }
1003
- else if (header.typeOfBodyData === "CHECKBOX") {
1004
- columnObjectKey = header.typeOfBodyData;
1005
- columnObject[columnObjectKey] = obj[header.objectKey];
1006
- keysUsedForColumn.push(header.objectKey);
1007
- }
1008
- });
1009
- for (var i = 0; i < keysUsedForColumn.length; i++) {
1010
- columnName += keysUsedForColumn[i];
1011
- if (i !== keysUsedForColumn.length - 1) {
1012
- columnName += ',';
1013
- }
1014
- }
1015
- rowObject[columnName] = columnObject;
1016
- }
1017
- additionalInfoObject = {};
1018
- additionalKeys = Object.keys(obj).filter(key => !keysUsedForTableDisplay.includes(key));
1019
- additionalKeys.forEach(key => {
1020
- additionalInfoObject[key] = obj[key];
1021
- });
1022
- rowObject.AdditionalInfo = additionalInfoObject;
1023
- this.tableDataWrapper.push(rowObject);
1024
- });
1025
- this.tableData = this.tableDataWrapper;
1026
- this.showSkeletonLoading = false;
1027
- // console.log(JSON.stringify(this.tableDataWrapper));
861
+ decrementMinute(arr) {
862
+ if (arr[1] == "" || parseInt(arr[1]) == 30) {
863
+ arr[1] = "00";
864
+ }
865
+ else {
866
+ arr[1] = 30;
867
+ }
1028
868
  }
1029
- selectOrUnselectCheckbox(rowData, columnKeys, isCheckboxSelected) {
1030
- this.toggleCheckbox.emit({ rowData, columnKeys, isCheckboxSelected });
869
+ changeStartTimeHour(increment) {
870
+ if (increment) {
871
+ this.incrementHour(this.selectedFromTime);
872
+ }
873
+ else {
874
+ this.decrementHour(this.selectedFromTime);
875
+ }
876
+ this.disableTimeFilterApplyButton();
1031
877
  }
1032
- selectUnselectAllRows() {
1033
- this.toggleHeaderCheckbox.emit();
878
+ changeEndTimeHour(increment) {
879
+ if (increment) {
880
+ this.incrementHour(this.selectedToTime);
881
+ }
882
+ else {
883
+ this.decrementHour(this.selectedToTime);
884
+ }
885
+ this.disableTimeFilterApplyButton();
1034
886
  }
1035
- selectUnselectRow(rowData) {
1036
- this.toggleRowCheckbox.emit(rowData);
887
+ changeEndTimeMinute(increment) {
888
+ if (increment) {
889
+ this.incrementMinute(this.selectedToTime);
890
+ }
891
+ else {
892
+ this.decrementMinute(this.selectedToTime);
893
+ }
894
+ this.disableTimeFilterApplyButton();
1037
895
  }
1038
- undoCreditedSpot(data) {
1039
- this.undoIconClicked.emit({ data, mgOrCredit: "Credit" });
896
+ changeStartTimeMinute(increment) {
897
+ if (increment) {
898
+ this.incrementMinute(this.selectedFromTime);
899
+ }
900
+ else {
901
+ this.decrementMinute(this.selectedFromTime);
902
+ }
903
+ this.disableTimeFilterApplyButton();
1040
904
  }
1041
- undoMgSpot(data) {
1042
- this.undoIconClicked.emit({ data, mgOrCredit: "MakeGood" });
905
+ applyTimeFilters() {
906
+ let fromTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
907
+ let fromTime24HrFormat = fromTime24HrFormatArr[0] + ":" + fromTime24HrFormatArr[1] + ":00";
908
+ let toTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
909
+ let toTime24HrFormat = toTime24HrFormatArr[0] + ":" + toTime24HrFormatArr[1] + ":00";
910
+ let previousSelectedData;
911
+ if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
912
+ previousSelectedData = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
913
+ }
914
+ else {
915
+ previousSelectedData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
916
+ }
917
+ let selectedData = {
918
+ fromTime: fromTime24HrFormat, toTime: toTime24HrFormat, includeMulti: this.annaFilterService.includeMultiTime,
919
+ includeZero: this.annaFilterService.includeZeroTime, includeTimeRange: this.annaFilterService.includeTimeRange
920
+ };
921
+ if (!isEqual(previousSelectedData, selectedData)) {
922
+ this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedData);
923
+ this.annaFilterService.reOrderAppliedFiltersArray(false);
924
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
925
+ this.checkIfSortingIsApplied();
926
+ this.filterAppliedToTable.emit(this.tableData);
927
+ // this.generateTableDataWrapper();
928
+ this.disableEnableEachColumnFilters();
929
+ }
930
+ this.closeTooltip();
1043
931
  }
1044
- //Sort and Filter Logic begins!
1045
- closeTooltip() {
1046
- if (this.tooltip && this.tooltip.isOpen()) {
1047
- this.tooltip.close();
932
+ closeTimeFilter() {
933
+ this.selectedFromTime = cloneDeep(this.clonedSelectedFromTime);
934
+ this.selectedToTime = cloneDeep(this.clonedSelectedToTime);
935
+ this.closeTooltip();
936
+ }
937
+ disableTimeFilterApplyButton() {
938
+ let timeFormat = "HH:mm:ss";
939
+ let startTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
940
+ let startTime24HrFormat = startTime24HrFormatArr[0] + ":" + startTime24HrFormatArr[1] + ":00";
941
+ let endTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
942
+ let endTime24HrFormat = endTime24HrFormatArr[0] + ":" + endTime24HrFormatArr[1] + ":00";
943
+ this.disableTimeFilterApplyBtn = moment(startTime24HrFormat, timeFormat).isAfter(moment(endTime24HrFormat, timeFormat));
944
+ if (!this.multiTimeCheckboxChecked && !this.zeroTimeCheckboxChecked && !this.enterTimeCheckboxChecked) {
945
+ this.disableTimeFilterApplyBtn = true;
1048
946
  }
1049
- this.tooltip = null;
1050
- this.disableCheckboxApply = false;
1051
- if (!this.bindValueFuncCalled) {
1052
- this.columnFilterClosed.emit();
947
+ }
948
+ sortedData(event) {
949
+ if (event.type == "none") {
950
+ this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1053
951
  }
952
+ else {
953
+ this.tableData = event.data;
954
+ }
955
+ this.sortingAppliedToTable.emit(this.tableData);
956
+ // this.generateTableDataWrapper();
1054
957
  }
1055
- closeSortTooltip() {
1056
- if (this.annaSortService.tooltip && this.annaSortService.tooltip.isOpen()) {
1057
- this.annaSortService.tooltip.close();
958
+ checkIfSortingIsApplied() {
959
+ let appliedkey;
960
+ let isAsc;
961
+ const arr = this.sortComponent.toArray();
962
+ let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByAsc, true);
963
+ appliedkey = obj.key;
964
+ isAsc = obj.setValueTo;
965
+ if (!appliedkey) {
966
+ let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByDesc, false);
967
+ appliedkey = obj.key;
968
+ isAsc = obj.setValueTo;
969
+ }
970
+ if (appliedkey) {
971
+ this.applySorting(arr, appliedkey, isAsc);
1058
972
  }
1059
973
  }
1060
- initFilters() {
1061
- this.annaFilterService.tooltipMap = new Map();
1062
- this.annaFilterService.tooltipSelectedMap = new Map();
1063
- this.annaSortService.sortByAsc = new Map();
1064
- this.annaSortService.sortByDesc = new Map();
1065
- this.annaFilterService.selectedRadio = null;
1066
- this.annaFilterService.appliedFiltersArray = [];
1067
- //closing the sort tooltip if we route on the same route or if we click dropdown filters
1068
- this.closeSortTooltip();
1069
- this.annaSortService.tooltip = null;
1070
- this.disableClearAllBtn = true;
1071
- this.disableTimeFilterApplyBtn = false;
974
+ applySorting(sortComponentArr, appliedKey, isAsc) {
975
+ sortComponentArr.forEach((component) => {
976
+ if (component.sortBy === appliedKey) {
977
+ this.setSortComponentDataProperty(component);
978
+ isAsc ? component.sortByAscending() : component.sortByDescending();
979
+ }
980
+ });
1072
981
  }
1073
- setInitialValueMapData() {
1074
- this.annaFilterService.initialValueMap = new Map();
1075
- this.tableHeaders.forEach((column) => {
1076
- column.headerInfo.forEach((header) => {
1077
- if (header.filter === "SLIDER") {
1078
- header.filterObjectKeys.forEach((key) => {
1079
- let min = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, true);
1080
- let max = this.annaFilterService.returnMaxAndMinValue(this.clonedTableData, key, false);
1081
- let obj = { min, max };
1082
- this.annaFilterService.initialValueMap.set(key, obj);
1083
- });
1084
- }
1085
- else if (header.filter === "DATE") {
1086
- header.filterObjectKeys.forEach((key) => {
982
+ setSortComponentDataProperty(sortComponent) {
983
+ sortComponent.data = this.tableData;
984
+ sortComponent.clonedData = cloneDeep(this.tableData);
985
+ }
986
+ disableEnableEachColumnFilters() {
987
+ this.tableHeaders.forEach(header => {
988
+ header.headerInfo.forEach(item => {
989
+ if (item.filter != "") {
990
+ let values = [];
991
+ item.disableFilter = true;
992
+ item.filterObjectKeys.forEach(key => {
1087
993
  if (key == "period") {
1088
- const minMaxStartDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "startDate");
1089
- const minMaxEndDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, "endDate");
1090
- let dateObj = { minSelectedDate: minMaxStartDate[0], maxSelectedDate: minMaxEndDate[1] };
1091
- this.annaFilterService.initialValueMap.set(key, dateObj);
1092
- }
1093
- else {
1094
- const minMaxDate = this.annaFilterService.returnMinAndMaxDate(this.clonedTableData, key);
1095
- let obj = { minSelectedDate: minMaxDate[0], maxSelectedDate: minMaxDate[1] };
1096
- this.annaFilterService.initialValueMap.set(key, obj);
1097
- }
1098
- });
1099
- }
1100
- else if (header.filter === "TIME") {
1101
- header.filterObjectKeys.forEach((key) => {
1102
- let data = this.clonedTableData.filter((obj) => !["", "-", null, "0", "<multi>"].includes(obj[key]));
1103
- let timeArr = map$1(data, key);
1104
- timeArr.sort((a, b) => {
1105
- return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
1106
- });
1107
- let obj = {
1108
- fromTime: timeArr[0],
1109
- toTime: timeArr[timeArr.length - 1],
1110
- };
1111
- if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
1112
- let includeMulti = this.clonedTableData.findIndex((obj) => obj[key] == "<multi>") != -1;
1113
- let includeZero = this.clonedTableData.findIndex((obj) => obj[key] == "0") != -1;
1114
- let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key] != "0" && obj[key] != "<multi>") != -1;
1115
- let obj = {
1116
- fromTime: timeArr[0],
1117
- toTime: timeArr[timeArr.length - 1],
1118
- includeMulti: includeMulti,
1119
- includeZero: includeZero,
1120
- includeTimeRange: includeTimeRange
1121
- };
1122
- this.annaFilterService.initialValueMap.set(key, obj);
1123
- }
1124
- else if (this.gtGeneralConfig.component === "RATING") {
1125
- let includeMulti = this.clonedTableData.findIndex((obj) => obj[key][0] == "<multi>") != -1;
1126
- let includeZero = this.clonedTableData.findIndex((obj) => obj[key][0] == "0") != -1;
1127
- let includeTimeRange = this.clonedTableData.findIndex((obj) => obj[key][0] != "0" && obj[key][0] != "<multi>") != -1;
1128
- let startTimeArr = map$1(this.clonedTableData, "startTime");
1129
- let endTimeArr = map$1(this.clonedTableData, "endTime");
1130
- startTimeArr.sort((a, b) => {
1131
- return this.annaDateTimeFormatService.sortByTimeAscending(a, b);
1132
- });
1133
- endTimeArr.sort((a, b) => {
1134
- return this.annaDateTimeFormatService.sortByTimeDescending(a, b);
1135
- });
1136
- let obj = {
1137
- fromTime: startTimeArr[0],
1138
- toTime: endTimeArr[0],
1139
- includeMulti: includeMulti,
1140
- includeZero: includeZero,
1141
- includeTimeRange: includeTimeRange
1142
- };
1143
- this.annaFilterService.initialValueMap.set(key, obj);
994
+ let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
995
+ let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
996
+ item.disableFilter = (uniqStartDate.length > 1 || uniqEndDate.length > 1) ? false : true;
1144
997
  }
1145
998
  else {
1146
- this.annaFilterService.initialValueMap.set(key, obj);
999
+ values = this.tableData.map((u) => u[key]);
1000
+ if (uniq(values).filter(n => n != null).length > 1) {
1001
+ item.disableFilter = false;
1002
+ }
1147
1003
  }
1148
- });
1149
- }
1150
- });
1151
- });
1152
- }
1153
- isTooltipActive(header) {
1154
- return this.annaFilterService.isTooltipActive(header);
1155
- }
1156
- bindTheValueToToolTip(tooltip, header) {
1157
- this.bindValueFuncCalled = true;
1158
- let containerToScroll;
1159
- if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "DRRLISTING") {
1160
- containerToScroll = document.getElementsByClassName("scrollable-container")[0];
1161
- var mediaQuery = window.matchMedia("(max-width: 1366px)");
1162
- if (mediaQuery.matches) {
1163
- containerToScroll.scroll(0, this.gtGeneralConfig.verticalScrollOffsetForFilterTooltip);
1164
- }
1165
- }
1166
- // if same tooltip opened close it
1167
- if (tooltip == this.tooltip) {
1168
- this.bindValueFuncCalled = false;
1169
- this.closeTooltip();
1170
- }
1171
- else {
1172
- this.searchBar = '';
1173
- let enabledHeaders = [];
1174
- header.forEach((item) => {
1175
- if (item == "period") {
1176
- let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
1177
- let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
1178
- if (uniqStartDate.length > 1 || uniqEndDate.length > 1 || this.isTooltipActive([item])) {
1179
- enabledHeaders.push(item);
1180
- }
1004
+ });
1005
+ // if(uniq(values).length > 1){
1006
+ // item.disableFilter = false;
1007
+ // }else{
1008
+ // item.disableFilter = true;
1009
+ // }
1181
1010
  }
1182
- else if (uniq(this.tableData.map((u) => u[item])).length > 1 || this.isTooltipActive([item])) {
1183
- enabledHeaders.push(item);
1011
+ if (item.sort) {
1012
+ if (uniq(this.tableData.map((u) => u[item.objectKey])).length > 1) {
1013
+ item.disableSort = false;
1014
+ }
1015
+ else {
1016
+ item.disableSort = true;
1017
+ }
1184
1018
  }
1185
1019
  });
1186
- this.openTooltip(tooltip, enabledHeaders);
1187
- if (window.innerWidth < 1500 && window.innerHeight < 768 && !this.annaFilterService.sliderSet.has(header[0])) {
1188
- this.columnFilterOpened.emit();
1189
- }
1190
- this.showCheckboxFilterRadioButtons = enabledHeaders.length > 1;
1191
- this.populateTooltipDataBasedOnSelectedRadio(enabledHeaders[0]);
1192
- this.bindValueFuncCalled = false;
1193
- }
1020
+ });
1194
1021
  }
1195
- openTooltip(tooltip, header) {
1196
- this.closeTooltip();
1197
- this.tooltip = tooltip;
1198
- this.tooltip.open();
1199
- //convert key into the header
1200
- this.radioButtons = header.map((key) => {
1201
- let value = this.tooltipRadioTextMap.has(key)
1202
- ? this.tooltipRadioTextMap.get(key)
1203
- : key; //change to display name
1204
- return new radioButtonModel(key, value);
1022
+ ngAfterViewInit() {
1023
+ this.annaGenericTableService.virtualScrollSubject.subscribe((val) => {
1024
+ this.isScrolledLeft = document.getElementsByClassName("table-container")[0].scrollLeft > 0;
1025
+ this.cdRef.detectChanges();
1026
+ });
1027
+ let container = document.getElementsByClassName("table-container")[0];
1028
+ fromEvent(container, 'scroll')
1029
+ .subscribe((event) => {
1030
+ this.isScrolledLeft = event.target.scrollLeft > 0;
1205
1031
  });
1206
1032
  }
1207
- clearColumnFilter() {
1208
- this.annaFilterService.clearColumnFilter();
1209
- this.toolTipdata = null;
1210
- this.tempTooltipData = null;
1211
- this.closeTooltip();
1212
- this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1213
- this.checkIfSortingIsApplied();
1214
- this.filterAppliedToTable.emit(this.tableData);
1215
- this.disableEnableEachColumnFilters();
1033
+ dataRowClicked(rowData) {
1034
+ this.rowClicked.emit(rowData);
1216
1035
  }
1217
- populateTooltipDataBasedOnSelectedRadio(header) {
1218
- this.disableSliderApplyButton = false;
1219
- this.disableCheckboxApply = false;
1220
- if (this.toolTipdata) {
1221
- this.revert();
1222
- }
1223
- this.annaFilterService.selectedRadio = header;
1224
- let selectedFilterSet = new Set(this.annaFilterService.appliedFiltersArray);
1225
- this.disableColumnClearAllBtn = selectedFilterSet.has(this.annaFilterService.selectedRadio) ? false : true;
1226
- if (this.annaFilterService.calendarSet.has(header)) {
1227
- this.getCalendarData();
1228
- }
1229
- else if (this.annaFilterService.sliderSet.has(header)) {
1230
- this.getSliderData(header);
1231
- }
1232
- else if (this.annaFilterService.timeSet.has(header)) {
1233
- this.getTimeFilterData(header);
1234
- }
1235
- else {
1236
- this.getCheckboxData(header);
1036
+ radioButtonClicked(data, action, isDisabled) {
1037
+ if (!isDisabled) {
1038
+ this.radioButtonSelected.emit({ data, action });
1237
1039
  }
1238
1040
  }
1239
- getSliderData(header) {
1240
- if (header === "Rate") {
1241
- this.annaFilterService.translateFunc = "currency";
1242
- }
1243
- else {
1244
- this.annaFilterService.translateFunc = "normal";
1245
- }
1246
- this.options = this.annaFilterService.populateSliderTooltip(this.clonedTableData, this.tableData);
1247
- this.disableSliderApplyButton = this.disableSliderApplyBtn();
1248
- let selectedTooltipObj;
1249
- if (this.annaFilterService.tooltipSelectedMap.has(header)) {
1250
- selectedTooltipObj = this.annaFilterService.tooltipSelectedMap.get(header);
1251
- }
1252
- else {
1253
- selectedTooltipObj = this.annaFilterService.initialValueMap.get(header);
1254
- }
1255
- this.sliderMinValue = selectedTooltipObj.min < this.options.floor ? this.options.floor : selectedTooltipObj.min;
1256
- this.sliderMaxValue = selectedTooltipObj.max < this.options.ceil ? selectedTooltipObj.max : this.options.ceil;
1257
- //default step values
1258
- this.options.step = 1;
1259
- this.sliderFilterTextBoxStep = "1";
1260
- if (header !== "WeekNumber") {
1261
- this.options.step = 0.1;
1262
- this.sliderFilterTextBoxStep = "0.1";
1041
+ bindTheValueToSellerGroupTooltip(sellerGroupHierarchy, tooltip) {
1042
+ if (this.hierarchyTooltip && this.hierarchyTooltip.open) {
1043
+ this.hierarchyTooltip.close();
1263
1044
  }
1045
+ this.sellerGroupHierarchy = sellerGroupHierarchy;
1046
+ this.hierarchyTooltip = tooltip;
1047
+ this.hierarchyTooltip.open();
1264
1048
  }
1265
- getCheckboxData(header) {
1266
- this.tempTooltipData = this.annaFilterService.populateTooltip(header, this.clonedTableData, this.tableData);
1267
- this.allSelected = this.annaFilterService.isAllOptionsSelected();
1268
- this.showAll = this.tempTooltipData.filter((x) => !x.isHidden).length > 1 ? true : false;
1269
- this.toolTipdata = cloneDeep(this.tempTooltipData);
1049
+ iconClicked(rowData, iconClass) {
1050
+ this.gtIconClicked.emit({ data: rowData, iconClass: iconClass });
1270
1051
  }
1271
- getCalendarData() {
1272
- const parsingFormat = "MM/DD/YYYY";
1273
- let minMaxdate = this.annaFilterService.populateDatePickerTooltipWithData(this.clonedTableData, this.tableData);
1274
- let selectedDateObj;
1275
- if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1276
- selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1277
- }
1278
- else {
1279
- selectedDateObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1280
- }
1281
- // For startDate
1282
- // selected date is less than date which we get
1283
- if ((selectedDateObj.minSelectedDate).isAfter(minMaxdate.minStartDate)) {
1284
- this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.minSelectedDate, parsingFormat);
1285
- }
1286
- else {
1287
- this.selectedMinDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
1288
- }
1289
- // For endData
1290
- // selectedDate is less than date which we get
1291
- if ((selectedDateObj.maxSelectedDate).isAfter(minMaxdate.maxEndDate)) {
1292
- this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
1293
- }
1294
- else {
1295
- this.selectedMaxDate = this.annaDateTimeFormatService.convertToNgbDate(selectedDateObj.maxSelectedDate, parsingFormat);
1052
+ svgIconClicked(rowData, key) {
1053
+ this.gtSVGIconClicked.emit({ data: rowData, key: key });
1054
+ }
1055
+ textActionClicked(rowData, id) {
1056
+ this.gtTextActionClicked.emit({ data: rowData, id });
1057
+ }
1058
+ viewDetailsClicked(rowData) {
1059
+ this.gtViewDetailClicked.emit({ data: rowData });
1060
+ }
1061
+ setIsDifference(value) {
1062
+ this.isDifferenceLessThan25Percent = value;
1063
+ }
1064
+ }
1065
+ 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 });
1066
+ AnnaNonEditableGenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaNonEditableGenericTableComponent, selector: "anna-core-non-editable-generic-table-lib", inputs: { showSkeletonLoading: "showSkeletonLoading", tableHeaders: "tableHeaders", tableData: "tableData", clonedTableData: "clonedTableData", numberOfSkeletonRows: "numberOfSkeletonRows", numberOfSkeletonColumns: "numberOfSkeletonColumns", gtGeneralConfig: "gtGeneralConfig", totalRowInfo: "totalRowInfo", gtDimension: "gtDimension", tableClass: "tableClass", maximumRowsWhichCanBeRenderedWithoutScroll: "maximumRowsWhichCanBeRenderedWithoutScroll" }, outputs: { toggleCheckbox: "toggleCheckbox", toggleRowCheckbox: "toggleRowCheckbox", toggleHeaderCheckbox: "toggleHeaderCheckbox", undoIconClicked: "undoIconClicked", filterAppliedToTable: "filterAppliedToTable", sortingAppliedToTable: "sortingAppliedToTable", rowClicked: "rowClicked", radioButtonSelected: "radioButtonSelected", columnFilterOpened: "columnFilterOpened", columnFilterClosed: "columnFilterClosed", gtIconClicked: "gtIconClicked", gtSVGIconClicked: "gtSVGIconClicked", gtTextActionClicked: "gtTextActionClicked", gtViewDetailClicked: "gtViewDetailClicked" }, viewQueries: [{ propertyName: "sortComponent", predicate: AnnaSortComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-container\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\">\r\n <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 + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [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 (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n <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=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n\r\n <i *ngIf=\"subline.objectKey == 'displayBookedAverageRating' && gtGeneralConfig.component == 'RATING' && ROW_DATA['showRatingAverageIcon'] \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n (mouseenter)=\"isDifferenceLessThan25Percent = 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=\"mdi mdi-alert-circle-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 </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>\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{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;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{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: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: ["data", "sortBy", "disableSort", "placement"], outputs: ["sort"] }, { type: i4.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["appearance", "animation", "theme", "loadingText", "count", "ariaLabel"] }, { type: i5.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i1.AnnaPayForPerformanceIconTemplateComponent, selector: "anna-pay-for-performance-icon-template", inputs: ["color", "width", "height"] }, { type: i1.AnnaLiveIconTemplateComponent, selector: "anna-live-icon-template" }, { type: i1.AnnaRejectedIconTemplateComponent, selector: "anna-rejected-icon-template" }, { type: i1.AnnaNotifyIconTemplateComponent, selector: "anna-notify-icon-template" }, { type: i1.AnnaBuyerApprovalIconTemplateComponent, selector: "anna-buyer-approval-icon-template" }, { type: i1.AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: ["width", "marginTop"] }, { type: 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", "minDate", "showDate", "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: i3.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: i5.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: i11.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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"] }], pipes: { "AnnafilterSearchedText": i1.AnnaFilterSearchedTextPipe } });
1067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, decorators: [{
1068
+ type: Component,
1069
+ 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 + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [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 (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n <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=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n\r\n <i *ngIf=\"subline.objectKey == 'displayBookedAverageRating' && gtGeneralConfig.component == 'RATING' && ROW_DATA['showRatingAverageIcon'] \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n (mouseenter)=\"isDifferenceLessThan25Percent = 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=\"mdi mdi-alert-circle-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 </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>\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{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;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{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"] }]
1070
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AnnaSortService }, { type: i1.AnnaDateTimeFormatService }, { type: i1.AnnaFilterService }, { type: i1.AnnaGenericTableService }]; }, propDecorators: { showSkeletonLoading: [{
1071
+ type: Input
1072
+ }], tableHeaders: [{
1073
+ type: Input
1074
+ }], tableData: [{
1075
+ type: Input
1076
+ }], clonedTableData: [{
1077
+ type: Input
1078
+ }], numberOfSkeletonRows: [{
1079
+ type: Input
1080
+ }], numberOfSkeletonColumns: [{
1081
+ type: Input
1082
+ }], gtGeneralConfig: [{
1083
+ type: Input
1084
+ }], totalRowInfo: [{
1085
+ type: Input
1086
+ }], gtDimension: [{
1087
+ type: Input
1088
+ }], tableClass: [{
1089
+ type: Input
1090
+ }], maximumRowsWhichCanBeRenderedWithoutScroll: [{
1091
+ type: Input
1092
+ }], toggleCheckbox: [{
1093
+ type: Output
1094
+ }], toggleRowCheckbox: [{
1095
+ type: Output
1096
+ }], toggleHeaderCheckbox: [{
1097
+ type: Output
1098
+ }], undoIconClicked: [{
1099
+ type: Output
1100
+ }], filterAppliedToTable: [{
1101
+ type: Output
1102
+ }], sortingAppliedToTable: [{
1103
+ type: Output
1104
+ }], rowClicked: [{
1105
+ type: Output
1106
+ }], radioButtonSelected: [{
1107
+ type: Output
1108
+ }], columnFilterOpened: [{
1109
+ type: Output
1110
+ }], columnFilterClosed: [{
1111
+ type: Output
1112
+ }], gtIconClicked: [{
1113
+ type: Output
1114
+ }], gtSVGIconClicked: [{
1115
+ type: Output
1116
+ }], gtTextActionClicked: [{
1117
+ type: Output
1118
+ }], gtViewDetailClicked: [{
1119
+ type: Output
1120
+ }], sortComponent: [{
1121
+ type: ViewChildren,
1122
+ args: [AnnaSortComponent]
1123
+ }] } });
1124
+
1125
+ /** Checks if the given ranges are equal. */
1126
+ function rangesEqual(r1, r2) {
1127
+ return r1.start == r2.start && r1.end == r2.end;
1128
+ }
1129
+ /**
1130
+ * Scheduler to be used for scroll events. Needs to fall back to
1131
+ * something that doesn't rely on requestAnimationFrame on environments
1132
+ * that don't support it (e.g. server-side rendering).
1133
+ */
1134
+ const SCROLL_SCHEDULER = typeof requestAnimationFrame !== "undefined"
1135
+ ? animationFrameScheduler
1136
+ : asapScheduler;
1137
+ /**
1138
+ * A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`.
1139
+ * Uses `top: #px` instead of `transform: translateY(#px)` like the cdk virtual scroll viewport does
1140
+ * which avoids flickering of elements in the transformed container with `position: sticky`.
1141
+ */
1142
+ class AnnaTableVirtualScrollViewportComponent extends CdkScrollable {
1143
+ constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, annaGtService) {
1144
+ super(elementRef, scrollDispatcher, ngZone, dir);
1145
+ this.elementRef = elementRef;
1146
+ this._changeDetectorRef = _changeDetectorRef;
1147
+ this._scrollStrategy = _scrollStrategy;
1148
+ this.annaGtService = annaGtService;
1149
+ /** Emits when the viewport is detached from a CdkVirtualForOf. */
1150
+ this._detachedSubject = new Subject();
1151
+ /** Emits when the rendered range changes. */
1152
+ this._renderedRangeSubject = new Subject();
1153
+ this._orientation = "vertical";
1154
+ // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
1155
+ // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
1156
+ // depending on how the strategy calculates the scrolled index, it may come at a cost to
1157
+ // performance.
1158
+ /** Emits when the index of the first element visible in the viewport changes. */
1159
+ this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));
1160
+ /** A stream that emits whenever the rendered range changes. */
1161
+ this.renderedRangeStream = this._renderedRangeSubject;
1162
+ /**
1163
+ * The total size of all content (in pixels), including content that is not currently rendered.
1164
+ */
1165
+ this._totalContentSize = 0;
1166
+ /** A string representing the `style.width` property value to be used for the spacer element. */
1167
+ this._totalContentWidth = "";
1168
+ /** A string representing the `style.height` property value to be used for the spacer element. */
1169
+ this._totalContentHeight = "";
1170
+ /** The currently rendered range of indices. */
1171
+ this._renderedRange = { start: 0, end: 0 };
1172
+ /** The length of the data bound to this viewport (in number of items). */
1173
+ this._dataLength = 0;
1174
+ /** The size of the viewport (in pixels). */
1175
+ this._viewportSize = 0;
1176
+ /** The last rendered content offset that was set. */
1177
+ this._renderedContentOffset = 0;
1178
+ /**
1179
+ * Whether the last rendered content offset was to the end of the content (and therefore needs to
1180
+ * be rewritten as an offset to the start of the content).
1181
+ */
1182
+ this._renderedContentOffsetNeedsRewrite = false;
1183
+ /** Whether there is a pending change detection cycle. */
1184
+ this._isChangeDetectionPending = false;
1185
+ /** A list of functions to run after the next change detection cycle. */
1186
+ this._runAfterChangeDetection = [];
1187
+ /** Subscription to changes in the viewport size. */
1188
+ this._viewportChanges = Subscription.EMPTY;
1189
+ if (!_scrollStrategy) {
1190
+ throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
1296
1191
  }
1297
- this.calendarMinEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.minStartDate, parsingFormat);
1298
- this.calendarMaxEnabledDate = this.annaDateTimeFormatService.convertToNgbDate(minMaxdate.maxEndDate, parsingFormat);
1192
+ this._viewportChanges = viewportRuler.change().subscribe(() => {
1193
+ this.checkViewportSize();
1194
+ });
1299
1195
  }
1300
- getTimeFilterData(header) {
1301
- if (this.annaFilterService.tooltipSelectedMap.has(header)) {
1302
- this.selectedFromTime = this.annaFilterService.tooltipSelectedMap.get(header).fromTime;
1303
- this.selectedToTime = this.annaFilterService.tooltipSelectedMap.get(header).toTime;
1304
- }
1305
- else {
1306
- this.selectedFromTime = this.annaFilterService.initialValueMap.get(header).fromTime;
1307
- this.selectedToTime = this.annaFilterService.initialValueMap.get(header).toTime;
1308
- }
1309
- if (this.selectedFromTime != undefined || this.selectedToTime != undefined) {
1310
- this.selectedFromTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedFromTime, true);
1311
- this.selectedToTime = this.annaDateTimeFormatService.formatToTwelveHrs(this.selectedToTime, true);
1312
- this.clonedSelectedFromTime = cloneDeep(this.selectedFromTime);
1313
- this.clonedSelectedToTime = cloneDeep(this.selectedToTime);
1314
- }
1315
- else {
1316
- this.selectedFromTime = ["-", "-", "-"];
1317
- this.selectedToTime = ["-", "-", "-"];
1318
- this.disableTimeFilterApplyBtn = true;
1319
- }
1320
- if (this.gtGeneralConfig.component === "SPOTDETAILS" || this.gtGeneralConfig.component === "EXCLUDEINVENTORYPOPUP") {
1321
- this.showMultiTimeCheckbox = false;
1322
- this.showZeroTimeCheckbox = false;
1323
- this.showEnterTimeCheckbox = false;
1324
- if (this.clonedTableData.findIndex((obj) => obj[header] == "0") != -1) {
1325
- this.showZeroTimeCheckbox = true;
1326
- this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header] == "0") != -1;
1327
- this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
1328
- }
1329
- if (this.clonedTableData.findIndex((obj) => obj[header] == "<multi>") != -1) {
1330
- this.showMultiTimeCheckbox = true;
1331
- this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header] == "<multi>") != -1;
1332
- this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
1333
- }
1334
- if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
1335
- this.showEnterTimeCheckbox = true;
1336
- }
1337
- if (this.clonedTableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1) {
1338
- this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header] != "<multi>" && obj[header] != "0") != -1;
1339
- this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
1340
- }
1196
+ /** The direction the viewport scrolls. */
1197
+ get orientation() {
1198
+ return this._orientation;
1199
+ }
1200
+ set orientation(orientation) {
1201
+ if (this._orientation !== orientation) {
1202
+ this._orientation = orientation;
1203
+ this._calculateSpacerSize();
1341
1204
  }
1342
- else if (this.gtGeneralConfig.component === "RATING") {
1343
- this.showMultiTimeCheckbox = false;
1344
- this.showZeroTimeCheckbox = false;
1345
- this.showEnterTimeCheckbox = false;
1346
- if (this.clonedTableData.findIndex((obj) => obj[header][0] == "0") != -1) {
1347
- this.showZeroTimeCheckbox = true;
1348
- this.annaFilterService.includeZeroTime = this.tableData.findIndex((obj) => obj[header][0] == "0") != -1;
1349
- this.zeroTimeCheckboxChecked = this.annaFilterService.includeZeroTime;
1350
- }
1351
- if (this.clonedTableData.findIndex((obj) => obj[header][0] == "<multi>") != -1) {
1352
- this.showMultiTimeCheckbox = true;
1353
- this.annaFilterService.includeMultiTime = this.tableData.findIndex((obj) => obj[header][0] == "<multi>") != -1;
1354
- this.multiTimeCheckboxChecked = this.annaFilterService.includeMultiTime;
1355
- }
1356
- if (this.showZeroTimeCheckbox || this.showMultiTimeCheckbox) {
1357
- this.showEnterTimeCheckbox = true;
1358
- }
1359
- if (this.clonedTableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1) {
1360
- this.annaFilterService.includeTimeRange = this.tableData.findIndex((obj) => obj[header][0] != "<multi>" && obj[header][0] != "0") != -1;
1361
- this.enterTimeCheckboxChecked = this.annaFilterService.includeTimeRange;
1362
- }
1205
+ }
1206
+ ngOnInit() {
1207
+ super.ngOnInit();
1208
+ // It's still too early to measure the viewport at this point. Deferring with a promise allows
1209
+ // the Viewport to be rendered with the correct size before we measure. We run this outside the
1210
+ // zone to avoid causing more change detection cycles. We handle the change detection loop
1211
+ // ourselves instead.
1212
+ this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
1213
+ this._measureViewportSize();
1214
+ this._scrollStrategy.attach(this);
1215
+ this.elementScrolled()
1216
+ .pipe(
1217
+ // Start off with a fake scroll event so we properly detect our initial position.
1218
+ startWith(null),
1219
+ // Collect multiple events into one until the next animation frame. This way if
1220
+ // there are multiple scroll events in the same frame we only need to recheck
1221
+ // our layout once.
1222
+ auditTime(0, SCROLL_SCHEDULER))
1223
+ .subscribe(() => { this._scrollStrategy.onContentScrolled(); this.annaGtService.virtualScrollSubject.next(true); });
1224
+ this._markChangeDetectionNeeded();
1225
+ }));
1226
+ }
1227
+ ngOnDestroy() {
1228
+ this.detach();
1229
+ this._scrollStrategy.detach();
1230
+ // Complete all subjects
1231
+ this._renderedRangeSubject.complete();
1232
+ this._detachedSubject.complete();
1233
+ this._viewportChanges.unsubscribe();
1234
+ super.ngOnDestroy();
1235
+ }
1236
+ /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */
1237
+ attach(forOf) {
1238
+ if (this._forOf) {
1239
+ throw Error("CdkVirtualScrollViewport is already attached.");
1363
1240
  }
1241
+ // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
1242
+ // changes. Run outside the zone to avoid triggering change detection, since we're managing the
1243
+ // change detection loop ourselves.
1244
+ this.ngZone.runOutsideAngular(() => {
1245
+ this._forOf = forOf;
1246
+ this._forOf.dataStream
1247
+ .pipe(takeUntil(this._detachedSubject))
1248
+ .subscribe(data => {
1249
+ const newLength = data.length;
1250
+ if (newLength !== this._dataLength) {
1251
+ this._dataLength = newLength;
1252
+ this._scrollStrategy.onDataLengthChanged();
1253
+ }
1254
+ this._doChangeDetection();
1255
+ });
1256
+ });
1364
1257
  }
1365
- selectOrUnselectMultiTimeCheckbox() {
1366
- this.multiTimeCheckboxChecked = !this.multiTimeCheckboxChecked;
1367
- this.annaFilterService.includeMultiTime = !this.annaFilterService.includeMultiTime;
1368
- this.disableTimeFilterApplyButton();
1258
+ /** Detaches the current `CdkVirtualForOf`. */
1259
+ detach() {
1260
+ this._forOf = null;
1261
+ this._detachedSubject.next();
1369
1262
  }
1370
- selectOrUnselectZeroTimeCheckbox() {
1371
- this.zeroTimeCheckboxChecked = !this.zeroTimeCheckboxChecked;
1372
- this.annaFilterService.includeZeroTime = !this.annaFilterService.includeZeroTime;
1373
- this.disableTimeFilterApplyButton();
1263
+ /** Gets the length of the data bound to this viewport (in number of items). */
1264
+ getDataLength() {
1265
+ return this._dataLength;
1374
1266
  }
1375
- selectOrUnselectEnterTimeCheckbox() {
1376
- this.enterTimeCheckboxChecked = !this.enterTimeCheckboxChecked;
1377
- this.annaFilterService.includeTimeRange = !this.annaFilterService.includeTimeRange;
1378
- this.disableTimeFilterApplyButton();
1267
+ /** Gets the size of the viewport (in pixels). */
1268
+ getViewportSize() {
1269
+ return this._viewportSize;
1379
1270
  }
1380
- disableSliderApplyBtn() {
1381
- return this.options.floor === this.options.ceil;
1271
+ // TODO(mmalerba): This is technically out of sync with what's really rendered until a render
1272
+ // cycle happens. I'm being careful to only call it after the render cycle is complete and before
1273
+ // setting it to something else, but its error prone and should probably be split into
1274
+ // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
1275
+ /** Get the current rendered range of items. */
1276
+ getRenderedRange() {
1277
+ return this._renderedRange;
1382
1278
  }
1383
- isCheckboxSelected(data) {
1384
- this.allSelected = this.annaFilterService.isCheckboxSelected(data);
1385
- if (this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected && !x.isHidden).length == 0) {
1386
- this.disableCheckboxApply = true;
1387
- }
1388
- else {
1389
- this.disableCheckboxApply = false;
1279
+ /**
1280
+ * Sets the total size of all content (in pixels), including content that is not currently
1281
+ * rendered.
1282
+ */
1283
+ setTotalContentSize(size) {
1284
+ if (this._totalContentSize !== size) {
1285
+ this._totalContentSize = size;
1286
+ this._calculateSpacerSize();
1287
+ this._markChangeDetectionNeeded();
1390
1288
  }
1391
1289
  }
1392
- minValueChanged(value) {
1393
- if (isNaN(+value)) {
1394
- this.sliderMinValue = +this.options.floor;
1290
+ /** Sets the currently rendered range of indices. */
1291
+ setRenderedRange(range) {
1292
+ if (!rangesEqual(this._renderedRange, range)) {
1293
+ this._renderedRangeSubject.next((this._renderedRange = range));
1294
+ this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());
1395
1295
  }
1396
- else {
1397
- if (+value > this.sliderMaxValue) {
1398
- this.sliderMinValue = this.sliderMaxValue;
1399
- }
1400
- else if (+value < this.options.floor) {
1401
- this.sliderMinValue = this.options.floor;
1402
- }
1403
- else {
1404
- this.sliderMinValue = +value;
1405
- }
1296
+ }
1297
+ /**
1298
+ * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).
1299
+ */
1300
+ getOffsetToRenderedContentStart() {
1301
+ return this._renderedContentOffsetNeedsRewrite
1302
+ ? null
1303
+ : this._renderedContentOffset;
1304
+ }
1305
+ /**
1306
+ * Sets the offset from the start of the viewport to either the start or end of the rendered data
1307
+ * (in pixels).
1308
+ */
1309
+ setRenderedContentOffset(offset) {
1310
+ let top = `${Number(offset)}px`;
1311
+ this._renderedContentOffset = offset;
1312
+ if (this._renderedContentTransform != top) {
1313
+ // We know this value is safe because we parse `offset` with `Number()` before passing it
1314
+ // into the string.
1315
+ this._renderedContentTransform = top;
1316
+ this._markChangeDetectionNeeded(() => {
1317
+ if (this._renderedContentOffsetNeedsRewrite) {
1318
+ this._renderedContentOffset -= this.measureRenderedContentSize();
1319
+ this._renderedContentOffsetNeedsRewrite = false;
1320
+ this.setRenderedContentOffset(this._renderedContentOffset);
1321
+ }
1322
+ else {
1323
+ this._scrollStrategy.onRenderedOffsetChanged();
1324
+ }
1325
+ });
1406
1326
  }
1407
1327
  }
1408
- maxValueChanged(value) {
1409
- if (isNaN(+value)) {
1410
- this.sliderMaxValue = +this.options.ceil;
1411
- }
1412
- else {
1413
- if (+value < this.sliderMinValue) {
1414
- this.sliderMaxValue = this.sliderMinValue;
1415
- }
1416
- else if (+value > this.options.ceil) {
1417
- this.sliderMinValue = this.options.ceil;
1418
- }
1419
- else {
1420
- this.sliderMaxValue = +value;
1421
- }
1328
+ /**
1329
+ * Scrolls to the given offset from the start of the viewport. Please note that this is not always
1330
+ * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left
1331
+ * direction, this would be the equivalent of setting a fictional `scrollRight` property.
1332
+ * @param offset The offset to scroll to.
1333
+ * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
1334
+ */
1335
+ scrollToOffset(offset, behavior = "auto") {
1336
+ const options = { behavior, top: offset };
1337
+ this.scrollTo(options);
1338
+ }
1339
+ /**
1340
+ * Scrolls to the offset for the given index.
1341
+ * @param index The index of the element to scroll to.
1342
+ * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.
1343
+ */
1344
+ scrollToIndex(index, behavior = "auto") {
1345
+ this._scrollStrategy.scrollToIndex(index, behavior);
1346
+ }
1347
+ /**
1348
+ * Gets the current scroll offset from the start of the viewport (in pixels).
1349
+ * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'
1350
+ * in horizontal mode.
1351
+ */
1352
+ // CHANGES@ANNALIB added override to functions
1353
+ measureScrollOffset(from) {
1354
+ return from
1355
+ ? super.measureScrollOffset(from)
1356
+ : super.measureScrollOffset("top");
1357
+ }
1358
+ /** Measure the combined size of all of the rendered items. */
1359
+ measureRenderedContentSize() {
1360
+ const contentEl = this._contentWrapper.nativeElement;
1361
+ return contentEl.offsetHeight;
1362
+ }
1363
+ /**
1364
+ * Measure the total combined size of the given range. Throws if the range includes items that are
1365
+ * not rendered.
1366
+ */
1367
+ measureRangeSize(range) {
1368
+ if (!this._forOf) {
1369
+ return 0;
1422
1370
  }
1371
+ return this._forOf.measureRangeSize(range, this.orientation);
1423
1372
  }
1424
- sliderValueChange() {
1425
- this.sliderValue = { min: this.sliderMinValue, max: this.sliderMaxValue };
1373
+ /** Update the viewport dimensions and re-render. */
1374
+ checkViewportSize() {
1375
+ // TODO: Cleanup later when add logic for handling content resize
1376
+ this._measureViewportSize();
1377
+ this._scrollStrategy.onDataLengthChanged();
1426
1378
  }
1427
- cancelSliderFilter() {
1428
- this.sliderValue = null;
1429
- this.closeTooltip();
1379
+ /** Measure the viewport size. */
1380
+ _measureViewportSize() {
1381
+ const viewportEl = this.elementRef.nativeElement;
1382
+ this._viewportSize = viewportEl.clientHeight;
1430
1383
  }
1431
- allOptionClicked() {
1432
- if (this.allSelected == 0 || this.allSelected == 2) {
1433
- this.allSelected = 1;
1434
- this.disableCheckboxApply = false;
1384
+ /** Queue up change detection to run. */
1385
+ _markChangeDetectionNeeded(runAfter) {
1386
+ if (runAfter) {
1387
+ this._runAfterChangeDetection.push(runAfter);
1435
1388
  }
1436
- else {
1437
- this.allSelected = 0;
1438
- this.disableCheckboxApply = true;
1389
+ // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of
1390
+ // properties sequentially we only have to run `_doChangeDetection` once at the end.
1391
+ if (!this._isChangeDetectionPending) {
1392
+ this._isChangeDetectionPending = true;
1393
+ this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
1394
+ this._doChangeDetection();
1395
+ }));
1439
1396
  }
1440
- this.annaFilterService.allOptionsClicked(this.allSelected);
1441
1397
  }
1442
- applyFilters() {
1443
- let isSame = isEqual(this.toolTipdata, this.tempTooltipData);
1444
- this.toolTipdata = cloneDeep(this.tempTooltipData);
1445
- this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
1446
- if (!isSame) {
1447
- this.annaFilterService.reOrderAppliedFiltersArray(false);
1448
- }
1449
- let tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).filter((x) => x.isSelected).map((x) => x.data);
1450
- if (tooltipSelectedDataArray.length == 0) {
1451
- tooltipSelectedDataArray = this.annaFilterService.tooltipMap.get(this.annaFilterService.selectedRadio).map((x) => x.data);
1398
+ /** Run change detection. */
1399
+ _doChangeDetection() {
1400
+ this._isChangeDetectionPending = false;
1401
+ // Apply the content transform. The transform can't be set via an Angular binding because
1402
+ // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of
1403
+ // string literals, a variable that can only be 'X' or 'Y', and user input that is run through
1404
+ // the `Number` function first to coerce it to a numeric value.
1405
+ this._contentWrapper.nativeElement.style.top = this._renderedContentTransform;
1406
+ // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
1407
+ // from the root, since the repeated items are content projected in. Calling `detectChanges`
1408
+ // instead does not properly check the projected content.
1409
+ this.ngZone.run(() => this._changeDetectorRef.markForCheck());
1410
+ const runAfterChangeDetection = this._runAfterChangeDetection;
1411
+ this._runAfterChangeDetection = [];
1412
+ for (const fn of runAfterChangeDetection) {
1413
+ fn();
1452
1414
  }
1453
- this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, tooltipSelectedDataArray);
1454
- this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1455
- this.checkIfSortingIsApplied();
1456
- this.filterAppliedToTable.emit(this.tableData);
1457
- // this.generateTableDataWrapper();
1458
- this.disableEnableEachColumnFilters();
1459
- this.closeTooltip();
1460
1415
  }
1461
- revert() {
1462
- this.tempTooltipData = cloneDeep(this.toolTipdata);
1463
- this.annaFilterService.tooltipMap.set(this.annaFilterService.selectedRadio, this.tempTooltipData);
1464
- this.toolTipdata = null;
1416
+ /** Calculates the `style.width` and `style.height` for the spacer element. */
1417
+ _calculateSpacerSize() {
1418
+ this._totalContentHeight = `${this._totalContentSize}px`;
1419
+ this._totalContentWidth = "";
1465
1420
  }
1466
- closeCheckboxFilter() {
1467
- if (this.toolTipdata) {
1468
- this.revert();
1421
+ }
1422
+ 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 });
1423
+ 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: [
1424
+ {
1425
+ provide: CdkScrollable,
1426
+ useExisting: AnnaTableVirtualScrollViewportComponent
1427
+ },
1428
+ {
1429
+ provide: CdkVirtualScrollViewport,
1430
+ useExisting: AnnaTableVirtualScrollViewportComponent
1469
1431
  }
1470
- this.closeTooltip();
1432
+ ], 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 });
1433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaTableVirtualScrollViewportComponent, decorators: [{
1434
+ type: Component,
1435
+ args: [{ selector: "anna-table-virtual-scroll-viewport", host: {
1436
+ class: "anna-table-virtual-scroll-viewport",
1437
+ "[class.anna-table-virtual-scroll-orientation-horizontal]": 'orientation === "horizontal"',
1438
+ "[class.anna-table-virtual-scroll-orientation-vertical]": 'orientation !== "horizontal"'
1439
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1440
+ {
1441
+ provide: CdkScrollable,
1442
+ useExisting: AnnaTableVirtualScrollViewportComponent
1443
+ },
1444
+ {
1445
+ provide: CdkVirtualScrollViewport,
1446
+ useExisting: AnnaTableVirtualScrollViewportComponent
1447
+ }
1448
+ ], 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"] }]
1449
+ }], ctorParameters: function () {
1450
+ return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
1451
+ type: Optional
1452
+ }, {
1453
+ type: Inject,
1454
+ args: [VIRTUAL_SCROLL_STRATEGY]
1455
+ }] }, { type: i1$1.Directionality, decorators: [{
1456
+ type: Optional
1457
+ }] }, { type: i2$1.ScrollDispatcher }, { type: i2$1.ViewportRuler }, { type: i1.AnnaGenericTableService }];
1458
+ }, propDecorators: { orientation: [{
1459
+ type: Input
1460
+ }], scrolledIndexChange: [{
1461
+ type: Output
1462
+ }], _contentWrapper: [{
1463
+ type: ViewChild,
1464
+ args: ["contentWrapper", { static: true }]
1465
+ }] } });
1466
+
1467
+ /**
1468
+ * A custom scroll strategy that accepts a static row height, static header height,
1469
+ * and a buffer size. The strategy
1470
+ */
1471
+ class AnnaFixedRowSizeTableVirtualScrollStrategy {
1472
+ constructor(rowHeight, buffer, headerHeight) {
1473
+ this._scrolledIndexChange = new Subject();
1474
+ this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());
1475
+ this.updateRowHeightAndBuffer(rowHeight, buffer, headerHeight);
1471
1476
  }
1472
- applySliderFilter() {
1473
- if (this.sliderValue) {
1474
- let selectedDataObj;
1475
- if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1476
- selectedDataObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1477
- }
1478
- else {
1479
- selectedDataObj = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1480
- }
1481
- let isSame = isEqual(selectedDataObj, this.sliderValue);
1482
- if (!isSame) {
1483
- this.annaFilterService.sliderData = { min: this.options.floor, max: this.options.ceil };
1484
- this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, this.sliderValue);
1485
- this.annaFilterService.reOrderAppliedFiltersArray(false);
1486
- this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1487
- this.checkIfSortingIsApplied();
1488
- this.filterAppliedToTable.emit(this.tableData);
1489
- // this.generateTableDataWrapper();
1490
- this.disableEnableEachColumnFilters();
1491
- }
1492
- }
1493
- this.sliderValue = null;
1494
- this.closeTooltip();
1477
+ /**
1478
+ * Attaches this scroll strategy to a viewport.
1479
+ * @param viewport The viewport to attach this strategy to.
1480
+ */
1481
+ attach(viewport) {
1482
+ this.viewport = viewport;
1483
+ this.updateTotalContentSize();
1484
+ this.updateRenderedRange();
1495
1485
  }
1496
- cancelInDateFilter() {
1497
- this.closeTooltip();
1486
+ /**
1487
+ * Detaches this scroll strategy from the currently attached viewport.
1488
+ */
1489
+ detach() {
1490
+ this._scrolledIndexChange.complete();
1491
+ this.viewport = null;
1498
1492
  }
1499
- applyDateFilter(selectedDate) {
1500
- let selectedDateObj;
1501
- if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1502
- selectedDateObj = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1503
- }
1504
- else {
1505
- selectedDateObj = cloneDeep(this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio));
1506
- }
1507
- let isStartDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate), selectedDateObj.minSelectedDate);
1508
- let isEndDateSame = isEqual(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate), selectedDateObj.maxSelectedDate);
1509
- if (!isStartDateSame || !isEndDateSame) {
1510
- selectedDateObj.minSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.fromDate));
1511
- selectedDateObj.maxSelectedDate = moment(this.annaDateTimeFormatService.convertNgbDateToMoment(selectedDate.toDate));
1512
- this.annaFilterService.flightDateRange = {
1513
- minSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMinEnabledDate)),
1514
- maxSelectedDate: moment(this.annaDateTimeFormatService.convertNgbDateToMoment(this.calendarMaxEnabledDate))
1515
- };
1516
- this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedDateObj);
1517
- this.annaFilterService.reOrderAppliedFiltersArray(false);
1518
- this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1519
- this.checkIfSortingIsApplied();
1520
- this.filterAppliedToTable.emit(this.tableData);
1521
- // this.generateTableDataWrapper();
1522
- this.disableEnableEachColumnFilters();
1523
- }
1524
- this.closeTooltip();
1493
+ onContentScrolled() {
1494
+ this.updateRenderedRange();
1525
1495
  }
1526
- applyWeekFilter(event) {
1496
+ onDataLengthChanged() {
1497
+ this.updateTotalContentSize();
1498
+ this.updateRenderedRange();
1527
1499
  }
1528
- incrementHour(arr) {
1529
- if (arr[0] == "") {
1530
- arr[0] = 1;
1531
- }
1532
- else if (parseInt(arr[0]) < 12) {
1533
- arr[0] = parseInt(arr[0]) + 1;
1534
- }
1535
- else {
1536
- arr[0] = 1;
1537
- }
1500
+ onContentRendered() {
1501
+ // This method is useful for virtual scroll strategies that measure the rendered
1502
+ // content to determine its height. This scroll strategy assumes that rows have
1503
+ // a static height, so there's no need to implement this method.
1504
+ }
1505
+ onRenderedOffsetChanged() {
1506
+ // Similar to onContentRendered, this method is useful for virtual scroll strategies
1507
+ // that need to track the offset as it changes. This scroll strategy is always able
1508
+ // to calculate the correct offset from other values, so there's no need to implement
1509
+ // this method.
1538
1510
  }
1539
- decrementHour(arr) {
1540
- if (arr[0] == "") {
1541
- arr[0] = 12;
1542
- }
1543
- else if (parseInt(arr[0]) > 1) {
1544
- arr[0] = parseInt(arr[0]) - 1;
1545
- }
1546
- else {
1547
- arr[0] = 12;
1548
- }
1511
+ scrollToIndex(index, behavior) {
1512
+ var _a;
1513
+ (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.scrollToOffset(index * this.rowHeight, behavior);
1549
1514
  }
1550
- incrementMinute(arr) {
1551
- if (arr[1] == "" || parseInt(arr[1]) == 0) {
1552
- arr[1] = 30;
1553
- }
1554
- else {
1555
- arr[1] = "00";
1556
- }
1515
+ /**
1516
+ * Update the item size and buffer size.
1517
+ * @param rowHeight The height of a row in the virtually scrolling table.
1518
+ * @param buffer The number of rows to buffer outside the viewport.
1519
+ * @param headerHeight The total height of the table header, including all header rows.
1520
+ */
1521
+ updateRowHeightAndBuffer(rowHeight, buffer, headerHeight) {
1522
+ this.rowHeight = rowHeight;
1523
+ this.buffer = buffer;
1524
+ this.headerHeight = headerHeight;
1525
+ this.updateTotalContentSize();
1526
+ this.updateRenderedRange();
1557
1527
  }
1558
- decrementMinute(arr) {
1559
- if (arr[1] == "" || parseInt(arr[1]) == 30) {
1560
- arr[1] = "00";
1561
- }
1562
- else {
1563
- arr[1] = 30;
1528
+ updateRenderedRange() {
1529
+ if (!this.viewport) {
1530
+ return;
1564
1531
  }
1532
+ const viewportSize = this.viewport.getViewportSize();
1533
+ const dataLength = this.viewport.getDataLength();
1534
+ const scrollOffset = this.viewport.measureScrollOffset();
1535
+ // the index of the first item that would be at least partially visible in the viewport
1536
+ let firstVisibleIndex = Math.floor((scrollOffset + this.headerHeight) / this.rowHeight);
1537
+ // if the buffer size is 10 but the first visible item is at, say, index 7
1538
+ // then the buffered items must be 7, because we don't have 10 items available to buffer.
1539
+ const bufferedItems = Math.min(AnnaFilterService.bufferSize, firstVisibleIndex);
1540
+ const itemsInViewport = Math.ceil(viewportSize / this.rowHeight);
1541
+ const itemsToRender = itemsInViewport + this.buffer;
1542
+ // Clamp the new range between 0 and dataLength
1543
+ const newStart = Math.max(0, firstVisibleIndex - bufferedItems);
1544
+ const newEnd = Math.min(dataLength, firstVisibleIndex + itemsToRender);
1545
+ const newRange = {
1546
+ start: newStart,
1547
+ end: newEnd
1548
+ };
1549
+ const newOffset = this.rowHeight * (firstVisibleIndex - bufferedItems);
1550
+ this.viewport.setRenderedContentOffset(newOffset);
1551
+ this.viewport.setRenderedRange(newRange);
1552
+ this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));
1565
1553
  }
1566
- changeStartTimeHour(increment) {
1567
- if (increment) {
1568
- this.incrementHour(this.selectedFromTime);
1569
- }
1570
- else {
1571
- this.decrementHour(this.selectedFromTime);
1572
- }
1573
- this.disableTimeFilterApplyButton();
1554
+ updateTotalContentSize() {
1555
+ var _a;
1556
+ (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.setTotalContentSize(this.viewport.getDataLength() * this.rowHeight);
1574
1557
  }
1575
- changeEndTimeHour(increment) {
1576
- if (increment) {
1577
- this.incrementHour(this.selectedToTime);
1578
- }
1579
- else {
1580
- this.decrementHour(this.selectedToTime);
1581
- }
1582
- this.disableTimeFilterApplyButton();
1558
+ }
1559
+ /**
1560
+ * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created
1561
+ * `FixedSizeVirtualScrollStrategy` from the given directive.
1562
+ * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the
1563
+ * `FixedSizeVirtualScrollStrategy` from.
1564
+ */
1565
+ function fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {
1566
+ return fixedSizeDir.scrollStrategy;
1567
+ }
1568
+ class AnnaFixedRowSizeTableVirtualScrollStrategyDirective {
1569
+ constructor() {
1570
+ this._rowHeight = 30;
1571
+ this._headerRowHeight = 30;
1572
+ this._buffer = 20;
1573
+ this._headerRows = null;
1574
+ this.headerRowCount = 1;
1575
+ /** The scroll strategy used by this directive. */
1576
+ this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
1583
1577
  }
1584
- changeEndTimeMinute(increment) {
1585
- if (increment) {
1586
- this.incrementMinute(this.selectedToTime);
1587
- }
1588
- else {
1589
- this.decrementMinute(this.selectedToTime);
1590
- }
1591
- this.disableTimeFilterApplyButton();
1578
+ /** The height of rows in the table (in pixels). Defaults to 30. */
1579
+ set rowHeight(value) { this._rowHeight = coerceNumberProperty(value); }
1580
+ get rowHeight() { return this._rowHeight; }
1581
+ /**
1582
+ * The height of header rows in the table (in pixels). Defaults to 30.
1583
+ */
1584
+ set headerRowHeight(value) { this._headerRowHeight = coerceNumberProperty(value); }
1585
+ get headerRowHeight() { return this._headerRowHeight; }
1586
+ /**
1587
+ * The number of buffered rows rendered beyond the viewport.
1588
+ * If the number of buffered rows dips below this number, more rows will be rendered. Defaults to 20.
1589
+ */
1590
+ set buffer(value) {
1591
+ this._buffer = coerceNumberProperty(value);
1592
1592
  }
1593
- changeStartTimeMinute(increment) {
1594
- if (increment) {
1595
- this.incrementMinute(this.selectedFromTime);
1593
+ get buffer() { return this._buffer; }
1594
+ set headerRows(value) { this._headerRows = coerceNumberProperty(value, undefined); }
1595
+ get headerRows() { return this._headerRows; }
1596
+ ngOnChanges(change) {
1597
+ var _a, _b;
1598
+ if (this.headerRows != undefined || this.headerRowsQuery) {
1599
+ this.handleChange();
1596
1600
  }
1597
- else {
1598
- this.decrementMinute(this.selectedFromTime);
1601
+ if (((_a = change['buffer']) === null || _a === void 0 ? void 0 : _a.previousValue) != ((_b = change['buffer']) === null || _b === void 0 ? void 0 : _b.currentValue)) {
1602
+ AnnaFilterService.bufferSize = this.buffer;
1603
+ this.scrollStrategy = new AnnaFixedRowSizeTableVirtualScrollStrategy(this.rowHeight, this.buffer, this.headerRowHeight * this.headerRowCount);
1599
1604
  }
1600
- this.disableTimeFilterApplyButton();
1601
1605
  }
1602
- applyTimeFilters() {
1603
- let fromTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
1604
- let fromTime24HrFormat = fromTime24HrFormatArr[0] + ":" + fromTime24HrFormatArr[1] + ":00";
1605
- let toTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
1606
- let toTime24HrFormat = toTime24HrFormatArr[0] + ":" + toTime24HrFormatArr[1] + ":00";
1607
- let previousSelectedData;
1608
- if (this.annaFilterService.tooltipSelectedMap.has(this.annaFilterService.selectedRadio)) {
1609
- previousSelectedData = this.annaFilterService.tooltipSelectedMap.get(this.annaFilterService.selectedRadio);
1610
- }
1611
- else {
1612
- previousSelectedData = this.annaFilterService.initialValueMap.get(this.annaFilterService.selectedRadio);
1613
- }
1614
- let selectedData = {
1615
- fromTime: fromTime24HrFormat, toTime: toTime24HrFormat, includeMulti: this.annaFilterService.includeMultiTime,
1616
- includeZero: this.annaFilterService.includeZeroTime, includeTimeRange: this.annaFilterService.includeTimeRange
1617
- };
1618
- if (!isEqual(previousSelectedData, selectedData)) {
1619
- this.annaFilterService.tooltipSelectedMap.set(this.annaFilterService.selectedRadio, selectedData);
1620
- this.annaFilterService.reOrderAppliedFiltersArray(false);
1621
- this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1622
- this.checkIfSortingIsApplied();
1623
- this.filterAppliedToTable.emit(this.tableData);
1624
- // this.generateTableDataWrapper();
1625
- this.disableEnableEachColumnFilters();
1626
- }
1627
- this.closeTooltip();
1606
+ ngAfterContentInit() {
1607
+ this.headerRowsQuery.changes.subscribe(() => {
1608
+ this.handleChange();
1609
+ });
1628
1610
  }
1629
- closeTimeFilter() {
1630
- this.selectedFromTime = cloneDeep(this.clonedSelectedFromTime);
1631
- this.selectedToTime = cloneDeep(this.clonedSelectedToTime);
1632
- this.closeTooltip();
1611
+ handleChange() {
1612
+ var _a;
1613
+ this.scrollStrategy.updateRowHeightAndBuffer(this.rowHeight, this.buffer,
1614
+ // Use the explicit headerRows input value if set.
1615
+ // Otherwise, fall back to the QueryList length.
1616
+ this.headerRowHeight * ((_a = this._headerRows) !== null && _a !== void 0 ? _a : this.headerRowsQuery.length));
1633
1617
  }
1634
- disableTimeFilterApplyButton() {
1635
- let timeFormat = "HH:mm:ss";
1636
- let startTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedFromTime[0] + ":" + this.selectedFromTime[1] + " " + this.selectedFromTime[2], true);
1637
- let startTime24HrFormat = startTime24HrFormatArr[0] + ":" + startTime24HrFormatArr[1] + ":00";
1638
- let endTime24HrFormatArr = this.annaDateTimeFormatService.convertTotwentyFourHrsFormat(this.selectedToTime[0] + ":" + this.selectedToTime[1] + " " + this.selectedToTime[2], true);
1639
- let endTime24HrFormat = endTime24HrFormatArr[0] + ":" + endTime24HrFormatArr[1] + ":00";
1640
- this.disableTimeFilterApplyBtn = moment(startTime24HrFormat, timeFormat).isAfter(moment(endTime24HrFormat, timeFormat));
1641
- if (!this.multiTimeCheckboxChecked && !this.zeroTimeCheckboxChecked && !this.enterTimeCheckboxChecked) {
1642
- this.disableTimeFilterApplyBtn = true;
1618
+ }
1619
+ AnnaFixedRowSizeTableVirtualScrollStrategyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1620
+ 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: [
1621
+ {
1622
+ provide: VIRTUAL_SCROLL_STRATEGY,
1623
+ useFactory: fixedSizeVirtualScrollStrategyFactory,
1624
+ deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
1643
1625
  }
1626
+ ], queries: [{ propertyName: "headerRowsQuery", predicate: MatHeaderRowDef }], usesOnChanges: true, ngImport: i0 });
1627
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, decorators: [{
1628
+ type: Directive,
1629
+ args: [{
1630
+ selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]",
1631
+ providers: [
1632
+ {
1633
+ provide: VIRTUAL_SCROLL_STRATEGY,
1634
+ useFactory: fixedSizeVirtualScrollStrategyFactory,
1635
+ deps: [forwardRef(() => AnnaFixedRowSizeTableVirtualScrollStrategyDirective)]
1636
+ }
1637
+ ]
1638
+ }]
1639
+ }], propDecorators: { rowHeight: [{
1640
+ type: Input
1641
+ }], headerRowHeight: [{
1642
+ type: Input
1643
+ }], buffer: [{
1644
+ type: Input
1645
+ }], headerRows: [{
1646
+ type: Input
1647
+ }], headerRowsQuery: [{
1648
+ type: ContentChildren,
1649
+ args: [MatHeaderRowDef]
1650
+ }] } });
1651
+
1652
+ /**
1653
+ * Directive that wraps a given data source in a "virtual" data source that emits
1654
+ * the slice of the original data source that matches the range that should be rendered
1655
+ * in the containing virtual scroll viewport.
1656
+ */
1657
+ class AnnaVirtualTableDirective {
1658
+ constructor(elementRef, viewport, table, ngZone, _coalescedStyleScheduler) {
1659
+ this.viewport = viewport;
1660
+ this.table = table;
1661
+ this._coalescedStyleScheduler = _coalescedStyleScheduler;
1662
+ this.virtualizedDataStream = new Subject();
1663
+ this.dataSourceChanges = new Subject();
1664
+ /** The raw, unvirtualized data stream. Emits whenever the data in the current DataSource changes. */
1665
+ this.dataStream = this.dataSourceChanges
1666
+ .pipe(
1667
+ // Start off with null data source.
1668
+ startWith(null),
1669
+ // Bundle up the previous and current data sources so we can work with both.
1670
+ pairwise(),
1671
+ // Use `changeDataSource` to disconnect from the previous data source and connect to the
1672
+ // new one, passing back a stream of data changes which we run through `switchMap` to give
1673
+ // us a data stream that emits the latest data from whatever the current data source is.
1674
+ switchMap(([prev, cur]) => this.changeDataSource(prev, cur)),
1675
+ // Replay the last emitted data when someone subscribes.
1676
+ shareReplay(1));
1677
+ this.viewChange = new Subject();
1678
+ this.destroyed$ = new Subject();
1679
+ this.renderedRange = { start: 0, end: 0 };
1680
+ this.isNativeHtmlTable = false;
1681
+ table.dataSource = this.virtualizedDataStream;
1682
+ this.isNativeHtmlTable = elementRef.nativeElement.tagName === 'TABLE';
1683
+ this.dataStream.subscribe(data => {
1684
+ this.data = data;
1685
+ this.onRenderedDataChange();
1686
+ });
1687
+ viewport.renderedRangeStream.pipe(takeUntil(this.destroyed$)).subscribe((range) => {
1688
+ this.renderedRange = range;
1689
+ ngZone.run(() => this.viewChange.next(range));
1690
+ this.onRenderedDataChange();
1691
+ });
1692
+ viewport.attach(this);
1644
1693
  }
1645
- sortedData(event) {
1646
- if (event.type == "none") {
1647
- this.tableData = this.annaFilterService.filterData(this.clonedTableData, "");
1694
+ set dataSource(value) {
1695
+ this._dataSource = value;
1696
+ if (isDataSource(value)) {
1697
+ this.dataSourceChanges.next(value);
1648
1698
  }
1649
1699
  else {
1650
- this.tableData = event.data;
1651
- }
1652
- this.sortingAppliedToTable.emit(this.tableData);
1653
- // this.generateTableDataWrapper();
1654
- }
1655
- checkIfSortingIsApplied() {
1656
- let appliedkey;
1657
- let isAsc;
1658
- const arr = this.sortComponent.toArray();
1659
- let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByAsc, true);
1660
- appliedkey = obj.key;
1661
- isAsc = obj.setValueTo;
1662
- if (!appliedkey) {
1663
- let obj = this.annaSortService.checkIfSortingIsApplied(this.annaSortService.sortByDesc, false);
1664
- appliedkey = obj.key;
1665
- isAsc = obj.setValueTo;
1666
- }
1667
- if (appliedkey) {
1668
- this.applySorting(arr, appliedkey, isAsc);
1700
+ this.dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));
1669
1701
  }
1670
1702
  }
1671
- applySorting(sortComponentArr, appliedKey, isAsc) {
1672
- sortComponentArr.forEach((component) => {
1673
- if (component.sortBy === appliedKey) {
1674
- this.setSortComponentDataProperty(component);
1675
- isAsc ? component.sortByAscending() : component.sortByDescending();
1676
- }
1677
- });
1678
- }
1679
- setSortComponentDataProperty(sortComponent) {
1680
- sortComponent.data = this.tableData;
1681
- sortComponent.clonedData = cloneDeep(this.tableData);
1703
+ get dataSource() {
1704
+ return this._dataSource;
1682
1705
  }
1683
- disableEnableEachColumnFilters() {
1684
- this.tableHeaders.forEach(header => {
1685
- header.headerInfo.forEach(item => {
1686
- if (item.filter != "") {
1687
- let values = [];
1688
- item.disableFilter = true;
1689
- item.filterObjectKeys.forEach(key => {
1690
- if (key == "period") {
1691
- let uniqStartDate = uniq(this.tableData.map((u) => u["startDate"]));
1692
- let uniqEndDate = uniq(this.tableData.map((u) => u["endDate"]));
1693
- item.disableFilter = (uniqStartDate.length > 1 || uniqEndDate.length > 1) ? false : true;
1694
- }
1695
- else {
1696
- values = this.tableData.map((u) => u[key]);
1697
- if (uniq(values).filter(n => n != null).length > 1) {
1698
- item.disableFilter = false;
1699
- }
1700
- }
1701
- });
1702
- // if(uniq(values).length > 1){
1703
- // item.disableFilter = false;
1704
- // }else{
1705
- // item.disableFilter = true;
1706
- // }
1706
+ ngOnInit() {
1707
+ // 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.
1708
+ // This removes the need to account for the translation in the `top` of the sticky header rows.
1709
+ if (this.viewport instanceof AnnaTableVirtualScrollViewportComponent) {
1710
+ return;
1711
+ }
1712
+ this.viewport.scrolledIndexChange
1713
+ .pipe(map$1(() => this.viewport.getOffsetToRenderedContentStart()), takeUntil(this.destroyed$))
1714
+ .subscribe((offset) => {
1715
+ // We need to set the `style.top` property of the sticky header rows
1716
+ // to the negative value of the virtual scroll viewport's offset, so
1717
+ // make the offset negative.
1718
+ offset = -offset;
1719
+ const stickyStates = this.headerRowDefs.map(rowDef => rowDef.sticky);
1720
+ // This logic is exactly the same as what's in the StickyStyler (literally copy + paste).
1721
+ // The only difference is that the `stickyOffset` variable starts at the virtual scroll
1722
+ // viewport container's offset instead of starting at zero.
1723
+ const rows = this.table._getRenderedRows(this.table._headerRowOutlet);
1724
+ const stickyOffsets = [];
1725
+ const stickyCellHeights = [];
1726
+ const elementsToStick = [];
1727
+ for (let rowIndex = 0, stickyOffset = offset; rowIndex < rows.length; rowIndex++) {
1728
+ stickyOffsets[rowIndex] = stickyOffset;
1729
+ if (!stickyStates[rowIndex]) {
1730
+ continue;
1707
1731
  }
1708
- if (item.sort) {
1709
- if (uniq(this.tableData.map((u) => u[item.objectKey])).length > 1) {
1710
- item.disableSort = false;
1732
+ const row = rows[rowIndex];
1733
+ elementsToStick[rowIndex] = this.isNativeHtmlTable ? Array.from(row.children) : [row];
1734
+ const height = row.getBoundingClientRect().height;
1735
+ stickyOffset += height;
1736
+ stickyCellHeights[rowIndex] = height;
1737
+ }
1738
+ // Using the CoalescedStyleScheduler here is optional. It'll work without it,
1739
+ // and CoalescedStyleScheduler is not public (yet?), so feel free to remove it.
1740
+ this._coalescedStyleScheduler.schedule(() => {
1741
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
1742
+ if (!stickyStates[rowIndex]) {
1743
+ continue;
1711
1744
  }
1712
- else {
1713
- item.disableSort = true;
1745
+ for (const element of elementsToStick[rowIndex]) {
1746
+ element.style.top = `${stickyOffsets[rowIndex]}px`;
1714
1747
  }
1715
1748
  }
1716
1749
  });
1717
1750
  });
1718
1751
  }
1719
- ngAfterViewInit() {
1720
- this.annaGenericTableService.virtualScrollSubject.subscribe((val) => {
1721
- this.isScrolledLeft = document.getElementsByClassName("anna-table-virtual-scroll-viewport")[0].scrollLeft > 0;
1722
- this.cdRef.detectChanges();
1723
- });
1724
- }
1725
- dataRowClicked(rowData) {
1726
- this.rowClicked.emit(rowData);
1727
- }
1728
- radioButtonClicked(data, action, isDisabled) {
1729
- if (!isDisabled) {
1730
- this.radioButtonSelected.emit({ data, action });
1731
- }
1752
+ ngOnDestroy() {
1753
+ this.destroyed$.next();
1754
+ this.dataSourceChanges.complete();
1755
+ this.virtualizedDataStream.complete();
1732
1756
  }
1733
- bindTheValueToSellerGroupTooltip(sellerGroupHierarchy, tooltip) {
1734
- if (this.hierarchyTooltip && this.hierarchyTooltip.open) {
1735
- this.hierarchyTooltip.close();
1757
+ /** React to scroll state changes in the viewport. */
1758
+ onRenderedDataChange() {
1759
+ if (!this.renderedRange) {
1760
+ return;
1736
1761
  }
1737
- this.sellerGroupHierarchy = sellerGroupHierarchy;
1738
- this.hierarchyTooltip = tooltip;
1739
- this.hierarchyTooltip.open();
1740
- }
1741
- iconClicked(rowData, iconClass) {
1742
- this.gtIconClicked.emit({ data: rowData, iconClass: iconClass });
1743
- }
1744
- svgIconClicked(rowData, key) {
1745
- this.gtSVGIconClicked.emit({ data: rowData, key: key });
1762
+ this.renderedItems = this.data.slice(this.renderedRange.start, this.renderedRange.end + 1);
1763
+ // delegate rendering to the table by emitting from the virtualizedDataStream
1764
+ this.virtualizedDataStream.next(this.renderedItems);
1746
1765
  }
1747
- textActionClicked(rowData, id) {
1748
- this.gtTextActionClicked.emit({ data: rowData, id });
1766
+ /** Swap out one data source for another. */
1767
+ changeDataSource(oldDataSource, newDs) {
1768
+ oldDataSource === null || oldDataSource === void 0 ? void 0 : oldDataSource.disconnect(this);
1769
+ return newDs ? newDs.connect(this) : of();
1749
1770
  }
1750
- viewDetailsClicked(rowData) {
1751
- this.gtViewDetailClicked.emit({ data: rowData });
1771
+ /**
1772
+ * This method is only used by the experimental AutoSizeVirtualScrollStrategy.
1773
+ * We're not using that strategy, but I've implemented it just to show how it oculd be done.
1774
+ * I'm not actually sure if this works.
1775
+ */
1776
+ measureRangeSize(range, orientation) {
1777
+ if (orientation === 'horizontal' || range.end < range.start) {
1778
+ // virtual scrolling columns are not supported by this directive
1779
+ return 0;
1780
+ }
1781
+ const renderedBodyRows = this.table._getRenderedRows(this.table._rowOutlet);
1782
+ const firstRow = renderedBodyRows[range.start];
1783
+ const lastRow = renderedBodyRows[range.end];
1784
+ if (!firstRow || !lastRow) {
1785
+ return 0;
1786
+ }
1787
+ // We need to include all header and footer rows in the sum, since they're always rendered
1788
+ const renderedHeaderRows = this.table._getRenderedRows(this.table._headerRowOutlet);
1789
+ const renderedFooterRows = this.table._getRenderedRows(this.table._footerRowOutlet);
1790
+ // 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?
1791
+ const headerHeight = renderedHeaderRows.reduce((sum, row) => {
1792
+ return sum += row.getBoundingClientRect().height;
1793
+ }, 0);
1794
+ const footerHeight = renderedFooterRows.reduce((sum, row) => {
1795
+ return sum += row.getBoundingClientRect().height;
1796
+ }, 0);
1797
+ const bodyHeight = lastRow.getBoundingClientRect().bottom - firstRow.getBoundingClientRect().top;
1798
+ return headerHeight + footerHeight + bodyHeight;
1752
1799
  }
1753
1800
  }
1754
- AnnaNonEditableGenericTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.AnnaSortService }, { token: i1.AnnaDateTimeFormatService }, { token: i1.AnnaFilterService }, { token: i1.AnnaGenericTableService }], target: i0.ɵɵFactoryTarget.Component });
1755
- AnnaNonEditableGenericTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AnnaNonEditableGenericTableComponent, selector: "anna-core-non-editable-generic-table-lib", inputs: { showSkeletonLoading: "showSkeletonLoading", tableHeaders: "tableHeaders", tableData: "tableData", clonedTableData: "clonedTableData", numberOfSkeletonRows: "numberOfSkeletonRows", numberOfSkeletonColumns: "numberOfSkeletonColumns", gtGeneralConfig: "gtGeneralConfig", totalRowInfo: "totalRowInfo", gtDimension: "gtDimension", tableClass: "tableClass", maximumRowsWhichCanBeRenderedWithoutScroll: "maximumRowsWhichCanBeRenderedWithoutScroll" }, outputs: { toggleCheckbox: "toggleCheckbox", toggleRowCheckbox: "toggleRowCheckbox", toggleHeaderCheckbox: "toggleHeaderCheckbox", undoIconClicked: "undoIconClicked", filterAppliedToTable: "filterAppliedToTable", sortingAppliedToTable: "sortingAppliedToTable", rowClicked: "rowClicked", radioButtonSelected: "radioButtonSelected", columnFilterOpened: "columnFilterOpened", columnFilterClosed: "columnFilterClosed", gtIconClicked: "gtIconClicked", gtSVGIconClicked: "gtSVGIconClicked", gtTextActionClicked: "gtTextActionClicked", gtViewDetailClicked: "gtViewDetailClicked" }, viewQueries: [{ propertyName: "sortComponent", predicate: AnnaSortComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-container\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\">\r\n <anna-table-virtual-scroll-viewport\r\n [buffer]=\"gtGeneralConfig.bufferSize\"\r\n [rowHeight]=\"gtDimension.rowHeight\"\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [appVirtualDataSource]=\"tableData\">\r\n <tr\r\n class=\"header-row\"\r\n mat-header-row\r\n *matHeaderRowDef=\"tableColumns; sticky: true\"\r\n [style.height.px]=\"gtDimension.headerHeight\"\r\n ></tr>\r\n <tr\r\n class=\"total-row\"\r\n mat-header-row\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n *matHeaderRowDef=\"totalRowColumns; sticky: true\"\r\n [class.hidden]=\"\r\n showSkeletonLoading ||\r\n (!showSkeletonLoading && !tableData.length) ||\r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n {{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </anna-table-virtual-scroll-viewport>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;top:0;border-top:none!important;border-bottom:none!important;outline:none!important;box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4}:host ::ng-deep .gt thead tr th br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt thead tr th div.row{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}:host ::ng-deep .gt thead tr th div.sort-filter-container{display:flex;flex-wrap:nowrap;align-items:center}:host ::ng-deep .gt thead tr th:first-of-type{box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4,inset 1px 0 #d4d4d4}:host ::ng-deep .gt tbody tr td:first-of-type{box-shadow:inset 1px 0 #d4d4d4,inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td:nth-of-type(n + 2){box-shadow:inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td .upper-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#000;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr td .lower-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#a7a7a7;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt tbody tr:nth-of-type(1) td{border-top:none!important}:host ::ng-deep .gt .custom-column-checkbox-checked,:host ::ng-deep .gt .custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}:host ::ng-deep .gt .custom-column-checkbox-checked{color:#268bff}:host ::ng-deep .gt .custom-column-checkbox-unchecked{color:#4a4a4a}anna-table-virtual-scroll-viewport::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}anna-table-virtual-scroll-viewport::-webkit-scrollbar{width:5px;height:5px}anna-table-virtual-scroll-viewport::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0006!important;border:1px solid rgba(0,0,0,.2)}.table-container{overflow-x:auto;overflow-y:auto}.rowSelectCheckbox,#selectAllRowsCheckbox{cursor:pointer}.disable-checkbox{color:#dedede!important;pointer-events:none!important}.mdi-warning{color:#f3c639;font-size:16px;line-height:28px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1}.redcolor-status{color:#c62a2a}.redcolor-cell-border{outline:1px solid #ff5353!important;outline-offset:-1px!important}#no-filter-space{width:.875rem}::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:1.875rem!important;width:2.625rem;padding:0 .625rem}input.numberInput{margin-right:-.8125rem;padding:0 0 0 .625rem;height:1.875rem}::ng-deep .mat-button-toggle-checked{background-color:#268bff!important;color:#fff!important}::ng-deep .mat-button-toggle-group-appearance-standard{border-radius:0}.hidden{display:none}.no-data-div{margin-top:2.5px}.no-data-div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:.3125rem 1.125rem;border-radius:.25rem}.column-values:nth-of-type(2){color:#a7a7a7!important}.custom-column-checkbox-checked,.custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}.custom-column-checkbox-checked{color:#268bff}.custom-column-checkbox-unchecked{color:#4a4a4a}.time-filter-checkboxes>div>p{color:#151b1e}.radio-button-dimension,::ng-deep .markForCredit .mat-radio-inner-circle,::ng-deep .markForCredit .mat-radio-outer-circle,::ng-deep .mark-for-credit .mat-radio-inner-circle,::ng-deep .mark-for-credit .mat-radio-outer-circle,::ng-deep .markForMakeGood .mat-radio-inner-circle,::ng-deep .markForMakeGood .mat-radio-outer-circle,::ng-deep .noAction .mat-radio-inner-circle,::ng-deep .noAction .mat-radio-outer-circle,::ng-deep .credit .mat-radio-inner-circle,::ng-deep .credit .mat-radio-outer-circle,::ng-deep .approve .mat-radio-inner-circle,::ng-deep .approve .mat-radio-outer-circle,::ng-deep .reject .mat-radio-inner-circle,::ng-deep .reject .mat-radio-outer-circle,::ng-deep .resubmit .mat-radio-inner-circle,::ng-deep .resubmit .mat-radio-outer-circle,::ng-deep .rejectCreditRequest .mat-radio-inner-circle,::ng-deep .rejectCreditRequest .mat-radio-outer-circle{height:18px!important;width:18px!important}::ng-deep .margin-bottom-zero .mat-radio-label{margin-bottom:0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:red}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:red}::ng-deep .mat-radio-button.mat-radio-disabled .mat-radio-outer-circle{border-color:#00000061!important}::ng-deep .mat-radio-button.mat-radio-disabled.mat-radio-checked .mat-radio-inner-circle{background-color:#00000061!important}::ng-deep tr.white-background-row{background:white}::ng-deep tr.gray-background-row{background:rgba(233,233,233,.5)}.remarks-tooltip,.seller-tooltip{font-size:.875rem;color:#268bff;position:relative;top:.1875rem;cursor:pointer}.seller-tooltip{float:right}::ng-deep .remarks-info-tooltip .tooltip-inner{max-width:19.25rem!important}.rating-icon,.lur-violation-icon{color:#268bff;cursor:pointer;margin-left:2px;position:relative;left:-2px}::ng-deep .rating-info-tooltip .tooltip-inner{max-width:800px!important}p.first-row{padding:.5rem .5rem 0;color:#000;white-space:nowrap;text-align:left}p.second-row{padding:2px .5rem .5rem;color:#000;white-space:nowrap;text-align:left}::ng-deep .gt-total-row-tooltip{opacity:1!important}::ng-deep .gt-total-row-tooltip .tooltip-inner{color:#000;box-shadow:0 6px 10px #0000004d,0 2px 2px #0003;background-color:#fff;padding:4px!important;width:100%;border-radius:2px!important}::ng-deep .gt-total-row-tooltip .arrow:before{border-top-color:#fff!important}.info-label{margin-left:4px;color:#268bff;vertical-align:text-top}::ng-deep .hierarchy-tooltip .tooltip-inner{padding:4px!important}table.seller-hierarchy-table{table-layout:fixed;margin:.625rem .625rem .625rem .8125rem}table.seller-hierarchy-table tr th{font-family:Roboto;font-size:.75rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.67;letter-spacing:normal;color:#5e5e5e;white-space:nowrap;background:#ededed;box-shadow:none!important;border-top:1px solid #d4d4d4}table.seller-hierarchy-table tr th:first-of-type,table.seller-hierarchy-table tr td:first-of-type{border-left:1px solid #d4d4d4}table.seller-hierarchy-table tr th:last-of-type,table.seller-hierarchy-table tr td:last-of-type{border-right:1px solid #d4d4d4;width:7.875rem!important}table.seller-hierarchy-table tr th:nth-of-type(2){width:7.75rem!important}table.seller-hierarchy-table tr td{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;box-shadow:none!important;border-top:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4}table.seller-hierarchy-table tr td:nth-of-type(2),table.seller-hierarchy-table tr td:nth-of-type(3){padding-top:.25rem}table.seller-hierarchy-table tr td span{display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}\n"], components: [{ type: AnnaTableVirtualScrollViewportComponent, selector: "anna-table-virtual-scroll-viewport", inputs: ["orientation"], outputs: ["scrolledIndexChange"] }, { type: i3$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i3$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i3$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: AnnaSortComponent, selector: "anna-core-sort-lib", inputs: ["data", "sortBy", "disableSort", "placement"], outputs: ["sort"] }, { type: i5.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["appearance", "animation", "theme", "loadingText", "count", "ariaLabel"] }, { type: i6.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i1.AnnaPayForPerformanceIconTemplateComponent, selector: "anna-pay-for-performance-icon-template", inputs: ["color", "width", "height"] }, { type: i1.AnnaLiveIconTemplateComponent, selector: "anna-live-icon-template" }, { type: i1.AnnaRejectedIconTemplateComponent, selector: "anna-rejected-icon-template" }, { type: i1.AnnaNotifyIconTemplateComponent, selector: "anna-notify-icon-template" }, { type: i1.AnnaBuyerApprovalIconTemplateComponent, selector: "anna-buyer-approval-icon-template" }, { type: i1.AnnaNoDataComponent, selector: "anna-core-no-data-lib", inputs: ["width", "marginTop"] }, { type: i7.ɵa, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { type: i8.AnnaCalendarFilterComponent, selector: "anna-core-calendar-filter-lib", inputs: ["maxDate", "minDate", "showDate", "selectedFromDate", "selectedToDate"], outputs: ["selectedDate", "apply", "cancel"] }, { type: i8.AnnaWeekCalendarComponent, selector: "anna-core-week-calendar-filter-lib", inputs: ["from-date", "to-date", "disabled-dates", "maxDate", "minDate", "week-calendar-config"], outputs: ["apply", "toggle-calendar"] }, { type: i9.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }], directives: [{ type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: AnnaFixedRowSizeTableVirtualScrollStrategyDirective, selector: "cdk-virtual-scroll-viewport[rowHeight], anna-table-virtual-scroll-viewport[rowHeight]", inputs: ["rowHeight", "headerRowHeight", "buffer", "headerRows"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: AnnaVirtualTableDirective, selector: "[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]", inputs: ["appVirtualDataSource"] }, { type: i3$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i3$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i3$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i3$1.MatCellDef, selector: "[matCellDef]" }, { type: i3$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i10.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i10.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i14.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i14.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i10.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i14.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i14.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i14.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i9.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], pipes: { "AnnafilterSearchedText": i1.AnnaFilterSearchedTextPipe } });
1756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaNonEditableGenericTableComponent, decorators: [{
1757
- type: Component,
1758
- args: [{ selector: 'anna-core-non-editable-generic-table-lib', template: "<div class=\"table-container\" [ngClass]=\"{ 'scroll-left-shadow-effect': isScrolledLeft }\">\r\n <anna-table-virtual-scroll-viewport\r\n [buffer]=\"gtGeneralConfig.bufferSize\"\r\n [rowHeight]=\"gtDimension.rowHeight\"\r\n [class]=\"gtGeneralConfig.tableContainerName\"\r\n [ngStyle]=\"{\r\n height:\r\n tableData.length < maximumRowsWhichCanBeRenderedWithoutScroll\r\n ? 'calc(' +\r\n ((gtDimension.rowHeight + rowBorderWidth) * tableData.length +\r\n (!tableData.length || !gtGeneralConfig.totalRow\r\n ? gtDimension.headerHeight\r\n : gtDimension.headerHeight + gtDimension.rowHeight + (2 * rowBorderWidth))) +\r\n 'px)'\r\n : gtDimension.tableHeight\r\n }\"\r\n >\r\n <table class=\"gt\" [ngClass]=\"tableClass\" mat-table [appVirtualDataSource]=\"tableData\">\r\n <tr\r\n class=\"header-row\"\r\n mat-header-row\r\n *matHeaderRowDef=\"tableColumns; sticky: true\"\r\n [style.height.px]=\"gtDimension.headerHeight\"\r\n ></tr>\r\n <tr\r\n class=\"total-row\"\r\n mat-header-row\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n *matHeaderRowDef=\"totalRowColumns; sticky: true\"\r\n [class.hidden]=\"\r\n showSkeletonLoading ||\r\n (!showSkeletonLoading && !tableData.length) ||\r\n (!showSkeletonLoading && !gtGeneralConfig.totalRow)\r\n \"\r\n ></tr>\r\n <tr\r\n [class]=\"rowData.gtClass\"\r\n mat-row\r\n *matRowDef=\"let rowData; columns: tableColumns\"\r\n [style.height.px]=\"gtDimension.rowHeight\"\r\n [style.background-color]=\"rowData.backgroundColor\"\r\n [style.border]=\"rowData.border\" (click)=\"dataRowClicked(rowData)\"\r\n ></tr>\r\n\r\n <!-- TOTAL ROW -->\r\n <ng-container [matColumnDef]=\"column.colName\" *ngFor=\"let column of totalRowInfo; trackBy: trackByFn\">\r\n <td mat-header-cell *matHeaderCellDef [attr.colspan]=\"column.colspan\" class=\"{{column.class}}\">\r\n <strong>{{ column.data }}</strong>\r\n <ng-container *ngIf=\"column.lowerData\">\r\n <br>\r\n <span>{{column.lowerData}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"column.tooltipMessage\">\r\n <i class=\"mi mdi-info-outline info-label\" container=\"body\"\r\n [ngbTooltip]=\"column.tooltipMessage\"\r\n tooltipClass=\"gt-total-row-tooltip\" placement=\"bottom\"></i>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- MAIN ROW -->\r\n <ng-container [matColumnDef]=\"columnDef.headerInfo[0].objectKey\" *ngFor=\"let columnDef of tableHeaders; trackBy: trackByFn\">\r\n <th nowrap mat-header-cell *matHeaderCellDef [style.width]=\"columnDef.width\">\r\n <div class=\"row mx-0\" *ngFor=\"let header of columnDef.headerInfo; let j = index;\"> \r\n <p\r\n *ngIf=\"header.typeOfHeaderData === 'STRING'\"\r\n [ngClass]=\"{ 'upper-label': j === 0, 'lower-label': j === 1 }\"\r\n >\r\n {{ header.name }}\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'impsInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"impsInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'ratingInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"ratingInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'rateInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"rateInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n </p>\r\n\r\n <ng-container *ngIf=\"header.typeOfHeaderData === 'CHECKBOX'\">\r\n <span\r\n *ngIf=\"gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!gtGeneralConfig.isHeaderChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': gtGeneralConfig.disableHeaderCheckbox }\"\r\n (click)=\"selectUnselectAllRows()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <div *ngIf=\"gtGeneralConfig.showAllColumnFilter\" class=\"sort-filter-container\">\r\n <ng-container *ngIf=\"header.sort\">\r\n <anna-core-sort-lib\r\n [sortBy]=\"header.sortObjectKey ? header.sortObjectKey : header.objectKey\"\r\n [data]=\"tableData\"\r\n [disableSort]=\"header.disableSort\"\r\n (sort)=\"sortedData($event)\"\r\n >\r\n </anna-core-sort-lib>\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'CHECKBOX'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"filterTooltip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'SLIDER'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n annaFilterService.appliedFiltersArray.length && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"sliderToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t1=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t1, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'DATE'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"datePickerTooltip\"\r\n placement=\"left-top auto\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t2=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t2, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'WEEK'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"weekPickerToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t3=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t3, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === 'TIME'\">\r\n <span\r\n class=\"mdi mdi-filter\"\r\n [ngClass]=\"{\r\n active:\r\n isTooltipActive(header.filterObjectKeys) && isTooltipActive(header.filterObjectKeys),\r\n disabled: header.disableFilter\r\n }\"\r\n [ngbTooltip]=\"timeFilterToolTip\"\r\n placement=\"bottom left-top\"\r\n container=\"body\"\r\n [autoClose]=\"'outside'\"\r\n triggers=\"manual\"\r\n #t4=\"ngbTooltip\"\r\n (click)=\"bindTheValueToToolTip(t4, header.filterObjectKeys)\"\r\n (hidden)=\"closeTooltip()\"\r\n >\r\n </span\r\n ><br />\r\n </ng-container>\r\n <ng-container *ngIf=\"header.filter === ''\"> <span id=\"no-filter-space\"></span><br /> </ng-container>\r\n <i *ngIf=\"header.tooltip && header.tooltip.name == 'lurViolationInfoTooltip'\" class=\"{{header['tooltip'].iconClass}}\"\r\n [ngStyle]=\"{'float': header['tooltip'].iconPosition}\"\r\n #t=\"ngbTooltip\"\r\n [ngbTooltip]=\"lurViolationInfoTooltip\"\r\n placement=\"{{ header['tooltip'].tooltipPosition }}\"\r\n tooltipClass=\"{{ header['tooltip'].tooltipClass }}\"\r\n >\r\n </i>\r\n\r\n </div>\r\n </div>\r\n </th>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'DRR'\">\r\n <ng-container *matCellDef=\"let ROW_DATA\">\r\n <ng-container *ngIf=\"showSkeletonLoading\">\r\n <td mat-cell>\r\n <ngx-skeleton-loader count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <ng-container\r\n *ngFor=\"let subline of columnDef.headerInfo; let sublineIndex = index; trackBy: trackByFn\"\r\n >\r\n <td\r\n mat-cell\r\n *ngIf=\"!ROW_DATA['hide' + subline.objectKey + 'Td']\"\r\n [attr.rowspan]=\"ROW_DATA[subline.objectKey + 'Rowspan']\"\r\n >\r\n <ng-container [ngSwitch]=\"subline.typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[subline.objectKey]\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[subline.objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{ 'disable-checkbox': ROW_DATA[subline.isDisabledKey] }\"\r\n (click)=\"selectUnselectRow(ROW_DATA)\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'RADIO'\">\r\n <mat-radio-group\r\n *ngIf=\"ROW_DATA['RadioButtonConfig']\"\r\n [ngModel]=\"ROW_DATA[subline.objectKey]\"\r\n [disabled]=\"ROW_DATA['RadioButtonConfig'][0].isDisabled\"\r\n >\r\n <ng-container\r\n *ngFor=\"let radioButton of ROW_DATA['RadioButtonConfig']; let last = last\"\r\n >\r\n <mat-radio-button\r\n value=\"{{ radioButton.value }}\"\r\n class=\"{{ radioButton.class }}\"\r\n (click)=\"\r\n radioButtonClicked(\r\n ROW_DATA,\r\n radioButton.value,\r\n ROW_DATA['RadioButtonConfig'][0].isDisabled\r\n )\r\n \"\r\n >{{ radioButton.label }}</mat-radio-button\r\n ><br *ngIf=\"!last\" />\r\n </ng-container>\r\n </mat-radio-group>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n {{ ROW_DATA[subline.objectKey] }}\r\n\r\n <ng-container\r\n *ngIf=\"\r\n subline.objectKey == 'Status' && (ROW_DATA['Remarks'] !== null)\r\n \"\r\n >\r\n <i\r\n class=\"mi mdi-info-outline remarks-tooltip\"\r\n [ngbTooltip]=\"columnInfoTooltip\"\r\n placement=\"bottom\"\r\n container=\"body\"\r\n tooltipClass=\"remarks-info-tooltip\"\r\n #t=\"ngbTooltip\"\r\n ></i>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"gtGeneralConfig.component != 'DRR'\">\r\n <td mat-cell *matCellDef=\"let ROW_DATA\" [style.background]=\"ROW_DATA.backgroundColor\">\r\n <ngx-skeleton-loader *ngIf=\"showSkeletonLoading\" count=\"1\" [theme]=\"{ height: '10px', display: 'block' }\">\r\n </ngx-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!showSkeletonLoading\">\r\n <div *ngFor=\"let subline of columnDef.headerInfo; let subLineIndex = index; trackBy: trackByFn\">\r\n <ng-container [ngSwitch]=\"columnDef.headerInfo[subLineIndex].typeOfBodyData\">\r\n <ng-container *ngSwitchCase=\"'ICON'\">\r\n <i [class]=\"ROW_DATA.iconClass\" (click)=\"iconClicked(ROW_DATA,ROW_DATA.iconClass)\"></i>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'SVG_ICON'\">\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_INFLIGHT'\">\r\n <span\r\n *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n class=\"cursor-not-allowed\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n <span\r\n *ngIf=\"ROW_DATA.orderStatus != 'LIVE' && !ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\"\r\n (click)=\"svgIconClicked(ROW_DATA,'payForPerformance')\"\r\n >\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconDisableColor\"\r\n [width]=\"'15px'\"\r\n [height]=\"'15px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n\r\n <anna-live-icon-template *ngIf=\"ROW_DATA.orderStatus == 'LIVE' && subline.objectKey == 'orderStatus' \"></anna-live-icon-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"gtGeneralConfig.component == 'ORDER_LISTING_COMPLETED'\">\r\n <span *ngIf=\"ROW_DATA.payForPerformance && subline.objectKey == 'payForPerformance'\" (click)=\"$event.stopPropagation()\">\r\n <anna-pay-for-performance-icon-template\r\n [color]=\"PfpIconActiveColor\"\r\n [width]=\"'20px'\"\r\n [height]=\"'20px'\"\r\n >\r\n </anna-pay-for-performance-icon-template>\r\n </span>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'bizRuleStatus'\">\r\n <anna-rejected-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'REJECTED'\"></anna-rejected-icon-template>\r\n <anna-notify-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'NOTIFY'\"></anna-notify-icon-template>\r\n <anna-buyer-approval-icon-template *ngIf=\"ROW_DATA.bizRuleStatus == 'AWAITING_APPROVAL'\"></anna-buyer-approval-icon-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'TEXT_ACTIONS'\">\r\n <button *ngFor=\"let text of ROW_DATA.textActions\" (click)=\"textActionClicked(ROW_DATA,text.id)\" [disabled]=\"text.isDisabled\" class=\"{{text.class}}\">{{text.name}}</button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'CHECKBOX'\">\r\n <span\r\n *ngIf=\"ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n false\r\n )\r\n \"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey]\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n [ngClass]=\"{\r\n 'disable-checkbox': ROW_DATA[columnDef.headerInfo[subLineIndex].isDisabledKey]\r\n }\"\r\n (click)=\"\r\n selectOrUnselectCheckbox(\r\n ROW_DATA,\r\n columnDef.headerInfo[subLineIndex].objectKey,\r\n true\r\n )\r\n \"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngIf=\"subline.objectKey != 'description'\">\r\n {{ ROW_DATA[columnDef.headerInfo[subLineIndex].objectKey] }}\r\n <i\r\n *ngIf=\"subline.objectKey == 'inventoryCode' && ROW_DATA['isSellerGroup'] && gtGeneralConfig.component == 'RATING' \"\r\n class=\"mdi mdi-alert-circle-outline seller-tooltip\"\r\n [ngbTooltip]=\"sellerHierarchyTooltip\"\r\n placement=\"bottom auto\"\r\n container=\"body\"\r\n [autoClose]=\"true\"\r\n triggers=\"manual\"\r\n (hidden)=\"closeTooltip()\"\r\n #info=\"ngbTooltip\"\r\n tooltipClass=\"hierarchy-tooltip\"\r\n (mouseenter)=\"bindTheValueToSellerGroupTooltip(ROW_DATA.sellerGroupHierarchy, info)\">\r\n </i>\r\n </ng-container>\r\n <ng-container *ngIf=\"subline.objectKey == 'description'\">\r\n <p *ngIf=\"ROW_DATA.descriptionMessage || ROW_DATA.descriptionEmailReferenceNum\">\r\n <ng-container *ngIf=\"ROW_DATA.descriptionMessage\">\r\n {{ ROW_DATA.descriptionMessage }}\r\n <br />\r\n </ng-container>\r\n <ng-container *ngIf=\"ROW_DATA.descriptionEmailReferenceNum\">\r\n Email Ref: {{ ROW_DATA.descriptionEmailReferenceNum }}\r\n <br />\r\n </ng-container>\r\n </p>\r\n <a\r\n href=\"{{ ROW_DATA.descriptionDetailsUrl }}\"\r\n target=\"_blank\"\r\n *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'PDF' || ROW_DATA.descriptionDetailsUrlType === 'EXCEL'\"\r\n >\r\n <button class=\"btn viewDetailsAndEmailBtn\">Download</button>\r\n </a>\r\n <ng-container *ngIf=\"ROW_DATA.activityname.toLowerCase() == 'order onboarded'\">\r\n <a *ngIf=\"ROW_DATA.descriptionDetailsUrlType === 'LINK'\" (click)=\"viewDetailsClicked(ROW_DATA)\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View details</button>\r\n </a>\r\n </ng-container>\r\n \r\n <a href=\"{{ ROW_DATA.descriptionEmailUrl }}\" target=\"_blank\" *ngIf=\"ROW_DATA.descriptionEmailUrl\">\r\n <button class=\"btn viewDetailsAndEmailBtn\">View email</button>\r\n </a>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n gtGeneralConfig.page === 'SpotDetails' &&\r\n columnDef.headerInfo[subLineIndex].objectKey === 'Status'\r\n \"\r\n >\r\n <img\r\n src=\"assets/images/Undo-Credit-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForCredit\"\r\n (click)=\"undoCreditedSpot(ROW_DATA)\"\r\n />\r\n <img\r\n src=\"assets/images/Undo-MG-Icon.svg\"\r\n style=\"cursor: pointer\"\r\n class=\"img-circle\"\r\n alt=\"User Image\"\r\n height=\"15px\"\r\n width=\"15px\"\r\n *ngIf=\"ROW_DATA.AllowUserToUndoMarkForMakeGood\"\r\n (click)=\"undoMgSpot(ROW_DATA)\"\r\n />\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </anna-table-virtual-scroll-viewport>\r\n\r\n <anna-core-no-data-lib [width]=\"noDataWidth\" *ngIf=\"!showSkeletonLoading && tableData.length == 0\"> </anna-core-no-data-lib>\r\n</div>\r\n\r\n<!-- Checkbox template -->\r\n<ng-template #filterTooltip>\r\n <div class=\"radio-container\" *ngIf=\"showCheckboxFilterRadioButtons\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <p class=\"search-box\">\r\n <i class=\"mi mdi-search search-icon search-icon-position\"></i>\r\n <input\r\n type=\"text\"\r\n placeholder=\"Search\"\r\n class=\"search-input\"\r\n style=\"margin-left: 2px; border: none; padding: 0px\"\r\n [(ngModel)]=\"searchBar\"\r\n />\r\n </p>\r\n <div class=\"dropdown-data-container\">\r\n <ng-container *ngIf=\"showAll\">\r\n <p class=\"input\" (click)=\"allOptionClicked()\">\r\n <span *ngIf=\"allSelected == 1\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"allSelected == 0\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span *ngIf=\"allSelected == 2\" role=\"button\" class=\"mi mdi-indeterminate-check-box check-box\"></span>\r\n <span class=\"data\">All</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngFor=\"let data of tempTooltipData | AnnafilterSearchedText: searchBar\">\r\n <p *ngIf=\"!data.isHidden\" class=\"input\" (click)=\"isCheckboxSelected(data)\">\r\n <span *ngIf=\"data.isSelected\" role=\"button\" class=\"mi mdi-check-box check-box\"></span>\r\n <span *ngIf=\"!data.isSelected\" role=\"button\" class=\"mi mdi-check-box-outline-blank check-box unchecked\"></span>\r\n <span class=\"data\" title=\"{{ data.data }}\">{{ data.data }}</span>\r\n </p>\r\n </ng-container>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeCheckboxFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableCheckboxApply }\"\r\n (click)=\"applyFilters()\"\r\n [disabled]=\"disableCheckboxApply\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider template -->\r\n<ng-template #sliderToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <section class=\"min-maxContainer\">\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMinValue\"\r\n (ngModelChange)=\"minValueChanged($event)\"\r\n placeholder=\"Min\"\r\n />\r\n <span>To</span>\r\n <input\r\n type=\"number\"\r\n step=\"{{ sliderFilterTextBoxStep }}\"\r\n [ngModel]=\"sliderMaxValue\"\r\n (ngModelChange)=\"maxValueChanged($event)\"\r\n placeholder=\"Max\"\r\n />\r\n </section>\r\n <div class=\"sidebar-slider\">\r\n <ngx-slider\r\n [(value)]=\"sliderMinValue\"\r\n [(highValue)]=\"sliderMaxValue\"\r\n [options]=\"options\"\r\n (valueChange)=\"sliderValueChange()\"\r\n (highValueChange)=\"sliderValueChange()\"\r\n ></ngx-slider>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"cancelSliderFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableSliderApplyButton }\"\r\n (click)=\"applySliderFilter()\"\r\n [disabled]=\"disableSliderApplyButton\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Picker Template -->\r\n<ng-template #datePickerTooltip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component == 'DRRLISTING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input type=\"radio\" id=\"{{data.key}}\" [ngModel]=\"annaFilterService.selectedRadio\" name=\"toolTip\" value=\"{{data.key}}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\" *ngIf=\"radioButtons.length > 1\">\r\n <label for=\"{{data.key}}\">{{data.label}}</label>\r\n </div>\r\n </div>\r\n <div class=\"datepicker-container\">\r\n <button class=\"column-clear-all align-center\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">\r\n Clear filter\r\n </button>\r\n <anna-core-calendar-filter-lib\r\n [minDate]=\"calendarMinEnabledDate\"\r\n [maxDate]=\"calendarMaxEnabledDate\"\r\n [selectedFromDate]=\"selectedMinDate\"\r\n [selectedToDate]=\"selectedMaxDate\"\r\n (apply)=\"applyDateFilter($event)\"\r\n (cancel)=\"cancelInDateFilter()\"\r\n >\r\n </anna-core-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Week Picker Template -->\r\n<ng-template #weekPickerToolTip>\r\n <div class=\"weekpicker-container\">\r\n <anna-core-week-calendar-filter-lib\r\n [week-calendar-config]=\"gtGeneralConfig.multiWeekPickerConfig\"\r\n (apply)=\"applyWeekFilter($event)\"\r\n [from-date]=\"calendarMinEnabledDate\"\r\n [to-date]=\"calendarMaxEnabledDate\"\r\n >\r\n </anna-core-week-calendar-filter-lib>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Filter Template -->\r\n<ng-template #timeFilterToolTip>\r\n <div class=\"radio-container\" *ngIf=\"gtGeneralConfig.component != 'RATING'\">\r\n <div *ngFor=\"let data of radioButtons\">\r\n <input\r\n type=\"radio\"\r\n id=\"{{ data.key }}\"\r\n [ngModel]=\"annaFilterService.selectedRadio\"\r\n name=\"toolTip\"\r\n value=\"{{ data.key }}\"\r\n (click)=\"populateTooltipDataBasedOnSelectedRadio(data.key)\"\r\n *ngIf=\"radioButtons.length > 1\"\r\n />\r\n <label for=\"{{ data.key }}\">{{ data.label }}</label>\r\n </div>\r\n </div>\r\n <button class=\"column-clear-all\" [disabled]=\"disableColumnClearAllBtn\" (click)=\"clearColumnFilter()\">Clear filter</button>\r\n <div\r\n class=\"time-filter-checkboxes\"\r\n *ngIf=\"gtGeneralConfig.component == 'SPOTDETAILS' || gtGeneralConfig.component == 'EXCLUDEINVENTORYPOPUP' || gtGeneralConfig.component == 'RATING'\"\r\n >\r\n <!-- Multi time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showMultiTimeCheckbox\">\r\n <span\r\n *ngIf=\"multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!multiTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectMultiTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Multi</p>\r\n </div>\r\n <!-- Zero time option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showZeroTimeCheckbox\">\r\n <span\r\n *ngIf=\"zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!zeroTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectZeroTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Include Zero</p>\r\n </div>\r\n <!-- Enter time range option checkbox -->\r\n <div class=\"d-flex align-items-center\" style=\"padding: 0.5rem 0 0.5rem 0.5rem\" *ngIf=\"showEnterTimeCheckbox\">\r\n <span\r\n *ngIf=\"enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-checked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box\r\n </span>\r\n <span\r\n *ngIf=\"!enterTimeCheckboxChecked\"\r\n class=\"material-icons custom-column-checkbox-unchecked\"\r\n (click)=\"selectOrUnselectEnterTimeCheckbox()\"\r\n >\r\n check_box_outline_blank\r\n </span>\r\n <p style=\"margin-left: 2px\">Enter time range</p>\r\n </div>\r\n </div>\r\n <div class=\"time-label-container\">\r\n <label>From</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedFromTime[1]\" type=\"text\" disabled />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeStartTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeStartTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedFromTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-label-container\">\r\n <label>To</label>\r\n </div>\r\n <div class=\"time-container\">\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[0]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeHour(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeHour(false)\"></i>\r\n </div>\r\n <span class=\"dot\">:</span>\r\n <input class=\"form-control numberInput\" [(ngModel)]=\"selectedToTime[1]\" disabled type=\"text\" />\r\n <div class=\"arrow-container\">\r\n <i class=\"mdi mdi-triangle upward\" (click)=\"changeEndTimeMinute(true)\"></i>\r\n <i class=\"mdi mdi-triangle downward\" (click)=\"changeEndTimeMinute(false)\"></i>\r\n </div>\r\n <div>\r\n <mat-button-toggle-group [(ngModel)]=\"selectedToTime[2]\" (ngModelChange)=\"disableTimeFilterApplyButton()\">\r\n <mat-button-toggle value=\"AM\">\r\n <span>AM</span>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">\r\n <span>PM</span>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n <div class=\"buttons-container\">\r\n <button class=\"button\" (click)=\"closeTimeFilter()\">Cancel</button>\r\n <button\r\n class=\"button\"\r\n [ngClass]=\"{ disabled: disableTimeFilterApplyBtn }\"\r\n (click)=\"applyTimeFilters()\"\r\n [disabled]=\"disableTimeFilterApplyBtn\"\r\n >\r\n Apply\r\n </button>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #columnInfoTooltip>\r\n <p style=\"padding: 0.5rem; color: black;white-space: nowrap;\">This preemption is rejected and not marked for credit.</p>\r\n</ng-template>\r\n\r\n<ng-template #ratingInfoTooltip>\r\n <p class=\"first-row\">Shows 'Booked Rating' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\">Shows 'Projected Rating' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #impsInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked IMPS' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected IMPS' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #rateInfoTooltip>\r\n <p class =\"first-row\" >Shows 'Booked Rate' for Preemptions & MakeGood Offered spot(s).</p>\r\n <p class=\"second-row\" >Shows 'Projected $ Value' for ADU Offered spot(s).</p>\r\n</ng-template>\r\n\r\n<ng-template #sellerHierarchyTooltip>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length > 0\">\r\n <table class=\"seller-hierarchy-table\">\r\n <thead>\r\n <tr>\r\n <th>#</th>\r\n <th>Inventory Codes</th>\r\n <th>Program/Description</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let data of sellerGroupHierarchy; let tooltipIndex = index\">\r\n <td>{{ tooltipIndex + 1 }}</td>\r\n <td>\r\n <span>{{ data.inventoryCode }}</span>\r\n </td>\r\n <td>\r\n <span>{{ data.program }}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n <ng-container *ngIf=\"sellerGroupHierarchy.length == 0\">\r\n <span style=\"color: #000\">Seller group not available for this inventory code</span>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #lurViolationInfoTooltip>\r\n <p class =\"first-row\" >The values are for the entire week.</p>\r\n</ng-template>", styles: [".sort{display:inline-block;margin:0!important;position:relative;top:1px}.mdi-sort{padding-top:5px;padding-bottom:2.5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort.active{opacity:1}.mdi-sort-descending{padding-top:2.5px;padding-bottom:5px;line-height:0;font-size:1rem;cursor:pointer;color:#000;opacity:.24}.mdi-sort-descending.active{opacity:1}.disable{cursor:not-allowed;pointer-events:none;opacity:.17}.sort-container{color:#000;padding:.25rem;text-align:left}.sort-container input{position:relative;top:.125rem;margin-right:.188rem}.sort-container input:hover,.sort-container label:hover{cursor:pointer}.sort-container div:last-of-type{line-height:.2}input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}input[type=radio]:checked{background-color:#268bff}input[type=radio]:focus{outline-offset:-10px}::ng-deep .tooltip-inner{max-height:22rem;background-color:#fff;border:1px solid white;border-radius:5px;box-shadow:0 2px 2px #0000003d,0 0 2px #0000001f;max-width:251px;width:100%;padding:0!important}::ng-deep .tooltip-inner div.radio-container{flex-wrap:wrap}::ng-deep .md-drppicker{box-shadow:unset!important}::ng-deep .available{color:#999}::ng-deep .bs-tooltip-bottom .arrow:before{border-bottom-color:#fff!important}::ng-deep .bs-tooltip-left .arrow:before{border-left-color:#fff!important}::ng-deep .tooltip.show{opacity:1}.input{text-align:left;margin:5px 10px 5px 5px;display:flex;align-items:center;width:98%;white-space:nowrap}.data{color:#000;font-weight:700;margin-left:5px;margin-right:5px}span.data{display:inline-block;text-overflow:ellipsis;white-space:nowrap;width:85%;overflow:hidden}.check-box{font-size:22px;cursor:pointer}span.mdi-filter.active{color:#000;opacity:1!important;pointer-events:all!important}p{margin-bottom:0;line-height:initial}span.mdi-filter{color:#cbcbcb}::ng-deep .ngx-slider{margin:5px 0 2px!important;width:100%!important}::ng-deep .ngx-slider-pointer{top:-5px!important;width:12px!important;height:12px!important;background:#268bff!important;border:1px solid #ffffff!important;box-shadow:0 1px 3px #0000004d!important;border-radius:16px!important}::ng-deep .ngx-slider-pointer:after{display:none!important}::ng-deep .ngx-slider-pointer:focus{outline:none!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}::ng-deep .sidebar-slider{margin-bottom:35px!important;margin-left:.3125rem;margin-right:.3125rem}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-high{right:0!important}::ng-deep .ngx-slider-span.ngx-slider-bubble.ngx-slider-model-ceil{right:0!important}::ng-deep .ngx-slider.animate{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bubble{top:10px!important;bottom:0!important;padding:1px 0!important;font-size:12px!important}::ng-deep .ngx-slider-bar{background:rgba(0,0,0,.26)!important;height:3px!important}::ng-deep .ngx-slider-bar.ngx-slider-selection{background:#42a5f5!important;height:3px!important}input:focus{outline:none}input::placeholder{color:#c8c8c8}.cancel-btn{background:#c7e1ff;color:#268bff}.apply-btn{background:#268bff;color:#fff;margin-left:.3125rem}div.radio-container{display:flex;white-space:nowrap;justify-content:space-between;background-color:#f4f4f4;padding:.125rem .125rem .125rem .25rem;border-radius:.125rem;margin:.4375rem .4375rem .25rem}div.radio-container input{position:relative;top:.125rem;margin-right:.25rem}div.radio-container label{font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.29;letter-spacing:0;color:#4a4a4a;margin:0;padding-left:.125rem}div.radio-container label:first-of-type{margin-right:.188rem}div.radio-container input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-block;width:.9375rem;height:.9375rem;padding:.125rem;background-clip:content-box;border:.125rem solid #268bff;background-color:transparent;border-radius:50%}div.radio-container input[type=radio]:checked{background-color:#268bff}.buttons-container{display:flex;margin:0px auto .4375rem;justify-content:center}.buttons-container button:last-of-type{background-color:#268bff;color:#fff}.buttons-container button.disabled{background:#bdbdbd;opacity:.5;color:#4a4a4a}.button{display:inline-block;margin:8px 4px 0 8px;padding:5px 16px;border-radius:4px;text-align:center;outline:none;font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.14;letter-spacing:normal;border:none;color:#268bff;background-color:#e5f1ff}.search-box{display:flex;align-items:center;color:#c8c8c8;border:1px solid #e6e6e6;border-radius:.125rem;margin:.25rem .4375rem .188rem;height:1.5rem;padding:.188rem 0 .188rem .5rem}.search-icon{margin:0 4px 0 0;font-size:1.125rem;color:#9b9b9b}.filter-icon{justify-content:right;margin-left:auto;color:#d4d4d4;color:#a1a1a1;font-size:16px;cursor:pointer}.data{margin:0 13px 0 8px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.86;letter-spacing:\"\";color:#4a4a4a}.search-input{margin:1px 0 1px 4px;font-family:Roboto;font-size:.875rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#c8c8c8}.check-box{color:#268bff}.tooltip-data-container{overflow-y:scroll;max-height:8rem}.searchbar{width:100%;display:flex;justify-content:flex-end;align-items:flex-end}.clear-button{opacity:.5;font-family:Roboto;font-size:.9375rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-decoration:underline;border:none;background-color:#fff;color:#4a4a4a;margin-left:.625rem;padding:0}.clear-button:focus{outline:none;box-shadow:none}.unchecked{color:#268bff}div.dropdown-data-container{max-height:12.3rem;width:100%;overflow-y:auto;overflow-x:hidden}div.dropdown-data-container p.input{margin-left:0}div.dropdown-data-container p.input span.mi{padding-left:.4375rem}div.dropdown-data-container p.input:hover{background-color:#ebebeb;cursor:pointer}div.dropdown-data-container::-webkit-scrollbar{width:.188rem}div.dropdown-data-container::-webkit-scrollbar-thumb{color:#d3d3d3}section.min-maxContainer{display:flex;justify-content:center;margin-bottom:-.125rem;margin-top:.5rem;width:100%}section.min-maxContainer input{width:30%;height:1.875rem;border:1px solid lightgray;color:gray}section.min-maxContainer span{display:inline-block;padding-left:.5rem;padding-right:.5rem;position:relative;top:.3125rem;color:#666}.time-container{width:100%;display:flex;padding:.125rem .625rem 0}.time-container input.form-control:disabled{background-color:#fff;width:2.813rem}.time-container .dot{color:#cbcbcb;position:relative;left:-7px;font-size:17px}.time-container div.arrow-container{flex-direction:column;display:flex;padding-top:.375rem;padding-left:1px;margin-right:1.1875rem}.time-container div.arrow-container i{color:#cbcbcb;cursor:pointer;font-size:.5625rem}.time-container div.arrow-container i.downward{transform:rotate(180deg)}.mdi-filter{cursor:pointer}.time-label-container{display:flex;justify-content:flex-start}.time-label-container label{margin-bottom:0;color:#4a4a4a;margin-top:.625rem;margin-left:.625rem;font-weight:700}.time-heading{color:#000;font-size:.8125rem;text-align:left;padding-left:.625rem;margin-top:.625rem;font-weight:700}.checkbox-container{display:flex;padding-inline:.625rem}.checkbox-container .data{text-align:left}.checkbox-container:first-of-type{margin-top:.625rem;font-weight:500}.column-clear-all{width:94%;text-align:left;border:none;background:none;text-decoration:underline;color:#268bff}.column-clear-all:disabled{opacity:.5;color:#4a4a4a}.column-clear-all.align-center{text-align:center}span.mdi-filter.disabled,span.mdi-calendar-range.disabled{pointer-events:none;opacity:.5}.datepicker-container{width:100%}.upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a!important;margin-bottom:0!important}:host ::ng-deep .gt{table-layout:fixed;margin-bottom:0;width:100%}:host ::ng-deep .gt th,:host ::ng-deep .gt td{padding:2px 8px;line-height:normal}:host ::ng-deep .gt thead tr th .upper-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#4a4a4a;margin-bottom:0}:host ::ng-deep .gt thead tr th .lower-label{font-family:Roboto;font-size:.6875rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.3px;color:#a7a7a7;margin-bottom:0}:host ::ng-deep .gt thead tr th{background-color:#ededed;position:sticky;top:0;border-top:none!important;border-bottom:none!important;outline:none!important;box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4}:host ::ng-deep .gt thead tr th br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt thead tr th div.row{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}:host ::ng-deep .gt thead tr th div.sort-filter-container{display:flex;flex-wrap:nowrap;align-items:center}:host ::ng-deep .gt thead tr th:first-of-type{box-shadow:inset 0 1px #d4d4d4,inset 0 -1px #d4d4d4,inset -1px 0 #d4d4d4,inset 1px 0 #d4d4d4}:host ::ng-deep .gt tbody tr td:first-of-type{box-shadow:inset 1px 0 #d4d4d4,inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td:nth-of-type(n + 2){box-shadow:inset -1px 0 #d4d4d4,inset 0 -1px #d4d4d4;border:none}:host ::ng-deep .gt tbody tr td .upper-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#000;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr td .lower-label{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:0px;color:#a7a7a7;display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .gt tbody tr br{display:block;content:\"\";margin-top:-8px}:host ::ng-deep .gt tbody tr:nth-of-type(1) td{border-top:none!important}:host ::ng-deep .gt .custom-column-checkbox-checked,:host ::ng-deep .gt .custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}:host ::ng-deep .gt .custom-column-checkbox-checked{color:#268bff}:host ::ng-deep .gt .custom-column-checkbox-unchecked{color:#4a4a4a}anna-table-virtual-scroll-viewport::-webkit-scrollbar-track{border:1px solid rgba(0,0,0,.1)!important}anna-table-virtual-scroll-viewport::-webkit-scrollbar{width:5px;height:5px}anna-table-virtual-scroll-viewport::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0006!important;border:1px solid rgba(0,0,0,.2)}.table-container{overflow-x:auto;overflow-y:auto}.rowSelectCheckbox,#selectAllRowsCheckbox{cursor:pointer}.disable-checkbox{color:#dedede!important;pointer-events:none!important}.mdi-warning{color:#f3c639;font-size:16px;line-height:28px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1}.redcolor-status{color:#c62a2a}.redcolor-cell-border{outline:1px solid #ff5353!important;outline-offset:-1px!important}#no-filter-space{width:.875rem}::ng-deep .mat-button-toggle-appearance-standard .mat-button-toggle-label-content{line-height:1.875rem!important;width:2.625rem;padding:0 .625rem}input.numberInput{margin-right:-.8125rem;padding:0 0 0 .625rem;height:1.875rem}::ng-deep .mat-button-toggle-checked{background-color:#268bff!important;color:#fff!important}::ng-deep .mat-button-toggle-group-appearance-standard{border-radius:0}.hidden{display:none}.no-data-div{margin-top:2.5px}.no-data-div label{margin:0;width:auto;font-weight:500;background-color:#d3d3d3;padding:.3125rem 1.125rem;border-radius:.25rem}.column-values:nth-of-type(2){color:#a7a7a7!important}.custom-column-checkbox-checked,.custom-column-checkbox-unchecked{font-size:.875rem;cursor:pointer}.custom-column-checkbox-checked{color:#268bff}.custom-column-checkbox-unchecked{color:#4a4a4a}.time-filter-checkboxes>div>p{color:#151b1e}.radio-button-dimension,::ng-deep .markForCredit .mat-radio-inner-circle,::ng-deep .markForCredit .mat-radio-outer-circle,::ng-deep .mark-for-credit .mat-radio-inner-circle,::ng-deep .mark-for-credit .mat-radio-outer-circle,::ng-deep .markForMakeGood .mat-radio-inner-circle,::ng-deep .markForMakeGood .mat-radio-outer-circle,::ng-deep .noAction .mat-radio-inner-circle,::ng-deep .noAction .mat-radio-outer-circle,::ng-deep .credit .mat-radio-inner-circle,::ng-deep .credit .mat-radio-outer-circle,::ng-deep .approve .mat-radio-inner-circle,::ng-deep .approve .mat-radio-outer-circle,::ng-deep .reject .mat-radio-inner-circle,::ng-deep .reject .mat-radio-outer-circle,::ng-deep .resubmit .mat-radio-inner-circle,::ng-deep .resubmit .mat-radio-outer-circle,::ng-deep .rejectCreditRequest .mat-radio-inner-circle,::ng-deep .rejectCreditRequest .mat-radio-outer-circle{height:18px!important;width:18px!important}::ng-deep .margin-bottom-zero .mat-radio-label{margin-bottom:0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .reject.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ff0}::ng-deep .resubmit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:#ff0}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .noAction.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:green}::ng-deep .approve.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:green}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:red}::ng-deep .credit.mat-radio-button.mat-accent.mat-radio-checked .mat-radio-inner-circle{background-color:red}::ng-deep .mat-radio-button.mat-radio-disabled .mat-radio-outer-circle{border-color:#00000061!important}::ng-deep .mat-radio-button.mat-radio-disabled.mat-radio-checked .mat-radio-inner-circle{background-color:#00000061!important}::ng-deep tr.white-background-row{background:white}::ng-deep tr.gray-background-row{background:rgba(233,233,233,.5)}.remarks-tooltip,.seller-tooltip{font-size:.875rem;color:#268bff;position:relative;top:.1875rem;cursor:pointer}.seller-tooltip{float:right}::ng-deep .remarks-info-tooltip .tooltip-inner{max-width:19.25rem!important}.rating-icon,.lur-violation-icon{color:#268bff;cursor:pointer;margin-left:2px;position:relative;left:-2px}::ng-deep .rating-info-tooltip .tooltip-inner{max-width:800px!important}p.first-row{padding:.5rem .5rem 0;color:#000;white-space:nowrap;text-align:left}p.second-row{padding:2px .5rem .5rem;color:#000;white-space:nowrap;text-align:left}::ng-deep .gt-total-row-tooltip{opacity:1!important}::ng-deep .gt-total-row-tooltip .tooltip-inner{color:#000;box-shadow:0 6px 10px #0000004d,0 2px 2px #0003;background-color:#fff;padding:4px!important;width:100%;border-radius:2px!important}::ng-deep .gt-total-row-tooltip .arrow:before{border-top-color:#fff!important}.info-label{margin-left:4px;color:#268bff;vertical-align:text-top}::ng-deep .hierarchy-tooltip .tooltip-inner{padding:4px!important}table.seller-hierarchy-table{table-layout:fixed;margin:.625rem .625rem .625rem .8125rem}table.seller-hierarchy-table tr th{font-family:Roboto;font-size:.75rem;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.67;letter-spacing:normal;color:#5e5e5e;white-space:nowrap;background:#ededed;box-shadow:none!important;border-top:1px solid #d4d4d4}table.seller-hierarchy-table tr th:first-of-type,table.seller-hierarchy-table tr td:first-of-type{border-left:1px solid #d4d4d4}table.seller-hierarchy-table tr th:last-of-type,table.seller-hierarchy-table tr td:last-of-type{border-right:1px solid #d4d4d4;width:7.875rem!important}table.seller-hierarchy-table tr th:nth-of-type(2){width:7.75rem!important}table.seller-hierarchy-table tr td{font-family:Roboto;font-size:.75rem;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4a4a4a;box-shadow:none!important;border-top:1px solid #d4d4d4;border-bottom:1px solid #d4d4d4}table.seller-hierarchy-table tr td:nth-of-type(2),table.seller-hierarchy-table tr td:nth-of-type(3){padding-top:.25rem}table.seller-hierarchy-table tr td span{display:inline-block;width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}\n"] }]
1759
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.AnnaSortService }, { type: i1.AnnaDateTimeFormatService }, { type: i1.AnnaFilterService }, { type: i1.AnnaGenericTableService }]; }, propDecorators: { showSkeletonLoading: [{
1760
- type: Input
1761
- }], tableHeaders: [{
1762
- type: Input
1763
- }], tableData: [{
1764
- type: Input
1765
- }], clonedTableData: [{
1766
- type: Input
1767
- }], numberOfSkeletonRows: [{
1768
- type: Input
1769
- }], numberOfSkeletonColumns: [{
1770
- type: Input
1771
- }], gtGeneralConfig: [{
1772
- type: Input
1773
- }], totalRowInfo: [{
1774
- type: Input
1775
- }], gtDimension: [{
1776
- type: Input
1777
- }], tableClass: [{
1778
- type: Input
1779
- }], maximumRowsWhichCanBeRenderedWithoutScroll: [{
1780
- type: Input
1781
- }], toggleCheckbox: [{
1782
- type: Output
1783
- }], toggleRowCheckbox: [{
1784
- type: Output
1785
- }], toggleHeaderCheckbox: [{
1786
- type: Output
1787
- }], undoIconClicked: [{
1788
- type: Output
1789
- }], filterAppliedToTable: [{
1790
- type: Output
1791
- }], sortingAppliedToTable: [{
1792
- type: Output
1793
- }], rowClicked: [{
1794
- type: Output
1795
- }], radioButtonSelected: [{
1796
- type: Output
1797
- }], columnFilterOpened: [{
1798
- type: Output
1799
- }], columnFilterClosed: [{
1800
- type: Output
1801
- }], gtIconClicked: [{
1802
- type: Output
1803
- }], gtSVGIconClicked: [{
1804
- type: Output
1805
- }], gtTextActionClicked: [{
1806
- type: Output
1807
- }], gtViewDetailClicked: [{
1808
- type: Output
1809
- }], sortComponent: [{
1810
- type: ViewChildren,
1811
- args: [AnnaSortComponent]
1801
+ 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 });
1802
+ 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 });
1803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AnnaVirtualTableDirective, decorators: [{
1804
+ type: Directive,
1805
+ args: [{
1806
+ selector: '[mat-table][appVirtualDataSource], mat-table[appVirtualDataSource]',
1807
+ providers: [{ provide: STICKY_POSITIONING_LISTENER, useExisting: AnnaVirtualTableDirective }]
1808
+ }]
1809
+ }], ctorParameters: function () {
1810
+ return [{ type: i0.ElementRef }, { type: i2$1.CdkVirtualScrollViewport }, { type: i2$2.CdkTable }, { type: i0.NgZone }, { type: i2$2._CoalescedStyleScheduler, decorators: [{
1811
+ type: Inject,
1812
+ args: [_COALESCED_STYLE_SCHEDULER]
1813
+ }] }];
1814
+ }, propDecorators: { dataSource: [{
1815
+ type: Input,
1816
+ args: ['appVirtualDataSource']
1817
+ }], headerRowDefs: [{
1818
+ type: ContentChildren,
1819
+ args: [CdkHeaderRowDef]
1812
1820
  }] } });
1813
1821
 
1814
1822
  // Angular import statements