From 3e2cf24e33c65adcd1d0e811300f4b3a0e445bed Mon Sep 17 00:00:00 2001 From: Ken Mickles Date: Thu, 5 Jan 2017 16:39:44 -0500 Subject: [PATCH] Bump version to 1.0.3 --- CHANGELOG.md | 5 ++++ bower.json | 2 +- dist/ionic-native-transitions.js | 44 ++++++++++++++-------------- dist/ionic-native-transitions.js.map | 2 +- dist/ionic-native-transitions.min.js | 14 ++++----- package.json | 2 +- 6 files changed, 37 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27c6add..5d46f98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ + +### 1.0.3 + +* [BUG] Fixing overlapping/flickering of current view when navigating + ### 1.0.2 diff --git a/bower.json b/bower.json index 790db17..2039a62 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ionic-native-transitions", - "version": "1.0.2", + "version": "1.0.3", "description": "Native transitions for Ionic applications", "main": [ "dist/ionic-native-transitions.js" diff --git a/dist/ionic-native-transitions.js b/dist/ionic-native-transitions.js index 248ea3a..91f6af4 100644 --- a/dist/ionic-native-transitions.js +++ b/dist/ionic-native-transitions.js @@ -1,11 +1,11 @@ /*! - * ionic-native-transitions - * --- - * Native transitions for Ionic applications - * @version: v1.0.2 - * @author: shprink - * @link: https://github.com/shprink/ionic-native-transitions - * @license: MIT + * ionic-native-transitions + * --- + * Native transitions for Ionic applications + * @version: v1.0.3 + * @author: shprink + * @link: https://github.com/shprink/ionic-native-transitions + * @license: MIT * */ (function webpackUniversalModuleDefinition(root, factory) { @@ -761,33 +761,33 @@ return /******/ (function(modules) { // webpackBootstrap \********************/ /***/ function(module, exports) { - /** - * @ngdoc service - * @name ionic-native-transitions.$ionicNativeTransitions - * @description - * ionic-native-transitions service + /** + * @ngdoc service + * @name ionic-native-transitions.$ionicNativeTransitions + * @description + * ionic-native-transitions service */ 'use strict'; Object.defineProperty(exports, '__esModule', { - value: true + value: true }); exports['default'] = ["$ionicNativeTransitions", "$ionicPlatform", "$ionicHistory", "$rootScope", function ($ionicNativeTransitions, $ionicPlatform, $ionicHistory, $rootScope) { - 'ngInject'; + 'ngInject'; - $ionicPlatform.ready(function () { - $ionicNativeTransitions.init(); - }); + $ionicPlatform.ready(function () { + $ionicNativeTransitions.init(); + }); }]; ; module.exports = exports['default']; - /** - * @ngdoc service - * @name ionic-native-transitions.$ionicNativeTransitionsProvider - * @description - * ionic-native-transitions provider + /** + * @ngdoc service + * @name ionic-native-transitions.$ionicNativeTransitionsProvider + * @description + * ionic-native-transitions provider */ /***/ } diff --git a/dist/ionic-native-transitions.js.map b/dist/ionic-native-transitions.js.map index fa0f5e4..6db67a1 100644 --- a/dist/ionic-native-transitions.js.map +++ b/dist/ionic-native-transitions.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 68f2ffe6b7f092b637c0","webpack:///./lib/index.js","webpack:///C:/Users/U032113/Documents/workspace/ionic-native-transitions/lib/index.js","webpack:///./lib/provider.js","webpack:///C:/Users/U032113/Documents/workspace/ionic-native-transitions/lib/provider.js","webpack:///./lib/nativeSref.js","webpack:///C:/Users/U032113/Documents/workspace/ionic-native-transitions/lib/nativeSref.js","webpack:///./lib/run.js","webpack:///C:/Users/U032113/Documents/workspace/ionic-native-transitions/lib/run.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;ACtCA;;AAEA,QAAO,eAAe,SAAS,cAAc;KACzC,OAAO;;;AAGX,UAAS,uBAAuB,KAAK,EAAE,OAAO,OAAO,IAAI,aAAa,MAAM,EAAE,WAAW;;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QAAQ,OAAO,KAAK,MAAM;KACvC,IAAI,CAAC,UAAU,OAAO,WAAW,GAAG,MAAM,IAAI,MAAM,wBAAwB,MAAM;KAClF,OAAO;SACH,OAAO,OAAO;SACd,WAAW,OAAO,MAAM;;;ADShC,QAAO,UAAU,QAAQ,W;;;;;;;;;AElDzB;;;;;;AAMA;;AAEA,QAAO,eAAe,SAAS,cAAc;KACzC,OAAO;;;AAGX,SAAQ,0FCAO,UAAS,yBAAyB,gBAAgB,eAAe,YAAY;KACxF;;KAEA,eAAe,MAAM,YAAM;SACvB,wBAAwB;;;;AAE/B;ADGD,QAAO,UAAU,QAAQ","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 68f2ffe6b7f092b637c0\n **/","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _providerJs = require('./provider.js');\n\nvar _providerJs2 = _interopRequireDefault(_providerJs);\n\nvar _nativeSrefJs = require('./nativeSref.js');\n\nvar _nativeSrefJs2 = _interopRequireDefault(_nativeSrefJs);\n\nvar _runJs = require('./run.js');\n\nvar _runJs2 = _interopRequireDefault(_runJs);\n\nvar mod = angular.module('ionic-native-transitions', ['ionic', 'ui.router']);\n\nmod.directive('nativeUiSref', _nativeSrefJs2['default']);\nmod.provider('$ionicNativeTransitions', _providerJs2['default']);\nmod.run(_runJs2['default']);\n\nexports['default'] = mod = mod.name;\nmodule.exports = exports['default'];\n\n\n/** WEBPACK FOOTER **\n ** ./lib/index.js\n **/","import Provider from './provider.js';\r\nimport nativeSref from './nativeSref.js';\r\nimport Run from './run.js';\r\n\r\nlet mod = angular.module('ionic-native-transitions', [\r\n 'ionic',\r\n 'ui.router'\r\n]);\r\n\r\nmod.directive('nativeUiSref', nativeSref);\r\nmod.provider('$ionicNativeTransitions', Provider);\r\nmod.run(Run);\r\n\r\nexport default mod = mod.name;\r\n\n\n\n/** WEBPACK FOOTER **\n ** C:/Users/U032113/Documents/workspace/ionic-native-transitions/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 */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nexports['default'] = function () {\n 'ngInject';\n\n var 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: $get,\n enable: enable,\n setDefaultTransition: setDefaultTransition,\n setDefaultBackTransition: setDefaultBackTransition,\n setDefaultOptions: 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() {\n var enabled = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n\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() {\n var injectedOptions = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\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() {\n var transition = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\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() {\n var transition = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n angular.extend(defaultBackTransition, transition);\n return this;\n }\n\n function $get($log, $ionicConfig, $rootScope, $timeout, $state, $location, $ionicHistory, $ionicPlatform, $q) {\n 'ngInject';\n\n var legacyGoBack = undefined,\n backButtonUnregister = undefined,\n transitioning = undefined;\n\n return {\n init: init,\n getDefaultOptions: getDefaultOptions,\n enable: enableFromService,\n isEnabled: isEnabled,\n transition: transition,\n registerToRouteEvents: registerToRouteEvents,\n unregisterToRouteEvents: unregisterToRouteEvents,\n registerToStateChangeStartEvent: registerToStateChangeStartEvent,\n unregisterToStateChangeStartEvent: unregisterToStateChangeStartEvent,\n disablePendingTransition: disablePendingTransition,\n locationUrl: locationUrl,\n stateGo: stateGo,\n goBack: goBack\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() {\n var url = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];\n var transitionOptions = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];\n\n if (!url) {\n $log.debug('[native transition] cannot change url without url...');\n return;\n }\n unregisterToStateChangeStartEvent();\n\n return transition(transitionOptions).then(function () {\n return $location.url(url);\n });\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} stateOptions default:{}\n * @param {object|null} transitionOptions default:null\n */\n function stateGo() {\n var state = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];\n var stateParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n var stateOptions = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];\n var transitionOptions = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];\n\n if (!state) {\n $log.debug('[native transition] cannot change state without a state...');\n return;\n }\n\n if ($state.is(state, stateParams) && !stateOptions.reload) {\n $log.debug('[native transition] same state transition are not possible');\n return;\n }\n\n unregisterToStateChangeStartEvent();\n return transition(transitionOptions).then(function () {\n return $timeout(function () {\n return $state.go(state, stateParams, stateOptions);\n });\n });\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() {\n var enabled = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n var disableIonicTransitions = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];\n var ionicTransitionType = arguments.length <= 2 || arguments[2] === undefined ? 'platform' : arguments[2];\n\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(function (e, count) {\n return goBack(count);\n }, 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 var defer = $q.defer();\n if (!isEnabled()) {\n return $q.when();\n }\n var options = {};\n if (angular.isObject(arguments[0])) {\n options = angular.extend({}, defaultBackTransition, arguments[0]);\n } else if (angular.isString(arguments[0])) {\n switch (arguments[0]) {\n case 'back':\n // First we check for state back transition\n if (arguments[2] && getBackStateTransition(arguments[2])) {\n options = getBackStateTransition(arguments[2]);\n console.log('back first', options);\n } // Then we check if the backInOppositeDirection option is enabled\n else 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 console.log('back second', options);\n } // otherwise we just use the default transition\n else {\n options = defaultBackTransition;\n console.log('back default', options);\n }\n break;\n }\n } else {\n options = defaultTransition;\n }\n options = angular.copy(options);\n $log.debug('[native transition]', options);\n var type = options.type;\n delete options.type;\n $rootScope.$broadcast('ionicNativeTransitions.beforeTransition');\n\n var me = this;\n window.plugins.nativepagetransitions[type](options, function () {\n transitionSuccess.bind(me, getTransitionDuration(options))();\n defer.resolve();\n }, function () {\n transitionError.bind(me, getTransitionDuration(options))();\n defer.reject();\n });\n\n return defer.promise;\n }\n\n function transitionSuccess(duration) {\n setTimeout(function () {\n return $rootScope.$broadcast('ionicNativeTransitions.success');\n }, duration);\n }\n\n function transitionError(duration) {\n setTimeout(function () {\n return $rootScope.$broadcast('ionicNativeTransitions.error');\n }, duration);\n }\n\n function getTransitionDuration(options) {\n var duration = undefined;\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 executePendingTransition() {\n window.plugins.nativepagetransitions.executePendingTransition();\n // $rootScope.$broadcast('ionicNativeTransitions.', executePendingTransition);\n registerToStateChangeStartEvent();\n }\n\n function disablePendingTransition() {\n // If native transition support cancelling transition (> 0.6.4), cancel pending transition\n if (window.plugins && window.plugins.nativepagetransitions && angular.isFunction(window.plugins.nativepagetransitions.cancelPendingTransition)) {\n window.plugins.nativepagetransitions.cancelPendingTransition();\n registerToStateChangeStartEvent();\n } else {\n executePendingTransition();\n }\n }\n\n function registerToRouteEvents() {\n unregisterToRouteEvents();\n registerToStateChangeStartEvent();\n // $stateChangeSuccess = $rootScope.$on('$stateChangeSuccess', executePendingTransition);\n $stateChangeError = $rootScope.$on('$stateChangeError', disablePendingTransition);\n $stateAfterEnter = $rootScope.$on(getDefaultOptions().triggerTransitionEvent, executePendingTransition);\n }\n\n function registerToStateChangeStartEvent() {\n if ($stateChangeStart) {\n return;\n }\n $stateChangeStart = $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams, stateOptions) {\n var options = null;\n // Abort if event was preventDefault'ed\n if (event.defaultPrevented) {\n return;\n }\n if (transitioning) {\n transitioning = false;\n return;\n }\n // Disable native transition for this state\n if (toState.nativeTransitions === null) {\n $log.debug('[native transition] transition disabled for this state', toState);\n return;\n }\n options = getStateTransition(toState);\n $log.debug('[native transition] $stateChangeStart', toState, options);\n\n transition(options).then(function () {\n transitioning = true;\n return $state.go(toState, toParams, stateOptions);\n });\n\n // For now, we will interrupt the transition\n // We'll call $state.go after transition\n event.preventDefault();\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('[native transition] The plugin is either disabled or nativepagetransitions plugin by telerik is not present. If you are getting this message in a browser, this is normal behavior, native transitions only work on device.');\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 var 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 var viewHistory = $ionicHistory.viewHistory();\n var currentHistory = viewHistory.histories[$ionicHistory.currentView().historyId];\n var 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 var currentStateTransition = angular.extend({}, $state.current);\n var toStateTransition = angular.extend({}, $state.get(stateName));\n\n unregisterToStateChangeStartEvent();\n if (toStateTransition.nativeTransitionsBack === null) {\n $log.debug('[native transition] transition disabled for this state', toStateTransition);\n return $timeout(function () {\n return $ionicHistory.goBack(backCount);\n }).then(function () {\n return registerToStateChangeStartEvent();\n });\n }\n $log.debug('nativepagetransitions goBack', backCount, stateName, currentStateTransition, toStateTransition);\n return transition('back', currentStateTransition, toStateTransition).then(function () {\n return $timeout(function () {\n return $ionicHistory.goBack(backCount);\n });\n });\n }\n }\n};\n\n;\nmodule.exports = exports['default'];\n\n\n/** WEBPACK FOOTER **\n ** ./lib/provider.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, $q) {\n 'ngInject';\n\n let legacyGoBack, backButtonUnregister, transitioning;\n\n return {\n init,\n getDefaultOptions,\n enable: enableFromService,\n isEnabled,\n transition,\n registerToRouteEvents,\n unregisterToRouteEvents,\n registerToStateChangeStartEvent,\n unregisterToStateChangeStartEvent,\n disablePendingTransition,\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\n return transition(transitionOptions).then(function(){\n return $location.url(url);\n });\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} stateOptions default:{}\n * @param {object|null} transitionOptions default:null\n */\n function stateGo(state = null, stateParams = {}, stateOptions = {}, transitionOptions = null) {\n if (!state) {\n $log.debug('[native transition] cannot change state without a state...');\n return;\n }\n\n if ($state.is(state, stateParams) && !stateOptions.reload) {\n $log.debug('[native transition] same state transition are not possible');\n return;\n }\n\n unregisterToStateChangeStartEvent();\n return transition(transitionOptions).then(function(){\n return $timeout(() => $state.go(state, stateParams, stateOptions));\n });\n \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 var defer = $q.defer();\n if (!isEnabled()) {\n return $q.when();\n }\n let options = {}\n if (angular.isObject(arguments[0])) {\n options = angular.extend({}, defaultBackTransition, arguments[0])\n } else if (angular.isString(arguments[0])) {\n switch (arguments[0]) {\n case 'back':\n // First we check for state back transition\n if (arguments[2] && getBackStateTransition(arguments[2])) {\n options = getBackStateTransition(arguments[2]);\n console.log('back first', options)\n } // Then we check if the backInOppositeDirection option is enabled\n else 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 console.log('back second', options)\n\n } // otherwise we just use the default transition\n else {\n options = defaultBackTransition;\n console.log('back default', options)\n }\n break;\n }\n } else {\n options = defaultTransition;\n }\n options = angular.copy(options);\n $log.debug('[native transition]', options);\n let type = options.type;\n delete options.type;\n $rootScope.$broadcast('ionicNativeTransitions.beforeTransition');\n \n var me = this;\n window.plugins.nativepagetransitions[type](\n options,\n function(){\n transitionSuccess.bind(me, getTransitionDuration(options))();\n defer.resolve();\n },\n function(){\n transitionError.bind(me, getTransitionDuration(options))();\n defer.reject();\n }\n )\n \n return defer.promise;\n }\n\n function transitionSuccess(duration) {\n setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.success'), duration);\n }\n\n function transitionError(duration) {\n setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.error'), duration);\n }\n\n function getTransitionDuration(options) {\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 executePendingTransition() {\n window.plugins.nativepagetransitions.executePendingTransition();\n // $rootScope.$broadcast('ionicNativeTransitions.', executePendingTransition);\n registerToStateChangeStartEvent();\n }\n\n function disablePendingTransition() {\n // If native transition support cancelling transition (> 0.6.4), cancel pending transition\n if (window.plugins && window.plugins.nativepagetransitions && angular.isFunction(window.plugins.nativepagetransitions.cancelPendingTransition)) {\n window.plugins.nativepagetransitions.cancelPendingTransition();\n registerToStateChangeStartEvent();\n } else {\n executePendingTransition();\n }\n }\n\n function registerToRouteEvents() {\n unregisterToRouteEvents();\n registerToStateChangeStartEvent();\n // $stateChangeSuccess = $rootScope.$on('$stateChangeSuccess', executePendingTransition);\n $stateChangeError = $rootScope.$on('$stateChangeError', disablePendingTransition);\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, stateOptions) => {\n let options = null;\n // Abort if event was preventDefault'ed\n if (event.defaultPrevented) {\n return;\n }\n if(transitioning){\n transitioning = false;\n return;\n }\n // Disable native transition for this state\n if (toState.nativeTransitions === null) {\n $log.debug('[native transition] transition disabled for this state', toState);\n return;\n }\n options = getStateTransition(toState);\n $log.debug('[native transition] $stateChangeStart', toState, options);\n \n transition(options).then(function(){\n transitioning = true;\n return $state.go(toState, toParams, stateOptions);\n });\n \n // For now, we will interrupt the transition \n // We'll call $state.go after transition\n event.preventDefault();\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('[native transition] The plugin is either disabled or nativepagetransitions plugin by telerik is not present. If you are getting this message in a browser, this is normal behavior, native transitions only work on device.');\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 let currentStateTransition = angular.extend({}, $state.current);\n let toStateTransition = angular.extend({}, $state.get(stateName));\n\n unregisterToStateChangeStartEvent();\n if (toStateTransition.nativeTransitionsBack === null) {\n $log.debug('[native transition] transition disabled for this state', toStateTransition);\n return $timeout(() => $ionicHistory.goBack(backCount)).then(() => registerToStateChangeStartEvent());\n }\n $log.debug('nativepagetransitions goBack', backCount, stateName, currentStateTransition, toStateTransition);\n return transition('back', currentStateTransition, toStateTransition).then(function(){\n return $timeout(() => $ionicHistory.goBack(backCount));\n });\n }\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** C:/Users/U032113/Documents/workspace/ionic-native-transitions/lib/provider.js\n **/","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nexports['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 var stateOptions = $scope.$eval($attrs.nativeUiSrefOpts) || {};\n var nativeOptions = null;\n\n $attrs.$observe('nativeOptions', function (newOptions) {\n var evalOptions = $scope.$eval(newOptions);\n nativeOptions = angular.isObject(evalOptions) ? evalOptions : {};\n });\n\n $element.on('click', function (event) {\n var ref = parseStateRef($attrs.nativeUiSref, $state.current.name);\n var 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, stateOptions, nativeOptions);\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}\nmodule.exports = exports['default'];\n\n\n/** WEBPACK FOOTER **\n ** ./lib/nativeSref.js\n **/","export default function($log, $ionicNativeTransitions, $state) {\r\n 'ngInject';\r\n\r\n return {\r\n controller: controller,\r\n restrict: 'A',\r\n scope: false\r\n };\r\n\r\n function controller($scope, $element, $attrs, $state) {\r\n 'ngInject';\r\n\r\n let stateOptions = $scope.$eval($attrs.nativeUiSrefOpts) || {};\r\n let nativeOptions = null;\r\n\r\n $attrs.$observe('nativeOptions', (newOptions) => {\r\n let evalOptions = $scope.$eval(newOptions);\r\n nativeOptions = angular.isObject(evalOptions) ? evalOptions : {};\r\n });\r\n\r\n $element.on('click', (event) => {\r\n let ref = parseStateRef($attrs.nativeUiSref, $state.current.name);\r\n let params = angular.copy($scope.$eval(ref.paramExpr));\r\n if (!$ionicNativeTransitions.isEnabled()) {\r\n $state.go(ref.state, params, stateOptions);\r\n return;\r\n }\r\n\r\n $ionicNativeTransitions.stateGo(ref.state, params, stateOptions, nativeOptions);\r\n });\r\n }\r\n}\r\n\r\nfunction parseStateRef(ref, current) {\r\n var preparsed = ref.match(/^\\s*({[^}]*})\\s*$/),\r\n parsed;\r\n if (preparsed) ref = current + '(' + preparsed[1] + ')';\r\n parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\r\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\r\n return {\r\n state: parsed[1],\r\n paramExpr: parsed[3] || null\r\n };\r\n}\r\n\n\n\n/** WEBPACK FOOTER **\n ** C:/Users/U032113/Documents/workspace/ionic-native-transitions/lib/nativeSref.js\n **/","/**\r\n * @ngdoc service\r\n * @name ionic-native-transitions.$ionicNativeTransitions\r\n * @description\r\n * ionic-native-transitions service\r\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nexports['default'] = function ($ionicNativeTransitions, $ionicPlatform, $ionicHistory, $rootScope) {\n 'ngInject';\n\n $ionicPlatform.ready(function () {\n $ionicNativeTransitions.init();\n });\n};\n\n;\nmodule.exports = exports['default'];\n/**\r\n * @ngdoc service\r\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider\r\n * @description\r\n * ionic-native-transitions provider\r\n */\n\n\n/** WEBPACK FOOTER **\n ** ./lib/run.js\n **/","/**\r\n * @ngdoc service\r\n * @name ionic-native-transitions.$ionicNativeTransitions\r\n * @description\r\n * ionic-native-transitions service\r\n */\r\n/**\r\n * @ngdoc service\r\n * @name ionic-native-transitions.$ionicNativeTransitionsProvider\r\n * @description\r\n * ionic-native-transitions provider\r\n */\r\nexport default function($ionicNativeTransitions, $ionicPlatform, $ionicHistory, $rootScope) {\r\n 'ngInject';\r\n\r\n $ionicPlatform.ready(() => {\r\n $ionicNativeTransitions.init();\r\n });\r\n};\r\n\n\n\n/** WEBPACK FOOTER **\n ** C:/Users/U032113/Documents/workspace/ionic-native-transitions/lib/run.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 71fa1720e570431e6ec4","webpack:///./lib/index.js","webpack:///./lib/provider.js","webpack:///./lib/nativeSref.js","webpack:///./lib/run.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;ACtCA;;AAEA,QAAO,eAAe,SAAS,cAAc;KACzC,OAAO;;;AAGX,UAAS,uBAAuB,KAAK,EAAE,OAAO,OAAO,IAAI,aAAa,MAAM,EAAE,WAAW;;AAEzF,KAAI,cAAc,oBARG;;AAUrB,KAAI,eAAe,uBAAuB;;AAE1C,KAAI,gBAAgB,oBAXG;;AAavB,KAAI,iBAAiB,uBAAuB;;AAE5C,KAAI,SAAS,oBAdG;;AAgBhB,KAAI,UAAU,uBAAuB;;AAdrC,KAAI,MAAM,QAAQ,OAAO,4BAA4B,CACjD,SACA;;AAGJ,KAAI,UAAU,gBAAc;AAC5B,KAAI,SAAS,2BAAyB;AACtC,KAAI,IAAG;;AAeP,SAAQ,aAbO,MAAM,IAAI;AAczB,QAAO,UAAU,QAAQ,W;;;;;;;;;AC3BzB;;;;;;;;;;;;AAYA;;AAEA,QAAO,eAAe,SAAS,cAAc;KACzC,OAAO;;;AAGX,SAAQ,aANO,YAAY;KACvB;;;KAEA,IAAI,UAAU;SACV,oBAAoB;SACpB,sBAAsB;SACtB,oBAAoB;SACpB,mBAAmB;SACnB,qBAAqB;SACjB,IAAI;SACJ,MAAM;SACN,MAA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S,WAAW,QAAQ,UAAU,QAAQ,QAAQ;SAClD;;SAEA,IAAI,eAAe,OAAO,MAAM,OAAO,qBAAqB;SAC5D,IAAI,gBAAgB;;SAEpB,OAAO,SAAS,iBAAiB,UAAC,YAAe;aAC7C,IAAI,cAAc,OAAO,MAAM;aAC/B,gBAAgB,QAAQ,SAAS,eAAe,cAAc;;;SAGlE,SAAS,GAAG,SAAS,UAAC,OAAU;aAC5B,IAAI,MAAM,cAAc,OAAO,cAAc,OAAO,QAAQ;aAC5D,IAAI,SAAS,QAAQ,KAAK,OAAO,MAAM,IAAI;aAC3C,IAAI,CAAC,wBAAwB,aAAa;iBACtC,OAAO,GAAG,IAAI,OAAO,QAAQ;iBAC7B;;;aAGJ,wBAAwB,QAAQ,IAAI,OAAO,QAAQ,cAAc;;;;;AAK7E,UAAS,cAAc,KAAK,SAAS;KACjC,IAAI,YAAY,IAAI,MAAM;SACtB;KACJ,IAAI,WAAW,MAAM,UAAU,MAAM,UAAU,KAAK;KACpD,SAAS,IAAI,QAAQ,OAAO,KAAK,MAAM;KACvC,IAAI,CAAC,UAAU,OAAO,WAAW,GAAG,MAAM,IAAI,MAAM,wBAAwB,MAAM;KAClF,OAAO;SACH,OAAO,OAAO;SACd,WAAW,OAAO,MAAM;;;AAShC,QAAO,UAAU,QAAQ,W;;;;;;;;;AClDzB;;;;;;AAMA;;AAEA,QAAO,eAAe,SAAS,cAAc;GAC3C,OAAO;;;AAGT,SAAQ,0FAAO,UAAS,yBAAyB,gBAAgB,eAAe,YAAY;GACxF;;GAEA,eAAe,MAAM,YAAM;KACvB,wBAAwB;;;;AAE/B;AAGD,QAAO,UAAU,QAAQ","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 71fa1720e570431e6ec4\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, $q) {\n 'ngInject';\n\n let legacyGoBack, backButtonUnregister, transitioning;\n\n return {\n init,\n getDefaultOptions,\n enable: enableFromService,\n isEnabled,\n transition,\n registerToRouteEvents,\n unregisterToRouteEvents,\n registerToStateChangeStartEvent,\n unregisterToStateChangeStartEvent,\n disablePendingTransition,\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\n return transition(transitionOptions).then(function(){\n return $location.url(url);\n });\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} stateOptions default:{}\n * @param {object|null} transitionOptions default:null\n */\n function stateGo(state = null, stateParams = {}, stateOptions = {}, transitionOptions = null) {\n if (!state) {\n $log.debug('[native transition] cannot change state without a state...');\n return;\n }\n\n if ($state.is(state, stateParams) && !stateOptions.reload) {\n $log.debug('[native transition] same state transition are not possible');\n return;\n }\n\n unregisterToStateChangeStartEvent();\n return transition(transitionOptions).then(function(){\n return $timeout(() => $state.go(state, stateParams, stateOptions));\n });\n \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 var defer = $q.defer();\n if (!isEnabled()) {\n return $q.when();\n }\n let options = {}\n if (angular.isObject(arguments[0])) {\n options = angular.extend({}, defaultBackTransition, arguments[0])\n } else if (angular.isString(arguments[0])) {\n switch (arguments[0]) {\n case 'back':\n // First we check for state back transition\n if (arguments[2] && getBackStateTransition(arguments[2])) {\n options = getBackStateTransition(arguments[2]);\n console.log('back first', options)\n } // Then we check if the backInOppositeDirection option is enabled\n else 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 console.log('back second', options)\n\n } // otherwise we just use the default transition\n else {\n options = defaultBackTransition;\n console.log('back default', options)\n }\n break;\n }\n } else {\n options = defaultTransition;\n }\n options = angular.copy(options);\n $log.debug('[native transition]', options);\n let type = options.type;\n delete options.type;\n $rootScope.$broadcast('ionicNativeTransitions.beforeTransition');\n \n var me = this;\n window.plugins.nativepagetransitions[type](\n options,\n function(){\n transitionSuccess.bind(me, getTransitionDuration(options))();\n defer.resolve();\n },\n function(){\n transitionError.bind(me, getTransitionDuration(options))();\n defer.reject();\n }\n )\n \n return defer.promise;\n }\n\n function transitionSuccess(duration) {\n setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.success'), duration);\n }\n\n function transitionError(duration) {\n setTimeout(() => $rootScope.$broadcast('ionicNativeTransitions.error'), duration);\n }\n\n function getTransitionDuration(options) {\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 executePendingTransition() {\n window.plugins.nativepagetransitions.executePendingTransition();\n // $rootScope.$broadcast('ionicNativeTransitions.', executePendingTransition);\n registerToStateChangeStartEvent();\n }\n\n function disablePendingTransition() {\n // If native transition support cancelling transition (> 0.6.4), cancel pending transition\n if (window.plugins && window.plugins.nativepagetransitions && angular.isFunction(window.plugins.nativepagetransitions.cancelPendingTransition)) {\n window.plugins.nativepagetransitions.cancelPendingTransition();\n registerToStateChangeStartEvent();\n } else {\n executePendingTransition();\n }\n }\n\n function registerToRouteEvents() {\n unregisterToRouteEvents();\n registerToStateChangeStartEvent();\n // $stateChangeSuccess = $rootScope.$on('$stateChangeSuccess', executePendingTransition);\n $stateChangeError = $rootScope.$on('$stateChangeError', disablePendingTransition);\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, stateOptions) => {\n let options = null;\n // Abort if event was preventDefault'ed\n if (event.defaultPrevented) {\n return;\n }\n if(transitioning){\n transitioning = false;\n return;\n }\n // Disable native transition for this state\n if (toState.nativeTransitions === null) {\n $log.debug('[native transition] transition disabled for this state', toState);\n return;\n }\n options = getStateTransition(toState);\n $log.debug('[native transition] $stateChangeStart', toState, options);\n \n transition(options).then(function(){\n transitioning = true;\n return $state.go(toState, toParams, stateOptions);\n });\n \n // For now, we will interrupt the transition \n // We'll call $state.go after transition\n event.preventDefault();\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('[native transition] The plugin is either disabled or nativepagetransitions plugin by telerik is not present. If you are getting this message in a browser, this is normal behavior, native transitions only work on device.');\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 let currentStateTransition = angular.extend({}, $state.current);\n let toStateTransition = angular.extend({}, $state.get(stateName));\n\n unregisterToStateChangeStartEvent();\n if (toStateTransition.nativeTransitionsBack === null) {\n $log.debug('[native transition] transition disabled for this state', toStateTransition);\n return $timeout(() => $ionicHistory.goBack(backCount)).then(() => registerToStateChangeStartEvent());\n }\n $log.debug('nativepagetransitions goBack', backCount, stateName, currentStateTransition, toStateTransition);\n return transition('back', currentStateTransition, toStateTransition).then(function(){\n return $timeout(() => $ionicHistory.goBack(backCount));\n });\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, stateOptions, nativeOptions);\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/dist/ionic-native-transitions.min.js b/dist/ionic-native-transitions.min.js index ac520f4..c595202 100644 --- a/dist/ionic-native-transitions.min.js +++ b/dist/ionic-native-transitions.min.js @@ -1,11 +1,11 @@ /*! - * ionic-native-transitions - * --- - * Native transitions for Ionic applications - * @version: v1.0.2 - * @author: shprink - * @link: https://github.com/shprink/ionic-native-transitions - * @license: MIT + * ionic-native-transitions + * --- + * Native transitions for Ionic applications + * @version: v1.0.3 + * @author: shprink + * @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),c=angular.module("ionic-native-transitions",["ionic","ui.router"]);c.directive("nativeUiSref",s["default"]),c.provider("$ionicNativeTransitions",r["default"]),c.run(l["default"]),t["default"]=c=c.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,o,s):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(d,n),this}function a(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return angular.extend(g,n),this}function r(i,e,a,r,f,p,m,b,h){function w(){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?(N(),x(t).then(function(){return p.url(n)})):void i.debug("[native transition] cannot change url without url...")}function T(){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]?{}:arguments[2],a=arguments.length<=3||void 0===arguments[3]?null:arguments[3];return n?f.is(n,t)&&!e.reload?void i.debug("[native transition] same state transition are not possible"):(N(),x(a).then(function(){return r(function(){return f.go(n,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,_()),a.$ionicGoBack=F,C=b.registerBackButtonAction(function(n,t){return F(t)},100),j()):(i.debug("[native transition] disabling plugin"),"undefined"==typeof arguments[1]&&(r=!1),a.$ionicGoBack=W,angular.isFunction(C)&&C.call(),A()),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 x(){var n=h.defer();if(!t())return h.when();var e={};if(angular.isObject(arguments[0]))e=angular.extend({},g,arguments[0]);else if(angular.isString(arguments[0]))switch(arguments[0]){case"back":arguments[2]&&S(arguments[2])?(e=S(arguments[2]),console.log("back first",e)):_().backInOppositeDirection&&arguments[1]&&E(arguments[1])?(e=E(arguments[1]),e.direction&&(e.direction=c[e.direction]),console.log("back second",e)):(e=g,console.log("back default",e))}else e=d;e=angular.copy(e),i.debug("[native transition]",e);var r=e.type;delete e.type,a.$broadcast("ionicNativeTransitions.beforeTransition");var o=this;return window.plugins.nativepagetransitions[r](e,function(){y.bind(o,P(e))(),n.resolve()},function(){k.bind(o,P(e))(),n.reject()}),n.promise}function y(n){setTimeout(function(){return a.$broadcast("ionicNativeTransitions.success")},n)}function k(n){setTimeout(function(){return a.$broadcast("ionicNativeTransitions.error")},n)}function P(n){var t=void 0;return t=n.duration?parseInt(n.duration):parseInt(_().duration),ionic.Platform.isAndroid()?t+=n.androiddelay?parseInt(n.androiddelay):parseInt(_().androiddelay):ionic.Platform.isIOS()?t+=n.iosdelay?parseInt(n.iosdelay):parseInt(_().iosdelay):ionic.Platform.isWindowsPhone()&&(t+=n.winphonedelay?parseInt(n.winphonedelay):parseInt(_().winphonedelay)),t}function O(){window.plugins.nativepagetransitions.executePendingTransition(),B()}function I(){window.plugins&&window.plugins.nativepagetransitions&&angular.isFunction(window.plugins.nativepagetransitions.cancelPendingTransition)?(window.plugins.nativepagetransitions.cancelPendingTransition(),B()):O()}function j(){A(),B(),u=a.$on("$stateChangeError",I),l=a.$on(_().triggerTransitionEvent,O)}function B(){o||(o=a.$on("$stateChangeStart",function(n,t,e,a,r,o){var s=null;if(!n.defaultPrevented){if(G)return void(G=!1);if(null===t.nativeTransitions)return void i.debug("[native transition] transition disabled for this state",t);s=E(t),i.debug("[native transition] $stateChangeStart",t,s),x(s).then(function(){return G=!0,f.go(t,e,o)}),n.preventDefault()}}))}function S(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 E(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 N(){o&&angular.isFunction(o)&&(o(),o=null)}function A(){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 _(){return v}function D(){return W=a.$ionicGoBack,t()?void $():void i.debug("[native transition] The plugin is either disabled or nativepagetransitions plugin by telerik is not present. If you are getting this message in a browser, this is normal behavior, native transitions only work on device.")}function F(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],o=a.cursor+n;(0>o||o>a.stack.length)&&(o=0),t=a.stack[o].stateName}var s=angular.extend({},f.current),u=angular.extend({},f.get(t));return N(),null===u.nativeTransitionsBack?(i.debug("[native transition] transition disabled for this state",u),r(function(){return m.goBack(n)}).then(function(){return B()})):(i.debug("nativepagetransitions goBack",n,t,s,u),x("back",s,u).then(function(){return r(function(){return m.goBack(n)})}))}}var W=void 0,C=void 0,G=void 0;return{init:D,getDefaultOptions:_,enable:$,isEnabled:t,transition:x,registerToRouteEvents:j,unregisterToRouteEvents:A,registerToStateChangeStartEvent:B,unregisterToStateChangeStartEvent:N,disablePendingTransition:I,locationUrl:w,stateGo:T,goBack:F}}r.$inject=["$log","$ionicConfig","$rootScope","$timeout","$state","$location","$ionicHistory","$ionicPlatform","$q"];var o=null,s=null,u=null,l=null,c={up:"down",down:"up",left:"right",right:"left"},d={type:"slide",direction:"left"},g={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{$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/package.json b/package.json index 7cc17d2..980e32c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ionic-native-transitions", - "version": "1.0.2", + "version": "1.0.3", "description": "Native transitions for Ionic applications", "main": "dist/ionic-native-transitions.js", "scripts": {