pdfkit-table-ts
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -60,4 +60,4 @@ declare const PDFDocumentSource: any; | ||
pageAddedFire(): Promise<void>; | ||
createFill(rect: Rect, fillColor?: string, fillOpacity?: number, callback?: Function): Promise<unknown>; | ||
addBackground: (rect: Rect, fillColor?: string | undefined, fillOpacity?: number | undefined, callback?: Function | undefined) => Promise<unknown>; | ||
createFill(rect: Rect, fillColor?: string, fillOpacity?: number): Promise<void>; | ||
addBackground: (rect: Rect, fillColor?: string | undefined, fillOpacity?: number | undefined) => Promise<void>; | ||
createDivider(type: string, x: number, y: number, strokeWidth?: number, strokeOpacity?: number, strokeDisabled?: boolean, strokeColor?: string): void; | ||
@@ -64,0 +64,0 @@ createTitles(): Promise<unknown>; |
@@ -249,3 +249,3 @@ "use strict"; | ||
; | ||
createFill(rect, fillColor, fillOpacity, callback) { | ||
createFill(rect, fillColor, fillOpacity) { | ||
this.logg('createFill'); | ||
@@ -265,4 +265,3 @@ return new Promise((resolve, reject) => { | ||
this.restore(); | ||
typeof callback === 'function' && callback(this); | ||
resolve(this); | ||
resolve(); | ||
} | ||
@@ -464,2 +463,3 @@ catch (error) { | ||
let padding = { top: 0, right: 0, bottom: 0, left: 0 }; | ||
let fill = { opacity: undefined, fill: undefined }; | ||
yield ((_b = (_a = this.pdfkitTableCache.options) === null || _a === void 0 ? void 0 : _a.prepareRow) === null || _b === void 0 ? void 0 : _b.call(_a, null)); | ||
@@ -490,3 +490,6 @@ for (rowIndex = 0; rowIndex < rowLen; rowIndex++) { | ||
const rectCell = Object.assign(Object.assign({}, rectRow), { x: this.columnPositions[colIndex], width: this.columnSizes[colIndex] }); | ||
this.createFill(rectCell); | ||
if (this.isHeaderString === false) { | ||
fill = this.prepareRowFillOptionsData(this.pdfkitTableCache.headers[colIndex]); | ||
fill.fill && (yield this.createFill(rectCell, fill.fill, fill.opacity)); | ||
} | ||
(_d = (_c = this.pdfkitTableCache.options) === null || _c === void 0 ? void 0 : _c.prepareRow) === null || _d === void 0 ? void 0 : _d.call(_c, elm, colIndex, rowIndex, rectRow, rectCell); | ||
@@ -556,3 +559,3 @@ this.text(text, this.columnPositions[colIndex] + left + padding.left, this.positionY + top + padding.top - distance, { | ||
fill = Object(this.prepareRowFillOptionsData(elm)); | ||
fill.fill && this.createFill(rectCell, fill.fill, fill.opacity); | ||
fill.fill && (yield this.createFill(rectCell, fill.fill, fill.opacity)); | ||
} | ||
@@ -563,3 +566,3 @@ if (typeof elm[property] === 'object') { | ||
fill = this.prepareRowFillOptionsData(elm[property]); | ||
fill.fill && this.createFill(rectCell, fill.fill, fill.opacity); | ||
fill.fill && (yield this.createFill(rectCell, fill.fill, fill.opacity)); | ||
} | ||
@@ -569,3 +572,3 @@ } | ||
fill = this.prepareRowFillOptionsData(this.pdfkitTableCache.headers[colIndex]); | ||
fill.fill && this.createFill(rectCell, fill.fill, fill.opacity); | ||
fill.fill && (yield this.createFill(rectCell, fill.fill, fill.opacity)); | ||
} | ||
@@ -572,0 +575,0 @@ if (String(text).substring(0, 5) === 'bold:') { |
{ | ||
"name": "pdfkit-table-ts", | ||
"version": "0.0.06", | ||
"version": "0.0.07", | ||
"description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
109259
1224