@angular/cdk-experimental 19.0.0-next.9 → 19.0.0-rc.1
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 +1 -0
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +149 -171
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +35 -33
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +180 -177
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +46 -32
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +71 -48
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +20 -20
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/package.json +2 -2
- package/selection/index.d.ts +7 -8
package/column-resize/index.d.ts
CHANGED
|
@@ -135,6 +135,7 @@ export declare class CdkFlexTableResizeStrategy extends ResizeStrategy implement
|
|
|
135
135
|
* provide common events and services for column resizing.
|
|
136
136
|
*/
|
|
137
137
|
export declare abstract class ColumnResize implements AfterViewInit, OnDestroy {
|
|
138
|
+
private _idGenerator;
|
|
138
139
|
protected readonly destroyed: Subject<void>;
|
|
139
140
|
abstract readonly columnResizeNotifier: ColumnResizeNotifier;
|
|
140
141
|
abstract readonly elementRef: ElementRef<HTMLElement>;
|
|
@@ -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('19.0.0-
|
|
4
|
+
const VERSION = new Version('19.0.0-rc.1');
|
|
5
5
|
|
|
6
6
|
export { VERSION };
|
|
7
7
|
//# sourceMappingURL=cdk-experimental.mjs.map
|
|
@@ -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.0.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.0.0-rc.1');\n"],"names":[],"mappings":";;AAUA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Injectable,
|
|
2
|
+
import { inject, Directive, Injectable, NgZone, CSP_NONCE, ElementRef, NgModule, Injector } from '@angular/core';
|
|
3
|
+
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
3
4
|
import { Subject, fromEvent, merge, combineLatest, Observable } from 'rxjs';
|
|
4
5
|
import { map, takeUntil, filter, mapTo, take, startWith, pairwise, distinctUntilChanged, share, skip } from 'rxjs/operators';
|
|
5
6
|
import { _closest } from '@angular/cdk-experimental/popover-edit';
|
|
@@ -17,17 +18,17 @@ const RESIZE_OVERLAY_SELECTOR = '.mat-column-resize-overlay-thumb';
|
|
|
17
18
|
|
|
18
19
|
const HOVER_OR_ACTIVE_CLASS = 'cdk-column-resize-hover-or-active';
|
|
19
20
|
const WITH_RESIZED_COLUMN_CLASS = 'cdk-column-resize-with-resized-column';
|
|
20
|
-
let nextId = 0;
|
|
21
21
|
/**
|
|
22
22
|
* Base class for ColumnResize directives which attach to mat-table elements to
|
|
23
23
|
* provide common events and services for column resizing.
|
|
24
24
|
*/
|
|
25
25
|
class ColumnResize {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
_idGenerator = inject(_IdGenerator);
|
|
27
|
+
destroyed = new Subject();
|
|
28
|
+
/** Unique ID for this table instance. */
|
|
29
|
+
selectorId = this._idGenerator.getId('cdk-column-resize-');
|
|
30
|
+
/** The id attribute of the table, if specified. */
|
|
31
|
+
id;
|
|
31
32
|
ngAfterViewInit() {
|
|
32
33
|
this.elementRef.nativeElement.classList.add(this.getUniqueCssClass());
|
|
33
34
|
this._listenForRowHoverEvents();
|
|
@@ -40,7 +41,7 @@ class ColumnResize {
|
|
|
40
41
|
}
|
|
41
42
|
/** Gets the unique CSS class name for this table instance. */
|
|
42
43
|
getUniqueCssClass() {
|
|
43
|
-
return
|
|
44
|
+
return this.selectorId;
|
|
44
45
|
}
|
|
45
46
|
/** Called when a column in the table is resized. Applies a css class to the table element. */
|
|
46
47
|
setResized() {
|
|
@@ -77,10 +78,10 @@ class ColumnResize {
|
|
|
77
78
|
}
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
static
|
|
81
|
-
static
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
82
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: ColumnResize, isStandalone: true, ngImport: i0 });
|
|
82
83
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResize, decorators: [{
|
|
84
85
|
type: Directive
|
|
85
86
|
}] });
|
|
86
87
|
|
|
@@ -89,27 +90,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
89
90
|
* @docs-private
|
|
90
91
|
*/
|
|
91
92
|
class ColumnResizeNotifierSource {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
101
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ColumnResizeNotifierSource }); }
|
|
93
|
+
/** Emits when an in-progress resize is canceled. */
|
|
94
|
+
resizeCanceled = new Subject();
|
|
95
|
+
/** Emits when a resize is applied. */
|
|
96
|
+
resizeCompleted = new Subject();
|
|
97
|
+
/** Triggers a resize action. */
|
|
98
|
+
triggerResize = new Subject();
|
|
99
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
100
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResizeNotifierSource });
|
|
102
101
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
|
|
104
103
|
type: Injectable
|
|
105
104
|
}] });
|
|
106
105
|
/** Service for triggering column resizes imperatively or being notified of them. */
|
|
107
106
|
class ColumnResizeNotifier {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
this.resizeCompleted = this._source.resizeCompleted;
|
|
112
|
-
}
|
|
107
|
+
_source = inject(ColumnResizeNotifierSource);
|
|
108
|
+
/** Emits whenever a column is resized. */
|
|
109
|
+
resizeCompleted = this._source.resizeCompleted;
|
|
113
110
|
/** Instantly resizes the specified column. */
|
|
114
111
|
resize(columnId, size) {
|
|
115
112
|
this._source.triggerResize.next({
|
|
@@ -119,45 +116,43 @@ class ColumnResizeNotifier {
|
|
|
119
116
|
isStickyColumn: true,
|
|
120
117
|
});
|
|
121
118
|
}
|
|
122
|
-
static
|
|
123
|
-
static
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResizeNotifier, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
120
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResizeNotifier });
|
|
124
121
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnResizeNotifier, decorators: [{
|
|
126
123
|
type: Injectable
|
|
127
124
|
}] });
|
|
128
125
|
|
|
129
126
|
/** Coordinates events between the column resize directives. */
|
|
130
127
|
class HeaderRowEventDispatcher {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
this.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this._lastSeenRowHover = null;
|
|
160
|
-
}
|
|
128
|
+
_ngZone = inject(NgZone);
|
|
129
|
+
/**
|
|
130
|
+
* Emits the currently hovered header cell or null when no header cells are hovered.
|
|
131
|
+
* Exposed publicly for events to feed in, but subscribers should use headerCellHoveredDistinct,
|
|
132
|
+
* defined below.
|
|
133
|
+
*/
|
|
134
|
+
headerCellHovered = new Subject();
|
|
135
|
+
/**
|
|
136
|
+
* Emits the header cell for which a user-triggered resize is active or null
|
|
137
|
+
* when no resize is in progress.
|
|
138
|
+
*/
|
|
139
|
+
overlayHandleActiveForCell = new Subject();
|
|
140
|
+
/** Distinct and shared version of headerCellHovered. */
|
|
141
|
+
headerCellHoveredDistinct = this.headerCellHovered.pipe(distinctUntilChanged(), share());
|
|
142
|
+
/**
|
|
143
|
+
* Emits the header that is currently hovered or hosting an active resize event (with active
|
|
144
|
+
* taking precedence).
|
|
145
|
+
*/
|
|
146
|
+
headerRowHoveredOrActiveDistinct = combineLatest([
|
|
147
|
+
this.headerCellHoveredDistinct.pipe(map(cell => _closest(cell, HEADER_ROW_SELECTOR)), startWith(null), distinctUntilChanged()),
|
|
148
|
+
this.overlayHandleActiveForCell.pipe(map(cell => _closest(cell, HEADER_ROW_SELECTOR)), startWith(null), distinctUntilChanged()),
|
|
149
|
+
]).pipe(skip(1), // Ignore initial [null, null] emission.
|
|
150
|
+
map(([hovered, active]) => active || hovered), distinctUntilChanged(), share());
|
|
151
|
+
_headerRowHoveredOrActiveDistinctReenterZone = this.headerRowHoveredOrActiveDistinct.pipe(this._enterZone(), share());
|
|
152
|
+
// Optimization: Share row events observable with subsequent callers.
|
|
153
|
+
// At startup, calls will be sequential by row (and typically there's only one).
|
|
154
|
+
_lastSeenRow = null;
|
|
155
|
+
_lastSeenRowHover = null;
|
|
161
156
|
/**
|
|
162
157
|
* Emits whether the specified row should show its overlay controls.
|
|
163
158
|
* Emission occurs within the NgZone.
|
|
@@ -176,10 +171,10 @@ class HeaderRowEventDispatcher {
|
|
|
176
171
|
complete: () => observer.complete(),
|
|
177
172
|
}));
|
|
178
173
|
}
|
|
179
|
-
static
|
|
180
|
-
static
|
|
174
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: HeaderRowEventDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
175
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: HeaderRowEventDispatcher });
|
|
181
176
|
}
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: HeaderRowEventDispatcher, decorators: [{
|
|
183
178
|
type: Injectable
|
|
184
179
|
}] });
|
|
185
180
|
|
|
@@ -188,9 +183,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
188
183
|
* The details of how resizing works for tables for flex mat-tables are quite different.
|
|
189
184
|
*/
|
|
190
185
|
class ResizeStrategy {
|
|
191
|
-
|
|
192
|
-
this._pendingResizeDelta = null;
|
|
193
|
-
}
|
|
186
|
+
_pendingResizeDelta = null;
|
|
194
187
|
/** Adjusts the width of the table element by the specified delta. */
|
|
195
188
|
updateTableWidthAndStickyColumns(delta) {
|
|
196
189
|
if (this._pendingResizeDelta === null) {
|
|
@@ -206,10 +199,10 @@ class ResizeStrategy {
|
|
|
206
199
|
}
|
|
207
200
|
this._pendingResizeDelta = (this._pendingResizeDelta ?? 0) + delta;
|
|
208
201
|
}
|
|
209
|
-
static
|
|
210
|
-
static
|
|
202
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ResizeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
203
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ResizeStrategy });
|
|
211
204
|
}
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ResizeStrategy, decorators: [{
|
|
213
206
|
type: Injectable
|
|
214
207
|
}] });
|
|
215
208
|
/**
|
|
@@ -220,12 +213,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
220
213
|
* Updating all cell nodes
|
|
221
214
|
*/
|
|
222
215
|
class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
this.styleScheduler = inject(_COALESCED_STYLE_SCHEDULER);
|
|
227
|
-
this.table = inject(CdkTable);
|
|
228
|
-
}
|
|
216
|
+
columnResize = inject(ColumnResize);
|
|
217
|
+
styleScheduler = inject(_COALESCED_STYLE_SCHEDULER);
|
|
218
|
+
table = inject(CdkTable);
|
|
229
219
|
applyColumnSize(_, columnHeader, sizeInPx, previousSizeInPx) {
|
|
230
220
|
const delta = sizeInPx - (previousSizeInPx ?? getElementWidth(columnHeader));
|
|
231
221
|
if (delta === 0) {
|
|
@@ -246,10 +236,10 @@ class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
|
246
236
|
const newWidth = Math.min(currentWidth, sizeInPx);
|
|
247
237
|
this.applyColumnSize(_, columnHeader, newWidth, currentWidth);
|
|
248
238
|
}
|
|
249
|
-
static
|
|
250
|
-
static
|
|
239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: TableLayoutFixedResizeStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
240
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: TableLayoutFixedResizeStrategy });
|
|
251
241
|
}
|
|
252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: TableLayoutFixedResizeStrategy, decorators: [{
|
|
253
243
|
type: Injectable
|
|
254
244
|
}] });
|
|
255
245
|
/**
|
|
@@ -259,19 +249,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
259
249
|
* Updating all mat-cell nodes
|
|
260
250
|
*/
|
|
261
251
|
class CdkFlexTableResizeStrategy extends ResizeStrategy {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
this.defaultMaxSize = Number.MAX_SAFE_INTEGER;
|
|
274
|
-
}
|
|
252
|
+
columnResize = inject(ColumnResize);
|
|
253
|
+
styleScheduler = inject(_COALESCED_STYLE_SCHEDULER);
|
|
254
|
+
table = inject(CdkTable);
|
|
255
|
+
_nonce = inject(CSP_NONCE, { optional: true });
|
|
256
|
+
_document = inject(DOCUMENT);
|
|
257
|
+
_columnIndexes = new Map();
|
|
258
|
+
_columnProperties = new Map();
|
|
259
|
+
_styleElement;
|
|
260
|
+
_indexSequence = 0;
|
|
261
|
+
defaultMinSize = 0;
|
|
262
|
+
defaultMaxSize = Number.MAX_SAFE_INTEGER;
|
|
275
263
|
applyColumnSize(cssFriendlyColumnName, columnHeader, sizeInPx, previousSizeInPx) {
|
|
276
264
|
// Optimization: Check applied width first as we probably set it already before reading
|
|
277
265
|
// offsetWidth which triggers layout.
|
|
@@ -361,10 +349,10 @@ class CdkFlexTableResizeStrategy extends ResizeStrategy {
|
|
|
361
349
|
const body = propertyKeys.map(key => `${key}:${properties.get(key)}`).join(';');
|
|
362
350
|
this._getStyleSheet().insertRule(`${selector} {${body}}`, index);
|
|
363
351
|
}
|
|
364
|
-
static
|
|
365
|
-
static
|
|
352
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkFlexTableResizeStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
353
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkFlexTableResizeStrategy });
|
|
366
354
|
}
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkFlexTableResizeStrategy, decorators: [{
|
|
368
356
|
type: Injectable
|
|
369
357
|
}] });
|
|
370
358
|
/** Converts CSS pixel values to numbers, eg "123px" to 123. Returns NaN for non pixel values. */
|
|
@@ -409,19 +397,16 @@ const FLEX_PROVIDERS = [...PROVIDERS, FLEX_RESIZE_STRATEGY_PROVIDER];
|
|
|
409
397
|
* Individual columns must be annotated specifically.
|
|
410
398
|
*/
|
|
411
399
|
class CdkColumnResize extends ColumnResize {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkColumnResize, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
422
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkColumnResize, isStandalone: true, selector: "table[cdk-table][columnResize]", providers: [...TABLE_PROVIDERS, { provide: ColumnResize, useExisting: CdkColumnResize }], usesInheritance: true, ngImport: i0 }); }
|
|
400
|
+
columnResizeNotifier = inject(ColumnResizeNotifier);
|
|
401
|
+
elementRef = inject(ElementRef);
|
|
402
|
+
eventDispatcher = inject(HeaderRowEventDispatcher);
|
|
403
|
+
ngZone = inject(NgZone);
|
|
404
|
+
notifier = inject(ColumnResizeNotifierSource);
|
|
405
|
+
table = inject(CdkTable);
|
|
406
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResize, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
407
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: CdkColumnResize, isStandalone: true, selector: "table[cdk-table][columnResize]", providers: [...TABLE_PROVIDERS, { provide: ColumnResize, useExisting: CdkColumnResize }], usesInheritance: true, ngImport: i0 });
|
|
423
408
|
}
|
|
424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResize, decorators: [{
|
|
425
410
|
type: Directive,
|
|
426
411
|
args: [{
|
|
427
412
|
selector: 'table[cdk-table][columnResize]',
|
|
@@ -434,19 +419,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
434
419
|
* Individual columns must be annotated specifically.
|
|
435
420
|
*/
|
|
436
421
|
class CdkColumnResizeFlex extends ColumnResize {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkColumnResizeFlex, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
447
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkColumnResizeFlex, isStandalone: true, selector: "cdk-table[columnResize]", providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: CdkColumnResizeFlex }], usesInheritance: true, ngImport: i0 }); }
|
|
422
|
+
columnResizeNotifier = inject(ColumnResizeNotifier);
|
|
423
|
+
elementRef = inject(ElementRef);
|
|
424
|
+
eventDispatcher = inject(HeaderRowEventDispatcher);
|
|
425
|
+
ngZone = inject(NgZone);
|
|
426
|
+
notifier = inject(ColumnResizeNotifierSource);
|
|
427
|
+
table = inject(CdkTable);
|
|
428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeFlex, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
429
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: CdkColumnResizeFlex, isStandalone: true, selector: "cdk-table[columnResize]", providers: [...FLEX_PROVIDERS, { provide: ColumnResize, useExisting: CdkColumnResizeFlex }], usesInheritance: true, ngImport: i0 });
|
|
448
430
|
}
|
|
449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeFlex, decorators: [{
|
|
450
432
|
type: Directive,
|
|
451
433
|
args: [{
|
|
452
434
|
selector: 'cdk-table[columnResize]',
|
|
@@ -459,22 +441,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
459
441
|
* Individual columns will be resizable unless opted out.
|
|
460
442
|
*/
|
|
461
443
|
class CdkDefaultEnabledColumnResize extends ColumnResize {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkDefaultEnabledColumnResize, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
472
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkDefaultEnabledColumnResize, isStandalone: true, selector: "table[cdk-table]", providers: [
|
|
444
|
+
columnResizeNotifier = inject(ColumnResizeNotifier);
|
|
445
|
+
elementRef = inject(ElementRef);
|
|
446
|
+
eventDispatcher = inject(HeaderRowEventDispatcher);
|
|
447
|
+
ngZone = inject(NgZone);
|
|
448
|
+
notifier = inject(ColumnResizeNotifierSource);
|
|
449
|
+
table = inject(CdkTable);
|
|
450
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResize, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
451
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: CdkDefaultEnabledColumnResize, isStandalone: true, selector: "table[cdk-table]", providers: [
|
|
473
452
|
...TABLE_PROVIDERS,
|
|
474
453
|
{ provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResize },
|
|
475
|
-
], usesInheritance: true, ngImport: i0 });
|
|
454
|
+
], usesInheritance: true, ngImport: i0 });
|
|
476
455
|
}
|
|
477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResize, decorators: [{
|
|
478
457
|
type: Directive,
|
|
479
458
|
args: [{
|
|
480
459
|
selector: 'table[cdk-table]',
|
|
@@ -490,22 +469,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
490
469
|
* Individual columns will be resizable unless opted out.
|
|
491
470
|
*/
|
|
492
471
|
class CdkDefaultEnabledColumnResizeFlex extends ColumnResize {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkDefaultEnabledColumnResizeFlex, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
503
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkDefaultEnabledColumnResizeFlex, isStandalone: true, selector: "cdk-table", providers: [
|
|
472
|
+
columnResizeNotifier = inject(ColumnResizeNotifier);
|
|
473
|
+
elementRef = inject(ElementRef);
|
|
474
|
+
eventDispatcher = inject(HeaderRowEventDispatcher);
|
|
475
|
+
ngZone = inject(NgZone);
|
|
476
|
+
notifier = inject(ColumnResizeNotifierSource);
|
|
477
|
+
table = inject(CdkTable);
|
|
478
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResizeFlex, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
479
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: CdkDefaultEnabledColumnResizeFlex, isStandalone: true, selector: "cdk-table", providers: [
|
|
504
480
|
...FLEX_PROVIDERS,
|
|
505
481
|
{ provide: ColumnResize, useExisting: CdkDefaultEnabledColumnResizeFlex },
|
|
506
|
-
], usesInheritance: true, ngImport: i0 });
|
|
482
|
+
], usesInheritance: true, ngImport: i0 });
|
|
507
483
|
}
|
|
508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkDefaultEnabledColumnResizeFlex, decorators: [{
|
|
509
485
|
type: Directive,
|
|
510
486
|
args: [{
|
|
511
487
|
selector: 'cdk-table',
|
|
@@ -521,11 +497,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
521
497
|
* When using this module, columns are resizable by default.
|
|
522
498
|
*/
|
|
523
499
|
class CdkColumnResizeDefaultEnabledModule {
|
|
524
|
-
static
|
|
525
|
-
static
|
|
526
|
-
static
|
|
500
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
501
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule, imports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex], exports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex] });
|
|
502
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule });
|
|
527
503
|
}
|
|
528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeDefaultEnabledModule, decorators: [{
|
|
529
505
|
type: NgModule,
|
|
530
506
|
args: [{
|
|
531
507
|
imports: [CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex],
|
|
@@ -537,11 +513,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
537
513
|
* When using this module, columns are not resizable by default.
|
|
538
514
|
*/
|
|
539
515
|
class CdkColumnResizeModule {
|
|
540
|
-
static
|
|
541
|
-
static
|
|
542
|
-
static
|
|
516
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
517
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeModule, imports: [CdkColumnResize, CdkColumnResizeFlex], exports: [CdkColumnResize, CdkColumnResizeFlex] });
|
|
518
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeModule });
|
|
543
519
|
}
|
|
544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: CdkColumnResizeModule, decorators: [{
|
|
545
521
|
type: NgModule,
|
|
546
522
|
args: [{
|
|
547
523
|
imports: [CdkColumnResize, CdkColumnResizeFlex],
|
|
@@ -553,15 +529,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
553
529
|
* Can be provided by the host application to enable persistence of column resize state.
|
|
554
530
|
*/
|
|
555
531
|
class ColumnSizeStore {
|
|
556
|
-
static
|
|
557
|
-
static
|
|
532
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnSizeStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
533
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnSizeStore });
|
|
558
534
|
}
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ColumnSizeStore, decorators: [{
|
|
560
536
|
type: Injectable
|
|
561
537
|
}] });
|
|
562
538
|
|
|
563
539
|
/** Tracks state of resize events in progress. */
|
|
564
540
|
class ResizeRef {
|
|
541
|
+
origin;
|
|
542
|
+
overlayRef;
|
|
543
|
+
minWidthPx;
|
|
544
|
+
maxWidthPx;
|
|
565
545
|
constructor(origin, overlayRef, minWidthPx, maxWidthPx) {
|
|
566
546
|
this.origin = origin;
|
|
567
547
|
this.overlayRef = overlayRef;
|
|
@@ -576,13 +556,13 @@ const OVERLAY_ACTIVE_CLASS = 'cdk-resizable-overlay-thumb-active';
|
|
|
576
556
|
* resizable.
|
|
577
557
|
*/
|
|
578
558
|
class Resizable {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
559
|
+
minWidthPxInternal = 0;
|
|
560
|
+
maxWidthPxInternal = Number.MAX_SAFE_INTEGER;
|
|
561
|
+
inlineHandle;
|
|
562
|
+
overlayRef;
|
|
563
|
+
destroyed = new Subject();
|
|
564
|
+
_viewInitialized = false;
|
|
565
|
+
_isDestroyed = false;
|
|
586
566
|
/** The minimum width to allow the column to be sized to. */
|
|
587
567
|
get minWidthPx() {
|
|
588
568
|
return this.minWidthPxInternal;
|
|
@@ -747,10 +727,10 @@ class Resizable {
|
|
|
747
727
|
this.elementRef.nativeElement.appendChild(this.inlineHandle);
|
|
748
728
|
});
|
|
749
729
|
}
|
|
750
|
-
static
|
|
751
|
-
static
|
|
730
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: Resizable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
731
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: Resizable, isStandalone: true, ngImport: i0 });
|
|
752
732
|
}
|
|
753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: Resizable, decorators: [{
|
|
754
734
|
type: Directive
|
|
755
735
|
}] });
|
|
756
736
|
|
|
@@ -761,9 +741,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
761
741
|
* for handling column resize mouse events and displaying any visible UI on the column edge.
|
|
762
742
|
*/
|
|
763
743
|
class ResizeOverlayHandle {
|
|
764
|
-
|
|
765
|
-
this.destroyed = new Subject();
|
|
766
|
-
}
|
|
744
|
+
destroyed = new Subject();
|
|
767
745
|
ngAfterViewInit() {
|
|
768
746
|
this._listenForMouseEvents();
|
|
769
747
|
}
|
|
@@ -878,10 +856,10 @@ class ResizeOverlayHandle {
|
|
|
878
856
|
}
|
|
879
857
|
});
|
|
880
858
|
}
|
|
881
|
-
static
|
|
882
|
-
static
|
|
859
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ResizeOverlayHandle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
860
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: ResizeOverlayHandle, isStandalone: true, ngImport: i0 });
|
|
883
861
|
}
|
|
884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
862
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: ResizeOverlayHandle, decorators: [{
|
|
885
863
|
type: Directive
|
|
886
864
|
}] });
|
|
887
865
|
|