@angular/cdk-experimental 20.2.0-next.2 → 20.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +3 -3
- package/{accordion.d-CC6dGMlv.d.ts → accordion.d.d.ts} +7 -5
- package/{expansion.d-Zkcf-XJU.d.ts → expansion.d.d.ts} +3 -3
- package/fesm2022/accordion.mjs +17 -17
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/{accordion-D9JoxtzT.mjs → accordion2.mjs} +8 -6
- package/fesm2022/accordion2.mjs.map +1 -0
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +54 -54
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +10 -10
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +6 -6
- package/fesm2022/deferred-content.mjs.map +1 -1
- package/fesm2022/{expansion-C9iQLHOG.mjs → expansion.mjs} +2 -2
- package/fesm2022/expansion.mjs.map +1 -0
- package/fesm2022/{list-focus-Czul8jzR.mjs → list-navigation.mjs} +67 -62
- package/fesm2022/list-navigation.mjs.map +1 -0
- package/fesm2022/list.mjs +355 -0
- package/fesm2022/list.mjs.map +1 -0
- package/fesm2022/listbox.mjs +10 -11
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/option.mjs +231 -0
- package/fesm2022/option.mjs.map +1 -0
- package/fesm2022/{polyfill-CXksG4af.mjs → polyfill.mjs} +2 -2
- package/fesm2022/polyfill.mjs.map +1 -0
- package/fesm2022/popover-edit.mjs +44 -44
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/radio-group.mjs +44 -11
- package/fesm2022/radio-group.mjs.map +1 -1
- package/fesm2022/radio-group2.mjs +143 -0
- package/fesm2022/radio-group2.mjs.map +1 -0
- package/fesm2022/scrolling.mjs +7 -7
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +19 -19
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +7 -7
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/tabs.mjs +20 -20
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/{tabs-hMdwtXv2.mjs → tabs2.mjs} +34 -70
- package/fesm2022/tabs2.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +168 -0
- package/fesm2022/toolbar.mjs.map +1 -0
- package/fesm2022/toolbar2.mjs +224 -0
- package/fesm2022/toolbar2.mjs.map +1 -0
- package/fesm2022/tree.mjs +140 -219
- package/fesm2022/tree.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +8 -8
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/list.d.d.ts +207 -0
- package/listbox/index.d.ts +3 -4
- package/{listbox.d-Ckp1is82.d.ts → listbox.d.d.ts} +9 -62
- package/package.json +6 -2
- package/{pointer-event-manager.d-BqSm9Jh5.d.ts → pointer-event-manager.d.d.ts} +12 -8
- package/radio-group/index.d.ts +15 -7
- package/radio-group.d.d.ts +80 -0
- package/tabs/index.d.ts +4 -4
- package/{tabs.d-Db8oTrMB.d.ts → tabs.d.d.ts} +15 -30
- package/toolbar/index.d.ts +89 -0
- package/toolbar.d.d.ts +136 -0
- package/tree/index.d.ts +28 -63
- package/ui-patterns/index.d.ts +8 -8
- package/fesm2022/accordion-D9JoxtzT.mjs.map +0 -1
- package/fesm2022/expansion-C9iQLHOG.mjs.map +0 -1
- package/fesm2022/list-focus-Czul8jzR.mjs.map +0 -1
- package/fesm2022/list-selection-C41ApAbt.mjs +0 -136
- package/fesm2022/list-selection-C41ApAbt.mjs.map +0 -1
- package/fesm2022/list-typeahead-DIIbNJrP.mjs +0 -64
- package/fesm2022/list-typeahead-DIIbNJrP.mjs.map +0 -1
- package/fesm2022/option-CgeKz9_Q.mjs +0 -321
- package/fesm2022/option-CgeKz9_Q.mjs.map +0 -1
- package/fesm2022/polyfill-CXksG4af.mjs.map +0 -1
- package/fesm2022/radio-button-92xc4w-A.mjs +0 -203
- package/fesm2022/radio-button-92xc4w-A.mjs.map +0 -1
- package/fesm2022/tabs-hMdwtXv2.mjs.map +0 -1
- package/list-selection.d-fbAPr_N_.d.ts +0 -69
- package/list-typeahead.d-ljh3nJ9y.d.ts +0 -48
- package/radio-group.d-CFC0aKQM.d.ts +0 -114
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { computed } from '@angular/core';
|
|
2
|
+
import { List } from './list.mjs';
|
|
3
|
+
import { KeyboardEventManager, PointerEventManager } from './list-navigation.mjs';
|
|
4
|
+
|
|
5
|
+
/** Controls the state of a radio group. */
|
|
6
|
+
class RadioGroupPattern {
|
|
7
|
+
inputs;
|
|
8
|
+
/** The list behavior for the radio group. */
|
|
9
|
+
listBehavior;
|
|
10
|
+
/** Whether the radio group is vertically or horizontally oriented. */
|
|
11
|
+
orientation;
|
|
12
|
+
/** Whether the radio group is disabled. */
|
|
13
|
+
disabled = computed(() => this.inputs.disabled() || this.listBehavior.disabled());
|
|
14
|
+
/** The currently selected radio button. */
|
|
15
|
+
selectedItem = computed(() => this.listBehavior.selectionBehavior.selectedItems()[0]);
|
|
16
|
+
/** Whether the radio group is readonly. */
|
|
17
|
+
readonly = computed(() => this.selectedItem()?.disabled() || this.inputs.readonly());
|
|
18
|
+
/** The tabindex of the radio group. */
|
|
19
|
+
tabindex = computed(() => (this.inputs.toolbar() ? -1 : this.listBehavior.tabindex()));
|
|
20
|
+
/** The id of the current active radio button (if using activedescendant). */
|
|
21
|
+
activedescendant = computed(() => this.listBehavior.activedescendant());
|
|
22
|
+
/** The key used to navigate to the previous radio button. */
|
|
23
|
+
prevKey = computed(() => {
|
|
24
|
+
if (this.inputs.orientation() === 'vertical') {
|
|
25
|
+
return 'ArrowUp';
|
|
26
|
+
}
|
|
27
|
+
return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';
|
|
28
|
+
});
|
|
29
|
+
/** The key used to navigate to the next radio button. */
|
|
30
|
+
nextKey = computed(() => {
|
|
31
|
+
if (this.inputs.orientation() === 'vertical') {
|
|
32
|
+
return 'ArrowDown';
|
|
33
|
+
}
|
|
34
|
+
return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';
|
|
35
|
+
});
|
|
36
|
+
/** The keydown event manager for the radio group. */
|
|
37
|
+
keydown = computed(() => {
|
|
38
|
+
const manager = new KeyboardEventManager();
|
|
39
|
+
// When within a toolbar relinquish keyboard control
|
|
40
|
+
if (this.inputs.toolbar()) {
|
|
41
|
+
return manager;
|
|
42
|
+
}
|
|
43
|
+
// Readonly mode allows navigation but not selection changes.
|
|
44
|
+
if (this.readonly()) {
|
|
45
|
+
return manager
|
|
46
|
+
.on(this.prevKey, () => this.listBehavior.prev())
|
|
47
|
+
.on(this.nextKey, () => this.listBehavior.next())
|
|
48
|
+
.on('Home', () => this.listBehavior.first())
|
|
49
|
+
.on('End', () => this.listBehavior.last());
|
|
50
|
+
}
|
|
51
|
+
// Default behavior: navigate and select on arrow keys, home, end.
|
|
52
|
+
// Space/Enter also select the focused item.
|
|
53
|
+
return manager
|
|
54
|
+
.on(this.prevKey, () => this.listBehavior.prev({ selectOne: true }))
|
|
55
|
+
.on(this.nextKey, () => this.listBehavior.next({ selectOne: true }))
|
|
56
|
+
.on('Home', () => this.listBehavior.first({ selectOne: true }))
|
|
57
|
+
.on('End', () => this.listBehavior.last({ selectOne: true }))
|
|
58
|
+
.on(' ', () => this.listBehavior.selectOne())
|
|
59
|
+
.on('Enter', () => this.listBehavior.selectOne());
|
|
60
|
+
});
|
|
61
|
+
/** The pointerdown event manager for the radio group. */
|
|
62
|
+
pointerdown = computed(() => {
|
|
63
|
+
const manager = new PointerEventManager();
|
|
64
|
+
// When within a toolbar relinquish pointer control
|
|
65
|
+
if (this.inputs.toolbar()) {
|
|
66
|
+
return manager;
|
|
67
|
+
}
|
|
68
|
+
if (this.readonly()) {
|
|
69
|
+
// Navigate focus only in readonly mode.
|
|
70
|
+
return manager.on(e => this.listBehavior.goto(this._getItem(e)));
|
|
71
|
+
}
|
|
72
|
+
// Default behavior: navigate and select on click.
|
|
73
|
+
return manager.on(e => this.listBehavior.goto(this._getItem(e), { selectOne: true }));
|
|
74
|
+
});
|
|
75
|
+
constructor(inputs) {
|
|
76
|
+
this.inputs = inputs;
|
|
77
|
+
this.orientation =
|
|
78
|
+
inputs.toolbar() !== undefined ? inputs.toolbar().orientation : inputs.orientation;
|
|
79
|
+
this.listBehavior = new List({
|
|
80
|
+
...inputs,
|
|
81
|
+
activeItem: inputs.toolbar()?.listBehavior.inputs.activeItem ?? inputs.activeItem,
|
|
82
|
+
wrap: () => !!inputs.toolbar(),
|
|
83
|
+
multi: () => false,
|
|
84
|
+
selectionMode: () => (inputs.toolbar() ? 'explicit' : 'follow'),
|
|
85
|
+
typeaheadDelay: () => 0, // Radio groups do not support typeahead.
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** Handles keydown events for the radio group. */
|
|
89
|
+
onKeydown(event) {
|
|
90
|
+
if (!this.disabled()) {
|
|
91
|
+
this.keydown().handle(event);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Handles pointerdown events for the radio group. */
|
|
95
|
+
onPointerdown(event) {
|
|
96
|
+
if (!this.disabled()) {
|
|
97
|
+
this.pointerdown().handle(event);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Sets the radio group to its default initial state.
|
|
102
|
+
*
|
|
103
|
+
* Sets the active index to the selected radio button if one exists and is focusable.
|
|
104
|
+
* Otherwise, sets the active index to the first focusable radio button.
|
|
105
|
+
*/
|
|
106
|
+
setDefaultState() {
|
|
107
|
+
let firstItem = null;
|
|
108
|
+
for (const item of this.inputs.items()) {
|
|
109
|
+
if (this.listBehavior.isFocusable(item)) {
|
|
110
|
+
if (!firstItem) {
|
|
111
|
+
firstItem = item;
|
|
112
|
+
}
|
|
113
|
+
if (item.selected()) {
|
|
114
|
+
this.inputs.activeItem.set(item);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (firstItem) {
|
|
120
|
+
this.inputs.activeItem.set(firstItem);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** Validates the state of the radio group and returns a list of accessibility violations. */
|
|
124
|
+
validate() {
|
|
125
|
+
const violations = [];
|
|
126
|
+
if (this.selectedItem()?.disabled() && this.inputs.skipDisabled()) {
|
|
127
|
+
violations.push("Accessibility Violation: The selected radio button is disabled while 'skipDisabled' is true, making the selection unreachable via keyboard.");
|
|
128
|
+
}
|
|
129
|
+
return violations;
|
|
130
|
+
}
|
|
131
|
+
/** Finds the RadioButtonPattern associated with a pointer event target. */
|
|
132
|
+
_getItem(e) {
|
|
133
|
+
if (!(e.target instanceof HTMLElement)) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
// Assumes the target or its ancestor has role="radio"
|
|
137
|
+
const element = e.target.closest('[role="radio"]');
|
|
138
|
+
return this.inputs.items().find(i => i.element() === element);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { RadioGroupPattern };
|
|
143
|
+
//# sourceMappingURL=radio-group2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group2.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk-experimental/ui-patterns/radio-group/radio-group.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 {computed} from '@angular/core';\nimport {KeyboardEventManager, PointerEventManager} from '../behaviors/event-manager';\nimport {List, ListInputs} from '../behaviors/list/list';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\nimport {RadioButtonPattern} from './radio-button';\n\n/** Represents the required inputs for a radio group. */\nexport type RadioGroupInputs<V> = Omit<\n ListInputs<RadioButtonPattern<V>, V>,\n 'multi' | 'selectionMode' | 'wrap' | 'typeaheadDelay'\n> & {\n /** Whether the radio group is disabled. */\n disabled: SignalLike<boolean>;\n\n /** Whether the radio group is readonly. */\n readonly: SignalLike<boolean>;\n /** Parent toolbar of radio group */\n toolbar: SignalLike<ToolbarLike<V> | undefined>;\n};\n\n/**\n * Represents the properties exposed by a toolbar widget that need to be accessed by a radio group.\n * This exists to avoid circular dependency errors between the toolbar and radio button.\n */\ntype ToolbarWidgetLike = {\n id: SignalLike<string>;\n index: SignalLike<number>;\n element: SignalLike<HTMLElement>;\n disabled: SignalLike<boolean>;\n searchTerm: SignalLike<any>;\n value: SignalLike<any>;\n};\n\n/**\n * Represents the properties exposed by a toolbar that need to be accessed by a radio group.\n * This exists to avoid circular dependency errors between the toolbar and radio button.\n */\nexport interface ToolbarLike<V> {\n listBehavior: List<RadioButtonPattern<V> | ToolbarWidgetLike, V>;\n orientation: SignalLike<'vertical' | 'horizontal'>;\n disabled: SignalLike<boolean>;\n}\n\n/** Controls the state of a radio group. */\nexport class RadioGroupPattern<V> {\n /** The list behavior for the radio group. */\n readonly listBehavior: List<RadioButtonPattern<V> | ToolbarWidgetLike, V>;\n\n /** Whether the radio group is vertically or horizontally oriented. */\n orientation: SignalLike<'vertical' | 'horizontal'>;\n\n /** Whether the radio group is disabled. */\n disabled = computed(() => this.inputs.disabled() || this.listBehavior.disabled());\n\n /** The currently selected radio button. */\n selectedItem = computed(() => this.listBehavior.selectionBehavior.selectedItems()[0]);\n\n /** Whether the radio group is readonly. */\n readonly = computed(() => this.selectedItem()?.disabled() || this.inputs.readonly());\n\n /** The tabindex of the radio group. */\n tabindex = computed(() => (this.inputs.toolbar() ? -1 : this.listBehavior.tabindex()));\n\n /** The id of the current active radio button (if using activedescendant). */\n activedescendant = computed(() => this.listBehavior.activedescendant());\n\n /** The key used to navigate to the previous radio button. */\n prevKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowUp';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** The key used to navigate to the next radio button. */\n nextKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowDown';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The keydown event manager for the radio group. */\n keydown = computed(() => {\n const manager = new KeyboardEventManager();\n\n // When within a toolbar relinquish keyboard control\n if (this.inputs.toolbar()) {\n return manager;\n }\n\n // Readonly mode allows navigation but not selection changes.\n if (this.readonly()) {\n return manager\n .on(this.prevKey, () => this.listBehavior.prev())\n .on(this.nextKey, () => this.listBehavior.next())\n .on('Home', () => this.listBehavior.first())\n .on('End', () => this.listBehavior.last());\n }\n\n // Default behavior: navigate and select on arrow keys, home, end.\n // Space/Enter also select the focused item.\n return manager\n .on(this.prevKey, () => this.listBehavior.prev({selectOne: true}))\n .on(this.nextKey, () => this.listBehavior.next({selectOne: true}))\n .on('Home', () => this.listBehavior.first({selectOne: true}))\n .on('End', () => this.listBehavior.last({selectOne: true}))\n .on(' ', () => this.listBehavior.selectOne())\n .on('Enter', () => this.listBehavior.selectOne());\n });\n\n /** The pointerdown event manager for the radio group. */\n pointerdown = computed(() => {\n const manager = new PointerEventManager();\n\n // When within a toolbar relinquish pointer control\n if (this.inputs.toolbar()) {\n return manager;\n }\n\n if (this.readonly()) {\n // Navigate focus only in readonly mode.\n return manager.on(e => this.listBehavior.goto(this._getItem(e)!));\n }\n\n // Default behavior: navigate and select on click.\n return manager.on(e => this.listBehavior.goto(this._getItem(e)!, {selectOne: true}));\n });\n\n constructor(readonly inputs: RadioGroupInputs<V>) {\n this.orientation =\n inputs.toolbar() !== undefined ? inputs.toolbar()!.orientation : inputs.orientation;\n\n this.listBehavior = new List({\n ...inputs,\n activeItem: inputs.toolbar()?.listBehavior.inputs.activeItem ?? inputs.activeItem,\n wrap: () => !!inputs.toolbar(),\n multi: () => false,\n selectionMode: () => (inputs.toolbar() ? 'explicit' : 'follow'),\n typeaheadDelay: () => 0, // Radio groups do not support typeahead.\n });\n }\n\n /** Handles keydown events for the radio group. */\n onKeydown(event: KeyboardEvent) {\n if (!this.disabled()) {\n this.keydown().handle(event);\n }\n }\n\n /** Handles pointerdown events for the radio group. */\n onPointerdown(event: PointerEvent) {\n if (!this.disabled()) {\n this.pointerdown().handle(event);\n }\n }\n\n /**\n * Sets the radio group to its default initial state.\n *\n * Sets the active index to the selected radio button if one exists and is focusable.\n * Otherwise, sets the active index to the first focusable radio button.\n */\n setDefaultState() {\n let firstItem: RadioButtonPattern<V> | null = null;\n\n for (const item of this.inputs.items()) {\n if (this.listBehavior.isFocusable(item)) {\n if (!firstItem) {\n firstItem = item;\n }\n if (item.selected()) {\n this.inputs.activeItem.set(item);\n return;\n }\n }\n }\n\n if (firstItem) {\n this.inputs.activeItem.set(firstItem);\n }\n }\n\n /** Validates the state of the radio group and returns a list of accessibility violations. */\n validate(): string[] {\n const violations: string[] = [];\n\n if (this.selectedItem()?.disabled() && this.inputs.skipDisabled()) {\n violations.push(\n \"Accessibility Violation: The selected radio button is disabled while 'skipDisabled' is true, making the selection unreachable via keyboard.\",\n );\n }\n\n return violations;\n }\n\n /** Finds the RadioButtonPattern associated with a pointer event target. */\n private _getItem(e: PointerEvent): RadioButtonPattern<V> | undefined {\n if (!(e.target instanceof HTMLElement)) {\n return undefined;\n }\n\n // Assumes the target or its ancestor has role=\"radio\"\n const element = e.target.closest('[role=\"radio\"]');\n return this.inputs.items().find(i => i.element() === element);\n }\n}\n"],"names":[],"mappings":";;;;AAmDA;MACa,iBAAiB,CAAA;AAqFP,IAAA,MAAA;;AAnFZ,IAAA,YAAY;;AAGrB,IAAA,WAAW;;IAGX,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,YAAY,CA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@@ class CdkAutoSizeVirtualScroll {
|
|
|
400
400
|
ngOnChanges() {
|
|
401
401
|
this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx);
|
|
402
402
|
}
|
|
403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
404
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-
|
|
403
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkAutoSizeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
404
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-rc.1", type: CdkAutoSizeVirtualScroll, isStandalone: true, selector: "cdk-virtual-scroll-viewport[autosize]", inputs: { minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx" }, providers: [
|
|
405
405
|
{
|
|
406
406
|
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
407
407
|
useFactory: _autoSizeVirtualScrollStrategyFactory,
|
|
@@ -409,7 +409,7 @@ class CdkAutoSizeVirtualScroll {
|
|
|
409
409
|
},
|
|
410
410
|
], usesOnChanges: true, ngImport: i0 });
|
|
411
411
|
}
|
|
412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkAutoSizeVirtualScroll, decorators: [{
|
|
413
413
|
type: Directive,
|
|
414
414
|
args: [{
|
|
415
415
|
selector: 'cdk-virtual-scroll-viewport[autosize]',
|
|
@@ -428,11 +428,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.1",
|
|
|
428
428
|
}] } });
|
|
429
429
|
|
|
430
430
|
class ScrollingModule {
|
|
431
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
432
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-
|
|
433
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-
|
|
431
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: ScrollingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
432
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-rc.1", ngImport: i0, type: ScrollingModule, imports: [CdkAutoSizeVirtualScroll], exports: [CdkAutoSizeVirtualScroll] });
|
|
433
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: ScrollingModule });
|
|
434
434
|
}
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: ScrollingModule, decorators: [{
|
|
436
436
|
type: NgModule,
|
|
437
437
|
args: [{
|
|
438
438
|
imports: [CdkAutoSizeVirtualScroll],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrolling.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/scrolling/scrolling-module.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 {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {ListRange} from '@angular/cdk/collections';\nimport {\n CdkVirtualScrollViewport,\n VIRTUAL_SCROLL_STRATEGY,\n VirtualScrollStrategy,\n} from '@angular/cdk/scrolling';\nimport {Directive, forwardRef, Input, OnChanges} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n/**\n * A class that tracks the size of items that have been seen and uses it to estimate the average\n * item size.\n */\nexport class ItemSizeAverager {\n /** The total amount of weight behind the current average. */\n private _totalWeight = 0;\n\n /** The current average item size. */\n private _averageItemSize: number;\n\n /** The default size to use for items when no data is available. */\n private _defaultItemSize: number;\n\n /** @param defaultItemSize The default size to use for items when no data is available. */\n constructor(defaultItemSize = 50) {\n this._defaultItemSize = defaultItemSize;\n this._averageItemSize = defaultItemSize;\n }\n\n /** Returns the average item size. */\n getAverageItemSize(): number {\n return this._averageItemSize;\n }\n\n /**\n * Adds a measurement sample for the estimator to consider.\n * @param range The measured range.\n * @param size The measured size of the given range in pixels.\n */\n addSample(range: ListRange, size: number) {\n const newTotalWeight = this._totalWeight + range.end - range.start;\n if (newTotalWeight) {\n const newAverageItemSize =\n (size + this._averageItemSize * this._totalWeight) / newTotalWeight;\n if (newAverageItemSize) {\n this._averageItemSize = newAverageItemSize;\n this._totalWeight = newTotalWeight;\n }\n }\n }\n\n /** Resets the averager. */\n reset() {\n this._averageItemSize = this._defaultItemSize;\n this._totalWeight = 0;\n }\n}\n\n/** Virtual scrolling strategy for lists with items of unknown or dynamic size. */\nexport class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy {\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n scrolledIndexChange = new Observable<number>(() => {\n // TODO(mmalerba): Implement.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw Error(\n 'cdk-virtual-scroll: scrolledIndexChange is currently not supported for the' +\n ' autosize scroll strategy',\n );\n }\n });\n\n /** The attached viewport. */\n private _viewport: CdkVirtualScrollViewport | null = null;\n\n /** The minimum amount of buffer rendered beyond the viewport (in pixels). */\n private _minBufferPx: number;\n\n /** The number of buffer items to render beyond the edge of the viewport (in pixels). */\n private _maxBufferPx: number;\n\n /** The estimator used to estimate the size of unseen items. */\n private _averager: ItemSizeAverager;\n\n /** The last measured scroll offset of the viewport. */\n private _lastScrollOffset: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentSize: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentOffset: number;\n\n /**\n * The number of consecutive cycles where removing extra items has failed. Failure here means that\n * we estimated how many items we could safely remove, but our estimate turned out to be too much\n * and it wasn't safe to remove that many elements.\n */\n private _removalFailures = 0;\n\n /**\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered.\n * @param maxBufferPx The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * @param averager The averager used to estimate the size of unseen items.\n */\n constructor(minBufferPx: number, maxBufferPx: number, averager = new ItemSizeAverager()) {\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n this._averager = averager;\n }\n\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport: CdkVirtualScrollViewport) {\n this._averager.reset();\n this._viewport = viewport;\n this._renderContentForCurrentOffset();\n }\n\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach() {\n this._viewport = null;\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentScrolled() {\n if (this._viewport) {\n this._updateRenderedContentAfterScroll();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onDataLengthChanged() {\n if (this._viewport) {\n this._renderContentForCurrentOffset();\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentRendered() {\n if (this._viewport) {\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onRenderedOffsetChanged() {\n if (this._viewport) {\n this._checkRenderedContentOffset();\n }\n }\n\n /** Scroll to the offset for the given index. */\n scrollToIndex(): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // TODO(mmalerba): Implement.\n throw Error(\n 'cdk-virtual-scroll: scrollToIndex is currently not supported for the autosize' +\n ' scroll strategy',\n );\n }\n }\n\n /**\n * Update the buffer parameters.\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * @param maxBufferPx The number of buffer items to render beyond the edge of the viewport (in\n * pixels).\n */\n updateBufferSize(minBufferPx: number, maxBufferPx: number) {\n if (maxBufferPx < minBufferPx) {\n throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');\n }\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n }\n\n /** Update the rendered content after the user scrolls. */\n private _updateRenderedContentAfterScroll() {\n const viewport = this._viewport!;\n\n // The current scroll offset.\n const scrollOffset = viewport.measureScrollOffset();\n // The delta between the current scroll offset and the previously recorded scroll offset.\n let scrollDelta = scrollOffset - this._lastScrollOffset;\n // The magnitude of the scroll delta.\n let scrollMagnitude = Math.abs(scrollDelta);\n\n // The currently rendered range.\n const renderedRange = viewport.getRenderedRange();\n\n // If we're scrolling toward the top, we need to account for the fact that the predicted amount\n // of content and the actual amount of scrollable space may differ. We address this by slowly\n // correcting the difference on each scroll event.\n let offsetCorrection = 0;\n if (scrollDelta < 0) {\n // The content offset we would expect based on the average item size.\n const predictedOffset = renderedRange.start * this._averager.getAverageItemSize();\n // The difference between the predicted size of the un-rendered content at the beginning and\n // the actual available space to scroll over. We need to reduce this to zero by the time the\n // user scrolls to the top.\n // - 0 indicates that the predicted size and available space are the same.\n // - A negative number that the predicted size is smaller than the available space.\n // - A positive number indicates the predicted size is larger than the available space\n const offsetDifference = predictedOffset - this._lastRenderedContentOffset;\n // The amount of difference to correct during this scroll event. We calculate this as a\n // percentage of the total difference based on the percentage of the distance toward the top\n // that the user scrolled.\n offsetCorrection = Math.round(\n offsetDifference *\n Math.max(0, Math.min(1, scrollMagnitude / (scrollOffset + scrollMagnitude))),\n );\n\n // Based on the offset correction above, we pretend that the scroll delta was bigger or\n // smaller than it actually was, this way we can start to eliminate the difference.\n scrollDelta = scrollDelta - offsetCorrection;\n scrollMagnitude = Math.abs(scrollDelta);\n }\n\n // The current amount of buffer past the start of the viewport.\n const startBuffer = this._lastScrollOffset - this._lastRenderedContentOffset;\n // The current amount of buffer past the end of the viewport.\n const endBuffer =\n this._lastRenderedContentOffset +\n this._lastRenderedContentSize -\n (this._lastScrollOffset + viewport.getViewportSize());\n // The amount of unfilled space that should be filled on the side the user is scrolling toward\n // in order to safely absorb the scroll delta.\n const underscan =\n scrollMagnitude + this._minBufferPx - (scrollDelta < 0 ? startBuffer : endBuffer);\n\n // Check if there's unfilled space that we need to render new elements to fill.\n if (underscan > 0) {\n // Check if the scroll magnitude was larger than the viewport size. In this case the user\n // won't notice a discontinuity if we just jump to the new estimated position in the list.\n // However, if the scroll magnitude is smaller than the viewport the user might notice some\n // jitteriness if we just jump to the estimated position. Instead we make sure to scroll by\n // the same number of pixels as the scroll magnitude.\n if (scrollMagnitude >= viewport.getViewportSize()) {\n this._renderContentForCurrentOffset();\n } else {\n // The number of new items to render on the side the user is scrolling towards. Rather than\n // just filling the underscan space, we actually fill enough to have a buffer size of\n // `maxBufferPx`. This gives us a little wiggle room in case our item size estimate is off.\n const addItems = Math.max(\n 0,\n Math.ceil(\n (underscan - this._minBufferPx + this._maxBufferPx) /\n this._averager.getAverageItemSize(),\n ),\n );\n // The amount of filled space beyond what is necessary on the side the user is scrolling\n // away from.\n const overscan =\n (scrollDelta < 0 ? endBuffer : startBuffer) - this._minBufferPx + scrollMagnitude;\n // The number of currently rendered items to remove on the side the user is scrolling away\n // from. If removal has failed in recent cycles we are less aggressive in how much we try to\n // remove.\n const unboundedRemoveItems = Math.floor(\n overscan / this._averager.getAverageItemSize() / (this._removalFailures + 1),\n );\n const removeItems = Math.min(\n renderedRange.end - renderedRange.start,\n Math.max(0, unboundedRemoveItems),\n );\n\n // The new range we will tell the viewport to render. We first expand it to include the new\n // items we want rendered, we then contract the opposite side to remove items we no longer\n // want rendered.\n const range = this._expandRange(\n renderedRange,\n scrollDelta < 0 ? addItems : 0,\n scrollDelta > 0 ? addItems : 0,\n );\n if (scrollDelta < 0) {\n range.end = Math.max(range.start + 1, range.end - removeItems);\n } else {\n range.start = Math.min(range.end - 1, range.start + removeItems);\n }\n\n // The new offset we want to set on the rendered content. To determine this we measure the\n // number of pixels we removed and then adjust the offset to the start of the rendered\n // content or to the end of the rendered content accordingly (whichever one doesn't require\n // that the newly added items to be rendered to calculate.)\n let contentOffset: number;\n let contentOffsetTo: 'to-start' | 'to-end';\n if (scrollDelta < 0) {\n let removedSize = viewport.measureRangeSize({\n start: range.end,\n end: renderedRange.end,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset =\n this._lastRenderedContentOffset + this._lastRenderedContentSize - removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.end = renderedRange.end;\n contentOffset = this._lastRenderedContentOffset + this._lastRenderedContentSize;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-end';\n } else {\n const removedSize = viewport.measureRangeSize({\n start: renderedRange.start,\n end: range.start,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset = this._lastRenderedContentOffset + removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.start = renderedRange.start;\n contentOffset = this._lastRenderedContentOffset;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-start';\n }\n\n // Set the range and offset we calculated above.\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(contentOffset + offsetCorrection, contentOffsetTo);\n }\n } else if (offsetCorrection) {\n // Even if the rendered range didn't change, we may still need to adjust the content offset to\n // simulate scrolling slightly slower or faster than the user actually scrolled.\n viewport.setRenderedContentOffset(this._lastRenderedContentOffset + offsetCorrection);\n }\n\n // Save the scroll offset to be compared to the new value on the next scroll event.\n this._lastScrollOffset = scrollOffset;\n }\n\n /**\n * Checks the size of the currently rendered content and uses it to update the estimated item size\n * and estimated total content size.\n */\n private _checkRenderedContentSize() {\n const viewport = this._viewport!;\n this._lastRenderedContentSize = viewport.measureRenderedContentSize();\n this._averager.addSample(viewport.getRenderedRange(), this._lastRenderedContentSize);\n this._updateTotalContentSize(this._lastRenderedContentSize);\n }\n\n /** Checks the currently rendered content offset and saves the value for later use. */\n private _checkRenderedContentOffset() {\n const viewport = this._viewport!;\n this._lastRenderedContentOffset = viewport.getOffsetToRenderedContentStart()!;\n }\n\n /**\n * Recalculates the rendered content based on our estimate of what should be shown at the current\n * scroll offset.\n */\n private _renderContentForCurrentOffset() {\n const viewport = this._viewport!;\n const scrollOffset = viewport.measureScrollOffset();\n this._lastScrollOffset = scrollOffset;\n this._removalFailures = 0;\n\n const itemSize = this._averager.getAverageItemSize();\n const firstVisibleIndex = Math.min(\n viewport.getDataLength() - 1,\n Math.floor(scrollOffset / itemSize),\n );\n const bufferSize = Math.ceil(this._maxBufferPx / itemSize);\n const range = this._expandRange(\n this._getVisibleRangeForIndex(firstVisibleIndex),\n bufferSize,\n bufferSize,\n );\n\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(itemSize * range.start);\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Gets the visible range of data for the given start index. If the start index is too close to\n * the end of the list it may be backed up to ensure the estimated size of the range is enough to\n * fill the viewport.\n * Note: must not be called if `this._viewport` is null\n * @param startIndex The index to start the range at\n * @return a range estimated to be large enough to fill the viewport when rendered.\n */\n private _getVisibleRangeForIndex(startIndex: number): ListRange {\n const viewport = this._viewport!;\n const range: ListRange = {\n start: startIndex,\n end: startIndex + Math.ceil(viewport.getViewportSize() / this._averager.getAverageItemSize()),\n };\n const extra = range.end - viewport.getDataLength();\n if (extra > 0) {\n range.start = Math.max(0, range.start - extra);\n }\n return range;\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Expand the given range by the given amount in either direction.\n * Note: must not be called if `this._viewport` is null\n * @param range The range to expand\n * @param expandStart The number of items to expand the start of the range by.\n * @param expandEnd The number of items to expand the end of the range by.\n * @return The expanded range.\n */\n private _expandRange(range: ListRange, expandStart: number, expandEnd: number): ListRange {\n const viewport = this._viewport!;\n const start = Math.max(0, range.start - expandStart);\n const end = Math.min(viewport.getDataLength(), range.end + expandEnd);\n return {start, end};\n }\n\n /** Update the viewport's total content size. */\n private _updateTotalContentSize(renderedContentSize: number) {\n const viewport = this._viewport!;\n const renderedRange = viewport.getRenderedRange();\n const totalSize =\n renderedContentSize +\n (viewport.getDataLength() - (renderedRange.end - renderedRange.start)) *\n this._averager.getAverageItemSize();\n viewport.setTotalContentSize(totalSize);\n }\n}\n\n/**\n * Provider factory for `AutoSizeVirtualScrollStrategy` that simply extracts the already created\n * `AutoSizeVirtualScrollStrategy` from the given directive.\n * @param autoSizeDir The instance of `CdkAutoSizeVirtualScroll` to extract the\n * `AutoSizeVirtualScrollStrategy` from.\n */\nexport function _autoSizeVirtualScrollStrategyFactory(autoSizeDir: CdkAutoSizeVirtualScroll) {\n return autoSizeDir._scrollStrategy;\n}\n\n/** A virtual scroll strategy that supports unknown or dynamic size items. */\n@Directive({\n selector: 'cdk-virtual-scroll-viewport[autosize]',\n providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _autoSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkAutoSizeVirtualScroll)],\n },\n ],\n})\nexport class CdkAutoSizeVirtualScroll implements OnChanges {\n /**\n * The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n */\n @Input()\n get minBufferPx(): number {\n return this._minBufferPx;\n }\n set minBufferPx(value: NumberInput) {\n this._minBufferPx = coerceNumberProperty(value);\n }\n _minBufferPx = 100;\n\n /**\n * The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * Defaults to 200px.\n */\n @Input()\n get maxBufferPx(): number {\n return this._maxBufferPx;\n }\n set maxBufferPx(value: NumberInput) {\n this._maxBufferPx = coerceNumberProperty(value);\n }\n _maxBufferPx = 200;\n\n /** The scroll strategy used by this directive. */\n _scrollStrategy = new AutoSizeVirtualScrollStrategy(this.minBufferPx, this.maxBufferPx);\n\n ngOnChanges() {\n this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx);\n }\n}\n","/**\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 {NgModule} from '@angular/core';\nimport {CdkAutoSizeVirtualScroll} from './auto-size-virtual-scroll';\n\n@NgModule({\n imports: [CdkAutoSizeVirtualScroll],\n exports: [CdkAutoSizeVirtualScroll],\n})\nexport class ScrollingModule {}\n"],"names":[],"mappings":";;;;;;AAkBA;;;AAGG;MACU,gBAAgB,CAAA;;IAEnB,YAAY,GAAG,CAAC;;AAGhB,IAAA,gBAAgB;;AAGhB,IAAA,gBAAgB;;IAGxB,WAAY,CAAA,eAAe,GAAG,EAAE,EAAA;AAC9B,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe;AACvC,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe;;;IAIzC,kBAAkB,GAAA;QAChB,OAAO,IAAI,CAAC,gBAAgB;;AAG9B;;;;AAIG;IACH,SAAS,CAAC,KAAgB,EAAE,IAAY,EAAA;AACtC,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK;QAClE,IAAI,cAAc,EAAE;AAClB,YAAA,MAAM,kBAAkB,GACtB,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,G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A;kBAVpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uCAAuC;AACjD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,uBAAuB;AAChC,4BAAA,UAAU,EAAE,qCAAqC;4BACjD,IAAI,EAAE,CAAC,UAAU,CAAC,MAAK,wBAAyB,CAAC,CAAC;AACnD,yBAAA;AACF,qBAAA;AACF,iBAAA;8BAOK,WAAW,EAAA,CAAA;sBADd;gBAgBG,WAAW,EAAA,CAAA;sBADd;;;MCtdU,eAAe,CAAA;8GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CAHhB,wBAAwB,CAAA,EAAA,OAAA,EAAA,CACxB,wBAAwB,CAAA,EAAA,CAAA;+GAEvB,eAAe,EAAA,CAAA;;kGAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,wBAAwB,CAAC;oBACnC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"scrolling.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts","../../../../../darwin_arm64-fastbuild-ST-c646aa77115d/bin/src/cdk-experimental/scrolling/scrolling-module.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 {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {ListRange} from '@angular/cdk/collections';\nimport {\n CdkVirtualScrollViewport,\n VIRTUAL_SCROLL_STRATEGY,\n VirtualScrollStrategy,\n} from '@angular/cdk/scrolling';\nimport {Directive, forwardRef, Input, OnChanges} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n/**\n * A class that tracks the size of items that have been seen and uses it to estimate the average\n * item size.\n */\nexport class ItemSizeAverager {\n /** The total amount of weight behind the current average. */\n private _totalWeight = 0;\n\n /** The current average item size. */\n private _averageItemSize: number;\n\n /** The default size to use for items when no data is available. */\n private _defaultItemSize: number;\n\n /** @param defaultItemSize The default size to use for items when no data is available. */\n constructor(defaultItemSize = 50) {\n this._defaultItemSize = defaultItemSize;\n this._averageItemSize = defaultItemSize;\n }\n\n /** Returns the average item size. */\n getAverageItemSize(): number {\n return this._averageItemSize;\n }\n\n /**\n * Adds a measurement sample for the estimator to consider.\n * @param range The measured range.\n * @param size The measured size of the given range in pixels.\n */\n addSample(range: ListRange, size: number) {\n const newTotalWeight = this._totalWeight + range.end - range.start;\n if (newTotalWeight) {\n const newAverageItemSize =\n (size + this._averageItemSize * this._totalWeight) / newTotalWeight;\n if (newAverageItemSize) {\n this._averageItemSize = newAverageItemSize;\n this._totalWeight = newTotalWeight;\n }\n }\n }\n\n /** Resets the averager. */\n reset() {\n this._averageItemSize = this._defaultItemSize;\n this._totalWeight = 0;\n }\n}\n\n/** Virtual scrolling strategy for lists with items of unknown or dynamic size. */\nexport class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy {\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n scrolledIndexChange = new Observable<number>(() => {\n // TODO(mmalerba): Implement.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw Error(\n 'cdk-virtual-scroll: scrolledIndexChange is currently not supported for the' +\n ' autosize scroll strategy',\n );\n }\n });\n\n /** The attached viewport. */\n private _viewport: CdkVirtualScrollViewport | null = null;\n\n /** The minimum amount of buffer rendered beyond the viewport (in pixels). */\n private _minBufferPx: number;\n\n /** The number of buffer items to render beyond the edge of the viewport (in pixels). */\n private _maxBufferPx: number;\n\n /** The estimator used to estimate the size of unseen items. */\n private _averager: ItemSizeAverager;\n\n /** The last measured scroll offset of the viewport. */\n private _lastScrollOffset: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentSize: number;\n\n /** The last measured size of the rendered content in the viewport. */\n private _lastRenderedContentOffset: number;\n\n /**\n * The number of consecutive cycles where removing extra items has failed. Failure here means that\n * we estimated how many items we could safely remove, but our estimate turned out to be too much\n * and it wasn't safe to remove that many elements.\n */\n private _removalFailures = 0;\n\n /**\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered.\n * @param maxBufferPx The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * @param averager The averager used to estimate the size of unseen items.\n */\n constructor(minBufferPx: number, maxBufferPx: number, averager = new ItemSizeAverager()) {\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n this._averager = averager;\n }\n\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport: CdkVirtualScrollViewport) {\n this._averager.reset();\n this._viewport = viewport;\n this._renderContentForCurrentOffset();\n }\n\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach() {\n this._viewport = null;\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentScrolled() {\n if (this._viewport) {\n this._updateRenderedContentAfterScroll();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onDataLengthChanged() {\n if (this._viewport) {\n this._renderContentForCurrentOffset();\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentRendered() {\n if (this._viewport) {\n this._checkRenderedContentSize();\n }\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onRenderedOffsetChanged() {\n if (this._viewport) {\n this._checkRenderedContentOffset();\n }\n }\n\n /** Scroll to the offset for the given index. */\n scrollToIndex(): void {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // TODO(mmalerba): Implement.\n throw Error(\n 'cdk-virtual-scroll: scrollToIndex is currently not supported for the autosize' +\n ' scroll strategy',\n );\n }\n }\n\n /**\n * Update the buffer parameters.\n * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).\n * @param maxBufferPx The number of buffer items to render beyond the edge of the viewport (in\n * pixels).\n */\n updateBufferSize(minBufferPx: number, maxBufferPx: number) {\n if (maxBufferPx < minBufferPx) {\n throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');\n }\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n }\n\n /** Update the rendered content after the user scrolls. */\n private _updateRenderedContentAfterScroll() {\n const viewport = this._viewport!;\n\n // The current scroll offset.\n const scrollOffset = viewport.measureScrollOffset();\n // The delta between the current scroll offset and the previously recorded scroll offset.\n let scrollDelta = scrollOffset - this._lastScrollOffset;\n // The magnitude of the scroll delta.\n let scrollMagnitude = Math.abs(scrollDelta);\n\n // The currently rendered range.\n const renderedRange = viewport.getRenderedRange();\n\n // If we're scrolling toward the top, we need to account for the fact that the predicted amount\n // of content and the actual amount of scrollable space may differ. We address this by slowly\n // correcting the difference on each scroll event.\n let offsetCorrection = 0;\n if (scrollDelta < 0) {\n // The content offset we would expect based on the average item size.\n const predictedOffset = renderedRange.start * this._averager.getAverageItemSize();\n // The difference between the predicted size of the un-rendered content at the beginning and\n // the actual available space to scroll over. We need to reduce this to zero by the time the\n // user scrolls to the top.\n // - 0 indicates that the predicted size and available space are the same.\n // - A negative number that the predicted size is smaller than the available space.\n // - A positive number indicates the predicted size is larger than the available space\n const offsetDifference = predictedOffset - this._lastRenderedContentOffset;\n // The amount of difference to correct during this scroll event. We calculate this as a\n // percentage of the total difference based on the percentage of the distance toward the top\n // that the user scrolled.\n offsetCorrection = Math.round(\n offsetDifference *\n Math.max(0, Math.min(1, scrollMagnitude / (scrollOffset + scrollMagnitude))),\n );\n\n // Based on the offset correction above, we pretend that the scroll delta was bigger or\n // smaller than it actually was, this way we can start to eliminate the difference.\n scrollDelta = scrollDelta - offsetCorrection;\n scrollMagnitude = Math.abs(scrollDelta);\n }\n\n // The current amount of buffer past the start of the viewport.\n const startBuffer = this._lastScrollOffset - this._lastRenderedContentOffset;\n // The current amount of buffer past the end of the viewport.\n const endBuffer =\n this._lastRenderedContentOffset +\n this._lastRenderedContentSize -\n (this._lastScrollOffset + viewport.getViewportSize());\n // The amount of unfilled space that should be filled on the side the user is scrolling toward\n // in order to safely absorb the scroll delta.\n const underscan =\n scrollMagnitude + this._minBufferPx - (scrollDelta < 0 ? startBuffer : endBuffer);\n\n // Check if there's unfilled space that we need to render new elements to fill.\n if (underscan > 0) {\n // Check if the scroll magnitude was larger than the viewport size. In this case the user\n // won't notice a discontinuity if we just jump to the new estimated position in the list.\n // However, if the scroll magnitude is smaller than the viewport the user might notice some\n // jitteriness if we just jump to the estimated position. Instead we make sure to scroll by\n // the same number of pixels as the scroll magnitude.\n if (scrollMagnitude >= viewport.getViewportSize()) {\n this._renderContentForCurrentOffset();\n } else {\n // The number of new items to render on the side the user is scrolling towards. Rather than\n // just filling the underscan space, we actually fill enough to have a buffer size of\n // `maxBufferPx`. This gives us a little wiggle room in case our item size estimate is off.\n const addItems = Math.max(\n 0,\n Math.ceil(\n (underscan - this._minBufferPx + this._maxBufferPx) /\n this._averager.getAverageItemSize(),\n ),\n );\n // The amount of filled space beyond what is necessary on the side the user is scrolling\n // away from.\n const overscan =\n (scrollDelta < 0 ? endBuffer : startBuffer) - this._minBufferPx + scrollMagnitude;\n // The number of currently rendered items to remove on the side the user is scrolling away\n // from. If removal has failed in recent cycles we are less aggressive in how much we try to\n // remove.\n const unboundedRemoveItems = Math.floor(\n overscan / this._averager.getAverageItemSize() / (this._removalFailures + 1),\n );\n const removeItems = Math.min(\n renderedRange.end - renderedRange.start,\n Math.max(0, unboundedRemoveItems),\n );\n\n // The new range we will tell the viewport to render. We first expand it to include the new\n // items we want rendered, we then contract the opposite side to remove items we no longer\n // want rendered.\n const range = this._expandRange(\n renderedRange,\n scrollDelta < 0 ? addItems : 0,\n scrollDelta > 0 ? addItems : 0,\n );\n if (scrollDelta < 0) {\n range.end = Math.max(range.start + 1, range.end - removeItems);\n } else {\n range.start = Math.min(range.end - 1, range.start + removeItems);\n }\n\n // The new offset we want to set on the rendered content. To determine this we measure the\n // number of pixels we removed and then adjust the offset to the start of the rendered\n // content or to the end of the rendered content accordingly (whichever one doesn't require\n // that the newly added items to be rendered to calculate.)\n let contentOffset: number;\n let contentOffsetTo: 'to-start' | 'to-end';\n if (scrollDelta < 0) {\n let removedSize = viewport.measureRangeSize({\n start: range.end,\n end: renderedRange.end,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset =\n this._lastRenderedContentOffset + this._lastRenderedContentSize - removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.end = renderedRange.end;\n contentOffset = this._lastRenderedContentOffset + this._lastRenderedContentSize;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-end';\n } else {\n const removedSize = viewport.measureRangeSize({\n start: renderedRange.start,\n end: range.start,\n });\n // Check that we're not removing too much.\n if (removedSize <= overscan) {\n contentOffset = this._lastRenderedContentOffset + removedSize;\n this._removalFailures = 0;\n } else {\n // If the removal is more than the overscan can absorb just undo it and record the fact\n // that the removal failed so we can be less aggressive next time.\n range.start = renderedRange.start;\n contentOffset = this._lastRenderedContentOffset;\n this._removalFailures++;\n }\n contentOffsetTo = 'to-start';\n }\n\n // Set the range and offset we calculated above.\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(contentOffset + offsetCorrection, contentOffsetTo);\n }\n } else if (offsetCorrection) {\n // Even if the rendered range didn't change, we may still need to adjust the content offset to\n // simulate scrolling slightly slower or faster than the user actually scrolled.\n viewport.setRenderedContentOffset(this._lastRenderedContentOffset + offsetCorrection);\n }\n\n // Save the scroll offset to be compared to the new value on the next scroll event.\n this._lastScrollOffset = scrollOffset;\n }\n\n /**\n * Checks the size of the currently rendered content and uses it to update the estimated item size\n * and estimated total content size.\n */\n private _checkRenderedContentSize() {\n const viewport = this._viewport!;\n this._lastRenderedContentSize = viewport.measureRenderedContentSize();\n this._averager.addSample(viewport.getRenderedRange(), this._lastRenderedContentSize);\n this._updateTotalContentSize(this._lastRenderedContentSize);\n }\n\n /** Checks the currently rendered content offset and saves the value for later use. */\n private _checkRenderedContentOffset() {\n const viewport = this._viewport!;\n this._lastRenderedContentOffset = viewport.getOffsetToRenderedContentStart()!;\n }\n\n /**\n * Recalculates the rendered content based on our estimate of what should be shown at the current\n * scroll offset.\n */\n private _renderContentForCurrentOffset() {\n const viewport = this._viewport!;\n const scrollOffset = viewport.measureScrollOffset();\n this._lastScrollOffset = scrollOffset;\n this._removalFailures = 0;\n\n const itemSize = this._averager.getAverageItemSize();\n const firstVisibleIndex = Math.min(\n viewport.getDataLength() - 1,\n Math.floor(scrollOffset / itemSize),\n );\n const bufferSize = Math.ceil(this._maxBufferPx / itemSize);\n const range = this._expandRange(\n this._getVisibleRangeForIndex(firstVisibleIndex),\n bufferSize,\n bufferSize,\n );\n\n viewport.setRenderedRange(range);\n viewport.setRenderedContentOffset(itemSize * range.start);\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Gets the visible range of data for the given start index. If the start index is too close to\n * the end of the list it may be backed up to ensure the estimated size of the range is enough to\n * fill the viewport.\n * Note: must not be called if `this._viewport` is null\n * @param startIndex The index to start the range at\n * @return a range estimated to be large enough to fill the viewport when rendered.\n */\n private _getVisibleRangeForIndex(startIndex: number): ListRange {\n const viewport = this._viewport!;\n const range: ListRange = {\n start: startIndex,\n end: startIndex + Math.ceil(viewport.getViewportSize() / this._averager.getAverageItemSize()),\n };\n const extra = range.end - viewport.getDataLength();\n if (extra > 0) {\n range.start = Math.max(0, range.start - extra);\n }\n return range;\n }\n\n // TODO: maybe move to base class, can probably share with fixed size strategy.\n /**\n * Expand the given range by the given amount in either direction.\n * Note: must not be called if `this._viewport` is null\n * @param range The range to expand\n * @param expandStart The number of items to expand the start of the range by.\n * @param expandEnd The number of items to expand the end of the range by.\n * @return The expanded range.\n */\n private _expandRange(range: ListRange, expandStart: number, expandEnd: number): ListRange {\n const viewport = this._viewport!;\n const start = Math.max(0, range.start - expandStart);\n const end = Math.min(viewport.getDataLength(), range.end + expandEnd);\n return {start, end};\n }\n\n /** Update the viewport's total content size. */\n private _updateTotalContentSize(renderedContentSize: number) {\n const viewport = this._viewport!;\n const renderedRange = viewport.getRenderedRange();\n const totalSize =\n renderedContentSize +\n (viewport.getDataLength() - (renderedRange.end - renderedRange.start)) *\n this._averager.getAverageItemSize();\n viewport.setTotalContentSize(totalSize);\n }\n}\n\n/**\n * Provider factory for `AutoSizeVirtualScrollStrategy` that simply extracts the already created\n * `AutoSizeVirtualScrollStrategy` from the given directive.\n * @param autoSizeDir The instance of `CdkAutoSizeVirtualScroll` to extract the\n * `AutoSizeVirtualScrollStrategy` from.\n */\nexport function _autoSizeVirtualScrollStrategyFactory(autoSizeDir: CdkAutoSizeVirtualScroll) {\n return autoSizeDir._scrollStrategy;\n}\n\n/** A virtual scroll strategy that supports unknown or dynamic size items. */\n@Directive({\n selector: 'cdk-virtual-scroll-viewport[autosize]',\n providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _autoSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkAutoSizeVirtualScroll)],\n },\n ],\n})\nexport class CdkAutoSizeVirtualScroll implements OnChanges {\n /**\n * The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n */\n @Input()\n get minBufferPx(): number {\n return this._minBufferPx;\n }\n set minBufferPx(value: NumberInput) {\n this._minBufferPx = coerceNumberProperty(value);\n }\n _minBufferPx = 100;\n\n /**\n * The number of pixels worth of buffer to shoot for when rendering new items.\n * If the actual amount turns out to be less it will not necessarily trigger an additional\n * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).\n * Defaults to 200px.\n */\n @Input()\n get maxBufferPx(): number {\n return this._maxBufferPx;\n }\n set maxBufferPx(value: NumberInput) {\n this._maxBufferPx = coerceNumberProperty(value);\n }\n _maxBufferPx = 200;\n\n /** The scroll strategy used by this directive. */\n _scrollStrategy = new AutoSizeVirtualScrollStrategy(this.minBufferPx, this.maxBufferPx);\n\n ngOnChanges() {\n this._scrollStrategy.updateBufferSize(this.minBufferPx, this.maxBufferPx);\n }\n}\n","/**\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 {NgModule} from '@angular/core';\nimport {CdkAutoSizeVirtualScroll} from './auto-size-virtual-scroll';\n\n@NgModule({\n imports: [CdkAutoSizeVirtualScroll],\n exports: [CdkAutoSizeVirtualScroll],\n})\nexport class ScrollingModule {}\n"],"names":[],"mappings":";;;;;;AAkBA;;;AAGG;MACU,gBAAgB,CAAA;;IAEnB,YAAY,GAAG,CAAC;;AAGhB,IAAA,gBAAgB;;AAGhB,IAAA,gBAAgB;;IAGxB,WAAY,CAAA,eAAe,GAAG,EAAE,EAAA;AAC9B,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe;AACvC,QAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe;;;IAIzC,kBAAkB,GAAA;QAChB,OAAO,IAAI,CAAC,gBAAgB;;AAG9B;;;;AAIG;IACH,SAAS,CAAC,KAAgB,EAAE,IAAY,EAAA;AACtC,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,KAAK;QAClE,IAAI,cAAc,EAAE;AAClB,YAAA,MAAM,kBAAkB,GACtB,CAAC,IAAI,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,IAAI,cAAc;YACrE,I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AAA;AACT,oBAAA,QAAQ,EAAE,uCAAuC;AACjD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,uBAAuB;AAChC,4BAAA,UAAU,EAAE,qCAAqC;4BACjD,IAAI,EAAE,CAAC,UAAU,CAAC,MAAK,wBAAyB,CAAC,CAAC;AACnD,yBAAA;AACF,qBAAA;AACF,iBAAA;8BAOK,WAAW,EAAA,CAAA;sBADd;gBAgBG,WAAW,EAAA,CAAA;sBADd;;;MCtdU,eAAe,CAAA;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;6GAAf,eAAe,EAAA,OAAA,EAAA,CAHhB,wBAAwB,CAAA,EAAA,OAAA,EAAA,CACxB,wBAAwB,CAAA,EAAA,CAAA;6GAEvB,eAAe,EAAA,CAAA;;gGAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,wBAAwB,CAAC;oBACnC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
|
package/fesm2022/selection.mjs
CHANGED
|
@@ -235,10 +235,10 @@ class CdkSelection {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
selectAllState = 'none';
|
|
238
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
239
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-
|
|
238
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
239
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-rc.1", type: CdkSelection, isStandalone: true, selector: "[cdkSelection]", inputs: { dataSource: "dataSource", trackByFn: ["trackBy", "trackByFn"], multiple: ["cdkSelectionMultiple", "multiple"] }, outputs: { change: "cdkSelectionChange" }, exportAs: ["cdkSelection"], ngImport: i0 });
|
|
240
240
|
}
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelection, decorators: [{
|
|
242
242
|
type: Directive,
|
|
243
243
|
args: [{
|
|
244
244
|
selector: '[cdkSelection]',
|
|
@@ -332,10 +332,10 @@ class CdkSelectAll {
|
|
|
332
332
|
this._destroyed.next();
|
|
333
333
|
this._destroyed.complete();
|
|
334
334
|
}
|
|
335
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
336
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-
|
|
335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectAll, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
336
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-rc.1", type: CdkSelectAll, isStandalone: true, selector: "[cdkSelectAll]", exportAs: ["cdkSelectAll"], ngImport: i0 });
|
|
337
337
|
}
|
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectAll, decorators: [{
|
|
339
339
|
type: Directive,
|
|
340
340
|
args: [{
|
|
341
341
|
selector: '[cdkSelectAll]',
|
|
@@ -405,10 +405,10 @@ class CdkSelectionToggle {
|
|
|
405
405
|
_isSelected() {
|
|
406
406
|
return this._selection.isSelected(this.value, this.index);
|
|
407
407
|
}
|
|
408
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
409
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-
|
|
408
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionToggle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
409
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-rc.1", type: CdkSelectionToggle, isStandalone: true, selector: "[cdkSelectionToggle]", inputs: { value: ["cdkSelectionToggleValue", "value"], index: ["cdkSelectionToggleIndex", "index"] }, exportAs: ["cdkSelectionToggle"], ngImport: i0 });
|
|
410
410
|
}
|
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionToggle, decorators: [{
|
|
412
412
|
type: Directive,
|
|
413
413
|
args: [{
|
|
414
414
|
selector: '[cdkSelectionToggle]',
|
|
@@ -467,8 +467,8 @@ class CdkSelectionColumn {
|
|
|
467
467
|
this._columnDef.name = this._name;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
471
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-
|
|
470
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-rc.1", type: CdkSelectionColumn, isStandalone: true, selector: "cdk-selection-column", inputs: { name: ["cdkSelectionColumnName", "name"] }, viewQueries: [{ propertyName: "_columnDef", first: true, predicate: CdkColumnDef, descendants: true, static: true }, { propertyName: "_cell", first: true, predicate: CdkCellDef, descendants: true, static: true }, { propertyName: "_headerCell", first: true, predicate: CdkHeaderCellDef, descendants: true, static: true }], ngImport: i0, template: `
|
|
472
472
|
<ng-container cdkColumnDef>
|
|
473
473
|
<th cdkHeaderCell *cdkHeaderCellDef>
|
|
474
474
|
@if (selection && selection.multiple) {
|
|
@@ -492,7 +492,7 @@ class CdkSelectionColumn {
|
|
|
492
492
|
</ng-container>
|
|
493
493
|
`, isInline: true, dependencies: [{ kind: "directive", type: CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: CdkSelectAll, selector: "[cdkSelectAll]", exportAs: ["cdkSelectAll"] }, { kind: "directive", type: CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: CdkSelectionToggle, selector: "[cdkSelectionToggle]", inputs: ["cdkSelectionToggleValue", "cdkSelectionToggleIndex"], exportAs: ["cdkSelectionToggle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
494
494
|
}
|
|
495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionColumn, decorators: [{
|
|
496
496
|
type: Component,
|
|
497
497
|
args: [{
|
|
498
498
|
selector: 'cdk-selection-column',
|
|
@@ -562,10 +562,10 @@ class CdkRowSelection {
|
|
|
562
562
|
this._index = coerceNumberProperty(index);
|
|
563
563
|
}
|
|
564
564
|
_index;
|
|
565
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
566
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-
|
|
565
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkRowSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
566
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-rc.1", type: CdkRowSelection, isStandalone: true, selector: "[cdkRowSelection]", inputs: { value: ["cdkRowSelectionValue", "value"], index: ["cdkRowSelectionIndex", "index"] }, host: { properties: { "class.cdk-selected": "_selection.isSelected(this.value, this.index)", "attr.aria-selected": "_selection.isSelected(this.value, this.index)" } }, ngImport: i0 });
|
|
567
567
|
}
|
|
568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkRowSelection, decorators: [{
|
|
569
569
|
type: Directive,
|
|
570
570
|
args: [{
|
|
571
571
|
selector: '[cdkRowSelection]',
|
|
@@ -583,16 +583,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.1",
|
|
|
583
583
|
}] } });
|
|
584
584
|
|
|
585
585
|
class CdkSelectionModule {
|
|
586
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-
|
|
587
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-
|
|
586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
587
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionModule, imports: [CdkTableModule,
|
|
588
588
|
CdkSelection,
|
|
589
589
|
CdkSelectionToggle,
|
|
590
590
|
CdkSelectAll,
|
|
591
591
|
CdkSelectionColumn,
|
|
592
592
|
CdkRowSelection], exports: [CdkSelection, CdkSelectionToggle, CdkSelectAll, CdkSelectionColumn, CdkRowSelection] });
|
|
593
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-
|
|
593
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionModule, imports: [CdkTableModule] });
|
|
594
594
|
}
|
|
595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-rc.1", ngImport: i0, type: CdkSelectionModule, decorators: [{
|
|
596
596
|
type: NgModule,
|
|
597
597
|
args: [{
|
|
598
598
|
imports: [
|