Skip to content

fix(animations): inject document object in the animation engine #1395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 21, 2018
Merged
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
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -29,9 +29,7 @@ ng-sample/app/**/*.js

# Webpack configuration files
webpack.config.js
vendor.ts
vendor-platform.android.ts
vendor-platform.ios.ts
tsconfig.esm.json

# IDEs and editors
/.idea
41 changes: 12 additions & 29 deletions e2e/renderer/package.json
Original file line number Diff line number Diff line change
@@ -4,31 +4,26 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.renderer",
"tns-android": {
"version": "4.1.0-2018.4.13.1"
}
"id": "org.nativescript.renderer"
},
"dependencies": {
"@angular/common": "~6.0.0-rc.3",
"@angular/compiler": "~6.0.0-rc.3",
"@angular/core": "~6.0.0-rc.3",
"@angular/forms": "~6.0.0-rc.3",
"@angular/http": "~6.0.0-rc.3",
"@angular/platform-browser": "~6.0.0-rc.3",
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
"@angular/router": "~6.0.0-rc.3",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/router": "~6.0.6",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-intl": "^3.0.0",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.0.0-rc.1",
"rxjs": "~6.1.0",
"tns-core-modules": "next",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular-devkit/core": "~0.5.5",
"@angular/compiler-cli": "~6.0.0-rc.3",
"@ngtools/webpack": "~6.0.0-rc.3",
"@angular/compiler-cli": "~6.1.0-beta.1",
"@types/chai": "^4.0.2",
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.5",
@@ -37,29 +32,17 @@
"babylon": "6.17.4",
"chai": "~4.1.1",
"chai-as-promised": "~7.1.1",
"clean-webpack-plugin": "~0.1.19",
"colors": "^1.1.2",
"copy-webpack-plugin": "~4.5.1",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"mocha": "~3.5.0",
"mocha-junit-reporter": "^1.13.0",
"mocha-multi": "^0.11.0",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "~0.7.1",
"nativescript-dev-webpack": "next",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.3.0",
"tslib": "^1.7.1",
"typescript": "~2.7.2",
"uglifyjs-webpack-plugin": "~1.2.4",
"webpack": "~4.5.0",
"webpack-bundle-analyzer": "^2.9.1",
"clean-webpack-plugin": "~0.1.19",
"webpack-cli": "~2.0.14",
"webpack-sources": "~1.1.0"
"@angular-devkit/build-angular": "~0.7.0-rc.0"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
5 changes: 4 additions & 1 deletion e2e/renderer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -16,6 +16,9 @@
"*": [
"./node_modules/tns-core-modules/*",
"./node_modules/*"
],
"~/*": [
"app/*"
]
}
},
@@ -24,4 +27,4 @@
"platforms",
"e2e"
]
}
}
51 changes: 15 additions & 36 deletions e2e/router/package.json
Original file line number Diff line number Diff line change
@@ -4,35 +4,28 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.router",
"tns-android": {
"version": "next"
},
"tns-ios": {
"version": "next"
}
"id": "org.nativescript.router"
},
"dependencies": {
"@angular/animations": "~6.0.0-rc.3",
"@angular/common": "~6.0.0-rc.3",
"@angular/compiler": "~6.0.0-rc.3",
"@angular/core": "~6.0.0-rc.3",
"@angular/forms": "~6.0.0-rc.3",
"@angular/http": "~6.0.0-rc.3",
"@angular/platform-browser": "~6.0.0-rc.3",
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
"@angular/router": "~6.0.0-rc.3",
"@angular/animations": "~6.0.6",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/router": "~6.0.6",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-intl": "^3.0.0",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.0.0-rc.1",
"rxjs": "~6.1.0",
"tns-core-modules": "next",
"zone.js": "^0.8.4"
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/core": "~0.5.5",
"@angular/compiler-cli": "~6.0.0-rc.3",
"@ngtools/webpack": "~6.0.0-rc.3",
"@angular-devkit/build-angular": "~0.7.0-rc.0",
"@angular/compiler-cli": "~6.1.0-beta.1",
"@types/chai": "^4.0.2",
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.5",
@@ -41,30 +34,16 @@
"babylon": "6.17.4",
"chai": "~4.1.1",
"chai-as-promised": "~7.1.1",
"clean-webpack-plugin": "~0.1.19",
"colors": "^1.1.2",
"copy-webpack-plugin": "~4.5.1",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"mocha": "~3.5.0",
"mocha-junit-reporter": "^1.13.0",
"mocha-multi": "^0.11.0",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "~0.4.0",
"nativescript-dev-webpack": "next",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.3.0",
"tslib": "^1.7.1",
"typescript": "~2.7.2",
"uglifyjs-webpack-plugin": "~1.2.4",
"webpack": "~4.5.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0",
"webpack-cli": "~2.0.14",
"webpack-sources": "~1.1.0",
"clean-webpack-plugin": "~0.1.19"
"typescript": "~2.7.2"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
17 changes: 13 additions & 4 deletions nativescript-angular/animations/animations.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import { NgModule, Injectable, NgZone, Provider, RendererFactory2, Optional, SkipSelf } from "@angular/core";

import {
NgModule,
Injectable,
Inject,
NgZone,
Provider,
RendererFactory2,
Optional,
SkipSelf,
} from "@angular/core";
import { DOCUMENT } from "@angular/common";
import { AnimationBuilder } from "@angular/animations";

import {
@@ -21,8 +30,8 @@ import { throwIfAlreadyLoaded } from "../common/utils";

@Injectable()
export class InjectableAnimationEngine extends AnimationEngine {
constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
super(driver, normalizer);
constructor(@Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
super(doc.body, driver, normalizer);
}
}

36 changes: 18 additions & 18 deletions nativescript-angular/package.json
Original file line number Diff line number Diff line change
@@ -43,30 +43,30 @@
"reflect-metadata": "^0.1.8"
},
"peerDependencies": {
"@angular/platform-browser-dynamic": "~6.0.0",
"@angular/common": "~6.0.0",
"@angular/compiler": "~6.0.0",
"@angular/core": "~6.0.0",
"@angular/forms": "~6.0.0",
"@angular/http": "~6.0.0",
"@angular/platform-browser": "~6.0.0",
"@angular/router": "~6.0.0",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/router": "~6.0.6",
"rxjs": "~6.0.0 || >=6.1.0",
"tns-core-modules": "^4.0.0 || >4.0.0- || >4.1.0-",
"zone.js": "^0.8.26",
"typescript": "~2.7.2"
},
"devDependencies": {
"@angular/animations": "~6.0.0",
"@angular/common": "~6.0.0",
"@angular/compiler": "~6.0.0",
"@angular/compiler-cli": "~6.0.0",
"@angular/core": "~6.0.0",
"@angular/forms": "~6.0.0",
"@angular/http": "~6.0.0",
"@angular/platform-browser": "~6.0.0",
"@angular/platform-browser-dynamic": "~6.0.0",
"@angular/router": "~6.0.0",
"@angular/animations": "~6.0.6",
"@angular/common": "~6.0.6",
"@angular/compiler": "~6.0.6",
"@angular/compiler-cli": "~6.0.6",
"@angular/core": "~6.0.6",
"@angular/forms": "~6.0.6",
"@angular/http": "~6.0.6",
"@angular/platform-browser": "~6.0.6",
"@angular/platform-browser-dynamic": "~6.0.6",
"@angular/router": "~6.0.6",
"codelyzer": "^4.3.0",
"rxjs": "~6.1.0",
"tns-core-modules": "next",