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 18.1.48 to 18.1.52

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## 18.1.48 (2020-05-05)
### PDF Viewer

@@ -7,0 +9,0 @@

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 18.1.48
* version : 18.1.52
* Copyright Syncfusion Inc. 2001 - 2020. 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@18.1.45",
"_id": "@syncfusion/ej2-pdfviewer@18.1.48",
"_inBundle": false,
"_integrity": "sha512-0VqqfIUUXbrdVJjr2odwklr3aKGLiPO5ioqAd2NAf8EvlMA/iAm7Hc2dL4vUhug2wJ5F80J4P8XF5cgIxRBP5w==",
"_integrity": "sha512-+52IVsymjjb2k6S303obdGuwJpDad7ZE3p26FawIivAwesnBC1VuSanRkqRzdzT4FSV46imjEastODNnFm3Tew==",
"_location": "/@syncfusion/ej2-pdfviewer",

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

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-18.1.45.tgz",
"_shasum": "b15bd9998f17b6f6f3c4deb229e8bbc0950c84bc",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-pdfviewer/-/ej2-pdfviewer-18.1.48.tgz",
"_shasum": "999eeff55461f8a8f97f075d08ede9b408172df4",
"_spec": "@syncfusion/ej2-pdfviewer@*",

@@ -39,15 +39,15 @@ "_where": "/jenkins/workspace/automation_release_18.1.0.1-52JLNOGRCDHXRVQM3W564VPLFCPHWUYDYU3I3DVRABSR7F6AIFYQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~18.1.44",
"@syncfusion/ej2-buttons": "~18.1.48",
"@syncfusion/ej2-calendars": "~18.1.44",
"@syncfusion/ej2-data": "~18.1.43",
"@syncfusion/ej2-drawings": "~18.1.44",
"@syncfusion/ej2-dropdowns": "~18.1.48",
"@syncfusion/ej2-inplace-editor": "~18.1.42",
"@syncfusion/ej2-inputs": "~18.1.45",
"@syncfusion/ej2-lists": "~18.1.46",
"@syncfusion/ej2-navigations": "~18.1.46",
"@syncfusion/ej2-notifications": "~18.1.42",
"@syncfusion/ej2-popups": "~18.1.46",
"@syncfusion/ej2-richtexteditor": "~18.1.48"
"@syncfusion/ej2-base": "~18.1.52",
"@syncfusion/ej2-buttons": "~18.1.52",
"@syncfusion/ej2-calendars": "~18.1.52",
"@syncfusion/ej2-data": "~18.1.52",
"@syncfusion/ej2-drawings": "~18.1.52",
"@syncfusion/ej2-dropdowns": "~18.1.52",
"@syncfusion/ej2-inplace-editor": "~18.1.52",
"@syncfusion/ej2-inputs": "~18.1.52",
"@syncfusion/ej2-lists": "~18.1.52",
"@syncfusion/ej2-navigations": "~18.1.52",
"@syncfusion/ej2-notifications": "~18.1.52",
"@syncfusion/ej2-popups": "~18.1.52",
"@syncfusion/ej2-richtexteditor": "~18.1.52"
},

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

"typings": "index.d.ts",
"version": "18.1.48",
"version": "18.1.52",
"sideEffects": false
}

@@ -8,3 +8,3 @@ import { IElement } from '@syncfusion/ej2-drawings';

/** @private */
export declare function findActiveElement(event: MouseEvent | TouchEvent, pdfBase: PdfViewerBase, pdfViewer: PdfViewer): IElement;
export declare function findActiveElement(event: MouseEvent | TouchEvent, pdfBase: PdfViewerBase, pdfViewer: PdfViewer, isOverlapped?: boolean): any;
/** @private */

@@ -11,0 +11,0 @@ export declare function findObjectsUnderMouse(pdfBase: PdfViewerBase, pdfViewer: PdfViewer, event: MouseEvent): IElement[];

@@ -7,6 +7,10 @@ import { Rect } from '@syncfusion/ej2-drawings';

