@angular/cdk 17.0.0-next.2 → 17.0.0-next.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/a11y/index.d.ts +4 -5
- package/accordion/index.d.ts +6 -8
- package/drag-drop/index.d.ts +14 -12
- package/esm2022/a11y/focus-trap/focus-trap.mjs +6 -17
- package/esm2022/accordion/accordion-item.mjs +9 -15
- package/esm2022/accordion/accordion.mjs +8 -14
- package/esm2022/drag-drop/directives/drag-handle.mjs +5 -6
- package/esm2022/drag-drop/directives/drag-preview.mjs +7 -13
- package/esm2022/drag-drop/directives/drag.mjs +6 -6
- package/esm2022/drag-drop/directives/drop-list-group.mjs +6 -13
- package/esm2022/drag-drop/directives/drop-list.mjs +10 -10
- package/esm2022/drag-drop/drag-ref.mjs +5 -6
- package/esm2022/listbox/listbox.mjs +21 -33
- package/esm2022/menu/context-menu-trigger.mjs +6 -13
- package/esm2022/menu/menu-item-selectable.mjs +6 -13
- package/esm2022/menu/menu-item.mjs +6 -13
- package/esm2022/observers/observe-content.mjs +6 -6
- package/esm2022/overlay/overlay-directives.mjs +17 -48
- package/esm2022/scrolling/virtual-for-of.mjs +1 -1
- package/esm2022/scrolling/virtual-scroll-viewport.mjs +10 -16
- package/esm2022/stepper/stepper.mjs +31 -45
- package/esm2022/table/cell.mjs +9 -9
- package/esm2022/table/table.mjs +11 -10
- package/esm2022/text-field/autosize.mjs +5 -6
- package/esm2022/version.mjs +1 -1
- package/fesm2022/a11y.mjs +6 -16
- package/fesm2022/a11y.mjs.map +1 -1
- package/fesm2022/accordion.mjs +14 -25
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/cdk.mjs +1 -1
- package/fesm2022/cdk.mjs.map +1 -1
- package/fesm2022/drag-drop.mjs +27 -39
- package/fesm2022/drag-drop.mjs.map +1 -1
- package/fesm2022/listbox.mjs +20 -32
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +13 -32
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/observers.mjs +5 -5
- package/fesm2022/observers.mjs.map +1 -1
- package/fesm2022/overlay.mjs +17 -47
- package/fesm2022/overlay.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +10 -15
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/stepper.mjs +30 -44
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +18 -15
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/text-field.mjs +4 -5
- package/fesm2022/text-field.mjs.map +1 -1
- package/listbox/index.d.ts +14 -13
- package/menu/index.d.ts +6 -10
- package/observers/index.d.ts +2 -2
- package/overlay/index.d.ts +10 -16
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/scrolling/index.d.ts +2 -4
- package/stepper/index.d.ts +12 -14
- package/table/index.d.ts +6 -4
- package/text-field/index.d.ts +2 -2
package/fesm2022/scrolling.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { coerceNumberProperty, coerceElement
|
|
1
|
+
import { coerceNumberProperty, coerceElement } from '@angular/cdk/coercion';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, forwardRef, Directive, Input, Injectable, Optional, Inject, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, SkipSelf, ElementRef, NgModule } from '@angular/core';
|
|
3
|
+
import { InjectionToken, forwardRef, Directive, Input, Injectable, Optional, Inject, inject, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, SkipSelf, ElementRef, NgModule } from '@angular/core';
|
|
4
4
|
import { Subject, of, Observable, fromEvent, animationFrameScheduler, asapScheduler, Subscription, isObservable } from 'rxjs';
|
|
5
5
|
import { distinctUntilChanged, auditTime, filter, takeUntil, startWith, pairwise, switchMap, shareReplay } from 'rxjs/operators';
|
|
6
6
|
import * as i1 from '@angular/cdk/platform';
|
|
@@ -708,16 +708,6 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
708
708
|
this._calculateSpacerSize();
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
/**
|
|
712
|
-
* Whether rendered items should persist in the DOM after scrolling out of view. By default, items
|
|
713
|
-
* will be removed.
|
|
714
|
-
*/
|
|
715
|
-
get appendOnly() {
|
|
716
|
-
return this._appendOnly;
|
|
717
|
-
}
|
|
718
|
-
set appendOnly(value) {
|
|
719
|
-
this._appendOnly = coerceBooleanProperty(value);
|
|
720
|
-
}
|
|
721
711
|
constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, scrollable) {
|
|
722
712
|
super(elementRef, scrollDispatcher, ngZone, dir);
|
|
723
713
|
this.elementRef = elementRef;
|
|
@@ -730,7 +720,11 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
730
720
|
/** Emits when the rendered range changes. */
|
|
731
721
|
this._renderedRangeSubject = new Subject();
|
|
732
722
|
this._orientation = 'vertical';
|
|
733
|
-
|
|
723
|
+
/**
|
|
724
|
+
* Whether rendered items should persist in the DOM after scrolling out of view. By default, items
|
|
725
|
+
* will be removed.
|
|
726
|
+
*/
|
|
727
|
+
this.appendOnly = false;
|
|
734
728
|
// Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
|
|
735
729
|
// strategy lazily (i.e. only if the user is actually listening to the events). We do this because
|
|
736
730
|
// depending on how the strategy calculates the scrolled index, it may come at a cost to
|
|
@@ -1056,7 +1050,7 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
|
|
|
1056
1050
|
this.orientation === 'horizontal' ? `${this._totalContentSize}px` : '';
|
|
1057
1051
|
}
|
|
1058
1052
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: CdkVirtualScrollViewport, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }, { token: i2.Directionality, optional: true }, { token: ScrollDispatcher }, { token: ViewportRuler }, { token: VIRTUAL_SCROLLABLE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1059
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: CdkVirtualScrollViewport, isStandalone: true, selector: "cdk-virtual-scroll-viewport", inputs: { orientation: "orientation", appendOnly: "appendOnly" }, outputs: { scrolledIndexChange: "scrolledIndexChange" }, host: { properties: { "class.cdk-virtual-scroll-orientation-horizontal": "orientation === \"horizontal\"", "class.cdk-virtual-scroll-orientation-vertical": "orientation !== \"horizontal\"" }, classAttribute: "cdk-virtual-scroll-viewport" }, providers: [
|
|
1053
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.1", type: CdkVirtualScrollViewport, isStandalone: true, selector: "cdk-virtual-scroll-viewport", inputs: { orientation: "orientation", appendOnly: ["appendOnly", "appendOnly", booleanAttribute] }, outputs: { scrolledIndexChange: "scrolledIndexChange" }, host: { properties: { "class.cdk-virtual-scroll-orientation-horizontal": "orientation === \"horizontal\"", "class.cdk-virtual-scroll-orientation-vertical": "orientation !== \"horizontal\"" }, classAttribute: "cdk-virtual-scroll-viewport" }, providers: [
|
|
1060
1054
|
{
|
|
1061
1055
|
provide: CdkScrollable,
|
|
1062
1056
|
useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,
|
|
@@ -1092,7 +1086,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImpor
|
|
|
1092
1086
|
}] }]; }, propDecorators: { orientation: [{
|
|
1093
1087
|
type: Input
|
|
1094
1088
|
}], appendOnly: [{
|
|
1095
|
-
type: Input
|
|
1089
|
+
type: Input,
|
|
1090
|
+
args: [{ transform: booleanAttribute }]
|
|
1096
1091
|
}], scrolledIndexChange: [{
|
|
1097
1092
|
type: Output
|
|
1098
1093
|
}], _contentWrapper: [{
|