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.3.26 to 17.3.27

16

CHANGELOG.md

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

- `#251151`, `#254032` – Provided the support for annotation selection in code behind.
- `#249245` – Provided the support for UI customization of annotation selector border and resizer.
- Improved the PDF viewer mobile view performance.
#### Bug Fixes
- `#253317` – The measured annotation value is updated properly in the label when you disable the default toolbar.
- `#253888` – The Script error will no longer be thrown if we load the PDF documents using ASP.NET MVC web service.
- `#253317` – The measured value is now update properly for the measured annotation.
## 17.3.26 (2019-11-05)
### PDF Viewer
#### New Features
- `#252805` - Exposed the annotation unique ID in the annotationAdd event arguments.

@@ -11,0 +27,0 @@

2

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

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

{
"_from": "@syncfusion/ej2-pdfviewer@*",
"_id": "@syncfusion/ej2-pdfviewer@17.3.21",
"_id": "@syncfusion/ej2-pdfviewer@17.3.26",
"_inBundle": false,
"_integrity": "sha512-v9t4HCFe3LFZa5Hz+LZTpsh/k100u0wmpJ9zz28NH3I9UwMYFzNNSuN2SatQ13FmJ3BDhKkyQ5/iKc9+EaeC1g==",
"_integrity": "sha512-NfK+VU+xPzz0DeBtCHZbUJmNWqFNfp1cjVaLfj33Xhf4Lp06tjVXfEEhoxYEfpPh5pkHoH7ZmzOjugiUxP/dBA==",
"_location": "/@syncfusion/ej2-pdfviewer",

@@ -26,4 +26,4 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-17.3.21.tgz",
"_shasum": "861a6b5da7ccf3c5d1eb0d6e6d14309b5dcafce9",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-17.3.26.tgz",
"_shasum": "e6fe7b4f5a4cb73aae5fd866b955936bac81aaa8",
"_spec": "@syncfusion/ej2-pdfviewer@*",

@@ -39,15 +39,15 @@ "_where": "/jenkins/workspace/ation_hotfix_17.2.0.34_Vol2-DDPJ6C2YEWTWLLKKNA7AG2JBE6DYTCTNGMHGORWGAYAVCL6L7OLQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~17.3.26",
"@syncfusion/ej2-buttons": "~17.3.26",
"@syncfusion/ej2-calendars": "~17.3.26",
"@syncfusion/ej2-data": "~17.3.26",
"@syncfusion/ej2-drawings": "~17.3.26",
"@syncfusion/ej2-dropdowns": "~17.3.26",
"@syncfusion/ej2-inplace-editor": "~17.3.26",
"@syncfusion/ej2-inputs": "~17.3.26",
"@syncfusion/ej2-lists": "~17.3.26",
"@syncfusion/ej2-navigations": "~17.3.26",
"@syncfusion/ej2-notifications": "~17.3.26",
"@syncfusion/ej2-popups": "~17.3.26",
"@syncfusion/ej2-richtexteditor": "~17.3.26"
"@syncfusion/ej2-base": "~17.3.27",
"@syncfusion/ej2-buttons": "~17.3.27",
"@syncfusion/ej2-calendars": "~17.3.27",
"@syncfusion/ej2-data": "~17.3.27",
"@syncfusion/ej2-drawings": "~17.3.27",
"@syncfusion/ej2-dropdowns": "~17.3.27",
"@syncfusion/ej2-inplace-editor": "~17.3.27",
"@syncfusion/ej2-inputs": "~17.3.27",
"@syncfusion/ej2-lists": "~17.3.27",
"@syncfusion/ej2-navigations": "~17.3.27",
"@syncfusion/ej2-notifications": "~17.3.27",
"@syncfusion/ej2-popups": "~17.3.27",
"@syncfusion/ej2-richtexteditor": "~17.3.27"
},

@@ -78,4 +78,4 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "17.3.26",
"version": "17.3.27",
"sideEffects": false
}

@@ -35,3 +35,3 @@ import { PdfAnnotationBaseModel } from './pdf-annotation-model';

*/
export declare function initPerimeterLabel(obj: PdfAnnotationBaseModel, points: PointModel[]): TextElement[];
export declare function initPerimeterLabel(obj: PdfAnnotationBaseModel, points: PointModel[], measure: MeasureAnnotation): TextElement[];
/**

@@ -46,2 +46,6 @@ * @hidden

/**
* @hidden
*/
export declare function updateCalibrateLabel(obj: PdfAnnotationBaseModel): void;
/**
* Used to find the path for polygon shapes

@@ -48,0 +52,0 @@ * @hidden

// tslint:disable-next-line:max-line-length
import { PathElement, Rect, Point, Size, RotateTransform, TextElement, randomId, identityMatrix, rotateMatrix, transformPointByMatrix, intersect3 } from '@syncfusion/ej2-drawings';
import { setElementStype, findPointsLength, findPerimeterLength } from './drawing-util';
import { setElementStype, findPointsLength } from './drawing-util';
import { isNullOrUndefined } from '@syncfusion/ej2-base';

@@ -187,3 +187,3 @@ /** @private */

*/
export function initPerimeterLabel(obj, points) {
export function initPerimeterLabel(obj, points, measure) {
var labels = [];

@@ -193,2 +193,3 @@ var textele;

textele = textElement(obj, angle);
textele.content = measure.calculatePerimeter(obj);
if (obj.enableShapeLabel === true) {

@@ -213,3 +214,3 @@ textele.style.strokeColor = obj.labelBorderColor;

if (textElement_3 && !isNullOrUndefined(textElement_3.content)) {
perimeter = measure.setConversion(findPerimeterLength(points), obj);
perimeter = measure.calculatePerimeter(obj);
textElement_3.content = perimeter;

@@ -234,2 +235,17 @@ textElement_3.childNodes[0].text = textElement_3.content;

/**
* @hidden
*/
export function updateCalibrateLabel(obj) {
if (obj.wrapper && obj.wrapper.children) {
for (var i = 0; i < obj.wrapper.children.length; i++) {
var textElement_5 = obj.wrapper.children[i];
if (textElement_5 && !isNullOrUndefined(textElement_5.content)) {
textElement_5.content = obj.notes;
textElement_5.childNodes[0].text = textElement_5.content;
textElement_5.refreshTextElement();
}
}
}
}
/**
* Used to find the path for polygon shapes

@@ -236,0 +252,0 @@ * @hidden

@@ -134,2 +134,18 @@ import { PdfViewer, PdfViewerBase, AnnotationType, TextMarkupAnnotation, ShapeAnnotation, StampAnnotation, StickyNotesAnnotation, IPopupAnnotation, MeasureAnnotation } from '../index';

*/
storeAnnotationCollections(annotation: any): void;
/**
* @private
*/
updateAnnotationCollection(annotation: any): void;
/**
* Select the annotations using annotation object or annotation Id.
* @param annotationId
* @returns void
*/
selectAnnotation(annotationId: string | object): void;
private getPageNumberFromAnnotationCollections;
private getAnnotationsFromAnnotationCollections;
/**
* @private
*/
getAnnotationType(type: string, measureType: string): AnnotationType;

@@ -343,3 +359,3 @@ /**

*/
selectAnnotation(annotationId: any, pageNumber: number, annotation: any): void;
annotationSelect(annotationId: any, pageNumber: number, annotation: any): void;
editAnnotation(annotation: any): void;

@@ -346,0 +362,0 @@ /**

@@ -21,2 +21,3 @@ import { PdfViewer, PdfViewerBase, IRectangle, ICommentsCollection, IReviewCollection } from '../index';

position?: string;
pageNumber: number;
}

@@ -192,2 +193,3 @@ /**

private getBoundsForSave;
private getAnnotationBounds;
private getRgbCode;

@@ -194,0 +196,0 @@ private getDrawnBounds;

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

this.pdfViewer.annotation.textMarkupAnnotationModule.isTextMarkupAnnotationMode = false;
this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode = '';
}

@@ -305,2 +306,3 @@ break;

this.pdfViewer.annotation.textMarkupAnnotationModule.isTextMarkupAnnotationMode = false;
this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode = '';
}

@@ -312,2 +314,3 @@ break;

this.pdfViewer.annotation.textMarkupAnnotationModule.isTextMarkupAnnotationMode = false;
this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode = '';
}

@@ -314,0 +317,0 @@ break;

@@ -188,2 +188,6 @@ import { BaseEventArgs } from '@syncfusion/ej2-base';

annotationType: AnnotationType;
/**
* Defines the bounds of the annotation removed from the page of the PDF document.
*/
annotationBounds: any;
}

@@ -190,0 +194,0 @@ /**

@@ -47,1 +47,12 @@ /**

export declare type TextAlignment = 'Left' | 'Right' | 'Center' | 'Justify';
/**
* Enum for annotation selector shapes
*/
export declare type AnnotationResizerShape = 'Square' | 'Circle';
/**
* Enum for annotation resizer location
*/
export declare enum AnnotationResizerLocation {
Corners = 1,
Edges = 2
}

@@ -12,1 +12,9 @@ /**

})(FontStyle || (FontStyle = {}));
/**
* Enum for annotation resizer location
*/
export var AnnotationResizerLocation;
(function (AnnotationResizerLocation) {
AnnotationResizerLocation[AnnotationResizerLocation["Corners"] = 1] = "Corners";
AnnotationResizerLocation[AnnotationResizerLocation["Edges"] = 2] = "Edges";
})(AnnotationResizerLocation || (AnnotationResizerLocation = {}));

@@ -239,2 +239,10 @@ import { Browser } from '@syncfusion/ej2-base';

this.onZoomChanged(temporaryZoomFactor * 100);
this.isTapToFitZoom = true;
if (Browser.isDevice && (this.zoomFactor * 100) === 50) {
var zoomValue = this.calculateFitZoomFactor('fitToWidth');
this.fitType = null;
if (zoomValue <= 50) {
this.fitToWidth();
}
}
};

@@ -253,2 +261,3 @@ /**

}
this.isTapToFitZoom = true;
this.isPinchZoomed = true;

@@ -499,3 +508,3 @@ this.onZoomChanged(temporaryZoomFactor * 100);

var pageDivs = document.querySelectorAll('canvas[id*="' + this.pdfViewer.element.id + '_pageCanvas_"]');
var viewportWidth = this.pdfViewer.element.clientWidth;
var viewportWidth = 816;
for (var i = 0; i < pageDivs.length; i++) {

@@ -850,3 +859,3 @@ // tslint:disable-next-line:radix

else {
this.zoomTo(this.previousZoomFactor * 100);
this.fitToWidth();
}

@@ -853,0 +862,0 @@ this.calculateScrollValues(scrollValue);

@@ -1,2 +0,2 @@

import { Component, INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, L10n, Collection, Complex } 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, LineHeadStyle, ContextMenuAction, FontStyle, TextAlignment } 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 { FormFields } from './index';import { Print, CalibrationUnit } from './index';import { UnloadEventArgs, LoadEventArgs, LoadFailedEventArgs, AjaxRequestFailureEventArgs, PageChangeEventArgs, PageClickEventArgs, ZoomChangeEventArgs, HyperlinkClickEventArgs, HyperlinkMouseOverArgs, ImportStartEventArgs, ImportSuccessEventArgs, ImportFailureEventArgs, ExportStartEventArgs, ExportSuccessEventArgs, ExportFailureEventArgs } from './index';import { AnnotationAddEventArgs, AnnotationRemoveEventArgs, AnnotationPropertiesChangeEventArgs, AnnotationResizeEventArgs, AnnotationSelectEventArgs } from './index';import { TextSelectionStartEventArgs, TextSelectionEndEventArgs } from './index';import { PdfAnnotationBase, ZOrderPageTable } from '../diagram/pdf-annotation';import { PdfAnnotationBaseModel } from '../diagram/pdf-annotation-model';import { Drawing, ClipBoardObject } from '../diagram/drawing';import { Selector } from '../diagram/selector';import { SelectorModel } from '../diagram/selector-model';import { PointModel, IElement, Rect } from '@syncfusion/ej2-drawings';import { renderAdornerLayer } from '../diagram/dom-util';import { ThumbnailClickEventArgs } from './index';
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, ChildProperty, L10n, Collection, Complex } 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, LineHeadStyle, ContextMenuAction, FontStyle, TextAlignment, AnnotationResizerShape, AnnotationResizerLocation } 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 { FormFields } from './index';import { Print, CalibrationUnit } from './index';import { UnloadEventArgs, LoadEventArgs, LoadFailedEventArgs, AjaxRequestFailureEventArgs, PageChangeEventArgs, PageClickEventArgs, ZoomChangeEventArgs, HyperlinkClickEventArgs, HyperlinkMouseOverArgs, ImportStartEventArgs, ImportSuccessEventArgs, ImportFailureEventArgs, ExportStartEventArgs, ExportSuccessEventArgs, ExportFailureEventArgs } from './index';import { AnnotationAddEventArgs, AnnotationRemoveEventArgs, AnnotationPropertiesChangeEventArgs, AnnotationResizeEventArgs, AnnotationSelectEventArgs } from './index';import { TextSelectionStartEventArgs, TextSelectionEndEventArgs } from './index';import { PdfAnnotationBase, ZOrderPageTable } from '../diagram/pdf-annotation';import { PdfAnnotationBaseModel } from '../diagram/pdf-annotation-model';import { Drawing, ClipBoardObject } from '../diagram/drawing';import { Selector } from '../diagram/selector';import { SelectorModel } from '../diagram/selector-model';import { PointModel, IElement, Rect } from '@syncfusion/ej2-drawings';import { renderAdornerLayer } from '../diagram/dom-util';import { ThumbnailClickEventArgs } from './index';
import {IAjaxHeaders} from "./pdfviewer";

@@ -981,2 +981,17 @@ import {ComponentModel} from '@syncfusion/ej2-base';

/**
* Specifies the shape of the resizer.
*/
resizerShape?: AnnotationResizerShape;
/**
* Specifies the border dash array of the selection.
*/
selectorLineDashArray?: number[];
/**
* Specifies the location of the resizer.
*/
resizerLocation?: AnnotationResizerLocation;
}

@@ -983,0 +998,0 @@

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

import { ToolbarItem } from './index';
import { LinkTarget, InteractionMode, AnnotationType, AnnotationToolbarItem, LineHeadStyle, ContextMenuAction, FontStyle, TextAlignment } from './base/types';
import { LinkTarget, InteractionMode, AnnotationType, AnnotationToolbarItem, LineHeadStyle, ContextMenuAction, FontStyle, TextAlignment, AnnotationResizerShape, AnnotationResizerLocation } from './base/types';
import { Annotation } from './index';

@@ -804,2 +804,14 @@ import { LinkAnnotation } from './index';

selectionBorderThickness: number;
/**
* Specifies the shape of the resizer.
*/
resizerShape: AnnotationResizerShape;
/**
* Specifies the border dash array of the selection.
*/
selectorLineDashArray: number[];
/**
* Specifies the location of the resizer.
*/
resizerLocation: AnnotationResizerLocation;
}

