From 64028cbb8d0298414b309808102aa3f265ad4ac7 Mon Sep 17 00:00:00 2001 From: Karen Date: Tue, 16 May 2017 17:01:35 +0600 Subject: [PATCH 1/5] progress --- classes/StepSystem.js | 20 +++++++++++++++++++- example/app.js | 4 ++++ example/dist/app.js | 25 ++++++++++++++++++++++++- example/dist/app.js.map | 2 +- example/dist/index.html | 1 + 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/classes/StepSystem.js b/classes/StepSystem.js index 86adeaf..a75e57a 100644 --- a/classes/StepSystem.js +++ b/classes/StepSystem.js @@ -16,8 +16,10 @@ export class StepSystem { this._current_step = null this._container = container this.steps_past = [] - this.onFinish = null + this.progress = 0 this.commonHandlers = function () {} + this.onFinish = function () {} + this.onProgress = function () {} } /** @@ -63,6 +65,21 @@ export class StepSystem { } } + 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) + } + goNext () { let curr_step = this.current_step || {} let next_step = curr_step.next || null @@ -103,6 +120,7 @@ export class StepSystem { if (this.steps_past.indexOf(step.name) < 0) { this.steps_past.push(step.name) } + this.updateProgress() } collectData () { diff --git a/example/app.js b/example/app.js index 175b370..bd876db 100644 --- a/example/app.js +++ b/example/app.js @@ -84,6 +84,10 @@ window.app = new StepSystem($('.container')); console.log(app.collectData()) } + app.onProgress = (progress) => { + app.container.find('.progress').html(Math.floor(progress) + '%') + } + app.init(first_step) })(window.app) diff --git a/example/dist/app.js b/example/dist/app.js index 16f8363..8b7028e 100644 --- a/example/dist/app.js +++ b/example/dist/app.js @@ -93,8 +93,10 @@ var StepSystem = exports.StepSystem = function () { this._current_step = null; this._container = container; this.steps_past = []; - this.onFinish = null; + this.progress = 0; this.commonHandlers = function () {}; + this.onFinish = function () {}; + this.onProgress = function () {}; } /** @@ -134,6 +136,22 @@ var StepSystem = exports.StepSystem = function () { step.methods.onRender(); } } + }, { + 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: 'goNext', value: function goNext() { @@ -180,6 +198,7 @@ var StepSystem = exports.StepSystem = function () { if (this.steps_past.indexOf(step.name) < 0) { this.steps_past.push(step.name); } + this.updateProgress(); } }, { key: 'collectData', @@ -308,6 +327,10 @@ window.app = new _StepSystem.StepSystem($('.container')); console.log(app.collectData()); }; + app.onProgress = function (progress) { + app.container.find('.progress').html(Math.floor(progress) + '%'); + }; + app.init(first_step); })(window.app); diff --git a/example/dist/app.js.map b/example/dist/app.js.map index c443c12..e1d56f9 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,IAA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,WAAJ,EAAZ;AACD,GAFD;;AAIA,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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5v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W5kZXInKVxuICAgICAgICByZXR1cm4geyBzdGF0dXM6IHRydWUgfVxuICAgICAgfSxcbiAgICAgIGJlZm9yZU5leHQ6ICgpID0+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,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,YAAj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M,YADU;AAEhB,aAAS;AACP,oBAAc,wBAAM;AAClB,gBAAQ,GAAR,CAAY,yBAAZ;AACA,eAAO,EAAE,QAAQ,IAAV,EAAP;AACD,OAJM;AAKP,kBAAY,sBAAM;AAChB,gBAAQ,GAAR,CAAY,uBAAZ;AACA,YAAI,YAAJ,CAAiB,IAAjB,CAAsB,GAAtB,GAA4B,KAA5B;AACA,eAAO,EAAE,QAAQ,IAAV,EAAP;AACD,OATM;AAUP,gBAAU,oBAAM;AACd,YAAI,SAAJ,CAAc,IAAd,CAAmB,OAAnB,EAA4B,GAA5B,CAAgC,EAAC,SAAS,MAAV,EAAhC;AACD;AAZM;AAFO,GAAT,CAvDT;;AAyEA,MAAI,QAAJ,GAAe,YAAM;AACnB,YAAQ,GAAR,CAAY,IAAI,WAAJ,EAAZ;AACD,GAFD;;AAIA,MAAI,UAAJ,GAAiB,UAAC,QAAD,EAAc;AAC7B,QAAI,SAAJ,CAAc,IAAd,CAAmB,WAAnB,EAAgC,IAAhC,CAAqC,KAAK,KAAL,CAAW,QAAX,IAAuB,GAA5D;AACD,GAFD;;AAIA,MAAI,IAAJ,CAAS,UAAT;AAED,CAvFD,EAuFG,OAAO,GAvFV","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.onProgress = (progress) => {\n app.container.find('.progress').html(Math.floor(progress) + '%')\n }\n\n app.init(first_step)\n\n})(window.app)\n"],"preExistingComment":"//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJjbGFzc2VzL1N0ZXAuanMiLCJjbGFzc2VzL1N0ZXBTeXN0ZW0uanMiLCJleGFtcGxlL2FwcC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7SUNBYSxJLFdBQUEsSTtBQUNYLGdCQUFhLE1BQWIsRUFBcUI7QUFBQTs7QUFDbkIsU0FBSyxNQUFMLEdBQWMsT0FBTyxNQUFQLElBQWlCLElBQS9CO0FBQ0EsU0FBSyxJQUFMLEdBQVksT0FBTyxJQUFuQjtBQUNBLFNBQUssSUFBTCxHQUFZLE9BQU8sSUFBbkI7QUFDQSxTQUFLLE9BQUwsR0FBZSxPQUFP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XAgYmVmb3JlUmVuZGVyJylcbiAgICAgICAgcmV0dXJuIHsgc3RhdHVzOiB0cnVlIH1cbiAgICAgIH0sXG4gICAgICBiZWZvcmVOZXh0OiAoKSA9PiB7XG4gICAgICAgIGNvbnNvbGUubG9nKCd0aGlyZC1zdGVwIGJlZm9yZU5leHQnKVxuICAgICAgICBhcHAuY3VycmVudF9zdGVwLmRhdGEua2VrID0gJ2tlaydcbiAgICAgICAgcmV0dXJuIHsgc3RhdHVzOiB0cnVlIH1cbiAgICAgIH0sXG4gICAgICBvblJlbmRlcjogKCkgPT4ge1xuICAgICAgICBhcHAuY29udGFpbmVyLmZpbmQoJy5zdGVwJykuY3NzKHsnY29sb3InOiAnYmx1ZSd9KVxuICAgICAgfVxuICAgIH1cbiAgfSkpXG5cbiAgYXBwLm9uRmluaXNoID0gKCkgPT4ge1xuICAgIGNvbnNvbGUubG9nKGFwcC5jb2xsZWN0RGF0YSgpKVxuICB9XG5cbiAgYXBwLm9uUHJvZ3Jlc3MgPSAocHJvZ3Jlc3MpID0+IHtcbiAgICBhcHAuY29udGFpbmVyLmZpbmQoJy5wcm9ncmVzcycpLmh0bWwoTWF0aC5mbG9vcihwcm9ncmVzcykgKyAnJScpXG4gIH1cblxuICBhcHAuaW5pdChmaXJzdF9zdGVwKVxuXG59KSh3aW5kb3cuYXBwKVxuIl19"} \ No newline at end of file diff --git a/example/dist/index.html b/example/dist/index.html index 375fae9..2d7077b 100644 --- a/example/dist/index.html +++ b/example/dist/index.html @@ -11,6 +11,7 @@
+