datastake-daf 0.6.444 → 0.6.445

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.
@@ -14606,8 +14606,10 @@ function PdfView(_ref2) {
14606
14606
  incrHeight += HEADER_HEIGHT;
14607
14607
  }
14608
14608
  const newHeight = incrHeight + height;
14609
+
14610
+ // ADD THIS CONDITION HERE - before the page break logic
14609
14611
  if (i === keys.length - 1) {
14610
- ref.current.style.paddingBottom = '30px';
14612
+ ref.current.style.paddingBottom = '80px';
14611
14613
  }
14612
14614
  if (newHeight > PAGE_HEIGHT - 30 - FOOTER_HEIGHT - HEADER_HEIGHT) {
14613
14615
  const dif = Math.abs(PAGE_HEIGHT - incrHeight);
@@ -14620,12 +14622,10 @@ function PdfView(_ref2) {
14620
14622
  } = sectionsConfig[keys[i - 1]];
14621
14623
  topRef.current.style.marginBottom = "".concat(dif + HEADER_HEIGHT - 24, "px");
14622
14624
  incrHeight = height + 24 + HEADER_HEIGHT;
14623
- // console.log('margin', dif);
14624
14625
  }
14625
14626
  } else {
14626
14627
  incrHeight = newHeight + 24;
14627
14628
  }
14628
- // console.groupEnd();
14629
14629
  });
14630
14630
  setPages(_pages);
14631
14631
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.444",
3
+ "version": "0.6.445",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -66,35 +66,34 @@ export default function PdfView({
66
66
 
67
67
  keys.forEach((k, i) => {
68
68
  const { height, ref } = sectionsConfig[k];
69
-
69
+
70
70
  if (i === 0) {
71
71
  ref.current.style.marginTop = `${HEADER_HEIGHT}px`;
72
72
  incrHeight += HEADER_HEIGHT;
73
73
  }
74
-
74
+
75
75
  const newHeight = incrHeight + height;
76
-
76
+
77
+ // ADD THIS CONDITION HERE - before the page break logic
77
78
  if (i === keys.length - 1) {
78
- ref.current.style.paddingBottom = '30px';
79
+ ref.current.style.paddingBottom = '80px';
79
80
  }
80
-
81
+
81
82
  if (newHeight > PAGE_HEIGHT - 30 - FOOTER_HEIGHT - HEADER_HEIGHT) {
82
83
  const dif = Math.abs(PAGE_HEIGHT - incrHeight);
83
84
  ref.current.style.marginTop = '30px';
84
85
  _page += 1;
85
86
  _pages.push(_page);
86
-
87
+
87
88
  if (sectionsConfig[keys[i - 1]]) {
88
89
  const { ref: topRef } = sectionsConfig[keys[i - 1]];
89
90
  topRef.current.style.marginBottom = `${dif + HEADER_HEIGHT - 24}px`;
90
91
  incrHeight = height + 24 + HEADER_HEIGHT;
91
- // console.log('margin', dif);
92
92
  }
93
93
  } else {
94
94
  incrHeight = newHeight + 24;
95
95
  }
96
- // console.groupEnd();
97
- })
96
+ });
98
97
  setPages(_pages);
99
98
  }
100
99
  }, [sectionsConfig]);