abstract-document
Advanced tools
Comparing version 4.3.4 to 4.3.5
"use strict"; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -239,7 +247,3 @@ var R = require("ramda"); | ||
.fillColor(textStyle.color || "black"); | ||
var width = Math.min(availableSize.width, pdf.widthOfString(text, { | ||
width: availableSize.width, | ||
height: availableSize.height, | ||
underline: textStyle.underline || false | ||
})); | ||
var width = Math.min(availableSize.width, pdf.widthOfString(text, __assign({ width: availableSize.width, height: availableSize.height, underline: textStyle.underline || false, indent: textStyle.indent || 0 }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {})))); | ||
var height = pdf.heightOfString(text, { | ||
@@ -246,0 +250,0 @@ width: width + 2, |
"use strict"; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -265,8 +273,3 @@ var R = require("ramda"); | ||
.fillColor(textStyle.color || "blue") | ||
.text(hyperLink.text, finalRect.x, finalRect.y + offset, { | ||
width: finalRect.width + 2, | ||
height: finalRect.height, | ||
underline: textStyle.underline || false, | ||
goTo: isInternalLink ? hyperLink.target.substr(1) : undefined | ||
}) | ||
.text(hyperLink.text, finalRect.x, finalRect.y + offset, __assign({ width: finalRect.width + 2, height: finalRect.height, underline: textStyle.underline || false, goTo: isInternalLink ? hyperLink.target.substr(1) : undefined, indent: textStyle.indent || 0 }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}))) | ||
.underline(finalRect.x, finalRect.y, finalRect.width, finalRect.height, { | ||
@@ -296,7 +299,3 @@ color: "blue" | ||
.fillColor(textStyle.color || "black") | ||
.text(text, finalRect.x, finalRect.y + offset, { | ||
width: finalRect.width + 2, | ||
height: finalRect.height, | ||
underline: textStyle.underline || false | ||
}); | ||
.text(text, finalRect.x, finalRect.y + offset, __assign({ width: finalRect.width + 2, height: finalRect.height, underline: textStyle.underline || false, indent: textStyle.indent || 0 }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}))); | ||
} | ||
@@ -303,0 +302,0 @@ function renderTable(resources, pdf, desiredSizes, finalRect, table) { |
@@ -13,2 +13,4 @@ export interface TextStyle { | ||
readonly verticalPosition?: number; | ||
readonly indent?: number; | ||
readonly lineGap?: number; | ||
} | ||
@@ -26,2 +28,4 @@ export interface TextStyleProps { | ||
readonly verticalPosition?: number; | ||
readonly indent?: number; | ||
readonly lineGap?: number; | ||
} | ||
@@ -28,0 +32,0 @@ export declare function create(props?: TextStyleProps): TextStyle; |
@@ -28,3 +28,7 @@ "use strict"; | ||
underline: a.underline || b.underline, | ||
verticalPosition: a.verticalPosition || b.verticalPosition | ||
verticalPosition: a.verticalPosition !== undefined | ||
? a.verticalPosition | ||
: b.verticalPosition, | ||
indent: a.indent !== undefined ? a.indent : b.indent, | ||
lineGap: a.lineGap !== undefined ? a.lineGap : b.lineGap | ||
}); | ||
@@ -31,0 +35,0 @@ } |
@@ -0,1 +1,9 @@ | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
import * as R from "ramda"; | ||
@@ -235,7 +243,3 @@ import * as AD from "../../abstract-document/index"; | ||
.fillColor(textStyle.color || "black"); | ||
var width = Math.min(availableSize.width, pdf.widthOfString(text, { | ||
width: availableSize.width, | ||
height: availableSize.height, | ||
underline: textStyle.underline || false | ||
})); | ||
var width = Math.min(availableSize.width, pdf.widthOfString(text, __assign({ width: availableSize.width, height: availableSize.height, underline: textStyle.underline || false, indent: textStyle.indent || 0 }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {})))); | ||
var height = pdf.heightOfString(text, { | ||
@@ -242,0 +246,0 @@ width: width + 2, |
@@ -0,1 +1,9 @@ | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
import * as R from "ramda"; | ||
@@ -261,8 +269,3 @@ import * as AD from "../../abstract-document/index"; | ||
.fillColor(textStyle.color || "blue") | ||
.text(hyperLink.text, finalRect.x, finalRect.y + offset, { | ||
width: finalRect.width + 2, | ||
height: finalRect.height, | ||
underline: textStyle.underline || false, | ||
goTo: isInternalLink ? hyperLink.target.substr(1) : undefined | ||
}) | ||
.text(hyperLink.text, finalRect.x, finalRect.y + offset, __assign({ width: finalRect.width + 2, height: finalRect.height, underline: textStyle.underline || false, goTo: isInternalLink ? hyperLink.target.substr(1) : undefined, indent: textStyle.indent || 0 }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}))) | ||
.underline(finalRect.x, finalRect.y, finalRect.width, finalRect.height, { | ||
@@ -292,7 +295,3 @@ color: "blue" | ||
.fillColor(textStyle.color || "black") | ||
.text(text, finalRect.x, finalRect.y + offset, { | ||
width: finalRect.width + 2, | ||
height: finalRect.height, | ||
underline: textStyle.underline || false | ||
}); | ||
.text(text, finalRect.x, finalRect.y + offset, __assign({ width: finalRect.width + 2, height: finalRect.height, underline: textStyle.underline || false, indent: textStyle.indent || 0 }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}))); | ||
} | ||
@@ -299,0 +298,0 @@ function renderTable(resources, pdf, desiredSizes, finalRect, table) { |
@@ -13,2 +13,4 @@ export interface TextStyle { | ||
readonly verticalPosition?: number; | ||
readonly indent?: number; | ||
readonly lineGap?: number; | ||
} | ||
@@ -26,2 +28,4 @@ export interface TextStyleProps { | ||
readonly verticalPosition?: number; | ||
readonly indent?: number; | ||
readonly lineGap?: number; | ||
} | ||
@@ -28,0 +32,0 @@ export declare function create(props?: TextStyleProps): TextStyle; |
@@ -25,3 +25,7 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
underline: a.underline || b.underline, | ||
verticalPosition: a.verticalPosition || b.verticalPosition | ||
verticalPosition: a.verticalPosition !== undefined | ||
? a.verticalPosition | ||
: b.verticalPosition, | ||
indent: a.indent !== undefined ? a.indent : b.indent, | ||
lineGap: a.lineGap !== undefined ? a.lineGap : b.lineGap | ||
}); | ||
@@ -28,0 +32,0 @@ } |
{ | ||
"name": "abstract-document", | ||
"version": "4.3.4", | ||
"version": "4.3.5", | ||
"description": "Dynamically create documents using code or JSX and render to any format", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-document", |
@@ -431,3 +431,5 @@ import * as R from "ramda"; | ||
height: availableSize.height, | ||
underline: textStyle.underline || false | ||
underline: textStyle.underline || false, | ||
indent: textStyle.indent || 0, | ||
...(textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}) | ||
}) | ||
@@ -434,0 +436,0 @@ ); |
@@ -400,3 +400,5 @@ import * as R from "ramda"; | ||
underline: textStyle.underline || false, | ||
goTo: isInternalLink ? hyperLink.target.substr(1) : undefined | ||
goTo: isInternalLink ? hyperLink.target.substr(1) : undefined, | ||
indent: textStyle.indent || 0, | ||
...(textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}) | ||
}) | ||
@@ -440,3 +442,5 @@ .underline(finalRect.x, finalRect.y, finalRect.width, finalRect.height, { | ||
height: finalRect.height, | ||
underline: textStyle.underline || false | ||
underline: textStyle.underline || false, | ||
indent: textStyle.indent || 0, | ||
...(textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}) | ||
}); | ||
@@ -443,0 +447,0 @@ } |
@@ -13,2 +13,4 @@ export interface TextStyle { | ||
readonly verticalPosition?: number; | ||
readonly indent?: number; | ||
readonly lineGap?: number; | ||
} | ||
@@ -27,2 +29,4 @@ | ||
readonly verticalPosition?: number; | ||
readonly indent?: number; | ||
readonly lineGap?: number; | ||
} | ||
@@ -53,3 +57,8 @@ | ||
underline: a.underline || b.underline, | ||
verticalPosition: a.verticalPosition || b.verticalPosition | ||
verticalPosition: | ||
a.verticalPosition !== undefined | ||
? a.verticalPosition | ||
: b.verticalPosition, | ||
indent: a.indent !== undefined ? a.indent : b.indent, | ||
lineGap: a.lineGap !== undefined ? a.lineGap : b.lineGap | ||
}); | ||
@@ -56,0 +65,0 @@ } |
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
797013
13898