diff --git a/.eslintrc.json b/.eslintrc.json index 155eafd..3ad9327 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,12 @@ { "root": true, "ignorePatterns": ["**/*"], - "plugins": ["@nrwl/nx"], + "plugins": ["@nx"], "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "rules": { - "@nrwl/nx/enforce-module-boundaries": [ + "@nx/enforce-module-boundaries": [ "error", { "enforceBuildableLibDependency": true, @@ -23,12 +23,12 @@ }, { "files": ["*.ts", "*.tsx"], - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"], + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nx/typescript"], "rules": {} }, { "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nrwl/nx/javascript"], + "extends": ["plugin:@nx/javascript"], "rules": {} }, { diff --git a/.swp b/.swp index 8c81919..01cd552 100644 Binary files a/.swp and b/.swp differ diff --git a/README.md b/README.md index 9e9617e..dfe1722 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ - [@essent/nativescript-medallia](packages/nativescript-medallia/README.md) - [@essent/nativescript-ng-sentry](packages/nativescript-ng-sentry/README.md) - [@essent/nativescript-urban-airship](packages/nativescript-urban-airship/README.md) +- [@essent/nativescript-webview-ext](packages/nativescript-webview-ext/README.md) # How to use? diff --git a/apps/demo-angular/package.json b/apps/demo-angular/package.json index b6c7700..944274d 100644 --- a/apps/demo-angular/package.json +++ b/apps/demo-angular/package.json @@ -7,7 +7,8 @@ "@essent/nativescript-appdynamics": "file:../../dist/packages/nativescript-appdynamics", "@essent/nativescript-iadvize": "file:../../dist/packages/nativescript-iadvize", "@essent/nativescript-medallia": "file:../../dist/packages/nativescript-medallia", - "@essent/nativescript-urban-airship": "file:../../dist/packages/nativescript-urban-airship" + "@essent/nativescript-urban-airship": "file:../../dist/packages/nativescript-urban-airship", + "@essent/nativescript-webview-ext": "file:../../dist/packages/nativescript-webview-ext" }, "devDependencies": { "@nativescript/android": "~8.5.0", diff --git a/apps/demo-angular/project.json b/apps/demo-angular/project.json index 85bfd64..c960aa3 100644 --- a/apps/demo-angular/project.json +++ b/apps/demo-angular/project.json @@ -17,7 +17,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -29,7 +29,7 @@ "dependsOn": [ { "target": "build.demo", - "projects": "dependencies" + "dependencies": true } ] }, @@ -41,7 +41,7 @@ "dependsOn": [ { "target": "build.demo", - "projects": "dependencies" + "dependencies": true } ] }, @@ -52,7 +52,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": ["apps/demo-angular/**/*.ts"] } diff --git a/apps/demo-angular/src/app-routing.module.ts b/apps/demo-angular/src/app-routing.module.ts index 0d7cd81..2aac7fe 100644 --- a/apps/demo-angular/src/app-routing.module.ts +++ b/apps/demo-angular/src/app-routing.module.ts @@ -13,6 +13,7 @@ const routes: Routes = [ { path: 'nativescript-medallia', loadChildren: () => import('./plugin-demos/nativescript-medallia.module').then((m) => m.NativescriptMedalliaModule) }, { path: 'nativescript-ng-sentry', loadChildren: () => import('./plugin-demos/nativescript-ng-sentry.module').then((m) => m.NativescriptNgSentryModule) }, { path: 'nativescript-urban-airship', loadChildren: () => import('./plugin-demos/nativescript-urban-airship.module').then((m) => m.NativescriptUrbanAirshipModule) }, + { path: 'nativescript-webview-ext', loadChildren: () => import('./plugin-demos/nativescript-webview-ext.module').then((m) => m.NativescriptWebviewExtModule) }, ]; @NgModule({ diff --git a/apps/demo-angular/src/home.component.ts b/apps/demo-angular/src/home.component.ts index 15e0a2b..ad05f59 100644 --- a/apps/demo-angular/src/home.component.ts +++ b/apps/demo-angular/src/home.component.ts @@ -24,5 +24,8 @@ export class HomeComponent { { name: 'nativescript-urban-airship', }, + { + name: 'nativescript-webview-ext', + }, ]; } diff --git a/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.component.html b/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.component.html new file mode 100644 index 0000000..d805f65 --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.component.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.component.ts b/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.component.ts new file mode 100644 index 0000000..0402833 --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.component.ts @@ -0,0 +1,17 @@ +import { Component, NgZone } from '@angular/core'; +import { DemoSharedNativescriptWebviewExt } from '@demo/shared'; +import {} from '@essent/nativescript-webview-ext'; + +@Component({ + selector: 'demo-nativescript-webview-ext', + templateUrl: 'nativescript-webview-ext.component.html', +}) +export class NativescriptWebviewExtComponent { + demoShared: DemoSharedNativescriptWebviewExt; + + constructor(private _ngZone: NgZone) {} + + ngOnInit() { + this.demoShared = new DemoSharedNativescriptWebviewExt(); + } +} diff --git a/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.module.ts b/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.module.ts new file mode 100644 index 0000000..828b42a --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/nativescript-webview-ext.module.ts @@ -0,0 +1,10 @@ +import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; +import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; +import { NativescriptWebviewExtComponent } from './nativescript-webview-ext.component'; + +@NgModule({ + imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptWebviewExtComponent }])], + declarations: [NativescriptWebviewExtComponent], + schemas: [NO_ERRORS_SCHEMA], +}) +export class NativescriptWebviewExtModule {} diff --git a/apps/demo/package.json b/apps/demo/package.json index 018db4f..3e26c2a 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -10,7 +10,8 @@ "@essent/nativescript-appdynamics": "file:../../packages/nativescript-appdynamics", "@essent/nativescript-iadvize": "file:../../packages/nativescript-iadvize", "@essent/nativescript-medallia": "file:../../packages/nativescript-medallia", - "@essent/nativescript-urban-airship": "file:../../packages/nativescript-urban-airship" + "@essent/nativescript-urban-airship": "file:../../packages/nativescript-urban-airship", + "@essent/nativescript-webview-ext": "file:../../packages/nativescript-webview-ext" }, "devDependencies": { "@nativescript/android": "~8.5.0", diff --git a/apps/demo/project.json b/apps/demo/project.json index 87572e6..005d2aa 100644 --- a/apps/demo/project.json +++ b/apps/demo/project.json @@ -17,7 +17,7 @@ "dependsOn": [ { "target": "build.all", - "projects": "dependencies" + "dependencies": true } ] }, @@ -29,7 +29,7 @@ "dependsOn": [ { "target": "build.demo", - "projects": "dependencies" + "dependencies": true } ] }, @@ -41,7 +41,7 @@ "dependsOn": [ { "target": "build.demo", - "projects": "dependencies" + "dependencies": true } ] }, @@ -52,7 +52,7 @@ } }, "lint": { - "executor": "@nrwl/linter:eslint", + "executor": "@nx/linter:eslint", "options": { "lintFilePatterns": ["apps/demo/**/*.ts"] } diff --git a/apps/demo/src/main-page.xml b/apps/demo/src/main-page.xml index 098929c..e3491fa 100644 --- a/apps/demo/src/main-page.xml +++ b/apps/demo/src/main-page.xml @@ -11,6 +11,7 @@