/** @private */
export function findActiveElement(event, pdfBase, pdfViewer) {
// tslint:disable-next-line
export function findActiveElement(event, pdfBase, pdfViewer, isOverlapped) {
if (pdfViewer && pdfBase.activeElements.activePageID > -1) {
var objects = findObjectsUnderMouse(pdfBase, pdfViewer, event);
var object = findObjectUnderMouse(objects, event, pdfBase, pdfViewer);
if (isOverlapped) {
return objects;
}
return object;

@@ -13,0 +17,0 @@ }

@@ -24,2 +24,3 @@ import { createHtmlElement, getDiagramElement } from '@syncfusion/ej2-drawings';

}
pdfViewer.viewerBase.applyElementStyles(divElement, index);
}

@@ -26,0 +27,0 @@ /**

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

*/
overlappedCollections: any;
/**
* @private
*/
constructor(pdfViewer: PdfViewer, viewerBase: PdfViewerBase);

@@ -420,3 +424,13 @@ /**

annotationSelect(annotationId: any, pageNumber: number, annotation: any, annotationCollection?: any, isDblClick?: boolean, isSelected?: boolean): void;
/**
* @private
*/
selectSignature(signatureId: string, pageNumber: number, signatureModule: any): void;
/**
* @private
*/
editSignature(signature: any): void;
/**
* @private
*/
editAnnotation(annotation: any): void;

@@ -423,0 +437,0 @@ /**

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

var inputEleLeft = parseFloat(this.inputBoxElement.style.left);
if (this.pdfViewerBase.isMixedSizeDocument) {
var canvas = document.getElementById(this.pdfViewer.element.id + '_annotationCanvas_' + pageIndex);
this.inputBoxElement.style.left = inputEleLeft - canvas.offsetLeft;
}
var inputEleTop = parseFloat(this.inputBoxElement.style.top);

@@ -642,2 +646,3 @@ var zoomFactor = this.pdfViewerBase.getZoomFactor();

var pageDiv = this.pdfViewerBase.getElement('_pageDiv_' + (pageIndex));
var canvass = document.getElementById(this.pdfViewer.element.id + '_annotationCanvas_' + pageIndex);
var zoomFactor = this.pdfViewerBase.getZoomFactor();

@@ -727,2 +732,5 @@ this.inputBoxElement.value = (annotation && annotation.dynamicText) ? annotation.dynamicText : this.defaultText;

}
if (this.pdfViewerBase.isMixedSizeDocument) {
this.inputBoxElement.style.left = (currentPosition.x) + canvass.offsetLeft + 'px';
}
this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange = false;

@@ -729,0 +737,0 @@ pageDiv.appendChild(this.inputBoxElement);

@@ -125,3 +125,3 @@ import { PdfViewerBase, PdfViewer } from '../index';

*/
updateCollections(annotation: any): void;
updateCollections(annotation: any, isSignature?: boolean): void;
/**

@@ -128,0 +128,0 @@ * @private

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

ContextMenu.prototype.getEnabledItemCount = function (ul) {
var enabledItemCount = this.copyContextMenu.length - 1;
var enabledItemCount = this.copyContextMenu.length;
var liCollection = ul.children;

@@ -236,0 +236,0 @@ for (var i = 0; i < liCollection.length; i++) {

@@ -560,17 +560,5 @@ import { BaseEventArgs } from '@syncfusion/ej2-base';

/**
* Defines the bounds of the signature selected in the page of the PDF document.
* Defines the properties of the selected signature.
*/
bounds: any;
/**
* Define the opacity of the signature selected in the page of the PDF document.
*/
opacity: number;
/**
* Define the stroke color of the signature selected in the page of the PDF document.
*/
strokeColor: string;
/**
* Define the thickness of the signature selected in the page of the PDF document.
*/
thickness: number;
signature: object;
}

@@ -577,0 +565,0 @@ /**

@@ -295,6 +295,13 @@ import { PdfViewer, TextLayer, ContextMenu, Signature } from '../index';

isDynamicStamp: boolean;
private isMixedSizeDocument;
/**
* @private
*/
isMixedSizeDocument: boolean;
/**
* @private
*/
highestWidth: number;
/**
* @private
*/
customStampCollection: ICustomStampItems[];

@@ -416,2 +423,4 @@ /**

isTileImageRendered: boolean;
private isDataExits;
private requestLists;
constructor(viewer: PdfViewer);

@@ -626,2 +635,6 @@ /**

*/
applyElementStyles(pageCanvas: any, pageNumber: number): void;
/**
* @private
*/
updateLeftPosition(pageIndex: number): number;

