summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/index.html3
-rw-r--r--www/js/DataModel.js12
-rw-r--r--www/js/DevOptionsCtrl.js2
-rw-r--r--www/js/MontageCtrl.js4
-rw-r--r--www/js/MontageHistoryCtrl.js6
-rw-r--r--www/js/app.js42
-rw-r--r--www/lib/ionic-native-transitions/.bower.json24
-rw-r--r--www/lib/ionic-native-transitions/.gitignore32
-rw-r--r--www/lib/ionic-native-transitions/CHANGELOG.md47
-rw-r--r--www/lib/ionic-native-transitions/Copyright.txt7
-rw-r--r--www/lib/ionic-native-transitions/LICENSE22
-rw-r--r--www/lib/ionic-native-transitions/README.md364
-rw-r--r--www/lib/ionic-native-transitions/bower.json14
-rw-r--r--www/lib/ionic-native-transitions/config.xml34
-rw-r--r--www/lib/ionic-native-transitions/dist/ionic-native-transitions.js749
-rw-r--r--www/lib/ionic-native-transitions/dist/ionic-native-transitions.js.map1
-rw-r--r--www/lib/ionic-native-transitions/dist/ionic-native-transitions.min.js11
-rw-r--r--www/lib/ionic-native-transitions/lib/index.js14
-rw-r--r--www/lib/ionic-native-transitions/lib/nativeSref.js44
-rw-r--r--www/lib/ionic-native-transitions/lib/provider.js506
-rw-r--r--www/lib/ionic-native-transitions/lib/run.js19
-rw-r--r--www/lib/ionic-native-transitions/package.json66
-rw-r--r--www/lib/ionic-native-transitions/test/angular-ios9-uiwebview.patch.js75
-rw-r--r--www/lib/ionic-native-transitions/test/config.js119
-rw-r--r--www/lib/ionic-native-transitions/test/controller.js96
-rw-r--r--www/lib/ionic-native-transitions/test/index.html157
-rw-r--r--www/lib/ionic-native-transitions/test/index.js21
-rw-r--r--www/lib/ionic-native-transitions/webpack.config.dist.js36
-rw-r--r--www/lib/ionic-native-transitions/webpack.config.dist.min.js39
-rw-r--r--www/lib/ionic-native-transitions/webpack.config.js38
-rw-r--r--www/lib/ionic-native-transitions/www/.gitignore2
-rw-r--r--www/templates/events.html2
-rw-r--r--www/templates/help.html2
-rw-r--r--www/templates/monitors-modal.html6
-rw-r--r--www/templates/monitors.html2
-rw-r--r--www/templates/montage-history.html2
-rw-r--r--www/templates/montage.html2
37 files changed, 2596 insertions, 26 deletions
diff --git a/www/index.html b/www/index.html
index 65aecdca..295b833c 100644
--- a/www/index.html
+++ b/www/index.html
@@ -54,8 +54,7 @@
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<script src="js/ionicUtils.js"></script>
-
-
+ <script src="lib/ionic-native-transitions/dist/ionic-native-transitions.min.js"></script>
<!-- your app's js -->
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index ec2686b4..7f468990 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -11,11 +11,11 @@
angular.module('zmApp.controllers')
.service('ZMDataModel',
-['$http', '$q', '$ionicLoading', '$ionicBackdrop', '$fileLogger', 'zm','$rootScope','$ionicContentBanner', '$timeout','$cordovaPinDialog', '$ionicPopup', '$localstorage',
+['$http', '$q', '$ionicLoading', '$ionicBackdrop', '$fileLogger', 'zm','$rootScope','$ionicContentBanner', '$timeout','$cordovaPinDialog', '$ionicPopup', '$localstorage', '$state', '$ionicNativeTransitions',
function
($http, $q, $ionicLoading, $ionicBackdrop,$fileLogger,
zm, $rootScope,$ionicContentBanner, $timeout, $cordovaPinDialog,
- $ionicPopup, $localstorage) {
+ $ionicPopup, $localstorage, $state, $ionicNativeTransitions) {
var zmAppVersion="unknown";
var isBackground = false;
@@ -191,6 +191,14 @@ angular.module('zmApp.controllers')
// from APIs, I don't have an option
+ zmStateGo: function(state,p1,p2)
+ {
+ if ($rootScope.platformOS == 'desktop')
+ $state.go(state,p1,p2);
+ else
+ $ionicNativeTransitions.stateGo(state,p1,p2);
+ },
+
// used when an empty server profile is created
getDefaultLoginObject: function()
{
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js
index a85322cd..4f4b70bc 100644
--- a/www/js/DevOptionsCtrl.js
+++ b/www/js/DevOptionsCtrl.js
@@ -21,7 +21,7 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope'
{
$rootScope.alarmCount="0";
$ionicHistory.nextViewOptions({disableBack: true});
- $state.go("events", {"id": 0}, { reload: true });
+ ZMDataModel.zmStateGo("events", {"id": 0}, { reload: true });
}
};
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index ae7d27bb..08501774 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -6,9 +6,9 @@
angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', '$localstorage', function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window, $localstorage) {
- $controller('zmApp.BaseController', {
+ /* $controller('zmApp.BaseController', {
$scope: $scope
- });
+ });*/
//---------------------------------------------------------------------
// Controller main
//---------------------------------------------------------------------
diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js
index a43b4d6b..625a9bc2 100644
--- a/www/js/MontageHistoryCtrl.js
+++ b/www/js/MontageHistoryCtrl.js
@@ -8,11 +8,7 @@
angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$scope', '$rootScope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$ionicPopup', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', 'zm', '$ionicPopover', '$controller', 'imageLoadingDataShare', '$window', function ($scope, $rootScope, ZMDataModel, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $ionicPopup, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, zm, $ionicPopover, $controller, imageLoadingDataShare, $window) {
- $controller('zmApp.BaseController', {
- $scope: $scope
- });
-
-
+
//--------------------------------------
// formats events dates in a nice way
//---------------------------------------
diff --git a/www/js/app.js b/www/js/app.js
index 6f2bf72b..86f5084b 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -19,6 +19,7 @@ angular.module('zmApp', [
'com.2fdevs.videogular',
'com.2fdevs.videogular.plugins.controls',
'com.2fdevs.videogular.plugins.overlayplay',
+ 'ionic-native-transitions'
@@ -189,6 +190,8 @@ angular.module('zmApp', [
})
+
+
//------------------------------------------------------------------
// I use this factory to share data between carousel and lazy load
// carousel will not progress autoslide till imageLoading is 0 or -1
@@ -1005,7 +1008,7 @@ angular.module('zmApp', [
//====================================================================
-.run(function ($ionicPlatform, $ionicPopup, $rootScope, zm, $state, $stateParams, ZMDataModel, $cordovaSplashscreen, $http, $interval, zmAutoLogin, zmCheckUpdates, $fileLogger, $timeout, $ionicHistory, $window, $ionicSideMenuDelegate, EventServer, $ionicContentBanner, $ionicLoading) {
+.run(function ($ionicPlatform, $ionicPopup, $rootScope, zm, $state, $stateParams, ZMDataModel, $cordovaSplashscreen, $http, $interval, zmAutoLogin, zmCheckUpdates, $fileLogger, $timeout, $ionicHistory, $window, $ionicSideMenuDelegate, EventServer, $ionicContentBanner, $ionicLoading, $ionicNativeTransitions) {
@@ -1149,7 +1152,8 @@ angular.module('zmApp', [
$ionicPlatform.ready(function () {
-
+ $ionicNativeTransitions.enable(true, false);
+
if (window.cordova) {
$cordovaSplashscreen.hide();
}
@@ -1361,7 +1365,7 @@ angular.module('zmApp', [
//------------------------------------------------------------------
// My route map connecting menu options to their respective templates and controllers
-.config(function ($stateProvider, $urlRouterProvider, $httpProvider, $ionicConfigProvider, $provide,$compileProvider) {
+.config(function ($stateProvider, $urlRouterProvider, $httpProvider, $ionicConfigProvider, $provide,$compileProvider, $ionicNativeTransitionsProvider) {
// This is an exception interceptor so it can show up in app logs
@@ -1387,8 +1391,16 @@ angular.module('zmApp', [
//$httpProvider.defaults.withCredentials = true;
$httpProvider.interceptors.push('timeoutHttpIntercept');
$ionicConfigProvider.navBar.alignTitle('center');
- $ionicConfigProvider.scrolling.jsScrolling(false);
+ // use overflow-scroll=false in ion-content
+ // removing it here doesn't allow you to enable it per view
+ // so it messes up scrolldelegate zoom and possibly others
+ //$ionicConfigProvider.scrolling.jsScrolling(false);
$compileProvider.debugInfoEnabled(false);
+
+ $ionicNativeTransitionsProvider.setDefaultOptions({
+ duration: 250,
+ });
+
$stateProvider
.state('app', {
@@ -1396,6 +1408,7 @@ angular.module('zmApp', [
abstract: true,
templateUrl: 'index.html',
cache: false,
+
//controller: 'AppCtrl'
})
@@ -1408,6 +1421,7 @@ angular.module('zmApp', [
url: "/login",
templateUrl: "templates/login.html",
controller: 'zmApp.LoginCtrl',
+
})
@@ -1418,6 +1432,7 @@ angular.module('zmApp', [
url: "/help",
templateUrl: "templates/help.html",
controller: 'zmApp.HelpCtrl',
+
})
.state('news', {
@@ -1427,6 +1442,7 @@ angular.module('zmApp', [
url: "/news",
templateUrl: "templates/news.html",
controller: 'zmApp.NewsCtrl',
+
})
@@ -1444,6 +1460,7 @@ angular.module('zmApp', [
url: "/monitors",
templateUrl: "templates/monitors.html",
controller: 'zmApp.MonitorCtrl',
+
})
@@ -1461,6 +1478,7 @@ angular.module('zmApp', [
templateUrl: "templates/events.html",
controller: 'zmApp.EventCtrl',
+
})
.state('lowversion', {
@@ -1471,6 +1489,7 @@ angular.module('zmApp', [
url: "/lowversion/:ver",
templateUrl: "templates/lowversion.html",
controller: 'zmApp.LowVersionCtrl',
+
})
@@ -1482,6 +1501,7 @@ angular.module('zmApp', [
url: "/importantmessage/:ver",
templateUrl: "templates/important_message.html",
controller: 'zmApp.ImportantMessageCtrl',
+
})
@@ -1494,6 +1514,7 @@ angular.module('zmApp', [
url: "/events-graphs",
templateUrl: "templates/events-graphs.html",
controller: 'zmApp.EventsGraphsCtrl',
+
})
@@ -1504,6 +1525,7 @@ angular.module('zmApp', [
url: "/events-date-time-filter",
templateUrl: "templates/events-date-time-filter.html",
controller: 'zmApp.EventDateTimeFilterCtrl',
+
})
.state('state', {
@@ -1513,6 +1535,7 @@ angular.module('zmApp', [
url: "/state",
templateUrl: "templates/state.html",
controller: 'zmApp.StateCtrl',
+
})
.state('devoptions', {
@@ -1537,6 +1560,7 @@ angular.module('zmApp', [
url: "/timeline",
templateUrl: "templates/timeline.html",
controller: 'zmApp.TimelineCtrl',
+
})
.state('eventserversettings', {
@@ -1551,6 +1575,7 @@ angular.module('zmApp', [
url: "/eventserversettings",
templateUrl: "templates/eventserversettings.html",
controller: 'zmApp.EventServerSettingsCtrl',
+
})
.state('log', {
@@ -1560,6 +1585,7 @@ angular.module('zmApp', [
url: "/log",
templateUrl: "templates/log.html",
controller: 'zmApp.LogCtrl',
+
})
@@ -1571,6 +1597,7 @@ angular.module('zmApp', [
url: "/zm-portal-login",
templateUrl: "templates/zm-portal-login.html",
controller: 'zmApp.PortalLoginCtrl',
+
})
.state('first-use', {
@@ -1580,6 +1607,7 @@ angular.module('zmApp', [
url: "/first-use",
templateUrl: "templates/first-use.html",
controller: 'zmApp.FirstUseCtrl',
+
})
.state('montage-history', {
@@ -1599,7 +1627,8 @@ angular.module('zmApp', [
params: {
minimal: false,
isRefresh: false
- }
+ },
+
})
@@ -1620,7 +1649,8 @@ angular.module('zmApp', [
params: {
minimal: false,
isRefresh: false
- }
+ },
+
});
diff --git a/www/lib/ionic-native-transitions/.bower.json b/www/lib/ionic-native-transitions/.bower.json
new file mode 100644
index 00000000..ebe74b21
--- /dev/null
+++ b/www/lib/ionic-native-transitions/.bower.json
@@ -0,0 +1,24 @@
+{
+ "name": "ionic-native-transitions",
+ "version": "1.0.0-rc9",
+ "description": "Native transitions for Ionic applications",
+ "main": [
+ "dist/ionic-native-transitions.js"
+ ],
+ "authors": [
+ "shprink <contact@julienrenaux.fr>"
+ ],
+ "license": "MIT",
+ "homepage": "https://github.com/shprink/ionic-native-transitions",
+ "private": false,
+ "_release": "1.0.0-rc9",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.0-rc9",
+ "commit": "d652f9f0891a2292389f53f7f84fb592e0db8797"
+ },
+ "_source": "git://github.com/shprink/ionic-native-transitions.git",
+ "_target": "~1.0.0-rc9",
+ "_originalSource": "shprink/ionic-native-transitions",
+ "_direct": true
+} \ No newline at end of file
diff --git a/www/lib/ionic-native-transitions/.gitignore b/www/lib/ionic-native-transitions/.gitignore
new file mode 100644
index 00000000..04cf6768
--- /dev/null
+++ b/www/lib/ionic-native-transitions/.gitignore
@@ -0,0 +1,32 @@
+# Logs
+logs
+*.log
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directory
+# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
+node_modules
+platforms
+plugins
+
+# Ignore IDE related files
+.idea
diff --git a/www/lib/ionic-native-transitions/CHANGELOG.md b/www/lib/ionic-native-transitions/CHANGELOG.md
new file mode 100644
index 00000000..380b1162
--- /dev/null
+++ b/www/lib/ionic-native-transitions/CHANGELOG.md
@@ -0,0 +1,47 @@
+<a name="1.0.0-rc9"></a>
+### 1.0.0-rc9
+
+* [BUG] stateGo API change <https://github.com/shprink/ionic-native-transitions/issues/35>
+* [BUG] Hardware back does not close app <https://github.com/shprink/ionic-native-transitions/issues/47>
+* [BUG] Pass `backCount` parameter to `$ionicNativeTransitions.goBack()` method <https://github.com/shprink/ionic-native-transitions/issues/53>
+
+<a name="1.0.0-rc8"></a>
+### 1.0.0-rc8
+
+* [Enhancement] stateGo API change <https://github.com/shprink/ionic-native-transitions/issues/35>
+
+<a name="1.0.0-rc7"></a>
+### 1.0.0-rc7
+
+* [Enhancement] Adding backCount to goBack(<backCount>) method <https://github.com/shprink/ionic-native-transitions/pull/56>
+
+<a name="1.0.0-rc6"></a>
+### 1.0.0-rc6
+
+* [BUGFIX] Screen stuck after $stateChangeStart is defaultPrevented <https://github.com/shprink/ionic-native-transitions/issues/45>
+
+<a name="1.0.0-rc5"></a>
+### 1.0.0-rc5
+
+* [BUGFIX] Correct back button behavior <https://github.com/shprink/ionic-native-transitions/issues/39>
+
+<a name="1.0.0-rc3"></a>
+### 1.0.0-rc3
+
+* [FEATURE] Opposite transition on back button (backInOppositeDirection: true) <https://github.com/shprink/ionic-native-transitions/issues/27>
+* [FEATURE] Back transition per state <https://github.com/shprink/ionic-native-transitions/issues/28>
+
+<a name="1.0.0-rc2"></a>
+### 1.0.0-rc2
+
+* [BUGFIX] Hardware back button now closes Modal, Menu or Action Sheet before transition. <https://github.com/shprink/ionic-native-transitions/issues/32>
+
+<a name="1.0.0-rc1"></a>
+### 1.0.0-rc1
+
+[milestone](https://github.cohttps://github.com/shprink/ionic-native-transitions/milestones/1.0.0)
+
+* [FEATURE] Enable/Disable as a service <https://github.com/shprink/ionic-native-transitions/issues/22>
+* [FEATURE] How to know that the transition ended? <https://github.com/shprink/ionic-native-transitions/issues/17>
+* [FEATURE] How can I use it with $location.url() ? <https://github.com/shprink/ionic-native-transitions/issues/9>
+* [FEATURE] Animate too early or too late enhancement <https://github.com/shprink/ionic-native-transitions/issues/3>
diff --git a/www/lib/ionic-native-transitions/Copyright.txt b/www/lib/ionic-native-transitions/Copyright.txt
new file mode 100644
index 00000000..a03e448b
--- /dev/null
+++ b/www/lib/ionic-native-transitions/Copyright.txt
@@ -0,0 +1,7 @@
+{pkg.name}
+ ---
+{pkg.description}
+@version: v{pkg.version}
+@author: {pkg.author}
+@link: {pkg.homepage}
+@license: {pkg.license}
diff --git a/www/lib/ionic-native-transitions/LICENSE b/www/lib/ionic-native-transitions/LICENSE
new file mode 100644
index 00000000..be1ceca5
--- /dev/null
+++ b/www/lib/ionic-native-transitions/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Julien Renaux
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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.
+
diff --git a/www/lib/ionic-native-transitions/README.md b/www/lib/ionic-native-transitions/README.md
new file mode 100644
index 00000000..08d8b058
--- /dev/null
+++ b/www/lib/ionic-native-transitions/README.md
@@ -0,0 +1,364 @@
+Native transitions for Ionic. Turn it on and enjoy native transitions.
+
+![gif](http://examples.julienrenaux.fr/native-transitions/native-transitions.gif)
+
+# Installation
+## npm
+[https://www.npmjs.com/package/ionic-native-transitions](https://www.npmjs.com/package/ionic-native-transitions)
+
+```
+npm install ionic-native-transitions --save
+```
+
+Then require the library
+
+```
+# ES5
+require('ionic-native-transitions');
+
+# or ES6
+import 'ionic-native-transitions';
+```
+
+## Bower
+
+```
+bower install shprink/ionic-native-transitions
+```
+
+## Cordova/Ionic
+The recommended version for the Transition plugin is 0.5.5 or higher.
+
+```
+# Using Cordova
+cordova plugin add https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.5.5
+
+# Using Ionic CLI
+ionic plugin add https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.5.5
+```
+
+### iOS
+Transitions on iOS9 can flicker sometimes. To prevent this from hapenning you can install this plugin:
+
+```
+# Using Cordova
+cordova plugin add cordova-plugin-wkwebview
+
+# Using Ionic CLI
+ionic plugin add cordova-plugin-wkwebview
+```
+
+### Android
+if you are using Crosswalk > 1.3 please add the following to your `config.xml`
+
+```
+<preference name="CrosswalkAnimatable" value="true" />
+```
+
+# Configuration
+
+```
+angular.module('yourApp', [
+ 'ionic-native-transitions'
+]);
+```
+
+## Set default options (optional)
+**_Beware_**: Only use `setDefaultOptions` if you know what you are doing.
+
+```
+.config(function($ionicNativeTransitionsProvider){
+ $ionicNativeTransitionsProvider.setDefaultOptions({
+ duration: 400, // in milliseconds (ms), default 400,
+ slowdownfactor: 4, // overlap views (higher number is more) or no overlap (1), default 4
+ iosdelay: -1, // ms to wait for the iOS webview to update before animation kicks in, default -1
+ androiddelay: -1, // same as above but for Android, default -1
+ winphonedelay: -1, // same as above but for Windows Phone, default -1,
+ fixedPixelsTop: 0, // the number of pixels of your fixed header, default 0 (iOS and Android)
+ fixedPixelsBottom: 0 // the number of pixels of your fixed footer (f.i. a tab bar), default 0 (iOS and Android)
+ triggerTransitionEvent: '$ionicView.afterEnter', // internal ionic-native-transitions option
+ backInOppositeDirection: false // Takes over default back transition and state back transition to use the opposite direction transition to go back
+ });
+});
+```
+
+## Set default transition (optional)
+[See the list of possible transitions](#transitions)
+
+```
+.config(function($ionicNativeTransitionsProvider){
+ $ionicNativeTransitionsProvider.setDefaultTransition({
+ type: 'slide',
+ direction: 'left'
+ });
+});
+```
+
+## Set default back transition (optional)
+[See the list of possible transitions](#transitions)
+
+```
+.config(function($ionicNativeTransitionsProvider){
+ $ionicNativeTransitionsProvider.setDefaultBackTransition({
+ type: 'slide',
+ direction: 'right'
+ });
+});
+```
+
+## Enable/Disable (optional)
+You can programatically disable the plugin for any reason:
+
+```
+# Within the config phase
+# * @param {boolean} enabled
+$ionicNativeTransitionsProvider.enable(false);
+
+# Anywhere else (controller, service etc.)
+# * @param {boolean} enabled default true
+# * @param {boolean} disableIonicTransitions default true
+# * @param {string} ionicTransitionType default 'platform'
+
+# Disable plugin and enable ionic transitions (same as: enable(false, false))
+$ionicNativeTransitions.enable(false);
+
+# Enable plugin and disable ionic transitions (same as: enable(true, true))
+$ionicNativeTransitions.enable(true);
+
+# Disable plugin and disable ionic transitions
+$ionicNativeTransitions.enable(false, true);
+
+# Enable plugin and enable ionic transitions
+# in some cases it is useful <https://github.com/shprink/ionic-native-transitions/issues/23>
+$ionicNativeTransitions.enable(true, false);
+```
+
+# Usage
+By default any state transition will use the default transition (Defined in the configuration phase) but you can specify a different transition per state if you want using the UI router state definition:
+
+```
+.state('home', {
+ url: '/home',
+ nativeTransitions: {
+ "type": "flip",
+ "direction": "up"
+ }
+ templateUrl: "templates/home.html"
+})
+```
+
+You can also define a different transition (backward and forward) per device like this:
+
+```
+.state('home', {
+ url: '/home',
+ nativeTransitionsAndroid: {
+ "type": "flip",
+ "direction": "right"
+ },
+ nativeTransitionsIOS: {
+ "type": "flip",
+ "direction": "left"
+ },
+ nativeTransitionsWindowsPhone: {
+ "type": "flip",
+ "direction": "down"
+ },
+ nativeTransitionsBackAndroid: {
+ "type": "flip",
+ "direction": "left"
+ },
+ nativeTransitionsBackIOS: {
+ "type": "flip",
+ "direction": "right"
+ },
+ nativeTransitionsBackWindowsPhone: {
+ "type": "flip",
+ "direction": "up"
+ },
+ templateUrl: "templates/home.html"
+})
+```
+
+Overwrite just one device (here only android will be different)
+
+```
+.state('home', {
+ url: '/home',
+ nativeTransitions: {
+ "type": "flip",
+ "direction": "up"
+ },
+ nativeTransitionsAndroid: {
+ "type": "flip",
+ "direction": "right"
+ }
+ templateUrl: "templates/home.html"
+})
+```
+
+Disable native transition for one state (for instance on tabs)
+
+```
+.state('home', {
+ url: '/home',
+ nativeTransitions: null,
+ templateUrl: "templates/home.html"
+})
+```
+
+## Programatically change page with native transitions
+
+### State
+
+```
+# * @description
+# * Call state go and apply a native transition
+# * @param {string|null} state default:null
+# * @param {object} stateParams default:{}
+# * @param {object|null} transitionOptions default:null
+# * @param {object} stateOptions default:{}
+
+$ionicNativeTransitions.stateGo('yourState', {}, {
+ "type": "slide",
+ "direction": "up", // 'left|right|up|down', default 'left' (which is like 'next')
+ "duration": 1500, // in milliseconds (ms), default 400
+});
+```
+
+### Location.url
+
+```
+# * @description
+# * Call location url and apply a native transition
+# * @param {string|null} url default:null
+# * @param {object|null} transitionOptions default:null
+
+$ionicNativeTransitions.locationUrl('/yourUrl', {
+ "type": "slide",
+ "direction": "down", // 'left|right|up|down', default 'left' (which is like 'next')
+ "duration": 1500, // in milliseconds (ms), default 400
+});
+```
+
+## Using directives
+
+```
+<button native-ui-sref="tabs.home({param1: 'param1', param2: 'param2'})" native-ui-sref-opts="{reload: true}" native-options="{type: 'slide', direction:'down'}"></button>
+```
+
+## History back button
+
+Using the `<ion-nav-back-button>` directive automatically uses the default back transition if you have not added a specific `ng-click` on it.
+
+## Hadware back button (Android)
+
+The hardware back button on Android uses the default back transition
+
+## Swipe back (iOS)
+
+For now swipe back will trigger the state native transition (or the default). It does not use the back transition.
+
+You can disable swipe back like this:
+
+```
+$ionicConfigProvider.views.swipeBackEnabled(false);
+```
+
+<a name="transitions"></a>
+
+## Events
+You can listen to success or error events
+
+```
+$rootScope.$on('ionicNativeTransitions.success', function(){
+ // Transition success
+});
+
+$rootScope.$on('ionicNativeTransitions.error', function(){
+ // Transition error
+});
+```
+
+# Possible transitions
+## Slide (default animation)
+
+```
+{
+ "type" : "slide",
+ "direction" : "left", // 'left|right|up|down', default 'left' (which is like 'next')
+ "duration" : 500, // in milliseconds (ms), default 400
+}
+```
+
+## Flip
+
+```
+{
+ "type" : "flip",
+ "direction" : "up", // 'left|right|up|down', default 'right' (Android currently only supports left and right)
+ "duration" : 500, // in milliseconds (ms), default 400
+}
+```
+
+## Fade (iOS and Android only)
+
+```
+{
+ "type" : "fade",
+ "duration" : 500, // in milliseconds (ms), default 400
+}
+```
+
+## Drawer (iOS and Android only)
+
+```
+{
+ "type" : "drawer",
+ "origin" : "left", // 'left|right', open the drawer from this side of the view, default 'left'
+ "action" : "open", // 'open|close', default 'open', note that close is not behaving nicely on Crosswalk
+ }
+```
+
+## Curl (iOS only, direction up and down only)
+
+```
+{
+ "type" : "curl",
+ "direction" : "up", // 'up|down', default 'up'
+}
+```
+
+# Contribute
+## Development
+
+```
+npm install
+
+# Open two terminals
+# and run watch to build on the lib files changes
+npm run watch
+
+# in the other terminal run following to build the test page and the doc
+npm run devserver
+```
+
+Open `http://localhost:8080`
+
+## Tests on device
+
+```
+npm run platformAddAndroid
+npm run platformAddIOS
+npm run pluginAddAll
+
+# run iOS devices
+npm run runIosDevice
+
+# run iOS devices
+npm run runAndroid
+```
+
+# Thanks
+- Eddy Verbruggen for his amazing job on: [https://github.com/Telerik-Verified-Plugins/NativePageTransitions](https://github.com/Telerik-Verified-Plugins/NativePageTransitions)
+- GAJOTRES for his great post: [http://www.gajotres.net/handling-native-view-animations-with-ionic-framework/](http://www.gajotres.net/handling-native-view-animations-with-ionic-framework/)
diff --git a/www/lib/ionic-native-transitions/bower.json b/www/lib/ionic-native-transitions/bower.json
new file mode 100644
index 00000000..72d89874
--- /dev/null
+++ b/www/lib/ionic-native-transitions/bower.json
@@ -0,0 +1,14 @@
+{
+ "name": "ionic-native-transitions",
+ "version": "1.0.0-rc9",
+ "description": "Native transitions for Ionic applications",
+ "main": [
+ "dist/ionic-native-transitions.js"
+ ],
+ "authors": [
+ "shprink <contact@julienrenaux.fr>"
+ ],
+ "license": "MIT",
+ "homepage": "https://github.com/shprink/ionic-native-transitions",
+ "private": false
+}
diff --git a/www/lib/ionic-native-transitions/config.xml b/www/lib/ionic-native-transitions/config.xml
new file mode 100644
index 00000000..bab3c2a5
--- /dev/null
+++ b/www/lib/ionic-native-transitions/config.xml
@@ -0,0 +1,34 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget id="com.ionicNativeTransitions" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+ <name>ionic-native-transitions</name>
+ <description>
+ Your description.
+ </description>
+ <author email="youEmail@" href="yourUrl">
+ YourName
+ </author>
+ <content src="index.html" />
+ <access origin="*" />
+ <allow-navigation href="http://example.com/*" />
+ <preference name="orientation" value="portrait" />
+ <preference name="fullscreen" value="false" />
+ <preference name="webviewbounce" value="false" />
+ <preference name="UIWebViewBounce" value="false" />
+ <preference name="DisallowOverscroll" value="true" />
+ <preference name="BackupWebStorage" value="none" />
+ <preference name="SplashScreen" value="screen" />
+ <preference name="android-minSdkVersion" value="14" />
+ <preference name="android-targetSdkVersion" value="14" />
+ <preference name="CROSSWALK_ANDROID_VERSION" value="14+" />
+ <preference name="CrosswalkAnimatable" value="true" />
+ <preference name="android-windowSoftInputMode" value="adjustNothing" />
+ <feature name="StatusBar">
+ <param name="ios-package" onload="true" value="CDVStatusBar" />
+ </feature>
+ <resources>
+ <integer name="google_play_services_version">4323000</integer>
+ </resources>
+ <preference name="xwalkVersion" value="14+" />
+ <preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
+ <preference name="xwalkMode" value="embedded" />
+</widget>
diff --git a/www/lib/ionic-native-transitions/dist/ionic-native-transitions.js b/www/lib/ionic-native-transitions/dist/ionic-native-transitions.js
new file mode 100644
index 00000000..77ddfab5
--- /dev/null
+++ b/www/lib/ionic-native-transitions/dist/ionic-native-transitions.js
@@ -0,0 +1,749 @@
+/*!
+ * ionic-native-transitions
+ * ---
+ * Native transitions for Ionic applications
+ * @version: v1.0.0-rc9
+ * @author: shprink <contact@julienrenaux.fr>
+ * @link: https://github.com/shprink/ionic-native-transitions
+ * @license: MIT
+ *
+ */
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define(factory);
+ else if(typeof exports === 'object')
+ exports["ionicNativeTransitions"] = factory();
+ else
+ root["ionicNativeTransitions"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+/******/
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!**********************!*\
+ !*** ./lib/index.js ***!
+ \**********************/
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+
+ var _providerJs = __webpack_require__(/*! ./provider.js */ 1);
+
+ var _providerJs2 = _interopRequireDefault(_providerJs);
+
+ var _nativeSrefJs = __webpack_require__(/*! ./nativeSref.js */ 2);
+
+ var _nativeSrefJs2 = _interopRequireDefault(_nativeSrefJs);
+
+ var _runJs = __webpack_require__(/*! ./run.js */ 3);
+
+ var _runJs2 = _interopRequireDefault(_runJs);
+
+ var mod = angular.module('ionic-native-transitions', ['ionic', 'ui.router']);
+
+ mod.directive('nativeUiSref', _nativeSrefJs2['default']);
+ mod.provider('$ionicNativeTransitions', _providerJs2['default']);
+ mod.run(_runJs2['default']);
+
+ exports['default'] = mod = mod.name;
+ module.exports = exports['default'];
+
+/***/ },
+/* 1 */
+/*!*************************!*\
+ !*** ./lib/provider.js ***!
+ \*************************/
+/***/ function(module, exports) {
+
+ /**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitions
+ * @description
+ * ionic-native-transitions service
+ */
+ /**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider
+ * @description
+ * ionic-native-transitions provider
+ */
+ 'use strict';
+
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+
+ exports['default'] = function () {
+ 'ngInject';
+
+ var enabled = true,
+ $stateChangeStart = null,
+ $stateChangeSuccess = null,
+ $stateChangeError = null,
+ $stateAfterEnter = null,
+ oppositeDirections = {
+ up: 'down',
+ down: 'up',
+ left: 'right',
+ right: 'left'
+ },
+ defaultTransition = {
+ type: 'slide',
+ direction: 'left'
+ },
+ defaultBackTransition = {
+ type: 'slide',
+ direction: 'right'
+ },
+ defaultOptions = {
+ duration: 400, // in milliseconds (ms), default 400,
+ slowdownfactor: 4, // overlap views (higher number is more) or no overlap (1), default 4
+ iosdelay: -1, // ms to wait for the iOS webview to update before animation kicks in, default -1
+ androiddelay: -1, // same as above but for Android, default -1
+ winphonedelay: -1, // same as above but for Windows Phone, default -1,
+ fixedPixelsTop: 0, // the number of pixels of your fixed header, default 0 (iOS and Android)
+ fixedPixelsBottom: 0, // the number of pixels of your fixed footer (f.i. a tab bar), default 0 (iOS and Android),
+ triggerTransitionEvent: '$ionicView.afterEnter', // internal ionic-native-transitions option
+ backInOppositeDirection: false // Disable default back transition and uses the opposite transition to go back
+ };
+
+ $get.$inject = ["$log", "$ionicConfig", "$rootScope", "$timeout", "$state", "$location", "$ionicHistory", "$ionicPlatform"];
+ return {
+ $get: $get,
+ enable: enable,
+ setDefaultTransition: setDefaultTransition,
+ setDefaultBackTransition: setDefaultBackTransition,
+ setDefaultOptions: setDefaultOptions
+ };
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#enable
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default nativepagetransitions plugin options
+ * @param {object} injectedOptions options that will overwrite defaults
+ */
+ function enable() {
+ var enabled = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
+
+ enable = enabled;
+ return this;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#isEnabled
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Is ionic-native-transitions enabled or not?
+ */
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#isEnabled
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Is ionic-native-transitions enabled or not?
+ */
+ function isEnabled() {
+ if (window.cordova && window.plugins && window.plugins.nativepagetransitions) {
+ return enable;
+ }
+ return false;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultOptions
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default nativepagetransitions plugin options
+ * @param {object} injectedOptions options that will overwrite defaults
+ */
+ function setDefaultOptions() {
+ var injectedOptions = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ angular.extend(defaultOptions, injectedOptions);
+ return this;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultTransition
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default transitions
+ * @param {object} transitionOptions options that will overwrite defaults
+ */
+ function setDefaultTransition() {
+ var transition = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ angular.extend(defaultTransition, transition);
+ return this;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultBackTransition
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default back transitions
+ * @param {object} transitionOptions options that will overwrite defaults
+ */
+ function setDefaultBackTransition() {
+ var transition = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ angular.extend(defaultBackTransition, transition);
+ return this;
+ }
+
+ function $get($log, $ionicConfig, $rootScope, $timeout, $state, $location, $ionicHistory, $ionicPlatform) {
+ 'ngInject';
+
+ var legacyGoBack = undefined,
+ backButtonUnregister = undefined;
+
+ return {
+ init: init,
+ getDefaultOptions: getDefaultOptions,
+ enable: enableFromService,
+ isEnabled: isEnabled,
+ transition: transition,
+ registerToRouteEvents: registerToRouteEvents,
+ unregisterToRouteEvents: unregisterToRouteEvents,
+ registerToStateChangeStartEvent: registerToStateChangeStartEvent,
+ unregisterToStateChangeStartEvent: unregisterToStateChangeStartEvent,
+ locationUrl: locationUrl,
+ stateGo: stateGo,
+ goBack: goBack
+ };
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#locationUrl
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Call location url and apply a native transition
+ * @param {string|null} url default:null
+ * @param {object|null} transitionOptions default:null
+ */
+ function locationUrl() {
+ var url = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];
+ var transitionOptions = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
+
+ if (!url) {
+ $log.debug('[native transition] cannot change url without url...');
+ return;
+ }
+ unregisterToStateChangeStartEvent();
+ $location.url(url);
+ transition(transitionOptions);
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#stateGo
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Call state go and apply a native transition
+ * @param {string|null} state default:null
+ * @param {object} stateParams default:{}
+ * @param {object|null} transitionOptions default:null
+ * @param {object} stateOptions default:{}
+ */
+ function stateGo() {
+ var state = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];
+ var stateParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ var transitionOptions = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
+ var stateOptions = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
+
+ if (!state) {
+ $log.debug('[native transition] cannot change state without a state...');
+ return;
+ }
+ unregisterToStateChangeStartEvent();
+ $state.go(state, stateParams, stateOptions);
+ transition(transitionOptions);
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#enable
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * enable/disable plugin
+ * @param {boolean} enabled
+ * @param {boolean} disableIonicTransitions
+ * @param {string} ionicTransitionType
+ */
+ function enableFromService() {
+ var enabled = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
+ var disableIonicTransitions = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
+ var ionicTransitionType = arguments.length <= 2 || arguments[2] === undefined ? 'platform' : arguments[2];
+
+ if (enabled && !(window.cordova && window.plugins && window.plugins.nativepagetransitions)) {
+ $log.debug('[native transition] is disabled or nativepagetransitions plugin is not present');
+ return;
+ }
+ enable = enabled;
+
+ if (enabled) {
+ $log.debug('[native transition] enabling plugin');
+ if (window.plugins && window.plugins.nativepagetransitions) {
+ angular.extend(window.plugins.nativepagetransitions.globalOptions, getDefaultOptions());
+ }
+ $rootScope.$ionicGoBack = goBack;
+ backButtonUnregister = $ionicPlatform.registerBackButtonAction(function (e, count) {
+ return goBack(count);
+ }, 100);
+ registerToRouteEvents();
+ } else {
+ $log.debug('[native transition] disabling plugin');
+ if (typeof arguments[1] === 'undefined') {
+ disableIonicTransitions = false;
+ }
+ $rootScope.$ionicGoBack = legacyGoBack;
+ if (angular.isFunction(backButtonUnregister)) {
+ backButtonUnregister.call();
+ }
+ unregisterToRouteEvents();
+ }
+
+ if (disableIonicTransitions) {
+ $log.debug('[native transition] disabling ionic transitions');
+ $ionicConfig.views.transition('none');
+ } else {
+ $log.debug('[native transition] enabling ionic transitions');
+ $ionicConfig.views.transition(ionicTransitionType);
+ }
+
+ return this;
+ }
+
+ function transition() {
+ if (!isEnabled()) {
+ return;
+ }
+ var options = {};
+ if (angular.isObject(arguments[0])) {
+ options = arguments[0];
+ } else if (angular.isString(arguments[0])) {
+ switch (arguments[0]) {
+ case 'back':
+ if (getDefaultOptions().backInOppositeDirection && arguments[1] && getStateTransition(arguments[1])) {
+ options = getStateTransition(arguments[1]);
+ if (options.direction) {
+ options.direction = oppositeDirections[options.direction];
+ }
+ } else if (arguments[2] && getBackStateTransition(arguments[2])) {
+ options = getBackStateTransition(arguments[2]);
+ } else {
+ options = defaultBackTransition;
+ }
+ break;
+ }
+ } else {
+ options = defaultTransition;
+ }
+ options = angular.copy(options);
+ var type = options.type;
+ delete options.type;
+ $log.debug('[native transition]', options);
+ switch (type) {
+ case 'flip':
+ window.plugins.nativepagetransitions.flip(options, transitionSuccess, transitionError);
+ break;
+ case 'fade':
+ window.plugins.nativepagetransitions.fade(options, transitionSuccess, transitionError);
+ break;
+ case 'curl':
+ window.plugins.nativepagetransitions.curl(options, transitionSuccess, transitionError);
+ break;
+ case 'drawer':
+ window.plugins.nativepagetransitions.drawer(options, transitionSuccess, transitionError);
+ break;
+ case 'slide':
+ default:
+ window.plugins.nativepagetransitions.slide(options, transitionSuccess, transitionError);
+ break;
+ }
+
+ function getTransitionDuration() {
+ var duration = undefined;
+ if (options.duration) {
+ duration = parseInt(options.duration);
+ } else {
+ duration = parseInt(getDefaultOptions().duration);
+ }
+ if (ionic.Platform.isAndroid()) {
+ if (options.androiddelay) {
+ duration += parseInt(options.androiddelay);
+ } else {
+ duration += parseInt(getDefaultOptions().androiddelay);
+ }
+ } else if (ionic.Platform.isIOS()) {
+ if (options.iosdelay) {
+ duration += parseInt(options.iosdelay);
+ } else {
+ duration += parseInt(getDefaultOptions().iosdelay);
+ }
+ } else if (ionic.Platform.isWindowsPhone()) {
+ if (options.winphonedelay) {
+ duration += parseInt(options.winphonedelay);
+ } else {
+ duration += parseInt(getDefaultOptions().winphonedelay);
+ }
+ }
+ return duration;
+ }
+
+ function transitionSuccess() {
+ setTimeout(function () {
+ return $rootScope.$broadcast('ionicNativeTransitions.success');
+ }, getTransitionDuration());
+ }
+
+ function transitionError() {
+ setTimeout(function () {
+ return $rootScope.$broadcast('ionicNativeTransitions.error');
+ }, getTransitionDuration());
+ }
+ }
+
+ function executePendingTransition() {
+ window.plugins.nativepagetransitions.executePendingTransition();
+ // $rootScope.$broadcast('ionicNativeTransitions.', executePendingTransition);
+ registerToStateChangeStartEvent();
+ }
+
+ function registerToRouteEvents() {
+ unregisterToRouteEvents();
+ registerToStateChangeStartEvent();
+ // $stateChangeSuccess = $rootScope.$on('$stateChangeSuccess', executePendingTransition);
+ $stateChangeError = $rootScope.$on('$stateChangeError', executePendingTransition);
+ $stateAfterEnter = $rootScope.$on(getDefaultOptions().triggerTransitionEvent, executePendingTransition);
+ }
+
+ function registerToStateChangeStartEvent() {
+ if ($stateChangeStart) {
+ return;
+ }
+ $stateChangeStart = $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
+ var options = null;
+ // Abort if event was preventDefault'ed
+ if (event.defaultPrevented) {
+ return;
+ }
+ // Disable native transition for this state
+ if (toState.nativeTransitions === null) {
+ return;
+ }
+ options = getStateTransition(toState);
+ $log.debug('[native transition] $stateChangeStart', toState, options);
+ transition(options);
+ });
+ }
+
+ function getBackStateTransition(state) {
+ if (angular.isObject(state.nativeTransitionsBackIOS) && ionic.Platform.isIOS()) {
+ return angular.extend({}, state.nativeTransitionsBackIOS);
+ } else if (angular.isObject(state.nativeTransitionsBackAndroid) && ionic.Platform.isAndroid()) {
+ return angular.extend({}, state.nativeTransitionsBackAndroid);
+ } else if (angular.isObject(state.nativeTransitionsBackWindowsPhone) && ionic.Platform.isWindowsPhone()) {
+ return angular.extend({}, state.nativeTransitionsBackWindowsPhone);
+ } else if (angular.isObject(state.nativeTransitionsBack)) {
+ return angular.extend({}, state.nativeTransitionsBack);
+ }
+ return null;
+ }
+
+ function getStateTransition(state) {
+ if (angular.isObject(state.nativeTransitionsIOS) && ionic.Platform.isIOS()) {
+ return angular.extend({}, state.nativeTransitionsIOS);
+ } else if (angular.isObject(state.nativeTransitionsAndroid) && ionic.Platform.isAndroid()) {
+ return angular.extend({}, state.nativeTransitionsAndroid);
+ } else if (angular.isObject(state.nativeTransitionsWindowsPhone) && ionic.Platform.isWindowsPhone()) {
+ return angular.extend({}, state.nativeTransitionsWindowsPhone);
+ } else if (angular.isObject(state.nativeTransitions)) {
+ return angular.extend({}, state.nativeTransitions);
+ }
+ return null;
+ }
+
+ function unregisterToStateChangeStartEvent() {
+ if ($stateChangeStart && angular.isFunction($stateChangeStart)) {
+ $stateChangeStart();
+ $stateChangeStart = null;
+ }
+ }
+
+ function unregisterToRouteEvents() {
+ if ($stateChangeStart && angular.isFunction($stateChangeStart)) {
+ $stateChangeStart();
+ $stateChangeStart = null;
+ }
+ if ($stateChangeSuccess && angular.isFunction($stateChangeSuccess)) {
+ $stateChangeSuccess();
+ $stateChangeSuccess = null;
+ }
+ if ($stateChangeError && angular.isFunction($stateChangeError)) {
+ $stateChangeError();
+ $stateChangeError = null;
+ }
+ if ($stateAfterEnter && angular.isFunction($stateAfterEnter)) {
+ $stateAfterEnter();
+ $stateAfterEnter = null;
+ }
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#getDefaultOptions
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Get default options
+ */
+ function getDefaultOptions() {
+ return defaultOptions;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#init
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Init nativepagetransitions plugin
+ */
+ function init() {
+ legacyGoBack = $rootScope.$ionicGoBack;
+ if (!isEnabled()) {
+ $log.debug('nativepagetransitions is disabled or nativepagetransitions plugin is not present');
+ return;
+ } else {
+ enableFromService();
+ }
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#goBack
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ * @description Navigate back in the current history stack with a back navigation transition
+ * @param {number} backCount - The number of views to go back to. default will be the previous view
+ */
+ function goBack(backCount) {
+
+ if (!$ionicHistory.backView()) {
+ // Close the app when no more history
+ if (navigator.app) {
+ navigator.app.exitApp();
+ }
+ return;
+ }
+ if (backCount >= 0) {
+ return;
+ }
+ var stateName = $ionicHistory.backView().stateName;
+
+ // Use backCount to find next state only if its defined, else pass as it is to $ionicHistory.goBack
+ // which defaults to previous view transition
+ // Get current history stack and find the cursor for the new view
+ // Based on the new cursor, find the new state to transition to
+ if (!!backCount && !isNaN(parseInt(backCount))) {
+ var viewHistory = $ionicHistory.viewHistory();
+ var currentHistory = viewHistory.histories[$ionicHistory.currentView().historyId];
+ var newCursor = currentHistory.cursor + backCount;
+
+ // If new cursor is more than the max possible or less than zero, default it to first view in history
+ if (newCursor < 0 || newCursor > currentHistory.stack.length) {
+ newCursor = 0;
+ }
+
+ stateName = currentHistory.stack[newCursor].stateName;
+ }
+
+ unregisterToStateChangeStartEvent();
+ var currentStateTransition = angular.extend({}, $state.current);
+ var toStateTransition = angular.extend({}, $state.get(stateName));
+ $log.debug('nativepagetransitions goBack', backCount, stateName, currentStateTransition, toStateTransition);
+ $ionicHistory.goBack(backCount);
+ transition('back', currentStateTransition, toStateTransition);
+ }
+ }
+ };
+
+ ;
+ module.exports = exports['default'];
+
+/***/ },
+/* 2 */
+/*!***************************!*\
+ !*** ./lib/nativeSref.js ***!
+ \***************************/
+/***/ function(module, exports) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+
+ exports['default'] = ["$log", "$ionicNativeTransitions", "$state", function ($log, $ionicNativeTransitions, $state) {
+ 'ngInject';
+
+ controller.$inject = ["$scope", "$element", "$attrs", "$state"];
+ return {
+ controller: controller,
+ restrict: 'A',
+ scope: false
+ };
+
+ function controller($scope, $element, $attrs, $state) {
+ 'ngInject';
+
+ var stateOptions = $scope.$eval($attrs.nativeUiSrefOpts) || {};
+ var nativeOptions = null;
+
+ $attrs.$observe('nativeOptions', function (newOptions) {
+ var evalOptions = $scope.$eval(newOptions);
+ nativeOptions = angular.isObject(evalOptions) ? evalOptions : {};
+ });
+
+ $element.on('click', function (event) {
+ var ref = parseStateRef($attrs.nativeUiSref, $state.current.name);
+ var params = angular.copy($scope.$eval(ref.paramExpr));
+ if (!$ionicNativeTransitions.isEnabled()) {
+ $state.go(ref.state, params, stateOptions);
+ return;
+ }
+
+ $ionicNativeTransitions.stateGo(ref.state, params, nativeOptions, stateOptions);
+ });
+ }
+ }];
+
+ function parseStateRef(ref, current) {
+ var preparsed = ref.match(/^\s*({[^}]*})\s*$/),
+ parsed;
+ if (preparsed) ref = current + '(' + preparsed[1] + ')';
+ parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/);
+ if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'");
+ return {
+ state: parsed[1],
+ paramExpr: parsed[3] || null
+ };
+ }
+ module.exports = exports['default'];
+
+/***/ },
+/* 3 */
+/*!********************!*\
+ !*** ./lib/run.js ***!
+ \********************/
+/***/ function(module, exports) {
+
+ /**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitions
+ * @description
+ * ionic-native-transitions service
+ */
+ 'use strict';
+
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+
+ exports['default'] = ["$ionicNativeTransitions", "$ionicPlatform", "$ionicHistory", "$rootScope", function ($ionicNativeTransitions, $ionicPlatform, $ionicHistory, $rootScope) {
+ 'ngInject';
+
+ $ionicPlatform.ready(function () {
+ $ionicNativeTransitions.init();
+ });
+ }];
+
+ ;
+ module.exports = exports['default'];
+ /**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider
+ * @description
+ * ionic-native-transitions provider
+ */
+
+/***/ }
+/******/ ])
+});
+;
+//# sourceMappingURL=ionic-native-transitions.js.map \ No newline at end of file
diff --git a/www/lib/ionic-native-transitions/dist/ionic-native-transitions.js.map b/www/lib/ionic-native-transitions/dist/ionic-native-transitions.js.map
new file mode 100644
index 00000000..aaab9317
--- /dev/null
+++ b/www/lib/ionic-native-transitions/dist/ionic-native-transitions.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 7a6c8f98a297fc2d3f30","webpack:///./lib/index.js","webpack:///./lib/provider.js","webpack:///./lib/nativeSref.js","webpack:///./lib/run.js"],"names":[],"mappings":"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","file":"ionic-native-transitions.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ionicNativeTransitions\"] = factory();\n\telse\n\t\troot[\"ionicNativeTransitions\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 7a6c8f98a297fc2d3f30\n **/","import Provider from './provider.js';\nimport nativeSref from './nativeSref.js';\nimport Run from './run.js';\n\nlet mod = angular.module('ionic-native-transitions', [\n 'ionic',\n 'ui.router'\n]);\n\nmod.directive('nativeUiSref', nativeSref);\nmod.provider('$ionicNativeTransitions', Provider);\nmod.run(Run);\n\nexport default mod = mod.name;\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/index.js\n **/","/**\n * @ngdoc service\n * @name ionic-native-transitions.$ionicNativeTransitions\n * @description\n * ionic-native-transitions service\n */\n/**\n * @ngdoc service\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider\n * @description\n * ionic-native-transitions provider\n */\nexport default function() {\n 'ngInject';\n\n let enabled = true,\n $stateChangeStart = null,\n $stateChangeSuccess = null,\n $stateChangeError = null,\n $stateAfterEnter = null,\n oppositeDirections = {\n up: 'down',\n down: 'up',\n left: 'right',\n right: 'left'\n },\n defaultTransition = {\n type: 'slide',\n direction: 'left'\n },\n defaultBackTransition = {\n type: 'slide',\n direction: 'right'\n },\n defaultOptions = {\n duration: 400, // in milliseconds (ms), default 400,\n slowdownfactor: 4, // overlap views (higher number is more) or no overlap (1), default 4\n iosdelay: -1, // ms to wait for the iOS webview to update before animation kicks in, default -1\n androiddelay: -1, // same as above but for Android, default -1\n winphonedelay: -1, // same as above but for Windows Phone, default -1,\n fixedPixelsTop: 0, // the number of pixels of your fixed header, default 0 (iOS and Android)\n fixedPixelsBottom: 0, // the number of pixels of your fixed footer (f.i. a tab bar), default 0 (iOS and Android),\n triggerTransitionEvent: '$ionicView.afterEnter', // internal ionic-native-transitions option\n backInOppositeDirection: false // Disable default back transition and uses the opposite transition to go back\n };\n\n return {\n $get,\n enable,\n setDefaultTransition,\n setDefaultBackTransition,\n setDefaultOptions\n };\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider#enable\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider\n *\n * @description\n * Overwrite default nativepagetransitions plugin options\n * @param {object} injectedOptions options that will overwrite defaults\n */\n function enable(enabled = true) {\n enable = enabled;\n return this;\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider#isEnabled\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider\n *\n * @description\n * Is ionic-native-transitions enabled or not?\n */\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitions#isEnabled\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitions\n *\n * @description\n * Is ionic-native-transitions enabled or not?\n */\n function isEnabled() {\n if (window.cordova && window.plugins && window.plugins.nativepagetransitions) {\n return enable;\n }\n return false;\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultOptions\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider\n *\n * @description\n * Overwrite default nativepagetransitions plugin options\n * @param {object} injectedOptions options that will overwrite defaults\n */\n function setDefaultOptions(injectedOptions = {}) {\n angular.extend(defaultOptions, injectedOptions);\n return this;\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultTransition\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider\n *\n * @description\n * Overwrite default transitions\n * @param {object} transitionOptions options that will overwrite defaults\n */\n function setDefaultTransition(transition = {}) {\n angular.extend(defaultTransition, transition);\n return this;\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultBackTransition\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider\n *\n * @description\n * Overwrite default back transitions\n * @param {object} transitionOptions options that will overwrite defaults\n */\n function setDefaultBackTransition(transition = {}) {\n angular.extend(defaultBackTransition, transition);\n return this;\n }\n\n function $get($log, $ionicConfig, $rootScope, $timeout, $state, $location, $ionicHistory, $ionicPlatform) {\n 'ngInject';\n\n let legacyGoBack, backButtonUnregister;\n\n return {\n init,\n getDefaultOptions,\n enable: enableFromService,\n isEnabled,\n transition,\n registerToRouteEvents,\n unregisterToRouteEvents,\n registerToStateChangeStartEvent,\n unregisterToStateChangeStartEvent,\n locationUrl,\n stateGo,\n goBack\n };\n\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitions#locationUrl\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitions\n *\n * @description\n * Call location url and apply a native transition\n * @param {string|null} url default:null\n * @param {object|null} transitionOptions default:null\n */\n function locationUrl(url = null, transitionOptions = null) {\n if (!url) {\n $log.debug('[native transition] cannot change url without url...');\n return;\n }\n unregisterToStateChangeStartEvent();\n $location.url(url);\n transition(transitionOptions);\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitions#stateGo\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitions\n *\n * @description\n * Call state go and apply a native transition\n * @param {string|null} state default:null\n * @param {object} stateParams default:{}\n * @param {object|null} transitionOptions default:null\n * @param {object} stateOptions default:{}\n */\n function stateGo(state = null, stateParams = {}, transitionOptions = null, stateOptions = {}) {\n if (!state) {\n $log.debug('[native transition] cannot change state without a state...');\n return;\n }\n unregisterToStateChangeStartEvent();\n $state.go(state, stateParams, stateOptions);\n transition(transitionOptions);\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitions#enable\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitions\n *\n * @description\n * enable/disable plugin\n * @param {boolean} enabled\n * @param {boolean} disableIonicTransitions\n * @param {string} ionicTransitionType\n */\n function enableFromService(enabled = true, disableIonicTransitions = true, ionicTransitionType = 'platform') {\n if (enabled && !(window.cordova && window.plugins && window.plugins.nativepagetransitions)) {\n $log.debug('[native transition] is disabled or nativepagetransitions plugin is not present');\n return;\n }\n enable = enabled;\n\n if (enabled) {\n $log.debug('[native transition] enabling plugin');\n if (window.plugins && window.plugins.nativepagetransitions) {\n angular.extend(window.plugins.nativepagetransitions.globalOptions, getDefaultOptions());\n }\n $rootScope.$ionicGoBack = goBack;\n backButtonUnregister = $ionicPlatform.registerBackButtonAction((e, count) => goBack(count), 100);\n registerToRouteEvents();\n } else {\n $log.debug('[native transition] disabling plugin');\n if (typeof arguments[1] === 'undefined') {\n disableIonicTransitions = false;\n }\n $rootScope.$ionicGoBack = legacyGoBack;\n if (angular.isFunction(backButtonUnregister)) {\n backButtonUnregister.call();\n }\n unregisterToRouteEvents();\n }\n\n if (disableIonicTransitions) {\n $log.debug('[native transition] disabling ionic transitions');\n $ionicConfig.views.transition('none');\n } else {\n $log.debug('[native transition] enabling ionic transitions');\n $ionicConfig.views.transition(ionicTransitionType);\n }\n\n return this;\n }\n\n function transition() {\n if (!isEnabled()) {\n return;\n }\n let options = {}\n if (angular.isObject(arguments[0])) {\n options = arguments[0];\n } else if (angular.isString(arguments[0])) {\n switch (arguments[0]) {\n case 'back':\n if (getDefaultOptions().backInOppositeDirection && arguments[1] && getStateTransition(arguments[1])) {\n options = getStateTransition(arguments[1]);\n if (options.direction) {\n options.direction = oppositeDirections[options.direction];\n }\n } else if (arguments[2] && getBackStateTransition(arguments[2])) {\n options = getBackStateTransition(arguments[2]);\n } else {\n options = defaultBackTransition;\n }\n break;\n }\n } else {\n options = defaultTransition;\n }\n options = angular.copy(options);\n let type = options.type;\n delete options.type;\n $log.debug('[native transition]', options);\n switch (type) {\n case 'flip':\n window.plugins.nativepagetransitions.flip(options, transitionSuccess, transitionError);\n break;\n case 'fade':\n window.plugins.nativepagetransitions.fade(options, transitionSuccess, transitionError);\n break;\n case 'curl':\n window.plugins.nativepagetransitions.curl(options, transitionSuccess, transitionError);\n break;\n case 'drawer':\n window.plugins.nativepagetransitions.drawer(options, transitionSuccess, transitionError);\n break;\n case 'slide':\n default:\n window.plugins.nativepagetransitions.slide(options, transitionSuccess, transitionError);\n break;\n }\n\n function getTransitionDuration() {\n let duration;\n if (options.duration) {\n duration = parseInt(options.duration);\n } else {\n duration = parseInt(getDefaultOptions().duration);\n }\n if (ionic.Platform.isAndroid()) {\n if (options.androiddelay) {\n duration += parseInt(options.androiddelay);\n } else {\n duration += parseInt(getDefaultOptions().androiddelay);\n }\n } else if (ionic.Platform.isIOS()) {\n if (options.iosdelay) {\n duration += parseInt(options.iosdelay);\n } else {\n duration += parseInt(getDefaultOptions().iosdelay);\n }\n } else if (ionic.Platform.isWindowsPhone()) {\n if (options.winphonedelay) {\n duration += parseInt(options.winphonedelay);\n } else {\n duration += parseInt(getDefaultOptions().winphonedelay);\n }\n }\n return duration;\n }\n\n function transitionSuccess() {\n setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.success'), getTransitionDuration());\n }\n\n function transitionError() {\n setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.error'), getTransitionDuration());\n }\n }\n\n function executePendingTransition() {\n window.plugins.nativepagetransitions.executePendingTransition();\n // $rootScope.$broadcast('ionicNativeTransitions.', executePendingTransition);\n registerToStateChangeStartEvent();\n }\n\n function registerToRouteEvents() {\n unregisterToRouteEvents();\n registerToStateChangeStartEvent();\n // $stateChangeSuccess = $rootScope.$on('$stateChangeSuccess', executePendingTransition);\n $stateChangeError = $rootScope.$on('$stateChangeError', executePendingTransition);\n $stateAfterEnter = $rootScope.$on(getDefaultOptions().triggerTransitionEvent, executePendingTransition);\n }\n\n function registerToStateChangeStartEvent() {\n if ($stateChangeStart) {\n return;\n }\n $stateChangeStart = $rootScope.$on('$stateChangeStart', (event, toState, toParams, fromState, fromParams) => {\n let options = null;\n // Abort if event was preventDefault'ed\n if (event.defaultPrevented) {\n return;\n }\n // Disable native transition for this state\n if (toState.nativeTransitions === null) {\n return;\n }\n options = getStateTransition(toState);\n $log.debug('[native transition] $stateChangeStart', toState, options);\n transition(options);\n });\n }\n\n function getBackStateTransition(state) {\n if (angular.isObject(state.nativeTransitionsBackIOS) && ionic.Platform.isIOS()) {\n return angular.extend({}, state.nativeTransitionsBackIOS);\n } else if (angular.isObject(state.nativeTransitionsBackAndroid) && ionic.Platform.isAndroid()) {\n return angular.extend({}, state.nativeTransitionsBackAndroid);\n } else if (angular.isObject(state.nativeTransitionsBackWindowsPhone) && ionic.Platform.isWindowsPhone()) {\n return angular.extend({}, state.nativeTransitionsBackWindowsPhone);\n } else if (angular.isObject(state.nativeTransitionsBack)) {\n return angular.extend({}, state.nativeTransitionsBack);\n }\n return null;\n }\n\n function getStateTransition(state) {\n if (angular.isObject(state.nativeTransitionsIOS) && ionic.Platform.isIOS()) {\n return angular.extend({}, state.nativeTransitionsIOS);\n } else if (angular.isObject(state.nativeTransitionsAndroid) && ionic.Platform.isAndroid()) {\n return angular.extend({}, state.nativeTransitionsAndroid);\n } else if (angular.isObject(state.nativeTransitionsWindowsPhone) && ionic.Platform.isWindowsPhone()) {\n return angular.extend({}, state.nativeTransitionsWindowsPhone);\n } else if (angular.isObject(state.nativeTransitions)) {\n return angular.extend({}, state.nativeTransitions);\n }\n return null;\n }\n\n function unregisterToStateChangeStartEvent() {\n if ($stateChangeStart && angular.isFunction($stateChangeStart)) {\n $stateChangeStart();\n $stateChangeStart = null;\n }\n }\n\n function unregisterToRouteEvents() {\n if ($stateChangeStart && angular.isFunction($stateChangeStart)) {\n $stateChangeStart();\n $stateChangeStart = null;\n }\n if ($stateChangeSuccess && angular.isFunction($stateChangeSuccess)) {\n $stateChangeSuccess();\n $stateChangeSuccess = null;\n }\n if ($stateChangeError && angular.isFunction($stateChangeError)) {\n $stateChangeError();\n $stateChangeError = null;\n }\n if ($stateAfterEnter && angular.isFunction($stateAfterEnter)) {\n $stateAfterEnter();\n $stateAfterEnter = null;\n }\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitions#getDefaultOptions\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitions\n *\n * @description\n * Get default options\n */\n function getDefaultOptions() {\n return defaultOptions;\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitions#init\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitions\n *\n * @description\n * Init nativepagetransitions plugin\n */\n function init() {\n legacyGoBack = $rootScope.$ionicGoBack;\n if (!isEnabled()) {\n $log.debug('nativepagetransitions is disabled or nativepagetransitions plugin is not present');\n return;\n } else {\n enableFromService();\n }\n }\n\n /**\n * @ngdoc function\n * @name ionic-native-transitions.$ionicNativeTransitions#goBack\n * @access public\n * @methodOf ionic-native-transitions.$ionicNativeTransitions\n * @description Navigate back in the current history stack with a back navigation transition\n * @param {number} backCount - The number of views to go back to. default will be the previous view\n */\n function goBack(backCount) {\n\n if (!$ionicHistory.backView()) {\n // Close the app when no more history\n if (navigator.app) {\n navigator.app.exitApp();\n }\n return;\n }\n if (backCount >= 0) {\n return;\n }\n let stateName = $ionicHistory.backView().stateName;\n\n // Use backCount to find next state only if its defined, else pass as it is to $ionicHistory.goBack\n // which defaults to previous view transition\n // Get current history stack and find the cursor for the new view\n // Based on the new cursor, find the new state to transition to\n if (!!backCount && !isNaN(parseInt(backCount))) {\n let viewHistory = $ionicHistory.viewHistory();\n let currentHistory = viewHistory.histories[$ionicHistory.currentView().historyId];\n let newCursor = currentHistory.cursor + backCount;\n\n // If new cursor is more than the max possible or less than zero, default it to first view in history\n if (newCursor < 0 || newCursor > currentHistory.stack.length) {\n newCursor = 0;\n }\n\n stateName = currentHistory.stack[newCursor].stateName;\n }\n\n unregisterToStateChangeStartEvent();\n let currentStateTransition = angular.extend({}, $state.current);\n let toStateTransition = angular.extend({}, $state.get(stateName));\n $log.debug('nativepagetransitions goBack', backCount, stateName, currentStateTransition, toStateTransition);\n $ionicHistory.goBack(backCount);\n transition('back', currentStateTransition, toStateTransition);\n }\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/provider.js\n **/","export default function($log, $ionicNativeTransitions, $state) {\n 'ngInject';\n\n return {\n controller: controller,\n restrict: 'A',\n scope: false\n };\n\n function controller($scope, $element, $attrs, $state) {\n 'ngInject';\n\n let stateOptions = $scope.$eval($attrs.nativeUiSrefOpts) || {};\n let nativeOptions = null;\n\n $attrs.$observe('nativeOptions', (newOptions) => {\n let evalOptions = $scope.$eval(newOptions);\n nativeOptions = angular.isObject(evalOptions) ? evalOptions : {};\n });\n\n $element.on('click', (event) => {\n let ref = parseStateRef($attrs.nativeUiSref, $state.current.name);\n let params = angular.copy($scope.$eval(ref.paramExpr));\n if (!$ionicNativeTransitions.isEnabled()) {\n $state.go(ref.state, params, stateOptions);\n return;\n }\n\n $ionicNativeTransitions.stateGo(ref.state, params, nativeOptions, stateOptions);\n });\n }\n}\n\nfunction parseStateRef(ref, current) {\n var preparsed = ref.match(/^\\s*({[^}]*})\\s*$/),\n parsed;\n if (preparsed) ref = current + '(' + preparsed[1] + ')';\n parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return {\n state: parsed[1],\n paramExpr: parsed[3] || null\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/nativeSref.js\n **/","/**\n * @ngdoc service\n * @name ionic-native-transitions.$ionicNativeTransitions\n * @description\n * ionic-native-transitions service\n */\n/**\n * @ngdoc service\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider\n * @description\n * ionic-native-transitions provider\n */\nexport default function($ionicNativeTransitions, $ionicPlatform, $ionicHistory, $rootScope) {\n 'ngInject';\n\n $ionicPlatform.ready(() => {\n $ionicNativeTransitions.init();\n });\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/run.js\n **/"],"sourceRoot":""} \ No newline at end of file
diff --git a/www/lib/ionic-native-transitions/dist/ionic-native-transitions.min.js b/www/lib/ionic-native-transitions/dist/ionic-native-transitions.min.js
new file mode 100644
index 00000000..1666600d
--- /dev/null
+++ b/www/lib/ionic-native-transitions/dist/ionic-native-transitions.min.js
@@ -0,0 +1,11 @@
+/*!
+ * ionic-native-transitions
+ * ---
+ * Native transitions for Ionic applications
+ * @version: v1.0.0-rc9
+ * @author: shprink <contact@julienrenaux.fr>
+ * @link: https://github.com/shprink/ionic-native-transitions
+ * @license: MIT
+ *
+ */
+!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.ionicNativeTransitions=t():n.ionicNativeTransitions=t()}(this,function(){return function(n){function t(e){if(i[e])return i[e].exports;var a=i[e]={exports:{},id:e,loaded:!1};return n[e].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(2),r=e(a),o=i(1),s=e(o),u=i(3),l=e(u),d=angular.module("ionic-native-transitions",["ionic","ui.router"]);d.directive("nativeUiSref",s["default"]),d.provider("$ionicNativeTransitions",r["default"]),d.run(l["default"]),t["default"]=d=d.name,n.exports=t["default"]},function(n,t){"use strict";function i(n,t){var i,e=n.match(/^\s*({[^}]*})\s*$/);if(e&&(n=t+"("+e[1]+")"),i=n.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!i||4!==i.length)throw new Error("Invalid state ref '"+n+"'");return{state:i[1],paramExpr:i[3]||null}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=["$log","$ionicNativeTransitions","$state",function(n,t,e){"ngInject";function a(n,e,a,r){var o=n.$eval(a.nativeUiSrefOpts)||{},s=null;a.$observe("nativeOptions",function(t){var i=n.$eval(t);s=angular.isObject(i)?i:{}}),e.on("click",function(e){var u=i(a.nativeUiSref,r.current.name),l=angular.copy(n.$eval(u.paramExpr));return t.isEnabled()?void t.stateGo(u.state,l,s,o):void r.go(u.state,l,o)})}return a.$inject=["$scope","$element","$attrs","$state"],{controller:a,restrict:"A",scope:!1}}],n.exports=t["default"]},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(){"ngInject";function n(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];return n=t,this}function t(){return window.cordova&&window.plugins&&window.plugins.nativepagetransitions?n:!1}function i(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return angular.extend(v,n),this}function e(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return angular.extend(g,n),this}function a(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return angular.extend(c,n),this}function r(i,e,a,r,f,p,m,w){function b(){var n=arguments.length<=0||void 0===arguments[0]?null:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return n?(I(),p.url(n),void T(t)):void i.debug("[native transition] cannot change url without url...")}function h(){var n=arguments.length<=0||void 0===arguments[0]?null:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],e=arguments.length<=2||void 0===arguments[2]?null:arguments[2],a=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];return n?(I(),f.go(n,t,a),void T(e)):void i.debug("[native transition] cannot change state without a state...")}function $(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],o=arguments.length<=2||void 0===arguments[2]?"platform":arguments[2];return!t||window.cordova&&window.plugins&&window.plugins.nativepagetransitions?(n=t,t?(i.debug("[native transition] enabling plugin"),window.plugins&&window.plugins.nativepagetransitions&&angular.extend(window.plugins.nativepagetransitions.globalOptions,S()),a.$ionicGoBack=E,A=w.registerBackButtonAction(function(n,t){return E(t)},100),y()):(i.debug("[native transition] disabling plugin"),"undefined"==typeof arguments[1]&&(r=!1),a.$ionicGoBack=N,angular.isFunction(A)&&A.call(),j()),r?(i.debug("[native transition] disabling ionic transitions"),e.views.transition("none")):(i.debug("[native transition] enabling ionic transitions"),e.views.transition(o)),this):void i.debug("[native transition] is disabled or nativepagetransitions plugin is not present")}function T(){function n(){var n=void 0;return n=o.duration?parseInt(o.duration):parseInt(S().duration),ionic.Platform.isAndroid()?n+=o.androiddelay?parseInt(o.androiddelay):parseInt(S().androiddelay):ionic.Platform.isIOS()?n+=o.iosdelay?parseInt(o.iosdelay):parseInt(S().iosdelay):ionic.Platform.isWindowsPhone()&&(n+=o.winphonedelay?parseInt(o.winphonedelay):parseInt(S().winphonedelay)),n}function e(){setTimeout(function(){return a.$broadcast("ionicNativeTransitions.success")},n())}function r(){setTimeout(function(){return a.$broadcast("ionicNativeTransitions.error")},n())}if(t()){var o={};if(angular.isObject(arguments[0]))o=arguments[0];else if(angular.isString(arguments[0]))switch(arguments[0]){case"back":S().backInOppositeDirection&&arguments[1]&&P(arguments[1])?(o=P(arguments[1]),o.direction&&(o.direction=d[o.direction])):o=arguments[2]&&O(arguments[2])?O(arguments[2]):c}else o=g;o=angular.copy(o);var s=o.type;switch(delete o.type,i.debug("[native transition]",o),s){case"flip":window.plugins.nativepagetransitions.flip(o,e,r);break;case"fade":window.plugins.nativepagetransitions.fade(o,e,r);break;case"curl":window.plugins.nativepagetransitions.curl(o,e,r);break;case"drawer":window.plugins.nativepagetransitions.drawer(o,e,r);break;case"slide":default:window.plugins.nativepagetransitions.slide(o,e,r)}}}function x(){window.plugins.nativepagetransitions.executePendingTransition(),k()}function y(){j(),k(),u=a.$on("$stateChangeError",x),l=a.$on(S().triggerTransitionEvent,x)}function k(){o||(o=a.$on("$stateChangeStart",function(n,t,e,a,r){var o=null;n.defaultPrevented||null!==t.nativeTransitions&&(o=P(t),i.debug("[native transition] $stateChangeStart",t,o),T(o))}))}function O(n){return angular.isObject(n.nativeTransitionsBackIOS)&&ionic.Platform.isIOS()?angular.extend({},n.nativeTransitionsBackIOS):angular.isObject(n.nativeTransitionsBackAndroid)&&ionic.Platform.isAndroid()?angular.extend({},n.nativeTransitionsBackAndroid):angular.isObject(n.nativeTransitionsBackWindowsPhone)&&ionic.Platform.isWindowsPhone()?angular.extend({},n.nativeTransitionsBackWindowsPhone):angular.isObject(n.nativeTransitionsBack)?angular.extend({},n.nativeTransitionsBack):null}function P(n){return angular.isObject(n.nativeTransitionsIOS)&&ionic.Platform.isIOS()?angular.extend({},n.nativeTransitionsIOS):angular.isObject(n.nativeTransitionsAndroid)&&ionic.Platform.isAndroid()?angular.extend({},n.nativeTransitionsAndroid):angular.isObject(n.nativeTransitionsWindowsPhone)&&ionic.Platform.isWindowsPhone()?angular.extend({},n.nativeTransitionsWindowsPhone):angular.isObject(n.nativeTransitions)?angular.extend({},n.nativeTransitions):null}function I(){o&&angular.isFunction(o)&&(o(),o=null)}function j(){o&&angular.isFunction(o)&&(o(),o=null),s&&angular.isFunction(s)&&(s(),s=null),u&&angular.isFunction(u)&&(u(),u=null),l&&angular.isFunction(l)&&(l(),l=null)}function S(){return v}function B(){return N=a.$ionicGoBack,t()?void $():void i.debug("nativepagetransitions is disabled or nativepagetransitions plugin is not present")}function E(n){if(!m.backView())return void(navigator.app&&navigator.app.exitApp());if(!(n>=0)){var t=m.backView().stateName;if(n&&!isNaN(parseInt(n))){var e=m.viewHistory(),a=e.histories[m.currentView().historyId],r=a.cursor+n;(0>r||r>a.stack.length)&&(r=0),t=a.stack[r].stateName}I();var o=angular.extend({},f.current),s=angular.extend({},f.get(t));i.debug("nativepagetransitions goBack",n,t,o,s),m.goBack(n),T("back",o,s)}}var N=void 0,A=void 0;return{init:B,getDefaultOptions:S,enable:$,isEnabled:t,transition:T,registerToRouteEvents:y,unregisterToRouteEvents:j,registerToStateChangeStartEvent:k,unregisterToStateChangeStartEvent:I,locationUrl:b,stateGo:h,goBack:E}}var o=null,s=null,u=null,l=null,d={up:"down",down:"up",left:"right",right:"left"},g={type:"slide",direction:"left"},c={type:"slide",direction:"right"},v={duration:400,slowdownfactor:4,iosdelay:-1,androiddelay:-1,winphonedelay:-1,fixedPixelsTop:0,fixedPixelsBottom:0,triggerTransitionEvent:"$ionicView.afterEnter",backInOppositeDirection:!1};return r.$inject=["$log","$ionicConfig","$rootScope","$timeout","$state","$location","$ionicHistory","$ionicPlatform"],{$get:r,enable:n,setDefaultTransition:e,setDefaultBackTransition:a,setDefaultOptions:i}},n.exports=t["default"]},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=["$ionicNativeTransitions","$ionicPlatform","$ionicHistory","$rootScope",function(n,t,i,e){"ngInject";t.ready(function(){n.init()})}],n.exports=t["default"]}])}); \ No newline at end of file
diff --git a/www/lib/ionic-native-transitions/lib/index.js b/www/lib/ionic-native-transitions/lib/index.js
new file mode 100644
index 00000000..092f774a
--- /dev/null
+++ b/www/lib/ionic-native-transitions/lib/index.js
@@ -0,0 +1,14 @@
+import Provider from './provider.js';
+import nativeSref from './nativeSref.js';
+import Run from './run.js';
+
+let mod = angular.module('ionic-native-transitions', [
+ 'ionic',
+ 'ui.router'
+]);
+
+mod.directive('nativeUiSref', nativeSref);
+mod.provider('$ionicNativeTransitions', Provider);
+mod.run(Run);
+
+export default mod = mod.name;
diff --git a/www/lib/ionic-native-transitions/lib/nativeSref.js b/www/lib/ionic-native-transitions/lib/nativeSref.js
new file mode 100644
index 00000000..4b090713
--- /dev/null
+++ b/www/lib/ionic-native-transitions/lib/nativeSref.js
@@ -0,0 +1,44 @@
+export default function($log, $ionicNativeTransitions, $state) {
+ 'ngInject';
+
+ return {
+ controller: controller,
+ restrict: 'A',
+ scope: false
+ };
+
+ function controller($scope, $element, $attrs, $state) {
+ 'ngInject';
+
+ let stateOptions = $scope.$eval($attrs.nativeUiSrefOpts) || {};
+ let nativeOptions = null;
+
+ $attrs.$observe('nativeOptions', (newOptions) => {
+ let evalOptions = $scope.$eval(newOptions);
+ nativeOptions = angular.isObject(evalOptions) ? evalOptions : {};
+ });
+
+ $element.on('click', (event) => {
+ let ref = parseStateRef($attrs.nativeUiSref, $state.current.name);
+ let params = angular.copy($scope.$eval(ref.paramExpr));
+ if (!$ionicNativeTransitions.isEnabled()) {
+ $state.go(ref.state, params, stateOptions);
+ return;
+ }
+
+ $ionicNativeTransitions.stateGo(ref.state, params, nativeOptions, stateOptions);
+ });
+ }
+}
+
+function parseStateRef(ref, current) {
+ var preparsed = ref.match(/^\s*({[^}]*})\s*$/),
+ parsed;
+ if (preparsed) ref = current + '(' + preparsed[1] + ')';
+ parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/);
+ if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'");
+ return {
+ state: parsed[1],
+ paramExpr: parsed[3] || null
+ };
+}
diff --git a/www/lib/ionic-native-transitions/lib/provider.js b/www/lib/ionic-native-transitions/lib/provider.js
new file mode 100644
index 00000000..9efa7c5a
--- /dev/null
+++ b/www/lib/ionic-native-transitions/lib/provider.js
@@ -0,0 +1,506 @@
+/**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitions
+ * @description
+ * ionic-native-transitions service
+ */
+/**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider
+ * @description
+ * ionic-native-transitions provider
+ */
+export default function() {
+ 'ngInject';
+
+ let enabled = true,
+ $stateChangeStart = null,
+ $stateChangeSuccess = null,
+ $stateChangeError = null,
+ $stateAfterEnter = null,
+ oppositeDirections = {
+ up: 'down',
+ down: 'up',
+ left: 'right',
+ right: 'left'
+ },
+ defaultTransition = {
+ type: 'slide',
+ direction: 'left'
+ },
+ defaultBackTransition = {
+ type: 'slide',
+ direction: 'right'
+ },
+ defaultOptions = {
+ duration: 400, // in milliseconds (ms), default 400,
+ slowdownfactor: 4, // overlap views (higher number is more) or no overlap (1), default 4
+ iosdelay: -1, // ms to wait for the iOS webview to update before animation kicks in, default -1
+ androiddelay: -1, // same as above but for Android, default -1
+ winphonedelay: -1, // same as above but for Windows Phone, default -1,
+ fixedPixelsTop: 0, // the number of pixels of your fixed header, default 0 (iOS and Android)
+ fixedPixelsBottom: 0, // the number of pixels of your fixed footer (f.i. a tab bar), default 0 (iOS and Android),
+ triggerTransitionEvent: '$ionicView.afterEnter', // internal ionic-native-transitions option
+ backInOppositeDirection: false // Disable default back transition and uses the opposite transition to go back
+ };
+
+ return {
+ $get,
+ enable,
+ setDefaultTransition,
+ setDefaultBackTransition,
+ setDefaultOptions
+ };
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#enable
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default nativepagetransitions plugin options
+ * @param {object} injectedOptions options that will overwrite defaults
+ */
+ function enable(enabled = true) {
+ enable = enabled;
+ return this;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#isEnabled
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Is ionic-native-transitions enabled or not?
+ */
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#isEnabled
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Is ionic-native-transitions enabled or not?
+ */
+ function isEnabled() {
+ if (window.cordova && window.plugins && window.plugins.nativepagetransitions) {
+ return enable;
+ }
+ return false;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultOptions
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default nativepagetransitions plugin options
+ * @param {object} injectedOptions options that will overwrite defaults
+ */
+ function setDefaultOptions(injectedOptions = {}) {
+ angular.extend(defaultOptions, injectedOptions);
+ return this;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultTransition
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default transitions
+ * @param {object} transitionOptions options that will overwrite defaults
+ */
+ function setDefaultTransition(transition = {}) {
+ angular.extend(defaultTransition, transition);
+ return this;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider#setDefaultBackTransition
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitionsProvider
+ *
+ * @description
+ * Overwrite default back transitions
+ * @param {object} transitionOptions options that will overwrite defaults
+ */
+ function setDefaultBackTransition(transition = {}) {
+ angular.extend(defaultBackTransition, transition);
+ return this;
+ }
+
+ function $get($log, $ionicConfig, $rootScope, $timeout, $state, $location, $ionicHistory, $ionicPlatform) {
+ 'ngInject';
+
+ let legacyGoBack, backButtonUnregister;
+
+ return {
+ init,
+ getDefaultOptions,
+ enable: enableFromService,
+ isEnabled,
+ transition,
+ registerToRouteEvents,
+ unregisterToRouteEvents,
+ registerToStateChangeStartEvent,
+ unregisterToStateChangeStartEvent,
+ locationUrl,
+ stateGo,
+ goBack
+ };
+
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#locationUrl
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Call location url and apply a native transition
+ * @param {string|null} url default:null
+ * @param {object|null} transitionOptions default:null
+ */
+ function locationUrl(url = null, transitionOptions = null) {
+ if (!url) {
+ $log.debug('[native transition] cannot change url without url...');
+ return;
+ }
+ unregisterToStateChangeStartEvent();
+ $location.url(url);
+ transition(transitionOptions);
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#stateGo
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Call state go and apply a native transition
+ * @param {string|null} state default:null
+ * @param {object} stateParams default:{}
+ * @param {object|null} transitionOptions default:null
+ * @param {object} stateOptions default:{}
+ */
+ function stateGo(state = null, stateParams = {}, transitionOptions = null, stateOptions = {}) {
+ if (!state) {
+ $log.debug('[native transition] cannot change state without a state...');
+ return;
+ }
+ unregisterToStateChangeStartEvent();
+ $state.go(state, stateParams, stateOptions);
+ transition(transitionOptions);
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#enable
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * enable/disable plugin
+ * @param {boolean} enabled
+ * @param {boolean} disableIonicTransitions
+ * @param {string} ionicTransitionType
+ */
+ function enableFromService(enabled = true, disableIonicTransitions = true, ionicTransitionType = 'platform') {
+ if (enabled && !(window.cordova && window.plugins && window.plugins.nativepagetransitions)) {
+ $log.debug('[native transition] is disabled or nativepagetransitions plugin is not present');
+ return;
+ }
+ enable = enabled;
+
+ if (enabled) {
+ $log.debug('[native transition] enabling plugin');
+ if (window.plugins && window.plugins.nativepagetransitions) {
+ angular.extend(window.plugins.nativepagetransitions.globalOptions, getDefaultOptions());
+ }
+ $rootScope.$ionicGoBack = goBack;
+ backButtonUnregister = $ionicPlatform.registerBackButtonAction((e, count) => goBack(count), 100);
+ registerToRouteEvents();
+ } else {
+ $log.debug('[native transition] disabling plugin');
+ if (typeof arguments[1] === 'undefined') {
+ disableIonicTransitions = false;
+ }
+ $rootScope.$ionicGoBack = legacyGoBack;
+ if (angular.isFunction(backButtonUnregister)) {
+ backButtonUnregister.call();
+ }
+ unregisterToRouteEvents();
+ }
+
+ if (disableIonicTransitions) {
+ $log.debug('[native transition] disabling ionic transitions');
+ $ionicConfig.views.transition('none');
+ } else {
+ $log.debug('[native transition] enabling ionic transitions');
+ $ionicConfig.views.transition(ionicTransitionType);
+ }
+
+ return this;
+ }
+
+ function transition() {
+ if (!isEnabled()) {
+ return;
+ }
+ let options = {}
+ if (angular.isObject(arguments[0])) {
+ options = arguments[0];
+ } else if (angular.isString(arguments[0])) {
+ switch (arguments[0]) {
+ case 'back':
+ if (getDefaultOptions().backInOppositeDirection && arguments[1] && getStateTransition(arguments[1])) {
+ options = getStateTransition(arguments[1]);
+ if (options.direction) {
+ options.direction = oppositeDirections[options.direction];
+ }
+ } else if (arguments[2] && getBackStateTransition(arguments[2])) {
+ options = getBackStateTransition(arguments[2]);
+ } else {
+ options = defaultBackTransition;
+ }
+ break;
+ }
+ } else {
+ options = defaultTransition;
+ }
+ options = angular.copy(options);
+ let type = options.type;
+ delete options.type;
+ $log.debug('[native transition]', options);
+ switch (type) {
+ case 'flip':
+ window.plugins.nativepagetransitions.flip(options, transitionSuccess, transitionError);
+ break;
+ case 'fade':
+ window.plugins.nativepagetransitions.fade(options, transitionSuccess, transitionError);
+ break;
+ case 'curl':
+ window.plugins.nativepagetransitions.curl(options, transitionSuccess, transitionError);
+ break;
+ case 'drawer':
+ window.plugins.nativepagetransitions.drawer(options, transitionSuccess, transitionError);
+ break;
+ case 'slide':
+ default:
+ window.plugins.nativepagetransitions.slide(options, transitionSuccess, transitionError);
+ break;
+ }
+
+ function getTransitionDuration() {
+ let duration;
+ if (options.duration) {
+ duration = parseInt(options.duration);
+ } else {
+ duration = parseInt(getDefaultOptions().duration);
+ }
+ if (ionic.Platform.isAndroid()) {
+ if (options.androiddelay) {
+ duration += parseInt(options.androiddelay);
+ } else {
+ duration += parseInt(getDefaultOptions().androiddelay);
+ }
+ } else if (ionic.Platform.isIOS()) {
+ if (options.iosdelay) {
+ duration += parseInt(options.iosdelay);
+ } else {
+ duration += parseInt(getDefaultOptions().iosdelay);
+ }
+ } else if (ionic.Platform.isWindowsPhone()) {
+ if (options.winphonedelay) {
+ duration += parseInt(options.winphonedelay);
+ } else {
+ duration += parseInt(getDefaultOptions().winphonedelay);
+ }
+ }
+ return duration;
+ }
+
+ function transitionSuccess() {
+ setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.success'), getTransitionDuration());
+ }
+
+ function transitionError() {
+ setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.error'), getTransitionDuration());
+ }
+ }
+
+ function executePendingTransition() {
+ window.plugins.nativepagetransitions.executePendingTransition();
+ // $rootScope.$broadcast('ionicNativeTransitions.', executePendingTransition);
+ registerToStateChangeStartEvent();
+ }
+
+ function registerToRouteEvents() {
+ unregisterToRouteEvents();
+ registerToStateChangeStartEvent();
+ // $stateChangeSuccess = $rootScope.$on('$stateChangeSuccess', executePendingTransition);
+ $stateChangeError = $rootScope.$on('$stateChangeError', executePendingTransition);
+ $stateAfterEnter = $rootScope.$on(getDefaultOptions().triggerTransitionEvent, executePendingTransition);
+ }
+
+ function registerToStateChangeStartEvent() {
+ if ($stateChangeStart) {
+ return;
+ }
+ $stateChangeStart = $rootScope.$on('$stateChangeStart', (event, toState, toParams, fromState, fromParams) => {
+ let options = null;
+ // Abort if event was preventDefault'ed
+ if (event.defaultPrevented) {
+ return;
+ }
+ // Disable native transition for this state
+ if (toState.nativeTransitions === null) {
+ return;
+ }
+ options = getStateTransition(toState);
+ $log.debug('[native transition] $stateChangeStart', toState, options);
+ transition(options);
+ });
+ }
+
+ function getBackStateTransition(state) {
+ if (angular.isObject(state.nativeTransitionsBackIOS) && ionic.Platform.isIOS()) {
+ return angular.extend({}, state.nativeTransitionsBackIOS);
+ } else if (angular.isObject(state.nativeTransitionsBackAndroid) && ionic.Platform.isAndroid()) {
+ return angular.extend({}, state.nativeTransitionsBackAndroid);
+ } else if (angular.isObject(state.nativeTransitionsBackWindowsPhone) && ionic.Platform.isWindowsPhone()) {
+ return angular.extend({}, state.nativeTransitionsBackWindowsPhone);
+ } else if (angular.isObject(state.nativeTransitionsBack)) {
+ return angular.extend({}, state.nativeTransitionsBack);
+ }
+ return null;
+ }
+
+ function getStateTransition(state) {
+ if (angular.isObject(state.nativeTransitionsIOS) && ionic.Platform.isIOS()) {
+ return angular.extend({}, state.nativeTransitionsIOS);
+ } else if (angular.isObject(state.nativeTransitionsAndroid) && ionic.Platform.isAndroid()) {
+ return angular.extend({}, state.nativeTransitionsAndroid);
+ } else if (angular.isObject(state.nativeTransitionsWindowsPhone) && ionic.Platform.isWindowsPhone()) {
+ return angular.extend({}, state.nativeTransitionsWindowsPhone);
+ } else if (angular.isObject(state.nativeTransitions)) {
+ return angular.extend({}, state.nativeTransitions);
+ }
+ return null;
+ }
+
+ function unregisterToStateChangeStartEvent() {
+ if ($stateChangeStart && angular.isFunction($stateChangeStart)) {
+ $stateChangeStart();
+ $stateChangeStart = null;
+ }
+ }
+
+ function unregisterToRouteEvents() {
+ if ($stateChangeStart && angular.isFunction($stateChangeStart)) {
+ $stateChangeStart();
+ $stateChangeStart = null;
+ }
+ if ($stateChangeSuccess && angular.isFunction($stateChangeSuccess)) {
+ $stateChangeSuccess();
+ $stateChangeSuccess = null;
+ }
+ if ($stateChangeError && angular.isFunction($stateChangeError)) {
+ $stateChangeError();
+ $stateChangeError = null;
+ }
+ if ($stateAfterEnter && angular.isFunction($stateAfterEnter)) {
+ $stateAfterEnter();
+ $stateAfterEnter = null;
+ }
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#getDefaultOptions
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Get default options
+ */
+ function getDefaultOptions() {
+ return defaultOptions;
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#init
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ *
+ * @description
+ * Init nativepagetransitions plugin
+ */
+ function init() {
+ legacyGoBack = $rootScope.$ionicGoBack;
+ if (!isEnabled()) {
+ $log.debug('nativepagetransitions is disabled or nativepagetransitions plugin is not present');
+ return;
+ } else {
+ enableFromService();
+ }
+ }
+
+ /**
+ * @ngdoc function
+ * @name ionic-native-transitions.$ionicNativeTransitions#goBack
+ * @access public
+ * @methodOf ionic-native-transitions.$ionicNativeTransitions
+ * @description Navigate back in the current history stack with a back navigation transition
+ * @param {number} backCount - The number of views to go back to. default will be the previous view
+ */
+ function goBack(backCount) {
+
+ if (!$ionicHistory.backView()) {
+ // Close the app when no more history
+ if (navigator.app) {
+ navigator.app.exitApp();
+ }
+ return;
+ }
+ if (backCount >= 0) {
+ return;
+ }
+ let stateName = $ionicHistory.backView().stateName;
+
+ // Use backCount to find next state only if its defined, else pass as it is to $ionicHistory.goBack
+ // which defaults to previous view transition
+ // Get current history stack and find the cursor for the new view
+ // Based on the new cursor, find the new state to transition to
+ if (!!backCount && !isNaN(parseInt(backCount))) {
+ let viewHistory = $ionicHistory.viewHistory();
+ let currentHistory = viewHistory.histories[$ionicHistory.currentView().historyId];
+ let newCursor = currentHistory.cursor + backCount;
+
+ // If new cursor is more than the max possible or less than zero, default it to first view in history
+ if (newCursor < 0 || newCursor > currentHistory.stack.length) {
+ newCursor = 0;
+ }
+
+ stateName = currentHistory.stack[newCursor].stateName;
+ }
+
+ unregisterToStateChangeStartEvent();
+ let currentStateTransition = angular.extend({}, $state.current);
+ let toStateTransition = angular.extend({}, $state.get(stateName));
+ $log.debug('nativepagetransitions goBack', backCount, stateName, currentStateTransition, toStateTransition);
+ $ionicHistory.goBack(backCount);
+ transition('back', currentStateTransition, toStateTransition);
+ }
+ }
+};
diff --git a/www/lib/ionic-native-transitions/lib/run.js b/www/lib/ionic-native-transitions/lib/run.js
new file mode 100644
index 00000000..b64188fb
--- /dev/null
+++ b/www/lib/ionic-native-transitions/lib/run.js
@@ -0,0 +1,19 @@
+/**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitions
+ * @description
+ * ionic-native-transitions service
+ */
+/**
+ * @ngdoc service
+ * @name ionic-native-transitions.$ionicNativeTransitionsProvider
+ * @description
+ * ionic-native-transitions provider
+ */
+export default function($ionicNativeTransitions, $ionicPlatform, $ionicHistory, $rootScope) {
+ 'ngInject';
+
+ $ionicPlatform.ready(() => {
+ $ionicNativeTransitions.init();
+ });
+};
diff --git a/www/lib/ionic-native-transitions/package.json b/www/lib/ionic-native-transitions/package.json
new file mode 100644
index 00000000..6b30a335
--- /dev/null
+++ b/www/lib/ionic-native-transitions/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "ionic-native-transitions",
+ "version": "1.0.0-rc9",
+ "description": "Native transitions for Ionic applications",
+ "main": "dist/ionic-native-transitions.js",
+ "scripts": {
+ "devserver": "webpack-dev-server --port 8080 --json --progress",
+ "build": "npm run dumpdev && npm run dumpprod",
+ "watch": "webpack --watch --progress --colors --config webpack.config.dist.js -d",
+ "dumpdev": "webpack --progress --colors --config webpack.config.dist.js -d",
+ "dumpprod": "webpack --progress --colors --config webpack.config.dist.min.js -p",
+ "dumpTestDev": "webpack --progress --colors -d",
+ "dumpTestProd": "webpack --progress --colors -p",
+ "android": "npm run dumpdev && npm run dumpTestDev && cordova run android",
+ "iosEmulator": "npm run dumpdev && npm run dumpTestDev && cordova run ios",
+ "ios": "npm run dumpdev && npm run dumpTestDev && cordova run ios --device",
+ "runAllDevice": "npm run dumpdev && npm run dumpTestDev && cordova run android && cordova run ios --device",
+ "installCordova": "npm run platformAddAll && npm run pluginAddAll",
+ "platformAddAndroid": "cordova platform add android",
+ "platformAddIOS": "cordova platform add ios",
+ "platformAddAll": "npm run platformAddAndroid && npm run platformAddIOS",
+ "pluginAddAll": "cordova plugin add cordova-plugin-crosswalk-webview@1.3.1 https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.5.5"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/shprink/ionic-native-transitions"
+ },
+ "keywords": [
+ "ionic",
+ "cordova",
+ "telerik",
+ "angular",
+ "angularjs",
+ "native",
+ "transition",
+ "transitions"
+ ],
+ "author": "shprink <contact@julienrenaux.fr>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/shprink/ionic-native-transitions/issues"
+ },
+ "homepage": "https://github.com/shprink/ionic-native-transitions",
+ "pearDependencies": {
+ "restangular": "^1.4.0"
+ },
+ "devDependencies": {
+ "babel-core": "^5.6.15",
+ "babel-loader": "^5.2.2",
+ "cordova": "~5.3.0",
+ "css-loader": "^0.19.0",
+ "exports-loader": "^0.6.2",
+ "expose-loader": "^0.6.0",
+ "file-loader": "^0.8.4",
+ "html-webpack-plugin": "^1.6.1",
+ "json-loader": "^0.5.2",
+ "ng-annotate-loader": "~0.0.6",
+ "path": "^0.4.9",
+ "style-loader": "^0.12.4",
+ "util": "^0.10.3",
+ "webpack": "~1.10.0",
+ "webpack-dev-server": "~1.10.0",
+ "ionic-sdk": "^1.1.0",
+ "angular-ui-router": "^0.2.15"
+ }
+}
diff --git a/www/lib/ionic-native-transitions/test/angular-ios9-uiwebview.patch.js b/www/lib/ionic-native-transitions/test/angular-ios9-uiwebview.patch.js
new file mode 100644
index 00000000..58d8be10
--- /dev/null
+++ b/www/lib/ionic-native-transitions/test/angular-ios9-uiwebview.patch.js
@@ -0,0 +1,75 @@
+/**
+ * ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
+ *
+ * This patch works around iOS9 UIWebView regression that causes infinite digest
+ * errors in Angular.
+ *
+ * The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
+ * have the workaround baked in.
+ *
+ * To apply this patch load/bundle this file with your application and add a
+ * dependency on the "ngIOS9UIWebViewPatch" module to your main app module.
+ *
+ * For example:
+ *
+ * ```
+ * angular.module('myApp', ['ngRoute'])`
+ * ```
+ *
+ * becomes
+ *
+ * ```
+ * angular.module('myApp', ['ngRoute', 'ngIOS9UIWebViewPatch'])
+ * ```
+ *
+ *
+ * More info:
+ * - https://openradar.appspot.com/22186109
+ * - https://github.com/angular/angular.js/issues/12241
+ * - https://github.com/driftyco/ionic/issues/4082
+ *
+ *
+ * @license AngularJS
+ * (c) 2010-2015 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+
+angular.module('ngIOS9UIWebViewPatch', ['ng']).config(['$provide', function($provide) {
+ 'use strict';
+
+ $provide.decorator('$browser', ['$delegate', '$window', function($delegate, $window) {
+
+ if (isIOS9UIWebView($window.navigator.userAgent)) {
+ return applyIOS9Shim($delegate);
+ }
+
+ return $delegate;
+
+ function isIOS9UIWebView(userAgent) {
+ return /(iPhone|iPad|iPod).* OS 9_\d/.test(userAgent) && !/Version\/9\./.test(userAgent);
+ }
+
+ function applyIOS9Shim(browser) {
+ var pendingLocationUrl = null;
+ var originalUrlFn= browser.url;
+
+ browser.url = function() {
+ if (arguments.length) {
+ pendingLocationUrl = arguments[0];
+ return originalUrlFn.apply(browser, arguments);
+ }
+
+ return pendingLocationUrl || originalUrlFn.apply(browser, arguments);
+ };
+
+ window.addEventListener('popstate', clearPendingLocationUrl, false);
+ window.addEventListener('hashchange', clearPendingLocationUrl, false);
+
+ function clearPendingLocationUrl() {
+ pendingLocationUrl = null;
+ }
+
+ return browser;
+ }
+ }]);
+}]);
diff --git a/www/lib/ionic-native-transitions/test/config.js b/www/lib/ionic-native-transitions/test/config.js
new file mode 100644
index 00000000..2aa38109
--- /dev/null
+++ b/www/lib/ionic-native-transitions/test/config.js
@@ -0,0 +1,119 @@
+export default function($ionicNativeTransitionsProvider, $stateProvider, $urlRouterProvider, $ionicConfigProvider) {
+ 'ngInject';
+ $ionicNativeTransitionsProvider.setDefaultOptions({
+ duration: 500,
+ // backInOppositeDirection: true
+ });
+
+ $ionicNativeTransitionsProvider.setDefaultTransition({
+ type: 'flip',
+ direction: 'left'
+ });
+
+ $ionicNativeTransitionsProvider.setDefaultBackTransition({
+ type: 'slide',
+ direction: 'right'
+ });
+
+ $ionicNativeTransitionsProvider.enable(false);
+
+ $ionicConfigProvider.tabs.position('top');
+
+ $stateProvider
+ .state('tabs', {
+ url: "/tab",
+ abstract: true,
+ templateUrl: "templates/tabs.html"
+ })
+ .state('tabs.home', {
+ url: "/home",
+ nativeTransitions: null,
+ views: {
+ 'home-tab': {
+ templateUrl: "templates/home.html"
+ }
+ }
+ })
+ .state('one', {
+ url: "/one",
+ nativeTransitions: {
+ "type": "flip",
+ "direction": "up"
+ },
+ nativeTransitionsAndroid: {
+ "type": "flip",
+ "direction": "right"
+ },
+ nativeTransitionsBackAndroid: {
+ "type": "flip",
+ "direction": "left"
+ },
+ nativeTransitionsIOS: {
+ "type": "flip",
+ "direction": "left"
+ },
+ nativeTransitionsWindowsPhone: {
+ "type": "flip",
+ "direction": "down"
+ },
+ templateUrl: "templates/one.html"
+ })
+ .state('two', {
+ url: "/two",
+ nativeTransitions: {
+ type: "fade"
+ },
+ nativeTransitionsIOS: {
+ "type": "flip",
+ "direction": "down" // 'left|right|up|down', default 'right' (Android currently only supports left and right)
+ },
+ templateUrl: "templates/two.html"
+ })
+ .state('three', {
+ url: "/three",
+ nativeTransitions: {
+ type: "fade"
+ },
+ nativeTransitionsAndroid: {
+ "type": "slide",
+ "direction": "up" // 'left|right|up|down', default 'right' (Android currently only supports left and right)
+ },
+ nativeTransitionsBackAndroid: {
+ "type": "slide",
+ "direction": "down" // 'left|right|up|down', default 'right' (Android currently only supports left and right)
+ },
+ templateUrl: "templates/three.html"
+ })
+ .state('four', {
+ url: "/four?testParamUrl",
+ params: {
+ test: null
+ },
+ templateUrl: "templates/four.html",
+ controller: function($stateParams){
+ 'ngInject';
+ console.log('$stateParams', $stateParams);
+ }
+ })
+ .state('tabs.about', {
+ url: "/about",
+ nativeTransitions: null,
+ views: {
+ 'about-tab': {
+ templateUrl: "templates/about.html"
+ }
+ }
+ })
+ .state('tabs.contact', {
+ url: "/contact",
+ nativeTransitions: null,
+ views: {
+ 'contact-tab': {
+ templateUrl: "templates/contact.html"
+ }
+ }
+ });
+
+
+ $urlRouterProvider.otherwise("/tab/home");
+}
diff --git a/www/lib/ionic-native-transitions/test/controller.js b/www/lib/ionic-native-transitions/test/controller.js
new file mode 100644
index 00000000..a994d5ff
--- /dev/null
+++ b/www/lib/ionic-native-transitions/test/controller.js
@@ -0,0 +1,96 @@
+export default function(
+ $scope,
+ $rootScope,
+ $log,
+ $ionicNativeTransitions,
+ $ionicModal,
+ $ionicPlatform,
+ $ionicHistory
+) {
+
+ 'ngInject';
+
+ var vm = this;
+ vm.modal = null;
+ vm.isEnable = $ionicNativeTransitions.isEnabled();
+ vm.enable = enable;
+ vm.disable = disable;
+ vm.stateGo = stateGo;
+ vm.locationUrl = locationUrl;
+ vm.disableWithoutDisablingIonicTransitions = disableWithoutDisablingIonicTransitions;
+ vm.openModal = openModal;
+ vm.goBack = goBack;
+
+ $rootScope.$on('ionicNativeTransitions.success', function() {
+ $log.info('yeah!');
+ });
+
+ $rootScope.$on('ionicNativeTransitions.error', function() {
+ $log.info(':(');
+ });
+
+ function openModal() {
+ if (vm.modal) {
+ vm.modal.show();
+ return;
+ }
+ vm.modal = $ionicModal.fromTemplate(`
+ <ion-modal-view>
+ <ion-header-bar>
+ <h1 class="title">Modal</h1>
+ <button class="button button-clear button-assertive" ng-click="close()">
+ <i class="icon ion-close"></i>
+ </button>
+ </ion-header-bar>
+ <ion-content class="has-footer has-footer padding">
+ modal
+ </ion-content>
+ </ion-modal-view>
+ `, {
+ scope: $rootScope.$new(),
+ });
+ vm.modal.show();
+ vm.modal.scope.close = () => {
+ console.log('modal close', JSON.stringify($ionicPlatform.$backButtonActions))
+ vm.modal.remove();
+ vm.modal = null;
+ };
+ }
+
+ function enable() {
+ $ionicNativeTransitions.enable();
+ vm.isEnable = $ionicNativeTransitions.isEnabled();
+ }
+
+ function disable() {
+ $ionicNativeTransitions.enable(false);
+ vm.isEnable = $ionicNativeTransitions.isEnabled();
+ }
+
+ function disableWithoutDisablingIonicTransitions() {
+ $ionicNativeTransitions.enable(false, true);
+ vm.isEnable = $ionicNativeTransitions.isEnabled();
+ }
+
+ function stateGo() {
+ $ionicNativeTransitions.stateGo('four', {
+ test: 'buyakacha!',
+ testParamUrl: 'hihi'
+ }, {
+ "type": "slide",
+ "direction": "up", // 'left|right|up|down', default 'left' (which is like 'next')
+ "duration": 1500, // in milliseconds (ms), default 400
+ }, {
+ reload: true
+ });
+ }
+
+ function locationUrl() {
+ $ionicNativeTransitions.locationUrl('/three');
+ }
+
+ function goBack(count) {
+ console.log('count', count, $ionicHistory.viewHistory())
+ $rootScope.$ionicGoBack(count);
+ }
+}
diff --git a/www/lib/ionic-native-transitions/test/index.html b/www/lib/ionic-native-transitions/test/index.html
new file mode 100644
index 00000000..64c84fc5
--- /dev/null
+++ b/www/lib/ionic-native-transitions/test/index.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html>
+<html>
+
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
+ <title>{%=o.htmlWebpackPlugin.options.pkg.title %}</title>
+ <!-- cordova script (this will be a 404 during development) -->
+ <script src="cordova.js"></script>
+ </head>
+
+ <body ng-app="test" ng-strict-di ng-controller="MainController as main">
+ <ion-side-menus enable-menu-with-back-views="true">
+ <ion-side-menu-content>
+ <ion-nav-bar class="bar-positive">
+ <ion-nav-back-button class="button-icon ion-arrow-left-c">
+ </ion-nav-back-button>
+ <ion-nav-buttons side="left">
+ <button menu-toggle="left" class="button button-clear">
+ <i class="icon ion-navicon-round"></i>
+ </button>
+ </ion-nav-buttons>
+ <ion-nav-buttons side="right">
+ <button class="button button-clear" ng-click="main.openModal()">
+ <i class="icon ion-open"></i> Modal
+ </button>
+ </ion-nav-buttons>
+ </ion-nav-bar>
+ <ion-nav-view></ion-nav-view>
+ </ion-side-menu-content>
+ <ion-side-menu side="left" ui-view="menu"></ion-side-menu>
+ </ion-side-menus>
+
+ <script id="templates/tabs.html" type="text/ng-template">
+ <ion-tabs class="tabs-icon-top tabs-positive">
+
+ <ion-tab title="Home" icon="ion-home" ui-sref="tabs.home" ui-sref-opts="{inherit:false}">
+ <ion-nav-view name="home-tab"></ion-nav-view>
+ </ion-tab>
+
+ <ion-tab title="About" icon="ion-ios-football" ui-sref="tabs.about">
+ <ion-nav-view name="about-tab"></ion-nav-view>
+ </ion-tab>
+
+ <ion-tab title="Contact" icon="ion-bag" ui-sref="tabs.contact">
+ <ion-nav-view name="contact-tab"></ion-nav-view>
+ </ion-tab>
+
+ </ion-tab>
+
+ </ion-tabs>
+ </script>
+
+ <script id="templates/home.html" type="text/ng-template">
+ <ion-view view-title="Home">
+ <ion-content class="">
+ <p>
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ui-sref="one">Start</a>
+ </p>
+ Is enabled: {{main.isEnable}}
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ng-click="main.enable()">Enable plugin</a>
+
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ng-click="main.disable()">Disable plugin</a>
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ng-click="main.disableWithoutDisablingIonicTransitions()">Disable plugin and ionic transitions</a>
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ng-click="main.stateGo()">StateGo</a>
+ <button class="button button-full button-large icon icon-right ion-chevron-right" native-ui-sref="four({test: 'buyakacha2!', testParamUrl: 'haha'})" native-ui-sref-opts="{inherit:false}" native-options="{type: 'slide', direction:'down'}">
+ StateGo via directive
+ </button>
+ <button class="button button-full button-large icon icon-right ion-chevron-right" native-ui-sref="four" native-ui-sref-opts="{inherit:false}">
+ StateGo via directive without native-options
+ </button>
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ng-click="main.locationUrl()">LocationUrl</a>
+ </ion-content>
+ </ion-view>
+ </script>
+
+ <script id="templates/one.html" type="text/ng-template">
+ <ion-view view-title="One">
+ <ion-nav-buttons side="left">
+ <button class="button button-clear" native-ui-sref="tabs.home" native-ui-sref-opts="{reload: true}" native-options="{type: 'slide', direction:'down'}">
+ <i class="icon ion-arrow-left-c"></i> Custom back
+ </button>
+ </ion-nav-buttons>
+ <ion-content class="">
+ <p>
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ui-sref="two">Two</a>
+ </p>
+ </ion-content>
+ </ion-view>
+ </script>
+
+ <script id="templates/two.html" type="text/ng-template">
+ <ion-view view-title="Two">
+ <ion-content class="">
+ <p>
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ui-sref="three">Three</a>
+ </p>
+ </ion-content>
+ </ion-view>
+ </script>
+
+ <script id="templates/three.html" type="text/ng-template">
+ <ion-view view-title="Three">
+ <ion-content class="">
+ <p>
+ <a class="button button-full button-large icon icon-right ion-chevron-right" ui-sref="four">Four</a>
+ <a class="button" ng-click="main.goBack()">Go back</a>
+ <a class="button" ng-click="main.goBack(-1)">Go back 1 states</a>
+ <a class="button" ng-click="main.goBack(-2)">Go back 2 states</a>
+ <a class="button" ng-click="main.goBack(-3)">Go back 3 states</a>
+ <a class="button" ng-click="main.goBack(-10)">Go back 10 states</a>
+ </p>
+ </ion-content>
+ </ion-view>
+ </script>
+
+ <script id="templates/four.html" type="text/ng-template">
+ <ion-view view-title="Four">
+ <ion-content class="">
+ </ion-content>
+ </ion-view>
+ </script>
+
+ <script id="templates/about.html" type="text/ng-template">
+ <ion-view view-title="About">
+ <ion-content class="padding">
+ <h3>Create hybrid mobile apps with the web technologies you love.</h3>
+ <p>Free and open source, Ionic offers a library of mobile-optimized HTML, CSS and JS components for building highly interactive apps.</p>
+ <p>Built with Sass and optimized for AngularJS.</p>
+ </ion-content>
+ </ion-view>
+ </script>
+
+ <script id="templates/contact.html" type="text/ng-template">
+ <ion-view title="Contact">
+ <ion-content>
+ <div class="list">
+ <a class="item" href="https://twitter.com/julienrenaux">
+ @julienrenaux
+ </a>
+ <div class="item">
+ @IonicFramework
+ </div>
+ <div class="item">
+ @DriftyTeam
+ </div>
+ </div>
+ </ion-content>
+ </ion-view>
+ </script>
+
+ {% for (var chunk in o.htmlWebpackPlugin.files.chunks) { %}
+ <script src="{%=o.htmlWebpackPlugin.files.chunks[chunk].entry %}"></script>
+ {% } %}
+ </body>
+
+</html>
diff --git a/www/lib/ionic-native-transitions/test/index.js b/www/lib/ionic-native-transitions/test/index.js
new file mode 100644
index 00000000..e7176887
--- /dev/null
+++ b/www/lib/ionic-native-transitions/test/index.js
@@ -0,0 +1,21 @@
+import 'ionic-sdk/release/js/ionic.bundle';
+import 'ionic-sdk/release/css/ionic.css';
+import '../dist/ionic-native-transitions.js';
+import './angular-ios9-uiwebview.patch.js';
+import Config from './config.js';
+import Controller from './controller.js';
+
+let mod = angular.module('test', [
+ 'ionic',
+ 'ui.router',
+ 'ionic-native-transitions',
+ 'ngIOS9UIWebViewPatch'
+]);
+
+mod.config(Config);
+mod.controller('MainController', Controller);
+mod.run(($log) => {
+ $log.info('test running');
+});
+
+export default mod = mod.name;
diff --git a/www/lib/ionic-native-transitions/webpack.config.dist.js b/www/lib/ionic-native-transitions/webpack.config.dist.js
new file mode 100644
index 00000000..f8352d60
--- /dev/null
+++ b/www/lib/ionic-native-transitions/webpack.config.dist.js
@@ -0,0 +1,36 @@
+var path = require('path'),
+ libPath = path.join(__dirname, 'lib'),
+ distPath = path.join(__dirname, 'dist'),
+ webpack = require("webpack"),
+ pkg = require('./package.json'),
+ fs = require('fs'),
+ copyright = fs.readFileSync('./copyright.txt', 'utf8'),
+ HtmlWebpackPlugin = require('html-webpack-plugin');
+
+copyright = copyright.replace('{pkg.name}', pkg.name)
+ .replace('{pkg.description}', pkg.description)
+ .replace('{pkg.version}', pkg.version)
+ .replace('{pkg.author}', pkg.author)
+ .replace('{pkg.homepage}', pkg.homepage)
+ .replace('{pkg.license}', pkg.license);
+
+module.exports = {
+ entry: path.join(libPath, 'index.js'),
+ output: {
+ path: distPath,
+ library: 'ionicNativeTransitions',
+ libraryTarget: "umd",
+ umdNamedDefine: true,
+ filename: 'ionic-native-transitions.js'
+ },
+ module: {
+ loaders: [{
+ test: /\.js$/,
+ exclude: /(node_modules|bower_components)/,
+ loader: "ng-annotate?add=true!babel"
+ }]
+ },
+ plugins: [
+ new webpack.BannerPlugin(copyright)
+ ]
+};
diff --git a/www/lib/ionic-native-transitions/webpack.config.dist.min.js b/www/lib/ionic-native-transitions/webpack.config.dist.min.js
new file mode 100644
index 00000000..6fb2dcb9
--- /dev/null
+++ b/www/lib/ionic-native-transitions/webpack.config.dist.min.js
@@ -0,0 +1,39 @@
+var path = require('path'),
+ libPath = path.join(__dirname, 'lib'),
+ distPath = path.join(__dirname, 'dist'),
+ webpack = require("webpack"),
+ pkg = require('./package.json'),
+ fs = require('fs'),
+ copyright = fs.readFileSync('./copyright.txt', 'utf8'),
+ HtmlWebpackPlugin = require('html-webpack-plugin');
+
+copyright = copyright.replace('{pkg.name}', pkg.name)
+ .replace('{pkg.description}', pkg.description)
+ .replace('{pkg.version}', pkg.version)
+ .replace('{pkg.author}', pkg.author)
+ .replace('{pkg.homepage}', pkg.homepage)
+ .replace('{pkg.license}', pkg.license);
+
+module.exports = {
+ entry: path.join(libPath, 'index.js'),
+ output: {
+ path: distPath,
+ library: 'ionicNativeTransitions',
+ libraryTarget: "umd",
+ umdNamedDefine: true,
+ filename: 'ionic-native-transitions.min.js'
+ },
+ module: {
+ loaders: [{
+ test: /\.js$/,
+ exclude: /(node_modules|bower_components)/,
+ loader: "ng-annotate?add=true!babel"
+ }]
+ },
+ plugins: [
+ new webpack.optimize.OccurenceOrderPlugin(),
+ new webpack.optimize.DedupePlugin(),
+ new webpack.optimize.UglifyJsPlugin(),
+ new webpack.BannerPlugin(copyright)
+ ]
+};
diff --git a/www/lib/ionic-native-transitions/webpack.config.js b/www/lib/ionic-native-transitions/webpack.config.js
new file mode 100644
index 00000000..1fe3116e
--- /dev/null
+++ b/www/lib/ionic-native-transitions/webpack.config.js
@@ -0,0 +1,38 @@
+var path = require('path'),
+ testPath = path.join(__dirname, 'test'),
+ wwwPath = path.join(__dirname, 'www'),
+ docsPath = path.join(__dirname, 'docs'),
+ pkg = require('./package.json'),
+ HtmlWebpackPlugin = require('html-webpack-plugin');
+
+module.exports = {
+ entry: path.join(testPath, 'index.js'),
+ output: {
+ path: wwwPath,
+ filename: 'test.js'
+ },
+ module: {
+ loaders: [{
+ test: /[\/]angular\.js$/,
+ loader: 'expose?angular!exports?window.angular'
+ }, {
+ test: /\.json$/,
+ loader: "json"
+ }, {
+ test: /\.css$/,
+ loader: "style!css"
+ }, {
+ test: [/ionicons\.svg/, /ionicons\.eot/, /ionicons\.ttf/, /ionicons\.woff/],
+ loader: 'file?name=fonts/[name].[ext]'
+ }, {
+ test: /\.js$/,
+ exclude: /(node_modules|bower_components)/,
+ loader: "ng-annotate?add=true!babel"
+ }]
+ },
+ plugins: [new HtmlWebpackPlugin({
+ filename: 'index.html',
+ pkg: pkg,
+ template: path.join(testPath, 'index.html')
+ })]
+};
diff --git a/www/lib/ionic-native-transitions/www/.gitignore b/www/lib/ionic-native-transitions/www/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/www/lib/ionic-native-transitions/www/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/www/templates/events.html b/www/templates/events.html
index a0170112..483308f2 100644
--- a/www/templates/events.html
+++ b/www/templates/events.html
@@ -31,7 +31,7 @@
</div>
- <ion-content ng-cloak on-tap="tapped();" delegate-handle="mainScroll" has-subheader="true">
+ <ion-content ng-cloak on-tap="tapped();" delegate-handle="mainScroll" has-subheader="true" overflow-scroll="false">
<!-- lets make sure the events list is not empty as collection repeat needs height -->
diff --git a/www/templates/help.html b/www/templates/help.html
index 2647dcab..63032042 100644
--- a/www/templates/help.html
+++ b/www/templates/help.html
@@ -8,7 +8,7 @@
</ion-nav-buttons>
- <ion-content class="padding">
+ <ion-content class="padding" overflow-scroll="false">
<p><small>zmNinja v{{zmAppVersion}}</small></p>
<div class="list">
diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html
index d4dc8588..47a29e3b 100644
--- a/www/templates/monitors-modal.html
+++ b/www/templates/monitors-modal.html
@@ -2,10 +2,10 @@
<!--style="background-color:#444444;width: 90%; height: 90%; top: 5%; left: 5%; right: 5%; bottom: 5%;"-->
- <ion-modal-view cache-view="false" style="background-color:#444444">
- <ion-content>
+ <ion-modal-view cache-view="false" style="background-color:#444444" >
+ <ion-content >
<!-- <div style="background-color:red; color:white"> Modal Rand:{{$root.modalRand}} </div>-->
- <ion-scroll delegate-handle="imgscroll" has-bouncing=false min-zoom=1 zooming="true" direction="xy" style="width: 100%; ">
+ <ion-scroll delegate-handle="imgscroll" has-bouncing=false min-zoom=1 zooming="true" direction="xy" style="width: 100%;" >
<!-- android needs this 100vh - otherwise max- does not work -->
<!-- -->
<div id="monitorimage" style="height: 100vh;" class="main">
diff --git a/www/templates/monitors.html b/www/templates/monitors.html
index e692a643..6c404812 100644
--- a/www/templates/monitors.html
+++ b/www/templates/monitors.html
@@ -7,7 +7,7 @@
</ion-nav-buttons>
- <ion-content>
+ <ion-content overflow-scroll="false">
<ion-refresher pulling-text="Pull to reload Monitors..." spinner="bubbles" on-refresh="doRefresh()">
</ion-refresher>
<div class="list card" ng-repeat="monitor in monitors">
diff --git a/www/templates/montage-history.html b/www/templates/montage-history.html
index 986cec94..a313f26c 100644
--- a/www/templates/montage-history.html
+++ b/www/templates/montage-history.html
@@ -1,4 +1,4 @@
-<ion-view title="Event Montage" cache-view="false" hide-nav-bar="{{minimal}}">
+<ion-view view-title="Event Montage" cache-view="false" hide-nav-bar="{{minimal}}">
<ion-nav-buttons side="left">
<button class="button button-icon button-clear ion-navicon" ng-click="openMenu()"></button>
diff --git a/www/templates/montage.html b/www/templates/montage.html
index 6db6e6be..ea739586 100644
--- a/www/templates/montage.html
+++ b/www/templates/montage.html
@@ -1,4 +1,4 @@
-<ion-view title="Montage" cache-view="false" hide-nav-bar="{{minimal}}">
+<ion-view view-title="Montage" cache-view="false" hide-nav-bar="{{minimal}}">
<ion-nav-buttons side="left">
<button class="button button-icon button-clear ion-navicon" ng-click="openMenu()"></button>
<button class="button button-icon button-clear ion-eye" ng-click="hideUnhide();">&nbsp;