Skip to content

Commit 10e8780

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/portal-view
2 parents cd3e282 + 148dfba commit 10e8780

File tree

140 files changed

+18246
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+18246
-20
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [@nativescript/biometrics](packages/biometrics/README.md)
77
- [@nativescript/brightness](packages/brightness/README.md)
88
- [@nativescript/camera](packages/camera/README.md)
9+
- [@nativescript/contacts](packages/contacts/README.md)
910
- [@nativescript/datetimepicker](packages/datetimepicker/README.md)
1011
- [@nativescript/debug-android](packages/debug-android/README.md)
1112
- [@nativescript/debug-ios](packages/debug-ios/README.md)
@@ -15,6 +16,7 @@
1516
- [@nativescript/facebook](packages/facebook/README.md)
1617
- [@nativescript/fingerprint-auth](packages/fingerprint-auth/README.md)
1718
- [@nativescript/geolocation](packages/geolocation/README.md)
19+
- [@nativescript/google-maps](packages/google-maps/README.md)
1820
- [@nativescript/google-signin](packages/google-signin/README.md)
1921
- [@nativescript/imagepicker](packages/imagepicker/README.md)
2022
- [@nativescript/ionic-portals](packages/ionic-portals/README.md)

apps/demo-angular/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"main": "./src/main.ts",
33
"dependencies": {
44
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5-
"@nativescript/ionic-portals": "file:../../dist/packages/ionic-portals",
5+
"@nativescript/contacts": "file:../../dist/packages/contacts",
66
"@nativescript/animated-circle": "file:../../dist/packages/animated-circle",
77
"@nativescript/appavailability": "file:../../dist/packages/appavailability",
88
"@nativescript/apple-sign-in": "file:../../dist/packages/apple-sign-in",
@@ -20,8 +20,10 @@
2020
"@nativescript/facebook": "file:../../dist/packages/facebook",
2121
"@nativescript/fingerprint-auth": "file:../../dist/packages/fingerprint-auth",
2222
"@nativescript/geolocation": "file:../../dist/packages/geolocation",
23+
"@nativescript/google-maps": "file:../../dist/packages/google-maps",
2324
"@nativescript/google-signin": "file:../../dist/packages/google-signin",
2425
"@nativescript/imagepicker": "file:../../dist/packages/imagepicker",
26+
"@nativescript/ionic-portals": "file:../../dist/packages/ionic-portals",
2527
"@nativescript/ios-security": "file:../../dist/packages/ios-security",
2628
"@nativescript/iqkeyboardmanager": "file:../../dist/packages/iqkeyboardmanager",
2729
"@nativescript/local-notifications": "file:../../dist/packages/local-notifications",

apps/demo-angular/src/app-routing.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const routes: Routes = [
1515
{ path: 'biometrics', loadChildren: () => import('./plugin-demos/biometrics.module').then(m => m.BiometricsModule) },
1616
{ path: 'brightness', loadChildren: () => import('./plugin-demos/brightness.module').then(m => m.BrightnessModule) },
1717
{ path: 'camera', loadChildren: () => import('./plugin-demos/camera.module').then(m => m.CameraModule) },
18+
{ path: 'contacts', loadChildren: () => import('./plugin-demos/contacts.module').then(m => m.ContactsModule) },
1819
{ path: 'datetimepicker', loadChildren: () => import('./plugin-demos/datetimepicker.module').then(m => m.DatetimepickerModule) },
1920
{ path: 'debug-android', loadChildren: () => import('./plugin-demos/debug-android.module').then(m => m.DebugAndroidModule) },
2021
{ path: 'debug-ios', loadChildren: () => import('./plugin-demos/debug-ios.module').then(m => m.DebugIosModule) },
@@ -24,6 +25,7 @@ const routes: Routes = [
2425
{ path: 'facebook', loadChildren: () => import('./plugin-demos/facebook.module').then(m => m.FacebookModule) },
2526
{ path: 'fingerprint-auth', loadChildren: () => import('./plugin-demos/fingerprint-auth.module').then(m => m.FingerprintAuthModule) },
2627
{ path: 'geolocation', loadChildren: () => import('./plugin-demos/geolocation.module').then(m => m.GeolocationModule) },
28+
{ path: 'google-maps', loadChildren: () => import('./plugin-demos/google-maps.module').then(m => m.GoogleMapsModule) },
2729
{ path: 'google-signin', loadChildren: () => import('./plugin-demos/google-signin.module').then(m => m.GoogleSigninModule) },
2830
{ path: 'imagepicker', loadChildren: () => import('./plugin-demos/imagepicker.module').then(m => m.ImagepickerModule) },
2931
{ path: 'ionic-portals', loadChildren: () => import('./plugin-demos/ionic-portals.module').then(m => m.IonicPortalsModule) },

apps/demo-angular/src/home.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ export class HomeComponent {
3030
{
3131
name: 'camera'
3232
},
33+
{
34+
name: 'contacts'
35+
},
3336
{
3437
name: 'datetimepicker'
3538
},
@@ -57,6 +60,9 @@ export class HomeComponent {
5760
{
5861
name: 'geolocation'
5962
},
63+
{
64+
name: 'google-maps'
65+
},
6066
{
6167
name: 'google-signin'
6268
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="contacts" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test contacts" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedContacts } from '@demo/shared';
3+
import { } from '@nativescript/contacts';
4+
5+
@Component({
6+
selector: 'demo-contacts',
7+
templateUrl: 'contacts.component.html',
8+
})
9+
export class ContactsComponent {
10+
11+
demoShared: DemoSharedContacts;
12+
13+
constructor(private _ngZone: NgZone) {}
14+
15+
ngOnInit() {
16+
this.demoShared = new DemoSharedContacts();
17+
}
18+
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { ContactsComponent } from './contacts.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: ContactsComponent }])],
7+
declarations: [ContactsComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class ContactsModule {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="google-maps" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test google-maps" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedGoogleMaps } from '@demo/shared';
3+
import { } from '@nativescript/google-maps';
4+
5+
@Component({
6+
selector: 'demo-google-maps',
7+
templateUrl: 'google-maps.component.html',
8+
})
9+
export class GoogleMapsComponent {
10+
11+
demoShared: DemoSharedGoogleMaps;
12+
13+
constructor(private _ngZone: NgZone) {}
14+
15+
ngOnInit() {
16+
this.demoShared = new DemoSharedGoogleMaps();
17+
}
18+
19+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { GoogleMapsComponent } from './google-maps.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: GoogleMapsComponent }])],
7+
declarations: [GoogleMapsComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class GoogleMapsModule {}

apps/demo/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"repository": "<fill-your-repository-here>",
66
"dependencies": {
77
"@nativescript/core": "file:../../node_modules/@nativescript/core",
8-
"@nativescript/ionic-portals": "file:../../packages/ionic-portals",
8+
"@nativescript/contacts": "file:../../packages/contacts",
99
"@nativescript/animated-circle": "file:../../packages/animated-circle",
1010
"@nativescript/appavailability": "file:../../packages/appavailability",
1111
"@nativescript/apple-sign-in": "file:../../packages/apple-sign-in",
@@ -23,8 +23,10 @@
2323
"@nativescript/facebook": "file:../../packages/facebook",
2424
"@nativescript/fingerprint-auth": "file:../../packages/fingerprint-auth",
2525
"@nativescript/geolocation": "file:../../packages/geolocation",
26+
"@nativescript/google-maps": "file:../../packages/google-maps",
2627
"@nativescript/google-signin": "file:../../packages/google-signin",
2728
"@nativescript/imagepicker": "file:../../packages/imagepicker",
29+
"@nativescript/ionic-portals": "file:../../packages/ionic-portals",
2830
"@nativescript/ios-security": "file:../../packages/ios-security",
2931
"@nativescript/iqkeyboardmanager": "file:../../packages/iqkeyboardmanager",
3032
"@nativescript/local-notifications": "file:../../packages/local-notifications",

apps/demo/src/app.scss

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
11
@import 'nativescript-theme-core/scss/light';
2-
@import 'nativescript-theme-core/scss/index';
2+
@import 'nativescript-theme-core/scss/index';
3+
4+
Button {
5+
text-transform: none;
6+
height: 54;
7+
android-elevation: 0;
8+
android-dynamic-elevation-offset: 0;
9+
padding: 0;
10+
margin: 0;
11+
12+
&.btn {
13+
padding: 0;
14+
margin: 2 0 2 0;
15+
16+
&.btn-primary {
17+
background-color: rgb(95, 185, 249);
18+
}
19+
}
20+
}
21+
TextField {
22+
border-bottom-width: 1;
23+
border-bottom-color: transparent;
24+
font-size: 17;
25+
placeholder-color: rgb(201, 201, 201);
26+
padding-top: 0;
27+
padding-bottom: 0;
28+
margin-top: 0;
29+
margin-bottom: 0;
30+
height: 29;
31+
}

apps/demo/src/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Application } from '@nativescript/core';
2+
// uncomment to test facebook login
23
// import { LoginManager } from '@nativescript/facebook';
34
// LoginManager.init();
45

apps/demo/src/main-page.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Button text="biometrics" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
1414
<Button text="brightness" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
1515
<Button text="camera" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
16+
<Button text="contacts" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
1617
<Button text="datetimepicker" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
1718
<Button text="debug-android" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
1819
<Button text="debug-ios" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
@@ -22,6 +23,7 @@
2223
<Button text="facebook" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2324
<Button text="fingerprint-auth" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2425
<Button text="geolocation" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
26+
<Button text="google-maps" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2527
<Button text="google-signin" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2628
<Button text="imagepicker" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2729
<Button text="ionic-portals" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Observable, EventData, Page } from '@nativescript/core';
2+
import { DemoSharedContacts } from '@demo/shared';
3+
import { } from '@nativescript/contacts';
4+
5+
export function navigatingTo(args: EventData) {
6+
const page = <Page>args.object;
7+
page.bindingContext = new DemoModel();
8+
}
9+
10+
export class DemoModel extends DemoSharedContacts {
11+
12+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
2+
<Page.actionBar>
3+
<ActionBar title="@nativescript/contacts" icon="" class="action-bar">
4+
</ActionBar>
5+
</Page.actionBar>
6+
<GridLayout class="p-20" rows="*,*">
7+
<ScrollView row="0" class="h-full">
8+
<StackLayout>
9+
<Button text="Contacts.getContact" tap="{{ getContact }}" class="btn btn-primary"/>
10+
<TextField hint="Paste contact id here to fetch below..." textChange="{{ contactIdChange }}" padding="5" />
11+
<Button text="Contacts.getContactById" tap="{{ getContactById }}" class="btn btn-primary"/>
12+
<TextField hint="Type contact name to find..." textChange="{{ contactNameChange }}" ios:padding="5" />
13+
<Button text="Contacts.getContactsByName" tap="{{ getContactsByName }}" class="btn btn-primary"/>
14+
<Button text="Contacts.getAllContacts" tap="{{ getAllContacts }}" class="btn btn-primary"/>
15+
</StackLayout>
16+
</ScrollView>
17+
<TextView row="1" text="{{ result }}" editable="true" padding="10" borderWidth="1" borderRadius="4" borderColor="#ccc" fontSize="12" />
18+
19+
</GridLayout>
20+
</Page>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Observable, EventData, Page } from '@nativescript/core';
2+
import { DemoSharedGoogleMaps } from '@demo/shared';
3+
import { } from '@nativescript/google-maps';
4+
5+
export function navigatingTo(args: EventData) {
6+
const page = <Page>args.object;
7+
page.bindingContext = new DemoModel();
8+
}
9+
10+
export class DemoModel extends DemoSharedGoogleMaps {
11+
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
2+
<Page.actionBar>
3+
<ActionBar title="google-maps" icon="" class="action-bar">
4+
</ActionBar>
5+
</Page.actionBar>
6+
<StackLayout class="p-20">
7+
<ScrollView class="h-full">
8+
<StackLayout>
9+
<Button text="Test google-maps" tap="{{ testIt }}" class="btn btn-primary"/>
10+
11+
</StackLayout>
12+
</ScrollView>
13+
</StackLayout>
14+
</Page>

nx.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@
110110
"apple-sign-in": {
111111
"tags": []
112112
},
113+
"google-maps": {
114+
"tags": []
115+
},
116+
"contacts": {
117+
"tags": []
118+
},
113119
"ionic-portals": {
114120
"tags": []
115121
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@types/sprintf-js": "^1.1.0",
3636
"husky": "^5.1.3",
3737
"mkdirp": "^1.0.4",
38+
"nativescript-permissions": "^1.3.12",
3839
"nativescript-vue": "~2.9.0",
3940
"nativescript-vue-template-compiler": "~2.9.0",
4041
"ng-packagr": "^12.0.0",
@@ -46,7 +47,7 @@
4647
"zone.js": "~0.11.1"
4748
},
4849
"lint-staged": {
49-
"**/*.{js,ts,scss,json,html}": [
50+
"**/*.{js,ts,scss,json,html,xml}": [
5051
"npx prettier --write"
5152
]
5253
}

packages/apple-sign-in/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/apple-sign-in",
3-
"version": "1.0.0",
4-
"description": "Add a plugin description",
3+
"version": "1.0.0-alpha.0",
4+
"description": "Sign In With Apple",
55
"main": "index",
66
"typings": "index.d.ts",
77
"nativescript": {

0 commit comments

Comments
 (0)