1
+ 'use strict' ;
2
+
3
+ Object . defineProperty ( exports , "__esModule" , {
4
+ value : true
5
+ } ) ;
6
+
1
7
var _typeof = typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ? function ( obj ) { return typeof obj ; } : function ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ;
2
8
3
9
var _createClass = function ( ) { function defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } } return function ( Constructor , protoProps , staticProps ) { if ( protoProps ) defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) defineProperties ( Constructor , staticProps ) ; return Constructor ; } ; } ( ) ;
4
10
11
+ var _react = require ( 'react' ) ;
12
+
13
+ var _react2 = _interopRequireDefault ( _react ) ;
14
+
15
+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
16
+
5
17
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
6
18
7
19
function _possibleConstructorReturn ( self , call ) { if ( ! self ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return call && ( typeof call === "object" || typeof call === "function" ) ? call : self ; }
8
20
9
21
function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function, not " + typeof superClass ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , enumerable : false , writable : true , configurable : true } } ) ; if ( superClass ) Object . setPrototypeOf ? Object . setPrototypeOf ( subClass , superClass ) : subClass . __proto__ = superClass ; }
10
22
11
- import React , { Component , PropTypes } from 'react' ;
12
-
13
23
require ( 'pdfjs-dist/web/compatibility' ) ;
14
24
require ( 'pdfjs-dist/build/pdf' ) ;
15
25
PDFJS . workerSrc = require ( 'pdfjs-dist/build/pdf.worker.js' ) ;
@@ -219,7 +229,7 @@ var ReactPDF = function (_Component) {
219
229
} , {
220
230
key : 'renderNoData' ,
221
231
value : function renderNoData ( ) {
222
- return React . createElement (
232
+ return _react2 . default . createElement (
223
233
'div' ,
224
234
null ,
225
235
this . props . noData
@@ -228,7 +238,7 @@ var ReactPDF = function (_Component) {
228
238
} , {
229
239
key : 'renderError' ,
230
240
value : function renderError ( ) {
231
- return React . createElement (
241
+ return _react2 . default . createElement (
232
242
'div' ,
233
243
null ,
234
244
this . props . error
@@ -237,7 +247,7 @@ var ReactPDF = function (_Component) {
237
247
} , {
238
248
key : 'renderLoader' ,
239
249
value : function renderLoader ( ) {
240
- return React . createElement (
250
+ return _react2 . default . createElement (
241
251
'div' ,
242
252
null ,
243
253
this . props . loading
@@ -266,7 +276,7 @@ var ReactPDF = function (_Component) {
266
276
return this . renderLoader ( ) ;
267
277
}
268
278
269
- return React . createElement ( 'canvas' , {
279
+ return _react2 . default . createElement ( 'canvas' , {
270
280
ref : function ref ( _ref2 ) {
271
281
if ( ! _ref2 ) return ;
272
282
@@ -311,7 +321,7 @@ var ReactPDF = function (_Component) {
311
321
} ] ) ;
312
322
313
323
return ReactPDF ;
314
- } ( Component ) ;
324
+ } ( _react . Component ) ;
315
325
316
326
var _initialiseProps = function _initialiseProps ( ) {
317
327
var _this4 = this ;
@@ -414,7 +424,7 @@ var _initialiseProps = function _initialiseProps() {
414
424
} ;
415
425
} ;
416
426
417
- export default ReactPDF ;
427
+ exports . default = ReactPDF ;
418
428
419
429
420
430
ReactPDF . defaultProps = {
@@ -426,21 +436,21 @@ ReactPDF.defaultProps = {
426
436
} ;
427
437
428
438
ReactPDF . propTypes = {
429
- error : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
430
- file : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( File ) , PropTypes . instanceOf ( Blob ) , PropTypes . shape ( {
431
- data : PropTypes . object ,
432
- httpHeaders : PropTypes . object ,
433
- range : PropTypes . object ,
434
- url : PropTypes . string
439
+ error : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . node ] ) ,
440
+ file : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . instanceOf ( File ) , _react . PropTypes . instanceOf ( Blob ) , _react . PropTypes . shape ( {
441
+ data : _react . PropTypes . object ,
442
+ httpHeaders : _react . PropTypes . object ,
443
+ range : _react . PropTypes . object ,
444
+ url : _react . PropTypes . string
435
445
} ) ] ) ,
436
- loading : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
437
- noData : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
438
- onDocumentError : PropTypes . func ,
439
- onDocumentLoad : PropTypes . func ,
440
- onPageError : PropTypes . func ,
441
- onPageLoad : PropTypes . func ,
442
- onPageRender : PropTypes . func ,
443
- pageIndex : PropTypes . number ,
444
- scale : PropTypes . number ,
445
- width : PropTypes . number
446
+ loading : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . node ] ) ,
447
+ noData : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . node ] ) ,
448
+ onDocumentError : _react . PropTypes . func ,
449
+ onDocumentLoad : _react . PropTypes . func ,
450
+ onPageError : _react . PropTypes . func ,
451
+ onPageLoad : _react . PropTypes . func ,
452
+ onPageRender : _react . PropTypes . func ,
453
+ pageIndex : _react . PropTypes . number ,
454
+ scale : _react . PropTypes . number ,
455
+ width : _react . PropTypes . number
446
456
} ;
0 commit comments