@syncfusion/ej2-pdf-export 29.1.40 → 29.2.4

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 29.1.40
3
+ * version : 29.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-pdf-export@*",
3
- "_id": "@syncfusion/ej2-pdf-export@29.1.33",
3
+ "_id": "@syncfusion/ej2-pdf-export@29.1.40",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-+SctFqRdOHI1bXXV7yqMdnIQZpxHZJOm27WDc5fg/5gr/S/7yAdbZUzqjNrihNcWdqU+dmz7yYnkV5rvZzmdag==",
5
+ "_integrity": "sha512-NQyWKCZHp1wP+Knk5an8NHYns3wGI10zYGofj25GECylywMbPj2pyauCymPKa8ePShj6op1KByZGWf9F+UbbRA==",
6
6
  "_location": "/@syncfusion/ej2-pdf-export",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -28,8 +28,8 @@
28
28
  "/@syncfusion/ej2-pivotview",
29
29
  "/@syncfusion/ej2-treemap"
30
30
  ],
31
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf-export/-/ej2-pdf-export-29.1.33.tgz",
32
- "_shasum": "0fa388c6ba7c0db6421e9adc585091dea5bd2c8a",
31
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf-export/-/ej2-pdf-export-29.1.40.tgz",
32
+ "_shasum": "5d0a3735ab2d0b6eedf8473d7e14a23dde21a37b",
33
33
  "_spec": "@syncfusion/ej2-pdf-export@*",
34
34
  "_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
35
35
  "author": {
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "bundleDependencies": false,
39
39
  "dependencies": {
40
- "@syncfusion/ej2-compression": "~29.1.33"
40
+ "@syncfusion/ej2-compression": "~29.2.4"
41
41
  },
42
42
  "deprecated": false,
43
43
  "description": "Syncfusion TypeScript Component",
@@ -48,7 +48,7 @@
48
48
  "module": "./index.js",
49
49
  "name": "@syncfusion/ej2-pdf-export",
50
50
  "typings": "index.d.ts",
51
- "version": "29.1.40",
51
+ "version": "29.2.4",
52
52
  "sideEffects": false,
53
53
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
54
54
  }
