├── .gitignore
├── .vscode
└── settings.json
├── README.md
├── app
├── .npmignore
├── App_Resources
│ ├── Android
│ │ ├── AndroidManifest.xml
│ │ ├── app.gradle
│ │ ├── drawable-hdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ ├── drawable-ldpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ ├── drawable-mdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ ├── drawable-nodpi
│ │ │ └── splash_screen.xml
│ │ ├── drawable-xhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ ├── drawable-xxhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ ├── drawable-xxxhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ └── iOS
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── icon-29.png
│ │ │ ├── icon-29@2x.png
│ │ │ ├── icon-29@3x.png
│ │ │ ├── icon-40.png
│ │ │ ├── icon-40@2x.png
│ │ │ ├── icon-40@3x.png
│ │ │ ├── icon-50.png
│ │ │ ├── icon-50@2x.png
│ │ │ ├── icon-57.png
│ │ │ ├── icon-57@2x.png
│ │ │ ├── icon-60@2x.png
│ │ │ ├── icon-60@3x.png
│ │ │ ├── icon-72.png
│ │ │ ├── icon-72@2x.png
│ │ │ ├── icon-76.png
│ │ │ ├── icon-76@2x.png
│ │ │ └── icon-83.5@2x.png
│ │ ├── Contents.json
│ │ ├── LaunchImage.launchimage
│ │ │ ├── Contents.json
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── Default-667h@2x.png
│ │ │ ├── Default-736h@3x.png
│ │ │ ├── Default-Landscape.png
│ │ │ ├── Default-Landscape@2x.png
│ │ │ ├── Default-Landscape@3x.png
│ │ │ ├── Default-Portrait.png
│ │ │ ├── Default-Portrait@2x.png
│ │ │ ├── Default.png
│ │ │ └── Default@2x.png
│ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ └── LaunchScreen-AspectFill@2x.png
│ │ └── LaunchScreen.Center.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchScreen-Center.png
│ │ │ └── LaunchScreen-Center@2x.png
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── build.xcconfig
├── app.component.html
├── app.component.ts
├── app.module.ts
├── app.routing.ts
├── app.scss
├── common
│ ├── components
│ │ ├── exit-modal
│ │ │ ├── exit-modal.component.html
│ │ │ ├── exit-modal.component.scss
│ │ │ └── exit-modal.component.ts
│ │ ├── showcase-layout
│ │ │ ├── showcase-layout.component.html
│ │ │ └── showcase-layout.component.ts
│ │ ├── side-drawer
│ │ │ ├── side-drawer.component.html
│ │ │ └── side-drawer.component.ts
│ │ └── splash-screen
│ │ │ ├── splash-screen.component.html
│ │ │ ├── splash-screen.component.scss
│ │ │ └── splash-screen.component.ts
│ └── services
│ │ └── content.service.ts
├── fonts
│ ├── AlteHaasGroteskBold.ttf
│ └── Material-Design-Iconic-Font.ttf
├── images
│ ├── chat.jpg
│ ├── poster.png
│ ├── quigon.png
│ └── yoda.png
├── main.aot.ts
├── main.ts
├── package.json
├── pages
│ ├── accelerometer
│ │ ├── accelerometer.component.ts
│ │ ├── accelerometer.html
│ │ └── accelerometer.scss
│ ├── animations
│ │ ├── animations.component.ts
│ │ ├── animations.html
│ │ └── animations.scss
│ ├── buttons
│ │ ├── buttons.component.ts
│ │ ├── buttons.html
│ │ └── buttons.scss
│ ├── camera
│ │ ├── camera.component.ts
│ │ ├── camera.html
│ │ └── camera.scss
│ ├── charts
│ │ ├── charts.component.ts
│ │ ├── charts.html
│ │ └── charts.scss
│ ├── codescanner
│ │ ├── codescanner.component.ts
│ │ ├── codescanner.html
│ │ └── codescanner.scss
│ ├── contacts
│ │ ├── contacts.component.ts
│ │ ├── contacts.html
│ │ └── contacts.scss
│ ├── database
│ │ ├── database.component.ts
│ │ ├── database.html
│ │ └── database.scss
│ ├── dialogs
│ │ ├── dialogs.component.ts
│ │ ├── dialogs.html
│ │ └── dialogs.scss
│ ├── home
│ │ ├── home.component.ts
│ │ ├── home.html
│ │ └── home.scss
│ ├── images
│ │ ├── images.component.ts
│ │ ├── images.html
│ │ └── images.scss
│ ├── indicators
│ │ ├── indicators.component.ts
│ │ ├── indicators.html
│ │ └── indicators.scss
│ ├── layouts
│ │ ├── layouts.component.ts
│ │ ├── layouts.html
│ │ └── layouts.scss
│ ├── lists
│ │ ├── lists.component.ts
│ │ ├── lists.html
│ │ └── lists.scss
│ ├── location
│ │ ├── location.component.ts
│ │ ├── location.html
│ │ └── location.scss
│ ├── login
│ │ ├── login.component.ts
│ │ ├── login.html
│ │ └── login.scss
│ ├── pickers
│ │ ├── pickers.component.ts
│ │ ├── pickers.html
│ │ └── pickers.scss
│ ├── selectors
│ │ ├── selectors.component.ts
│ │ ├── selectors.html
│ │ └── selectors.scss
│ ├── settings
│ │ ├── settings.component.ts
│ │ ├── settings.html
│ │ └── settings.scss
│ ├── signaturepad
│ │ ├── signaturepad.component.ts
│ │ ├── signaturepad.html
│ │ └── signaturepad.scss
│ ├── table
│ │ ├── table.component.ts
│ │ ├── table.html
│ │ └── table.scss
│ ├── tasks
│ │ ├── tasks.component.ts
│ │ └── tasks.html
│ ├── text
│ │ ├── text.component.ts
│ │ ├── text.html
│ │ └── text.scss
│ ├── views
│ │ ├── views.component.ts
│ │ ├── views.html
│ │ └── views.scss
│ ├── wrapper.component.html
│ └── wrapper.component.ts
├── tests
│ └── loginTest.js
└── themes
│ ├── app_var.scss
│ ├── dark_side.scss
│ ├── dark_side_var.scss
│ ├── neon.scss
│ ├── neon_var.scss
│ ├── pinky.scss
│ └── pinky_var.scss
├── e2e-tests
└── homepage-test.js
├── features
├── step_definitions
│ └── step_sample.js
├── support
│ ├── env.js
│ └── world.js
└── test1_navigation.feature
├── karma.conf.js
├── npm-shrinkwrap.json
├── package.json
├── references.d.ts
├── tsconfig.json
└── tslint.json
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | hooks
3 | built
4 | tags
5 | typings
6 | .baseDir.ts
7 | .tscache
8 | *.iml
9 | *.log
10 | *.css
11 | *.traineddata
12 |
13 | app/**/*.js
14 | app/**/*.map
15 | platforms
16 | lib
17 |
18 | !app/tests/*.js
19 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "**/*.js": {
5 | "when": "$(basename).ts"
6 | },
7 | "**/*.css": {
8 | "when": "$(basename).scss"
9 | },
10 | "**/*.js.map": true,
11 | "platforms": true,
12 | "lib": true,
13 | "node_modules": true,
14 | "hooks": true
15 | }
16 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Nativescript Showcase
2 |
3 | ## Introduction
4 | The _Nativescript Showcase_ is a native crossplatform demo app implemented in NativeScript and Angular 2.
5 |
6 |
7 | ## Plugins
8 |
9 | The showcase uses these NativesScript Plugins:
10 | * [nativescript-accelerometer](https://github.com/vakrilov/native-script-accelerometer)
11 | * [nativescript-barcodescanner](https://github.com/EddyVerbruggen/nativescript-barcodescanner)
12 | * [nativescript-drawingpad](https://github.com/bradmartin/nativescript-drawingpad)
13 | * [nativescript-geolocation](https://github.com/NativeScript/nativescript-geolocation)
14 | * [nativescript-master-technology](https://github.com/NathanaelA/nativescript-master-technology)
15 | * [nativescript-sqlite](https://github.com/NathanaelA/nativescript-sqlite)
16 | * [nativescript-telerik-ui-pro](http://www.telerik.com/nativescript-ui)
17 | * [nativescript-themes](NathanaelA/nativescript-themes)
18 |
19 | ## Development plugins
20 |
21 | The showcase uses these NativesScript dev-plugins:
22 | * [nativescript-dev-typescript](https://github.com/NativeScript/nativescript-dev-typescript)
23 | * [nativescript-dev-sass](https://github.com/toddanglin/nativescript-dev-sass)
24 | * [nativescript-dev-cucumber](https://github.com/marcbuils/nativescript-dev-cucumber)
25 |
26 |
27 | ## Content
28 |
29 | ### UI Components
30 |
31 | A set of pages showing common UI components and style variations
32 |
33 | + Buttons
34 | + Text
35 | + Lists
36 | + Pickers
37 | + Layouts
38 | + Selectors
39 | + Indicators
40 | + Images
41 | + Views
42 | + Dialogs
43 |
44 | ### Hardware
45 |
46 | + Location (Works on iOS and Android devices and iOS simulator)
47 | + Camera (Works on iOS and Android devices)
48 | + Accelerometer (Works on iOS and Android devices and Android emulator)
49 |
50 | ### Examples
51 |
52 | + __Login__: a login/registration page with email validation
53 | + __Table__: a table-like layout
54 | + __Contacts__: a contacts list with a modal showing a detail view
55 | + __CodeScanner__: a demo of the barcode scanner plugin
56 | + __Database__: a demo of the sqlite plugin
57 | + __SignaturePad__: a demo of the drawingpad plugin
58 | + __Charts__: a demo of the charts from telerik-ui plugin
59 | + __Animations__: a demo of animations
60 | + __Tasks__: a small todo list with CRUD functionalities
61 |
62 | ### Other features
63 | + App uses SASS themes
64 | + Unit tests in Karma + Jasmine: ```tns test ios``` or ```tns test android```
65 | + Functional tests in Cucumber: ```npm run cucumber-ios-simulator``` or ```npm run cucumber-android```
--------------------------------------------------------------------------------
/app/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | built
3 | tags
4 | typings
5 | .baseDir.ts
6 | .tscache
7 |
8 | app/**/*.js
9 | app/**/*.map
10 | platforms
11 | lib
12 |
13 | *.tgz
14 |
--------------------------------------------------------------------------------
/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // compile 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | android {
9 | defaultConfig {
10 | generatedDensities = []
11 | applicationId = "org.nativescript.newversiontest"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/app/App_Resources/Android/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "57x57",
35 | "idiom" : "iphone",
36 | "filename" : "icon-57.png",
37 | "scale" : "1x"
38 | },
39 | {
40 | "size" : "57x57",
41 | "idiom" : "iphone",
42 | "filename" : "icon-57@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "29x29",
59 | "idiom" : "ipad",
60 | "filename" : "icon-29.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "icon-29@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "40x40",
71 | "idiom" : "ipad",
72 | "filename" : "icon-40.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "icon-40@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "50x50",
83 | "idiom" : "ipad",
84 | "filename" : "icon-50.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "50x50",
89 | "idiom" : "ipad",
90 | "filename" : "icon-50@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "72x72",
95 | "idiom" : "ipad",
96 | "filename" : "icon-72.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "72x72",
101 | "idiom" : "ipad",
102 | "filename" : "icon-72@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "76x76",
107 | "idiom" : "ipad",
108 | "filename" : "icon-76.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "76x76",
113 | "idiom" : "ipad",
114 | "filename" : "icon-76@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "83.5x83.5",
119 | "idiom" : "ipad",
120 | "filename" : "icon-83.5@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "Default-736h@3x.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "Default-Landscape@3x.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "Default-667h@2x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "filename" : "Default@2x.png",
34 | "extent" : "full-screen",
35 | "minimum-system-version" : "7.0",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "Default-568h@2x.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "filename" : "Default-Portrait.png",
51 | "extent" : "full-screen",
52 | "minimum-system-version" : "7.0",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "filename" : "Default-Landscape.png",
59 | "extent" : "full-screen",
60 | "minimum-system-version" : "7.0",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "filename" : "Default-Portrait@2x.png",
67 | "extent" : "full-screen",
68 | "minimum-system-version" : "7.0",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "filename" : "Default-Landscape@2x.png",
75 | "extent" : "full-screen",
76 | "minimum-system-version" : "7.0",
77 | "scale" : "2x"
78 | },
79 | {
80 | "orientation" : "portrait",
81 | "idiom" : "iphone",
82 | "filename" : "Default.png",
83 | "extent" : "full-screen",
84 | "scale" : "1x"
85 | },
86 | {
87 | "orientation" : "portrait",
88 | "idiom" : "iphone",
89 | "filename" : "Default@2x.png",
90 | "extent" : "full-screen",
91 | "scale" : "2x"
92 | },
93 | {
94 | "orientation" : "portrait",
95 | "idiom" : "iphone",
96 | "filename" : "Default-568h@2x.png",
97 | "extent" : "full-screen",
98 | "subtype" : "retina4",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "extent" : "to-status-bar",
105 | "scale" : "1x"
106 | },
107 | {
108 | "orientation" : "portrait",
109 | "idiom" : "ipad",
110 | "filename" : "Default-Portrait.png",
111 | "extent" : "full-screen",
112 | "scale" : "1x"
113 | },
114 | {
115 | "orientation" : "landscape",
116 | "idiom" : "ipad",
117 | "extent" : "to-status-bar",
118 | "scale" : "1x"
119 | },
120 | {
121 | "orientation" : "landscape",
122 | "idiom" : "ipad",
123 | "filename" : "Default-Landscape.png",
124 | "extent" : "full-screen",
125 | "scale" : "1x"
126 | },
127 | {
128 | "orientation" : "portrait",
129 | "idiom" : "ipad",
130 | "extent" : "to-status-bar",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "ipad",
136 | "filename" : "Default-Portrait@2x.png",
137 | "extent" : "full-screen",
138 | "scale" : "2x"
139 | },
140 | {
141 | "orientation" : "landscape",
142 | "idiom" : "ipad",
143 | "extent" : "to-status-bar",
144 | "scale" : "2x"
145 | },
146 | {
147 | "orientation" : "landscape",
148 | "idiom" : "ipad",
149 | "filename" : "Default-Landscape@2x.png",
150 | "extent" : "full-screen",
151 | "scale" : "2x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/App_Resources/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
8 |
--------------------------------------------------------------------------------
/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 |
3 | @Component({
4 | selector: "ns-app",
5 | templateUrl: "app.component.html",
6 | })
7 | export class AppComponent { }
8 |
--------------------------------------------------------------------------------
/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module";
3 | import { NativeScriptFormsModule } from "nativescript-angular/forms";
4 | import { AppRoutingModule } from "./app.routing";
5 | import { AppComponent } from "./app.component";
6 |
7 | import { WrapperComponent } from './pages/wrapper.component';
8 | import { AccelerometerPage } from './pages/accelerometer/accelerometer.component';
9 | import { SignaturePadPage } from './pages/signaturepad/signaturepad.component';
10 | import { CodeScannerPage } from './pages/codescanner/codescanner.component';
11 | import { IndicatorsPage } from './pages/indicators/indicators.component';
12 | import { AnimationsPage } from './pages/animations/animations.component';
13 | import { SelectorsPage } from './pages/selectors/selectors.component';
14 | import { ContactsPage } from './pages/contacts/contacts.component';
15 | import { SettingsPage } from './pages/settings/settings.component';
16 | import { DatabasePage } from './pages/database/database.component';
17 | import { LocationPage } from './pages/location/location.component';
18 | import { ButtonsPage } from './pages/buttons/buttons.component';
19 | import { PickersPage } from './pages/pickers/pickers.component';
20 | import { LayoutsPage } from './pages/layouts/layouts.component';
21 | import { DialogsPage } from './pages/dialogs/dialogs.component';
22 | import { ImagesPage } from './pages/images/images.component';
23 | import { CameraPage } from './pages/camera/camera.component';
24 | import { ChartsPage } from './pages/charts/charts.component';
25 | import { ViewsPage } from './pages/views/views.component';
26 | import { LoginPage } from './pages/login/login.component';
27 | import { TablePage } from './pages/table/table.component';
28 | import { ListsPage } from './pages/lists/lists.component';
29 | import { TasksPage } from './pages/tasks/tasks.component';
30 | import { HomePage } from './pages/home/home.component';
31 | import { TextPage } from './pages/text/text.component';
32 |
33 | import { SplashScreenComponent } from './common/components/splash-screen/splash-screen.component';
34 | import { ShowcaseLayout } from './common/components/showcase-layout/showcase-layout.component';
35 | import { SideDrawerComponent } from './common/components/side-drawer/side-drawer.component';
36 | import { ExitModalComponent } from './common/components/exit-modal/exit-modal.component';
37 |
38 | import { ContentService } from './common/services/content.service';
39 |
40 | import { NativeScriptUISideDrawerModule } from "nativescript-telerik-ui-pro/sidedrawer/angular";
41 | import { NativeScriptUIChartModule } from "nativescript-telerik-ui-pro/chart/angular";
42 | import { SIDEDRAWER_DIRECTIVES } from "nativescript-telerik-ui-pro/sidedrawer/angular";
43 | import { CHART_DIRECTIVES } from 'nativescript-telerik-ui-pro/chart/angular';
44 |
45 |
46 | @NgModule({
47 | bootstrap: [
48 | AppComponent
49 | ],
50 | imports: [
51 | NativeScriptModule,
52 | AppRoutingModule,
53 | NativeScriptFormsModule
54 | ],
55 | declarations: [
56 | AppComponent,
57 | ShowcaseLayout,
58 | WrapperComponent,
59 | ExitModalComponent,
60 | SideDrawerComponent,
61 | SplashScreenComponent,
62 | SignaturePadPage,
63 | AccelerometerPage,
64 | CodeScannerPage,
65 | IndicatorsPage,
66 | AnimationsPage,
67 | SelectorsPage,
68 | ContactsPage,
69 | SettingsPage,
70 | DatabasePage,
71 | LocationPage,
72 | LocationPage,
73 | ButtonsPage,
74 | PickersPage,
75 | LayoutsPage,
76 | DialogsPage,
77 | ImagesPage,
78 | CameraPage,
79 | ChartsPage,
80 | ViewsPage,
81 | LoginPage,
82 | TablePage,
83 | ListsPage,
84 | TasksPage,
85 | HomePage,
86 | TextPage,
87 | SIDEDRAWER_DIRECTIVES,
88 | CHART_DIRECTIVES
89 | ],
90 | providers: [
91 | NativeScriptUISideDrawerModule,
92 | NativeScriptUIChartModule,
93 | ContentService
94 | ],
95 | schemas: [
96 | NO_ERRORS_SCHEMA
97 | ]
98 | })
99 | export class AppModule { }
100 |
--------------------------------------------------------------------------------
/app/app.routing.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { NativeScriptRouterModule } from "nativescript-angular/router";
3 | import { Routes } from "@angular/router";
4 |
5 | import {WrapperComponent} from './pages/wrapper.component';
6 | import {SplashScreenComponent} from './common/components/splash-screen/splash-screen.component';
7 | import {AccelerometerPage} from './pages/accelerometer/accelerometer.component';
8 | import {SignaturePadPage} from './pages/signaturepad/signaturepad.component';
9 | import {CodeScannerPage} from './pages/codescanner/codescanner.component';
10 | import {IndicatorsPage} from './pages/indicators/indicators.component';
11 | import {AnimationsPage} from './pages/animations/animations.component';
12 | import {SelectorsPage} from './pages/selectors/selectors.component';
13 | import {ContactsPage} from './pages/contacts/contacts.component';
14 | import {SettingsPage} from './pages/settings/settings.component';
15 | import {DatabasePage} from './pages/database/database.component';
16 | import {LocationPage} from './pages/location/location.component';
17 | import {ButtonsPage} from './pages/buttons/buttons.component';
18 | import {PickersPage} from './pages/pickers/pickers.component';
19 | import {LayoutsPage} from './pages/layouts/layouts.component';
20 | import {DialogsPage} from './pages/dialogs/dialogs.component';
21 | import {ImagesPage} from './pages/images/images.component';
22 | import {CameraPage} from './pages/camera/camera.component';
23 | import {ChartsPage} from './pages/charts/charts.component';
24 | import {ViewsPage} from './pages/views/views.component';
25 | import {LoginPage} from './pages/login/login.component';
26 | import {TablePage} from './pages/table/table.component';
27 | import {ListsPage} from './pages/lists/lists.component';
28 | import {TasksPage} from './pages/tasks/tasks.component';
29 | import {HomePage} from './pages/home/home.component';
30 | import {TextPage} from './pages/text/text.component';
31 |
32 | const routes: Routes = [
33 | { path: '', redirectTo: '/splash', pathMatch: 'full' },
34 | {
35 | path: 'home', component: WrapperComponent,
36 | children: [
37 | { path: 'home', component: HomePage },
38 | { path: 'buttons', component: ButtonsPage },
39 | { path: 'text', component: TextPage },
40 | { path: 'lists', component: ListsPage },
41 | { path: 'pickers', component: PickersPage },
42 | { path: 'layouts', component: LayoutsPage },
43 | { path: 'selectors', component: SelectorsPage },
44 | { path: 'indicators', component: IndicatorsPage },
45 | { path: 'images', component: ImagesPage },
46 | { path: 'views', component: ViewsPage },
47 | { path: 'dialogs', component: DialogsPage },
48 | { path: 'login', component: LoginPage },
49 | { path: 'contacts', component: ContactsPage },
50 | { path: 'table', component: TablePage },
51 | { path: 'settings', component: SettingsPage },
52 | { path: 'database', component: DatabasePage },
53 | { path: 'camera', component: CameraPage },
54 | { path: 'codescanner', component: CodeScannerPage },
55 | { path: 'signaturepad', component: SignaturePadPage },
56 | { path: 'location', component: LocationPage },
57 | { path: 'charts', component: ChartsPage },
58 | { path: 'accelerometer', component: AccelerometerPage },
59 | { path: 'animations', component: AnimationsPage },
60 | { path: 'tasks', component: TasksPage }
61 | ]
62 | },
63 | { path: 'splash', component: SplashScreenComponent }
64 | ];
65 |
66 | @NgModule({
67 | imports: [NativeScriptRouterModule.forRoot(routes)],
68 | exports: [NativeScriptRouterModule]
69 | })
70 | export class AppRoutingModule { }
--------------------------------------------------------------------------------
/app/common/components/exit-modal/exit-modal.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/common/components/exit-modal/exit-modal.component.scss:
--------------------------------------------------------------------------------
1 | @import 'themes/app_var.scss';
2 |
3 | .modal{
4 | width: 80%;
5 | height: 30%;
6 | border-radius: 20;
7 | padding: 20;
8 | }
9 |
10 | .button {
11 | height: 40;
12 | }
13 |
14 | .openModal {
15 | animation-name: openModal;
16 | animation-duration: 0.3s;
17 | animation-fill-mode: forwards;
18 | animation-timing-function: ease-in
19 | }
20 | .closeModal {
21 | animation-name: openModal;
22 | animation-duration: 0.3s;
23 | animation-fill-mode: forwards;
24 | animation-direction: reverse;
25 | animation-timing-function: ease-in;
26 | }
27 | @keyframes openModal {
28 | from{
29 | transform: scale(0,0)
30 | }
31 | to{
32 | transform: scale(1,1);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/common/components/exit-modal/exit-modal.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Output, ViewChild, ElementRef, EventEmitter, AfterViewInit, animate, trigger, state, style, transition} from '@angular/core';
2 |
3 | @Component({
4 | selector: 'exit-modal',
5 | templateUrl: 'common/components/exit-modal/exit-modal.component.html',
6 | styleUrls: ['common/components/exit-modal/exit-modal.component.css'],
7 | animations: [
8 | trigger('state', [
9 | state('inactiveModal', style({ transform: 'scale(0,0)' })),
10 | state('activeModal', style({ transform: 'scale(1,1)' })),
11 | transition('inactiveModal => activeModal', [animate('300ms ease-out')]),
12 | transition('activeModal => inactiveModal', [animate('300ms ease-out')]),
13 | state('inactiveBD', style({ opacity: '0' })),
14 | state('activeBD', style({ opacity: '.3' })),
15 | transition('inactiveBD => activeBD', [animate('300ms ease-out')]),
16 | transition('activeBD => inactiveBD', [animate('300ms ease-out')]),
17 | ])
18 | ]
19 | })
20 | export class ExitModalComponent implements AfterViewInit {
21 |
22 | @Output() close = new EventEmitter();
23 | private toggled: boolean = false;
24 |
25 | constructor() {
26 | }
27 |
28 | ngAfterViewInit() {
29 | setTimeout(() => this.toggled = true , 100);
30 | }
31 |
32 | public closeModal() {
33 | this.toggled = false;
34 | setTimeout(() => this.close.emit(false), 400);
35 |
36 | }
37 |
38 | public exitApp() {
39 | global.process.exit();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/common/components/showcase-layout/showcase-layout.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/common/components/showcase-layout/showcase-layout.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 |
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-showcase-layout',
7 | templateUrl: 'showcase-layout.component.html'
8 | })
9 | export class ShowcaseLayout {
10 | @Input() title: string;
11 | }
12 |
--------------------------------------------------------------------------------
/app/common/components/side-drawer/side-drawer.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/common/components/side-drawer/side-drawer.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter, ViewChild, ElementRef, OnInit, AfterViewInit, animate, trigger, state, style, transition} from '@angular/core';
2 | import {Router, NavigationEnd} from '@angular/router';
3 | import {RouterExtensions} from 'nativescript-angular/router';
4 | import {Page} from 'ui/page';
5 |
6 | @Component({
7 | selector: 'sc-side-drawer',
8 | templateUrl: 'common/components/side-drawer/side-drawer.component.html',
9 | animations: [
10 | trigger('state', [
11 | state('inactiveSD', style({ transform: 'translateX(0)' })),
12 | state('activeSD', style({ transform: 'translateX(130)' })),
13 | transition('inactiveSD => activeSD', [animate('200ms ease-out')]),
14 | transition('activeSD => inactiveSD', [animate('200ms ease-out')]),
15 | state('inactiveBD', style({ opacity: '0' })),
16 | state('activeBD', style({ opacity: '.3' })),
17 | transition('inactiveBD => activeBD', [animate('200ms ease-out')]),
18 | transition('activeBD => inactiveBD', [animate('200ms ease-out')]),
19 | state('inactiveSSD', style({ transform: 'translateX(0)' })),
20 | state('activeSSD', style({ transform: 'translateX(260)' })),
21 | transition('inactiveSSD => activeSSD', [animate('200ms ease-out')]),
22 | transition('activeSSD => inactiveSSD', [animate('200ms ease-out')]),
23 | ])
24 | ]
25 | })
26 | export class SideDrawerComponent implements OnInit, AfterViewInit {
27 |
28 | @Input() public toggled: boolean;
29 | @Output() close = new EventEmitter();
30 | @Output() exit = new EventEmitter();
31 | @Output() navigate = new EventEmitter();
32 |
33 | //Menu categories
34 | sideDrawerCategories: Array = [
35 | { name: 'Home', icon: '\uf175', page: 'home' },
36 | {
37 | name: 'Components', icon: '\uf328', subItems: [
38 | { name: 'Buttons', page: 'buttons', icon: '\uf155' },
39 | { name: 'Text', page: 'text', icon: '\uf242' },
40 | { name: 'Lists', page: 'lists', icon: '\uf247' },
41 | { name: 'Pickers', page: 'pickers', icon: '\uf30c' },
42 | { name: 'Layouts', page: 'layouts', icon: '\uf31c' },
43 | { name: 'Selectors', page: 'selectors', icon: '\uf26f' },
44 | { name: 'Indicators', page: 'indicators', icon: '\uf1b8' },
45 | { name: 'Images', page: 'images', icon: '\uf17f' },
46 | { name: 'Views', page: 'views', icon: '\uf279' },
47 | { name: 'Dialogs', page: 'dialogs', icon: '\uf14b' },
48 | ]
49 | },
50 | {
51 | name: 'Hardware', icon: '\uf2cc', subItems: [
52 | { name: 'Camera', page: 'camera', icon: '\uf28c' },
53 | { name: 'Accelerometer', page: 'accelerometer', icon: '\uf101' },
54 | { name: 'Location', page: 'location', icon: '\uf299' }
55 | ]
56 | },
57 | {
58 | name: 'Examples', icon: '\uf318', subItems: [
59 | { name: 'Login', page: 'login', icon: '\uf1cc' },
60 | { name: 'Table', page: 'table', icon: '\uf22b' },
61 | { name: 'Contacts', page: 'contacts', icon: '\uf20b' },
62 | { name: 'CodeScanner', page: 'codescanner', icon: '\uf16d' },
63 | { name: 'Database', page: 'database', icon: '\uf18c' },
64 | { name: 'Animations', page: 'animations', icon: '\uf1e1' },
65 | { name: 'Charts', page: 'charts', icon: '\uf131' },
66 | { name: 'Tasks', page: 'tasks', icon: '\uf269' },
67 | { name: 'SignaturePad', page: 'signaturepad', icon: '\uf11f' }
68 | ]
69 | },
70 | { name: 'Settings', icon: '\uf1c6', page: 'settings' },
71 | // { name: 'Exit', icon: '\uf136', page: 'exit' },
72 | ];
73 | private subToggled: boolean = false;
74 | private animationDuration: number = 200;
75 | private subItems: Array = [];
76 |
77 | constructor(private router: Router, private page: Page) { }
78 |
79 |
80 | ngOnInit() {
81 | this.router.events.subscribe((e) => {
82 | if (e instanceof NavigationEnd) {
83 | this.closeSubSideDrawer();
84 | }
85 | });
86 | }
87 |
88 | ngAfterViewInit() {
89 | this.setNativeElements();
90 | }
91 |
92 | //Menu item tap
93 | public itemTap(args, subItems: Array, pageName: string) {
94 | if (subItems) {
95 | if (this.subToggled) {
96 | this.closeSubSideDrawer().then(() => {
97 | if (this.subItems !== subItems) {
98 | this.subItems = subItems;
99 | this.openSubSideDrawer();
100 | }
101 | });
102 | } else {
103 | this.subItems = subItems;
104 | this.openSubSideDrawer();
105 | }
106 | } else {
107 | this.navItemTap(args, pageName);
108 | }
109 | }
110 |
111 | //Menu sub item tap
112 | public navItemTap(args, pageName: string) {
113 | if (pageName !== 'exit') {
114 | this.router.navigate(['home/', pageName]);
115 | } else {
116 | this.exit.emit(false);
117 | }
118 | }
119 |
120 | //Close side drawer animation
121 | public closeSideDrawer() {
122 | this.closeSubSideDrawer();
123 | this.subToggled = false;
124 | }
125 |
126 | //Close sub side drawer animation
127 | public closeSubSideDrawer(then?): Promise {
128 | this.subToggled = false;
129 | return new Promise((resolve, reject) => {
130 | //Animation
131 | this.subSideDrawer.animate({
132 | duration: this.animationDuration,
133 | translate: { x: 0, y: 0 },
134 | curve: 'easeIn'
135 | }).then(() => {
136 | resolve();
137 | });
138 | });
139 | }
140 |
141 | //Open sub side drawer animation
142 | public openSubSideDrawer() {
143 | this.subToggled = true;
144 | this.subSideDrawer.animate({
145 | duration: this.animationDuration,
146 | translate: { x: 130, y: 0 },
147 | curve: 'easeOut'
148 | });
149 | setTimeout(() => {
150 | let lastButton = this.page.getViewById(this.router.url.toLocaleLowerCase());
151 | if (lastButton) {
152 | lastButton.className = 'app-color-quaternary';
153 | }
154 | });
155 | }
156 |
157 | // Native elements set
158 | public setNativeElements() {
159 | this.sideDrawer = this.sideDrawerRef.nativeElement;
160 | this.subSideDrawer = this.subSideDrawerRef.nativeElement;
161 | }
162 |
163 | //VIEW CHILDS
164 | @ViewChild('sideDrawer') sideDrawerRef: ElementRef;
165 | private sideDrawer;
166 | @ViewChild('subSideDrawer') subSideDrawerRef: ElementRef;
167 | private subSideDrawer;
168 | }
169 |
--------------------------------------------------------------------------------
/app/common/components/splash-screen/splash-screen.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/common/components/splash-screen/splash-screen.component.scss:
--------------------------------------------------------------------------------
1 |
2 | .labelOne {
3 | animation-name: labelOne;
4 | animation-duration: 0.8s;
5 | animation-fill-mode: forwards;
6 | animation-timing-function: spring
7 | }
8 | @keyframes labelOne {
9 | from{
10 | transform: translate(-300,0)
11 | }
12 | to{
13 | transform: translate(0,0);
14 | }
15 | }
16 |
17 | .labelTwo {
18 | animation-name: labelTwo;
19 | animation-duration: 0.8s;
20 | animation-fill-mode: forwards;
21 | animation-timing-function: spring
22 | }
23 | @keyframes labelTwo {
24 | from{
25 | transform: translate(300,0)
26 | }
27 | to{
28 | transform: translate(0,0);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/common/components/splash-screen/splash-screen.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, AfterViewInit} from '@angular/core';
2 | import {RouterExtensions} from 'nativescript-angular/router';
3 | import {Page} from 'ui/page';
4 |
5 | @Component({
6 | moduleId: module.id,
7 | selector: 'sc-splash-screen',
8 | templateUrl: 'splash-screen.component.html',
9 | styleUrls: ['splash-screen.component.css'],
10 | })
11 | export class SplashScreenComponent implements AfterViewInit {
12 |
13 | constructor(private nav: RouterExtensions, page: Page) {
14 | page.className = 'app-color-primary';
15 | page.actionBarHidden = true;
16 | }
17 |
18 | ngAfterViewInit() {
19 | //Closing splash screen
20 | setTimeout(() => {
21 | this.nav.navigate(['/home/home'], {
22 | clearHistory: true,
23 | transition: {
24 | name: 'fade',
25 | duration: 400,
26 | curve: 'linear'
27 | }
28 | });
29 | }, 2000);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/common/services/content.service.ts:
--------------------------------------------------------------------------------
1 | import {Injectable} from "@angular/core";
2 |
3 | @Injectable()
4 | export class ContentService {
5 |
6 | constructor() {
7 | }
8 |
9 | public getFilms(): any[]{
10 | return this.films;
11 | }
12 |
13 | public getJedis(): string[]{
14 | return this.jedis;
15 | }
16 |
17 | public getOpening(): string{
18 | return this.opening;
19 | }
20 |
21 | public getColors(): any[]{
22 | return this.colors;
23 | }
24 |
25 | public getFontColors(): any[]{
26 | return this.fontColors;
27 | }
28 |
29 | public getStyles(): any[]{
30 | return this.styles;
31 | }
32 |
33 | public getTextStyles(): any[]{
34 | return this.textStyles;
35 | }
36 |
37 | public getContacts(): any[]{
38 | return this.contacts;
39 | }
40 |
41 | public getTasks(): any[]{
42 | return this.tasks;
43 | }
44 |
45 | public getThemes(): any[]{
46 | return this.themes;
47 | }
48 |
49 | private films: any[] = [
50 | {ep: "Episode I", name: "The Phantom Menace", year: "1999"},
51 | {ep: "Episode II", name: "Attack of the Clones", year: "2001"},
52 | {ep: "Episode III", name: "Revenge of the Sith", year: "2003"},
53 | {ep: "Episode IV", name: "A New Hope", year: "1977"},
54 | {ep: "Episode V", name: "The Empire Strikes Back", year: "1980"},
55 | {ep: "Episode VI", name: "Return of the Jedi", year: "1983"},
56 | {ep: "Episode VII", name: "The Force Awakens", year: "2015"},
57 | {ep: "Episode VIII", name: "", year: "2017"},
58 | {ep: "Episode IX", name: "", year: "2019"}
59 | ]
60 |
61 | private tasks: any[] = [
62 | {isDone: false, text: "Go shopping"},
63 | {isDone: true, text: "Eat tacos"},
64 | {isDone: false, text: "Meet Mike"},
65 | {isDone: true, text: "Procrastinate"},
66 | {isDone: true, text: "Drink coffee"},
67 | {isDone: false, text: "Work"}
68 | ]
69 |
70 | private contacts: any[] = [
71 | {name: "Yoda", race: "Unknown", number: "689574123", icon: "~/images/yoda.png", from: "Dagobah"},
72 | {name: "Chewbacca", race: " Wookie", number: "654321987", icon: "http://www.highpants.net/wp-content/uploads/2016/01/Highpants-Chewbacca-200x200.jpg", from: "Kashyyyk"},
73 | {name: "Han", race: "Human", number: "684521478", icon: "http://www.technobuffalo.com/wp-content/uploads/2015/06/grumpy-harrison-ford-roles-han-solo-3-1088594-TwoByOne-200x200.jpg", from: "Corellia"},
74 | {name: "Jabba", race: "Hutt", number: "625895478", icon: "http://images.forbes.com/media/lists/fictional/2008/jabbathehutt.jpg", from: "Tatooine"},
75 | {name: "Boba", race: "Human Clone", number: "635214563", icon: "http://www.technobuffalo.com/wp-content/uploads/2014/04/Boba-Fett-200x200.jpg", from: "Kamino"},
76 | {name: "Anakin", race: "Human", number: "687459852", icon: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSAYwSge9-4jEAVjN3roqFlJc3BXOlWI7yTiGvI6ZyXHLB6K4MdIg", from: "Tatooine"},
77 | {name: "Ben", race: "Human", number: "678452154", icon: "http://rs213.pbsrc.com/albums/cc190/thatguyno1/Ben%20Kenobi%20screen%20shots/IMG_1037b.jpg~c200", from: "Stewjon"},
78 | {name: "Luke", race: "Human", number: "687458523", icon: "http://www.technobuffalo.com/wp-content/uploads/2015/11/lukeskywalker-200x200.jpg", from: "Tatooine"},
79 | {name: "Leia", race: "Human", number: "613548795", icon: "http://www.technobuffalo.com/wp-content/uploads/2015/06/leia-princess-leia-organa-solo-skywalker-8413731-1024-768-200x200.jpg", from: "Naboo"},
80 | {name: "C-3PO", race: "Droid", number: "659852364", icon: "https://qph.is.quoracdn.net/main-thumb-t-47346-200-VG7p4ldgrtX1VNGAlD5PHCOc9Bzeqj3a.jpeg", from: "Tatooine"},
81 | {name: "R2-D2", race: "Droid", number: "648521745", icon: "https://pbs.twimg.com/profile_images/679154009949650944/hK_N09QV.jpg", from: "Naboo"},
82 | {name: "Palpatine", race: "Human", number: "695823568", icon: "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRrwR4XEexMmU7VLxdbIiROmscHvuZG7dAL1QMM5jyQrfL_NM0n", from: "Naboo"},
83 | {name: "Lando", race: "Human", number: "698531475", icon: "http://vignette4.wikia.nocookie.net/starwars/images/a/a7/Lando-AoD.jpg/revision/latest/scale-to-width-down/200?cb=20090928202401", from: "Bespin"},
84 | {name: "Greedo", race: "Rodian", number: "695824651", icon: "http://rs625.pbsrc.com/albums/tt331/Anthony8934/Star%20Wars%20Clone%20Commanders/Star%20Wars%20Sith/Star%20Wars%20Bounty%20Hunter/Greedo.jpg~c200", from: "Rodia"},
85 | {name: "Ackbar", race: "Mon Calamari", number: "6687595824", icon: "http://media.npr.org/assets/blogs/thetwo-way/images/2010/03/ackbar-dfdfea93d8ed875f978acf5fcbf63b65c0cf7033-s300-c85.jpg", from: "Mon Cala"}
86 | ]
87 |
88 | private themes: any[] = [
89 | {name: "GFT", path: "app.css"},
90 | {name: "Dark Side", path: "themes/dark_side.css"},
91 | {name: "Pinky", path: "themes/pinky.css"},
92 | {name: "Neon", path: "themes/neon.css"}
93 | ]
94 |
95 | private jedis: string[] = ["Yoda", "Mace Windu", "Ashoka Tano", "Obi-Wan Kenobi", "Qui-Gon Jinn", "Anakin Skywalker", "Luke SkyWalker"]
96 |
97 | private opening: string = "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet. Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of thestolen plans that can save her people and restore freedom to the galaxy...."
98 |
99 | private colors: any[] = [
100 | {title: "LIGHT", styles: [
101 | {title: "DEFAULT", style: "light"},
102 | {title: "OUTLINED", style: "light-outlined"},
103 | {title: "CLEAR", style: "light-clear"},
104 | {title: "FULL", style: "light-full"}
105 | ]},
106 | {title: "STABLE", styles: [
107 | {title: "DEFAULT", style: "stable"},
108 | {title: "OUTLINED", style: "stable-outlined"},
109 | {title: "CLEAR", style: "stable-clear"},
110 | {title: "FULL", style: "stable-full"}
111 | ]},
112 | {title: "DARK", styles: [
113 | {title: "DEFAULT", style: "dark"},
114 | {title: "OUTLINED", style: "dark-outlined"},
115 | {title: "CLEAR", styles: "dark-clear"},
116 | {title: "FULL", style: "dark-full"}
117 | ]},
118 | {title: "PRIMARY", styles: [
119 | {title: "DEFAULT", style: "primary"},
120 | {title: "OUTLINED", style: "primary-outlined"},
121 | {title: "CLEAR", style: "primary-clear"},
122 | {title: "FULL", style: "primary-full"}
123 | ]},
124 | {title: "INFO", styles: [
125 | {title: "DEFAULT", style: "info"},
126 | {title: "OUTLINED", style: "info-outlined"},
127 | {title: "CLEAR", style: "info-clear"},
128 | {title: "FULL", style: "info-full"}
129 | ]},
130 | {title: "SUCCESS", styles: [
131 | {title: "DEFAULT", style: "success"},
132 | {title: "OUTLINED", style: "success-outlined"},
133 | {title: "CLEAR", style: "success-clear"},
134 | {title: "FULL", style: "success-full"}
135 | ]},
136 | {title: "WARNING", styles: [
137 | {title: "DEFAULT", style: "warning"},
138 | {title: "OUTLINED", style: "warning-outlined"},
139 | {title: "CLEAR", style: "warning-clear"},
140 | {title: "FULL", style: "warning-full"}
141 | ]},
142 | {title: "DANGER", styles: [
143 | {title: "DEFAULT", style: "danger"},
144 | {title: "OUTLINED", style: "danger-outlined"},
145 | {title: "CLEAR", style: "danger-clear"},
146 | {title: "FULL", style: "danger-full"}
147 | ]},
148 | ]
149 |
150 | private styles: any[] = [
151 | {title: "DEFAULT", styles: [
152 | {name: "LIGHT", style: "light"},
153 | {name: "STABLE", style: "stable"},
154 | {name: "DARK", style: "dark"},
155 | {name: "PRIMARY", style: "primary"},
156 | {name: "INFO", style: "info"},
157 | {name: "SUCCESS", style: "success"},
158 | {name: "WARNING", style: "warning"},
159 | {name: "DANGER", style: "danger"},
160 | ]},
161 | {title: "OUTLINED", styles: [
162 | {name: "LIGHT", style: "light-outlined"},
163 | {name: "STABLE", style: "stable-outlined"},
164 | {name: "DARK", style: "dark-outlined"},
165 | {name: "PRIMARY", style: "primary-outlined"},
166 | {name: "INFO", style: "info-outlined"},
167 | {name: "SUCCESS", style: "success-outlined"},
168 | {name: "WARNING", style: "warning-outlined"},
169 | {name: "DANGER", style: "danger-outlined"},
170 | ]},
171 | {title: "CLEAR", styles: [
172 | {name: "LIGHT", style: "light-clear"},
173 | {name: "STABLE", style: "stable-clear"},
174 | {name: "DARK", style: "dark-clear"},
175 | {name: "PRIMARY", style: "primary-clear"},
176 | {name: "INFO", style: "info-clear"},
177 | {name: "SUCCESS", style: "success-clear"},
178 | {name: "WARNING", style: "warning-clear"},
179 | {name: "DANGER", style: "danger-clear"},
180 | ]},
181 | {title: "FULL", styles: [
182 | {name: "LIGHT", style: "light-full"},
183 | {name: "STABLE", style: "stable-full"},
184 | {name: "DARK", style: "dark-full"},
185 | {name: "PRIMARY", style: "primary-full"},
186 | {name: "INFO", style: "info-full"},
187 | {name: "SUCCESS", style: "success-full"},
188 | {name: "WARNING", style: "warning-full"},
189 | {name: "DANGER", style: "danger-full"},
190 | ]},
191 | ]
192 |
193 | private fontColors: any[] = [
194 | {name: "LIGHT", style: "light-font"},
195 | {name: "STABLE", style: "stable-font"},
196 | {name: "DARK", style: "dark-font"},
197 | {name: "PRIMARY", style: "primary-font"},
198 | {name: "INFO", style: "info-font"},
199 | {name: "SUCCESS", style: "success-font"},
200 | {name: "WARNING", style: "warning-font"},
201 | {name: "DANGER", style: "danger-font"}
202 | ]
203 |
204 | private textStyles: any[] = [
205 | {name: "H1", style: "h1"},
206 | {name: "H2", style: "h2"},
207 | {name: "H3", style: "h3"},
208 | {name: "H4", style: "h4"},
209 | {name: "H5", style: "h5"},
210 | {name: "H6", style: "h6"},
211 | {name: "Italic", style: "italic"},
212 | {name: "Bold", style: "bold"}
213 | ]
214 |
215 | }
--------------------------------------------------------------------------------
/app/fonts/AlteHaasGroteskBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/fonts/AlteHaasGroteskBold.ttf
--------------------------------------------------------------------------------
/app/fonts/Material-Design-Iconic-Font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/fonts/Material-Design-Iconic-Font.ttf
--------------------------------------------------------------------------------
/app/images/chat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/images/chat.jpg
--------------------------------------------------------------------------------
/app/images/poster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/images/poster.png
--------------------------------------------------------------------------------
/app/images/quigon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/images/quigon.png
--------------------------------------------------------------------------------
/app/images/yoda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appverse/Nativescript-NG2-Showcase/253cd16c3ea6df717cdbc2ae9b7bf891552e820f/app/images/yoda.png
--------------------------------------------------------------------------------
/app/main.aot.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order to load some required settings (like globals and reflect-metadata)
2 | import { platformNativeScript } from "nativescript-angular/platform-static";
3 |
4 | import { AppModuleNgFactory } from "./app.module.ngfactory";
5 |
6 | platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);
7 |
--------------------------------------------------------------------------------
/app/main.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order to load some required settings (like globals and reflect-metadata)
2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform";
3 |
4 | import { AppModule } from "./app.module";
5 |
6 | platformNativeScriptDynamic().bootstrapModule(AppModule);
7 |
--------------------------------------------------------------------------------
/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "android": {
3 | "v8Flags": "--expose_gc"
4 | },
5 | "main": "main.js",
6 | "name": "tns-template-hello-world-ng",
7 | "version": "2.5.0"
8 | }
--------------------------------------------------------------------------------
/app/pages/accelerometer/accelerometer.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, NgZone} from '@angular/core';
2 | //USING PLUGIN: NATIVESCRIPT-ACCELEROMETER
3 | import accelerometer = require('nativescript-accelerometer');
4 |
5 | @Component({
6 | moduleId: module.id,
7 | selector: 'sc-accelerometer-page',
8 | templateUrl: 'accelerometer.html',
9 | styleUrls: ['accelerometer.css']
10 | })
11 | export class AccelerometerPage {
12 |
13 | private axisData: JSON;
14 | private isAccelerometerActive: boolean = false;
15 |
16 | public constructor(private _ngZone: NgZone) {
17 | this.axisData = JSON.parse('{"x": 0, "y": 0, "z": 0}');
18 | }
19 | /* Starts accelerometer updates, returns data = {"x": x, "y": y, "z": z}
20 | Using ngZone for executing work inside the Angular zone
21 | */
22 | public toggleAccelerometer() {
23 | if(this.isAccelerometerActive) {
24 | accelerometer.stopAccelerometerUpdates();
25 | } else {
26 | accelerometer.startAccelerometerUpdates(
27 | (data) => {
28 | this._ngZone.run(() => {
29 | this.axisData = data;
30 | });
31 | });
32 | }
33 | this.isAccelerometerActive = !this.isAccelerometerActive;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/app/pages/accelerometer/accelerometer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/pages/accelerometer/accelerometer.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 |
3 | }
--------------------------------------------------------------------------------
/app/pages/animations/animations.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, ViewChild, ElementRef, AfterViewInit} from '@angular/core';
2 |
3 | @Component({
4 | moduleId: module.id,
5 | selector: 'sc-animations-page',
6 | templateUrl: 'animations.html',
7 | styleUrls: ['animations.css']
8 | })
9 | export class AnimationsPage implements AfterViewInit {
10 |
11 | @ViewChild('background') private backgroundRef: ElementRef;
12 | private background;
13 | @ViewChild('opacity') private opacityRef: ElementRef;
14 | private opacity;
15 | @ViewChild('translation') private translationRef: ElementRef;
16 | private translation;
17 | @ViewChild('scale') private scaleRef: ElementRef;
18 | private scale;
19 | @ViewChild('rotation') private rotationRef: ElementRef;
20 | private rotation;
21 |
22 | ngAfterViewInit() {
23 | this.setNativeElements();
24 | }
25 |
26 | startAnimations() {
27 | this.background.className = 's-margin app-color-primary changeBackground';
28 | this.opacity.className = 's-margin app-color-primary changeOpacity';
29 | this.translation.className = 's-margin app-color-primary simpleTranslate';
30 | this.scale.className = 's-margin app-color-primary scale';
31 | this.rotation.className = 's-margin app-color-primary loopRotate';
32 | }
33 |
34 | private setNativeElements() {
35 | this.background = this.backgroundRef.nativeElement;
36 | this.opacity = this.opacityRef.nativeElement;
37 | this.translation = this.translationRef.nativeElement;
38 | this.scale = this.scaleRef.nativeElement;
39 | this.rotation = this.rotationRef.nativeElement;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/app/pages/animations/animations.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/pages/animations/animations.scss:
--------------------------------------------------------------------------------
1 | .changeBackground {
2 | animation-name: changeBG;
3 | animation-duration: 1.2s;
4 | animation-iteration-count: infinite;
5 | animation-fill-mode: forwards;
6 | }
7 | @keyframes changeBG {
8 | from{
9 | background-color: #1B3C80;
10 | }
11 | 50% {
12 | background-color: #00A0FF;
13 | }
14 | 100%{
15 | background-color: #1B3C80;
16 | }
17 | }
18 |
19 | .changeOpacity {
20 | animation-name: changeOp;
21 | animation-duration: 1.2s;
22 | animation-iteration-count: infinite;
23 | animation-fill-mode: forwards;
24 | }
25 | @keyframes changeOp {
26 | from{
27 | opacity: 1
28 | }
29 | 50% {
30 | opacity: 0
31 | }
32 | 100%{
33 | opacity: 1
34 | }
35 | }
36 |
37 | .simpleTranslate {
38 | animation-name: simpleTrans;
39 | animation-duration: 1.2s;
40 | animation-iteration-count: infinite;
41 | animation-fill-mode: forwards;
42 | }
43 | @keyframes simpleTrans {
44 | from{
45 | transform: translate(-100,0)
46 | }
47 | 50% {
48 | transform: translate(100,0)
49 | }
50 | 100%{
51 | transform: translate(-100,0)
52 | }
53 | }
54 |
55 | .scale {
56 | animation-name: scale;
57 | animation-duration: 1.2s;
58 | animation-iteration-count: infinite;
59 | animation-fill-mode: forwards;
60 | }
61 | @keyframes scale {
62 | from{
63 | transform: scale(1,1)
64 | }
65 | 50%{
66 | transform: scale(0,0)
67 | }
68 | 100%{
69 | transform: scale(1,1)
70 | }
71 | }
72 |
73 | .loopRotate {
74 | animation-name: rotate;
75 | animation-duration: 1.2s;
76 | animation-iteration-count: infinite;
77 | animation-fill-mode: forwards;
78 | }
79 | @keyframes rotate {
80 | from{
81 | transform: rotate(0)
82 | }
83 | 100%{
84 | transform: rotate(360)
85 | }
86 | }
--------------------------------------------------------------------------------
/app/pages/buttons/buttons.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-buttons-page',
7 | templateUrl: 'buttons.html',
8 | styleUrls: ['buttons.css']
9 | })
10 | export class ButtonsPage {
11 | private styleSelected: number = 0;
12 | private styles: any[];
13 | private rounded: boolean = false;
14 |
15 | public constructor(private _contentService: ContentService) {
16 | this.styles = _contentService.getStyles();
17 | }
18 | //Switch between default and round buttons
19 | public switchChange(args) {
20 | this.rounded = !this.rounded;
21 | }
22 | //Changes tyle selected
23 | public selectedIndexChanged(args) {
24 | this.styleSelected = args.object.selectedIndex;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/app/pages/buttons/buttons.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/pages/buttons/buttons.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/camera/camera.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild, ElementRef } from '@angular/core';
2 | // import cameraModule for accesing camera hardware
3 | import * as camera from "nativescript-camera";
4 |
5 | @Component({
6 | moduleId: module.id,
7 | selector: 'sc-camera-page',
8 | templateUrl: 'camera.html',
9 | styleUrls: ['camera.css']
10 | })
11 | export class CameraPage {
12 |
13 | private image;
14 |
15 | public requestPermission() {
16 | camera.requestPermissions();
17 | }
18 | //Opens camera module and passes the picture
19 | public openCamera() {
20 | camera.takePicture()
21 | .then(picture => {
22 | this.image = picture;
23 | });
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/pages/camera/camera.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/pages/camera/camera.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/charts/charts.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, OnInit} from '@angular/core';
2 | import { ObservableArray } from 'data/observable-array';
3 | import chart = require('nativescript-telerik-ui-pro/chart');
4 |
5 | //USING PLUGIN: NATIVESCRIPT-DRAWINGPAD
6 |
7 | @Component({
8 | moduleId: module.id,
9 | selector: 'sc-charts-page',
10 | templateUrl: 'charts.html',
11 | styleUrls: ['charts.css']
12 | })
13 | export class ChartsPage implements OnInit {
14 |
15 | private _categoricalSource: ObservableArray;
16 | private _categoricalSource2: ObservableArray;
17 | private _rangeBarSource: ObservableArray;
18 | private _highDataModel: ObservableArray;
19 | private _middleDataModel: ObservableArray;
20 | private _lowDataModel: ObservableArray;
21 | private trackball: chart.Trackball;
22 |
23 | public constructor() {
24 | this.trackball = new chart.Trackball();
25 | this.trackball.showIntersectionPoints = true;
26 | this.trackball.snapMode = 'ClosestPoint';
27 | }
28 |
29 | get categoricalSource(): ObservableArray {
30 | return this._categoricalSource;
31 | }
32 |
33 | get categoricalSource2(): ObservableArray {
34 | return this._categoricalSource2;
35 | }
36 |
37 | get rangeBarSource(): ObservableArray {
38 | return this._rangeBarSource;
39 | }
40 |
41 | get highDataModel(): ObservableArray {
42 | return this._highDataModel;
43 | }
44 |
45 | get middleDataModel(): ObservableArray {
46 | return this._middleDataModel;
47 | }
48 |
49 | get lowDataModel(): ObservableArray {
50 | return this._lowDataModel;
51 | }
52 |
53 | ngOnInit() {
54 | this._categoricalSource = new ObservableArray([
55 | { Country: 'Germany', Amount: 15 },
56 | { Country: 'France', Amount: 13 },
57 | { Country: 'Bulgaria', Amount: 24 },
58 | { Country: 'Spain', Amount: 11 },
59 | { Country: 'USA', Amount: 18 }
60 | ]);
61 | this._categoricalSource2 = new ObservableArray([
62 | { Country: 'Germany', Amount: 10 },
63 | { Country: 'France', Amount: 17 },
64 | { Country: 'Bulgaria', Amount: 5 },
65 | { Country: 'Spain', Amount: 23 },
66 | { Country: 'USA', Amount: 12 }
67 | ]);
68 | this._rangeBarSource = new ObservableArray([
69 | { Name: 'Groceries', High: 30, Low: 12 },
70 | { Name: 'Tools', High: 135, Low: 124 },
71 | { Name: 'Electronics', High: 55, Low: 12 },
72 | { Name: 'Gardening', High: 50, Low: 29 }
73 | ]);
74 | this._highDataModel = new ObservableArray([
75 | { Year: 2000, Amount: 15, Impact: 1, Country: '', SecondVal: 0, ThirdVal: 0 },
76 | { Year: 1456, Amount: 13, Impact: 7, Country: '', SecondVal: 0, ThirdVal: 0 },
77 | { Year: 1866, Amount: 25, Impact: 10, Country: '', SecondVal: 0, ThirdVal: 0 },
78 | { Year: 1900, Amount: 5, Impact: 3, Country: '', SecondVal: 0, ThirdVal: 0 },
79 | { Year: 1700, Amount: 17, Impact: 4, Country: '', SecondVal: 0, ThirdVal: 0 },
80 | { Year: 1600, Amount: 20, Impact: 1, Country: '', SecondVal: 0, ThirdVal: 0 },
81 | ]);
82 | this._middleDataModel = new ObservableArray([
83 | { Year: 1200, Amount: 15, Impact: 1, Country: '', SecondVal: 0, ThirdVal: 0 },
84 | { Year: 1156, Amount: 13, Impact: 7, Country: '', SecondVal: 0, ThirdVal: 0 },
85 | { Year: 1000, Amount: 25, Impact: 10, Country: '', SecondVal: 0, ThirdVal: 0 },
86 | { Year: 900, Amount: 5, Impact: 3, Country: '', SecondVal: 0, ThirdVal: 0 },
87 | { Year: 700, Amount: 17, Impact: 4, Country: '', SecondVal: 0, ThirdVal: 0 },
88 | { Year: 600, Amount: 20, Impact: 1, Country: '', SecondVal: 0, ThirdVal: 0 },
89 | ]);
90 | this._lowDataModel = new ObservableArray([
91 | { Year: 200, Amount: 15, Impact: 1, Country: '', SecondVal: 0, ThirdVal: 0 },
92 | { Year: 456, Amount: 13, Impact: 7, Country: '', SecondVal: 0, ThirdVal: 0 },
93 | { Year: 366, Amount: 25, Impact: 10, Country: '', SecondVal: 0, ThirdVal: 0 },
94 | { Year: 100, Amount: 5, Impact: 3, Country: '', SecondVal: 0, ThirdVal: 0 },
95 | { Year: 340, Amount: 17, Impact: 4, Country: '', SecondVal: 0, ThirdVal: 0 },
96 | { Year: 135, Amount: 20, Impact: 1, Country: '', SecondVal: 0, ThirdVal: 0 },
97 | ]);
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/app/pages/charts/charts.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/app/pages/charts/charts.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/codescanner/codescanner.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 |
3 | //USING PLUGIN: NATIVESCRIPT-BARCODESCANNER
4 | var barcodescanner = require('nativescript-barcodescanner');
5 |
6 | @Component({
7 | moduleId: module.id,
8 | selector: 'sc-code-scanner-page',
9 | templateUrl: 'codescanner.html',
10 | styleUrls: ['codescanner.css']
11 | })
12 | export class CodeScannerPage {
13 |
14 | private result;
15 |
16 | //Opens camera and scans the code
17 | public scan(format?:string) {
18 | if (barcodescanner.available()) {
19 | barcodescanner.scan({
20 | formats: format, // Pass in of you want to restrict scanning to certain types; AZTEC and MAXICODE formats dont work fine
21 | cancelLabel: 'Stop scanning', // iOS only, default 'Close'
22 | message: 'Go scan something', // Android only, default is 'Place a barcode inside the viewfinder rectangle to scan it.'
23 | preferFrontCamera: false, // Android only, default false
24 | showFlipCameraButton: true, // Android only, default false (on iOS it's always available)
25 | orientation: 'portrait' // Android only, optionally lock the orientation to either "portrait" or "landscape"
26 | }).then(
27 | (result)=> {
28 | console.log('Scan format: ' + result.format);
29 | console.log('Scan text: ' + result.text);
30 | this.result = result.format + ' ' + result.text;
31 | },
32 | (error)=> {
33 | console.log('No scan: ' + error);
34 | }
35 | );
36 | }
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/app/pages/codescanner/codescanner.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/pages/codescanner/codescanner.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/contacts/contacts.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, ViewChild, ElementRef, animate, trigger, state, style, transition, AfterViewInit} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-contacts-page',
7 | templateUrl: 'contacts.html',
8 | styleUrls: ['contacts.css'],
9 | animations: [
10 | trigger('state', [
11 | state('inactiveModal', style({ opacity: '0' })),
12 | state('activeModal', style({ opacity: '1' })),
13 | transition('inactiveModal => activeModal', [animate('300ms ease-out')]),
14 | transition('activeModal => inactiveModal', [animate('300ms ease-out')]),
15 | state('inactiveBD', style({ opacity: '0' })),
16 | state('activeBD', style({ opacity: '.3' })),
17 | transition('inactiveBD => activeBD', [animate('300ms ease-out')]),
18 | transition('activeBD => inactiveBD', [animate('300ms ease-out')]),
19 | ])
20 | ]
21 | })
22 | export class ContactsPage implements AfterViewInit {
23 |
24 | private contacts: any[];
25 | private modalToggled: boolean = false;
26 | private toggled: boolean = false;
27 | private selected: number = 0;
28 |
29 | @ViewChild('modal') private modalRef: ElementRef;
30 | private modal;
31 |
32 | constructor(private _contentService: ContentService) {
33 | this.contacts = _contentService.getContacts();
34 | }
35 |
36 | ngAfterViewInit() {
37 | this.setNativeElements();
38 | this.modal.opacity = 0;
39 | }
40 | //Opens detail modal
41 | public itemTap(args) {
42 | this.selected = args.index;
43 | this.toggled = true;
44 | this.modalToggled = true;
45 | }
46 | //Closes detail modal
47 | public closeModal() {
48 | this.modalToggled = false;
49 | setTimeout(() => { this.toggled = false; }, 400);
50 | }
51 | //Get elements from the UI
52 | private setNativeElements() {
53 | this.modal = this.modalRef.nativeElement;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/pages/contacts/contacts.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/pages/contacts/contacts.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/database/database.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, EventEmitter, OnInit} from '@angular/core';
2 | import colorModule = require('color');
3 | import platform = require('platform');
4 |
5 | //USING PLUGIN: NATIVESCRIPT-SQLITE
6 | var Sqlite = require('nativescript-sqlite');
7 |
8 | @Component({
9 | moduleId: module.id,
10 | selector: 'sc-database-page',
11 | templateUrl: 'database.html',
12 | styleUrls: ['database.css']
13 | })
14 | export class DatabasePage implements OnInit {
15 |
16 | private db;
17 | private results;
18 | private info: string;
19 | private name: string;
20 | private age: string;
21 | private nameEmitter = new EventEmitter();
22 | private ageEmitter = new EventEmitter();
23 | private isAndroid: boolean = platform.isAndroid;
24 |
25 | constructor() {
26 | let instance = this;
27 | //Create the database (DB)
28 | console.log('creating database...');
29 | let db_promise = new Sqlite('MyDB', (err, db) => {
30 | if (err) {
31 | console.error('We failed to open database', err);
32 | instance.info = 'We failed to open database: ' + err;
33 | } else {
34 | instance.db = db;
35 | }
36 | });
37 | this.setupDB();
38 | }
39 |
40 | ngOnInit() {
41 | let instance = this;
42 | // this.nameEmitter
43 | // .subscribe(v => {
44 | // instance.name = v;
45 | // });
46 | // this.ageEmitter
47 | // .subscribe(v => {
48 | // instance.age = v;
49 | // });
50 | }
51 | // Inserts a new row executing SQL
52 | public insert() {
53 | console.log('name', this.name, 'age', this.age);
54 | let instance = this;
55 | //CHECK IF ITS OPEN
56 | if (this.db.isOpen()) {
57 | /* To execute non-SELECT SQL statements */
58 | this.db.execSQL('INSERT INTO tests (name, age) VALUES (?,?)', [this.name, this.age], (err, id) => {
59 | console.log('The new record id is:', id);
60 | instance.info = 'Row added: ' + id;
61 | });
62 | } else {
63 | console.log('DB is closed!');
64 | instance.info = 'DB is closed!';
65 | }
66 | }
67 | //Gets all the rows
68 | public getAll() {
69 | let instance = this;
70 | //CHECK IF ITS OPEN
71 | if (this.db.isOpen()) {
72 | /* To execute SELECT SQL statements:
73 | .get returns the first row as result in the callback
74 | .all returns all the rows as result in the callback
75 | .each returns each row as result in the callback (which is called as many times as the number of rows) */
76 | this.db.all('SELECT * FROM tests', (err, r) => {
77 | console.log('Row of data was: ', r);
78 | instance.info = 'Data received';
79 | this.results = r;
80 | });
81 | } else {
82 | console.log('DB is closed!');
83 | instance.info = 'DB is closed!';
84 | }
85 | }
86 | //Deletes tests rows
87 | public deleteAll() {
88 | let instance = this;
89 | //CHECK IF ITS OPEN
90 | if (this.db.isOpen()) {
91 | this.db.execSQL('DELETE FROM tests', (err) => {
92 | if (err) {
93 | console.log('There was an error:', err);
94 | instance.info = 'There was an error: ' + err;
95 | } else {
96 | console.log('Data has been deleted');
97 | instance.info = 'Data has been deleted';
98 | }
99 | });
100 | } else {
101 | console.log('DB is closed!');
102 | instance.info = 'DB is closed!';
103 | }
104 | }
105 | //To close DB
106 | public closeDB() {
107 | let instance = this;
108 | //CHECK IF IT EXISTS AND IF ITS OPEN
109 | if (Sqlite.exists('MyDB')) {
110 | if (this.db.isOpen()) {
111 | this.db.close((err) => {
112 | if (err) {
113 | console.log('We failed to close database');
114 | } else {
115 | console.log('DB closed');
116 | instance.info = 'DB closed';
117 | }
118 | });
119 | } else {
120 | console.log('DB is already closed!');
121 | instance.info = 'DB is already closed!';
122 | }
123 |
124 | } else {
125 | console.log('DB doesn\'t exist');
126 | instance.info = 'DB doesn\'t exist';
127 | }
128 | }
129 | //To open DB
130 | public openDB() {
131 | let instance = this;
132 | //CHECK IF IT EXISTS AND IF ITS OPEN
133 | if (Sqlite.exists('MyDB')) {
134 | if (instance.db.isOpen()) {
135 | console.log('DB is already open!');
136 | instance.info = 'DB is already open!';
137 | } else {
138 | var db_promise = new Sqlite('MyDB', false, (err, db) => {
139 | if (err) {
140 | console.error('We failed to open database', err);
141 | instance.info = 'We failed to open database ' + err;
142 | } else {
143 | console.log('Are we open yet (Inside Callback)? ', db.isOpen() ? 'Yes' : 'No'); // Yes
144 | instance.info = 'DB opened';
145 | instance.db = db;
146 | }
147 | });
148 | }
149 |
150 | } else {
151 | console.log('DB doesn\'t exist');
152 | instance.info = 'DB doesn\'t exist!';
153 | }
154 | }
155 | //Initial DB set up
156 | public setupDB() {
157 | this.db.resultType(Sqlite.RESULTSASOBJECT);
158 | this.db.execSQL('DROP TABLE IF EXISTS tests;', (err) => {
159 | if (err) { console.log('!---- Drop Err', err); }
160 | this.db.execSQL('CREATE TABLE tests (`name` TEXT, `age` NUMERIC)', (err) => {
161 | if (err) {
162 | console.log('!---- Create Table err', err);
163 | return;
164 | }
165 | this.db.execSQL('INSERT INTO tests (name, age) VALUES ("Nathan Drake",32)', (err, id) => {
166 | if (err) {
167 | console.log('!---- Insert err', err);
168 | return;
169 | }
170 | this.db.execSQL('INSERT INTO tests (name, age) VALUES ("Elena Fisher",30)');
171 | });
172 | });
173 | });
174 | this.db.close();
175 | }
176 |
177 | public changeCellBackground(args) {
178 | if (!this.isAndroid) {
179 | var cell = args.ios; //return UITableViewCell
180 | cell.backgroundColor = new colorModule.Color('0,0,0,0').ios;
181 | }
182 | }
183 | }
184 |
--------------------------------------------------------------------------------
/app/pages/database/database.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/pages/database/database.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/dialogs/dialogs.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import dialogs = require('ui/dialogs');
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-dialogs-page',
7 | templateUrl: 'dialogs.html',
8 | styleUrls: ['dialogs.css']
9 | })
10 | export class DialogsPage {
11 |
12 | //Alert dialog
13 | public alert(options: boolean) {
14 | if(options) {
15 | dialogs.alert({
16 | title: 'Your title',
17 | message: 'Your message',
18 | okButtonText: 'Your button text'
19 | }).then(()=> {
20 | console.log('Dialog closed!');
21 | });
22 | } else {
23 | dialogs.alert('Your message').then(()=> {
24 | console.log('Dialog closed!');
25 | });
26 | }
27 | }
28 | //Confirm dialog
29 | public confirm(options: boolean) {
30 | if(options) {
31 | dialogs.confirm({
32 | title: 'Your title',
33 | message: 'Your message',
34 | okButtonText: 'Your button text',
35 | cancelButtonText: 'Cancel text',
36 | neutralButtonText: 'Neutral text'
37 | }).then(function (result) {
38 | // RESULT IS BOOLEAN
39 | console.log('Dialog result: ' + result);
40 | });
41 | } else {
42 | dialogs.confirm('Your message').then(result => {
43 | console.log('Dialog result: ' + result);
44 | });
45 | }
46 | }
47 | // Prompt dialog
48 | public prompt(options: boolean) {
49 | if(options) {
50 | // inputType PROPERTY CAN BE dialogs.inputType.password OR dialogs.inputType.text.
51 | dialogs.prompt({
52 | title: 'Your title',
53 | message: 'Your message',
54 | okButtonText: 'Your button text',
55 | cancelButtonText: 'Cancel text',
56 | neutralButtonText: 'Neutral text',
57 | defaultText: 'Default text',
58 | inputType: dialogs.inputType.password
59 | }).then(function (r) {
60 | console.log('Dialog result: ' + r.result + ', text: ' + r.text);
61 | });
62 | } else {
63 | // SECOND ARGUMENT OPTIONAL
64 | dialogs.prompt('Your message', 'Default text').then(r => {
65 | console.log('Dialog result: ' + r.result + ', text: ' + r.text);
66 | });
67 | }
68 | }
69 | //Login dialog
70 | public login(options: boolean) {
71 | if(options) {
72 | dialogs.login({
73 | title: 'Your title',
74 | message: 'Your message',
75 | okButtonText: 'Your button text',
76 | cancelButtonText: 'Cancel button text',
77 | neutralButtonText: 'Neutral button text',
78 | userName: 'User name label text',
79 | password: 'Password label text'
80 | }).then(function (r) {
81 | console.log('Dialog result: ' + r.result + ', user: ' + r.userName + ', pwd: ' + r.password);
82 | });
83 | } else {
84 | // USER NAME AND PASSWORD OPTIONAL
85 | dialogs.login('Your message', 'User name label text', 'Password label text').then(function (r) {
86 | console.log('Dialog result: ' + r.result + ', user: ' + r.userName + ', pwd: ' + r.password);
87 | });
88 | }
89 | }
90 | //Action dialog
91 | public action(options: boolean) {
92 | if(options) {
93 | dialogs.action({
94 | message: 'Your message',
95 | cancelButtonText: 'Cancel text',
96 | actions: ['Option1', 'Option2']
97 | }).then(function (result) {
98 | console.log('Dialog result: ' + result);
99 | });
100 | } else {
101 | dialogs.action('Your message', 'Cancel button text', ['Option1', 'Option2']).then(function (result) {
102 | console.log('Dialog result: ' + result);
103 | });
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/app/pages/dialogs/dialogs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/pages/dialogs/dialogs.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/home/home.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 |
3 | var appSettings = require('application-settings');
4 |
5 | @Component({
6 | moduleId: module.id,
7 | selector: 'sc-home-page',
8 | templateUrl: 'home.html',
9 | styleUrls: ['home.css']
10 | })
11 | export class HomePage {
12 |
13 | private firstLaunch: boolean;
14 |
15 | public constructor() {
16 | this.firstLaunch = appSettings.getBoolean('firstLaunch', true);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/pages/home/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/pages/home/home.scss:
--------------------------------------------------------------------------------
1 | .animated-intro{
2 | border-radius: 10;
3 | width: 115;
4 | height: 115;
5 | }
6 |
7 | .upAndDown {
8 | animation-name: upAndDown;
9 | animation-duration: 1s;
10 | animation-fill-mode: forwards;
11 | animation-iteration-count: infinite
12 | }
13 | @keyframes upAndDown {
14 | from{
15 | transform: translate(0,0)
16 | }
17 | 25%{
18 | transform: translate(0,-15)
19 | }
20 | 75%{
21 | transform: translate(0,15)
22 | }
23 | 75%{
24 | transform: translate(0,0)
25 | }
26 | }
--------------------------------------------------------------------------------
/app/pages/images/images.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 |
3 | @Component({
4 | moduleId: module.id,
5 | selector: 'sc-images-page',
6 | templateUrl: 'images.html',
7 | styleUrls: ['images.css']
8 | })
9 | export class ImagesPage {
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/app/pages/images/images.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/pages/images/images.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/indicators/indicators.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-indicators-page',
7 | templateUrl: 'indicators.html',
8 | styleUrls: ['indicators.css']
9 | })
10 | export class IndicatorsPage {
11 |
12 | private styles: any[];
13 | private fontColors: any[];
14 |
15 | public constructor(private _contentService: ContentService) {
16 | this.styles = _contentService.getStyles();
17 | this.fontColors = _contentService.getFontColors();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/pages/indicators/indicators.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/pages/indicators/indicators.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/layouts/layouts.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 |
3 | @Component({
4 | moduleId: module.id,
5 | selector: 'sc-layouts-page',
6 | templateUrl: 'layouts.html',
7 | styleUrls: ['layouts.css']
8 | })
9 | export class LayoutsPage {
10 | }
11 |
--------------------------------------------------------------------------------
/app/pages/layouts/layouts.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/pages/layouts/layouts.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 |
3 | }
--------------------------------------------------------------------------------
/app/pages/lists/lists.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | import colorModule = require('color');
5 | import platform = require('platform');
6 |
7 | @Component({
8 | moduleId: module.id,
9 | selector: 'sc-lists-page',
10 | templateUrl: 'lists.html',
11 | styleUrls: ['lists.css']
12 | })
13 | export class ListsPage {
14 | public style: string = 'light';
15 | public styleSelected: number = 0;
16 | private colorSelected: number = 0;
17 | private colors: any[];
18 | private films: any[];
19 | private isAndroid: boolean = platform.isAndroid;
20 |
21 | public constructor(private _contentService: ContentService) {
22 | this.colors = _contentService.getColors();
23 | this.films = _contentService.getFilms();
24 | }
25 |
26 | public changeCellBackground(args) {
27 | if (!this.isAndroid) {
28 | var cell = args.ios; //return UITableViewCell
29 | cell.backgroundColor = new colorModule.Color('0,0,0,0').ios;
30 | }
31 | }
32 |
33 | public selectedColorChanged(args) {
34 | this.colorSelected = args.object.selectedIndex;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/pages/lists/lists.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/pages/lists/lists.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/location/location.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | //USING PLUGIN: NATIVESCRIPT-GEOLOCATION
3 | import geolocation = require('nativescript-geolocation');
4 |
5 | @Component({
6 | moduleId: module.id,
7 | selector: 'sc-location-page',
8 | templateUrl: 'location.html',
9 | styleUrls: ['location.css']
10 | })
11 | export class LocationPage {
12 | //WORKING ON DEVICE
13 | private currentLocation;
14 | private isLocation: boolean = false;
15 |
16 | /* Requests location rights */
17 | public enableLocation() {
18 | if (!geolocation.isEnabled()) {
19 | console.log('enabling location request');
20 | geolocation.enableLocationRequest();
21 | } else {
22 | console.log('location already enabled');
23 | }
24 | }
25 | /* Gets the currents location using an Observable to handle async call */
26 | public getLocation() {
27 | if (geolocation.isEnabled()) {
28 | geolocation
29 | .getCurrentLocation({ desiredAccuracy: 3, updateDistance: 10, maximumAge: 20000, timeout: 20000 })
30 | .then((loc) => {
31 | this.currentLocation = loc;
32 | this.isLocation = true;
33 | }, (e)=> {
34 | console.log('Error: ' + e.message);
35 | });
36 | } else {
37 | console.log('Location isn\'t enabled!');
38 | }
39 |
40 | }
41 |
42 | /* LOCATION MONITORING DOESNT WORKS THROUGH TYPESCRIPT AT 21/06/16 */
43 | }
44 |
--------------------------------------------------------------------------------
/app/pages/location/location.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/pages/location/location.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/login/login.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, ViewChild, ElementRef, EventEmitter, OnInit, AfterViewInit} from '@angular/core';
2 | import dialogs = require('ui/dialogs');
3 |
4 | var validator = require('email-validator');
5 |
6 | @Component({
7 | moduleId: module.id,
8 | selector: 'sc-login-page',
9 | templateUrl: 'login.html',
10 | styleUrls: ['login.css']
11 | })
12 | export class LoginPage implements AfterViewInit {
13 |
14 | private email: string;
15 | private password: string;
16 | private passwordCheck: string;
17 | private isLogin: boolean = true;
18 |
19 | @ViewChild('modal') private modalRef: ElementRef;
20 | private modal;
21 |
22 | ngAfterViewInit() {
23 | this.setNativeElements();
24 | }
25 |
26 | public login(email: string, password: string) {
27 | let loginSuccess: boolean;
28 | if(validator.validate(email)) {
29 | //CHECK CREDENTIALS HERE
30 | dialogs.alert('Email: ' + email + ' Password: ' + password).then(result => {
31 | console.log('Dialog result: ' + result);
32 | });
33 | loginSuccess = true;
34 | } else {
35 | dialogs.alert('Email is not valid').then(result => {
36 | console.log('Dialog result: ' + result);
37 | });
38 | loginSuccess = false;
39 | }
40 | return loginSuccess;
41 | }
42 |
43 | public signin() {
44 | if(this.isLogin) {
45 | this.toggle();
46 | } else {
47 | this.register(this.email, this.password, this.passwordCheck);
48 | }
49 | }
50 |
51 | public toggle() {
52 | this.modal.animate({
53 | opacity: 0,
54 | duration: 350,
55 | }).then(()=> {
56 | this.isLogin = !this.isLogin;
57 | this.modal.animate({
58 | opacity: 1,
59 | duration:350,
60 | });
61 | });
62 | }
63 |
64 | private register(email: string, password: string, passwordCheck: string) {
65 | let isEmailValid: boolean = validator.validate(email);
66 | let isPassValid: boolean = password.length > 7;
67 | let isPassDoubleChecked: boolean = password === passwordCheck;
68 | let registerSuccess: boolean;
69 | //CHECK FIELD RULES HERE
70 | if(isEmailValid && isPassDoubleChecked && isPassValid) {
71 | dialogs.confirm('Email: ' + email + ' Password: ' + password + ' Password check: ' + passwordCheck).then(result => {
72 | console.log('Dialog result: ' + result);
73 | if(result) {
74 | this.toggle();
75 | }
76 | });
77 | registerSuccess = true;
78 | } else {
79 | dialogs.alert(this.alertMessage(isEmailValid, isPassValid, isPassDoubleChecked)).then(result => {
80 | console.log('Dialog result: ' + result);
81 | });
82 | registerSuccess = false;
83 | }
84 | return registerSuccess;
85 | }
86 |
87 | private alertMessage(isEmailValid: boolean, isPassValid: boolean, isPassDoubleChecked: boolean): string {
88 | let msg = '';
89 | if (!isEmailValid) msg += 'Email is not valid. ' ;
90 | if (!isPassValid) msg += 'Password is too short. ';
91 | if (!isPassDoubleChecked) msg += 'Passwords don\'t match.';
92 | return msg;
93 | }
94 |
95 | private setNativeElements() {
96 | this.modal=this.modalRef.nativeElement;
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/app/pages/login/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/pages/login/login.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/pickers/pickers.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-pickers-page',
7 | templateUrl: 'pickers.html',
8 | styleUrls: ['pickers.css']
9 | })
10 | export class PickersPage {
11 |
12 | private jedis: string[];
13 | private jediSelected: string;
14 | private date: string;
15 | private time: string;
16 |
17 | constructor(private _contentService: ContentService) {
18 | this.jedis = _contentService.getJedis();
19 | }
20 |
21 | public selectedDateChange(args) {
22 | this.date = this.padTwo(args.object.day) + '/' + this.padTwo(args.object.month) + '/' + args.object.year;
23 | }
24 |
25 | public selectedTimeChange(args) {
26 | this.time = this.padTwo(args.object.hour) + ':' + this.padTwo(args.object.minute);
27 | }
28 |
29 | public datePickerLoaded(args) {
30 | args.object.day = new Date(Date.now()).getDate();
31 | args.object.month = new Date(Date.now()).getMonth();
32 | args.object.year = new Date(Date.now()).getFullYear();
33 | }
34 |
35 | private padTwo(n: number) {
36 | return (n<10 ? '0' : '') + n;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/app/pages/pickers/pickers.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/pages/pickers/pickers.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/selectors/selectors.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-selectors-page',
7 | templateUrl: 'selectors.html',
8 | styleUrls: ['selectors.css']
9 | })
10 | export class SelectorsPage {
11 |
12 | private styles: any[];
13 |
14 | public constructor(private _contentService: ContentService) {
15 | this.styles = _contentService.getStyles();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/pages/selectors/selectors.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/pages/selectors/selectors.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/settings/settings.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | //USING PLUGIN: NATIVESCRIPT-THEMES
5 | var themes = require('nativescript-themes');
6 |
7 | @Component({
8 | moduleId: module.id,
9 | selector: 'sc-settings-page',
10 | templateUrl: 'settings.html',
11 | styleUrls: ['settings.css']
12 | })
13 | export class SettingsPage {
14 |
15 | private themes: any[];
16 |
17 | constructor(private _contentService: ContentService) {
18 | this.themes = _contentService.getThemes();
19 | }
20 |
21 | public applyTheme(theme: string) {
22 | themes.applyTheme(theme);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/pages/settings/settings.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/pages/settings/settings.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/signaturepad/signaturepad.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, ViewChild, ElementRef, AfterViewInit} from '@angular/core';
2 | /* IMPORTANT: registering DrawingPad UI component */
3 | import {registerElement} from 'nativescript-angular/element-registry';
4 | registerElement('DrawingPad', () => require('nativescript-drawingpad').DrawingPad);
5 | //import modules for saving the drawing
6 | import imageSource = require('image-source');
7 | import fs = require('file-system');
8 | import enums = require('ui/enums');
9 | import platform = require('platform');
10 |
11 | //USING PLUGIN: NATIVESCRIPT-DRAWINGPAD
12 |
13 | @Component({
14 | moduleId: module.id,
15 | selector: 'sc-signature-pad-page',
16 | templateUrl: 'signaturepad.html',
17 | styleUrls: ['signaturepad.css']
18 | })
19 | export class SignaturePadPage implements AfterViewInit {
20 |
21 | public isAndroid = platform.isAndroid;
22 | private images: any[] = [];
23 |
24 | @ViewChild('drawingPad') private drawingPadRef: ElementRef;
25 | private drawingPad;
26 |
27 |
28 | public getDrawingAsPic() {
29 | // get the drawing of the drawingpad
30 | this.drawingPad.getDrawing().then((data) => {
31 | console.log(data);
32 | this.images.push(data);
33 | }, (err) => {
34 | console.log(err);
35 | });
36 | }
37 |
38 | public getNoBGDrawing() {
39 | // get the drawing with transparent background (only Android)
40 | this.drawingPad.getTransparentDrawing().then((data) => {
41 | console.log(data);
42 | this.images.push(data);
43 | }, (err) => {
44 | console.log(err);
45 | });
46 | }
47 |
48 | public clearUserDrawing() {
49 | this.drawingPad.clearDrawing();
50 | }
51 | //Save into a private folder, not accessible from Users/External apps
52 | public saveDrawing() {
53 | this.drawingPad.getDrawing().then((data) => {
54 | console.log(data);
55 | var img = imageSource.fromNativeSource(data);
56 | var folder = fs.knownFolders.documents();
57 | var path = fs.path.join(folder.path, 'Test.png');
58 | var saved = img.saveToFile(path, enums.ImageFormat.png);
59 | }, (err) => {
60 | console.log(err);
61 | });
62 | }
63 |
64 | ngAfterViewInit() {
65 | this.drawingPad = this.drawingPadRef.nativeElement;
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/app/pages/signaturepad/signaturepad.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/pages/signaturepad/signaturepad.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/table/table.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 |
3 | @Component({
4 | moduleId: module.id,
5 | selector: 'sc-table-page',
6 | templateUrl: 'table.html',
7 | styleUrls: ['table.css']
8 | })
9 | export class TablePage {
10 | }
11 |
--------------------------------------------------------------------------------
/app/pages/table/table.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/app/pages/table/table.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/tasks/tasks.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, ViewChild, ElementRef, NgZone, AfterViewInit} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 |
4 | @Component({
5 | moduleId: module.id,
6 | selector: 'sc-tasks-page',
7 | templateUrl: 'tasks.html',
8 | })
9 | export class TasksPage implements AfterViewInit {
10 |
11 | private tasks: any[];
12 |
13 | @ViewChild('input') private inputRef: ElementRef;
14 | private input;
15 |
16 | constructor(private _contentService: ContentService, private _ngZone: NgZone) {
17 | this.tasks = _contentService.getTasks();
18 | }
19 |
20 | ngAfterViewInit() {
21 | this.input = this.inputRef.nativeElement;
22 | }
23 |
24 | //TOGGLES TASK STATE
25 | public checkTap(task, args) {
26 | task.isDone = !task.isDone;
27 | let icon = args.object;
28 | icon.animate({
29 | scale: { x: 0, y: 0 },
30 | duration: 100,
31 | }).then(() => {
32 | icon.animate({
33 | scale: { x: 1, y: 1 },
34 | duration: 100,
35 | });
36 | });
37 | }
38 |
39 | //ADDS A TASK
40 | public add() {
41 | if (this.input.text !== '') {
42 | this.tasks.push({ isDone: false, text: this.input.text });
43 | }
44 | this.input.text = '';
45 | }
46 |
47 | //REMOVES SELECTED TASK
48 | public removeTap(index, args) {
49 | args.object.parent.animate({
50 | translate: { x: 400, y: 0 },
51 | duration: 200
52 | }).then(() => {
53 | this.tasks.splice(index, 1);
54 | args.object.parent.translateX = 0;
55 | });
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/pages/tasks/tasks.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/pages/text/text.component.ts:
--------------------------------------------------------------------------------
1 | import {Component} from '@angular/core';
2 | import {ContentService} from '../../common/services/content.service';
3 | import {Page} from 'ui/page';
4 |
5 | @Component({
6 | moduleId: module.id,
7 | selector: 'sc-text-page',
8 | templateUrl: 'text.html',
9 | styleUrls: ['text.css']
10 | })
11 | export class TextPage {
12 |
13 | private styleSelected: number = 0;
14 | private colorSelected: number = 0;
15 | private style: string = 'light';
16 | private textStyles: any[];
17 | private styles: any[];
18 | private colors: any[];
19 | private opening: string;
20 | private rounded: boolean = false;
21 |
22 | public constructor(private _contentService: ContentService, private page: Page) {
23 | this.colors = _contentService.getColors();
24 | this.opening = _contentService.getOpening();
25 | this.styles = _contentService.getStyles();
26 | this.textStyles = _contentService.getTextStyles();
27 | }
28 |
29 | public textFieldLoaded(args) {
30 | args.object.dismissSoftInput();
31 | if (args.object.ios) {
32 | args.object.ios.endEditing(true);
33 | } else if (args.object.android) {
34 | args.object.android.clearFocus();
35 | }
36 | }
37 |
38 | public switchChange(args) {
39 | this.rounded = !this.rounded;
40 | }
41 |
42 | public selectedIndexChanged(args) {
43 | this.styleSelected = args.object.selectedIndex;
44 | }
45 |
46 | public selectedColorChanged(args) {
47 | this.colorSelected = args.object.selectedIndex;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/pages/text/text.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/pages/text/text.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/views/views.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, ViewChild, ElementRef, AfterViewInit} from '@angular/core';
2 |
3 | @Component({
4 | moduleId: module.id,
5 | selector: 'sc-views-page',
6 | templateUrl: 'views.html',
7 | styleUrls: ['views.css']
8 | })
9 | export class ViewsPage implements AfterViewInit {
10 |
11 |
12 | @ViewChild('htmlCode') private htmlCodeRef: ElementRef;
13 | private htmlCode;
14 | @ViewChild('htmlView') private htmlViewRef: ElementRef;
15 | private htmlView;
16 |
17 | ngAfterViewInit() {
18 | this.setNativeElements();
19 | this.setHtmlCode();
20 | }
21 |
22 | public setHtmlCode() {
23 | this.htmlView.html = this.htmlCode.text;
24 | }
25 |
26 | private setNativeElements() {
27 | this.htmlCode = this.htmlCodeRef.nativeElement;
28 | this.htmlView = this.htmlViewRef.nativeElement;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/pages/views/views.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/pages/views/views.scss:
--------------------------------------------------------------------------------
1 | .empty-scss-breaks-sass-plugin {
2 | background: transparent;
3 | }
--------------------------------------------------------------------------------
/app/pages/wrapper.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/pages/wrapper.component.ts:
--------------------------------------------------------------------------------
1 | // angular
2 | import {Component, ViewChild, ChangeDetectorRef, OnInit, AfterViewInit, trigger, style, animate, state, transition} from '@angular/core';
3 | import {Router, NavigationEnd} from '@angular/router';
4 |
5 | // nativescript
6 | import {RadSideDrawerComponent, SideDrawerType} from 'nativescript-telerik-ui-pro/sidedrawer/angular';
7 | import {DrawerTransitionBase, SlideInOnTopTransition, RadSideDrawer} from 'nativescript-telerik-ui-pro/sidedrawer';
8 | import {SideDrawerComponent} from '../common/components/side-drawer/side-drawer.component';
9 | import {ExitModalComponent} from '../common/components/exit-modal/exit-modal.component';
10 | import {Page} from 'ui/page';
11 | var application = require('application');
12 |
13 | @Component({
14 | moduleId: module.id,
15 | selector: 'sc-wrapper',
16 | templateUrl: 'wrapper.component.html',
17 | animations: [
18 | trigger('state', [
19 | state('inactive', style({ transform: 'rotate(0)' })),
20 | state('active', style({ transform: 'rotate(90)' })),
21 | transition('inactive => active', [animate('200ms ease-out')]),
22 | transition('active => inactive', [animate('200ms ease-out')]),
23 | ])
24 | ]
25 | })
26 | export class WrapperComponent implements OnInit, AfterViewInit {
27 |
28 | @ViewChild(RadSideDrawerComponent) public drawerComponent: RadSideDrawerComponent;
29 | private _sideDrawerTransition: DrawerTransitionBase;
30 | private drawer: SideDrawerType;
31 |
32 | constructor(
33 | private page: Page,
34 | private changeDetectionRef: ChangeDetectorRef,
35 | private router: Router) {
36 | page.actionBarHidden = false;
37 | if (application.android) {
38 | application.android.on(application.AndroidApplication.activityBackPressedEvent, zonedCallback(this.backEvent.bind(this)));
39 | }
40 | page.on('loaded', this.onLoaded, this);
41 | }
42 |
43 | public get sideDrawerTransition(): DrawerTransitionBase {
44 | return this._sideDrawerTransition;
45 | }
46 |
47 | public toggle() {
48 | this.drawer.toggleDrawerState();
49 | }
50 |
51 | public onLoaded(args) {
52 | this._sideDrawerTransition = new SlideInOnTopTransition();
53 | }
54 |
55 | ngOnInit() {
56 | this.router.events.subscribe((e) => {
57 | if (e instanceof NavigationEnd) {
58 | this.drawer.closeDrawer();
59 | }
60 | });
61 | }
62 |
63 | ngAfterViewInit() {
64 | this.drawer = this.drawerComponent.sideDrawer;
65 | this.changeDetectionRef.detectChanges();
66 | }
67 |
68 | public backEvent(args) {
69 | this.drawer.closeDrawer();
70 | args.cancel = true;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/app/tests/loginTest.js:
--------------------------------------------------------------------------------
1 | require('reflect-metadata');
2 | var loginComponent = require("../pages/login/login.component");
3 |
4 | describe("login unit test", () => {
5 | beforeEach(() => {
6 | this.loginPage = new loginComponent.LoginPage();
7 | })
8 | it("check login function", () => {
9 | expect(this.loginPage.login("samplemail@hotmail.com","0123456789")).toBe(true);
10 | expect(this.loginPage.login("samplemailhotmail.com","0123456789")).toBe(false);
11 | });
12 | it("check register function", () => {
13 | expect(this.loginPage.register("samplemail@hotmail.com", "0123456789", "0123456789")).toBe(true);
14 | expect(this.loginPage.register("samplemail@hotmail.com", "0123", "0123")).toBe(false);
15 | expect(this.loginPage.register("samplemailhotmail.com", "0123456789", "0123456789")).toBe(false);
16 | expect(this.loginPage.register("samplemailhotmail.com", "0123456789", "01234567")).toBe(false);
17 | });
18 | });
19 |
--------------------------------------------------------------------------------
/app/themes/app_var.scss:
--------------------------------------------------------------------------------
1 | /* VARS */
2 |
3 | /* COLOR */
4 |
5 | $primary-color : #1B3C80;
6 | $secondary-color : white;
7 | $tertiary-color : #e8eaf6 ;
8 | $quaternary-color : #abc1ed ;
9 | $darkest-color : #0d1e3f;
10 |
11 | $light-primary : white;
12 | $light-secondary: #e0e0e0;
13 |
14 | $stable-primary : #bdbdbd;
15 | $stable-secondary: #757575;
16 |
17 | $dark-primary : #424242;
18 | $dark-secondary: #212121;
19 |
20 | $primary-primary : #2196f3;
21 | $primary-secondary: #1976d2;
22 |
23 | $info-primary : #4fc3f7;
24 | $info-secondary: #03a9f4;
25 |
26 | $success-primary : #00e676;
27 | $success-secondary: #00c853;
28 |
29 | $warning-primary : #fdd835;
30 | $warning-secondary: #f9a825;
31 |
32 | $danger-primary : #f44336;
33 | $danger-secondary: #c62828;
34 |
35 | /* SIZE */
36 |
37 | $small-button-height: 30;
38 | $medium-button-height: 50;
39 | $large-button-height: 70;
40 |
41 | $small-text-field-height: 25;
42 | $medium-text-field-height: 45;
43 |
44 | $medium-search-bar-height: 45;
45 |
46 | $icon-size: 50;
47 |
48 | $small-radius: 3;
49 | $medium-radius: 10;
50 | $big-radius: 20;
51 |
--------------------------------------------------------------------------------
/app/themes/dark_side_var.scss:
--------------------------------------------------------------------------------
1 | /* VARS */
2 |
3 | /* COLOR */
4 |
5 | $primary-color : #212121;
6 | $secondary-color : #c62828;
7 | $tertiary-color : #424242 ;
8 | $quaternary-color : #941e1e ;
9 | $darkest-color : black;
10 |
11 | $light-primary : white;
12 | $light-secondary: #e0e0e0;
13 |
14 | $stable-primary : #bdbdbd;
15 | $stable-secondary: #757575;
16 |
17 | $dark-primary : #424242;
18 | $dark-secondary: #212121;
19 |
20 | $primary-primary : #2196f3;
21 | $primary-secondary: #1976d2;
22 |
23 | $info-primary : #4fc3f7;
24 | $info-secondary: #03a9f4;
25 |
26 | $success-primary : #00e676;
27 | $success-secondary: #00c853;
28 |
29 | $warning-primary : #fdd835;
30 | $warning-secondary: #f9a825;
31 |
32 | $danger-primary : #f44336;
33 | $danger-secondary: #c62828;
34 |
35 | /* SIZE */
36 |
37 | $small-button-height: 30;
38 | $medium-button-height: 50;
39 | $large-button-height: 70;
40 |
41 | $small-text-field-height: 25;
42 | $medium-text-field-height: 45;
43 |
44 | $medium-search-bar-height: 45;
45 |
46 | $icon-size: 50;
47 |
48 | $small-radius: 3;
49 | $medium-radius: 10;
50 | $big-radius: 20;
51 |
--------------------------------------------------------------------------------
/app/themes/neon_var.scss:
--------------------------------------------------------------------------------
1 | /* VARS */
2 |
3 | /* COLOR */
4 |
5 | $primary-color : #212121;
6 | $secondary-color : #76ff03;
7 | $tertiary-color : #424242 ;
8 | $quaternary-color : #5ccc00;
9 | $darkest-color : black;
10 |
11 | $light-primary : white;
12 | $light-secondary: #e0e0e0;
13 |
14 | $stable-primary : #bdbdbd;
15 | $stable-secondary: #757575;
16 |
17 | $dark-primary : #424242;
18 | $dark-secondary: #212121;
19 |
20 | $primary-primary : #2196f3;
21 | $primary-secondary: #1976d2;
22 |
23 | $info-primary : #4fc3f7;
24 | $info-secondary: #03a9f4;
25 |
26 | $success-primary : #00e676;
27 | $success-secondary: #00c853;
28 |
29 | $warning-primary : #fdd835;
30 | $warning-secondary: #f9a825;
31 |
32 | $danger-primary : #f44336;
33 | $danger-secondary: #c62828;
34 |
35 | /* SIZE */
36 |
37 | $small-button-height: 30;
38 | $medium-button-height: 50;
39 | $large-button-height: 70;
40 |
41 | $small-text-field-height: 25;
42 | $medium-text-field-height: 45;
43 |
44 | $medium-search-bar-height: 45;
45 |
46 | $icon-size: 50;
47 |
48 | $small-radius: 3;
49 | $medium-radius: 10;
50 | $big-radius: 20;
51 |
--------------------------------------------------------------------------------
/app/themes/pinky_var.scss:
--------------------------------------------------------------------------------
1 | /* VARS */
2 |
3 | /* COLOR */
4 |
5 | $primary-color : #f06292;
6 | $secondary-color : white;
7 | $tertiary-color : #f8bbd0 ;
8 | $quaternary-color: #f38cb0;
9 | $darkest-color : #d81b60;
10 |
11 | $light-primary : white;
12 | $light-secondary: #e0e0e0;
13 |
14 | $stable-primary : #bdbdbd;
15 | $stable-secondary: #757575;
16 |
17 | $dark-primary : #424242;
18 | $dark-secondary: #212121;
19 |
20 | $primary-primary : #2196f3;
21 | $primary-secondary: #1976d2;
22 |
23 | $info-primary : #4fc3f7;
24 | $info-secondary: #03a9f4;
25 |
26 | $success-primary : #00e676;
27 | $success-secondary: #00c853;
28 |
29 | $warning-primary : #fdd835;
30 | $warning-secondary: #f9a825;
31 |
32 | $danger-primary : #f44336;
33 | $danger-secondary: #c62828;
34 |
35 | /* SIZE */
36 |
37 | $small-button-height: 30;
38 | $medium-button-height: 50;
39 | $large-button-height: 70;
40 |
41 | $small-text-field-height: 25;
42 | $medium-text-field-height: 45;
43 |
44 | $medium-search-bar-height: 45;
45 |
46 | $icon-size: 50;
47 |
48 | $small-radius: 3;
49 | $medium-radius: 10;
50 | $big-radius: 20;
51 |
--------------------------------------------------------------------------------
/e2e-tests/homepage-test.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | var nsAppium = require("nativescript-dev-appium");
3 |
4 | describe("android simple", function () {
5 |
6 | var driver;
7 |
8 | before(function (done) {
9 | driver = nsAppium.createDriver();
10 | done();
11 | });
12 |
13 | after(function () {
14 | return driver
15 | .quit()
16 | .finally(function () {
17 | console.log("Driver quit successfully");
18 | });
19 | });
20 |
21 | function openSideDrawer(driver){
22 | return driver
23 | .elementByAccessibilityId("toggleSideDrawerButton")
24 | .should.eventually.exist
25 | .tap()
26 | .elementByAccessibilityId("sideDrawer")
27 | .should.eventually.exist
28 | }
29 |
30 | function openSubSideDrawer(driver, buttonID){
31 | return driver
32 | .elementByAccessibilityId("sideDrawer")
33 | .should.eventually.exist
34 | .elementByAccessibilityId(buttonID)
35 | .should.eventually.exist
36 | .tap()
37 | .elementByAccessibilityId("subSideDrawer")
38 | .should.eventually.exist
39 | }
40 |
41 | it("should open home page", function () {
42 | return openSideDrawer(driver)
43 | .elementByAccessibilityId("HomeButton")
44 | .should.eventually.exist
45 | .tap()
46 | .elementByAccessibilityId("welcomeMessage")
47 | .should.eventually.exist
48 | });
49 | });
50 |
--------------------------------------------------------------------------------
/features/step_definitions/step_sample.js:
--------------------------------------------------------------------------------
1 | var wd = require("wd");
2 |
3 | module.exports = function () {
4 |
5 | function tap(button, callback) {
6 | this.driver
7 | .elementByAccessibilityId(button)
8 | .should.eventually.exist
9 | .tap()
10 | .should.eventually.notify(callback);
11 | }
12 |
13 | this.When(/^I am on the main page$/, function (callback) {
14 | this.driver
15 | .elementByAccessibilityId('mainPage')
16 | .should.eventually.exist
17 | .and.notify(callback);
18 | });
19 |
20 | this.Given(/^I open the sidedrawer$/, function (callback) {
21 | tap.call(this, 'toggleSideDrawerButton', callback);
22 | });
23 |
24 | this.Given(/^I open the subSideDrawer "(.*)"$/, function (button, callback) {
25 | tap.call(this, button + 'Button', callback);
26 | });
27 |
28 | this.Given(/^Platform is "(.*)"$/, function (platformName, callback) {
29 | console.log(this.platformName);
30 | if (this.platformName !== platformName){
31 | callback(null, 'pending');
32 | } else {
33 | callback();
34 | }
35 |
36 | });
37 |
38 | this.Given(/^I can see "(.*)"$/, function (element, callback) {
39 | this.driver
40 | .elementByAccessibilityId(element)
41 | .should.eventually.exist
42 | .and.notify(callback);
43 | });
44 |
45 | this.When(/^I Select the button "(.*)"$/, function (button, callback) {
46 | tap.call(this, button, callback);
47 | });
48 |
49 | this.When(/^I type "(.*)" in "(.*)"$/, function (text, field, callback) {
50 | this.driver
51 | .elementByAccessibilityId(field)
52 | .should.eventually.exist
53 | .sendKeys(text)
54 | .should.eventually.notify(callback);
55 | });
56 |
57 | this.When(/^I tap back button$/, function (callback) {
58 | this.driver
59 | .back()
60 | .should.eventually.notify(callback);
61 | });
62 |
63 | this.When(/^I hide keyboard$/, function (callback) {
64 | this.driver
65 | .hideKeyboard('Return')
66 | .should.eventually.notify(callback);
67 | });
68 |
69 | this.When(/^I wait "(.*)"$/, function (duration, callback) {
70 | this.driver
71 | .sleep(duration)
72 | .should.eventually.notify(callback);
73 | });
74 |
75 | this.Then(/^I should read "(.*)" in "(.*)"$/, function (text, element, callback) {
76 | this.driver
77 | .elementByAccessibilityId(element)
78 | .text().should.eventually.equal(text)
79 | .and.notify(callback);
80 | });
81 |
82 | this.Then(/^I should see "(.*)"$/, function (element, callback) {
83 | this.driver
84 | .elementByAccessibilityId(element)
85 | .should.eventually.exist
86 | .and.notify(callback);
87 | });
88 | };
--------------------------------------------------------------------------------
/features/support/env.js:
--------------------------------------------------------------------------------
1 | // features/support/env.js
2 |
3 | var configure = function () {
4 | this.setDefaultTimeout(120000);
5 | };
6 |
7 | module.exports = configure;
--------------------------------------------------------------------------------
/features/support/world.js:
--------------------------------------------------------------------------------
1 | // features/support/world.js
2 | var nsAppium = require('nativescript-dev-cucumber');
3 | var testRunType = process.env.TEST_RUN_TYPE;
4 | var driver;
5 |
6 | if (testRunType === 'android') {
7 | driver = nsAppium.createDriver({
8 | browserName: '',
9 | 'appium-version': '1.5',
10 | platformName: 'Android',
11 | platformVersion: '4.4.2',
12 | deviceName: 'Android Emulator',
13 | app: undefined // will be set later
14 | });
15 | } else if (testRunType === 'ios-simulator' || testRunType === 'ios') {
16 | driver = nsAppium.createDriver({
17 | browserName: '',
18 | 'appium-version': '1.5',
19 | platformName: 'iOS',
20 | platformVersion: '9.3',
21 | deviceName: 'iPhone 6',
22 | app: undefined // will be set later
23 | });
24 | } else {
25 | throw new Error('Incorrect test run type: ' + testRunType);
26 | }
27 |
28 | function World() {
29 | this.driver = driver;
30 | this.platformName = testRunType === 'android'? 'Android':'iOS';
31 | }
32 |
33 | module.exports = function() {
34 | this.World = World;
35 |
36 | this.AfterFeatures(function () {
37 | driver
38 | .quit()
39 | .finally(function () {
40 | console.log('Driver quit successfully');
41 | });
42 | });
43 | };
--------------------------------------------------------------------------------
/features/test1_navigation.feature:
--------------------------------------------------------------------------------
1 | Feature: Router navigation
2 | As a user of the mobile application
3 | I should be able to navigate through the application
4 |
5 | # INIT TEST
6 | Scenario: Initializing
7 | Given I wait "15000"
8 | When I am on the main page
9 | Then I should see "toggleSideDrawerButton"
10 |
11 | # BUTTONS PAGE TEST
12 | Scenario: Page "buttons"
13 | Given I open the sidedrawer
14 | And I open the subSideDrawer "Components"
15 | When I Select the button "buttonsButton"
16 | Then I should read "BUTTONS" in "title"
17 |
18 | # TEXT PAGE TEST
19 | Scenario: Page "text"
20 | Given I open the sidedrawer
21 | And I open the subSideDrawer "Components"
22 | When I Select the button "textButton"
23 | Then I should read "TEXT" in "title"
24 |
25 | # LISTS PAGE TEST
26 | Scenario: Page "lists"
27 | Given I open the sidedrawer
28 | And I open the subSideDrawer "Components"
29 | When I Select the button "listsButton"
30 | Then I should read "LISTS" in "title"
31 |
32 | # PICKERS PAGE TEST
33 | Scenario: Page "pickers"
34 | Given I open the sidedrawer
35 | And I open the subSideDrawer "Components"
36 | When I Select the button "pickersButton"
37 | Then I should read "PICKERS" in "title"
38 |
39 | # LAYOUTS PAGE TEST
40 | Scenario: Page "layouts"
41 | Given I open the sidedrawer
42 | And I open the subSideDrawer "Components"
43 | When I Select the button "layoutsButton"
44 | Then I should read "LAYOUTS" in "title"
45 |
46 | # SELECTORS PAGE TEST
47 | Scenario: Page "selectors"
48 | Given I open the sidedrawer
49 | And I open the subSideDrawer "Components"
50 | When I Select the button "selectorsButton"
51 | Then I should read "SELECTORS" in "title"
52 |
53 | # INDICATORS PAGE TEST
54 | Scenario: Page "indicators"
55 | Given I open the sidedrawer
56 | And I open the subSideDrawer "Components"
57 | When I Select the button "indicatorsButton"
58 | Then I should read "INDICATORS" in "title"
59 |
60 | # IMAGES PAGE TEST
61 | Scenario: Page "images"
62 | Given I open the sidedrawer
63 | And I open the subSideDrawer "Components"
64 | When I Select the button "imagesButton"
65 | Then I should read "IMAGES" in "title"
66 |
67 | # VIEWS PAGE TEST
68 | Scenario: Page "views"
69 | Given I open the sidedrawer
70 | And I open the subSideDrawer "Components"
71 | When I Select the button "viewsButton"
72 | Then I should read "VIEWS" in "title"
73 |
74 | # DIALOGS PAGE TEST
75 | Scenario: Page "dialogs"
76 | Given I open the sidedrawer
77 | And I open the subSideDrawer "Components"
78 | When I Select the button "dialogsButton"
79 | Then I should read "DIALOGS" in "title"
80 |
81 | # CAMERA PAGE TEST
82 | Scenario: Page "camera"
83 | Given I open the sidedrawer
84 | And I open the subSideDrawer "Hardware"
85 | When I Select the button "cameraButton"
86 | Then I should read "CAMERA" in "title"
87 |
88 | # ACCELEROMETER PAGE TEST
89 | Scenario: Page "accelerometer"
90 | Given I open the sidedrawer
91 | And I open the subSideDrawer "Hardware"
92 | When I Select the button "accelerometerButton"
93 | Then I should read "ACCELEROMETER" in "title"
94 |
95 | # LOCATION PAGE TEST
96 | Scenario: Page "location"
97 | Given I open the sidedrawer
98 | And I open the subSideDrawer "Hardware"
99 | When I Select the button "locationButton"
100 | Then I should read "LOCATION" in "title"
101 |
102 | # LOGIN PAGE TEST
103 | Scenario: Page "login"
104 | Given I open the sidedrawer
105 | And I open the subSideDrawer "Examples"
106 | When I Select the button "loginButton"
107 | Then I should read "LOGIN" in "title"
108 |
109 | # TABLE PAGE TEST
110 | Scenario: Page "table"
111 | Given I open the sidedrawer
112 | And I open the subSideDrawer "Examples"
113 | When I Select the button "tableButton"
114 | Then I should read "TABLE" in "title"
115 |
116 | # CONTACTS PAGE TEST
117 | Scenario: Page "contacts"
118 | Given I open the sidedrawer
119 | And I open the subSideDrawer "Examples"
120 | When I Select the button "contactsButton"
121 | Then I should read "CONTACTS" in "title"
122 |
123 | # CODESCANNER PAGE TEST
124 | Scenario: Page "codescanner"
125 | Given I open the sidedrawer
126 | And I open the subSideDrawer "Examples"
127 | When I Select the button "codescannerButton"
128 | Then I should read "BARCODE SCANNER" in "title"
129 |
130 | # DATABASE PAGE TEST
131 | Scenario: Page "database"
132 | Given I open the sidedrawer
133 | And I open the subSideDrawer "Examples"
134 | When I Select the button "databaseButton"
135 | Then I should read "DATABASE" in "title"
136 |
137 | # ANIMATIONS PAGE TEST
138 | Scenario: Page "animations"
139 | Given I open the sidedrawer
140 | And I open the subSideDrawer "Examples"
141 | When I Select the button "animationsButton"
142 | Then I should read "ANIMATIONS" in "title"
143 |
144 |
145 | # TASKS PAGE TEST
146 | Scenario: Page "tasks"
147 | Given I open the sidedrawer
148 | And I open the subSideDrawer "Examples"
149 | When I Select the button "tasksButton"
150 | Then I should read "TASKS" in "title"
151 |
152 |
153 | # SIGNATURE PAD PAGE TEST
154 | Scenario: Page "signaturepad"
155 | Given I open the sidedrawer
156 | And I open the subSideDrawer "Examples"
157 | When I Select the button "signaturepadButton"
158 | Then I should read "SIGNATURE" in "title"
159 |
160 | # CHARTS PAGE TEST
161 | Scenario: Page "charts"
162 | Given Platform is "Android"
163 | And I open the sidedrawer
164 | And I open the subSideDrawer "Examples"
165 | When I Select the button "chartsButton"
166 | And I wait "3000"
167 | And I tap back button
168 | Then I should read "CHARTS" in "title"
169 |
170 | # SETTINGS PAGE TEST
171 | Scenario: Page "settings"
172 | Given I open the sidedrawer
173 | When I Select the button "SettingsButton"
174 | Then I should read "SETTINGS" in "title"
175 |
176 | # SETTINGS PAGE TEST
177 | Scenario: Page "settings"
178 | Given I open the sidedrawer
179 | When I Select the button "HomeButton"
180 | Then I should read "Welcome to GFT's NativeScript Showcase" in "welcomeMessage"
--------------------------------------------------------------------------------
/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function(config) {
2 | config.set({
3 |
4 | // base path that will be used to resolve all patterns (eg. files, exclude)
5 | basePath: '',
6 |
7 |
8 | // frameworks to use
9 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
10 | frameworks: ['jasmine'],
11 |
12 |
13 | // list of files / patterns to load in the browser
14 | files: [
15 | 'app/**/*.js',
16 | ],
17 |
18 |
19 | // list of files to exclude
20 | exclude: [
21 | ],
22 |
23 |
24 | // preprocess matching files before serving them to the browser
25 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
26 | preprocessors: {
27 | },
28 |
29 |
30 | // test results reporter to use
31 | // possible values: 'dots', 'progress'
32 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
33 | reporters: ['progress'],
34 |
35 |
36 | // web server port
37 | port: 9876,
38 |
39 |
40 | // enable / disable colors in the output (reporters and logs)
41 | colors: true,
42 |
43 |
44 | // level of logging
45 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
46 | logLevel: config.LOG_INFO,
47 |
48 |
49 | // enable / disable watching file and executing tests whenever any file changes
50 | autoWatch: true,
51 |
52 |
53 | // start these browsers
54 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
55 | browsers: [],
56 |
57 | customLaunchers: {
58 | android: {
59 | base: 'NS',
60 | platform: 'android'
61 | },
62 | ios: {
63 | base: 'NS',
64 | platform: 'ios'
65 | },
66 | ios_simulator: {
67 | base: 'NS',
68 | platform: 'ios',
69 | arguments: ['--emulator']
70 | }
71 | },
72 |
73 | // Continuous Integration mode
74 | // if true, Karma captures browsers, runs the tests and exits
75 | singleRun: false
76 | })
77 | }
78 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript Application",
3 | "license": "SEE LICENSE IN ",
4 | "readme": "NativeScript Application",
5 | "repository": "",
6 | "nativescript": {
7 | "id": "gft.nativescript.showcase",
8 | "tns-android": {
9 | "version": "2.4.1"
10 | },
11 | "tns-ios": {
12 | "version": "2.4.0"
13 | }
14 | },
15 | "dependencies": {
16 | "@angular/common": "2.4.3",
17 | "@angular/compiler": "2.4.3",
18 | "@angular/core": "2.4.3",
19 | "@angular/forms": "2.4.3",
20 | "@angular/http": "2.4.3",
21 | "@angular/platform-browser": "2.4.3",
22 | "@angular/platform-browser-dynamic": "2.4.3",
23 | "@angular/router": "3.4.3",
24 | "email-validator": "1.0.7",
25 | "nativescript-accelerometer": "1.0.0",
26 | "nativescript-angular": "1.4.1",
27 | "nativescript-barcodescanner": "1.3.5",
28 | "nativescript-camera": "0.0.8",
29 | "nativescript-drawingpad": "1.1.2",
30 | "nativescript-geolocation": "0.0.19",
31 | "nativescript-master-technology": "1.1.0",
32 | "nativescript-ng2-translate": "2.0.0",
33 | "nativescript-sqlite": "1.1.2",
34 | "nativescript-telerik-ui-pro": "1.6.1",
35 | "nativescript-theme-core": "1.0.3",
36 | "nativescript-themes": "1.1.0",
37 | "nativescript-unit-test-runner": "0.3.4",
38 | "ng2-translate": "5.0.0",
39 | "reflect-metadata": "0.1.10",
40 | "rxjs": "5.0.3",
41 | "tns-core-modules": "2.5.1"
42 | },
43 | "devDependencies": {
44 | "babel-traverse": "6.23.1",
45 | "babel-types": "6.23.0",
46 | "babylon": "6.16.1",
47 | "lazy": "1.0.11",
48 | "nativescript-dev-appium": "0.0.11",
49 | "nativescript-dev-cucumber": "0.1.4",
50 | "nativescript-dev-sass": "0.4.2",
51 | "nativescript-dev-android-snapshot": "0.0.7",
52 | "nativescript-dev-typescript": "0.3.5",
53 | "tslint": "3.15.1",
54 | "typescript": "2.1.6",
55 | "chai": "3.5.0",
56 | "chai-as-promised": "6.0.0",
57 | "wd": "0.4.0",
58 | "zone.js": "0.7.7"
59 | },
60 | "scripts": {
61 | "appium-android": "tns build android && nativescript-dev-appium android",
62 | "appium-ios-simulator": "tns build ios && nativescript-dev-appium ios-simulator",
63 | "cucumber-android": "tns build android && nativescript-dev-cucumber android",
64 | "cucumber-ios-simulator": "tns build ios && nativescript-dev-cucumber ios-simulator",
65 | "appium": "nativescript-dev-appium",
66 | "appium-ios": "tns build ios && npm run appium --runType=ios"
67 | }
68 | }
--------------------------------------------------------------------------------
/references.d.ts:
--------------------------------------------------------------------------------
1 | /// Needed for autocompletion and compilation.
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5",
5 | "experimentalDecorators": true,
6 | "emitDecoratorMetadata": true,
7 | "noEmitHelpers": true,
8 | "noEmitOnError": true
9 | },
10 | "exclude": [
11 | "node_modules",
12 | "platforms",
13 | "**/*.aot.ts"
14 | ]
15 | }
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": ["node_modules/codelyzer"],
3 | "rules": {
4 | "class-name": true,
5 | "curly": false,
6 | "eofline": true,
7 | "indent": ["spaces"],
8 | "max-line-length": [true, 140],
9 | "member-ordering": [true,
10 | "public-before-private",
11 | "static-before-instance",
12 | "variables-before-functions"
13 | ],
14 | "no-arg": true,
15 | "no-construct": true,
16 | "no-duplicate-key": true,
17 | "no-duplicate-variable": true,
18 | "no-empty": true,
19 | "no-eval": true,
20 | "no-trailing-whitespace": true,
21 | "no-unused-expression": true,
22 | "no-unused-variable": true,
23 | "no-unreachable": true,
24 | "no-use-before-declare": true,
25 | "one-line": [true,
26 | "check-open-brace",
27 | "check-catch",
28 | "check-else",
29 | "check-whitespace"
30 | ],
31 | "quotemark": [true, "single"],
32 | "semicolon": [true, "always"],
33 | "trailing-comma": true,
34 | "triple-equals": true,
35 | "variable-name": false,
36 |
37 | "directive-selector-name": [true, "camelCase"],
38 | "component-selector-name": [true, "kebab-case"],
39 | "directive-selector-type": [true, "attribute"],
40 | "component-selector-type": [true, "element"],
41 | "directive-selector-prefix": [true, "sc"],
42 | "component-selector-prefix": [true, "sc"],
43 | "use-input-property-decorator": true,
44 | "use-output-property-decorator": true,
45 | "use-host-property-decorator": true,
46 | "no-input-rename": true,
47 | "no-output-rename": true,
48 | "use-life-cycle-interface": true,
49 | "use-pipe-transform-interface": true,
50 | "pipe-naming": [true, "camelCase", "sc"],
51 | "component-class-suffix": false,
52 | "directive-class-suffix": true
53 | }
54 | }
55 |
--------------------------------------------------------------------------------