Skip to content

feat: Branch.io #160

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [@nstudio/nativescript-aptabase](packages/nativescript-aptabase/README.md)
- [@nstudio/nativescript-barcodescanner](packages/nativescript-barcodescanner/README.md)
- [@nstudio/nativescript-blur](packages/nativescript-blur/README.md)
- [@nstudio/nativescript-branch](packages/nativescript-branch/README.md)
- [@nstudio/nativescript-camera-plus](packages/nativescript-camera-plus/README.md)
- [@nstudio/nativescript-cardview](packages/nativescript-cardview/README.md)
- [@nstudio/nativescript-carousel](packages/nativescript-carousel/README.md)
Expand Down
3 changes: 2 additions & 1 deletion apps/demo-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"@nstudio/nativescript-qr": "file:../../dist/packages/nativescript-qr",
"@nstudio/nativescript-tracking-transparency": "file:../../dist/packages/nativescript-tracking-transparency",
"@nstudio/nativescript-walletconnect": "file:../../dist/packages/nativescript-walletconnect",
"@nstudio/nativescript-web-server": "file:../../dist/packages/nativescript-web-server"
"@nstudio/nativescript-web-server": "file:../../dist/packages/nativescript-web-server",
"@nstudio/nativescript-branch": "file:../../dist/packages/nativescript-branch"
},
"devDependencies": {
"@nativescript/android": "~8.9.0",
Expand Down
61 changes: 31 additions & 30 deletions apps/demo-angular/src/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,37 @@ import { NativeScriptRouterModule } from '@nativescript/angular';
import { HomeComponent } from './home.component';

const routes: Routes = [
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'nativescript-airship', loadChildren: () => import('./plugin-demos/nativescript-airship.module').then(m => m.NativescriptAirshipModule) },
{ path: 'nativescript-airship-adm', loadChildren: () => import('./plugin-demos/nativescript-airship-adm.module').then(m => m.NativescriptAirshipAdmModule) },
{ path: 'nativescript-airship-fcm', loadChildren: () => import('./plugin-demos/nativescript-airship-fcm.module').then(m => m.NativescriptAirshipFcmModule) },
{ path: 'nativescript-airship-hms', loadChildren: () => import('./plugin-demos/nativescript-airship-hms.module').then(m => m.NativescriptAirshipHmsModule) },
{ path: 'nativescript-appcues', loadChildren: () => import('./plugin-demos/nativescript-appcues.module').then(m => m.NativescriptAppcuesModule) },
{ path: 'nativescript-aptabase', loadChildren: () => import('./plugin-demos/nativescript-aptabase.module').then(m => m.NativescriptAptabaseModule) },
{ path: 'nativescript-barcodescanner', loadChildren: () => import('./plugin-demos/nativescript-barcodescanner.module').then(m => m.NativescriptBarcodescannerModule) },
{ path: 'nativescript-blur', loadChildren: () => import('./plugin-demos/nativescript-blur.module').then(m => m.NativescriptBlurModule) },
{ path: 'nativescript-camera-plus', loadChildren: () => import('./plugin-demos/nativescript-camera-plus.module').then(m => m.NativescriptCameraPlusModule) },
{ path: 'nativescript-cardview', loadChildren: () => import('./plugin-demos/nativescript-cardview.module').then(m => m.NativescriptCardviewModule) },
{ path: 'nativescript-carousel', loadChildren: () => import('./plugin-demos/nativescript-carousel.module').then(m => m.NativescriptCarouselModule) },
{ path: 'nativescript-checkbox', loadChildren: () => import('./plugin-demos/nativescript-checkbox.module').then(m => m.NativescriptCheckboxModule) },
{ path: 'nativescript-dynatrace', loadChildren: () => import('./plugin-demos/nativescript-dynatrace.module').then(m => m.NativescriptDynatraceModule) },
{ path: 'nativescript-embrace', loadChildren: () => import('./plugin-demos/nativescript-embrace.module').then(m => m.NativescriptEmbraceModule) },
{ path: 'nativescript-exoplayer', loadChildren: () => import('./plugin-demos/nativescript-exoplayer.module').then(m => m.NativescriptExoplayerModule) },
{ path: 'nativescript-fancyalert', loadChildren: () => import('./plugin-demos/nativescript-fancyalert.module').then(m => m.NativescriptFancyalertModule) },
{ path: 'nativescript-filterable-listpicker', loadChildren: () => import('./plugin-demos/nativescript-filterable-listpicker.module').then(m => m.NativescriptFilterableListpickerModule) },
{ path: 'nativescript-freshchat', loadChildren: () => import('./plugin-demos/nativescript-freshchat.module').then(m => m.NativescriptFreshchatModule) },
{ path: 'nativescript-input-mask', loadChildren: () => import('./plugin-demos/nativescript-input-mask.module').then(m => m.NativescriptInputMaskModule) },
{ path: 'nativescript-intercom', loadChildren: () => import('./plugin-demos/nativescript-intercom.module').then(m => m.NativescriptIntercomModule) },
{ path: 'nativescript-loading-indicator', loadChildren: () => import('./plugin-demos/nativescript-loading-indicator.module').then(m => m.NativescriptLoadingIndicatorModule) },
{ path: 'nativescript-onfido', loadChildren: () => import('./plugin-demos/nativescript-onfido.module').then(m => m.NativescriptOnfidoModule) },
{ path: 'nativescript-persona', loadChildren: () => import('./plugin-demos/nativescript-persona.module').then(m => m.NativescriptPersonaModule) },
{ path: 'nativescript-plaid', loadChildren: () => import('./plugin-demos/nativescript-plaid.module').then(m => m.NativescriptPlaidModule) },
{ path: 'nativescript-qr', loadChildren: () => import('./plugin-demos/nativescript-qr.module').then(m => m.NativescriptQrModule) },
{ path: 'nativescript-tracking-transparency', loadChildren: () => import('./plugin-demos/nativescript-tracking-transparency.module').then(m => m.NativescriptTrackingTransparencyModule) },
{ path: 'nativescript-walletconnect', loadChildren: () => import('./plugin-demos/nativescript-walletconnect.module').then(m => m.NativescriptWalletconnectModule) },
{ path: 'nativescript-web-server', loadChildren: () => import('./plugin-demos/nativescript-web-server.module').then(m => m.NativescriptWebServerModule) }
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'nativescript-airship', loadChildren: () => import('./plugin-demos/nativescript-airship.module').then((m) => m.NativescriptAirshipModule) },
{ path: 'nativescript-airship-adm', loadChildren: () => import('./plugin-demos/nativescript-airship-adm.module').then((m) => m.NativescriptAirshipAdmModule) },
{ path: 'nativescript-airship-fcm', loadChildren: () => import('./plugin-demos/nativescript-airship-fcm.module').then((m) => m.NativescriptAirshipFcmModule) },
{ path: 'nativescript-airship-hms', loadChildren: () => import('./plugin-demos/nativescript-airship-hms.module').then((m) => m.NativescriptAirshipHmsModule) },
{ path: 'nativescript-appcues', loadChildren: () => import('./plugin-demos/nativescript-appcues.module').then((m) => m.NativescriptAppcuesModule) },
{ path: 'nativescript-aptabase', loadChildren: () => import('./plugin-demos/nativescript-aptabase.module').then((m) => m.NativescriptAptabaseModule) },
{ path: 'nativescript-barcodescanner', loadChildren: () => import('./plugin-demos/nativescript-barcodescanner.module').then((m) => m.NativescriptBarcodescannerModule) },
{ path: 'nativescript-blur', loadChildren: () => import('./plugin-demos/nativescript-blur.module').then((m) => m.NativescriptBlurModule) },
{ path: 'nativescript-branch', loadChildren: () => import('./plugin-demos/nativescript-branch.module').then((m) => m.NativescriptBranchModule) },
{ path: 'nativescript-camera-plus', loadChildren: () => import('./plugin-demos/nativescript-camera-plus.module').then((m) => m.NativescriptCameraPlusModule) },
{ path: 'nativescript-cardview', loadChildren: () => import('./plugin-demos/nativescript-cardview.module').then((m) => m.NativescriptCardviewModule) },
{ path: 'nativescript-carousel', loadChildren: () => import('./plugin-demos/nativescript-carousel.module').then((m) => m.NativescriptCarouselModule) },
{ path: 'nativescript-checkbox', loadChildren: () => import('./plugin-demos/nativescript-checkbox.module').then((m) => m.NativescriptCheckboxModule) },
{ path: 'nativescript-dynatrace', loadChildren: () => import('./plugin-demos/nativescript-dynatrace.module').then((m) => m.NativescriptDynatraceModule) },
{ path: 'nativescript-embrace', loadChildren: () => import('./plugin-demos/nativescript-embrace.module').then((m) => m.NativescriptEmbraceModule) },
{ path: 'nativescript-exoplayer', loadChildren: () => import('./plugin-demos/nativescript-exoplayer.module').then((m) => m.NativescriptExoplayerModule) },
{ path: 'nativescript-fancyalert', loadChildren: () => import('./plugin-demos/nativescript-fancyalert.module').then((m) => m.NativescriptFancyalertModule) },
{ path: 'nativescript-filterable-listpicker', loadChildren: () => import('./plugin-demos/nativescript-filterable-listpicker.module').then((m) => m.NativescriptFilterableListpickerModule) },
{ path: 'nativescript-freshchat', loadChildren: () => import('./plugin-demos/nativescript-freshchat.module').then((m) => m.NativescriptFreshchatModule) },
{ path: 'nativescript-input-mask', loadChildren: () => import('./plugin-demos/nativescript-input-mask.module').then((m) => m.NativescriptInputMaskModule) },
{ path: 'nativescript-intercom', loadChildren: () => import('./plugin-demos/nativescript-intercom.module').then((m) => m.NativescriptIntercomModule) },
{ path: 'nativescript-loading-indicator', loadChildren: () => import('./plugin-demos/nativescript-loading-indicator.module').then((m) => m.NativescriptLoadingIndicatorModule) },
{ path: 'nativescript-onfido', loadChildren: () => import('./plugin-demos/nativescript-onfido.module').then((m) => m.NativescriptOnfidoModule) },
{ path: 'nativescript-persona', loadChildren: () => import('./plugin-demos/nativescript-persona.module').then((m) => m.NativescriptPersonaModule) },
{ path: 'nativescript-plaid', loadChildren: () => import('./plugin-demos/nativescript-plaid.module').then((m) => m.NativescriptPlaidModule) },
{ path: 'nativescript-qr', loadChildren: () => import('./plugin-demos/nativescript-qr.module').then((m) => m.NativescriptQrModule) },
{ path: 'nativescript-tracking-transparency', loadChildren: () => import('./plugin-demos/nativescript-tracking-transparency.module').then((m) => m.NativescriptTrackingTransparencyModule) },
{ path: 'nativescript-walletconnect', loadChildren: () => import('./plugin-demos/nativescript-walletconnect.module').then((m) => m.NativescriptWalletconnectModule) },
{ path: 'nativescript-web-server', loadChildren: () => import('./plugin-demos/nativescript-web-server.module').then((m) => m.NativescriptWebServerModule) },
];

