forked from mendhak/angular-intro.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular-intro.min.js
4 lines (3 loc) · 4.46 KB
/
angular-intro.min.js
1
2
3
4
/*! angular-intro.js - v3.1.1 - 2017-03-03 */
!function(a,b){"function"==typeof define&&define.amd?define(["angular","intro.js"],b):"object"==typeof exports?module.exports=b(require("angular"),require("intro.js")):a.angularIntroJs=b(a.angular,a.introJs)}(this,function(a,b){function c(){this.message="Intro.js is not available. Make sure it is properly loaded.",this.name="IntroJsNotAvailable"}"object"==typeof b&&(b=b.introJs);var d=a.module("angular-intro",[]);return d.factory("ngIntroService",["$q",function(d){function e(b,c){a.isFunction(c)&&(B[b]=c)}function f(a){delete B[a]}function g(a){A.setOptions(a)}function h(a){"number"==typeof a?A.start().goToStep(a):A.start(),i("open")}function i(b){for(var c in B)B.hasOwnProperty(c)&&a.isFunction(B[c])&&B[c](b)}function j(){A.exit(),i("closed")}function k(){A.previousStep(),i("open")}function l(){A.nextStep(),i("open")}function m(){A.refresh()}function n(b){return A.oncomplete(function(){a.isFunction(b)&&b(),i("closed")})}function o(b){return A.onbeforechange(function(){a.isFunction(b)&&b()})}function p(b){return A.onchange(function(){a.isFunction(b)&&b()})}function q(c){return"undefined"!=typeof A&&A.exit(),A=new b,i("closed"),a.isFunction(c)&&c(),A}function r(b){return A.onafterchange(function(c){a.isFunction(b)&&b()})}function s(b){return A.onexit(function(){i("closed"),a.isFunction(b)&&b()})}function t(){return A.addHints()}function u(){return A.showHints()}function v(a){return A.hideHint(a)}function w(){return A.hideHints()}function x(b){A.onhintclick(function(){a.isFunction(b)&&b()})}function y(b){return A.onhintclose(function(){a.isFunction(b)&&b()})}function z(b){return A.onhintclose(function(){a.isFunction(b)&&b()})}if("function"!=typeof b)throw new c;var A,B={},C={addListener:e,removeListener:f,setOptions:g,start:h,exit:j,clear:q,previous:k,next:l,refresh:m,onComplete:n,onExit:s,onBeforeChange:o,onAfterChange:r,onChange:p,addHints:t,showHints:u,hideHint:v,hideHints:w,onHintClick:x,onHintClose:y,onHintsAdded:z};return Object.defineProperty(C,"intro",{get:function(){return A},enumerable:!0,configurable:!0}),q(),C}]).directive("ngIntroDisableButton",["ngIntroService","$compile",function(a,b){var c=0;return{restrict:"A",priority:1,scope:{introDisableButton:"="},link:function(b,d,e){var f="disabledBtn"+c++;a.addListener(f,function(a){"open"===a?e.$set("disabled","disabled"):(delete e.disabled,d.removeAttr("disabled"))}),b.$on("$destroy",function(){a.removeListener(f)})}}}]).directive("ngIntroOptions",["$timeout","ngIntroService",function(b,c){return{restrict:"A",scope:{ngIntroMethod:"=",ngIntroExitMethod:"=?",ngIntroNextMethod:"=?",ngIntroPreviousMethod:"=?",ngIntroRefreshMethod:"=?",ngIntroOptions:"=",ngIntroOncomplete:"=",ngIntroOnexit:"=",ngIntroOnchange:"=",ngIntroOnbeforechange:"=",ngIntroOnafterchange:"=",ngIntroAutostart:"=",ngIntroAutorefresh:"=",ngIntroHintsMethod:"=?",ngIntroOnhintsadded:"=",ngIntroOnhintclick:"=?",ngIntroOnhintclose:"=?",ngIntroShowHint:"=?",ngIntroShowHints:"=?",ngIntroHideHint:"=?",ngIntroHideHints:"=?"},link:function(d,e,f){function g(){for(var a=0;a>h.length;a++)h[a]()}var h=[];d.ngIntroOncomplete&&c.onComplete(d.ngIntroOncomplete),d.ngIntroOnexit&&c.onExit(d.ngIntroOnexit),d.ngIntroOnbeforechange&&c.onBeforeChange(d.ngIntroOnbeforechange),d.ngIntroOnchange&&c.onChange(d.ngIntroOnchange),d.ngIntroOnafterchange&&c.onAfterChange(d.ngIntroOnafterchange),d.ngIntroMethod=function(a){c.setOptions(d.ngIntroOptions),c.start(a)},d.ngIntroHintsMethod=function(){c.setOptions(d.ngIntroOptions),c.start(step),d.ngIntroOnhintsadded&&c.onHintsAdded(d.ngIntroOnbeforechange),d.ngIntroOnhintclick&&c.onHintClick(d.ngIntroOnbeforechange),d.ngIntroOnhintclose&&c.onHintClick(d.ngIntroOnbeforechange),intro.addHints()},d.ngIntroShowHint=function(a){intro.showHint(a)},d.ngIntroShowHints=function(){intro.showHints()},d.ngIntroHideHint=function(a){intro.hideHint(a)},d.ngIntroHideHints=function(){intro.hideHints()},d.ngIntroNextMethod=function(){c.next()},d.ngIntroPreviousMethod=function(){c.previous()},d.ngIntroExitMethod=function(b){c.exit(),a.isFunction(b)&&b()},d.ngIntroRefreshMethod=function(){c.refresh()};var i=d.$watch("ngIntroAutostart",function(){d.ngIntroAutostart&&b(function(){d.ngIntroMethod()}),i()});h.push(d.$on("$locationChangeStart",function(){c.exit()})),h.push(d.$on("$locationChangeSuccess",function(){c.exit()})),d.ngIntroAutorefresh&&h.push(d.$watch(function(){c.refresh()})),h.push(d.$on("$destroy",function(){c.exit()})),d.$on("$destroy",function(){g()})}}}]),d});
//# sourceMappingURL=angular-intro.min.js.map