Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
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
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ gulp.task('!assets', function () {
return gulp.src(PATHS.sources.sampleAssets).pipe(gulp.dest(PATHS.app + '/' + APP_NAME));
});
gulp.task('!transpile', ['!assets'], function () {
return ts2js([PATHS.sources.sample, PATHS.sources.src], PATHS.tmp);
return ts2js([PATHS.sources.sample, PATHS.sources.src], PATHS.tmp, false, false);
});
gulp.task('!copyToNodeModules', ['!transpile'], function () {
return gulp.src(PATHS.tmp + '/src/**/*').pipe(gulp.dest(PATHS.app + '/' + APP_NAME + '/node_modules/angular2-react-native'));
Expand Down Expand Up @@ -181,7 +181,7 @@ gulp.task('start.ios.aot', function (neverDone) {
/******************************* BROWSER **************************************/
/**********************************************************************************/
gulp.task('ts2system', ['clean.code'], function () {
return ts2js([PATHS.sources.src, PATHS.sources.test], PATHS.destination, true);
return ts2js([PATHS.sources.src, PATHS.sources.test], PATHS.destination, true, false);
});

gulp.task('karma-launch', function() {
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"homepage": "https://github.com/angular/react-native-renderer/",
"devDependencies": {
"@angular/compiler-cli": "0.6.2",
"@angular/compiler-cli": "0.6.4",
"babel-preset-es2015": "^6.14.0",
"del": "^1.2.0",
"glob": "^4.0.6",
Expand All @@ -49,19 +49,19 @@
"systemjs": "^0.19.9",
"systemjs-builder": "^0.15.14",
"through2": "~0.6.3",
"typescript": "^2.0.2"
"typescript": "^2.0.3"
},
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/platform-server": "2.0.0",
"@angular/router": "3.0.0",
"@angular/common": "2.0.2",
"@angular/compiler": "2.0.2",
"@angular/core": "2.0.2",
"@angular/http": "2.0.2",
"@angular/platform-browser": "2.0.2",
"@angular/platform-browser-dynamic": "2.0.2",
"@angular/platform-server": "2.0.2",
"@angular/router": "3.0.2",
"hammerjs": "2.0.6",
"react-native": "0.32.0",
"react-native": "0.34.1",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.12",
"zone.js": "mlaval/zone.js#0.6.23-fixed-for-RN"
Expand Down
9 changes: 9 additions & 0 deletions src/components/common/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class Sample {}
template: `<native-webview [automaticallyAdjustContentInsets]="_automaticallyAdjustContentInsets" [contentInset]="_contentInset"
[injectedJavaScript]="_injectedJavaScript" [scalesPageToFit]="_scalesPageToFit" [source]="_source"
(topLoadingStart)="_handleLoadingStart($event)" (topLoadingFinish)="_handleLoadingFinish($event)" (topLoadingError)="_handleLoadingError($event)"
(topContentSizeChange)="_handleContentSizeChange($event)"
${GENERIC_BINDINGS} ${isAndroid() ? ANDROID_BINDINGS : IOS_BINDINGS}></native-webview>`
})
export class WebView extends HighLevelComponent{
Expand All @@ -56,6 +57,10 @@ export class WebView extends HighLevelComponent{
* To be documented
*/
@Output() loadingError: EventEmitter<any> = new EventEmitter();
/**
* To be documented
*/
@Output() contentSizeChange: EventEmitter<any> = new EventEmitter();

//Properties
public _automaticallyAdjustContentInsets: boolean;
Expand Down Expand Up @@ -135,6 +140,10 @@ export class WebView extends HighLevelComponent{
this.loadingError.emit({canGoBack: event.canGoBack, canGoForward: event.canGoForward, loading: event.loading, title: event.title, url: event.url, code: event.code, description: event.description});
}

_handleContentSizeChange(event: any) {
this.contentSizeChange.emit(event);
}

//Commands
/**
* To be documented
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export class ReactNativeElementSchemaRegistry extends ElementSchemaRegistry {
securityContext(tagName: string, propName: string): any {
return 0;
}
validateProperty(name: string): {error: boolean; msg?: string} {
return {error: false};
}
validateAttribute(name: string): {error: boolean; msg?: string} {
return {error: false};
}
}

export class ReactNativeSanitizer implements Sanitizer {
Expand Down