Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-pdfviewer

Package Overview
Dependencies
Maintainers
3
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-pdfviewer - npm Package Compare versions

Comparing version 17.1.42 to 17.1.43

38

CHANGELOG.md

@@ -9,2 +9,11 @@ # Changelog

- The Loading Indicator is now shown properly while loading a large page size document.
- The pan interaction mode is now working properly when the toolbar is disabled.
## 17.1.42 (2019-04-23)
### PDF Viewer
#### Bug Fixes
- The issue "the hyperlinkClick event is not triggered for web links" has been fixed.

@@ -53,2 +62,11 @@

#### Bug Fixes
- The PDF document is now rendered properly while using the PDF Viewer inside the Tab control.
- The font size is missing warning will no longer be thrown from styles in the PDF Viewer.
## 17.1.38 (2019-03-29)
### PDF Viewer
#### New Features

@@ -70,2 +88,22 @@

## 17.1.32-beta (2019-03-13)
### PDF Viewer
#### New Features
- Text Markup annotation support has been provided to PDF Viewer.
- Mobile view responsiveness support has been provided.
- Right-to-left support has been provided.
- Accessibility support has been provided to PDF Viewer.
#### Bug Fixes
- The issue “Added PDF document cache element did not maintain properly” has been fixed.
- The issue “PdfRenderer object is not disposing properly in EJ2 PDF Viewer library” has been fixed.
- The issue “PDF Viewer clears all the session storage” has been fixed.
- Resolved the script error while accessing invalid link annotation destination.
- Resolved Single Page Document Rendering issue.
- Document Load event not triggered for lower zoom value issue has been fixed.
## 16.4.55 (2019-02-27)

@@ -72,0 +110,0 @@

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 17.1.42
* version : 17.1.43
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-pdfviewer",
"version": "17.1.42",
"version": "17.1.43",
"description": "Essential JS 2 PDF viewer Component",

@@ -11,9 +11,9 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~17.1.42",
"@syncfusion/ej2-base": "~17.1.43",
"@syncfusion/ej2-buttons": "~17.1.42",
"@syncfusion/ej2-data": "~17.1.42",
"@syncfusion/ej2-dropdowns": "~17.1.42",
"@syncfusion/ej2-dropdowns": "~17.1.43",
"@syncfusion/ej2-inputs": "~17.1.42",
"@syncfusion/ej2-lists": "~17.1.42",
"@syncfusion/ej2-navigations": "~17.1.42",
"@syncfusion/ej2-lists": "~17.1.43",
"@syncfusion/ej2-navigations": "~17.1.43",
"@syncfusion/ej2-notifications": "~17.1.42",

@@ -20,0 +20,0 @@ "@syncfusion/ej2-popups": "~17.1.42"

@@ -55,5 +55,7 @@ import { TextMarkupAnnotation } from '../index';

this.textMarkupAnnotationModule.deleteTextMarkupAnnotation();
if (this.pdfViewer.toolbarModule.annotationToolbarModule) {
this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(false);
this.pdfViewer.toolbarModule.annotationToolbarModule.enableAnnotationPropertiesTools(false);
if (this.pdfViewer.toolbarModule) {
if (this.pdfViewer.toolbarModule.annotationToolbarModule) {
this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(false);
this.pdfViewer.toolbarModule.annotationToolbarModule.enableAnnotationPropertiesTools(false);
}
}

@@ -60,0 +62,0 @@ }

@@ -30,2 +30,3 @@ import { PdfViewer } from '../index';

private isTooltipCreated;
private isThumbnail;
/**

@@ -147,2 +148,6 @@ * @private

private sideToolbarOnClick;
/**
* @private
*/
openThumbnailPane: () => void;
private setThumbnailSelectionIconTheme;

@@ -149,0 +154,0 @@ private removeThumbnailSelectionIconTheme;

@@ -16,2 +16,3 @@ import { createElement, Browser } from '@syncfusion/ej2-base';

