Skip to content

Commit 602c9a6

Browse files
authored
feat: @nstudio/nativescript-cardview (#116)
1 parent 1ca0af0 commit 602c9a6

34 files changed

+1419
-290
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [@nstudio/nativescript-barcodescanner](packages/nativescript-barcodescanner/README.md)
66
- [@nstudio/nativescript-blur](packages/nativescript-blur/README.md)
77
- [@nstudio/nativescript-camera-plus](packages/nativescript-camera-plus/README.md)
8+
- [@nstudio/nativescript-cardview](packages/nativescript-cardview/README.md)
89
- [@nstudio/nativescript-carousel](packages/nativescript-carousel/README.md)
910
- [@nstudio/nativescript-checkbox](packages/nativescript-checkbox/README.md)
1011
- [@nstudio/nativescript-dynatrace](packages/nativescript-dynatrace/README.md)

apps/demo-angular/package.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
{
2-
"main": "./src/main.ts",
3-
"dependencies": {
4-
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5-
"@nstudio/nativescript-freshchat": "file:../../dist/packages/nativescript-freshchat",
6-
"@nstudio/nativescript-airship": "file:../../dist/packages/nativescript-airship",
7-
"@nstudio/nativescript-airship-adm": "file:../../dist/packages/nativescript-airship-adm",
8-
"@nstudio/nativescript-airship-fcm": "file:../../dist/packages/nativescript-airship-fcm",
9-
"@nstudio/nativescript-airship-hms": "file:../../dist/packages/nativescript-airship-hms",
10-
"@nstudio/nativescript-barcodescanner": "file:../../dist/packages/nativescript-barcodescanner",
11-
"@nstudio/nativescript-blur": "file:../../dist/packages/nativescript-blur",
12-
"@nstudio/nativescript-camera-plus": "file:../../dist/packages/nativescript-camera-plus",
13-
"@nstudio/nativescript-carousel": "file:../../dist/packages/nativescript-carousel",
14-
"@nstudio/nativescript-checkbox": "file:../../dist/packages/nativescript-checkbox",
15-
"@nstudio/nativescript-dynatrace": "file:../../dist/packages/nativescript-dynatrace",
16-
"@nstudio/nativescript-embrace": "file:../../dist/packages/nativescript-embrace",
17-
"@nstudio/nativescript-exoplayer": "file:../../dist/packages/nativescript-exoplayer",
18-
"@nstudio/nativescript-fancyalert": "file:../../dist/packages/nativescript-fancyalert",
19-
"@nstudio/nativescript-filterable-listpicker": "file:../../dist/packages/nativescript-filterable-listpicker",
20-
"@nstudio/nativescript-input-mask": "file:../../dist/packages/nativescript-input-mask",
21-
"@nstudio/nativescript-intercom": "file:../../dist/packages/nativescript-intercom",
22-
"@nstudio/nativescript-loading-indicator": "file:../../dist/packages/nativescript-loading-indicator",
23-
"@nstudio/nativescript-onfido": "file:../../dist/packages/nativescript-onfido",
24-
"@nstudio/nativescript-persona": "file:../../dist/packages/nativescript-persona",
25-
"@nstudio/nativescript-plaid": "file:../../dist/packages/nativescript-plaid",
26-
"@nstudio/nativescript-qr": "file:../../dist/packages/nativescript-qr",
27-
"@nstudio/nativescript-tracking-transparency": "file:../../dist/packages/nativescript-tracking-transparency",
28-
"@nstudio/nativescript-walletconnect": "file:../../dist/packages/nativescript-walletconnect"
29-
},
30-
"devDependencies": {
31-
"@nativescript/android": "~8.4.0",
32-
"@nativescript/ios": "~8.4.0"
33-
}
2+
"main": "./src/main.ts",
3+
"dependencies": {
4+
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5+
"@nstudio/nativescript-cardview": "file:../../dist/packages/nativescript-cardview",
6+
"@nstudio/nativescript-airship": "file:../../dist/packages/nativescript-airship",
7+
"@nstudio/nativescript-airship-adm": "file:../../dist/packages/nativescript-airship-adm",
8+
"@nstudio/nativescript-airship-fcm": "file:../../dist/packages/nativescript-airship-fcm",
9+
"@nstudio/nativescript-airship-hms": "file:../../dist/packages/nativescript-airship-hms",
10+
"@nstudio/nativescript-barcodescanner": "file:../../dist/packages/nativescript-barcodescanner",
11+
"@nstudio/nativescript-blur": "file:../../dist/packages/nativescript-blur",
12+
"@nstudio/nativescript-camera-plus": "file:../../dist/packages/nativescript-camera-plus",
13+
"@nstudio/nativescript-carousel": "file:../../dist/packages/nativescript-carousel",
14+
"@nstudio/nativescript-checkbox": "file:../../dist/packages/nativescript-checkbox",
15+
"@nstudio/nativescript-dynatrace": "file:../../dist/packages/nativescript-dynatrace",
16+
"@nstudio/nativescript-embrace": "file:../../dist/packages/nativescript-embrace",
17+
"@nstudio/nativescript-exoplayer": "file:../../dist/packages/nativescript-exoplayer",
18+
"@nstudio/nativescript-fancyalert": "file:../../dist/packages/nativescript-fancyalert",
19+
"@nstudio/nativescript-filterable-listpicker": "file:../../dist/packages/nativescript-filterable-listpicker",
20+
"@nstudio/nativescript-freshchat": "file:../../dist/packages/nativescript-freshchat",
21+
"@nstudio/nativescript-input-mask": "file:../../dist/packages/nativescript-input-mask",
22+
"@nstudio/nativescript-intercom": "file:../../dist/packages/nativescript-intercom",
23+
"@nstudio/nativescript-loading-indicator": "file:../../dist/packages/nativescript-loading-indicator",
24+
"@nstudio/nativescript-onfido": "file:../../dist/packages/nativescript-onfido",
25+
"@nstudio/nativescript-persona": "file:../../dist/packages/nativescript-persona",
26+
"@nstudio/nativescript-plaid": "file:../../dist/packages/nativescript-plaid",
27+
"@nstudio/nativescript-qr": "file:../../dist/packages/nativescript-qr",
28+
"@nstudio/nativescript-tracking-transparency": "file:../../dist/packages/nativescript-tracking-transparency",
29+
"@nstudio/nativescript-walletconnect": "file:../../dist/packages/nativescript-walletconnect"
30+
},
31+
"devDependencies": {
32+
"@nativescript/android": "~8.4.0",
33+
"@nativescript/ios": "~8.4.0"
34+
}
3435
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ const routes: Routes = [
1313
{ path: 'nativescript-barcodescanner', loadChildren: () => import('./plugin-demos/nativescript-barcodescanner.module').then(m => m.NativescriptBarcodescannerModule) },
1414
{ path: 'nativescript-blur', loadChildren: () => import('./plugin-demos/nativescript-blur.module').then(m => m.NativescriptBlurModule) },
1515
{ path: 'nativescript-camera-plus', loadChildren: () => import('./plugin-demos/nativescript-camera-plus.module').then(m => m.NativescriptCameraPlusModule) },
16+
{ path: 'nativescript-cardview', loadChildren: () => import('./plugin-demos/nativescript-cardview.module').then(m => m.NativescriptCardviewModule) },
1617
{ path: 'nativescript-carousel', loadChildren: () => import('./plugin-demos/nativescript-carousel.module').then(m => m.NativescriptCarouselModule) },
1718
{ path: 'nativescript-checkbox', loadChildren: () => import('./plugin-demos/nativescript-checkbox.module').then(m => m.NativescriptCheckboxModule) },
1819
{ path: 'nativescript-dynatrace', loadChildren: () => import('./plugin-demos/nativescript-dynatrace.module').then(m => m.NativescriptDynatraceModule) },
1920
{ path: 'nativescript-embrace', loadChildren: () => import('./plugin-demos/nativescript-embrace.module').then(m => m.NativescriptEmbraceModule) },
2021
{ path: 'nativescript-exoplayer', loadChildren: () => import('./plugin-demos/nativescript-exoplayer.module').then(m => m.NativescriptExoplayerModule) },
2122
{ path: 'nativescript-fancyalert', loadChildren: () => import('./plugin-demos/nativescript-fancyalert.module').then(m => m.NativescriptFancyalertModule) },
2223
{ path: 'nativescript-filterable-listpicker', loadChildren: () => import('./plugin-demos/nativescript-filterable-listpicker.module').then(m => m.NativescriptFilterableListpickerModule) },
23-
{ path: 'nativescript-freshchat', loadChildren: () => import('./plugin-demos/nativescript-freshchat.module').then(m => m.FreshChatSDKModule) },
24+
{ path: 'nativescript-freshchat', loadChildren: () => import('./plugin-demos/nativescript-freshchat.module').then(m => m.NativescriptFreshchatModule) },
2425
{ path: 'nativescript-input-mask', loadChildren: () => import('./plugin-demos/nativescript-input-mask.module').then(m => m.NativescriptInputMaskModule) },
2526
{ path: 'nativescript-intercom', loadChildren: () => import('./plugin-demos/nativescript-intercom.module').then(m => m.NativescriptIntercomModule) },
2627
{ path: 'nativescript-loading-indicator', loadChildren: () => import('./plugin-demos/nativescript-loading-indicator.module').then(m => m.NativescriptLoadingIndicatorModule) },

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

Lines changed: 77 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -6,77 +6,80 @@ import { Component } from '@angular/core';
66
})
77
export class HomeComponent {
88
demos = [
9-
{
10-
name: 'nativescript-airship',
11-
},
12-
{
13-
name: 'nativescript-airship-adm',
14-
},
15-
{
16-
name: 'nativescript-airship-fcm',
17-
},
18-
{
19-
name: 'nativescript-airship-hms',
20-
},
21-
{
22-
name: 'nativescript-barcodescanner',
23-
},
24-
{
25-
name: 'nativescript-blur',
26-
},
27-
{
28-
name: 'nativescript-camera-plus',
29-
},
30-
{
31-
name: 'nativescript-carousel',
32-
},
33-
{
34-
name: 'nativescript-checkbox',
35-
},
36-
{
37-
name: 'nativescript-dynatrace',
38-
},
39-
{
40-
name: 'nativescript-embrace',
41-
},
42-
{
43-
name: 'nativescript-exoplayer',
44-
},
45-
{
46-
name: 'nativescript-fancyalert',
47-
},
48-
{
49-
name: 'nativescript-filterable-listpicker',
50-
},
51-
{
52-
name: 'nativescript-freshchat',
53-
},
54-
{
55-
name: 'nativescript-input-mask',
56-
},
57-
{
58-
name: 'nativescript-intercom',
59-
},
60-
{
61-
name: 'nativescript-loading-indicator',
62-
},
63-
{
64-
name: 'nativescript-onfido',
65-
},
66-
{
67-
name: 'nativescript-persona',
68-
},
69-
{
70-
name: 'nativescript-plaid',
71-
},
72-
{
73-
name: 'nativescript-qr',
74-
},
75-
{
76-
name: 'nativescript-tracking-transparency',
77-
},
78-
{
79-
name: 'nativescript-walletconnect',
80-
},
81-
];
82-
}
9+
{
10+
name: 'nativescript-airship'
11+
},
12+
{
13+
name: 'nativescript-airship-adm'
14+
},
15+
{
16+
name: 'nativescript-airship-fcm'
17+
},
18+
{
19+
name: 'nativescript-airship-hms'
20+
},
21+
{
22+
name: 'nativescript-barcodescanner'
23+
},
24+
{
25+
name: 'nativescript-blur'
26+
},
27+
{
28+
name: 'nativescript-camera-plus'
29+
},
30+
{
31+
name: 'nativescript-cardview'
32+
},
33+
{
34+
name: 'nativescript-carousel'
35+
},
36+
{
37+
name: 'nativescript-checkbox'
38+
},
39+
{
40+
name: 'nativescript-dynatrace'
41+
},
42+
{
43+
name: 'nativescript-embrace'
44+
},
45+
{
46+
name: 'nativescript-exoplayer'
47+
},
48+
{
49+
name: 'nativescript-fancyalert'
50+
},
51+
{
52+
name: 'nativescript-filterable-listpicker'
53+
},
54+
{
55+
name: 'nativescript-freshchat'
56+
},
57+
{
58+
name: 'nativescript-input-mask'
59+
},
60+
{
61+
name: 'nativescript-intercom'
62+
},
63+
{
64+
name: 'nativescript-loading-indicator'
65+
},
66+
{
67+
name: 'nativescript-onfido'
68+
},
69+
{
70+
name: 'nativescript-persona'
71+
},
72+
{
73+
name: 'nativescript-plaid'
74+
},
75+
{
76+
name: 'nativescript-qr'
77+
},
78+
{
79+
name: 'nativescript-tracking-transparency'
80+
},
81+
{
82+
name: 'nativescript-walletconnect'
83+
}
84+
];
85+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="nativescript-cardview" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test nativescript-cardview" (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 { DemoSharedNativescriptCardview } from '@demo/shared';
3+
import { } from '@nstudio/nativescript-cardview';
4+
5+
@Component({
6+
selector: 'demo-nativescript-cardview',
7+
templateUrl: 'nativescript-cardview.component.html',
8+
})
9+
export class NativescriptCardviewComponent {
10+
11+
demoShared: DemoSharedNativescriptCardview;
12+
13+
constructor(private _ngZone: NgZone) {}
14+
15+
ngOnInit() {
16+
this.demoShared = new DemoSharedNativescriptCardview();
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 { NativescriptCardviewComponent } from './nativescript-cardview.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptCardviewComponent }])],
7+
declarations: [NativescriptCardviewComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class NativescriptCardviewModule {}

apps/demo-react/package.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
{
2-
"main": "./src/app.ts",
3-
"dependencies": {
4-
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5-
"@nstudio/nativescript-freshchat": "file:../../packages/nativescript-freshchat",
6-
"@nstudio/nativescript-airship": "file:../../packages/nativescript-airship",
7-
"@nstudio/nativescript-airship-adm": "file:../../packages/nativescript-airship-adm",
8-
"@nstudio/nativescript-airship-fcm": "file:../../packages/nativescript-airship-fcm",
9-
"@nstudio/nativescript-airship-hms": "file:../../packages/nativescript-airship-hms",
10-
"@nstudio/nativescript-barcodescanner": "file:../../packages/nativescript-barcodescanner",
11-
"@nstudio/nativescript-blur": "file:../../packages/nativescript-blur",
12-
"@nstudio/nativescript-camera-plus": "file:../../packages/nativescript-camera-plus",
13-
"@nstudio/nativescript-carousel": "file:../../packages/nativescript-carousel",
14-
"@nstudio/nativescript-checkbox": "file:../../packages/nativescript-checkbox",
15-
"@nstudio/nativescript-dynatrace": "file:../../packages/nativescript-dynatrace",
16-
"@nstudio/nativescript-embrace": "file:../../packages/nativescript-embrace",
17-
"@nstudio/nativescript-exoplayer": "file:../../packages/nativescript-exoplayer",
18-
"@nstudio/nativescript-fancyalert": "file:../../packages/nativescript-fancyalert",
19-
"@nstudio/nativescript-filterable-listpicker": "file:../../packages/nativescript-filterable-listpicker",
20-
"@nstudio/nativescript-input-mask": "file:../../packages/nativescript-input-mask",
21-
"@nstudio/nativescript-intercom": "file:../../packages/nativescript-intercom",
22-
"@nstudio/nativescript-loading-indicator": "file:../../packages/nativescript-loading-indicator",
23-
"@nstudio/nativescript-onfido": "file:../../packages/nativescript-onfido",
24-
"@nstudio/nativescript-persona": "file:../../packages/nativescript-persona",
25-
"@nstudio/nativescript-plaid": "file:../../packages/nativescript-plaid",
26-
"@nstudio/nativescript-qr": "file:../../packages/nativescript-qr",
27-
"@nstudio/nativescript-tracking-transparency": "file:../../packages/nativescript-tracking-transparency",
28-
"@nstudio/nativescript-walletconnect": "file:../../packages/nativescript-walletconnect"
29-
},
30-
"devDependencies": {
31-
"@nativescript/android": "~8.4.0",
32-
"@nativescript/ios": "~8.4.0"
33-
}
2+
"main": "./src/app.ts",
3+
"dependencies": {
4+
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5+
"@nstudio/nativescript-cardview": "file:../../packages/nativescript-cardview",
6+
"@nstudio/nativescript-airship": "file:../../packages/nativescript-airship",
7+
"@nstudio/nativescript-airship-adm": "file:../../packages/nativescript-airship-adm",
8+
"@nstudio/nativescript-airship-fcm": "file:../../packages/nativescript-airship-fcm",
9+
"@nstudio/nativescript-airship-hms": "file:../../packages/nativescript-airship-hms",
10+
"@nstudio/nativescript-barcodescanner": "file:../../packages/nativescript-barcodescanner",
11+
"@nstudio/nativescript-blur": "file:../../packages/nativescript-blur",
12+
"@nstudio/nativescript-camera-plus": "file:../../packages/nativescript-camera-plus",
13+
"@nstudio/nativescript-carousel": "file:../../packages/nativescript-carousel",
14+
"@nstudio/nativescript-checkbox": "file:../../packages/nativescript-checkbox",
15+
"@nstudio/nativescript-dynatrace": "file:../../packages/nativescript-dynatrace",
16+
"@nstudio/nativescript-embrace": "file:../../packages/nativescript-embrace",
17+
"@nstudio/nativescript-exoplayer": "file:../../packages/nativescript-exoplayer",
18+
"@nstudio/nativescript-fancyalert": "file:../../packages/nativescript-fancyalert",
19+
"@nstudio/nativescript-filterable-listpicker": "file:../../packages/nativescript-filterable-listpicker",
20+
"@nstudio/nativescript-freshchat": "file:../../packages/nativescript-freshchat",
21+
"@nstudio/nativescript-input-mask": "file:../../packages/nativescript-input-mask",
22+
"@nstudio/nativescript-intercom": "file:../../packages/nativescript-intercom",
23+
"@nstudio/nativescript-loading-indicator": "file:../../packages/nativescript-loading-indicator",
24+
"@nstudio/nativescript-onfido": "file:../../packages/nativescript-onfido",
25+
"@nstudio/nativescript-persona": "file:../../packages/nativescript-persona",
26+
"@nstudio/nativescript-plaid": "file:../../packages/nativescript-plaid",
27+
"@nstudio/nativescript-qr": "file:../../packages/nativescript-qr",
28+
"@nstudio/nativescript-tracking-transparency": "file:../../packages/nativescript-tracking-transparency",
29+
"@nstudio/nativescript-walletconnect": "file:../../packages/nativescript-walletconnect"
30+
},
31+
"devDependencies": {
32+
"@nativescript/android": "~8.4.0",
33+
"@nativescript/ios": "~8.4.0"
34+
}
3435
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import * as React from "react";
2+
import { Dialogs } from '@nativescript/core';
3+
import { StyleSheet } from "react-nativescript";
4+
import { DemoSharedNativescriptCardview } from '@demo/shared';
5+
import { } from '@nstudio/nativescript-cardview';
6+
7+
export function HomeScreen() {
8+
return (
9+
<flexboxLayout style={styles.container}>
10+
<button
11+
style={styles.button}
12+
onTap={() => Dialogs.alert("Test Plugin!")}
13+
>
14+
Test nativescript-cardview
15+
</button>
16+
</flexboxLayout>
17+
);
18+
}
19+
20+
const styles = StyleSheet.create({
21+
container: {
22+
height: "100%",
23+
flexDirection: "column",
24+
justifyContent: "center",
25+
},
26+
button: {
27+
fontSize: 24,
28+
color: "#2e6ddf",
29+
},
30+
});

0 commit comments

Comments
 (0)