Skip to content

Commit 29fd590

Browse files
committed
Merge branch 'dev'
2 parents a8ae64b + 2667d99 commit 29fd590

18 files changed

Lines changed: 5734 additions & 4468 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ jspm_packages
4040
.DS_Store
4141

4242
# Ignore config
43-
.vscode
43+
.vscode
44+
45+
# local history
46+
.history

dist/pdf-viewer-reactjs.js

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

example/package-lock.json

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

example/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
"dependencies": {
77
"bootstrap": "^4.4.1",
88
"pdf-viewer-reactjs": "file:..",
9-
"react": "^16.12.0",
10-
"react-dom": "^16.12.0"
9+
"react": "^16.13.1",
10+
"react-dom": "^16.13.1"
1111
},
1212
"devDependencies": {
13-
"gh-pages": "^2.1.1",
14-
"react-scripts": "^3.3.0"
13+
"gh-pages": "^2.2.0",
14+
"react-scripts": "^3.4.1"
1515
},
1616
"scripts": {
17-
"start": "GENERATE_SOURCEMAP=false react-scripts start",
18-
"build": "GENERATE_SOURCEMAP=false react-scripts build",
17+
"start": "react-scripts start",
18+
"build": "react-scripts build",
1919
"test": "react-scripts test --env=jsdom",
2020
"predeploy": "npm run build",
2121
"deploy": "gh-pages -d build"

example/src/App.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
cursor: pointer;
1515
display: inline-block;
1616
margin: 0;
17-
width: 48px;
17+
width: auto;
1818
color: #fa5b35;
1919
background-color: #f3f3f3;
2020
border-color: #fa5b35;
@@ -26,7 +26,7 @@
2626
cursor: pointer;
2727
display: inline-block;
2828
margin: 0;
29-
width: 48px;
29+
width: auto;
3030
color: #fa5b35;
3131
background-color: #f3f3f3;
3232
border-color: #333333;
@@ -38,7 +38,7 @@
3838
cursor: pointer;
3939
display: inline-block;
4040
margin: 0;
41-
width: 48px;
41+
width: auto;
4242
color: #45fa35;
4343
background-color: #f3f3f3;
4444
border-color: #45fa35;
@@ -47,8 +47,8 @@
4747
border-radius: 6px;
4848
}
4949
.customPages {
50-
display: inline-block;
51-
width: calc(100% - 2 * 50px);
50+
font-size: medium;
51+
margin: 0.5rem;
5252
}
5353
.customWrapper {
5454
height: 40px;

package-lock.json

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

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@
3636
"react-dom": ">=16.8.6"
3737
},
3838
"devDependencies": {
39-
"@babel/core": "^7.7.7",
40-
"@babel/preset-env": "^7.7.7",
41-
"@babel/preset-react": "^7.7.4",
39+
"@babel/core": "^7.9.0",
40+
"@babel/preset-env": "^7.9.0",
41+
"@babel/preset-react": "^7.9.4",
4242
"eslint": "^6.8.0",
43-
"eslint-config-prettier": "^6.7.0",
44-
"eslint-plugin-import": "^2.19.1",
43+
"eslint-config-prettier": "^6.10.1",
44+
"eslint-plugin-import": "^2.20.1",
4545
"eslint-plugin-jsx-a11y": "^6.2.3",
4646
"eslint-plugin-prettier": "^3.1.2",
47-
"eslint-plugin-react": "^7.17.0",
47+
"eslint-plugin-react": "^7.19.0",
4848
"eslint-plugin-react-hooks": "^1.7.0",
4949
"husky": "^3.1.0",
5050
"prettier": "^1.19.1",
51-
"rollup": "^1.27.13",
52-
"rollup-plugin-babel": "^4.3.3",
51+
"rollup": "^1.32.1",
52+
"rollup-plugin-babel": "^4.4.0",
5353
"rollup-plugin-uglify": "^6.0.4"
5454
},
5555
"dependencies": {
56-
"bulma": "^0.8.0",
57-
"bulma-helpers": "^0.3.8",
56+
"bulma": "^0.8.1",
57+
"bulma-helpers": "^0.3.10",
5858
"material-design-icons": "^3.0.1",
59-
"pdfjs-dist": "^2.2.228",
59+
"pdfjs-dist": "^2.3.200",
6060
"prop-types": "^15.7.2"
6161
},
6262
"husky": {

src/components/Alert.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ import React from 'react'
22
import PropTypes from 'prop-types'
33

44
const Alert = ({ message }) => (
5-
<div className='columns has-text-danger has-margin-top-5'>
5+
<div className='columns has-text-danger has-margin-top-5 is-mobile'>
66
<div className='column is-4 has-text-right has-padding-5'>
7-
<i className='material-icons'>error_outline</i>
7+
<span className='icon'>
8+
<i className='material-icons'>error_outline</i>
9+
</span>
810
</div>
911
<div className='column is-8 has-text-left has-padding-5'>
1012
<small>{message}</small>

src/components/NavigationBar.js

Lines changed: 66 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -32,82 +32,74 @@ const Navigation = ({
3232
}) => {
3333
return (
3434
<div
35-
className={
36-
css.navbarWrapper ||
37-
'container box has-height-50 is-marginless has-padding-top-10 has-text-white has-background-black'
38-
}>
39-
<div className='columns is-gapless'>
40-
<div className='column is-4'>
41-
{hideZoom ? (
42-
undefined
43-
) : (
44-
<div className='buttons are-small'>
45-
<ZoomOut
46-
scale={scale}
47-
minScale={minScale}
48-
css={css.zoomOutBtn}
49-
handleZoomOut={handleZoomOut}
50-
/>
51-
<ResetZoom
52-
scale={scale}
53-
defaultScale={defaultScale}
54-
css={css.resetZoomBtn}
55-
handleResetZoom={handleResetZoom}
56-
/>
57-
<ZoomIn
58-
scale={scale}
59-
maxScale={maxScale}
60-
css={css.zoomInBtn}
61-
handleZoomIn={handleZoomIn}
62-
/>
63-
</div>
64-
)}
65-
</div>
66-
<div className='column is-4'>
67-
<div className='buttons are-small'>
68-
<PreviousPageButton
69-
css={css.previousPageBtn}
70-
page={page}
71-
pages={pages}
72-
handlePrevClick={handlePrevClick}
73-
/>
74-
<PagesIndicator
75-
css={css.pageIndicator}
76-
page={page}
77-
pages={pages}
78-
/>
79-
<NextPageButton
80-
css={css.nextPageBtn}
81-
page={page}
82-
pages={pages}
83-
handleNextClick={handleNextClick}
84-
/>
85-
</div>
86-
</div>
87-
<div className='column is-4'>
88-
{hideRotation ? (
89-
undefined
90-
) : (
91-
<div className='buttons are-small'>
92-
<RotateLeft
93-
css={css.rotateLeftBtn}
94-
rotationAngle={rotationAngle}
95-
handleRotateLeft={handleRotateLeft}
96-
/>
97-
<ResetRotation
98-
css={css.resetRotationBtn}
99-
rotationAngle={rotationAngle}
100-
handleResetRotation={handleResetRotation}
101-
/>
102-
<RotateRight
103-
css={css.rotateRightBtn}
104-
rotationAngle={rotationAngle}
105-
handleRotateRight={handleRotateRight}
106-
/>
107-
</div>
108-
)}
35+
className={`columns is-gapless ${css.navbarWrapper ||
36+
'box is-mobile has-text-white has-background-black has-margin-top-15 has-margin-bottom-15'}`}>
37+
{hideZoom ? (
38+
<div className='column is-3'></div>
39+
) : (
40+
<div className='column is-3 buttons are-small has-addons'>
41+
<ZoomOut
42+
scale={scale}
43+
minScale={minScale}
44+
css={css.zoomOutBtn}
45+
handleZoomOut={handleZoomOut}
46+
/>
47+
<ResetZoom
48+
scale={scale}
49+
defaultScale={defaultScale}
50+
css={css.resetZoomBtn}
51+
handleResetZoom={handleResetZoom}
52+
/>
53+
<ZoomIn
54+
scale={scale}
55+
maxScale={maxScale}
56+
css={css.zoomInBtn}
57+
handleZoomIn={handleZoomIn}
58+
/>
10959
</div>
60+
)}
61+
<div className='column is-1'></div>
62+
<div className='column is-4 buttons are-small has-addons is-centered'>
63+
<PreviousPageButton
64+
css={css.previousPageBtn}
65+
page={page}
66+
pages={pages}
67+
handlePrevClick={handlePrevClick}
68+
/>
69+
<PagesIndicator
70+
css={css.pageIndicator}
71+
page={page}
72+
pages={pages}
73+
/>
74+
<NextPageButton
75+
css={css.nextPageBtn}
76+
page={page}
77+
pages={pages}
78+
handleNextClick={handleNextClick}
79+
/>
11080
</div>
81+
<div className='column is-1'></div>
82+
{hideRotation ? (
83+
<div className='column is-3'></div>
84+
) : (
85+
<div className='column is-3 buttons are-small has-addons is-right'>
86+
<RotateLeft
87+
css={css.rotateLeftBtn}
88+
rotationAngle={rotationAngle}
89+
handleRotateLeft={handleRotateLeft}
90+
/>
91+
<ResetRotation
92+
css={css.resetRotationBtn}
93+
rotationAngle={rotationAngle}
94+
handleResetRotation={handleResetRotation}
95+
/>
96+
<RotateRight
97+
css={css.rotateRightBtn}
98+
rotationAngle={rotationAngle}
99+
handleRotateRight={handleRotateRight}
100+
/>
101+
</div>
102+
)}
111103
</div>
112104
)
113105
}

src/components/navigationComponents/NextPageButton.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
22
import PropTypes from 'prop-types'
33

44
const NextPageButton = ({ css, page, pages, handleNextClick }) => {
5-
const nextClass = css || 'button is-black'
5+
const nextClass = css || 'button is-black is-marginless'
66

77
const [state, setState] = useState(false)
88

@@ -17,14 +17,18 @@ const NextPageButton = ({ css, page, pages, handleNextClick }) => {
1717
if (state || page === pages) {
1818
return (
1919
<button className={nextClass} disabled>
20-
<i className='material-icons'>keyboard_arrow_right</i>
20+
<span className='icon is-small'>
21+
<i className='material-icons'>keyboard_arrow_right</i>
22+
</span>
2123
</button>
2224
)
2325
}
2426

2527
return (
2628
<button className={nextClass} onClick={handleClick} disabled={state}>
27-
<i className='material-icons'>keyboard_arrow_right</i>
29+
<span className='icon is-small'>
30+
<i className='material-icons'>keyboard_arrow_right</i>
31+
</span>
2832
</button>
2933
)
3034
}

0 commit comments

Comments
 (0)