Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bamboo/better error handling for media assets #1310

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
a956b7f
add .nvmrc
tjinauyeung Jul 25, 2022
7134a2a
allow file extension to be passed
tjinauyeung Jul 25, 2022
d5ca25a
Merge pull request #1 from pitch-io/fix-image-extension-to-be-passed
tjinauyeung Jul 26, 2022
1b743fb
support gradients for slide background
tjinauyeung Jul 26, 2022
f0b2cac
Merge pull request #2 from pitch-io/add-gradients
tjinauyeung Jul 27, 2022
098c5b3
use regex to determine file extension
tjinauyeung Jul 27, 2022
395e31c
ship commit 098c5b3e497b8513d95f4cdc844383e8e4d59b1c
tjinauyeung Jul 27, 2022
3c84a1f
Merge pull request #3 from pitch-io/use-regex-to-get-file-extension
tjinauyeung Jul 27, 2022
28e91ff
Add optional shadow opts to image
pastafari Aug 2, 2022
2339e1b
Write shadow xml to pic el
pastafari Aug 2, 2022
abf20ba
Last experiment for the day
pastafari Aug 2, 2022
ac32aaa
Update README
Aug 4, 2022
e5e8bfa
Apply changes from review
Aug 4, 2022
279b909
Update warning message
Aug 4, 2022
3bdb364
Merge pull request #4 from pitch-io/pitch-io/add-shadow-opts-to-image
Aug 4, 2022
7f8242b
fix vulnerabilities: override versions for nested dependencies
tjinauyeung Aug 9, 2022
c833913
Add support for image overlay
Aug 9, 2022
e717af3
Build js artifacts
Aug 9, 2022
5155993
Fix formatting
Aug 9, 2022
6d91ac8
Change blend mode
Aug 9, 2022
55c36ab
Merge pull request #6 from pitch-io/force-versions-for-vulnerable-nes…
tjinauyeung Aug 9, 2022
7e31e2f
Refactor
Aug 9, 2022
754d4e2
Separate solidFill and fillOverlay and add validation
Aug 10, 2022
b374bc4
Rebuild js artifacts
Aug 10, 2022
0f5422c
Merge pull request #7 from pitch-io/add-image-overlay
Aug 10, 2022
0eac3d6
Fix shadow bug for types 'inner' and 'none'
Aug 11, 2022
26fdfb2
Update demos
Aug 11, 2022
11cc1f7
Merge pull request #10 from pitch-io/fix-shadow
Aug 11, 2022
10456f6
Update dist
Aug 11, 2022
b741f95
Merge pull request #11 from pitch-io/update-dist
Aug 11, 2022
f064925
Support image blur
Aug 11, 2022
5f02ebc
Update js artifacts
Aug 12, 2022
7b2afbe
Clarify docstrings
Aug 12, 2022
8443c18
Update dist files
Aug 12, 2022
78c31fc
Merge pull request #12 from pitch-io/add-image-blur
Aug 12, 2022
cffe117
add `addFonts` method
tjinauyeung Aug 24, 2022
6704259
Merge pull request #14 from pitch-io/switch/add-font-face-2
tjinauyeung Aug 29, 2022
e9c9a13
remove spaces
zarkone Aug 31, 2022
76ea14d
ship
zarkone Aug 31, 2022
8a2e98b
Merge pull request #15 from pitch-io/switch/fntdata-remove-spaces
tjinauyeung Sep 2, 2022
99a8b65
only override missing props on the text run, not just falsey ones
sam-pitch Sep 12, 2022
5898919
Merge pull request #16 from pitch-io/switch/inline-bold-text
sam-pitch Sep 13, 2022
86f443c
add pie chart explosion opt to charts
sam-pitch Oct 10, 2022
ea844bf
add number check on explosion
sam-pitch Oct 11, 2022
647b102
Merge pull request #17 from pitch-io/samuel/swi-221-chart-pie-options
sam-pitch Oct 11, 2022
74129d2
return file size from writeFile fn
tjinauyeung Nov 1, 2022
41d5439
Merge pull request #18 from pitch-io/return-file-size
tjinauyeung Nov 7, 2022
6359dd2
support transparency for table borders
tjinauyeung Nov 7, 2022
60c57ca
increment Rids correctly for SVGs
sam-pitch Nov 8, 2022
2f5f4f6
Merge pull request #19 from pitch-io/support-alpha-channel-for-table
tjinauyeung Nov 8, 2022
efb3d3d
Merge pull request #21 from pitch-io/samuel/swi-335-bug-svg-image-hyp…
sam-pitch Nov 10, 2022
7652771
remove invalid docstring
tjinauyeung Nov 10, 2022
20cabc8
Merge pull request #22 from pitch-io/fix-warnings
tjinauyeung Nov 11, 2022
3a054ac
add ex info to reject string
sam-pitch Dec 8, 2022
0f13282
Merge pull request #24 from pitch-io/samuel/swi-405-bugsnag-critical-…
sam-pitch Dec 9, 2022
69613a5
using Promise.allSettled instead of Promise.all and displaying blank …
urielSilva Dec 5, 2023
2f955e9
adding dist files
urielSilva Dec 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,12 @@ If you find this library useful, please consider sponsoring us through a [donati
Copyright © 2015-present [Brent Ely](https://github.com/gitbrent/PptxGenJS)

[MIT](https://github.com/gitbrent/PptxGenJS/blob/master/LICENSE)

---

# How to run your branch locally

- Make sure you are using the correct node version (Check .nvmrc file)
- Run the command `npm run ship` to bundle your changes
- On your terminal, `cd` into `demos` folder then run `node browser_server.mjs`
- Open [http://localhost:8000/browser/index.html](http://localhost:8000/browser/index.html) on your browser and test your changes in the sandbox
8 changes: 8 additions & 0 deletions demos/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,14 @@ <h6 class="text-primary">Slide 4: Source URLs</h6>
<li>Source: URL variables</li>
</ul>
</div>
<div class="col">
<h6 class="text-primary">Slide 5: Image Shadows</h6>
<ul class="mb-0">
<li>Type: Outer</li>
<li>Type: None</li>
<li>Type: Inner</li>
</ul>
</div>
</div>
</div>
<div class="card-footer text-center">
Expand Down
4 changes: 2 additions & 2 deletions demos/browser/js/pptxgen.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demos/browser/js/pptxgen.bundle.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demos/modules/demo_chart.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,7 @@ function genSlide12(pptx) {
dataLabelColor: "FFFFFF",
dataLabelFontSize: 14,
dataLabelPosition: "bestFit", // 'bestFit' | 'outEnd' | 'inEnd' | 'ctr'
chartPieExplosion: 50
});

// TOP-MIDDLE
Expand Down
27 changes: 27 additions & 0 deletions demos/modules/demo_image.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function genSlides_Image(pptx) {
genSlide02(pptx);
genSlide03(pptx);
genSlide04(pptx);
genSlide05(pptx);
}

/**
Expand Down Expand Up @@ -279,3 +280,29 @@ function genSlide04(pptx) {
);
slide.addImage({ path: IMAGE_PATHS.sydneyBridge.path, x: 0.5, y: 5.16, h: 1.8, w: 12.33 });
}

/**
* SLIDE 5: Image Shadow
* @param {PptxGenJS} pptx
*/
function genSlide05(pptx) {
let slide = pptx.addSlide({ sectionTitle: "Images" });

slide.addTable([[{ text: "Image Examples: Shadows", options: BASE_TEXT_OPTS_L }, BASE_TEXT_OPTS_R]], BASE_TABLE_OPTS);
slide.addNotes("API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-images.html");
slide.slideNumber = { x: "50%", y: "95%", w: 1, h: 1, color: COLOR_BLUE };

// EXAMPLES

// OUTER SHADOW
slide.addText("Shadow: `type:outer`, `opacity:0.5`, `blur:20`, `color:000000`, `offset:20`, `angle:270`", { x: 0.5, y: 0.6, w: 6.0, h: 0.3, color: COLOR_BLUE });
slide.addImage({ path: IMAGE_PATHS.tokyoSubway.path, x: 0.78, y: 2.46, w: 3.3, h: 2, shadow: {type: 'outer', opacity: 0.5, blur: 20, color: '000000', offset: 20, angle: 270} });

// NO SHADOW
slide.addText("Shadow: `type:none`", { x: 5, y: 1.2, w: 6.0, h: 0.3, color: COLOR_BLUE });
slide.addImage({ path: IMAGE_PATHS.tokyoSubway.path, x: 4.52, y: 2.46, w: 3.3, h: 2, shadow: {type: 'none'} });

// INNER SHADOW
slide.addText("Shadow: `type:inner`, `opacity:1`, `blur:20`, `color:000000`, `offset:20`, `angle:270`", { x: 8, y: 0.6, w: 6.0, h: 0.3, color: COLOR_BLUE });
slide.addImage({ path: IMAGE_PATHS.tokyoSubway.path, x: 8.42, y: 2.46, w: 3.3, h: 2, shadow: {type: 'inner', opacity: 1, blur: 20, color: '000000', offset: 20, angle: 270} });
}
4 changes: 2 additions & 2 deletions dist/pptxgen.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pptxgen.bundle.js.map

Large diffs are not rendered by default.

7,804 changes: 4,036 additions & 3,768 deletions dist/pptxgen.cjs.js

Large diffs are not rendered by default.

7,804 changes: 4,036 additions & 3,768 deletions dist/pptxgen.es.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/pptxgen.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pptxgen.min.js.map

Large diffs are not rendered by default.

Loading