@@ -674,2 +687,3 @@ /**

private createRequestForRender;
private pageRequestSent;
/**

@@ -676,0 +690,0 @@ * @private

@@ -94,3 +94,16 @@ import { PdfViewer } from '../index';

*/
modifySignatureCollection(property: string, pageNumber: number, annotationBase: any): ISignAnnotation;
modifySignatureCollection(property: string, pageNumber: number, annotationBase: any, isSignatureEdited?: boolean): ISignAnnotation;
/**
* @private
*/
storeSignatureCollections(annotation: any, pageNumber: number): void;
private checkSignatureCollection;
/**
* @private
*/
updateSignatureCollection(signature: any): void;
/**
* @private
*/
addInCollection(pageNumber: number, signature: any): void;
private getAnnotations;

@@ -113,4 +126,8 @@ private manageAnnotations;

*/
updateSignatureCollections(signature: any, pageIndex: number, isImport?: boolean): any;
/**
* @private
*/
destroy(): void;
}
export {};

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

import { ColorPicker } from '@syncfusion/ej2-inputs';
import { cloneObject } from '../../diagram/drawing-util';
/**

@@ -290,3 +291,4 @@ * @hidden

pageAnnotationObject.annotations[z].strokeColor = JSON.stringify(this.getRgbCode(strokeColorString));
pageAnnotationObject.annotations[z].bounds = JSON.stringify(pageAnnotationObject.annotations[z].bounds);
// tslint:disable-next-line:max-line-length
pageAnnotationObject.annotations[z].bounds = JSON.stringify(this.pdfViewer.annotation.getBounds(pageAnnotationObject.annotations[z].bounds, pageAnnotationObject.pageIndex));
// tslint:disable-next-line

@@ -363,6 +365,6 @@ var collectionData = processPathData(pageAnnotationObject.annotations[z].data);

var bounds = currentAnnotation.Bounds;
var currentLeft = this.ConvertPointToPixel(bounds.X);
var currentTop = this.ConvertPointToPixel(bounds.Y);
var currentWidth = this.ConvertPointToPixel(bounds.Width);
var currentHeight = this.ConvertPointToPixel(bounds.Height);
var currentLeft = bounds.X;
var currentTop = bounds.Y;
var currentWidth = bounds.Width;
var currentHeight = bounds.Height;
// tslint:disable-next-line

@@ -416,2 +418,3 @@ var data = currentAnnotation.PathData;

if (!storeObject) {
this.storeSignatureCollections(annotation, pageNumber);
var shapeAnnotation = { pageIndex: pageNumber, annotations: [] };

@@ -426,2 +429,3 @@ shapeAnnotation.annotations.push(annotation);

else {
this.storeSignatureCollections(annotation, pageNumber);
var annotObject = JSON.parse(storeObject);

@@ -448,3 +452,3 @@ window.sessionStorage.removeItem(this.pdfViewerBase.documentId + '_annotations_sign');

// tslint:disable-next-line
Signature.prototype.modifySignatureCollection = function (property, pageNumber, annotationBase) {
Signature.prototype.modifySignatureCollection = function (property, pageNumber, annotationBase, isSignatureEdited) {
this.pdfViewerBase.isDocumentEdited = true;

@@ -462,16 +466,24 @@ var currentAnnotObject = null;

pageAnnotations[i].strokeColor = annotationBase.wrapper.children[0].style.strokeColor;
var date = new Date();
}
else if (property === 'opacity') {
pageAnnotations[i].opacity = annotationBase.wrapper.children[0].style.opacity;
var date = new Date();
}
else if (property === 'thickness') {
pageAnnotations[i].thickness = annotationBase.wrapper.children[0].style.strokeWidth;
var date = new Date();
}
else if (property === 'delete') {
this.updateSignatureCollection(pageAnnotations[i]);
currentAnnotObject = pageAnnotations.splice(i, 1)[0];
break;
}
if (property && property !== 'delete') {
this.storeSignatureCollections(pageAnnotations[i], pageNumber);
}
if (isSignatureEdited) {
pageAnnotations[i].opacity = annotationBase.wrapper.children[0].style.opacity;
pageAnnotations[i].strokeColor = annotationBase.wrapper.children[0].style.strokeColor;
pageAnnotations[i].thickness = annotationBase.wrapper.children[0].style.strokeWidth;
this.storeSignatureCollections(pageAnnotations[i], pageNumber);
break;
}
}

@@ -483,3 +495,71 @@ }

};
/**
* @private
*/
// tslint:disable-next-line
Signature.prototype.storeSignatureCollections = function (annotation, pageNumber) {
// tslint:disable-next-line
var collectionDetails = this.checkSignatureCollection(annotation);
// tslint:disable-next-line
var selectAnnotation = cloneObject(annotation);
selectAnnotation.annotationId = annotation.signatureName;
selectAnnotation.pageNumber = pageNumber;
delete selectAnnotation.annotName;
if (annotation.id) {
selectAnnotation.uniqueKey = annotation.id;
delete selectAnnotation.id;
}
if (collectionDetails.isExisting) {
this.pdfViewer.signatureCollection.splice(collectionDetails.position, 0, selectAnnotation);
}
else {
this.pdfViewer.signatureCollection.push(selectAnnotation);
}
};
// tslint:disable-next-line
Signature.prototype.checkSignatureCollection = function (signature) {
// tslint:disable-next-line
var collections = this.pdfViewer.signatureCollection;
if (collections && signature) {
for (var i = 0; i < collections.length; i++) {
if (collections[i].annotationId === signature.signatureName) {
this.pdfViewer.signatureCollection.splice(i, 1);
return { isExisting: true, position: i };
}
}
}
return { isExisting: false, position: null };
};
/**
* @private
*/
// tslint:disable-next-line
Signature.prototype.updateSignatureCollection = function (signature) {
// tslint:disable-next-line
var collections = this.pdfViewer.signatureCollection;
if (collections && signature) {
for (var i = 0; i < collections.length; i++) {
if (collections[i].annotationId === signature.signatureName) {
this.pdfViewer.signatureCollection.splice(i, 1);
break;
}
}
}
};
/**
* @private
*/
// tslint:disable-next-line
Signature.prototype.addInCollection = function (pageNumber, signature) {
if (signature) {
this.storeSignatureCollections(signature, pageNumber);
// tslint:disable-next-line
var pageSignatures = this.getAnnotations(pageNumber, null);
if (pageSignatures) {
pageSignatures.push(signature);
}
this.manageAnnotations(pageSignatures, pageNumber);
}
};
// tslint:disable-next-line
Signature.prototype.getAnnotations = function (pageIndex, shapeAnnotations) {

@@ -544,2 +624,29 @@ // tslint:disable-next-line

*/
// tslint:disable-next-line
Signature.prototype.updateSignatureCollections = function (signature, pageIndex, isImport) {
var annot;
//tslint:disable-next-line
if (signature) {
// tslint:disable-next-line
var bounds = signature.Bounds;
var currentLeft = bounds.X;
var currentTop = bounds.Y;
var currentWidth = bounds.Width;
var currentHeight = bounds.Height;
// tslint:disable-next-line
var data = signature.PathData;
if (isImport) {
data = getPathString(JSON.parse(signature.PathData));
}
annot = {
// tslint:disable-next-line:max-line-length
id: 'sign' + signature.SignatureName, bounds: { x: currentLeft, y: currentTop, width: currentWidth, height: currentHeight }, pageIndex: pageIndex, data: data,
shapeAnnotationType: 'HandWrittenSignature', opacity: signature.Opacity, strokeColor: signature.StrokeColor, thickness: signature.Thickness, signatureName: signature.SignatureName,
};
return annot;
}
};
/**
* @private
*/
Signature.prototype.destroy = function () {

@@ -546,0 +653,0 @@ window.sessionStorage.removeItem('_annotations_sign');

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

}
this.pdfViewerBase.applyElementStyles(textLayer, pageNumber);
return textLayer;

@@ -40,0 +41,0 @@ };

