igniteui-angular 20.0.4 → 20.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/fesm2022/igniteui-angular.mjs +62 -22
  2. package/fesm2022/igniteui-angular.mjs.map +1 -1
  3. package/index.d.ts +5 -0
  4. package/lib/core/styles/components/date-picker/_date-picker-theme.scss +9 -2
  5. package/lib/core/styles/components/drop-down/_drop-down-theme.scss +1 -1
  6. package/lib/core/styles/components/query-builder/_query-builder-theme.scss +22 -8
  7. package/package.json +1 -1
  8. package/styles/igniteui-angular-dark.css +1 -1
  9. package/styles/igniteui-angular.css +1 -1
  10. package/styles/igniteui-bootstrap-dark.css +1 -1
  11. package/styles/igniteui-bootstrap-light.css +1 -1
  12. package/styles/igniteui-dark-green.css +1 -1
  13. package/styles/igniteui-fluent-dark-excel.css +1 -1
  14. package/styles/igniteui-fluent-dark-word.css +1 -1
  15. package/styles/igniteui-fluent-dark.css +1 -1
  16. package/styles/igniteui-fluent-light-excel.css +1 -1
  17. package/styles/igniteui-fluent-light-word.css +1 -1
  18. package/styles/igniteui-fluent-light.css +1 -1
  19. package/styles/igniteui-indigo-dark.css +1 -1
  20. package/styles/igniteui-indigo-light.css +1 -1
  21. package/styles/maps/igniteui-angular-dark.css.map +1 -1
  22. package/styles/maps/igniteui-angular.css.map +1 -1
  23. package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
  24. package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
  25. package/styles/maps/igniteui-dark-green.css.map +1 -1
  26. package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
  27. package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
  28. package/styles/maps/igniteui-fluent-dark.css.map +1 -1
  29. package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
  30. package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
  31. package/styles/maps/igniteui-fluent-light.css.map +1 -1
  32. package/styles/maps/igniteui-indigo-dark.css.map +1 -1
  33. package/styles/maps/igniteui-indigo-light.css.map +1 -1
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, HostListener, Input, Directive, EventEmitter, InjectionToken, isDevMode, inject, PLATFORM_ID, Inject, ElementRef, ViewContainerRef, createComponent, DOCUMENT, HostBinding, Output, Self, Optional, booleanAttribute, SecurityContext, DestroyRef, Component, ContentChild, ContentChildren, RendererStyleFlags2, Pipe, ViewChild, contentChildren, QueryList, signal, effect, LOCALE_ID, forwardRef, Host, ViewChildren, TemplateRef, ChangeDetectionStrategy, SimpleChange, ChangeDetectorRef, NgZone, SkipSelf, CUSTOM_ELEMENTS_SCHEMA, reflectComponentType, NgModule } from '@angular/core';
2
+ import { Injectable, HostListener, Input, Directive, EventEmitter, InjectionToken, isDevMode, inject, PLATFORM_ID, Inject, ElementRef, ViewContainerRef, createComponent, DOCUMENT, HostBinding, Output, Self, Optional, booleanAttribute, SecurityContext, DestroyRef, Component, ContentChild, ContentChildren, RendererStyleFlags2, Pipe, ViewChild, Renderer2, NgZone, contentChildren, QueryList, signal, effect, LOCALE_ID, forwardRef, Host, ViewChildren, TemplateRef, ChangeDetectionStrategy, SimpleChange, ChangeDetectorRef, SkipSelf, CUSTOM_ELEMENTS_SCHEMA, reflectComponentType, NgModule } from '@angular/core';
3
3
  import * as i4 from '@angular/forms';
4
4
  import { NgModel, NgControl, FormControlName, NG_VALUE_ACCESSOR, Validators, NG_VALIDATORS, FormGroup, FormsModule, RequiredValidator, MinValidator, MaxValidator, EmailValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, FormControl, ReactiveFormsModule } from '@angular/forms';
5
5
  import { Observable, NEVER, Subject, fromEvent, BehaviorSubject, interval, animationFrameScheduler, noop, takeUntil as takeUntil$1, merge, Subscription, timer, sampleTime, filter as filter$1, pipe, take as take$1 } from 'rxjs';
6
6
  import { takeUntil, filter, throttle, throttleTime, first as first$2, take, debounce, tap, switchMap, skipLast, debounceTime, map, shareReplay, takeWhile, timeout, pluck } from 'rxjs/operators';
