igniteui-angular 13.1.15 → 13.1.16

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.
@@ -10477,10 +10477,16 @@ class IgxForOfDirective {
10477
10477
  }
10478
10478
  }
10479
10479
  updateSizes() {
10480
+ const scrollable = this.isScrollable();
10480
10481
  this.recalcUpdateSizes();
10481
10482
  this._applyChanges();
10482
10483
  this._updateScrollOffset();
10483
- this.contentSizeChange.emit();
10484
+ if (scrollable !== this.isScrollable()) {
10485
+ this.scrollbarVisibilityChanged.emit();
10486
+ }
10487
+ else {
10488
+ this.contentSizeChange.emit();
10489
+ }
10484
10490
  }
10485
10491
  /**
10486
10492
  * @hidden
@@ -20567,7 +20573,9 @@ class IgxDateTimeEditorDirective extends IgxMaskDirective {
20567
20573
  return this.maskParser.applyMask(null, this.maskOptions);
20568
20574
  }
20569
20575
  get targetDatePart() {
20570
- if (this.document.activeElement === this.nativeElement) {
20576
+ // V.K. May 16th, 2022 #11556 Get correct date part in shadow DOM
20577
+ if (this.document.activeElement === this.nativeElement ||
20578
+ this.document.activeElement?.shadowRoot?.activeElement === this.nativeElement) {
20571
20579
  return this._inputDateParts
20572
20580
  .find(p => p.start <= this.selectionStart && this.selectionStart <= p.end && p.type !== DatePart.Literal)?.type;
20573
20581
  }
@@ -36324,10 +36332,16 @@ class IgxComboBaseDirective extends DisplayDensityBase {
36324
36332
  this.customValueFlag = this.allowCustomValues && !itemMatch;
36325
36333
  }
36326
36334
  manageRequiredAsterisk() {
36327
- if (this.ngControl && this.ngControl.control.validator) {
36328
- // Run the validation with empty object to check if required is enabled.
36329
- const error = this.ngControl.control.validator({});
36330
- this.inputGroup.isRequired = error && error.required;
36335
+ if (this.ngControl) {
36336
+ if (this.ngControl.control.validator) {
36337
+ // Run the validation with empty object to check if required is enabled.
36338
+ const error = this.ngControl.control.validator({});
36339
+ this.inputGroup.isRequired = error && error.required;
36340
+ }
36341
+ else {
36342
+ // P.M. 18 May 2022: IgxCombo's asterisk not removed when removing required validator dynamically in reactive form #11543
36343
+ this.inputGroup.isRequired = false;
36344
+ }
36331
36345
  }
36332
36346
  }
36333
36347
  /** Contains key-value pairs of the selected valueKeys and their resp. displayKeys */
@@ -61481,7 +61495,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
61481
61495
  this.resizeNotify.pipe(filter(() => !this._init), throttleTime(0, animationFrameScheduler, { leading: true, trailing: true }), destructor)
61482
61496
  .subscribe(() => {
61483
61497
  this.zone.run(() => {
61484
- this.notifyChanges(true);
61498
+ // do not trigger reflow if element is detached.
61499
+ if (this.document.contains(this.nativeElement)) {
61500
+ this.notifyChanges(true);
61501
+ }
61485
61502
  });
61486
61503
  });
61487
61504
  this.pipeTriggerNotifier.pipe(takeUntil(this.destroy$)).subscribe(() => this.pipeTrigger++);
@@ -61538,10 +61555,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
61538
61555
  // called to recalc all widths that may have changes as a result of
61539
61556
  // the vert. scrollbar showing/hiding
61540
61557
  this.notifyChanges(true);
61558
+ this.cdr.detectChanges();
61541
61559
  });
61542
61560
  this.verticalScrollContainer.contentSizeChange.pipe(filter(() => !this._init), destructor).subscribe(() => {
61543
- this.notifyChanges(true);
61544
- this.cdr.detectChanges();
61561
+ this.notifyChanges();
61545
61562
  });
