Updated to AdminLTE 3.01 CSS Framework

This commit is contained in:
johnny@pittpc.com
2019-11-20 13:53:45 -05:00
parent 4c28dcf8a8
commit cc42bce43c
45 changed files with 18842 additions and 6459 deletions

View File

@@ -1,4 +1,4 @@
/*! pdfmake v0.1.60, @license MIT, @link http://pdfmake.org */
/*! pdfmake v0.1.62, @license MIT, @link http://pdfmake.org */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
@@ -977,7 +977,7 @@ module.exports = {
/* 2 */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.9' };
var core = module.exports = { version: '2.6.10' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
@@ -4763,7 +4763,7 @@ module.exports = function (fn, that, length) {
/* 39 */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.9' };
var core = module.exports = { version: '2.6.10' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
@@ -19420,6 +19420,20 @@ var getSvgToPDF = function () {
}
};
var findFont = function (fonts, requiredFonts, defaultFont) {
for (var i = 0; i < requiredFonts.length; i++) {
var requiredFont = requiredFonts[i].toLowerCase();
for (var font in fonts) {
if (font.toLowerCase() === requiredFont) {
return font;
}
}
}
return defaultFont;
};
////////////////////////////////////////
// PdfPrinter
@@ -19772,7 +19786,7 @@ function renderPages(pages, fontProvider, pdfKitDoc, progressCallback) {
renderImage(item.item, item.item.x, item.item.y, pdfKitDoc);
break;
case 'svg':
renderSVG(item.item, item.item.x, item.item.y, pdfKitDoc);
renderSVG(item.item, item.item.x, item.item.y, pdfKitDoc, fontProvider);
break;
case 'beginClip':
beginClip(item.item, pdfKitDoc);
@@ -19992,8 +20006,25 @@ function renderImage(image, x, y, pdfKitDoc) {
}
}
function renderSVG(svg, x, y, pdfKitDoc) {
getSvgToPDF()(pdfKitDoc, svg.svg, svg.x, svg.y, Object.assign({ width: svg._width, height: svg._height, assumePt: true }, svg.options));
function renderSVG(svg, x, y, pdfKitDoc, fontProvider) {
var options = Object.assign({ width: svg._width, height: svg._height, assumePt: true }, svg.options);
options.fontCallback = function (family, bold, italic, fontOptions) {
fontOptions.fauxBold = bold;
fontOptions.fauxItalic = italic;
var fontsFamily = family.split(',').map(function (f) { return f.trim().replace(/('|")/g, ''); });
var font = findFont(fontProvider.fonts, fontsFamily, svg.font || 'Roboto');
var fontFile = fontProvider.getFontFile(font, bold, italic);
if (fontFile === null) {
var type = fontProvider.getFontType(bold, italic);
throw new Error('Font \'' + font + '\' in style \'' + type + '\' is not defined in the font section of the document definition.');
}
return fontFile;
};
getSvgToPDF()(pdfKitDoc, svg.svg, svg.x, svg.y, options);
}
function beginClip(rect, pdfKitDoc) {
@@ -59934,9 +59965,22 @@ function FontProvider(fontDescriptors, pdfKitDoc) {
}
}
FontProvider.prototype.provideFont = function (familyName, bold, italics) {
var type = typeName(bold, italics);
FontProvider.prototype.getFontType = function (bold, italics) {
return typeName(bold, italics);
}
FontProvider.prototype.getFontFile = function (familyName, bold, italics) {
var type = this.getFontType(bold, italics);
if (!this.fonts[familyName] || !this.fonts[familyName][type]) {
return null;
}
return this.fonts[familyName][type];
}
FontProvider.prototype.provideFont = function (familyName, bold, italics) {
var type = this.getFontType(bold, italics);
if (this.getFontFile(familyName, bold, italics) === null) {
throw new Error('Font \'' + familyName + '\' in style \'' + type + '\' is not defined in the font section of the document definition.');
}
@@ -61234,6 +61278,8 @@ DocMeasure.prototype.measureSVG = function (node) {
this.measureImageWithDimensions(node, dimensions);
node.font = this.styleStack.getProperty('font');
// scale SVG based on final dimension
node.svg = this.svgMeasure.writeDimensions(node.svg, {
width: node._width,
@@ -63638,7 +63684,7 @@ TableProcessor.prototype.drawHorizontalLine = function (lineIndex, writer, overr
for (var i = 0, l = this.rowSpanData.length; i < l; i++) {
var data = this.rowSpanData[i];
var shouldDrawLine = !data.rowSpan;
var borderColor;
var borderColor = null;
// draw only if the current cell requires a top border or the cell in the
// row above requires a bottom border