├── .gitignore
├── LICENSE
├── README.md
├── demo-ng
├── App_Resources
│ ├── Android
│ │ ├── app.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-ldpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-nodpi
│ │ │ └── splash_screen.xml
│ │ │ ├── drawable-xhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── background.png
│ │ │ ├── icon.png
│ │ │ └── logo.png
│ │ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ └── iOS
│ │ ├── 04.jpg
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── icon-1024.png
│ │ │ ├── icon-20.png
│ │ │ ├── icon-20@2x.png
│ │ │ ├── icon-20@3x.png
│ │ │ ├── icon-29.png
│ │ │ ├── icon-29@2x.png
│ │ │ ├── icon-29@3x.png
│ │ │ ├── icon-40.png
│ │ │ ├── icon-40@2x.png
│ │ │ ├── icon-40@3x.png
│ │ │ ├── icon-60@2x.png
│ │ │ ├── icon-60@3x.png
│ │ │ ├── icon-76.png
│ │ │ ├── icon-76@2x.png
│ │ │ └── icon-83.5@2x.png
│ │ ├── Contents.json
│ │ ├── LaunchImage.launchimage
│ │ │ ├── Contents.json
│ │ │ ├── Default-1125h.png
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── Default-667h@2x.png
│ │ │ ├── Default-736h@3x.png
│ │ │ ├── Default-Landscape-X.png
│ │ │ ├── Default-Landscape-XR.png
│ │ │ ├── Default-Landscape-XS-Max.png
│ │ │ ├── Default-Landscape.png
│ │ │ ├── Default-Landscape@2x.png
│ │ │ ├── Default-Landscape@3x.png
│ │ │ ├── Default-Portrait-XR.png
│ │ │ ├── Default-Portrait-XS-Max.png
│ │ │ ├── Default-Portrait.png
│ │ │ ├── Default-Portrait@2x.png
│ │ │ ├── Default.png
│ │ │ └── Default@2x.png
│ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.AspectFill@3x.png
│ │ └── LaunchScreen.Center.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchScreen-Center.png
│ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ └── LaunchScreen.Center@3x.png
│ │ ├── Info.plist
│ │ ├── LaunchScreen.storyboard
│ │ └── build.xcconfig
├── LICENSE
├── angular.json
├── nativescript.config.ts
├── package-lock.json
├── package.json
├── references.d.ts
├── src
│ ├── app.css
│ ├── app
│ │ ├── app-routing.module.ts
│ │ ├── app.component.html
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ └── item
│ │ │ ├── items.component.html
│ │ │ └── items.component.ts
│ ├── images
│ │ ├── 01.jpg
│ │ ├── 02.jpg
│ │ ├── 03.jpg
│ │ └── 04.jpg
│ └── main.ts
└── tsconfig.json
├── demo
├── .npmrc
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── app.gradle
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── res
│ │ │ │ ├── drawable-hdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-ldpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-nodpi
│ │ │ │ └── splash_screen.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── background.png
│ │ │ │ ├── icon.png
│ │ │ │ └── logo.png
│ │ │ │ ├── values-v21
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── iOS
│ │ │ ├── 01.jpg
│ │ │ ├── 04.jpg
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-1024.png
│ │ │ │ ├── icon-29.png
│ │ │ │ ├── icon-29@2x.png
│ │ │ │ ├── icon-29@3x.png
│ │ │ │ ├── icon-40.png
│ │ │ │ ├── icon-40@2x.png
│ │ │ │ ├── icon-40@3x.png
│ │ │ │ ├── icon-60@2x.png
│ │ │ │ ├── icon-60@3x.png
│ │ │ │ ├── icon-76.png
│ │ │ │ ├── icon-76@2x.png
│ │ │ │ └── icon-83.5@2x.png
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.launchimage
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Default-1125h.png
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-667h@2x.png
│ │ │ │ ├── Default-736h@3x.png
│ │ │ │ ├── Default-Landscape-X.png
│ │ │ │ ├── Default-Landscape.png
│ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ ├── Default.png
│ │ │ │ └── Default@2x.png
│ │ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ └── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.Center.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ └── LaunchScreen-Center@2x.png
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── build.xcconfig
│ ├── app-root.xml
│ ├── app.css
│ ├── app.ts
│ ├── main-page.ts
│ ├── main-page.xml
│ └── res
│ │ ├── 01.jpg
│ │ ├── 02.jpg
│ │ ├── 03.jpg
│ │ └── 04.jpg
├── nativescript.config.ts
├── package.json
└── tsconfig.json
├── screenshots
├── ns-nytphoto-1.png
├── ns-nytphoto-2.png
├── photo_viewer.gif
├── photoview-android-1.png
└── photoview-android-2.png
├── src
├── .npmignore
├── package-lock.json
├── package.json
├── photoviewer.android.ts
├── photoviewer.common.ts
├── photoviewer.d.ts
├── photoviewer.ios.ts
├── platforms
│ ├── android
│ │ ├── AndroidManifest.xml
│ │ └── include.gradle
│ └── ios
│ │ └── Podfile
├── references.d.ts
├── tsconfig.json
└── typings
│ ├── objc!FLAnimatedImage.d.ts
│ └── objc!NYTPhotoViewer.d.ts
└── tslint.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # General
2 | .DS_Store
3 | .AppleDouble
4 | .LSOverride
5 | .idea
6 | .cloud
7 | .project
8 | tmp/
9 |
10 | # Visual Studio Code
11 | .vscode/
12 |
13 | # Logs
14 | logs
15 | *.log
16 | npm-debug.log*
17 | yarn-debug.log*
18 | yarn-error.log*
19 |
20 | *.js
21 | *.js.map
22 | *.log.*
23 |
24 | src/*.d.ts
25 | src/platforms/android/*.aar
26 | build/
27 | dist/
28 |
29 | !src/photoviewer.d.ts
30 | !src/references.d.ts
31 | !src/typings/objc!NYTPhotoViewer.d.ts
32 | !src/typings/objc!FLAnimatedImage.d.ts
33 |
34 | demo/*.d.ts
35 | demo/app/*.d.ts
36 | demo/app/*.js
37 | !demo/references.d.ts
38 | demo/lib
39 | demo/platforms
40 |
41 | demo-ng/*.d.ts
42 | demo-ng/src/app/*.d.ts
43 | demo-ng/src/app/*.js
44 | !demo-ng/references.d.ts
45 | demo-ng/lib
46 | demo-ng/platforms
47 |
48 | demo-js/*.d.ts
49 | demo-js/app/*.d.ts
50 | demo-js/lib
51 | demo-js/platforms
52 | !demo-js/app/*.js
53 | !demo-js/references.d.ts
54 |
55 | hooks/
56 | node_modules/
57 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | nativescript-photoviewer
4 |
5 | Copyright (c) 2016 Nedim Erkocevic
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8 |
9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10 |
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://www.npmjs.com/package/nativescript-photoviewer)
2 | [](https://www.npmjs.com/package/nativescript-photoviewer)
3 |
4 | # NativeScript PhotoViewer
5 | A simple photo-viewer/gallery component for NativeScript.
6 |
7 | ## Limitations
8 |
9 | Since the plugin is based on two different libraries for two different platforms their features are also somewhat diferent:
10 |
11 | Platform | State | Remote images (url) | Local images (resource) | Titles/Credits | Album View | Color Palette
12 | --- | --- | --- | --- | --- | --- | --- |
13 | iOS | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x:
14 | Android | :x: (Broken) | :white_check_mark: | :x: | :x: | :white_check_mark: | :white_check_mark:
15 |
16 | *If anyone has tips on a better android library that has same or similar features to the iOS, let us know.*
17 |
18 | ## Latest version
19 |
20 | **3.0.0**
21 | - NS7/8 support for iOS. Android part of this plugin does not work, PRs are welcome.
22 | - Might be better to combine [Nativescript-Carousel](https://github.com/manijak/nativescript-carousel) and [Nativescript-ImageZoom](https://github.com/triniwiz/nativescript-image-zoom) in a modal, to create a more powerful photo viewer and give you more control.
23 |
24 |
25 | ## Installation
26 | Run `tns plugin add nativescript-photoviewer` in your root directory of your project.
27 |
28 | ## Usage
29 | It's best to take a look at the included demo app(s) for advanced usages. Below is just a simple example on how to get the plugin running with minimal effort using vanilla nativescript (ts). For Angular, see `demo-ng`.
30 |
31 | ```typescript
32 | // Include the module
33 | import { PhotoViewer, PhotoViewerOptions, PaletteType, NYTPhotoItem } from "nativescript-photoviewer";
34 | var photoViewer: PhotoViewer;
35 |
36 | // Create a new instace of PhotoViewer in the onLoaded event. Very important to do the init here!
37 | export function pageLoaded(args: EventData) {
38 | photoViewer = new PhotoViewer();
39 | }
40 |
41 | // Show gallery
42 | export function openGallery(args: EventData){
43 |
44 | let image1 = "https://blabla/image1.jpg";
45 | let image2 = "https://blabla/image2.jpg";
46 | let image3 = "https://blabla/image3.jpg";
47 | let image4 = "https://blabla/image4.jpg";
48 | let myImages = [image1, image2, image3, image4];
49 |
50 | // Example on how to use the options class (optional)
51 | let photoviewerOptions: PhotoViewerOptions = {
52 | startIndex: 0,
53 | ios: {
54 | completionCallback: galleryLoaded
55 | },
56 | android: {
57 | paletteType: PaletteType.DarkVibrant,
58 | showAlbum: false
59 | }
60 | };
61 |
62 | photoViewer.showGallery(myImages, photoviewerOptions);
63 | }
64 | ```
65 |
66 | ## Changelog
67 |
68 | **3.0.0**
69 | - NS7/8 support for iOS. Android part of this plugin does not work, PRs are welcome.
70 | - Might be better to combine [Nativescript-Carousel](https://github.com/manijak/nativescript-carousel) and [Nativescript-ImageZoom](https://github.com/triniwiz/nativescript-image-zoom) in a modal, to create a more powerful photo viewer and give you more control.
71 |
72 |
73 | **2.1.5**
74 | - Fix for iOS datasource issue (premature garbage collect) - caused images to dissapear when using gallery.
75 |
76 | **2.1.1**
77 | - Forgot to inlcude the photoviewer.d.ts file in the npm package. Add a reference to it in your `references.d.ts`.
78 | - Added a vanilla js demo app `demo-js`.
79 |
80 | **2.1.0**
81 | - Fixed Android & iOS promise handling, will resolve properly now when gallery is closed (both in vanilla tns and Angular).
82 | - Added Angular demo app `demo-ng`.
83 | - Known issue 1: Gallery does not work when opened from another modal.
84 | - Known issue 2: When using Android Pie (9), for some reason, images don't appear untill you zoom (on simulator, not tested on real device).
85 |
86 | **2.0.2**
87 | - Code refactor to TypeScript, added typings.
88 | - Renamed `showViewer()` to `showGallery()` that now has 1 mandatory param and 1 optional param.
89 | - Fixed the issue where the image `datasource` would be GC'ed on iOS (important to init the plugin in the `onLoaded` event)
90 | - Updated demo app to reflect the changes, added album demo for Android.
91 | - Known issue: Gallery does not work when opened from another modal.
92 |
93 | **1.5.0**
94 | - Photo Viewer now works inside Modal Views, typo fix for 'completionCallback'. Big thanks to @Eonfuzz
95 | - Fixed the iOS datasource to be more strong referenced & the _android ref. Big thanks to @miex0r
96 | - Known issue: [iOS]If loading high-res images via urls, the images are being loaded **before** the gallery is shown. So the UI might freeze. A workaround for this could be to use the `completionCallback` and show a spinner when opening the gallery.
97 |
98 |
99 | **1.4.0**
100 | - Moved param for index to a property: `startIndex`
101 | - (iOS) Added property to set completionCallback
102 | - (Android) Added option to show album first or go directly to fullscreen slides. More similar to iOS.
103 | - (Android) Added property to set background color palette for fullscreen slides.
104 | - Fixed demo app
105 | - Changed license to MIT
106 |
107 | **1.3.0**
108 | - Updated iOS pod to newer version (fixed minor breaking changes)
109 | - Added a second paramter to the `showViewer(ARRAY, INDEX?)` function. Makes the gallery init on that image: `photoViewer.showViewer(myImages,1);`
110 |
111 |
112 | ## Screenshots
113 |  
114 |  
115 |
116 | ## Contribution
117 | I'll review & accept pull requests that improve the plugin and assign credit.
118 |
119 |
120 | ## Credits
121 |
122 | The plugin is based on the following libraries:
123 |
124 | iOS | Android
125 | --- | ---
126 | [NYTPhotoViewer](https://github.com/NYTimes/NYTPhotoViewer) | [ImageGallery](https://github.com/lawloretienne/ImageGallery/)
127 |
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // implementation 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | // If you want to add something to be applied before applying plugins' include.gradle files
9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1"
10 | // create a file named before-plugins.gradle in the current directory and place it there
11 |
12 | android {
13 | defaultConfig {
14 | generatedDensities = []
15 | }
16 | aaptOptions {
17 | additionalParameters "--no-version-vectors"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/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-ng/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo-ng/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/04.jpg
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "icon-20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "icon-20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "icon-29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "icon-29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "icon-40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "icon-40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "icon-20.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "icon-20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "icon-29.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "icon-29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "icon-40.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "icon-40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "icon-76.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "icon-76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "icon-83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "icon-1024.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "2688h",
7 | "filename" : "Default-Portrait-XS-Max.png",
8 | "minimum-system-version" : "12.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "2688h",
16 | "filename" : "Default-Landscape-XS-Max.png",
17 | "minimum-system-version" : "12.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "1792h",
25 | "filename" : "Default-Portrait-XR.png",
26 | "minimum-system-version" : "12.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "extent" : "full-screen",
32 | "idiom" : "iphone",
33 | "subtype" : "1792h",
34 | "filename" : "Default-Landscape-XR.png",
35 | "minimum-system-version" : "12.0",
36 | "orientation" : "landscape",
37 | "scale" : "2x"
38 | },
39 | {
40 | "extent" : "full-screen",
41 | "idiom" : "iphone",
42 | "subtype" : "2436h",
43 | "filename" : "Default-1125h.png",
44 | "minimum-system-version" : "11.0",
45 | "orientation" : "portrait",
46 | "scale" : "3x"
47 | },
48 | {
49 | "extent" : "full-screen",
50 | "idiom" : "iphone",
51 | "subtype" : "2436h",
52 | "filename" : "Default-Landscape-X.png",
53 | "minimum-system-version" : "11.0",
54 | "orientation" : "landscape",
55 | "scale" : "3x"
56 | },
57 | {
58 | "extent" : "full-screen",
59 | "idiom" : "iphone",
60 | "subtype" : "736h",
61 | "filename" : "Default-736h@3x.png",
62 | "minimum-system-version" : "8.0",
63 | "orientation" : "portrait",
64 | "scale" : "3x"
65 | },
66 | {
67 | "extent" : "full-screen",
68 | "idiom" : "iphone",
69 | "subtype" : "736h",
70 | "filename" : "Default-Landscape@3x.png",
71 | "minimum-system-version" : "8.0",
72 | "orientation" : "landscape",
73 | "scale" : "3x"
74 | },
75 | {
76 | "extent" : "full-screen",
77 | "idiom" : "iphone",
78 | "subtype" : "667h",
79 | "filename" : "Default-667h@2x.png",
80 | "minimum-system-version" : "8.0",
81 | "orientation" : "portrait",
82 | "scale" : "2x"
83 | },
84 | {
85 | "orientation" : "portrait",
86 | "idiom" : "iphone",
87 | "filename" : "Default@2x.png",
88 | "extent" : "full-screen",
89 | "minimum-system-version" : "7.0",
90 | "scale" : "2x"
91 | },
92 | {
93 | "extent" : "full-screen",
94 | "idiom" : "iphone",
95 | "subtype" : "retina4",
96 | "filename" : "Default-568h@2x.png",
97 | "minimum-system-version" : "7.0",
98 | "orientation" : "portrait",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "filename" : "Default-Portrait.png",
105 | "extent" : "full-screen",
106 | "minimum-system-version" : "7.0",
107 | "scale" : "1x"
108 | },
109 | {
110 | "orientation" : "landscape",
111 | "idiom" : "ipad",
112 | "filename" : "Default-Landscape.png",
113 | "extent" : "full-screen",
114 | "minimum-system-version" : "7.0",
115 | "scale" : "1x"
116 | },
117 | {
118 | "orientation" : "portrait",
119 | "idiom" : "ipad",
120 | "filename" : "Default-Portrait@2x.png",
121 | "extent" : "full-screen",
122 | "minimum-system-version" : "7.0",
123 | "scale" : "2x"
124 | },
125 | {
126 | "orientation" : "landscape",
127 | "idiom" : "ipad",
128 | "filename" : "Default-Landscape@2x.png",
129 | "extent" : "full-screen",
130 | "minimum-system-version" : "7.0",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "iphone",
136 | "filename" : "Default.png",
137 | "extent" : "full-screen",
138 | "scale" : "1x"
139 | },
140 | {
141 | "orientation" : "portrait",
142 | "idiom" : "iphone",
143 | "filename" : "Default@2x.png",
144 | "extent" : "full-screen",
145 | "scale" : "2x"
146 | },
147 | {
148 | "orientation" : "portrait",
149 | "idiom" : "iphone",
150 | "filename" : "Default-568h@2x.png",
151 | "extent" : "full-screen",
152 | "subtype" : "retina4",
153 | "scale" : "2x"
154 | },
155 | {
156 | "orientation" : "portrait",
157 | "idiom" : "ipad",
158 | "extent" : "to-status-bar",
159 | "scale" : "1x"
160 | },
161 | {
162 | "orientation" : "portrait",
163 | "idiom" : "ipad",
164 | "filename" : "Default-Portrait.png",
165 | "extent" : "full-screen",
166 | "scale" : "1x"
167 | },
168 | {
169 | "orientation" : "landscape",
170 | "idiom" : "ipad",
171 | "extent" : "to-status-bar",
172 | "scale" : "1x"
173 | },
174 | {
175 | "orientation" : "landscape",
176 | "idiom" : "ipad",
177 | "filename" : "Default-Landscape.png",
178 | "extent" : "full-screen",
179 | "scale" : "1x"
180 | },
181 | {
182 | "orientation" : "portrait",
183 | "idiom" : "ipad",
184 | "extent" : "to-status-bar",
185 | "scale" : "2x"
186 | },
187 | {
188 | "orientation" : "portrait",
189 | "idiom" : "ipad",
190 | "filename" : "Default-Portrait@2x.png",
191 | "extent" : "full-screen",
192 | "scale" : "2x"
193 | },
194 | {
195 | "orientation" : "landscape",
196 | "idiom" : "ipad",
197 | "extent" : "to-status-bar",
198 | "scale" : "2x"
199 | },
200 | {
201 | "orientation" : "landscape",
202 | "idiom" : "ipad",
203 | "filename" : "Default-Landscape@2x.png",
204 | "extent" : "full-screen",
205 | "scale" : "2x"
206 | }
207 | ],
208 | "info" : {
209 | "version" : 1,
210 | "author" : "xcode"
211 | }
212 | }
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo-ng/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 | "filename" : "LaunchScreen.AspectFill@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen.AspectFill@3x.png
--------------------------------------------------------------------------------
/demo-ng/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 | "filename" : "LaunchScreen.Center@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen.Center@3x.png
--------------------------------------------------------------------------------
/demo-ng/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-ng/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 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/demo-ng/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-ng/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 (c) 2015-2019 Progress Software Corporation
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-ng/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "cli": {
6 | "defaultCollection": "@nativescript/schematics"
7 | },
8 | "projects": {
9 | "hello-world": {
10 | "root": "",
11 | "sourceRoot": "src",
12 | "projectType": "application",
13 | "prefix": "ns"
14 | }
15 | },
16 | "defaultProject": "hello-world"
17 | }
18 |
--------------------------------------------------------------------------------
/demo-ng/nativescript.config.ts:
--------------------------------------------------------------------------------
1 | import { NativeScriptConfig } from '@nativescript/core'
2 |
3 | export default {
4 | id: 'org.nativescript.demong',
5 | appResourcesPath: 'App_Resources',
6 | android: {
7 | v8Flags: '--expose_gc',
8 | markingMode: 'none',
9 | },
10 | appPath: 'src',
11 | } as NativeScriptConfig
12 |
--------------------------------------------------------------------------------
/demo-ng/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "NativeScript Application",
3 | "license": "SEE LICENSE IN ",
4 | "repository": "",
5 | "dependencies": {
6 | "@angular/animations": "~7.2.0",
7 | "@angular/common": "~7.2.0",
8 | "@angular/compiler": "~7.2.0",
9 | "@angular/core": "~7.2.0",
10 | "@angular/forms": "~7.2.0",
11 | "@angular/http": "~7.2.0",
12 | "@angular/platform-browser": "~7.2.0",
13 | "@angular/platform-browser-dynamic": "~7.2.0",
14 | "@angular/router": "~7.2.0",
15 | "nativescript-photoviewer": "file:../src",
16 | "nativescript-theme-core": "~1.0.4",
17 | "reflect-metadata": "~0.1.12",
18 | "rxjs": "~6.3.0",
19 | "zone.js": "~0.8.26",
20 | "@nativescript/core": "7.0.0",
21 | "@nativescript/webpack": "3.0.0",
22 | "@nativescript/angular": "10.0.0"
23 | },
24 | "devDependencies": {
25 | "@angular/compiler-cli": "~7.2.0",
26 | "@nativescript/schematics": "~0.5.0",
27 | "@ngtools/webpack": "~7.2.0",
28 | "nativescript-dev-typescript": "~0.8.0",
29 | "@nativescript/types": "7.0.0"
30 | },
31 | "gitHead": "f548ec926e75201ab1b7c4a3a7ceefe7a4db15af",
32 | "readme": "NativeScript Application",
33 | "main": "main.js"
34 | }
35 |
--------------------------------------------------------------------------------
/demo-ng/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
--------------------------------------------------------------------------------
/demo-ng/src/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 |
14 |
15 | button {
16 | background-color: #415677;
17 | color: white;
18 | margin: 0 6 15 6;
19 | border-color:#14305e;
20 | border-width: 2;
21 | border-radius: 2;
22 | padding: 4;
23 | }
24 |
25 | label{
26 | text-align: center;
27 | }
28 |
--------------------------------------------------------------------------------
/demo-ng/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from "@angular/core";
2 | import { NativeScriptRouterModule } from "nativescript-angular/router";
3 | import { Routes } from "@angular/router";
4 |
5 | import { ItemsComponent } from "./item/items.component";
6 |
7 | const routes: Routes = [
8 | { path: "", redirectTo: "/items", pathMatch: "full" },
9 | { path: "items", component: ItemsComponent }
10 | ];
11 |
12 | @NgModule({
13 | imports: [NativeScriptRouterModule.forRoot(routes)],
14 | exports: [NativeScriptRouterModule]
15 | })
16 | export class AppRoutingModule { }
17 |
--------------------------------------------------------------------------------
/demo-ng/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/demo-ng/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from "@angular/core";
2 |
3 | @Component({
4 | selector: "ns-app",
5 | moduleId: module.id,
6 | templateUrl: "./app.component.html"
7 | })
8 | export class AppComponent { }
9 |
--------------------------------------------------------------------------------
/demo-ng/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module";
3 |
4 | import { AppRoutingModule } from "./app-routing.module";
5 | import { AppComponent } from "./app.component";
6 | import { ItemsComponent } from "./item/items.component";
7 |
8 | // Uncomment and add to NgModule imports if you need to use two-way binding
9 | // import { NativeScriptFormsModule } from "nativescript-angular/forms";
10 |
11 | // Uncomment and add to NgModule imports if you need to use the HttpClient wrapper
12 | // import { NativeScriptHttpClientModule } from "nativescript-angular/http-client";
13 |
14 | @NgModule({
15 | bootstrap: [
16 | AppComponent
17 | ],
18 | imports: [
19 | NativeScriptModule,
20 | AppRoutingModule
21 | ],
22 | declarations: [
23 | AppComponent,
24 | ItemsComponent
25 | ],
26 | providers: [],
27 | schemas: [
28 | NO_ERRORS_SCHEMA
29 | ]
30 | })
31 | /*
32 | Pass your application module to the bootstrapModule function located in main.ts to start your app
33 | */
34 | export class AppModule { }
35 |
--------------------------------------------------------------------------------
/demo-ng/src/app/item/items.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/demo-ng/src/app/item/items.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, ElementRef, ViewChild } from "@angular/core";
2 | import { ActivityIndicator, isIOS, Color, EventData, Page, ImageSource } from "@nativescript/core";
3 | import { PhotoViewer, PhotoViewerOptions, PaletteType, NYTPhotoItem } from "nativescript-photoviewer";
4 |
5 | let image1 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/01.jpg";
6 | let image2 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/02.jpg";
7 | let image3 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/03.jpg";
8 | let image4 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/04.jpg";
9 |
10 | @Component({
11 | selector: "ns-items",
12 | moduleId: module.id,
13 | templateUrl: "./items.component.html"
14 | })
15 | export class ItemsComponent implements OnInit {
16 | photoViewer: PhotoViewer;
17 | indicator: ActivityIndicator;
18 |
19 | myImages = [image1, image2, image3, image4];
20 |
21 | constructor(private _page: Page) {
22 | this._page.on("loaded", () => {
23 |
24 | this.photoViewer = new PhotoViewer();
25 |
26 | if(isIOS){
27 | this.indicator = this._page.getViewById("myspinner");
28 | this.indicator.ios.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.WhiteLarge;
29 | this.indicator.ios.color = new Color("#415677").ios;
30 | }
31 | })
32 | }
33 |
34 | ngOnInit(): void { }
35 |
36 | showRemoteImages(): void {
37 | if(isIOS){
38 | this.indicator.busy = true; /** Show spinner prior to opening the gallery */
39 | }
40 |
41 | let photoviewerOptions: PhotoViewerOptions = {
42 | startIndex: 0,
43 | ios: {
44 | completionCallback: () => {
45 | this.galleryLoaded();
46 | }
47 | },
48 | android: {
49 | paletteType: PaletteType.DarkVibrant,
50 | showAlbum: false
51 | }
52 | };
53 |
54 | this.photoViewer.showGallery(this.myImages, photoviewerOptions).then(() => {
55 | console.log("Gallery closed...");
56 | });
57 | }
58 |
59 | showRemoteImagesAlbum(){
60 | if(isIOS)
61 | this.indicator.busy = true; /** Show spinner prior to opening the gallery */
62 |
63 | let photoviewerOptions: PhotoViewerOptions = {
64 | startIndex: 0,
65 | ios: {
66 | completionCallback: this.galleryLoaded
67 | },
68 | android: {
69 | paletteType: PaletteType.DarkVibrant,
70 | showAlbum: true
71 | }
72 | };
73 |
74 | this.photoViewer.showGallery(this.myImages, photoviewerOptions).then(() => {
75 | console.log("Gallery closed...");
76 | });
77 | }
78 |
79 | showLocalImagesWithOptions(args: EventData){
80 |
81 | let photoviewerOptions: PhotoViewerOptions = {
82 | startIndex: 0,
83 | ios: {
84 | titleFontSize: 20,
85 | creditFontSize: 14,
86 | fontFamily: "Avenir-Roman",
87 | titleColor: new Color("#fff").ios,
88 | summaryColor: new Color("#99813c").ios,
89 | creditColor: new Color("#fed700").ios,
90 | completionCallback: () => {
91 | this.galleryLoaded();
92 | }
93 | }
94 | };
95 |
96 |
97 | var testImage1: NYTPhotoItem = {
98 | image: ImageSource.fromFileSync("~/images/01.jpg").ios,
99 | title: "Image 1 title",
100 | summary: "Image 1 summary",
101 | credit: "Image 1 credits"
102 | };
103 | var testImage2: NYTPhotoItem = {
104 | image: ImageSource.fromFileSync("~/images/02.jpg").ios,
105 | title: "Image 2 title",
106 | summary: "Image 2 summary",
107 | credit: "Image 2 credits"
108 | };
109 | var testImage3: NYTPhotoItem = {
110 | image: ImageSource.fromFileSync("~/images/03.jpg").ios,
111 | title: "Image 3 title",
112 | summary: "Image 3 summary",
113 | credit: "Image 3 credits"
114 | };
115 | var testImage4: NYTPhotoItem = {
116 | image: ImageSource.fromFileSync("~/images/04.jpg").ios,
117 | title: "Image 4 title",
118 | summary: "Image 4 summary",
119 | credit: "Image 4 credits"
120 | };
121 |
122 | var myImages = [testImage1, testImage2, testImage3, testImage4];
123 | this.photoViewer.showGallery(myImages, photoviewerOptions).then(() => {
124 | console.log("Gallery closed");
125 | });
126 | }
127 |
128 | showMixedSourceImages(args: EventData){
129 |
130 | let photoviewerOptions: PhotoViewerOptions = {
131 | startIndex: 0,
132 | ios: {
133 | titleFontSize: 18,
134 | creditFontSize: 14,
135 | fontFamily: "Avenir-Roman",
136 | titleColor: new Color("#fff").ios,
137 | summaryColor: new Color("#99813c").ios,
138 | creditColor: new Color("#fed700").ios,
139 | completionCallback: () => {
140 | this.galleryLoaded();
141 | }
142 | }
143 | };
144 |
145 | var testImage1 = image1;
146 |
147 | var testImage2: NYTPhotoItem = {
148 | imageURL: image2,
149 | title: "Remote image (URL) with titles",
150 | summary: "Summary...",
151 | credit: "Credits..."
152 | };
153 | var testImage3: NYTPhotoItem = {
154 | image: ImageSource.fromFileSync("~/images/03.jpg").ios,
155 | title: "Local file converted to UIImage",
156 | summary: "image: imageSource.fromFile('~/images/03.jpg').ios",
157 | credit: "Credits..."
158 | };
159 | var testImage4: NYTPhotoItem = {
160 | imageURL: "res://04.jpg",
161 | title: "Local file from resources",
162 | summary: "imageURL: 'res://04.jpg'",
163 | credit: "Credits..."
164 | };
165 |
166 | var myImages = [testImage1, testImage2, testImage3, testImage4];
167 |
168 | this.photoViewer.showGallery(myImages, photoviewerOptions).then(() => {
169 | console.log("Gallery closed");
170 | });
171 | }
172 |
173 |
174 |
175 | private galleryLoaded(): void{
176 | console.log("gallery loaded...");
177 |
178 | /** We hide the spinner while the gallery is in focus */
179 | if(isIOS){
180 | this.indicator.busy = false;
181 | console.log("hide spinner");
182 | }
183 | }
184 | }
185 |
--------------------------------------------------------------------------------
/demo-ng/src/images/01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/src/images/01.jpg
--------------------------------------------------------------------------------
/demo-ng/src/images/02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/src/images/02.jpg
--------------------------------------------------------------------------------
/demo-ng/src/images/03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/src/images/03.jpg
--------------------------------------------------------------------------------
/demo-ng/src/images/04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo-ng/src/images/04.jpg
--------------------------------------------------------------------------------
/demo-ng/src/main.ts:
--------------------------------------------------------------------------------
1 | // this import should be first in order to load some required settings (like globals and reflect-metadata)
2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform";
3 |
4 | import { AppModule } from "./app/app.module";
5 |
6 | // A traditional NativeScript application starts by initializing global objects,
7 | // setting up global CSS rules, creating, and navigating to the main page.
8 | // Angular applications need to take care of their own initialization:
9 | // modules, components, directives, routes, DI providers.
10 | // A NativeScript Angular app needs to make both paradigms work together,
11 | // so we provide a wrapper platform object, platformNativeScriptDynamic,
12 | // that sets up a NativeScript application and can bootstrap the Angular framework.
13 | platformNativeScriptDynamic().bootstrapModule(AppModule);
14 |
--------------------------------------------------------------------------------
/demo-ng/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "esnext",
4 | "target": "es2017",
5 | "experimentalDecorators": true,
6 | "emitDecoratorMetadata": true,
7 | "noEmitHelpers": true,
8 | "noEmitOnError": true,
9 | "lib": [
10 | "es6",
11 | "dom",
12 | "es2015.iterable",
13 | "es2017"
14 | ],
15 | "baseUrl": ".",
16 | "paths": {
17 | "~/*": [
18 | "src/*"
19 | ],
20 | "*": [
21 | "./node_modules/tns-core-modules/*",
22 | "./node_modules/*"
23 | ]
24 | },
25 | "moduleResolution": "node",
26 | "removeComments": false
27 | },
28 | "exclude": [
29 | "node_modules",
30 | "platforms"
31 | ]
32 | }
--------------------------------------------------------------------------------
/demo/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
--------------------------------------------------------------------------------
/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.photoviewer"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/01.jpg
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/04.jpg
--------------------------------------------------------------------------------
/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/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "2436h",
7 | "filename" : "Default-1125h.png",
8 | "minimum-system-version" : "11.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "orientation" : "landscape",
14 | "idiom" : "iphone",
15 | "extent" : "full-screen",
16 | "filename" : "Default-Landscape-X.png",
17 | "minimum-system-version" : "11.0",
18 | "subtype" : "2436h",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "736h",
25 | "filename" : "Default-736h@3x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "3x"
29 | },
30 | {
31 | "extent" : "full-screen",
32 | "idiom" : "iphone",
33 | "subtype" : "736h",
34 | "filename" : "Default-Landscape@3x.png",
35 | "minimum-system-version" : "8.0",
36 | "orientation" : "landscape",
37 | "scale" : "3x"
38 | },
39 | {
40 | "extent" : "full-screen",
41 | "idiom" : "iphone",
42 | "subtype" : "667h",
43 | "filename" : "Default-667h@2x.png",
44 | "minimum-system-version" : "8.0",
45 | "orientation" : "portrait",
46 | "scale" : "2x"
47 | },
48 | {
49 | "orientation" : "portrait",
50 | "idiom" : "iphone",
51 | "filename" : "Default@2x.png",
52 | "extent" : "full-screen",
53 | "minimum-system-version" : "7.0",
54 | "scale" : "2x"
55 | },
56 | {
57 | "extent" : "full-screen",
58 | "idiom" : "iphone",
59 | "subtype" : "retina4",
60 | "filename" : "Default-568h@2x.png",
61 | "minimum-system-version" : "7.0",
62 | "orientation" : "portrait",
63 | "scale" : "2x"
64 | },
65 | {
66 | "orientation" : "portrait",
67 | "idiom" : "ipad",
68 | "filename" : "Default-Portrait.png",
69 | "extent" : "full-screen",
70 | "minimum-system-version" : "7.0",
71 | "scale" : "1x"
72 | },
73 | {
74 | "orientation" : "landscape",
75 | "idiom" : "ipad",
76 | "filename" : "Default-Landscape.png",
77 | "extent" : "full-screen",
78 | "minimum-system-version" : "7.0",
79 | "scale" : "1x"
80 | },
81 | {
82 | "orientation" : "portrait",
83 | "idiom" : "ipad",
84 | "filename" : "Default-Portrait@2x.png",
85 | "extent" : "full-screen",
86 | "minimum-system-version" : "7.0",
87 | "scale" : "2x"
88 | },
89 | {
90 | "orientation" : "landscape",
91 | "idiom" : "ipad",
92 | "filename" : "Default-Landscape@2x.png",
93 | "extent" : "full-screen",
94 | "minimum-system-version" : "7.0",
95 | "scale" : "2x"
96 | },
97 | {
98 | "orientation" : "portrait",
99 | "idiom" : "iphone",
100 | "filename" : "Default.png",
101 | "extent" : "full-screen",
102 | "scale" : "1x"
103 | },
104 | {
105 | "orientation" : "portrait",
106 | "idiom" : "iphone",
107 | "filename" : "Default@2x.png",
108 | "extent" : "full-screen",
109 | "scale" : "2x"
110 | },
111 | {
112 | "orientation" : "portrait",
113 | "idiom" : "iphone",
114 | "filename" : "Default-568h@2x.png",
115 | "extent" : "full-screen",
116 | "subtype" : "retina4",
117 | "scale" : "2x"
118 | },
119 | {
120 | "orientation" : "portrait",
121 | "idiom" : "ipad",
122 | "extent" : "to-status-bar",
123 | "scale" : "1x"
124 | },
125 | {
126 | "orientation" : "portrait",
127 | "idiom" : "ipad",
128 | "filename" : "Default-Portrait.png",
129 | "extent" : "full-screen",
130 | "scale" : "1x"
131 | },
132 | {
133 | "orientation" : "landscape",
134 | "idiom" : "ipad",
135 | "extent" : "to-status-bar",
136 | "scale" : "1x"
137 | },
138 | {
139 | "orientation" : "landscape",
140 | "idiom" : "ipad",
141 | "filename" : "Default-Landscape.png",
142 | "extent" : "full-screen",
143 | "scale" : "1x"
144 | },
145 | {
146 | "orientation" : "portrait",
147 | "idiom" : "ipad",
148 | "extent" : "to-status-bar",
149 | "scale" : "2x"
150 | },
151 | {
152 | "orientation" : "portrait",
153 | "idiom" : "ipad",
154 | "filename" : "Default-Portrait@2x.png",
155 | "extent" : "full-screen",
156 | "scale" : "2x"
157 | },
158 | {
159 | "orientation" : "landscape",
160 | "idiom" : "ipad",
161 | "extent" : "to-status-bar",
162 | "scale" : "2x"
163 | },
164 | {
165 | "orientation" : "landscape",
166 | "idiom" : "ipad",
167 | "filename" : "Default-Landscape@2x.png",
168 | "extent" : "full-screen",
169 | "scale" : "2x"
170 | }
171 | ],
172 | "info" : {
173 | "version" : 1,
174 | "author" : "xcode"
175 | }
176 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/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/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/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/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/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_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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-root.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | button {
2 | background-color: #415677;
3 | color: white;
4 | margin: 0 6 15 6;
5 | border-color:#14305e;
6 | border-width: 2;
7 | border-radius: 2;
8 | padding: 4;
9 | }
10 |
11 | label{
12 | text-align: center;
13 | }
14 |
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | import { Application } from '@nativescript/core';
2 | Application.run({ moduleName: "app-root" });
--------------------------------------------------------------------------------
/demo/app/main-page.ts:
--------------------------------------------------------------------------------
1 |
2 | import {
3 | ActivityIndicator,
4 | EventData,
5 | Color,
6 | Page,
7 | isIOS,
8 | ImageSource
9 | } from "@nativescript/core";
10 | import { PhotoViewer, PhotoViewerOptions, NYTPhotoItem, PaletteType } from "nativescript-photoviewer";
11 | var photoViewer: PhotoViewer;
12 | var mySpinner: ActivityIndicator;
13 |
14 | let image1 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/01.jpg";
15 | let image2 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/02.jpg";
16 | let image3 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/03.jpg";
17 | let image4 = "https://github.com/manijak/nativescript-photoviewer/raw/master/demo/app/res/04.jpg";
18 | let myImages = [image1, image2, image3, image4];
19 |
20 |
21 | export function pageLoaded(args: EventData) {
22 | const page = args.object;
23 | photoViewer = new PhotoViewer();
24 | mySpinner = page.getViewById("myspinner");
25 |
26 | if(isIOS){
27 | mySpinner.ios.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.WhiteLarge;
28 | mySpinner.ios.color = new Color("#415677").ios;
29 | }
30 | }
31 |
32 | export function showRemoteImages(args: EventData){
33 | if(isIOS)
34 | mySpinner.busy = true; /** Show spinner prior to opening the gallery */
35 |
36 | let photoviewerOptions: PhotoViewerOptions = {
37 | startIndex: 0,
38 | ios: {
39 | completionCallback: galleryLoaded
40 | },
41 | android: {
42 | paletteType: PaletteType.DarkVibrant,
43 | showAlbum: false
44 | }
45 | };
46 |
47 | photoViewer.showGallery(myImages, photoviewerOptions).then(() => {
48 | console.log("Gallery closed...");
49 | });
50 | };
51 |
52 | export function showRemoteImagesAlbum(args: EventData){
53 | if(isIOS)
54 | mySpinner.busy = true; /** Show spinner prior to opening the gallery */
55 |
56 | let photoviewerOptions: PhotoViewerOptions = {
57 | startIndex: 0,
58 | ios: {
59 | completionCallback: galleryLoaded
60 | },
61 | android: {
62 | paletteType: PaletteType.DarkVibrant,
63 | showAlbum: true
64 | }
65 | };
66 |
67 | photoViewer.showGallery(myImages, photoviewerOptions).then(() => {
68 | console.log("Gallery closed...");
69 | });
70 | };
71 |
72 | export function showLocalImagesWithOptions(args: EventData){
73 |
74 | let photoviewerOptions: PhotoViewerOptions = {
75 | startIndex: 0,
76 | ios: {
77 | titleFontSize: 20,
78 | creditFontSize: 14,
79 | fontFamily: "Avenir-Roman",
80 | titleColor: new Color("#fff").ios,
81 | summaryColor: new Color("#99813c").ios,
82 | creditColor: new Color("#fed700").ios,
83 | completionCallback: galleryLoaded
84 | }
85 | };
86 |
87 |
88 | var testImage1: NYTPhotoItem = {
89 | image: ImageSource.fromFileSync("~/res/01.jpg").ios,
90 | title: "Image 1 title",
91 | summary: "Image 1 summary",
92 | credit: "Image 1 credits"
93 | };
94 | var testImage2: NYTPhotoItem = {
95 | image: ImageSource.fromFileSync("~/res/02.jpg").ios,
96 | title: "Image 2 title",
97 | summary: "Image 2 summary",
98 | credit: "Image 2 credits"
99 | };
100 | var testImage3: NYTPhotoItem = {
101 | image: ImageSource.fromFileSync("~/res/03.jpg").ios,
102 | title: "Image 3 title",
103 | summary: "Image 3 summary",
104 | credit: "Image 3 credits"
105 | };
106 | var testImage4: NYTPhotoItem = {
107 | image: ImageSource.fromFileSync("~/res/04.jpg").ios,
108 | title: "Image 4 title",
109 | summary: "Image 4 summary",
110 | credit: "Image 4 credits"
111 | };
112 |
113 | var myImages = [testImage1, testImage2, testImage3, testImage4];
114 | photoViewer.showGallery(myImages, photoviewerOptions).then(() => {
115 | console.log("Gallery closed");
116 | });
117 | };
118 |
119 | export function showMixedSourceImages(args: EventData){
120 |
121 | let photoviewerOptions: PhotoViewerOptions = {
122 | startIndex: 0,
123 | ios: {
124 | titleFontSize: 18,
125 | creditFontSize: 14,
126 | fontFamily: "Avenir-Roman",
127 | titleColor: new Color("#fff").ios,
128 | summaryColor: new Color("#99813c").ios,
129 | creditColor: new Color("#fed700").ios,
130 | completionCallback: galleryLoaded
131 | }
132 | };
133 |
134 | var testImage1 = image1;
135 |
136 | var testImage2: NYTPhotoItem = {
137 | imageURL: image2,
138 | title: "Remote image (URL) with titles",
139 | summary: "Summary...",
140 | credit: "Credits..."
141 | };
142 | var testImage3: NYTPhotoItem = {
143 | image: ImageSource.fromFileSync("~/res/03.jpg").ios,
144 | title: "Local file converted to UIImage",
145 | summary: "image: imageSource.fromFile('~/images/03.jpg').ios",
146 | credit: "Credits..."
147 | };
148 | var testImage4: NYTPhotoItem = {
149 | imageURL: "res://04.jpg",
150 | title: "Local file from resources",
151 | summary: "imageURL: 'res://04.jpg'",
152 | credit: "Credits..."
153 | };
154 |
155 | var myImages = [testImage1, testImage2, testImage3, testImage4];
156 |
157 | photoViewer.showGallery(myImages, photoviewerOptions).then(() => {
158 | console.log("Gallery closed");
159 | });
160 | };
161 |
162 | function galleryLoaded(){
163 | console.log("gallery loaded...");
164 |
165 | /** We hide the spinner while the gallery is in focus */
166 | if(isIOS && mySpinner)
167 | mySpinner.busy = false;
168 | }
169 |
170 |
--------------------------------------------------------------------------------
/demo/app/main-page.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/demo/app/res/01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/res/01.jpg
--------------------------------------------------------------------------------
/demo/app/res/02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/res/02.jpg
--------------------------------------------------------------------------------
/demo/app/res/03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/res/03.jpg
--------------------------------------------------------------------------------
/demo/app/res/04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/demo/app/res/04.jpg
--------------------------------------------------------------------------------
/demo/nativescript.config.ts:
--------------------------------------------------------------------------------
1 | import { NativeScriptConfig } from '@nativescript/core'
2 |
3 | export default {
4 | id: 'org.nativescript.photoviewer',
5 | appResourcesPath: 'app/App_Resources',
6 | android: {
7 | v8Flags: '--expose_gc',
8 | markingMode: 'none',
9 | memoryCheckInterval: 500,
10 | freeMemoryRatio: 0.5,
11 | },
12 | appPath: 'app',
13 | } as NativeScriptConfig
14 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "nativescript-photoviewer": "file:../src/dist",
4 | "@nativescript/core": "7.0.0",
5 | "@nativescript/webpack": "3.0.0"
6 | },
7 | "devDependencies": {
8 | "typescript": "3.9.7",
9 | "@nativescript/types": "7.0.0"
10 | },
11 | "scripts": {
12 | "build.plugin": "cd ../src && npm run build"
13 | },
14 | "main": "app.js"
15 | }
16 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2017",
4 | "module": "esnext",
5 | "declaration": false,
6 | "removeComments": false,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "lib": [
11 | "es6",
12 | "dom",
13 | "es2017"
14 | ],
15 | "pretty": true,
16 | "allowUnreachableCode": false,
17 | "allowUnusedLabels": false,
18 | "noEmitHelpers": true,
19 | "noEmitOnError": false,
20 | "noImplicitAny": false,
21 | "noImplicitReturns": true,
22 | "noImplicitUseStrict": false,
23 | "noFallthroughCasesInSwitch": true,
24 | "baseUrl": ".",
25 | "paths": {
26 | "*": [
27 | "./node_modules/*"
28 | ],
29 | "~/*": [
30 | "app/*"
31 | ]
32 | },
33 | "moduleResolution": "node"
34 | },
35 | "include": [
36 | "../src",
37 | "**/*"
38 | ],
39 | "exclude": [
40 | "../src/node_modules",
41 | "node_modules",
42 | "platforms"
43 | ],
44 | "compileOnSave": false
45 | }
--------------------------------------------------------------------------------
/screenshots/ns-nytphoto-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/screenshots/ns-nytphoto-1.png
--------------------------------------------------------------------------------
/screenshots/ns-nytphoto-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/screenshots/ns-nytphoto-2.png
--------------------------------------------------------------------------------
/screenshots/photo_viewer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/screenshots/photo_viewer.gif
--------------------------------------------------------------------------------
/screenshots/photoview-android-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/screenshots/photoview-android-1.png
--------------------------------------------------------------------------------
/screenshots/photoview-android-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/manijak/nativescript-photoviewer/a504253c1fe6edb24483f595f0d5ee87eb1ba436/screenshots/photoview-android-2.png
--------------------------------------------------------------------------------
/src/.npmignore:
--------------------------------------------------------------------------------
1 | *.map
2 | *.ts
3 | !photoviewer.d.ts
4 | !platforms/ios/typings/*.ts
5 | *.png
6 | *.log
7 | tsconfig.json
8 | tslint.json
9 | typings/
10 | scripts/*
11 | platforms/android/*
12 | !platforms/android/include.gradle
13 | !platforms/android/*.aar
14 | !platforms/android/*.jar
15 | dist/
16 | *.tgz
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-photoviewer",
3 | "description": "A simple Photo-viewer component for NativeScript based on NYTPhotoViewer pod for iOS and ImageGalleryViewer for Android.",
4 | "main": "photoviewer",
5 | "typings": "photoviewer.d.ts",
6 | "version": "3.0.1",
7 | "nativescript": {
8 | "platforms": {
9 | "ios": "7.0.0",
10 | "android": "7.0.0"
11 | },
12 | "plugin": {
13 | "nan": "true",
14 | "core3": "true",
15 | "pan": "true",
16 | "vue": "true",
17 | "webpack": "true",
18 | "wrapper": "",
19 | "category": "Interface"
20 | }
21 | },
22 | "scripts": {
23 | "tsc": "tsc -skipLibCheck --outDir dist",
24 | "tsc.dist": "npm run dist.clean && tsc -skipLibCheck --outDir dist && npm run dist.copy",
25 | "dist.copy": "cp -R platforms dist && cp ../README.md dist && cp photoviewer.d.ts dist && cp package.json dist",
26 | "dist.clean": "rimraf dist",
27 | "plugin.tscwatch": "npm run tsc -- -w",
28 | "build": "npm i && ts-patch install && npm run tsc.dist",
29 | "clean": "npm run demo.clean && npm run demo-ng.clean && npm run demo-js.clean",
30 | "demo.clean": "cd ../demo && ns clean",
31 | "demo-ng.clean": "cd ../demo-ng && ns clean",
32 | "demo-js.clean": "cd ../demo-js && ns clean",
33 | "demo.ios": "cd ../demo && ns run ios",
34 | "demo.android": "cd ../demo && ns run android",
35 | "demo-ng.ios": "cd ../demo-ng && ns run ios",
36 | "demo-ng.android": "cd ../demo-ng && ns run android",
37 | "demo-js.ios": "cd ../demo-js && ns run ios",
38 | "demo-js.android": "cd ../demo-js && ns run android",
39 | "demo.ios.build": "cd ../demo && ns build ios",
40 | "test": "npm run tslint && npm run tslint.demo && cd ../demo && tns build ios && tns build android",
41 | "preparedemo": "npm run build && cd ../demo && ns plugin remove nativescript-photoviewer && ns plugin add ../src/dist && ns install",
42 | "preparedemo-ng": "npm run build && cd ../demo-ng && ns plugin remove nativescript-photoviewer && ns plugin add ../src/dist && ns install",
43 | "preparedemo-js": "npm run build && cd ../demo-js && ns plugin remove nativescript-photoviewer && ns plugin add ../src/dist && ns install",
44 | "setup": "npm run build && cd ../demo && npm i",
45 | "plugin.link": "npm link && cd ../demo && npm link nativescript-photoviewer && cd ../src",
46 | "setupandinstall": "npm i && cd ../demo && npm i && cd ../src && npm run build && cd ../demo && tns plugin add ../src && cd ../src",
47 | "tslint": "tslint --config '../tslint.json' '*.ts' --exclude '**/node_modules/**' --exclude '**/typings/**'",
48 | "tslint.demo": "tslint --config '../tslint.json' '../demo/app/*.ts' --exclude '**/node_modules/**' --exclude '**/typings/**'",
49 | "ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude '**/typings/**'",
50 | "development.setup": "npm run setup && npm link && cd ../demo && npm link nativescript-photoviewer && cd ../src",
51 | "generate.typings.ios": "cd ../demo && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios && echo 'Now look for your library typings in demo/typings!'",
52 | "generate.typings.android": "java -jar ../../android-dts-generator/dts-generator/build/libs/dts-generator.jar -input ./classes.jar -output platforms/android/typings && rimraf classes.jar && echo '##### Done! Deleted src/classes.jar, and generated typings in src/platforms/android/typings'"
53 | },
54 | "repository": {
55 | "type": "git",
56 | "url": "https://github.com/manijak/nativescript-photoviewer.git"
57 | },
58 | "keywords": [
59 | "NativeScript",
60 | "Photo",
61 | "Photos",
62 | "Image",
63 | "Images",
64 | "Preview",
65 | "Gallery",
66 | "Development",
67 | "JavaScript",
68 | "iOS",
69 | "Android"
70 | ],
71 | "author": {
72 | "name": "Nedim Erkocevic"
73 | },
74 | "bugs": {
75 | "url": "https://github.com/manijak/nativescript-photoviewer/issues"
76 | },
77 | "license": "MIT",
78 | "homepage": "https://github.com/manijak/nativescript-photoviewer",
79 | "readmeFilename": "README.md",
80 | "devDependencies": {
81 | "husky": "^6.0.0",
82 | "lint-staged": "~10.5.4",
83 | "prettier": "^2.2.1",
84 | "@nativescript/core": "~8.0.1",
85 | "@nativescript/types": "^8.0.0",
86 | "@nativescript/webpack": "^4.1.0",
87 | "typescript": "~4.2.4",
88 | "ts-patch": "^1.3.2",
89 | "prompt": "^1.1.0",
90 | "rimraf": "^3.0.2",
91 | "tslint": "^6.1.3",
92 | "ts-node": "^9.1.1",
93 | "semver": "^7.3.5"
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/src/photoviewer.android.ts:
--------------------------------------------------------------------------------
1 | import { AndroidActivityResultEventData, Application } from "@nativescript/core";
2 | import { PhotoViewerOptions, PhotoViewer as PhotoViewerBase } from ".";
3 | import { PaletteType } from "./photoviewer.common";
4 | export * from './photoviewer.common';
5 |
6 | declare const com: any;
7 |
8 | export class PhotoViewer implements PhotoViewerBase {
9 | private static readonly CLOSE_PHOTO_REQUEST = 9191;
10 | private _currentResolve: () => void;
11 |
12 | constructor() { }
13 |
14 | public showGallery(imagesArray: Array, options?: PhotoViewerOptions) {
15 | var photosArray = new java.util.ArrayList();
16 |
17 | imagesArray.forEach((imgUrl: string) => {
18 | photosArray.add(imgUrl);
19 | });
20 |
21 | let startIndex: number = options.startIndex || 0;
22 | let paletteType: PaletteType = options.android.paletteType || null ;
23 | let showAlbum: boolean = options.android.showAlbum || false;
24 |
25 | let intent: android.content.Intent;
26 | Application.android.on("activityResult", this.onActivityResult);
27 |
28 | return new Promise((resolve) => {
29 | this._currentResolve = resolve;
30 |
31 | if(!showAlbum){
32 | intent = new android.content.Intent(Application.android.foregroundActivity, com.etiennelawlor.imagegallery.library.activities.FullScreenImageGalleryActivity.class);
33 | }
34 | else{
35 | intent = new android.content.Intent(Application.android.foregroundActivity, com.etiennelawlor.imagegallery.library.activities.ImageGalleryActivity.class);
36 | }
37 |
38 | intent.putStringArrayListExtra("images", photosArray);
39 | intent.putExtra("position", startIndex);
40 |
41 | if(paletteType){
42 | intent.putExtra("palette_color_type", getPaletteType(paletteType));
43 | }
44 |
45 | Application.android.foregroundActivity.startActivityForResult(intent, PhotoViewer.CLOSE_PHOTO_REQUEST);
46 | });
47 | }
48 |
49 | private onActivityResult = (args: AndroidActivityResultEventData) => {
50 | if (args.requestCode === PhotoViewer.CLOSE_PHOTO_REQUEST) {
51 | this._currentResolve();
52 | this._currentResolve = undefined;
53 | Application.android.off("activityResult", this.onActivityResult);
54 | }
55 | }
56 |
57 | }
58 |
59 | function getPaletteType(paletteType: PaletteType){
60 | switch (paletteType) {
61 | case PaletteType.Vibrant:
62 | return com.etiennelawlor.imagegallery.library.enums.PaletteColorType.VIBRANT;
63 | case PaletteType.LightVibrant:
64 | return com.etiennelawlor.imagegallery.library.enums.PaletteColorType.LIGHT_VIBRANT;
65 | case PaletteType.DarkVibrant:
66 | return com.etiennelawlor.imagegallery.library.enums.PaletteColorType.DARK_VIBRANT;
67 | case PaletteType.Muted:
68 | return com.etiennelawlor.imagegallery.library.enums.PaletteColorType.MUTED;
69 | case PaletteType.LightMuted:
70 | return com.etiennelawlor.imagegallery.library.enums.PaletteColorType.LIGHT_MUTED;
71 | case PaletteType.DarkMuted:
72 | return com.etiennelawlor.imagegallery.library.enums.PaletteColorType.DARK_MUTED;
73 | default:
74 | return null;
75 | }
76 | }
--------------------------------------------------------------------------------
/src/photoviewer.common.ts:
--------------------------------------------------------------------------------
1 | export enum PaletteType {
2 | 'Vibrant' = 'vibrant',
3 | 'LightVibrant' = 'light_vibrant',
4 | 'DarkVibrant' = 'dark_vibrant',
5 | 'Muted' = 'muted',
6 | 'LightMuted' = 'light_muted',
7 | 'DarkMuted' = 'dark_muted'
8 | }
--------------------------------------------------------------------------------
/src/photoviewer.d.ts:
--------------------------------------------------------------------------------
1 |
2 | export enum PaletteType {
3 | 'Vibrant' = 'vibrant',
4 | 'LightVibrant' = 'light_vibrant',
5 | 'DarkVibrant' = 'dark_vibrant',
6 | 'Muted' = 'muted',
7 | 'LightMuted' = 'light_muted',
8 | 'DarkMuted' = 'dark_muted'
9 | }
10 |
11 |
12 | export interface PhotoViewerOptions {
13 |
14 | /**
15 | * Optional index to start the gallery from (Fullscreen Image gallery only)
16 | */
17 | startIndex?: number;
18 |
19 | ios?: {
20 | /**
21 | * Font familiy to use for caption and titles
22 | * Default "HelveticaNeue"
23 | */
24 | fontFamily?: string;
25 |
26 | /**
27 | * Font-size for title
28 | * Default 16
29 | */
30 | titleFontSize?: number;
31 |
32 | /**
33 | * Font-size for summary
34 | * Default 14
35 | */
36 | summaryFontSize?: number;
37 |
38 | /**
39 | * Font-size for credits
40 | * Default 14
41 | */
42 | creditFontSize?: number;
43 |
44 | /**
45 | * Title font color
46 | * Default white
47 | */
48 | titleColor?: UIColor;
49 |
50 | /**
51 | * Summary font color
52 | * Default light gray
53 | */
54 | summaryColor?: UIColor;
55 |
56 | /**
57 | * Credits font color
58 | * Default gray
59 | */
60 | creditColor?: UIColor;
61 |
62 | /**
63 | * Show share button
64 | * Default true
65 | */
66 | showShareButton?: boolean;
67 |
68 | /**
69 | * Optional function to run after the gallery has finished loading images and is visible
70 | */
71 | completionCallback?: () => void;
72 | }
73 |
74 | android?: {
75 | /**
76 | * Optional string value telling the fullscreen image gallery what type of background color palette to use:
77 | * (VIBRANT, LIGHT_VIBRANT, DARK_VIBRANT, MUTED, LIGHT_MUTED, DARK_MUTED)
78 | */
79 | paletteType?: PaletteType;
80 |
81 | /**
82 | * Set to true if you want to show the album first, otherwise false if you want to show fullscreen slides directly.
83 | */
84 | showAlbum?: boolean;
85 | }
86 | }
87 |
88 | /**
89 | * (iOS only) - Custom NYTPhoto object to add photo & metadata (title, summary, credits...)
90 | */
91 | export interface NYTPhotoItem {
92 | /**
93 | * Raw UIImage for main photo
94 | */
95 | image?: UIImage;
96 |
97 | /**
98 | * Raw UIImage for placeholder image
99 | */
100 | placeholderImage?: UIImage;
101 |
102 | /**
103 | * Image URL for main photo
104 | */
105 | imageURL?: string;
106 |
107 | /**
108 | * Image title (first row)
109 | */
110 | title?: string;
111 |
112 | /**
113 | * Image summary (second row)
114 | */
115 | summary?: string;
116 |
117 | /**
118 | * Image credits (third row)
119 | */
120 | credit?: string;
121 | }
122 |
123 | export class PhotoViewer {
124 | public showGallery(imagesArray: Array, options?: PhotoViewerOptions): Promise;
125 | }
--------------------------------------------------------------------------------
/src/photoviewer.ios.ts:
--------------------------------------------------------------------------------
1 | import { PhotoViewerOptions, NYTPhotoItem, PhotoViewer as PhotoViewerBase } from ".";
2 | import { Color, Frame, Utils, ImageSource } from "@nativescript/core";
3 |
4 | import { PaletteType } from "./photoviewer.common";
5 | export * from './photoviewer.common';
6 |
7 | declare const NSAttributedString: any;
8 | var _dataSource: NYTPhotoViewerArrayDataSource;
9 | const background_queue = dispatch_get_global_queue(qos_class_t.QOS_CLASS_DEFAULT, 0);
10 | const main_queue = dispatch_get_current_queue();
11 | export class PhotoViewer implements PhotoViewerBase {
12 |
13 | public nativeView;
14 | private _delegate: PhotoViewerDelegateImpl;
15 | private _finishedLoading: boolean = false;
16 | private _didReload: boolean = false;
17 | constructor() {
18 | let photosArray = [];
19 | _dataSource = NYTPhotoViewerArrayDataSource.alloc().initWithPhotos(photosArray);
20 | }
21 |
22 | get ios(): any {
23 | return this.nativeView;
24 | }
25 |
26 | public showGallery(imagesArray: Array, options?: PhotoViewerOptions) {
27 |
28 | if(!options)
29 | options = {};
30 | if(!options.ios)
31 | options.ios = {};
32 | if(!options.android)
33 | options.android = {};
34 |
35 | let photosArray = [];
36 | let startIndex: number = options.startIndex || 0;
37 | let iosCompletionCallback = options.ios.completionCallback || null;
38 |
39 | imagesArray.forEach((imageItem: string | NYTPhotoItem, index) => {
40 |
41 | let imageToAdd = NYTImage.alloc().init() as NYTImage;
42 |
43 | let fontFamily = options.ios.fontFamily || "HelveticaNeue";
44 | let titleFontSize = options.ios.titleFontSize || 16;
45 | let summaryFontSize = options.ios.summaryFontSize || 14;
46 | let creditFontSize = options.ios.creditFontSize || 14;
47 |
48 | let titleColor = options.ios.titleColor || new Color("white").ios;
49 | let summaryColor = options.ios.summaryColor || new Color("lightgray").ios;
50 | let creditColor = options.ios.creditColor || new Color("gray").ios;
51 |
52 | if(isNYTPhotoItem(imageItem)){
53 | //console.log("received photoItem", imageItem);
54 | if(imageItem.imageURL)
55 | dispatch_async(background_queue, ()=>{
56 | imageToAdd.image = getUIImage(imageItem.imageURL); /** string URL to UIImage */
57 | if(index == imagesArray.length - 1){
58 | dispatch_async(main_queue, ()=>{
59 | this._finishedLoading = true;
60 | if(this.nativeView){
61 | this.nativeView.reloadPhotosAnimated(false);
62 | this._didReload = true;
63 | }
64 | })
65 | }
66 | });
67 | else
68 | imageToAdd.image = imageItem.image; /** UIImage */
69 |
70 | imageToAdd.placeholderImage = imageItem.placeholderImage;
71 | imageToAdd.attributedCaptionTitle = this.attributedString(imageItem.title, titleColor, fontFamily, titleFontSize);
72 | imageToAdd.attributedCaptionSummary = this.attributedString(imageItem.summary, summaryColor, fontFamily, summaryFontSize);
73 | imageToAdd.attributedCaptionCredit = this.attributedString(imageItem.credit, creditColor, fontFamily, creditFontSize);
74 | }
75 | else if(typeof imageItem === 'string'){
76 | dispatch_async(background_queue, ()=>{
77 | let img = getUIImage(imageItem);
78 | imageToAdd.image = img;
79 | if(index == imagesArray.length - 1){
80 | dispatch_async(main_queue, ()=>{
81 | this._finishedLoading = true;
82 | if(this.nativeView){
83 | this.nativeView.reloadPhotosAnimated(false);
84 | this._didReload = true;
85 | }
86 | })
87 | }
88 | });
89 | }
90 | else{
91 | console.log("ERROR: Passed object is not a image path/url or NYTPhotoItem object!", imageItem);
92 | }
93 |
94 | photosArray.push(imageToAdd);
95 | });
96 |
97 | _dataSource = NYTPhotoViewerArrayDataSource.alloc().initWithPhotos(photosArray);
98 | this.nativeView = NYTPhotosViewController.alloc().initWithDataSourceInitialPhotoIndexDelegate(_dataSource, startIndex, null);
99 | // gonna trigger reload just in case if for some the images finished loading early
100 | if(!this._didReload && this._finishedLoading){
101 | if(!NSThread.isMainThread){
102 | dispatch_async(main_queue, ()=>{
103 | this.nativeView.reloadPhotosAnimated(false);
104 | this._didReload = true;
105 | })
106 | }else {
107 | this.nativeView.reloadPhotosAnimated(false);
108 | this._didReload = true;
109 | }
110 | }
111 | if(options.ios.showShareButton == false){
112 | this.nativeView.rightBarButtonItem = null;
113 | }
114 |
115 | this.topViewController.presentViewControllerAnimatedCompletion(this.nativeView, true, iosCompletionCallback);
116 |
117 | return new Promise((resolve) => {
118 | this._delegate = PhotoViewerDelegateImpl.initWithResolve(resolve);
119 | this.nativeView.delegate = this._delegate;
120 | });
121 | }
122 |
123 | private attributedString(text: string, color: UIColor, fontFamily: string, fontSize: number): NSAttributedString {
124 | var attributeOptions = {
125 | [NSForegroundColorAttributeName]: color,
126 | [NSFontAttributeName]: UIFont.fontWithNameSize(fontFamily, fontSize)
127 | };
128 |
129 | return NSAttributedString.alloc().initWithStringAttributes(text || "", attributeOptions);
130 | }
131 |
132 |
133 | private static get rootViewController(): UIViewController | undefined {
134 | const keyWindow = UIApplication.sharedApplication.keyWindow;
135 | return keyWindow != null ? keyWindow.rootViewController : undefined;
136 | }
137 |
138 | private get topViewController(): UIViewController | undefined {
139 | const root = PhotoViewer.rootViewController;
140 | if (root == null) {
141 | return undefined;
142 | }
143 | return this.findTopViewController(root);
144 | }
145 |
146 | private findTopViewController(
147 | root: UIViewController
148 | ): UIViewController | undefined {
149 | const presented = root.presentedViewController;
150 | if (presented != null) {
151 | return this.findTopViewController(presented);
152 | }
153 | if (root instanceof UISplitViewController) {
154 | const last = root.viewControllers.lastObject;
155 | if (last == null) {
156 | return root;
157 | }
158 | return this.findTopViewController(last);
159 | } else if (root instanceof UINavigationController) {
160 | const top = root.topViewController;
161 | if (top == null) {
162 | return root;
163 | }
164 | return this.findTopViewController(top);
165 | } else if (root instanceof UITabBarController) {
166 | const selected = root.selectedViewController;
167 | if (selected == null) {
168 | return root;
169 | }
170 | return this.findTopViewController(selected);
171 | } else {
172 | return root;
173 | }
174 | }
175 | }
176 |
177 |
178 | function getImageData(imageURL: string): NSData {
179 | let nsURL = NSURL.URLWithString(imageURL);
180 | return NSData.dataWithContentsOfURL(nsURL);
181 | }
182 |
183 | function getUIImage(imageURL: string): UIImage {
184 | if(Utils.isFileOrResourcePath(imageURL)){
185 | return ImageSource.fromFileOrResourceSync(imageURL).ios;
186 | }
187 | else{
188 | //console.log("URL: ", imageURL);
189 | let nsURL = NSURL.URLWithString(imageURL);
190 | let imageData = NSData.dataWithContentsOfURL(nsURL);
191 | return UIImage.imageWithData(imageData);
192 | }
193 | }
194 |
195 | function isNYTPhotoItem(item: any): item is NYTPhotoItem {
196 | return typeof item.image === 'object' || typeof item.imageURL === 'string';
197 | }
198 |
199 | @NativeClass()
200 | class NYTImage extends NSObject implements NYTPhoto {
201 | public static ObjCProtocols = [NYTPhoto];
202 | private _image;
203 | private _imageData;
204 | private _placeholderImage;
205 | private _attributedCaptionTitle;
206 | private _attributedCaptionSummary;
207 | private _attributedCaptionCredit;
208 | get image() { return this._image; }
209 | set image(value) { this._image = value; }
210 |
211 | get imageData() { return this._imageData; }
212 | set imageData(value) { this._imageData = value; }
213 |
214 | get placeholderImage() { return this._placeholderImage; }
215 | set placeholderImage(value) { this._placeholderImage = value; }
216 |
217 | get attributedCaptionTitle() { return this._attributedCaptionTitle; }
218 | set attributedCaptionTitle(value) { this._attributedCaptionTitle = value; }
219 |
220 | get attributedCaptionSummary() { return this._attributedCaptionSummary; }
221 | set attributedCaptionSummary(value) { this._attributedCaptionSummary = value; }
222 |
223 | get attributedCaptionCredit() { return this._attributedCaptionCredit; }
224 | set attributedCaptionCredit(value) { this._attributedCaptionCredit = value; }
225 | }
226 |
227 |
228 | @NativeClass()
229 | class PhotoViewerDelegateImpl extends NSObject implements NYTPhotosViewControllerDelegate {
230 | public static ObjCProtocols = [NYTPhotosViewControllerDelegate];
231 | private _resolve: () => void;
232 |
233 | public static initWithResolve(resolve: () => void): PhotoViewerDelegateImpl {
234 | const delegate = PhotoViewerDelegateImpl.new() as PhotoViewerDelegateImpl;
235 | delegate._resolve = resolve;
236 | return delegate;
237 | }
238 |
239 |
240 | public photosViewControllerDidDismiss(photosViewController: NYTPhotosViewController) {
241 | this._resolve();
242 | }
243 | }
--------------------------------------------------------------------------------
/src/platforms/android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/platforms/android/include.gradle:
--------------------------------------------------------------------------------
1 | android {
2 |
3 | }
4 | dependencies {
5 | compile 'com.github.lawloretienne:imagegallery:0.0.13'
6 | }
7 |
--------------------------------------------------------------------------------
/src/platforms/ios/Podfile:
--------------------------------------------------------------------------------
1 | pod 'NYTPhotoViewer', '~> 2.0.0'
--------------------------------------------------------------------------------
/src/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2017",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "declaration": false,
7 | "removeComments": true,
8 | "noLib": false,
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "skipLibCheck": true,
12 | "lib": ["es6", "dom"],
13 | "sourceMap": true,
14 | "pretty": true,
15 | "allowUnreachableCode": false,
16 | "allowUnusedLabels": false,
17 | "noEmitHelpers": true,
18 | "noEmitOnError": false,
19 | "noImplicitAny": false,
20 | "noImplicitReturns": true,
21 | "noImplicitUseStrict": false,
22 | "noFallthroughCasesInSwitch": true,
23 | "plugins": [
24 | {
25 | "transform": "@nativescript/webpack/transformers/ns-transform-native-classes",
26 | "type": "raw"
27 | }
28 | ]
29 | },
30 | "exclude": ["demo", "node_modules"],
31 | "include": ["../src", "**/*"],
32 | "compileOnSave": false
33 | }
34 |
--------------------------------------------------------------------------------
/src/typings/objc!FLAnimatedImage.d.ts:
--------------------------------------------------------------------------------
1 |
2 | declare class FLAnimatedImage extends NSObject {
3 |
4 | static alloc(): FLAnimatedImage; // inherited from NSObject
5 |
6 | static animatedImageWithGIFData(data: NSData): FLAnimatedImage;
7 |
8 | static logStringFromBlockWithLevel(stringBlock: () => string, level: FLLogLevel): void;
9 |
10 | static new(): FLAnimatedImage; // inherited from NSObject
11 |
12 | static setLogBlockLogLevel(logBlock: (p1: string, p2: FLLogLevel) => void, logLevel: FLLogLevel): void;
13 |
14 | static sizeForImage(image: any): CGSize;
15 |
16 | readonly data: NSData;
17 |
18 | readonly delayTimesForIndexes: NSDictionary;
19 |
20 | readonly frameCacheSizeCurrent: number;
21 |
22 | frameCacheSizeMax: number;
23 |
24 | readonly frameCount: number;
25 |
26 | readonly loopCount: number;
27 |
28 | readonly posterImage: UIImage;
29 |
30 | readonly size: CGSize;
31 |
32 | constructor(o: { animatedGIFData: NSData; });
33 |
34 | constructor(o: { animatedGIFData: NSData; optimalFrameCacheSize: number; predrawingEnabled: boolean; });
35 |
36 | imageLazilyCachedAtIndex(index: number): UIImage;
37 |
38 | initWithAnimatedGIFData(data: NSData): this;
39 |
40 | initWithAnimatedGIFDataOptimalFrameCacheSizePredrawingEnabled(data: NSData, optimalFrameCacheSize: number, isPredrawingEnabled: boolean): this;
41 | }
42 |
43 | declare var FLAnimatedImageVersionNumber: number;
44 |
45 | declare var FLAnimatedImageVersionString: interop.Reference;
46 |
47 | declare class FLAnimatedImageView extends UIImageView {
48 |
49 | static alloc(): FLAnimatedImageView; // inherited from NSObject
50 |
51 | static appearance(): FLAnimatedImageView; // inherited from UIAppearance
52 |
53 | static appearanceForTraitCollection(trait: UITraitCollection): FLAnimatedImageView; // inherited from UIAppearance
54 |
55 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): FLAnimatedImageView; // inherited from UIAppearance
56 |
57 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): FLAnimatedImageView; // inherited from UIAppearance
58 |
59 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): FLAnimatedImageView; // inherited from UIAppearance
60 |
61 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): FLAnimatedImageView; // inherited from UIAppearance
62 |
63 | static new(): FLAnimatedImageView; // inherited from NSObject
64 |
65 | animatedImage: FLAnimatedImage;
66 |
67 | readonly currentFrame: UIImage;
68 |
69 | readonly currentFrameIndex: number;
70 |
71 | loopCompletionBlock: (p1: number) => void;
72 |
73 | runLoopMode: string;
74 | }
75 |
76 | declare const enum FLLogLevel {
77 |
78 | None = 0,
79 |
80 | Error = 1,
81 |
82 | Warn = 2,
83 |
84 | Info = 3,
85 |
86 | Debug = 4,
87 |
88 | Verbose = 5
89 | }
90 |
91 | declare class FLWeakProxy extends NSProxy {
92 |
93 | static alloc(): FLWeakProxy; // inherited from NSProxy
94 |
95 | static weakProxyForObject(targetObject: any): FLWeakProxy;
96 | }
97 |
98 | declare var kFLAnimatedImageDelayTimeIntervalMinimum: number;
99 |
--------------------------------------------------------------------------------
/src/typings/objc!NYTPhotoViewer.d.ts:
--------------------------------------------------------------------------------
1 |
2 | interface NYTPhoto extends NSObjectProtocol {
3 |
4 | attributedCaptionCredit: NSAttributedString;
5 |
6 | attributedCaptionSummary: NSAttributedString;
7 |
8 | attributedCaptionTitle: NSAttributedString;
9 |
10 | image: UIImage;
11 |
12 | imageData: NSData;
13 |
14 | placeholderImage: UIImage;
15 | }
16 | declare var NYTPhoto: {
17 |
18 | prototype: NYTPhoto;
19 | };
20 |
21 | declare class NYTPhotoCaptionView extends UIView implements NYTPhotoCaptionViewLayoutWidthHinting {
22 |
23 | static alloc(): NYTPhotoCaptionView; // inherited from NSObject
24 |
25 | static appearance(): NYTPhotoCaptionView; // inherited from UIAppearance
26 |
27 | static appearanceForTraitCollection(trait: UITraitCollection): NYTPhotoCaptionView; // inherited from UIAppearance
28 |
29 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): NYTPhotoCaptionView; // inherited from UIAppearance
30 |
31 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): NYTPhotoCaptionView; // inherited from UIAppearance
32 |
33 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): NYTPhotoCaptionView; // inherited from UIAppearance
34 |
35 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): NYTPhotoCaptionView; // inherited from UIAppearance
36 |
37 | static new(): NYTPhotoCaptionView; // inherited from NSObject
38 |
39 | readonly debugDescription: string; // inherited from NSObjectProtocol
40 |
41 | readonly description: string; // inherited from NSObjectProtocol
42 |
43 | readonly hash: number; // inherited from NSObjectProtocol
44 |
45 | readonly isProxy: boolean; // inherited from NSObjectProtocol
46 |
47 | preferredMaxLayoutWidth: number; // inherited from NYTPhotoCaptionViewLayoutWidthHinting
48 |
49 | readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
50 |
51 | readonly // inherited from NSObjectProtocol
52 |
53 | constructor(o: { attributedTitle: NSAttributedString; attributedSummary: NSAttributedString; attributedCredit: NSAttributedString; });
54 |
55 | class(): typeof NSObject;
56 |
57 | conformsToProtocol(aProtocol: any /* Protocol */): boolean;
58 |
59 | initWithAttributedTitleAttributedSummaryAttributedCredit(attributedTitle: NSAttributedString, attributedSummary: NSAttributedString, attributedCredit: NSAttributedString): this;
60 |
61 | isEqual(object: any): boolean;
62 |
63 | isKindOfClass(aClass: typeof NSObject): boolean;
64 |
65 | isMemberOfClass(aClass: typeof NSObject): boolean;
66 |
67 | performSelector(aSelector: string): any;
68 |
69 | performSelectorWithObject(aSelector: string, object: any): any;
70 |
71 | performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
72 |
73 | respondsToSelector(aSelector: string): boolean;
74 |
75 | retainCount(): number;
76 |
77 | self(): this;
78 | }
79 |
80 | interface NYTPhotoCaptionViewLayoutWidthHinting extends NSObjectProtocol {
81 |
82 | preferredMaxLayoutWidth: number;
83 | }
84 | declare var NYTPhotoCaptionViewLayoutWidthHinting: {
85 |
86 | prototype: NYTPhotoCaptionViewLayoutWidthHinting;
87 | };
88 |
89 | interface NYTPhotoContainer extends NSObjectProtocol {
90 |
91 | photo: NYTPhoto;
92 | }
93 | declare var NYTPhotoContainer: {
94 |
95 | prototype: NYTPhotoContainer;
96 | };
97 |
98 | declare class NYTPhotoDismissalInteractionController extends NSObject implements UIViewControllerInteractiveTransitioning {
99 |
100 | static alloc(): NYTPhotoDismissalInteractionController; // inherited from NSObject
101 |
102 | static new(): NYTPhotoDismissalInteractionController; // inherited from NSObject
103 |
104 | animator: UIViewControllerAnimatedTransitioning;
105 |
106 | shouldAnimateUsingAnimator: boolean;
107 |
108 | viewToHideWhenBeginningTransition: UIView;
109 |
110 | readonly completionCurve: UIViewAnimationCurve; // inherited from UIViewControllerInteractiveTransitioning
111 |
112 | readonly completionSpeed: number; // inherited from UIViewControllerInteractiveTransitioning
113 |
114 | readonly debugDescription: string; // inherited from NSObjectProtocol
115 |
116 | readonly description: string; // inherited from NSObjectProtocol
117 |
118 | readonly hash: number; // inherited from NSObjectProtocol
119 |
120 | readonly isProxy: boolean; // inherited from NSObjectProtocol
121 |
122 | readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
123 |
124 | readonly wantsInteractiveStart: boolean; // inherited from UIViewControllerInteractiveTransitioning
125 |
126 | readonly // inherited from NSObjectProtocol
127 |
128 | class(): typeof NSObject;
129 |
130 | conformsToProtocol(aProtocol: any /* Protocol */): boolean;
131 |
132 | didPanWithPanGestureRecognizerViewToPanAnchorPoint(panGestureRecognizer: UIPanGestureRecognizer, viewToPan: UIView, anchorPoint: CGPoint): void;
133 |
134 | isEqual(object: any): boolean;
135 |
136 | isKindOfClass(aClass: typeof NSObject): boolean;
137 |
138 | isMemberOfClass(aClass: typeof NSObject): boolean;
139 |
140 | performSelector(aSelector: string): any;
141 |
142 | performSelectorWithObject(aSelector: string, object: any): any;
143 |
144 | performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
145 |
146 | respondsToSelector(aSelector: string): boolean;
147 |
148 | retainCount(): number;
149 |
150 | self(): this;
151 |
152 | startInteractiveTransition(transitionContext: UIViewControllerContextTransitioning): void;
153 | }
154 |
155 | declare class NYTPhotoTransitionAnimator extends NSObject implements UIViewControllerAnimatedTransitioning {
156 |
157 | static alloc(): NYTPhotoTransitionAnimator; // inherited from NSObject
158 |
159 | static new(): NYTPhotoTransitionAnimator; // inherited from NSObject
160 |
161 | static newAnimationViewFromView(view: UIView): UIView;
162 |
163 | animationDurationEndingViewFadeInRatio: number;
164 |
165 | animationDurationFadeRatio: number;
166 |
167 | animationDurationStartingViewFadeOutRatio: number;
168 |
169 | animationDurationWithZooming: number;
170 |
171 | animationDurationWithoutZooming: number;
172 |
173 | dismissing: boolean;
174 |
175 | endingView: UIView;
176 |
177 | endingViewForAnimation: UIView;
178 |
179 | startingView: UIView;
180 |
181 | startingViewForAnimation: UIView;
182 |
183 | zoomingAnimationSpringDamping: number;
184 |
185 | readonly debugDescription: string; // inherited from NSObjectProtocol
186 |
187 | readonly description: string; // inherited from NSObjectProtocol
188 |
189 | readonly hash: number; // inherited from NSObjectProtocol
190 |
191 | readonly isProxy: boolean; // inherited from NSObjectProtocol
192 |
193 | readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
194 |
195 | readonly // inherited from NSObjectProtocol
196 |
197 | animateTransition(transitionContext: UIViewControllerContextTransitioning): void;
198 |
199 | animationEnded(transitionCompleted: boolean): void;
200 |
201 | class(): typeof NSObject;
202 |
203 | conformsToProtocol(aProtocol: any /* Protocol */): boolean;
204 |
205 | interruptibleAnimatorForTransition(transitionContext: UIViewControllerContextTransitioning): UIViewImplicitlyAnimating;
206 |
207 | isEqual(object: any): boolean;
208 |
209 | isKindOfClass(aClass: typeof NSObject): boolean;
210 |
211 | isMemberOfClass(aClass: typeof NSObject): boolean;
212 |
213 | performSelector(aSelector: string): any;
214 |
215 | performSelectorWithObject(aSelector: string, object: any): any;
216 |
217 | performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
218 |
219 | respondsToSelector(aSelector: string): boolean;
220 |
221 | retainCount(): number;
222 |
223 | self(): this;
224 |
225 | transitionDuration(transitionContext: UIViewControllerContextTransitioning): number;
226 | }
227 |
228 | declare class NYTPhotoTransitionController extends NSObject implements UIViewControllerTransitioningDelegate {
229 |
230 | static alloc(): NYTPhotoTransitionController; // inherited from NSObject
231 |
232 | static new(): NYTPhotoTransitionController; // inherited from NSObject
233 |
234 | endingView: UIView;
235 |
236 | forcesNonInteractiveDismissal: boolean;
237 |
238 | startingView: UIView;
239 |
240 | readonly debugDescription: string; // inherited from NSObjectProtocol
241 |
242 | readonly description: string; // inherited from NSObjectProtocol
243 |
244 | readonly hash: number; // inherited from NSObjectProtocol
245 |
246 | readonly isProxy: boolean; // inherited from NSObjectProtocol
247 |
248 | readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
249 |
250 | readonly // inherited from NSObjectProtocol
251 |
252 | animationControllerForDismissedController(dismissed: UIViewController): UIViewControllerAnimatedTransitioning;
253 |
254 | animationControllerForPresentedControllerPresentingControllerSourceController(presented: UIViewController, presenting: UIViewController, source: UIViewController): UIViewControllerAnimatedTransitioning;
255 |
256 | class(): typeof NSObject;
257 |
258 | conformsToProtocol(aProtocol: any /* Protocol */): boolean;
259 |
260 | didPanWithPanGestureRecognizerViewToPanAnchorPoint(panGestureRecognizer: UIPanGestureRecognizer, viewToPan: UIView, anchorPoint: CGPoint): void;
261 |
262 | interactionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
263 |
264 | interactionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning): UIViewControllerInteractiveTransitioning;
265 |
266 | isEqual(object: any): boolean;
267 |
268 | isKindOfClass(aClass: typeof NSObject): boolean;
269 |
270 | isMemberOfClass(aClass: typeof NSObject): boolean;
271 |
272 | performSelector(aSelector: string): any;
273 |
274 | performSelectorWithObject(aSelector: string, object: any): any;
275 |
276 | performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
277 |
278 | presentationControllerForPresentedViewControllerPresentingViewControllerSourceViewController(presented: UIViewController, presenting: UIViewController, source: UIViewController): UIPresentationController;
279 |
280 | respondsToSelector(aSelector: string): boolean;
281 |
282 | retainCount(): number;
283 |
284 | self(): this;
285 | }
286 |
287 | declare class NYTPhotoViewController extends UIViewController implements NYTPhotoContainer {
288 |
289 | static alloc(): NYTPhotoViewController; // inherited from NSObject
290 |
291 | static new(): NYTPhotoViewController; // inherited from NSObject
292 |
293 | delegate: NYTPhotoViewControllerDelegate;
294 |
295 | readonly doubleTapGestureRecognizer: UITapGestureRecognizer;
296 |
297 | readonly loadingView: UIView;
298 |
299 | readonly scalingImageView: NYTScalingImageView;
300 |
301 | readonly debugDescription: string; // inherited from NSObjectProtocol
302 |
303 | readonly description: string; // inherited from NSObjectProtocol
304 |
305 | readonly hash: number; // inherited from NSObjectProtocol
306 |
307 | readonly isProxy: boolean; // inherited from NSObjectProtocol
308 |
309 | readonly photo: NYTPhoto; // inherited from NYTPhotoContainer
310 |
311 | readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
312 |
313 | readonly // inherited from NSObjectProtocol
314 |
315 | constructor(o: { photo: NYTPhoto; loadingView: UIView; notificationCenter: NSNotificationCenter; });
316 |
317 | class(): typeof NSObject;
318 |
319 | conformsToProtocol(aProtocol: any /* Protocol */): boolean;
320 |
321 | initWithPhotoLoadingViewNotificationCenter(photo: NYTPhoto, loadingView: UIView, notificationCenter: NSNotificationCenter): this;
322 |
323 | isEqual(object: any): boolean;
324 |
325 | isKindOfClass(aClass: typeof NSObject): boolean;
326 |
327 | isMemberOfClass(aClass: typeof NSObject): boolean;
328 |
329 | performSelector(aSelector: string): any;
330 |
331 | performSelectorWithObject(aSelector: string, object: any): any;
332 |
333 | performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
334 |
335 | respondsToSelector(aSelector: string): boolean;
336 |
337 | retainCount(): number;
338 |
339 | self(): this;
340 | }
341 |
342 | interface NYTPhotoViewControllerDelegate extends NSObjectProtocol {
343 |
344 | photoViewControllerDidLongPressWithGestureRecognizer?(photoViewController: NYTPhotoViewController, longPressGestureRecognizer: UILongPressGestureRecognizer): void;
345 | }
346 | declare var NYTPhotoViewControllerDelegate: {
347 |
348 | prototype: NYTPhotoViewControllerDelegate;
349 | };
350 |
351 | declare var NYTPhotoViewControllerPhotoImageUpdatedNotification: string;
352 |
353 | declare class NYTPhotoViewerArrayDataSource extends NSObject implements NSFastEnumeration, NYTPhotoViewerDataSource {
354 |
355 | static alloc(): NYTPhotoViewerArrayDataSource; // inherited from NSObject
356 |
357 | static dataSourceWithPhotos(photos: NSArray | NYTPhoto[]): NYTPhotoViewerArrayDataSource;
358 |
359 | static new(): NYTPhotoViewerArrayDataSource; // inherited from NSObject
360 |
361 | readonly photos: NSArray;
362 |
363 | readonly numberOfPhotos: number; // inherited from NYTPhotoViewerDataSource
364 | [index: number]: NYTPhoto;
365 | [Symbol.iterator](): Iterator;
366 |
367 | constructor(o: { photos: NSArray | NYTPhoto[]; });
368 |
369 | indexOfPhoto(photo: NYTPhoto): number;
370 |
371 | initWithPhotos(photos: NSArray | NYTPhoto[]): this;
372 |
373 | objectAtIndexedSubscript(idx: number): NYTPhoto;
374 |
375 | photoAtIndex(photoIndex: number): NYTPhoto;
376 | }
377 |
378 | declare var NYTPhotoViewerCoreVersionNumber: number;
379 |
380 | declare var NYTPhotoViewerCoreVersionString: interop.Reference;
381 |
382 | interface NYTPhotoViewerDataSource {
383 |
384 | numberOfPhotos: number;
385 |
386 | indexOfPhoto(photo: NYTPhoto): number;
387 |
388 | photoAtIndex(photoIndex: number): NYTPhoto;
389 | }
390 | declare var NYTPhotoViewerDataSource: {
391 |
392 | prototype: NYTPhotoViewerDataSource;
393 | };
394 |
395 | declare class NYTPhotoViewerSinglePhotoDataSource extends NSObject implements NYTPhotoViewerDataSource {
396 |
397 | static alloc(): NYTPhotoViewerSinglePhotoDataSource; // inherited from NSObject
398 |
399 | static dataSourceWithPhoto(photo: NYTPhoto): NYTPhotoViewerSinglePhotoDataSource;
400 |
401 | static new(): NYTPhotoViewerSinglePhotoDataSource; // inherited from NSObject
402 |
403 | readonly photo: NYTPhoto;
404 |
405 | readonly numberOfPhotos: number; // inherited from NYTPhotoViewerDataSource
406 |
407 | constructor(o: { photo: NYTPhoto; });
408 |
409 | indexOfPhoto(photo: NYTPhoto): number;
410 |
411 | initWithPhoto(photo: NYTPhoto): this;
412 |
413 | photoAtIndex(photoIndex: number): NYTPhoto;
414 | }
415 |
416 | declare var NYTPhotoViewerVersionNumber: number;
417 |
418 | declare var NYTPhotoViewerVersionNumberVar: number;
419 |
420 | declare var NYTPhotoViewerVersionString: interop.Reference;
421 |
422 | declare var NYTPhotoViewerVersionStringVar: interop.Reference;
423 |
424 | declare class NYTPhotosOverlayView extends UIView {
425 |
426 | static alloc(): NYTPhotosOverlayView; // inherited from NSObject
427 |
428 | static appearance(): NYTPhotosOverlayView; // inherited from UIAppearance
429 |
430 | static appearanceForTraitCollection(trait: UITraitCollection): NYTPhotosOverlayView; // inherited from UIAppearance
431 |
432 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): NYTPhotosOverlayView; // inherited from UIAppearance
433 |
434 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): NYTPhotosOverlayView; // inherited from UIAppearance
435 |
436 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): NYTPhotosOverlayView; // inherited from UIAppearance
437 |
438 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): NYTPhotosOverlayView; // inherited from UIAppearance
439 |
440 | static new(): NYTPhotosOverlayView; // inherited from NSObject
441 |
442 | captionView: UIView;
443 |
444 | captionViewRespectsSafeArea: boolean;
445 |
446 | leftBarButtonItem: UIBarButtonItem;
447 |
448 | leftBarButtonItems: NSArray;
449 |
450 | readonly navigationBar: UINavigationBar;
451 |
452 | rightBarButtonItem: UIBarButtonItem;
453 |
454 | rightBarButtonItems: NSArray;
455 |
456 | title: string;
457 |
458 | titleTextAttributes: NSDictionary;
459 | }
460 |
461 | declare class NYTPhotosViewController extends UIViewController {
462 |
463 | static alloc(): NYTPhotosViewController; // inherited from NSObject
464 |
465 | static new(): NYTPhotosViewController; // inherited from NSObject
466 |
467 | readonly currentlyDisplayedPhoto: NYTPhoto;
468 |
469 | dataSource: NYTPhotoViewerDataSource;
470 |
471 | delegate: NYTPhotosViewControllerDelegate;
472 |
473 | leftBarButtonItem: UIBarButtonItem;
474 |
475 | leftBarButtonItems: NSArray;
476 |
477 | readonly overlayView: NYTPhotosOverlayView;
478 |
479 | readonly pageViewController: UIPageViewController;
480 |
481 | readonly panGestureRecognizer: UIPanGestureRecognizer;
482 |
483 | rightBarButtonItem: UIBarButtonItem;
484 |
485 | rightBarButtonItems: NSArray;
486 |
487 | readonly singleTapGestureRecognizer: UITapGestureRecognizer;
488 |
489 | constructor(o: { dataSource: NYTPhotoViewerDataSource; });
490 |
491 | constructor(o: { dataSource: NYTPhotoViewerDataSource; initialPhoto: NYTPhoto; delegate: NYTPhotosViewControllerDelegate; });
492 |
493 | constructor(o: { dataSource: NYTPhotoViewerDataSource; initialPhotoIndex: number; delegate: NYTPhotosViewControllerDelegate; });
494 |
495 | displayPhotoAnimated(photo: NYTPhoto, animated: boolean): void;
496 |
497 | initWithDataSource(dataSource: NYTPhotoViewerDataSource): this;
498 |
499 | initWithDataSourceInitialPhotoDelegate(dataSource: NYTPhotoViewerDataSource, initialPhoto: NYTPhoto, delegate: NYTPhotosViewControllerDelegate): this;
500 |
501 | initWithDataSourceInitialPhotoIndexDelegate(dataSource: NYTPhotoViewerDataSource, initialPhotoIndex: number, delegate: NYTPhotosViewControllerDelegate): this;
502 |
503 | reloadPhotosAnimated(animated: boolean): void;
504 |
505 | updatePhoto(photo: NYTPhoto): void;
506 |
507 | updatePhotoAtIndex(photoIndex: number): void;
508 | }
509 |
510 | interface NYTPhotosViewControllerDelegate extends NSObjectProtocol {
511 |
512 | photosViewControllerActionCompletedWithActivityType?(photosViewController: NYTPhotosViewController, activityType: string): void;
513 |
514 | photosViewControllerCaptionViewForPhoto?(photosViewController: NYTPhotosViewController, photo: NYTPhoto): UIView;
515 |
516 | photosViewControllerCaptionViewRespectsSafeAreaForPhoto?(photosViewController: NYTPhotosViewController, photo: NYTPhoto): boolean;
517 |
518 | photosViewControllerDidDismiss?(photosViewController: NYTPhotosViewController): void;
519 |
520 | photosViewControllerDidNavigateToPhotoAtIndex?(photosViewController: NYTPhotosViewController, photo: NYTPhoto, photoIndex: number): void;
521 |
522 | photosViewControllerHandleActionButtonTappedForPhoto?(photosViewController: NYTPhotosViewController, photo: NYTPhoto): boolean;
523 |
524 | photosViewControllerHandleLongPressForPhotoWithGestureRecognizer?(photosViewController: NYTPhotosViewController, photo: NYTPhoto, longPressGestureRecognizer: UILongPressGestureRecognizer): boolean;
525 |
526 | photosViewControllerLoadingViewForPhoto?(photosViewController: NYTPhotosViewController, photo: NYTPhoto): UIView;
527 |
528 | photosViewControllerMaximumZoomScaleForPhoto?(photosViewController: NYTPhotosViewController, photo: NYTPhoto): number;
529 |
530 | photosViewControllerReferenceViewForPhoto?(photosViewController: NYTPhotosViewController, photo: NYTPhoto): UIView;
531 |
532 | photosViewControllerTitleForPhotoAtIndexTotalPhotoCount?(photosViewController: NYTPhotosViewController, photo: NYTPhoto, photoIndex: number, totalPhotoCount: number): string;
533 |
534 | photosViewControllerWillDismiss?(photosViewController: NYTPhotosViewController): void;
535 | }
536 | declare var NYTPhotosViewControllerDelegate: {
537 |
538 | prototype: NYTPhotosViewControllerDelegate;
539 | };
540 |
541 | declare var NYTPhotosViewControllerDidDismissNotification: string;
542 |
543 | declare var NYTPhotosViewControllerDidNavigateToPhotoNotification: string;
544 |
545 | declare var NYTPhotosViewControllerWillDismissNotification: string;
546 |
547 | declare class NYTScalingImageView extends UIScrollView {
548 |
549 | static alloc(): NYTScalingImageView; // inherited from NSObject
550 |
551 | static appearance(): NYTScalingImageView; // inherited from UIAppearance
552 |
553 | static appearanceForTraitCollection(trait: UITraitCollection): NYTScalingImageView; // inherited from UIAppearance
554 |
555 | static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): NYTScalingImageView; // inherited from UIAppearance
556 |
557 | static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray | typeof NSObject[]): NYTScalingImageView; // inherited from UIAppearance
558 |
559 | static appearanceWhenContainedIn(ContainerClass: typeof NSObject): NYTScalingImageView; // inherited from UIAppearance
560 |
561 | static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray | typeof NSObject[]): NYTScalingImageView; // inherited from UIAppearance
562 |
563 | static new(): NYTScalingImageView; // inherited from NSObject
564 |
565 | readonly imageView: FLAnimatedImageView;
566 |
567 | constructor(o: { imageData: NSData; frame: CGRect; });
568 |
569 | constructor(o: { image: UIImage; frame: CGRect; });
570 |
571 | centerScrollViewContents(): void;
572 |
573 | initWithImageDataFrame(imageData: NSData, frame: CGRect): this;
574 |
575 | initWithImageFrame(image: UIImage, frame: CGRect): this;
576 |
577 | updateImage(image: UIImage): void;
578 |
579 | updateImageData(imageData: NSData): void;
580 | }
581 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "class-name": true,
4 | "comment-format": [true, "check-space"],
5 | "indent": [true, "spaces"],
6 | "no-duplicate-variable": true,
7 | "no-eval": true,
8 | "no-require-imports": false,
9 | "prefer-const": true,
10 | "no-internal-module": true,
11 | "no-trailing-whitespace": true,
12 | "no-var-keyword": true,
13 | "one-line": [true, "check-open-brace", "check-whitespace"],
14 | "quotemark": [false, "double"],
15 | "semicolon": [true, "always"],
16 | "no-irregular-whitespace": false,
17 | "triple-equals": [true, "allow-null-check"],
18 | "typedef-whitespace": [
19 | true,
20 | {
21 | "call-signature": "nospace",
22 | "index-signature": "nospace",
23 | "parameter": "nospace",
24 | "property-declaration": "nospace",
25 | "variable-declaration": "nospace"
26 | }
27 | ],
28 | "variable-name": [true, "ban-keywords"],
29 | "whitespace": [
30 | true,
31 | "check-branch",
32 | "check-decl",
33 | "check-operator",
34 | "check-separator",
35 | "check-type"
36 | ]
37 | }
38 | }
39 |
--------------------------------------------------------------------------------