diff --git a/bower.json b/bower.json
index 1c171e7f..1b31b25a 100644
--- a/bower.json
+++ b/bower.json
@@ -33,6 +33,6 @@
"olark": "^1.0.0",
"jquery": "3.2.1",
"fancybox": "^2.1.6",
- "smalltalk": "2.4.1"
+ "smalltalk": "2.4.2"
}
}
diff --git a/modules/smalltalk/.bower.json b/modules/smalltalk/.bower.json
index a1884c03..a409f10d 100644
--- a/modules/smalltalk/.bower.json
+++ b/modules/smalltalk/.bower.json
@@ -25,15 +25,15 @@
"webpack.config.js"
],
"dependencies": {},
- "version": "2.4.1",
- "_release": "2.4.1",
+ "version": "2.4.2",
+ "_release": "2.4.2",
"_resolution": {
"type": "version",
- "tag": "v2.4.1",
- "commit": "1c993e63d5228568515378487ef44069cce55911"
+ "tag": "v2.4.2",
+ "commit": "1d02d9673ddb41e2e31f1ade83aef48e3e5c905c"
},
"_source": "https://github.com/coderaiser/smalltalk.git",
- "_target": "^2.4.1",
+ "_target": "^2.4.2",
"_originalSource": "smalltalk",
"_direct": true
}
\ No newline at end of file
diff --git a/modules/smalltalk/ChangeLog b/modules/smalltalk/ChangeLog
index 51a54697..7d91857e 100644
--- a/modules/smalltalk/ChangeLog
+++ b/modules/smalltalk/ChangeLog
@@ -1,3 +1,16 @@
+2017.09.22, v2.4.2
+
+fix:
+- (smalltalk) confirm: no cancel
+- (smalltalk) native: prompt: cancel
+
+feature:
+- (package) babel-preset-env v1.6.0
+- (package) sinon v3.0.0
+- (package) stylelint-config-standard v17.0.0
+- (package) stylelint v8.0.0
+
+
2017.07.10, v2.4.1
fix:
diff --git a/modules/smalltalk/dist/smalltalk.min.css b/modules/smalltalk/dist/smalltalk.min.css
index 4813d9ee..d17b431b 100644
--- a/modules/smalltalk/dist/smalltalk.min.css
+++ b/modules/smalltalk/dist/smalltalk.min.css
@@ -1,2 +1,2 @@
-.smalltalk{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:.2s opacity;transition:.2s opacity;bottom:0;left:0;overflow:auto;padding:20px;position:fixed;right:0;top:0;z-index:100}.smalltalk+.smalltalk{-webkit-transition:ease 1s;transition:ease 1s;display:none}.smalltalk .page{border-radius:3px;background:#fff;-webkit-box-shadow:0 4px 23px 5px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.15);box-shadow:0 4px 23px 5px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.15);color:#333;min-width:400px;padding:0;position:relative;z-index:0}@media only screen and (max-width:500px){.smalltalk .page{min-width:0}}.smalltalk .page>.close-button{background-image:url(../img/IDR_CLOSE_DIALOG.png);background-position:center;background-repeat:no-repeat;height:14px;position:absolute;right:7px;top:7px;width:14px;z-index:1}.smalltalk .page>.close-button:hover{background-image:url(../img/IDR_CLOSE_DIALOG_H.png)}.smalltalk .page header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:500px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#333;font-size:120%;font-weight:700;margin:0;padding:14px 17px;text-shadow:#fff 0 1px 2px}.smalltalk .page .content-area{overflow:hidden;text-overflow:ellipsis;padding:6px 17px;position:relative}.smalltalk .page .action-area{padding:14px 17px}.smalltalk .page .button-strip{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.smalltalk .page .button-strip>button{margin-left:10px}.smalltalk button:enabled:active{background-image:-webkit-gradient(linear,left top,left bottom,from(#e7e7e7),color-stop(38%,#e7e7e7),to(#d7d7d7));background-image:linear-gradient(#e7e7e7,#e7e7e7 38%,#d7d7d7);-webkit-box-shadow:none;box-shadow:none;text-shadow:none}.smalltalk .smalltalk,.smalltalk button{min-height:2em;min-width:4em}.smalltalk button::-moz-focus-inner{border:0}.smalltalk button{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:-webkit-gradient(linear,left top,left bottom,from(#ededed),color-stop(38%,#ededed),to(#dedede));background-image:linear-gradient(#ededed,#ededed 38%,#dedede);border:1px solid rgba(0,0,0,.25);border-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08),inset 0 1px 2px rgba(255,255,255,.75);box-shadow:0 1px 0 rgba(0,0,0,.08),inset 0 1px 2px rgba(255,255,255,.75);color:#444;font:inherit;margin:0 1px 0 0;text-shadow:0 1px 0 #f0f0f0}.smalltalk button:enabled:focus,.smalltalk input:enabled:focus{-webkit-transition:border-color .2s;transition:border-color .2s;border-color:#4d90fe;outline:0}.smalltalk input{width:100%;border:1px solid #bfbfbf;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#444;font:inherit;margin:0;min-height:2em;padding:3px;outline:0}button{font-family:Ubuntu,Arial,sans-serif}
+.smalltalk{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:.2s opacity;transition:.2s opacity;bottom:0;left:0;overflow:auto;padding:20px;position:fixed;right:0;top:0;z-index:100}.smalltalk+.smalltalk{-webkit-transition:ease 1s;transition:ease 1s;display:none}.smalltalk .page{border-radius:3px;background:#fff;-webkit-box-shadow:0 4px 23px 5px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.15);box-shadow:0 4px 23px 5px rgba(0,0,0,.2),0 2px 6px rgba(0,0,0,.15);color:#333;min-width:400px;padding:0;position:relative;z-index:0}@media only screen and (max-width:500px){.smalltalk .page{min-width:0}}.smalltalk .page>.close-button{background-image:url(../img/IDR_CLOSE_DIALOG.png);background-position:center;background-repeat:no-repeat;height:14px;position:absolute;right:7px;top:7px;width:14px;z-index:1}.smalltalk .page>.close-button:hover{background-image:url(../img/IDR_CLOSE_DIALOG_H.png)}.smalltalk .page header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:500px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#333;font-size:120%;font-weight:700;margin:0;padding:14px 17px;text-shadow:#fff 0 1px 2px}.smalltalk .page .content-area{overflow:hidden;text-overflow:ellipsis;padding:6px 17px;position:relative}.smalltalk .page .action-area{padding:14px 17px}.smalltalk .page .button-strip{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.smalltalk .page .button-strip>button{margin-left:10px}.smalltalk button:enabled:focus,.smalltalk input:enabled:focus{-webkit-transition:border-color .2s;transition:border-color .2s;border-color:#4d90fe;outline:0}.smalltalk button:enabled:active{background-image:-webkit-gradient(linear,left top,left bottom,from(#e7e7e7),color-stop(38%,#e7e7e7),to(#d7d7d7));background-image:linear-gradient(#e7e7e7,#e7e7e7 38%,#d7d7d7);-webkit-box-shadow:none;box-shadow:none;text-shadow:none}.smalltalk .smalltalk,.smalltalk button{min-height:2em;min-width:4em}.smalltalk button::-moz-focus-inner{border:0}.smalltalk button{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:-webkit-gradient(linear,left top,left bottom,from(#ededed),color-stop(38%,#ededed),to(#dedede));background-image:linear-gradient(#ededed,#ededed 38%,#dedede);border:1px solid rgba(0,0,0,.25);border-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08),inset 0 1px 2px rgba(255,255,255,.75);box-shadow:0 1px 0 rgba(0,0,0,.08),inset 0 1px 2px rgba(255,255,255,.75);color:#444;font:inherit;margin:0 1px 0 0;text-shadow:0 1px 0 #f0f0f0}.smalltalk button:enabled:focus,.smalltalk input:enabled:focus{-webkit-transition:border-color .2s;transition:border-color .2s;border-color:#4d90fe;outline:0}.smalltalk input{width:100%;border:1px solid #bfbfbf;border-radius:2px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#444;font:inherit;margin:0;min-height:2em;padding:3px;outline:0}button{font-family:Ubuntu,Arial,sans-serif}
/*# sourceMappingURL=smalltalk.min.css.map */
\ No newline at end of file
diff --git a/modules/smalltalk/dist/smalltalk.min.js b/modules/smalltalk/dist/smalltalk.min.js
index 3654bd5c..3d611f8d 100644
--- a/modules/smalltalk/dist/smalltalk.min.js
+++ b/modules/smalltalk/dist/smalltalk.min.js
@@ -1,2 +1,2 @@
-var smalltalk=function(n){function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=1)}([function(n,t){n.exports=es6-promise},function(n,t,e){"use strict";function r(n,t,e,r){return'
\n
\n
\n
\n '+t.replace(/\n/g,"
")+"\n "+e+'\n
\n
\n
'+r.map(function(n,t){return""}).join("")+"\n
\n
\n
"}function o(n,t,e,o,u){var c=v(),i=v(),a=document.createElement("div"),p=["cancel","close","ok"],d=new Promise(function(n,t){var e=u&&!u.cancel,r=function(){};c(n),i(e?r:t)}),h=r(n,t,e,o);return a.innerHTML=h,a.className="smalltalk",document.body.appendChild(a),l(a,["ok","input"]).forEach(function(n){return n.focus()}),l(a,["input"]).forEach(function(n){n.setSelectionRange(0,e.length)}),s("click",a,p,function(n){return f(n.target,a,c(),i())}),["click","contextmenu"].forEach(function(n){return a.addEventListener(n,function(){return l(a,["ok","input"]).forEach(function(n){return n.focus()})})}),a.addEventListener("keydown",m(a,c(),i())),d}function u(n,t,e,r){var o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},u=r.keyCode,s=r.target,p=["ok","cancel","input"],d=l(n,p).map(c);switch(u){case o.ENTER:f(s,n,t,e),r.preventDefault();break;case o.ESC:h(),e();break;case o.TAB:r.shiftKey&&a(n,d),a(n,d),r.preventDefault();break;default:["left","right","up","down"].filter(function(n){return u===o[n.toUpperCase()]}).forEach(function(){i(n,d)})}r.stopPropagation()}function c(n){return n.getAttribute("data-name").replace("js-","")}function i(n,t){var e=document.activeElement,r=c(e),o=/ok|cancel/.test(r),u=t.length-1;if("input"!==r&&u&&o){l(n,[function(n){return"cancel"===n?"ok":"cancel"}(r)]).forEach(function(n){n.focus()})}}function a(n,t){var e=document.activeElement,r=c(e),o=t.length-1,u=t.indexOf(r);l(n,[t[E(o,u)]]).forEach(function(n){return n.focus()})}function f(n,t,e,r){if(/close|cancel/.test(n.getAttribute("data-name").replace("js-","")))return r(),void h();e(l(t,["input"]).reduce(function(n,t){return t.value},null)),h()}function l(n,t){var e=function(n){return n};return t.map(function(t){return n.querySelector('[data-name="js-'+t+'"]')}).filter(e)}function s(n,t,e,r){l(t,e).forEach(function(t){return t.addEventListener(n,r)})}function p(n){var t=document.querySelector(n);t.parentElement.removeChild(t)}window.Promise=window.Promise||e(0);var d=e(2),v=e(4),m=d(u),h=function(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3];return o(n,t,'',y,r)},t.confirm=function(n,t,e){return o(n,t,"",y,e)};var E=function(n,t){return t===n?0:t+1}},function(n,t,e){n.exports=e(3)},function(n,t,e){"use strict";function r(n){if("function"!=typeof n)throw Error("fn should be function!")}var o=function(n){return[function(t){return n.apply(void 0,arguments)},function(t,e){return n.apply(void 0,arguments)},function(t,e,r){return n.apply(void 0,arguments)},function(t,e,r,o){return n.apply(void 0,arguments)},function(t,e,r,o,u){return n.apply(void 0,arguments)}]};n.exports=function n(t){for(var e=arguments.length,u=Array(e>1?e-1:0),c=1;c=t.length)return t.apply(void 0,u);var i=function(){return n.apply(void 0,[t].concat(u,Array.prototype.slice.call(arguments)))},a=t.length-u.length-1;return o(i)[a]||i}},function(n,t,e){n.exports=e(5)},function(n,t,e){"use strict";n.exports=function(){var n={};return function(t){return arguments.length?(n.value=t,t):n.value}}}]);
+var smalltalk=function(n){function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=1)}([function(n,t){n.exports=es6-promise},function(n,t,e){"use strict";function r(n,t,e,r){return'\n
\n
\n
\n '+t.replace(/\n/g,"
")+"\n "+e+'\n
\n
\n
'+r.map(function(n,t){return""}).join("")+"\n
\n
\n
"}function o(n,t,e,o,u){var c=v(),a=v(),i=document.createElement("div"),p=["cancel","close","ok"],d=new Promise(function(n,t){var e=u&&!u.cancel,r=function(){};c(n),a(e?r:t)}),h=r(n,t,e,o);return i.innerHTML=h,i.className="smalltalk",document.body.appendChild(i),l(i,["ok","input"]).forEach(function(n){return n.focus()}),l(i,["input"]).forEach(function(n){n.setSelectionRange(0,e.length)}),s("click",i,p,function(n){return f(n.target,i,c(),a())}),["click","contextmenu"].forEach(function(n){return i.addEventListener(n,function(){return l(i,["ok","input"]).forEach(function(n){return n.focus()})})}),i.addEventListener("keydown",m(i,c(),a())),d}function u(n,t,e,r){var o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},u=r.keyCode,s=r.target,p=["ok","cancel","input"],d=l(n,p).map(c);switch(u){case o.ENTER:f(s,n,t,e),r.preventDefault();break;case o.ESC:h(),e();break;case o.TAB:r.shiftKey&&i(n,d),i(n,d),r.preventDefault();break;default:["left","right","up","down"].filter(function(n){return u===o[n.toUpperCase()]}).forEach(function(){a(n,d)})}r.stopPropagation()}function c(n){return n.getAttribute("data-name").replace("js-","")}function a(n,t){var e=document.activeElement,r=c(e),o=/ok|cancel/.test(r),u=t.length-1;if("input"!==r&&u&&o){l(n,[function(n){return"cancel"===n?"ok":"cancel"}(r)]).forEach(function(n){n.focus()})}}function i(n,t){var e=document.activeElement,r=c(e),o=t.length-1,u=t.indexOf(r);l(n,[t[E(o,u)]]).forEach(function(n){return n.focus()})}function f(n,t,e,r){if(/close|cancel/.test(n.getAttribute("data-name").replace("js-","")))return r(),void h();e(l(t,["input"]).reduce(function(n,t){return t.value},null)),h()}function l(n,t){var e=function(n){return n};return t.map(function(t){return n.querySelector('[data-name="js-'+t+'"]')}).filter(e)}function s(n,t,e,r){l(t,e).forEach(function(t){return t.addEventListener(n,r)})}function p(n){var t=document.querySelector(n);t.parentElement.removeChild(t)}window.Promise=window.Promise||e(0);var d=e(2),v=e(4),m=d(u),h=function(n){for(var t=arguments.length,e=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3];return o(n,t,'',y,r)},t.confirm=function(n,t,e){return o(n,t,"",y,e)};var E=function(n,t){return t===n?0:t+1}},function(n,t,e){n.exports=e(3)},function(n,t,e){"use strict";function r(n){if("function"!=typeof n)throw Error("fn should be function!")}var o=function(n){return[function(t){return n.apply(void 0,arguments)},function(t,e){return n.apply(void 0,arguments)},function(t,e,r){return n.apply(void 0,arguments)},function(t,e,r,o){return n.apply(void 0,arguments)},function(t,e,r,o,u){return n.apply(void 0,arguments)}]};n.exports=function n(t){for(var e=arguments.length,u=Array(e>1?e-1:0),c=1;c=t.length)return t.apply(void 0,u);var a=function(){return n.apply(void 0,[t].concat(u,Array.prototype.slice.call(arguments)))},i=t.length-u.length-1;return o(a)[i]||a}},function(n,t,e){n.exports=e(5)},function(n,t,e){"use strict";n.exports=function(n){var t={value:n};return function(n){return arguments.length?(t.value=n,n):t.value}}}]);
//# sourceMappingURL=smalltalk.min.js.map
\ No newline at end of file
diff --git a/modules/smalltalk/dist/smalltalk.native.min.js b/modules/smalltalk/dist/smalltalk.native.min.js
index e67236d2..a95d9321 100644
--- a/modules/smalltalk/dist/smalltalk.native.min.js
+++ b/modules/smalltalk/dist/smalltalk.native.min.js
@@ -1,2 +1,2 @@
-var smalltalk=function(r){function n(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return r[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=r,n.c=e,n.d=function(r,e,t){n.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:t})},n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,"a",e),e},n.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},n.p="",n(n.s=6)}({0:function(r,n){r.exports=es6-promise},6:function(r,n,e){"use strict";window.Promise=window.Promise||e(0),n.alert=function(r,n){return new Promise(function(r){alert(n),r()})},n.prompt=function(r,n,e,t){var o=t;return new Promise(function(r,t){var i=o&&!o.cancel,u=prompt(n,e);if(!i)return null!==u?r(u):void t()})},n.confirm=function(r,n,e){var t=e,o=t&&!t.cancel;return new Promise(function(r,e){var t=confirm(n);if(!o)return t?r():void e()})}}});
+var smalltalk=function(n){function r(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var e={};return r.m=n,r.c=e,r.d=function(n,e,t){r.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:t})},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,"a",e),e},r.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},r.p="",r(r.s=6)}({0:function(n,r){n.exports=es6-promise},6:function(n,r,e){"use strict";window.Promise=window.Promise||e(0),r.alert=function(n,r){return new Promise(function(n){alert(r),n()})},r.prompt=function(n,r,e,t){var o=t;return new Promise(function(n,t){var u=o&&!o.cancel,i=prompt(r,e);if(null!==i)return n(i);u||t()})},r.confirm=function(n,r,e){var t=e,o=t&&!t.cancel;return new Promise(function(n,e){if(confirm(r))return n();o||e()})}}});
//# sourceMappingURL=smalltalk.native.min.js.map
\ No newline at end of file
diff --git a/modules/smalltalk/dist/smalltalk.native.poly.min.js b/modules/smalltalk/dist/smalltalk.native.poly.min.js
index c3627092..08ee20c3 100644
--- a/modules/smalltalk/dist/smalltalk.native.poly.min.js
+++ b/modules/smalltalk/dist/smalltalk.native.poly.min.js
@@ -1,2 +1,2 @@
-var smalltalk=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=9)}([function(t,n,r){(function(n,e){!function(n,r){t.exports=r()}(0,function(){"use strict";function t(t){var n=typeof t;return null!==t&&("object"===n||"function"===n)}function o(t){return"function"==typeof t}function i(t){H=t}function u(t){I=t}function s(){return void 0!==G?function(){G(a)}:c()}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t1)for(var r=1;r1)for(var r=1;r1)for(var e=1;e\n \n \n \n '+n.replace(/\n/g,"
")+"\n "+e+'\n
\n \n
'+r.map(function(t,n){return""}).join("")+"\n
\n
\n "}function o(t,n,e,o,i){var u=v(),c=v(),s=document.createElement("div"),h=["cancel","close","ok"],p=new Promise(function(t,n){var e=i&&!i.cancel,r=function(){};u(t),c(e?r:n)}),m=r(t,n,e,o);return s.innerHTML=m,s.className="smalltalk",document.body.appendChild(s),f(s,["ok","input"]).forEach(function(t){return t.focus()}),f(s,["input"]).forEach(function(t){t.setSelectionRange(0,e.length)}),l("click",s,h,function(t){return a(t.target,s,u(),c())}),["click","contextmenu"].forEach(function(t){return s.addEventListener(t,function(){return f(s,["ok","input"]).forEach(function(t){return t.focus()})})}),s.addEventListener("keydown",d(s,u(),c())),p}function i(t,n,e,r){var o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},i=r.keyCode,l=r.target,h=["ok","cancel","input"],p=f(t,h).map(u);switch(i){case o.ENTER:a(l,t,n,e),r.preventDefault();break;case o.ESC:m(),e();break;case o.TAB:r.shiftKey&&s(t,p),s(t,p),r.preventDefault();break;default:["left","right","up","down"].filter(function(t){return i===o[t.toUpperCase()]}).forEach(function(){c(t,p)})}r.stopPropagation()}function u(t){return t.getAttribute("data-name").replace("js-","")}function c(t,n){var e=document.activeElement,r=u(e),o=/ok|cancel/.test(r),i=n.length-1;if("input"!==r&&i&&o){f(t,[function(t){return"cancel"===t?"ok":"cancel"}(r)]).forEach(function(t){t.focus()})}}function s(t,n){var e=document.activeElement,r=u(e),o=n.length-1,i=n.indexOf(r);f(t,[n[g(o,i)]]).forEach(function(t){return t.focus()})}function a(t,n,e,r){if(/close|cancel/.test(t.getAttribute("data-name").replace("js-","")))return r(),void m();e(f(n,["input"]).reduce(function(t,n){return n.value},null)),m()}function f(t,n){var e=function(t){return t};return n.map(function(n){return t.querySelector('[data-name="js-'+n+'"]')}).filter(e)}function l(t,n,e,r){f(n,e).forEach(function(n){return n.addEventListener(t,r)})}function h(t){var n=document.querySelector(t);n.parentElement.removeChild(n)}window.Promise=window.Promise||e(0);var p=e(5),v=e(7),d=p(i),m=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3];return o(t,n,'',_,r)},n.confirm=function(t,n,e){return o(t,n,"",_,e)};var g=function(t,n){return n===t?0:n+1}},function(t,n,e){t.exports=e(6)},function(t,n,e){"use strict";function r(t){if("function"!=typeof t)throw Error("fn should be function!")}var o=function(t){return[function(n){return t.apply(void 0,arguments)},function(n,e){return t.apply(void 0,arguments)},function(n,e,r){return t.apply(void 0,arguments)},function(n,e,r,o){return t.apply(void 0,arguments)},function(n,e,r,o,i){return t.apply(void 0,arguments)}]};t.exports=function t(n){for(var e=arguments.length,i=Array(e>1?e-1:0),u=1;u=n.length)return n.apply(void 0,i);var c=function(){return t.apply(void 0,[n].concat(i,Array.prototype.slice.call(arguments)))},s=n.length-i.length-1;return o(c)[s]||c}},function(t,n,e){t.exports=e(8)},function(t,n,e){"use strict";t.exports=function(){var t={};return function(n){return arguments.length?(t.value=n,n):t.value}}}]);
+var smalltalk=function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=4)}([function(t,n,e){(function(n,r){!function(n,e){t.exports=e()}(0,function(){"use strict";function t(t){var n=typeof t;return null!==t&&("object"===n||"function"===n)}function o(t){return"function"==typeof t}function i(t){G=t}function u(t){I=t}function c(){return void 0!==W?function(){W(a)}:s()}function s(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t1)for(var e=1;e\n \n \n \n '+n.replace(/\n/g,"
")+"\n "+e+'\n
\n \n
'+r.map(function(t,n){return""}).join("")+"\n
\n
\n "}function o(t,n,e,o,i){var u=v(),c=v(),s=document.createElement("div"),h=["cancel","close","ok"],p=new Promise(function(t,n){var e=i&&!i.cancel,r=function(){};u(t),c(e?r:n)}),m=r(t,n,e,o);return s.innerHTML=m,s.className="smalltalk",document.body.appendChild(s),f(s,["ok","input"]).forEach(function(t){return t.focus()}),f(s,["input"]).forEach(function(t){t.setSelectionRange(0,e.length)}),l("click",s,h,function(t){return a(t.target,s,u(),c())}),["click","contextmenu"].forEach(function(t){return s.addEventListener(t,function(){return f(s,["ok","input"]).forEach(function(t){return t.focus()})})}),s.addEventListener("keydown",d(s,u(),c())),p}function i(t,n,e,r){var o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},i=r.keyCode,l=r.target,h=["ok","cancel","input"],p=f(t,h).map(u);switch(i){case o.ENTER:a(l,t,n,e),r.preventDefault();break;case o.ESC:m(),e();break;case o.TAB:r.shiftKey&&s(t,p),s(t,p),r.preventDefault();break;default:["left","right","up","down"].filter(function(t){return i===o[t.toUpperCase()]}).forEach(function(){c(t,p)})}r.stopPropagation()}function u(t){return t.getAttribute("data-name").replace("js-","")}function c(t,n){var e=document.activeElement,r=u(e),o=/ok|cancel/.test(r),i=n.length-1;if("input"!==r&&i&&o){f(t,[function(t){return"cancel"===t?"ok":"cancel"}(r)]).forEach(function(t){t.focus()})}}function s(t,n){var e=document.activeElement,r=u(e),o=n.length-1,i=n.indexOf(r);f(t,[n[g(o,i)]]).forEach(function(t){return t.focus()})}function a(t,n,e,r){if(/close|cancel/.test(t.getAttribute("data-name").replace("js-","")))return r(),void m();e(f(n,["input"]).reduce(function(t,n){return n.value},null)),m()}function f(t,n){var e=function(t){return t};return n.map(function(n){return t.querySelector('[data-name="js-'+n+'"]')}).filter(e)}function l(t,n,e,r){f(n,e).forEach(function(n){return n.addEventListener(t,r)})}function h(t){var n=document.querySelector(t);n.parentElement.removeChild(n)}window.Promise=window.Promise||e(0);var p=e(5),v=e(7),d=p(i),m=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3];return o(t,n,'',_,r)},n.confirm=function(t,n,e){return o(t,n,"",_,e)};var g=function(t,n){return n===t?0:n+1}},function(t,n,e){t.exports=e(6)},function(t,n,e){"use strict";function r(t){if("function"!=typeof t)throw Error("fn should be function!")}var o=function(t){return[function(n){return t.apply(void 0,arguments)},function(n,e){return t.apply(void 0,arguments)},function(n,e,r){return t.apply(void 0,arguments)},function(n,e,r,o){return t.apply(void 0,arguments)},function(n,e,r,o,i){return t.apply(void 0,arguments)}]};t.exports=function t(n){for(var e=arguments.length,i=Array(e>1?e-1:0),u=1;u=n.length)return n.apply(void 0,i);var c=function(){return t.apply(void 0,[n].concat(i,Array.prototype.slice.call(arguments)))},s=n.length-i.length-1;return o(c)[s]||c}},function(t,n,e){t.exports=e(8)},function(t,n,e){"use strict";t.exports=function(t){var n={value:t};return function(t){return arguments.length?(n.value=t,t):n.value}}}]);
//# sourceMappingURL=smalltalk.poly.min.js.map
\ No newline at end of file
diff --git a/modules/smalltalk/lib/smalltalk.native.js b/modules/smalltalk/lib/smalltalk.native.js
index be5b3940..e9630d5c 100644
--- a/modules/smalltalk/lib/smalltalk.native.js
+++ b/modules/smalltalk/lib/smalltalk.native.js
@@ -17,12 +17,12 @@ exports.prompt = (title, message, value, options) => {
const noCancel = o && !o.cancel;
const result = prompt(message, value);
- if (noCancel)
- return;
-
if (result !== null)
return resolve(result);
+ if (noCancel)
+ return;
+
reject();
});
@@ -35,12 +35,12 @@ exports.confirm = (title, message, options) => {
const promise = new Promise((resolve, reject) => {
const is = confirm(message);
- if (noCancel)
- return;
-
if (is)
return resolve();
+ if (noCancel)
+ return;
+
reject();
});
diff --git a/modules/smalltalk/package.json b/modules/smalltalk/package.json
index feb8d238..5acf6af5 100644
--- a/modules/smalltalk/package.json
+++ b/modules/smalltalk/package.json
@@ -1,6 +1,6 @@
{
"name": "smalltalk",
- "version": "2.4.1",
+ "version": "2.4.2",
"description": "Promise-based Alert, Confirm and Prompt replacement",
"homepage": "http://github.com/coderaiser/smalltalk",
"repository": {
@@ -51,7 +51,7 @@
"autoprefixer": "^7.0.1",
"babel-cli": "^6.1.1",
"babel-loader": "^7.0.0",
- "babel-preset-es2015": "^6.0.15",
+ "babel-preset-env": "^1.6.0",
"coveralls": "^2.11.11",
"eslint": "^4.0.0",
"jscs": "^3.0.3",
@@ -62,9 +62,9 @@
"postcss-cli": "^4.0.0",
"redrun": "^5.0.1",
"rimraf": "^2.5.3",
- "sinon": "^2.0.0",
- "stylelint": "^7.0.2",
- "stylelint-config-standard": "^16.0.0",
+ "sinon": "^3.0.0",
+ "stylelint": "^8.0.0",
+ "stylelint-config-standard": "^17.0.0",
"systemjs": "^0.20.2",
"tape": "^4.6.0",
"webpack": "^3.0.0"