@@ -103,1 +103,39 @@ /**

}
/**
* Enum type for Dynamic Stamp Items
*/
export declare enum DynamicStampItem {
Revised = 1,
Reviewed = 2,
Received = 4,
Approved = 8,
Confidential = 16,
NotApproved = 32
}
/**
* Enum type for Sign Stamp Items
*/
export declare enum SignStampItem {
Witness = 1,
InitialHere = 2,
SignHere = 4,
Accepted = 8,
Rejected = 16
}
/**
* Enum type for Standard Business Stamp Items
*/
export declare enum StandardBusinessStampItem {
Approved = 1,
NotApproved = 2,
Draft = 4,
Final = 8,
Completed = 16,
Confidential = 32,
ForPublicRelease = 64,
NotForPublicRelease = 128,
ForComment = 256,
Void = 512,
PreliminaryResults = 1024,
InformationOnly = 2048
}

@@ -59,1 +59,42 @@ /**

})(CursorType || (CursorType = {}));
/**
* Enum type for Dynamic Stamp Items
*/
export var DynamicStampItem;
(function (DynamicStampItem) {
DynamicStampItem[DynamicStampItem["Revised"] = 1] = "Revised";
DynamicStampItem[DynamicStampItem["Reviewed"] = 2] = "Reviewed";
DynamicStampItem[DynamicStampItem["Received"] = 4] = "Received";
DynamicStampItem[DynamicStampItem["Approved"] = 8] = "Approved";
DynamicStampItem[DynamicStampItem["Confidential"] = 16] = "Confidential";
DynamicStampItem[DynamicStampItem["NotApproved"] = 32] = "NotApproved";
})(DynamicStampItem || (DynamicStampItem = {}));
/**
* Enum type for Sign Stamp Items
*/
export var SignStampItem;
(function (SignStampItem) {
SignStampItem[SignStampItem["Witness"] = 1] = "Witness";
SignStampItem[SignStampItem["InitialHere"] = 2] = "InitialHere";
SignStampItem[SignStampItem["SignHere"] = 4] = "SignHere";
SignStampItem[SignStampItem["Accepted"] = 8] = "Accepted";
SignStampItem[SignStampItem["Rejected"] = 16] = "Rejected";
})(SignStampItem || (SignStampItem = {}));
/**
* Enum type for Standard Business Stamp Items
*/
export var StandardBusinessStampItem;
(function (StandardBusinessStampItem) {
StandardBusinessStampItem[StandardBusinessStampItem["Approved"] = 1] = "Approved";
StandardBusinessStampItem[StandardBusinessStampItem["NotApproved"] = 2] = "NotApproved";
StandardBusinessStampItem[StandardBusinessStampItem["Draft"] = 4] = "Draft";
StandardBusinessStampItem[StandardBusinessStampItem["Final"] = 8] = "Final";
StandardBusinessStampItem[StandardBusinessStampItem["Completed"] = 16] = "Completed";
StandardBusinessStampItem[StandardBusinessStampItem["Confidential"] = 32] = "Confidential";
StandardBusinessStampItem[StandardBusinessStampItem["ForPublicRelease"] = 64] = "ForPublicRelease";
StandardBusinessStampItem[StandardBusinessStampItem["NotForPublicRelease"] = 128] = "NotForPublicRelease";
StandardBusinessStampItem[StandardBusinessStampItem["ForComment"] = 256] = "ForComment";
StandardBusinessStampItem[StandardBusinessStampItem["Void"] = 512] = "Void";
StandardBusinessStampItem[StandardBusinessStampItem["PreliminaryResults"] = 1024] = "PreliminaryResults";
StandardBusinessStampItem[StandardBusinessStampItem["InformationOnly"] = 2048] = "InformationOnly";
})(StandardBusinessStampItem || (StandardBusinessStampItem = {}));

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

