igniteui-angular 22.0.3 → 22.0.4

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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, ElementRef, ChangeDetectorRef, TemplateRef, HostBinding, HostListener, ViewChild, Input, ChangeDetectionStrategy, Component, Pipe, DOCUMENT, forwardRef, InjectionToken, QueryList, NgZone, IterableDiffers, ViewContainerRef, Injector, EnvironmentInjector, LOCALE_ID, EventEmitter, createComponent, booleanAttribute, ViewChildren, ContentChildren, ContentChild, Output, Directive, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
3
3
  import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
4
4
  import { GridBaseAPIService, IGX_GRID_BASE, IgxGridSelectionService, IgxFilteringService, GridSelectionMode, IgxColumnFormatterPipe, IgxGroupByAreaDirective, IgxGroupAreaDropDirective, IgxGroupByMetaPipe, GridSummaryPosition, RowPinningPosition, IgxGridCellComponent, IgxGridCellImageAltPipe, IgxStringReplacePipe, IgxRowDirective, IgxRowDragDirective, IgxGridNotGroupedPipe, IgxGridTopLevelColumns, IgxGridCellStylesPipe, IgxGridCellStyleClassesPipe, IgxGridDataMapperPipe, IgxGridTransactionStatePipe, FilterMode, GridCellMergeMode, IgxGridValidationService, IgxColumnResizingService, IGX_GRID_SERVICE_BASE, IgxGridNavigationService, IgxGridSummaryService, IgxGridTransaction, RowEditPositionStrategy, getUUID, IgxGridExcelStyleFilteringComponent, DropPosition, IgxCell, IgxEditRow, IgxColumnComponent, CharSeparatedValueData, IgxAdvancedFilteringDialogComponent, IgxColumnGroupComponent, IgxGridPinningActionsComponent, IgxGridColumnResizerComponent, IgxGridHeaderRowComponent, IgxGridBodyDirective, IgxRowEditTabStopDirective, IgxSummaryRowComponent, IgxExcelStyleLoadingValuesTemplateDirective, IgxRowAddTextDirective, IgxRowExpandedIndicatorDirective, IgxRowCollapsedIndicatorDirective, IgxHeaderExpandedIndicatorDirective, IgxHeaderCollapsedIndicatorDirective, IgxExcelStyleHeaderIconDirective, IgxSortAscendingHeaderIconDirective, IgxSortDescendingHeaderIconDirective, IgxSortHeaderIconDirective, IgxGridLoadingTemplateDirective, IgxGridEmptyTemplateDirective, IgxHeadSelectorDirective, IgxRowSelectorDirective, IgxRowDragGhostDirective, IgxRowEditTemplateDirective, IgxRowEditTextDirective, IgxRowEditActionsDirective, IgxDragIndicatorIconDirective, IgxToolbarToken, WatchChanges, IgxGridRow, IgxGridCell, IgxGroupByRow, IgxSummaryRow, IgxGridMRLNavigationService, IgxGridDragSelectDirective, IgxColumnMovingDropDirective, IgxGridTransactionPipe, IgxHasVisibleColumnsPipe, IgxGridRowPinningPipe, IgxGridAddRowPipe, IgxGridRowClassesPipe, IgxGridRowStylesPipe, IgxSummaryDataPipe, IgxGridDetailTemplateDirective, IgxGroupByRowTemplateDirective, IgxGroupByRowSelectorDirective, IgxGridCRUDService, IgxGridFooterComponent, IgxGridStateDirective, IgxGridEditingActionsComponent, IgxGridActionsBaseDirective, IgxGridActionButtonComponent, IgxGridHeaderComponent, IgxGridHeaderGroupComponent, IgxFilterCellTemplateDirective, IgxSummaryTemplateDirective, IgxCellTemplateDirective, IgxCellValidationErrorDirective, IgxCellHeaderTemplateDirective, IgxCellFooterTemplateDirective, IgxCellEditorTemplateDirective, IgxCollapsibleIndicatorTemplateDirective, IgxColumnLayoutComponent, IgxColumnActionsComponent, IgxColumnHidingDirective, IgxColumnPinningDirective, IgxCSVTextDirective, IgxExcelTextDirective, IgxGridToolbarActionsComponent, IgxGridToolbarAdvancedFilteringComponent, IgxGridToolbarComponent, IgxGridToolbarExporterComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarTitleComponent, IgxGridToolbarDirective, IgxExcelStyleHeaderComponent, IgxExcelStyleSortingComponent, IgxExcelStylePinningComponent, IgxExcelStyleHidingComponent, IgxExcelStyleSelectingComponent, IgxExcelStyleClearFiltersComponent, IgxExcelStyleConditionalFilterComponent, IgxExcelStyleMovingComponent, IgxExcelStyleSearchComponent, IgxExcelStyleColumnOperationsTemplateDirective, IgxExcelStyleFilterOperationsTemplateDirective, IgxColumnRequiredValidatorDirective, IgxColumnMinValidatorDirective, IgxColumnMaxValidatorDirective, IgxColumnEmailValidatorDirective, IgxColumnMinLengthValidatorDirective, IgxColumnMaxLengthValidatorDirective, IgxColumnPatternValidatorDirective } from 'igniteui-angular/grids/core';
