diff --git a/README.md b/README.md index 8607717..fedecbb 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ In your controller: console.log('on complete callback!') }); ``` -the list of supported callbacks are: +the list of current callbacks are: * `onComplete` * `onExit` @@ -104,6 +104,37 @@ the list of supported callbacks are: * `onHintClose` * `onHintsAdded` +The current short Interface is: +p.s. it's avaiable on build folder the .d.ts file +``` javascript + intro: IntroJs; + addListener(name: string, callback: Function): void; + removeListener(name: string): void; + setOptions: IntroJs.Options; + start(stepId?: number): IntroJs; + exit(): IntroJs; + clear(callback: Function): IntroJs; + goToStepNumber(stepId: number): IntroJs; + addHints(): IntroJs; + showHint(hintIdx: number): IntroJs; + showHints(): IntroJs; + hideHint(hintIdx: number): IntroJs; + hideHints(): IntroJs; + removeHint(stepid: number): IntroJs; + removeHints(): IntroJs; + previous(): IntroJs; + next(): IntroJs; + refresh(): IntroJs; + onComplete(callback: Function): void; + onExit(callback: Function): void; + onBeforeChange(callback: Function): void; + onAfterChange(callback: Function): void; + onChange(callback: Function): void; + onHintClick(callback: Function): void; + onHintClose(callback: Function): void; + onHintsAdded(callback: Function): void; +``` + ### Exit Method **Directive** - `ng-intro-exit-method="ExitMe"` diff --git a/bower.json b/bower.json index 38cd7a0..8a69088 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-intro.js", - "version": "3.2.5", + "version": "3.3.0", "main": "build/angular-intro.min.js", "description": "Angular directive to wrap intro.js", "license": "MIT", @@ -13,7 +13,7 @@ ], "dependencies": { "angular": "^1.4.0", - "intro.js": "~2.4.0" + "intro.js": "~2.5.0" }, "devDependencies": {} } diff --git a/build/angular-intro.min.js b/build/angular-intro.min.js index dfefb49..2c5028f 100644 --- a/build/angular-intro.min.js +++ b/build/angular-intro.min.js @@ -1,4 +1,4 @@ -/*! angular-intro.js - v3.2.5 - 2017-06-10 */ +/*! angular-intro.js - v3.3.0 - 2017-06-16 */ -!function(a,b){"function"==typeof window.define&&window.define.amd?window.define(["angular","intro.js"],b):"object"==typeof window.exports?window.module.exports=b(window.require("angular"),window.require("intro.js")):a.angularIntroJs=b(a.angular,a.introJs)}(this,function(a,b){var c={open:"open",closed:"closed"},d="angular-intro",e={},f=function(){function d(){this.intro=b()}return d.prototype.addListener=function(b,c){a.isFunction(c)&&(e[b]=c)},d.prototype.removeListener=function(a){delete e[a]},d.prototype.notifyListeners=function(b){for(var c in e)e.hasOwnProperty(c)&&a.isFunction(e[c])&&e[c](b)},d.prototype.setOptions=function(a){return this.intro.setOptions(a)},d.prototype.start=function(a){return"number"==typeof a?this.intro.start().goToStep(a):this.intro.start(),this.notifyListeners(c.open),this.intro},d.prototype.exit=function(){return this.notifyListeners(c.closed),this.intro.exit()},d.prototype.clear=function(d){return"undefined"!=typeof this.intro&&this.intro.exit(),this.intro=b(),this.notifyListeners(c.closed),a.isFunction(d)&&d(),this.intro},d.prototype.addHints=function(){return this.intro.addHints()},d.prototype.showHint=function(a){return this.intro.showHint(a)},d.prototype.showHints=function(){return this.intro.showHints()},d.prototype.hideHint=function(a){return this.intro.hideHint(a)},d.prototype.hideHints=function(){return this.intro.hideHints()},d.prototype.previous=function(){return this.notifyListeners(c.open),this.intro.previousStep()},d.prototype.next=function(){return this.notifyListeners(c.open),this.intro.nextStep()},d.prototype.refresh=function(){return this.intro.refresh()},d.prototype.onComplete=function(b){var d=this;return this.intro.oncomplete(function(){a.isFunction(b)&&b(),d.notifyListeners(c.closed)})},d.prototype.onExit=function(b){var d=this;return this.intro.onexit(function(){d.notifyListeners(c.closed),a.isFunction(b)&&b()})},d.prototype.onBeforeChange=function(b){return this.intro.onbeforechange(function(c){a.isFunction(b)&&b(c)})},d.prototype.onChange=function(b){return this.intro.onchange(function(c){a.isFunction(b)&&b(c)})},d.prototype.onAfterChange=function(b){return this.intro.onafterchange(function(c){a.isFunction(b)&&b(c)})},d.prototype.onHintClick=function(b){return this.intro.onhintclick(function(){a.isFunction(b)&&b()})},d.prototype.onHintClose=function(b){return this.intro.onhintclose(function(){a.isFunction(b)&&b()})},d.prototype.onHintsAdded=function(b){return this.intro.onhintclose(function(){a.isFunction(b)&&b()})},d}(),g=function(){function b(b,c){var d=this;this.restrict="A",this.scope={ngIntroMethod:"=",ngIntroExitMethod:"=?",ngIntroNextMethod:"=?",ngIntroPreviousMethod:"=?",ngIntroRefreshMethod:"=?",ngIntroOptions:"=",ngIntroOncomplete:"=",ngIntroOnexit:"=",ngIntroOnchange:"=",ngIntroOnbeforechange:"=",ngIntroOnafterchange:"=",ngIntroAutostart:"=",ngIntroAutorefresh:"=",ngIntroHintsMethod:"=?",ngIntroOnhintsadded:"=",ngIntroOnhintclick:"=?",ngIntroOnhintclose:"=?",ngIntroShowHint:"=?",ngIntroShowHints:"=?",ngIntroHideHint:"=?",ngIntroHideHints:"=?"},this.destroy=[],this.link=function(e,f,g){e.ngIntroOncomplete&&b.onComplete(e.ngIntroOncomplete),e.ngIntroOnexit&&b.onExit(e.ngIntroOnexit),e.ngIntroOnbeforechange&&b.onBeforeChange(e.ngIntroOnbeforechange),e.ngIntroOnchange&&b.onChange(e.ngIntroOnchange),e.ngIntroOnafterchange&&b.onAfterChange(e.ngIntroOnafterchange),e.ngIntroMethod=function(a){b.setOptions(e.ngIntroOptions),b.start(a)},e.ngIntroHintsMethod=function(a){b.setOptions(e.ngIntroOptions),b.start(a),e.ngIntroOnhintsadded&&b.onHintsAdded(e.ngIntroOnbeforechange),e.ngIntroOnhintclick&&b.onHintClick(e.ngIntroOnbeforechange),e.ngIntroOnhintclose&&b.onHintClick(e.ngIntroOnbeforechange),b.addHints()},e.ngIntroShowHint=function(a){b.showHint(a)},e.ngIntroShowHints=function(){b.showHints()},e.ngIntroHideHint=function(a){b.hideHint(a)},e.ngIntroHideHints=function(){b.hideHints()},e.ngIntroNextMethod=function(){b.next()},e.ngIntroPreviousMethod=function(){b.previous()},e.ngIntroExitMethod=function(c){b.exit(),a.isFunction(c)&&c()},e.ngIntroRefreshMethod=function(){b.refresh()};var h=e.$watch("ngIntroAutostart",function(){e.ngIntroAutostart&&c(function(){e.ngIntroMethod()}),h()});d.destroy.push(e.$on("$locationChangeStart",function(){b.exit()})),d.destroy.push(e.$on("$locationChangeSuccess",function(){b.exit()})),e.ngIntroAutorefresh&&d.destroy.push(e.$watch(function(){b.refresh()})),d.destroy.push(e.$on("$destroy",function(){b.exit()})),e.$on("$destroy",function(){i()});var i=function(){for(var a=0,b=d.destroy;a