Skip to content

Commit 52473f5

Browse files
crisbetojelbourn
authored andcommitted
feat(drag-drop): move into cdk (#12758)
Moves the `drag-drop` module from `cdk-experimental` to `cdk`.
1 parent 4830be8 commit 52473f5

28 files changed

+30
-32
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
/src/cdk/bidi/** @jelbourn
6565
/src/cdk/coercion/** @jelbourn
6666
/src/cdk/collections/** @jelbourn @crisbeto @andrewseguin
67+
/src/cdk/drag-drop/** @crisbeto
6768
/src/cdk/keycodes/** @jelbourn
6869
/src/cdk/layout/** @josephperrott
6970
/src/cdk/observers/** @jelbourn @crisbeto
@@ -87,7 +88,6 @@
8788
/src/cdk-experimental/** @jelbourn
8889
/src/cdk-experimental/dialog/** @jelbourn @josephperrott @crisbeto
8990
/src/cdk-experimental/scrolling/** @mmalerba
90-
/src/cdk-experimental/drag-drop/** @crisbeto
9191

9292
# Docs examples & guides
9393
/guides/** @amcdnl @jelbourn

packages.bzl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
# List of all components / subpackages.
22

33
CDK_PACKAGES = [
4+
"a11y",
5+
"accordion",
6+
"bidi",
47
"coercion",
8+
"collections",
9+
"drag-drop",
510
"keycodes",
6-
"scrolling",
7-
"accordion",
11+
"layout",
812
"observers",
9-
"a11y",
1013
"overlay",
1114
"platform",
12-
"bidi",
13-
"table",
14-
"tree",
1515
"portal",
16-
"layout",
16+
"scrolling",
1717
"stepper",
18+
"table",
1819
"text-field",
19-
"collections",
20+
"tree",
2021
]
2122

2223
CDK_TARGETS = ["//src/cdk"] + ["//src/cdk/%s" % p for p in CDK_PACKAGES]
2324

2425
CDK_EXPERIMENTAL_PACKAGES = [
2526
"dialog",
2627
"scrolling",
27-
"drag-drop",
2828
]
2929

3030
CDK_EXPERIMENTAL_TARGETS = ["//src/cdk-experimental"] + [

src/cdk-experimental/drag-drop/BUILD.bazel renamed to src/cdk/drag-drop/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")
77
ng_module(
88
name = "drag-drop",
99
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
10-
module_name = "@angular/cdk-experimental/drag-drop",
10+
module_name = "@angular/cdk/drag-drop",
1111
assets = [":drop.css"],
1212
deps = [
1313
"@rxjs",
1414
"//src/cdk/platform",
1515
"//src/cdk/overlay",
1616
"//src/cdk/bidi",
1717
],
18-
tsconfig = "//src/cdk-experimental:tsconfig-build.json",
18+
tsconfig = "//src/cdk:tsconfig-build.json",
1919
)
2020

2121

@@ -28,7 +28,7 @@ ts_library(
2828
"//src/cdk/testing",
2929
"//src/cdk/bidi",
3030
],
31-
tsconfig = "//src/cdk-experimental:tsconfig-build.json",
31+
tsconfig = "//src/cdk:tsconfig-build.json",
3232
)
3333

3434
sass_binary(

src/cdk-experimental/drag-drop/drag-drop-registry.spec.ts renamed to src/cdk/drag-drop/drag-drop-registry.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ describe('DragDropRegistry', () => {
166166
<cdk-drop id="items" *ngIf="showDuplicateContainer"></cdk-drop>
167167
`
168168
})
169-
export class SimpleDropZone {
169+
class SimpleDropZone {
170170
@ViewChildren(CdkDrag) dragItems: QueryList<CdkDrag>;
171171
@ViewChildren(CdkDrop) dropInstances: QueryList<CdkDrop>;
172172
items = ['Zero', 'One', 'Two', 'Three'];

src/cdk-experimental/drag-drop/drag.spec.ts renamed to src/cdk/drag-drop/drag.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ describe('CdkDrag', () => {
11651165
style="width: 100px; height: 100px; background: red;"></div>
11661166
`
11671167
})
1168-
export class StandaloneDraggable {
1168+
class StandaloneDraggable {
11691169
@ViewChild('dragElement') dragElement: ElementRef<HTMLElement>;
11701170
@ViewChild(CdkDrag) dragInstance: CdkDrag;
11711171
startedSpy = jasmine.createSpy('started spy');
@@ -1180,7 +1180,7 @@ export class StandaloneDraggable {
11801180
</div>
11811181
`
11821182
})
1183-
export class StandaloneDraggableWithHandle {
1183+
class StandaloneDraggableWithHandle {
11841184
@ViewChild('dragElement') dragElement: ElementRef<HTMLElement>;
11851185
@ViewChild('handleElement') handleElement: ElementRef<HTMLElement>;
11861186
}
@@ -1196,7 +1196,7 @@ export class StandaloneDraggableWithHandle {
11961196
</div>
11971197
`
11981198
})
1199-
export class StandaloneDraggableWithDelayedHandle {
1199+
class StandaloneDraggableWithDelayedHandle {
12001200
@ViewChild('dragElement') dragElement: ElementRef<HTMLElement>;
12011201
@ViewChild('handleElement') handleElement: ElementRef<HTMLElement>;
12021202
showHandle = false;
@@ -1221,7 +1221,7 @@ export class StandaloneDraggableWithDelayedHandle {
12211221
</div>
12221222
`
12231223
})
1224-
export class StandaloneDraggableWithMultipleHandles {
1224+
class StandaloneDraggableWithMultipleHandles {
12251225
@ViewChild('dragElement') dragElement: ElementRef<HTMLElement>;
12261226
@ViewChildren(CdkDragHandle) handles: QueryList<CdkDragHandle>;
12271227
}
@@ -1241,7 +1241,7 @@ export class StandaloneDraggableWithMultipleHandles {
12411241
</cdk-drop>
12421242
`
12431243
})
1244-
export class DraggableInDropZone {
1244+
class DraggableInDropZone {
12451245
@ViewChildren(CdkDrag) dragItems: QueryList<CdkDrag>;
12461246
@ViewChild(CdkDrop) dropInstance: CdkDrop;
12471247
items = ['Zero', 'One', 'Two', 'Three'];
@@ -1280,7 +1280,7 @@ export class DraggableInDropZone {
12801280
</cdk-drop>
12811281
`
12821282
})
1283-
export class DraggableInHorizontalDropZone {
1283+
class DraggableInHorizontalDropZone {
12841284
@ViewChildren(CdkDrag) dragItems: QueryList<CdkDrag>;
12851285
@ViewChild(CdkDrop) dropInstance: CdkDrop;
12861286
items = ['Zero', 'One', 'Two', 'Three'];
@@ -1300,7 +1300,7 @@ export class DraggableInHorizontalDropZone {
13001300
</cdk-drop>
13011301
`
13021302
})
1303-
export class DraggableInDropZoneWithCustomPreview {
1303+
class DraggableInDropZoneWithCustomPreview {
13041304
@ViewChild(CdkDrop) dropInstance: CdkDrop;
13051305
@ViewChildren(CdkDrag) dragItems: QueryList<CdkDrag>;
13061306
items = ['Zero', 'One', 'Two', 'Three'];
@@ -1318,7 +1318,7 @@ export class DraggableInDropZoneWithCustomPreview {
13181318
</cdk-drop>
13191319
`
13201320
})
1321-
export class DraggableInDropZoneWithCustomPlaceholder {
1321+
class DraggableInDropZoneWithCustomPlaceholder {
13221322
@ViewChildren(CdkDrag) dragItems: QueryList<CdkDrag>;
13231323
items = ['Zero', 'One', 'Two', 'Three'];
13241324
}
@@ -1358,7 +1358,7 @@ export class DraggableInDropZoneWithCustomPlaceholder {
13581358
</cdk-drop>
13591359
`
13601360
})
1361-
export class ConnectedDropZones implements AfterViewInit {
1361+
class ConnectedDropZones implements AfterViewInit {
13621362
@ViewChildren(CdkDrag) rawDragItems: QueryList<CdkDrag>;
13631363
@ViewChildren(CdkDrop) dropInstances: QueryList<CdkDrop>;
13641364

File renamed without changes.
File renamed without changes.
File renamed without changes.

src/cdk-experimental/drag-drop/tsconfig-build.json renamed to src/cdk/drag-drop/tsconfig-build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"annotateForClosureCompiler": true,
99
"strictMetadataEmit": true,
1010
"flatModuleOutFile": "index.js",
11-
"flatModuleId": "@angular/cdk-experimental/drag-drop",
11+
"flatModuleId": "@angular/cdk/drag-drop",
1212
"skipTemplateCodegen": true,
1313
"fullTemplateTypeCheck": true
1414
}

src/demo-app/demo-material-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {DialogModule} from '@angular/cdk-experimental/dialog';
10-
import {DragDropModule} from '@angular/cdk-experimental/drag-drop';
10+
import {DragDropModule} from '@angular/cdk/drag-drop';
1111
import {ScrollingModule as ExperimentalScrollingModule} from '@angular/cdk-experimental/scrolling';
1212
import {A11yModule} from '@angular/cdk/a11y';
1313
import {CdkAccordionModule} from '@angular/cdk/accordion';

src/demo-app/drag-drop/drag-drop-demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import {Component, ViewEncapsulation} from '@angular/core';
1010
import {MatIconRegistry} from '@angular/material/icon';
1111
import {DomSanitizer} from '@angular/platform-browser';
12-
import {CdkDragDrop, moveItemInArray, transferArrayItem} from '@angular/cdk-experimental/drag-drop';
12+
import {CdkDragDrop, moveItemInArray, transferArrayItem} from '@angular/cdk/drag-drop';
1313

1414
@Component({
1515
moduleId: module.id,

src/demo-app/system-config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ System.config({
4949
'@angular/cdk/bidi': 'dist/packages/cdk/bidi/index.js',
5050
'@angular/cdk/coercion': 'dist/packages/cdk/coercion/index.js',
5151
'@angular/cdk/collections': 'dist/packages/cdk/collections/index.js',
52+
'@angular/cdk/drag-drop': 'dist/packages/cdk/drag-drop/index.js',
5253
'@angular/cdk/keycodes': 'dist/packages/cdk/keycodes/index.js',
5354
'@angular/cdk/layout': 'dist/packages/cdk/layout/index.js',
5455
'@angular/cdk/observers': 'dist/packages/cdk/observers/index.js',
@@ -63,8 +64,6 @@ System.config({
6364

6465
'@angular/cdk-experimental/scrolling': 'dist/packages/cdk-experimental/scrolling/index.js',
6566
'@angular/cdk-experimental/dialog': 'dist/packages/cdk-experimental/dialog/index.js',
66-
'@angular/cdk-experimental/drag-drop':
67-
'dist/packages/cdk-experimental/drag-drop/index.js',
6867

6968
'@angular/material/autocomplete': 'dist/packages/material/autocomplete/index.js',
7069
'@angular/material/bottom-sheet': 'dist/packages/material/bottom-sheet/index.js',

src/e2e-app/e2e-app-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {DialogModule} from '@angular/cdk-experimental/dialog';
2-
import {DragDropModule} from '@angular/cdk-experimental/drag-drop';
2+
import {DragDropModule} from '@angular/cdk/drag-drop';
33
import {ScrollingModule as ExperimentalScrollingModule} from '@angular/cdk-experimental/scrolling';
44
import {FullscreenOverlayContainer, OverlayContainer} from '@angular/cdk/overlay';
55
import {ScrollingModule} from '@angular/cdk/scrolling';

src/e2e-app/system-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ System.config({
3838
'@angular/cdk/bidi': 'dist/bundles/cdk-bidi.umd.js',
3939
'@angular/cdk/coercion': 'dist/bundles/cdk-coercion.umd.js',
4040
'@angular/cdk/collections': 'dist/bundles/cdk-collections.umd.js',
41+
'@angular/cdk/drag-drop': 'dist/bundles/cdk-drag-drop.umd.js',
4142
'@angular/cdk/keycodes': 'dist/bundles/cdk-keycodes.umd.js',
4243
'@angular/cdk/layout': 'dist/bundles/cdk-layout.umd.js',
4344
'@angular/cdk/observers': 'dist/bundles/cdk-observers.umd.js',
@@ -54,7 +55,6 @@ System.config({
5455

5556
'@angular/cdk-experimental/scrolling': 'dist/bundles/cdk-experimental-scrolling.umd.js',
5657
'@angular/cdk-experimental/dialog': 'dist/bundles/cdk-experimental-dialog.umd.js',
57-
'@angular/cdk-experimental/drag-drop': 'dist/bundles/cdk-experimental-drag-drop.umd.js',
5858

5959
'@angular/material/autocomplete': 'dist/bundles/material-autocomplete.umd.js',
6060
'@angular/material/bottom-sheet': 'dist/bundles/material-bottom-sheet.umd.js',

test/karma-system-config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ System.config({
4444
'@angular/cdk/bidi': 'dist/packages/cdk/bidi/index.js',
4545
'@angular/cdk/coercion': 'dist/packages/cdk/coercion/index.js',
4646
'@angular/cdk/collections': 'dist/packages/cdk/collections/index.js',
47+
'@angular/cdk/drag-drop': 'dist/packages/cdk/drag-drop/index.js',
4748
'@angular/cdk/keycodes': 'dist/packages/cdk/keycodes/index.js',
4849
'@angular/cdk/layout': 'dist/packages/cdk/layout/index.js',
4950
'@angular/cdk/observers': 'dist/packages/cdk/observers/index.js',
@@ -59,8 +60,6 @@ System.config({
5960

6061
'@angular/cdk-experimental/scrolling': 'dist/packages/cdk-experimental/scrolling/index.js',
6162
'@angular/cdk-experimental/dialog': 'dist/packages/cdk-experimental/dialog/index.js',
62-
'@angular/cdk-experimental/drag-drop':
63-
'dist/packages/cdk-experimental/drag-drop/index.js',
6463

6564
'@angular/material/autocomplete': 'dist/packages/material/autocomplete/index.js',
6665
'@angular/material/badge': 'dist/packages/material/badge/index.js',

0 commit comments

Comments
 (0)