igniteui-angular 22.1.1 → 22.1.3

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 (48) hide show
  1. package/fesm2022/igniteui-angular-calendar.mjs +41 -91
  2. package/fesm2022/igniteui-angular-calendar.mjs.map +1 -1
  3. package/fesm2022/igniteui-angular-checkbox.mjs +3 -59
  4. package/fesm2022/igniteui-angular-checkbox.mjs.map +1 -1
  5. package/fesm2022/igniteui-angular-core.mjs +10 -1
  6. package/fesm2022/igniteui-angular-core.mjs.map +1 -1
  7. package/fesm2022/igniteui-angular-directives.mjs +32 -25
  8. package/fesm2022/igniteui-angular-directives.mjs.map +1 -1
  9. package/fesm2022/igniteui-angular-grids-core.mjs +13 -3
  10. package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
  11. package/fesm2022/igniteui-angular-grids-grid.mjs +44 -34
  12. package/fesm2022/igniteui-angular-grids-grid.mjs.map +1 -1
  13. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs.map +1 -1
  14. package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
  15. package/lib/core/styles/components/ripple/_ripple-theme.scss +8 -0
  16. package/package.json +1 -1
  17. package/styles/igniteui-angular-dark.css +1 -1
  18. package/styles/igniteui-angular.css +1 -1
  19. package/styles/igniteui-bootstrap-dark.css +1 -1
  20. package/styles/igniteui-bootstrap-light.css +1 -1
  21. package/styles/igniteui-dark-green.css +1 -1
  22. package/styles/igniteui-fluent-dark-excel.css +1 -1
  23. package/styles/igniteui-fluent-dark-word.css +1 -1
  24. package/styles/igniteui-fluent-dark.css +1 -1
  25. package/styles/igniteui-fluent-light-excel.css +1 -1
  26. package/styles/igniteui-fluent-light-word.css +1 -1
  27. package/styles/igniteui-fluent-light.css +1 -1
  28. package/styles/igniteui-indigo-dark.css +1 -1
  29. package/styles/igniteui-indigo-light.css +1 -1
  30. package/styles/maps/igniteui-angular-dark.css.map +1 -1
  31. package/styles/maps/igniteui-angular.css.map +1 -1
  32. package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
  33. package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
  34. package/styles/maps/igniteui-dark-green.css.map +1 -1
  35. package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
  36. package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
  37. package/styles/maps/igniteui-fluent-dark.css.map +1 -1
  38. package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
  39. package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
  40. package/styles/maps/igniteui-fluent-light.css.map +1 -1
  41. package/styles/maps/igniteui-indigo-dark.css.map +1 -1
  42. package/styles/maps/igniteui-indigo-light.css.map +1 -1
  43. package/types/igniteui-angular-calendar.d.ts +2 -14
  44. package/types/igniteui-angular-checkbox.d.ts +0 -36
  45. package/types/igniteui-angular-core.d.ts +9 -0
  46. package/types/igniteui-angular-directives.d.ts +14 -12
  47. package/types/igniteui-angular-grids-core.d.ts +1 -0
  48. package/types/igniteui-angular-grids-grid.d.ts +8 -4
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, EventEmitter, afterNextRender, booleanAttribute, HostListener, HostBinding, Input, Output, Directive, Renderer2, ChangeDetectorRef, DestroyRef, ViewChild, ViewEncapsulation, Component, DOCUMENT, ViewContainerRef, NgZone, RendererStyleFlags2, ContentChildren, Pipe, ChangeDetectionStrategy, PLATFORM_ID, Injectable, TemplateRef, IterableDiffers, EnvironmentInjector, createComponent, LOCALE_ID, forwardRef, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, EventEmitter, afterNextRender, booleanAttribute, HostListener, HostBinding, Input, Output, Directive, Renderer2, ChangeDetectorRef, ViewChild, ViewEncapsulation, Component, DOCUMENT, ViewContainerRef, NgZone, RendererStyleFlags2, ContentChildren, Pipe, ChangeDetectionStrategy, PLATFORM_ID, Injectable, TemplateRef, IterableDiffers, EnvironmentInjector, createComponent, LOCALE_ID, forwardRef, NgModule } from '@angular/core';
3
3
  import { NgControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
4
- import { THEME_TOKEN, getComponentTheme, PlatformUtil, EDITOR_PROVIDER, resizeObservable, getResizeObserver, runAfterRenderOnce, compareMaps, IgxOverlayService, IgxNavigationService, AbsoluteScrollStrategy, ConnectedPositioningStrategy, VerticalAlignment, HorizontalAlignment, AutoPositionStrategy, first as first$1, DateTimeUtil, DatePart, I18N_FORMATTER, isDate } from 'igniteui-angular/core';
5
4
  import { Subject, noop, fromEvent, interval, animationFrameScheduler } from 'rxjs';
6
5
  import { takeUntil, throttle, throttleTime, filter, first } from 'rxjs/operators';
6
+ import { PlatformUtil, EDITOR_PROVIDER, resizeObservable, getResizeObserver, runAfterRenderOnce, compareMaps, IgxOverlayService, IgxNavigationService, AbsoluteScrollStrategy, ConnectedPositioningStrategy, VerticalAlignment, HorizontalAlignment, AutoPositionStrategy, first as first$1, DateTimeUtil, DatePart, I18N_FORMATTER, isDate } from 'igniteui-angular/core';
7
7
  import * as i1 from '@angular/common';
8
8
  import { DOCUMENT as DOCUMENT$1, isPlatformBrowser, CommonModule } from '@angular/common';
9
9
  import { IgxIconComponent } from 'igniteui-angular/icon';
@@ -332,7 +332,6 @@ class CheckboxBaseDirective {
332
332
  }
333
333
  constructor() {
334
334
  this.cdr = inject(ChangeDetectorRef);
335
- this.themeToken = inject(THEME_TOKEN);
336
335
  this.ngControl = inject(NgControl, { optional: true, self: true });
337
336
  /**
338
337
  * An event that is emitted after the checkbox state is changed.
@@ -457,19 +456,9 @@ class CheckboxBaseDirective {
457
456
  * @internal
458
457
  */
459
458
  this._required = false;
460
- this.elRef = inject(ElementRef);
461
- this.destroyRef = inject(DestroyRef);
462
459
  if (this.ngControl !== null) {
463
460
  this.ngControl.valueAccessor = this;
464
461
  }
465
- this.theme = this.themeToken.theme;
466
- const themeChange = this.themeToken.onChange((theme) => {
467
- if (this.theme !== theme) {
468
- this.theme = theme;
469
- this.cdr.detectChanges();
470
- }
471
- });
472
- this.destroyRef.onDestroy(() => themeChange.unsubscribe());
473
462
  }
474
463
  /**
475
464
  * Sets/gets whether the checkbox is required.
@@ -507,16 +496,6 @@ class CheckboxBaseDirective {
507
496
  this.cdr.detectChanges();
508
497
  }
509
498
  }
510
- this.setComponentTheme();
511
- }
512
- setComponentTheme() {
513
- if (!this.themeToken.preferToken) {
514
- const theme = getComponentTheme(this.elRef.nativeElement);
515
- if (theme && theme !== this.theme) {
516
- this.theme = theme;
517
- this.cdr.markForCheck();
518
- }
519
- }
520
499
  }
521
500
  /** @hidden @internal */
522
501
  onKeyUp(event) {
@@ -4074,7 +4053,26 @@ class IgxForOfDirective extends IgxForOfToken {
4074
4053
  });
4075
4054
  }
