Skip to content

Commit

Permalink
3.5.12
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbengtsson committed Sep 8, 2020
1 parent 05cd0b0 commit b8b090c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
8 changes: 6 additions & 2 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by dts-bundle-generator v5.3.0
// Generated by dts-bundle-generator v5.4.0

export declare type jsPDFConstructor = any;
export declare type jsPDFDocument = any;
Expand Down Expand Up @@ -241,7 +241,11 @@ export declare type ColumnInput = string | number | {
dataKey?: string | number;
key?: string | number;
};
export declare type Color = [number, number, number] | number | string | false;
export declare type Color = [
number,
number,
number
] | number | string | false;
export declare type MarginPaddingInput = number | number[] | {
top?: number;
right?: number;
Expand Down
24 changes: 14 additions & 10 deletions dist/jspdf.plugin.autotable.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
*
* jsPDF AutoTable plugin v3.5.10
* jsPDF AutoTable plugin v3.5.12
*
* Copyright (c) 2020 Simon Bengtsson, https://github.com/simonbengtsson/jsPDF-AutoTable
* Licensed under the MIT License.
Expand Down Expand Up @@ -216,7 +216,7 @@ var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
Expand Down Expand Up @@ -354,17 +354,21 @@ var DocHandler = /** @class */ (function () {
if (fontOnly === void 0) { fontOnly = false; }
if (styles.fontStyle)
this.jsPDFDocument.setFontStyle && this.jsPDFDocument.setFontStyle(styles.fontStyle);
if (styles.font) {
var available = this.getFontList()[styles.font];
var fontStyle = styles.fontStyle;
if (available && fontStyle && available.indexOf(fontStyle) === -1) {
// Common issue for uses with was that the default bold in headers
var _d = this.jsPDFDocument.internal.getFont(), fontStyle = _d.fontStyle, fontName = _d.fontName;
if (styles.font)
fontName = styles.font;
if (styles.fontStyle) {
fontStyle = styles.fontStyle;
var availableFontStyles = this.getFontList()[fontName];
if (availableFontStyles && availableFontStyles.indexOf(fontStyle) === -1) {
// Common issue was that the default bold in headers
// made custom fonts not work. For example:
// https://github.com/simonbengtsson/jsPDF-AutoTable/issues/653
this.jsPDFDocument.setFontStyle(available[0]);
this.jsPDFDocument.setFontStyle && this.jsPDFDocument.setFontStyle(availableFontStyles[0]);
fontStyle = availableFontStyles[0];
}
this.jsPDFDocument.setFont(styles.font, styles.fontStyle);
}
this.jsPDFDocument.setFont(fontName, fontStyle);
if (styles.fontSize)
this.jsPDFDocument.setFontSize(styles.fontSize);
if (fontOnly) {
Expand Down Expand Up @@ -1857,7 +1861,7 @@ var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
Expand Down
4 changes: 2 additions & 2 deletions dist/jspdf.plugin.autotable.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jspdf-autotable",
"version": "3.5.11",
"version": "3.5.12",
"description": "Generate pdf tables with javascript (jsPDF plugin)",
"main": "dist/jspdf.plugin.autotable.js",
"types": "dist/index",
Expand Down

0 comments on commit b8b090c

Please sign in to comment.