├── demo
├── app
│ ├── vendor-platform.ios.ts
│ ├── app.component.html
│ ├── App_Resources
│ │ ├── iOS
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ ├── icon-29.png
│ │ │ │ │ ├── icon-40.png
│ │ │ │ │ ├── icon-76.png
│ │ │ │ │ ├── icon-1024.png
│ │ │ │ │ ├── icon-29@2x.png
│ │ │ │ │ ├── icon-29@3x.png
│ │ │ │ │ ├── icon-40@2x.png
│ │ │ │ │ ├── icon-40@3x.png
│ │ │ │ │ ├── icon-60@2x.png
│ │ │ │ │ ├── icon-60@3x.png
│ │ │ │ │ ├── icon-76@2x.png
│ │ │ │ │ ├── icon-83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchImage.launchimage
│ │ │ │ │ ├── Default.png
│ │ │ │ │ ├── Default@2x.png
│ │ │ │ │ ├── Default-568h@2x.png
│ │ │ │ │ ├── Default-667h@2x.png
│ │ │ │ │ ├── Default-736h@3x.png
│ │ │ │ │ ├── Default-Landscape.png
│ │ │ │ │ ├── Default-Portrait.png
│ │ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchScreen.Center.imageset
│ │ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ └── LaunchScreen.AspectFill.imageset
│ │ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── build.xcconfig
│ │ │ ├── Info.plist
│ │ │ └── LaunchScreen.storyboard
│ │ └── Android
│ │ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ ├── drawable-hdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-ldpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── icon.png
│ │ │ ├── logo.png
│ │ │ └── background.png
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ ├── drawable-nodpi
│ │ │ └── splash_screen.xml
│ │ │ ├── app.gradle
│ │ │ └── AndroidManifest.xml
│ ├── tools
│ │ └── assets
│ │ │ ├── demo.ios.png
│ │ │ ├── screenshot.png
│ │ │ └── demo.android.png
│ ├── package.json
│ ├── app.component.ts
│ ├── main.ts
│ ├── main.aot.ts
│ ├── home
│ │ ├── home.component.css
│ │ ├── home-routing.module.ts
│ │ ├── home.module.ts
│ │ ├── home.component.ios.html
│ │ ├── home.component.android.html
│ │ └── home.component.ts
│ ├── vendor.ts
│ ├── vendor-platform.android.ts
│ ├── app-routing.module.ts
│ ├── app.css
│ ├── app.module.ts
│ ├── README.md
│ └── LICENSE
├── .nsbuildinfo
├── tsconfig.json
├── tsconfig.aot.json
└── package.json
├── src
├── platforms
│ ├── ios
│ │ ├── build.xcconfig
│ │ ├── Info.plist
│ │ └── README.md
│ └── android
│ │ ├── AndroidManifest.xml
│ │ ├── include.gradle
│ │ └── README.md
├── .npmignore
├── angular
│ ├── ng-shadow.module.d.ts
│ ├── ng-shadow.module.ts
│ ├── ng-shadow.directive.d.ts
│ └── ng-shadow.directive.ts
├── common
│ ├── ios-data.model.ts
│ ├── shape.enum.ts
│ ├── shape.enum.d.ts
│ ├── android-data.model.ts
│ ├── ios-data.model.d.ts
│ ├── android-data.model.d.ts
│ ├── elevation.enum.ts
│ ├── shadow.d.ts
│ ├── elevation.enum.d.ts
│ └── shadow.ts
├── ng-shadow.ts
├── tsconfig.json
├── tsconfig.ngc.json
├── package.json
└── package-lock.json
├── publish
├── publish.sh
├── package.json
├── pack.sh
└── package-lock.json
├── .gitignore
├── .travis.yml
├── .github
└── issue_template.md
├── tslint.json
├── README.md
└── LICENSE
/demo/app/vendor-platform.ios.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/platforms/ios/build.xcconfig:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/.npmignore:
--------------------------------------------------------------------------------
1 | *.map
2 | *.ts
3 | !*.d.ts
4 | tsconfig.json
--------------------------------------------------------------------------------
/demo/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/angular/ng-shadow.module.d.ts:
--------------------------------------------------------------------------------
1 | export declare class NgShadowModule {
2 | }
3 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/app/tools/assets/demo.ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/tools/assets/demo.ios.png
--------------------------------------------------------------------------------
/demo/app/tools/assets/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/tools/assets/screenshot.png
--------------------------------------------------------------------------------
/demo/app/tools/assets/demo.android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/tools/assets/demo.android.png
--------------------------------------------------------------------------------
/demo/.nsbuildinfo:
--------------------------------------------------------------------------------
1 | {
2 | "prepareTime": "Tue Oct 10 2017 01:06:48 GMT+1100 (AEDT)",
3 | "buildTime": "Tue Oct 10 2017 01:07:46 GMT+1100 (AEDT)"
4 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "android": {
3 | "v8Flags": "--expose_gc"
4 | },
5 | "main": "main.js",
6 | "name": "tns-template-blank-ng",
7 | "version": "3.2.1"
8 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/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 |
--------------------------------------------------------------------------------
/publish/publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | PACK_DIR=package;
4 |
5 | publish() {
6 | cd $PACK_DIR
7 | echo 'Publishing to npm...'
8 | npm publish *.tgz
9 | }
10 |
11 | ./pack.sh && publish
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/publish/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-publish",
3 | "version": "1.0.0",
4 | "description": "Publish helper",
5 | "devDependencies": {
6 | "ncp": "^2.0.0",
7 | "rimraf": "^2.5.0"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/common/ios-data.model.ts:
--------------------------------------------------------------------------------
1 | export class IOSData {
2 | elevation: number;
3 | maskToBounds?: boolean;
4 | shadowColor?: string;
5 | shadowOffset?: number;
6 | shadowOpacity?: number;
7 | shadowRadius?: number;
8 | }
9 |
--------------------------------------------------------------------------------
/src/common/shape.enum.ts:
--------------------------------------------------------------------------------
1 |
2 | export enum ShapeEnum {
3 | RECTANGLE = 'RECTANGLE',
4 | OVAL = 'OVAL',
5 | RING = 'RING',
6 | LINE = 'LINE',
7 | }
8 |
9 | export type Shape = 'RECTANGLE' | 'OVAL' | 'RING' | 'LINE';
10 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/src/common/shape.enum.d.ts:
--------------------------------------------------------------------------------
1 | export declare enum ShapeEnum {
2 | RECTANGLE = "RECTANGLE",
3 | OVAL = "OVAL",
4 | RING = "RING",
5 | LINE = "LINE",
6 | }
7 | export declare type Shape = 'RECTANGLE' | 'OVAL' | 'RING' | 'LINE';
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/src/common/android-data.model.ts:
--------------------------------------------------------------------------------
1 | import { Shape } from './shape.enum';
2 |
3 | export class AndroidData {
4 | elevation: number;
5 | shape?: Shape;
6 | bgcolor?: string;
7 | cornerRadius?: number;
8 | translationZ?: number;
9 | }
10 |
--------------------------------------------------------------------------------
/src/common/ios-data.model.d.ts:
--------------------------------------------------------------------------------
1 | export declare class IOSData {
2 | elevation: number;
3 | maskToBounds?: boolean;
4 | shadowColor?: string;
5 | shadowOffset?: number;
6 | shadowOpacity?: number;
7 | shadowRadius?: number;
8 | }
9 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/src/common/android-data.model.d.ts:
--------------------------------------------------------------------------------
1 | import { Shape } from './shape.enum';
2 | export declare class AndroidData {
3 | elevation: number;
4 | shape?: Shape;
5 | bgcolor?: string;
6 | cornerRadius?: number;
7 | translationZ?: number;
8 | }
9 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Especializa/nativescript-ng-shadow/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/main.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order
2 | // to load some required settings (like globals and reflect-metadata)
3 | import { platformNativeScriptDynamic } from 'nativescript-angular/platform';
4 |
5 | import { AppModule } from './app.module';
6 |
7 | platformNativeScriptDynamic().bootstrapModule(AppModule);
8 |
--------------------------------------------------------------------------------
/src/platforms/ios/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/main.aot.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order to load
2 | // some required settings (like globals and reflect-metadata)
3 | import { platformNativeScript } from 'nativescript-angular/platform-static';
4 |
5 | import { AppModuleNgFactory } from './app.module.ngfactory';
6 |
7 | platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);
8 |
--------------------------------------------------------------------------------
/src/angular/ng-shadow.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 |
3 | import { NativeShadowDirective } from './ng-shadow.directive';
4 |
5 | @NgModule({
6 | imports: [],
7 | declarations: [
8 | NativeShadowDirective,
9 | ],
10 | exports: [
11 | NativeShadowDirective,
12 | ],
13 | providers: [],
14 | })
15 | export class NgShadowModule { }
16 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/home/home.component.css:
--------------------------------------------------------------------------------
1 | Label {
2 | text-align: center;
3 | }
4 |
5 | .ex1, .ex2 {
6 | background-color: white;
7 | }
8 |
9 | .ex3, .ex4 {
10 | color: white;
11 | }
12 |
13 | .ex3 {
14 | background-color: #006968;
15 | border-radius: 15;
16 | }
17 |
18 | .ex4 {
19 | background-color: #ff1744;
20 | border-radius: 50%;
21 | width: 80;
22 | height: 80;
23 | }
--------------------------------------------------------------------------------
/src/ng-shadow.ts:
--------------------------------------------------------------------------------
1 | export { AndroidData } from './common/android-data.model';
2 | export { IOSData } from './common/ios-data.model';
3 | export { Elevation } from './common/elevation.enum';
4 | export { Shape, ShapeEnum } from './common/shape.enum';
5 |
6 | export { NgShadowModule } from './angular/ng-shadow.module';
7 | export { NativeShadowDirective } from './angular/ng-shadow.directive';
8 |
--------------------------------------------------------------------------------
/demo/app/vendor.ts:
--------------------------------------------------------------------------------
1 | require('./vendor-platform');
2 |
3 | require('reflect-metadata');
4 | require('@angular/platform-browser');
5 | require('@angular/core');
6 | require('@angular/common');
7 | require('@angular/forms');
8 | require('@angular/http');
9 | require('@angular/router');
10 |
11 | require('nativescript-angular/platform-static');
12 | require('nativescript-angular/forms');
13 | require('nativescript-angular/router');
14 |
--------------------------------------------------------------------------------
/demo/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.demo"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/platforms/android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/platforms/android/include.gradle:
--------------------------------------------------------------------------------
1 | /* Include.gradle configuration: http://docs.nativescript.org/plugins/plugins#includegradle-specification */
2 |
3 | android {
4 | productFlavors {
5 | "nativescript-ng-shadow" {
6 | dimension "nativescript-ng-shadow"
7 | }
8 | }
9 | }
10 |
11 | dependencies {
12 | // Describe plugin native Android dependencies like
13 | // compile "groupName:pluginName:ver"
14 | // EXAMPLE: compile "com.facebook.fresco:fresco:0.9.0+"
15 | }
--------------------------------------------------------------------------------
/demo/app/vendor-platform.android.ts:
--------------------------------------------------------------------------------
1 | require('application');
2 | if (!(global as any).__snapshot) {
3 | // In case snapshot generation is enabled these modules will get
4 | // into the bundle
5 | // but will not be required/evaluated.
6 | // The snapshot webpack plugin will add them to the tns-java-classes.js
7 | // bundle file.
8 | // This way, they will be evaluated on app start as early as possible.
9 | require('ui/frame');
10 | require('ui/frame/activity');
11 | }
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | .idea
3 | .DS_Store
4 | *.js
5 | *.js.map
6 | *.log
7 | src/*.d.ts
8 | src/**/*metadata.json
9 | !src/index.d.ts
10 | !src/references.d.ts
11 | !src/scripts/*.js
12 | !seed-tests/*.js
13 | seed-tests/seed-copy/**/*.*
14 | seed-tests/seed-copy-new-git-repo/**/*.*
15 | !demo/karma.conf.js
16 | !demo/app/tests/*.js
17 | demo/*.d.ts
18 | !demo/references.d.ts
19 | demo/lib
20 | demo/platforms
21 | node_modules
22 | publish/src
23 | publish/package
24 | demo/report/report.html
25 | demo/report/stats.json
26 |
--------------------------------------------------------------------------------
/demo/app/home/home-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { Routes } from '@angular/router';
3 | import { NativeScriptRouterModule } from 'nativescript-angular/router';
4 |
5 | import { HomeComponent } from './home.component';
6 |
7 | const routes: Routes = [
8 | { path: '', component: HomeComponent },
9 | ];
10 |
11 | @NgModule({
12 | imports: [NativeScriptRouterModule.forChild(routes)],
13 | exports: [NativeScriptRouterModule],
14 | })
15 | export class HomeRoutingModule { }
16 |
--------------------------------------------------------------------------------
/demo/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 | }
--------------------------------------------------------------------------------
/demo/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { Routes } from '@angular/router';
3 | import { NativeScriptRouterModule } from 'nativescript-angular/router';
4 |
5 | const routes: Routes = [
6 | { path: '', redirectTo: '/home', pathMatch: 'full' },
7 | { path: 'home', loadChildren: './home/home.module#HomeModule' },
8 | ];
9 |
10 | @NgModule({
11 | imports: [NativeScriptRouterModule.forRoot(routes)],
12 | exports: [NativeScriptRouterModule],
13 | })
14 | export class AppRoutingModule { }
15 |
--------------------------------------------------------------------------------
/demo/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 | }
--------------------------------------------------------------------------------
/demo/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 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.css file is where you place CSS rules that
3 | you would like to apply to your entire application. Check out
4 | http://docs.nativescript.org/ui/styling for a full list of the CSS
5 | selectors and properties you can use to style UI components.
6 |
7 | /*
8 | In many cases you may want to use the NativeScript core theme instead
9 | of writing your own CSS rules. For a full list of class names in the theme
10 | refer to http://docs.nativescript.org/ui/theme.
11 | */
12 | @import 'nativescript-theme-core/css/core.light.css';
13 |
--------------------------------------------------------------------------------
/demo/app/home/home.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2 | import { NativeScriptModule } from 'nativescript-angular/nativescript.module';
3 |
4 | import { HomeRoutingModule } from './home-routing.module';
5 | import { HomeComponent } from './home.component';
6 |
7 | import { NgShadowModule } from 'nativescript-ng-shadow';
8 |
9 | @NgModule({
10 | imports: [
11 | NativeScriptModule,
12 | HomeRoutingModule,
13 | NgShadowModule,
14 | ],
15 | declarations: [
16 | HomeComponent,
17 | ],
18 | schemas: [
19 | NO_ERRORS_SCHEMA,
20 | ],
21 | })
22 | export class HomeModule { }
23 |
--------------------------------------------------------------------------------
/src/common/elevation.enum.ts:
--------------------------------------------------------------------------------
1 | export enum Elevation {
2 | SWITCH = 1,
3 | CARD_RESTING = 2,
4 | RAISED_BUTTON_RESTING = 2,
5 | SEARCH_BAR_RESTING = 2,
6 | REFRESH_INDICADOR = 3,
7 | SEARCH_BAR_SCROLLED = 3,
8 | APPBAR = 4,
9 | FAB_RESTING = 6,
10 | SNACKBAR = 6,
11 | BOTTOM_NAVIGATION_BAR = 8,
12 | MENU = 8,
13 | CARD_PICKED_UP = 8,
14 | RAISED_BUTTON_PRESSED = 8,
15 | SUBMENU_LEVEL1 = 9,
16 | SUBMENU_LEVEL2 = 10,
17 | SUBMENU_LEVEL3 = 11,
18 | SUBMENU_LEVEL4 = 12,
19 | SUBMENU_LEVEL5 = 13,
20 | FAB_PRESSED = 12,
21 | NAV_DRAWER = 16,
22 | RIGHT_DRAWER = 16,
23 | MODAL_BOTTOM_SHEET = 16,
24 | DIALOG = 24,
25 | PICKER = 24,
26 | }
27 |
--------------------------------------------------------------------------------
/src/common/shadow.d.ts:
--------------------------------------------------------------------------------
1 | import { AndroidData } from "./android-data.model";
2 | import { IOSData } from "./ios-data.model";
3 | import { ShapeEnum } from './shape.enum';
4 | export declare class Shadow {
5 | static DEFAULT_SHAPE: ShapeEnum;
6 | static DEFAULT_BGCOLOR: string;
7 | static DEFAULT_SHADOW_COLOR: string;
8 | static apply(tnsView: any, data: IOSData | AndroidData): void;
9 | private static getDefaults(data);
10 | private static applyOnAndroid(tnsView, data);
11 | private static overrideDefaultAnimator(nativeView, data);
12 | private static applyOnIOS(tnsView, data);
13 | static androidDipToPx(nativeView: any, dip: number): any;
14 | }
15 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es5",
5 | "experimentalDecorators": true,
6 | "emitDecoratorMetadata": true,
7 | "noEmitHelpers": true,
8 | "noEmitOnError": true,
9 | "lib": [
10 | "es6",
11 | "dom",
12 | "es2015.iterable"
13 | ],
14 | "baseUrl": ".",
15 | "paths": {
16 | "*": [
17 | "./node_modules/tns-core-modules/*",
18 | "./node_modules/*"
19 | ]
20 | }
21 | },
22 | "exclude": [
23 | "node_modules",
24 | "platforms",
25 | "**/*.aot.ts"
26 | ]
27 | }
--------------------------------------------------------------------------------
/src/common/elevation.enum.d.ts:
--------------------------------------------------------------------------------
1 | export declare enum Elevation {
2 | SWITCH = 1,
3 | CARD_RESTING = 2,
4 | RAISED_BUTTON_RESTING = 2,
5 | SEARCH_BAR_RESTING = 2,
6 | REFRESH_INDICADOR = 3,
7 | SEARCH_BAR_SCROLLED = 3,
8 | APPBAR = 4,
9 | FAB_RESTING = 6,
10 | SNACKBAR = 6,
11 | BOTTOM_NAVIGATION_BAR = 8,
12 | MENU = 8,
13 | CARD_PICKED_UP = 8,
14 | RAISED_BUTTON_PRESSED = 8,
15 | SUBMENU_LEVEL1 = 9,
16 | SUBMENU_LEVEL2 = 10,
17 | SUBMENU_LEVEL3 = 11,
18 | SUBMENU_LEVEL4 = 12,
19 | SUBMENU_LEVEL5 = 13,
20 | FAB_PRESSED = 12,
21 | NAV_DRAWER = 16,
22 | RIGHT_DRAWER = 16,
23 | MODAL_BOTTOM_SHEET = 16,
24 | DIALOG = 24,
25 | PICKER = 24,
26 | }
27 |
--------------------------------------------------------------------------------
/src/platforms/ios/README.md:
--------------------------------------------------------------------------------
1 | # iOS permissions and dependencies
2 |
3 |
4 | * (Optional) Use Info.plist to describe any permissions, features or other configuration specifics required or used by your plugin for iOS.
5 | NOTE: The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues.
6 | * (Optional) Use build.xcconfig configuration to describe any plugin the native dependencies. If there are no such, this file can be removed. For more information, see the [build.xcconfig Specification section](http://docs.nativescript.org/plugins/plugins#buildxcconfig-specification).
7 |
8 |
9 | [Read more about nativescript plugins](http://docs.nativescript.org/plugins/plugins)
--------------------------------------------------------------------------------
/src/platforms/android/README.md:
--------------------------------------------------------------------------------
1 | # Android permissions and dependencies
2 |
3 | * (Optional) Use AndroidManifest.xml to describe any permissions, features or other configuration specifics required or used by your plugin for Android.
4 | NOTE: The NativeScript CLI will not resolve any contradicting or duplicate entries during the merge. After the plugin is installed, you need to manually resolve such issues.
5 |
6 | * (Optional) Use include.gradle configuration to describe any native dependencies. If there are no such, this file can be removed. For more information, see the [include.gradle Specification](http://docs.nativescript.org/plugins/plugins#includegradle-specification)
7 |
8 |
9 | [Read more about nativescript plugins](http://docs.nativescript.org/plugins/plugins)
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": true,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "lib": ["es6", "dom"],
11 | "sourceMap": true,
12 | "pretty": true,
13 | "allowUnreachableCode": false,
14 | "allowUnusedLabels": false,
15 | "noEmitHelpers": true,
16 | "noEmitOnError": false,
17 | "noImplicitAny": false,
18 | "noImplicitReturns": true,
19 | "noImplicitUseStrict": false,
20 | "noFallthroughCasesInSwitch": true
21 | },
22 | "exclude": [
23 | "node_modules"
24 | ],
25 | "compileOnSave": false
26 | }
27 |
--------------------------------------------------------------------------------
/demo/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NgModuleFactoryLoader,
2 | NO_ERRORS_SCHEMA } from '@angular/core';
3 | import { NativeScriptModule } from 'nativescript-angular/nativescript.module';
4 | import { NSModuleFactoryLoader } from 'nativescript-angular/router';
5 |
6 | import { AppRoutingModule } from './app-routing.module';
7 | import { AppComponent } from './app.component';
8 |
9 | @NgModule({
10 | bootstrap: [
11 | AppComponent,
12 | ],
13 | imports: [
14 | NativeScriptModule,
15 | AppRoutingModule,
16 | ],
17 | declarations: [
18 | AppComponent,
19 | ],
20 | providers: [
21 | { provide: NgModuleFactoryLoader, useClass: NSModuleFactoryLoader },
22 | ],
23 | schemas: [
24 | NO_ERRORS_SCHEMA,
25 | ],
26 | })
27 | export class AppModule { }
28 |
--------------------------------------------------------------------------------
/src/tsconfig.ngc.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "outDir": "./",
5 | "sourceMap": false,
6 | "declaration": true,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es5",
11 | "typeRoots": [
12 | "node_modules/@types"
13 | ],
14 | "lib": [
15 | "es2017",
16 | "dom"
17 | ],
18 | "paths": {
19 | "@angular/*": [
20 | "./node_modules/@angular/*"
21 | ],
22 | "tns-core-modules":[
23 | "./node_modules/tns-core-modules/*"
24 | ]
25 | }
26 | },
27 | "angularCompilerOptions": {
28 | "skipTemplateCodegen": true
29 | },
30 | "include": [
31 | "./"
32 | ],
33 | "exclude": [
34 | "**/**.spec.ts",
35 | "**/platforms/*",
36 | "**/node_modules/*"
37 | ]
38 | }
--------------------------------------------------------------------------------
/demo/app/home/home.component.ios.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/demo/app/home/home.component.android.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
15 |
16 |
17 |
20 |
21 |
25 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | matrix:
2 | include:
3 | - stage: "Lint"
4 | language: node_js
5 | os: linux
6 | node_js: "6"
7 | script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint && cd ..
8 | - stage: "Build and Test"
9 | env:
10 | - BuildAndroid="25"
11 | language: android
12 | os: linux
13 | jdk: oraclejdk8
14 | before_install: nvm install stable
15 | script:
16 | - cd src && npm i && npm run tsc && cd ../demo && tns build android && cd ..
17 | - os: osx
18 | env:
19 | - BuildiOS="10.3"
20 | - Xcode="8.3"
21 | osx_image: xcode8.3
22 | language: node_js
23 | node_js: "6"
24 | jdk: oraclejdk8
25 | script:
26 | - cd src && npm i && npm run tsc && cd ../demo && tns build ios && cd ..
27 |
28 | android:
29 | components:
30 | - tools
31 | - platform-tools
32 | - build-tools-25.0.2
33 | - android-25
34 | - extra-android-m2repository
35 | - sys-img-armeabi-v7a-android-21
36 |
37 | install:
38 | - echo no | npm install -g nativescript
39 | - tns usage-reporting disable
40 | - tns error-reporting disable
--------------------------------------------------------------------------------
/demo/app/home/home.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { AndroidData, Elevation,
3 | Shape, ShapeEnum } from 'nativescript-ng-shadow';
4 | import { ListPicker } from 'ui/list-picker';
5 |
6 | @Component({
7 | moduleId: module.id,
8 | selector: 'Home',
9 | templateUrl: './home.component.html',
10 | styleUrls: ['./home.component.css'],
11 | })
12 | export class HomeComponent implements OnInit {
13 | elevation = 2;
14 | shape = ShapeEnum;
15 | stdElevations: string[] = [];
16 | androidData: AndroidData;
17 |
18 | ngOnInit(): void {
19 | for (const x in Elevation) {
20 | if (isNaN(parseInt(x, 10))) {
21 | this.stdElevations.push(x);
22 | }
23 | }
24 | this.androidData = this.getAndroidData();
25 | }
26 |
27 | getAndroidData(): AndroidData {
28 | return {
29 | elevation: this.elevation,
30 | bgcolor: '#ff1744',
31 | shape: ShapeEnum.OVAL,
32 | };
33 | }
34 |
35 | setElevation(newValue) {
36 | const picker = newValue.object as ListPicker;
37 | this.elevation = Elevation[this.stdElevations[picker.selectedIndex]];
38 | this.androidData = this.getAndroidData();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/angular/ng-shadow.directive.d.ts:
--------------------------------------------------------------------------------
1 | import { ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2 | import { AndroidData } from '../common/android-data.model';
3 | import { IOSData } from '../common/ios-data.model';
4 | import { Shape } from '../common/shape.enum';
5 | export declare class NativeShadowDirective implements OnInit, OnChanges {
6 | private el;
7 | shadow: string | AndroidData | IOSData;
8 | elevation?: number | string;
9 | shape?: Shape;
10 | bgcolor?: string;
11 | cornerRadius?: number | string;
12 | translationZ?: number | string;
13 | maskToBounds?: boolean;
14 | shadowColor?: string;
15 | shadowOffset?: number | string;
16 | shadowOpacity?: number | string;
17 | shadowRadius?: number | string;
18 | private loaded;
19 | private initialized;
20 | constructor(el: ElementRef);
21 | ngOnInit(): void;
22 | onLoaded(): void;
23 | ngOnChanges(changes: SimpleChanges): void;
24 | private applyShadow();
25 | private initializeCommonData();
26 | private initializeAndroidData();
27 | private initializeIOSData();
28 | private loadFromAndroidData(data);
29 | private loadFromIOSData(data);
30 | }
31 |
--------------------------------------------------------------------------------
/publish/pack.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SOURCE_DIR=../src;
4 | TO_SOURCE_DIR=src;
5 | PACK_DIR=package;
6 | ROOT_DIR=..;
7 | PUBLISH=--publish
8 |
9 | install(){
10 | npm i
11 | }
12 |
13 | pack() {
14 |
15 | echo 'Clearing /src and /package...'
16 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
17 | node_modules/.bin/rimraf "$PACK_DIR"
18 |
19 | # copy src
20 | echo 'Copying src...'
21 | node_modules/.bin/ncp "$SOURCE_DIR" "$TO_SOURCE_DIR"
22 |
23 | # copy README & LICENSE to src
24 | echo 'Copying README and LICENSE to /src...'
25 | node_modules/.bin/ncp "$ROOT_DIR"/LICENSE "$TO_SOURCE_DIR"/LICENSE
26 | node_modules/.bin/ncp "$ROOT_DIR"/README.md "$TO_SOURCE_DIR"/README.md
27 |
28 | # compile package and copy files required by npm
29 | echo 'Building /src...'
30 | cd "$TO_SOURCE_DIR"
31 | # compile project with ngc compiler
32 | npm run ngc
33 | cd ..
34 |
35 | echo 'Creating package...'
36 | # create package dir
37 | mkdir "$PACK_DIR"
38 |
39 | # create the package
40 | cd "$PACK_DIR"
41 | npm pack ../"$TO_SOURCE_DIR"
42 |
43 | # delete source directory used to create the package
44 | cd ..
45 | node_modules/.bin/rimraf "$TO_SOURCE_DIR"
46 | }
47 |
48 | install && pack
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 | ### Make sure to check the demo app(s) for sample usage
2 |
3 | ### Make sure to check the existing issues in this repository
4 |
5 | ### If the demo apps cannot help and there is no issue for your problem, tell us about it
6 | Please, ensure your title is less than 63 characters long and starts with a capital
7 | letter.
8 |
9 | ### Which platform(s) does your issue occur on?
10 | - iOS/Android/Both
11 | - iOS/Android versions
12 | - emulator or device. What type of device?
13 |
14 | ### Please, provide the following version numbers that your issue occurs with:
15 |
16 | - CLI: (run `tns --version` to fetch it)
17 | - Cross-platform modules: (check the 'version' attribute in the
18 | `node_modules/tns-core-modules/package.json` file in your project)
19 | - Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project)
20 | - Plugin(s): (look for the version numbers in the `package.json` file of your
21 | project and paste your dependencies and devDependencies here)
22 |
23 | ### Please, tell us how to recreate the issue in as much detail as possible.
24 | Describe the steps to reproduce it.
25 |
26 | ### Is there any code involved?
27 | - provide a code example to recreate the problem
28 | - (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.
29 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/demo/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 |
--------------------------------------------------------------------------------
/demo/tsconfig.aot.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "paths": {
6 | "application": ["node_modules/tns-core-modules/application"],
7 | "application-settings": ["node_modules/tns-core-modules/application-settings"],
8 | "camera": ["node_modules/tns-core-modules/camera"],
9 | "color": ["node_modules/tns-core-modules/color"],
10 | "connectivity": ["node_modules/tns-core-modules/connectivity"],
11 | "console": ["node_modules/tns-core-modules/console"],
12 | "data/*": ["node_modules/tns-core-modules/data/*"],
13 | "fetch": ["node_modules/tns-core-modules/fetch"],
14 | "file-system": ["node_modules/tns-core-modules/file-system"],
15 | "fps-meter": ["node_modules/tns-core-modules/fps-meter"],
16 | "globals": ["node_modules/tns-core-modules/globals"],
17 | "http": ["node_modules/tns-core-modules/http"],
18 | "image-asset": ["node_modules/tns-core-modules/image-asset"],
19 | "image-source": ["node_modules/tns-core-modules/image-source"],
20 | "location": ["node_modules/tns-core-modules/location"],
21 | "platform": ["node_modules/tns-core-modules/platform"],
22 | "text": ["node_modules/tns-core-modules/text"],
23 | "timer": ["node_modules/tns-core-modules/timer"],
24 | "trace": ["node_modules/tns-core-modules/trace"],
25 | "ui/*": ["node_modules/tns-core-modules/ui/*"],
26 | "utils/*": ["node_modules/tns-core-modules/utils/*"],
27 | "xhr": ["node_modules/tns-core-modules/xhr"],
28 | "xml": ["node_modules/tns-core-modules/xml"]
29 | },
30 | "skipLibCheck": true
31 | },
32 | "exclude": [
33 | "node_modules",
34 | "platforms"
35 | ],
36 | "angularCompilerOptions": {
37 | "skipMetadataEmit": true,
38 | "genDir": "./"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
18 |
20 |
21 |
22 |
29 |
30 |
32 |
33 |
34 |
39 |
40 |
42 |
43 |
--------------------------------------------------------------------------------
/demo/app/README.md:
--------------------------------------------------------------------------------
1 | # NativeScript with Angular Blank Template
2 | App templates help you jump start your native cross-platform apps with built-in UI elements and best practices. Save time writing boilerplate code over and over again when you create new apps.
3 |
4 | ## Quick Start
5 | Execute the following command to create an app from this template:
6 |
7 | ```
8 | tns create my-app-name --template tns-template-blank-ng
9 | ```
10 |
11 | > Note: This command will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-blank-ng).
12 |
13 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following:
14 |
15 | ```
16 | tns create my-app-name --template https://github.com/NativeScript/template-blank-ng
17 | ```
18 |
19 | **NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet!
20 |
21 | ## Walkthrough
22 |
23 | ### Architecture
24 | There is a single blank component that sets up an empty page layout:
25 | - `/home`
26 |
27 | **Home** page has the following components:
28 | - `ActionBar` - It holds the title of the page.
29 | - `GridLayout` - The main page layout that should contains all the page content.
30 |
31 | ## Get Help
32 | The NativeScript framework has a vibrant community that can help when you run into problems.
33 |
34 | Try [joining the NativeScript community Slack](http://developer.telerik.com/wp-login.php?action=slack-invitation). The Slack channel is a great place to get help troubleshooting problems, as well as connect with other NativeScript developers.
35 |
36 | If you have found an issue with this template, please report the problem in the [Issues](https://github.com/NativeScript/template-blank-ng/issues).
37 |
38 | ## Contributing
39 |
40 | We love PRs, and accept them gladly. Feel free to propose changes and new ideas. We will review and discuss, so that they can be accepted and better integrated.
41 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "defaultSeverity": "error",
3 | "extends": [
4 | "tslint:recommended"
5 | ],
6 | "ignoreDefinitionFiles": true,
7 | "jsRules": {},
8 | "rulesDirectory": [],
9 | "rules": {
10 | "max-line-length": [
11 | true,
12 | 80
13 | ],
14 | "object-literal-sort-keys": false,
15 | "member-access": [
16 | true,
17 | "no-public"
18 | ],
19 | "member-ordering": false,
20 | "class-name": true,
21 | "comment-format": [
22 | true,
23 | "check-space"
24 | ],
25 | "indent": [
26 | true,
27 | "spaces"
28 | ],
29 | "no-duplicate-variable": true,
30 | "no-eval": true,
31 | "no-internal-module": true,
32 | "no-trailing-whitespace": true,
33 | "no-var-keyword": true,
34 | "no-var-requires": false,
35 | "one-line": [
36 | true,
37 | "check-open-brace",
38 | "check-whitespace"
39 | ],
40 | "quotemark": [
41 | false
42 | ],
43 | "semicolon": [
44 | true,
45 | "always"
46 | ],
47 | "triple-equals": [
48 | true,
49 | "allow-null-check"
50 | ],
51 | "typedef-whitespace": [
52 | true,
53 | {
54 | "call-signature": "nospace",
55 | "index-signature": "nospace",
56 | "parameter": "nospace",
57 | "property-declaration": "nospace",
58 | "variable-declaration": "nospace"
59 | }
60 | ],
61 | "variable-name": [
62 | true,
63 | "ban-keywords"
64 | ],
65 | "whitespace": [
66 | true,
67 | "check-branch",
68 | "check-decl",
69 | "check-operator",
70 | "check-separator",
71 | "check-type"
72 | ]
73 | }
74 | }
--------------------------------------------------------------------------------
/demo/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" : "60x60",
35 | "idiom" : "iphone",
36 | "filename" : "icon-60@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "icon-60@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "29x29",
47 | "idiom" : "ipad",
48 | "filename" : "icon-29.png",
49 | "scale" : "1x"
50 | },
51 | {
52 | "size" : "29x29",
53 | "idiom" : "ipad",
54 | "filename" : "icon-29@2x.png",
55 | "scale" : "2x"
56 | },
57 | {
58 | "size" : "40x40",
59 | "idiom" : "ipad",
60 | "filename" : "icon-40.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "40x40",
65 | "idiom" : "ipad",
66 | "filename" : "icon-40@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "76x76",
71 | "idiom" : "ipad",
72 | "filename" : "icon-76.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "76x76",
77 | "idiom" : "ipad",
78 | "filename" : "icon-76@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "83.5x83.5",
83 | "idiom" : "ipad",
84 | "filename" : "icon-83.5@2x.png",
85 | "scale" : "2x"
86 | },
87 | {
88 | "size" : "1024x1024",
89 | "idiom" : "ios-marketing",
90 | "filename" : "icon-1024.png",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript Application",
3 | "license": "SEE LICENSE IN ",
4 | "readme": "NativeScript Application",
5 | "repository": "",
6 | "scripts": {
7 | "build.plugin": "cd ../src && npm run build",
8 | "ci.tslint": "npm i && tslint --config '../tslint.json' 'app/**/*.ts' --exclude '**/node_modules/**' --fix",
9 | "ns-bundle": "ns-bundle",
10 | "publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
11 | "generate-android-snapshot": "generate-android-snapshot --targetArchs arm,arm64,ia32 --install",
12 | "start-android-bundle": "npm run ns-bundle --android --run-app",
13 | "start-ios-bundle": "npm run ns-bundle --ios --run-app",
14 | "build-android-bundle": "npm run ns-bundle --android --build-app",
15 | "build-ios-bundle": "npm run ns-bundle --ios --build-app"
16 | },
17 | "nativescript": {
18 | "id": "org.nativescript.demo",
19 | "tns-android": {
20 | "version": "3.2.0"
21 | },
22 | "tns-ios": {
23 | "version": "3.2.0"
24 | }
25 | },
26 | "dependencies": {
27 | "@angular/animations": "4.2.5",
28 | "@angular/common": "4.2.5",
29 | "@angular/compiler": "4.2.5",
30 | "@angular/core": "4.2.5",
31 | "@angular/forms": "4.2.5",
32 | "@angular/http": "4.2.5",
33 | "@angular/platform-browser": "4.2.5",
34 | "@angular/router": "4.2.5",
35 | "nativescript-angular": "4.2.0",
36 | "nativescript-ng-shadow": "../src",
37 | "nativescript-theme-core": "1.0.4",
38 | "reflect-metadata": "0.1.10",
39 | "rxjs": "5.4.3",
40 | "tns-core-modules": "3.2.0",
41 | "zone.js": "0.8.17"
42 | },
43 | "devDependencies": {
44 | "@angular/compiler-cli": "4.2.5",
45 | "@ngtools/webpack": "~1.6.0",
46 | "babel-traverse": "6.26.0",
47 | "babel-types": "6.26.0",
48 | "babylon": "6.18.0",
49 | "copy-webpack-plugin": "~4.0.1",
50 | "extract-text-webpack-plugin": "~3.0.0",
51 | "lazy": "1.0.11",
52 | "nativescript-css-loader": "~0.26.0",
53 | "nativescript-dev-typescript": "0.5.1",
54 | "nativescript-dev-webpack": "^0.8.0",
55 | "nativescript-worker-loader": "~0.8.1",
56 | "raw-loader": "~0.5.1",
57 | "resolve-url-loader": "~2.1.0",
58 | "tslint": "^5.0.0",
59 | "typescript": "2.5.2",
60 | "webpack": "~3.2.0",
61 | "webpack-bundle-analyzer": "^2.8.2",
62 | "webpack-sources": "~1.0.1"
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-ng-shadow",
3 | "version": "2.1.0",
4 | "description": "Angular directive to apply shadows to native elements according to the elevation level guidelines of material design specification",
5 | "main": "ng-shadow",
6 | "typings": "ng-shadow.d.ts",
7 | "nativescript": {
8 | "platforms": {
9 | "android": "3.0.0",
10 | "ios": "3.0.0"
11 | }
12 | },
13 | "scripts": {
14 | "tsc": "tsc -skipLibCheck",
15 | "build": "npm i && tsc",
16 | "postclone": "npm i && node scripts/postclone.js && cd ../demo && npm i && cd ../src && npm run plugin.link",
17 | "test.android": "npm i && npm run tsc && npm run tslint && cd ../demo && tns build android && tns test android --justlaunch",
18 | "test.ios": "npm i && npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch",
19 | "tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\" --exclude \"**/tns_modules/**\" --exclude \"**/*.d.ts\" --fix",
20 | "plugin.link": "npm link && cd ../demo && npm link nativescript-ng-shadow && cd ../src",
21 | "plugin.tscwatch": "npm run tsc -- -w",
22 | "demo.ios": "npm i && npm run tsc && cd ../demo && tns run ios --syncAllFiles",
23 | "demo.android": "npm i && npm run tsc && cd ../demo && tns run android --syncAllFiles",
24 | "debug.ios": "npm i && npm run tsc && cd ../demo && tns debug ios --syncAllFiles",
25 | "debug.android": "npm i && npm run tsc && cd ../demo && tns debug android --syncAllFiles",
26 | "demo.reset": "cd ../demo && rimraf platforms",
27 | "plugin.prepare": "npm run tsc && cd ../demo && tns plugin remove nativescript-ng-shadow && tns plugin add ../src",
28 | "clean": "cd ../demo && rimraf hooks node_modules platforms && cd ../src && rimraf node_modules && npm run plugin.link",
29 | "ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/tns_modules/**' --exclude '**/*.d.ts'",
30 | "ngc": "./node_modules/.bin/ngc --p tsconfig.ngc.json"
31 | },
32 | "keywords": [
33 | "NativeScript",
34 | "{N}",
35 | "Angular",
36 | "TypeScript",
37 | "JavaScript",
38 | "Material Design",
39 | "MD",
40 | "Elevation",
41 | "Shadow",
42 | "Android",
43 | "iOS"
44 | ],
45 | "author": {
46 | "name": "Jose Berardo Cunha",
47 | "email": "josebeardo@gmail.com"
48 | },
49 | "repository": {
50 | "type": "git",
51 | "url": "https://github.com/Especializa/nativescript-ng-shadow.git"
52 | },
53 | "bugs": {
54 | "url": "https://github.com/Especializa/nativescript-ng-shadow/issues"
55 | },
56 | "license": "Apache-2.0",
57 | "homepage": "https://github.com/Especializa/nativescript-ng-shadow",
58 | "readmeFilename": "README.md",
59 | "devDependencies": {
60 | "@angular/common": "~4.2.5",
61 | "@angular/compiler": "~4.2.5",
62 | "@angular/core": "~4.2.5",
63 | "@angular/forms": "~4.2.5",
64 | "@angular/http": "~4.2.5",
65 | "@angular/platform-browser": "~4.2.5",
66 | "@angular/router": "~4.2.5",
67 | "nativescript-angular": "^4.2.0",
68 | "rxjs": "^5.0.1",
69 | "zone.js": "^0.8.4",
70 | "prompt": "^1.0.0",
71 | "rimraf": "^2.5.0",
72 | "tns-core-modules": "^3.1.0",
73 | "tns-platform-declarations": "^3.1.0",
74 | "tslint": "^5.0.0",
75 | "typescript": "~2.4.0",
76 | "@angular/compiler-cli": "~4.2.5"
77 | },
78 | "dependencies": {},
79 | "bootstrapper": "nativescript-plugin-seed"
80 | }
81 |
--------------------------------------------------------------------------------
/demo/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 |
--------------------------------------------------------------------------------
/publish/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-publish",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "balanced-match": {
8 | "version": "1.0.0",
9 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
10 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
11 | "dev": true
12 | },
13 | "brace-expansion": {
14 | "version": "1.1.8",
15 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
16 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
17 | "dev": true,
18 | "requires": {
19 | "balanced-match": "1.0.0",
20 | "concat-map": "0.0.1"
21 | }
22 | },
23 | "concat-map": {
24 | "version": "0.0.1",
25 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
26 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
27 | "dev": true
28 | },
29 | "fs.realpath": {
30 | "version": "1.0.0",
31 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
32 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
33 | "dev": true
34 | },
35 | "glob": {
36 | "version": "7.1.2",
37 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
38 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
39 | "dev": true,
40 | "requires": {
41 | "fs.realpath": "1.0.0",
42 | "inflight": "1.0.6",
43 | "inherits": "2.0.3",
44 | "minimatch": "3.0.4",
45 | "once": "1.4.0",
46 | "path-is-absolute": "1.0.1"
47 | }
48 | },
49 | "inflight": {
50 | "version": "1.0.6",
51 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
52 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
53 | "dev": true,
54 | "requires": {
55 | "once": "1.4.0",
56 | "wrappy": "1.0.2"
57 | }
58 | },
59 | "inherits": {
60 | "version": "2.0.3",
61 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
62 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
63 | "dev": true
64 | },
65 | "minimatch": {
66 | "version": "3.0.4",
67 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
68 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
69 | "dev": true,
70 | "requires": {
71 | "brace-expansion": "1.1.8"
72 | }
73 | },
74 | "ncp": {
75 | "version": "2.0.0",
76 | "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
77 | "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=",
78 | "dev": true
79 | },
80 | "once": {
81 | "version": "1.4.0",
82 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
83 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
84 | "dev": true,
85 | "requires": {
86 | "wrappy": "1.0.2"
87 | }
88 | },
89 | "path-is-absolute": {
90 | "version": "1.0.1",
91 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
92 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
93 | "dev": true
94 | },
95 | "rimraf": {
96 | "version": "2.6.2",
97 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
98 | "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
99 | "dev": true,
100 | "requires": {
101 | "glob": "7.1.2"
102 | }
103 | },
104 | "wrappy": {
105 | "version": "1.0.2",
106 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
107 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
108 | "dev": true
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/demo/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 | }
--------------------------------------------------------------------------------
/src/common/shadow.ts:
--------------------------------------------------------------------------------
1 | import { Color } from 'tns-core-modules/color';
2 |
3 | import { AndroidData } from "./android-data.model";
4 | import { IOSData } from "./ios-data.model";
5 | import { ShapeEnum } from './shape.enum';
6 |
7 | declare const android: any;
8 | declare const java: any;
9 | declare const CGSizeMake: any;
10 | declare const UIScreen: any;
11 |
12 | export class Shadow {
13 | static DEFAULT_SHAPE = ShapeEnum.RECTANGLE;
14 | static DEFAULT_BGCOLOR = '#FFFFFF';
15 | static DEFAULT_SHADOW_COLOR = '#000000';
16 |
17 | static apply(tnsView: any, data: IOSData | AndroidData) {
18 | const LOLLIPOP = 21;
19 | if (
20 | tnsView.android &&
21 | android.os.Build.VERSION.SDK_INT >= LOLLIPOP
22 | ) {
23 | Shadow.applyOnAndroid(tnsView, Shadow.getDefaults(data));
24 | } else if (tnsView.ios) {
25 | Shadow.applyOnIOS(tnsView, Shadow.getDefaults(data));
26 | }
27 | }
28 |
29 | private static getDefaults(data: IOSData | AndroidData) {
30 | return Object.assign(
31 | {},
32 | data,
33 | {
34 | shape: (data as AndroidData).shape || Shadow.DEFAULT_SHAPE,
35 | bgcolor: (data as AndroidData).bgcolor || Shadow.DEFAULT_BGCOLOR,
36 | shadowColor: (data as IOSData).shadowColor ||
37 | Shadow.DEFAULT_SHADOW_COLOR,
38 | },
39 | );
40 | }
41 |
42 | private static applyOnAndroid(tnsView: any, data: AndroidData) {
43 | const nativeView = tnsView.android;
44 | const shape = new android.graphics.drawable.GradientDrawable();
45 | shape.setShape(
46 | android.graphics.drawable.GradientDrawable[data.shape],
47 | );
48 | shape.setColor(android.graphics.Color.parseColor(data.bgcolor));
49 | shape.setCornerRadius(
50 | Shadow.androidDipToPx(nativeView, data.cornerRadius as number),
51 | );
52 | nativeView.setBackgroundDrawable(shape);
53 | nativeView.setElevation(
54 | Shadow.androidDipToPx(nativeView, data.elevation as number),
55 | );
56 | nativeView.setTranslationZ(
57 | Shadow.androidDipToPx(nativeView, data.translationZ as number),
58 | );
59 | if (nativeView.getStateListAnimator()) {
60 | this.overrideDefaultAnimator(nativeView, data);
61 | }
62 | }
63 |
64 | private static overrideDefaultAnimator(nativeView: any, data: AndroidData) {
65 | const sla = new android.animation.StateListAnimator();
66 |
67 | const ObjectAnimator = android.animation.ObjectAnimator;
68 | const AnimatorSet = android.animation.AnimatorSet;
69 | const shortAnimTime = android.R.integer.config_shortAnimTime;
70 |
71 | const buttonDuration =
72 | nativeView.getContext().getResources().getInteger(shortAnimTime) / 2;
73 | const pressedElevation = this.androidDipToPx(nativeView, 2);
74 | const pressedZ = this.androidDipToPx(nativeView, 4);
75 | const elevation = this.androidDipToPx(nativeView, data.elevation);
76 | const z = this.androidDipToPx(nativeView, data.translationZ || 0);
77 |
78 | const pressedSet = new AnimatorSet();
79 | const notPressedSet = new AnimatorSet();
80 | const defaultSet = new AnimatorSet();
81 |
82 | pressedSet.playTogether(java.util.Arrays.asList([
83 | ObjectAnimator.ofFloat(nativeView, "translationZ", [pressedZ])
84 | .setDuration(buttonDuration),
85 | ObjectAnimator.ofFloat(nativeView, "elevation", [pressedElevation])
86 | .setDuration(0),
87 | ]));
88 | notPressedSet.playTogether(java.util.Arrays.asList([
89 | ObjectAnimator.ofFloat(nativeView, "translationZ", [z])
90 | .setDuration(buttonDuration),
91 | ObjectAnimator.ofFloat(nativeView, "elevation", [elevation])
92 | .setDuration(0),
93 | ]));
94 | defaultSet.playTogether(java.util.Arrays.asList([
95 | ObjectAnimator.ofFloat(nativeView, "translationZ", [0]).setDuration(0),
96 | ObjectAnimator.ofFloat(nativeView, "elevation", [0]).setDuration(0),
97 | ]));
98 |
99 | sla.addState(
100 | [android.R.attr.state_pressed, android.R.attr.state_enabled],
101 | pressedSet,
102 | );
103 | sla.addState([android.R.attr.state_enabled], notPressedSet);
104 | sla.addState([], defaultSet);
105 | nativeView.setStateListAnimator(sla);
106 | }
107 |
108 | private static applyOnIOS(tnsView: any, data: IOSData) {
109 | const nativeView = tnsView.ios;
110 | const elevation = parseFloat(((data.elevation as number) - 0).toFixed(2));
111 | nativeView.layer.maskToBounds = false;
112 | nativeView.layer.shadowColor = new Color(data.shadowColor).ios.CGColor;
113 | nativeView.layer.shadowOffset =
114 | data.shadowOffset ?
115 | CGSizeMake(0, parseFloat(String(data.shadowOffset))) :
116 | CGSizeMake(0, 0.54 * elevation - 0.14);
117 | nativeView.layer.shadowOpacity =
118 | data.shadowOpacity ?
119 | parseFloat(String(data.shadowOpacity)) :
120 | 0.006 * elevation + 0.25;
121 | nativeView.layer.shadowRadius =
122 | data.shadowRadius ?
123 | parseFloat(String(data.shadowRadius)) :
124 | 0.66 * elevation - 0.5;
125 | }
126 |
127 | static androidDipToPx(nativeView: any, dip: number) {
128 | const metrics = nativeView.getContext().getResources().getDisplayMetrics();
129 | return android.util.TypedValue.applyDimension(
130 | android.util.TypedValue.COMPLEX_UNIT_DIP,
131 | dip,
132 | metrics,
133 | );
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/src/angular/ng-shadow.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive, ElementRef, HostListener,
2 | Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
3 | import { isAndroid, isIOS } from 'tns-core-modules/platform';
4 |
5 | import { AndroidData } from '../common/android-data.model';
6 | import { IOSData } from '../common/ios-data.model';
7 | import { Shadow } from '../common/shadow';
8 | import { Shape, ShapeEnum } from '../common/shape.enum';
9 |
10 | @Directive({ selector: '[shadow]' })
11 | export class NativeShadowDirective implements OnInit, OnChanges {
12 | @Input() shadow: string | AndroidData | IOSData;
13 | @Input() elevation?: number | string;
14 | @Input() shape?: Shape;
15 | @Input() bgcolor?: string;
16 | @Input() cornerRadius?: number | string;
17 | @Input() translationZ?: number | string;
18 | @Input() maskToBounds?: boolean;
19 | @Input() shadowColor?: string;
20 | @Input() shadowOffset?: number | string;
21 | @Input() shadowOpacity?: number | string;
22 | @Input() shadowRadius?: number | string;
23 |
24 | private loaded = false;
25 | private initialized = false;
26 |
27 | constructor(private el: ElementRef) {}
28 |
29 | ngOnInit() {
30 | this.initializeCommonData();
31 | if (isAndroid) {
32 | this.initializeAndroidData();
33 | } else if (isIOS) {
34 | this.initializeIOSData();
35 | }
36 | if (this.shadow && (this.shadow as AndroidData | IOSData).elevation) {
37 | if (isAndroid) {
38 | this.loadFromAndroidData(this.shadow as AndroidData);
39 | } else if (isIOS) {
40 | this.loadFromIOSData(this.shadow as IOSData);
41 | }
42 | }
43 | this.applyShadow();
44 | this.initialized = true;
45 | }
46 |
47 | @HostListener('loaded')
48 | onLoaded() {
49 | this.loaded = true;
50 | // Weirdly ngOnInit isn't called on iOS on demo app
51 | // Managed to get it working on iOS when applying to
52 | // FlexboxLayout, but on the demo app, we apply to a
53 | // Label, and, for that case, ngOnInit isn't called
54 |
55 | // This is just enforcing the Directive is initialized
56 | // before calling this.applyShadow()
57 | if (!this.initialized) {
58 | this.ngOnInit();
59 | }
60 | this.applyShadow();
61 | }
62 |
63 | ngOnChanges(changes: SimpleChanges) {
64 | if (
65 | this.loaded &&
66 | !!changes &&
67 | (
68 | changes.hasOwnProperty('shadow') ||
69 | changes.hasOwnProperty('elevation') ||
70 | changes.hasOwnProperty('shape') ||
71 | changes.hasOwnProperty('bgcolor') ||
72 | changes.hasOwnProperty('cornerRadius') ||
73 | changes.hasOwnProperty('translationZ') ||
74 | changes.hasOwnProperty('maskToBounds') ||
75 | changes.hasOwnProperty('shadowColor') ||
76 | changes.hasOwnProperty('shadowOffset') ||
77 | changes.hasOwnProperty('shadowOpacity') ||
78 | changes.hasOwnProperty('shadowRadius')
79 | )
80 | ) {
81 | if (
82 | changes.hasOwnProperty('shadow') &&
83 | !changes.hasOwnProperty('elevation') &&
84 | typeof changes.shadow.currentValue === "number"
85 | ) {
86 | this.elevation = changes.shadow.currentValue;
87 | }
88 | if (changes.shadow && changes.shadow.currentValue.elevation) {
89 | if (isAndroid) {
90 | this.loadFromAndroidData(this.shadow as AndroidData);
91 | } else if (isIOS) {
92 | this.loadFromIOSData(this.shadow as IOSData);
93 | }
94 | }
95 | this.applyShadow();
96 | }
97 | }
98 |
99 | private applyShadow() {
100 | if (
101 | this.shadow === null ||
102 | this.shadow === undefined ||
103 | (this.shadow === '' && !this.elevation)
104 | ) {
105 | return;
106 | }
107 |
108 | Shadow.apply(
109 | this.el.nativeElement,
110 | {
111 | elevation: (this.elevation as number),
112 | shape: this.shape,
113 | bgcolor: this.bgcolor,
114 | cornerRadius: this.cornerRadius,
115 | translationZ: this.translationZ,
116 | maskToBounds: this.maskToBounds,
117 | shadowColor: this.shadowColor,
118 | shadowOffset: (this.shadowOffset as number),
119 | shadowOpacity: (this.shadowOpacity as number),
120 | shadowRadius: (this.shadowRadius as number),
121 | },
122 | );
123 | }
124 |
125 | private initializeCommonData() {
126 | const tShadow = typeof this.shadow;
127 | if ((tShadow === 'string' || tShadow === 'number') && !this.elevation) {
128 | this.elevation = this.shadow ?
129 | parseInt(this.shadow as string, 10) : 2;
130 | }
131 | const tElevation = typeof this.elevation;
132 | if (tElevation === 'string' || tElevation === 'number') {
133 | this.elevation = this.elevation ?
134 | parseInt(this.elevation as string, 10) : 2;
135 | }
136 | }
137 |
138 | private initializeAndroidData() {
139 | if (typeof this.cornerRadius === 'string') {
140 | this.cornerRadius = parseInt(this.cornerRadius, 10);
141 | }
142 | if (typeof this.translationZ === 'string') {
143 | this.translationZ = parseInt(this.translationZ, 10);
144 | }
145 | }
146 |
147 | private initializeIOSData() {
148 | if (typeof this.shadowOffset === 'string') {
149 | this.shadowOffset = parseFloat(this.shadowOffset);
150 | }
151 | if (typeof this.shadowOpacity === 'string') {
152 | this.shadowOpacity = parseFloat(this.shadowOpacity);
153 | }
154 | if (typeof this.shadowRadius === 'string') {
155 | this.shadowRadius = parseFloat(this.shadowRadius);
156 | }
157 | }
158 |
159 | private loadFromAndroidData(data: AndroidData) {
160 | this.elevation = data.elevation || this.elevation;
161 | this.shape = data.shape || this.shape;
162 | this.bgcolor = data.bgcolor || this.bgcolor;
163 | this.cornerRadius = data.cornerRadius || this.cornerRadius;
164 | this.translationZ = data.translationZ || this.translationZ;
165 | }
166 |
167 | private loadFromIOSData(data: IOSData) {
168 | this.maskToBounds = data.maskToBounds || this.maskToBounds;
169 | this.shadowColor = data.shadowColor || this.shadowColor;
170 | this.shadowOffset = data.shadowOffset || this.shadowOffset;
171 | this.shadowOpacity = data.shadowOpacity || this.shadowOpacity;
172 | this.shadowRadius = data.shadowRadius || this.shadowRadius;
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NativeScript Angular Shadow Directive Plugin  
2 |
3 | [![Build Status][build-status]][build-url]
4 | [![NPM version][npm-image]][npm-url]
5 | [![Downloads][downloads-image]][npm-url]
6 | [![Twitter Follow][twitter-image]][twitter-url]
7 |
8 | [build-status]:https://travis-ci.org/Especializa/nativescript-ng-shadow.svg?branch=master
9 | [build-url]:https://travis-ci.org/Especializa/nativescript-ng-shadow
10 | [npm-image]:http://img.shields.io/npm/v/nativescript-ng-shadow.svg
11 | [npm-url]:https://npmjs.org/package/nativescript-ng-shadow
12 | [downloads-image]:http://img.shields.io/npm/dt/nativescript-ng-shadow.svg
13 | [twitter-image]:https://img.shields.io/twitter/follow/especializa.svg?style=social&label=Follow%20us
14 | [twitter-url]:https://twitter.com/especializa
15 |
16 | ## Installation
17 | From the command prompt go to your app's root folder and execute:
18 | ```
19 | tns plugin add nativescript-ng-shadow
20 | ```
21 |
22 | ## Demo
23 | If you want a quickstart, [check out the demo app](https://github.com/Especializa/nativescript-ng-shadow/tree/master/demo).
24 |
25 | [](https://www.udemy.com/angular-native)
26 |
27 | ### How to use it
28 | This is an Angular directive to make your life easier when it comes to native shadows.
29 |
30 | Shadows are a very important part of [Material design specification](https://material.io/).
31 | It brings up the [concept of elevation](https://material.io/guidelines/material-design/elevation-shadows.html), which implies in the natural human way of perceiving objects raising up from the surface.
32 |
33 | With this directive, you won't have to worry about all the aspects regarding shadowing on Android and on iOS.
34 | On the other hand, if you care about any details, just provide extra attributes and they will superseed the default ones.
35 |
36 | However, running this on Android you will require the SDK to be greater or equal than 21 (Android 5.0 Lollipop or later), otherwise shadows will simply not be shown. There should be no problem running this on any version of iOS.
37 |
38 | #### Import the NgShadowModule
39 | ```typescript
40 | // ...
41 | import { NgShadowModule } from 'nativescript-ng-shadow';
42 |
43 | @NgModule({
44 | imports: [
45 | NgShadowModule,
46 | // ...
47 | ],
48 | // ...
49 | })
50 | export class MyModule { }
51 | ```
52 |
53 | #### Just use in your templates
54 | Simple attribute `shadow`:
55 | ```xml
56 |
57 | ```
58 | Of course you can property bind it:
59 | ```xml
60 |
61 | ```
62 | To provide other details, combine the `shadow` directive with other attributes:
63 | ```xml
64 |
65 | ```
66 | There are a couple of platform specific attributes you might want to use to customize your view. Bear in mind some of them clash with CSS styles applied to the same views. When it happens, the default behaviour on Android is the original HTML/CSS styles are lost in favor of the ones provided by this directive. On iOS, on the other hand, HTML/CSS pre-existent styles are regarded, consequently the shadow might not be applied.
67 |
68 | The tip is avoid applying things like **background color** and **border radius** to the same view you intend to apply this directive. You are always able to nest views and get what you want. If not, please [leave a message](https://github.com/Especializa/nativescript-ng-shadow/issues) so we can try to help.
69 |
70 | ### List of attributes
71 | The table below list and describes all possible attributes as well as show which platform supports each one of them:
72 |
73 | | Attribute | Type | Platform | Description |
74 | | --- | -- | --- | --- |
75 | | shadow | string \| number \| [AndroidData](https://github.com/Especializa/nativescript-ng-shadow/blob/master/src/common/android-data.model.ts) \| [IOSData](https://github.com/Especializa/nativescript-ng-shadow/blob/master/src/common/ios-data.model.ts) | both | Directive attribute. Providing `null` or empty string with no `elevation` attribute, will switch off the shadow |
76 | | elevation | number \| string | both | Determines the elevation of the view from the surface. It does all shadow related calculations. You might want to have a look at [this enum](https://github.com/Especializa/nativescript-ng-shadow/blob/master/src/common/elevation.enum.ts) of standard material design elevations.
PS: Since version 2.0, it's calculated in DIPs (or DPs, _density independent pixels_) on Android, or PTs (_points_) on iOS.
77 | | shape | string => `'RECTANGLE'` \| `'OVAL'` \| `'RING'` \| `'LINE'` | Android | Determines the shape of the view and overrides its format styles.
78 | | bgcolor | string => color #RGB | Android | Determines view's background color and overrides its previous background. |
79 | | cornerRadius | number | Android | Determines view's corner radius *(CSS border-radius)* and overrides its previous style.
PS: Since version 2.0, it's calculated in DIPs (or DPs, _density independent pixels_). |
80 | | translationZ | number | Android | Determines an extra distance (in DIP) to the surface. |
81 | | maskToBounds | boolean => default: false | iOS | Determines whether the shadow will be limited to the view margins. |
82 | | shadowColor | string => color #RGB | iOS | Determines shadow color. Shadow won't be applied if the view already has background. |
83 | | shadowOffset | number | iOS | Determines the distance in points (only on Y axis) of the shadow. Negative value shows the shadow above the view. |
84 | | shadowOpacity | number | iOS | From 0 to 1. Determines the opacity level of the shadow. |
85 | | shadowRadius | number | iOS | Determines the blurring effect in points of the shadow. The higher the more blurred. |
86 |
87 | ### `AndroidData` and `IOSData`
88 | As you might have noticed the main `shadow` attribute accepts object as argument. You'll be able to assign it in a property bind and it will override any possible separate attribute you might have defined:
89 |
90 | #### Component
91 | ```typescript
92 | import { AndroidData, ShapeEnum } from 'nativescript-ng-shadow';
93 | // ...
94 | export class MyComponent {
95 | fabShadow: AndroidData = {
96 | elevation: 6,
97 | bgcolor: '#ff1744',
98 | shape: ShapeEnum.OVAL,
99 | };
100 | // ...
101 | }
102 | ```
103 | In the template you can do:
104 | ```xml
105 |
106 | ```
107 |
108 | ## Pre-defined elevations
109 | If you want to be consistent with the Material Design specification but you're sick trying to memorize which elevation your view should have. We put together a list of pre-defined elevations:
110 | - SWITCH: 1
111 | - CARD_RESTING: 2
112 | - RAISED_BUTTON_RESTING: 2
113 | - SEARCH_BAR_RESTING: 2
114 | - REFRESH_INDICADOR: 3
115 | - SEARCH_BAR_SCROLLED: 3
116 | - APPBAR: 4
117 | - FAB_RESTING: 6
118 | - SNACKBAR: 6
119 | - BOTTOM_NAVIGATION_BAR: 8
120 | - MENU: 8
121 | - CARD_PICKED_UP: 8,
122 | - RAISED_BUTTON_PRESSED: 8
123 | - SUBMENU_LEVEL1: 9
124 | - SUBMENU_LEVEL2: 10
125 | - SUBMENU_LEVEL3: 11
126 | - SUBMENU_LEVEL4: 12
127 | - SUBMENU_LEVEL5: 13
128 | - FAB_PRESSED: 12
129 | - NAV_DRAWER: 16
130 | - RIGHT_DRAWER: 16
131 | - MODAL_BOTTOM_SHEET: 16
132 | - DIALOG: 24
133 | - PICKER: 24
134 |
135 | If you don't even want to check it out every time you have to shadow a view, just import the `Elevation` enum and enjoy :)
136 |
137 | #### Component
138 | ```typescript
139 | import { Elevation } from 'nativescript-ng-shadow';
140 | class MyComponent {
141 | // ...
142 | ngOnInit(): init {
143 | this.mySnackBar.elevation = Elevation.SNACKBAR;
144 | }
145 | // ...
146 | }
147 | ```
148 |
149 | ## Notes about version 2+
150 | Here are the list of improvements on version 2.0:
151 |
152 | 1. BugFix: Integer directive not rendering on iOS.
153 | 1. Density independent pixels: Now you no longer have to worry about providing
154 | the correct values for pixel related attributes based on the device's
155 | screen density.
156 | Since iPhone 6S, each point correspond to 9 device pixels
157 | (3 horizontally x 3 vertically - that's the reason behind the @3x images -
158 | [view more here](https://medium.com/@pnowelldesign/pixel-density-demystified-a4db63ba2922)).
159 | The same happens to Android where the benchmark (mdpi) is considered ~160 pixels
160 | (or dots) per inch (dpi) and the majority of the modern devices having way
161 | denser screens, reaching ~640dpi or more.
162 | [Find out more here](https://developer.android.com/guide/practices/screens_support.html).
163 | 1. New Android specific attribute called translationZ. The elevation attribute
164 | is the baseline of the virtual Z axis (3D axis), but according to the [official
165 | documentation](https://developer.android.com/training/material/shadows-clipping.html)
166 | it's not the only part. Then, `translationZ` will add extra distance to the surface
167 | and it's mainly used for animations.
168 | 1. **2.1.X** Override Android default StateListAnimator as explained below:
169 |
170 | ### Override Android default StateListAnimator
171 |
172 | Android buttons are split into three categories:
173 | floating, raised and flat. Different from labels and other ui elements,
174 | each button category has its own state animator.
175 | So, when buttons are tapped, Android does affect their elevation
176 | (and z translation) in a way that Angular is not notified. At the end of tap animation, buttons get back to
177 | resting defaults (i.e. raised button's `elevation` at 2dp and `translationZ` at 0) overriding
178 | the shadow stablished by this plugin.
179 |
180 | Since version 2.1.0, this plugin replaces the default `StateListAnimator` with one
181 | that gets back to the values you provide for `elevation` and `translationZ`.
182 |
183 | Feel free to fill an issue if you want the flexibility of defining your own
184 | `StateListAnimator`. The motivation so far was simply put this plugin to work with
185 | buttons without changing the original state once they are clicked.
186 |
187 | ## Changelog
188 | - 2.1.0 Decouple shadow logic / Override default StateListAnimator
189 | - 2.0.1 Fix error on old Android devices (< Lollipop)
190 | - 2.0.0 Density Independent Pixels / TranslationZ
191 | - 1.1.3 Minor issues
192 | - 1.1.2 Fix CI build
193 | - 1.1.0 Support for iOS custom attributes
194 | - 1.0.0 Initial implementation
195 |
196 | ## License
197 | Apache License Version 2.0, January 2004
198 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/demo/app/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/src/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-ng-shadow",
3 | "version": "2.1.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@angular/common": {
8 | "version": "4.2.6",
9 | "resolved": "https://registry.npmjs.org/@angular/common/-/common-4.2.6.tgz",
10 | "integrity": "sha1-IQrOS9JON1+LQbpS/rNLGKiH1do=",
11 | "dev": true,
12 | "requires": {
13 | "tslib": "1.7.1"
14 | }
15 | },
16 | "@angular/compiler": {
17 | "version": "4.2.6",
18 | "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.2.6.tgz",
19 | "integrity": "sha1-ZndW1JXKDUXSBhJooQ1Sr4Ofr/Q=",
20 | "dev": true,
21 | "requires": {
22 | "tslib": "1.7.1"
23 | }
24 | },
25 | "@angular/core": {
26 | "version": "4.2.6",
27 | "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.2.6.tgz",
28 | "integrity": "sha1-DByP8BV/B29KfAtyHKFCPxu+Fk4=",
29 | "dev": true,
30 | "requires": {
31 | "tslib": "1.7.1"
32 | }
33 | },
34 | "@angular/forms": {
35 | "version": "4.2.6",
36 | "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-4.2.6.tgz",
37 | "integrity": "sha1-nTI5lgjkYDu/GXQXqluU6ApGfrA=",
38 | "dev": true,
39 | "requires": {
40 | "tslib": "1.7.1"
41 | }
42 | },
43 | "@angular/http": {
44 | "version": "4.2.6",
45 | "resolved": "https://registry.npmjs.org/@angular/http/-/http-4.2.6.tgz",
46 | "integrity": "sha1-SZ4roLvB89cbdt6+wDTJWMrxE04=",
47 | "dev": true,
48 | "requires": {
49 | "tslib": "1.7.1"
50 | }
51 | },
52 | "@angular/platform-browser": {
53 | "version": "4.2.6",
54 | "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.2.6.tgz",
55 | "integrity": "sha1-oTH/WSIl/mSWvKLJr/YSpNvd9Dc=",
56 | "dev": true,
57 | "requires": {
58 | "tslib": "1.7.1"
59 | }
60 | },
61 | "@angular/router": {
62 | "version": "4.2.6",
63 | "resolved": "https://registry.npmjs.org/@angular/router/-/router-4.2.6.tgz",
64 | "integrity": "sha1-ppGdm2HEX/wV++5ZM5jj/VMtq0Y=",
65 | "dev": true,
66 | "requires": {
67 | "tslib": "1.7.1"
68 | }
69 | },
70 | "ansi-regex": {
71 | "version": "2.1.1",
72 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
73 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
74 | "dev": true
75 | },
76 | "ansi-styles": {
77 | "version": "2.2.1",
78 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
79 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
80 | "dev": true
81 | },
82 | "async": {
83 | "version": "0.9.2",
84 | "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
85 | "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
86 | "dev": true
87 | },
88 | "babel-code-frame": {
89 | "version": "6.26.0",
90 | "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
91 | "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
92 | "dev": true,
93 | "requires": {
94 | "chalk": "1.1.3",
95 | "esutils": "2.0.2",
96 | "js-tokens": "3.0.2"
97 | }
98 | },
99 | "balanced-match": {
100 | "version": "1.0.0",
101 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
102 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
103 | "dev": true
104 | },
105 | "brace-expansion": {
106 | "version": "1.1.8",
107 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
108 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
109 | "dev": true,
110 | "requires": {
111 | "balanced-match": "1.0.0",
112 | "concat-map": "0.0.1"
113 | }
114 | },
115 | "chalk": {
116 | "version": "1.1.3",
117 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
118 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
119 | "dev": true,
120 | "requires": {
121 | "ansi-styles": "2.2.1",
122 | "escape-string-regexp": "1.0.5",
123 | "has-ansi": "2.0.0",
124 | "strip-ansi": "3.0.1",
125 | "supports-color": "2.0.0"
126 | }
127 | },
128 | "colors": {
129 | "version": "1.1.2",
130 | "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
131 | "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
132 | "dev": true
133 | },
134 | "commander": {
135 | "version": "2.11.0",
136 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
137 | "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
138 | "dev": true
139 | },
140 | "concat-map": {
141 | "version": "0.0.1",
142 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
143 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
144 | "dev": true
145 | },
146 | "cycle": {
147 | "version": "1.0.3",
148 | "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz",
149 | "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=",
150 | "dev": true
151 | },
152 | "deep-equal": {
153 | "version": "0.2.2",
154 | "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz",
155 | "integrity": "sha1-hLdFiW80xoTpjyzg5Cq69Du6AX0=",
156 | "dev": true
157 | },
158 | "diff": {
159 | "version": "3.4.0",
160 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz",
161 | "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==",
162 | "dev": true
163 | },
164 | "escape-string-regexp": {
165 | "version": "1.0.5",
166 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
167 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
168 | "dev": true
169 | },
170 | "esutils": {
171 | "version": "2.0.2",
172 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
173 | "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
174 | "dev": true
175 | },
176 | "eyes": {
177 | "version": "0.1.8",
178 | "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz",
179 | "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=",
180 | "dev": true
181 | },
182 | "fs.realpath": {
183 | "version": "1.0.0",
184 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
185 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
186 | "dev": true
187 | },
188 | "glob": {
189 | "version": "7.1.2",
190 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
191 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
192 | "dev": true,
193 | "requires": {
194 | "fs.realpath": "1.0.0",
195 | "inflight": "1.0.6",
196 | "inherits": "2.0.3",
197 | "minimatch": "3.0.4",
198 | "once": "1.4.0",
199 | "path-is-absolute": "1.0.1"
200 | }
201 | },
202 | "has-ansi": {
203 | "version": "2.0.0",
204 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
205 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
206 | "dev": true,
207 | "requires": {
208 | "ansi-regex": "2.1.1"
209 | }
210 | },
211 | "i": {
212 | "version": "0.3.6",
213 | "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz",
214 | "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=",
215 | "dev": true
216 | },
217 | "inflight": {
218 | "version": "1.0.6",
219 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
220 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
221 | "dev": true,
222 | "requires": {
223 | "once": "1.4.0",
224 | "wrappy": "1.0.2"
225 | }
226 | },
227 | "inherits": {
228 | "version": "2.0.3",
229 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
230 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
231 | "dev": true
232 | },
233 | "isstream": {
234 | "version": "0.1.2",
235 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
236 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
237 | "dev": true
238 | },
239 | "js-tokens": {
240 | "version": "3.0.2",
241 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
242 | "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
243 | "dev": true
244 | },
245 | "minimatch": {
246 | "version": "3.0.4",
247 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
248 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
249 | "dev": true,
250 | "requires": {
251 | "brace-expansion": "1.1.8"
252 | }
253 | },
254 | "minimist": {
255 | "version": "0.0.8",
256 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
257 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
258 | "dev": true
259 | },
260 | "mkdirp": {
261 | "version": "0.5.1",
262 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
263 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
264 | "dev": true,
265 | "requires": {
266 | "minimist": "0.0.8"
267 | }
268 | },
269 | "mute-stream": {
270 | "version": "0.0.7",
271 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
272 | "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
273 | "dev": true
274 | },
275 | "nativescript-angular": {
276 | "version": "4.2.0",
277 | "resolved": "https://registry.npmjs.org/nativescript-angular/-/nativescript-angular-4.2.0.tgz",
278 | "integrity": "sha512-I7iSIW1NQGJRGM96mkPjngJD3b64l8aRlMdcgdJ8gf2B1S1BGhk5IBdu4lhfwjdUSlv4x80QQHhWaAJrRQyslA==",
279 | "dev": true,
280 | "requires": {
281 | "nativescript-intl": "3.0.0",
282 | "reflect-metadata": "0.1.10"
283 | }
284 | },
285 | "nativescript-intl": {
286 | "version": "3.0.0",
287 | "resolved": "https://registry.npmjs.org/nativescript-intl/-/nativescript-intl-3.0.0.tgz",
288 | "integrity": "sha1-gu6b59N3Fys8QpVzRyMDdijhhqc=",
289 | "dev": true
290 | },
291 | "ncp": {
292 | "version": "1.0.1",
293 | "resolved": "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz",
294 | "integrity": "sha1-0VNn5cuHQyuhF9K/gP30Wuz7QkY=",
295 | "dev": true
296 | },
297 | "once": {
298 | "version": "1.4.0",
299 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
300 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
301 | "dev": true,
302 | "requires": {
303 | "wrappy": "1.0.2"
304 | }
305 | },
306 | "path-is-absolute": {
307 | "version": "1.0.1",
308 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
309 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
310 | "dev": true
311 | },
312 | "path-parse": {
313 | "version": "1.0.5",
314 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
315 | "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
316 | "dev": true
317 | },
318 | "pkginfo": {
319 | "version": "0.4.1",
320 | "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz",
321 | "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=",
322 | "dev": true
323 | },
324 | "prompt": {
325 | "version": "1.0.0",
326 | "resolved": "https://registry.npmjs.org/prompt/-/prompt-1.0.0.tgz",
327 | "integrity": "sha1-jlcSPDlquYiJf7Mn/Trtw+c15P4=",
328 | "dev": true,
329 | "requires": {
330 | "colors": "1.1.2",
331 | "pkginfo": "0.4.1",
332 | "read": "1.0.7",
333 | "revalidator": "0.1.8",
334 | "utile": "0.3.0",
335 | "winston": "2.1.1"
336 | }
337 | },
338 | "read": {
339 | "version": "1.0.7",
340 | "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz",
341 | "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=",
342 | "dev": true,
343 | "requires": {
344 | "mute-stream": "0.0.7"
345 | }
346 | },
347 | "reflect-metadata": {
348 | "version": "0.1.10",
349 | "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz",
350 | "integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=",
351 | "dev": true
352 | },
353 | "resolve": {
354 | "version": "1.4.0",
355 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz",
356 | "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==",
357 | "dev": true,
358 | "requires": {
359 | "path-parse": "1.0.5"
360 | }
361 | },
362 | "revalidator": {
363 | "version": "0.1.8",
364 | "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz",
365 | "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=",
366 | "dev": true
367 | },
368 | "rimraf": {
369 | "version": "2.6.2",
370 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
371 | "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
372 | "dev": true,
373 | "requires": {
374 | "glob": "7.1.2"
375 | }
376 | },
377 | "rxjs": {
378 | "version": "5.4.3",
379 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.3.tgz",
380 | "integrity": "sha512-fSNi+y+P9ss+EZuV0GcIIqPUK07DEaMRUtLJvdcvMyFjc9dizuDjere+A4V7JrLGnm9iCc+nagV/4QdMTkqC4A==",
381 | "dev": true,
382 | "requires": {
383 | "symbol-observable": "1.0.4"
384 | }
385 | },
386 | "semver": {
387 | "version": "5.4.1",
388 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
389 | "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
390 | "dev": true
391 | },
392 | "stack-trace": {
393 | "version": "0.0.10",
394 | "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
395 | "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
396 | "dev": true
397 | },
398 | "strip-ansi": {
399 | "version": "3.0.1",
400 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
401 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
402 | "dev": true,
403 | "requires": {
404 | "ansi-regex": "2.1.1"
405 | }
406 | },
407 | "supports-color": {
408 | "version": "2.0.0",
409 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
410 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
411 | "dev": true
412 | },
413 | "symbol-observable": {
414 | "version": "1.0.4",
415 | "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz",
416 | "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=",
417 | "dev": true
418 | },
419 | "tns-core-modules": {
420 | "version": "3.2.0",
421 | "resolved": "https://registry.npmjs.org/tns-core-modules/-/tns-core-modules-3.2.0.tgz",
422 | "integrity": "sha1-v0cYlbc8teVUnETyU0Hff100+cI=",
423 | "dev": true,
424 | "requires": {
425 | "tns-core-modules-widgets": "3.2.0"
426 | }
427 | },
428 | "tns-core-modules-widgets": {
429 | "version": "3.2.0",
430 | "resolved": "https://registry.npmjs.org/tns-core-modules-widgets/-/tns-core-modules-widgets-3.2.0.tgz",
431 | "integrity": "sha1-bTIK6dHhyudsdEPEpfrqvtsAR3M=",
432 | "dev": true
433 | },
434 | "tns-platform-declarations": {
435 | "version": "3.2.0",
436 | "resolved": "https://registry.npmjs.org/tns-platform-declarations/-/tns-platform-declarations-3.2.0.tgz",
437 | "integrity": "sha1-YDjU5mOsV+zF9g9s0R4upTxVWYo=",
438 | "dev": true
439 | },
440 | "tslib": {
441 | "version": "1.7.1",
442 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz",
443 | "integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=",
444 | "dev": true
445 | },
446 | "tslint": {
447 | "version": "5.7.0",
448 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.7.0.tgz",
449 | "integrity": "sha1-wl4NDJL6EgHCvDDoROCOaCtPNVI=",
450 | "dev": true,
451 | "requires": {
452 | "babel-code-frame": "6.26.0",
453 | "colors": "1.1.2",
454 | "commander": "2.11.0",
455 | "diff": "3.4.0",
456 | "glob": "7.1.2",
457 | "minimatch": "3.0.4",
458 | "resolve": "1.4.0",
459 | "semver": "5.4.1",
460 | "tslib": "1.7.1",
461 | "tsutils": "2.12.0"
462 | }
463 | },
464 | "tsutils": {
465 | "version": "2.12.0",
466 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.12.0.tgz",
467 | "integrity": "sha1-yJKoTI8vjeE/jvMsLFw4tFfM6sY=",
468 | "dev": true,
469 | "requires": {
470 | "tslib": "1.7.1"
471 | }
472 | },
473 | "typescript": {
474 | "version": "2.4.2",
475 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz",
476 | "integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=",
477 | "dev": true
478 | },
479 | "utile": {
480 | "version": "0.3.0",
481 | "resolved": "https://registry.npmjs.org/utile/-/utile-0.3.0.tgz",
482 | "integrity": "sha1-E1LDQOuCDk2N26A5pPv6oy7U7zo=",
483 | "dev": true,
484 | "requires": {
485 | "async": "0.9.2",
486 | "deep-equal": "0.2.2",
487 | "i": "0.3.6",
488 | "mkdirp": "0.5.1",
489 | "ncp": "1.0.1",
490 | "rimraf": "2.6.2"
491 | }
492 | },
493 | "winston": {
494 | "version": "2.1.1",
495 | "resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz",
496 | "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=",
497 | "dev": true,
498 | "requires": {
499 | "async": "1.0.0",
500 | "colors": "1.0.3",
501 | "cycle": "1.0.3",
502 | "eyes": "0.1.8",
503 | "isstream": "0.1.2",
504 | "pkginfo": "0.3.1",
505 | "stack-trace": "0.0.10"
506 | },
507 | "dependencies": {
508 | "async": {
509 | "version": "1.0.0",
510 | "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz",
511 | "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=",
512 | "dev": true
513 | },
514 | "colors": {
515 | "version": "1.0.3",
516 | "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
517 | "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=",
518 | "dev": true
519 | },
520 | "pkginfo": {
521 | "version": "0.3.1",
522 | "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz",
523 | "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=",
524 | "dev": true
525 | }
526 | }
527 | },
528 | "wrappy": {
529 | "version": "1.0.2",
530 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
531 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
532 | "dev": true
533 | },
534 | "zone.js": {
535 | "version": "0.8.18",
536 | "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.18.tgz",
537 | "integrity": "sha512-knKOBQM0oea3/x9pdyDuDi7RhxDlJhOIkeixXSiTKWLgs4LpK37iBc+1HaHwzlciHUKT172CymJFKo8Xgh+44Q==",
538 | "dev": true
539 | }
540 | }
541 | }
542 |
--------------------------------------------------------------------------------