File tree 3 files changed +4730
-4331
lines changed 3 files changed +4730
-4331
lines changed Original file line number Diff line number Diff line change 77
77
"style-loader" : " ^1.2.1" ,
78
78
"url-loader" : " ^4.1.0" ,
79
79
"webpack" : " ^5.75.0" ,
80
- "webpack-bundle-analyzer" : " ^4.10.2 " ,
81
- "webpack-cli" : " ^5.1.4 " ,
82
- "webpack-dev-server" : " ^5.0.4 "
80
+ "webpack-bundle-analyzer" : " ^3.8.0 " ,
81
+ "webpack-cli" : " ^3.3.12 " ,
82
+ "webpack-dev-server" : " ^3.11.0 "
83
83
},
84
84
"dependencies" : {
85
- "pdfjs-dist" : " ^4.2.67 " ,
85
+ "pdfjs-dist" : " 1.8.357 " ,
86
86
"prop-types" : " ^15.5.10" ,
87
87
"react-visibility-sensor" : " ^5.0.2" ,
88
88
"sass" : " ^1.77.2" ,
Original file line number Diff line number Diff line change 2
2
3
3
import React from 'react'
4
4
import VisibilitySensor from 'react-visibility-sensor'
5
- import * as PDFJS from 'pdfjs-dist'
5
+ import { PDFJS } from 'pdfjs-dist/build/pdf.combined'
6
+ import 'pdfjs-dist/web/compatibility'
6
7
7
8
const INCREASE_PERCENTAGE = 0.2
8
9
const DEFAULT_SCALE = 1.1
9
10
// eslint-disable-next-line no-import-assign
10
11
PDFJS . isEvalSupported = false // DO NOT REMOVE THIS LINE OR ADJUST THE BOOLEAN VALUE ELSEWHERE IN THE CODE. This is a temporary workaround for https://github.com/transcom/mymove/security/dependabot/146
12
+ PDFJS . disableWorker = true
11
13
12
14
export class PDFPage extends React . Component {
13
15
constructor ( props ) {
@@ -181,19 +183,22 @@ export default class PDFDriver extends React.Component {
181
183
< button
182
184
type = "button"
183
185
className = "view-control"
184
- onClick = { this . increaseZoom } >
186
+ onClick = { this . increaseZoom }
187
+ >
185
188
< i className = "zoom-in" />
186
189
</ button >
187
190
< button
188
191
type = "button"
189
192
className = "view-control"
190
- onClick = { this . resetZoom } >
193
+ onClick = { this . resetZoom }
194
+ >
191
195
< i className = "zoom-reset" />
192
196
</ button >
193
197
< button
194
198
type = "button"
195
199
className = "view-control"
196
- onClick = { this . reduceZoom } >
200
+ onClick = { this . reduceZoom }
201
+ >
197
202
< i className = "zoom-out" />
198
203
</ button >
199
204
</ div >
You can’t perform that action at this time.
0 commit comments