@pdftools/four-heights-pdf-web-viewer 4.3.6
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/LICENSE.md +446 -0
- package/README.md +145 -0
- package/css/pdf-web-viewer.css +2407 -0
- package/doc/PdfWebViewer.pdf +0 -0
- package/es6/common/Checkbox.d.ts +9 -0
- package/es6/common/Checkbox.js +8 -0
- package/es6/common/Color.d.ts +23 -0
- package/es6/common/Color.js +118 -0
- package/es6/common/ColorPicker.d.ts +15 -0
- package/es6/common/ColorPicker.js +46 -0
- package/es6/common/Contextbar.d.ts +6 -0
- package/es6/common/Contextbar.js +19 -0
- package/es6/common/DragMoveHandler.d.ts +51 -0
- package/es6/common/DragMoveHandler.js +175 -0
- package/es6/common/Dropdown.d.ts +36 -0
- package/es6/common/Dropdown.js +76 -0
- package/es6/common/DropdownMenu.d.ts +9 -0
- package/es6/common/DropdownMenu.js +10 -0
- package/es6/common/DropdownSeparator.d.ts +3 -0
- package/es6/common/DropdownSeparator.js +6 -0
- package/es6/common/Icon.d.ts +13 -0
- package/es6/common/Icon.js +8 -0
- package/es6/common/Loader.d.ts +3 -0
- package/es6/common/Loader.js +6 -0
- package/es6/common/RangeSlider.d.ts +17 -0
- package/es6/common/RangeSlider.js +42 -0
- package/es6/common/StrokeStylePicker.d.ts +11 -0
- package/es6/common/StrokeStylePicker.js +20 -0
- package/es6/common/StrokeWidthPicker.d.ts +11 -0
- package/es6/common/StrokeWidthPicker.js +20 -0
- package/es6/common/Toolbar.d.ts +10 -0
- package/es6/common/Toolbar.js +6 -0
- package/es6/common/ToolbarButton.d.ts +14 -0
- package/es6/common/ToolbarButton.js +21 -0
- package/es6/common/ToolbarFileButton.d.ts +15 -0
- package/es6/common/ToolbarFileButton.js +27 -0
- package/es6/common/ToolbarItemGroup.d.ts +8 -0
- package/es6/common/ToolbarItemGroup.js +12 -0
- package/es6/common/ToolbarSeparator.d.ts +3 -0
- package/es6/common/ToolbarSeparator.js +6 -0
- package/es6/common/Tools.d.ts +10 -0
- package/es6/common/Tools.js +89 -0
- package/es6/common/TooltipManager.d.ts +12 -0
- package/es6/common/TooltipManager.js +54 -0
- package/es6/common/TranslationManager.d.ts +11 -0
- package/es6/common/TranslationManager.js +61 -0
- package/es6/common/classNames.d.ts +2 -0
- package/es6/common/classNames.js +18 -0
- package/es6/common/formatDate.d.ts +1 -0
- package/es6/common/formatDate.js +1 -0
- package/es6/common/icons.d.ts +13 -0
- package/es6/common/icons.js +412 -0
- package/es6/common/utils.d.ts +2 -0
- package/es6/common/utils.js +19 -0
- package/es6/custom/history.d.ts +2 -0
- package/es6/custom/history.js +59 -0
- package/es6/index.d.ts +5 -0
- package/es6/index.js +5 -0
- package/es6/lib/hyperapp/index.d.ts +108 -0
- package/es6/lib/hyperapp/index.js +327 -0
- package/es6/modules/CanvasLayer.d.ts +32 -0
- package/es6/modules/CanvasLayer.js +83 -0
- package/es6/modules/CanvasModule.d.ts +59 -0
- package/es6/modules/CanvasModule.js +98 -0
- package/es6/modules/eraser/EraserLayer.d.ts +13 -0
- package/es6/modules/eraser/EraserLayer.js +141 -0
- package/es6/modules/eraser/EraserModule.d.ts +19 -0
- package/es6/modules/eraser/EraserModule.js +34 -0
- package/es6/modules/eraser/EraserToolbar.d.ts +10 -0
- package/es6/modules/eraser/EraserToolbar.js +30 -0
- package/es6/modules/form-fields/CheckBoxWidget.d.ts +9 -0
- package/es6/modules/form-fields/CheckBoxWidget.js +45 -0
- package/es6/modules/form-fields/ComboBoxWidget.d.ts +22 -0
- package/es6/modules/form-fields/ComboBoxWidget.js +152 -0
- package/es6/modules/form-fields/EditFormFieldLayer.d.ts +17 -0
- package/es6/modules/form-fields/EditFormFieldLayer.js +238 -0
- package/es6/modules/form-fields/FormFieldModule.d.ts +15 -0
- package/es6/modules/form-fields/FormFieldModule.js +27 -0
- package/es6/modules/form-fields/ListBoxWidget.d.ts +9 -0
- package/es6/modules/form-fields/ListBoxWidget.js +73 -0
- package/es6/modules/form-fields/RadioButtonWidget.d.ts +9 -0
- package/es6/modules/form-fields/RadioButtonWidget.js +45 -0
- package/es6/modules/form-fields/SelectListWidget.d.ts +9 -0
- package/es6/modules/form-fields/SelectListWidget.js +45 -0
- package/es6/modules/form-fields/TextBoxWidget.d.ts +9 -0
- package/es6/modules/form-fields/TextBoxWidget.js +53 -0
- package/es6/modules/form-fields/WidgetBase.d.ts +23 -0
- package/es6/modules/form-fields/WidgetBase.js +29 -0
- package/es6/modules/freetext-annotation/AddFreetextAnnotationLayer.d.ts +19 -0
- package/es6/modules/freetext-annotation/AddFreetextAnnotationLayer.js +181 -0
- package/es6/modules/freetext-annotation/AddFreetextAnnotationToolbar.d.ts +21 -0
- package/es6/modules/freetext-annotation/AddFreetextAnnotationToolbar.js +37 -0
- package/es6/modules/freetext-annotation/EditFreetextAnnotationLayer.d.ts +20 -0
- package/es6/modules/freetext-annotation/EditFreetextAnnotationLayer.js +211 -0
- package/es6/modules/freetext-annotation/EditFreetextAnnotationToolbar.d.ts +50 -0
- package/es6/modules/freetext-annotation/EditFreetextAnnotationToolbar.js +118 -0
- package/es6/modules/freetext-annotation/FreetextAnnotationModule.d.ts +28 -0
- package/es6/modules/freetext-annotation/FreetextAnnotationModule.js +58 -0
- package/es6/modules/freetext-annotation/RichTextEditor.d.ts +31 -0
- package/es6/modules/freetext-annotation/RichTextEditor.js +223 -0
- package/es6/modules/highlight-annotation/AddHighlightAnnotationLayer.d.ts +31 -0
- package/es6/modules/highlight-annotation/AddHighlightAnnotationLayer.js +289 -0
- package/es6/modules/highlight-annotation/AddHighlightAnnotationToolbar.d.ts +20 -0
- package/es6/modules/highlight-annotation/AddHighlightAnnotationToolbar.js +52 -0
- package/es6/modules/highlight-annotation/EditHighlightAnnotationLayer.d.ts +15 -0
- package/es6/modules/highlight-annotation/EditHighlightAnnotationLayer.js +104 -0
- package/es6/modules/highlight-annotation/EditHighlightAnnotationToolbar.d.ts +15 -0
- package/es6/modules/highlight-annotation/EditHighlightAnnotationToolbar.js +28 -0
- package/es6/modules/highlight-annotation/HighlightAnnotationModule.d.ts +27 -0
- package/es6/modules/highlight-annotation/HighlightAnnotationModule.js +54 -0
- package/es6/modules/image-annotations/ImageAnnotationModule.d.ts +23 -0
- package/es6/modules/image-annotations/ImageAnnotationModule.js +169 -0
- package/es6/modules/index.d.ts +13 -0
- package/es6/modules/index.js +13 -0
- package/es6/modules/ink-annotation/AddInkAnnotationLayer.d.ts +40 -0
- package/es6/modules/ink-annotation/AddInkAnnotationLayer.js +503 -0
- package/es6/modules/ink-annotation/AddInkAnnotationToolbar.d.ts +30 -0
- package/es6/modules/ink-annotation/AddInkAnnotationToolbar.js +53 -0
- package/es6/modules/ink-annotation/EditInkAnnotationLayer.d.ts +20 -0
- package/es6/modules/ink-annotation/EditInkAnnotationLayer.js +137 -0
- package/es6/modules/ink-annotation/EditInkAnnotationToolbar.d.ts +25 -0
- package/es6/modules/ink-annotation/EditInkAnnotationToolbar.js +47 -0
- package/es6/modules/ink-annotation/InkAnnotationModule.d.ts +27 -0
- package/es6/modules/ink-annotation/InkAnnotationModule.js +50 -0
- package/es6/modules/popup/Popup.d.ts +64 -0
- package/es6/modules/popup/Popup.js +360 -0
- package/es6/modules/popup/PopupLayer.d.ts +31 -0
- package/es6/modules/popup/PopupLayer.js +509 -0
- package/es6/modules/popup/PopupModule.d.ts +16 -0
- package/es6/modules/popup/PopupModule.js +25 -0
- package/es6/modules/print-service/PrintServiceDialog.d.ts +30 -0
- package/es6/modules/print-service/PrintServiceDialog.js +134 -0
- package/es6/modules/print-service/PrintServiceLayer.d.ts +24 -0
- package/es6/modules/print-service/PrintServiceLayer.js +310 -0
- package/es6/modules/print-service/PrintServiceModule.d.ts +18 -0
- package/es6/modules/print-service/PrintServiceModule.js +30 -0
- package/es6/modules/shape-annotations/AddShapeAnnotationLayer.d.ts +24 -0
- package/es6/modules/shape-annotations/AddShapeAnnotationLayer.js +210 -0
- package/es6/modules/shape-annotations/AddShapeAnnotationToolbar.d.ts +26 -0
- package/es6/modules/shape-annotations/AddShapeAnnotationToolbar.js +69 -0
- package/es6/modules/shape-annotations/EditShapeAnnotationLayer.d.ts +19 -0
- package/es6/modules/shape-annotations/EditShapeAnnotationLayer.js +148 -0
- package/es6/modules/shape-annotations/EditShapeAnnotationToolbar.d.ts +24 -0
- package/es6/modules/shape-annotations/EditShapeAnnotationToolbar.js +57 -0
- package/es6/modules/shape-annotations/ShapeAnnotationModule.d.ts +28 -0
- package/es6/modules/shape-annotations/ShapeAnnotationModule.js +50 -0
- package/es6/modules/stamp-annotation/AddStampAnnotationLayer.d.ts +19 -0
- package/es6/modules/stamp-annotation/AddStampAnnotationLayer.js +257 -0
- package/es6/modules/stamp-annotation/AddStampAnnotationToolbar.d.ts +17 -0
- package/es6/modules/stamp-annotation/AddStampAnnotationToolbar.js +68 -0
- package/es6/modules/stamp-annotation/StampAnnotationModule.d.ts +20 -0
- package/es6/modules/stamp-annotation/StampAnnotationModule.js +35 -0
- package/es6/modules/text-annotation/AddTextAnnotationLayer.d.ts +14 -0
- package/es6/modules/text-annotation/AddTextAnnotationLayer.js +132 -0
- package/es6/modules/text-annotation/AddTextAnnotationToolbar.d.ts +15 -0
- package/es6/modules/text-annotation/AddTextAnnotationToolbar.js +27 -0
- package/es6/modules/text-annotation/TextAnnotationModule.d.ts +19 -0
- package/es6/modules/text-annotation/TextAnnotationModule.js +34 -0
- package/es6/pdf-viewer-api/ImageContainer.d.ts +10 -0
- package/es6/pdf-viewer-api/ImageContainer.js +43 -0
- package/es6/pdf-viewer-api/PdfViewerApi.d.ts +463 -0
- package/es6/pdf-viewer-api/PdfViewerApi.js +732 -0
- package/es6/pdf-viewer-api/PdfViewingWrapper.d.ts +178 -0
- package/es6/pdf-viewer-api/PdfViewingWrapper.js +2037 -0
- package/es6/pdf-viewer-api/annotationDefaultBehaviors.d.ts +3 -0
- package/es6/pdf-viewer-api/annotationDefaultBehaviors.js +30 -0
- package/es6/pdf-viewer-api/enums.d.ts +100 -0
- package/es6/pdf-viewer-api/enums.js +113 -0
- package/es6/pdf-viewer-api/index.d.ts +3 -0
- package/es6/pdf-viewer-api/index.js +3 -0
- package/es6/pdf-viewer-api/types.d.ts +284 -0
- package/es6/pdf-viewer-api/types.js +6 -0
- package/es6/pdf-viewer-canvas/CanvasEvents.d.ts +76 -0
- package/es6/pdf-viewer-canvas/CanvasEvents.js +345 -0
- package/es6/pdf-viewer-canvas/PdfViewerCanvas.d.ts +175 -0
- package/es6/pdf-viewer-canvas/PdfViewerCanvas.js +1226 -0
- package/es6/pdf-viewer-canvas/state/annotations.d.ts +36 -0
- package/es6/pdf-viewer-canvas/state/annotations.js +157 -0
- package/es6/pdf-viewer-canvas/state/appState.d.ts +10 -0
- package/es6/pdf-viewer-canvas/state/appState.js +60 -0
- package/es6/pdf-viewer-canvas/state/canvas.d.ts +31 -0
- package/es6/pdf-viewer-canvas/state/canvas.js +41 -0
- package/es6/pdf-viewer-canvas/state/document.d.ts +50 -0
- package/es6/pdf-viewer-canvas/state/document.js +99 -0
- package/es6/pdf-viewer-canvas/state/pointer.d.ts +31 -0
- package/es6/pdf-viewer-canvas/state/pointer.js +31 -0
- package/es6/pdf-viewer-canvas/state/scroll.d.ts +22 -0
- package/es6/pdf-viewer-canvas/state/scroll.js +25 -0
- package/es6/pdf-viewer-canvas/state/search.d.ts +36 -0
- package/es6/pdf-viewer-canvas/state/search.js +27 -0
- package/es6/pdf-viewer-canvas/state/store.d.ts +39 -0
- package/es6/pdf-viewer-canvas/state/store.js +52 -0
- package/es6/pdf-viewer-canvas/state/viewer.d.ts +91 -0
- package/es6/pdf-viewer-canvas/state/viewer.js +175 -0
- package/es6/pdf-viewer-canvas/view-layers/AnnotationSelectionLayer.d.ts +28 -0
- package/es6/pdf-viewer-canvas/view-layers/AnnotationSelectionLayer.js +452 -0
- package/es6/pdf-viewer-canvas/view-layers/BusyStateLayer.d.ts +9 -0
- package/es6/pdf-viewer-canvas/view-layers/BusyStateLayer.js +25 -0
- package/es6/pdf-viewer-canvas/view-layers/PdfDocumentLayer.d.ts +10 -0
- package/es6/pdf-viewer-canvas/view-layers/PdfDocumentLayer.js +149 -0
- package/es6/pdf-viewer-canvas/view-layers/ScrollLayer.d.ts +48 -0
- package/es6/pdf-viewer-canvas/view-layers/ScrollLayer.js +308 -0
- package/es6/pdf-viewer-canvas/view-layers/TextSelectionLayer.d.ts +19 -0
- package/es6/pdf-viewer-canvas/view-layers/TextSelectionLayer.js +289 -0
- package/es6/pdf-viewer-canvas/view-layers/ViewLayerBase.d.ts +31 -0
- package/es6/pdf-viewer-canvas/view-layers/ViewLayerBase.js +106 -0
- package/es6/pdf-viewer-canvas/view-layers/canvasShapes.d.ts +11 -0
- package/es6/pdf-viewer-canvas/view-layers/canvasShapes.js +149 -0
- package/es6/pdf-viewer-canvas/view-layers/canvasUtlis.d.ts +3 -0
- package/es6/pdf-viewer-canvas/view-layers/canvasUtlis.js +10 -0
- package/es6/pdf-viewer-canvas/view-layers/views/AnnotationBorder.d.ts +52 -0
- package/es6/pdf-viewer-canvas/view-layers/views/AnnotationBorder.js +377 -0
- package/es6/pdf-viewer-canvas/view-layers/views/AnnotationContextBar.d.ts +47 -0
- package/es6/pdf-viewer-canvas/view-layers/views/AnnotationContextBar.js +102 -0
- package/es6/pdf-viewer-canvas/view-layers/views/TextSelectionContextBar.d.ts +14 -0
- package/es6/pdf-viewer-canvas/view-layers/views/TextSelectionContextBar.js +36 -0
- package/es6/pdf-viewing/PdfViewing.d.ts +4865 -0
- package/es6/pdf-viewing/PdfViewing.js +9611 -0
- package/es6/pdf-web-viewer/PdfWebViewer.d.ts +372 -0
- package/es6/pdf-web-viewer/PdfWebViewer.js +1386 -0
- package/es6/pdf-web-viewer/UserSettings.d.ts +8 -0
- package/es6/pdf-web-viewer/UserSettings.js +40 -0
- package/es6/pdf-web-viewer/WebViewerOptions.d.ts +387 -0
- package/es6/pdf-web-viewer/WebViewerOptions.js +582 -0
- package/es6/pdf-web-viewer/state/index.d.ts +80 -0
- package/es6/pdf-web-viewer/state/index.js +98 -0
- package/es6/pdf-web-viewer/state/layout.d.ts +24 -0
- package/es6/pdf-web-viewer/state/layout.js +21 -0
- package/es6/pdf-web-viewer/state/mobile.d.ts +16 -0
- package/es6/pdf-web-viewer/state/mobile.js +11 -0
- package/es6/pdf-web-viewer/state/navigationPanel.d.ts +61 -0
- package/es6/pdf-web-viewer/state/navigationPanel.js +84 -0
- package/es6/pdf-web-viewer/state/passwordForm.d.ts +18 -0
- package/es6/pdf-web-viewer/state/passwordForm.js +21 -0
- package/es6/pdf-web-viewer/state/pdfDocument.d.ts +31 -0
- package/es6/pdf-web-viewer/state/pdfDocument.js +41 -0
- package/es6/pdf-web-viewer/state/search.d.ts +29 -0
- package/es6/pdf-web-viewer/state/search.js +23 -0
- package/es6/pdf-web-viewer/views/App.d.ts +4 -0
- package/es6/pdf-web-viewer/views/App.js +19 -0
- package/es6/pdf-web-viewer/views/CustomButtons.d.ts +9 -0
- package/es6/pdf-web-viewer/views/CustomButtons.js +18 -0
- package/es6/pdf-web-viewer/views/DropZone.d.ts +9 -0
- package/es6/pdf-web-viewer/views/DropZone.js +53 -0
- package/es6/pdf-web-viewer/views/Layout.d.ts +4 -0
- package/es6/pdf-web-viewer/views/Layout.js +22 -0
- package/es6/pdf-web-viewer/views/annotationbar/Annotationbar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/annotationbar/Annotationbar.js +21 -0
- package/es6/pdf-web-viewer/views/appbar/AddonsToolbar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/AddonsToolbar.js +35 -0
- package/es6/pdf-web-viewer/views/appbar/AnnotationsMenu.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/AnnotationsMenu.js +22 -0
- package/es6/pdf-web-viewer/views/appbar/AppBar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/AppBar.js +26 -0
- package/es6/pdf-web-viewer/views/appbar/DocumentBar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/DocumentBar.js +36 -0
- package/es6/pdf-web-viewer/views/appbar/Menu.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/Menu.js +80 -0
- package/es6/pdf-web-viewer/views/appbar/NavigationBar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/NavigationBar.js +74 -0
- package/es6/pdf-web-viewer/views/appbar/SearchBar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/SearchBar.js +83 -0
- package/es6/pdf-web-viewer/views/appbar/SearchOptions.d.ts +10 -0
- package/es6/pdf-web-viewer/views/appbar/SearchOptions.js +55 -0
- package/es6/pdf-web-viewer/views/appbar/ViewBar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/ViewBar.js +52 -0
- package/es6/pdf-web-viewer/views/appbar/ZoomBar.d.ts +4 -0
- package/es6/pdf-web-viewer/views/appbar/ZoomBar.js +18 -0
- package/es6/pdf-web-viewer/views/modal/ApplicationError.d.ts +4 -0
- package/es6/pdf-web-viewer/views/modal/ApplicationError.js +25 -0
- package/es6/pdf-web-viewer/views/modal/LoadApplication.d.ts +3 -0
- package/es6/pdf-web-viewer/views/modal/LoadApplication.js +6 -0
- package/es6/pdf-web-viewer/views/modal/LoadFile.d.ts +3 -0
- package/es6/pdf-web-viewer/views/modal/LoadFile.js +10 -0
- package/es6/pdf-web-viewer/views/modal/Modal.d.ts +4 -0
- package/es6/pdf-web-viewer/views/modal/Modal.js +39 -0
- package/es6/pdf-web-viewer/views/modal/OpenFile.d.ts +4 -0
- package/es6/pdf-web-viewer/views/modal/OpenFile.js +30 -0
- package/es6/pdf-web-viewer/views/modal/OpenFileError.d.ts +4 -0
- package/es6/pdf-web-viewer/views/modal/OpenFileError.js +13 -0
- package/es6/pdf-web-viewer/views/modal/PasswordForm.d.ts +4 -0
- package/es6/pdf-web-viewer/views/modal/PasswordForm.js +54 -0
- package/es6/pdf-web-viewer/views/modal/SaveFile.d.ts +4 -0
- package/es6/pdf-web-viewer/views/modal/SaveFile.js +10 -0
- package/es6/pdf-web-viewer/views/modal/UnsavedChanges.d.ts +4 -0
- package/es6/pdf-web-viewer/views/modal/UnsavedChanges.js +32 -0
- package/es6/pdf-web-viewer/views/navigation/AnnotationList.d.ts +8 -0
- package/es6/pdf-web-viewer/views/navigation/AnnotationList.js +26 -0
- package/es6/pdf-web-viewer/views/navigation/AnnotationListItem.d.ts +8 -0
- package/es6/pdf-web-viewer/views/navigation/AnnotationListItem.js +158 -0
- package/es6/pdf-web-viewer/views/navigation/AnnotationNavigation.d.ts +4 -0
- package/es6/pdf-web-viewer/views/navigation/AnnotationNavigation.js +11 -0
- package/es6/pdf-web-viewer/views/navigation/NavigationPanel.d.ts +4 -0
- package/es6/pdf-web-viewer/views/navigation/NavigationPanel.js +50 -0
- package/es6/pdf-web-viewer/views/navigation/OutlineList.d.ts +12 -0
- package/es6/pdf-web-viewer/views/navigation/OutlineList.js +19 -0
- package/es6/pdf-web-viewer/views/navigation/OutlineNavigation.d.ts +4 -0
- package/es6/pdf-web-viewer/views/navigation/OutlineNavigation.js +10 -0
- package/es6/pdf-web-viewer/views/navigation/ThumbnailNavigation.d.ts +16 -0
- package/es6/pdf-web-viewer/views/navigation/ThumbnailNavigation.js +32 -0
- package/package.json +24 -0
- package/pdfwebviewer/PdfViewing.data +0 -0
- package/pdfwebviewer/PdfViewing_Main.js +1 -0
- package/pdfwebviewer/PdfViewing_Main.wasm +0 -0
- package/pdfwebviewer/PdfViewing_Worker.js +1 -0
- package/pdfwebviewer/PdfViewing_Worker.wasm +0 -0
- package/pdfwebviewer/pdf-web-viewer.css +2407 -0
- package/pdfwebviewer/pdf-web-viewer.development.js +25955 -0
- package/pdfwebviewer/pdf-web-viewer.min.js +1 -0
- package/pdfwebviewer/translations.de.json +151 -0
- package/pdfwebviewer/translations.en.json +151 -0
- package/pdfwebviewer/translations.fr.json +151 -0
- package/pdfwebviewer/translations.it.json +151 -0
- package/scss/common/_breakpoints.scss +44 -0
- package/scss/common/_buttons.scss +42 -0
- package/scss/common/_colorpicker.scss +89 -0
- package/scss/common/_common.scss +21 -0
- package/scss/common/_contextbar.scss +44 -0
- package/scss/common/_dropdown.scss +176 -0
- package/scss/common/_icon.scss +9 -0
- package/scss/common/_index.scss +19 -0
- package/scss/common/_loader.scss +30 -0
- package/scss/common/_rangeslider.scss +24 -0
- package/scss/common/_scrollbars.scss +64 -0
- package/scss/common/_stroke-style-picker.scss +64 -0
- package/scss/common/_stroke-width-picker.scss +23 -0
- package/scss/common/_toolbar.scss +117 -0
- package/scss/common/_tooltip.scss +39 -0
- package/scss/modules/_eraser.scss +28 -0
- package/scss/modules/_forms.scss +56 -0
- package/scss/modules/_highlightannotation.scss +12 -0
- package/scss/modules/_index.scss +5 -0
- package/scss/modules/_inkannotation.scss +41 -0
- package/scss/modules/_stampannotation.scss +19 -0
- package/scss/pdf-viewer-canvas/_annotationborder.scss +107 -0
- package/scss/pdf-viewer-canvas/_busy-loader.scss +53 -0
- package/scss/pdf-viewer-canvas/_freetexteditor.scss +28 -0
- package/scss/pdf-viewer-canvas/_index.scss +7 -0
- package/scss/pdf-viewer-canvas/_layout.scss +52 -0
- package/scss/pdf-viewer-canvas/_popup.scss +217 -0
- package/scss/pdf-viewer-canvas/_printservice.scss +171 -0
- package/scss/pdf-viewer-canvas/_textselection.scss +17 -0
- package/scss/pdf-web-viewer/_annotationbar.scss +47 -0
- package/scss/pdf-web-viewer/_index.scss +8 -0
- package/scss/pdf-web-viewer/_layout.scss +63 -0
- package/scss/pdf-web-viewer/_modal.scss +186 -0
- package/scss/pdf-web-viewer/_navigationpanel.scss +398 -0
- package/scss/pdf-web-viewer/_searchbar.scss +47 -0
- package/scss/pdf-web-viewer/_toolbar.scss +134 -0
- package/scss/pdf-web-viewer/_viewer.scss +54 -0
- package/scss/pdf-web-viewer.scss +1 -0
- package/scss/themes/default/_light.scss +32 -0
- package/scss/themes/default/_mixins.scss +129 -0
- package/scss/themes/default/_theme.scss +161 -0
- package/scss/themes/pdf-web-viewer.scss +1 -0
- package/umd/pdf-web-viewer.development.js +25955 -0
- package/umd/pdf-web-viewer.development.js.map +1 -0
- package/umd/pdf-web-viewer.min.js +1 -0
- package/wasm/PdfViewing.data +0 -0
- package/wasm/PdfViewing_Main.js +1 -0
- package/wasm/PdfViewing_Main.wasm +0 -0
- package/wasm/PdfViewing_Worker.js +1 -0
- package/wasm/PdfViewing_Worker.wasm +0 -0
- package/wasm/translations.de.json +151 -0
- package/wasm/translations.en.json +151 -0
- package/wasm/translations.fr.json +151 -0
- package/wasm/translations.it.json +151 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { CanvasLayer } from '../CanvasLayer';
|
|
2
|
+
import { AnnotationBorderStyle } from '../../pdf-viewer-api';
|
|
3
|
+
import { createEditInkAnnotationToolbar, } from './EditInkAnnotationToolbar';
|
|
4
|
+
import { Color } from '../../common/Color';
|
|
5
|
+
const moduleLayerName = 'EditInkAnnotation';
|
|
6
|
+
export class EditInkAnnotationLayer extends CanvasLayer {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.inkAnnotation = null;
|
|
10
|
+
this.context = null;
|
|
11
|
+
this.penColors = [];
|
|
12
|
+
this.penWidths = [];
|
|
13
|
+
this.toolbar = null;
|
|
14
|
+
this.updatePending = false;
|
|
15
|
+
this.unsavedChanges = false;
|
|
16
|
+
}
|
|
17
|
+
onCreate(annotationId) {
|
|
18
|
+
var _a;
|
|
19
|
+
this.inkAnnotation = this.pdfApi.getItem(annotationId);
|
|
20
|
+
this.setPenColor = this.setPenColor.bind(this);
|
|
21
|
+
this.setPenSize = this.setPenSize.bind(this);
|
|
22
|
+
this.setPenOpacity = this.setPenOpacity.bind(this);
|
|
23
|
+
this.close = this.close.bind(this);
|
|
24
|
+
const annotationOptions = this.options.annotation;
|
|
25
|
+
this.penColors = annotationOptions.colors.foregroundColors;
|
|
26
|
+
this.penWidths = annotationOptions.strokeWidths;
|
|
27
|
+
this.context = this.createCanvas();
|
|
28
|
+
const color = new Color(this.inkAnnotation.color || annotationOptions.colors.inkColor);
|
|
29
|
+
const penSize = ((_a = this.inkAnnotation) === null || _a === void 0 ? void 0 : _a.border.width) || annotationOptions.inkWidth;
|
|
30
|
+
/* tslint:disable-next-line:align */
|
|
31
|
+
const toolbarElement = this.module.toolbarElement;
|
|
32
|
+
this.toolbar = createEditInkAnnotationToolbar({
|
|
33
|
+
penColors: this.penColors,
|
|
34
|
+
penWidths: this.penWidths,
|
|
35
|
+
selectedPenColor: color.toHexRgb(),
|
|
36
|
+
selectedPenSize: penSize,
|
|
37
|
+
penOpacity: color.a * 100,
|
|
38
|
+
onPenColorChanged: this.setPenColor,
|
|
39
|
+
onPenSizeChanged: this.setPenSize,
|
|
40
|
+
onPenOpacityChanged: this.setPenOpacity,
|
|
41
|
+
onCancel: this.remove,
|
|
42
|
+
}, toolbarElement);
|
|
43
|
+
this.store.viewer.beginModule(moduleLayerName);
|
|
44
|
+
}
|
|
45
|
+
onSave() {
|
|
46
|
+
return new Promise((resolve) => resolve);
|
|
47
|
+
}
|
|
48
|
+
onRemove() {
|
|
49
|
+
this.removeCanvasElements();
|
|
50
|
+
this.context = null;
|
|
51
|
+
/* tslint:disable-next-line:align */
|
|
52
|
+
const toolbarElement = this.module.toolbarElement;
|
|
53
|
+
toolbarElement.innerHTML = '';
|
|
54
|
+
this.store.viewer.endModule(moduleLayerName);
|
|
55
|
+
}
|
|
56
|
+
render(timestamp, state) {
|
|
57
|
+
var _a;
|
|
58
|
+
if (state.viewer.modeChanged && state.viewer.selectedModuleName !== moduleLayerName) {
|
|
59
|
+
this.remove();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (state.pointer.action === 'click' || state.pointer.action === 'dblclick') {
|
|
63
|
+
const inkAnnotation = (_a = this.pdfApi
|
|
64
|
+
.getAnnotationsOnPoint({
|
|
65
|
+
x: state.pointer.x.devicePixels,
|
|
66
|
+
y: state.pointer.y.devicePixels,
|
|
67
|
+
})) === null || _a === void 0 ? void 0 : _a.find((a) => this.inkAnnotation && a.id === this.inkAnnotation.id);
|
|
68
|
+
if (!inkAnnotation) {
|
|
69
|
+
this.close();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (this.context && this.inkAnnotation) {
|
|
74
|
+
const ctx = this.context;
|
|
75
|
+
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
|
|
76
|
+
const rect = this.pdfApi.transformPdfPageRectToScreenRect(this.inkAnnotation.pdfRect);
|
|
77
|
+
const lineWidth = 2 * devicePixelRatio;
|
|
78
|
+
ctx.save();
|
|
79
|
+
ctx.strokeStyle = this.options.viewer.general.textSelectionColor;
|
|
80
|
+
ctx.lineWidth = lineWidth;
|
|
81
|
+
ctx.setLineDash([lineWidth, lineWidth]);
|
|
82
|
+
ctx.strokeRect(rect.x - lineWidth, rect.y - lineWidth, rect.w + 2 * lineWidth, rect.h + 2 * lineWidth);
|
|
83
|
+
ctx.restore();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
close() {
|
|
87
|
+
this.remove();
|
|
88
|
+
}
|
|
89
|
+
setPenColor(color) {
|
|
90
|
+
if (this.inkAnnotation && this.inkAnnotation.color) {
|
|
91
|
+
const newColor = new Color(color);
|
|
92
|
+
const currentColor = new Color(this.inkAnnotation.color);
|
|
93
|
+
newColor.setOpacity(currentColor.a);
|
|
94
|
+
this.inkAnnotation.color = newColor.toHexRgba();
|
|
95
|
+
this.updateInkAnnotation();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
setPenSize(size) {
|
|
99
|
+
if (this.inkAnnotation) {
|
|
100
|
+
this.inkAnnotation.border = {
|
|
101
|
+
style: AnnotationBorderStyle.SOLID,
|
|
102
|
+
width: size,
|
|
103
|
+
};
|
|
104
|
+
this.updateInkAnnotation();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
setPenOpacity(opacity) {
|
|
108
|
+
if (this.inkAnnotation && this.inkAnnotation.color) {
|
|
109
|
+
const rgbaColor = new Color(this.inkAnnotation.color);
|
|
110
|
+
rgbaColor.setOpacity(opacity / 100);
|
|
111
|
+
this.inkAnnotation.color = rgbaColor.toHexRgba();
|
|
112
|
+
this.updateInkAnnotation();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
updateInkAnnotation() {
|
|
116
|
+
if (this.pdfApi && this.inkAnnotation) {
|
|
117
|
+
if (this.updatePending) {
|
|
118
|
+
this.unsavedChanges = true;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.updatePending = true;
|
|
122
|
+
this.pdfApi
|
|
123
|
+
.updateItem(this.inkAnnotation)
|
|
124
|
+
.then((item) => {
|
|
125
|
+
this.updatePending = false;
|
|
126
|
+
if (this.unsavedChanges) {
|
|
127
|
+
this.unsavedChanges = false;
|
|
128
|
+
this.updateInkAnnotation();
|
|
129
|
+
}
|
|
130
|
+
})
|
|
131
|
+
.catch((error) => {
|
|
132
|
+
console.warn(error);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface EditInkAnnotationToolbarProps {
|
|
2
|
+
penColors: string[];
|
|
3
|
+
penWidths: number[];
|
|
4
|
+
selectedPenColor: string;
|
|
5
|
+
selectedPenSize: number;
|
|
6
|
+
penOpacity: number;
|
|
7
|
+
onPenColorChanged(color: string): void;
|
|
8
|
+
onPenSizeChanged(width: number): void;
|
|
9
|
+
onPenOpacityChanged(width: number): void;
|
|
10
|
+
onCancel(): void;
|
|
11
|
+
}
|
|
12
|
+
interface EditInkAnnotationToolbarState {
|
|
13
|
+
penColors: string[];
|
|
14
|
+
penWidths: number[];
|
|
15
|
+
selectedPenColor: string;
|
|
16
|
+
selectedPenSize: number;
|
|
17
|
+
penOpacity: number;
|
|
18
|
+
}
|
|
19
|
+
export interface EditInkAnnotationToolbarActions {
|
|
20
|
+
setPenColor(color: string): EditInkAnnotationToolbarState;
|
|
21
|
+
setPenSize(size: number): EditInkAnnotationToolbarState;
|
|
22
|
+
setPenOpacity(opacity: number): EditInkAnnotationToolbarState;
|
|
23
|
+
}
|
|
24
|
+
export declare const createEditInkAnnotationToolbar: (props: EditInkAnnotationToolbarProps, element: HTMLElement) => EditInkAnnotationToolbarActions;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { app, h } from '../../lib/hyperapp';
|
|
2
|
+
import { translationManager } from '../../common/TranslationManager';
|
|
3
|
+
import { Toolbar } from '../../common/Toolbar';
|
|
4
|
+
import { ToolbarItemGroup } from '../../common/ToolbarItemGroup';
|
|
5
|
+
import { ToolbarButton } from '../../common/ToolbarButton';
|
|
6
|
+
import { icons } from '../../common/icons';
|
|
7
|
+
import { ToolbarSeparator } from '../../common/ToolbarSeparator';
|
|
8
|
+
import { StrokeWidthPicker } from '../../common/StrokeWidthPicker';
|
|
9
|
+
import { RangeSlider } from '../../common/RangeSlider';
|
|
10
|
+
import { ColorPicker } from '../../common/ColorPicker';
|
|
11
|
+
export const createEditInkAnnotationToolbar = (props, element) => {
|
|
12
|
+
const state = {
|
|
13
|
+
penColors: props.penColors,
|
|
14
|
+
penWidths: props.penWidths,
|
|
15
|
+
selectedPenColor: props.selectedPenColor,
|
|
16
|
+
selectedPenSize: props.selectedPenSize,
|
|
17
|
+
penOpacity: props.penOpacity,
|
|
18
|
+
};
|
|
19
|
+
const actions = {
|
|
20
|
+
setPenColor: (color) => ($state) => {
|
|
21
|
+
props.onPenColorChanged(color);
|
|
22
|
+
return Object.assign(Object.assign({}, $state), { selectedPenColor: color });
|
|
23
|
+
},
|
|
24
|
+
setPenSize: (width) => ($state) => {
|
|
25
|
+
props.onPenSizeChanged(width);
|
|
26
|
+
return Object.assign(Object.assign({}, $state), { selectedPenSize: width });
|
|
27
|
+
},
|
|
28
|
+
setPenOpacity: (opacity) => ($state) => {
|
|
29
|
+
props.onPenOpacityChanged(opacity);
|
|
30
|
+
return Object.assign(Object.assign({}, $state), { penOpacity: opacity });
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
const App = () => h(EditInkAnnotationToolbar, null);
|
|
34
|
+
const EditInkAnnotationToolbar = ({}) => ($state, $actions) => {
|
|
35
|
+
const strokeWidths = $state.penWidths.filter((w) => w > 0);
|
|
36
|
+
return (h(Toolbar, { allowWrap: true, alignCenter: true },
|
|
37
|
+
h(ToolbarItemGroup, null,
|
|
38
|
+
h(ColorPicker, { colors: $state.penColors, color: $state.selectedPenColor, icon: icons.fillColor, allowRgba: false, mode: "buttons", onChange: $actions.setPenColor })),
|
|
39
|
+
h(ToolbarItemGroup, null,
|
|
40
|
+
h(RangeSlider, { tooltip: translationManager.getText('annotFreeDrawing.opacity'), min: 10, max: 100, step: 1, value: $state.penOpacity, text: `${Math.round($state.penOpacity)}%`, icon: icons.drop, onChange: $actions.setPenOpacity, className: "pwv-opacityslider" }),
|
|
41
|
+
h(StrokeWidthPicker, { tooltip: translationManager.getText('annotFreeDrawing.strokeWidth'), noneStrokeText: '', strokeWidths: strokeWidths, value: $state.selectedPenSize, onChange: $actions.setPenSize })),
|
|
42
|
+
h(ToolbarItemGroup, { pushRight: true },
|
|
43
|
+
h(ToolbarSeparator, null),
|
|
44
|
+
h(ToolbarButton, { icon: icons.close, onClick: props.onCancel }))));
|
|
45
|
+
};
|
|
46
|
+
return app(state, actions, App, element);
|
|
47
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CanvasModule, CanvasModuleType } from '../CanvasModule';
|
|
2
|
+
import { PdfItemType } from '../../pdf-viewer-api';
|
|
3
|
+
export declare class InkAnnotationModule extends CanvasModule {
|
|
4
|
+
toolbarElement: HTMLElement | null;
|
|
5
|
+
static moduleInfo: {
|
|
6
|
+
name: string;
|
|
7
|
+
moduleType: CanvasModuleType;
|
|
8
|
+
requiredFeatures: {
|
|
9
|
+
annotate: boolean;
|
|
10
|
+
fillFormFields: boolean;
|
|
11
|
+
};
|
|
12
|
+
translationKey: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
};
|
|
15
|
+
constructor();
|
|
16
|
+
onRegister(): {
|
|
17
|
+
toolbar: HTMLElement;
|
|
18
|
+
contextbar: {
|
|
19
|
+
itemTypes: PdfItemType[];
|
|
20
|
+
icon: import("../../common/icons").IconDefinition;
|
|
21
|
+
tooltip: string;
|
|
22
|
+
onCmd: (annotationId: number) => void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
activate(): void;
|
|
26
|
+
onEdit(annotationId: number): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CanvasModule, CanvasModuleType } from '../CanvasModule';
|
|
2
|
+
import { AddInkAnnotationLayer } from './AddInkAnnotationLayer';
|
|
3
|
+
import { EditInkAnnotationLayer } from './EditInkAnnotationLayer';
|
|
4
|
+
import { PdfItemType } from '../../pdf-viewer-api';
|
|
5
|
+
import { icons } from '../../common/Icon';
|
|
6
|
+
import { translationManager } from '../../common/TranslationManager';
|
|
7
|
+
export class InkAnnotationModule extends CanvasModule {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.toolbarElement = null;
|
|
11
|
+
this.name = InkAnnotationModule.moduleInfo.name;
|
|
12
|
+
this.activate = this.activate.bind(this);
|
|
13
|
+
this.onEdit = this.onEdit.bind(this);
|
|
14
|
+
}
|
|
15
|
+
onRegister() {
|
|
16
|
+
this.toolbarElement = document.createElement('div');
|
|
17
|
+
return {
|
|
18
|
+
toolbar: this.toolbarElement,
|
|
19
|
+
contextbar: {
|
|
20
|
+
itemTypes: [PdfItemType.INK],
|
|
21
|
+
icon: icons.edit,
|
|
22
|
+
tooltip: translationManager.getText('annotInk.edit'),
|
|
23
|
+
onCmd: (annotationId) => {
|
|
24
|
+
this.onEdit(annotationId);
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
activate() {
|
|
30
|
+
if (!this.canvasLayers['add']) {
|
|
31
|
+
this.createCanvasLayer('add', AddInkAnnotationLayer);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this.removeCanvasLayer('add');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
onEdit(annotationId) {
|
|
38
|
+
this.createCanvasLayer('edit', EditInkAnnotationLayer, annotationId);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
InkAnnotationModule.moduleInfo = {
|
|
42
|
+
name: 'InkAnnotationModule',
|
|
43
|
+
moduleType: CanvasModuleType.Tool,
|
|
44
|
+
requiredFeatures: {
|
|
45
|
+
annotate: true,
|
|
46
|
+
fillFormFields: false,
|
|
47
|
+
},
|
|
48
|
+
translationKey: 'annotFreeDrawing.add',
|
|
49
|
+
icon: 'pencil',
|
|
50
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AnnotationBehaviors, PdfItemType, PdfRect } from '../../pdf-viewer-api';
|
|
2
|
+
/** internal */
|
|
3
|
+
export interface PopupViewProps {
|
|
4
|
+
maxPopupWidth: number;
|
|
5
|
+
maxPopupHeight: number;
|
|
6
|
+
minPopupWidth: number;
|
|
7
|
+
minPopupHeight: number;
|
|
8
|
+
currentUser: string;
|
|
9
|
+
hideSubject: boolean;
|
|
10
|
+
allowLockAnnotations: boolean;
|
|
11
|
+
allowEditLockedAnnotations: boolean;
|
|
12
|
+
onSelect: (id: number) => void;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
onDelete: (id: number) => void;
|
|
15
|
+
onUpdatePosition: (id: number, top: number, left: number) => void;
|
|
16
|
+
onUpdateSize: (id: number, width: number, height: number) => void;
|
|
17
|
+
onUpdateColor: (id: number, color: string) => void;
|
|
18
|
+
onLock: (id: number) => void;
|
|
19
|
+
}
|
|
20
|
+
/** internal */
|
|
21
|
+
export interface Popup {
|
|
22
|
+
id: number;
|
|
23
|
+
colorPalette: string[];
|
|
24
|
+
content: string;
|
|
25
|
+
subject: string | null;
|
|
26
|
+
color: string | null;
|
|
27
|
+
isLocked: boolean;
|
|
28
|
+
selected: boolean;
|
|
29
|
+
itemType: PdfItemType;
|
|
30
|
+
positionCalculated: boolean;
|
|
31
|
+
modificationDate: Date | null;
|
|
32
|
+
author: string;
|
|
33
|
+
pdfRect: PdfRect;
|
|
34
|
+
cssWidth: number;
|
|
35
|
+
cssHeight: number;
|
|
36
|
+
behaviors: AnnotationBehaviors;
|
|
37
|
+
isReadOnly: () => boolean;
|
|
38
|
+
}
|
|
39
|
+
interface PopupViewState {
|
|
40
|
+
selectedPopup: number | null;
|
|
41
|
+
openPopups: Popup[];
|
|
42
|
+
maxPopupWidth: number;
|
|
43
|
+
maxPopupHeight: number;
|
|
44
|
+
minPopupWidth: number;
|
|
45
|
+
minPopupHeight: number;
|
|
46
|
+
currentUser: string;
|
|
47
|
+
activeContent: string | null;
|
|
48
|
+
activeSubject: string | null;
|
|
49
|
+
clearFocus: boolean;
|
|
50
|
+
stateChanged: boolean;
|
|
51
|
+
hideSubject: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface PopupViewActions {
|
|
54
|
+
getState(): PopupViewState;
|
|
55
|
+
updateOpenPopups(openPopups: Popup[]): PopupViewState;
|
|
56
|
+
setPositionCalculated(id: number): PopupViewState;
|
|
57
|
+
selectPopup(id: number): PopupViewState;
|
|
58
|
+
setFocus(id: number): PopupViewState;
|
|
59
|
+
deselectPopup(): PopupViewState;
|
|
60
|
+
updateSubjectAndContent(id: number): PopupViewState;
|
|
61
|
+
stateChanged(hasChanged: boolean): PopupViewState;
|
|
62
|
+
}
|
|
63
|
+
export declare const createPopupView: (props: PopupViewProps, element: HTMLElement) => PopupViewActions;
|
|
64
|
+
export {};
|