|
1 | 1 | import * as i0 from '@angular/core';
|
2 |
| -import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@angular/core'; |
| 2 | +import { Component, ChangeDetectionStrategy, ViewEncapsulation, input } from '@angular/core'; |
3 | 3 | import * as i1 from '@angular/cdk/scrolling';
|
4 | 4 | import { ScrollingModule, FixedSizeVirtualScrollStrategy, VIRTUAL_SCROLL_STRATEGY } from '@angular/cdk/scrolling';
|
5 | 5 | import { DataSource } from '@angular/cdk/collections';
|
@@ -232,18 +232,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3",
|
232 | 232 | /** @title Virtual scrolling window */
|
233 | 233 | class CdkVirtualScrollWindowScrollingExample {
|
234 | 234 | constructor() {
|
235 |
| - this.shouldRun = /(^|.)(stackblitz|webcontainer).(io|com)$/.test(window.location.host); |
| 235 | + this.shouldRun = input(/(^|.)(stackblitz|webcontainer).(io|com)$/.test(window.location.host)); |
236 | 236 | this.items = Array.from({ length: 100000 }).map((_, i) => `Item #${i}`);
|
237 | 237 | }
|
238 | 238 | static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkVirtualScrollWindowScrollingExample, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
239 |
| - static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.3", type: CdkVirtualScrollWindowScrollingExample, isStandalone: true, selector: "cdk-virtual-scroll-window-scrolling-example", inputs: { shouldRun: "shouldRun" }, ngImport: i0, template: "@if (shouldRun) {\n <div class=\"example-header\">Content before</div>\n <cdk-virtual-scroll-viewport scrollWindow itemSize=\"50\">\n <div *cdkVirtualFor=\"let item of items\" class=\"example-item\">{{item}}</div>\n </cdk-virtual-scroll-viewport>\n <div class=\"example-footer\">Content after</div>\n}\n\n@if (!shouldRun) {\n <div>Please open on StackBlitz to see result</div>\n}\n", styles: [".example-item {\n height: 50px;\n}\n\n.example-header,\n.example-footer {\n height: 100px;\n background: lightgray;\n}\n"], dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i1.CdkVirtualScrollableWindow, selector: "cdk-virtual-scroll-viewport[scrollWindow]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } |
| 239 | + static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.3", type: CdkVirtualScrollWindowScrollingExample, isStandalone: true, selector: "cdk-virtual-scroll-window-scrolling-example", inputs: { shouldRun: { classPropertyName: "shouldRun", publicName: "shouldRun", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (shouldRun()) {\n <div class=\"example-header\">Content before</div>\n <cdk-virtual-scroll-viewport scrollWindow itemSize=\"50\">\n <div *cdkVirtualFor=\"let item of items\" class=\"example-item\">{{item}}</div>\n </cdk-virtual-scroll-viewport>\n <div class=\"example-footer\">Content after</div>\n}\n\n@if (!shouldRun()) {\n <div>Please open on StackBlitz to see result</div>\n}\n", styles: [".example-item {\n height: 50px;\n}\n\n.example-header,\n.example-footer {\n height: 100px;\n background: lightgray;\n}\n"], dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: i1.CdkVirtualScrollableWindow, selector: "cdk-virtual-scroll-viewport[scrollWindow]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } |
240 | 240 | }
|
241 | 241 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: CdkVirtualScrollWindowScrollingExample, decorators: [{
|
242 | 242 | type: Component,
|
243 |
| - args: [{ selector: 'cdk-virtual-scroll-window-scrolling-example', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ScrollingModule], template: "@if (shouldRun) {\n <div class=\"example-header\">Content before</div>\n <cdk-virtual-scroll-viewport scrollWindow itemSize=\"50\">\n <div *cdkVirtualFor=\"let item of items\" class=\"example-item\">{{item}}</div>\n </cdk-virtual-scroll-viewport>\n <div class=\"example-footer\">Content after</div>\n}\n\n@if (!shouldRun) {\n <div>Please open on StackBlitz to see result</div>\n}\n", styles: [".example-item {\n height: 50px;\n}\n\n.example-header,\n.example-footer {\n height: 100px;\n background: lightgray;\n}\n"] }] |
244 |
| - }], propDecorators: { shouldRun: [{ |
245 |
| - type: Input |
246 |
| - }] } }); |
| 243 | + args: [{ selector: 'cdk-virtual-scroll-window-scrolling-example', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ScrollingModule], template: "@if (shouldRun()) {\n <div class=\"example-header\">Content before</div>\n <cdk-virtual-scroll-viewport scrollWindow itemSize=\"50\">\n <div *cdkVirtualFor=\"let item of items\" class=\"example-item\">{{item}}</div>\n </cdk-virtual-scroll-viewport>\n <div class=\"example-footer\">Content after</div>\n}\n\n@if (!shouldRun()) {\n <div>Please open on StackBlitz to see result</div>\n}\n", styles: [".example-item {\n height: 50px;\n}\n\n.example-header,\n.example-footer {\n height: 100px;\n background: lightgray;\n}\n"] }] |
| 244 | + }] }); |
247 | 245 |
|
248 | 246 | /**
|
249 | 247 | * Generated bundle index. Do not edit.
|
|
0 commit comments