4076
4055
  }
4056
+ /**
4057
+ * @hidden
4058
+ * Resolves the element a view is tracked by.
4059
+ *
4060
+ * The view's root nodes are not always elements: when the template's root is
4061
+ * a control flow block they are comment anchors, and the rendered element
4062
+ * follows the first of them. Both lookups can come up empty - the view may
4063
+ * hold no element at all, or be torn down before its content is rendered -
4064
+ * in which case there is nothing to observe and null is returned.
4065
+ */
4066
+ getViewObservedNode(view) {
4067
+ const rootNodes = view?.rootNodes ?? [];
4068
+ const elementNode = rootNodes.find(node => node?.nodeType === Node.ELEMENT_NODE);
4069
+ const candidate = elementNode ?? rootNodes[0]?.nextElementSibling;
4070
+ return candidate?.nodeType === Node.ELEMENT_NODE ? candidate : null;
4071
+ }
4077
4072
  subscribeToViewObserver(target) {
4073
+ if (!target) {
4074
+ return;
4075
+ }
4078
4076
  if (this.igxForScrollOrientation === 'vertical' && this.viewObserver) {
4079
4077
  this._zone.runOutsideAngular(() => {
4080
4078
  if (this.platformUtil.isBrowser) {
@@ -4946,7 +4944,16 @@ class IgxForOfDirective extends IgxForOfToken {
4946
4944
  removeLastElem() {
4947
4945
  const oldElem = this._embeddedViews.pop();
4948
4946
  this.beforeViewDestroyed.emit(oldElem);
4949
- this.viewObserver?.unobserve(oldElem.rootNodes.find(node => node.nodeType === Node.ELEMENT_NODE) || oldElem.rootNodes[0].nextElementSibling);
4947
+ // The observed node is not necessarily a root node of the view: when the
4948
+ // template's root is a control flow block the root nodes are comment
4949
+ // anchors, and the rendered element follows the first of them. Either
4950
+ // lookup can come up empty - the view may hold no element at all, or be
4951
+ // torn down before its content is rendered - and ResizeObserver throws
4952
+ // on anything that is not an Element.
4953
+ const observedNode = this.getViewObservedNode(oldElem);
4954
+ if (observedNode) {
4955
+ this.viewObserver?.unobserve(observedNode);
4956
+ }
4950
4957
  // also detach from ViewContainerRef to make absolutely sure this is removed from the view container.
4951
4958
  this.dc.instance._vcr.detach(this.dc.instance._vcr.length - 1);
4952
4959
  oldElem.destroy();
@@ -5401,7 +5408,7 @@ class IgxGridForOfDirective extends IgxForOfDirective {
5401
5408
  const input = this.igxForOf[elemIndex];
5402
5409
  const embeddedView = this.dc.instance._vcr.createEmbeddedView(this._template, new IgxGridForOfContext(input, this.igxForOf, this.getContextIndex(input), this.igxForOf.length));
5403
5410
  this._embeddedViews.push(embeddedView);
5404
- this.subscribeToViewObserver(embeddedView.rootNodes.find(node => node.nodeType === Node.ELEMENT_NODE) || embeddedView.rootNodes[0].nextElementSibling);
5411
+ this.subscribeToViewObserver(this.getViewObservedNode(embeddedView));
5405
5412
  this.state.chunkSize++;
5406
5413
  }
5407
5414
  _updateViews(prevChunkSize) {