@pdfme/ui 6.1.12-dev.11 → 6.1.12-dev.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -74759,7 +74759,7 @@ var getRichTextLineHeight = (line, fontSize) => {
74759
74759
  return Math.max(...line.runs.map((run) => heightOfFontAtSize(run.fontKitFont, fontSize)));
74760
74760
  };
74761
74761
  //#endregion
74762
- //#region ../schemas/dist/dynamicTemplate-BgH01dcs.js
74762
+ //#region ../schemas/dist/dynamicTemplate-Bs3HHtDw.js
74763
74763
  function _typeof$17(o) {
74764
74764
  "@babel/helpers - typeof";
74765
74765
  return _typeof$17 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -75110,7 +75110,7 @@ function cellStyles(sectionName, column, rowIndex, styles, fallbackFontName) {
75110
75110
  const otherStyles = Object.assign({}, styles.styles, sectionStyles);
75111
75111
  const colStyles = styles.columnStyles[column.index] || {};
75112
75112
  const rowStyles = sectionName === "body" && rowIndex % 2 === 0 ? Object.assign({}, styles.alternateRowStyles) : {};
75113
- return Object.assign({
75113
+ const defaultStyle = {
75114
75114
  fontName: fallbackFontName,
75115
75115
  backgroundColor: "",
75116
75116
  textColor: "#000000",
@@ -75119,15 +75119,16 @@ function cellStyles(sectionName, column, rowIndex, styles, fallbackFontName) {
75119
75119
  alignment: "left",
75120
75120
  verticalAlignment: "middle",
75121
75121
  fontSize: 10,
75122
- cellPadding: 5,
75122
+ cellPadding: createBoxDimension(5),
75123
75123
  lineColor: "#000000",
75124
- lineWidth: 0,
75124
+ lineWidth: createBoxDimension(0),
75125
75125
  minCellHeight: 0,
75126
75126
  minCellWidth: 0
75127
- }, otherStyles, rowStyles, colStyles);
75127
+ };
75128
+ return Object.assign(defaultStyle, otherStyles, rowStyles, colStyles);
75128
75129
  }
75129
75130
  function mapCellStyle(style) {
75130
- return {
75131
+ const mapping = {
75131
75132
  fontName: style.fontName,
75132
75133
  alignment: style.alignment,
75133
75134
  verticalAlignment: style.verticalAlignment,
@@ -75140,6 +75141,7 @@ function mapCellStyle(style) {
75140
75141
  lineWidth: style.borderWidth,
75141
75142
  cellPadding: style.padding
75142
75143
  };
75144
+ return Object.fromEntries(Object.entries(mapping).filter(([, value]) => value !== void 0));
75143
75145
  }
75144
75146
  function getTableOptions(schema, body) {
75145
75147
  const columnStylesWidth = schema.headWidthPercentages.reduce((acc, cur, i) => ({
@@ -75324,7 +75326,7 @@ var getDynamicLayoutForTable = async (value, args) => {
75324
75326
  };
75325
75327
  };
75326
75328
  //#endregion
75327
- //#region ../schemas/dist/utils-nI6J7wZM.js
75329
+ //#region ../schemas/dist/utils-DK3W81o_.js
75328
75330
  var convertForPdfLayoutProps = ({ schema, pageHeight, applyRotateTranslate = true }) => {
75329
75331
  const { width: mmWidth, height: mmHeight, position, rotate, opacity } = schema;
75330
75332
  const { x: mmX, y: mmY } = position;
@@ -75614,7 +75616,7 @@ var Underline = [["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }], ["line", {
75614
75616
  y2: "20"
75615
75617
  }]];
75616
75618
  //#endregion
75617
- //#region ../schemas/dist/builtins-BHOQnFbY.js
75619
+ //#region ../schemas/dist/builtins-DZAw3Nhr.js
75618
75620
  var addUriLinkAnnotation = (arg) => {
75619
75621
  const { pdfDoc, page, uri, rect, borderWidth = 0 } = arg;
75620
75622
  const safeUri = normalizeSafeLinkUri(uri);
@@ -75976,6 +75978,7 @@ var pdfRender = async (arg) => {
75976
75978
  x: x + width / 2,
75977
75979
  y: pageHeight - mm2pt(schema.position.y) - height / 2
75978
75980
  };
75981
+ if (!value) return;
75979
75982
  drawTextBoxDecoration({
75980
75983
  page,
75981
75984
  schema,
@@ -75987,7 +75990,6 @@ var pdfRender = async (arg) => {
75987
75990
  rotate,
75988
75991
  pivotPoint
75989
75992
  });
75990
- if (!value) return;
75991
75993
  const fontName = schema.fontName ? schema.fontName : getFallbackFontName(font);
75992
75994
  const enableInlineMarkdown = isInlineMarkdownTextSchema(schema);
75993
75995
  const contentArea = getBoxContentArea(schema);