tableexport
Advanced tools
Comparing version 4.0.0-rc.1 to 4.0.0-rc.2
{ | ||
"name": "tableexport.js", | ||
"version": "4.0.0-rc.1", | ||
"version": "4.0.0-rc.2", | ||
"authors": [ | ||
@@ -5,0 +5,0 @@ "clarketm <travis.m.clarke@gmail.com>" |
/*! | ||
* TableExport.js 4.0.0-rc.1 (https://www.travismclarke.com) | ||
* TableExport.js 4.0.0-rc.2 (https://www.travismclarke.com) | ||
* Copyright 2017 Travis Clarke | ||
@@ -7,12 +7,17 @@ * Licensed under the MIT license | ||
;(function (root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['exports', 'jquery', 'blobjs', 'file-saverjs', 'xlsx-js'], factory); // AMD | ||
// AMD | ||
define(['jquery', 'blobjs', 'file-saverjs', 'xlsx'], factory); | ||
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { | ||
factory(exports, require('jquery'), require('blobjs'), require('file-saverjs'), require('xlsx-js')); // CommonJS | ||
// CommonJS | ||
module.exports = factory(require('jquery'), require('blobjs'), require('file-saverjs'), require('xlsx')); | ||
} else { | ||
factory(root, root.jQuery, root.Blob, root.saveAs, root.XLSX); // Browser globals | ||
// Browser globals | ||
root.TableExport = factory(root.jQuery, root.Blob, root.saveAs, root.XLSX); | ||
} | ||
}(this || window, function (exports, $, Blob, saveAs, XLSX) { | ||
}(this, function ($, Blob, saveAs, XLSX) { | ||
'use strict'; | ||
// TODO: update typings (def file) | ||
/** | ||
@@ -26,2 +31,4 @@ * TableExport main plugin constructor | ||
var TableExport = function (selectors, options, isUpdate) { | ||
if (!selectors) return new Error('"selectors" is required'); | ||
var self = this; | ||
@@ -111,3 +118,3 @@ /** | ||
*/ | ||
version: '4.0.0-rc.1', | ||
version: '4.0.0-rc.2', | ||
/** | ||
@@ -732,4 +739,3 @@ * Default plugin options. | ||
LocalStorage: function () { | ||
this.type = 'localStorage'; | ||
this.store = exports[this.type]; | ||
this.store = localStorage; | ||
this.namespace = 'te-'; | ||
@@ -864,2 +870,3 @@ this.getKey = function (key) { | ||
for (var prop in TableExport.prototype) { | ||
// TODO: check compat | ||
$.fn.tableExport[prop] = TableExport.prototype[prop]; | ||
@@ -869,5 +876,4 @@ } | ||
return exports.default = exports.TableExport = TableExport; | ||
return TableExport; | ||
} | ||
)); |
/*! | ||
* TableExport.js 4.0.0-rc.1 (https://www.travismclarke.com) | ||
* TableExport.js 4.0.0-rc.2 (https://www.travismclarke.com) | ||
* Copyright 2017 Travis Clarke | ||
* Licensed under the MIT license | ||
*/ | ||
!function(t,e){"function"==typeof define&&define.amd?define(["exports","jquery","blobjs","file-saverjs","xlsx-js"],e):"object"==typeof exports&&"string"!=typeof exports.nodeName?e(exports,require("jquery"),require("blobjs"),require("file-saverjs"),require("xlsx-js")):e(t,t.jQuery,t.Blob,t.saveAs,t.XLSX)}(this||window,function(t,e,r,n,o){"use strict";function s(){for(var t=arguments,e=1;e<t.length;e++)for(var r in t[e])t[e].hasOwnProperty(r)&&(t[0][r]=t[e][r]);return t[0]}function i(t){return t instanceof NodeList||e&&t instanceof e?[].slice.call(t):[].concat(t)}function a(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.cls)}function l(t,e,r){var n={};return t?(n.bootstrapClass=t[0]+" ",n.bootstrapTheme=t[1]+" ",n.bootstrapSpacing=t[2]+" "):(n.bootstrapClass=r+" ",n.bootstrapTheme="",n.bootstrapSpacing=""),n}var u=function(t,e,r){var n=this;n.settings=r?e:s({},n.defaults,e),n.selectors=i(t);var a=n.settings;a.ignoreRows=a.ignoreRows instanceof Array?a.ignoreRows:[a.ignoreRows],a.ignoreCols=a.ignoreCols instanceof Array?a.ignoreCols:[a.ignoreCols],a.ignoreCSS=n.ignoreCSS instanceof Array?n.ignoreCSS.join(", "):n.ignoreCSS,a.emptyCSS=n.emptyCSS instanceof Array?n.emptyCSS.join(", "):n.emptyCSS,a.formatValue=n.formatValue.bind(this,a.trimWhitespace),a.bootstrapSettings=l(n.bootstrap,n.bootstrapConfig,n.defaultButton);var u={};n.getExportData=function(){return u},n.selectors.forEach(function(t){var e={},s=t.querySelectorAll("caption:not(.head)");r&&s.parentNode.removeChild(s),e.rows=i(t.querySelectorAll("tbody > tr")),e.rows=a.headers?i(t.querySelectorAll("thead > tr")).concat(e.rows):e.rows,e.rows=a.footers?e.rows.concat(i(t.querySelectorAll("tfoot > tr"))):e.rows,e.thAdj=a.headers?t.querySelectorAll("thead > tr").length:0,e.filename="id"===a.filename?t.getAttribute("id")?t.getAttribute("id"):n.defaultFilename:a.filename?a.filename:n.defaultFilename,e.uuid=f(t),e.checkCaption=function(e){var r=t.querySelectorAll("caption:not(.head)");r.length?r[0].appendChild(e):(r=document.createElement("caption"),r.className=a.bootstrapSettings.bootstrapSpacing+a.position,r.appendChild(e),t.insertBefore(r,t.firstChild))},e.setExportData=function(){return function(t){var r=p.getInstance().getItem(t),n=t.substring(t.indexOf("-")+1);u[e.uuid]=u[e.uuid]||{},u[e.uuid][n]=JSON.parse(r)}}(),a.formats.forEach(function(t){!(!o||"xls"!==t)&&(t="xlsm"),!o&&"xlsx"===t&&(t=null),t&&e.setExportData(n.exporters[t].call(n,e))})});var c=document.querySelectorAll("button[tableexport-id]");return m(c,"click",n.downloadHandler,n),n};u.prototype={version:"4.0.0-rc.1",defaults:{headers:!0,footers:!0,formats:["xls","csv","txt"],filename:"id",bootstrap:!1,exportButtons:!0,position:"bottom",ignoreRows:null,ignoreCols:null,trimWhitespace:!0},charset:"charset=utf-8",defaultFilename:"myDownload",defaultButton:"button-default",ignoreCSS:"tableexport-ignore",emptyCSS:"tableexport-empty",bootstrapConfig:["btn","btn-default","btn-toolbar"],rowDel:"\r\n",entityMap:{"&":"&","<":"<",">":">","'":"'","/":"/"},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"},types:{string:{defaultClass:"tableexport-string"},number:{defaultClass:"tableexport-number",assert:function(t){return!isNaN(t.replace(/,/g,""))}},"boolean":{defaultClass:"tableexport-boolean",assert:function(t){return"true"===t.toLowerCase()||"false"===t.toLowerCase()}},date:{defaultClass:"tableexport-date",assert:function(t){return!isNaN(Date.parse(t))}}},exporters:{xlsx:function(t){var e=this,r=e.settings,n={},o=i(t.rows).map(function(o,s){if(!~r.ignoreRows.indexOf(s-t.thAdj)&&!a(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return i(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!a(t,r.ignoreCSS)){if(a(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[s]=n[s]||{},n[s][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var i=1;i<t.getAttribute("rowspan");i++)n[s+i]=n[s+i]||{},n[s+i][o]=1;if(n[s]){for(var l=o+1,u=0,p=0,i=0;i<=Math.max.apply(Math,Object.keys(n[s]))&&(n[s][i]?u=p>=o?u+n[s][i]:u:p++,p!==l);i++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.xlsx.mimeType,fileExtension:u.prototype.xlsx.fileExtension})),l=u.prototype.xlsx.buttonContent,f=u.prototype.xlsx.defaultClass,m=c({uuid:t.uuid,type:"xlsx"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},xlsm:function(t){var e=this,r=e.settings,n={},o=i(t.rows).map(function(o,s){if(!~r.ignoreRows.indexOf(s-t.thAdj)&&!a(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return i(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!a(t,r.ignoreCSS)){if(a(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[s]=n[s]||{},n[s][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var i=1;i<t.getAttribute("rowspan");i++)n[s+i]=n[s+i]||{},n[s+i][o]=1;if(n[s]){for(var l=o+1,u=0,p=0,i=0;i<=Math.max.apply(Math,Object.keys(n[s]))&&(n[s][i]?u=p>=o?u+n[s][i]:u:p++,p!==l);i++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.xls.mimeType,fileExtension:u.prototype.xls.fileExtension})),l=u.prototype.xls.buttonContent,f=u.prototype.xls.defaultClass,m=c({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},xls:function(t){var e=this,r=e.settings,n=u.prototype.xls.separator,o=i(t.rows).map(function(o,s){if(!~r.ignoreRows.indexOf(s-t.thAdj)&&!a(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return i(l).map(function(t,n){if(!~r.ignoreCols.indexOf(n)&&!a(t,r.ignoreCSS))return a(t,r.emptyCSS)?" ":{v:r.formatValue(t.textContent),t:e.getType(t.className)}}).join(n)}}).join(e).map(function(t){return[].concat.apply([],t)}),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.xls.mimeType,fileExtension:u.prototype.xls.fileExtension})),l=u.prototype.xls.buttonContent,f=u.prototype.xls.defaultClass,m=c({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},csv:function(t){var e=this,r=e.settings,n=u.prototype.csv.separator,o=i(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!a(e,r.ignoreCSS)){var s=e.querySelectorAll("th, td");return i(s).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!a(t,r.ignoreCSS))return a(t,r.emptyCSS)?" ":'"'+r.formatValue(t.textContent.replace(/"/g,'""'))+'"'}).join(n)}}).join(e.rowDel),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.csv.mimeType,fileExtension:u.prototype.csv.fileExtension})),l=u.prototype.csv.buttonContent,f=u.prototype.csv.defaultClass,m=c({uuid:t.uuid,type:"csv"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},txt:function(t){var e=this,r=e.settings,n=u.prototype.txt.separator,o=i(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!a(e,r.ignoreCSS)){var s=e.querySelectorAll("th, td");return i(s).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!a(t,r.ignoreCSS))return a(t,r.emptyCSS)?" ":r.formatValue(t.textContent)}).join(n)}}).join(e.rowDel),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.txt.mimeType,fileExtension:u.prototype.txt.fileExtension})),l=u.prototype.txt.buttonContent,f=u.prototype.txt.defaultClass,m=c({uuid:t.uuid,type:"txt"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m}},createObjButton:function(t,e,r,n,o){var s=document.createElement("button");return s.setAttribute("tableexport-id",t),s.className=o.bootstrapClass+o.bootstrapTheme+n,s.textContent=r,s},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return u.prototype.entityMap[t]})},formatValue:function(t,e){return t?e.trim():e},getType:function(t){if(!t)return"";var e=u.prototype.types;return~t.indexOf(e.string.defaultClass)?"s":~t.indexOf(e.number.defaultClass)?"n":~t.indexOf(e["boolean"].defaultClass)?"b":~t.indexOf(e.date.defaultClass)?"d":""},dateNum:function(t,e){e&&(t+=1462);var r=Date.parse(t);return(r-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},r={s:{c:1e7,r:1e7},e:{c:0,r:0}},n=u.prototype.types,s=0;s!==t.length;++s)for(var i=0;i!==t[s].length;++i){r.s.r>s&&(r.s.r=s),r.s.c>i&&(r.s.c=i),r.e.r<s&&(r.e.r=s),r.e.c<i&&(r.e.c=i);var a=t[s][i];if(a&&a.v){var l=o.utils.encode_cell({c:i,r:s});a.t||(n.number.assert(a.v)?a.t="n":n["boolean"].assert(a.v)?a.t="b":n.date.assert(a.v)?a.t="d":a.t="s"),"d"===a.t&&(a.t="n",a.z=o.SSF._table[14],a.v=this.dateNum(a.v)),e[l]=a}}return r.s.c<1e7&&(e["!ref"]=o.utils.encode_range(r)),e},downloadHandler:function(t){var e=t.target,r=JSON.parse(p.getInstance().getItem(e.getAttribute("tableexport-id"))),n=r.data,o=r.filename,s=r.mimeType,i=r.fileExtension;this.export2file(n,s,o,i)},Workbook:function(){this.SheetNames=[],this.Sheets={}},string2ArrayBuffer:function(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n!==t.length;++n)r[n]=255&t.charCodeAt(n);return e},export2file:function(t,e,s,i){if(o&&".xls"===i.substr(0,4)){var a=new this.Workbook,l=this.createSheet(t);a.SheetNames.push(s),a.Sheets[s]=l;var u={bookType:i.substr(1,3)+(i.substr(4)||"m"),bookSST:!1,type:"binary"},p=o.write(a,u);t=this.string2ArrayBuffer(p)}n(new r([t],{type:e+";"+this.charset}),s+i,!0)},update:function(t){},reset:function(){},remove:function(){},LocalStorage:function(){this.type="localStorage",this.store=t[this.type],this.namespace="te-",this.getKey=function(t){return this.namespace+t},this.setItem=function(t,e,r){var n=this.getKey(t);if(!this.exists(n)||r)return"string"!=typeof e?this.error('"value" must be a string'):this.store.setItem(n,e)},this.getItem=function(t){var e=this.getKey(t);return this.store.getItem(e)},this.exists=function(t){var e=this.getKey(t);return null!==this.store.getItem(e)},this.removeItem=function(t){var e=this.getKey(t);return this.store.removeItem(e)},this.error=function(t){return new Error("error:",t)}}};var p=u.prototype.LocalStorage;p.getInstance=function(){return p._instance=null,function(){return p._instance||(p._instance=new p),p._instance}}();var f=function(){var t=0;return function(e){return e.id||(e.id="tableexport-"+ ++t),e.id}}(),c=function(){var t,e,r=0;return function(n){var o=n.type;if(n=JSON.stringify(n),0===n.length)return r;for(t=0;t<n.length;t++)e=n.charCodeAt(t),r=(r<<5)-r+e,r|=0;return r.toString(16).substring(1)+"-"+o}}(),m=function(){var t=null;return function(e,r,n,o){for(var s=n.bind(o),i=0;i<e.length;++i)t&&e[i].removeEventListener(r,t,!1),e[i].addEventListener(r,s,!1);t=s}}();if(e){e.fn.tableExport=function(t,e){return new u(this,t,e)};for(var x in u.prototype)e.fn.tableExport[x]=u.prototype[x]}return t["default"]=t.TableExport=u}); | ||
!function(t,e){"function"==typeof define&&define.amd?define(["jquery","blobjs","file-saverjs","xlsx"],e):"object"==typeof exports&&"string"!=typeof exports.nodeName?module.exports=e(require("jquery"),require("blobjs"),require("file-saverjs"),require("xlsx")):t.TableExport=e(t.jQuery,t.Blob,t.saveAs,t.XLSX)}(this,function(t,e,r,n){"use strict";function o(){for(var t=arguments,e=1;e<t.length;e++)for(var r in t[e])t[e].hasOwnProperty(r)&&(t[0][r]=t[e][r]);return t[0]}function s(e){return e instanceof NodeList||t&&e instanceof t?[].slice.call(e):[].concat(e)}function i(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.cls)}function a(t,e,r){var n={};return t?(n.bootstrapClass=t[0]+" ",n.bootstrapTheme=t[1]+" ",n.bootstrapSpacing=t[2]+" "):(n.bootstrapClass=r+" ",n.bootstrapTheme="",n.bootstrapSpacing=""),n}var l=function(t,e,r){if(!t)return new Error('"selectors" is required');var i=this;i.settings=r?e:o({},i.defaults,e),i.selectors=s(t);var l=i.settings;l.ignoreRows=l.ignoreRows instanceof Array?l.ignoreRows:[l.ignoreRows],l.ignoreCols=l.ignoreCols instanceof Array?l.ignoreCols:[l.ignoreCols],l.ignoreCSS=i.ignoreCSS instanceof Array?i.ignoreCSS.join(", "):i.ignoreCSS,l.emptyCSS=i.emptyCSS instanceof Array?i.emptyCSS.join(", "):i.emptyCSS,l.formatValue=i.formatValue.bind(this,l.trimWhitespace),l.bootstrapSettings=a(i.bootstrap,i.bootstrapConfig,i.defaultButton);var f={};i.getExportData=function(){return f},i.selectors.forEach(function(t){var e={},o=t.querySelectorAll("caption:not(.head)");r&&o.parentNode.removeChild(o),e.rows=s(t.querySelectorAll("tbody > tr")),e.rows=l.headers?s(t.querySelectorAll("thead > tr")).concat(e.rows):e.rows,e.rows=l.footers?e.rows.concat(s(t.querySelectorAll("tfoot > tr"))):e.rows,e.thAdj=l.headers?t.querySelectorAll("thead > tr").length:0,e.filename="id"===l.filename?t.getAttribute("id")?t.getAttribute("id"):i.defaultFilename:l.filename?l.filename:i.defaultFilename,e.uuid=p(t),e.checkCaption=function(e){var r=t.querySelectorAll("caption:not(.head)");r.length?r[0].appendChild(e):(r=document.createElement("caption"),r.className=l.bootstrapSettings.bootstrapSpacing+l.position,r.appendChild(e),t.insertBefore(r,t.firstChild))},e.setExportData=function(){return function(t){var r=u.getInstance().getItem(t),n=t.substring(t.indexOf("-")+1);f[e.uuid]=f[e.uuid]||{},f[e.uuid][n]=JSON.parse(r)}}(),l.formats.forEach(function(t){!(!n||"xls"!==t)&&(t="xlsm"),!n&&"xlsx"===t&&(t=null),t&&e.setExportData(i.exporters[t].call(i,e))})});var m=document.querySelectorAll("button[tableexport-id]");return c(m,"click",i.downloadHandler,i),i};l.prototype={version:"4.0.0-rc.2",defaults:{headers:!0,footers:!0,formats:["xls","csv","txt"],filename:"id",bootstrap:!1,exportButtons:!0,position:"bottom",ignoreRows:null,ignoreCols:null,trimWhitespace:!0},charset:"charset=utf-8",defaultFilename:"myDownload",defaultButton:"button-default",ignoreCSS:"tableexport-ignore",emptyCSS:"tableexport-empty",bootstrapConfig:["btn","btn-default","btn-toolbar"],rowDel:"\r\n",entityMap:{"&":"&","<":"<",">":">","'":"'","/":"/"},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"},types:{string:{defaultClass:"tableexport-string"},number:{defaultClass:"tableexport-number",assert:function(t){return!isNaN(t.replace(/,/g,""))}},"boolean":{defaultClass:"tableexport-boolean",assert:function(t){return"true"===t.toLowerCase()||"false"===t.toLowerCase()}},date:{defaultClass:"tableexport-date",assert:function(t){return!isNaN(Date.parse(t))}}},exporters:{xlsx:function(t){var e=this,r=e.settings,n={},o=s(t.rows).map(function(o,a){if(!~r.ignoreRows.indexOf(a-t.thAdj)&&!i(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return s(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!i(t,r.ignoreCSS)){if(i(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[a]=n[a]||{},n[a][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var s=1;s<t.getAttribute("rowspan");s++)n[a+s]=n[a+s]||{},n[a+s][o]=1;if(n[a]){for(var l=o+1,u=0,p=0,s=0;s<=Math.max.apply(Math,Object.keys(n[a]))&&(n[a][s]?u=p>=o?u+n[a][s]:u:p++,p!==l);s++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.xlsx.mimeType,fileExtension:l.prototype.xlsx.fileExtension})),p=l.prototype.xlsx.buttonContent,c=l.prototype.xlsx.defaultClass,m=f({uuid:t.uuid,type:"xlsx"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},xlsm:function(t){var e=this,r=e.settings,n={},o=s(t.rows).map(function(o,a){if(!~r.ignoreRows.indexOf(a-t.thAdj)&&!i(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return s(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!i(t,r.ignoreCSS)){if(i(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[a]=n[a]||{},n[a][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var s=1;s<t.getAttribute("rowspan");s++)n[a+s]=n[a+s]||{},n[a+s][o]=1;if(n[a]){for(var l=o+1,u=0,p=0,s=0;s<=Math.max.apply(Math,Object.keys(n[a]))&&(n[a][s]?u=p>=o?u+n[a][s]:u:p++,p!==l);s++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.xls.mimeType,fileExtension:l.prototype.xls.fileExtension})),p=l.prototype.xls.buttonContent,c=l.prototype.xls.defaultClass,m=f({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},xls:function(t){var e=this,r=e.settings,n=l.prototype.xls.separator,o=s(t.rows).map(function(o,a){if(!~r.ignoreRows.indexOf(a-t.thAdj)&&!i(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return s(l).map(function(t,n){if(!~r.ignoreCols.indexOf(n)&&!i(t,r.ignoreCSS))return i(t,r.emptyCSS)?" ":{v:r.formatValue(t.textContent),t:e.getType(t.className)}}).join(n)}}).join(e).map(function(t){return[].concat.apply([],t)}),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.xls.mimeType,fileExtension:l.prototype.xls.fileExtension})),p=l.prototype.xls.buttonContent,c=l.prototype.xls.defaultClass,m=f({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},csv:function(t){var e=this,r=e.settings,n=l.prototype.csv.separator,o=s(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!i(e,r.ignoreCSS)){var a=e.querySelectorAll("th, td");return s(a).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!i(t,r.ignoreCSS))return i(t,r.emptyCSS)?" ":'"'+r.formatValue(t.textContent.replace(/"/g,'""'))+'"'}).join(n)}}).join(e.rowDel),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.csv.mimeType,fileExtension:l.prototype.csv.fileExtension})),p=l.prototype.csv.buttonContent,c=l.prototype.csv.defaultClass,m=f({uuid:t.uuid,type:"csv"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},txt:function(t){var e=this,r=e.settings,n=l.prototype.txt.separator,o=s(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!i(e,r.ignoreCSS)){var a=e.querySelectorAll("th, td");return s(a).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!i(t,r.ignoreCSS))return i(t,r.emptyCSS)?" ":r.formatValue(t.textContent)}).join(n)}}).join(e.rowDel),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.txt.mimeType,fileExtension:l.prototype.txt.fileExtension})),p=l.prototype.txt.buttonContent,c=l.prototype.txt.defaultClass,m=f({uuid:t.uuid,type:"txt"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m}},createObjButton:function(t,e,r,n,o){var s=document.createElement("button");return s.setAttribute("tableexport-id",t),s.className=o.bootstrapClass+o.bootstrapTheme+n,s.textContent=r,s},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return l.prototype.entityMap[t]})},formatValue:function(t,e){return t?e.trim():e},getType:function(t){if(!t)return"";var e=l.prototype.types;return~t.indexOf(e.string.defaultClass)?"s":~t.indexOf(e.number.defaultClass)?"n":~t.indexOf(e["boolean"].defaultClass)?"b":~t.indexOf(e.date.defaultClass)?"d":""},dateNum:function(t,e){e&&(t+=1462);var r=Date.parse(t);return(r-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},r={s:{c:1e7,r:1e7},e:{c:0,r:0}},o=l.prototype.types,s=0;s!==t.length;++s)for(var i=0;i!==t[s].length;++i){r.s.r>s&&(r.s.r=s),r.s.c>i&&(r.s.c=i),r.e.r<s&&(r.e.r=s),r.e.c<i&&(r.e.c=i);var a=t[s][i];if(a&&a.v){var u=n.utils.encode_cell({c:i,r:s});a.t||(o.number.assert(a.v)?a.t="n":o["boolean"].assert(a.v)?a.t="b":o.date.assert(a.v)?a.t="d":a.t="s"),"d"===a.t&&(a.t="n",a.z=n.SSF._table[14],a.v=this.dateNum(a.v)),e[u]=a}}return r.s.c<1e7&&(e["!ref"]=n.utils.encode_range(r)),e},downloadHandler:function(t){var e=t.target,r=JSON.parse(u.getInstance().getItem(e.getAttribute("tableexport-id"))),n=r.data,o=r.filename,s=r.mimeType,i=r.fileExtension;this.export2file(n,s,o,i)},Workbook:function(){this.SheetNames=[],this.Sheets={}},string2ArrayBuffer:function(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n!==t.length;++n)r[n]=255&t.charCodeAt(n);return e},export2file:function(t,o,s,i){if(n&&".xls"===i.substr(0,4)){var a=new this.Workbook,l=this.createSheet(t);a.SheetNames.push(s),a.Sheets[s]=l;var u={bookType:i.substr(1,3)+(i.substr(4)||"m"),bookSST:!1,type:"binary"},p=n.write(a,u);t=this.string2ArrayBuffer(p)}r(new e([t],{type:o+";"+this.charset}),s+i,!0)},update:function(t){},reset:function(){},remove:function(){},LocalStorage:function(){this.store=localStorage,this.namespace="te-",this.getKey=function(t){return this.namespace+t},this.setItem=function(t,e,r){var n=this.getKey(t);if(!this.exists(n)||r)return"string"!=typeof e?this.error('"value" must be a string'):this.store.setItem(n,e)},this.getItem=function(t){var e=this.getKey(t);return this.store.getItem(e)},this.exists=function(t){var e=this.getKey(t);return null!==this.store.getItem(e)},this.removeItem=function(t){var e=this.getKey(t);return this.store.removeItem(e)},this.error=function(t){return new Error("error:",t)}}};var u=l.prototype.LocalStorage;u.getInstance=function(){return u._instance=null,function(){return u._instance||(u._instance=new u),u._instance}}();var p=function(){var t=0;return function(e){return e.id||(e.id="tableexport-"+ ++t),e.id}}(),f=function(){var t,e,r=0;return function(n){var o=n.type;if(n=JSON.stringify(n),0===n.length)return r;for(t=0;t<n.length;t++)e=n.charCodeAt(t),r=(r<<5)-r+e,r|=0;return r.toString(16).substring(1)+"-"+o}}(),c=function(){var t=null;return function(e,r,n,o){for(var s=n.bind(o),i=0;i<e.length;++i)t&&e[i].removeEventListener(r,t,!1),e[i].addEventListener(r,s,!1);t=s}}();if(t){t.fn.tableExport=function(t,e){return new l(this,t,e)};for(var m in l.prototype)t.fn.tableExport[m]=l.prototype[m]}return l}); |
{ | ||
"name": "tableexport", | ||
"version": "4.0.0-rc.1", | ||
"version": "4.0.0-rc.2", | ||
"authors": [ | ||
@@ -42,3 +42,3 @@ "clarketm <travis.m.clarke@gmail.com>" | ||
"jquery": "^3.1.1", | ||
"xlsx-js": "^0.8.7" | ||
"xlsx": "^0.9.13" | ||
}, | ||
@@ -45,0 +45,0 @@ "devDependencies": { |
@@ -7,8 +7,34 @@ [![Build Status](https://travis-ci.org/clarketm/TableExport.svg?branch=master)](https://travis-ci.org/clarketm/TableExport) | ||
> **Notice:** In May 2017, [v3.0.0](https://github.com/clarketm/TableExport/releases/tag/v3.3.9) will be superceded by [v4.0.0](https://github.com/clarketm/TableExport/releases/tag/v4.0.0-rc.1). Althought this is a major version bump, fear not, because all changes will be 100% backwards-compatible. | ||
## [`v4.0.0-rc.2`](https://github.com/clarketm/TableExport/releases/tag/v4.0.0-rc.2) Release Candidate: | ||
> **Notice:** In May 2017, [v3.0.0](https://github.com/clarketm/TableExport/releases/tag/v3.3.9) will be superceded by [v4.0.0](https://github.com/clarketm/TableExport/releases/tag/v4.0.0-alpha.5). Althought this is a major version bump, fear not, because all changes will be 100% backwards-compatible. | ||
> **So why the major version bump you ask?** Well, the rationale for a major version bump is that due to a change in `TableExport`'s dependencies, in [v4.0.0](https://github.com/clarketm/TableExport/releases/tag/v4.0.0-rc.1) forth, JQuery will no longer be a **required** dependency, instead it will be purely **optional**. So existing implementations *with* jQuery will continue to work unimpeded, now with the added benefit that new projets no longer need to rely on the overhead of such large library, unless of course you prefer jQuery or it is already part of your project. | ||
> **So why the major version bump you ask?** Well, the rationale for a major version bump is that due to a change in `TableExport`'s dependencies, in [v4.0.0](https://github.com/clarketm/TableExport/releases/tag/v4.0.0-alpha.5) forth, JQuery will no longer be a **required** dependency, instead it will be purely **optional**. So existing implementations *with* jQuery will continue to work unimpeded, now with the added benefit that new projets no longer need to rely on the overhead of such large library, unless of course you prefer jQuery or it is already part of your project. | ||
## Getting Started | ||
### Examples: | ||
#### Property | ||
* [`bootstrap`](https://www.travismclarke.com/tableexport/examples/bootstrap.html) | ||
* [`exportButtons`](https://www.travismclarke.com/tableexport/examples/exportButtons.html) | ||
* [`filename`](https://www.travismclarke.com/tableexport/examples/filename.html) | ||
* [`formats`](https://www.travismclarke.com/tableexport/examples/formats-xlsx-xls-csv-txt.html) | ||
* [`headers`](https://www.travismclarke.com/tableexport/examples/headers_footers.html) | ||
* [`footers`](https://www.travismclarke.com/tableexport/examples/headers_footers.html) | ||
* [`ignoreRows`](https://www.travismclarke.com/tableexport/examples/ignore-row-cols-cells.html) | ||
* [`ignoreCols`](https://www.travismclarke.com/tableexport/examples/ignore-row-cols-cells.html) | ||
* [`position`](https://www.travismclarke.com/tableexport/examples/position.html) | ||
* [`whitespace`](https://www.travismclarke.com/tableexport/examples/whitespace.html) | ||
#### Settings | ||
* [`ignoreCSS`](https://www.travismclarke.com/tableexport/examples/ignore-row-cols-cells.html) | ||
* [`emptyCSS`](https://www.travismclarke.com/tableexport/examples/ignore-row-cols-cells.html) | ||
#### TODOs | ||
- [ ] Update JSDocs and TypScript definition file. | ||
- [ ] Allow `ignoreCSS` and `emptyCSS` to work with any `selector|selector[]` instead of solely a single CSS class. | ||
- [ ] Fix bug with **CSV** and **TXT** `ignoreRows` and `ignoreCols` (rows/cols rendered as empty strings rather than being *removed*). | ||
- [ ] Reimplement and test the `update`, `reset`, and `remove` **TableExport** prototype roperties without requiring jQuery. | ||
- [ ] Ensure (via testing) full consistency and backwards-compatibility for jQuery. | ||
- [ ] Make jQuery as *peer dependency* and ensure proper **TableExport** rendering in broswser, AMD, and CommonJS environments. | ||
## Getting Started ([`v3.3.12`](https://github.com/clarketm/TableExport/releases/tag/v3.3.12) LTS) | ||
### Download and Setup | ||
@@ -217,3 +243,3 @@ | ||
/* default filename if "id" attribute is set and undefined */ | ||
$.fn.tableExport.defaultFileName = "myDownload"; | ||
$.fn.tableExport.defaultFilename = "myDownload"; | ||
@@ -220,0 +246,0 @@ /* default class to style buttons when not using bootstrap */ |
/*! | ||
* TableExport.js 4.0.0-rc.1 (https://www.travismclarke.com) | ||
* TableExport.js 4.0.0-rc.2 (https://www.travismclarke.com) | ||
* Copyright 2017 Travis Clarke | ||
@@ -7,12 +7,17 @@ * Licensed under the MIT license | ||
;(function (root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['exports', 'jquery', 'blobjs', 'file-saverjs', 'xlsx-js'], factory); // AMD | ||
// AMD | ||
define(['jquery', 'blobjs', 'file-saverjs', 'xlsx'], factory); | ||
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { | ||
factory(exports, require('jquery'), require('blobjs'), require('file-saverjs'), require('xlsx-js')); // CommonJS | ||
// CommonJS | ||
module.exports = factory(require('jquery'), require('blobjs'), require('file-saverjs'), require('xlsx')); | ||
} else { | ||
factory(root, root.jQuery, root.Blob, root.saveAs, root.XLSX); // Browser globals | ||
// Browser globals | ||
root.TableExport = factory(root.jQuery, root.Blob, root.saveAs, root.XLSX); | ||
} | ||
}(this || window, function (exports, $, Blob, saveAs, XLSX) { | ||
}(this, function ($, Blob, saveAs, XLSX) { | ||
'use strict'; | ||
// TODO: update typings (def file) | ||
/** | ||
@@ -26,2 +31,4 @@ * TableExport main plugin constructor | ||
var TableExport = function (selectors, options, isUpdate) { | ||
if (!selectors) return new Error('"selectors" is required'); | ||
var self = this; | ||
@@ -111,3 +118,3 @@ /** | ||
*/ | ||
version: '4.0.0-rc.1', | ||
version: '4.0.0-rc.2', | ||
/** | ||
@@ -732,4 +739,3 @@ * Default plugin options. | ||
LocalStorage: function () { | ||
this.type = 'localStorage'; | ||
this.store = exports[this.type]; | ||
this.store = localStorage; | ||
this.namespace = 'te-'; | ||
@@ -864,2 +870,3 @@ this.getKey = function (key) { | ||
for (var prop in TableExport.prototype) { | ||
// TODO: check compat | ||
$.fn.tableExport[prop] = TableExport.prototype[prop]; | ||
@@ -869,5 +876,4 @@ } | ||
return exports.default = exports.TableExport = TableExport; | ||
return TableExport; | ||
} | ||
)); |
/*! | ||
* TableExport.js 4.0.0-rc.1 (https://www.travismclarke.com) | ||
* TableExport.js 4.0.0-rc.2 (https://www.travismclarke.com) | ||
* Copyright 2017 Travis Clarke | ||
* Licensed under the MIT license | ||
*/ | ||
!function(t,e){"function"==typeof define&&define.amd?define(["exports","jquery","blobjs","file-saverjs","xlsx-js"],e):"object"==typeof exports&&"string"!=typeof exports.nodeName?e(exports,require("jquery"),require("blobjs"),require("file-saverjs"),require("xlsx-js")):e(t,t.jQuery,t.Blob,t.saveAs,t.XLSX)}(this||window,function(t,e,r,n,o){"use strict";function s(){for(var t=arguments,e=1;e<t.length;e++)for(var r in t[e])t[e].hasOwnProperty(r)&&(t[0][r]=t[e][r]);return t[0]}function i(t){return t instanceof NodeList||e&&t instanceof e?[].slice.call(t):[].concat(t)}function a(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.cls)}function l(t,e,r){var n={};return t?(n.bootstrapClass=t[0]+" ",n.bootstrapTheme=t[1]+" ",n.bootstrapSpacing=t[2]+" "):(n.bootstrapClass=r+" ",n.bootstrapTheme="",n.bootstrapSpacing=""),n}var u=function(t,e,r){var n=this;n.settings=r?e:s({},n.defaults,e),n.selectors=i(t);var a=n.settings;a.ignoreRows=a.ignoreRows instanceof Array?a.ignoreRows:[a.ignoreRows],a.ignoreCols=a.ignoreCols instanceof Array?a.ignoreCols:[a.ignoreCols],a.ignoreCSS=n.ignoreCSS instanceof Array?n.ignoreCSS.join(", "):n.ignoreCSS,a.emptyCSS=n.emptyCSS instanceof Array?n.emptyCSS.join(", "):n.emptyCSS,a.formatValue=n.formatValue.bind(this,a.trimWhitespace),a.bootstrapSettings=l(n.bootstrap,n.bootstrapConfig,n.defaultButton);var u={};n.getExportData=function(){return u},n.selectors.forEach(function(t){var e={},s=t.querySelectorAll("caption:not(.head)");r&&s.parentNode.removeChild(s),e.rows=i(t.querySelectorAll("tbody > tr")),e.rows=a.headers?i(t.querySelectorAll("thead > tr")).concat(e.rows):e.rows,e.rows=a.footers?e.rows.concat(i(t.querySelectorAll("tfoot > tr"))):e.rows,e.thAdj=a.headers?t.querySelectorAll("thead > tr").length:0,e.filename="id"===a.filename?t.getAttribute("id")?t.getAttribute("id"):n.defaultFilename:a.filename?a.filename:n.defaultFilename,e.uuid=f(t),e.checkCaption=function(e){var r=t.querySelectorAll("caption:not(.head)");r.length?r[0].appendChild(e):(r=document.createElement("caption"),r.className=a.bootstrapSettings.bootstrapSpacing+a.position,r.appendChild(e),t.insertBefore(r,t.firstChild))},e.setExportData=function(){return function(t){var r=p.getInstance().getItem(t),n=t.substring(t.indexOf("-")+1);u[e.uuid]=u[e.uuid]||{},u[e.uuid][n]=JSON.parse(r)}}(),a.formats.forEach(function(t){!(!o||"xls"!==t)&&(t="xlsm"),!o&&"xlsx"===t&&(t=null),t&&e.setExportData(n.exporters[t].call(n,e))})});var c=document.querySelectorAll("button[tableexport-id]");return m(c,"click",n.downloadHandler,n),n};u.prototype={version:"4.0.0-rc.1",defaults:{headers:!0,footers:!0,formats:["xls","csv","txt"],filename:"id",bootstrap:!1,exportButtons:!0,position:"bottom",ignoreRows:null,ignoreCols:null,trimWhitespace:!0},charset:"charset=utf-8",defaultFilename:"myDownload",defaultButton:"button-default",ignoreCSS:"tableexport-ignore",emptyCSS:"tableexport-empty",bootstrapConfig:["btn","btn-default","btn-toolbar"],rowDel:"\r\n",entityMap:{"&":"&","<":"<",">":">","'":"'","/":"/"},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"},types:{string:{defaultClass:"tableexport-string"},number:{defaultClass:"tableexport-number",assert:function(t){return!isNaN(t.replace(/,/g,""))}},"boolean":{defaultClass:"tableexport-boolean",assert:function(t){return"true"===t.toLowerCase()||"false"===t.toLowerCase()}},date:{defaultClass:"tableexport-date",assert:function(t){return!isNaN(Date.parse(t))}}},exporters:{xlsx:function(t){var e=this,r=e.settings,n={},o=i(t.rows).map(function(o,s){if(!~r.ignoreRows.indexOf(s-t.thAdj)&&!a(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return i(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!a(t,r.ignoreCSS)){if(a(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[s]=n[s]||{},n[s][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var i=1;i<t.getAttribute("rowspan");i++)n[s+i]=n[s+i]||{},n[s+i][o]=1;if(n[s]){for(var l=o+1,u=0,p=0,i=0;i<=Math.max.apply(Math,Object.keys(n[s]))&&(n[s][i]?u=p>=o?u+n[s][i]:u:p++,p!==l);i++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.xlsx.mimeType,fileExtension:u.prototype.xlsx.fileExtension})),l=u.prototype.xlsx.buttonContent,f=u.prototype.xlsx.defaultClass,m=c({uuid:t.uuid,type:"xlsx"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},xlsm:function(t){var e=this,r=e.settings,n={},o=i(t.rows).map(function(o,s){if(!~r.ignoreRows.indexOf(s-t.thAdj)&&!a(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return i(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!a(t,r.ignoreCSS)){if(a(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[s]=n[s]||{},n[s][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var i=1;i<t.getAttribute("rowspan");i++)n[s+i]=n[s+i]||{},n[s+i][o]=1;if(n[s]){for(var l=o+1,u=0,p=0,i=0;i<=Math.max.apply(Math,Object.keys(n[s]))&&(n[s][i]?u=p>=o?u+n[s][i]:u:p++,p!==l);i++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.xls.mimeType,fileExtension:u.prototype.xls.fileExtension})),l=u.prototype.xls.buttonContent,f=u.prototype.xls.defaultClass,m=c({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},xls:function(t){var e=this,r=e.settings,n=u.prototype.xls.separator,o=i(t.rows).map(function(o,s){if(!~r.ignoreRows.indexOf(s-t.thAdj)&&!a(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return i(l).map(function(t,n){if(!~r.ignoreCols.indexOf(n)&&!a(t,r.ignoreCSS))return a(t,r.emptyCSS)?" ":{v:r.formatValue(t.textContent),t:e.getType(t.className)}}).join(n)}}).join(e).map(function(t){return[].concat.apply([],t)}),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.xls.mimeType,fileExtension:u.prototype.xls.fileExtension})),l=u.prototype.xls.buttonContent,f=u.prototype.xls.defaultClass,m=c({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},csv:function(t){var e=this,r=e.settings,n=u.prototype.csv.separator,o=i(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!a(e,r.ignoreCSS)){var s=e.querySelectorAll("th, td");return i(s).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!a(t,r.ignoreCSS))return a(t,r.emptyCSS)?" ":'"'+r.formatValue(t.textContent.replace(/"/g,'""'))+'"'}).join(n)}}).join(e.rowDel),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.csv.mimeType,fileExtension:u.prototype.csv.fileExtension})),l=u.prototype.csv.buttonContent,f=u.prototype.csv.defaultClass,m=c({uuid:t.uuid,type:"csv"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m},txt:function(t){var e=this,r=e.settings,n=u.prototype.txt.separator,o=i(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!a(e,r.ignoreCSS)){var s=e.querySelectorAll("th, td");return i(s).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!a(t,r.ignoreCSS))return a(t,r.emptyCSS)?" ":r.formatValue(t.textContent)}).join(n)}}).join(e.rowDel),s=u.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:u.prototype.txt.mimeType,fileExtension:u.prototype.txt.fileExtension})),l=u.prototype.txt.buttonContent,f=u.prototype.txt.defaultClass,m=c({uuid:t.uuid,type:"txt"}),x=r.exportButtons&&u.prototype.createObjButton(m,s,l,f,r.bootstrapSettings);return x&&t.checkCaption(x),p.getInstance().setItem(m,s,!0),m}},createObjButton:function(t,e,r,n,o){var s=document.createElement("button");return s.setAttribute("tableexport-id",t),s.className=o.bootstrapClass+o.bootstrapTheme+n,s.textContent=r,s},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return u.prototype.entityMap[t]})},formatValue:function(t,e){return t?e.trim():e},getType:function(t){if(!t)return"";var e=u.prototype.types;return~t.indexOf(e.string.defaultClass)?"s":~t.indexOf(e.number.defaultClass)?"n":~t.indexOf(e["boolean"].defaultClass)?"b":~t.indexOf(e.date.defaultClass)?"d":""},dateNum:function(t,e){e&&(t+=1462);var r=Date.parse(t);return(r-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},r={s:{c:1e7,r:1e7},e:{c:0,r:0}},n=u.prototype.types,s=0;s!==t.length;++s)for(var i=0;i!==t[s].length;++i){r.s.r>s&&(r.s.r=s),r.s.c>i&&(r.s.c=i),r.e.r<s&&(r.e.r=s),r.e.c<i&&(r.e.c=i);var a=t[s][i];if(a&&a.v){var l=o.utils.encode_cell({c:i,r:s});a.t||(n.number.assert(a.v)?a.t="n":n["boolean"].assert(a.v)?a.t="b":n.date.assert(a.v)?a.t="d":a.t="s"),"d"===a.t&&(a.t="n",a.z=o.SSF._table[14],a.v=this.dateNum(a.v)),e[l]=a}}return r.s.c<1e7&&(e["!ref"]=o.utils.encode_range(r)),e},downloadHandler:function(t){var e=t.target,r=JSON.parse(p.getInstance().getItem(e.getAttribute("tableexport-id"))),n=r.data,o=r.filename,s=r.mimeType,i=r.fileExtension;this.export2file(n,s,o,i)},Workbook:function(){this.SheetNames=[],this.Sheets={}},string2ArrayBuffer:function(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n!==t.length;++n)r[n]=255&t.charCodeAt(n);return e},export2file:function(t,e,s,i){if(o&&".xls"===i.substr(0,4)){var a=new this.Workbook,l=this.createSheet(t);a.SheetNames.push(s),a.Sheets[s]=l;var u={bookType:i.substr(1,3)+(i.substr(4)||"m"),bookSST:!1,type:"binary"},p=o.write(a,u);t=this.string2ArrayBuffer(p)}n(new r([t],{type:e+";"+this.charset}),s+i,!0)},update:function(t){},reset:function(){},remove:function(){},LocalStorage:function(){this.type="localStorage",this.store=t[this.type],this.namespace="te-",this.getKey=function(t){return this.namespace+t},this.setItem=function(t,e,r){var n=this.getKey(t);if(!this.exists(n)||r)return"string"!=typeof e?this.error('"value" must be a string'):this.store.setItem(n,e)},this.getItem=function(t){var e=this.getKey(t);return this.store.getItem(e)},this.exists=function(t){var e=this.getKey(t);return null!==this.store.getItem(e)},this.removeItem=function(t){var e=this.getKey(t);return this.store.removeItem(e)},this.error=function(t){return new Error("error:",t)}}};var p=u.prototype.LocalStorage;p.getInstance=function(){return p._instance=null,function(){return p._instance||(p._instance=new p),p._instance}}();var f=function(){var t=0;return function(e){return e.id||(e.id="tableexport-"+ ++t),e.id}}(),c=function(){var t,e,r=0;return function(n){var o=n.type;if(n=JSON.stringify(n),0===n.length)return r;for(t=0;t<n.length;t++)e=n.charCodeAt(t),r=(r<<5)-r+e,r|=0;return r.toString(16).substring(1)+"-"+o}}(),m=function(){var t=null;return function(e,r,n,o){for(var s=n.bind(o),i=0;i<e.length;++i)t&&e[i].removeEventListener(r,t,!1),e[i].addEventListener(r,s,!1);t=s}}();if(e){e.fn.tableExport=function(t,e){return new u(this,t,e)};for(var x in u.prototype)e.fn.tableExport[x]=u.prototype[x]}return t["default"]=t.TableExport=u}); | ||
!function(t,e){"function"==typeof define&&define.amd?define(["jquery","blobjs","file-saverjs","xlsx"],e):"object"==typeof exports&&"string"!=typeof exports.nodeName?module.exports=e(require("jquery"),require("blobjs"),require("file-saverjs"),require("xlsx")):t.TableExport=e(t.jQuery,t.Blob,t.saveAs,t.XLSX)}(this,function(t,e,r,n){"use strict";function o(){for(var t=arguments,e=1;e<t.length;e++)for(var r in t[e])t[e].hasOwnProperty(r)&&(t[0][r]=t[e][r]);return t[0]}function s(e){return e instanceof NodeList||t&&e instanceof t?[].slice.call(e):[].concat(e)}function i(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.cls)}function a(t,e,r){var n={};return t?(n.bootstrapClass=t[0]+" ",n.bootstrapTheme=t[1]+" ",n.bootstrapSpacing=t[2]+" "):(n.bootstrapClass=r+" ",n.bootstrapTheme="",n.bootstrapSpacing=""),n}var l=function(t,e,r){if(!t)return new Error('"selectors" is required');var i=this;i.settings=r?e:o({},i.defaults,e),i.selectors=s(t);var l=i.settings;l.ignoreRows=l.ignoreRows instanceof Array?l.ignoreRows:[l.ignoreRows],l.ignoreCols=l.ignoreCols instanceof Array?l.ignoreCols:[l.ignoreCols],l.ignoreCSS=i.ignoreCSS instanceof Array?i.ignoreCSS.join(", "):i.ignoreCSS,l.emptyCSS=i.emptyCSS instanceof Array?i.emptyCSS.join(", "):i.emptyCSS,l.formatValue=i.formatValue.bind(this,l.trimWhitespace),l.bootstrapSettings=a(i.bootstrap,i.bootstrapConfig,i.defaultButton);var f={};i.getExportData=function(){return f},i.selectors.forEach(function(t){var e={},o=t.querySelectorAll("caption:not(.head)");r&&o.parentNode.removeChild(o),e.rows=s(t.querySelectorAll("tbody > tr")),e.rows=l.headers?s(t.querySelectorAll("thead > tr")).concat(e.rows):e.rows,e.rows=l.footers?e.rows.concat(s(t.querySelectorAll("tfoot > tr"))):e.rows,e.thAdj=l.headers?t.querySelectorAll("thead > tr").length:0,e.filename="id"===l.filename?t.getAttribute("id")?t.getAttribute("id"):i.defaultFilename:l.filename?l.filename:i.defaultFilename,e.uuid=p(t),e.checkCaption=function(e){var r=t.querySelectorAll("caption:not(.head)");r.length?r[0].appendChild(e):(r=document.createElement("caption"),r.className=l.bootstrapSettings.bootstrapSpacing+l.position,r.appendChild(e),t.insertBefore(r,t.firstChild))},e.setExportData=function(){return function(t){var r=u.getInstance().getItem(t),n=t.substring(t.indexOf("-")+1);f[e.uuid]=f[e.uuid]||{},f[e.uuid][n]=JSON.parse(r)}}(),l.formats.forEach(function(t){!(!n||"xls"!==t)&&(t="xlsm"),!n&&"xlsx"===t&&(t=null),t&&e.setExportData(i.exporters[t].call(i,e))})});var m=document.querySelectorAll("button[tableexport-id]");return c(m,"click",i.downloadHandler,i),i};l.prototype={version:"4.0.0-rc.2",defaults:{headers:!0,footers:!0,formats:["xls","csv","txt"],filename:"id",bootstrap:!1,exportButtons:!0,position:"bottom",ignoreRows:null,ignoreCols:null,trimWhitespace:!0},charset:"charset=utf-8",defaultFilename:"myDownload",defaultButton:"button-default",ignoreCSS:"tableexport-ignore",emptyCSS:"tableexport-empty",bootstrapConfig:["btn","btn-default","btn-toolbar"],rowDel:"\r\n",entityMap:{"&":"&","<":"<",">":">","'":"'","/":"/"},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"},types:{string:{defaultClass:"tableexport-string"},number:{defaultClass:"tableexport-number",assert:function(t){return!isNaN(t.replace(/,/g,""))}},"boolean":{defaultClass:"tableexport-boolean",assert:function(t){return"true"===t.toLowerCase()||"false"===t.toLowerCase()}},date:{defaultClass:"tableexport-date",assert:function(t){return!isNaN(Date.parse(t))}}},exporters:{xlsx:function(t){var e=this,r=e.settings,n={},o=s(t.rows).map(function(o,a){if(!~r.ignoreRows.indexOf(a-t.thAdj)&&!i(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return s(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!i(t,r.ignoreCSS)){if(i(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[a]=n[a]||{},n[a][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var s=1;s<t.getAttribute("rowspan");s++)n[a+s]=n[a+s]||{},n[a+s][o]=1;if(n[a]){for(var l=o+1,u=0,p=0,s=0;s<=Math.max.apply(Math,Object.keys(n[a]))&&(n[a][s]?u=p>=o?u+n[a][s]:u:p++,p!==l);s++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.xlsx.mimeType,fileExtension:l.prototype.xlsx.fileExtension})),p=l.prototype.xlsx.buttonContent,c=l.prototype.xlsx.defaultClass,m=f({uuid:t.uuid,type:"xlsx"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},xlsm:function(t){var e=this,r=e.settings,n={},o=s(t.rows).map(function(o,a){if(!~r.ignoreRows.indexOf(a-t.thAdj)&&!i(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return s(l).map(function(t,o){if(!~r.ignoreCols.indexOf(o)&&!i(t,r.ignoreCSS)){if(i(t,r.emptyCSS))return" ";if(t.hasAttribute("colspan")&&(n[a]=n[a]||{},n[a][o+1]=t.getAttribute("colspan")-1),t.hasAttribute("rowspan"))for(var s=1;s<t.getAttribute("rowspan");s++)n[a+s]=n[a+s]||{},n[a+s][o]=1;if(n[a]){for(var l=o+1,u=0,p=0,s=0;s<=Math.max.apply(Math,Object.keys(n[a]))&&(n[a][s]?u=p>=o?u+n[a][s]:u:p++,p!==l);s++);return new Array(u).concat({v:r.formatValue(t.textContent),t:e.getType(t.className)})}return{v:r.formatValue(t.textContent),t:e.getType(t.className)}}}).filter(function(t){return t})}}).map(function(t){return t&&[].concat.apply([],t)}).filter(function(t){return t}),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.xls.mimeType,fileExtension:l.prototype.xls.fileExtension})),p=l.prototype.xls.buttonContent,c=l.prototype.xls.defaultClass,m=f({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},xls:function(t){var e=this,r=e.settings,n=l.prototype.xls.separator,o=s(t.rows).map(function(o,a){if(!~r.ignoreRows.indexOf(a-t.thAdj)&&!i(o,r.ignoreCSS)){var l=o.querySelectorAll("th, td");return s(l).map(function(t,n){if(!~r.ignoreCols.indexOf(n)&&!i(t,r.ignoreCSS))return i(t,r.emptyCSS)?" ":{v:r.formatValue(t.textContent),t:e.getType(t.className)}}).join(n)}}).join(e).map(function(t){return[].concat.apply([],t)}),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.xls.mimeType,fileExtension:l.prototype.xls.fileExtension})),p=l.prototype.xls.buttonContent,c=l.prototype.xls.defaultClass,m=f({uuid:t.uuid,type:"xls"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},csv:function(t){var e=this,r=e.settings,n=l.prototype.csv.separator,o=s(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!i(e,r.ignoreCSS)){var a=e.querySelectorAll("th, td");return s(a).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!i(t,r.ignoreCSS))return i(t,r.emptyCSS)?" ":'"'+r.formatValue(t.textContent.replace(/"/g,'""'))+'"'}).join(n)}}).join(e.rowDel),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.csv.mimeType,fileExtension:l.prototype.csv.fileExtension})),p=l.prototype.csv.buttonContent,c=l.prototype.csv.defaultClass,m=f({uuid:t.uuid,type:"csv"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m},txt:function(t){var e=this,r=e.settings,n=l.prototype.txt.separator,o=s(t.rows).map(function(e,o){if(!~r.ignoreRows.indexOf(o-t.thAdj)&&!i(e,r.ignoreCSS)){var a=e.querySelectorAll("th, td");return s(a).map(function(t,e){if(!~r.ignoreCols.indexOf(e)&&!i(t,r.ignoreCSS))return i(t,r.emptyCSS)?" ":r.formatValue(t.textContent)}).join(n)}}).join(e.rowDel),a=l.prototype.escapeHtml(JSON.stringify({data:o,filename:t.filename,mimeType:l.prototype.txt.mimeType,fileExtension:l.prototype.txt.fileExtension})),p=l.prototype.txt.buttonContent,c=l.prototype.txt.defaultClass,m=f({uuid:t.uuid,type:"txt"}),x=r.exportButtons&&l.prototype.createObjButton(m,a,p,c,r.bootstrapSettings);return x&&t.checkCaption(x),u.getInstance().setItem(m,a,!0),m}},createObjButton:function(t,e,r,n,o){var s=document.createElement("button");return s.setAttribute("tableexport-id",t),s.className=o.bootstrapClass+o.bootstrapTheme+n,s.textContent=r,s},escapeHtml:function(t){return String(t).replace(/[&<>'\/]/g,function(t){return l.prototype.entityMap[t]})},formatValue:function(t,e){return t?e.trim():e},getType:function(t){if(!t)return"";var e=l.prototype.types;return~t.indexOf(e.string.defaultClass)?"s":~t.indexOf(e.number.defaultClass)?"n":~t.indexOf(e["boolean"].defaultClass)?"b":~t.indexOf(e.date.defaultClass)?"d":""},dateNum:function(t,e){e&&(t+=1462);var r=Date.parse(t);return(r-new Date(Date.UTC(1899,11,30)))/864e5},createSheet:function(t){for(var e={},r={s:{c:1e7,r:1e7},e:{c:0,r:0}},o=l.prototype.types,s=0;s!==t.length;++s)for(var i=0;i!==t[s].length;++i){r.s.r>s&&(r.s.r=s),r.s.c>i&&(r.s.c=i),r.e.r<s&&(r.e.r=s),r.e.c<i&&(r.e.c=i);var a=t[s][i];if(a&&a.v){var u=n.utils.encode_cell({c:i,r:s});a.t||(o.number.assert(a.v)?a.t="n":o["boolean"].assert(a.v)?a.t="b":o.date.assert(a.v)?a.t="d":a.t="s"),"d"===a.t&&(a.t="n",a.z=n.SSF._table[14],a.v=this.dateNum(a.v)),e[u]=a}}return r.s.c<1e7&&(e["!ref"]=n.utils.encode_range(r)),e},downloadHandler:function(t){var e=t.target,r=JSON.parse(u.getInstance().getItem(e.getAttribute("tableexport-id"))),n=r.data,o=r.filename,s=r.mimeType,i=r.fileExtension;this.export2file(n,s,o,i)},Workbook:function(){this.SheetNames=[],this.Sheets={}},string2ArrayBuffer:function(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n!==t.length;++n)r[n]=255&t.charCodeAt(n);return e},export2file:function(t,o,s,i){if(n&&".xls"===i.substr(0,4)){var a=new this.Workbook,l=this.createSheet(t);a.SheetNames.push(s),a.Sheets[s]=l;var u={bookType:i.substr(1,3)+(i.substr(4)||"m"),bookSST:!1,type:"binary"},p=n.write(a,u);t=this.string2ArrayBuffer(p)}r(new e([t],{type:o+";"+this.charset}),s+i,!0)},update:function(t){},reset:function(){},remove:function(){},LocalStorage:function(){this.store=localStorage,this.namespace="te-",this.getKey=function(t){return this.namespace+t},this.setItem=function(t,e,r){var n=this.getKey(t);if(!this.exists(n)||r)return"string"!=typeof e?this.error('"value" must be a string'):this.store.setItem(n,e)},this.getItem=function(t){var e=this.getKey(t);return this.store.getItem(e)},this.exists=function(t){var e=this.getKey(t);return null!==this.store.getItem(e)},this.removeItem=function(t){var e=this.getKey(t);return this.store.removeItem(e)},this.error=function(t){return new Error("error:",t)}}};var u=l.prototype.LocalStorage;u.getInstance=function(){return u._instance=null,function(){return u._instance||(u._instance=new u),u._instance}}();var p=function(){var t=0;return function(e){return e.id||(e.id="tableexport-"+ ++t),e.id}}(),f=function(){var t,e,r=0;return function(n){var o=n.type;if(n=JSON.stringify(n),0===n.length)return r;for(t=0;t<n.length;t++)e=n.charCodeAt(t),r=(r<<5)-r+e,r|=0;return r.toString(16).substring(1)+"-"+o}}(),c=function(){var t=null;return function(e,r,n,o){for(var s=n.bind(o),i=0;i<e.length;++i)t&&e[i].removeEventListener(r,t,!1),e[i].addEventListener(r,s,!1);t=s}}();if(t){t.fn.tableExport=function(t,e){return new l(this,t,e)};for(var m in l.prototype)t.fn.tableExport[m]=l.prototype[m]}return l}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7581288
52742
278
+ Addedxlsx@^0.9.13
+ Addedadler-32@1.0.0(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcfb@0.11.1(transitive)
+ Addedcodepage@1.8.1(transitive)
+ Addedcolors@0.6.2(transitive)
+ Addedcommander@2.9.0(transitive)
+ Addedconcat-stream@2.0.0(transitive)
+ Addedcrc-32@1.0.2(transitive)
+ Addedexit-on-epipe@1.0.1(transitive)
+ Addedfrac@1.0.6(transitive)
+ Addedgraceful-readlink@1.0.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedprintj@1.3.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedssf@0.9.4(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedvoc@1.2.0(transitive)
+ Addedxlsx@0.9.13(transitive)
- Removedxlsx-js@^0.8.7
- Removedjzip@1.0.0(transitive)
- Removedxlsx-js@0.8.7(transitive)