@angular/cdk-experimental 20.0.0-next.0 → 20.0.0-next.10
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 +276 -289
- package/combobox/index.d.ts +15 -39
- package/deferred-content/index.d.ts +37 -0
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +139 -70
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +19 -26
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +60 -0
- package/fesm2022/deferred-content.mjs.map +1 -0
- package/fesm2022/list-focus-Di7m_z_6.mjs +382 -0
- package/fesm2022/list-focus-Di7m_z_6.mjs.map +1 -0
- package/fesm2022/listbox.mjs +42 -21
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/option-f_gNslw8.mjs +367 -0
- package/fesm2022/option-f_gNslw8.mjs.map +1 -0
- package/fesm2022/polyfill-CXksG4af.mjs +14 -0
- package/fesm2022/polyfill-CXksG4af.mjs.map +1 -0
- package/fesm2022/popover-edit.mjs +92 -81
- 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 +8 -13
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/tabs-BunANY1M.mjs +176 -0
- package/fesm2022/tabs-BunANY1M.mjs.map +1 -0
- package/fesm2022/tabs.mjs +225 -0
- package/fesm2022/tabs.mjs.map +1 -0
- package/fesm2022/ui-patterns.mjs +12 -603
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/list-navigation.d-DfOSxsSp.d.ts +247 -0
- package/listbox/index.d.ts +46 -39
- package/listbox.d-QWPLmxRe.d.ts +193 -0
- package/package.json +13 -2
- package/popover-edit/index.d.ts +269 -315
- package/scrolling/index.d.ts +34 -47
- package/selection/index.d.ts +119 -161
- package/table-scroll-container/index.d.ts +6 -14
- package/tabs/index.d.ts +128 -0
- package/tabs.d-BAo141mw.d.ts +110 -0
- package/ui-patterns/index.d.ts +4 -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 { OnDestroy } from '@angular/core';
|
|
14
|
-
import { OnInit } from '@angular/core';
|
|
15
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
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 } from '@angular/cdk/table';
|
|
5
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
16
6
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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,55 @@ 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
|
-
}
|
|
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);
|
|
295
232
|
}
|
|
296
233
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
234
|
+
/**
|
|
235
|
+
* @docs-private
|
|
236
|
+
*/
|
|
237
|
+
declare class _Schedule {
|
|
238
|
+
tasks: (() => unknown)[];
|
|
239
|
+
endTasks: (() => unknown)[];
|
|
301
240
|
}
|
|
302
|
-
|
|
241
|
+
/** Injection token used to provide a coalesced style scheduler. */
|
|
242
|
+
declare const _COALESCED_STYLE_SCHEDULER: InjectionToken<_CoalescedStyleScheduler>;
|
|
303
243
|
/**
|
|
304
|
-
*
|
|
305
|
-
*
|
|
244
|
+
* Allows grouping up CSSDom mutations after the current execution context.
|
|
245
|
+
* This can significantly improve performance when separate consecutive functions are
|
|
246
|
+
* reading from the CSSDom and then mutating it.
|
|
247
|
+
*
|
|
248
|
+
* @docs-private
|
|
306
249
|
*/
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
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>;
|
|
250
|
+
declare class _CoalescedStyleScheduler {
|
|
251
|
+
private _currentSchedule;
|
|
252
|
+
private _ngZone;
|
|
253
|
+
constructor(...args: unknown[]);
|
|
254
|
+
/**
|
|
255
|
+
* Schedules the specified task to run at the end of the current VM turn.
|
|
256
|
+
*/
|
|
257
|
+
schedule(task: () => unknown): void;
|
|
258
|
+
/**
|
|
259
|
+
* Schedules the specified task to run after other scheduled tasks at the end of the current
|
|
260
|
+
* VM turn.
|
|
261
|
+
*/
|
|
262
|
+
scheduleEnd(task: () => unknown): void;
|
|
263
|
+
private _createScheduleIfNeeded;
|
|
264
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<_CoalescedStyleScheduler, never>;
|
|
265
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<_CoalescedStyleScheduler>;
|
|
355
266
|
}
|
|
356
267
|
|
|
357
268
|
/**
|
|
358
269
|
* Base class for a component shown over the edge of a resizable column that is responsible
|
|
359
270
|
* for handling column resize mouse events and displaying any visible UI on the column edge.
|
|
360
271
|
*/
|
|
361
|
-
|
|
272
|
+
declare abstract class ResizeOverlayHandle implements AfterViewInit, OnDestroy {
|
|
362
273
|
private _renderer;
|
|
363
274
|
protected readonly destroyed: Subject<void>;
|
|
364
275
|
protected abstract readonly columnDef: CdkColumnDef;
|
|
@@ -388,21 +299,11 @@ export declare abstract class ResizeOverlayHandle implements AfterViewInit, OnDe
|
|
|
388
299
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ResizeOverlayHandle, never, never, {}, {}, never, never, true, never>;
|
|
389
300
|
}
|
|
390
301
|
|
|
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
302
|
/**
|
|
402
303
|
* Provides an implementation for resizing a column.
|
|
403
304
|
* The details of how resizing works for tables for flex mat-tables are quite different.
|
|
404
305
|
*/
|
|
405
|
-
|
|
306
|
+
declare abstract class ResizeStrategy implements OnDestroy {
|
|
406
307
|
protected abstract readonly columnResize: ColumnResize;
|
|
407
308
|
protected abstract readonly styleScheduler: _CoalescedStyleScheduler;
|
|
408
309
|
protected abstract readonly table: CdkTable<unknown>;
|
|
@@ -426,9 +327,6 @@ export declare abstract class ResizeStrategy implements OnDestroy {
|
|
|
426
327
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResizeStrategy, never>;
|
|
427
328
|
static ɵprov: i0.ɵɵInjectableDeclaration<ResizeStrategy>;
|
|
428
329
|
}
|
|
429
|
-
|
|
430
|
-
export declare const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
431
|
-
|
|
432
330
|
/**
|
|
433
331
|
* The optimally performing resize strategy for <table> elements with table-layout: fixed.
|
|
434
332
|
* Tested against and outperformed:
|
|
@@ -436,7 +334,7 @@ export declare const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
|
436
334
|
* CSS selector w/ CSS variable
|
|
437
335
|
* Updating all cell nodes
|
|
438
336
|
*/
|
|
439
|
-
|
|
337
|
+
declare class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
440
338
|
protected readonly columnResize: ColumnResize;
|
|
441
339
|
protected readonly styleScheduler: _CoalescedStyleScheduler;
|
|
442
340
|
protected readonly table: CdkTable<unknown>;
|
|
@@ -446,5 +344,94 @@ export declare class TableLayoutFixedResizeStrategy extends ResizeStrategy {
|
|
|
446
344
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableLayoutFixedResizeStrategy, never>;
|
|
447
345
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableLayoutFixedResizeStrategy>;
|
|
448
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* The optimally performing resize strategy for flex mat-tables.
|
|
349
|
+
* Tested against and outperformed:
|
|
350
|
+
* CSS selector w/ CSS variable
|
|
351
|
+
* Updating all mat-cell nodes
|
|
352
|
+
*/
|
|
353
|
+
declare class CdkFlexTableResizeStrategy extends ResizeStrategy implements OnDestroy {
|
|
354
|
+
protected readonly columnResize: ColumnResize;
|
|
355
|
+
protected readonly styleScheduler: _CoalescedStyleScheduler;
|
|
356
|
+
protected readonly table: CdkTable<unknown>;
|
|
357
|
+
private readonly _nonce;
|
|
358
|
+
private readonly _document;
|
|
359
|
+
private readonly _columnIndexes;
|
|
360
|
+
private readonly _columnProperties;
|
|
361
|
+
private _styleElement?;
|
|
362
|
+
private _indexSequence;
|
|
363
|
+
protected readonly defaultMinSize = 0;
|
|
364
|
+
protected readonly defaultMaxSize: number;
|
|
365
|
+
applyColumnSize(cssFriendlyColumnName: string, columnHeader: HTMLElement, sizeInPx: number, previousSizeInPx?: number): void;
|
|
366
|
+
applyMinColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void;
|
|
367
|
+
applyMaxColumnSize(cssFriendlyColumnName: string, _: HTMLElement, sizeInPx: number): void;
|
|
368
|
+
protected getColumnCssClass(cssFriendlyColumnName: string): string;
|
|
369
|
+
ngOnDestroy(): void;
|
|
370
|
+
private _getPropertyValue;
|
|
371
|
+
private _getAppliedWidth;
|
|
372
|
+
private _applyProperty;
|
|
373
|
+
private _getStyleSheet;
|
|
374
|
+
private _getColumnPropertiesMap;
|
|
375
|
+
private _applySizeCss;
|
|
376
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CdkFlexTableResizeStrategy, never>;
|
|
377
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CdkFlexTableResizeStrategy>;
|
|
378
|
+
}
|
|
379
|
+
declare const TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
380
|
+
declare const FLEX_RESIZE_STRATEGY_PROVIDER: Provider;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Base class for Resizable directives which are applied to column headers to make those columns
|
|
384
|
+
* resizable.
|
|
385
|
+
*/
|
|
386
|
+
declare abstract class Resizable<HandleComponent extends ResizeOverlayHandle> implements AfterViewInit, OnDestroy, OnInit {
|
|
387
|
+
protected minWidthPxInternal: number;
|
|
388
|
+
protected maxWidthPxInternal: number;
|
|
389
|
+
protected inlineHandle?: HTMLElement;
|
|
390
|
+
protected overlayRef?: OverlayRef;
|
|
391
|
+
protected readonly destroyed: Subject<void>;
|
|
392
|
+
protected abstract readonly columnDef: CdkColumnDef;
|
|
393
|
+
protected abstract readonly columnResize: ColumnResize;
|
|
394
|
+
protected abstract readonly directionality: Directionality;
|
|
395
|
+
protected abstract readonly document: Document;
|
|
396
|
+
protected abstract readonly elementRef: ElementRef;
|
|
397
|
+
protected abstract readonly eventDispatcher: HeaderRowEventDispatcher;
|
|
398
|
+
protected abstract readonly injector: Injector;
|
|
399
|
+
protected abstract readonly ngZone: NgZone;
|
|
400
|
+
protected abstract readonly resizeNotifier: ColumnResizeNotifierSource;
|
|
401
|
+
protected abstract readonly resizeStrategy: ResizeStrategy;
|
|
402
|
+
protected abstract readonly styleScheduler: _CoalescedStyleScheduler;
|
|
403
|
+
protected abstract readonly viewContainerRef: ViewContainerRef;
|
|
404
|
+
protected abstract readonly changeDetectorRef: ChangeDetectorRef;
|
|
405
|
+
protected readonly columnSizeStore: ColumnSizeStore | null;
|
|
406
|
+
private _injector;
|
|
407
|
+
private _viewInitialized;
|
|
408
|
+
private _isDestroyed;
|
|
409
|
+
/** The minimum width to allow the column to be sized to. */
|
|
410
|
+
get minWidthPx(): number;
|
|
411
|
+
set minWidthPx(value: number);
|
|
412
|
+
/** The maximum width to allow the column to be sized to. */
|
|
413
|
+
get maxWidthPx(): number;
|
|
414
|
+
set maxWidthPx(value: number);
|
|
415
|
+
ngOnInit(): void;
|
|
416
|
+
ngAfterViewInit(): void;
|
|
417
|
+
ngOnDestroy(): void;
|
|
418
|
+
protected abstract getInlineHandleCssClassName(): string;
|
|
419
|
+
protected abstract getOverlayHandleComponentType(): Type<HandleComponent>;
|
|
420
|
+
private _createOverlayForHandle;
|
|
421
|
+
private _listenForRowHoverEvents;
|
|
422
|
+
private _listenForResizeEvents;
|
|
423
|
+
private _completeResizeOperation;
|
|
424
|
+
private _cleanUpAfterResize;
|
|
425
|
+
private _createHandlePortal;
|
|
426
|
+
private _showHandleOverlay;
|
|
427
|
+
private _updateOverlayHandleHeight;
|
|
428
|
+
private _applySize;
|
|
429
|
+
private _applyMinWidthPx;
|
|
430
|
+
private _applyMaxWidthPx;
|
|
431
|
+
private _appendInlineHandle;
|
|
432
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Resizable<any>, never>;
|
|
433
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Resizable<any>, never, never, {}, {}, never, never, true, never>;
|
|
434
|
+
}
|
|
449
435
|
|
|
450
|
-
export { }
|
|
436
|
+
export { COLUMN_RESIZE_OPTIONS, CdkColumnResize, CdkColumnResizeDefaultEnabledModule, CdkColumnResizeFlex, CdkColumnResizeModule, CdkDefaultEnabledColumnResize, CdkDefaultEnabledColumnResizeFlex, CdkFlexTableResizeStrategy, ColumnResize, ColumnResizeNotifier, ColumnResizeNotifierSource, ColumnSizeStore, FLEX_RESIZE_STRATEGY_PROVIDER, HeaderRowEventDispatcher, Resizable, ResizeOverlayHandle, ResizeRef, ResizeStrategy, TABLE_LAYOUT_FIXED_RESIZE_STRATEGY_PROVIDER, TableLayoutFixedResizeStrategy, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, _Schedule };
|
|
437
|
+
export type { ColumnResizeOptions, ColumnSize, ColumnSizeAction };
|