Recherche des tweets de réponse avec l'API Tweeter

This commit is contained in:
hugol committed 2024-11-17 13:55:25 +01:00
1 parent 3d386178bf
commit 8dc18553ec
1751 files changed
+379552

No files matched your search

@@ -0,0 +1,256 @@
/*!
* Column visibility buttons for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net', 'datatables.net-buttons'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
var jq = require('jquery');
var cjsRequires = function (root, $) {
if ( ! $.fn.dataTable ) {
require('datatables.net')(root, $);
}
if ( ! $.fn.dataTable.Buttons ) {
require('datatables.net-buttons')(root, $);
}
};
if (typeof window === 'undefined') {
module.exports = function (root, $) {
if ( ! root ) {
// CommonJS environments without a window global must pass a
// root. This will give an error otherwise
root = window;
}
if ( ! $ ) {
$ = jq( root );
}
cjsRequires( root, $ );
return factory( $, root, root.document );
};
}
else {
cjsRequires( window, jq );
module.exports = factory( jq, window, window.document );
}
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document ) {
'use strict';
var DataTable = $.fn.dataTable;
$.extend(DataTable.ext.buttons, {
// A collection of column visibility buttons
colvis: function (dt, conf) {
var node = null;
var buttonConf = {
extend: 'collection',
init: function (dt, n) {
node = n;
},
text: function (dt) {
return dt.i18n('buttons.colvis', 'Column visibility');
},
className: 'buttons-colvis',
closeButton: false,
buttons: [
{
extend: 'columnsToggle',
columns: conf.columns,
columnText: conf.columnText
}
]
};
// Rebuild the collection with the new column structure if columns are reordered
dt.on('column-reorder.dt' + conf.namespace, function () {
dt.button(null, dt.button(null, node).node()).collectionRebuild([
{
extend: 'columnsToggle',
columns: conf.columns,
columnText: conf.columnText
}
]);
});
return buttonConf;
},
// Selected columns with individual buttons - toggle column visibility
columnsToggle: function (dt, conf) {
var columns = dt
.columns(conf.columns)
.indexes()
.map(function (idx) {
return {
extend: 'columnToggle',
columns: idx,
columnText: conf.columnText
};
})
.toArray();
return columns;
},
// Single button to toggle column visibility
columnToggle: function (dt, conf) {
return {
extend: 'columnVisibility',
columns: conf.columns,
columnText: conf.columnText
};
},
// Selected columns with individual buttons - set column visibility
columnsVisibility: function (dt, conf) {
var columns = dt
.columns(conf.columns)
.indexes()
.map(function (idx) {
return {
extend: 'columnVisibility',
columns: idx,
visibility: conf.visibility,
columnText: conf.columnText
};
})
.toArray();
return columns;
},
// Single button to set column visibility
columnVisibility: {
columns: undefined, // column selector
text: function (dt, button, conf) {
return conf._columnText(dt, conf);
},
className: 'buttons-columnVisibility',
action: function (e, dt, button, conf) {
var col = dt.columns(conf.columns);
var curr = col.visible();
col.visible(
conf.visibility !== undefined ? conf.visibility : !(curr.length ? curr[0] : false)
);
},
init: function (dt, button, conf) {
var that = this;
button.attr('data-cv-idx', conf.columns);
dt.on('column-visibility.dt' + conf.namespace, function (e, settings) {
if (!settings.bDestroying && settings.nTable == dt.settings()[0].nTable) {
that.active(dt.column(conf.columns).visible());
}
}).on('column-reorder.dt' + conf.namespace, function () {
// Button has been removed from the DOM
if (conf.destroying) {
return;
}
if (dt.columns(conf.columns).count() !== 1) {
return;
}
// This button controls the same column index but the text for the column has
// changed
that.text(conf._columnText(dt, conf));
// Since its a different column, we need to check its visibility
that.active(dt.column(conf.columns).visible());
});
this.active(dt.column(conf.columns).visible());
},
destroy: function (dt, button, conf) {
dt.off('column-visibility.dt' + conf.namespace).off(
'column-reorder.dt' + conf.namespace
);
},
_columnText: function (dt, conf) {
if (typeof conf.text === 'string') {
return conf.text;
}
var title = dt.column(conf.columns).title();
var idx = dt.column(conf.columns).index();
title = title
.replace(/\n/g, ' ') // remove new lines
.replace(/<br\s*\/?>/gi, ' ') // replace line breaks with spaces
.replace(/<select(.*?)<\/select\s*>/gi, ''); // remove select tags, including options text
// Strip HTML comments
title = DataTable.Buttons.stripHtmlComments(title);
// Use whatever HTML stripper DataTables is configured for
title = DataTable.util.stripHtml(title).trim();
return conf.columnText ? conf.columnText(dt, idx, title) : title;
}
},
colvisRestore: {
className: 'buttons-colvisRestore',
text: function (dt) {
return dt.i18n('buttons.colvisRestore', 'Restore visibility');
},
init: function (dt, button, conf) {
// Use a private parameter on the column. This gets moved around with the
// column if ColReorder changes the order
dt.columns().every(function () {
var init = this.init();
if (init.__visOriginal === undefined) {
init.__visOriginal = this.visible();
}
});
},
action: function (e, dt, button, conf) {
dt.columns().every(function (i) {
var init = this.init();
this.visible(init.__visOriginal);
});
}
},
colvisGroup: {
className: 'buttons-colvisGroup',
action: function (e, dt, button, conf) {
dt.columns(conf.show).visible(true, false);
dt.columns(conf.hide).visible(false, false);
dt.columns.adjust();
},
show: [],
hide: []
}
});
return DataTable;
}));
@@ -0,0 +1,5 @@
/*!
* Column visibility buttons for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
!function(i){var o,e;"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(n){return i(n,window,document)}):"object"==typeof exports?(o=require("jquery"),e=function(n,t){t.fn.dataTable||require("datatables.net")(n,t),t.fn.dataTable.Buttons||require("datatables.net-buttons")(n,t)},"undefined"==typeof window?module.exports=function(n,t){return n=n||window,t=t||o(n),e(n,t),i(t,0,n.document)}:(e(window,o),module.exports=i(o,window,window.document))):i(jQuery,window,document)}(function(n,t,i){"use strict";var e=n.fn.dataTable;return n.extend(e.ext.buttons,{colvis:function(n,t){var i=null,o={extend:"collection",init:function(n,t){i=t},text:function(n){return n.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",closeButton:!1,buttons:[{extend:"columnsToggle",columns:t.columns,columnText:t.columnText}]};return n.on("column-reorder.dt"+t.namespace,function(){n.button(null,n.button(null,i).node()).collectionRebuild([{extend:"columnsToggle",columns:t.columns,columnText:t.columnText}])}),o},columnsToggle:function(n,t){return n.columns(t.columns).indexes().map(function(n){return{extend:"columnToggle",columns:n,columnText:t.columnText}}).toArray()},columnToggle:function(n,t){return{extend:"columnVisibility",columns:t.columns,columnText:t.columnText}},columnsVisibility:function(n,t){return n.columns(t.columns).indexes().map(function(n){return{extend:"columnVisibility",columns:n,visibility:t.visibility,columnText:t.columnText}}).toArray()},columnVisibility:{columns:void 0,text:function(n,t,i){return i._columnText(n,i)},className:"buttons-columnVisibility",action:function(n,t,i,o){var t=t.columns(o.columns),e=t.visible();t.visible(void 0!==o.visibility?o.visibility:!(e.length&&e[0]))},init:function(i,n,o){var e=this;n.attr("data-cv-idx",o.columns),i.on("column-visibility.dt"+o.namespace,function(n,t){t.bDestroying||t.nTable!=i.settings()[0].nTable||e.active(i.column(o.columns).visible())}).on("column-reorder.dt"+o.namespace,function(){o.destroying||1===i.columns(o.columns).count()&&(e.text(o._columnText(i,o)),e.active(i.column(o.columns).visible()))}),this.active(i.column(o.columns).visible())},destroy:function(n,t,i){n.off("column-visibility.dt"+i.namespace).off("column-reorder.dt"+i.namespace)},_columnText:function(n,t){var i,o;return"string"==typeof t.text?t.text:(o=n.column(t.columns).title(),i=n.column(t.columns).index(),o=o.replace(/\n/g," ").replace(/<br\s*\/?>/gi," ").replace(/<select(.*?)<\/select\s*>/gi,""),o=e.Buttons.stripHtmlComments(o),o=e.util.stripHtml(o).trim(),t.columnText?t.columnText(n,i,o):o)}},colvisRestore:{className:"buttons-colvisRestore",text:function(n){return n.i18n("buttons.colvisRestore","Restore visibility")},init:function(n,t,i){n.columns().every(function(){var n=this.init();void 0===n.__visOriginal&&(n.__visOriginal=this.visible())})},action:function(n,t,i,o){t.columns().every(function(n){var t=this.init();this.visible(t.__visOriginal)})}},colvisGroup:{className:"buttons-colvisGroup",action:function(n,t,i,o){t.columns(o.show).visible(!0,!1),t.columns(o.hide).visible(!1,!1),t.columns.adjust()},show:[],hide:[]}}),e});
@@ -0,0 +1,5 @@
/*!
* Column visibility buttons for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
import jQuery from"jquery";import DataTable from"datatables.net";import Buttons from"datatables.net-buttons";let $=jQuery;$.extend(DataTable.ext.buttons,{colvis:function(n,t){var i=null,o={extend:"collection",init:function(n,t){i=t},text:function(n){return n.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",closeButton:!1,buttons:[{extend:"columnsToggle",columns:t.columns,columnText:t.columnText}]};return n.on("column-reorder.dt"+t.namespace,function(){n.button(null,n.button(null,i).node()).collectionRebuild([{extend:"columnsToggle",columns:t.columns,columnText:t.columnText}])}),o},columnsToggle:function(n,t){return n.columns(t.columns).indexes().map(function(n){return{extend:"columnToggle",columns:n,columnText:t.columnText}}).toArray()},columnToggle:function(n,t){return{extend:"columnVisibility",columns:t.columns,columnText:t.columnText}},columnsVisibility:function(n,t){return n.columns(t.columns).indexes().map(function(n){return{extend:"columnVisibility",columns:n,visibility:t.visibility,columnText:t.columnText}}).toArray()},columnVisibility:{columns:void 0,text:function(n,t,i){return i._columnText(n,i)},className:"buttons-columnVisibility",action:function(n,t,i,o){var t=t.columns(o.columns),e=t.visible();t.visible(void 0!==o.visibility?o.visibility:!(e.length&&e[0]))},init:function(i,n,o){var e=this;n.attr("data-cv-idx",o.columns),i.on("column-visibility.dt"+o.namespace,function(n,t){t.bDestroying||t.nTable!=i.settings()[0].nTable||e.active(i.column(o.columns).visible())}).on("column-reorder.dt"+o.namespace,function(){o.destroying||1===i.columns(o.columns).count()&&(e.text(o._columnText(i,o)),e.active(i.column(o.columns).visible()))}),this.active(i.column(o.columns).visible())},destroy:function(n,t,i){n.off("column-visibility.dt"+i.namespace).off("column-reorder.dt"+i.namespace)},_columnText:function(n,t){var i,o;return"string"==typeof t.text?t.text:(o=n.column(t.columns).title(),i=n.column(t.columns).index(),o=o.replace(/\n/g," ").replace(/<br\s*\/?>/gi," ").replace(/<select(.*?)<\/select\s*>/gi,""),o=DataTable.Buttons.stripHtmlComments(o),o=DataTable.util.stripHtml(o).trim(),t.columnText?t.columnText(n,i,o):o)}},colvisRestore:{className:"buttons-colvisRestore",text:function(n){return n.i18n("buttons.colvisRestore","Restore visibility")},init:function(n,t,i){n.columns().every(function(){var n=this.init();void 0===n.__visOriginal&&(n.__visOriginal=this.visible())})},action:function(n,t,i,o){t.columns().every(function(n){var t=this.init();this.visible(t.__visOriginal)})}},colvisGroup:{className:"buttons-colvisGroup",action:function(n,t,i,o){t.columns(o.show).visible(!0,!1),t.columns(o.hide).visible(!1,!1),t.columns.adjust()},show:[],hide:[]}});export default DataTable;
@@ -0,0 +1,212 @@
/*!
* Column visibility buttons for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
import jQuery from 'jquery';
import DataTable from 'datatables.net';
import Buttons from 'datatables.net-buttons';
// Allow reassignment of the $ variable
let $ = jQuery;
$.extend(DataTable.ext.buttons, {
// A collection of column visibility buttons
colvis: function (dt, conf) {
var node = null;
var buttonConf = {
extend: 'collection',
init: function (dt, n) {
node = n;
},
text: function (dt) {
return dt.i18n('buttons.colvis', 'Column visibility');
},
className: 'buttons-colvis',
closeButton: false,
buttons: [
{
extend: 'columnsToggle',
columns: conf.columns,
columnText: conf.columnText
}
]
};
// Rebuild the collection with the new column structure if columns are reordered
dt.on('column-reorder.dt' + conf.namespace, function () {
dt.button(null, dt.button(null, node).node()).collectionRebuild([
{
extend: 'columnsToggle',
columns: conf.columns,
columnText: conf.columnText
}
]);
});
return buttonConf;
},
// Selected columns with individual buttons - toggle column visibility
columnsToggle: function (dt, conf) {
var columns = dt
.columns(conf.columns)
.indexes()
.map(function (idx) {
return {
extend: 'columnToggle',
columns: idx,
columnText: conf.columnText
};
})
.toArray();
return columns;
},
// Single button to toggle column visibility
columnToggle: function (dt, conf) {
return {
extend: 'columnVisibility',
columns: conf.columns,
columnText: conf.columnText
};
},
// Selected columns with individual buttons - set column visibility
columnsVisibility: function (dt, conf) {
var columns = dt
.columns(conf.columns)
.indexes()
.map(function (idx) {
return {
extend: 'columnVisibility',
columns: idx,
visibility: conf.visibility,
columnText: conf.columnText
};
})
.toArray();
return columns;
},
// Single button to set column visibility
columnVisibility: {
columns: undefined, // column selector
text: function (dt, button, conf) {
return conf._columnText(dt, conf);
},
className: 'buttons-columnVisibility',
action: function (e, dt, button, conf) {
var col = dt.columns(conf.columns);
var curr = col.visible();
col.visible(
conf.visibility !== undefined ? conf.visibility : !(curr.length ? curr[0] : false)
);
},
init: function (dt, button, conf) {
var that = this;
button.attr('data-cv-idx', conf.columns);
dt.on('column-visibility.dt' + conf.namespace, function (e, settings) {
if (!settings.bDestroying && settings.nTable == dt.settings()[0].nTable) {
that.active(dt.column(conf.columns).visible());
}
}).on('column-reorder.dt' + conf.namespace, function () {
// Button has been removed from the DOM
if (conf.destroying) {
return;
}
if (dt.columns(conf.columns).count() !== 1) {
return;
}
// This button controls the same column index but the text for the column has
// changed
that.text(conf._columnText(dt, conf));
// Since its a different column, we need to check its visibility
that.active(dt.column(conf.columns).visible());
});
this.active(dt.column(conf.columns).visible());
},
destroy: function (dt, button, conf) {
dt.off('column-visibility.dt' + conf.namespace).off(
'column-reorder.dt' + conf.namespace
);
},
_columnText: function (dt, conf) {
if (typeof conf.text === 'string') {
return conf.text;
}
var title = dt.column(conf.columns).title();
var idx = dt.column(conf.columns).index();
title = title
.replace(/\n/g, ' ') // remove new lines
.replace(/<br\s*\/?>/gi, ' ') // replace line breaks with spaces
.replace(/<select(.*?)<\/select\s*>/gi, ''); // remove select tags, including options text
// Strip HTML comments
title = DataTable.Buttons.stripHtmlComments(title);
// Use whatever HTML stripper DataTables is configured for
title = DataTable.util.stripHtml(title).trim();
return conf.columnText ? conf.columnText(dt, idx, title) : title;
}
},
colvisRestore: {
className: 'buttons-colvisRestore',
text: function (dt) {
return dt.i18n('buttons.colvisRestore', 'Restore visibility');
},
init: function (dt, button, conf) {
// Use a private parameter on the column. This gets moved around with the
// column if ColReorder changes the order
dt.columns().every(function () {
var init = this.init();
if (init.__visOriginal === undefined) {
init.__visOriginal = this.visible();
}
});
},
action: function (e, dt, button, conf) {
dt.columns().every(function (i) {
var init = this.init();
this.visible(init.__visOriginal);
});
}
},
colvisGroup: {
className: 'buttons-colvisGroup',
action: function (e, dt, button, conf) {
dt.columns(conf.show).visible(true, false);
dt.columns(conf.hide).visible(false, false);
dt.columns.adjust();
},
show: [],
hide: []
}
});
export default DataTable;
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,8 @@
/*!
* HTML5 export buttons for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*
* FileSaver.js (1.3.3) - MIT license
* Copyright © 2016 Eli Grey - http://eligrey.com
*/
!function(o){var l,n;"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(t){return o(t,window,document)}):"object"==typeof exports?(l=require("jquery"),n=function(t,e){e.fn.dataTable||require("datatables.net")(t,e),e.fn.dataTable.Buttons||require("datatables.net-buttons")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||l(t),n(t,e),o(e,t,t.document)}:(n(window,l),module.exports=o(l,window,window.document))):o(jQuery,window,document)}(function(S,C,u){"use strict";var e,o,t=S.fn.dataTable;function T(){return e||C.JSZip}function s(){return o||C.pdfMake}t.Buttons.pdfMake=function(t){if(!t)return s();o=t},t.Buttons.jszip=function(t){if(!t)return T();e=t};function k(t){var e="Sheet1";return e=t.sheetName?t.sheetName.replace(/[\[\]\*\/\\\?\:]/g,""):e}function c(t,e){function o(t){for(var e="",o=0,l=t.length;o<l;o++)0<o&&(e+=a),e+=r?r+(""+t[o]).replace(d,p+r)+r:t[o];return e}var l=y(e),n=t.buttons.exportData(e.exportOptions),r=e.fieldBoundary,a=e.fieldSeparator,d=new RegExp(r,"g"),p=void 0!==e.escapeChar?e.escapeChar:"\\",t="",i="",f=[];e.header&&(t=n.headerStructure.map(function(t){return o(t.map(function(t){return t?t.title:""}))}).join(l)+l),e.footer&&n.footer&&(i=n.footerStructure.map(function(t){return o(t.map(function(t){return t?t.title:""}))}).join(l)+l);for(var s=0,m=n.body.length;s<m;s++)f.push(o(n.body[s]));return{str:t+f.join(l)+l+i,rows:f.length}}function m(){var t;return-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Opera")&&!!((t=navigator.userAgent.match(/AppleWebKit\/(\d+\.\d+)/))&&1<t.length&&+t[1]<603.1)}var N=function(d){var p,i,f,s,m,u,e,c,y,l,t;if(!(void 0===d||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent)))return t=d.document,p=function(){return d.URL||d.webkitURL||d},i=t.createElementNS("http://www.w3.org/1999/xhtml","a"),f="download"in i,s=/constructor/i.test(d.HTMLElement)||d.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(d.setImmediate||d.setTimeout)(function(){throw t},0)},e=4e4,c=function(t){setTimeout(function(){"string"==typeof t?p().revokeObjectURL(t):t.remove()},e)},y=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},t=(l=function(t,o,e){e||(t=y(t));var l,n,r=this,e="application/octet-stream"===t.type,a=function(){for(var t=r,e="writestart progress write writeend".split(" "),o=void 0,l=(e=[].concat(e)).length;l--;){var n=t["on"+e[l]];if("function"==typeof n)try{n.call(t,o||t)}catch(t){u(t)}}};r.readyState=r.INIT,f?(l=p().createObjectURL(t),setTimeout(function(){var t,e;i.href=l,i.download=o,t=i,e=new MouseEvent("click"),t.dispatchEvent(e),a(),c(l),r.readyState=r.DONE})):(m||e&&s)&&d.FileReader?((n=new FileReader).onloadend=function(){var t=m?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");d.open(t,"_blank")||(d.location.href=t),r.readyState=r.DONE,a()},n.readAsDataURL(t),r.readyState=r.INIT):(l=l||p().createObjectURL(t),!e&&d.open(l,"_blank")||(d.location.href=l),r.readyState=r.DONE,a(),c(l))}).prototype,"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,o){return e=e||t.name||"download",o||(t=y(t)),navigator.msSaveOrOpenBlob(t,e)}:(t.abort=function(){},t.readyState=t.INIT=0,t.WRITING=1,t.DONE=2,t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null,function(t,e,o){return new l(t,e||t.name||"download",o)})}("undefined"!=typeof self&&self||void 0!==C&&C||this.content),y=(t.fileSave=N,function(t){return t.newline||(navigator.userAgent.match(/Windows/)?"\r\n":"\n")});function O(t){for(var e="A".charCodeAt(0),o="Z".charCodeAt(0)-e+1,l="";0<=t;)l=String.fromCharCode(t%o+e)+l,t=Math.floor(t/o)-1;return l}try{var z,E=new XMLSerializer}catch(t){}function A(t,e,o){var l=t.createElement(e);return o&&(o.attr&&S(l).attr(o.attr),o.children&&S.each(o.children,function(t,e){l.appendChild(e)}),null!==o.text)&&void 0!==o.text&&l.appendChild(t.createTextNode(o.text)),l}function D(t,e,o,l,n){var r=S("mergeCells",t);r[0].appendChild(A(t,"mergeCell",{attr:{ref:O(o)+e+":"+O(o+n-1)+(e+l-1)}})),r.attr("count",parseFloat(r.attr("count"))+1)}var R={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org Line truncated
@@ -0,0 +1,8 @@
/*!
* HTML5 export buttons for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*
* FileSaver.js (1.3.3) - MIT license
* Copyright © 2016 Eli Grey - http://eligrey.com
*/
import jQuery from"jquery";import DataTable from"datatables.net";import Buttons from"datatables.net-buttons";let $=jQuery;var useJszip,usePdfmake;function _jsZip(){return useJszip||window.JSZip}function _pdfMake(){return usePdfmake||window.pdfMake}DataTable.Buttons.pdfMake=function(e){if(!e)return _pdfMake();usePdfmake=e},DataTable.Buttons.jszip=function(e){if(!e)return _jsZip();useJszip=e};var _saveAs=function(d){"use strict";var p,i,s,f,m,c,t,u,y,l,e;if(!(void 0===d||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent)))return e=d.document,p=function(){return d.URL||d.webkitURL||d},i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in i,f=/constructor/i.test(d.HTMLElement)||d.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent),c=function(e){(d.setImmediate||d.setTimeout)(function(){throw e},0)},t=4e4,u=function(e){setTimeout(function(){"string"==typeof e?p().revokeObjectURL(e):e.remove()},t)},y=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},e=(l=function(e,o,t){t||(e=y(e));var l,n,r=this,t="application/octet-stream"===e.type,a=function(){for(var e=r,t="writestart progress write writeend".split(" "),o=void 0,l=(t=[].concat(t)).length;l--;){var n=e["on"+t[l]];if("function"==typeof n)try{n.call(e,o||e)}catch(e){c(e)}}};r.readyState=r.INIT,s?(l=p().createObjectURL(e),setTimeout(function(){var e,t;i.href=l,i.download=o,e=i,t=new MouseEvent("click"),e.dispatchEvent(t),a(),u(l),r.readyState=r.DONE})):(m||t&&f)&&d.FileReader?((n=new FileReader).onloadend=function(){var e=m?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");d.open(e,"_blank")||(d.location.href=e),r.readyState=r.DONE,a()},n.readAsDataURL(e),r.readyState=r.INIT):(l=l||p().createObjectURL(e),!t&&d.open(l,"_blank")||(d.location.href=l),r.readyState=r.DONE,a(),u(l))}).prototype,"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,o){return t=t||e.name||"download",o||(e=y(e)),navigator.msSaveOrOpenBlob(e,t)}:(e.abort=function(){},e.readyState=e.INIT=0,e.WRITING=1,e.DONE=2,e.error=e.onwritestart=e.onprogress=e.onwrite=e.onabort=e.onerror=e.onwriteend=null,function(e,t,o){return new l(e,t||e.name||"download",o)})}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content),_sheetname=(DataTable.fileSave=_saveAs,function(e){var t="Sheet1";return t=e.sheetName?e.sheetName.replace(/[\[\]\*\/\\\?\:]/g,""):t}),_newLine=function(e){return e.newline||(navigator.userAgent.match(/Windows/)?"\r\n":"\n")},_exportData=function(e,t){function o(e){for(var t="",o=0,l=e.length;o<l;o++)0<o&&(t+=a),t+=r?r+(""+e[o]).replace(d,p+r)+r:e[o];return t}var l=_newLine(t),n=e.buttons.exportData(t.exportOptions),r=t.fieldBoundary,a=t.fieldSeparator,d=new RegExp(r,"g"),p=void 0!==t.escapeChar?t.escapeChar:"\\",e="",i="",s=[];t.header&&(e=n.headerStructure.map(function(e){return o(e.map(function(e){return e?e.title:""}))}).join(l)+l),t.footer&&n.footer&&(i=n.footerStructure.map(function(e){return o(e.map(function(e){return e?e.title:""}))}).join(l)+l);for(var f=0,m=n.body.length;f<m;f++)s.push(o(n.body[f]));return{str:e+s.join(l)+l+i,rows:s.length}},_isDuffSafari=function(){var e;return-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Opera")&&!!((e=navigator.userAgent.match(/AppleWebKit\/(\d+\.\d+)/))&&1<e.length&&+e[1]<603.1)};function createCellPos(e){for(var t="A".charCodeAt(0),o="Z".charCodeAt(0)-t+1,l="";0<=e;)l=String.fromCharCode(e%o+t)+l,e=Math.floor(e/o)-1;return l}try{var _ieExcel,_serialiser=new XMLSerializer}catch(e){}function _addToZip(s,e){void 0===_ieExcel&&(_ieExcel=-1===_serialiser.serializeToString((new window.DOMParser).parseFromString(excelStrings["xl/worksheets/sheet1.xml"],"text/xml")).indexOf("xmlns:r")),$.each(e,function(e,t){if($.isPlainObject(t))_addToZip(s.folder(e),t);else{if(_ieExcel){for(var o,l=t.childNodes[0],n=[],r=l.attributes.length-1;0<=r;r--){var a=l.attributes[r].nodeName,d=l.attributes[r].nodeValue;-1!==a.indexOf(":")&&(n.push({name:a,value:d}),l.removeAttribute(a))}for(r=0,o=n.length;r<o;r++){var p=t.createAttribute(n[r].name.replace(":","_dt_b_namespace_token_"));p.value=n[r].value,l.setAttributeNode(p)}}var i=_serialiser.serializeToString(t),i=(i=_ieExcel?(i=(i=-1===i.indexOf("<?xml")?'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+i:i).replace(/_dt_b_namespace_token_/g,":")).replace(/xmlns:NS[\d]+="" NS[\d]+:/g,""):i).replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>");s.file(e,i)}})}function _createNode(e,t,o){var l=e.createElement(t);return o&&(o.attr&&$(l).attr(o.attr),o.children&&$.each(o.children,function(e,t){l.appendChild(t)}),null!==o.text)&&void 0!==o.text&&l.appendChild(e.createTextNode(o.text)),l}function _excelColWidth(e,t){var o=e.header[t].length;e.footer&&e.footer[t]&&e.footer[t].length>o&&(o=e.footer[t].length);for(var l=0,n=e.body.length;lLine truncated
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,300 @@
/*!
* Print button for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net', 'datatables.net-buttons'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
var jq = require('jquery');
var cjsRequires = function (root, $) {
if ( ! $.fn.dataTable ) {
require('datatables.net')(root, $);
}
if ( ! $.fn.dataTable.Buttons ) {
require('datatables.net-buttons')(root, $);
}
};
if (typeof window === 'undefined') {
module.exports = function (root, $) {
if ( ! root ) {
// CommonJS environments without a window global must pass a
// root. This will give an error otherwise
root = window;
}
if ( ! $ ) {
$ = jq( root );
}
cjsRequires( root, $ );
return factory( $, root, root.document );
};
}
else {
cjsRequires( window, jq );
module.exports = factory( jq, window, window.document );
}
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document ) {
'use strict';
var DataTable = $.fn.dataTable;
var _link = document.createElement('a');
/**
* Clone link and style tags, taking into account the need to change the source
* path.
*
* @param {node} el Element to convert
*/
var _styleToAbs = function (el) {
var clone = $(el).clone()[0];
if (clone.nodeName.toLowerCase() === 'link') {
clone.href = _relToAbs(clone.href);
}
return clone.outerHTML;
};
/**
* Convert a URL from a relative to an absolute address so it will work
* correctly in the popup window which has no base URL.
*
* @param {string} href URL
*/
var _relToAbs = function (href) {
// Assign to a link on the original page so the browser will do all the
// hard work of figuring out where the file actually is
_link.href = href;
var linkHost = _link.host;
// IE doesn't have a trailing slash on the host
// Chrome has it on the pathname
if (linkHost.indexOf('/') === -1 && _link.pathname.indexOf('/') !== 0) {
linkHost += '/';
}
return _link.protocol + '//' + linkHost + _link.pathname + _link.search;
};
DataTable.ext.buttons.print = {
className: 'buttons-print',
text: function (dt) {
return dt.i18n('buttons.print', 'Print');
},
action: function (e, dt, button, config, cb) {
var data = dt.buttons.exportData(
$.extend({ decodeEntities: false }, config.exportOptions) // XSS protection
);
var exportInfo = dt.buttons.exportInfo(config);
// Get the classes for the columns from the header cells
var columnClasses = dt
.columns(config.exportOptions.columns)
.nodes()
.map(function (n) {
return n.className;
})
.toArray();
var addRow = function (d, tag) {
var str = '<tr>';
for (var i = 0, ien = d.length; i < ien; i++) {
// null and undefined aren't useful in the print output
var dataOut = d[i] === null || d[i] === undefined ? '' : d[i];
var classAttr = columnClasses[i]
? 'class="' + columnClasses[i] + '"'
: '';
str +=
'<' +
tag +
' ' +
classAttr +
'>' +
dataOut +
'</' +
tag +
'>';
}
return str + '</tr>';
};
// Construct a table for printing
var html = '<table class="' + dt.table().node().className + '">';
if (config.header) {
var headerRows = data.headerStructure.map(function (row) {
return (
'<tr>' +
row
.map(function (cell) {
return cell
? '<th colspan="' +
cell.colspan +
'" rowspan="' +
cell.rowspan +
'">' +
cell.title +
'</th>'
: '';
})
.join('') +
'</tr>'
);
});
html += '<thead>' + headerRows.join('') + '</thead>';
}
html += '<tbody>';
for (var i = 0, ien = data.body.length; i < ien; i++) {
html += addRow(data.body[i], 'td');
}
html += '</tbody>';
if (config.footer && data.footer) {
var footerRows = data.footerStructure.map(function (row) {
return (
'<tr>' +
row
.map(function (cell) {
return cell
? '<th colspan="' +
cell.colspan +
'" rowspan="' +
cell.rowspan +
'">' +
cell.title +
'</th>'
: '';
})
.join('') +
'</tr>'
);
});
html += '<tfoot>' + footerRows.join('') + '</tfoot>';
}
html += '</table>';
// Open a new window for the printable table
var win = window.open('', '');
if (!win) {
dt.buttons.info(
dt.i18n('buttons.printErrorTitle', 'Unable to open print view'),
dt.i18n(
'buttons.printErrorMsg',
'Please allow popups in your browser for this site to be able to view the print view.'
),
5000
);
return;
}
win.document.close();
// Inject the title and also a copy of the style and link tags from this
// document so the table can retain its base styling. Note that we have
// to use string manipulation as IE won't allow elements to be created
// in the host document and then appended to the new window.
var head = '<title>' + exportInfo.title + '</title>';
$('style, link').each(function () {
head += _styleToAbs(this);
});
try {
win.document.head.innerHTML = head; // Work around for Edge
} catch (e) {
$(win.document.head).html(head); // Old IE
}
// Add any custom scripts (for example for paged.js)
if (config.customScripts) {
config.customScripts.forEach(function (script) {
var tag = win.document.createElement("script");
tag.src = script;
win.document.getElementsByTagName("head")[0].appendChild(tag);
});
}
// Inject the table and other surrounding information
win.document.body.innerHTML =
'<h1>' +
exportInfo.title +
'</h1>' +
'<div>' +
(exportInfo.messageTop || '') +
'</div>' +
html +
'<div>' +
(exportInfo.messageBottom || '') +
'</div>';
$(win.document.body).addClass('dt-print-view');
$('img', win.document.body).each(function (i, img) {
img.setAttribute('src', _relToAbs(img.getAttribute('src')));
});
if (config.customize) {
config.customize(win, config, dt);
}
// Allow stylesheets time to load
var autoPrint = function () {
if (config.autoPrint) {
win.print(); // blocking - so close will not
win.close(); // execute until this is done
}
};
win.setTimeout(autoPrint, 1000);
cb();
},
async: 100,
title: '*',
messageTop: '*',
messageBottom: '*',
exportOptions: {},
header: true,
footer: true,
autoPrint: true,
customize: null
};
return DataTable;
}));
@@ -0,0 +1,5 @@
/*!
* Print button for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
!function(n){var o,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(t){return n(t,window,document)}):"object"==typeof exports?(o=require("jquery"),r=function(t,e){e.fn.dataTable||require("datatables.net")(t,e),e.fn.dataTable.Buttons||require("datatables.net-buttons")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||o(t),r(t,e),n(e,t,t.document)}:(r(window,o),module.exports=n(o,window,window.document))):n(jQuery,window,document)}(function(f,m,t){"use strict";function b(t){return n.href=t,-1===(t=n.host).indexOf("/")&&0!==n.pathname.indexOf("/")&&(t+="/"),n.protocol+"//"+t+n.pathname+n.search}var e=f.fn.dataTable,n=t.createElement("a");return e.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(t,e,n,o,r){var i=e.buttons.exportData(f.extend({decodeEntities:!1},o.exportOptions)),a=e.buttons.exportInfo(o),u=e.columns(o.exportOptions.columns).nodes().map(function(t){return t.className}).toArray(),s='<table class="'+e.table().node().className+'">';o.header&&(s+="<thead>"+i.headerStructure.map(function(t){return"<tr>"+t.map(function(t){return t?'<th colspan="'+t.colspan+'" rowspan="'+t.rowspan+'">'+t.title+"</th>":""}).join("")+"</tr>"}).join("")+"</thead>"),s+="<tbody>";for(var c=0,d=i.body.length;c<d;c++)s+=function(t,e){for(var n="<tr>",o=0,r=t.length;o<r;o++){var i=null===t[o]||void 0===t[o]?"":t[o];n+="<"+e+" "+(u[o]?'class="'+u[o]+'"':"")+">"+i+"</"+e+">"}return n+"</tr>"}(i.body[c],"td");s+="</tbody>",o.footer&&i.footer&&(s+="<tfoot>"+i.footerStructure.map(function(t){return"<tr>"+t.map(function(t){return t?'<th colspan="'+t.colspan+'" rowspan="'+t.rowspan+'">'+t.title+"</th>":""}).join("")+"</tr>"}).join("")+"</tfoot>"),s+="</table>";var l=m.open("","");if(l){l.document.close();var p="<title>"+a.title+"</title>";f("style, link").each(function(){p+=function(t){t=f(t).clone()[0];return"link"===t.nodeName.toLowerCase()&&(t.href=b(t.href)),t.outerHTML}(this)});try{l.document.head.innerHTML=p}catch(t){f(l.document.head).html(p)}o.customScripts&&o.customScripts.forEach(function(t){var e=l.document.createElement("script");e.src=t,l.document.getElementsByTagName("head")[0].appendChild(e)}),l.document.body.innerHTML="<h1>"+a.title+"</h1><div>"+(a.messageTop||"")+"</div>"+s+"<div>"+(a.messageBottom||"")+"</div>",f(l.document.body).addClass("dt-print-view"),f("img",l.document.body).each(function(t,e){e.setAttribute("src",b(e.getAttribute("src")))}),o.customize&&o.customize(l,o,e);l.setTimeout(function(){o.autoPrint&&(l.print(),l.close())},1e3),r()}else e.buttons.info(e.i18n("buttons.printErrorTitle","Unable to open print view"),e.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},async:100,title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!0,autoPrint:!0,customize:null},e});
@@ -0,0 +1,5 @@
/*!
* Print button for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
import jQuery from"jquery";import DataTable from"datatables.net";import Buttons from"datatables.net-buttons";let $=jQuery;var _link=document.createElement("a"),_styleToAbs=function(t){t=$(t).clone()[0];return"link"===t.nodeName.toLowerCase()&&(t.href=_relToAbs(t.href)),t.outerHTML},_relToAbs=function(t){_link.href=t;t=_link.host;return-1===t.indexOf("/")&&0!==_link.pathname.indexOf("/")&&(t+="/"),_link.protocol+"//"+t+_link.pathname+_link.search};DataTable.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(t,e,o,n,r){var a=e.buttons.exportData($.extend({decodeEntities:!1},n.exportOptions)),i=e.buttons.exportInfo(n),s=e.columns(n.exportOptions.columns).nodes().map(function(t){return t.className}).toArray(),u='<table class="'+e.table().node().className+'">';n.header&&(u+="<thead>"+a.headerStructure.map(function(t){return"<tr>"+t.map(function(t){return t?'<th colspan="'+t.colspan+'" rowspan="'+t.rowspan+'">'+t.title+"</th>":""}).join("")+"</tr>"}).join("")+"</thead>"),u+="<tbody>";for(var l=0,c=a.body.length;l<c;l++)u+=function(t,e){for(var o="<tr>",n=0,r=t.length;n<r;n++){var a=null===t[n]||void 0===t[n]?"":t[n];o+="<"+e+" "+(s[n]?'class="'+s[n]+'"':"")+">"+a+"</"+e+">"}return o+"</tr>"}(a.body[l],"td");u+="</tbody>",n.footer&&a.footer&&(u+="<tfoot>"+a.footerStructure.map(function(t){return"<tr>"+t.map(function(t){return t?'<th colspan="'+t.colspan+'" rowspan="'+t.rowspan+'">'+t.title+"</th>":""}).join("")+"</tr>"}).join("")+"</tfoot>"),u+="</table>";var p=window.open("","");if(p){p.document.close();var d="<title>"+i.title+"</title>";$("style, link").each(function(){d+=_styleToAbs(this)});try{p.document.head.innerHTML=d}catch(t){$(p.document.head).html(d)}n.customScripts&&n.customScripts.forEach(function(t){var e=p.document.createElement("script");e.src=t,p.document.getElementsByTagName("head")[0].appendChild(e)}),p.document.body.innerHTML="<h1>"+i.title+"</h1><div>"+(i.messageTop||"")+"</div>"+u+"<div>"+(i.messageBottom||"")+"</div>",$(p.document.body).addClass("dt-print-view"),$("img",p.document.body).each(function(t,e){e.setAttribute("src",_relToAbs(e.getAttribute("src")))}),n.customize&&n.customize(p,n,e);p.setTimeout(function(){n.autoPrint&&(p.print(),p.close())},1e3),r()}else e.buttons.info(e.i18n("buttons.printErrorTitle","Unable to open print view"),e.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},async:100,title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!0,autoPrint:!0,customize:null};export default DataTable;
@@ -0,0 +1,256 @@
/*!
* Print button for Buttons and DataTables.
* © SpryMedia Ltd - datatables.net/license
*/
import jQuery from 'jquery';
import DataTable from 'datatables.net';
import Buttons from 'datatables.net-buttons';
// Allow reassignment of the $ variable
let $ = jQuery;
var _link = document.createElement('a');
/**
* Clone link and style tags, taking into account the need to change the source
* path.
*
* @param {node} el Element to convert
*/
var _styleToAbs = function (el) {
var clone = $(el).clone()[0];
if (clone.nodeName.toLowerCase() === 'link') {
clone.href = _relToAbs(clone.href);
}
return clone.outerHTML;
};
/**
* Convert a URL from a relative to an absolute address so it will work
* correctly in the popup window which has no base URL.
*
* @param {string} href URL
*/
var _relToAbs = function (href) {
// Assign to a link on the original page so the browser will do all the
// hard work of figuring out where the file actually is
_link.href = href;
var linkHost = _link.host;
// IE doesn't have a trailing slash on the host
// Chrome has it on the pathname
if (linkHost.indexOf('/') === -1 && _link.pathname.indexOf('/') !== 0) {
linkHost += '/';
}
return _link.protocol + '//' + linkHost + _link.pathname + _link.search;
};
DataTable.ext.buttons.print = {
className: 'buttons-print',
text: function (dt) {
return dt.i18n('buttons.print', 'Print');
},
action: function (e, dt, button, config, cb) {
var data = dt.buttons.exportData(
$.extend({ decodeEntities: false }, config.exportOptions) // XSS protection
);
var exportInfo = dt.buttons.exportInfo(config);
// Get the classes for the columns from the header cells
var columnClasses = dt
.columns(config.exportOptions.columns)
.nodes()
.map(function (n) {
return n.className;
})
.toArray();
var addRow = function (d, tag) {
var str = '<tr>';
for (var i = 0, ien = d.length; i < ien; i++) {
// null and undefined aren't useful in the print output
var dataOut = d[i] === null || d[i] === undefined ? '' : d[i];
var classAttr = columnClasses[i]
? 'class="' + columnClasses[i] + '"'
: '';
str +=
'<' +
tag +
' ' +
classAttr +
'>' +
dataOut +
'</' +
tag +
'>';
}
return str + '</tr>';
};
// Construct a table for printing
var html = '<table class="' + dt.table().node().className + '">';
if (config.header) {
var headerRows = data.headerStructure.map(function (row) {
return (
'<tr>' +
row
.map(function (cell) {
return cell
? '<th colspan="' +
cell.colspan +
'" rowspan="' +
cell.rowspan +
'">' +
cell.title +
'</th>'
: '';
})
.join('') +
'</tr>'
);
});
html += '<thead>' + headerRows.join('') + '</thead>';
}
html += '<tbody>';
for (var i = 0, ien = data.body.length; i < ien; i++) {
html += addRow(data.body[i], 'td');
}
html += '</tbody>';
if (config.footer && data.footer) {
var footerRows = data.footerStructure.map(function (row) {
return (
'<tr>' +
row
.map(function (cell) {
return cell
? '<th colspan="' +
cell.colspan +
'" rowspan="' +
cell.rowspan +
'">' +
cell.title +
'</th>'
: '';
})
.join('') +
'</tr>'
);
});
html += '<tfoot>' + footerRows.join('') + '</tfoot>';
}
html += '</table>';
// Open a new window for the printable table
var win = window.open('', '');
if (!win) {
dt.buttons.info(
dt.i18n('buttons.printErrorTitle', 'Unable to open print view'),
dt.i18n(
'buttons.printErrorMsg',
'Please allow popups in your browser for this site to be able to view the print view.'
),
5000
);
return;
}
win.document.close();
// Inject the title and also a copy of the style and link tags from this
// document so the table can retain its base styling. Note that we have
// to use string manipulation as IE won't allow elements to be created
// in the host document and then appended to the new window.
var head = '<title>' + exportInfo.title + '</title>';
$('style, link').each(function () {
head += _styleToAbs(this);
});
try {
win.document.head.innerHTML = head; // Work around for Edge
} catch (e) {
$(win.document.head).html(head); // Old IE
}
// Add any custom scripts (for example for paged.js)
if (config.customScripts) {
config.customScripts.forEach(function (script) {
var tag = win.document.createElement("script");
tag.src = script;
win.document.getElementsByTagName("head")[0].appendChild(tag);
});
}
// Inject the table and other surrounding information
win.document.body.innerHTML =
'<h1>' +
exportInfo.title +
'</h1>' +
'<div>' +
(exportInfo.messageTop || '') +
'</div>' +
html +
'<div>' +
(exportInfo.messageBottom || '') +
'</div>';
$(win.document.body).addClass('dt-print-view');
$('img', win.document.body).each(function (i, img) {
img.setAttribute('src', _relToAbs(img.getAttribute('src')));
});
if (config.customize) {
config.customize(win, config, dt);
}
// Allow stylesheets time to load
var autoPrint = function () {
if (config.autoPrint) {
win.print(); // blocking - so close will not
win.close(); // execute until this is done
}
};
win.setTimeout(autoPrint, 1000);
cb();
},
async: 100,
title: '*',
messageTop: '*',
messageBottom: '*',
exportOptions: {},
header: true,
footer: true,
autoPrint: true,
customize: null
};
export default DataTable;
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,4 @@
/*! Buttons for DataTables 3.1.2
* © SpryMedia Ltd - datatables.net/license
*/
!function(e){var o,i;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return e(t,window,document)}):"object"==typeof exports?(o=require("jquery"),i=function(t,n){n.fn.dataTable||require("datatables.net")(t,n)},"undefined"==typeof window?module.exports=function(t,n){return t=t||window,n=n||o(t),i(t,n),e(n,t,t.document)}:(i(window,o),module.exports=e(o,window,window.document))):e(jQuery,window,document)}(function(x,g,m){"use strict";var e=x.fn.dataTable,o=0,C=0,w=e.ext.buttons,i=null;function v(t,n,e){x.fn.animate?t.stop().fadeIn(n,e):(t.css("display","block"),e&&e.call(t))}function y(t,n,e){x.fn.animate?t.stop().fadeOut(n,e):(t.css("display","none"),e&&e.call(t))}function _(n,t){if(!e.versionCheck("2"))throw"Warning: Buttons requires DataTables 2 or newer";if(!(this instanceof _))return function(t){return new _(t,n).container()};!0===(t=void 0===t?{}:t)&&(t={}),Array.isArray(t)&&(t={buttons:t}),this.c=x.extend(!0,{},_.defaults,t),t.buttons&&(this.c.buttons=t.buttons),this.s={dt:new e.Api(n),buttons:[],listenKeys:"",namespace:"dtb"+o++},this.dom={container:x("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)},this._constructor()}x.extend(_.prototype,{action:function(t,n){t=this._nodeToButton(t);return void 0===n?t.conf.action:(t.conf.action=n,this)},active:function(t,n){var t=this._nodeToButton(t),e=this.c.dom.button.active,o=x(t.node);return t.inCollection&&this.c.dom.collection.button&&void 0!==this.c.dom.collection.button.active&&(e=this.c.dom.collection.button.active),void 0===n?o.hasClass(e):(o.toggleClass(e,void 0===n||n),this)},add:function(t,n,e){var o=this.s.buttons;if("string"==typeof n){for(var i=n.split("-"),s=this.s,r=0,a=i.length-1;r<a;r++)s=s.buttons[+i[r]];o=s.buttons,n=+i[i.length-1]}return this._expandButton(o,t,void 0!==t?t.split:void 0,(void 0===t||void 0===t.split||0===t.split.length)&&void 0!==s,!1,n),void 0!==e&&!0!==e||this._draw(),this},collectionRebuild:function(t,n){var e=this._nodeToButton(t);if(void 0!==n){for(var o=e.buttons.length-1;0<=o;o--)this.remove(e.buttons[o].node);for(e.conf.prefixButtons&&n.unshift.apply(n,e.conf.prefixButtons),e.conf.postfixButtons&&n.push.apply(n,e.conf.postfixButtons),o=0;o<n.length;o++){var i=n[o];this._expandButton(e.buttons,i,void 0!==i&&void 0!==i.config&&void 0!==i.config.split,!0,void 0!==i.parentConf&&void 0!==i.parentConf.split,null,i.parentConf)}}this._draw(e.collection,e.buttons)},container:function(){return this.dom.container},disable:function(t){t=this._nodeToButton(t);return x(t.node).addClass(this.c.dom.button.disabled).prop("disabled",!0),this},destroy:function(){x("body").off("keyup."+this.s.namespace);for(var t=this.s.buttons.slice(),n=0,e=t.length;n<e;n++)this.remove(t[n].node);this.dom.container.remove();var o=this.s.dt.settings()[0];for(n=0,e=o.length;n<e;n++)if(o.inst===this){o.splice(n,1);break}return this},enable:function(t,n){return!1===n?this.disable(t):(n=this._nodeToButton(t),x(n.node).removeClass(this.c.dom.button.disabled).prop("disabled",!1),this)},index:function(t,n,e){n||(n="",e=this.s.buttons);for(var o=0,i=e.length;o<i;o++){var s=e[o].buttons;if(e[o].node===t)return n+o;if(s&&s.length){s=this.index(t,o+"-",s);if(null!==s)return s}}return null},name:function(){return this.c.name},node:function(t){return t?(t=this._nodeToButton(t),x(t.node)):this.dom.container},processing:function(t,n){var e=this.s.dt,o=this._nodeToButton(t);return void 0===n?x(o.node).hasClass("processing"):(x(o.node).toggleClass("processing",n),x(e.table().node()).triggerHandler("buttons-processing.dt",[n,e.button(t),e,x(t),o.conf]),this)},remove:function(t){var n=this._nodeToButton(t),e=this._nodeToHost(t),o=this.s.dt;if(n.buttons.length)for(var i=n.buttons.length-1;0<=i;i--)this.remove(n.buttons[i].node);n.conf.destroying=!0,n.conf.destroy&&n.conf.destroy.call(o.button(t),o,x(t),n.conf),this._removeKey(n.conf),x(n.node).remove();o=x.inArray(n,e);return e.splice(o,1),this},text:function(t,n){function e(t){return"function"==typeof t?t(i,s,o.conf):t}var o=this._nodeToButton(t),t=o.textNode,i=this.s.dt,s=x(o.node);return void 0===n?e(o.conf.text):(o.conf.text=n,t.html(e(n)),this)},_constructor:function(){var e=this,t=this.s.dt,o=t.settings()[0],n=this.c.buttons;o._buttons||(o._buttons=[]),o._buttons.push({inst:this,name:this.c.name});for(var i=0,s=n.length;i<s;i++)this.add(n[i]);t.on("destroy",function(t,n){n===o&&e.destroy()}),x("body").on("keyup."+this.s.namespace,function(t){var n;m.activeElement&&m.activeElement!==m.body||(n=String.fromCharCode(t.keyCode).toLowerCase(),-1!==e.s.listenKeys.toLowerCase().indexOf(n)&&e._keypress(n,t))})},_addKey:function(t){t.key&&(this.s.listenKeys+=(x.isPlainObject(t.key)?t.key:t).key)},_draw:function(t,n){t||(t=this.dom.container,n=this.s.buttons),t.children().detach();for(var e=0,o=n.length;e<o;e++)t.append(n[e].inserter),t.append(" "),n[e].buttons&&n[e].buttons.length&&this._draw(n[e].collection,n[e].buttons)},_expandButton:function(t,n,e,o,i,s,r){for(Line truncated
@@ -0,0 +1,4 @@
/*! Buttons for DataTables 3.1.2
* © SpryMedia Ltd - datatables.net/license
*/
import jQuery from"jquery";import DataTable from"datatables.net";let $=jQuery;var _instCounter=0,_buttonCounter=0,_dtButtons=DataTable.ext.buttons,_entityDecoder=null;function _fadeIn(t,n,e){$.fn.animate?t.stop().fadeIn(n,e):(t.css("display","block"),e&&e.call(t))}function _fadeOut(t,n,e){$.fn.animate?t.stop().fadeOut(n,e):(t.css("display","none"),e&&e.call(t))}var _infoTimer,Buttons=function(n,t){if(!DataTable.versionCheck("2"))throw"Warning: Buttons requires DataTables 2 or newer";if(!(this instanceof Buttons))return function(t){return new Buttons(t,n).container()};!0===(t=void 0===t?{}:t)&&(t={}),Array.isArray(t)&&(t={buttons:t}),this.c=$.extend(!0,{},Buttons.defaults,t),t.buttons&&(this.c.buttons=t.buttons),this.s={dt:new DataTable.Api(n),buttons:[],listenKeys:"",namespace:"dtb"+_instCounter++},this.dom={container:$("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)},this._constructor()},_filename=($.extend(Buttons.prototype,{action:function(t,n){t=this._nodeToButton(t);return void 0===n?t.conf.action:(t.conf.action=n,this)},active:function(t,n){var t=this._nodeToButton(t),e=this.c.dom.button.active,o=$(t.node);return t.inCollection&&this.c.dom.collection.button&&void 0!==this.c.dom.collection.button.active&&(e=this.c.dom.collection.button.active),void 0===n?o.hasClass(e):(o.toggleClass(e,void 0===n||n),this)},add:function(t,n,e){var o=this.s.buttons;if("string"==typeof n){for(var i=n.split("-"),s=this.s,a=0,r=i.length-1;a<r;a++)s=s.buttons[+i[a]];o=s.buttons,n=+i[i.length-1]}return this._expandButton(o,t,void 0!==t?t.split:void 0,(void 0===t||void 0===t.split||0===t.split.length)&&void 0!==s,!1,n),void 0!==e&&!0!==e||this._draw(),this},collectionRebuild:function(t,n){var e=this._nodeToButton(t);if(void 0!==n){for(var o=e.buttons.length-1;0<=o;o--)this.remove(e.buttons[o].node);for(e.conf.prefixButtons&&n.unshift.apply(n,e.conf.prefixButtons),e.conf.postfixButtons&&n.push.apply(n,e.conf.postfixButtons),o=0;o<n.length;o++){var i=n[o];this._expandButton(e.buttons,i,void 0!==i&&void 0!==i.config&&void 0!==i.config.split,!0,void 0!==i.parentConf&&void 0!==i.parentConf.split,null,i.parentConf)}}this._draw(e.collection,e.buttons)},container:function(){return this.dom.container},disable:function(t){t=this._nodeToButton(t);return $(t.node).addClass(this.c.dom.button.disabled).prop("disabled",!0),this},destroy:function(){$("body").off("keyup."+this.s.namespace);for(var t=this.s.buttons.slice(),n=0,e=t.length;n<e;n++)this.remove(t[n].node);this.dom.container.remove();var o=this.s.dt.settings()[0];for(n=0,e=o.length;n<e;n++)if(o.inst===this){o.splice(n,1);break}return this},enable:function(t,n){return!1===n?this.disable(t):(n=this._nodeToButton(t),$(n.node).removeClass(this.c.dom.button.disabled).prop("disabled",!1),this)},index:function(t,n,e){n||(n="",e=this.s.buttons);for(var o=0,i=e.length;o<i;o++){var s=e[o].buttons;if(e[o].node===t)return n+o;if(s&&s.length){s=this.index(t,o+"-",s);if(null!==s)return s}}return null},name:function(){return this.c.name},node:function(t){return t?(t=this._nodeToButton(t),$(t.node)):this.dom.container},processing:function(t,n){var e=this.s.dt,o=this._nodeToButton(t);return void 0===n?$(o.node).hasClass("processing"):($(o.node).toggleClass("processing",n),$(e.table().node()).triggerHandler("buttons-processing.dt",[n,e.button(t),e,$(t),o.conf]),this)},remove:function(t){var n=this._nodeToButton(t),e=this._nodeToHost(t),o=this.s.dt;if(n.buttons.length)for(var i=n.buttons.length-1;0<=i;i--)this.remove(n.buttons[i].node);n.conf.destroying=!0,n.conf.destroy&&n.conf.destroy.call(o.button(t),o,$(t),n.conf),this._removeKey(n.conf),$(n.node).remove();o=$.inArray(n,e);return e.splice(o,1),this},text:function(t,n){function e(t){return"function"==typeof t?t(i,s,o.conf):t}var o=this._nodeToButton(t),t=o.textNode,i=this.s.dt,s=$(o.node);return void 0===n?e(o.conf.text):(o.conf.text=n,t.html(e(n)),this)},_constructor:function(){var e=this,t=this.s.dt,o=t.settings()[0],n=this.c.buttons;o._buttons||(o._buttons=[]),o._buttons.push({inst:this,name:this.c.name});for(var i=0,s=n.length;i<s;i++)this.add(n[i]);t.on("destroy",function(t,n){n===o&&e.destroy()}),$("body").on("keyup."+this.s.namespace,function(t){var n;document.activeElement&&document.activeElement!==document.body||(n=String.fromCharCode(t.keyCode).toLowerCase(),-1!==e.s.listenKeys.toLowerCase().indexOf(n)&&e._keypress(n,t))})},_addKey:function(t){t.key&&(this.s.listenKeys+=($.isPlainObject(t.key)?t.key:t).key)},_draw:function(t,n){t||(t=this.dom.container,n=this.s.buttons),t.children().detach();for(var e=0,o=n.length;e<o;e++)t.append(n[e].inserter),t.append(" "),n[e].buttons&&n[e].buttons.length&&this._draw(n[e].collection,n[e].buttons)},_expandButton:function(t,n,e,o,i,s,a){for(var r,l=this.s.dt,u=this.c.dom.collection,c=Array.isArray(n)?n:[n],d=0,f=(c=void 0===n?Array.isArray(e)?e:[e]:c).length;d<f;d++){var p=this._resolveExtends(c[d]);if(p)if(r=!(!p.config||!p.config.split),Array.isArray(p))this._expandButton(Line truncated
File diff suppressed because it is too large. Load diff