@syncfusion/ej2-pdfviewer 17.3.57-4568 → 17.3.59-4568
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-pdfviewer.umd.min.js +1 -1
- package/dist/ej2-pdfviewer.umd.min.js.map +1 -1
- package/dist/es6/ej2-pdfviewer.es2015.js +42 -44
- package/dist/es6/ej2-pdfviewer.es2015.js.map +1 -1
- package/dist/es6/ej2-pdfviewer.es5.js +42 -44
- package/dist/es6/ej2-pdfviewer.es5.js.map +1 -1
- package/package.json +1 -1
- package/src/pdfviewer/annotation/annotation.js +3 -0
- package/src/pdfviewer/base/pdfviewer-base.d.ts +2 -0
- package/src/pdfviewer/base/pdfviewer-base.js +33 -10
- package/src/pdfviewer/magnification/magnification.d.ts +0 -1
- package/src/pdfviewer/magnification/magnification.js +2 -32
- package/src/pdfviewer/tagged-pdf/tagged-pdf.js +4 -2
- package/styles/bootstrap-dark.css +326 -10
- package/styles/bootstrap-dark.scss +4 -1
- package/styles/bootstrap.css +328 -10
- package/styles/bootstrap.scss +4 -1
- package/styles/bootstrap4.css +330 -11
- package/styles/bootstrap4.scss +4 -1
- package/styles/bootstrap5-dark.css +332 -13
- package/styles/bootstrap5-dark.scss +4 -1
- package/styles/bootstrap5.css +332 -13
- package/styles/bootstrap5.scss +4 -1
- package/styles/fabric-dark.css +326 -10
- package/styles/fabric-dark.scss +4 -1
- package/styles/fabric.css +328 -10
- package/styles/fabric.scss +4 -1
- package/styles/fluent-dark.css +328 -11
- package/styles/fluent-dark.scss +4 -1
- package/styles/fluent.css +328 -11
- package/styles/fluent.scss +4 -1
- package/styles/fluent2.css +4876 -0
- package/styles/fluent2.scss +4 -0
- package/styles/highcontrast-light.css +326 -10
- package/styles/highcontrast-light.scss +4 -1
- package/styles/highcontrast.css +326 -10
- package/styles/highcontrast.scss +4 -1
- package/styles/material-dark.css +326 -10
- package/styles/material-dark.scss +4 -1
- package/styles/material.css +326 -10
- package/styles/material.scss +4 -1
- package/styles/material3-dark.css +329 -14
- package/styles/material3-dark.scss +4 -1
- package/styles/material3.css +329 -14
- package/styles/material3.scss +4 -1
- package/styles/pdfviewer/_bds-definition.scss +6 -0
- package/styles/pdfviewer/_bootstrap-dark-definition.scss +6 -0
- package/styles/pdfviewer/_bootstrap-definition.scss +6 -0
- package/styles/pdfviewer/_bootstrap4-definition.scss +6 -0
- package/styles/pdfviewer/_bootstrap5-definition.scss +7 -1
- package/styles/pdfviewer/_fabric-dark-definition.scss +6 -0
- package/styles/pdfviewer/_fabric-definition.scss +6 -0
- package/styles/pdfviewer/_fluent-definition.scss +6 -0
- package/styles/pdfviewer/_fluent2-definition.scss +550 -0
- package/styles/pdfviewer/_fusionnew-definition.scss +6 -0
- package/styles/pdfviewer/_highcontrast-definition.scss +6 -0
- package/styles/pdfviewer/_highcontrast-light-definition.scss +6 -0
- package/styles/pdfviewer/_material-dark-definition.scss +12 -6
- package/styles/pdfviewer/_material-definition.scss +11 -5
- package/styles/pdfviewer/_material3-definition.scss +7 -1
- package/styles/pdfviewer/_tailwind-definition.scss +7 -1
- package/styles/pdfviewer/_theme.scss +764 -34
- package/styles/pdfviewer/bootstrap-dark.css +326 -10
- package/styles/pdfviewer/bootstrap.css +328 -10
- package/styles/pdfviewer/bootstrap4.css +330 -11
- package/styles/pdfviewer/bootstrap5-dark.css +332 -13
- package/styles/pdfviewer/bootstrap5.css +332 -13
- package/styles/pdfviewer/fabric-dark.css +326 -10
- package/styles/pdfviewer/fabric.css +328 -10
- package/styles/pdfviewer/fluent-dark.css +328 -11
- package/styles/pdfviewer/fluent.css +328 -11
- package/styles/pdfviewer/fluent2.css +4876 -0
- package/styles/pdfviewer/fluent2.scss +4 -0
- package/styles/pdfviewer/highcontrast-light.css +326 -10
- package/styles/pdfviewer/highcontrast.css +326 -10
- package/styles/pdfviewer/icons/_bds.scss +511 -0
- package/styles/pdfviewer/icons/_bootstrap-dark.scss +22 -0
- package/styles/pdfviewer/icons/_bootstrap.scss +22 -0
- package/styles/pdfviewer/icons/_bootstrap4.scss +22 -0
- package/styles/pdfviewer/icons/_bootstrap5.scss +23 -3
- package/styles/pdfviewer/icons/_fabric-dark.scss +22 -0
- package/styles/pdfviewer/icons/_fabric.scss +22 -0
- package/styles/pdfviewer/icons/_fluent.scss +23 -1
- package/styles/pdfviewer/icons/_fluent2.scss +510 -0
- package/styles/pdfviewer/icons/_fusionnew.scss +23 -1
- package/styles/pdfviewer/icons/_highcontrast-light.scss +22 -0
- package/styles/pdfviewer/icons/_highcontrast.scss +22 -0
- package/styles/pdfviewer/icons/_material-dark.scss +22 -0
- package/styles/pdfviewer/icons/_material.scss +22 -0
- package/styles/pdfviewer/icons/_material3.scss +23 -1
- package/styles/pdfviewer/icons/_tailwind-dark.scss +22 -0
- package/styles/pdfviewer/icons/_tailwind.scss +22 -0
- package/styles/pdfviewer/material-dark.css +326 -10
- package/styles/pdfviewer/material.css +326 -10
- package/styles/pdfviewer/material3-dark.css +329 -14
- package/styles/pdfviewer/material3.css +329 -14
- package/styles/pdfviewer/tailwind-dark.css +327 -11
- package/styles/pdfviewer/tailwind.css +327 -11
- package/styles/tailwind-dark.css +327 -11
- package/styles/tailwind-dark.scss +4 -1
- package/styles/tailwind.css +327 -11
- package/styles/tailwind.scss +4 -1
|
@@ -4298,6 +4298,9 @@ var Annotation = /** @class */ (function () {
|
|
|
4298
4298
|
// tslint:disable-next-line
|
|
4299
4299
|
var sessionSize = Math.round(JSON.stringify(window.sessionStorage).length / 1024);
|
|
4300
4300
|
var maxSessionSize = 4500;
|
|
4301
|
+
if (this.pdfViewerBase.isDeviceiOS || this.pdfViewerBase.isMacSafari) {
|
|
4302
|
+
maxSessionSize = 2000;
|
|
4303
|
+
}
|
|
4301
4304
|
if (sessionSize > maxSessionSize) {
|
|
4302
4305
|
var storageLength = window.sessionStorage.length;
|
|
4303
4306
|
// tslint:disable-next-line
|
|
@@ -18003,12 +18006,12 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
18003
18006
|
* @private
|
|
18004
18007
|
*/
|
|
18005
18008
|
// eslint-disable-next-line
|
|
18006
|
-
this.isDeviceiOS =
|
|
18009
|
+
this.isDeviceiOS = false;
|
|
18007
18010
|
/**
|
|
18008
18011
|
* @private
|
|
18009
18012
|
*/
|
|
18010
18013
|
// eslint-disable-next-line
|
|
18011
|
-
this.isMacSafari =
|
|
18014
|
+
this.isMacSafari = false;
|
|
18012
18015
|
/**
|
|
18013
18016
|
* @private
|
|
18014
18017
|
*/
|
|
@@ -18017,6 +18020,8 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
18017
18020
|
this.isGotoPageEnabled = false;
|
|
18018
18021
|
this.taggedTextHandler = null;
|
|
18019
18022
|
this.taggedCollection = [];
|
|
18023
|
+
this.isScrollerMoving = false;
|
|
18024
|
+
this.isScrollerMovingTimer = null;
|
|
18020
18025
|
this.clearSessionStorage = function () {
|
|
18021
18026
|
var documentId = window.sessionStorage.getItem('hashId');
|
|
18022
18027
|
var documentLiveCount = window.sessionStorage.getItem('documentLiveCount');
|
|
@@ -19009,9 +19014,21 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
19009
19014
|
if (_this.isThumb) {
|
|
19010
19015
|
_this.ispageMoved = true;
|
|
19011
19016
|
event.preventDefault();
|
|
19017
|
+
_this.isScrollerMoving = true;
|
|
19012
19018
|
_this.mobilePageNoContainer.style.display = 'block';
|
|
19013
19019
|
scrollposX = event.touches[0].pageX - _this.scrollX;
|
|
19014
19020
|
scrollposY = event.touches[0].pageY - _this.viewerContainer.offsetTop;
|
|
19021
|
+
if (isNullOrUndefined(_this.isScrollerMovingTimer)) {
|
|
19022
|
+
_this.isScrollerMovingTimer = setTimeout(function () {
|
|
19023
|
+
_this.isScrollerMoving = false;
|
|
19024
|
+
_this.pageViewScrollChanged(_this.currentPageNumber);
|
|
19025
|
+
}, 300);
|
|
19026
|
+
}
|
|
19027
|
+
var differenceY = Math.abs(_this.viewerContainer.scrollTop - (scrollposY * ratio));
|
|
19028
|
+
if (differenceY > 10) {
|
|
19029
|
+
clearTimeout(_this.isScrollerMovingTimer);
|
|
19030
|
+
_this.isScrollerMovingTimer = null;
|
|
19031
|
+
}
|
|
19015
19032
|
_this.viewerContainer.scrollTop = scrollposY * ratio;
|
|
19016
19033
|
// tslint:disable-next-line
|
|
19017
19034
|
var containerValue = event.touches[0].pageY;
|
|
@@ -19126,8 +19143,6 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
19126
19143
|
this.textLayer = new TextLayer(this.pdfViewer, this);
|
|
19127
19144
|
this.taggedPdf = new TaggedPDF(this.pdfViewer, this);
|
|
19128
19145
|
this.signatureModule = new Signature(this.pdfViewer, this);
|
|
19129
|
-
// tslint:disable-next-line:max-line-length
|
|
19130
|
-
this.isWebkitMobile = /Chrome/.test(navigator.userAgent) || /Google Inc/.test(navigator.vendor) || (navigator.userAgent.indexOf('Safari') !== -1);
|
|
19131
19146
|
}
|
|
19132
19147
|
/**
|
|
19133
19148
|
* @private
|
|
@@ -19272,6 +19287,7 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
19272
19287
|
PdfViewerBase.prototype.mobileScrollContainerDown = function (event) {
|
|
19273
19288
|
this.ispageMoved = false;
|
|
19274
19289
|
this.isThumb = true;
|
|
19290
|
+
this.isScrollerMoving = false;
|
|
19275
19291
|
if (this.isTextMarkupAnnotationModule()) {
|
|
19276
19292
|
if (this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage != null && Browser.isDevice) {
|
|
19277
19293
|
var pageNumber = this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage;
|
|
@@ -19345,6 +19361,8 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
19345
19361
|
}
|
|
19346
19362
|
this.isThumb = false;
|
|
19347
19363
|
this.ispageMoved = false;
|
|
19364
|
+
this.isScrollerMoving = false;
|
|
19365
|
+
this.pageViewScrollChanged(this.currentPageNumber);
|
|
19348
19366
|
this.mobileScrollerContainer.removeEventListener('touchmove', this.viewerContainerOnScroll.bind(this), true);
|
|
19349
19367
|
this.mobilePageNoContainer.style.display = 'none';
|
|
19350
19368
|
};
|
|
@@ -20386,6 +20404,9 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
20386
20404
|
};
|
|
20387
20405
|
PdfViewerBase.prototype.wireEvents = function () {
|
|
20388
20406
|
var _this = this;
|
|
20407
|
+
this.isDeviceiOS = (['iPad Simulator', 'iPhone Simulator', 'iPod Simulator', 'iPad', 'iPhone', 'iPod'].includes(navigator.platform) || (navigator.userAgent.includes("Mac") && "ontouchend" in document));
|
|
20408
|
+
this.isMacSafari = navigator.userAgent.indexOf("Safari") > -1 && navigator.userAgent.indexOf("Chrome") === -1 && !this.isDeviceiOS;
|
|
20409
|
+
this.isWebkitMobile = /Chrome/.test(navigator.userAgent) || /Google Inc/.test(navigator.vendor) || (navigator.userAgent.indexOf('Safari') !== -1) || (navigator.userAgent.indexOf('WebKit') !== -1);
|
|
20389
20410
|
this.viewerContainer.addEventListener('scroll', this.viewerContainerOnScroll, true);
|
|
20390
20411
|
if (Browser.isDevice) {
|
|
20391
20412
|
this.viewerContainer.addEventListener('touchmove', this.viewerContainerOnScroll, true);
|
|
@@ -21653,7 +21674,7 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
21653
21674
|
if (this.isDataExits && !this.getStoredData(currentPageIndex)) {
|
|
21654
21675
|
isSkip = true;
|
|
21655
21676
|
}
|
|
21656
|
-
if (this.renderedPagesList.indexOf(currentPageIndex) === -1 && !this.getMagnified() && !isSkip) {
|
|
21677
|
+
if (this.renderedPagesList.indexOf(currentPageIndex) === -1 && !this.getMagnified() && !isSkip && !this.isScrollerMoving) {
|
|
21657
21678
|
this.createRequestForRender(currentPageIndex);
|
|
21658
21679
|
this.renderCountIncrement();
|
|
21659
21680
|
}
|
|
@@ -21666,7 +21687,7 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
21666
21687
|
isSkip = true;
|
|
21667
21688
|
}
|
|
21668
21689
|
if (canvas !== null && !isSkip) {
|
|
21669
|
-
if (this.renderedPagesList.indexOf(previous) === -1 && !this.getMagnified()) {
|
|
21690
|
+
if (this.renderedPagesList.indexOf(previous) === -1 && !this.getMagnified() && !this.isScrollerMoving) {
|
|
21670
21691
|
this.createRequestForRender(previous);
|
|
21671
21692
|
this.renderCountIncrement();
|
|
21672
21693
|
}
|
|
@@ -21678,7 +21699,7 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
21678
21699
|
var pageHeight = 0;
|
|
21679
21700
|
if (next < this.pageCount) {
|
|
21680
21701
|
pageHeight = this.getPageHeight(next);
|
|
21681
|
-
if ((this.renderedPagesList.indexOf(next) === -1 || this.isMinimumZoom) && !this.getMagnified()) {
|
|
21702
|
+
if ((this.renderedPagesList.indexOf(next) === -1 || this.isMinimumZoom) && !this.getMagnified() && !this.isScrollerMoving) {
|
|
21682
21703
|
if (this.renderedPagesList.indexOf(next) === -1) {
|
|
21683
21704
|
this.createRequestForRender(next);
|
|
21684
21705
|
this.renderCountIncrement();
|
|
@@ -22475,6 +22496,11 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
22475
22496
|
// tslint:disable-next-line
|
|
22476
22497
|
var sessionSize = Math.round(JSON.stringify(window.sessionStorage).length / 1024);
|
|
22477
22498
|
var maxSessionSize = 5000;
|
|
22499
|
+
var maxSessionLength = 200;
|
|
22500
|
+
if (this.isDeviceiOS || this.isMacSafari) {
|
|
22501
|
+
maxSessionSize = 2000;
|
|
22502
|
+
maxSessionLength = 80;
|
|
22503
|
+
}
|
|
22478
22504
|
if (sessionSize >= maxSessionSize) {
|
|
22479
22505
|
if (!this.isStorageExceed) {
|
|
22480
22506
|
// tslint:disable-next-line
|
|
@@ -22496,10 +22522,10 @@ var PdfViewerBase = /** @class */ (function () {
|
|
|
22496
22522
|
}
|
|
22497
22523
|
this.isStorageExceed = true;
|
|
22498
22524
|
sessionSize = Math.round(JSON.stringify(window.sessionStorage).length / 1024);
|
|
22499
|
-
if (sessionSize >=
|
|
22525
|
+
if (sessionSize >= maxSessionSize) {
|
|
22500
22526
|
var storageLength = window.sessionStorage.length;
|
|
22501
|
-
if (storageLength >
|
|
22502
|
-
storageLength =
|
|
22527
|
+
if (storageLength > maxSessionLength) {
|
|
22528
|
+
storageLength = maxSessionLength;
|
|
22503
22529
|
}
|
|
22504
22530
|
for (var i = 0; i < storageLength; i++) {
|
|
22505
22531
|
if (window.sessionStorage.key(i) && window.sessionStorage.key(i).split('_')[3]) {
|
|
@@ -26489,12 +26515,9 @@ var Magnification = /** @class */ (function () {
|
|
|
26489
26515
|
* @private
|
|
26490
26516
|
*/
|
|
26491
26517
|
this.isDoubleTapZoom = false;
|
|
26492
|
-
this.isWebkitMobile = false;
|
|
26493
26518
|
this.pdfViewer = pdfViewer;
|
|
26494
26519
|
this.pdfViewerBase = viewerBase;
|
|
26495
26520
|
this.zoomLevel = 2;
|
|
26496
|
-
// tslint:disable-next-line:max-line-length
|
|
26497
|
-
this.isWebkitMobile = /Chrome/.test(navigator.userAgent) || /Google Inc/.test(navigator.vendor) || (navigator.userAgent.indexOf('Safari') !== -1);
|
|
26498
26521
|
}
|
|
26499
26522
|
/**
|
|
26500
26523
|
* Zoom the PDF document to the given zoom value
|
|
@@ -26587,7 +26610,7 @@ var Magnification = /** @class */ (function () {
|
|
|
26587
26610
|
this.isAutoZoom = false;
|
|
26588
26611
|
this.onZoomChanged(zoomValue);
|
|
26589
26612
|
if (Browser.isDevice) {
|
|
26590
|
-
if (this.isWebkitMobile) {
|
|
26613
|
+
if (this.pdfViewerBase.isWebkitMobile) {
|
|
26591
26614
|
this.pdfViewerBase.viewerContainer.style.overflowY = 'auto';
|
|
26592
26615
|
}
|
|
26593
26616
|
else {
|
|
@@ -26749,7 +26772,7 @@ var Magnification = /** @class */ (function () {
|
|
|
26749
26772
|
this.pdfViewerBase.isMinimumZoom = false;
|
|
26750
26773
|
}
|
|
26751
26774
|
if (Browser.isDevice) {
|
|
26752
|
-
if (this.isWebkitMobile) {
|
|
26775
|
+
if (this.pdfViewerBase.isWebkitMobile) {
|
|
26753
26776
|
this.pdfViewerBase.viewerContainer.style.overflowY = 'auto';
|
|
26754
26777
|
}
|
|
26755
26778
|
else {
|
|
@@ -27316,33 +27339,6 @@ var Magnification = /** @class */ (function () {
|
|
|
27316
27339
|
aElement[index].parentNode.removeChild(aElement[index]);
|
|
27317
27340
|
}
|
|
27318
27341
|
}
|
|
27319
|
-
if (textLayer) {
|
|
27320
|
-
textLayer.style.width = width + 'px';
|
|
27321
|
-
textLayer.style.height = height + 'px';
|
|
27322
|
-
if (this.pdfViewer.textSelectionModule) {
|
|
27323
|
-
if (this.isPinchZoomed) {
|
|
27324
|
-
textLayer.style.display = 'none';
|
|
27325
|
-
}
|
|
27326
|
-
else if (this.isMagnified) {
|
|
27327
|
-
var lowerValue = ((pageNumber - 2) === 0) ? 0 : (pageNumber - 2);
|
|
27328
|
-
// eslint-disable-next-line max-len
|
|
27329
|
-
var higherValue = ((pageNumber) === (this.pdfViewerBase.pageCount)) ? (this.pdfViewerBase.pageCount - 1) : (pageNumber + 1);
|
|
27330
|
-
if ((lowerValue <= i) && (i <= higherValue) && ((this.pdfViewer.textSelectionModule.isTextSelection && isSelectionAvailable) || this.pdfViewerBase.textLayer.getTextSearchStatus() || this.pdfViewerBase.isInitialPageMode)) {
|
|
27331
|
-
this.pdfViewerBase.textLayer.resizeTextContentsOnZoom(i);
|
|
27332
|
-
if (this.pdfViewer.textSelectionModule.isTextSelection && isSelectionAvailable) {
|
|
27333
|
-
this.pdfViewer.textSelectionModule.applySelectionRangeOnScroll(i);
|
|
27334
|
-
}
|
|
27335
|
-
}
|
|
27336
|
-
else {
|
|
27337
|
-
textLayer.style.display = 'none';
|
|
27338
|
-
}
|
|
27339
|
-
}
|
|
27340
|
-
else {
|
|
27341
|
-
textLayer.style.display = 'none';
|
|
27342
|
-
}
|
|
27343
|
-
}
|
|
27344
|
-
this.pdfViewerBase.applyElementStyles(textLayer, i);
|
|
27345
|
-
}
|
|
27346
27342
|
var adornerSvg = getDiagramElement(this.pdfViewer.element.id + '_textLayer_' + i);
|
|
27347
27343
|
if (adornerSvg) {
|
|
27348
27344
|
var adonerLayer = getDiagramElement(this.pdfViewer.element.id + i + '_diagramAdorner_svg');
|
|
@@ -42203,8 +42199,10 @@ var TaggedPDF = /** @class */ (function () {
|
|
|
42203
42199
|
if (text.trim() != "") {
|
|
42204
42200
|
textTag.innerText = text;
|
|
42205
42201
|
}
|
|
42206
|
-
if (
|
|
42207
|
-
|
|
42202
|
+
if (tagType === "Image" || tagType === "Figure") {
|
|
42203
|
+
if (altText && altText.trim() !== "") {
|
|
42204
|
+
textTag.alt = altText;
|
|
42205
|
+
}
|
|
42208
42206
|
textTag.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=";
|
|
42209
42207
|
}
|
|
42210
42208
|
if (childTags && childTags.length > 0) {
|