@NgModule({
Expand Down
175 changes: 89 additions & 86 deletions apps/demo-angular/src/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,89 +6,92 @@ import { Component } from '@angular/core';
})
export class HomeComponent {
demos = [
{
name: 'nativescript-airship'
},
{
name: 'nativescript-airship-adm'
},
{
name: 'nativescript-airship-fcm'
},
{
name: 'nativescript-airship-hms'
},
{
name: 'nativescript-appcues'
},
{
name: 'nativescript-aptabase'
},
{
name: 'nativescript-barcodescanner'
},
{
name: 'nativescript-blur'
},
{
name: 'nativescript-camera-plus'
},
{
name: 'nativescript-cardview'
},
{
name: 'nativescript-carousel'
},
{
name: 'nativescript-checkbox'
},
{
name: 'nativescript-dynatrace'
},
{
name: 'nativescript-embrace'
},
{
name: 'nativescript-exoplayer'
},
{
name: 'nativescript-fancyalert'
},
{
name: 'nativescript-filterable-listpicker'
},
{
name: 'nativescript-freshchat'
},
{
name: 'nativescript-input-mask'
},
{
name: 'nativescript-intercom'
},
{
name: 'nativescript-loading-indicator'
},
{
name: 'nativescript-onfido'
},
{
name: 'nativescript-persona'
},
{
name: 'nativescript-plaid'
},
{
name: 'nativescript-qr'
},
{
name: 'nativescript-tracking-transparency'
},
{
name: 'nativescript-walletconnect'
},
{
name: 'nativescript-web-server'
}
];
}
{
name: 'nativescript-airship',
},
{
name: 'nativescript-airship-adm',
},
{
name: 'nativescript-airship-fcm',
},
{
name: 'nativescript-airship-hms',
},
{
name: 'nativescript-appcues',
},
{
name: 'nativescript-aptabase',
},
{
name: 'nativescript-barcodescanner',
},
{
name: 'nativescript-blur',
},
{
name: 'nativescript-branch',
},
{
name: 'nativescript-camera-plus',
},
{
name: 'nativescript-cardview',
},
{
name: 'nativescript-carousel',
},
{
name: 'nativescript-checkbox',
},
{
name: 'nativescript-dynatrace',
},
{
name: 'nativescript-embrace',
},
{
name: 'nativescript-exoplayer',
},
{
name: 'nativescript-fancyalert',
},
{
name: 'nativescript-filterable-listpicker',
},
{
name: 'nativescript-freshchat',
},
{
name: 'nativescript-input-mask',
},
{
name: 'nativescript-intercom',
},
{
name: 'nativescript-loading-indicator',
},
{
name: 'nativescript-onfido',
},
{
name: 'nativescript-persona',
},
{
name: 'nativescript-plaid',
},
{
name: 'nativescript-qr',
},
{
name: 'nativescript-tracking-transparency',
},
{
name: 'nativescript-walletconnect',
},
{
name: 'nativescript-web-server',
},
];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ActionBar title="nativescript-branch" class="action-bar"> </ActionBar>
<StackLayout class="p-20">
<ScrollView class="h-full">
<StackLayout>
<Button text="Test nativescript-branch" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
</StackLayout>
</ScrollView>
</StackLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Component, NgZone } from '@angular/core';
import { DemoSharedNativescriptBranch } from '@demo/shared';
import {} from '@nstudio/nativescript-branch';

