@angular/cdk 20.1.1 → 20.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.
- package/dialog/index.d.ts +2 -2
- package/drag-drop/index.d.ts +2 -2
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +21 -11
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/table.mjs +3 -2
- package/fesm2022/table.mjs.map +1 -1
- package/menu/index.d.ts +2 -2
- package/overlay/index.d.ts +4 -4
- package/{overlay-module.d-C2CxnwqT.d.ts → overlay-module.d-BvvR6Y05.d.ts} +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/scrolling/index.d.ts +1 -1
- package/{scrolling-module.d-C_w4tIrZ.d.ts → scrolling-module.d-3Rw5UxLk.d.ts} +1 -2
- package/table/index.d.ts +1 -1
package/dialog/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ import { F as FocusTrapFactory, A as A11yModule } from '../a11y-module.d--J1yhM7
|
|
|
6
6
|
import { B as BasePortalOutlet, f as CdkPortalOutlet, C as ComponentPortal, T as TemplatePortal, D as DomPortal, a as ComponentType, h as PortalModule } from '../portal-directives.d-DbeNrI5D.js';
|
|
7
7
|
export { c as ɵɵCdkPortal, g as ɵɵPortalHostDirective, d as ɵɵTemplatePortalDirective } from '../portal-directives.d-DbeNrI5D.js';
|
|
8
8
|
import { a as Direction } from '../bidi-module.d-IN1Vp56w.js';
|
|
9
|
-
import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-
|
|
9
|
+
import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-BvvR6Y05.js';
|
|
10
10
|
import * as _angular_cdk_portal from '@angular/cdk/portal';
|
|
11
11
|
import '../observers/index.js';
|
|
12
12
|
import '../number-property.d-CJVxXUcb.js';
|
|
13
|
-
import '../scrolling-module.d-
|
|
13
|
+
import '../scrolling-module.d-3Rw5UxLk.js';
|
|
14
14
|
import '../data-source.d-Bblv7Zvh.js';
|
|
15
15
|
import '@angular/common';
|
|
16
16
|
import '../scrolling/index.js';
|
package/drag-drop/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { a as Direction } from '../bidi-module.d-IN1Vp56w.js';
|
|
|
4
4
|
import { Subject, Observable } from 'rxjs';
|
|
5
5
|
import { ViewportRuler } from '../scrolling/index.js';
|
|
6
6
|
import { N as NumberInput } from '../number-property.d-CJVxXUcb.js';
|
|
7
|
-
import { b as CdkScrollableModule } from '../scrolling-module.d-
|
|
8
|
-
export { C as ɵɵCdkScrollable } from '../scrolling-module.d-
|
|
7
|
+
import { b as CdkScrollableModule } from '../scrolling-module.d-3Rw5UxLk.js';
|
|
8
|
+
export { C as ɵɵCdkScrollable } from '../scrolling-module.d-3Rw5UxLk.js';
|
|
9
9
|
import '../data-source.d-Bblv7Zvh.js';
|
|
10
10
|
|
|
11
11
|
/** Possible values that can be used to configure the drag start delay. */
|
package/fesm2022/cdk.mjs
CHANGED
package/fesm2022/cdk.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('20.1.
|
|
1
|
+
{"version":3,"file":"cdk.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('20.1.3');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
package/fesm2022/scrolling.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, forwardRef, Directive, Input, inject, NgZone, RendererFactory2, Injectable, ElementRef, Renderer2, DOCUMENT, ChangeDetectorRef, signal, Injector, afterNextRender, booleanAttribute, Optional, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, ViewContainerRef, TemplateRef, IterableDiffers, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, forwardRef, Directive, Input, inject, NgZone, RendererFactory2, Injectable, ElementRef, Renderer2, DOCUMENT, ChangeDetectorRef, signal, Injector, effect, ApplicationRef, DestroyRef, untracked, afterNextRender, booleanAttribute, Optional, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, ViewContainerRef, TemplateRef, IterableDiffers, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, of, Observable, Subscription, animationFrameScheduler, asapScheduler, isObservable } from 'rxjs';
|
|
4
4
|
import { distinctUntilChanged, auditTime, filter, startWith, takeUntil, pairwise, switchMap, shareReplay } from 'rxjs/operators';
|
|
5
5
|
import { c as coerceNumberProperty, a as coerceElement } from './element-x4z00URv.mjs';
|
|
@@ -733,8 +733,7 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
733
733
|
* be rewritten as an offset to the start of the content).
|
|
734
734
|
*/
|
|
735
735
|
_renderedContentOffsetNeedsRewrite = false;
|
|
736
|
-
|
|
737
|
-
_isChangeDetectionPending = false;
|
|
736
|
+
_changeDetectionNeeded = signal(false);
|
|
738
737
|
/** A list of functions to run after the next change detection cycle. */
|
|
739
738
|
_runAfterChangeDetection = [];
|
|
740
739
|
/** Subscription to changes in the viewport size. */
|
|
@@ -755,6 +754,15 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
755
754
|
this.elementRef.nativeElement.classList.add('cdk-virtual-scrollable');
|
|
756
755
|
this.scrollable = this;
|
|
757
756
|
}
|
|
757
|
+
const ref = effect(() => {
|
|
758
|
+
if (this._changeDetectionNeeded()) {
|
|
759
|
+
this._doChangeDetection();
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
// Using ApplicationRef injector is important here because we want this to be a root
|
|
763
|
+
// effect that runs before change detection of any application views (since we're depending on markForCheck marking parents dirty)
|
|
764
|
+
{ injector: inject(ApplicationRef).injector });
|
|
765
|
+
inject(DestroyRef).onDestroy(() => void ref.destroy());
|
|
758
766
|
}
|
|
759
767
|
ngOnInit() {
|
|
760
768
|
// Scrolling depends on the element dimensions which we can't get during SSR.
|
|
@@ -1004,14 +1012,16 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
1004
1012
|
if (runAfter) {
|
|
1005
1013
|
this._runAfterChangeDetection.push(runAfter);
|
|
1006
1014
|
}
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
if (!this._isChangeDetectionPending) {
|
|
1010
|
-
this._isChangeDetectionPending = true;
|
|
1011
|
-
this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
|
|
1012
|
-
this._doChangeDetection();
|
|
1013
|
-
}));
|
|
1015
|
+
if (untracked(this._changeDetectionNeeded)) {
|
|
1016
|
+
return;
|
|
1014
1017
|
}
|
|
1018
|
+
this.ngZone.runOutsideAngular(() => {
|
|
1019
|
+
Promise.resolve().then(() => {
|
|
1020
|
+
this.ngZone.run(() => {
|
|
1021
|
+
this._changeDetectionNeeded.set(true);
|
|
1022
|
+
});
|
|
1023
|
+
});
|
|
1024
|
+
});
|
|
1015
1025
|
}
|
|
1016
1026
|
/** Run change detection. */
|
|
1017
1027
|
_doChangeDetection() {
|
|
@@ -1029,7 +1039,7 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
1029
1039
|
// the `Number` function first to coerce it to a numeric value.
|
|
1030
1040
|
this._contentWrapper.nativeElement.style.transform = this._renderedContentTransform;
|
|
1031
1041
|
afterNextRender(() => {
|
|
1032
|
-
this.
|
|
1042
|
+
this._changeDetectionNeeded.set(false);
|
|
1033
1043
|
const runAfterChangeDetection = this._runAfterChangeDetection;
|
|
1034
1044
|
this._runAfterChangeDetection = [];
|
|
1035
1045
|
for (const fn of runAfterChangeDetection) {
|