@ng-desktop/platform 0.4.1 → 0.6.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/fesm2022/bridge.js +1 -0
- package/fesm2022/css-style-parser.d.ts +11 -3
- package/fesm2022/css-style-parser.js +534 -104
- package/fesm2022/index.d.ts +3 -1
- package/fesm2022/index.js +3 -1
- package/fesm2022/native-directives.d.ts +5 -2
- package/fesm2022/native-directives.js +17 -2
- package/fesm2022/native-element.d.ts +2 -0
- package/fesm2022/native-element.js +2 -0
- package/fesm2022/native-renderer.d.ts +3 -1
- package/fesm2022/native-renderer.js +48 -3
- package/fesm2022/virtual-grid.component.d.ts +64 -0
- package/fesm2022/virtual-grid.component.js +301 -0
- package/fesm2022/virtual-layout.d.ts +71 -0
- package/fesm2022/virtual-layout.js +279 -0
- package/fesm2022/virtual-list.component.d.ts +19 -13
- package/fesm2022/virtual-list.component.js +82 -38
- package/package.json +1 -1
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { type VirtualSliceRange } from './virtual-layout';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
|
|
4
|
-
export interface VirtualSliceRange {
|
|
5
|
-
startIndex: number;
|
|
6
|
-
endIndex: number;
|
|
7
|
-
totalItems: number;
|
|
8
|
-
topSpacerHeight: number;
|
|
9
|
-
bottomSpacerHeight: number;
|
|
10
|
-
}
|
|
4
|
+
export { computeVirtualSliceRange, type VirtualSliceRange } from './virtual-layout';
|
|
11
5
|
/** Template context provided to each rendered item row in `<ng-virtual-list>`. */
|
|
12
6
|
export interface NativeVirtualItemContext<T> {
|
|
13
7
|
$implicit: T;
|
|
@@ -24,17 +18,15 @@ export interface NativeVirtualRowActivatedEvent<T> {
|
|
|
24
18
|
index: number;
|
|
25
19
|
item: T;
|
|
26
20
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Computes the visible item slice and spacer heights for a fixed-row-height viewport.
|
|
29
|
-
*/
|
|
30
|
-
export declare function computeVirtualSliceRange(totalItems: number, scrollTop: number, viewportHeight: number, itemHeight: number, overscan?: number): VirtualSliceRange;
|
|
31
21
|
/**
|
|
32
22
|
* Virtualized native desktop list component rendering only the visible viewport slice + overscan
|
|
33
23
|
* inside an `<ng-scroll>` + `<ng-list>` hierarchy to keep native widget counts bounded at scale.
|
|
24
|
+
* Supports fixed row heights as well as O(log n) Fenwick-tree variable/measured row heights.
|
|
34
25
|
*/
|
|
35
26
|
export declare class NativeVirtualListComponent<T = unknown> {
|
|
36
27
|
readonly items: import("@angular/core").InputSignal<readonly T[]>;
|
|
37
28
|
readonly itemHeight: import("@angular/core").InputSignal<number>;
|
|
29
|
+
readonly itemHeightResolver: import("@angular/core").InputSignal<((index: number, item: T) => number) | null>;
|
|
38
30
|
readonly viewportHeight: import("@angular/core").InputSignal<number>;
|
|
39
31
|
readonly overscan: import("@angular/core").InputSignal<number>;
|
|
40
32
|
readonly selectionMode: import("@angular/core").InputSignal<"none" | "single" | "browse" | "multiple">;
|
|
@@ -44,14 +36,28 @@ export declare class NativeVirtualListComponent<T = unknown> {
|
|
|
44
36
|
readonly projectedTemplate: import("@angular/core").Signal<TemplateRef<NativeVirtualItemContext<T>> | undefined>;
|
|
45
37
|
readonly rangeChange: import("@angular/core").OutputEmitterRef<VirtualSliceRange>;
|
|
46
38
|
readonly rowActivated: import("@angular/core").OutputEmitterRef<NativeVirtualRowActivatedEvent<T>>;
|
|
39
|
+
readonly scrollBottom: import("@angular/core").OutputEmitterRef<void>;
|
|
47
40
|
readonly scrollTop: import("@angular/core").WritableSignal<number>;
|
|
41
|
+
readonly scrollToAttr: import("@angular/core").WritableSignal<string | undefined>;
|
|
42
|
+
private readonly heightTree;
|
|
43
|
+
private readonly measuredOverrides;
|
|
44
|
+
private readonly measureRevision;
|
|
48
45
|
readonly resolvedTemplate: import("@angular/core").Signal<TemplateRef<NativeVirtualItemContext<T>> | null>;
|
|
46
|
+
readonly isVariableHeight: import("@angular/core").Signal<boolean>;
|
|
49
47
|
readonly range: import("@angular/core").Signal<VirtualSliceRange>;
|
|
50
48
|
readonly visibleEntries: import("@angular/core").Signal<readonly NativeVirtualListEntry<T>[]>;
|
|
51
49
|
private lastEmittedRangeKey;
|
|
52
50
|
constructor();
|
|
51
|
+
/** Records a dynamic measured pixel height for row `index` and updates viewport offsets. */
|
|
52
|
+
measureItemHeight(index: number, height: number): void;
|
|
53
|
+
/** Clears all dynamically measured height overrides. */
|
|
54
|
+
resetMeasuredHeights(): void;
|
|
55
|
+
/** Returns the cumulative Y offset for row `index`. */
|
|
56
|
+
offsetForIndex(index: number): number;
|
|
57
|
+
/** Scrolls the native viewport to bring row `index` into view. */
|
|
58
|
+
scrollToIndex(index: number): void;
|
|
53
59
|
onNativeScroll(event: unknown): void;
|
|
54
60
|
onRowActivated(event: unknown): void;
|
|
55
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<NativeVirtualListComponent<any>, never>;
|
|
56
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NativeVirtualListComponent<any>, "ng-virtual-list", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "showSeparators": { "alias": "showSeparators"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "itemTemplateInput": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, { "rangeChange": "rangeChange"; "rowActivated": "rowActivated"; }, ["projectedTemplate"], never, true, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NativeVirtualListComponent<any>, "ng-virtual-list", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "itemHeightResolver": { "alias": "itemHeightResolver"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "showSeparators": { "alias": "showSeparators"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "itemTemplateInput": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, { "rangeChange": "rangeChange"; "rowActivated": "rowActivated"; "scrollBottom": "scrollBottom"; }, ["projectedTemplate"], never, true, never>;
|
|
57
63
|
}
|
|
@@ -1,47 +1,21 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
-
import {
|
|
2
|
+
import { Component, computed, contentChild, effect, input, output, signal, TemplateRef, } from '@angular/core';
|
|
3
3
|
import { NativeContainerDirective, NativeElementDirective, NativeListDirective, NativeTextWidgetDirective, } from './native-directives.js';
|
|
4
|
+
import { computeVariableVirtualSliceRange, computeVirtualSliceRange, FenwickOffsetTree, } from './virtual-layout.js';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
* Computes the visible item slice and spacer heights for a fixed-row-height viewport.
|
|
7
|
-
*/
|
|
8
|
-
export function computeVirtualSliceRange(totalItems, scrollTop, viewportHeight, itemHeight, overscan = 4) {
|
|
9
|
-
const safeTotal = Math.max(0, Math.floor(totalItems));
|
|
10
|
-
if (safeTotal === 0) {
|
|
11
|
-
return {
|
|
12
|
-
startIndex: 0,
|
|
13
|
-
endIndex: 0,
|
|
14
|
-
totalItems: 0,
|
|
15
|
-
topSpacerHeight: 0,
|
|
16
|
-
bottomSpacerHeight: 0,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const safeItemHeight = Math.max(1, itemHeight);
|
|
20
|
-
const safeViewport = Math.max(safeItemHeight, viewportHeight);
|
|
21
|
-
const safeOverscan = Math.max(0, Math.floor(overscan));
|
|
22
|
-
const maxScrollTop = Math.max(0, safeTotal * safeItemHeight - safeViewport);
|
|
23
|
-
const clampedScrollTop = Math.min(Math.max(0, scrollTop), maxScrollTop);
|
|
24
|
-
const firstVisible = Math.floor(clampedScrollTop / safeItemHeight);
|
|
25
|
-
const visibleCount = Math.ceil(safeViewport / safeItemHeight);
|
|
26
|
-
const startIndex = Math.max(0, firstVisible - safeOverscan);
|
|
27
|
-
const endIndex = Math.min(safeTotal, firstVisible + visibleCount + safeOverscan);
|
|
28
|
-
return {
|
|
29
|
-
startIndex,
|
|
30
|
-
endIndex,
|
|
31
|
-
totalItems: safeTotal,
|
|
32
|
-
topSpacerHeight: startIndex * safeItemHeight,
|
|
33
|
-
bottomSpacerHeight: (safeTotal - endIndex) * safeItemHeight,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
6
|
+
export { computeVirtualSliceRange } from './virtual-layout.js';
|
|
36
7
|
/**
|
|
37
8
|
* Virtualized native desktop list component rendering only the visible viewport slice + overscan
|
|
38
9
|
* inside an `<ng-scroll>` + `<ng-list>` hierarchy to keep native widget counts bounded at scale.
|
|
10
|
+
* Supports fixed row heights as well as O(log n) Fenwick-tree variable/measured row heights.
|
|
39
11
|
*/
|
|
40
12
|
export class NativeVirtualListComponent {
|
|
41
13
|
items = input([], /* @ts-ignore */
|
|
42
14
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
43
15
|
itemHeight = input(48, /* @ts-ignore */
|
|
44
16
|
...(ngDevMode ? [{ debugName: "itemHeight" }] : /* istanbul ignore next */ []));
|
|
17
|
+
itemHeightResolver = input(null, /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "itemHeightResolver" }] : /* istanbul ignore next */ []));
|
|
45
19
|
viewportHeight = input(480, /* @ts-ignore */
|
|
46
20
|
...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
|
|
47
21
|
overscan = input(4, /* @ts-ignore */
|
|
@@ -57,11 +31,42 @@ export class NativeVirtualListComponent {
|
|
|
57
31
|
...(ngDevMode ? [{ debugName: "projectedTemplate" }] : /* istanbul ignore next */ []));
|
|
58
32
|
rangeChange = output();
|
|
59
33
|
rowActivated = output();
|
|
34
|
+
scrollBottom = output();
|
|
60
35
|
scrollTop = signal(0, /* @ts-ignore */
|
|
61
36
|
...(ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []));
|
|
37
|
+
scrollToAttr = signal(undefined, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "scrollToAttr" }] : /* istanbul ignore next */ []));
|
|
39
|
+
heightTree = new FenwickOffsetTree(0, 48);
|
|
40
|
+
measuredOverrides = new Map();
|
|
41
|
+
measureRevision = signal(0, /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "measureRevision" }] : /* istanbul ignore next */ []));
|
|
62
43
|
resolvedTemplate = computed(() => this.itemTemplateInput() ?? this.projectedTemplate() ?? null, /* @ts-ignore */
|
|
63
44
|
...(ngDevMode ? [{ debugName: "resolvedTemplate" }] : /* istanbul ignore next */ []));
|
|
64
|
-
|
|
45
|
+
isVariableHeight = computed(() => this.itemHeightResolver() !== null ||
|
|
46
|
+
(this.measureRevision() >= 0 && this.measuredOverrides.size > 0), /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "isVariableHeight" }] : /* istanbul ignore next */ []));
|
|
48
|
+
range = computed(() => {
|
|
49
|
+
const source = this.items();
|
|
50
|
+
const resolver = this.itemHeightResolver();
|
|
51
|
+
this.measureRevision();
|
|
52
|
+
const defaultHeight = Math.max(1, this.itemHeight());
|
|
53
|
+
if (resolver === null && this.measuredOverrides.size === 0) {
|
|
54
|
+
return computeVirtualSliceRange(source.length, this.scrollTop(), this.viewportHeight(), defaultHeight, this.overscan());
|
|
55
|
+
}
|
|
56
|
+
const overrides = new Map();
|
|
57
|
+
if (resolver !== null) {
|
|
58
|
+
for (let i = 0; i < source.length; i += 1) {
|
|
59
|
+
overrides.set(i, resolver(i, source[i]));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
for (const [idx, h] of this.measuredOverrides) {
|
|
63
|
+
if (idx >= 0 && idx < source.length) {
|
|
64
|
+
overrides.set(idx, h);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
this.heightTree.reset(source.length, defaultHeight, overrides);
|
|
68
|
+
return computeVariableVirtualSliceRange(this.heightTree, this.scrollTop(), this.viewportHeight(), this.overscan());
|
|
69
|
+
}, /* @ts-ignore */
|
|
65
70
|
...(ngDevMode ? [{ debugName: "range" }] : /* istanbul ignore next */ []));
|
|
66
71
|
visibleEntries = computed(() => {
|
|
67
72
|
const source = this.items();
|
|
@@ -79,13 +84,49 @@ export class NativeVirtualListComponent {
|
|
|
79
84
|
constructor() {
|
|
80
85
|
effect(() => {
|
|
81
86
|
const next = this.range();
|
|
82
|
-
const key = `${next.startIndex}:${next.endIndex}:${next.totalItems}`;
|
|
87
|
+
const key = `${next.startIndex}:${next.endIndex}:${next.totalItems}:${next.topSpacerHeight}:${next.bottomSpacerHeight}`;
|
|
83
88
|
if (key !== this.lastEmittedRangeKey) {
|
|
84
89
|
this.lastEmittedRangeKey = key;
|
|
85
90
|
this.rangeChange.emit(next);
|
|
86
91
|
}
|
|
87
92
|
});
|
|
88
93
|
}
|
|
94
|
+
/** Records a dynamic measured pixel height for row `index` and updates viewport offsets. */
|
|
95
|
+
measureItemHeight(index, height) {
|
|
96
|
+
const idx = Math.floor(index);
|
|
97
|
+
if (!Number.isFinite(index) || idx < 0 || !Number.isFinite(height)) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const clamped = Math.max(1, height);
|
|
101
|
+
if (this.measuredOverrides.get(idx) !== clamped) {
|
|
102
|
+
this.measuredOverrides.set(idx, clamped);
|
|
103
|
+
this.measureRevision.update((rev) => rev + 1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** Clears all dynamically measured height overrides. */
|
|
107
|
+
resetMeasuredHeights() {
|
|
108
|
+
if (this.measuredOverrides.size === 0) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.measuredOverrides.clear();
|
|
112
|
+
this.measureRevision.update((rev) => rev + 1);
|
|
113
|
+
}
|
|
114
|
+
/** Returns the cumulative Y offset for row `index`. */
|
|
115
|
+
offsetForIndex(index) {
|
|
116
|
+
const source = this.items();
|
|
117
|
+
const idx = Math.max(0, Math.min(source.length, Math.floor(index)));
|
|
118
|
+
this.range();
|
|
119
|
+
if (!this.isVariableHeight()) {
|
|
120
|
+
return idx * Math.max(1, this.itemHeight());
|
|
121
|
+
}
|
|
122
|
+
return Math.round(this.heightTree.offsetOf(idx));
|
|
123
|
+
}
|
|
124
|
+
/** Scrolls the native viewport to bring row `index` into view. */
|
|
125
|
+
scrollToIndex(index) {
|
|
126
|
+
const y = this.offsetForIndex(index);
|
|
127
|
+
this.scrollTop.set(y);
|
|
128
|
+
this.scrollToAttr.set(`0,${y}`);
|
|
129
|
+
}
|
|
89
130
|
onNativeScroll(event) {
|
|
90
131
|
if (!event || typeof event !== 'object') {
|
|
91
132
|
return;
|
|
@@ -116,12 +157,14 @@ export class NativeVirtualListComponent {
|
|
|
116
157
|
}
|
|
117
158
|
}
|
|
118
159
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeVirtualListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.3.0", type: NativeVirtualListComponent, isStandalone: true, selector: "ng-virtual-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, showSeparators: { classPropertyName: "showSeparators", publicName: "showSeparators", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, itemTemplateInput: { classPropertyName: "itemTemplateInput", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rangeChange: "rangeChange", rowActivated: "rowActivated" }, queries: [{ propertyName: "projectedTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.3.0", type: NativeVirtualListComponent, isStandalone: true, selector: "ng-virtual-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemHeight: { classPropertyName: "itemHeight", publicName: "itemHeight", isSignal: true, isRequired: false, transformFunction: null }, itemHeightResolver: { classPropertyName: "itemHeightResolver", publicName: "itemHeightResolver", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, showSeparators: { classPropertyName: "showSeparators", publicName: "showSeparators", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, itemTemplateInput: { classPropertyName: "itemTemplateInput", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rangeChange: "rangeChange", rowActivated: "rowActivated", scrollBottom: "scrollBottom" }, queries: [{ propertyName: "projectedTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
120
161
|
<ng-scroll
|
|
121
162
|
[hexpand]="true"
|
|
122
163
|
[vexpand]="true"
|
|
123
164
|
[min-height]="viewportHeight()"
|
|
165
|
+
[scroll-to]="scrollToAttr()"
|
|
124
166
|
(scroll)="onNativeScroll($event)"
|
|
167
|
+
(scrollBottom)="scrollBottom.emit()"
|
|
125
168
|
>
|
|
126
169
|
<ng-box orientation="vertical" [spacing]="0" [hexpand]="true">
|
|
127
170
|
@if (range().topSpacerHeight > 0) {
|
|
@@ -148,14 +191,13 @@ export class NativeVirtualListComponent {
|
|
|
148
191
|
}
|
|
149
192
|
</ng-box>
|
|
150
193
|
</ng-scroll>
|
|
151
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NativeElementDirective, selector: "ng-window,adw-window,ng-dialog,gtk-dialog,adw-dialog,ng-header-bar,adw-header-bar,gtk-header-bar,ng-scroll,gtk-scrolled-window,ng-box,gtk-box,ng-grid,gtk-grid,ng-separator,gtk-separator,ng-button,gtk-button,ng-label,gtk-label,ng-entry,gtk-entry,ng-switch,gtk-switch,ng-checkbox,ng-check,ng-check-button,gtk-check-button,ng-slider,ng-scale,gtk-scale,ng-select,ng-dropdown,gtk-dropdown,gtk-drop-down,ng-image,adw-image,gtk-picture,ng-picture,ng-level-bar,gtk-level-bar,ng-flow,ng-flow-box,gtk-flow-box,ng-spinner,gtk-spinner,ng-progress-bar,gtk-progress-bar,ng-paned,gtk-paned,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-text-view,gtk-text-view,ng-password-entry,gtk-password-entry,ng-spin-button,gtk-spin-button,ng-search-entry,gtk-search-entry,ng-clamp,adw-clamp,ng-list,ng-table,gtk-list-box,gtk-list-view,ng-popover,gtk-popover,ng-menu,adw-entry-row,adw-password-entry-row,adw-switch-row,adw-combo-row,adw-spin-row", inputs: ["hexpand", "vexpand", "halign", "valign", "width", "height", "min-width", "min-height", "margin", "margin-top", "margin-bottom", "margin-start", "margin-end", "visible", "sensitive", "disabled", "tooltip", "event-mask", "drop-target"] }, { kind: "directive", type: NativeContainerDirective, selector: "ng-box,gtk-box,ng-grid,gtk-grid,ng-flow,ng-flow-box,gtk-flow-box,ng-paned,gtk-paned,ng-scroll,gtk-scrolled-window,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-clamp,adw-clamp,ng-separator,gtk-separator", inputs: ["orientation", "spacing", "gap", "row-spacing", "column-spacing", "min-children", "max-children", "min-per-row", "max-per-row", "homogeneous", "position", "visible-child", "active-page", "transition", "transition-type", "label", "title", "expanded", "open", "max-size", "maximum-size", "scroll-to", "scroll-anchor"] }, { kind: "directive", type: NativeListDirective, selector: "ng-list,ng-table,gtk-list-box,gtk-list-view", inputs: ["selection-mode", "selectionMode", "show-separators", "showSeparators", "separators"] }, { kind: "directive", type: NativeTextWidgetDirective, selector: "ng-button,gtk-button,ng-label,gtk-label", inputs: ["label", "text", "wrap", "selectable", "ellipsize"] }]
|
|
194
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NativeElementDirective, selector: "ng-window,adw-window,ng-dialog,gtk-dialog,adw-dialog,ng-header-bar,adw-header-bar,gtk-header-bar,ng-scroll,gtk-scrolled-window,ng-box,gtk-box,ng-grid,gtk-grid,ng-separator,gtk-separator,ng-button,gtk-button,ng-label,gtk-label,ng-entry,gtk-entry,ng-switch,gtk-switch,ng-checkbox,ng-check,ng-check-button,gtk-check-button,ng-slider,ng-scale,gtk-scale,ng-select,ng-dropdown,gtk-dropdown,gtk-drop-down,ng-image,adw-image,gtk-picture,ng-picture,ng-level-bar,gtk-level-bar,ng-flow,ng-flow-box,gtk-flow-box,ng-spinner,gtk-spinner,ng-progress-bar,gtk-progress-bar,ng-paned,gtk-paned,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-text-view,gtk-text-view,ng-password-entry,gtk-password-entry,ng-spin-button,gtk-spin-button,ng-search-entry,gtk-search-entry,ng-clamp,adw-clamp,ng-list,ng-table,gtk-list-box,gtk-list-view,ng-popover,gtk-popover,ng-menu,adw-entry-row,adw-password-entry-row,adw-switch-row,adw-combo-row,adw-spin-row", inputs: ["hexpand", "vexpand", "halign", "valign", "width", "height", "min-width", "min-height", "margin", "margin-top", "margin-bottom", "margin-start", "margin-end", "visible", "sensitive", "disabled", "tooltip", "event-mask", "drop-target", "col", "row"] }, { kind: "directive", type: NativeContainerDirective, selector: "ng-box,gtk-box,ng-grid,gtk-grid,ng-flow,ng-flow-box,gtk-flow-box,ng-paned,gtk-paned,ng-scroll,gtk-scrolled-window,ng-stack,gtk-stack,adw-navigation-view,ng-expander,gtk-expander,ng-clamp,adw-clamp,ng-separator,gtk-separator", inputs: ["orientation", "spacing", "gap", "row-spacing", "column-spacing", "min-children", "max-children", "min-per-row", "max-per-row", "columns", "homogeneous", "position", "visible-child", "active-page", "transition", "transition-type", "label", "title", "expanded", "open", "max-size", "maximum-size", "scroll-to", "scroll-anchor"] }, { kind: "directive", type: NativeListDirective, selector: "ng-list,ng-table,gtk-list-box,gtk-list-view", inputs: ["selection-mode", "selectionMode", "show-separators", "showSeparators", "separators"] }, { kind: "directive", type: NativeTextWidgetDirective, selector: "ng-button,gtk-button,ng-label,gtk-label", inputs: ["label", "text", "wrap", "selectable", "ellipsize"] }] });
|
|
152
195
|
}
|
|
153
196
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeVirtualListComponent, decorators: [{
|
|
154
197
|
type: Component,
|
|
155
198
|
args: [{
|
|
156
199
|
selector: 'ng-virtual-list',
|
|
157
200
|
standalone: true,
|
|
158
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
159
201
|
imports: [
|
|
160
202
|
NgTemplateOutlet,
|
|
161
203
|
NativeElementDirective,
|
|
@@ -168,7 +210,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
168
210
|
[hexpand]="true"
|
|
169
211
|
[vexpand]="true"
|
|
170
212
|
[min-height]="viewportHeight()"
|
|
213
|
+
[scroll-to]="scrollToAttr()"
|
|
171
214
|
(scroll)="onNativeScroll($event)"
|
|
215
|
+
(scrollBottom)="scrollBottom.emit()"
|
|
172
216
|
>
|
|
173
217
|
<ng-box orientation="vertical" [spacing]="0" [hexpand]="true">
|
|
174
218
|
@if (range().topSpacerHeight > 0) {
|
|
@@ -197,4 +241,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImpor
|
|
|
197
241
|
</ng-scroll>
|
|
198
242
|
`,
|
|
199
243
|
}]
|
|
200
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], viewportHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportHeight", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], showSeparators: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeparators", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], itemTemplateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], projectedTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }], rowActivated: [{ type: i0.Output, args: ["rowActivated"] }] } });
|
|
244
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeight", required: false }] }], itemHeightResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemHeightResolver", required: false }] }], viewportHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportHeight", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], showSeparators: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeparators", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], itemTemplateInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], projectedTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], rangeChange: [{ type: i0.Output, args: ["rangeChange"] }], rowActivated: [{ type: i0.Output, args: ["rowActivated"] }], scrollBottom: [{ type: i0.Output, args: ["scrollBottom"] }] } });
|