5
- import { cloneArray, DataUtil, GridColumnDataType, IgxNumberFormatterPipe, IgxDateFormatterPipe, IgxPercentFormatterPipe, IgxCurrencyFormatterPipe, GridSummaryCalculationMode, FilteringExpressionsTree, FilterUtil, HammerGesturesManager, isTree, FilteringLogic, FilteringExpressionsTreeType, getCurrentResourceStrings, GridResourceStringsEN, isObject, TransactionType, IgxFlatTransactionFactory, IgxOverlayService, PlatformUtil, I18N_FORMATTER, DefaultMergeStrategy, FilteringStrategy, ColumnPinningPosition, VerticalAlignment, HorizontalAlignment, ConnectedPositioningStrategy, AbsoluteScrollStrategy, DefaultDataCloneStrategy, ɵSize as _Size, areEqualArrays, resizeObservable, compareMaps, TransactionEventOrigin, mergeObjects, ContainerPositionStrategy, resolveNestedPath, columnFieldPath, recreateTree, recreateTreeFromFields, DEFAULT_LOCALE, onResourceChangeHandle, IgxOverlayOutletDirective, IgxActionStripToken } from 'igniteui-angular/core';
5
+ import { cloneArray, DataUtil, GridColumnDataType, IgxNumberFormatterPipe, IgxDateFormatterPipe, IgxPercentFormatterPipe, IgxCurrencyFormatterPipe, GridSummaryCalculationMode, FilteringExpressionsTree, FilterUtil, HammerGesturesManager, isTree, FilteringLogic, FilteringExpressionsTreeType, getCurrentResourceStrings, GridResourceStringsEN, isObject, TransactionType, IgxFlatTransactionFactory, IgxOverlayService, PlatformUtil, I18N_FORMATTER, DefaultMergeStrategy, FilteringStrategy, ColumnPinningPosition, VerticalAlignment, HorizontalAlignment, ConnectedPositioningStrategy, AbsoluteScrollStrategy, DefaultDataCloneStrategy, ɵSize as _Size, areEqualArrays, runAfterRenderOnce, resizeObservable, compareMaps, TransactionEventOrigin, mergeObjects, ContainerPositionStrategy, resolveNestedPath, columnFieldPath, recreateTree, recreateTreeFromFields, DEFAULT_LOCALE, onResourceChangeHandle, IgxOverlayOutletDirective, IgxActionStripToken } from 'igniteui-angular/core';
6
6
  import { takeUntil, shareReplay, filter, throttle, take, switchMap, throttleTime, takeWhile, map, first } from 'rxjs/operators';
7
7
  import { Subject, BehaviorSubject, animationFrameScheduler, fromEvent, timer, pipe, merge } from 'rxjs';
8
8
  import { IgxIconComponent } from 'igniteui-angular/icon';