private isSignatureField;
/**
* @private
*/
readOnlyCollection: any;
private currentTarget;

@@ -32,2 +36,11 @@ /**

*/
formFieldCollections(): void;
updateFormFieldValues(formFields: any): void;
/**
* @private
*/
retriveFieldName(currentData: any): string;
/**
* @private
*/
downloadFormFieldsData(): any;

@@ -34,0 +47,0 @@ private focusFormFields;

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

// tslint:disable-next-line
this.readOnlyCollection = [];
/**
* @private
*/
// tslint:disable-next-line
this.nonFillableFields = {};

@@ -77,3 +82,65 @@ this.pdfViewer = viewer;

*/
FormFields.prototype.formFieldCollections = function () {
// tslint:disable-next-line
var data = window.sessionStorage.getItem(this.pdfViewerBase.documentId + '_formfields');
if (data !== null) {
// tslint:disable-next-line
var formFieldsData = JSON.parse(data);
for (var i = 0; i < formFieldsData.length; i++) {
// tslint:disable-next-line
var currentData = formFieldsData[i];
// tslint:disable-next-line
var type = currentData['Name'];
// tslint:disable-next-line
var formFieldCollection = { fieldName: this.retriveFieldName(currentData), id: this.pdfViewer.element.id + 'input_' + parseFloat(currentData['PageIndex']) + '_' + i, isReadOnly: false, type: type };
this.pdfViewer.formFieldCollections.push(formFieldCollection);
}
}
};
// tslint:disable-next-line
FormFields.prototype.updateFormFieldValues = function (formFields) {
this.readOnlyCollection.push(formFields.id);
if (formFields) {
// tslint:disable-next-line
var currentElement = document.getElementById(formFields.id);
if (currentElement) {
if (formFields.isReadOnly) {
currentElement.disabled = true;
currentElement.style.cursor = 'default';
}
else {
currentElement.disabled = false;
}
}
}
};
/**
* @private
*/
// tslint:disable-next-line
FormFields.prototype.retriveFieldName = function (currentData) {
// tslint:disable-next-line
var currentField;
// tslint:disable-next-line
switch (currentData['Name']) {
case 'Textbox':
case 'Password':
case 'SignatureField':
currentField = currentData.FieldName;
break;
case 'RadioButton':
case 'CheckBox':
currentField = currentData.GroupName;
break;
case 'DropDown':
case 'ListBox':
currentField = currentData.Text;
break;
}
return currentField;
};
/**
* @private
*/
// tslint:disable-next-line
FormFields.prototype.downloadFormFieldsData = function () {

@@ -86,66 +153,68 @@ // tslint:disable-next-line

var datas = {};
for (var m = 0; m < formFieldsData.length; m++) {
// tslint:disable-next-line
var currentData = formFieldsData[m];
if (currentData.Name === 'Textbox' || currentData.Name === 'Password' || currentData.Multiline) {
if (currentData.Text === '' || currentData.Text === null) {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.FieldName] = currentData.Text;
if (formFieldsData) {
for (var m = 0; m < formFieldsData.length; m++) {
// tslint:disable-next-line
var currentData = formFieldsData[m];
if (currentData.Name === 'Textbox' || currentData.Name === 'Password' || currentData.Multiline) {
if (currentData.Text === '' || currentData.Text === null) {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.FieldName] = currentData.Text;
}
else {
delete (this.nonFillableFields[currentData.FieldName]);
}
datas[currentData.FieldName] = currentData.Text;
}
else {
delete (this.nonFillableFields[currentData.FieldName]);
else if (currentData.Name === 'RadioButton' && currentData.Selected) {
if (currentData.Selected === false) {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.GroupName] = currentData.Value;
}
else {
delete (this.nonFillableFields[currentData.GroupName]);
}
datas[currentData.GroupName] = currentData.Value;
}
datas[currentData.FieldName] = currentData.Text;
}
else if (currentData.Name === 'RadioButton' && currentData.Selected) {
if (currentData.Selected === false) {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.GroupName] = currentData.Value;
else if (currentData.Name === 'CheckBox') {
if (currentData.Selected === false) {
this.pdfViewerBase.validateForm = true;
}
datas[currentData.GroupName] = currentData.Selected;
}
else {
delete (this.nonFillableFields[currentData.GroupName]);
else if (currentData.Name === 'DropDown') {
if (currentData.SelectedValue === '') {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.Text] = currentData.SelectedValue;
}
else {
delete (this.nonFillableFields[currentData.Text]);
}
datas[currentData.Text] = currentData.SelectedValue;
}
datas[currentData.GroupName] = currentData.Value;
}
else if (currentData.Name === 'CheckBox') {
if (currentData.Selected === false) {
this.pdfViewerBase.validateForm = true;
else if (currentData.Name === 'ListBox') {
// tslint:disable-next-line
var childItems = currentData['TextList'];
var childItemsText = [];
for (var m_1 = 0; m_1 < currentData.SelectedList.length; m_1++) {
// tslint:disable-next-line
var currentElement = currentData.SelectedList[m_1];
childItemsText.push(childItems[currentElement]);
}
datas[currentData.Text] = JSON.stringify(childItemsText);
}
datas[currentData.GroupName] = currentData.Selected;
}
else if (currentData.Name === 'DropDown') {
if (currentData.SelectedValue === '') {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.Text] = currentData.SelectedValue;
}
else {
delete (this.nonFillableFields[currentData.Text]);
}
datas[currentData.Text] = currentData.SelectedValue;
}
else if (currentData.Name === 'ListBox') {
// tslint:disable-next-line
var childItems = currentData['TextList'];
var childItemsText = [];
for (var m_1 = 0; m_1 < currentData.SelectedList.length; m_1++) {
else if (currentData.Name === 'SignatureField') {
// tslint:disable-next-line
var currentElement = currentData.SelectedList[m_1];
childItemsText.push(childItems[currentElement]);
var collectionData = processPathData(currentData.Value);
// tslint:disable-next-line
var csData = splitArrayCollection(collectionData);
if (currentData.Value === null || currentData.Value === '') {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.FieldName] = JSON.stringify(csData);
}
else {
delete (this.nonFillableFields[currentData.FieldName]);
}
datas[currentData.FieldName] = JSON.stringify(csData);
}
datas[currentData.Text] = JSON.stringify(childItemsText);
}
else if (currentData.Name === 'SignatureField') {
// tslint:disable-next-line
var collectionData = processPathData(currentData.Value);
// tslint:disable-next-line
var csData = splitArrayCollection(collectionData);
if (currentData.Value === null || currentData.Value === '') {
this.pdfViewerBase.validateForm = true;
this.nonFillableFields[currentData.FieldName] = JSON.stringify(csData);
}
else {
delete (this.nonFillableFields[currentData.FieldName]);
}
datas[currentData.FieldName] = JSON.stringify(csData);
}
}

@@ -459,3 +528,10 @@ return (JSON.stringify(datas));

FormFields.prototype.checkIsReadonly = function (data, inputField) {
if (data.IsReadonly || (!this.pdfViewer.enableFormFields)) {
var isReadonly = false;
for (var n = 0; n < this.readOnlyCollection.length; n++) {
if (inputField.id === this.readOnlyCollection[n]) {
isReadonly = true;
break;
}
}
if (data.IsReadonly || (!this.pdfViewer.enableFormFields) || isReadonly) {
inputField.disabled = true;

@@ -784,2 +860,3 @@ inputField.style.cursor = 'default';

this.currentTarget = null;
this.readOnlyCollection = [];
};

@@ -786,0 +863,0 @@ /**

@@ -373,3 +373,5 @@ import { Browser } from '@syncfusion/ej2-base';

}
this.isPagesZoomed = true;
if (!this.pdfViewerBase.documentLoaded) {
this.isPagesZoomed = true;
}
var scrollValue = this.getMagnifiedValue(this.pdfViewerBase.viewerContainer.scrollTop);

@@ -708,3 +710,8 @@ if (this.pdfViewer.textSelectionModule) {

var height = this.pdfViewerBase.pageSize[i].height * this.zoomFactor;
pageDiv.style.width = width + 'px';
if (this.pdfViewerBase.isMixedSizeDocument && this.pdfViewerBase.highestWidth > 0) {
pageDiv.style.width = (this.pdfViewerBase.highestWidth * this.zoomFactor) + 'px';
}
else {
pageDiv.style.width = width + 'px';
}
pageDiv.style.height = height + 'px';

@@ -752,2 +759,3 @@ // tslint:disable-next-line:max-line-length

}
this.pdfViewerBase.applyElementStyles(textLayer, i);
}

@@ -769,2 +777,3 @@ var adornerSvg = getDiagramElement(this.pdfViewer.element.id + '_textLayer_' + i);

this.pdfViewer.renderSelector(i, this.pdfViewer.annotationSelectorSettings);
this.pdfViewerBase.applyElementStyles(diagramAdornerLayer, i);
}

@@ -771,0 +780,0 @@ }

@@ -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, AnnotationResizerShape, AnnotationResizerLocation, ZoomMode, PrintMode, CursorType, ContextMenuItem } 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, AjaxRequestInitiateEventArgs } from './index';import { AnnotationAddEventArgs, AnnotationRemoveEventArgs, AnnotationPropertiesChangeEventArgs, AnnotationResizeEventArgs, AnnotationSelectEventArgs, AnnotationMoveEventArgs, AnnotationDoubleClickEventArgs, AnnotationMouseoverEventArgs, PageMouseoverEventArgs } from './index';import { TextSelectionStartEventArgs, TextSelectionEndEventArgs, DownloadStartEventArgs, DownloadEndEventArgs, ExtractTextCompletedEventArgs, PrintStartEventArgs, PrintEndEventArgs } from './index';import { TextSearchStartEventArgs, TextSearchCompleteEventArgs, TextSearchHighlightEventArgs } 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 { ValidateFormFieldsArgs } from './base';import { AddSignatureEventArgs, RemoveSignatureEventArgs, MoveSignatureEventArgs, SignaturePropertiesChangeEventArgs, ResizeSignatureEventArgs, SignatureSelectEventArgs } from './base';
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, ZoomMode, PrintMode, CursorType, ContextMenuItem, DynamicStampItem, SignStampItem, StandardBusinessStampItem } 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, AjaxRequestInitiateEventArgs } from './index';import { AnnotationAddEventArgs, AnnotationRemoveEventArgs, AnnotationPropertiesChangeEventArgs, AnnotationResizeEventArgs, AnnotationSelectEventArgs, AnnotationMoveEventArgs, AnnotationDoubleClickEventArgs, AnnotationMouseoverEventArgs, PageMouseoverEventArgs } from './index';import { TextSelectionStartEventArgs, TextSelectionEndEventArgs, DownloadStartEventArgs, DownloadEndEventArgs, ExtractTextCompletedEventArgs, PrintStartEventArgs, PrintEndEventArgs } from './index';import { TextSearchStartEventArgs, TextSearchCompleteEventArgs, TextSearchHighlightEventArgs } 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 { ValidateFormFieldsArgs } from './base';import { AddSignatureEventArgs, RemoveSignatureEventArgs, MoveSignatureEventArgs, SignaturePropertiesChangeEventArgs, ResizeSignatureEventArgs, SignatureSelectEventArgs } from './base';
import {IAjaxHeaders} from "./pdfviewer";

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

/**
* Interface for a class ScrollSettings
*/
export interface ScrollSettingsModel {
/**
* Increase or decrease the delay time.
*/
delayPageRequestTimeOnScroll?: number;
}
/**
* Interface for a class FormFieldCollections
*/
export interface FormFieldCollectionsModel {
/**
* fieldName of the form fields.
*/
fieldName?: string;
/**
* id of the form fields.
*/
id?: string;
/**
* type of the form fields.
*/
type?: string;
/**
* isReadOnly of the form fields.
*/
isReadOnly?: boolean;
}
/**
* Interface for a class StampItemSettings
*/
export interface StampItemSettingsModel {
/**
* Enable or disables the custom stamp of PdfViewer.
*/
enableCustomStamp?: boolean;
/**
* dynamic stamp item in the PdfViewer.
*/
dynamicStamps?: DynamicStampItem[];
/**
* sign stamp item in the PdfViewer.
*/
signStamps?: SignStampItem[];
/**
* standard business stamp item in the PdfViewer.
*/
standardBusinessStamps?: StandardBusinessStampItem[];
}
/**
* Interface for a class PdfViewer

@@ -1864,2 +1930,8 @@ */

/**
* restrict zoom request.
* @default false
*/
restrictZoomRequest?: boolean;
/**
* Specifies the open state of the hyperlink in the PDF document.

@@ -1883,2 +1955,8 @@ * @default CurrentTab

/**
* Defines the settings of the PdfViewer toolbar.
*/
// tslint:disable-next-line:max-line-length
formFieldCollections?: FormFieldCollectionsModel[];
/**
* Enable or disables the Navigation module of PdfViewer.

@@ -1944,2 +2022,8 @@ * @default true

/**
* Enable if the PDF document contains form fields.
* @default false
*/
isFormFieldsDocument?: boolean;
/**
* Enable or disable the free text annotation in the Pdfviewer.

@@ -2195,2 +2279,13 @@ * @default true

/**
* Defines the settings of the PdfViewer toolbar.
*/
// tslint:disable-next-line:max-line-length
stampItemSettings?: StampItemSettingsModel;
/**
* Defines the scroll settings.
*/
scrollSettings?: ScrollSettingsModel;
/**
* Defines the collection of selected items, size and position of the selector

@@ -2197,0 +2292,0 @@ * @default {}

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

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