@@ -888,2 +900,6 @@ /**

/**
* Get the Loaded document annotation Collections in the PdfViewer control.
*/
annotationCollection: any;
/**
* Gets or sets the document name loaded in the PdfViewer control.

@@ -1588,3 +1604,3 @@ */

*/
fireAnnotationRemove(pageNumber: number, index: string, type: AnnotationType): void;
fireAnnotationRemove(pageNumber: number, index: string, type: AnnotationType, bounds: any): void;
/**

@@ -1591,0 +1607,0 @@ * @private

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

var proxy = this;
var viewportWidth = this.pdfViewer.element.clientWidth;
var viewportWidth = 816;
var viewportHeight = this.pdfViewer.element.clientHeight;

@@ -694,4 +694,4 @@ var pageWidth = this.pdfViewerBase.pageSize[pageIndex].width;

var tileCount = this.pdfViewerBase.getTileCount(pageWidth);
var noTileX = viewportWidth > pageWidth ? 1 : tileCount;
var noTileY = viewportWidth > pageWidth ? 1 : tileCount;
var noTileX = viewportWidth >= pageWidth ? 1 : tileCount;
var noTileY = viewportWidth >= pageWidth ? 1 : tileCount;
for (var x = 0; x < noTileX; x++) {

@@ -727,3 +727,3 @@ for (var y = 0; y < noTileY; y++) {

var pageNumber = (data.pageNumber !== undefined) ? data.pageNumber : pageIndex;
if (viewportWidth > pageWidth) {
if (viewportWidth >= pageWidth) {
proxy.pdfViewerBase.storeWinData(data, pageNumber);

@@ -730,0 +730,0 @@ }

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 too big to display

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 too big to display

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

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

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