@@ -4082,9 +4082,7 @@ class IgxGridBaseDirective {
4082
4082
  if (this.hasColumnsToAutosize) {
4083
4083
  this.headerContainer?.dataChanged.pipe(takeUntil(this.destroy$)).subscribe(() => {
4084
4084
  this.cdr.detectChanges();
4085
- this.zone.onStable.pipe(first()).subscribe(() => {
4086
- this.autoSizeColumnsInView();
4087
- });
4085
+ runAfterRenderOnce(this.injector, () => this.autoSizeColumnsInView());
4088
4086
  });
4089
4087
  }
4090
4088
  // Window resize observer not needed because when you resize the window element the tbody container always resize so
@@ -4532,7 +4530,7 @@ class IgxGridBaseDirective {
4532
4530
  // reset auto-size and calculate it again.
4533
4531
  this._columns.forEach(x => x.autoSize = undefined);
4534
4532
  this.resetCaches();
4535
- this.zone.onStable.pipe(first()).subscribe(() => {
4533
+ runAfterRenderOnce(this.injector, () => {
4536
4534
  this.cdr.detectChanges();
4537
4535
  this.autoSizeColumnsInView();
4538
4536
  });
@@ -6065,7 +6063,7 @@ class IgxGridBaseDirective {
6065
6063
  const tmplId = args.context.templateID.type;
6066
6064
  const index = args.context.index;
6067
6065
  args.view.detectChanges();
6068
- this.zone.onStable.pipe(first()).subscribe(() => {
6066
+ runAfterRenderOnce(this.injector, () => {
6069
6067
  const row = tmplId === 'dataRow' ? this.gridAPI.get_row_by_index(index) : null;
6070
6068
  const summaryRow = tmplId === 'summaryRow' ? this.summariesRowList.find((sr) => sr.dataRowIndex === index) : null;
6071
6069
  if (row && row instanceof IgxRowDirective) {
@@ -6700,25 +6698,16 @@ class IgxGridBaseDirective {
6700
6698
  this.calculateGridWidth();
6701
6699
  this.cdr.detectChanges();
6702
6700
  }
6703
- if (this.zone.isStable) {
6701
+ runAfterRenderOnce(this.injector, () => {
6704
6702
  this.zone.run(() => {
6705
6703
  this._applyWidthHostBinding();
6706
6704
  this.cdr.detectChanges();
6707
6705
  });
6708
- }
6709
- else {
6710
- this.zone.onStable.pipe(first()).subscribe(() => {
6711
- this.zone.run(() => {
6712
- this._applyWidthHostBinding();
6713
- });
6714
- });
6715
- }
6706
+ });
6716
6707
  this.resetCaches(recalcFeatureWidth);
6717
6708
  if (this.hasColumnsToAutosize) {
6718
6709
  this.cdr.detectChanges();
6719
- this.zone.onStable.pipe(first()).subscribe(() => {
6720
- this._autoSizeColumnsNotify.next();
6721
- });
6710
+ runAfterRenderOnce(this.injector, () => this._autoSizeColumnsNotify.next());
6722
6711
  }
6723
6712
  // in case horizontal scrollbar has appeared recalc to size correctly.
6724
6713
  if (hasHScroll !== this.hasHorizontalScroll()) {
@@ -7329,13 +7318,7 @@ class IgxGridBaseDirective {
7329
7318
  this.changeRowEditingOverlayStateOnScroll(this.crudService.rowInEditMode);
7330
7319
  }
7331
7320
  };
7332
- if (this.isZonelessChangeDetection()) {
7333
- this.cdr.detectChanges();
7334
- callback();
7335
- }
7336
- else {
7337
- this.zone.onStable.pipe(first()).subscribe(callback);
7338
- }
7321
+ runAfterRenderOnce(this.injector, callback);
7339
7322
  this.disableTransitions = false;
7340
7323
  this.hideOverlays();
7341
7324
  const context = this.actionStrip?.context;
@@ -7356,9 +7339,6 @@ class IgxGridBaseDirective {
7356
7339
  };
7357
7340
  this.gridScroll.emit(args);
7358
7341
  }
7359
- isZonelessChangeDetection() {
7360
- return this.zone.constructor.name === 'NoopNgZone';
7361
- }
7362
7342
  hasMenuPinningActions() {
7363
7343
  const strip = this.actionStrip;
7364
7344
  const actionButtons = strip?.actionButtons;
@@ -7376,7 +7356,7 @@ class IgxGridBaseDirective {
7376
7356
  this._horizontalForOfs.forEach(vfor => vfor.onHScroll(scrollLeft));
7377
7357
  this.cdr.markForCheck();
7378
7358
  this.zone.run(() => {
7379
- this.zone.onStable.pipe(first()).subscribe(() => {
7359
+ runAfterRenderOnce(this.injector, () => {
7380
7360
  this.parentVirtDir.chunkLoad.emit(this.headerContainer.state);
7381
7361
  requestAnimationFrame(() => {
7382
7362
  this.autoSizeColumnsInView();