@angular/cdk-experimental 20.0.0-next.7 → 20.0.0-next.9
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/column-resize/index.d.ts +39 -5
- package/combobox/index.d.ts +2 -2
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +77 -10
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +9 -12
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +1 -1
- package/fesm2022/{list-focus-DtTH4bDx.mjs → list-focus-Di7m_z_6.mjs} +112 -88
- package/fesm2022/list-focus-Di7m_z_6.mjs.map +1 -0
- package/fesm2022/listbox.mjs +29 -9
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/{option-Bgpacz3g.mjs → option-f_gNslw8.mjs} +127 -79
- package/fesm2022/option-f_gNslw8.mjs.map +1 -0
- package/fesm2022/{polyfill-DRXnWbMt.mjs → polyfill-CXksG4af.mjs} +2 -2
- package/fesm2022/{polyfill-DRXnWbMt.mjs.map → polyfill-CXksG4af.mjs.map} +1 -1
- package/fesm2022/popover-edit.mjs +13 -11
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +1 -1
- package/fesm2022/selection.mjs +2 -2
- package/fesm2022/table-scroll-container.mjs +1 -2
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/{tabs-cBelBNjZ.mjs → tabs-BunANY1M.mjs} +17 -31
- package/fesm2022/tabs-BunANY1M.mjs.map +1 -0
- package/fesm2022/tabs.mjs +5 -4
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +3 -3
- package/{list-focus.d-1SGksIi8.d.ts → list-navigation.d-DfOSxsSp.d.ts} +90 -81
- package/listbox/index.d.ts +15 -6
- package/{listbox.d-C-LFh0S9.d.ts → listbox.d-QWPLmxRe.d.ts} +54 -21
- package/package.json +2 -2
- package/popover-edit/index.d.ts +2 -2
- package/tabs/index.d.ts +2 -2
- package/{tabs.d-BIIDt2Rf.d.ts → tabs.d-BAo141mw.d.ts} +6 -3
- package/ui-patterns/index.d.ts +3 -3
- package/fesm2022/list-focus-DtTH4bDx.mjs.map +0 -1
- package/fesm2022/option-Bgpacz3g.mjs.map +0 -1
- package/fesm2022/tabs-cBelBNjZ.mjs.map +0 -1
package/column-resize/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, AfterViewInit, OnDestroy, ElementRef, NgZone, Provider, OnInit, Injector, ViewContainerRef, ChangeDetectorRef, Type } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { CdkTable, CdkColumnDef
|
|
3
|
+
import { Subject, Observable } from 'rxjs';
|
|
4
|
+
import { CdkTable, CdkColumnDef } from '@angular/cdk/table';
|
|
5
5
|
import { Directionality } from '@angular/cdk/bidi';
|
|
6
|
-
import { OverlayRef
|
|
6
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
7
7
|
|
|
8
8
|
/** Indicates the width of a column. */
|
|
9
9
|
interface ColumnSize {
|
|
@@ -231,6 +231,40 @@ declare class ResizeRef {
|
|
|
231
231
|
constructor(origin: ElementRef, overlayRef: OverlayRef, minWidthPx: number, maxWidthPx: number, liveUpdates?: boolean);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
/**
|
|
235
|
+
* @docs-private
|
|
236
|
+
*/
|
|
237
|
+
declare class _Schedule {
|
|
238
|
+
tasks: (() => unknown)[];
|
|
239
|
+
endTasks: (() => unknown)[];
|
|
240
|
+
}
|
|
241
|
+
/** Injection token used to provide a coalesced style scheduler. */
|
|
242
|
+
declare const _COALESCED_STYLE_SCHEDULER: InjectionToken<_CoalescedStyleScheduler>;
|
|
243
|
+
/**
|
|
244
|
+
* Allows grouping up CSSDom mutations after the current execution context.
|
|
245
|
+
* This can significantly improve performance when separate consecutive functions are
|
|
246
|
+
* reading from the CSSDom and then mutating it.
|
|
247
|
+
*
|
|
248
|
+
* @docs-private
|
|
249
|
+
*/
|
|
250
|
+
declare class _CoalescedStyleScheduler {
|
|
251
|
+
private _currentSchedule;
|
|
252
|
+
private _ngZone;
|
|
253
|
+
constructor(...args: unknown[]);
|
|
254
|
+
/**
|
|
255
|
+
* Schedules the specified task to run at the end of the current VM turn.
|
|
256
|
+
*/
|
|
257
|
+
schedule(task: () => unknown): void;
|
|
258
|
+
/**
|
|
259
|
+
* Schedules the specified task to run after other scheduled tasks at the end of the current
|
|
260
|
+
* VM turn.
|
|
261
|
+
*/
|
|
262
|
+
scheduleEnd(task: () => unknown): void;
|
|
263
|
+
private _createScheduleIfNeeded;
|
|
264
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<_CoalescedStyleScheduler, never>;
|
|
265
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<_CoalescedStyleScheduler>;
|
|
266
|
+
}
|
|
267
|
+
|
|
234
268
|
/**
|
|
235
269
|
* Base class for a component shown over the edge of a resizable column that is responsible
|
|
236
270
|
* for handling column resize mouse events and displaying any visible UI on the column edge.
|
|
@@ -363,13 +397,13 @@ declare abstract class Resizable<HandleComponent extends ResizeOverlayHandle> im
|
|
|
363
397
|
protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
364
398
|
protected abstract readonly injector: Injector;
|
|
365
399
|
protected abstract readonly ngZone: NgZone;
|
|
366
|
-
protected abstract readonly overlay: Overlay;
|
|
367
400
|
protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;
|
|
368
401
|
protected abstract readonly resizeStrategy: ResizeStrategy;
|
|
369
402
|
protected abstract readonly styleScheduler: _CoalescedStyleScheduler;
|
|
370
403
|
protected abstract readonly viewContainerRef: ViewContainerRef;
|
|
371
404
|
protected abstract readonly changeDetectorRef: ChangeDetectorRef;
|
|
372
405
|
protected readonly columnSizeStore: ColumnSizeStore | null;
|
|
406
|
+
private _injector;
|
|
373
407
|
private _viewInitialized;
|
|
374
408
|
private _isDestroyed;
|
|
375
409
|
/** The minimum width to allow the column to be sized to. */
|
|
@@ -399,5 +433,5 @@ declare abstract class Resizable<HandleComponent extends ResizeOverlayHandle> im
|
|
|
399
433
|
static ɵdir: i0.ɵɵDirectiveDeclaration<Resizable<any>, never, never, {}, {}, never, never, true, never>;
|
|
400
434
|
}
|
|
401
435
|
|
|
402
|
-
export { COLUMN_RESIZE_OPTIONS, CdkColumnResize, CdkColumnResizeDefaultEnabledModule, CdkColumnResizeFlex, CdkColumnResizeModule, CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex, CdkFlexTableResizeStrategy, ColumnResize, ColumnResizeNotifier, ColumnResizeNotifierSource, ColumnSizeStore, FLEX_RESIZE_STRATEGY_PROVIDER, HeaderRowEventDispatcher, Resizable, ResizeOverlayHandle, ResizeRef, ResizeStrategy, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, TableLayoutFixedResizeStrategy };
|
|
436
|
+
export { COLUMN_RESIZE_OPTIONS, CdkColumnResize, CdkColumnResizeDefaultEnabledModule, CdkColumnResizeFlex, CdkColumnResizeModule, CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex, CdkFlexTableResizeStrategy, ColumnResize, ColumnResizeNotifier, ColumnResizeNotifierSource, ColumnSizeStore, FLEX_RESIZE_STRATEGY_PROVIDER, HeaderRowEventDispatcher, Resizable, ResizeOverlayHandle, ResizeRef, ResizeStrategy, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, TableLayoutFixedResizeStrategy, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, _Schedule };
|
|
403
437
|
export type { ColumnResizeOptions, ColumnSize, ColumnSizeAction };
|
package/combobox/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, ViewContainerRef, TemplateRef, EventEmitter,
|
|
2
|
+
import { InjectionToken, OnDestroy, ViewContainerRef, TemplateRef, EventEmitter, OnInit } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/cdk/overlay';
|
|
4
4
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
5
|
|
|
@@ -8,8 +8,8 @@ type OpenAction = 'focus' | 'click' | 'downKey' | 'toggle';
|
|
|
8
8
|
type OpenActionInput = OpenAction | OpenAction[] | string | null | undefined;
|
|
9
9
|
declare const CDK_COMBOBOX: InjectionToken<CdkCombobox<unknown>>;
|
|
10
10
|
declare class CdkCombobox<T = unknown> implements OnDestroy {
|
|
11
|
+
private readonly _tagName;
|
|
11
12
|
private readonly _elementRef;
|
|
12
|
-
private readonly _overlay;
|
|
13
13
|
protected readonly _viewContainerRef: ViewContainerRef;
|
|
14
14
|
private readonly _injector;
|
|
15
15
|
private readonly _doc;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Version } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
/** Current version of the CDK Experimental package. */
|
|
4
|
-
const VERSION = new Version('20.0.0-next.
|
|
4
|
+
const VERSION = new Version('20.0.0-next.9');
|
|
5
5
|
|
|
6
6
|
export { VERSION };
|
|
7
7
|
//# sourceMappingURL=cdk-experimental.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-experimental.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/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 CDK Experimental package. */\nexport const VERSION = new Version('20.0.0-next.
|
|
1
|
+
{"version":3,"file":"cdk-experimental.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/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 CDK Experimental package. */\nexport const VERSION = new Version('20.0.0-next.9');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Renderer2,
|
|
2
|
+
import { InjectionToken, inject, Renderer2, Directive, Input, Injectable, NgZone, CSP_NONCE, DOCUMENT, ElementRef, NgModule, Injector, runInInjectionContext, afterNextRender } from '@angular/core';
|
|
3
3
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
4
4
|
import { Subject, merge, combineLatest, Observable } from 'rxjs';
|
|
5
5
|
import { mapTo, take, takeUntil, startWith, pairwise, distinctUntilChanged, share, map, skip, filter } from 'rxjs/operators';
|
|
6
|
-
import { closest } from './polyfill-
|
|
7
|
-
import {
|
|
8
|
-
import { DOCUMENT } from '@angular/common';
|
|
6
|
+
import { c as closest } from './polyfill-CXksG4af.mjs';
|
|
7
|
+
import { CdkTable } from '@angular/cdk/table';
|
|
9
8
|
import { coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
10
9
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
10
|
+
import { createFlexibleConnectedPositionStrategy, createOverlayRef, createRepositionScrollStrategy } from '@angular/cdk/overlay';
|
|
11
11
|
import { ESCAPE } from '@angular/cdk/keycodes';
|
|
12
12
|
|
|
13
13
|
// TODO: Figure out how to remove `mat-` classes from the CDK part of the
|
|
@@ -198,6 +198,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.5",
|
|
|
198
198
|
type: Injectable
|
|
199
199
|
}] });
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* @docs-private
|
|
203
|
+
*/
|
|
204
|
+
class _Schedule {
|
|
205
|
+
tasks = [];
|
|
206
|
+
endTasks = [];
|
|
207
|
+
}
|
|
208
|
+
/** Injection token used to provide a coalesced style scheduler. */
|
|
209
|
+
const _COALESCED_STYLE_SCHEDULER = new InjectionToken('_COALESCED_STYLE_SCHEDULER');
|
|
210
|
+
/**
|
|
211
|
+
* Allows grouping up CSSDom mutations after the current execution context.
|
|
212
|
+
* This can significantly improve performance when separate consecutive functions are
|
|
213
|
+
* reading from the CSSDom and then mutating it.
|
|
214
|
+
*
|
|
215
|
+
* @docs-private
|
|
216
|
+
*/
|
|
217
|
+
class _CoalescedStyleScheduler {
|
|
218
|
+
_currentSchedule = null;
|
|
219
|
+
_ngZone = inject(NgZone);
|
|
220
|
+
constructor() { }
|
|
221
|
+
/**
|
|
222
|
+
* Schedules the specified task to run at the end of the current VM turn.
|
|
223
|
+
*/
|
|
224
|
+
schedule(task) {
|
|
225
|
+
this._createScheduleIfNeeded();
|
|
226
|
+
this._currentSchedule.tasks.push(task);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Schedules the specified task to run after other scheduled tasks at the end of the current
|
|
230
|
+
* VM turn.
|
|
231
|
+
*/
|
|
232
|
+
scheduleEnd(task) {
|
|
233
|
+
this._createScheduleIfNeeded();
|
|
234
|
+
this._currentSchedule.endTasks.push(task);
|
|
235
|
+
}
|
|
236
|
+
_createScheduleIfNeeded() {
|
|
237
|
+
if (this._currentSchedule) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
this._currentSchedule = new _Schedule();
|
|
241
|
+
this._ngZone.runOutsideAngular(() =>
|
|
242
|
+
// TODO(mmalerba): Scheduling this using something that runs less frequently
|
|
243
|
+
// (e.g. requestAnimationFrame, setTimeout, etc.) causes noticeable jank with the column
|
|
244
|
+
// resizer. We should audit the usages of schedule / scheduleEnd in that component and see
|
|
245
|
+
// if we can refactor it so that we don't need to flush the tasks quite so frequently.
|
|
246
|
+
queueMicrotask(() => {
|
|
247
|
+
while (this._currentSchedule.tasks.length || this._currentSchedule.endTasks.length) {
|
|
248
|
+
const schedule = this._currentSchedule;
|
|
249
|
+
// Capture new tasks scheduled by the current set of tasks.
|
|
250
|
+
this._currentSchedule = new _Schedule();
|
|
251
|
+
for (const task of schedule.tasks) {
|
|
252
|
+
task();
|
|
253
|
+
}
|
|
254
|
+
for (const task of schedule.endTasks) {
|
|
255
|
+
task();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
this._currentSchedule = null;
|
|
259
|
+
}));
|
|
260
|
+
}
|
|
261
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.5", ngImport: i0, type: _CoalescedStyleScheduler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
262
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.5", ngImport: i0, type: _CoalescedStyleScheduler });
|
|
263
|
+
}
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.5", ngImport: i0, type: _CoalescedStyleScheduler, decorators: [{
|
|
265
|
+
type: Injectable
|
|
266
|
+
}], ctorParameters: () => [] });
|
|
267
|
+
|
|
201
268
|
/**
|
|
202
269
|
* Provides an implementation for resizing a column.
|
|
203
270
|
* The details of how resizing works for tables for flex mat-tables are quite different.
|
|
@@ -435,6 +502,7 @@ const PROVIDERS = [
|
|
|
435
502
|
ColumnResizeNotifier,
|
|
436
503
|
HeaderRowEventDispatcher,
|
|
437
504
|
ColumnResizeNotifierSource,
|
|
505
|
+
{ provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },
|
|
438
506
|
];
|
|
439
507
|
const TABLE_PROVIDERS = [
|
|
440
508
|
...PROVIDERS,
|
|
@@ -614,6 +682,7 @@ class Resizable {
|
|
|
614
682
|
overlayRef;
|
|
615
683
|
destroyed = new Subject();
|
|
616
684
|
columnSizeStore = inject(ColumnSizeStore, { optional: true });
|
|
685
|
+
_injector = inject(Injector);
|
|
617
686
|
_viewInitialized = false;
|
|
618
687
|
_isDestroyed = false;
|
|
619
688
|
/** The minimum width to allow the column to be sized to. */
|
|
@@ -674,9 +743,7 @@ class Resizable {
|
|
|
674
743
|
// of two table cells and is also useful for displaying a resize thumb
|
|
675
744
|
// over both cells and extending it down the table as needed.
|
|
676
745
|
const isRtl = this.directionality.value === 'rtl';
|
|
677
|
-
const positionStrategy = this.
|
|
678
|
-
.position()
|
|
679
|
-
.flexibleConnectedTo(this.elementRef.nativeElement)
|
|
746
|
+
const positionStrategy = createFlexibleConnectedPositionStrategy(this._injector, this.elementRef.nativeElement)
|
|
680
747
|
.withFlexibleDimensions(false)
|
|
681
748
|
.withGrowAfterOpen(false)
|
|
682
749
|
.withPush(false)
|
|
@@ -689,12 +756,12 @@ class Resizable {
|
|
|
689
756
|
overlayY: 'top',
|
|
690
757
|
},
|
|
691
758
|
]);
|
|
692
|
-
return this.
|
|
759
|
+
return createOverlayRef(this._injector, {
|
|
693
760
|
// Always position the overlay based on left-indexed coordinates.
|
|
694
761
|
direction: 'ltr',
|
|
695
762
|
disposeOnNavigation: true,
|
|
696
763
|
positionStrategy,
|
|
697
|
-
scrollStrategy: this.
|
|
764
|
+
scrollStrategy: createRepositionScrollStrategy(this._injector),
|
|
698
765
|
width: '16px',
|
|
699
766
|
});
|
|
700
767
|
}
|
|
@@ -969,5 +1036,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.5",
|
|
|
969
1036
|
type: Directive
|
|
970
1037
|
}] });
|
|
971
1038
|
|
|
972
|
-
export { COLUMN_RESIZE_OPTIONS, CdkColumnResize, CdkColumnResizeDefaultEnabledModule, CdkColumnResizeFlex, CdkColumnResizeModule, CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex, CdkFlexTableResizeStrategy, ColumnResize, ColumnResizeNotifier, ColumnResizeNotifierSource, ColumnSizeStore, FLEX_RESIZE_STRATEGY_PROVIDER, HeaderRowEventDispatcher, Resizable, ResizeOverlayHandle, ResizeRef, ResizeStrategy, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, TableLayoutFixedResizeStrategy };
|
|
1039
|
+
export { COLUMN_RESIZE_OPTIONS, CdkColumnResize, CdkColumnResizeDefaultEnabledModule, CdkColumnResizeFlex, CdkColumnResizeModule, CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex, CdkFlexTableResizeStrategy, ColumnResize, ColumnResizeNotifier, ColumnResizeNotifierSource, ColumnSizeStore, FLEX_RESIZE_STRATEGY_PROVIDER, HeaderRowEventDispatcher, Resizable, ResizeOverlayHandle, ResizeRef, ResizeStrategy, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, TableLayoutFixedResizeStrategy, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, _Schedule };
|
|
973
1040
|
//# sourceMappingURL=column-resize.mjs.map
|