this.isTooltipCreated = false;
this.isThumbnail = false;
/**

@@ -157,2 +158,39 @@ * @private

};
/**
* @private
*/
this.openThumbnailPane = function () {
var proxy = _this;
var sideBarContent = document.getElementById(_this.pdfViewer.element.id + '_sideBarContent');
var sideBarContentContainer = document.getElementById(_this.pdfViewer.element.id + '_sideBarContentContainer');
var viewerContainer = document.getElementById(_this.pdfViewer.element.id + '_viewerContainer');
var pageContainer = document.getElementById(_this.pdfViewer.element.id + '_pageViewContainer');
document.getElementById(_this.pdfViewer.element.id + '_thumbnail_view').style.display = 'block';
document.getElementById(_this.pdfViewer.element.id + '_sideBarResizer').style.display = 'none';
document.getElementById(_this.pdfViewer.element.id + '_sideBarTitleContainer').style.display = 'none';
document.getElementById(_this.pdfViewer.element.id + '_sideBarContentSplitter').style.display = 'none';
sideBarContent.classList.add('e-thumbnail');
sideBarContentContainer.classList.add('e-thumbnail');
if (sideBarContentContainer) {
if (proxy.isThumbnail) {
sideBarContentContainer.style.display = 'none';
viewerContainer.style.width = proxy.pdfViewer.element.clientWidth + 'px';
pageContainer.style.width = viewerContainer.clientWidth + 'px';
viewerContainer.style.left = sideBarContentContainer.clientWidth + 'px';
proxy.pdfViewerBase.updateZoomValue();
proxy.isThumbnail = false;
}
else {
sideBarContent.focus();
sideBarContentContainer.style.display = 'block';
// tslint:disable-next-line:max-line-length
viewerContainer.style.width = (proxy.pdfViewer.element.clientWidth - sideBarContentContainer.clientWidth) + 'px';
pageContainer.style.width = viewerContainer.clientWidth + 'px';
viewerContainer.style.left = (sideBarContentContainer.clientWidth) + 'px';
proxy.pdfViewerBase.updateZoomValue();
proxy.pdfViewer.thumbnailViewModule.gotoThumbnailImage(proxy.pdfViewerBase.currentPageNumber - 1);
proxy.isThumbnail = true;
}
}
};
this.bookmarkButtonOnClick = function (event) {

@@ -159,0 +197,0 @@ var proxy = _this;

@@ -178,2 +178,6 @@ import { PdfViewer, TextLayer, ContextMenu } from '../index';

private tapCount;
/**
* @private
*/
isInitialLoaded: boolean;
constructor(viewer: PdfViewer);

@@ -367,2 +371,6 @@ /**

storeWinData(data: any, pageIndex: number): void;
/**
* @private
*/
setCustomAjaxHeaders(request: XMLHttpRequest): void;
private getPinchZoomPage;

@@ -369,0 +377,0 @@ private getWindowSessionStorage;

@@ -46,12 +46,15 @@ import { createElement, Browser } from '@syncfusion/ej2-base';

var proxy = this;
var request = new XMLHttpRequest();
var bookmarkRequest = new XMLHttpRequest();
// tslint:disable-next-line:max-line-length
var jsonObject = { hashId: this.pdfViewerBase.hashId };
request.open('POST', proxy.pdfViewer.serviceUrl + '/Bookmarks');
request.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
request.responseType = 'json';
request.send(JSON.stringify(jsonObject));
bookmarkRequest.open('POST', proxy.pdfViewer.serviceUrl + '/Bookmarks');
bookmarkRequest.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
if (this.pdfViewer.ajaxRequestSettings.ajaxHeaders) {
this.pdfViewerBase.setCustomAjaxHeaders(bookmarkRequest);
}
bookmarkRequest.responseType = 'json';
bookmarkRequest.send(JSON.stringify(jsonObject));
// tslint:disable-next-line
request.onreadystatechange = function (event) {
if (request.readyState === 4 && request.status === 200) {
bookmarkRequest.onreadystatechange = function (event) {
if (bookmarkRequest.readyState === 4 && bookmarkRequest.status === 200) {
if (_this.pdfViewerBase.navigationPane) {

@@ -81,5 +84,5 @@ _this.pdfViewerBase.navigationPane.disableBookmarkButton();

// tslint:disable-next-line
request.onerror = function (event) {
bookmarkRequest.onerror = function (event) {
_this.pdfViewerBase.openNotificationPopup();
proxy.pdfViewer.fireAjaxRequestFailed(request.status, request.statusText);
proxy.pdfViewer.fireAjaxRequestFailed(bookmarkRequest.status, bookmarkRequest.statusText);
};

@@ -86,0 +89,0 @@ };

@@ -404,4 +404,6 @@ import { Browser } from '@syncfusion/ej2-base';

Magnification.prototype.rerenderMagnifiedPages = function () {
this.renderInSeparateThread(this.reRenderPageNumber);
this.isPagesZoomed = false;
if (this.pdfViewerBase.isInitialLoaded) {
this.renderInSeparateThread(this.reRenderPageNumber);
this.isPagesZoomed = false;
}
};

@@ -408,0 +410,0 @@ Magnification.prototype.renderInSeparateThread = function (pageNumber) {

import { Component, INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, L10n } from '@syncfusion/ej2-base';import { ModuleDeclaration, isNullOrUndefined, Property, Event, EmitType } from '@syncfusion/ej2-base';import { PdfViewerBase } from './index';import { Navigation } from './index';import { Magnification } from './index';import { Toolbar } from './index';import { ToolbarItem } from './index';import { LinkTarget, InteractionMode, AnnotationType, AnnotationToolbarItem } from './base/types';import { Annotation } from './index';import { LinkAnnotation } from './index';import { ThumbnailView } from './index';import { BookmarkView } from './index';import { TextSelection } from './index';import { TextSearch } from './index';import { Print } from './index';import { IUnloadEventArgs, ILoadEventArgs, ILoadFailedEventArgs, IAjaxRequestFailureEventArgs, IPageChangeEventArgs, IPageClickEventArgs, IZoomChangeEventArgs, IHyperlinkClickEventArgs } from './index';import { IAnnotationAddEventArgs, IAnnotationRemoveEventArgs, IAnnotationPropertiesChangeEventArgs } from './index';
import {IAjaxHeaders} from "./pdfviewer";
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -22,2 +23,14 @@

/**
* Interface for a class AjaxRequestSettings
*/
export interface AjaxRequestSettingsModel {
/**
* set the ajax Header values in the PdfViewer.
*/
ajaxHeaders?: IAjaxHeaders [];
}
/**
* Interface for a class AnnotationToolbarSettings

@@ -296,2 +309,8 @@ */

/**
* Defines the ajax Request settings of the PdfViewer.
*/
// tslint:disable-next-line:max-line-length
ajaxRequestSettings?: AjaxRequestSettingsModel;
/**
* Defines the settings of the PdfViewer annotation toolbar.

@@ -298,0 +317,0 @@ */

@@ -5,3 +5,3 @@ import { Component, INotifyPropertyChanged, ChildProperty, L10n } from '@syncfusion/ej2-base';

import { ToolbarSettingsModel, AnnotationToolbarSettingsModel } from './pdfviewer-model';
import { ServerActionSettingsModel } from './pdfviewer-model';
import { ServerActionSettingsModel, AjaxRequestSettingsModel } from './pdfviewer-model';
import { Navigation } from './index';

@@ -35,2 +35,21 @@ import { Magnification } from './index';

/**
* The `AjaxRequestSettings` module is used to set the ajax Request Headers of PDF viewer.
*/
export declare class AjaxRequestSettings extends ChildProperty<AjaxRequestSettings> {
/**
* set the ajax Header values in the PdfViewer.
*/
ajaxHeaders: IAjaxHeaders[];
}
export interface IAjaxHeaders {
/**
* specifies the ajax Header Name of the PdfViewer.
*/
headerName: string;
/**
* specifies the ajax Header Value of the PdfViewer.
*/
headerValue: string;
}
/**
* The `AnnotationToolbarSettings` module is used to provide the annotation toolbar settings of the PDF viewer.

@@ -281,2 +300,6 @@ */

/**
* Defines the ajax Request settings of the PdfViewer.
*/
ajaxRequestSettings: AjaxRequestSettingsModel;
/**
* Defines the settings of the PdfViewer annotation toolbar.

@@ -375,2 +398,7 @@ */

/**
* Gets the thumbnail-view object of the pdf viewer.
* @returns { ThumbnailView }
*/
readonly thumbnailView: ThumbnailView;
/**
* Gets the annotation object of the pdf viewer.

@@ -377,0 +405,0 @@ * @returns { Annotation }

@@ -41,2 +41,16 @@ var __extends = (this && this.__extends) || (function () {

/**
* The `AjaxRequestSettings` module is used to set the ajax Request Headers of PDF viewer.
*/
var AjaxRequestSettings = /** @class */ (function (_super) {
__extends(AjaxRequestSettings, _super);
function AjaxRequestSettings() {
return _super !== null && _super.apply(this, arguments) || this;
}
__decorate([
Property()
], AjaxRequestSettings.prototype, "ajaxHeaders", void 0);
return AjaxRequestSettings;
}(ChildProperty));
export { AjaxRequestSettings };
/**
* The `AnnotationToolbarSettings` module is used to provide the annotation toolbar settings of the PDF viewer.

@@ -358,2 +372,13 @@ */

});
Object.defineProperty(PdfViewer.prototype, "thumbnailView", {
/**
* Gets the thumbnail-view object of the pdf viewer.
* @returns { ThumbnailView }
*/
get: function () {
return this.thumbnailViewModule;
},
enumerable: true,
configurable: true
});
Object.defineProperty(PdfViewer.prototype, "annotation", {

@@ -422,3 +447,3 @@ /**

}
if (this.enableToolbar) {
if (this.enableToolbar || this.enableNavigationToolbar) {
modules.push({

@@ -682,2 +707,5 @@ member: 'Toolbar', args: [this, this.viewerBase]

__decorate([
Property({ ajaxHeaders: [] })
], PdfViewer.prototype, "ajaxRequestSettings", void 0);
__decorate([
Property({ showTooltip: true, annotationToolbarItem: ['HighlightTool', 'UnderlineTool', 'StrikethroughTool', 'ColorEditTool', 'OpacityEditTool', 'AnnotationDeleteTool'] })

@@ -684,0 +712,0 @@ ], PdfViewer.prototype, "annotationToolbarSettings", void 0);

@@ -55,2 +55,5 @@ import { createElement, Browser } from '@syncfusion/ej2-base';

request.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
if (this.pdfViewer.ajaxRequestSettings.ajaxHeaders) {
this.pdfViewerBase.setCustomAjaxHeaders(request);
}
request.send(JSON.stringify(jsonObject));

@@ -57,0 +60,0 @@ // tslint:disable-next-line

@@ -849,2 +849,5 @@ import { createElement, Browser } from '@syncfusion/ej2-base';

request.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
if (this.pdfViewer.ajaxRequestSettings.ajaxHeaders) {
this.pdfViewerBase.setCustomAjaxHeaders(request);
}
request.responseType = 'json';

@@ -851,0 +854,0 @@ request.send(JSON.stringify(jsonObject));

import { PdfViewer, PdfViewerBase } from '../index';
/**
* The `ThumbnailView` module is used to handle thumbnail view navigation of PDF viewer.
* @hidden
*/

@@ -34,2 +33,6 @@ export declare class ThumbnailView {

/**
* @public
*/
openThumbnailPane(): void;
/**
* @private

@@ -36,0 +39,0 @@ */

import { createElement } from '@syncfusion/ej2-base';
/**
* The `ThumbnailView` module is used to handle thumbnail view navigation of PDF viewer.
* @hidden
*/

@@ -80,2 +79,8 @@ var ThumbnailView = /** @class */ (function () {

/**
* @public
*/
ThumbnailView.prototype.openThumbnailPane = function () {
this.pdfViewerBase.navigationPane.openThumbnailPane();
};
/**
* @private

@@ -121,2 +126,5 @@ */

request.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
if (this.pdfViewer.ajaxRequestSettings.ajaxHeaders) {
this.pdfViewerBase.setCustomAjaxHeaders(request);
}
request.responseType = 'json';

@@ -123,0 +131,0 @@ request.send(JSON.stringify(jsonObject));

@@ -538,7 +538,13 @@ import { createElement, Browser } from '@syncfusion/ej2-base';

if (isAdjust) {
if (this.pdfViewer.enableToolbar) {
sideBarToolbar.style.top = (toolbarHeight + annotationToolbarHeight) + 'px';
sideBarContentContainer.style.top = (toolbarHeight + annotationToolbarHeight) + 'px';
splitterElement.style.top = (toolbarHeight + annotationToolbarHeight) + 'px';
}
else {
sideBarToolbar.style.top = (annotationToolbarHeight) + 'px';
sideBarContentContainer.style.top = (annotationToolbarHeight) + 'px';
splitterElement.style.top = (annotationToolbarHeight) + 'px';
}
// tslint:disable-next-line:max-line-length
sideBarToolbar.style.top = (toolbarHeight + annotationToolbarHeight) + 'px';
sideBarContentContainer.style.top = (toolbarHeight + annotationToolbarHeight) + 'px';
splitterElement.style.top = (toolbarHeight + annotationToolbarHeight) + 'px';
// tslint:disable-next-line:max-line-length
this.pdfViewerBase.viewerContainer.style.height = this.updateViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer), (annotationToolbarHeight)) + 'px';

@@ -549,7 +555,17 @@ sideBarToolbar.style.height = sideBarToolbar.getBoundingClientRect().height - annotationToolbarHeight + 'px';

else {
if (this.pdfViewer.enableToolbar) {
// tslint:disable-next-line:max-line-length
sideBarToolbar.style.top = toolbarHeight + 'px';
sideBarContentContainer.style.top = toolbarHeight + 'px';
splitterElement.style.top = toolbarHeight + 'px';
}
else {
sideBarToolbar.style.top = 1 + 'px';
sideBarToolbar.style.height = '100%';
sideBarContentContainer.style.top = 1 + 'px';
sideBarContentContainer.style.height = '100%';
splitterElement.style.top = 1 + 'px';
splitterElement.style.height = '100%';
}
// tslint:disable-next-line:max-line-length
sideBarToolbar.style.top = toolbarHeight + 'px';
sideBarContentContainer.style.top = toolbarHeight + 'px';
splitterElement.style.top = toolbarHeight + 'px';
// tslint:disable-next-line:max-line-length
this.pdfViewerBase.viewerContainer.style.height = this.resetViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer), annotationToolbarHeight) + 'px';

@@ -556,0 +572,0 @@ sideBarToolbar.style.height = this.getHeight(sideBarToolbar, annotationToolbarHeight);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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

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

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

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

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

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

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