diff --git a/classes/Step.js b/classes/Step.js index b41d857..e272945 100644 --- a/classes/Step.js +++ b/classes/Step.js @@ -5,8 +5,11 @@ export class Step { this.next = params.next this.methods = params.methods || {} this.template = params.template || '' + this.ignore_progress = params.ignore_progress || false + this.hide_progress = params.hide_progress || false this.from = null - this._data = {} + this.required = params.required || false + this._data = params.data || {} params.interceptors = params.interceptors || {} this.interceptors = { beforeRender: params.interceptors.beforeRender || this.methods.beforeRender || function () { diff --git a/classes/StepSystem.js b/classes/StepSystem.js index 86adeaf..30d639a 100644 --- a/classes/StepSystem.js +++ b/classes/StepSystem.js @@ -1,6 +1,6 @@ /** * StepSystem v1.0.0 - * Last update: 15.05.2017 + * Last update: 19.05.2017 * * Dependencies: jQuery * @@ -11,13 +11,18 @@ export class StepSystem { /** * @param {jQuery element} container */ - constructor (container) { + constructor (params) { this._steps = {} this._current_step = null - this._container = container + this._container = params.container || $('.step-system') + this._step_container = params.step_class || '.step' + this._next_timeout = null this.steps_past = [] - this.onFinish = null + this.progress = 0 this.commonHandlers = function () {} + this.onFinish = function () {} + this.onProgress = function () {} + this.onStepRender = function () {} } /** @@ -51,71 +56,112 @@ export class StepSystem { return this._steps } + get all_data () { + return this.collectData() + } + render (step) { - let _br = step.interceptors.beforeRender() + let _br = step.interceptors.beforeRender(step) if (!_br.status) { if (_br.onError) _br.onError() return this } - this.container.find('.step').html(step.template || this._container.find(`#${step.name}`).html()) + this.container.find(this._step_container).html(step.template || this._container.find(`#${step.name}`).html()) + this.container.find(this._step_container).attr('data-name', step.name) + this.onStepRender(step) if (step.methods.onRender) { - step.methods.onRender() + step.methods.onRender(step) + } + } + + updateProgress () { + let future_steps = 0 + let iteration_step = this.current_step + let iteration_next_step = iteration_step.next + while (iteration_next_step) { + if (!iteration_step.ignore_progress) { + future_steps++ + } + iteration_step = this.step(iteration_next_step) + iteration_next_step = iteration_step.next + } + this.progress = (this.steps_past.length * 100) / (this.steps_past.length + future_steps) + this.onProgress(this.progress) + } + + finish () { + if (this.onFinish) { + this.onFinish() } } + goNextTimeout (timeout = 300) { + const $this = this + clearTimeout(this._next_timeout) + this._next_timeout = setTimeout(function () { + $this.goNext() + }, timeout) + } + goNext () { let curr_step = this.current_step || {} let next_step = curr_step.next || null - let _bn = curr_step.interceptors.beforeNext() + let _bn = curr_step.interceptors.beforeNext(curr_step) if (!_bn.status) { if (_bn.onError) _bn.onError() return this } if (next_step) { - this.goToStep(this.step(next_step), curr_step.name) + this.goToStep(this.step(next_step), { from: curr_step.name }) } else { - if (this.onFinish) { - this.onFinish() - } + this.finish() } } goBack () { let curr_step = this.current_step || {} let prev_step = curr_step.from || null - let _bb = curr_step.interceptors.beforeBack() + let _bb = curr_step.interceptors.beforeBack(curr_step) || { status: false } if (!_bb.status) { if (_bb.onError) _bb.onError() return this } if (prev_step) { - this.goToStep(this.step(prev_step)) - this.steps_past.pop() + if (_bb.status) { + this.steps_past.pop() + } + this.goToStep(this.step(prev_step), { is_back: true }) } } - goToStep (step, from = null) { + goToStep (step, params = {}) { + let from = params.from || null + let is_back = params.is_back || false if (from) { step.from = from } - this._current_step = step.name this.render(step) + this._current_step = step.name if (this.steps_past.indexOf(step.name) < 0) { this.steps_past.push(step.name) } + this.updateProgress() } collectData () { let data = {} - for (var step in this.steps_past) { - data[this.steps_past[step]] = this.step(this.steps_past[step]).data + for (var step in this.steps) { + if (this.step(step).data) { + data[step] = this.step(step).data + } } return data } - init (from_step) { + init (first_step) { + this.first_step = first_step this.commonHandlers() - this._current_step = from_step + this._current_step = this.first_step this.goToStep(this.step(this._current_step)) } } diff --git a/example/app.js b/example/app.js index 175b370..a6698a6 100644 --- a/example/app.js +++ b/example/app.js @@ -1,7 +1,10 @@ import { Step } from '../classes/Step' import { StepSystem } from '../classes/StepSystem' -window.app = new StepSystem($('.container')); +window.app = new StepSystem({ + container: $('.container'), + step_class: '.step' +}); (function (app) { @@ -13,6 +16,7 @@ window.app = new StepSystem($('.container')); */ .setHandlers(() => { console.log('handlers init') + }) /** @@ -22,16 +26,16 @@ window.app = new StepSystem($('.container')); name: 'first-step', next: 'second-step', methods: { - beforeRender: () => { + beforeRender: (step) => { console.log('first-step beforeRender') return { status: true } }, - beforeNext: () => { + beforeNext: (step) => { console.log('first-step beforeNext', this) - app.current_step.data.lol = 'lol' + step.data.lol = 'lol' return { status: true } }, - onRender: () => { + onRender: (step) => { app.container.find('.step').css({'color': 'green'}) } } @@ -44,16 +48,16 @@ window.app = new StepSystem($('.container')); name: 'second-step', next: 'third-step', methods: { - beforeRender: () => { + beforeRender: (step) => { console.log('second-step beforeRender') return { status: true } }, - beforeNext: () => { + beforeNext: (step) => { console.log('second-step beforeNext') - app.current_step.data.azaza = 'azaza' + step.data.azaza = 'azaza' return { status: true } }, - onRender: () => { + onRender: (step) => { app.container.find('.step').css({'color': 'red'}) } } @@ -65,25 +69,72 @@ window.app = new StepSystem($('.container')); .addStep(new Step({ name: 'third-step', methods: { - beforeRender: () => { + beforeRender: (step) => { console.log('third-step beforeRender') return { status: true } }, - beforeNext: () => { + beforeNext: (step) => { console.log('third-step beforeNext') - app.current_step.data.kek = 'kek' + step.data.kek = 'kek' return { status: true } }, - onRender: () => { + onRender: (step) => { app.container.find('.step').css({'color': 'blue'}) } } })) + /** + * FINISH + */ + .addStep(new Step({ + name: 'finish', + hide_progress: true, + ignore_progress: true, + methods: { + beforeRender: (step) => { + console.log('finish beforeRender') + return { status: true } + }, + beforeNext: (step) => { + console.log('finish beforeNext') + step.data.kek = 'kek' + return { status: true } + }, + onRender: (step) => { } + } + })) + + /** + * GLOBAL + */ + app.onFinish = () => { + app.goToStep(app.step('finish')) console.log(app.collectData()) } + app.onProgress = (progress) => { + app.container.find('.progress').html(Math.floor(progress) + '%') + } + + app.onStepRender = (step) => { + app.container.find('.step .next').click(function () { + app.goNext() + }) + app.container.find('.step .back').click(function () { + app.goBack() + }) + + console.log(step) + + if (step.hide_progress) { + app.container.find('.progress').hide() + } else { + app.container.find('.progress').show() + } + } + app.init(first_step) })(window.app) diff --git a/example/dist/app.js b/example/dist/app.js index 16f8363..ea67c3b 100644 --- a/example/dist/app.js +++ b/example/dist/app.js @@ -18,8 +18,11 @@ var Step = exports.Step = function () { this.next = params.next; this.methods = params.methods || {}; this.template = params.template || ''; + this.ignore_progress = params.ignore_progress || false; + this.hide_progress = params.hide_progress || false; this.from = null; - this._data = {}; + this.required = params.required || false; + this._data = params.data || {}; params.interceptors = params.interceptors || {}; this.interceptors = { beforeRender: params.interceptors.beforeRender || this.methods.beforeRender || function () { @@ -75,7 +78,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons /** * StepSystem v1.0.0 - * Last update: 15.05.2017 + * Last update: 19.05.2017 * * Dependencies: jQuery * @@ -86,15 +89,20 @@ var StepSystem = exports.StepSystem = function () { /** * @param {jQuery element} container */ - function StepSystem(container) { + function StepSystem(params) { _classCallCheck(this, StepSystem); this._steps = {}; this._current_step = null; - this._container = container; + this._container = params.container || $('.step-system'); + this._step_container = params.step_class || '.step'; + this._next_timeout = null; this.steps_past = []; - this.onFinish = null; + this.progress = 0; this.commonHandlers = function () {}; + this.onFinish = function () {}; + this.onProgress = function () {}; + this.onStepRender = function () {}; } /** @@ -124,32 +132,66 @@ var StepSystem = exports.StepSystem = function () { }, { key: 'render', value: function render(step) { - var _br = step.interceptors.beforeRender(); + var _br = step.interceptors.beforeRender(step); if (!_br.status) { if (_br.onError) _br.onError(); return this; } - this.container.find('.step').html(step.template || this._container.find('#' + step.name).html()); + this.container.find(this._step_container).html(step.template || this._container.find('#' + step.name).html()); + this.container.find(this._step_container).attr('data-name', step.name); + this.onStepRender(step); if (step.methods.onRender) { - step.methods.onRender(); + step.methods.onRender(step); } } + }, { + key: 'updateProgress', + value: function updateProgress() { + var future_steps = 0; + var iteration_step = this.current_step; + var iteration_next_step = iteration_step.next; + while (iteration_next_step) { + if (!iteration_step.ignore_progress) { + future_steps++; + } + iteration_step = this.step(iteration_next_step); + iteration_next_step = iteration_step.next; + } + this.progress = this.steps_past.length * 100 / (this.steps_past.length + future_steps); + this.onProgress(this.progress); + } + }, { + key: 'finish', + value: function finish() { + if (this.onFinish) { + this.onFinish(); + } + } + }, { + key: 'goNextTimeout', + value: function goNextTimeout() { + var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300; + + var $this = this; + clearTimeout(this._next_timeout); + this._next_timeout = setTimeout(function () { + $this.goNext(); + }, timeout); + } }, { key: 'goNext', value: function goNext() { var curr_step = this.current_step || {}; var next_step = curr_step.next || null; - var _bn = curr_step.interceptors.beforeNext(); + var _bn = curr_step.interceptors.beforeNext(curr_step); if (!_bn.status) { if (_bn.onError) _bn.onError(); return this; } if (next_step) { - this.goToStep(this.step(next_step), curr_step.name); + this.goToStep(this.step(next_step), { from: curr_step.name }); } else { - if (this.onFinish) { - this.onFinish(); - } + this.finish(); } } }, { @@ -157,44 +199,52 @@ var StepSystem = exports.StepSystem = function () { value: function goBack() { var curr_step = this.current_step || {}; var prev_step = curr_step.from || null; - var _bb = curr_step.interceptors.beforeBack(); + var _bb = curr_step.interceptors.beforeBack(curr_step) || { status: false }; if (!_bb.status) { if (_bb.onError) _bb.onError(); return this; } if (prev_step) { - this.goToStep(this.step(prev_step)); - this.steps_past.pop(); + if (_bb.status) { + this.steps_past.pop(); + } + this.goToStep(this.step(prev_step), { is_back: true }); } } }, { key: 'goToStep', value: function goToStep(step) { - var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var from = params.from || null; + var is_back = params.is_back || false; if (from) { step.from = from; } - this._current_step = step.name; this.render(step); + this._current_step = step.name; if (this.steps_past.indexOf(step.name) < 0) { this.steps_past.push(step.name); } + this.updateProgress(); } }, { key: 'collectData', value: function collectData() { var data = {}; - for (var step in this.steps_past) { - data[this.steps_past[step]] = this.step(this.steps_past[step]).data; + for (var step in this.steps) { + if (this.step(step).data) { + data[step] = this.step(step).data; + } } return data; } }, { key: 'init', - value: function init(from_step) { + value: function init(first_step) { + this.first_step = first_step; this.commonHandlers(); - this._current_step = from_step; + this._current_step = this.first_step; this.goToStep(this.step(this._current_step)); } }, { @@ -212,6 +262,11 @@ var StepSystem = exports.StepSystem = function () { get: function get() { return this._steps; } + }, { + key: 'all_data', + get: function get() { + return this.collectData(); + } }]); return StepSystem; @@ -224,7 +279,10 @@ var _Step = require('../classes/Step'); var _StepSystem = require('../classes/StepSystem'); -window.app = new _StepSystem.StepSystem($('.container')); +window.app = new _StepSystem.StepSystem({ + container: $('.container'), + step_class: '.step' +}); (function (app) { var _this = this; @@ -246,16 +304,16 @@ window.app = new _StepSystem.StepSystem($('.container')); name: 'first-step', next: 'second-step', methods: { - beforeRender: function beforeRender() { + beforeRender: function beforeRender(step) { console.log('first-step beforeRender'); return { status: true }; }, - beforeNext: function beforeNext() { + beforeNext: function beforeNext(step) { console.log('first-step beforeNext', _this); - app.current_step.data.lol = 'lol'; + step.data.lol = 'lol'; return { status: true }; }, - onRender: function onRender() { + onRender: function onRender(step) { app.container.find('.step').css({ 'color': 'green' }); } } @@ -268,16 +326,16 @@ window.app = new _StepSystem.StepSystem($('.container')); name: 'second-step', next: 'third-step', methods: { - beforeRender: function beforeRender() { + beforeRender: function beforeRender(step) { console.log('second-step beforeRender'); return { status: true }; }, - beforeNext: function beforeNext() { + beforeNext: function beforeNext(step) { console.log('second-step beforeNext'); - app.current_step.data.azaza = 'azaza'; + step.data.azaza = 'azaza'; return { status: true }; }, - onRender: function onRender() { + onRender: function onRender(step) { app.container.find('.step').css({ 'color': 'red' }); } } @@ -289,25 +347,72 @@ window.app = new _StepSystem.StepSystem($('.container')); .addStep(new _Step.Step({ name: 'third-step', methods: { - beforeRender: function beforeRender() { + beforeRender: function beforeRender(step) { console.log('third-step beforeRender'); return { status: true }; }, - beforeNext: function beforeNext() { + beforeNext: function beforeNext(step) { console.log('third-step beforeNext'); - app.current_step.data.kek = 'kek'; + step.data.kek = 'kek'; return { status: true }; }, - onRender: function onRender() { + onRender: function onRender(step) { app.container.find('.step').css({ 'color': 'blue' }); } } + })) + + /** + * FINISH + */ + .addStep(new _Step.Step({ + name: 'finish', + hide_progress: true, + ignore_progress: true, + methods: { + beforeRender: function beforeRender(step) { + console.log('finish beforeRender'); + return { status: true }; + }, + beforeNext: function beforeNext(step) { + console.log('finish beforeNext'); + step.data.kek = 'kek'; + return { status: true }; + }, + onRender: function onRender(step) {} + } })); + /** + * GLOBAL + */ + app.onFinish = function () { + app.goToStep(app.step('finish')); console.log(app.collectData()); }; + app.onProgress = function (progress) { + app.container.find('.progress').html(Math.floor(progress) + '%'); + }; + + app.onStepRender = function (step) { + app.container.find('.step .next').click(function () { + app.goNext(); + }); + app.container.find('.step .back').click(function () { + app.goBack(); + }); + + console.log(step); + + if (step.hide_progress) { + app.container.find('.progress').hide(); + } else { + app.container.find('.progress').show(); + } + }; + app.init(first_step); })(window.app); diff --git a/example/dist/app.js.map b/example/dist/app.js.map index c443c12..3a8dccd 100644 --- a/example/dist/app.js.map +++ b/example/dist/app.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","classes/Step.js","classes/StepSystem.js","example/app.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;ICAa,I,WAAA,I;AACX,gBAAa,MAAb,EAAqB;AAAA;;AACnB,SAAK,MAAL,GAAc,OAAO,MAAP,IAAiB,IAA/B;AACA,SAAK,IAAL,GAAY,OAAO,IAAnB;AACA,SAAK,IAAL,GAAY,OAAO,IAAnB;AACA,SAAK,OAAL,GAAe,OAAO,OAAP,IAAkB,EAAjC;AACA,SAAK,QAAL,GAAgB,OAAO,QAAP,IAAmB,EAAnC;AACA,SAAK,IAAL,GAAY,IAAZ;AACA,SAAK,KAAL,GAAa,EAAb;AACA,WAAO,YAAP,GAAsB,OAAO,YAAP,IAAuB,EAA7C;AACA,SAAK,YAAL,GAAoB;AAClB,oBAAc,OAAO,YAAP,CAAoB,YAApB,IAAoC,KAAK,OAAL,CAAa,YAAjD,IAA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,MAAI,IAAJ,CAAS,UAAT;AAED,CAnFD,EAmFG,OAAO,GAnFV","file":"app.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o {\n console.log('handlers init')\n })\n \n /**\n * FIRST STEP\n */\n .addStep(new Step({\n name: 'first-step',\n next: 'second-step',\n methods: {\n beforeRender: () => {\n console.log('first-step beforeRender')\n return { status: true }\n },\n beforeNext: () => {\n console.log('first-step beforeNext', this)\n app.current_step.data.lol = 'lol'\n return { status: true }\n },\n onRender: () => {\n app.container.find('.step').css({'color': 'green'})\n }\n }\n }))\n\n /**\n * SECOND STEP\n */\n .addStep(new Step({\n name: 'second-step',\n next: 'third-step',\n methods: {\n beforeRender: () => {\n console.log('second-step beforeRender')\n return { status: true }\n },\n beforeNext: () => {\n console.log('second-step beforeNext')\n app.current_step.data.azaza = 'azaza'\n return { status: true }\n },\n onRender: () => {\n app.container.find('.step').css({'color': 'red'})\n }\n }\n }))\n\n /**\n * THIRD STEP\n */\n .addStep(new Step({\n name: 'third-step',\n methods: {\n beforeRender: () => {\n console.log('third-step beforeRender')\n return { status: true }\n },\n beforeNext: () => {\n console.log('third-step beforeNext')\n app.current_step.data.kek = 'kek'\n return { status: true }\n },\n onRender: () => {\n app.container.find('.step').css({'color': 'blue'})\n }\n }\n }))\n\n app.onFinish = () => {\n console.log(app.collectData())\n }\n\n app.init(first_step)\n\n})(window.app)\n"],"preExistingComment":"//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5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BzdGF0dXM6IHRydWUgfVxuICAgICAgfSxcbiAgICAgIGJlZm9yZU5leHQ6ICgpID0+IHtcbiAgICAgICAgY29uc29sZS5sb2coJ3RoaXJkLXN0ZXAgYmVmb3JlTmV4dCcpXG4gICAgICAgIGFwcC5jdXJyZW50X3N0ZXAuZGF0YS5rZWsgPSAna2VrJ1xuICAgICAgICByZXR1cm4geyBzdGF0dXM6IHRydWUgfVxuICAgICAgfSxcbiAgICAgIG9uUmVuZGVyOiAoKSA9PiB7XG4gICAgICAgIGFwcC5jb250YWluZXIuZmluZCgnLnN0ZXAnKS5jc3Moeydjb2xvcic6ICdibHVlJ30pXG4gICAgICB9XG4gICAgfVxuICB9KSlcblxuICBhcHAub25GaW5pc2ggPSAoKSA9PiB7XG4gICAgY29uc29sZS5sb2coYXBwLmNvbGxlY3REYXRhKCkpXG4gIH1cblxuICBhcHAuaW5pdChmaXJzdF9zdGVwKVxuXG59KSh3aW5kb3cuYXBwKVxuIl19"} \ No newline at end of file +{"version":3,"sources":["node_modules/browserify/node_modules/browser-pack/_prelude.js","classes/Step.js","classes/StepSystem.js","example/app.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;ICAa,I,WAAA,I;AACX,gBAAa,MAAb,EAAqB;AAAA;;AACnB,SAAK,MAAL,GAAc,OAAO,MAAP,IAAiB,IAA/B;AACA,SAAK,IAAL,GAAY,OAAO,IAAnB;AACA,SAAK,IAAL,GAAY,OAAO,IAAnB;AACA,SAAK,OAAL,GAAe,OAAO,OAAP,IAAkB,EAAjC;AACA,SAAK,QAAL,GAAgB,OAAO,QAAP,IAAmB,EAAnC;AACA,SAAK,eAAL,GAAuB,OAAO,eAAP,IAA0B,KAAjD;AACA,SAAK,aAAL,GAAqB,OAAO,aAAP,IAAwB,KAA7C;AACA,SAAK,IAAL,GAAY,IAAZ;AACA,SAAK,QAAL,GAAgB,OAAO,QAAP,IAAmB,KAAnC;AACA,SAAK,KAAL,GAAa,OAAO,IAAP,IAAe,EAA5B;AACA,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IAAd,CAAmB,aAAnB,EAAkC,KAAlC,CAAwC,YAAY;AAClD,UAAI,MAAJ;AACD,KAFD;;AAIA,YAAQ,GAAR,CAAY,IAAZ;;AAEA,QAAI,KAAK,aAAT,EAAwB;AACtB,UAAI,SAAJ,CAAc,IAAd,CAAmB,WAAnB,EAAgC,IAAhC;AACD,KAFD,MAEO;AACL,UAAI,SAAJ,CAAc,IAAd,CAAmB,WAAnB,EAAgC,IAAhC;AACD;AACF,GAfD;;AAiBA,MAAI,IAAJ,CAAS,UAAT;AAED,CAnID,EAmIG,OAAO,GAnIV","file":"app.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o {\n console.log('handlers init')\n\n })\n \n /**\n * FIRST STEP\n */\n .addStep(new Step({\n name: 'first-step',\n next: 'second-step',\n methods: {\n beforeRender: (step) => {\n console.log('first-step beforeRender')\n return { status: true }\n },\n beforeNext: (step) => {\n console.log('first-step beforeNext', this)\n step.data.lol = 'lol'\n return { status: true }\n },\n onRender: (step) => {\n app.container.find('.step').css({'color': 'green'})\n }\n }\n }))\n\n /**\n * SECOND STEP\n */\n .addStep(new Step({\n name: 'second-step',\n next: 'third-step',\n methods: {\n beforeRender: (step) => {\n console.log('second-step beforeRender')\n return { status: true }\n },\n beforeNext: (step) => {\n console.log('second-step beforeNext')\n step.data.azaza = 'azaza'\n return { status: true }\n },\n onRender: (step) => {\n app.container.find('.step').css({'color': 'red'})\n }\n }\n }))\n\n /**\n * THIRD STEP\n */\n .addStep(new Step({\n name: 'third-step',\n methods: {\n beforeRender: (step) => {\n console.log('third-step beforeRender')\n return { status: true }\n },\n beforeNext: (step) => {\n console.log('third-step beforeNext')\n step.data.kek = 'kek'\n return { status: true }\n },\n onRender: (step) => {\n app.container.find('.step').css({'color': 'blue'})\n }\n }\n }))\n\n /**\n * FINISH\n */\n .addStep(new Step({\n name: 'finish',\n hide_progress: true,\n ignore_progress: true,\n methods: {\n beforeRender: (step) => {\n console.log('finish beforeRender')\n return { status: true }\n },\n beforeNext: (step) => {\n console.log('finish beforeNext')\n step.data.kek = 'kek'\n return { status: true }\n },\n onRender: (step) => { }\n }\n }))\n\n /**\n * GLOBAL\n */\n\n app.onFinish = () => {\n app.goToStep(app.step('finish'))\n console.log(app.collectData())\n }\n\n app.onProgress = (progress) => {\n app.container.find('.progress').html(Math.floor(progress) + '%')\n }\n\n app.onStepRender = (step) => {\n app.container.find('.step .next').click(function () {\n app.goNext()\n })\n app.container.find('.step .back').click(function () {\n app.goBack()\n })\n\n console.log(step)\n\n if (step.hide_progress) {\n app.container.find('.progress').hide()\n } else {\n app.container.find('.progress').show()\n }\n }\n\n app.init(first_step)\n\n})(window.app)\n"],"preExistingComment":"//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJjbGFzc2VzL1N0ZXAuanMiLCJjbGFzc2VzL1N0ZXBTeXN0ZW0uanMiLCJleGFtcGxlL2FwcC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7SUNBYSxJLFdBQUEsSTtBQUNYLGdCQUFhLE1BQWIsRUFBcUI7QUFBQTs7QUFDbkIsU0FBSyxNQUFMLEdBQWMsT0FBTyxNQUFQLElBQWlCLElBQS9CO0FBQ0EsU0FBSyxJQUFMLEdBQVksT0FBTyxJQUFuQjtBQUNBLFNBQUssSUFBTCxHQUFZLE9BQU8sSUFB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cbiAgICB9KVxuICAgIGFwcC5jb250YWluZXIuZmluZCgnLnN0ZXAgLmJhY2snKS5jbGljayhmdW5jdGlvbiAoKSB7XG4gICAgICBhcHAuZ29CYWNrKClcbiAgICB9KVxuXG4gICAgY29uc29sZS5sb2coc3RlcClcblxuICAgIGlmIChzdGVwLmhpZGVfcHJvZ3Jlc3MpIHtcbiAgICAgIGFwcC5jb250YWluZXIuZmluZCgnLnByb2dyZXNzJykuaGlkZSgpXG4gICAgfSBlbHNlIHtcbiAgICAgIGFwcC5jb250YWluZXIuZmluZCgnLnByb2dyZXNzJykuc2hvdygpXG4gICAgfVxuICB9XG5cbiAgYXBwLmluaXQoZmlyc3Rfc3RlcClcblxufSkod2luZG93LmFwcClcbiJdfQ=="} \ No newline at end of file diff --git a/example/dist/index.html b/example/dist/index.html index 375fae9..424b81e 100644 --- a/example/dist/index.html +++ b/example/dist/index.html @@ -7,22 +7,37 @@ template { display: none; } + .next, .back { + cursor: pointer; + color: #00f; + }
+
+ +