@Component({
selector: 'demo-nativescript-branch',
templateUrl: 'nativescript-branch.component.html',
})
export class NativescriptBranchComponent {
demoShared: DemoSharedNativescriptBranch;

constructor(private _ngZone: NgZone) {}

ngOnInit() {
this.demoShared = new DemoSharedNativescriptBranch();
}
}
10 changes: 10 additions & 0 deletions apps/demo-angular/src/plugin-demos/nativescript-branch.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
import { NativescriptBranchComponent } from './nativescript-branch.component';

@NgModule({
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptBranchComponent }])],
declarations: [NativescriptBranchComponent],
schemas: [NO_ERRORS_SCHEMA],
})
export class NativescriptBranchModule {}
3 changes: 2 additions & 1 deletion apps/demo-angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"@nstudio/nativescript-freshchat": ["../../packages/nativescript-freshchat/index.d.ts"],
"@nstudio/nativescript-persona": ["../../packages/nativescript-persona/index.d.ts"],
"@nstudio/nativescript-walletconnect": ["../../packages/nativescript-walletconnect/index.d.ts"],
"@nstudio/nativescript-web-server": ["../../packages/nativescript-web-server/index.d.ts"]
"@nstudio/nativescript-web-server": ["../../packages/nativescript-web-server/index.d.ts"],
"@nstudio/nativescript-branch": ["../../packages/nativescript-branch/index.d.ts"]
}
},
"files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"],
Expand Down
7 changes: 4 additions & 3 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@nstudio/nativescript-cardview": "file:../../packages/nativescript-cardview",
"@nstudio/nativescript-carousel": "file:../../packages/nativescript-carousel",
"@nstudio/nativescript-checkbox": "file:../../packages/nativescript-checkbox",
"@nstudio/nativescript-dynatrace": "file:../../packages/nativescript-dynatrace",
"@nstudio/nativescript-embrace": "file:../../packages/nativescript-embrace",
"@nstudio/nativescript-dynatrace": "file:../../dist/packages/nativescript-dynatrace",
"@nstudio/nativescript-embrace": "file:../../dist/packages/nativescript-embrace",
"@nstudio/nativescript-exoplayer": "file:../../packages/nativescript-exoplayer",
"@nstudio/nativescript-fancyalert": "file:../../packages/nativescript-fancyalert",
"@nstudio/nativescript-filterable-listpicker": "file:../../packages/nativescript-filterable-listpicker",
Expand All @@ -30,7 +30,8 @@
"@nstudio/nativescript-qr": "file:../../packages/nativescript-qr",
"@nstudio/nativescript-tracking-transparency": "file:../../packages/nativescript-tracking-transparency",
"@nstudio/nativescript-walletconnect": "file:../../packages/nativescript-walletconnect",
"@nstudio/nativescript-web-server": "file:../../packages/nativescript-web-server"
"@nstudio/nativescript-web-server": "file:../../packages/nativescript-web-server",
"@nstudio/nativescript-branch": "file:../../packages/nativescript-branch"
},
"devDependencies": {
"@nativescript/android": "~8.9.0",
Expand Down
1 change: 1 addition & 0 deletions apps/demo/src/main-page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<Button text="nativescript-tracking-transparency" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
<Button text="nativescript-walletconnect" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
<Button text="nativescript-web-server" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
<Button text="nativescript-branch" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
</StackLayout>
</ScrollView>
</StackLayout>
Expand Down
10 changes: 10 additions & 0 deletions apps/demo/src/plugin-demos/nativescript-branch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Observable, EventData, Page } from '@nativescript/core';
import { DemoSharedNativescriptBranch } from '@demo/shared';
import {} from '@nstudio/nativescript-branch';

export function navigatingTo(args: EventData) {
const page = <Page>args.object;
page.bindingContext = new DemoModel();
}

export class DemoModel extends DemoSharedNativescriptBranch {}
14 changes: 14 additions & 0 deletions apps/demo/src/plugin-demos/nativescript-branch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
<Page.actionBar>
<ActionBar title="nativescript-branch" icon="" class="action-bar">
</ActionBar>
</Page.actionBar>
<StackLayout class="p-20">
<ScrollView class="h-full">
<StackLayout>
<Button text="Test nativescript-branch" tap="{{ testIt }}" class="btn btn-primary"/>

</StackLayout>
</ScrollView>
</StackLayout>
</Page>
3 changes: 2 additions & 1 deletion apps/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"@nstudio/nativescript-freshchat": ["../../packages/nativescript-freshchat/index.d.ts"],
"@nstudio/nativescript-persona": ["../../packages/nativescript-persona/index.d.ts"],
"@nstudio/nativescript-walletconnect": ["../../packages/nativescript-walletconnect/index.d.ts"],
"@nstudio/nativescript-web-server": ["../../packages/nativescript-web-server/index.d.ts"]
"@nstudio/nativescript-web-server": ["../../packages/nativescript-web-server/index.d.ts"],
"@nstudio/nativescript-branch": ["../../packages/nativescript-branch/index.d.ts"]
}
}
}
18 changes: 18 additions & 0 deletions packages/nativescript-branch/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "node_modules/**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
Loading