Skip to content

Commit 3c9ec1b

Browse files
authored
Merge pull request #1401 from gitbrent/version-401
Version 4.0.1
2 parents 8692262 + e368795 commit 3c9ec1b

26 files changed

+6812
-6642
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.0.1](https://github.com/gitbrent/PptxGenJS/releases/tag/v4.0.1) - 2025-06-25
9+
10+
### Fixed
11+
12+
- Border is a string instead of a number in demo_tables.mjs [\#1389](https://github.com/gitbrent/PptxGenJS/issues/1389) ([hesi726](https://github.com/hesi726))
13+
- Fixed support for Scheme Colors as `dataBorder` [\#1389](https://github.com/gitbrent/PptxGenJS/issues/1389) ([hesi726](https://github.com/hesi726))
14+
- Hyperlinks cause "needs repair" when using table auto-paging [\#1392](https://github.com/gitbrent/PptxGenJS/issues/1392) ([gitbrent](https://github.com/gitbrent))
15+
16+
### Changed
17+
18+
- Removed "node:fs/promises" from `package.json` browser field ([gitbrent](https://github.com/gitbrent))
19+
- Updated image-size to v1.2.1 [\#1387](https://github.com/gitbrent/PptxGenJS/pull/1387) ([znew711](https://github.com/znew711))
20+
821
## [4.0.0](https://github.com/gitbrent/PptxGenJS/releases/tag/v4.0.0) - 2025-05-04
922

1023
### Fixed

RELEASING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
1. Update `package.json` version
1616
2. Update `src/pptxgen.ts` version (eg: `const VERSION = '4.0.1'`)
1717
3. Update `CHANGELOG.md` with new date
18-
4. Update `README.md` with new CDN links
19-
5. Build library: npm scripts > `ship`
20-
6. Consolidate new changes from `src/bld/*.ts` into `types/index.d.ts` and update version in head comment
21-
7. Open `dist/*.js` and check headers
22-
8. Update version in: `demos/node/package.json`
23-
9. Update pptxgenjs dep version in: `demos/vite-demo/package.json`
18+
4. Build library: npm scripts > `ship`
19+
5. Consolidate new changes from `src/bld/*.ts` into `types/index.d.ts` and update version in head comment
20+
6. Open `dist/*.js` and check headers
21+
7. Update version in: `demos/node/package.json`
22+
8. Update pptxgenjs dep version in: `demos/vite-demo/package.json`
2423

2524
## 🧪 Run Tests Before Release
2625

TESTING.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ This document outlines how to manually test PptxGenJS across supported platforms
66
77
Config Notes
88

9-
> ⚠️ Disable any VPN on the machine being used to serve from, or clients using IP address cant connect."
9+
> ⚠️ Disable VPN on the server machine, otherwise, clients using the local IP address cannot connect.
10+
11+
Testing Steps
12+
13+
1. Run `npm run ship`
14+
2. Execute tests from each section below
1015

1116
## 🧪 Test Suites Overview
1217

@@ -61,7 +66,6 @@ Run the following test commands:
6166

6267
```bash
6368
cd demos/node
64-
npm install
6569
npm run demo
6670
npm run demo-all
6771
```
@@ -98,7 +102,7 @@ Start the app:
98102

99103
```bash
100104
cd demos/vite-demo
101-
npm install
105+
npm install (?)
102106
npm run dev
103107
```
104108

demos/browser/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<meta name="author" content="https://github.com/gitbrent">
77
<meta name="website" content="https://github.com/gitbrent/PptxGenJS/">
8-
<meta name="version" content="4.0.0">
9-
<meta name="updated" content="2025-05-04">
8+
<meta name="version" content="4.0.1">
9+
<meta name="updated" content="2025-06-25">
1010
<link rel="icon" href="images/favicon-32x32.png" sizes="32x32" type="image/png">
1111
<link rel="icon" href="images/favicon-16x16.png" sizes="16x16" type="image/png">
1212
<link rel="icon" href="images/favicon.png">

demos/browser/js/pptxgen.bundle.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/browser/js/pptxgen.bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/browser/worker_test.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta name="author" content="https://github.com/gitbrent">
77
<meta name="website" content="https://github.com/gitbrent/PptxGenJS/">
8-
<meta name="version" content="4.0.0">
8+
<meta name="version" content="4.0.1">
99
<title>PptxGenJS | Web Worker API Demo</title>
1010
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet"
1111
integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">

demos/modules/demo_chart.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ function genSlide02(pptx) {
251251
valAxisMaxVal: 5000,
252252
valAxisLabelColor: COLORS_ACCENT[0],
253253
//
254-
dataBorder: { pt: 1, color: "F1F1F1" },
254+
//dataBorder: { pt: 1, color: "F1F1F1" },
255+
//dataBorder: { pt: 1, color: pptx.colors.BACKGROUND2 },
256+
dataBorder: { pt: 1, color: pptx.colors.ACCENT1 },
255257
dataLabelColor: "FFFFFF",
256258
dataLabelFontFace: "Arial",
257259
dataLabelFontSize: 10,

demos/modules/demo_table.mjs

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* AUTH: Brent Ely (https://github.com/gitbrent/)
44
* DESC: Common test/demo slides for all library features
55
* DEPS: Used by various demos (./demos/browser, ./demos/node, etc.)
6-
* VER.: 3.12.0
7-
* BLD.: 20230207
6+
* VER.: 4.0.1
7+
* BLD.: 20250530
88
*/
99

1010
import {
@@ -36,8 +36,13 @@ export function genSlides_Table(pptx) {
3636
pptx.addSection({ title: "Tables: Auto-Paging Calc" });
3737
genSlide09(pptx);
3838
if (TESTMODE) {
39-
pptx.addSection({ title: "Tables: QA" });
39+
pptx.addSection({ title: "Tables: QA 01" });
40+
pptx.addSection({ title: "Tables: QA 02" });
41+
pptx.addSection({ title: "Tables: QA 03" });
42+
pptx.addSection({ title: "Tables: QA 04" });
4043
genSlide10(pptx);
44+
pptx.addSection({ title: "Tables: QA 05" });
45+
genSlide11(pptx);
4146
}
4247
}
4348

@@ -80,7 +85,7 @@ function genSlide01(pptx) {
8085
fill: { color: "F7F7F7" },
8186
fontSize: 14,
8287
color: "363636",
83-
border: { pt: "1", color: "BBCCDD" },
88+
border: { pt: 1, color: "BBCCDD" },
8489
});
8590
// Pass default cell style as tabOpts, then just style/override individual cells as needed
8691

@@ -90,9 +95,9 @@ function genSlide01(pptx) {
9095

9196
let arrTabRows2 = [
9297
[
93-
{ text: "White", options: { fill: { color: "6699CC" }, color: "FFFFFF" } },
94-
{ text: "Yellow", options: { fill: { color: "99AACC" }, color: "FFFFAA" } },
95-
{ text: "Pink", options: { fill: { color: "AACCFF" }, color: "E140FE" } },
98+
{ text: "white", options: { fill: { color: "6699CC" }, color: "FFFFFF" } },
99+
{ text: "yellow", options: { fill: { color: "99AACC" }, color: "FFFFAA" } },
100+
{ text: "hyperlink", options: { fill: { color: "AACCFF" }, hyperlink: { slide: 2 } } },
96101
],
97102
[
98103
{ text: "12pt", options: { fill: { color: "FF0000" }, fontSize: 12 } },
@@ -115,7 +120,7 @@ function genSlide01(pptx) {
115120
fontSize: 16,
116121
valign: "center",
117122
align: "center",
118-
border: { pt: "1", color: "FFFFFF" },
123+
border: { pt: 5, color: "FFFFFF" },
119124
});
120125

121126
// DEMO: Row/Col Width/Heights
@@ -136,7 +141,7 @@ function genSlide01(pptx) {
136141
fontSize: 14,
137142
valign: "center",
138143
align: "center",
139-
border: { pt: "1", color: "BBCCDD" },
144+
border: { pt: 2, color: "BBCCDD" },
140145
});
141146
}
142147

@@ -192,7 +197,7 @@ function genSlide02(pptx) {
192197
align: "center",
193198
valign: "middle",
194199
fill: { color: "F9F9F9" },
195-
border: { pt: "1", color: "c7c7c7" },
200+
border: { pt: 1, color: "c7c7c7" },
196201
};
197202
let arrTabRows2 = [
198203
[
@@ -216,7 +221,7 @@ function genSlide02(pptx) {
216221
align: "center",
217222
valign: "middle",
218223
fontSize: 16,
219-
border: { pt: "2", color: pptx.colors.TEXT2 },
224+
border: { pt: 2, color: pptx.colors.TEXT2 },
220225
fill: { color: "F1F1F1" },
221226
};
222227
let arrTabRows3 = [
@@ -240,7 +245,7 @@ function genSlide02(pptx) {
240245
align: "center",
241246
valign: "middle",
242247
fontSize: 16,
243-
border: { pt: "1", color: pptx.colors.TEXT2 },
248+
border: { pt: 1, color: pptx.colors.TEXT2 },
244249
fill: { color: "f2f9fc" },
245250
};
246251
let arrTabRows4 = [
@@ -315,7 +320,7 @@ function genSlide03(pptx) {
315320
["C5", "D5", "E5", "F5", { text: "G5 -> H5", options: { colspan: 2, fill: { color: "9999FF" } } }, "J5", "K5", "L5"],
316321
];
317322

318-
let taboptions5 = { x: 0.6, y: 1.3, w: "90%", h: 5.5, margin: 0, fontSize: 14, align: "center", valign: "middle", border: { pt: "1" } };
323+
let taboptions5 = { x: 0.6, y: 1.3, w: "90%", h: 5.5, margin: 0, fontSize: 14, align: "center", valign: "middle", border: { pt: 1 } };
319324

320325
slide.addTable(arrTabRows5, taboptions5);
321326
}
@@ -450,7 +455,7 @@ function genSlide05(pptx) {
450455
// Table cell: Use the exact same code from addText to do the same word-level formatting within a cell
451456
slide.addText("Table:", { x: 1, y: 5, w: 3, h: 2, fontSize: 18, fontFace: "Arial", color: "0088CC" });
452457

453-
let opts2 = { x: 2.5, y: 5, h: 2, align: "center", valign: "middle", colW: [1.5, 1.5, 6.5], border: { pt: "1" }, fill: { color: "F1F1F1" } };
458+
let opts2 = { x: 2.5, y: 5, h: 2, align: "center", valign: "middle", colW: [1.5, 1.5, 6.5], border: { pt: 1 }, fill: { color: "F1F1F1" } };
454459
let arrTabRows = [
455460
[
456461
{ text: "Cell 1A", options: { fontFace: "Arial" } },
@@ -493,7 +498,7 @@ function genSlide06(pptx) {
493498
{ text: arrCell4, options: { valign: "bottom" } },
494499
],
495500
],
496-
{ x: 0.6, y: 1.25, w: 12, h: 3, fontSize: 24, border: { pt: "1" }, fill: { color: "F1F1F1" } }
501+
{ x: 0.6, y: 1.25, w: 12, h: 3, fontSize: 24, border: { pt: 1 }, fill: { color: "F1F1F1" } }
497502
);
498503

499504
// EX 2:
@@ -522,7 +527,7 @@ function genSlide06(pptx) {
522527
},
523528
],
524529
],
525-
{ x: 0.6, y: 4.75, h: 2, fontSize: 24, colW: [8, 2, 2], valign: "middle", border: { pt: "1" }, fill: { color: "F1F1F1" } }
530+
{ x: 0.6, y: 4.75, h: 2, fontSize: 24, colW: [8, 2, 2], valign: "middle", border: { pt: 1 }, fill: { color: "F1F1F1" } }
526531
);
527532
}
528533

@@ -892,7 +897,7 @@ function genSlide10(pptx) {
892897

893898
// SLIDE 1:
894899
{
895-
slide = pptx.addSlide({ sectionTitle: "Tables: QA" });
900+
slide = pptx.addSlide({ sectionTitle: "Tables: QA 01" });
896901

897902
let projRows = [
898903
[
@@ -937,7 +942,7 @@ function genSlide10(pptx) {
937942

938943
// SLIDE 2:
939944
{
940-
slide = pptx.addSlide({ sectionTitle: "Tables: QA" });
945+
slide = pptx.addSlide({ sectionTitle: "Tables: QA 02" });
941946

942947
let projRows2 = [
943948
[
@@ -982,7 +987,7 @@ function genSlide10(pptx) {
982987

983988
// SLIDE 3:
984989
{
985-
slide = pptx.addSlide({ sectionTitle: "Tables: QA" });
990+
slide = pptx.addSlide({ sectionTitle: "Tables: QA 03" });
986991

987992
let projRows = [
988993
[
@@ -1029,7 +1034,7 @@ function genSlide10(pptx) {
10291034

10301035
// SLIDE 4: status report style
10311036
{
1032-
slide = pptx.addSlide({ sectionTitle: "Tables: QA" });
1037+
slide = pptx.addSlide({ sectionTitle: "Tables: QA 04" });
10331038

10341039
let projRows = [
10351040
[
@@ -1066,3 +1071,35 @@ function genSlide10(pptx) {
10661071
});
10671072
}
10681073
}
1074+
1075+
/**
1076+
* SLIDE 11[...]: Test paging with hyperlinks
1077+
* @param {PptxGenJS} pptx
1078+
* @since 4.0.1
1079+
*/
1080+
function genSlide11(pptx) {
1081+
let slide = null;
1082+
1083+
slide = pptx.addSlide({ sectionTitle: "Tables: QA 05" });
1084+
slide.addText([{ text: "Table Examples: Auto-Paging with Hyperlinks", options: DEMO_TITLE_TEXTBK }], {
1085+
x: 0.23,
1086+
y: 0.13,
1087+
w: 8,
1088+
h: 0.4,
1089+
});
1090+
1091+
const baseTabRows = [
1092+
[
1093+
{ text: "white color", options: { fill: { color: "6699CC" }, align: "left", color: "FFFFFF" } },
1094+
{ text: "yellow color", options: { fill: { color: "99AACC" }, color: "FFFFAA" } },
1095+
{ text: "hyperlink here", options: { fill: { color: "AACCFF" }, hyperlink: { slide: 1 } } },
1096+
]
1097+
];
1098+
1099+
const arrTabRows = [];
1100+
for (let i = 0; i < 36; i++) {
1101+
arrTabRows.push(...baseTabRows);
1102+
};
1103+
1104+
slide.addTable(arrTabRows, { x: 0.5, y: 1.0, w:10, autoPage: true });
1105+
}

0 commit comments

Comments
 (0)