fluentreports
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -45,2 +45,3 @@ 0.0.1 - [2013/08/15] - Initial Release | ||
1.3.2 - FRG: Added Shape properties, allowed section properties to save, added generator to npm. | ||
1.3.3 - FRG: New Page Element, Section PageBreak settings, fixes for boolean/int functionable.. | ||
@@ -47,0 +48,0 @@ |
@@ -487,3 +487,17 @@ /************************************************************************************** | ||
case 'newPage': | ||
info.report.newPage(!!setting.saveOptions, callback); | ||
if(typeof setting.active === "boolean" && setting.active === true) { | ||
info.report.newPage(!!setting.saveOptions, callback); | ||
} | ||
else if(setting.active != null && typeof setting.active === "object" && setting.active.type === "function") { | ||
this._handleFunction(setting.active, info,(error, output) => { | ||
if (output) { | ||
info.report.newPage(!!setting.saveOptions, callback); | ||
} | ||
else { | ||
callback(); | ||
} | ||
}); | ||
} else { | ||
callback(); | ||
} | ||
return; | ||
@@ -776,4 +790,13 @@ | ||
// object might need to be used; the above path can't have settings on the object... | ||
const options = {}; | ||
if (headerFooter.pageBreak) { | ||
// a pageBreak of 1 = "automatic" / default engine behavior, | ||
if (headerFooter.pageBreak === "after" || headerFooter.pageBreak === "2" || headerFooter.pageBreak === 2) { | ||
options.pageBreakAfter = true; | ||
} else if (headerFooter.pageBreak === "before" || headerFooter.pageBreak === "0" || headerFooter.pageBreak === 0) { | ||
options.pageBreakBefore = true; | ||
} | ||
} | ||
if (headerFooter.children.length === 1 && headerFooter.children[0].type === 'raw') { | ||
report[type]( Array.isArray(headerFooter.children[0].values) ? headerFooter.children[0].values : [headerFooter.children[0].values]); | ||
report[type]( Array.isArray(headerFooter.children[0].values) ? headerFooter.children[0].values : [headerFooter.children[0].values], options); | ||
return; | ||
@@ -784,3 +807,3 @@ } | ||
headerFooter | ||
}) ); | ||
}) , options); | ||
@@ -787,0 +810,0 @@ } |
@@ -45,3 +45,3 @@ { | ||
"main": "lib/fluentReports", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"engines": { | ||
@@ -48,0 +48,0 @@ "node": "*" |
Sorry, the diff of this file is too big to display
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
694938
14247