Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
# CDK experimental package
/src/cdk-experimental/** @jelbourn
/src/cdk-experimental/dialog/** @jelbourn @josephperrott @crisbeto
/src/cdk-experimental/scrolling/** @mmalerba

# Docs examples & guides
/guides/** @amcdnl @jelbourn
Expand Down
1 change: 1 addition & 0 deletions src/cdk-experimental/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
*/

export * from './public-api';
export * from './scrolling/index';
33 changes: 33 additions & 0 deletions src/cdk-experimental/scrolling/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package(default_visibility=["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")


ng_module(
name = "scrolling",
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
module_name = "@angular/cdk-experimental/scrolling",
assets = [
":virtual_scroll_viewport_css",
],
deps = [
"//src/cdk/collections",
"@rxjs",
],
tsconfig = ":tsconfig-build.json",
)

sass_binary(
name = "virtual_scroll_viewport_scss",
src = "virtual-scroll-viewport.scss",
)

# TODO(jelbourn): remove this when sass_binary supports specifying an output filename and dir.
# Copy the output of the sass_binary such that the filename and path match what we expect.
genrule(
name = "virtual_scroll_viewport_css",
srcs = [":virtual_scroll_viewport_scss"],
outs = ["virtual-scroll-viewport.css"],
cmd = "cat $(locations :virtual_scroll_viewport_scss) > $@",
)

9 changes: 9 additions & 0 deletions src/cdk-experimental/scrolling/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './public-api';
13 changes: 13 additions & 0 deletions src/cdk-experimental/scrolling/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './scrolling-module';
export * from './virtual-for-of';
export * from './virtual-scroll-fixed-size';
export * from './virtual-scroll-strategy';
export * from './virtual-scroll-viewport';
27 changes: 27 additions & 0 deletions src/cdk-experimental/scrolling/scrolling-module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {NgModule} from '@angular/core';
import {CdkVirtualForOf} from './virtual-for-of';
import {CdkVirtualScrollFixedSize} from './virtual-scroll-fixed-size';
import {CdkVirtualScrollViewport} from './virtual-scroll-viewport';


@NgModule({
exports: [
CdkVirtualForOf,
CdkVirtualScrollFixedSize,
CdkVirtualScrollViewport,
],
declarations: [
CdkVirtualForOf,
CdkVirtualScrollFixedSize,
CdkVirtualScrollViewport,
],
})
export class ScrollingModule {}
15 changes: 15 additions & 0 deletions src/cdk-experimental/scrolling/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../tsconfig-build",
"files": [
"public-api.ts",
"../typings.d.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"flatModuleOutFile": "index.js",
"flatModuleId": "@angular/cdk-experimental/scrolling",
"skipTemplateCodegen": true,
"fullTemplateTypeCheck": true
}
}
19 changes: 0 additions & 19 deletions src/cdk/scrolling/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
package(default_visibility=["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")


ng_module(
name = "scrolling",
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
module_name = "@angular/cdk/scrolling",
assets = [
":virtual_scroll_viewport_css",
],
deps = [
"//src/cdk/collections",
"//src/cdk/platform",
Expand Down Expand Up @@ -44,18 +40,3 @@ ts_web_test(
":scrolling_test_sources",
],
)

sass_binary(
name = "virtual_scroll_viewport_scss",
src = "virtual-scroll-viewport.scss",
)

# TODO(jelbourn): remove this when sass_binary supports specifying an output filename and dir.
# Copy the output of the sass_binary such that the filename and path match what we expect.
genrule(
name = "virtual_scroll_viewport_css",
srcs = [":virtual_scroll_viewport_scss"],
outs = ["virtual-scroll-viewport.css"],
cmd = "cat $(locations :virtual_scroll_viewport_scss) > $@",
)

2 changes: 0 additions & 2 deletions src/cdk/scrolling/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

export * from './virtual-for-of';
export * from './scroll-dispatcher';
export * from './scrollable';
export * from './scrolling-module';
export * from './viewport-ruler';
export * from './virtual-scroll-viewport';
17 changes: 2 additions & 15 deletions src/cdk/scrolling/scrolling-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,13 @@

import {PlatformModule} from '@angular/cdk/platform';
import {NgModule} from '@angular/core';
import {CdkVirtualForOf} from './virtual-for-of';
import {SCROLL_DISPATCHER_PROVIDER} from './scroll-dispatcher';
import {CdkScrollable} from './scrollable';
import {CdkVirtualScrollFixedSize} from './virtual-scroll-fixed-size';
import {CdkVirtualScrollViewport} from './virtual-scroll-viewport';

@NgModule({
imports: [PlatformModule],
exports: [
CdkVirtualForOf,
CdkScrollable,
CdkVirtualScrollFixedSize,
CdkVirtualScrollViewport,
],
declarations: [
CdkVirtualForOf,
CdkScrollable,
CdkVirtualScrollFixedSize,
CdkVirtualScrollViewport,
],
exports: [CdkScrollable],
declarations: [CdkScrollable],
providers: [SCROLL_DISPATCHER_PROVIDER],
})
export class ScrollDispatchModule {}
3 changes: 1 addition & 2 deletions src/cdk/scrolling/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "../tsconfig-build",
"files": [
"public-api.ts",
"../typings.d.ts"
"public-api.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
Expand Down
2 changes: 2 additions & 0 deletions src/demo-app/demo-material-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {ScrollingModule} from '@angular/cdk-experimental';
import {A11yModule} from '@angular/cdk/a11y';
import {CdkAccordionModule} from '@angular/cdk/accordion';
import {BidiModule} from '@angular/cdk/bidi';
Expand Down Expand Up @@ -101,6 +102,7 @@ import {
OverlayModule,
PlatformModule,
PortalModule,
ScrollingModule,
]
})
export class DemoMaterialModule {}