mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(bower) smalltalk v2.4.0
This commit is contained in:
parent
c41efde6a6
commit
f5da939bfa
12 changed files with 54 additions and 51 deletions
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@
|
|||
|
||||
padding: 6px 17px;
|
||||
position: relative;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.smalltalk .page .action-area {
|
||||
|
|
|
|||
2
modules/smalltalk/dist/smalltalk.min.css
vendored
2
modules/smalltalk/dist/smalltalk.min.css
vendored
|
|
@ -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 */
|
||||
2
modules/smalltalk/dist/smalltalk.min.js
vendored
2
modules/smalltalk/dist/smalltalk.min.js
vendored
|
|
@ -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'<div class="page">\n <div data-name="js-close" class="close-button"></div>\n <header>'+n+'</header>\n <div class="content-area">\n '+t+"\n "+e+'\n </div>\n <div class="action-area">\n <div class="button-strip"> '+r.map(function(n,t){return"<button tabindex="+t+' data-name="js-'+n.toLowerCase()+'">'+n+"</button>"}).join("")+"\n </div>\n </div>\n </div>"}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;r<t;r++)e[r-1]=arguments[r];return function(){return n.apply(void 0,e)}}(p,".smalltalk"),h=["OK"],y=["OK","Cancel"];t.alert=function(n,t){return o(n,t,"",h,{cancel:!1})},t.prompt=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3];return o(n,t,'<input type="text" value="'+String(e).replace(/\"/g,""")+'" data-name="js-input">',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;r++)e[r]=arguments[r];return e.length&&(n=e.pop()),n}},E=function(n,t){return t===n?0:t<n?t+1:void 0}},,function(n,t,e){"use strict";function r(n){if(Array.isArray(n)){for(var t=0,e=Array(n.length);t<n.length;t++)e[t]=n[t];return e}return Array.from(n)}function o(n){if("function"!=typeof n)throw Error("fn should be function!")}var u=function(n){return[].slice.call(n,1)},c=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){o(t);var e=u(arguments);if(e.length>=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'<div class="page">\n <div data-name="js-close" class="close-button"></div>\n <header>'+n+'</header>\n <div class="content-area">\n '+t.replace(/\n/g,"<br>")+"\n "+e+'\n </div>\n <div class="action-area">\n <div class="button-strip"> '+r.map(function(n,t){return"<button tabindex="+t+' data-name="js-'+n.toLowerCase()+'">'+n+"</button>"}).join("")+"\n </div>\n </div>\n </div>"}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;r<t;r++)e[r-1]=arguments[r];return function(){return n.apply(void 0,e)}}(p,".smalltalk"),y=["OK"],g=["OK","Cancel"];t.alert=function(n,t){return o(n,t,"",y,{cancel:!1})},t.prompt=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3];return o(n,t,'<input type="text" value="'+String(e).replace(/\"/g,""")+'" data-name="js-input">',g,r)},t.confirm=function(n,t,e){return o(n,t,"",g,e)};var E=function(n,t){return t===n?0:t<n?t+1:void 0}},,function(n,t,e){"use strict";function r(n){if(Array.isArray(n)){for(var t=0,e=Array(n.length);t<n.length;t++)e[t]=n[t];return e}return Array.from(n)}function o(n){if("function"!=typeof n)throw Error("fn should be function!")}var u=function(n){return[].slice.call(n,1)},c=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){o(t);var e=u(arguments);if(e.length>=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
|
||||
|
|
@ -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
|
||||
File diff suppressed because one or more lines are too long
2
modules/smalltalk/dist/smalltalk.poly.min.js
vendored
2
modules/smalltalk/dist/smalltalk.poly.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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, '<br>');
|
||||
|
||||
return `<div class="page">
|
||||
<div data-name="js-close" class="close-button"></div>
|
||||
<header>${ title }</header>
|
||||
<div class="content-area">
|
||||
${ msg }
|
||||
${ encodedMsg }
|
||||
${ value }
|
||||
</div>
|
||||
<div class="action-area">
|
||||
|
|
@ -44,16 +47,6 @@ function getTemplate(title, msg, value, buttons) {
|
|||
</div>`;
|
||||
}
|
||||
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue