From 6d98a2ab1d38fad35cff99573013f3fc80759a2c Mon Sep 17 00:00:00 2001 From: Dylan Llewellyn <46717769+herefishyfish@users.noreply.github.com> Date: Tue, 5 Jul 2022 18:24:21 +0800 Subject: [PATCH 01/29] feat(google-map-utils): Init --- README.md | 1 + apps/demo-angular/package.json | 81 +- apps/demo-angular/src/app-routing.module.ts | 1 + apps/demo-angular/src/home.component.ts | 3 + .../google-maps-utils.component.html | 8 + .../google-maps-utils.component.ts | 19 + .../plugin-demos/google-maps-utils.module.ts | 10 + apps/demo/package.json | 87 +- apps/demo/src/main-page.xml | 1 + .../src/plugin-demos/google-maps-utils.ts | 12 + .../src/plugin-demos/google-maps-utils.xml | 14 + packages/google-maps-utils/.eslintrc.json | 18 + packages/google-maps-utils/README.md | 13 + packages/google-maps-utils/common.ts | 4 + packages/google-maps-utils/index.android.ts | 234 + packages/google-maps-utils/index.d.ts | 5 + packages/google-maps-utils/index.ios.ts | 5 + packages/google-maps-utils/package.json | 35 + .../platforms/android/include.gradle | 3 + packages/google-maps-utils/project.json | 72 + packages/google-maps-utils/references.d.ts | 2 + packages/google-maps-utils/tsconfig.json | 9 + .../google-maps-utils/typings/android.d.ts | 8980 +++++++++++++++++ .../Android/src/main/AndroidManifest.xml | 4 + .../demo/google-maps-utils/geojson.example.ts | 117 + tools/demo/google-maps-utils/index.ts | 61 + tools/demo/index.ts | 1 + tools/workspace-scripts.js | 11 + tsconfig.base.json | 214 +- workspace.json | 75 +- 30 files changed, 9917 insertions(+), 183 deletions(-) create mode 100644 apps/demo-angular/src/plugin-demos/google-maps-utils.component.html create mode 100644 apps/demo-angular/src/plugin-demos/google-maps-utils.component.ts create mode 100644 apps/demo-angular/src/plugin-demos/google-maps-utils.module.ts create mode 100644 apps/demo/src/plugin-demos/google-maps-utils.ts create mode 100644 apps/demo/src/plugin-demos/google-maps-utils.xml create mode 100644 packages/google-maps-utils/.eslintrc.json create mode 100644 packages/google-maps-utils/README.md create mode 100644 packages/google-maps-utils/common.ts create mode 100644 packages/google-maps-utils/index.android.ts create mode 100644 packages/google-maps-utils/index.d.ts create mode 100644 packages/google-maps-utils/index.ios.ts create mode 100644 packages/google-maps-utils/package.json create mode 100644 packages/google-maps-utils/platforms/android/include.gradle create mode 100644 packages/google-maps-utils/project.json create mode 100644 packages/google-maps-utils/references.d.ts create mode 100644 packages/google-maps-utils/tsconfig.json create mode 100644 packages/google-maps-utils/typings/android.d.ts create mode 100644 tools/demo/google-maps-utils/geojson.example.ts create mode 100644 tools/demo/google-maps-utils/index.ts diff --git a/README.md b/README.md index 9524b85e..b3f4472e 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ - [@nativescript/fingerprint-auth](packages/fingerprint-auth/README.md) - [@nativescript/geolocation](packages/geolocation/README.md) - [@nativescript/google-maps](packages/google-maps/README.md) +- [@nativescript/google-maps-utils](packages/google-maps-utils/README.md) - [@nativescript/google-signin](packages/google-signin/README.md) - [@nativescript/imagepicker](packages/imagepicker/README.md) - [@nativescript/ionic-portals](packages/ionic-portals/README.md) diff --git a/apps/demo-angular/package.json b/apps/demo-angular/package.json index 0499e2fd..3067a986 100644 --- a/apps/demo-angular/package.json +++ b/apps/demo-angular/package.json @@ -1,42 +1,43 @@ { - "main": "./src/main.ts", - "dependencies": { - "@nativescript/core": "file:../../node_modules/@nativescript/core", - "@nativescript/ionic-portals": "file:../../dist/packages/ionic-portals", - "@nativescript/animated-circle": "file:../../dist/packages/animated-circle", - "@nativescript/appavailability": "file:../../dist/packages/appavailability", - "@nativescript/apple-sign-in": "file:../../dist/packages/apple-sign-in", - "@nativescript/auto-fit-text": "file:../../dist/packages/auto-fit-text", - "@nativescript/background-http": "file:../../dist/packages/background-http", - "@nativescript/biometrics": "file:../../dist/packages/biometrics", - "@nativescript/brightness": "file:../../dist/packages/brightness", - "@nativescript/camera": "file:../../dist/packages/camera", - "@nativescript/contacts": "file:../../dist/packages/contacts", - "@nativescript/datetimepicker": "file:../../dist/packages/datetimepicker", - "@nativescript/debug-android": "file:../../dist/packages/debug-android", - "@nativescript/debug-ios": "file:../../dist/packages/debug-ios", - "@nativescript/detox": "file:../../dist/packages/detox", - "@nativescript/directions": "file:../../dist/packages/directions", - "@nativescript/email": "file:../../dist/packages/email", - "@nativescript/facebook": "file:../../dist/packages/facebook", - "@nativescript/fingerprint-auth": "file:../../dist/packages/fingerprint-auth", - "@nativescript/geolocation": "file:../../dist/packages/geolocation", - "@nativescript/google-maps": "file:../../dist/packages/google-maps", - "@nativescript/google-signin": "file:../../dist/packages/google-signin", - "@nativescript/imagepicker": "file:../../dist/packages/imagepicker", - "@nativescript/ios-security": "file:../../dist/packages/ios-security", - "@nativescript/iqkeyboardmanager": "file:../../dist/packages/iqkeyboardmanager", - "@nativescript/local-notifications": "file:../../dist/packages/local-notifications", - "@nativescript/localize": "file:../../dist/packages/localize", - "@nativescript/picker": "file:../../dist/packages/picker", - "@nativescript/shared-notification-delegate": "file:../../dist/packages/shared-notification-delegate", - "@nativescript/social-share": "file:../../dist/packages/social-share", - "@nativescript/theme-switcher": "file:../../dist/packages/theme-switcher", - "@nativescript/twitter": "file:../../dist/packages/twitter", - "@nativescript/zip": "file:../../dist/packages/zip" - }, - "devDependencies": { - "@nativescript/android": "~8.2.0", - "@nativescript/ios": "~8.2.0" - } + "main": "./src/main.ts", + "dependencies": { + "@nativescript/core": "file:../../node_modules/@nativescript/core", + "@nativescript/google-maps-utils": "file:../../dist/packages/google-maps-utils", + "@nativescript/google-maps": "file:../../dist/packages/google-maps", + "@nativescript/animated-circle": "file:../../dist/packages/animated-circle", + "@nativescript/appavailability": "file:../../dist/packages/appavailability", + "@nativescript/apple-sign-in": "file:../../dist/packages/apple-sign-in", + "@nativescript/auto-fit-text": "file:../../dist/packages/auto-fit-text", + "@nativescript/background-http": "file:../../dist/packages/background-http", + "@nativescript/biometrics": "file:../../dist/packages/biometrics", + "@nativescript/brightness": "file:../../dist/packages/brightness", + "@nativescript/camera": "file:../../dist/packages/camera", + "@nativescript/contacts": "file:../../dist/packages/contacts", + "@nativescript/datetimepicker": "file:../../dist/packages/datetimepicker", + "@nativescript/debug-android": "file:../../dist/packages/debug-android", + "@nativescript/debug-ios": "file:../../dist/packages/debug-ios", + "@nativescript/detox": "file:../../dist/packages/detox", + "@nativescript/directions": "file:../../dist/packages/directions", + "@nativescript/email": "file:../../dist/packages/email", + "@nativescript/facebook": "file:../../dist/packages/facebook", + "@nativescript/fingerprint-auth": "file:../../dist/packages/fingerprint-auth", + "@nativescript/geolocation": "file:../../dist/packages/geolocation", + "@nativescript/google-signin": "file:../../dist/packages/google-signin", + "@nativescript/imagepicker": "file:../../dist/packages/imagepicker", + "@nativescript/ionic-portals": "file:../../dist/packages/ionic-portals", + "@nativescript/ios-security": "file:../../dist/packages/ios-security", + "@nativescript/iqkeyboardmanager": "file:../../dist/packages/iqkeyboardmanager", + "@nativescript/local-notifications": "file:../../dist/packages/local-notifications", + "@nativescript/localize": "file:../../dist/packages/localize", + "@nativescript/picker": "file:../../dist/packages/picker", + "@nativescript/shared-notification-delegate": "file:../../dist/packages/shared-notification-delegate", + "@nativescript/social-share": "file:../../dist/packages/social-share", + "@nativescript/theme-switcher": "file:../../dist/packages/theme-switcher", + "@nativescript/twitter": "file:../../dist/packages/twitter", + "@nativescript/zip": "file:../../dist/packages/zip" + }, + "devDependencies": { + "@nativescript/android": "~8.2.0", + "@nativescript/ios": "~8.2.0" + } } diff --git a/apps/demo-angular/src/app-routing.module.ts b/apps/demo-angular/src/app-routing.module.ts index 4f32da22..ab404982 100644 --- a/apps/demo-angular/src/app-routing.module.ts +++ b/apps/demo-angular/src/app-routing.module.ts @@ -26,6 +26,7 @@ const routes: Routes = [ { path: 'fingerprint-auth', loadChildren: () => import('./plugin-demos/fingerprint-auth.module').then(m => m.FingerprintAuthModule) }, { path: 'geolocation', loadChildren: () => import('./plugin-demos/geolocation.module').then(m => m.GeolocationModule) }, { path: 'google-maps', loadChildren: () => import('./plugin-demos/google-maps.module').then(m => m.GoogleMapsModule) }, + { path: 'google-maps-utils', loadChildren: () => import('./plugin-demos/google-maps-utils.module').then(m => m.GoogleMapsUtilsModule) }, { path: 'google-signin', loadChildren: () => import('./plugin-demos/google-signin.module').then(m => m.GoogleSigninModule) }, { path: 'imagepicker', loadChildren: () => import('./plugin-demos/imagepicker.module').then(m => m.ImagepickerModule) }, { path: 'ionic-portals', loadChildren: () => import('./plugin-demos/ionic-portals.module').then(m => m.IonicPortalsModule) }, diff --git a/apps/demo-angular/src/home.component.ts b/apps/demo-angular/src/home.component.ts index f908a75f..c4bbfa1a 100644 --- a/apps/demo-angular/src/home.component.ts +++ b/apps/demo-angular/src/home.component.ts @@ -63,6 +63,9 @@ export class HomeComponent { { name: 'google-maps' }, + { + name: 'google-maps-utils' + }, { name: 'google-signin' }, diff --git a/apps/demo-angular/src/plugin-demos/google-maps-utils.component.html b/apps/demo-angular/src/plugin-demos/google-maps-utils.component.html new file mode 100644 index 00000000..56634035 --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/google-maps-utils.component.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/apps/demo-angular/src/plugin-demos/google-maps-utils.component.ts b/apps/demo-angular/src/plugin-demos/google-maps-utils.component.ts new file mode 100644 index 00000000..3ae88b2b --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/google-maps-utils.component.ts @@ -0,0 +1,19 @@ +import { Component, NgZone } from '@angular/core'; +import { DemoSharedGoogleMapsUtils } from '@demo/shared'; +import { } from '@nativescript/google-maps-utils'; + +@Component({ + selector: 'demo-google-maps-utils', + templateUrl: 'google-maps-utils.component.html', +}) +export class GoogleMapsUtilsComponent { + + demoShared: DemoSharedGoogleMapsUtils; + + constructor(private _ngZone: NgZone) {} + + ngOnInit() { + this.demoShared = new DemoSharedGoogleMapsUtils(); + } + +} \ No newline at end of file diff --git a/apps/demo-angular/src/plugin-demos/google-maps-utils.module.ts b/apps/demo-angular/src/plugin-demos/google-maps-utils.module.ts new file mode 100644 index 00000000..1a219672 --- /dev/null +++ b/apps/demo-angular/src/plugin-demos/google-maps-utils.module.ts @@ -0,0 +1,10 @@ +import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; +import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; +import { GoogleMapsUtilsComponent } from './google-maps-utils.component'; + +@NgModule({ + imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: GoogleMapsUtilsComponent }])], + declarations: [GoogleMapsUtilsComponent], + schemas: [ NO_ERRORS_SCHEMA] +}) +export class GoogleMapsUtilsModule {} diff --git a/apps/demo/package.json b/apps/demo/package.json index a8793493..af463988 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -1,45 +1,46 @@ { - "main": "./src/app.ts", - "description": "NativeScript Application", - "license": "SEE LICENSE IN ", - "repository": "", - "dependencies": { - "@nativescript/ionic-portals": "file:../../packages/ionic-portals", - "@nativescript/core": "file:../../node_modules/@nativescript/core", - "@nativescript/animated-circle": "file:../../packages/animated-circle", - "@nativescript/appavailability": "file:../../packages/appavailability", - "@nativescript/apple-sign-in": "file:../../packages/apple-sign-in", - "@nativescript/auto-fit-text": "file:../../packages/auto-fit-text", - "@nativescript/background-http": "file:../../packages/background-http", - "@nativescript/biometrics": "file:../../packages/biometrics", - "@nativescript/brightness": "file:../../packages/brightness", - "@nativescript/camera": "file:../../packages/camera", - "@nativescript/contacts": "file:../../packages/contacts", - "@nativescript/datetimepicker": "file:../../packages/datetimepicker", - "@nativescript/debug-android": "file:../../packages/debug-android", - "@nativescript/debug-ios": "file:../../packages/debug-ios", - "@nativescript/detox": "file:../../packages/detox", - "@nativescript/directions": "file:../../packages/directions", - "@nativescript/email": "file:../../packages/email", - "@nativescript/facebook": "file:../../packages/facebook", - "@nativescript/fingerprint-auth": "file:../../packages/fingerprint-auth", - "@nativescript/geolocation": "file:../../packages/geolocation", - "@nativescript/google-maps": "file:../../packages/google-maps", - "@nativescript/google-signin": "file:../../packages/google-signin", - "@nativescript/imagepicker": "file:../../packages/imagepicker", - "@nativescript/ios-security": "file:../../packages/ios-security", - "@nativescript/iqkeyboardmanager": "file:../../packages/iqkeyboardmanager", - "@nativescript/local-notifications": "file:../../packages/local-notifications", - "@nativescript/localize": "file:../../dist/packages/localize", - "@nativescript/picker": "file:../../packages/picker", - "@nativescript/shared-notification-delegate": "file:../../packages/shared-notification-delegate", - "@nativescript/social-share": "file:../../packages/social-share", - "@nativescript/theme-switcher": "file:../../packages/theme-switcher", - "@nativescript/twitter": "file:../../packages/twitter", - "@nativescript/zip": "file:../../packages/zip" - }, - "devDependencies": { - "@nativescript/android": "~8.2.0", - "@nativescript/ios": "~8.2.0" - } + "main": "./src/app.ts", + "description": "NativeScript Application", + "license": "SEE LICENSE IN ", + "repository": "", + "dependencies": { + "@nativescript/core": "file:../../node_modules/@nativescript/core", + "@nativescript/google-maps-utils": "file:../../packages/google-maps-utils", + "@nativescript/google-maps": "file:../../packages/google-maps", + "@nativescript/animated-circle": "file:../../packages/animated-circle", + "@nativescript/appavailability": "file:../../packages/appavailability", + "@nativescript/apple-sign-in": "file:../../packages/apple-sign-in", + "@nativescript/auto-fit-text": "file:../../packages/auto-fit-text", + "@nativescript/background-http": "file:../../packages/background-http", + "@nativescript/biometrics": "file:../../packages/biometrics", + "@nativescript/brightness": "file:../../packages/brightness", + "@nativescript/camera": "file:../../packages/camera", + "@nativescript/contacts": "file:../../packages/contacts", + "@nativescript/datetimepicker": "file:../../packages/datetimepicker", + "@nativescript/debug-android": "file:../../packages/debug-android", + "@nativescript/debug-ios": "file:../../packages/debug-ios", + "@nativescript/detox": "file:../../packages/detox", + "@nativescript/directions": "file:../../packages/directions", + "@nativescript/email": "file:../../packages/email", + "@nativescript/facebook": "file:../../packages/facebook", + "@nativescript/fingerprint-auth": "file:../../packages/fingerprint-auth", + "@nativescript/geolocation": "file:../../packages/geolocation", + "@nativescript/google-signin": "file:../../packages/google-signin", + "@nativescript/imagepicker": "file:../../packages/imagepicker", + "@nativescript/ionic-portals": "file:../../packages/ionic-portals", + "@nativescript/ios-security": "file:../../packages/ios-security", + "@nativescript/iqkeyboardmanager": "file:../../packages/iqkeyboardmanager", + "@nativescript/local-notifications": "file:../../packages/local-notifications", + "@nativescript/localize": "file:../../packages/localize", + "@nativescript/picker": "file:../../packages/picker", + "@nativescript/shared-notification-delegate": "file:../../packages/shared-notification-delegate", + "@nativescript/social-share": "file:../../packages/social-share", + "@nativescript/theme-switcher": "file:../../packages/theme-switcher", + "@nativescript/twitter": "file:../../packages/twitter", + "@nativescript/zip": "file:../../packages/zip" + }, + "devDependencies": { + "@nativescript/android": "~8.2.0", + "@nativescript/ios": "~8.2.0" + } } diff --git a/apps/demo/src/main-page.xml b/apps/demo/src/main-page.xml index d6f65464..616d9cb5 100644 --- a/apps/demo/src/main-page.xml +++ b/apps/demo/src/main-page.xml @@ -24,6 +24,7 @@