Skip to content

Commit

Permalink
updated for v3.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbrent committed Mar 31, 2021
1 parent 6496f07 commit b771d1c
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 40 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Notes]

## [3.5.0] - 2021-04-??
## [3.5.0] - 2021-03-30
### Release Summary
- write()/writeFile() now take a props object as their argument (`WriteProps`/`WriteFileProps`)
- write()/writeFile() method string arguments are deprecated - props object in now the sole arg (`WriteProps`/`WriteFileProps`)
### Added
- Enabled JSZip compression [\#713](https://github.com/gitbrent/PptxGenJS/issues/713) ([pimlottc-gov](https://github.com/pimlottc-gov))
- Soft line break property: `softBreakBefore` [\#806](https://github.com/gitbrent/PptxGenJS/pull/806) ([memorsolutions](https://github.com/memorsolutions))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ Use the online demo to create a simple presentation to see how easy it is to use
Bundle: Modern Browsers and IE11

```html
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@3.4.0/dist/pptxgen.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@3.5.0/dist/pptxgen.bundle.js"></script>
```

Min files: Modern Browsers

```html
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@3.4.0/libs/jszip.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@3.4.0/dist/pptxgen.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@3.5.0/libs/jszip.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@3.5.0/dist/pptxgen.min.js"></script>
```

## Download
Expand Down
14 changes: 7 additions & 7 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ $ npm run demo-stream
### React/TypeScript Test

1. Ensure newest `dist/pptxgen.es.js` and `types/index.d.ts` under local node_modules
2. Update `demos/react-demo/package.json` version
3. Open `demos/react-demo/src/tstest/Test.tsx`
4. Check existing code
5. Test defs by using auto-complete, "pptxgen.ChartType." etc.
2. Note: Any updates to `node_modules/dist/pptxgen.es.js` are not picked up by the server (ctrl-C and restart)
3. Update `demos/react-demo/package.json` version
4. Open `demos/react-demo/src/tstest/Test.tsx`
5. Check existing code
6. Test defs by using auto-complete, "pptxgen.ChartType." etc.

```bash
$ cd ~/GitHub/PptxGenJS/demos/react-demo
Expand All @@ -69,9 +70,8 @@ $ cd ~/GitHub/PptxGenJS/demos/react-demo
$ npm run build
```

1. Copy entire "build" folder to Downloads for subsequently updating gh-pages with latest build (DO NOT use the deploy script offered onscreen!)

**NOTE** Any updates to `node_modules/dist/pptxgen.es.js` are not picked up by the server (ctrl-C and restart)
1. Copy entire "build" folder to Downloads for subsequently updating gh-pages with latest build
2. Note: **DO NOT** use the deploy script offered onscreen!

## Release New Version

Expand Down
6 changes: 3 additions & 3 deletions demos/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="author" content="https://github.com/gitbrent">
<meta name="website" content="https://github.com/gitbrent/PptxGenJS/">
<meta name="version" content="3.5.0">
<meta name="updated" content="2021-02-25">
<meta name="updated" content="2021-03-30">
<link rel="icon" href="images/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="images/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="icon" href="images/favicon.png">
Expand Down Expand Up @@ -146,9 +146,9 @@
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@latest/examples/images/base64Images.js" async></script>

<!-- RELEASE (CDN)
-->
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@latest/dist/pptxgen.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@latest/demos/common/demos.js"></script>
-->
<!--
TODO: [only used during `-beta` dev cycles; update to below on release]
<script src="https://cdn.jsdelivr.net/gh/gitbrent/pptxgenjs@master/dist/pptxgen.bundle.js"></script>
Expand All @@ -162,9 +162,9 @@
<!-- LOCAL TESTING:
<script src="../../libs/jszip.min.js"></script>
<script src="../../dist/pptxgen.min.js"></script>
-->
<script src="../../dist/pptxgen.bundle.js"></script>
<script src="../common/demos.js"></script>
-->

<script>
// ==================================================================================================================
Expand Down
4 changes: 2 additions & 2 deletions demos/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pptxgenjs-demos-node",
"version": "3.4.0",
"version": "3.5.0",
"author": {
"name": "Brent Ely",
"url": "https://github.com/gitbrent/"
Expand All @@ -19,6 +19,6 @@
},
"license": "MIT",
"dependencies": {
"pptxgenjs": "^3.3.1"
"pptxgenjs": "^3.5.0"
}
}
4 changes: 2 additions & 2 deletions demos/react-demo/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ slide.addText(
{ x:0, y:5.3, w:'100%', h:0.33, align:'center', fill:{ color:'E1E1E1' }, color:'A1A1A1' }
);
pptx.writeFile("pptxgenjs-demo-react.pptx");`;
pptx.writeFile({ fileName: 'pptxgenjs-demo-react.pptx' });`;

function App() {
function runDemo() {
Expand Down Expand Up @@ -66,7 +66,7 @@ function App() {
color: 'A1A1A1' // pptx.SchemeColor.accent3,
});

pptx.writeFile("pptxgenjs-demo-react.pptx");
pptx.writeFile({ fileName: "pptxgenjs-demo-react.pptx" });
}

return (
Expand Down
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.

4 changes: 2 additions & 2 deletions dist/pptxgen.cjs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* PptxGenJS 3.5.0-beta @ 2021-03-27T22:18:54.581Z */
/* PptxGenJS 3.5.0 @ 2021-03-31T01:29:13.027Z */
'use strict';

var JSZip = require('jszip');
Expand Down Expand Up @@ -6140,7 +6140,7 @@ function createSvgPngPreview(rel) {
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var VERSION = '3.5.0-beta-20210323-2348';
var VERSION = '3.5.0';
var PptxGenJS = /** @class */ (function () {
function PptxGenJS() {
var _this = this;
Expand Down
4 changes: 2 additions & 2 deletions dist/pptxgen.es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* PptxGenJS 3.5.0-beta @ 2021-03-27T22:18:54.647Z */
/* PptxGenJS 3.5.0 @ 2021-03-31T01:29:13.036Z */
import JSZip from 'jszip';

/**
Expand Down Expand Up @@ -6134,7 +6134,7 @@ function createSvgPngPreview(rel) {
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var VERSION = '3.5.0-beta-20210323-2348';
var VERSION = '3.5.0';
var PptxGenJS = /** @class */ (function () {
function PptxGenJS() {
var _this = this;
Expand Down
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pptxgenjs",
"version": "3.5.0-beta",
"version": "3.5.0",
"author": {
"name": "Brent Ely",
"url": "https://github.com/gitbrent/"
Expand Down
2 changes: 1 addition & 1 deletion src/pptxgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ import * as genMedia from './gen-media'
import * as genTable from './gen-tables'
import * as genXml from './gen-xml'

const VERSION = '3.5.0-beta-20210323-2348'
const VERSION = '3.5.0'

export default class PptxGenJS implements IPresentationProps {
// Property getters/setters
Expand Down
62 changes: 53 additions & 9 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,7 @@ declare namespace PptxGenJS {
* @default '666666'
*/
color?: HexColor

// TODO: add `width` - deprecate `pt`
/**
* Border size (points)
Expand Down Expand Up @@ -1253,9 +1254,29 @@ declare namespace PptxGenJS {
* Image height
*/
h: number
/**
* Area horizontal position related to the image
* - Values: 0-n
* - `crop` only
*/
x?: number
/**
* Area vertical position related to the image
* - Values: 0-n
* - `crop` only
*/
y?: number
}
/**
* Flip horizontally?
* @default false
*/
flipH?: boolean
/**
* Flip vertical?
* @default false
*/
flipV?: boolean
}
/**
* Add media (audio/video) to slide
Expand Down Expand Up @@ -1295,12 +1316,12 @@ declare namespace PptxGenJS {
* - In the case of pptx.shapes.BLOCK_ARC you have to setup the arcThicknessRatio
* - values: [0-359, 0-359]
* @since v3.4.0
* @default [0, 270]
* @default [270, 0]
*/
angleRange?: [number, number]
/**
* Radius (only for pptx.shapes.BLOCK_ARC)
* - You have to setup the angleRange values too.
* - You have to setup the angleRange values too
* - values: 0.0-1.0
* @since v3.4.0
* @default 0.5
Expand All @@ -1312,7 +1333,7 @@ declare namespace PptxGenJS {
* @example { color:'pptx.SchemeColor.accent1' } // theme color Accent1
* @example { color:'0088CC', transparency:50 } // 50% transparent color
*/
fill?: Color | ShapeFillProps
fill?: ShapeFillProps
/**
* Flip shape horizontally?
* @default false
Expand Down Expand Up @@ -1379,6 +1400,9 @@ declare namespace PptxGenJS {
// tables =========================================================================================

export interface TableToSlidesProps extends TableProps {
//_arrObjTabHeadRows?: TableRow[]
//_masterSlide?: SlideLayout

/**
* Add an image to slide(s) created during autopaging
*/
Expand Down Expand Up @@ -1490,11 +1514,12 @@ declare namespace PptxGenJS {
colspan?: number
/**
* Fill color
* @example 'FF0000' // hex string (red)
* @example 'pptx.SchemeColor.accent1' // theme color Accent1
* @example { color:'FF0000' } // hex string (red)
* @example { color:'pptx.SchemeColor.accent1' } // theme color Accent1
* @example { color:'0088CC', transparency:50 } // 50% transparent color
* @example { type:'solid', color:'0088CC', alpha:50 } // ShapeFillProps object with 50% transparent
*/
fill?: Color | ShapeFillProps
fill?: ShapeFillProps
/**
* Cell margin
* @default 0
Expand All @@ -1506,6 +1531,8 @@ declare namespace PptxGenJS {
rowspan?: number
}
export interface TableProps extends PositionProps, TextBaseProps {
//_arrObjTabHeadRows?: TableRow[]

/**
* Whether to enable auto-paging
* - auto-paging creates new slides as content overflows a slide
Expand Down Expand Up @@ -1565,6 +1592,9 @@ declare namespace PptxGenJS {
colW?: number | number[]
/**
* Cell background color
* @example { color:'FF0000' } // hex string (red)
* @example { color:'pptx.SchemeColor.accent1' } // theme color Accent1
* @example { color:'0088CC', transparency:50 } // 50% transparent color
*/
fill?: ShapeFillProps
/**
Expand Down Expand Up @@ -1635,7 +1665,13 @@ declare namespace PptxGenJS {
* @default "none"
*/
fit?: 'none' | 'shrink' | 'resize'
fill?: Color | ShapeFillProps
/**
* Shape fill
* @example { color:'FF0000' } // hex string (red)
* @example { color:'pptx.SchemeColor.accent1' } // theme color Accent1
* @example { color:'0088CC', transparency:50 } // 50% transparent color
*/
fill?: ShapeFillProps
/**
* Flip shape horizontally?
* @default false
Expand Down Expand Up @@ -1826,7 +1862,11 @@ declare namespace PptxGenJS {
catAxisTitleRotate?: number
catGridLine?: OptsChartGridLine
catLabelFormatCode?: string
secondaryCatAxis?: boolean
/**
* Whether data should use secondary category axis (instead of primary)
* @default false
*/
secondaryCatAxis?: boolean
showCatAxisTitle?: boolean
}
export interface IChartPropsAxisSer {
Expand All @@ -1853,7 +1893,11 @@ declare namespace PptxGenJS {
showSerAxisTitle?: boolean
}
export interface IChartPropsAxisVal {
secondaryValAxis?: boolean
/**
* Whether data should use secondary value axis (instead of primary)
* @default false
*/
secondaryValAxis?: boolean
showValAxisTitle?: boolean
/**
* Multi-Chart prop: array of val axes
Expand Down

0 comments on commit b771d1c

Please sign in to comment.