@syncfusion/ej2-react-pdfviewer
Version:
Essential JS 2 PDF viewer Component for React
39 lines (36 loc) • 1.26 kB
JavaScript
import { createElement, Component } from 'react';
import { PdfViewer } from '@syncfusion/ej2-pdfviewer';
export * from '@syncfusion/ej2-pdfviewer';
import { applyMixins, ComponentBase } from '@syncfusion/ej2-react-base';
export { Inject } from '@syncfusion/ej2-react-base';
/**
* `Represents the react PdfViewer Component.
* ```tsx
* <PdfViewerComponent />
* ```
*/
class PdfViewerComponent extends PdfViewer {
constructor(props) {
super(props);
this.initRenderCalled = false;
this.checkInjectedModules = true;
this.statelessTemplateProps = null;
this.templateProps = null;
this.immediateRender = true;
this.isReactMock = true;
this.portals = [];
}
render() {
this.isReactMock = false;
if (((this.element && !this.initRenderCalled) || this.refreshing) && !this.isReactForeceUpdate) {
super.render();
this.initRenderCalled = true;
}
else {
return createElement('div', this.getDefaultAttributes(), [].concat(this.props.children, this.portals));
}
}
}
applyMixins(PdfViewerComponent, [ComponentBase, Component]);
export { PdfViewerComponent };
//# sourceMappingURL=ej2-react-pdfviewer.es2015.js.map