Skip to content

Commit 59be955

Browse files
committed
new build
1 parent a75b80f commit 59be955

File tree

9 files changed

+31
-25
lines changed

9 files changed

+31
-25
lines changed

demos/browser/js/pptxgen.bundle.js

Lines changed: 3 additions & 3 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.

dist/pptxgen.bundle.js

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

dist/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.

dist/pptxgen.cjs.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* PptxGenJS 4.0.1-beta.0 @ 2025-05-29T03:10:57.445Z */
1+
/* PptxGenJS 4.0.1-beta.1 @ 2025-05-30T01:48:36.016Z */
22
'use strict';
33

44
var JSZip = require('jszip');
@@ -2335,8 +2335,11 @@ function addTableDefinition(target, tableRows, options, slideLayout, presLayout,
23352335
opt.margin = opt.margin === 0 || opt.margin ? opt.margin : DEF_CELL_MARGIN_IN;
23362336
if (typeof opt.margin === 'number')
23372337
opt.margin = [Number(opt.margin), Number(opt.margin), Number(opt.margin), Number(opt.margin)];
2338-
if (!opt.color)
2339-
opt.color = opt.color || DEF_FONT_COLOR; // Set default color if needed (table option > inherit from Slide > default to black)
2338+
// NOTE: dont add default color on tables with hyperlinks! (it causes any textObj's with hyperlinks to have subsequent words to be black)
2339+
if (JSON.stringify({ arrRows: arrRows }).indexOf('hyperlink') === -1) {
2340+
if (!opt.color)
2341+
opt.color = opt.color || DEF_FONT_COLOR; // Set default color if needed (table option > inherit from Slide > default to black)
2342+
}
23402343
if (typeof opt.border === 'string') {
23412344
console.warn('addTable `border` option must be an object. Ex: `{border: {type:\'none\'}}`');
23422345
opt.border = null;
@@ -2488,7 +2491,7 @@ function addTableDefinition(target, tableRows, options, slideLayout, presLayout,
24882491
// Create hyperlink rels (IMPORTANT: Wait until table has been shredded across Slides or all rels will end-up on Slide 1!)
24892492
createHyperlinkRels(newSlide, slide.rows);
24902493
// Add rows to new slide
2491-
newSlide.addTable(slide.rows, JSON.parse(JSON.stringify(opt || {})));
2494+
newSlide.addTable(slide.rows, Object.assign({}, opt));
24922495
// Add reference to the new slide so it can be returned, but don't add the first one because the user already has a reference to that one.
24932496
if (idx > 0)
24942497
newAutoPagedSlides.push(newSlide);
@@ -2697,7 +2700,7 @@ function createHyperlinkRels(target, text, options) {
26972700
textObjs.forEach((text, idx) => {
26982701
// IMPORTANT: `options` are lost due to recursion/copy!
26992702
if (options && options[idx])
2700-
text.options = options[idx];
2703+
text.options = Object.assign(Object.assign({}, text.options), options[idx]);
27012704
// NOTE: `text` can be an array of other `text` objects (table cell word-level formatting), continue parsing using recursion
27022705
if (Array.isArray(text)) {
27032706
const cellOpts = [];
@@ -6782,7 +6785,7 @@ function makeXmlViewProps() {
67826785
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
67836786
* SOFTWARE.
67846787
*/
6785-
const VERSION = '4.0.1-beta.0';
6788+
const VERSION = '4.0.1-beta.1';
67866789
class PptxGenJS {
67876790
set layout(value) {
67886791
const newLayout = this.LAYOUTS[value];

dist/pptxgen.es.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* PptxGenJS 4.0.1-beta.0 @ 2025-05-29T03:10:57.448Z */
1+
/* PptxGenJS 4.0.1-beta.1 @ 2025-05-30T01:48:36.018Z */
22
import JSZip from 'jszip';
33

44
/******************************************************************************
@@ -2333,8 +2333,11 @@ function addTableDefinition(target, tableRows, options, slideLayout, presLayout,
23332333
opt.margin = opt.margin === 0 || opt.margin ? opt.margin : DEF_CELL_MARGIN_IN;
23342334
if (typeof opt.margin === 'number')
23352335
opt.margin = [Number(opt.margin), Number(opt.margin), Number(opt.margin), Number(opt.margin)];
2336-
if (!opt.color)
2337-
opt.color = opt.color || DEF_FONT_COLOR; // Set default color if needed (table option > inherit from Slide > default to black)
2336+
// NOTE: dont add default color on tables with hyperlinks! (it causes any textObj's with hyperlinks to have subsequent words to be black)
2337+
if (JSON.stringify({ arrRows: arrRows }).indexOf('hyperlink') === -1) {
2338+
if (!opt.color)
2339+
opt.color = opt.color || DEF_FONT_COLOR; // Set default color if needed (table option > inherit from Slide > default to black)
2340+
}
23382341
if (typeof opt.border === 'string') {
23392342
console.warn('addTable `border` option must be an object. Ex: `{border: {type:\'none\'}}`');
23402343
opt.border = null;
@@ -2486,7 +2489,7 @@ function addTableDefinition(target, tableRows, options, slideLayout, presLayout,
24862489
// Create hyperlink rels (IMPORTANT: Wait until table has been shredded across Slides or all rels will end-up on Slide 1!)
24872490
createHyperlinkRels(newSlide, slide.rows);
24882491
// Add rows to new slide
2489-
newSlide.addTable(slide.rows, JSON.parse(JSON.stringify(opt || {})));
2492+
newSlide.addTable(slide.rows, Object.assign({}, opt));
24902493
// Add reference to the new slide so it can be returned, but don't add the first one because the user already has a reference to that one.
24912494
if (idx > 0)
24922495
newAutoPagedSlides.push(newSlide);
@@ -2695,7 +2698,7 @@ function createHyperlinkRels(target, text, options) {
26952698
textObjs.forEach((text, idx) => {
26962699
// IMPORTANT: `options` are lost due to recursion/copy!
26972700
if (options && options[idx])
2698-
text.options = options[idx];
2701+
text.options = Object.assign(Object.assign({}, text.options), options[idx]);
26992702
// NOTE: `text` can be an array of other `text` objects (table cell word-level formatting), continue parsing using recursion
27002703
if (Array.isArray(text)) {
27012704
const cellOpts = [];
@@ -6780,7 +6783,7 @@ function makeXmlViewProps() {
67806783
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
67816784
* SOFTWARE.
67826785
*/
6783-
const VERSION = '4.0.1-beta.0';
6786+
const VERSION = '4.0.1-beta.1';
67846787
class PptxGenJS {
67856788
set layout(value) {
67866789
const newLayout = this.LAYOUTS[value];

dist/pptxgen.min.js

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

dist/pptxgen.min.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.

src/pptxgen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ import * as genMedia from './gen-media'
9898
import * as genTable from './gen-tables'
9999
import * as genXml from './gen-xml'
100100

101-
const VERSION = '4.0.1-beta.0'
101+
const VERSION = '4.0.1-beta.1'
102102

103103
export default class PptxGenJS implements IPresentationProps {
104104
// Property getters/setters

0 commit comments

Comments
 (0)