@@ -89,10 +89,16 @@ var PdfColor = /** @class */ (function () {
89
89
  this.greenColor = g;
90
90
  this.blueColor = b;
91
91
  if (typeof a === 'undefined') {
92
- this.alpha = PdfColor.maxColourChannelValue;
92
+ this.a = PdfColor.maxColourChannelValue;
93
93
  }
94
94
  else {
95
- this.alpha = a;
95
+ this.a = a;
96
+ var isFractional = (a >= 0 && a <= 1);
97
+ var scaleFactor = isFractional ? a : a / 255;
98
+ var inverseScale = 1 - scaleFactor;
99
+ this.redColor = Math.max(0, Math.min(255, Math.round(r * scaleFactor + PdfColor.maxColourChannelValue * inverseScale)));
100
+ this.greenColor = Math.max(0, Math.min(255, Math.round(g * scaleFactor + PdfColor.maxColourChannelValue * inverseScale)));
101
+ this.blueColor = Math.max(0, Math.min(255, Math.round(b * scaleFactor + PdfColor.maxColourChannelValue * inverseScale)));
96
102
  }
97
103
  this.filled = true;
98
104
  this.assignCMYK(r, g, b);
@@ -1056,6 +1056,7 @@ var PdfGridLayouter = /** @class */ (function (_super) {
1056
1056
  var location_3 = new PointF(0, 0);
1057
1057
  var size = new SizeF(0, 0);
1058
1058
  var isHeader = false;
1059
+ var allowRowBreak = true;
1059
1060
  if (row.rowSpanExists) {
1060
1061
  var maxSpan = 0;
1061
1062
  var currRowIndex = this.Grid.rows.rowCollection.indexOf(row);
@@ -1086,7 +1087,90 @@ var PdfGridLayouter = /** @class */ (function (_super) {
1086
1087
  // }
1087
1088
  // if ((rowMaxHeight > rowHeightWithSpan) && flag) {
1088
1089
  // row.height += (rowMaxHeight - rowHeightWithSpan);
1089
- // }
1090
+ // }
1091
+ if ((rowHeightWithSpan > this.currentBounds.height ||
1092
+ rowHeightWithSpan + this.currentBounds.y > this.currentBounds.height)) {
1093
+ if (row.rowSpanExists &&
1094
+ (this.Grid.LayoutFormat.break === PdfLayoutBreakType.FitElement || !this.Grid.allowRowBreakAcrossPages)) {
1095
+ allowRowBreak = false;
1096
+ }
1097
+ }
1098
+ if ((rowHeightWithSpan > this.currentBounds.height || rowHeightWithSpan + this.currentBounds.y > this.currentBounds.height)
1099
+ && allowRowBreak) {
1100
+ rowHeightWithSpan = 0;
1101
+ row.isPageBreakRowSpanApplied = true;
1102
+ for (var i = 0; i < row.cells.count; i++) {
1103
+ var cell = row.cells.getCell(i);
1104
+ maxSpan = cell.rowSpan;
1105
+ for (var i_7 = currRowIndex; i_7 < currRowIndex + maxSpan; i_7++) {
1106
+ rowHeightWithSpan += isHeader ? this.Grid.headers.getHeader(i_7).height : this.Grid.rows.getRow(i_7).height;
1107
+ var layoutFormat = this.Grid.LayoutFormat;
1108
+ var currentBoundsHeight = this.currentPageBounds.height;
1109
+ if (layoutFormat.usePaginateBounds && layoutFormat.paginateBounds && layoutFormat.paginateBounds.height > 0) {
1110
+ var bottom = layoutFormat.paginateBounds.y + layoutFormat.paginateBounds.height;
1111
+ if (!this.Grid.isChildGrid && this.Grid.listOfNavigatePages.length === 1) {
1112
+ bottom += this.Grid._gridLocation.y;
1113
+ }
1114
+ if (bottom < currentBoundsHeight) {
1115
+ currentBoundsHeight = bottom;
1116
+ this.currentPageBounds.height = currentBoundsHeight;
1117
+ this.currentBounds.height = currentBoundsHeight;
1118
+ }
1119
+ }
1120
+ if ((this.currentBounds.y + rowHeightWithSpan) > currentBoundsHeight) {
1121
+ rowHeightWithSpan -= isHeader ? this.Grid.headers.getHeader(i_7).height : this.Grid.rows.getRow(i_7).height;
1122
+ for (var j = 0; j < this.Grid.rows.getRow(currRowIndex).cells.count; j++) {
1123
+ var newSpan = i_7 - currRowIndex;
1124
+ if (!isHeader &&
1125
+ this.Grid.rows.getRow(currRowIndex).cells.getCell(j).rowSpan === maxSpan &&
1126
+ newSpan !== 0) {
1127
+ var currCell = this.Grid.rows.getRow(currRowIndex).cells.getCell(j);
1128
+ var nextCell = this.Grid.rows.getRow(i_7).cells.getCell(j);
1129
+ currCell.rowSpan = newSpan === 0 ? 1 : newSpan;
1130
+ this.Grid.rows.getRow(currRowIndex).maximumRowSpan = newSpan === 0 ? 1 : newSpan;
1131
+ nextCell.rowSpan = maxSpan - newSpan;
1132
+ if (this.Grid.rows.getRow(i_7).maximumRowSpan < (maxSpan - newSpan)) {
1133
+ this.Grid.rows.getRow(i_7).maximumRowSpan = maxSpan - newSpan;
1134
+ }
1135
+ var pdfGrid = currCell.value;
1136
+ nextCell.stringFormat = currCell.stringFormat;
1137
+ nextCell.style = currCell.style;
1138
+ nextCell.style.backgroundImage = null;
1139
+ nextCell.columnSpan = currCell.columnSpan;
1140
+ if (pdfGrid instanceof PdfGrid &&
1141
+ this.currentBounds.y + pdfGrid.size.height + this.Grid.rows.getRow(i_7).height +
1142
+ pdfGrid.style.cellPadding.top + pdfGrid.style.cellPadding.bottom >= this.currentBounds.height) {
1143
+ nextCell.value = currCell.value;
1144
+ }
1145
+ else if (!(pdfGrid instanceof PdfGrid)) {
1146
+ nextCell.value = currCell.value;
1147
+ }
1148
+ if (i_7 > 0)
1149
+ this.Grid.rows.getRow(i_7 - 1).rowSpanExists = true;
1150
+ nextCell.isRowMergeContinue = false;
1151
+ nextCell.isRowMergeStart = true;
1152
+ }
1153
+ else if (isHeader &&
1154
+ this.Grid.headers.getHeader(currRowIndex).cells.getCell(j).rowSpan === maxSpan) {
1155
+ var headerCell = this.Grid.headers.getHeader(currRowIndex).cells.getCell(j);
1156
+ var nextHeaderCell = this.Grid.headers.getHeader(i_7).cells.getCell(j);
1157
+ headerCell.rowSpan = newSpan === 0 ? 1 : newSpan;
1158
+ nextHeaderCell.rowSpan = maxSpan - newSpan;
1159
+ nextHeaderCell.stringFormat = headerCell.stringFormat;
1160
+ nextHeaderCell.style = headerCell.style;
1161
+ nextHeaderCell.columnSpan = headerCell.columnSpan;
1162
+ nextHeaderCell.value = headerCell.value;
1163
+ this.Grid.headers.getHeader(i_7 - 1).rowSpanExists = false;
1164
+ nextHeaderCell.isRowMergeContinue = false;
1165
+ nextHeaderCell.isRowMergeStart = true;
1166
+ }
1167
+ }
1168
+ break;
1169
+ }
1170
+ }
1171
+ rowHeightWithSpan = 0;
1172
+ }
1173
+ }
1090
1174
  }
1091
1175
  var calculatedHeight = row.rowBreakHeight > 0.0 ? row.rowBreakHeight : row.height;
1092
1176
  if (typeof this.Grid.isChildGrid !== 'undefined' && this.Grid.isChildGrid && typeof this.Grid.ParentCell !== 'undefined' && this.Grid.ParentCell != null) {
@@ -50,7 +50,7 @@ export declare class PdfGrid extends PdfLayoutElement {
50
50
  * @hidden
51
51
  * @private
52
52
  */
53
- private gridLocation;
53
+ _gridLocation: RectangleF;
54
54
  /**
55
55
  * @hidden
56
56
  * @private
@@ -379,7 +379,7 @@ var PdfGrid = /** @class */ (function (_super) {
379
379
  this.setSpan();
380
380
  this.checkSpan();
381
381
  this.layoutFormat = param.format;
382
- this.gridLocation = param.bounds;
382
+ this._gridLocation = param.bounds;
383
383
  var layouter = new PdfGridLayouter(this);
384
384
  var result = (layouter.Layouter(param));
385
385
  return result;
@@ -628,8 +628,8 @@ var PdfGrid = /** @class */ (function (_super) {
628
628
  }
629
629
  var cellWidth = 0;
630
630
  var cellWidths = 0;
631
- if ((typeof this.isChildGrid === 'undefined' && typeof this.gridLocation !== 'undefined') || (this.isChildGrid === null && typeof this.gridLocation !== 'undefined')) {
632
- this.initialWidth = this.gridLocation.width;
631
+ if ((typeof this.isChildGrid === 'undefined' && typeof this._gridLocation !== 'undefined') || (this.isChildGrid === null && typeof this._gridLocation !== 'undefined')) {
632
+ this.initialWidth = this._gridLocation.width;
633
633
  }
634
634
  if (this.headers.count > 0) {
635
635
  var colCount_1 = this.headers.getHeader(0).cells.count;