mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(bower) smalltalk v2.4.1 (#117)
This commit is contained in:
parent
ac33f904c3
commit
2b5ec2a949
10 changed files with 38 additions and 21 deletions
|
|
@ -35,6 +35,6 @@
|
|||
"jquery": "3.2.1",
|
||||
"fancybox": "^2.1.6",
|
||||
"philip": "^1.3.7",
|
||||
"smalltalk": "2.4.0"
|
||||
"smalltalk": "2.4.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@
|
|||
"webpack.config.js"
|
||||
],
|
||||
"dependencies": {},
|
||||
"version": "2.4.0",
|
||||
"_release": "2.4.0",
|
||||
"version": "2.4.1",
|
||||
"_release": "2.4.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v2.4.0",
|
||||
"commit": "139e85897ade65568161ed89e17f46a8da9bd9b1"
|
||||
"tag": "v2.4.1",
|
||||
"commit": "1c993e63d5228568515378487ef44069cce55911"
|
||||
},
|
||||
"_source": "https://github.com/coderaiser/smalltalk.git",
|
||||
"_target": "^2.4.0",
|
||||
"_target": "^2.4.1",
|
||||
"_originalSource": "smalltalk",
|
||||
"_direct": true
|
||||
}
|
||||
|
|
@ -1,3 +1,16 @@
|
|||
2017.07.10, v2.4.1
|
||||
|
||||
fix:
|
||||
- (example) fullstore
|
||||
- (smalltalk) native: confirm, prompt: cancel: resolve -> do nothing (coderaiser/cloudcmd/issues/117)
|
||||
|
||||
feature:
|
||||
- (package) es6-promise v4.1.1
|
||||
- (package) webpack v3.0.0
|
||||
- (package) nyc v11.0.2
|
||||
- (package) eslint v4.0.0
|
||||
|
||||
|
||||
2017.05.23, v2.4.0
|
||||
|
||||
feature:
|
||||
|
|
|
|||
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=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}}}]);
|
||||
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'<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(2),v=e(4),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"),g=["OK"],y=["OK","Cancel"];t.alert=function(n,t){return o(n,t,"",g,{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 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<e;c++)u[c-1]=arguments[c];if(r(t),u.length>=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}}}]);
|
||||
//# 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=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()})}}]);
|
||||
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()})}}});
|
||||
//# 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
|
|
@ -16,7 +16,7 @@ exports.alert = (title, msg) => {
|
|||
};
|
||||
|
||||
exports.prompt = (title, msg, value = '', options) => {
|
||||
const val = String(value).replace(/\"/g, '"');
|
||||
const val = String(value).replace(/"/g, '"');
|
||||
const valueStr = `<input type="text" value="${ val }" data-name="js-input">`;
|
||||
|
||||
return showDialog(title, msg, valueStr, BUTTON_OK_CANCEL, options);
|
||||
|
|
@ -180,8 +180,7 @@ const getIndex = (count, index) => {
|
|||
if (index === count)
|
||||
return 0;
|
||||
|
||||
if (index < count)
|
||||
return index + 1;
|
||||
return index + 1;
|
||||
};
|
||||
|
||||
function tab(dialog, names) {
|
||||
|
|
|
|||
|
|
@ -17,11 +17,13 @@ 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)
|
||||
reject();
|
||||
reject();
|
||||
});
|
||||
|
||||
return promise;
|
||||
|
|
@ -33,7 +35,10 @@ exports.confirm = (title, message, options) => {
|
|||
const promise = new Promise((resolve, reject) => {
|
||||
const is = confirm(message);
|
||||
|
||||
if (is || noCancel)
|
||||
if (noCancel)
|
||||
return;
|
||||
|
||||
if (is)
|
||||
return resolve();
|
||||
|
||||
reject();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "smalltalk",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.1",
|
||||
"description": "Promise-based Alert, Confirm and Prompt replacement",
|
||||
"homepage": "http://github.com/coderaiser/smalltalk",
|
||||
"repository": {
|
||||
|
|
@ -53,11 +53,11 @@
|
|||
"babel-loader": "^7.0.0",
|
||||
"babel-preset-es2015": "^6.0.15",
|
||||
"coveralls": "^2.11.11",
|
||||
"eslint": "^3.0.1",
|
||||
"eslint": "^4.0.0",
|
||||
"jscs": "^3.0.3",
|
||||
"jshint": "^2.8.0",
|
||||
"nodemon": "^1.9.2",
|
||||
"nyc": "^10.0.0",
|
||||
"nyc": "^11.0.2",
|
||||
"postcss-clean": "^1.0.2",
|
||||
"postcss-cli": "^4.0.0",
|
||||
"redrun": "^5.0.1",
|
||||
|
|
@ -67,11 +67,11 @@
|
|||
"stylelint-config-standard": "^16.0.0",
|
||||
"systemjs": "^0.20.2",
|
||||
"tape": "^4.6.0",
|
||||
"webpack": "^2.5.1"
|
||||
"webpack": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"currify": "^2.0.3",
|
||||
"es6-promise": "^4.1.0",
|
||||
"es6-promise": "^4.1.1",
|
||||
"fullstore": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue