Skip to content

Commit f110c8e

Browse files
committed
fix: restore compatibility with angular 6 and 7
Fixes #97
1 parent 13118c4 commit f110c8e

File tree

9 files changed

+4106
-4077
lines changed

9 files changed

+4106
-4077
lines changed

package-lock.json

+4,070-4,038
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+21-23
Original file line numberDiff line numberDiff line change
@@ -41,38 +41,38 @@
4141
},
4242
"homepage": "https://github.com/mattlewis92/angular-draggable-droppable#readme",
4343
"devDependencies": {
44-
"@angular-devkit/build-angular": "~0.803.8",
45-
"@angular-devkit/build-ng-packagr": "~0.803.8",
46-
"@angular/cli": "^8.3.8",
47-
"@angular/common": "^8.2.9",
48-
"@angular/compiler": "^8.2.9",
49-
"@angular/compiler-cli": "^8.2.9",
50-
"@angular/core": "^8.2.9",
51-
"@angular/language-service": "^8.2.9",
52-
"@angular/platform-browser": "^8.2.9",
53-
"@angular/platform-browser-dynamic": "^8.2.9",
44+
"@angular-devkit/build-angular": "~0.13.0",
45+
"@angular-devkit/build-ng-packagr": "~0.13.0",
46+
"@angular/cli": "^7.3.9",
47+
"@angular/common": "^7.2.15",
48+
"@angular/compiler": "^7.2.15",
49+
"@angular/compiler-cli": "^7.2.15",
50+
"@angular/core": "^7.2.15",
51+
"@angular/language-service": "^7.2.15",
52+
"@angular/platform-browser": "^7.2.15",
53+
"@angular/platform-browser-dynamic": "^7.2.15",
5454
"@compodoc/compodoc": "^1.1.10",
55-
"@types/chai": "^4.2.3",
55+
"@types/chai": "4.1.4",
5656
"@types/mocha": "^5.2.7",
5757
"@types/node": "^12.7.11",
5858
"@types/sinon": "^7.5.0",
59-
"@types/sinon-chai": "^3.2.3",
59+
"@types/sinon-chai": "3.2.0",
6060
"angular-cli-ghpages": "^0.5.3",
6161
"chai": "^4.2.0",
6262
"codecov": "^3.6.1",
63-
"codelyzer": "^5.0.1",
63+
"codelyzer": "^4.5.0",
6464
"commitizen": "^4.0.3",
6565
"concurrently": "^5.0.0",
6666
"copyfiles": "^2.1.1",
67-
"core-js": "^3.2.1",
67+
"core-js": "^2.6.9",
6868
"cz-conventional-changelog": "^3.0.2",
6969
"husky": "^3.0.8",
7070
"karma": "^4.3.0",
7171
"karma-chrome-launcher": "^3.1.0",
7272
"karma-coverage-istanbul-reporter": "^2.1.0",
7373
"karma-mocha": "^1.3.0",
7474
"mocha": "^6.2.1",
75-
"ng-packagr": "^5.4.0",
75+
"ng-packagr": "^4.7.1",
7676
"prettier": "^1.18.2",
7777
"pretty-quick": "^1.11.1",
7878
"rollup": "^1.23.1",
@@ -85,17 +85,15 @@
8585
"sinon-chai": "^3.3.0",
8686
"standard-version": "^7.0.0",
8787
"ts-node": "^8.4.1",
88-
"tsickle": "^0.37.0",
89-
"tslib": "^1.10.0",
88+
"tsickle": "^0.34.0",
89+
"tslib": "^1.9.0",
9090
"tslint": "^5.20.0",
91-
"tslint-config-mwl": "^0.6.0",
92-
"typescript": "~3.5.3",
91+
"tslint-config-mwl": "^0.5.2",
92+
"typescript": "~3.2.4",
9393
"validate-commit-msg": "^2.14.0",
94-
"zone.js": "~0.9.1"
95-
},
96-
"peerDependencies": {
97-
"@angular/core": ">=6.0.0 <10.0.0"
94+
"zone.js": "^0.8.29"
9895
},
96+
"peerDependencies": {},
9997
"config": {
10098
"commitizen": {
10199
"path": "node_modules/cz-conventional-changelog"

projects/angular-draggable-droppable/src/lib/draggable.directive.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ describe('draggable directive', () => {
3737
`
3838
})
3939
class TestComponent {
40-
@ViewChild(DraggableDirective, { static: true })
40+
@ViewChild(DraggableDirective)
4141
draggable: DraggableDirective;
42-
@ViewChild('draggableElement', { static: true })
42+
@ViewChild('draggableElement')
4343
draggableElement: ElementRef<HTMLDivElement>;
44-
@ViewChild('ghostElementTemplateRef', { static: true })
44+
@ViewChild('ghostElementTemplateRef')
4545
ghostElementTemplateRef: TemplateRef<any>;
4646
dragPointerDown = sinon.spy();
4747
dragStart = sinon.spy();
@@ -97,7 +97,7 @@ describe('draggable directive', () => {
9797
]
9898
})
9999
class ScrollTestComponent extends TestComponent {
100-
@ViewChild(DraggableScrollContainerDirective, { static: true })
100+
@ViewChild(DraggableScrollContainerDirective)
101101
scrollContainer: DraggableScrollContainerDirective;
102102
}
103103

projects/angular-draggable-droppable/src/lib/droppable.directive.spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ describe('droppable directive', () => {
5353
]
5454
})
5555
class TestComponent {
56-
@ViewChild(DraggableDirective, { static: true })
56+
@ViewChild(DraggableDirective)
5757
draggable: DraggableDirective;
58-
@ViewChild(DroppableDirective, { static: true })
58+
@ViewChild(DroppableDirective)
5959
droppable: DroppableDirective;
60-
@ViewChild('droppableElement', { static: true })
60+
@ViewChild('droppableElement')
6161
droppableElement: ElementRef<HTMLDivElement>;
62-
@ViewChild('draggableElement', { static: true })
62+
@ViewChild('draggableElement')
6363
draggableElement: ElementRef<HTMLDivElement>;
6464
dragEvent = sinon.spy();
6565
drop = sinon.spy();
@@ -123,7 +123,7 @@ describe('droppable directive', () => {
123123
]
124124
})
125125
class ScrollTestComponent extends TestComponent {
126-
@ViewChild(DraggableScrollContainerDirective, { static: true })
126+
@ViewChild(DraggableScrollContainerDirective)
127127
scrollContainer: DraggableScrollContainerDirective;
128128
}
129129

projects/angular-draggable-droppable/src/lib/droppable.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class DroppableDirective implements OnInit, OnDestroy {
7070
* Called when a draggable element is dropped on this element
7171
*/
7272
@Output()
73-
drop = new EventEmitter<DropEvent>(); // tslint:disable-line no-output-native
73+
drop = new EventEmitter<DropEvent>(); // tslint:disable-line no-output-named-after-standard-event
7474

7575
currentDragSubscription: Subscription;
7676

projects/angular-draggable-droppable/src/test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
22

3-
import 'core-js/es/reflect';
3+
import 'core-js/es7/reflect';
44
import 'zone.js/dist/zone';
55
import 'zone.js/dist/long-stack-trace-zone';
66
import 'zone.js/dist/async-test';
File renamed without changes.

tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
"compileOnSave": false,
33
"compilerOptions": {
44
"baseUrl": "./",
5-
"downlevelIteration": true,
65
"importHelpers": true,
76
"outDir": "./dist/out-tsc",
87
"sourceMap": true,
98
"declaration": false,
10-
"module": "esnext",
9+
"module": "es2015",
1110
"moduleResolution": "node",
1211
"emitDecoratorMetadata": true,
1312
"experimentalDecorators": true,
14-
"target": "es2015",
13+
"target": "es5",
1514
"typeRoots": [
1615
"node_modules/@types"
1716
],

tslint.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"rules": {
44
"no-inferrable-types": false,
55
"no-unused-expression": [false],
6-
"component-max-inline-declarations": false,
7-
"use-component-selector": false,
6+
"max-inline-declarations": false,
7+
"enforce-component-selector": false,
88
"no-unused-css": false,
99
"no-empty-interface": false,
1010
"jsdoc-format": false

0 commit comments

Comments
 (0)