diff --git a/bower.json b/bower.json
index 6b5993e5..cb3a0ee2 100644
--- a/bower.json
+++ b/bower.json
@@ -34,7 +34,7 @@
"olark": "^1.0.0",
"jquery": "3.2.1",
"fancybox": "^2.1.6",
- "smalltalk": "2.3.1",
- "philip": "^1.3.7"
+ "philip": "^1.3.7",
+ "smalltalk": "2.4.0"
}
}
diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js
index 51813abe..9b6366b7 100644
--- a/client/modules/operation/index.js
+++ b/client/modules/operation/index.js
@@ -282,42 +282,43 @@ function OperationProto(operation, data) {
* @currentFile
*/
function promptDelete() {
- var type, isDir, msg,
- name = '',
- msgAsk = 'Do you really want to delete the ',
- msgSel = 'selected ',
- files = DOM.getSelectedFiles(),
- names = DOM.getFilenames(files),
- i,
- n = names.length,
- current = DOM.getCurrentFile();
+ const msgAsk = 'Do you really want to delete the ';
+ const msgSel = 'selected ';
+ const files = DOM.getSelectedFiles();
+ const names = DOM.getFilenames(files);
+ const n = names.length;
+
+ let msg;
if (n) {
- for (i = 0; i < 5 && i < n; i++)
+ let name = '';
+
+ for (let i = 0; i < 5 && i < n; i++)
name += '\n' + names[i];
if (n >= 5)
- name += '\n...';
+ name += '\n...';
- msg = msgAsk + msgSel + n + ' files/directories?\n' + name ;
+ msg = msgAsk + msgSel + n + ' files/directories?\n' + name ;
} else {
- isDir = DOM.isCurrentIsDir(current);
+ const current = DOM.getCurrentFile();
+ const isDir = DOM.isCurrentIsDir(current);
+ const getType = (isDir) => {
+ return isDir ? 'directory' : 'file';
+ };
- if (isDir)
- type = 'directory';
- else
- type = 'file';
-
- type += ' ';
+ const type = getType(isDir) + ' ';
- name = DOM.getCurrentName(current);
- msg = msgAsk + msgSel + type + name + '?';
+ const name = DOM.getCurrentName(current);
+ msg = msgAsk + msgSel + type + name + '?';
}
if (name === '..')
return Dialog.alert.noFiles(TITLE);
- Dialog.confirm(TITLE, msg, {cancel: false}).then(() => {
+ const cancel = false;
+
+ Dialog.confirm(TITLE, msg, {cancel}).then(() => {
deleteSilent(files);
});
}
diff --git a/modules/smalltalk/.bower.json b/modules/smalltalk/.bower.json
index 8ca9e5ff..16dee48a 100644
--- a/modules/smalltalk/.bower.json
+++ b/modules/smalltalk/.bower.json
@@ -25,14 +25,15 @@
"webpack.config.js"
],
"dependencies": {},
- "version": "2.3.1",
- "_release": "2.3.1",
+ "version": "2.4.0",
+ "_release": "2.4.0",
"_resolution": {
"type": "version",
- "tag": "v2.3.1",
- "commit": "fffdfc6c567ae774f6fbf033b74788aa366317dc"
+ "tag": "v2.4.0",
+ "commit": "139e85897ade65568161ed89e17f46a8da9bd9b1"
},
"_source": "https://github.com/coderaiser/smalltalk.git",
- "_target": "2.3.1",
- "_originalSource": "smalltalk"
+ "_target": "^2.4.0",
+ "_originalSource": "smalltalk",
+ "_direct": true
}
\ No newline at end of file
diff --git a/modules/smalltalk/ChangeLog b/modules/smalltalk/ChangeLog
index c05b1ffa..20165c78 100644
--- a/modules/smalltalk/ChangeLog
+++ b/modules/smalltalk/ChangeLog
@@ -1,3 +1,12 @@
+2017.05.23, v2.4.0
+
+feature:
+- (smalltalk) add ability to encode new lines in message
+- (smalltalk) .content-area: rm max-width: forced new lines
+- (smalltalk) store -> fullstore
+- (package) rm unused glob
+
+
2017.05.17, v2.3.1
feature:
diff --git a/modules/smalltalk/css/smalltalk.css b/modules/smalltalk/css/smalltalk.css
index 7f5adc35..f0e425c4 100644
--- a/modules/smalltalk/css/smalltalk.css
+++ b/modules/smalltalk/css/smalltalk.css
@@ -77,7 +77,6 @@
padding: 6px 17px;
position: relative;
- max-width: 500px;
}
.smalltalk .page .action-area {
diff --git a/modules/smalltalk/dist/smalltalk.min.css b/modules/smalltalk/dist/smalltalk.min.css
index f52dbba9..4813d9ee 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 .page .content-area,.smalltalk .page header{overflow:hidden;text-overflow:ellipsis;max-width:500px}.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{white-space:nowrap;-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{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: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 fb8ac210..65ae0d60 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.i=function(n){return n},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=2)}([function(n,t){n.exports=es6-promise},function(n,t,e){n.exports=e(4)},function(n,t,e){"use strict";function r(n,t,e,r){return'
\n
\n
\n
\n '+t+"\n "+e+'\n
\n
\n
'+r.map(function(n,t){return""}).join("")+"\n
\n
\n
"}function o(n,t,e,o,u){var c=g(),i=g(),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)}),m=r(n,t,e,o);return a.innerHTML=m,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",v(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:m(),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 m();e(l(t,["input"]).reduce(function(n,t){return t.value},null)),m()}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(1),v=d(u),m=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 g=function(){var n=void 0;return function(){for(var t=arguments.length,e=Array(t),r=0;r=t.length)return t.apply(void 0,r(e));var i=function(){return n.apply(void 0,[t].concat(r(e),Array.prototype.slice.call(arguments)))},a=t.length-arguments.length;return c(i)[a]||i}}]);
+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.i=function(n){return n},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=3)}([function(n,t){n.exports=es6-promise},function(n,t,e){n.exports=e(5)},function(n,t,e){n.exports=e(6)},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(1),v=e(2),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,'',g,r)},t.confirm=function(n,t,e){return o(n,t,"",g,e)};var E=function(n,t){return t===n?0:t=t.length)return t.apply(void 0,r(e));var i=function(){return n.apply(void 0,[t].concat(r(e),Array.prototype.slice.call(arguments)))},a=t.length-arguments.length;return c(i)[a]||i}},function(n,t,e){"use strict";n.exports=function(){var n={};return function(t){return arguments.length?(n.value=t,t):n.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 c5979cd0..4b5cafca 100644
--- a/modules/smalltalk/dist/smalltalk.native.min.js
+++ b/modules/smalltalk/dist/smalltalk.native.min.js
@@ -1,2 +1,2 @@
-var smalltalk=function(n){function r(e){if(t[e])return t[e].exports;var o=t[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var t={};return r.m=n,r.c=t,r.i=function(n){return n},r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:e})},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,"a",t),t},r.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},r.p="",r(r.s=3)}([function(n,r){n.exports=es6-promise},,,function(n,r,t){"use strict";window.Promise=window.Promise||t(0),r.alert=function(n,r){return new Promise(function(n){alert(r),n()})},r.prompt=function(n,r,t,e){var o=e;return new Promise(function(n,e){var u=o&&!o.cancel,i=prompt(r,t);if(null!==i)return n(i);u||e()})},r.confirm=function(n,r,t){var e=t,o=e&&!e.cancel;return new Promise(function(n,t){if(confirm(r)||o)return n();t()})}}]);
+var smalltalk=function(n){function r(e){if(t[e])return t[e].exports;var o=t[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var t={};return r.m=n,r.c=t,r.i=function(n){return n},r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:e})},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,"a",t),t},r.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},r.p="",r(r.s=4)}([function(n,r){n.exports=es6-promise},,,,function(n,r,t){"use strict";window.Promise=window.Promise||t(0),r.alert=function(n,r){return new Promise(function(n){alert(r),n()})},r.prompt=function(n,r,t,e){var o=e;return new Promise(function(n,e){var u=o&&!o.cancel,i=prompt(r,t);if(null!==i)return n(i);u||e()})},r.confirm=function(n,r,t){var e=t,o=e&&!e.cancel;return new Promise(function(n,t){if(confirm(r)||o)return n();t()})}}]);
//# 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 1997383e..68a7fa7f 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.i=function(t){return t},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=6)}([function(t,n,r){(function(n,e){!function(n,r){t.exports=r()}(0,function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}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+"\n "+e+'\n
\n \n
'+r.map(function(t,n){return""}).join("")+"\n
\n
\n "}function o(t,n,e,o,i){var u=_(),c=_(),a=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)}),d=r(t,n,e,o);return a.innerHTML=d,a.className="smalltalk",document.body.appendChild(a),f(a,["ok","input"]).forEach(function(t){return t.focus()}),f(a,["input"]).forEach(function(t){t.setSelectionRange(0,e.length)}),l("click",a,h,function(t){return s(t.target,a,u(),c())}),["click","contextmenu"].forEach(function(t){return a.addEventListener(t,function(){return f(a,["ok","input"]).forEach(function(t){return t.focus()})})}),a.addEventListener("keydown",v(a,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:s(l,t,n,e),r.preventDefault();break;case o.ESC:d(),e();break;case o.TAB:r.shiftKey&&a(t,p),a(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 a(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 s(t,n,e,r){if(/close|cancel/.test(t.getAttribute("data-name").replace("js-","")))return r(),void d();e(f(n,["input"]).reduce(function(t,n){return n.value},null)),d()}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(4),v=p(i),d=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,'',y,r)},n.confirm=function(t,n,e){return o(t,n,"",y,e)};var _=function(){var t=void 0;return function(){for(var n=arguments.length,e=Array(n),r=0;r=n.length)return n.apply(void 0,r(e));var c=function(){return t.apply(void 0,[n].concat(r(e),Array.prototype.slice.call(arguments)))},a=n.length-arguments.length;return u(c)[a]||c}}]);
+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.i=function(t){return t},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=6)}([function(t,n,e){(function(n,r){!function(n,e){t.exports=e()}(0,function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}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(4),v=e(5),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=n.length)return n.apply(void 0,r(e));var c=function(){return t.apply(void 0,[n].concat(r(e),Array.prototype.slice.call(arguments)))},s=n.length-arguments.length;return u(c)[s]||c}},function(t,n,e){"use strict";t.exports=function(){var t={};return function(n){return arguments.length?(t.value=n,n):t.value}}}]);
//# sourceMappingURL=smalltalk.poly.min.js.map
\ No newline at end of file
diff --git a/modules/smalltalk/lib/smalltalk.js b/modules/smalltalk/lib/smalltalk.js
index ead08640..2333d12c 100644
--- a/modules/smalltalk/lib/smalltalk.js
+++ b/modules/smalltalk/lib/smalltalk.js
@@ -3,6 +3,7 @@
window.Promise = window.Promise || require('es6-promise');
const currify = require('currify/legacy');
+const store = require('fullstore/legacy');
const keyDown = currify(keyDown_);
const remove = bind(removeEl, '.smalltalk');
@@ -26,11 +27,13 @@ exports.confirm = (title, msg, options) => {
};
function getTemplate(title, msg, value, buttons) {
+ const encodedMsg = msg.replace(/\n/g, '
');
+
return `
- ${ msg }
+ ${ encodedMsg }
${ value }
@@ -44,16 +47,6 @@ function getTemplate(title, msg, value, buttons) {
`;
}
-const store = () => {
- let a;
- return (...b) => {
- if (b.length)
- a = b.pop();
-
- return a;
- };
-};
-
function showDialog(title, msg, value, buttons, options) {
const ok = store();
const cancel = store();
diff --git a/modules/smalltalk/package.json b/modules/smalltalk/package.json
index bf3fb165..29448f49 100644
--- a/modules/smalltalk/package.json
+++ b/modules/smalltalk/package.json
@@ -1,6 +1,6 @@
{
"name": "smalltalk",
- "version": "2.3.1",
+ "version": "2.4.0",
"description": "Promise-based Alert, Confirm and Prompt replacement",
"homepage": "http://github.com/coderaiser/smalltalk",
"repository": {
@@ -32,7 +32,7 @@
"clean": "rimraf dist",
"wisdom": "npm run build",
"lint:css": "stylelint css/*.css",
- "lint:js": "jshint lib test && jscs lib test && eslint lib test",
+ "lint:js": "jshint lib test && jscs lib test && eslint lib test webpack.config.js",
"lint": "redrun lint:*",
"test": "tape 'test/**/*.js'"
},
@@ -54,7 +54,6 @@
"babel-preset-es2015": "^6.0.15",
"coveralls": "^2.11.11",
"eslint": "^3.0.1",
- "glob": "^7.1.1",
"jscs": "^3.0.3",
"jshint": "^2.8.0",
"nodemon": "^1.9.2",
@@ -72,6 +71,7 @@
},
"dependencies": {
"currify": "^2.0.3",
- "es6-promise": "^4.1.0"
+ "es6-promise": "^4.1.0",
+ "fullstore": "^1.0.0"
}
}