From 4ef794eb448a691e79c978502aa52e287beaee01 Mon Sep 17 00:00:00 2001 From: Travis Clarke Date: Sat, 26 Nov 2016 21:34:18 -0800 Subject: [PATCH] v4.0.0-alpha.2 - merge dependency upgrades from 'master' --- bower.json | 4 ++-- dist/css/tableexport.css | 2 +- dist/css/tableexport.min.css | 4 ++-- dist/js/tableexport.min.js | 2 +- package.json | 5 +++-- src/stable/css/tableexport.min.css | 2 +- src/stable/js/tableexport.js | 16 ++++------------ src/stable/js/tableexport.min.js | 2 +- 8 files changed, 15 insertions(+), 22 deletions(-) diff --git a/bower.json b/bower.json index e427cb1..52738e8 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "tableexport.js", - "version": "4.0.0-alpha.1", + "version": "4.0.0-alpha.2", "authors": [ "clarketm " ], @@ -26,7 +26,7 @@ "blobjs": "^1.0.0" }, "license": "MIT", - "homepage": "https://www.travismclarke.com", + "homepage": "https://www.travismclarke.com/tableexport/", "ignore": [ "**/.*", "node_modules", diff --git a/dist/css/tableexport.css b/dist/css/tableexport.css index f731cb9..fe500cb 100644 --- a/dist/css/tableexport.css +++ b/dist/css/tableexport.css @@ -1,5 +1,5 @@ /*! - * TableExport.js 4.0.0-alpha.1 (https://www.travismclarke.com) + * TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com) * Copyright 2016 Travis Clarke * Licensed under the MIT license */ diff --git a/dist/css/tableexport.min.css b/dist/css/tableexport.min.css index eeecfbe..3dff191 100644 --- a/dist/css/tableexport.min.css +++ b/dist/css/tableexport.min.css @@ -1,5 +1,5 @@ /*! - * TableExport.js 4.0.0-alpha.1 (https://www.travismclarke.com) + * TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com) * Copyright 2016 Travis Clarke * Licensed under the MIT license - */.top{caption-side:top}.bottom{caption-side:bottom}.button-default,.button-default:active,.button-default:focus,.button-default:hover{text-decoration:none}.button-default{font:700 12px sans-serif;color:#222;cursor:pointer;padding:5px;margin:5px}.button-default.csv:before,.button-default.txt:before,.button-default.xls:before,.button-default.xlsx:before{content:none}.csv:before,.txt:before,.xls:before,.xlsx:before{content:""}.csv,.txt,.xls,.xlsx{margin:4px 0}.csv:before,.txt:before,.xls:before,.xlsx:before{margin-right:10px;padding:11px 15px 12px;box-shadow:1px 1px 2px rgba(0,0,0,.2)}.xlsx:before{background:url(../img/xlsx.svg) center no-repeat #006400}.xls:before{background:url(../img/xls.svg) center no-repeat green}.csv:before{background:url(../img/csv.svg) center no-repeat #00f}.txt:before{background:url(../img/txt.svg) center no-repeat purple} + */.top{caption-side:top}.bottom{caption-side:bottom}.button-default,.button-default:active,.button-default:focus,.button-default:hover{text-decoration:none}.button-default{font:700 12px sans-serif;color:#222;cursor:pointer;padding:5px;margin:5px}.button-default.csv:before,.button-default.txt:before,.button-default.xls:before,.button-default.xlsx:before{content:none}.csv:before,.txt:before,.xls:before,.xlsx:before{content:""}.csv,.txt,.xls,.xlsx{margin:4px 0}.csv:before,.txt:before,.xls:before,.xlsx:before{margin-right:10px;padding:11px 15px 12px;box-shadow:1px 1px 2px rgba(0,0,0,.2)}.xlsx:before{background:url(../img/xlsx.svg) center no-repeat #006400}.xls:before{background:url(../img/xls.svg) center no-repeat green}.csv:before{background:url(../img/csv.svg) center no-repeat #00f}.txt:before{background:url(../img/txt.svg) center no-repeat purple} \ No newline at end of file diff --git a/dist/js/tableexport.min.js b/dist/js/tableexport.min.js index b98f977..dd59a12 100644 --- a/dist/js/tableexport.min.js +++ b/dist/js/tableexport.min.js @@ -3,4 +3,4 @@ * Copyright 2016 Travis Clarke * Licensed under the MIT license */ -!function(t,e){"function"==typeof define&&define.amd?define(["exports","jquery","blobjs","file-saver","xlsx"],e):"object"==typeof exports&&"string"!=typeof exports.nodeName?e(exports,require("jquery"),require("blobjs"),require("file-saver"),require("xlsx")):e(t,t.jQuery,t.Blob,t.saveAs,t.XLSX)}(this,function(t,e,n,o,i){"use strict";var r=function(t,n,o){var s=this;s.settings=o?n:e.extend({},r.prototype.defaults,n),s.selectors=t;var a,p,f,l=r.prototype.rowDel,u=s.settings.ignoreRows instanceof Array?s.settings.ignoreRows:[s.settings.ignoreRows],c=s.settings.ignoreCols instanceof Array?s.settings.ignoreCols:[s.settings.ignoreCols],x=s.settings.ignoreCSS instanceof Array?s.settings.ignoreCSS.join(", "):s.settings.ignoreCSS,d=s.settings.emptyCSS instanceof Array?s.settings.emptyCSS.join(", "):s.settings.emptyCSS;return s.settings.bootstrap?(a=r.prototype.bootstrap[0]+" ",p=r.prototype.bootstrap[1]+" ",f=r.prototype.bootstrap[2]+" "):(a=r.prototype.defaultButton+" ",p=f=""),s.selectors.each(function(){function t(t){var e=y.find("caption:not(.head)");e.length?e.append(t):y.prepend(''+t+"")}function n(e,n,o){var i="";t(i)}var y=e(this);o&&y.find("caption:not(.head)").remove();var m=y.find("tbody").find("tr"),m=s.settings.headings?m.add(y.find("thead>tr")):m,m=s.settings.footers?m.add(y.find("tfoot>tr")):m,g=s.settings.headings?y.find("thead>tr").length:0,b="id"===s.settings.fileName?y.attr("id")?y.attr("id"):r.prototype.defaultFileName:s.settings.fileName,h={xlsx:function(t,o){var i={},s=m.map(function(t,n){if(!~u.indexOf(t-g)&&!e(n).is(x)){var o=e(n).find("th, td");return[o.map(function(n,o){if(!~c.indexOf(n)&&!e(o).is(x)){if(e(o).is(d))return" ";if(o.hasAttribute("colspan")&&(i[t]=i[t]||{},i[t][n+1]=o.getAttribute("colspan")-1),o.hasAttribute("rowspan"))for(var r=1;r":">","'":"'","/":"/"},xlsx:{defaultClass:"xlsx",buttonContent:"Export to xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileExtension:".xlsx"},xls:{defaultClass:"xls",buttonContent:"Export to xls",separator:"\t",mimeType:"application/vnd.ms-excel",fileExtension:".xls"},csv:{defaultClass:"csv",buttonContent:"Export to csv",separator:",",mimeType:"text/csv",fileExtension:".csv"},txt:{defaultClass:"txt",buttonContent:"Export to txt",separator:" ",mimeType:"text/plain",fileExtension:".txt"},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return r.prototype.entityMap[t]})},dateNum:function(t,e){e&&(t+=1462);var n=Date.parse(t);return(n-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},n={s:{c:1e7,r:1e7},e:{c:0,r:0}},o=0;o!=t.length;++o)for(var r=0;r!=t[o].length;++r){n.s.r>o&&(n.s.r=o),n.s.c>r&&(n.s.c=r),n.e.r tr")),b=n.settings.headings?i(t.querySelectorAll("thead > tr")).concat(b):b,b=n.settings.footers?i(t.querySelectorAll("tfoot > tr")).concat(b):b,h=n.settings.headings?t.querySelectorAll("thead > tr").length:0,v="id"===n.settings.fileName?t.getAttribute("id")?t.getAttribute("id"):p.prototype.defaultFileName:n.settings.fileName,S={xlsx:function(t,e){var o={},n=i(b).map(function(t,e){if(!~y.indexOf(e-h)&&!l(t,d)){var n=t.querySelectorAll("th, td");return i(n).map(function(t,n){if(!~m.indexOf(n)&&!l(t,d)){if(l(t,g))return" ";if(t.hasAttribute("colspan")&&(o[e]=o[e]||{},o[e][n+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var r=1;r":">","'":"'","/":"/"},xlsx:{defaultClass:"xlsx",buttonContent:"Export to xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileExtension:".xlsx"},xls:{defaultClass:"xls",buttonContent:"Export to xls",separator:"\t",mimeType:"application/vnd.ms-excel",fileExtension:".xls"},csv:{defaultClass:"csv",buttonContent:"Export to csv",separator:",",mimeType:"text/csv",fileExtension:".csv"},txt:{defaultClass:"txt",buttonContent:"Export to txt",separator:" ",mimeType:"text/plain",fileExtension:".txt"},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return p.prototype.entityMap[t]})},dateNum:function(t,e){e&&(t+=1462);var o=Date.parse(t);return(o-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},o={s:{c:1e7,r:1e7},e:{c:0,r:0}},n=0;n!=t.length;++n)for(var s=0;s!=t[n].length;++s){o.s.r>n&&(o.s.r=n),o.s.c>s&&(o.s.c=s),o.e.r>>>>>> master + * TableExport.js 4.0.0-alpha.2 (https://www.travismclarke.com) * Copyright 2016 Travis Clarke * Licensed under the MIT license */ @@ -281,7 +277,7 @@ * Version. * @memberof TableExport.prototype */ - version: "3.3.5", + version: "4.0.0-alpha.2", /** * Default plugin options. * @memberof TableExport.prototype @@ -458,11 +454,7 @@ * @param extension {String} file extension */ export2file: function (data, mime, name, extension) { -<<<<<<< HEAD if (XLSX && extension.substr(0, 4) == ".xls") { -======= - if (XLSX && extension.substr(0, 4) == (".xls")) { ->>>>>>> master var wb = new this.Workbook(), ws = this.createSheet(data); @@ -547,7 +539,7 @@ } } - return exports.default = exports.TableExport = TableExport; + exports.default = exports.TableExport = TableExport; } -)); \ No newline at end of file +)); diff --git a/src/stable/js/tableexport.min.js b/src/stable/js/tableexport.min.js index b98f977..dd59a12 100644 --- a/src/stable/js/tableexport.min.js +++ b/src/stable/js/tableexport.min.js @@ -3,4 +3,4 @@ * Copyright 2016 Travis Clarke * Licensed under the MIT license */ -!function(t,e){"function"==typeof define&&define.amd?define(["exports","jquery","blobjs","file-saver","xlsx"],e):"object"==typeof exports&&"string"!=typeof exports.nodeName?e(exports,require("jquery"),require("blobjs"),require("file-saver"),require("xlsx")):e(t,t.jQuery,t.Blob,t.saveAs,t.XLSX)}(this,function(t,e,n,o,i){"use strict";var r=function(t,n,o){var s=this;s.settings=o?n:e.extend({},r.prototype.defaults,n),s.selectors=t;var a,p,f,l=r.prototype.rowDel,u=s.settings.ignoreRows instanceof Array?s.settings.ignoreRows:[s.settings.ignoreRows],c=s.settings.ignoreCols instanceof Array?s.settings.ignoreCols:[s.settings.ignoreCols],x=s.settings.ignoreCSS instanceof Array?s.settings.ignoreCSS.join(", "):s.settings.ignoreCSS,d=s.settings.emptyCSS instanceof Array?s.settings.emptyCSS.join(", "):s.settings.emptyCSS;return s.settings.bootstrap?(a=r.prototype.bootstrap[0]+" ",p=r.prototype.bootstrap[1]+" ",f=r.prototype.bootstrap[2]+" "):(a=r.prototype.defaultButton+" ",p=f=""),s.selectors.each(function(){function t(t){var e=y.find("caption:not(.head)");e.length?e.append(t):y.prepend(''+t+"")}function n(e,n,o){var i="";t(i)}var y=e(this);o&&y.find("caption:not(.head)").remove();var m=y.find("tbody").find("tr"),m=s.settings.headings?m.add(y.find("thead>tr")):m,m=s.settings.footers?m.add(y.find("tfoot>tr")):m,g=s.settings.headings?y.find("thead>tr").length:0,b="id"===s.settings.fileName?y.attr("id")?y.attr("id"):r.prototype.defaultFileName:s.settings.fileName,h={xlsx:function(t,o){var i={},s=m.map(function(t,n){if(!~u.indexOf(t-g)&&!e(n).is(x)){var o=e(n).find("th, td");return[o.map(function(n,o){if(!~c.indexOf(n)&&!e(o).is(x)){if(e(o).is(d))return" ";if(o.hasAttribute("colspan")&&(i[t]=i[t]||{},i[t][n+1]=o.getAttribute("colspan")-1),o.hasAttribute("rowspan"))for(var r=1;r":">","'":"'","/":"/"},xlsx:{defaultClass:"xlsx",buttonContent:"Export to xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileExtension:".xlsx"},xls:{defaultClass:"xls",buttonContent:"Export to xls",separator:"\t",mimeType:"application/vnd.ms-excel",fileExtension:".xls"},csv:{defaultClass:"csv",buttonContent:"Export to csv",separator:",",mimeType:"text/csv",fileExtension:".csv"},txt:{defaultClass:"txt",buttonContent:"Export to txt",separator:" ",mimeType:"text/plain",fileExtension:".txt"},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return r.prototype.entityMap[t]})},dateNum:function(t,e){e&&(t+=1462);var n=Date.parse(t);return(n-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},n={s:{c:1e7,r:1e7},e:{c:0,r:0}},o=0;o!=t.length;++o)for(var r=0;r!=t[o].length;++r){n.s.r>o&&(n.s.r=o),n.s.c>r&&(n.s.c=r),n.e.r tr")),b=n.settings.headings?i(t.querySelectorAll("thead > tr")).concat(b):b,b=n.settings.footers?i(t.querySelectorAll("tfoot > tr")).concat(b):b,h=n.settings.headings?t.querySelectorAll("thead > tr").length:0,v="id"===n.settings.fileName?t.getAttribute("id")?t.getAttribute("id"):p.prototype.defaultFileName:n.settings.fileName,S={xlsx:function(t,e){var o={},n=i(b).map(function(t,e){if(!~y.indexOf(e-h)&&!l(t,d)){var n=t.querySelectorAll("th, td");return i(n).map(function(t,n){if(!~m.indexOf(n)&&!l(t,d)){if(l(t,g))return" ";if(t.hasAttribute("colspan")&&(o[e]=o[e]||{},o[e][n+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var r=1;r":">","'":"'","/":"/"},xlsx:{defaultClass:"xlsx",buttonContent:"Export to xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileExtension:".xlsx"},xls:{defaultClass:"xls",buttonContent:"Export to xls",separator:"\t",mimeType:"application/vnd.ms-excel",fileExtension:".xls"},csv:{defaultClass:"csv",buttonContent:"Export to csv",separator:",",mimeType:"text/csv",fileExtension:".csv"},txt:{defaultClass:"txt",buttonContent:"Export to txt",separator:" ",mimeType:"text/plain",fileExtension:".txt"},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return p.prototype.entityMap[t]})},dateNum:function(t,e){e&&(t+=1462);var o=Date.parse(t);return(o-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},o={s:{c:1e7,r:1e7},e:{c:0,r:0}},n=0;n!=t.length;++n)for(var s=0;s!=t[n].length;++s){o.s.r>n&&(o.s.r=n),o.s.c>s&&(o.s.c=s),o.e.r