7
- import { isPlatformBrowser, formatDate as formatDate$1, CurrencyPipe, FormatWidth, getLocaleDateFormat, formatPercent, formatNumber, getLocaleCurrencyCode, DatePipe, getLocaleDateTimeFormat, NgTemplateOutlet, NgClass, TitleCasePipe, getLocaleFirstDayOfWeek, NgStyle, getLocaleCurrencySymbol, formatCurrency as formatCurrency$1, getLocaleNumberFormat, NumberFormatStyle, DecimalPipe, PercentPipe, getCurrencySymbol, AsyncPipe } from '@angular/common';
7
+ import { isPlatformBrowser, formatDate as formatDate$1, CurrencyPipe, FormatWidth, getLocaleDateFormat, formatPercent, formatNumber, getLocaleCurrencyCode, DatePipe, getLocaleDateTimeFormat, NgTemplateOutlet, NgClass, DOCUMENT as DOCUMENT$1, TitleCasePipe, getLocaleFirstDayOfWeek, NgStyle, getLocaleCurrencySymbol, formatCurrency as formatCurrency$1, getLocaleNumberFormat, NumberFormatStyle, DecimalPipe, PercentPipe, getCurrencySymbol, AsyncPipe } from '@angular/common';
8
8
  import { mergeWith, isEqual as isEqual$1 } from 'lodash-es';
9
9
  import { strToU8, zip } from 'fflate';
10
10
  import { scaleOutVerTop, scaleInVerTop, AnimationUtil, fadeOut, fadeIn, slideOutTop, slideInTop, slideOutBottom, slideInBottom, scaleOutHorRight, scaleInHorRight, scaleOutHorLeft, scaleInHorLeft, scaleOutVerBottom, scaleInVerBottom, scaleInCenter, growVerOut, growVerIn, slideInLeft } from 'igniteui-angular/animations';
@@ -15585,6 +15585,9 @@ class VirtualHelperBaseDirective {
15585
15585
  this.destroy$ = new Subject();
15586
15586
  this._afterViewInit = false;
15587
15587
  this._detached = false;
15588
+ this.renderer = inject(Renderer2);
15589
+ this.platformId = inject(PLATFORM_ID);
15590
+ this.ngZone = inject(NgZone);
15588
15591
  this._scrollNativeSize = this.calculateScrollNativeSize();
15589
15592
  }
15590
15593
  onScroll(event) {
@@ -15640,6 +15643,30 @@ class VirtualHelperBaseDirective {
15640
15643
  get isAttachedToDom() {
15641
15644
  return this.document.body.contains(this.nativeElement);
15642
15645
  }
15646
+ toggleClass(element, className, shouldHaveClass) {
15647
+ if (shouldHaveClass) {
15648
+ this.renderer.addClass(element, className);
15649
+ }
15650
+ else {
15651
+ this.renderer.removeClass(element, className);
15652
+ }
15653
+ }
15654
+ updateScrollbarClass() {
15655
+ if (!isPlatformBrowser(this.platformId)) {
15656
+ return;
15657
+ }
15658
+ this.ngZone.runOutsideAngular(() => {
15659
+ requestAnimationFrame(() => {
15660
+ const el = this.nativeElement;
15661
+ const hasScrollbar = el.scrollHeight > el.clientHeight;
15662
+ const prevSibling = el.previousElementSibling;
15663
+ const scrollbarClass = 'igx-display-container--scrollbar';
15664
+ if (prevSibling?.tagName.toLowerCase() === 'igx-display-container') {
15665
+ this.toggleClass(prevSibling, scrollbarClass, hasScrollbar);
15666
+ }
15667
+ });
15668
+ });
15669
+ }
15643
15670
  handleMutations(event) {
15644
15671
  const hasSize = !(event[0].contentRect.height === 0 && event[0].contentRect.width === 0);
15645
15672
  if (!hasSize && !this.isAttachedToDom) {
@@ -15650,9 +15677,10 @@ class VirtualHelperBaseDirective {
15650
15677
  // attached back now.
15651
15678
  this.restoreScroll();
15652
15679
  }
15680
+ this.updateScrollbarClass();
15653
15681
  }
15654
15682
  restoreScroll() { }
15655
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: VirtualHelperBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive }); }
15683
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: VirtualHelperBaseDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT$1 }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Directive }); }
15656
15684
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0", type: VirtualHelperBaseDirective, isStandalone: true, selector: "[igxVirtualHelperBase]", host: { listeners: { "scroll": "onScroll($event)" } }, ngImport: i0 }); }
15657
15685
  }
15658
15686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: VirtualHelperBaseDirective, decorators: [{
@@ -15663,7 +15691,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
15663
15691
  }]
15664
15692
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
15665
15693
  type: Inject,
15666
- args: [DOCUMENT]
15694
+ args: [DOCUMENT$1]
15667
15695
  }] }, { type: PlatformUtil }], propDecorators: { onScroll: [{
15668
15696
  type: HostListener,
15669
15697
  args: ['scroll', ['$event']]
@@ -15680,7 +15708,7 @@ class HVirtualHelperComponent extends VirtualHelperBaseDirective {
15680
15708
  restoreScroll() {
15681
15709
  this.nativeElement.scrollLeft = this.scrollAmount;
15682
15710
  }
15683
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: HVirtualHelperComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component }); }
15711
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: HVirtualHelperComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT$1 }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component }); }
15684
15712
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: HVirtualHelperComponent, isStandalone: true, selector: "igx-horizontal-virtual-helper", inputs: { width: "width" }, host: { properties: { "class": "this.cssClasses" } }, viewQueries: [{ propertyName: "_vcr", first: true, predicate: ["horizontal_container"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: '<div #horizontal_container class="igx-vhelper__placeholder-content" [style.width.px]="size"></div>', isInline: true }); }
15685
15713
  }
15686
15714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: HVirtualHelperComponent, decorators: [{
@@ -15692,7 +15720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
15692
15720
  }]
15693
15721
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
15694
15722
  type: Inject,
15695
- args: [DOCUMENT]
15723
+ args: [DOCUMENT$1]
15696
15724
  }] }, { type: PlatformUtil }], propDecorators: { _vcr: [{
15697
15725
  type: ViewChild,
15698
15726
  args: ['horizontal_container', { read: ViewContainerRef, static: true }]
@@ -15715,7 +15743,7 @@ class VirtualHelperComponent extends VirtualHelperBaseDirective {
15715
15743
  restoreScroll() {
15716
15744
  this.nativeElement.scrollTop = this.scrollAmount;
15717
15745
  }
15718
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: VirtualHelperComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component }); }
15746
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: VirtualHelperComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DOCUMENT$1 }, { token: PlatformUtil }], target: i0.ɵɵFactoryTarget.Component }); }
15719
15747
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: VirtualHelperComponent, isStandalone: true, selector: "igx-virtual-helper", inputs: { itemsLength: "itemsLength" }, host: { properties: { "scrollTop": "this.scrollTop", "class": "this.cssClasses" } }, viewQueries: [{ propertyName: "_vcr", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: '<div #container class="igx-vhelper__placeholder-content" [style.height.px]="size"></div>', isInline: true }); }
15720
15748
  }
15721
15749
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: VirtualHelperComponent, decorators: [{
@@ -15727,7 +15755,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
15727
15755
  }]
15728
15756
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
15729
15757
  type: Inject,
15730
- args: [DOCUMENT]
15758
+ args: [DOCUMENT$1]
15731
15759
  }] }, { type: PlatformUtil }], propDecorators: { scrollTop: [{
15732
15760
  type: HostBinding,
15733
15761
  args: ['scrollTop']
@@ -47160,19 +47188,20 @@ class IgxSelectComponent extends IgxDropDownComponent {
47160
47188
  }
47161
47189
  manageRequiredAsterisk() {
47162
47190
  const hasRequiredHTMLAttribute = this.elementRef.nativeElement.hasAttribute('required');
47191
+ let isRequired = false;
47163
47192
  if (this.ngControl && this.ngControl.control.validator) {
47164
- // Run the validation with empty object to check if required is enabled.
47165
47193
  const error = this.ngControl.control.validator({});
47166
- this.inputGroup.isRequired = error && error.required;
47167
- this.cdr.markForCheck();
47168
- // If validator is dynamically cleared and no required HTML attribute is set,
47169
- // reset label's required class(asterisk) and IgxInputState #6896
47194
+ isRequired = !!(error && error.required);
47195
+ }
47196
+ this.inputGroup.isRequired = isRequired;
47197
+ if (this.input?.nativeElement) {
47198
+ this.input.nativeElement.setAttribute('aria-required', isRequired.toString());
47170
47199
  }
47171
- else if (this.inputGroup.isRequired && this.ngControl && !this.ngControl.control.validator && !hasRequiredHTMLAttribute) {
47200
+ // Handle validator removal case
47201
+ if (!isRequired && !hasRequiredHTMLAttribute) {
47172
47202
  this.input.valid = IgxInputState.INITIAL;
47173
- this.inputGroup.isRequired = false;
47174
- this.cdr.markForCheck();
47175
47203
  }
47204
+ this.cdr.markForCheck();
47176
47205
  }
47177
47206
  setSelection(item) {
47178
47207
  if (item && item.value !== undefined && item.value !== null) {
@@ -68397,7 +68426,7 @@ class IgxGridBaseDirective {
68397
68426
  let sum = 0;
68398
68427
  for (const col of fc) {
68399
68428
  if (col.level === 0) {
68400
- sum += parseInt(col.calcWidth, 10);
68429
+ sum += parseFloat(col.calcWidth);
68401
68430
  }
68402
68431
  }
68403
68432
  if (this.isPinningToStart) {
@@ -69067,7 +69096,7 @@ class IgxGridBaseDirective {
69067
69096
  * @hidden @internal
69068
69097
  */
69069
69098
  hasHorizontalScroll() {
69070
- return this.totalWidth - this.unpinnedWidth > 0 && this.width !== null;
69099
+ return Math.round(this.totalWidth - this.unpinnedWidth) > 0 && this.width !== null;
69071
69100
  }
69072
69101
  /**
69073
69102
  * @hidden @internal
@@ -69103,6 +69132,9 @@ class IgxGridBaseDirective {
69103
69132
  // TODO: do not remove this, as it is used in rowEditTemplate, but mark is as internal and hidden
69104
69133
  /* blazorCSSuppress */
69105
69134
  endEdit(commit = true, event) {
69135
+ if (!this.crudService.cellInEditMode && !this.crudService.rowInEditMode) {
69136
+ return;
69137
+ }
69106
69138
  const document = this.nativeElement?.getRootNode();
69107
69139
  const focusWithin = this.nativeElement?.contains(document.activeElement);
69108
69140
  const success = this.crudService.endEdit(commit, event);
@@ -73427,6 +73459,10 @@ class IgxGridCellComponent {
73427
73459
  this.highlight.lastSearchInfo.caseSensitive = this.grid.lastSearchInfo.caseSensitive;
73428
73460
  this.highlight.lastSearchInfo.exactMatch = this.grid.lastSearchInfo.exactMatch;
73429
73461
  }
73462
+ const isInEdit = this.grid.rowEditable ? this.row.inEditMode : this.editMode;
73463
+ if (this.formControl && this.formControl.value !== changes.value.currentValue && !isInEdit) {
73464
+ this.formControl.setValue(changes.value.currentValue);
73465
+ }
73430
73466
  }
73431
73467
  }
73432
73468
  /**
@@ -77687,8 +77723,8 @@ class IgxPivotRowComponent extends IgxRowDirective {
77687
77723
  keyValueMap.set(dim.memberName, path.shift());
77688
77724
  }
77689
77725
  let pivotValue;
77690
- if (this.grid.hasMultipleValues) {
77691
- pivotValue = this.grid.values.find(x => x.member === path.shift());
77726
+ if (this.grid.hasMultipleValues && path.length) {
77727
+ pivotValue = this.grid.values.find(x => x.member === path[0]);
77692
77728
  }
77693
77729
  else {
77694
77730
  pivotValue = this.grid.values ? this.grid.values[0] : undefined;
@@ -87672,7 +87708,9 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
87672
87708
  }
87673
87709
  ];
87674
87710
  entities[0].childEntities = this.childLayoutList.reduce((acc, rowIsland) => {
87675
- return acc.concat(this.generateChildEntity(rowIsland, this.data[0][rowIsland.key][0]));
87711
+ const childFirstRowData = this.data?.length > 0 && this.data[0][rowIsland.key]?.length > 0 ?
87712
+ this.data[0][rowIsland.key][0] : null;
87713
+ return acc.concat(this.generateChildEntity(rowIsland, childFirstRowData));
87676
87714
  }, []);
87677
87715
  }
87678
87716
  return entities;
@@ -87701,7 +87739,9 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
87701
87739
  if (!firstRowData) {
87702
87740
  return null;
87703
87741
  }
87704
- return acc.concat(this.generateChildEntity(childRowIsland, firstRowData[childRowIsland.key][0]));
87742
+ const childFirstRowData = firstRowData.length > 0 && firstRowData[childRowIsland.key]?.length > 0 ?
87743
+ firstRowData[childRowIsland.key][0] : null;
87744
+ return acc.concat(this.generateChildEntity(childRowIsland, childFirstRowData));
87705
87745
  }, []);
87706
87746
  if (rowIslandChildEntities?.length > 0) {
87707
87747
  childEntities = rowIslandChildEntities;