61546
61563
  this.onDensityChanged.pipe(destructor).subscribe(() => {
61547
61564
  this.crudService.endEdit(false);
@@ -68042,6 +68059,9 @@ class IgxGridComponent extends IgxGridBaseDirective {
68042
68059
  this.setupColumns();
68043
68060
  }
68044
68061
  this.cdr.markForCheck();
68062
+ if (this.isPercentHeight) {
68063
+ this.notifyChanges(true);
68064
+ }
68045
68065
  }
68046
68066
  /**
68047
68067
  * Gets/Sets an array of objects containing the filtered data.
@@ -75976,19 +75996,15 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
75976
75996
  }
75977
75997
  super.ngOnInit();
75978
75998
  }
75979
- ngDoCheck() {
75980
- if (this._cdrRequestRepaint && !this._init) {
75981
- this.updateSizes();
75982
- }
75983
- super.ngDoCheck();
75984
- }
75985
75999
  /**
75986
76000
  * @hidden
75987
76001
  */
75988
76002
  ngAfterViewInit() {
75989
76003
  super.ngAfterViewInit();
75990
- this.verticalScrollContainer.getScroll().addEventListener('scroll', this.hg_verticalScrollHandler.bind(this));
75991
- this.headerContainer.getScroll().addEventListener('scroll', this.hg_horizontalScrollHandler.bind(this));
76004
+ this.zone.runOutsideAngular(() => {
76005
+ this.verticalScrollContainer.getScroll().addEventListener('scroll', this.hg_verticalScrollHandler.bind(this));
76006
+ this.headerContainer.getScroll().addEventListener('scroll', this.hg_horizontalScrollHandler.bind(this));
76007
+ });
75992
76008
  this.verticalScrollContainer.beforeViewDestroyed.pipe(takeUntil(this.destroy$)).subscribe((view) => {
75993
76009
  const rowData = view.context.$implicit;
75994
76010
  if (this.isChildGridRecord(rowData)) {
@@ -76376,26 +76392,6 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76376
76392
  relatedGrid.updateOnRender = false;
76377
76393
  }
76378
76394
  });
76379
- const childGrids = this.getChildGrids(true);
76380
- childGrids.forEach((grid) => {
76381
- if (grid.isPercentWidth) {
76382
- grid.notifyChanges(true);
76383
- }
76384
- grid.updateScrollPosition();
76385
- });
76386
- }
76387
- }
76388
- /**
76389
- * @hidden
76390
- */
76391
- updateScrollPosition() {
76392
- const vScr = this.verticalScrollContainer.getScroll();
76393
- const hScr = this.headerContainer.getScroll();
76394
- if (vScr) {
76395
- vScr.scrollTop = this.scrollTop;
76396
- }
76397
- if (hScr) {
76398
- hScr.scrollLeft = this.scrollLeft;
76399
76395
  }
76400
76396
  }
76401
76397
  onContainerScroll() {
@@ -76424,6 +76420,12 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76424
76420
  return keys.indexOf(field) === -1;
76425
76421
  });
76426
76422
  }
76423
+ resizeNotifyHandler() {
76424
+ // do not trigger reflow if element is detached or if it is child grid.
76425
+ if (this.document.contains(this.nativeElement) && !this.parent) {
76426
+ this.notifyChanges(true);
76427
+ }
76428
+ }
76427
76429
  /**
76428
76430
  * @hidden
76429
76431
  */
@@ -76458,14 +76460,6 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76458
76460
  }
76459
76461
  return super._shouldAutoSize(renderedHeight);
76460
76462
  }
76461
- updateSizes() {
76462
- if (document.body.contains(this.nativeElement) && this.isPercentWidth) {
76463
- this.reflow();
76464
- this.gridAPI.getChildGrids(false).forEach((grid) => {
76465
- grid.updateSizes();
76466
- });
76467
- }
76468
- }
76469
76463
  updateColumnList(recalcColSizes = true) {
76470
76464
  const childLayouts = this.parent ? this.childLayoutList : this.allLayoutList;
76471
76465
  const nestedColumns = childLayouts.map((layout) => layout.columnList.toArray());
@@ -76489,10 +76483,10 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
76489
76483
  });
76490
76484
  }
76491
76485
  hg_verticalScrollHandler(event) {
76492
- this.scrollTop = event.target.scrollTop;
76486
+ this.scrollTop = this.verticalScrollContainer.scrollPosition;
76493
76487
  }
76494
76488
  hg_horizontalScrollHandler(event) {
76495
- this.scrollLeft = event.target.scrollLeft;
76489
+ this.scrollLeft = this.headerContainer.scrollPosition;
76496
76490
  }
76497
76491
  }
76498
76492
  IgxHierarchicalGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: IgxHierarchicalGridComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });