Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

document-viewer-ts

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

document-viewer-ts - npm Package Compare versions

Comparing version 0.5.1-legacy to 0.5.2-legacy

11

dist/es2015/base.js

@@ -48,4 +48,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

export const renderPDF = (containerDiv, documentUrl) => __awaiter(void 0, void 0, void 0, function* () {
const wrapperDiv = document.createElement('div');
wrapperDiv.className = 'wrapper';
containerDiv.appendChild(wrapperDiv);
const loadingIndicator = createLoadingIndicator();
containerDiv.appendChild(loadingIndicator);
wrapperDiv.appendChild(loadingIndicator);
const documentId = containerDiv.id;

@@ -85,3 +88,3 @@ const canvasContainer = document.createElement('div');

const pdfDocument = yield loadingTask.promise;
containerDiv.removeChild(loadingIndicator);
wrapperDiv.removeChild(loadingIndicator);
const isValidPage = (page) => page <= pdfDocument.numPages && page > 0;

@@ -113,3 +116,3 @@ // initial viewer setup

prevButton.innerHTML = chevronLeft;
containerDiv.appendChild(controlsDiv);
wrapperDiv.appendChild(controlsDiv);
controlsDiv.appendChild(prevButton);

@@ -119,3 +122,3 @@ controlsDiv.appendChild(fullPageNumberDiv);

controlsDiv.appendChild(zoomSelect);
containerDiv.appendChild(canvasContainer);
wrapperDiv.appendChild(canvasContainer);
const displayPage = (page, scale) => __awaiter(void 0, void 0, void 0, function* () {

@@ -122,0 +125,0 @@ pageNumberInput.value = `${page}`;

@@ -51,4 +51,7 @@ "use strict";

const renderPDF = (containerDiv, documentUrl) => __awaiter(void 0, void 0, void 0, function* () {
const wrapperDiv = document.createElement('div');
wrapperDiv.className = 'wrapper';
containerDiv.appendChild(wrapperDiv);
const loadingIndicator = createLoadingIndicator();
containerDiv.appendChild(loadingIndicator);
wrapperDiv.appendChild(loadingIndicator);
const documentId = containerDiv.id;

@@ -88,3 +91,3 @@ const canvasContainer = document.createElement('div');

const pdfDocument = yield loadingTask.promise;
containerDiv.removeChild(loadingIndicator);
wrapperDiv.removeChild(loadingIndicator);
const isValidPage = (page) => page <= pdfDocument.numPages && page > 0;

@@ -116,3 +119,3 @@ // initial viewer setup

prevButton.innerHTML = chevronLeft;
containerDiv.appendChild(controlsDiv);
wrapperDiv.appendChild(controlsDiv);
controlsDiv.appendChild(prevButton);

@@ -122,3 +125,3 @@ controlsDiv.appendChild(fullPageNumberDiv);

controlsDiv.appendChild(zoomSelect);
containerDiv.appendChild(canvasContainer);
wrapperDiv.appendChild(canvasContainer);
const displayPage = (page, scale) => __awaiter(void 0, void 0, void 0, function* () {

@@ -125,0 +128,0 @@ pageNumberInput.value = `${page}`;

{
"name": "document-viewer-ts",
"version": "0.5.1-legacy",
"version": "0.5.2-legacy",
"description": "PDF and MS Doc viewer written in TypeScript for React and vanilla JavaScript",

@@ -5,0 +5,0 @@ "main": "dist/lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc