@angular/cdk-experimental 19.1.0-next.3 → 19.1.0
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/LICENSE +1 -1
- package/column-resize/index.d.ts +13 -2
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +105 -68
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +10 -10
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +52 -66
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +7 -7
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +19 -19
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +7 -7
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/package.json +3 -3
- package/popover-edit/index.d.ts +0 -2
package/LICENSE
CHANGED
package/column-resize/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { Injector } from '@angular/core';
|
|
|
11
11
|
import { NgZone } from '@angular/core';
|
|
12
12
|
import { Observable } from 'rxjs';
|
|
13
13
|
import { OnDestroy } from '@angular/core';
|
|
14
|
+
import { OnInit } from '@angular/core';
|
|
14
15
|
import { Overlay } from '@angular/cdk/overlay';
|
|
15
16
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
16
17
|
import { Provider } from '@angular/core';
|
|
@@ -301,7 +302,7 @@ declare namespace i4 {
|
|
|
301
302
|
* Base class for Resizable directives which are applied to column headers to make those columns
|
|
302
303
|
* resizable.
|
|
303
304
|
*/
|
|
304
|
-
export declare abstract class Resizable<HandleComponent extends ResizeOverlayHandle> implements AfterViewInit, OnDestroy {
|
|
305
|
+
export declare abstract class Resizable<HandleComponent extends ResizeOverlayHandle> implements AfterViewInit, OnDestroy, OnInit {
|
|
305
306
|
protected minWidthPxInternal: number;
|
|
306
307
|
protected maxWidthPxInternal: number;
|
|
307
308
|
protected inlineHandle?: HTMLElement;
|
|
@@ -330,6 +331,7 @@ export declare abstract class Resizable<HandleComponent extends ResizeOverlayHan
|
|
|
330
331
|
/** The maximum width to allow the column to be sized to. */
|
|
331
332
|
get maxWidthPx(): number;
|
|
332
333
|
set maxWidthPx(value: number);
|
|
334
|
+
ngOnInit(): void;
|
|
333
335
|
ngAfterViewInit(): void;
|
|
334
336
|
ngOnDestroy(): void;
|
|
335
337
|
protected abstract getInlineHandleCssClassName(): string;
|
|
@@ -398,11 +400,14 @@ export declare class ResizeRef {
|
|
|
398
400
|
* Provides an implementation for resizing a column.
|
|
399
401
|
* The details of how resizing works for tables for flex mat-tables are quite different.
|
|
400
402
|
*/
|
|
401
|
-
export declare abstract class ResizeStrategy {
|
|
403
|
+
export declare abstract class ResizeStrategy implements OnDestroy {
|
|
402
404
|
protected abstract readonly columnResize: ColumnResize;
|
|
403
405
|
protected abstract readonly styleScheduler: _CoalescedStyleScheduler;
|
|
404
406
|
protected abstract readonly table: CdkTable<unknown>;
|
|
405
407
|
private _pendingResizeDelta;
|
|
408
|
+
private _tableObserved;
|
|
409
|
+
private _elemSizeCache;
|
|
410
|
+
private _resizeObserver;
|
|
406
411
|
/** Updates the width of the specified column. */
|
|
407
412
|
abstract applyColumnSize(cssFriendlyColumnName: string, columnHeader: HTMLElement, sizeInPx: number, previousSizeInPx?: number): void;
|
|
408
413
|
/** Applies a minimum width to the specified column, updating its current width as needed. */
|
|
@@ -411,6 +416,12 @@ export declare abstract class ResizeStrategy {
|
|
|
411
416
|
abstract applyMaxColumnSize(cssFriendlyColumnName: string, columnHeader: HTMLElement, minSizeInPx: number): void;
|
|
412
417
|
/** Adjusts the width of the table element by the specified delta. */
|
|
413
418
|
protected updateTableWidthAndStickyColumns(delta: number): void;
|
|
419
|
+
/** Gets the style.width pixels on the specified element if present, otherwise its offsetWidth. */
|
|
420
|
+
protected getElementWidth(element: HTMLElement): number;
|
|
421
|
+
/** Informs the ResizeStrategy instance of a column that may be resized in the future. */
|
|
422
|
+
registerColumn(column: HTMLElement): void;
|
|
423
|
+
ngOnDestroy(): void;
|
|
424
|
+
private _updateCachedSizes;
|
|
414
425
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResizeStrategy, never>;
|
|
415
426
|
static ɵprov: i0.ɵɵInjectableDeclaration<ResizeStrategy>;
|
|
416
427
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdk-experimental.mjs","sources":["../../../../../../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('19.1.0
|
|
1
|
+
{"version":3,"file":"cdk-experimental.mjs","sources":["../../../../../../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('19.1.0');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
|
@@ -94,10 +94,10 @@ class ColumnResize {
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
98
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-
|
|
97
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
98
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: ColumnResize, isStandalone: true, inputs: { liveResizeUpdates: "liveResizeUpdates" }, ngImport: i0 });
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResize, decorators: [{
|
|
101
101
|
type: Directive
|
|
102
102
|
}], propDecorators: { liveResizeUpdates: [{
|
|
103
103
|
type: Input
|
|
@@ -114,10 +114,10 @@ class ColumnResizeNotifierSource {
|
|
|
114
114
|
resizeCompleted = new Subject();
|
|
115
115
|
/** Triggers a resize action. */
|
|
116
116
|
triggerResize = new Subject();
|
|
117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
118
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-
|
|
117
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
118
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResizeNotifierSource });
|
|
119
119
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
|
|
121
121
|
type: Injectable
|
|
122
122
|
}] });
|
|
123
123
|
/** Service for triggering column resizes imperatively or being notified of them. */
|
|
@@ -134,10 +134,10 @@ class ColumnResizeNotifier {
|
|
|
134
134
|
isStickyColumn: true,
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
138
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResizeNotifier, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
138
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResizeNotifier });
|
|
139
139
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnResizeNotifier, decorators: [{
|
|
141
141
|
type: Injectable
|
|
142
142
|
}] });
|
|
143
143
|
|
|
@@ -189,10 +189,10 @@ class HeaderRowEventDispatcher {
|
|
|
189
189
|
complete: () => observer.complete(),
|
|
190
190
|
}));
|
|
191
191
|
}
|
|
192
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
193
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-
|
|
192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: HeaderRowEventDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
193
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: HeaderRowEventDispatcher });
|
|
194
194
|
}
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: HeaderRowEventDispatcher, decorators: [{
|
|
196
196
|
type: Injectable
|
|
197
197
|
}] });
|
|
198
198
|
|
|
@@ -202,11 +202,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3",
|
|
|
202
202
|
*/
|
|
203
203
|
class ResizeStrategy {
|
|
204
204
|
_pendingResizeDelta = null;
|
|
205
|
+
_tableObserved = false;
|
|
206
|
+
_elemSizeCache = new WeakMap();
|
|
207
|
+
_resizeObserver = globalThis?.ResizeObserver
|
|
208
|
+
? new globalThis.ResizeObserver(entries => this._updateCachedSizes(entries))
|
|
209
|
+
: null;
|
|
205
210
|
/** Adjusts the width of the table element by the specified delta. */
|
|
206
211
|
updateTableWidthAndStickyColumns(delta) {
|
|
207
212
|
if (this._pendingResizeDelta === null) {
|
|
208
213
|
const tableElement = this.columnResize.elementRef.nativeElement;
|
|
209
|
-
const tableWidth = getElementWidth(tableElement);
|
|
214
|
+
const tableWidth = this.getElementWidth(tableElement);
|
|
210
215
|
this.styleScheduler.schedule(() => {
|
|
211
216
|
tableElement.style.width = coerceCssPixelValue(tableWidth + this._pendingResizeDelta);
|
|
212
217
|
this._pendingResizeDelta = null;
|
|
@@ -217,10 +222,45 @@ class ResizeStrategy {
|
|
|
217
222
|
}
|
|
218
223
|
this._pendingResizeDelta = (this._pendingResizeDelta ?? 0) + delta;
|
|
219
224
|
}
|
|
220
|
-
|
|
221
|
-
|
|
225
|
+
/** Gets the style.width pixels on the specified element if present, otherwise its offsetWidth. */
|
|
226
|
+
getElementWidth(element) {
|
|
227
|
+
// Optimization: Check style.width first as we probably set it already before reading
|
|
228
|
+
// offsetWidth which triggers layout.
|
|
229
|
+
return (coercePixelsFromCssValue(element.style.width) ||
|
|
230
|
+
this._elemSizeCache.get(element)?.width ||
|
|
231
|
+
element.offsetWidth);
|
|
232
|
+
}
|
|
233
|
+
/** Informs the ResizeStrategy instance of a column that may be resized in the future. */
|
|
234
|
+
registerColumn(column) {
|
|
235
|
+
if (!this._tableObserved) {
|
|
236
|
+
this._tableObserved = true;
|
|
237
|
+
this._resizeObserver?.observe(this.columnResize.elementRef.nativeElement, {
|
|
238
|
+
box: 'border-box',
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
this._resizeObserver?.observe(column, { box: 'border-box' });
|
|
242
|
+
}
|
|
243
|
+
ngOnDestroy() {
|
|
244
|
+
this._resizeObserver?.disconnect();
|
|
245
|
+
}
|
|
246
|
+
_updateCachedSizes(entries) {
|
|
247
|
+
for (const entry of entries) {
|
|
248
|
+
const newEntry = entry.borderBoxSize?.length
|
|
249
|
+
? {
|
|
250
|
+
width: entry.borderBoxSize[0].inlineSize,
|
|
251
|
+
height: entry.borderBoxSize[0].blockSize,
|
|
252
|
+
}
|
|
253
|
+
: {
|
|
254
|
+
width: entry.contentRect.width,
|
|
255
|
+
height: entry.contentRect.height,
|
|
256
|
+
};
|
|
257
|
+
this._elemSizeCache.set(entry.target, newEntry);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ResizeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
261
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ResizeStrategy });
|
|
222
262
|
}
|
|
223
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ResizeStrategy, decorators: [{
|
|
224
264
|
type: Injectable
|
|
225
265
|
}] });
|
|
226
266
|
/**
|
|
@@ -235,7 +275,7 @@ class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
|
235
275
|
styleScheduler = inject(_COALESCED_STYLE_SCHEDULER);
|
|
236
276
|
table = inject(CdkTable);
|
|
237
277
|
applyColumnSize(_, columnHeader, sizeInPx, previousSizeInPx) {
|
|
238
|
-
const delta = sizeInPx - (previousSizeInPx ?? getElementWidth(columnHeader));
|
|
278
|
+
const delta = sizeInPx - (previousSizeInPx ?? this.getElementWidth(columnHeader));
|
|
239
279
|
if (delta === 0) {
|
|
240
280
|
return;
|
|
241
281
|
}
|
|
@@ -245,19 +285,19 @@ class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
|
245
285
|
this.updateTableWidthAndStickyColumns(delta);
|
|
246
286
|
}
|
|
247
287
|
applyMinColumnSize(_, columnHeader, sizeInPx) {
|
|
248
|
-
const currentWidth = getElementWidth(columnHeader);
|
|
288
|
+
const currentWidth = this.getElementWidth(columnHeader);
|
|
249
289
|
const newWidth = Math.max(currentWidth, sizeInPx);
|
|
250
290
|
this.applyColumnSize(_, columnHeader, newWidth, currentWidth);
|
|
251
291
|
}
|
|
252
292
|
applyMaxColumnSize(_, columnHeader, sizeInPx) {
|
|
253
|
-
const currentWidth = getElementWidth(columnHeader);
|
|
293
|
+
const currentWidth = this.getElementWidth(columnHeader);
|
|
254
294
|
const newWidth = Math.min(currentWidth, sizeInPx);
|
|
255
295
|
this.applyColumnSize(_, columnHeader, newWidth, currentWidth);
|
|
256
296
|
}
|
|
257
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
258
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-
|
|
297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: TableLayoutFixedResizeStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
298
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: TableLayoutFixedResizeStrategy });
|
|
259
299
|
}
|
|
260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: TableLayoutFixedResizeStrategy, decorators: [{
|
|
261
301
|
type: Injectable
|
|
262
302
|
}] });
|
|
263
303
|
/**
|
|
@@ -305,6 +345,7 @@ class CdkFlexTableResizeStrategy extends ResizeStrategy {
|
|
|
305
345
|
return `cdk-column-${cssFriendlyColumnName}`;
|
|
306
346
|
}
|
|
307
347
|
ngOnDestroy() {
|
|
348
|
+
super.ngOnDestroy();
|
|
308
349
|
this._styleElement?.remove();
|
|
309
350
|
this._styleElement = undefined;
|
|
310
351
|
}
|
|
@@ -367,22 +408,16 @@ class CdkFlexTableResizeStrategy extends ResizeStrategy {
|
|
|
367
408
|
const body = propertyKeys.map(key => `${key}:${properties.get(key)}`).join(';');
|
|
368
409
|
this._getStyleSheet().insertRule(`${selector} {${body}}`, index);
|
|
369
410
|
}
|
|
370
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
371
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-
|
|
411
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkFlexTableResizeStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
412
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkFlexTableResizeStrategy });
|
|
372
413
|
}
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkFlexTableResizeStrategy, decorators: [{
|
|
374
415
|
type: Injectable
|
|
375
416
|
}] });
|
|
376
417
|
/** Converts CSS pixel values to numbers, eg "123px" to 123. Returns NaN for non pixel values. */
|
|
377
418
|
function coercePixelsFromCssValue(cssValue) {
|
|
378
419
|
return Number(cssValue.match(/(\d+)px/)?.[1]);
|
|
379
420
|
}
|
|
380
|
-
/** Gets the style.width pixels on the specified element if present, otherwise its offsetWidth. */
|
|
381
|
-
function getElementWidth(element) {
|
|
382
|
-
// Optimization: Check style.width first as we probably set it already before reading
|
|
383
|
-
// offsetWidth which triggers layout.
|
|
384
|
-
return coercePixelsFromCssValue(element.style.width) || element.offsetWidth;
|
|
385
|
-
}
|
|
386
421
|
/**
|
|
387
422
|
* Converts CSS flex values as set in CdkFlexTableResizeStrategy to numbers,
|
|
388
423
|
* eg "0 0.01 123px" to 123.
|
|
@@ -421,10 +456,10 @@ class CdkColumnResize extends ColumnResize {
|
|
|
421
456
|
ngZone = inject(NgZone);
|
|
422
457
|
notifier = inject(ColumnResizeNotifierSource);
|
|
423
458
|
table = inject(CdkTable);
|
|
424
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
425
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-
|
|
459
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResize, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
460
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: CdkColumnResize, isStandalone: true, selector: "table[cdk-table][columnResize]", providers: [...TABLE_PROVIDERS, { provide: ColumnResize, useExisting: CdkColumnResize }], usesInheritance: true, ngImport: i0 });
|
|
426
461
|
}
|
|
427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResize, decorators: [{
|
|
428
463
|
type: Directive,
|
|
429
464
|
args: [{
|
|
430
465
|
selector: 'table[cdk-table][columnResize]',
|
|
@@ -443,10 +478,10 @@ class CdkColumnResizeFlex extends ColumnResize {
|
|
|
443
478
|
ngZone = inject(NgZone);
|
|
444
479
|
notifier = inject(ColumnResizeNotifierSource);
|
|
445
480
|
table = inject(CdkTable);
|
|
446
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
447
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-
|
|
481
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeFlex, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
482
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: CdkColumnResizeFlex, isStandalone: true, selector: "cdk-table[columnResize]", providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: CdkColumnResizeFlex }], usesInheritance: true, ngImport: i0 });
|
|
448
483
|
}
|
|
449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeFlex, decorators: [{
|
|
450
485
|
type: Directive,
|
|
451
486
|
args: [{
|
|
452
487
|
selector: 'cdk-table[columnResize]',
|
|
@@ -465,13 +500,13 @@ class CdkDefaultEnabledColumnResize extends ColumnResize {
|
|
|
465
500
|
ngZone = inject(NgZone);
|
|
466
501
|
notifier = inject(ColumnResizeNotifierSource);
|
|
467
502
|
table = inject(CdkTable);
|
|
468
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
469
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-
|
|
503
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResize, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
504
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: CdkDefaultEnabledColumnResize, isStandalone: true, selector: "table[cdk-table]", providers: [
|
|
470
505
|
...TABLE_PROVIDERS,
|
|
471
506
|
{ provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResize },
|
|
472
507
|
], usesInheritance: true, ngImport: i0 });
|
|
473
508
|
}
|
|
474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResize, decorators: [{
|
|
475
510
|
type: Directive,
|
|
476
511
|
args: [{
|
|
477
512
|
selector: 'table[cdk-table]',
|
|
@@ -493,13 +528,13 @@ class CdkDefaultEnabledColumnResizeFlex extends ColumnResize {
|
|
|
493
528
|
ngZone = inject(NgZone);
|
|
494
529
|
notifier = inject(ColumnResizeNotifierSource);
|
|
495
530
|
table = inject(CdkTable);
|
|
496
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
497
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-
|
|
531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResizeFlex, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
532
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: CdkDefaultEnabledColumnResizeFlex, isStandalone: true, selector: "cdk-table", providers: [
|
|
498
533
|
...FLEX_PROVIDERS,
|
|
499
534
|
{ provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResizeFlex },
|
|
500
535
|
], usesInheritance: true, ngImport: i0 });
|
|
501
536
|
}
|
|
502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResizeFlex, decorators: [{
|
|
503
538
|
type: Directive,
|
|
504
539
|
args: [{
|
|
505
540
|
selector: 'cdk-table',
|
|
@@ -515,11 +550,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3",
|
|
|
515
550
|
* When using this module, columns are resizable by default.
|
|
516
551
|
*/
|
|
517
552
|
class CdkColumnResizeDefaultEnabledModule {
|
|
518
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
519
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-
|
|
520
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-
|
|
553
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
554
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule, imports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex], exports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex] });
|
|
555
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule });
|
|
521
556
|
}
|
|
522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule, decorators: [{
|
|
523
558
|
type: NgModule,
|
|
524
559
|
args: [{
|
|
525
560
|
imports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex],
|
|
@@ -531,11 +566,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3",
|
|
|
531
566
|
* When using this module, columns are not resizable by default.
|
|
532
567
|
*/
|
|
533
568
|
class CdkColumnResizeModule {
|
|
534
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
535
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-
|
|
536
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-
|
|
569
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
570
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeModule, imports: [CdkColumnResize, CdkColumnResizeFlex], exports: [CdkColumnResize, CdkColumnResizeFlex] });
|
|
571
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeModule });
|
|
537
572
|
}
|
|
538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: CdkColumnResizeModule, decorators: [{
|
|
539
574
|
type: NgModule,
|
|
540
575
|
args: [{
|
|
541
576
|
imports: [CdkColumnResize, CdkColumnResizeFlex],
|
|
@@ -547,10 +582,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3",
|
|
|
547
582
|
* Can be provided by the host application to enable persistence of column resize state.
|
|
548
583
|
*/
|
|
549
584
|
class ColumnSizeStore {
|
|
550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
551
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-
|
|
585
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnSizeStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
586
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnSizeStore });
|
|
552
587
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ColumnSizeStore, decorators: [{
|
|
554
589
|
type: Injectable
|
|
555
590
|
}] });
|
|
556
591
|
|
|
@@ -606,6 +641,9 @@ class Resizable {
|
|
|
606
641
|
this._applyMaxWidthPx();
|
|
607
642
|
}
|
|
608
643
|
}
|
|
644
|
+
ngOnInit() {
|
|
645
|
+
this.resizeStrategy.registerColumn(this.elementRef.nativeElement);
|
|
646
|
+
}
|
|
609
647
|
ngAfterViewInit() {
|
|
610
648
|
this._listenForRowHoverEvents();
|
|
611
649
|
this._listenForResizeEvents();
|
|
@@ -754,18 +792,17 @@ class Resizable {
|
|
|
754
792
|
this.resizeStrategy.applyMaxColumnSize(this.columnDef.cssClassFriendlyName, this.elementRef.nativeElement, this.maxWidthPx);
|
|
755
793
|
}
|
|
756
794
|
_appendInlineHandle() {
|
|
757
|
-
this.
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
static
|
|
766
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-next.3", type: Resizable, isStandalone: true, ngImport: i0 });
|
|
795
|
+
this.inlineHandle = this.document.createElement('div');
|
|
796
|
+
// TODO: re-apply tab index once this element has behavior.
|
|
797
|
+
// this.inlineHandle.tabIndex = 0;
|
|
798
|
+
this.inlineHandle.className = this.getInlineHandleCssClassName();
|
|
799
|
+
// TODO: Apply correct aria role (probably slider) after a11y spec questions resolved.
|
|
800
|
+
this.elementRef.nativeElement.appendChild(this.inlineHandle);
|
|
801
|
+
}
|
|
802
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: Resizable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
803
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: Resizable, isStandalone: true, ngImport: i0 });
|
|
767
804
|
}
|
|
768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: Resizable, decorators: [{
|
|
769
806
|
type: Directive
|
|
770
807
|
}] });
|
|
771
808
|
|
|
@@ -922,10 +959,10 @@ class ResizeOverlayHandle {
|
|
|
922
959
|
};
|
|
923
960
|
});
|
|
924
961
|
}
|
|
925
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-
|
|
926
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-
|
|
962
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ResizeOverlayHandle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
963
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-rc.0", type: ResizeOverlayHandle, isStandalone: true, ngImport: i0 });
|
|
927
964
|
}
|
|
928
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-
|
|
965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: ResizeOverlayHandle, decorators: [{
|
|
929
966
|
type: Directive
|
|
930
967
|
}] });
|
|
931
968
|
|