{"version":3,"sources":["ng-full-modal.min.js"],"names":["_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","obj","constructor","prototype","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","angular","module","provider","defOpts","closeDelay","templateHost","transitionDuration","escClose","bgClose","modalWidth","backdrop","set","newOpts","extend","$get","factory","_nfm","$rootScope","$animate","$document","$compile","$controller","$http","$q","$templateRequest","$timeout","$sce","keys","enter","esc","left","right","nfm","conf","this","_stateOpen","value","_showDeffered","defer","_hidingDeffered","_hiddenDeffered","url","trustAsResourceUrl","deferred","template","resolve","templateUrl","_secureTemplateUrl","then","err","reject","templateFile","_url","Error","promise","scope","$new","__hide__","noop","_hide","bind","__bg_hide__","_getScope","$destroy","controller","injectables","_injectables","_setInjectable","$scope","$element","hide","inject","_getController","_getInjectables","_this","_getTemplate","_template","name","_bindCtrlToScope","console","warn","_this2","_compileTemplate","bodyElem","element","body","modalElem","children","_this3","_degRegLocCngListnr","$on","on","event","which","off","_this4","_appendTemplate","_registerListeners","bodyClass","addClass","hiding","hidden","result","_this5","_deregisterListeners","_cleanModal","_this6","leave","_removeScope","removeClass","_setPromises","_show"],"mappings":"AAAA,YAMA,SAASA,iBAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAJhH,GAAIC,SAA4B,kBAAXC,SAAoD,gBAApBA,QAAOC,SAAwB,SAAUC,GAAO,aAAcA,IAAS,SAAUA,GAAO,MAAOA,IAAyB,kBAAXF,SAAyBE,EAAIC,cAAgBH,QAAUE,IAAQF,OAAOI,UAAY,eAAkBF,IAElQG,aAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG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F,KAAKuD,sBAGLtE,EAAU2E,IAAI,YAMfjG,IAAK,QACLuC,MAAO,WACN,GAAI2D,GAAS7D,IAGbA,MAAK8D,kBAAkBhD,KAAK,WAY3B,MAVA+C,GAAOE,qBAGPF,EAAO5D,YAAa,EAGhB4D,EAAO9D,KAAKiE,WACflG,QAAQoF,QAAQjE,EAAU,GAAGkE,MAAMc,SAASJ,EAAO9D,KAAKiE,WAGlDH,EAAO1D,cAAcQ,SAC3BuD,OAAQL,EAAOxD,gBAAgBe,QAC/B+C,OAAQN,EAAOvD,gBAAgBc,QAC/B8B,QAASW,EAAO9D,KAAKoC,gBAQxBxE,IAAK,QACLuC,MAAO,SAAekE,EAAQlG,GAC7B,GAAImG,GAASrE,IAGbA,MAAKsE,uBAGL/E,EAAS,WACR8E,EAAOE,YAAYH,IACjBlG,GAAc8B,KAAKD,KAAK7B,eAM5BP,IAAK,cACLuC,MAAO,SAAqBkE,GAC3B,GAAII,GAASxE,IAGbA,MAAKK,gBAAgBM,QAAQyD,GAG7BpF,EAASyF,MAAMzE,KAAKD,KAAKoC,UAAUrB,KAAK,WAEvC0D,EAAOE,eAGPF,EAAOvE,YAAa,EAGpBuE,EAAOlE,gBAAgBK,QAAQyD,GAG3BI,EAAOzE,KAAKiE,WACflG,QAAQoF,QAAQjE,EAAU,GAAGkE,MAAMwB,YAAYH,EAAOzE,KAAKiE,gBAU9DrG,IAAK,OACLuC,MAAO,SAAc6B,GAcpB,MAZIA,IAA4F,WAArD,mBAAhBA,GAA8B,YAActF,QAAQsF,KAC9E/B,KAAKiC,eAAeF,GAIrB/B,KAAK4E,eAGkB,GAAnB5E,KAAKC,YACRD,KAAK6E,QAGC7E,KAAKG,cAAciB,YAIrBtB,IAMR,OAAOA","file":"ng-full-modal.min.js","sourcesContent":["'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nangular.module('thatisuday.ng-full-modal', ['ngAnimate', 'angular-click-outside']);\nangular.module('thatisuday.ng-full-modal').provider('_nfm', function () {\n\tvar defOpts = {\n\t\tcloseDelay: 0, // \tDelay in closing the modal (in milliseconds)\n\t\ttemplateHost: null, //\tTemplate files will be served from the location, e.g. http://localhost/templates/\n\t\ttransitionDuration: '0.3s', //\tModal show/hide animation duration\n\t\tescClose: true, //\tClose modal on esc button click\n\t\tbgClose: true, //\tClose modal on background click,\n\t\tmodalWidth: '700px', // \tModal width\n\t\tbackdrop: 'rgba(0,0,0,0.9)' // \tbackdrop color of modal container\n\t};\n\n\treturn {\n\t\tset: function set(newOpts) {\n\t\t\tangular.extend(defOpts, newOpts);\n\t\t},\n\t\t$get: function $get() {\n\t\t\treturn defOpts;\n\t\t}\n\t};\n});\nangular.module('thatisuday.ng-full-modal').factory('nfm', ['_nfm', '$rootScope', '$animate', '$document', '$compile', '$controller', '$http', '$q', '$templateRequest', '$timeout', '$sce', function (_nfm, $rootScope, $animate, $document, $compile, $controller, $http, $q, $templateRequest, $timeout, $sce) {\n\n\t// key codes\n\tvar keys = {\n\t\tenter: 13,\n\t\tesc: 27,\n\t\tleft: 37,\n\t\tright: 39\n\t};\n\n\t// create modal class\n\n\tvar nfm = function () {\n\t\tfunction nfm(conf) {\n\t\t\t_classCallCheck(this, nfm);\n\n\t\t\t// set modal service configurations\n\t\t\tthis.conf = angular.extend({}, _nfm, conf);\n\n\t\t\t// set modal open/close state\n\t\t\tthis._stateOpen = false;\n\t\t}\n\n\t\t// set promises for modal\n\n\n\t\t_createClass(nfm, [{\n\t\t\tkey: '_setPromises',\n\t\t\tvalue: function _setPromises() {\n\t\t\t\tthis._showDeffered = $q.defer();\n\t\t\t\tthis._hidingDeffered = $q.defer();\n\t\t\t\tthis._hiddenDeffered = $q.defer();\n\t\t\t}\n\n\t\t\t// from `$sce`, allow url as resource url\n\n\t\t}, {\n\t\t\tkey: '_secureTemplateUrl',\n\t\t\tvalue: function _secureTemplateUrl(url) {\n\t\t\t\treturn $sce.trustAsResourceUrl(url);\n\t\t\t}\n\n\t\t\t// get template html\n\n\t\t}, {\n\t\t\tkey: '_getTemplate',\n\t\t\tvalue: function _getTemplate() {\n\t\t\t\tvar deferred = $q.defer();\n\n\t\t\t\tif (this.conf.template) {\n\t\t\t\t\tdeferred.resolve(this.conf.template);\n\t\t\t\t} else if (this.conf.templateUrl) {\n\t\t\t\t\tvar url = this._secureTemplateUrl(this.conf.templateUrl);\n\n\t\t\t\t\t$templateRequest(url, true).then(function (template) {\n\t\t\t\t\t\treturn deferred.resolve(template);\n\t\t\t\t\t}).catch(function (err) {\n\t\t\t\t\t\treturn deferred.reject(err);\n\t\t\t\t\t});\n\t\t\t\t} else if (this.conf.templateHost && this.conf.templateFile) {\n\t\t\t\t\tvar _url = this._secureTemplateUrl(this.conf.templateHost + this.conf.templateFile);\n\n\t\t\t\t\t$templateRequest(_url, true).then(function (template) {\n\t\t\t\t\t\treturn deferred.resolve(template);\n\t\t\t\t\t}).catch(function (err) {\n\t\t\t\t\t\treturn deferred.reject(err);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.reject(new Error('Please provide template or templateUrl for modal.'));\n\t\t\t\t}\n\n\t\t\t\treturn deferred.promise;\n\t\t\t}\n\n\t\t\t// create/get modal scope\n\n\t\t}, {\n\t\t\tkey: '_getScope',\n\t\t\tvalue: function _getScope() {\n\t\t\t\tif (!this.conf.scope) {\n\t\t\t\t\t// create new scope\n\t\t\t\t\tthis.conf.scope = $rootScope.$new();\n\n\t\t\t\t\t// add extra functionality to scope object\n\t\t\t\t\tthis.conf.scope.__hide__ = this.conf.bgClose ? angular.noop : this._hide.bind(this);\n\t\t\t\t\tthis.conf.scope.__bg_hide__ = this.conf.bgClose ? this._hide.bind(this) : angular.noop;\n\n\t\t\t\t\tthis.conf.scope.transitionDuration = this.conf.transitionDuration;\n\t\t\t\t\tthis.conf.scope.modalWidth = this.conf.modalWidth;\n\t\t\t\t\tthis.conf.scope.backdrop = this.conf.backdrop;\n\t\t\t\t}\n\n\t\t\t\treturn this.conf.scope;\n\t\t\t}\n\n\t\t\t// remove scope\n\n\t\t}, {\n\t\t\tkey: '_removeScope',\n\t\t\tvalue: function _removeScope() {\n\t\t\t\tthis._getScope().$destroy();\n\t\t\t\tdelete this.conf.scope;\n\t\t\t}\n\n\t\t\t// get controller\n\n\t\t}, {\n\t\t\tkey: '_getController',\n\t\t\tvalue: function _getController() {\n\t\t\t\tif (!this.conf.controller) {\n\t\t\t\t\tthrow new Error('Failed to retrieve controller for the modal.');\n\t\t\t\t}\n\n\t\t\t\treturn this.conf.controller;\n\t\t\t}\n\n\t\t\t// set injectable variable\n\n\t\t}, {\n\t\t\tkey: '_setInjectable',\n\t\t\tvalue: function _setInjectable(injectables) {\n\t\t\t\tthis.conf._injectables = this.conf._injectables || {};\n\t\t\t\tangular.extend(this.conf._injectables, injectables);\n\t\t\t}\n\n\t\t\t// get controller injectable dependencies\n\n\t\t}, {\n\t\t\tkey: '_getInjectables',\n\t\t\tvalue: function _getInjectables() {\n\t\t\t\treturn this.conf._injectables;\n\t\t\t}\n\n\t\t\t// bind controller to scope and set injectable dependencies for controller\n\n\t\t}, {\n\t\t\tkey: '_bindCtrlToScope',\n\t\t\tvalue: function _bindCtrlToScope() {\n\t\t\t\tthis._setInjectable(angular.extend({\n\t\t\t\t\t$scope: this._getScope(),\n\t\t\t\t\t$element: this.conf.$element,\n\t\t\t\t\thide: this._hide.bind(this)\n\t\t\t\t}, this.conf.inject));\n\n\t\t\t\t$controller(this._getController(), this._getInjectables());\n\t\t\t}\n\n\t\t\t// compile modal template\n\n\t\t}, {\n\t\t\tkey: '_compileTemplate',\n\t\t\tvalue: function _compileTemplate() {\n\t\t\t\tvar _this = this;\n\n\t\t\t\treturn this._getTemplate().then(function (template) {\n\t\t\t\t\tvar _template = '\\n\\t\\t\\t\\t\\t\\t<div\\n\\t\\t\\t\\t\\t\\t\\tclass=\"nfm-container nfm-' + _this.conf.name + '\"\\n\\t\\t\\t\\t\\t\\t\\tng-style=\"{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\'transition-duration\\' : transitionDuration,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\'background-color\\' : backdrop\\n\\t\\t\\t\\t\\t\\t\\t}\"\\n\\t\\t\\t\\t\\t\\t>\\n\\t\\t\\t\\t\\t\\t\\t<div class=\"nfm-close\" ng-click=\"__hide__()\"></div>\\n\\t\\t\\t\\t\\t\\t\\t<div class=\"nfm-modal modal-name-' + _this.conf.name + '\" click-outside=\"__bg_hide__()\" ng-style=\"{\\'width\\' : modalWidth}\">\\n\\t\\t\\t\\t\\t\\t\\t\\t' + template + '\\n\\t\\t\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\t';\n\n\t\t\t\t\t// bind controller to scope\n\t\t\t\t\t_this._bindCtrlToScope();\n\n\t\t\t\t\t// compile\n\t\t\t\t\t_this.conf.$element = $compile(_template)(_this._getScope());\n\t\t\t\t}, function (err) {\n\t\t\t\t\tconsole.warn('Failed to load template for modal.');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// append template element to body\n\t\t\t// animate using $animate\n\n\t\t}, {\n\t\t\tkey: '_appendTemplate',\n\t\t\tvalue: function _appendTemplate() {\n\t\t\t\tvar _this2 = this;\n\n\t\t\t\treturn this._compileTemplate().then(function () {\n\t\t\t\t\tvar bodyElem = angular.element($document[0].body);\n\t\t\t\t\tvar modalElem = _this2.conf.$element;\n\t\t\t\t\tvar children = bodyElem.children();\n\n\t\t\t\t\tif (children.length > 0) {\n\t\t\t\t\t\treturn $animate.enter(modalElem, bodyElem, children[children.length - 1]);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn $animate.enter(modalElem, bodyElem);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// register listeners to angular event\n\n\t\t}, {\n\t\t\tkey: '_registerListeners',\n\t\t\tvalue: function _registerListeners() {\n\t\t\t\tvar _this3 = this;\n\n\t\t\t\t// on location change, destroy modal\n\t\t\t\tthis._degRegLocCngListnr = $rootScope.$on('$locationChangeSuccess', this._hide.bind(this));\n\n\t\t\t\t// listen to escape button event\n\t\t\t\t$document.on('keyup', function (event) {\n\t\t\t\t\tif (_this3.conf.escClose && event.which == keys.esc) {\n\t\t\t\t\t\t_this3._hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// deregister listeners from angular event\n\n\t\t}, {\n\t\t\tkey: '_deregisterListeners',\n\t\t\tvalue: function _deregisterListeners() {\n\t\t\t\t// deregister location change listener\n\t\t\t\tthis._degRegLocCngListnr();\n\n\t\t\t\t// remove keyup events\n\t\t\t\t$document.off('keyup');\n\t\t\t}\n\n\t\t\t// show modal (finished everything)\n\n\t\t}, {\n\t\t\tkey: '_show',\n\t\t\tvalue: function _show() {\n\t\t\t\tvar _this4 = this;\n\n\t\t\t\t// create modal DOM node\n\t\t\t\tthis._appendTemplate().then(function () {\n\t\t\t\t\t// register to event listeners\n\t\t\t\t\t_this4._registerListeners();\n\n\t\t\t\t\t// change modal state\n\t\t\t\t\t_this4._stateOpen = true;\n\n\t\t\t\t\t// add `bodyClass` class to body\n\t\t\t\t\tif (_this4.conf.bodyClass) {\n\t\t\t\t\t\tangular.element($document[0].body).addClass(_this4.conf.bodyClass);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn _this4._showDeffered.resolve({\n\t\t\t\t\t\thiding: _this4._hidingDeffered.promise,\n\t\t\t\t\t\thidden: _this4._hiddenDeffered.promise,\n\t\t\t\t\t\telement: _this4.conf.$element\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// hide modal\n\n\t\t}, {\n\t\t\tkey: '_hide',\n\t\t\tvalue: function _hide(result, closeDelay) {\n\t\t\t\tvar _this5 = this;\n\n\t\t\t\t// register to event listeners\n\t\t\t\tthis._deregisterListeners();\n\n\t\t\t\t// add delay to modal close\n\t\t\t\t$timeout(function () {\n\t\t\t\t\t_this5._cleanModal(result);\n\t\t\t\t}, closeDelay || this.conf.closeDelay);\n\t\t\t}\n\n\t\t\t// clean modal scopes, variables and DOM nodes\n\n\t\t}, {\n\t\t\tkey: '_cleanModal',\n\t\t\tvalue: function _cleanModal(result) {\n\t\t\t\tvar _this6 = this;\n\n\t\t\t\t// resolve hide promise with result\n\t\t\t\tthis._hidingDeffered.resolve(result);\n\n\t\t\t\t// remove modal DOM node\n\t\t\t\t$animate.leave(this.conf.$element).then(function () {\n\t\t\t\t\t// remove/destroy modal scope\n\t\t\t\t\t_this6._removeScope();\n\n\t\t\t\t\t// change modal state\n\t\t\t\t\t_this6._stateOpen = false;\n\n\t\t\t\t\t// resolve hidden promise with result\n\t\t\t\t\t_this6._hiddenDeffered.resolve(result);\n\n\t\t\t\t\t// remove `bodyClass` class to body\n\t\t\t\t\tif (_this6.conf.bodyClass) {\n\t\t\t\t\t\tangular.element($document[0].body).removeClass(_this6.conf.bodyClass);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/**********************************************************************/\n\n\t\t\t// show (launch) modal\n\n\t\t}, {\n\t\t\tkey: 'show',\n\t\t\tvalue: function show(injectables) {\n\t\t\t\t// set dynamic injectables\n\t\t\t\tif (injectables && (typeof injectables === 'undefined' ? 'undefined' : _typeof(injectables)) == 'object') {\n\t\t\t\t\tthis._setInjectable(injectables);\n\t\t\t\t}\n\n\t\t\t\t// set promises\n\t\t\t\tthis._setPromises();\n\n\t\t\t\t// show modal only it's hidden\n\t\t\t\tif (this._stateOpen == false) {\n\t\t\t\t\tthis._show();\n\t\t\t\t}\n\n\t\t\t\treturn this._showDeffered.promise;\n\t\t\t}\n\t\t}]);\n\n\t\treturn nfm;\n\t}();\n\n\t// return class\n\n\n\treturn nfm;\n}]);"]}