@angular/cdk-experimental 20.0.0-next.0 → 20.0.0-next.2
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 +247 -295
- package/combobox/index.d.ts +13 -38
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +56 -60
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +10 -14
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/listbox.mjs +7 -11
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/option-2e2b2e64.mjs +606 -0
- package/fesm2022/option-2e2b2e64.mjs.map +1 -0
- package/fesm2022/polyfill-ae40ec6f.mjs +14 -0
- package/fesm2022/polyfill-ae40ec6f.mjs.map +1 -0
- package/fesm2022/popover-edit.mjs +47 -63
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +7 -11
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +19 -27
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +7 -11
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +9 -602
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/listbox/index.d.ts +23 -29
- package/listbox.d-113f9ff8.d.ts +378 -0
- package/package.json +2 -2
- package/popover-edit/index.d.ts +268 -316
- package/scrolling/index.d.ts +34 -47
- package/selection/index.d.ts +118 -161
- package/table-scroll-container/index.d.ts +6 -14
- package/ui-patterns/index.d.ts +2 -391
package/column-resize/index.d.ts
CHANGED
|
@@ -1,29 +1,140 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
2
|
-
import { CdkColumnDef } from '@angular/cdk/table';
|
|
3
|
-
import { CdkTable } from '@angular/cdk/table';
|
|
4
|
-
import { ChangeDetectorRef } from '@angular/core';
|
|
5
|
-
import { _CoalescedStyleScheduler } from '@angular/cdk/table';
|
|
6
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
7
|
-
import { ElementRef } from '@angular/core';
|
|
8
1
|
import * as i0 from '@angular/core';
|
|
9
|
-
import { InjectionToken } from '@angular/core';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
import { InjectionToken, AfterViewInit, OnDestroy, ElementRef, NgZone, Provider, OnInit, Injector, ViewContainerRef, ChangeDetectorRef, Type } from '@angular/core';
|
|
3
|
+
import { Subject, Observable } from 'rxjs';
|
|
4
|
+
import { CdkTable, CdkColumnDef, _CoalescedStyleScheduler } from '@angular/cdk/table';
|
|
5
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
6
|
+
import { OverlayRef, Overlay } from '@angular/cdk/overlay';
|
|
7
|
+
|
|
8
|
+
/** Indicates the width of a column. */
|
|
9
|
+
interface ColumnSize {
|
|
10
|
+
/** The ID/name of the column, as defined in CdkColumnDef. */
|
|
11
|
+
readonly columnId: string;
|
|
12
|
+
/** The width in pixels of the column. */
|
|
13
|
+
readonly size: number;
|
|
14
|
+
/** The width in pixels of the column prior to this update, if known. */
|
|
15
|
+
readonly previousSize?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Interface describing column size changes. */
|
|
18
|
+
interface ColumnSizeAction extends ColumnSize {
|
|
19
|
+
/**
|
|
20
|
+
* Whether the resize action should be applied instantaneously. False for events triggered during
|
|
21
|
+
* a UI-triggered resize (such as with the mouse) until the mouse button is released. True
|
|
22
|
+
* for all programmatically triggered resizes.
|
|
23
|
+
*/
|
|
24
|
+
readonly completeImmediately?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the resize action is being applied to a sticky/stickyEnd column.
|
|
27
|
+
*/
|
|
28
|
+
readonly isStickyColumn?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Originating source of column resize events within a table.
|
|
32
|
+
* @docs-private
|
|
33
|
+
*/
|
|
34
|
+
declare class ColumnResizeNotifierSource {
|
|
35
|
+
/** Emits when an in-progress resize is canceled. */
|
|
36
|
+
readonly resizeCanceled: Subject<ColumnSizeAction>;
|
|
37
|
+
/** Emits when a resize is applied. */
|
|
38
|
+
readonly resizeCompleted: Subject<ColumnSize>;
|
|
39
|
+
/** Triggers a resize action. */
|
|
40
|
+
readonly triggerResize: Subject<ColumnSizeAction>;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnResizeNotifierSource, never>;
|
|
42
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ColumnResizeNotifierSource>;
|
|
43
|
+
}
|
|
44
|
+
/** Service for triggering column resizes imperatively or being notified of them. */
|
|
45
|
+
declare class ColumnResizeNotifier {
|
|
46
|
+
private readonly _source;
|
|
47
|
+
/** Emits whenever a column is resized. */
|
|
48
|
+
readonly resizeCompleted: Observable<ColumnSize>;
|
|
49
|
+
/** Instantly resizes the specified column. */
|
|
50
|
+
resize(columnId: string, size: number): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnResizeNotifier, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ColumnResizeNotifier>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Coordinates events between the column resize directives. */
|
|
56
|
+
declare class HeaderRowEventDispatcher {
|
|
57
|
+
private readonly _ngZone;
|
|
58
|
+
/**
|
|
59
|
+
* Emits the currently hovered header cell or null when no header cells are hovered.
|
|
60
|
+
* Exposed publicly for events to feed in, but subscribers should use headerCellHoveredDistinct,
|
|
61
|
+
* defined below.
|
|
62
|
+
*/
|
|
63
|
+
readonly headerCellHovered: Subject<Element | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Emits the header cell for which a user-triggered resize is active or null
|
|
66
|
+
* when no resize is in progress.
|
|
67
|
+
*/
|
|
68
|
+
readonly overlayHandleActiveForCell: Subject<Element | null>;
|
|
69
|
+
/** Distinct and shared version of headerCellHovered. */
|
|
70
|
+
readonly headerCellHoveredDistinct: Observable<Element | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Emits the header that is currently hovered or hosting an active resize event (with active
|
|
73
|
+
* taking precedence).
|
|
74
|
+
*/
|
|
75
|
+
readonly headerRowHoveredOrActiveDistinct: Observable<Element | null>;
|
|
76
|
+
private readonly _headerRowHoveredOrActiveDistinctReenterZone;
|
|
77
|
+
private _lastSeenRow;
|
|
78
|
+
private _lastSeenRowHover;
|
|
79
|
+
/**
|
|
80
|
+
* Emits whether the specified row should show its overlay controls.
|
|
81
|
+
* Emission occurs within the NgZone.
|
|
82
|
+
*/
|
|
83
|
+
resizeOverlayVisibleForHeaderRow(row: Element): Observable<boolean>;
|
|
84
|
+
private _enterZone;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderRowEventDispatcher, never>;
|
|
86
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HeaderRowEventDispatcher>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Configurable options for column resize. */
|
|
90
|
+
interface ColumnResizeOptions {
|
|
91
|
+
liveResizeUpdates?: boolean;
|
|
92
|
+
}
|
|
93
|
+
declare const COLUMN_RESIZE_OPTIONS: InjectionToken<ColumnResizeOptions>;
|
|
94
|
+
/**
|
|
95
|
+
* Base class for ColumnResize directives which attach to mat-table elements to
|
|
96
|
+
* provide common events and services for column resizing.
|
|
97
|
+
*/
|
|
98
|
+
declare abstract class ColumnResize implements AfterViewInit, OnDestroy {
|
|
99
|
+
private _renderer;
|
|
100
|
+
private _eventCleanups;
|
|
101
|
+
protected readonly destroyed: Subject<void>;
|
|
102
|
+
abstract readonly columnResizeNotifier: ColumnResizeNotifier;
|
|
103
|
+
abstract readonly elementRef: ElementRef<HTMLElement>;
|
|
104
|
+
protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
105
|
+
protected abstract readonly ngZone: NgZone;
|
|
106
|
+
protected abstract readonly notifier: ColumnResizeNotifierSource;
|
|
107
|
+
/** Unique ID for this table instance. */
|
|
108
|
+
protected readonly selectorId: string;
|
|
109
|
+
/** The id attribute of the table, if specified. */
|
|
110
|
+
id?: string;
|
|
111
|
+
/** @docs-private Whether a call to updateStickyColumnStyles is pending after a resize. */
|
|
112
|
+
_flushPending: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Whether to update the column's width continuously as the mouse position
|
|
115
|
+
* changes, or to wait until mouseup to apply the new size.
|
|
116
|
+
*/
|
|
117
|
+
liveResizeUpdates: boolean;
|
|
118
|
+
ngAfterViewInit(): void;
|
|
119
|
+
ngOnDestroy(): void;
|
|
120
|
+
/** Gets the unique CSS class name for this table instance. */
|
|
121
|
+
getUniqueCssClass(): string;
|
|
122
|
+
/** Gets the ID for this table used for column size persistance. */
|
|
123
|
+
getTableId(): string;
|
|
124
|
+
/** Called when a column in the table is resized. Applies a css class to the table element. */
|
|
125
|
+
setResized(): void;
|
|
126
|
+
private _listenForRowHoverEvents;
|
|
127
|
+
private _listenForResizeActivity;
|
|
128
|
+
private _listenForHoverActivity;
|
|
129
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnResize, never>;
|
|
130
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ColumnResize, never, never, { "liveResizeUpdates": { "alias": "liveResizeUpdates"; "required": false; }; }, {}, never, never, true, never>;
|
|
131
|
+
}
|
|
21
132
|
|
|
22
133
|
/**
|
|
23
134
|
* Explicitly enables column resizing for a table-based cdk-table.
|
|
24
135
|
* Individual columns must be annotated specifically.
|
|
25
136
|
*/
|
|
26
|
-
|
|
137
|
+
declare class CdkColumnResize extends ColumnResize {
|
|
27
138
|
readonly columnResizeNotifier: ColumnResizeNotifier;
|
|
28
139
|
readonly elementRef: ElementRef<HTMLElement>;
|
|
29
140
|
protected readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
@@ -34,21 +145,11 @@ export declare class CdkColumnResize extends ColumnResize {
|
|
|
34
145
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkColumnResize, "table[cdk-table][columnResize]", never, {}, {}, never, never, true, never>;
|
|
35
146
|
}
|
|
36
147
|
|
|
37
|
-
/**
|
|
38
|
-
* One of two NgModules for use with CdkColumnResize.
|
|
39
|
-
* When using this module, columns are resizable by default.
|
|
40
|
-
*/
|
|
41
|
-
export declare class CdkColumnResizeDefaultEnabledModule {
|
|
42
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CdkColumnResizeDefaultEnabledModule, never>;
|
|
43
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkColumnResizeDefaultEnabledModule, never, [typeof i1.CdkDefaultEnabledColumnResize, typeof i2.CdkDefaultEnabledColumnResizeFlex], [typeof i1.CdkDefaultEnabledColumnResize, typeof i2.CdkDefaultEnabledColumnResizeFlex]>;
|
|
44
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<CdkColumnResizeDefaultEnabledModule>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
148
|
/**
|
|
48
149
|
* Explicitly enables column resizing for a flexbox-based cdk-table.
|
|
49
150
|
* Individual columns must be annotated specifically.
|
|
50
151
|
*/
|
|
51
|
-
|
|
152
|
+
declare class CdkColumnResizeFlex extends ColumnResize {
|
|
52
153
|
readonly columnResizeNotifier: ColumnResizeNotifier;
|
|
53
154
|
readonly elementRef: ElementRef<HTMLElement>;
|
|
54
155
|
protected readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
@@ -59,21 +160,11 @@ export declare class CdkColumnResizeFlex extends ColumnResize {
|
|
|
59
160
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CdkColumnResizeFlex, "cdk-table[columnResize]", never, {}, {}, never, never, true, never>;
|
|
60
161
|
}
|
|
61
162
|
|
|
62
|
-
/**
|
|
63
|
-
* One of two NgModules for use with CdkColumnResize.
|
|
64
|
-
* When using this module, columns are not resizable by default.
|
|
65
|
-
*/
|
|
66
|
-
export declare class CdkColumnResizeModule {
|
|
67
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CdkColumnResizeModule, never>;
|
|
68
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkColumnResizeModule, never, [typeof i3.CdkColumnResize, typeof i4.CdkColumnResizeFlex], [typeof i3.CdkColumnResize, typeof i4.CdkColumnResizeFlex]>;
|
|
69
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<CdkColumnResizeModule>;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
163
|
/**
|
|
73
164
|
* Implicitly enables column resizing for a table-based cdk-table.
|
|
74
165
|
* Individual columns will be resizable unless opted out.
|
|
75
166
|
*/
|
|
76
|
-
|
|
167
|
+
declare class CdkDefaultEnabledColumnResize extends ColumnResize {
|
|
77
168
|
readonly columnResizeNotifier: ColumnResizeNotifier;
|
|
78
169
|
readonly elementRef: ElementRef<HTMLElement>;
|
|
79
170
|
protected readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
@@ -88,7 +179,7 @@ export declare class CdkDefaultEnabledColumnResize extends ColumnResize {
|
|
|
88
179
|
* Implicitly enables column resizing for a flex cdk-table.
|
|
89
180
|
* Individual columns will be resizable unless opted out.
|
|
90
181
|
*/
|
|
91
|
-
|
|
182
|
+
declare class CdkDefaultEnabledColumnResizeFlex extends ColumnResize {
|
|
92
183
|
readonly columnResizeNotifier: ColumnResizeNotifier;
|
|
93
184
|
readonly elementRef: ElementRef<HTMLElement>;
|
|
94
185
|
protected readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
@@ -100,138 +191,28 @@ export declare class CdkDefaultEnabledColumnResizeFlex extends ColumnResize {
|
|
|
100
191
|
}
|
|
101
192
|
|
|
102
193
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* CSS selector w/ CSS variable
|
|
106
|
-
* Updating all mat-cell nodes
|
|
107
|
-
*/
|
|
108
|
-
export declare class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDestroy {
|
|
109
|
-
protected readonly columnResize: ColumnResize;
|
|
110
|
-
protected readonly styleScheduler: _CoalescedStyleScheduler;
|
|
111
|
-
protected readonly table: CdkTable<unknown>;
|
|
112
|
-
private readonly _nonce;
|
|
113
|
-
private readonly _document;
|
|
114
|
-
private readonly _columnIndexes;
|
|
115
|
-
private readonly _columnProperties;
|
|
116
|
-
private _styleElement?;
|
|
117
|
-
private _indexSequence;
|
|
118
|
-
protected readonly defaultMinSize = 0;
|
|
119
|
-
protected readonly defaultMaxSize: number;
|
|
120
|
-
applyColumnSize(cssFriendlyColumnName: string, columnHeader: HTMLElement, sizeInPx: number, previousSizeInPx?: number): void;
|
|
121
|
-
applyMinColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void;
|
|
122
|
-
applyMaxColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void;
|
|
123
|
-
protected getColumnCssClass(cssFriendlyColumnName: string): string;
|
|
124
|
-
ngOnDestroy(): void;
|
|
125
|
-
private _getPropertyValue;
|
|
126
|
-
private _getAppliedWidth;
|
|
127
|
-
private _applyProperty;
|
|
128
|
-
private _getStyleSheet;
|
|
129
|
-
private _getColumnPropertiesMap;
|
|
130
|
-
private _applySizeCss;
|
|
131
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CdkFlexTableResizeStrategy, never>;
|
|
132
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CdkFlexTableResizeStrategy>;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export declare const COLUMN_RESIZE_OPTIONS: InjectionToken<ColumnResizeOptions>;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Base class for ColumnResize directives which attach to mat-table elements to
|
|
139
|
-
* provide common events and services for column resizing.
|
|
194
|
+
* One of two NgModules for use with CdkColumnResize.
|
|
195
|
+
* When using this module, columns are resizable by default.
|
|
140
196
|
*/
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
abstract readonly columnResizeNotifier: ColumnResizeNotifier;
|
|
146
|
-
abstract readonly elementRef: ElementRef<HTMLElement>;
|
|
147
|
-
protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
148
|
-
protected abstract readonly ngZone: NgZone;
|
|
149
|
-
protected abstract readonly notifier: ColumnResizeNotifierSource;
|
|
150
|
-
/** Unique ID for this table instance. */
|
|
151
|
-
protected readonly selectorId: string;
|
|
152
|
-
/** The id attribute of the table, if specified. */
|
|
153
|
-
id?: string;
|
|
154
|
-
/** @docs-private Whether a call to updateStickyColumnStyles is pending after a resize. */
|
|
155
|
-
_flushPending: boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Whether to update the column's width continuously as the mouse position
|
|
158
|
-
* changes, or to wait until mouseup to apply the new size.
|
|
159
|
-
*/
|
|
160
|
-
liveResizeUpdates: boolean;
|
|
161
|
-
ngAfterViewInit(): void;
|
|
162
|
-
ngOnDestroy(): void;
|
|
163
|
-
/** Gets the unique CSS class name for this table instance. */
|
|
164
|
-
getUniqueCssClass(): string;
|
|
165
|
-
/** Gets the ID for this table used for column size persistance. */
|
|
166
|
-
getTableId(): string;
|
|
167
|
-
/** Called when a column in the table is resized. Applies a css class to the table element. */
|
|
168
|
-
setResized(): void;
|
|
169
|
-
private _listenForRowHoverEvents;
|
|
170
|
-
private _listenForResizeActivity;
|
|
171
|
-
private _listenForHoverActivity;
|
|
172
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnResize, never>;
|
|
173
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ColumnResize, never, never, { "liveResizeUpdates": { "alias": "liveResizeUpdates"; "required": false; }; }, {}, never, never, true, never>;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/** Service for triggering column resizes imperatively or being notified of them. */
|
|
177
|
-
export declare class ColumnResizeNotifier {
|
|
178
|
-
private readonly _source;
|
|
179
|
-
/** Emits whenever a column is resized. */
|
|
180
|
-
readonly resizeCompleted: Observable<ColumnSize>;
|
|
181
|
-
/** Instantly resizes the specified column. */
|
|
182
|
-
resize(columnId: string, size: number): void;
|
|
183
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnResizeNotifier, never>;
|
|
184
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ColumnResizeNotifier>;
|
|
197
|
+
declare class CdkColumnResizeDefaultEnabledModule {
|
|
198
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkColumnResizeDefaultEnabledModule, never>;
|
|
199
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkColumnResizeDefaultEnabledModule, never, [typeof CdkDefaultEnabledColumnResize, typeof CdkDefaultEnabledColumnResizeFlex], [typeof CdkDefaultEnabledColumnResize, typeof CdkDefaultEnabledColumnResizeFlex]>;
|
|
200
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CdkColumnResizeDefaultEnabledModule>;
|
|
185
201
|
}
|
|
186
|
-
|
|
187
202
|
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
203
|
+
* One of two NgModules for use with CdkColumnResize.
|
|
204
|
+
* When using this module, columns are not resizable by default.
|
|
190
205
|
*/
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
readonly resizeCompleted: Subject<ColumnSize>;
|
|
196
|
-
/** Triggers a resize action. */
|
|
197
|
-
readonly triggerResize: Subject<ColumnSizeAction>;
|
|
198
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnResizeNotifierSource, never>;
|
|
199
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ColumnResizeNotifierSource>;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/** Configurable options for column resize. */
|
|
203
|
-
export declare interface ColumnResizeOptions {
|
|
204
|
-
liveResizeUpdates?: boolean;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/** Indicates the width of a column. */
|
|
208
|
-
export declare interface ColumnSize {
|
|
209
|
-
/** The ID/name of the column, as defined in CdkColumnDef. */
|
|
210
|
-
readonly columnId: string;
|
|
211
|
-
/** The width in pixels of the column. */
|
|
212
|
-
readonly size: number;
|
|
213
|
-
/** The width in pixels of the column prior to this update, if known. */
|
|
214
|
-
readonly previousSize?: number;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/** Interface describing column size changes. */
|
|
218
|
-
export declare interface ColumnSizeAction extends ColumnSize {
|
|
219
|
-
/**
|
|
220
|
-
* Whether the resize action should be applied instantaneously. False for events triggered during
|
|
221
|
-
* a UI-triggered resize (such as with the mouse) until the mouse button is released. True
|
|
222
|
-
* for all programmatically triggered resizes.
|
|
223
|
-
*/
|
|
224
|
-
readonly completeImmediately?: boolean;
|
|
225
|
-
/**
|
|
226
|
-
* Whether the resize action is being applied to a sticky/stickyEnd column.
|
|
227
|
-
*/
|
|
228
|
-
readonly isStickyColumn?: boolean;
|
|
206
|
+
declare class CdkColumnResizeModule {
|
|
207
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkColumnResizeModule, never>;
|
|
208
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkColumnResizeModule, never, [typeof CdkColumnResize, typeof CdkColumnResizeFlex], [typeof CdkColumnResize, typeof CdkColumnResizeFlex]>;
|
|
209
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CdkColumnResizeModule>;
|
|
229
210
|
}
|
|
230
211
|
|
|
231
212
|
/**
|
|
232
213
|
* Can be provided by the host application to enable persistence of column resize state.
|
|
233
214
|
*/
|
|
234
|
-
|
|
215
|
+
declare abstract class ColumnSizeStore {
|
|
235
216
|
/** Returns the persisted size of the specified column in the specified table. */
|
|
236
217
|
abstract getSize(tableId: string, columnId: string): Observable<number | null> | null;
|
|
237
218
|
/** Persists the size of the specified column in the specified table. */
|
|
@@ -240,125 +221,21 @@ export declare abstract class ColumnSizeStore {
|
|
|
240
221
|
static ɵprov: i0.ɵɵInjectableDeclaration<ColumnSizeStore>;
|
|
241
222
|
}
|
|
242
223
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
* defined below.
|
|
252
|
-
*/
|
|
253
|
-
readonly headerCellHovered: Subject<Element | null>;
|
|
254
|
-
/**
|
|
255
|
-
* Emits the header cell for which a user-triggered resize is active or null
|
|
256
|
-
* when no resize is in progress.
|
|
257
|
-
*/
|
|
258
|
-
readonly overlayHandleActiveForCell: Subject<Element | null>;
|
|
259
|
-
/** Distinct and shared version of headerCellHovered. */
|
|
260
|
-
readonly headerCellHoveredDistinct: Observable<Element | null>;
|
|
261
|
-
/**
|
|
262
|
-
* Emits the header that is currently hovered or hosting an active resize event (with active
|
|
263
|
-
* taking precedence).
|
|
264
|
-
*/
|
|
265
|
-
readonly headerRowHoveredOrActiveDistinct: Observable<Element | null>;
|
|
266
|
-
private readonly _headerRowHoveredOrActiveDistinctReenterZone;
|
|
267
|
-
private _lastSeenRow;
|
|
268
|
-
private _lastSeenRowHover;
|
|
269
|
-
/**
|
|
270
|
-
* Emits whether the specified row should show its overlay controls.
|
|
271
|
-
* Emission occurs within the NgZone.
|
|
272
|
-
*/
|
|
273
|
-
resizeOverlayVisibleForHeaderRow(row: Element): Observable<boolean>;
|
|
274
|
-
private _enterZone;
|
|
275
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderRowEventDispatcher, never>;
|
|
276
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<HeaderRowEventDispatcher>;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
declare namespace i1 {
|
|
280
|
-
export {
|
|
281
|
-
CdkDefaultEnabledColumnResize
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
declare namespace i2 {
|
|
286
|
-
export {
|
|
287
|
-
CdkDefaultEnabledColumnResizeFlex
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
declare namespace i3 {
|
|
292
|
-
export {
|
|
293
|
-
CdkColumnResize
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
declare namespace i4 {
|
|
298
|
-
export {
|
|
299
|
-
CdkColumnResizeFlex
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Base class for Resizable directives which are applied to column headers to make those columns
|
|
305
|
-
* resizable.
|
|
306
|
-
*/
|
|
307
|
-
export declare abstract class Resizable<HandleComponent extends ResizeOverlayHandle> implements AfterViewInit, OnDestroy, OnInit {
|
|
308
|
-
protected minWidthPxInternal: number;
|
|
309
|
-
protected maxWidthPxInternal: number;
|
|
310
|
-
protected inlineHandle?: HTMLElement;
|
|
311
|
-
protected overlayRef?: OverlayRef;
|
|
312
|
-
protected readonly destroyed: Subject<void>;
|
|
313
|
-
protected abstract readonly columnDef: CdkColumnDef;
|
|
314
|
-
protected abstract readonly columnResize: ColumnResize;
|
|
315
|
-
protected abstract readonly directionality: Directionality;
|
|
316
|
-
protected abstract readonly document: Document;
|
|
317
|
-
protected abstract readonly elementRef: ElementRef;
|
|
318
|
-
protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
319
|
-
protected abstract readonly injector: Injector;
|
|
320
|
-
protected abstract readonly ngZone: NgZone;
|
|
321
|
-
protected abstract readonly overlay: Overlay;
|
|
322
|
-
protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;
|
|
323
|
-
protected abstract readonly resizeStrategy: ResizeStrategy;
|
|
324
|
-
protected abstract readonly styleScheduler: _CoalescedStyleScheduler;
|
|
325
|
-
protected abstract readonly viewContainerRef: ViewContainerRef;
|
|
326
|
-
protected abstract readonly changeDetectorRef: ChangeDetectorRef;
|
|
327
|
-
protected readonly columnSizeStore: ColumnSizeStore | null;
|
|
328
|
-
private _viewInitialized;
|
|
329
|
-
private _isDestroyed;
|
|
330
|
-
/** The minimum width to allow the column to be sized to. */
|
|
331
|
-
get minWidthPx(): number;
|
|
332
|
-
set minWidthPx(value: number);
|
|
333
|
-
/** The maximum width to allow the column to be sized to. */
|
|
334
|
-
get maxWidthPx(): number;
|
|
335
|
-
set maxWidthPx(value: number);
|
|
336
|
-
ngOnInit(): void;
|
|
337
|
-
ngAfterViewInit(): void;
|
|
338
|
-
ngOnDestroy(): void;
|
|
339
|
-
protected abstract getInlineHandleCssClassName(): string;
|
|
340
|
-
protected abstract getOverlayHandleComponentType(): Type<HandleComponent>;
|
|
341
|
-
private _createOverlayForHandle;
|
|
342
|
-
private _listenForRowHoverEvents;
|
|
343
|
-
private _listenForResizeEvents;
|
|
344
|
-
private _completeResizeOperation;
|
|
345
|
-
private _cleanUpAfterResize;
|
|
346
|
-
private _createHandlePortal;
|
|
347
|
-
private _showHandleOverlay;
|
|
348
|
-
private _updateOverlayHandleHeight;
|
|
349
|
-
private _applySize;
|
|
350
|
-
private _applyMinWidthPx;
|
|
351
|
-
private _applyMaxWidthPx;
|
|
352
|
-
private _appendInlineHandle;
|
|
353
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<Resizable<any>, never>;
|
|
354
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Resizable<any>, never, never, {}, {}, never, never, true, never>;
|
|
224
|
+
/** Tracks state of resize events in progress. */
|
|
225
|
+
declare class ResizeRef {
|
|
226
|
+
readonly origin: ElementRef;
|
|
227
|
+
readonly overlayRef: OverlayRef;
|
|
228
|
+
readonly minWidthPx: number;
|
|
229
|
+
readonly maxWidthPx: number;
|
|
230
|
+
readonly liveUpdates: boolean;
|
|
231
|
+
constructor(origin: ElementRef, overlayRef: OverlayRef, minWidthPx: number, maxWidthPx: number, liveUpdates?: boolean);
|
|
355
232
|
}
|
|
356
233
|
|
|
357
234
|
/**
|
|
358
235
|
* Base class for a component shown over the edge of a resizable column that is responsible
|
|
359
236
|
* for handling column resize mouse events and displaying any visible UI on the column edge.
|
|
360
237
|
*/
|
|
361
|
-
|
|
238
|
+
declare abstract class ResizeOverlayHandle implements AfterViewInit, OnDestroy {
|
|
362
239
|
private _renderer;
|
|
363
240
|
protected readonly destroyed: Subject<void>;
|
|
364
241
|
protected abstract readonly columnDef: CdkColumnDef;
|
|
@@ -388,21 +265,11 @@ export declare abstract class ResizeOverlayHandle implements AfterViewInit, OnDe
|
|
|
388
265
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ResizeOverlayHandle, never, never, {}, {}, never, never, true, never>;
|
|
389
266
|
}
|
|
390
267
|
|
|
391
|
-
/** Tracks state of resize events in progress. */
|
|
392
|
-
export declare class ResizeRef {
|
|
393
|
-
readonly origin: ElementRef;
|
|
394
|
-
readonly overlayRef: OverlayRef;
|
|
395
|
-
readonly minWidthPx: number;
|
|
396
|
-
readonly maxWidthPx: number;
|
|
397
|
-
readonly liveUpdates: boolean;
|
|
398
|
-
constructor(origin: ElementRef, overlayRef: OverlayRef, minWidthPx: number, maxWidthPx: number, liveUpdates?: boolean);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
268
|
/**
|
|
402
269
|
* Provides an implementation for resizing a column.
|
|
403
270
|
* The details of how resizing works for tables for flex mat-tables are quite different.
|
|
404
271
|
*/
|
|
405
|
-
|
|
272
|
+
declare abstract class ResizeStrategy implements OnDestroy {
|
|
406
273
|
protected abstract readonly columnResize: ColumnResize;
|
|
407
274
|
protected abstract readonly styleScheduler: _CoalescedStyleScheduler;
|
|
408
275
|
protected abstract readonly table: CdkTable<unknown>;
|
|
@@ -426,9 +293,6 @@ export declare abstract class ResizeStrategy implements OnDestroy {
|
|
|
426
293
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResizeStrategy, never>;
|
|
427
294
|
static ɵprov: i0.ɵɵInjectableDeclaration<ResizeStrategy>;
|
|
428
295
|
}
|
|
429
|
-
|
|
430
|
-
export declare const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
431
|
-
|
|
432
296
|
/**
|
|
433
297
|
* The optimally performing resize strategy for <table> elements with table-layout: fixed.
|
|
434
298
|
* Tested against and outperformed:
|
|
@@ -436,7 +300,7 @@ export declare const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
|
436
300
|
* CSS selector w/ CSS variable
|
|
437
301
|
* Updating all cell nodes
|
|
438
302
|
*/
|
|
439
|
-
|
|
303
|
+
declare class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
440
304
|
protected readonly columnResize: ColumnResize;
|
|
441
305
|
protected readonly styleScheduler: _CoalescedStyleScheduler;
|
|
442
306
|
protected readonly table: CdkTable<unknown>;
|
|
@@ -446,5 +310,93 @@ export declare class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
|
446
310
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableLayoutFixedResizeStrategy, never>;
|
|
447
311
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableLayoutFixedResizeStrategy>;
|
|
448
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* The optimally performing resize strategy for flex mat-tables.
|
|
315
|
+
* Tested against and outperformed:
|
|
316
|
+
* CSS selector w/ CSS variable
|
|
317
|
+
* Updating all mat-cell nodes
|
|
318
|
+
*/
|
|
319
|
+
declare class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDestroy {
|
|
320
|
+
protected readonly columnResize: ColumnResize;
|
|
321
|
+
protected readonly styleScheduler: _CoalescedStyleScheduler;
|
|
322
|
+
protected readonly table: CdkTable<unknown>;
|
|
323
|
+
private readonly _nonce;
|
|
324
|
+
private readonly _document;
|
|
325
|
+
private readonly _columnIndexes;
|
|
326
|
+
private readonly _columnProperties;
|
|
327
|
+
private _styleElement?;
|
|
328
|
+
private _indexSequence;
|
|
329
|
+
protected readonly defaultMinSize = 0;
|
|
330
|
+
protected readonly defaultMaxSize: number;
|
|
331
|
+
applyColumnSize(cssFriendlyColumnName: string, columnHeader: HTMLElement, sizeInPx: number, previousSizeInPx?: number): void;
|
|
332
|
+
applyMinColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void;
|
|
333
|
+
applyMaxColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void;
|
|
334
|
+
protected getColumnCssClass(cssFriendlyColumnName: string): string;
|
|
335
|
+
ngOnDestroy(): void;
|
|
336
|
+
private _getPropertyValue;
|
|
337
|
+
private _getAppliedWidth;
|
|
338
|
+
private _applyProperty;
|
|
339
|
+
private _getStyleSheet;
|
|
340
|
+
private _getColumnPropertiesMap;
|
|
341
|
+
private _applySizeCss;
|
|
342
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkFlexTableResizeStrategy, never>;
|
|
343
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CdkFlexTableResizeStrategy>;
|
|
344
|
+
}
|
|
345
|
+
declare const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
346
|
+
declare const FLEX_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Base class for Resizable directives which are applied to column headers to make those columns
|
|
350
|
+
* resizable.
|
|
351
|
+
*/
|
|
352
|
+
declare abstract class Resizable<HandleComponent extends ResizeOverlayHandle> implements AfterViewInit, OnDestroy, OnInit {
|
|
353
|
+
protected minWidthPxInternal: number;
|
|
354
|
+
protected maxWidthPxInternal: number;
|
|
355
|
+
protected inlineHandle?: HTMLElement;
|
|
356
|
+
protected overlayRef?: OverlayRef;
|
|
357
|
+
protected readonly destroyed: Subject<void>;
|
|
358
|
+
protected abstract readonly columnDef: CdkColumnDef;
|
|
359
|
+
protected abstract readonly columnResize: ColumnResize;
|
|
360
|
+
protected abstract readonly directionality: Directionality;
|
|
361
|
+
protected abstract readonly document: Document;
|
|
362
|
+
protected abstract readonly elementRef: ElementRef;
|
|
363
|
+
protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
364
|
+
protected abstract readonly injector: Injector;
|
|
365
|
+
protected abstract readonly ngZone: NgZone;
|
|
366
|
+
protected abstract readonly overlay: Overlay;
|
|
367
|
+
protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;
|
|
368
|
+
protected abstract readonly resizeStrategy: ResizeStrategy;
|
|
369
|
+
protected abstract readonly styleScheduler: _CoalescedStyleScheduler;
|
|
370
|
+
protected abstract readonly viewContainerRef: ViewContainerRef;
|
|
371
|
+
protected abstract readonly changeDetectorRef: ChangeDetectorRef;
|
|
372
|
+
protected readonly columnSizeStore: ColumnSizeStore | null;
|
|
373
|
+
private _viewInitialized;
|
|
374
|
+
private _isDestroyed;
|
|
375
|
+
/** The minimum width to allow the column to be sized to. */
|
|
376
|
+
get minWidthPx(): number;
|
|
377
|
+
set minWidthPx(value: number);
|
|
378
|
+
/** The maximum width to allow the column to be sized to. */
|
|
379
|
+
get maxWidthPx(): number;
|
|
380
|
+
set maxWidthPx(value: number);
|
|
381
|
+
ngOnInit(): void;
|
|
382
|
+
ngAfterViewInit(): void;
|
|
383
|
+
ngOnDestroy(): void;
|
|
384
|
+
protected abstract getInlineHandleCssClassName(): string;
|
|
385
|
+
protected abstract getOverlayHandleComponentType(): Type<HandleComponent>;
|
|
386
|
+
private _createOverlayForHandle;
|
|
387
|
+
private _listenForRowHoverEvents;
|
|
388
|
+
private _listenForResizeEvents;
|
|
389
|
+
private _completeResizeOperation;
|
|
390
|
+
private _cleanUpAfterResize;
|
|
391
|
+
private _createHandlePortal;
|
|
392
|
+
private _showHandleOverlay;
|
|
393
|
+
private _updateOverlayHandleHeight;
|
|
394
|
+
private _applySize;
|
|
395
|
+
private _applyMinWidthPx;
|
|
396
|
+
private _applyMaxWidthPx;
|
|
397
|
+
private _appendInlineHandle;
|
|
398
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Resizable<any>, never>;
|
|
399
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Resizable<any>, never, never, {}, {}, never, never, true, never>;
|
|
400
|
+
}
|
|
449
401
|
|
|
450
|
-
export { }
|
|
402
|
+
export { COLUMN_RESIZE_OPTIONS, CdkColumnResize, CdkColumnResizeDefaultEnabledModule, CdkColumnResizeFlex, CdkColumnResizeModule, CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex, CdkFlexTableResizeStrategy, ColumnResize, ColumnResizeNotifier, ColumnResizeNotifierSource, type ColumnResizeOptions, type ColumnSize, type ColumnSizeAction, ColumnSizeStore, FLEX_RESIZE_STRATEGY_PROVIDER, HeaderRowEventDispatcher, Resizable, ResizeOverlayHandle, ResizeRef, ResizeStrategy, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, TableLayoutFixedResizeStrategy };
|