Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resetState();
return this;
}
jsPDF.API.autoTable = autoTable;
// Assign false to enable `doc.lastAutoTable.finalY || 40` sugar;
jsPDF.API.lastAutoTable = false;
jsPDF.API.previousAutoTable = false; // deprecated in v3
jsPDF.API.autoTable.previous = false; // deprecated in v3
jsPDF.API.autoTableSetDefaults = function(defaults) {
setDefaults(defaults, this);
return this;
};
jsPDF.autoTableSetDefaults = function(defaults, doc) {
setDefaults(defaults, doc);
return this;
};
jsPDF.API.autoTableHtmlToJson = function(tableElem, includeHiddenElements) {
includeHiddenElements = includeHiddenElements || false;
if (!tableElem || !(tableElem instanceof HTMLTableElement)) {
console.error("A HTMLTableElement has to be sent to autoTableHtmlToJson");
return null;
}
let {head, body, foot} = parseHtml(tableElem, includeHiddenElements, false);
let firstRow = head[0] || body[0] || foot[0];
return {columns: firstRow, rows: body, data: body};
resetState();
return this;
}
jsPDF.API.autoTable = autoTable;
// Assign false to enable `doc.lastAutoTable.finalY || 40` sugar;
jsPDF.API.lastAutoTable = false;
jsPDF.API.previousAutoTable = false; // deprecated in v3
jsPDF.API.autoTable.previous = false; // deprecated in v3
jsPDF.API.autoTableSetDefaults = function(defaults) {
setDefaults(defaults, this);
return this;
};
jsPDF.autoTableSetDefaults = function(defaults, doc) {
setDefaults(defaults, doc);
return this;
};
jsPDF.API.autoTableHtmlToJson = function(tableElem, includeHiddenElements) {
includeHiddenElements = includeHiddenElements || false;
if (!tableElem || !(tableElem instanceof HTMLTableElement)) {
console.error("A HTMLTableElement has to be sent to autoTableHtmlToJson");
return null;
}
let {head, body, foot} = parseHtml(tableElem, includeHiddenElements, false);
let firstRow = head[0] || body[0] || foot[0];
return {columns: firstRow, rows: body, data: body};