@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,582 @@
|
|
|
1
|
+
import { UserSettings } from './UserSettings';
|
|
2
|
+
import { FreetextAnnotationModule, HighlightAnnotationModule, ImageAnnotationModule, InkAnnotationModule, PopupModule, ShapeAnnotationModule, StampAnnotationModule, TextAnnotationModule, PrintServiceModule, EraserModule, FormFieldModule, } from '../modules';
|
|
3
|
+
import { PdfPageLayoutMode, StampAnnotationColor, } from '../pdf-viewer-api';
|
|
4
|
+
export const defaultAnnotationColorOptions = {
|
|
5
|
+
highlightColors: ['#2ADB1A', '#FFEA02', '#FF7F1F', '#FF2882', '#008AD1'],
|
|
6
|
+
foregroundColors: ['#323232', '#FFFFFF', '#FFEA02', '#2ADB1A', '#0066CC', '#D82F32'],
|
|
7
|
+
backgroundColors: ['#FFFFFF', '#FCF5E2', '#323232', '#FFEA02', '#D82F32', '#0066CC'],
|
|
8
|
+
defaultHighlightColor: '#FFEA02',
|
|
9
|
+
defaultBackgroundColor: '#FCF5E2',
|
|
10
|
+
defaultForegroundColor: '#323232',
|
|
11
|
+
};
|
|
12
|
+
export const defaultAnnotationFontOptions = {
|
|
13
|
+
fontFamilies: ['Helvetica', 'Times', 'Courier', 'Symbol', 'ZapfDingbats'],
|
|
14
|
+
fontSizes: [9, 10, 12, 14, 16, 18, 20, 24],
|
|
15
|
+
defaultFontFamily: 'Helvetica',
|
|
16
|
+
defaultFontSize: 12,
|
|
17
|
+
};
|
|
18
|
+
export const defaultAnnotationStamps = [
|
|
19
|
+
{ translation_key: 'stamptext.approved', color: StampAnnotationColor.GREEN },
|
|
20
|
+
{ translation_key: 'stamptext.notApproved', color: StampAnnotationColor.RED },
|
|
21
|
+
{ translation_key: 'stamptext.draft', color: StampAnnotationColor.BLUE },
|
|
22
|
+
{ translation_key: 'stamptext.final', color: StampAnnotationColor.GREEN },
|
|
23
|
+
{ translation_key: 'stamptext.completed', color: StampAnnotationColor.GREEN },
|
|
24
|
+
{
|
|
25
|
+
translation_key: 'stamptext.confidential',
|
|
26
|
+
color: StampAnnotationColor.BLUE,
|
|
27
|
+
},
|
|
28
|
+
{ translation_key: 'stamptext.forPublic', color: StampAnnotationColor.BLUE },
|
|
29
|
+
{
|
|
30
|
+
translation_key: 'stamptext.notForPublic',
|
|
31
|
+
color: StampAnnotationColor.BLUE,
|
|
32
|
+
},
|
|
33
|
+
{ translation_key: 'stamptext.void', color: StampAnnotationColor.RED },
|
|
34
|
+
{ translation_key: 'stamptext.forComment', color: StampAnnotationColor.BLUE },
|
|
35
|
+
{
|
|
36
|
+
translation_key: 'stamptext.preliminaryResults',
|
|
37
|
+
color: StampAnnotationColor.BLUE,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
translation_key: 'stamptext.informationOnly',
|
|
41
|
+
color: StampAnnotationColor.BLUE,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
export const defaultAnnotationOptions = {
|
|
45
|
+
colors: defaultAnnotationColorOptions,
|
|
46
|
+
stamps: defaultAnnotationStamps,
|
|
47
|
+
fonts: defaultAnnotationFontOptions,
|
|
48
|
+
highlightOpacity: 0.5,
|
|
49
|
+
strokeWidths: [0, 1, 2, 3, 5, 8, 13, 21],
|
|
50
|
+
defaultStampWidth: 120,
|
|
51
|
+
defaultBorderWidth: 1,
|
|
52
|
+
eraserRadius: 5,
|
|
53
|
+
hideAnnotationSubject: false,
|
|
54
|
+
trackHistory: false,
|
|
55
|
+
onlyAuthorCanEdit: false,
|
|
56
|
+
hideOnDelete: false,
|
|
57
|
+
selectedStamp: 0,
|
|
58
|
+
};
|
|
59
|
+
export const defaultGeneralOptions = {
|
|
60
|
+
user: '',
|
|
61
|
+
language: 'en',
|
|
62
|
+
annotationBarPosition: 'left',
|
|
63
|
+
promptOnUnsavedChange: true,
|
|
64
|
+
searchMatchColor: '#3ABCFF',
|
|
65
|
+
textSelectionColor: '#006395',
|
|
66
|
+
rectangularTextSelection: 'none',
|
|
67
|
+
pageShadow: {
|
|
68
|
+
shadowBlur: 4,
|
|
69
|
+
shadowColor: 'rgba(90,90,90,0.2)',
|
|
70
|
+
shadowOffsetX: 0,
|
|
71
|
+
shadowOffsetY: 0,
|
|
72
|
+
},
|
|
73
|
+
pageLayoutModes: [
|
|
74
|
+
PdfPageLayoutMode.ONE_COLUMN,
|
|
75
|
+
PdfPageLayoutMode.SINGLE_PAGE,
|
|
76
|
+
PdfPageLayoutMode.TWO_COLUMN_LEFT,
|
|
77
|
+
PdfPageLayoutMode.TWO_COLUMN_RIGHT,
|
|
78
|
+
PdfPageLayoutMode.TWO_PAGE_LEFT,
|
|
79
|
+
PdfPageLayoutMode.TWO_PAGE_RIGHT,
|
|
80
|
+
],
|
|
81
|
+
defaultZoomLevels: [
|
|
82
|
+
0.1, 0.15, 0.2, 0.25, 0.35, 0.4, 0.5, 0.65, 0.8, 1, 1.25, 1.5, 2.0, 2.5, 3.0, 4.0,
|
|
83
|
+
],
|
|
84
|
+
tooltips: 'title',
|
|
85
|
+
viewOnly: false,
|
|
86
|
+
disableMainToolbar: false,
|
|
87
|
+
disableAnnotationToolbar: false,
|
|
88
|
+
hidePasswordFormCancelButton: false,
|
|
89
|
+
};
|
|
90
|
+
export const defaultKeyboardShortcuts = {
|
|
91
|
+
zoomIn: { key: '+' },
|
|
92
|
+
zoomOut: { key: '-' },
|
|
93
|
+
nextPage: { key: 'PageDown' },
|
|
94
|
+
previousPage: { key: 'PageUp' },
|
|
95
|
+
firstPage: { key: 'Home' },
|
|
96
|
+
lastPage: { key: 'End' },
|
|
97
|
+
scrollUp: { key: 'ArrowUp' },
|
|
98
|
+
scrollDown: { key: 'ArrowDown' },
|
|
99
|
+
scrollLeft: { key: 'ArrowLeft' },
|
|
100
|
+
scrollRight: { key: 'ArrowRight' },
|
|
101
|
+
releaseSelection: { key: 'Escape' },
|
|
102
|
+
copy: {
|
|
103
|
+
key: 'c',
|
|
104
|
+
ctrlKey: true,
|
|
105
|
+
},
|
|
106
|
+
copyMac: {
|
|
107
|
+
key: 'c',
|
|
108
|
+
superKey: true,
|
|
109
|
+
},
|
|
110
|
+
print: {
|
|
111
|
+
key: 'p',
|
|
112
|
+
ctrlKey: true,
|
|
113
|
+
},
|
|
114
|
+
cancelPrint: {
|
|
115
|
+
key: 'Escape',
|
|
116
|
+
},
|
|
117
|
+
resetZoom: {
|
|
118
|
+
key: 'z',
|
|
119
|
+
altKey: true,
|
|
120
|
+
},
|
|
121
|
+
fitToPage: {
|
|
122
|
+
key: 'p',
|
|
123
|
+
altKey: true,
|
|
124
|
+
},
|
|
125
|
+
fitToWidth: {
|
|
126
|
+
key: 'w',
|
|
127
|
+
altKey: true,
|
|
128
|
+
},
|
|
129
|
+
rotateView: {
|
|
130
|
+
key: 'r',
|
|
131
|
+
altKey: true,
|
|
132
|
+
},
|
|
133
|
+
save: {
|
|
134
|
+
key: 's',
|
|
135
|
+
ctrlKey: true,
|
|
136
|
+
},
|
|
137
|
+
search: {
|
|
138
|
+
key: 'f',
|
|
139
|
+
ctrlKey: true,
|
|
140
|
+
},
|
|
141
|
+
searchNext: { key: 'F3' },
|
|
142
|
+
searchPrevious: {
|
|
143
|
+
key: 'F3',
|
|
144
|
+
shiftKey: true,
|
|
145
|
+
},
|
|
146
|
+
closeSearch: { key: 'Escape' },
|
|
147
|
+
toggleSidePane: {
|
|
148
|
+
key: 's',
|
|
149
|
+
altKey: true,
|
|
150
|
+
},
|
|
151
|
+
showAnnotations: {
|
|
152
|
+
key: 'a',
|
|
153
|
+
altKey: true,
|
|
154
|
+
},
|
|
155
|
+
showOutline: {
|
|
156
|
+
key: 'o',
|
|
157
|
+
altKey: true,
|
|
158
|
+
},
|
|
159
|
+
showThumbnails: {
|
|
160
|
+
key: 't',
|
|
161
|
+
altKey: true,
|
|
162
|
+
},
|
|
163
|
+
cancelEditAnnotation: { key: 'Escape' },
|
|
164
|
+
};
|
|
165
|
+
export const defaultSidebarOptions = {
|
|
166
|
+
annotationNavigation: true,
|
|
167
|
+
thumbnailNavigation: true,
|
|
168
|
+
outlineNavigation: true,
|
|
169
|
+
};
|
|
170
|
+
export const defaultFormsOptions = {
|
|
171
|
+
enabled: true,
|
|
172
|
+
};
|
|
173
|
+
export const defaultPermissions = {
|
|
174
|
+
allowOpenFile: true,
|
|
175
|
+
allowCloseFile: false,
|
|
176
|
+
allowFileDrop: true,
|
|
177
|
+
allowPrinting: false,
|
|
178
|
+
allowSaveFile: true,
|
|
179
|
+
allowCopyText: true,
|
|
180
|
+
allowRotateView: true,
|
|
181
|
+
allowLockAnnotations: true,
|
|
182
|
+
allowEditLockedAnnotations: false,
|
|
183
|
+
allowRotatePages: true,
|
|
184
|
+
allowExternalLinks: true,
|
|
185
|
+
enablePageLayoutMode: true,
|
|
186
|
+
enableSearch: true,
|
|
187
|
+
};
|
|
188
|
+
export const defaultViewerOptions = {
|
|
189
|
+
general: defaultGeneralOptions,
|
|
190
|
+
sidebar: defaultSidebarOptions,
|
|
191
|
+
permissions: defaultPermissions,
|
|
192
|
+
callbacks: {},
|
|
193
|
+
customButtons: {
|
|
194
|
+
annotationbar: [],
|
|
195
|
+
documentbar: [],
|
|
196
|
+
informationbar: [],
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
export const defaultViewerModules = [
|
|
200
|
+
PopupModule,
|
|
201
|
+
TextAnnotationModule,
|
|
202
|
+
InkAnnotationModule,
|
|
203
|
+
EraserModule,
|
|
204
|
+
FreetextAnnotationModule,
|
|
205
|
+
HighlightAnnotationModule,
|
|
206
|
+
StampAnnotationModule,
|
|
207
|
+
ShapeAnnotationModule,
|
|
208
|
+
ImageAnnotationModule,
|
|
209
|
+
];
|
|
210
|
+
export const defaultWebViewerOptions = {
|
|
211
|
+
viewer: defaultViewerOptions,
|
|
212
|
+
modules: defaultViewerModules,
|
|
213
|
+
annotation: defaultAnnotationOptions,
|
|
214
|
+
forms: defaultFormsOptions,
|
|
215
|
+
shortcuts: defaultKeyboardShortcuts,
|
|
216
|
+
};
|
|
217
|
+
export const OptionsToVerify = {
|
|
218
|
+
defaultHighlightAnnotationColor: 'highlightColors',
|
|
219
|
+
defaultFreetextBgColor: 'backgroundColors',
|
|
220
|
+
defaultFreetextFontColor: 'foregroundColors',
|
|
221
|
+
defaultFreetextFontFamily: 'fontFamilies',
|
|
222
|
+
defaultFreetextFontSize: 'fontSizes',
|
|
223
|
+
defaultInkColor: 'foregroundColors',
|
|
224
|
+
defaultStickyNoteColor: 'highlightColors',
|
|
225
|
+
defaultBackgroundColor: 'backgroundColors',
|
|
226
|
+
defaultForegroundColor: 'foregroundColors',
|
|
227
|
+
defaultHighlightColor: 'highlightColors',
|
|
228
|
+
defaultFontSize: 'fontSizes',
|
|
229
|
+
};
|
|
230
|
+
export const ColorPaletteMap = {
|
|
231
|
+
highlightColors: 'defaultHighlightColor',
|
|
232
|
+
backgroundColors: 'defaultBackgroundColor',
|
|
233
|
+
foregroundColors: 'defaultForegroundColor',
|
|
234
|
+
};
|
|
235
|
+
class StorageClass {
|
|
236
|
+
constructor() {
|
|
237
|
+
this.internalStorage = new UserSettings();
|
|
238
|
+
}
|
|
239
|
+
get storage() {
|
|
240
|
+
return this.internalStorage;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
export class GeneralOptions extends StorageClass {
|
|
244
|
+
constructor(_options) {
|
|
245
|
+
super();
|
|
246
|
+
this.options = Object.assign(Object.assign({}, defaultGeneralOptions), _options);
|
|
247
|
+
}
|
|
248
|
+
get user() {
|
|
249
|
+
return this.options.user;
|
|
250
|
+
}
|
|
251
|
+
get language() {
|
|
252
|
+
return this.options.language;
|
|
253
|
+
}
|
|
254
|
+
get annotationBarPosition() {
|
|
255
|
+
return this.options.annotationBarPosition;
|
|
256
|
+
}
|
|
257
|
+
set annotationBarPosition(position) {
|
|
258
|
+
this.storage.setItem('annotationBarPosition', position);
|
|
259
|
+
}
|
|
260
|
+
get promptOnUnsavedChange() {
|
|
261
|
+
return this.options.promptOnUnsavedChange;
|
|
262
|
+
}
|
|
263
|
+
get textSelectionColor() {
|
|
264
|
+
return this.options.textSelectionColor;
|
|
265
|
+
}
|
|
266
|
+
get rectangularTextSelection() {
|
|
267
|
+
return this.options.rectangularTextSelection;
|
|
268
|
+
}
|
|
269
|
+
get searchMatchColor() {
|
|
270
|
+
return this.options.searchMatchColor;
|
|
271
|
+
}
|
|
272
|
+
get pageLayoutModes() {
|
|
273
|
+
return this.options.pageLayoutModes;
|
|
274
|
+
}
|
|
275
|
+
get defaultZoomLevels() {
|
|
276
|
+
return this.options.defaultZoomLevels;
|
|
277
|
+
}
|
|
278
|
+
get pageShadow() {
|
|
279
|
+
return this.options.pageShadow;
|
|
280
|
+
}
|
|
281
|
+
get currentPageShadow() {
|
|
282
|
+
return this.options.currentPageShadow;
|
|
283
|
+
}
|
|
284
|
+
get viewOnly() {
|
|
285
|
+
return this.options.viewOnly;
|
|
286
|
+
}
|
|
287
|
+
get tooltips() {
|
|
288
|
+
return this.options.tooltips;
|
|
289
|
+
}
|
|
290
|
+
get disableMainToolbar() {
|
|
291
|
+
return this.options.disableMainToolbar;
|
|
292
|
+
}
|
|
293
|
+
get disableAnnotationToolbar() {
|
|
294
|
+
return this.options.disableAnnotationToolbar;
|
|
295
|
+
}
|
|
296
|
+
get hidePasswordFormCancelButton() {
|
|
297
|
+
return this.options.hidePasswordFormCancelButton;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
export class SidebarOptions {
|
|
301
|
+
constructor(_options) {
|
|
302
|
+
this.options = Object.assign(Object.assign({}, defaultSidebarOptions), _options);
|
|
303
|
+
}
|
|
304
|
+
get thumbnailNavigation() {
|
|
305
|
+
return this.options.thumbnailNavigation;
|
|
306
|
+
}
|
|
307
|
+
get outlineNavigation() {
|
|
308
|
+
return this.options.outlineNavigation;
|
|
309
|
+
}
|
|
310
|
+
get annotationNavigation() {
|
|
311
|
+
return this.options.annotationNavigation;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
export class FormsOptions {
|
|
315
|
+
constructor(_options) {
|
|
316
|
+
this.options = Object.assign(Object.assign({}, defaultFormsOptions), _options);
|
|
317
|
+
}
|
|
318
|
+
get enabled() {
|
|
319
|
+
return this.options.enabled;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
export class ViewerOptions {
|
|
323
|
+
constructor(_options) {
|
|
324
|
+
var _a, _b, _c, _d, _e, _f;
|
|
325
|
+
this.options = {
|
|
326
|
+
general: Object.assign(Object.assign({}, defaultViewerOptions.general), _options === null || _options === void 0 ? void 0 : _options.general),
|
|
327
|
+
sidebar: Object.assign(Object.assign({}, defaultViewerOptions.sidebar), _options === null || _options === void 0 ? void 0 : _options.sidebar),
|
|
328
|
+
permissions: Object.assign(Object.assign({}, defaultViewerOptions.permissions), _options === null || _options === void 0 ? void 0 : _options.permissions),
|
|
329
|
+
callbacks: Object.assign(Object.assign({}, defaultViewerOptions.callbacks), _options === null || _options === void 0 ? void 0 : _options.callbacks),
|
|
330
|
+
customButtons: {
|
|
331
|
+
annotationbar: ((_a = _options === null || _options === void 0 ? void 0 : _options.customButtons) === null || _a === void 0 ? void 0 : _a.annotationbar)
|
|
332
|
+
? (_b = _options === null || _options === void 0 ? void 0 : _options.customButtons) === null || _b === void 0 ? void 0 : _b.annotationbar
|
|
333
|
+
: [],
|
|
334
|
+
documentbar: ((_c = _options === null || _options === void 0 ? void 0 : _options.customButtons) === null || _c === void 0 ? void 0 : _c.documentbar)
|
|
335
|
+
? (_d = _options === null || _options === void 0 ? void 0 : _options.customButtons) === null || _d === void 0 ? void 0 : _d.documentbar
|
|
336
|
+
: [],
|
|
337
|
+
informationbar: ((_e = _options === null || _options === void 0 ? void 0 : _options.customButtons) === null || _e === void 0 ? void 0 : _e.informationbar)
|
|
338
|
+
? (_f = _options === null || _options === void 0 ? void 0 : _options.customButtons) === null || _f === void 0 ? void 0 : _f.informationbar
|
|
339
|
+
: [],
|
|
340
|
+
},
|
|
341
|
+
};
|
|
342
|
+
this.generalOptions = new GeneralOptions(_options === null || _options === void 0 ? void 0 : _options.general);
|
|
343
|
+
}
|
|
344
|
+
get general() {
|
|
345
|
+
return this.generalOptions;
|
|
346
|
+
}
|
|
347
|
+
get sidebar() {
|
|
348
|
+
return this.options.sidebar;
|
|
349
|
+
}
|
|
350
|
+
get permissions() {
|
|
351
|
+
return this.options.permissions;
|
|
352
|
+
}
|
|
353
|
+
get callbacks() {
|
|
354
|
+
return this.options.callbacks;
|
|
355
|
+
}
|
|
356
|
+
get customButtons() {
|
|
357
|
+
return this.options.customButtons;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
export class AnnotationColorOptions extends StorageClass {
|
|
361
|
+
constructor(_options) {
|
|
362
|
+
super();
|
|
363
|
+
this.options = Object.assign(Object.assign({}, defaultAnnotationColorOptions), _options);
|
|
364
|
+
}
|
|
365
|
+
get highlightColors() {
|
|
366
|
+
return this.options.highlightColors;
|
|
367
|
+
}
|
|
368
|
+
get foregroundColors() {
|
|
369
|
+
return this.options.foregroundColors;
|
|
370
|
+
}
|
|
371
|
+
get backgroundColors() {
|
|
372
|
+
return this.options.backgroundColors;
|
|
373
|
+
}
|
|
374
|
+
get defaultHighlightColor() {
|
|
375
|
+
return this.options.defaultHighlightColor;
|
|
376
|
+
}
|
|
377
|
+
get defaultForegroundColor() {
|
|
378
|
+
return this.options.defaultForegroundColor;
|
|
379
|
+
}
|
|
380
|
+
get defaultBackgroundColor() {
|
|
381
|
+
return this.options.defaultBackgroundColor;
|
|
382
|
+
}
|
|
383
|
+
get highlightAnnotationColor() {
|
|
384
|
+
return this.storage.getItem('highlightAnnotationColor', this.defaultHighlightColor);
|
|
385
|
+
}
|
|
386
|
+
set highlightAnnotationColor(color) {
|
|
387
|
+
this.storage.setItem('highlightAnnotationColor', color);
|
|
388
|
+
}
|
|
389
|
+
get stickyNoteColor() {
|
|
390
|
+
return this.storage.getItem('stickyNoteColor', this.options.defaultHighlightColor);
|
|
391
|
+
}
|
|
392
|
+
set stickyNoteColor(color) {
|
|
393
|
+
this.storage.setItem('stickyNoteColor', color);
|
|
394
|
+
}
|
|
395
|
+
get freetextBackgroundColor() {
|
|
396
|
+
return this.storage.getItem('freetextBackgroundColor', this.defaultBackgroundColor);
|
|
397
|
+
}
|
|
398
|
+
set freetextBackgroundColor(color) {
|
|
399
|
+
this.storage.setItem('freetextBackgroundColor', color);
|
|
400
|
+
}
|
|
401
|
+
set freetextFontColor(color) {
|
|
402
|
+
this.storage.setItem('freetextFontColor', color);
|
|
403
|
+
}
|
|
404
|
+
get freetextFontColor() {
|
|
405
|
+
return this.storage.getItem('freetextFontColor', this.options.defaultForegroundColor);
|
|
406
|
+
}
|
|
407
|
+
get inkColor() {
|
|
408
|
+
return this.storage.getItem('inkColor', this.options.defaultForegroundColor);
|
|
409
|
+
}
|
|
410
|
+
set inkColor(color) {
|
|
411
|
+
this.storage.setItem('inkColor', color);
|
|
412
|
+
}
|
|
413
|
+
get inkOpacity() {
|
|
414
|
+
return this.storage.getItem('inkOpacity', 100);
|
|
415
|
+
}
|
|
416
|
+
set inkOpacity(opacity) {
|
|
417
|
+
this.storage.setItem('inkOpacity', opacity);
|
|
418
|
+
}
|
|
419
|
+
set shapeColor(color) {
|
|
420
|
+
this.storage.setItem('shapeAnnotationColor', color);
|
|
421
|
+
}
|
|
422
|
+
get shapeColor() {
|
|
423
|
+
return this.storage.getItem('shapeAnnotationColor', this.options.defaultForegroundColor);
|
|
424
|
+
}
|
|
425
|
+
set shapeFillColor(color) {
|
|
426
|
+
this.storage.setItem('shapeFillColor', color);
|
|
427
|
+
}
|
|
428
|
+
get shapeFillColor() {
|
|
429
|
+
return this.storage.getItem('shapeFillColor', this.defaultHighlightColor);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
export class AnnotationFontOptions extends StorageClass {
|
|
433
|
+
constructor(_options) {
|
|
434
|
+
super();
|
|
435
|
+
this.options = Object.assign(Object.assign({}, defaultAnnotationFontOptions), _options);
|
|
436
|
+
}
|
|
437
|
+
get fontFamilies() {
|
|
438
|
+
return this.options.fontFamilies;
|
|
439
|
+
}
|
|
440
|
+
get fontSizes() {
|
|
441
|
+
return this.options.fontSizes;
|
|
442
|
+
}
|
|
443
|
+
get defaultFontFamily() {
|
|
444
|
+
return this.options.defaultFontFamily;
|
|
445
|
+
}
|
|
446
|
+
get defaultFontSize() {
|
|
447
|
+
return this.options.defaultFontSize;
|
|
448
|
+
}
|
|
449
|
+
get freetextFontSize() {
|
|
450
|
+
return this.storage.getItem('freetextFontSize', this.defaultFontSize);
|
|
451
|
+
}
|
|
452
|
+
set freetextFontSize(size) {
|
|
453
|
+
this.storage.setItem('freetextFontSize', size);
|
|
454
|
+
}
|
|
455
|
+
get freetextFontFamily() {
|
|
456
|
+
return this.storage.getItem('freetextFontFamily', this.defaultFontFamily);
|
|
457
|
+
}
|
|
458
|
+
set freetextFontFamily(fontFamily) {
|
|
459
|
+
this.storage.setItem('freetextFontFamily', fontFamily);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
export class AnnotationOptions extends StorageClass {
|
|
463
|
+
constructor(_options) {
|
|
464
|
+
super();
|
|
465
|
+
this.options = Object.assign(Object.assign({}, defaultAnnotationOptions), _options);
|
|
466
|
+
this.colorOptions = new AnnotationColorOptions(_options === null || _options === void 0 ? void 0 : _options.colors);
|
|
467
|
+
this.fontOptions = new AnnotationFontOptions(_options === null || _options === void 0 ? void 0 : _options.fonts);
|
|
468
|
+
}
|
|
469
|
+
get stamps() {
|
|
470
|
+
return this.options.stamps;
|
|
471
|
+
}
|
|
472
|
+
get colors() {
|
|
473
|
+
return this.colorOptions;
|
|
474
|
+
}
|
|
475
|
+
get fonts() {
|
|
476
|
+
return this.fontOptions;
|
|
477
|
+
}
|
|
478
|
+
get highlightOpacity() {
|
|
479
|
+
return this.options.highlightOpacity;
|
|
480
|
+
}
|
|
481
|
+
get strokeWidths() {
|
|
482
|
+
return this.options.strokeWidths;
|
|
483
|
+
}
|
|
484
|
+
set shapeStrokeWidth(width) {
|
|
485
|
+
this.storage.setItem('shapeStrokeWidth', width);
|
|
486
|
+
}
|
|
487
|
+
get shapeStrokeWidth() {
|
|
488
|
+
return this.storage.getItem('shapeStrokeWidth', this.options.defaultBorderWidth);
|
|
489
|
+
}
|
|
490
|
+
set shapeStrokeStyle(style) {
|
|
491
|
+
this.storage.setItem('shapeStrokeStyle', style);
|
|
492
|
+
}
|
|
493
|
+
get shapeStrokeStyle() {
|
|
494
|
+
return this.storage.getItem('shapeStrokeStyle', 0); // TODO use proper stroke types
|
|
495
|
+
}
|
|
496
|
+
set inkWidth(width) {
|
|
497
|
+
this.storage.setItem('inkWidth', width);
|
|
498
|
+
}
|
|
499
|
+
get inkWidth() {
|
|
500
|
+
return this.storage.getItem('inkWidth', this.options.defaultBorderWidth);
|
|
501
|
+
}
|
|
502
|
+
set freetextBorderWidth(width) {
|
|
503
|
+
this.storage.setItem('freetextBorderWidth', width);
|
|
504
|
+
}
|
|
505
|
+
get freetextBorderWidth() {
|
|
506
|
+
return this.storage.getItem('freetextBorderWidth', this.options.defaultBorderWidth);
|
|
507
|
+
}
|
|
508
|
+
get defaultBorderWidth() {
|
|
509
|
+
return this.options.defaultBorderWidth;
|
|
510
|
+
}
|
|
511
|
+
get defaultStampWidth() {
|
|
512
|
+
return this.options.defaultStampWidth;
|
|
513
|
+
}
|
|
514
|
+
get hideOnDelete() {
|
|
515
|
+
return this.options.hideOnDelete;
|
|
516
|
+
}
|
|
517
|
+
get trackHistory() {
|
|
518
|
+
return this.options.trackHistory;
|
|
519
|
+
}
|
|
520
|
+
get hideAnnotationSubject() {
|
|
521
|
+
return this.options.hideAnnotationSubject;
|
|
522
|
+
}
|
|
523
|
+
get onlyAuthorCanEdit() {
|
|
524
|
+
return this.options.onlyAuthorCanEdit;
|
|
525
|
+
}
|
|
526
|
+
get annotationPermissionCallback() {
|
|
527
|
+
return this.options.annotationPermissionCallback;
|
|
528
|
+
}
|
|
529
|
+
get selectedStamp() {
|
|
530
|
+
return this.storage.getItem('selectedStamp', 0);
|
|
531
|
+
}
|
|
532
|
+
set selectedStamp(stampNumber) {
|
|
533
|
+
this.storage.setItem('selectedStamp', stampNumber);
|
|
534
|
+
}
|
|
535
|
+
set eraserRadius(width) {
|
|
536
|
+
this.storage.setItem('eraserRadius', width);
|
|
537
|
+
}
|
|
538
|
+
get eraserRadius() {
|
|
539
|
+
return this.storage.getItem('eraserRadius', 5);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
export class WebViewerOptions {
|
|
543
|
+
constructor(_options) {
|
|
544
|
+
var _a, _b, _c;
|
|
545
|
+
const mergedOptions = Object.assign(Object.assign({}, defaultWebViewerOptions), _options);
|
|
546
|
+
if (!mergedOptions.modules.find((m) => m === PrintServiceModule)) {
|
|
547
|
+
(_a = mergedOptions.modules) === null || _a === void 0 ? void 0 : _a.push(PrintServiceModule);
|
|
548
|
+
}
|
|
549
|
+
if (((_b = mergedOptions.forms) === null || _b === void 0 ? void 0 : _b.enabled) && !mergedOptions.modules.find((m) => m === FormFieldModule)) {
|
|
550
|
+
(_c = mergedOptions.modules) === null || _c === void 0 ? void 0 : _c.push(FormFieldModule);
|
|
551
|
+
}
|
|
552
|
+
if ((_options === null || _options === void 0 ? void 0 : _options.shortcuts) === null) {
|
|
553
|
+
;
|
|
554
|
+
mergedOptions.shortcuts = {};
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
mergedOptions.shortcuts = Object.assign(Object.assign({}, defaultWebViewerOptions.shortcuts), _options === null || _options === void 0 ? void 0 : _options.shortcuts);
|
|
558
|
+
}
|
|
559
|
+
this.options = mergedOptions;
|
|
560
|
+
this.viewerOptions = new ViewerOptions(mergedOptions ? mergedOptions.viewer : mergedOptions);
|
|
561
|
+
this.annotationOptions = new AnnotationOptions(mergedOptions ? mergedOptions.annotation : mergedOptions);
|
|
562
|
+
this.formsOptions = new FormsOptions(mergedOptions ? mergedOptions.forms : mergedOptions);
|
|
563
|
+
}
|
|
564
|
+
get viewer() {
|
|
565
|
+
return this.viewerOptions;
|
|
566
|
+
}
|
|
567
|
+
get annotation() {
|
|
568
|
+
return this.annotationOptions;
|
|
569
|
+
}
|
|
570
|
+
get forms() {
|
|
571
|
+
return this.formsOptions;
|
|
572
|
+
}
|
|
573
|
+
get modules() {
|
|
574
|
+
return this.options.modules;
|
|
575
|
+
}
|
|
576
|
+
set modules(modules) {
|
|
577
|
+
this.options.modules = modules;
|
|
578
|
+
}
|
|
579
|
+
get shortcuts() {
|
|
580
|
+
return this.options.shortcuts;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ActionsType } from '../../lib/hyperapp';
|
|
2
|
+
import * as Layout from './layout';
|
|
3
|
+
import * as PasswordForm from './passwordForm';
|
|
4
|
+
import * as NavigationPanel from './navigationPanel';
|
|
5
|
+
import * as PdfDocument from './pdfDocument';
|
|
6
|
+
import * as Search from './search';
|
|
7
|
+
import { WebViewerOptionsInterface } from '../WebViewerOptions';
|
|
8
|
+
import { CanvasModule } from '../../modules/CanvasModule';
|
|
9
|
+
import { FileOpenArgs } from '../PdfWebViewer';
|
|
10
|
+
/** internal */
|
|
11
|
+
export interface RootState {
|
|
12
|
+
licenseFeatures: {
|
|
13
|
+
annotate: boolean;
|
|
14
|
+
fillFormFields: boolean;
|
|
15
|
+
pageRotation: boolean;
|
|
16
|
+
};
|
|
17
|
+
scriptsLoaded: boolean;
|
|
18
|
+
appInitialized: boolean;
|
|
19
|
+
hasDocument?: boolean;
|
|
20
|
+
fileDropEnabled: boolean;
|
|
21
|
+
showPasswordForm: boolean;
|
|
22
|
+
passwordDialogTempPdfFile: File | string | null;
|
|
23
|
+
passwordDialogTempFdfFile?: File | string | null;
|
|
24
|
+
showOpenFileErrorDialog: boolean;
|
|
25
|
+
showUnsavedChangesDialog: boolean;
|
|
26
|
+
unsavedChangesDialogDontSave: boolean;
|
|
27
|
+
fileOpenArgs: FileOpenArgs | null;
|
|
28
|
+
unsavedChangesDialogTempFdfFile?: File | string | null;
|
|
29
|
+
showLoadingIndicator: boolean;
|
|
30
|
+
showSaveIndicator: boolean;
|
|
31
|
+
hasError: boolean;
|
|
32
|
+
errorMessage: string;
|
|
33
|
+
layout: Layout.LayoutState;
|
|
34
|
+
passwordForm: PasswordForm.PasswordFormState;
|
|
35
|
+
navigationPanel: NavigationPanel.NavigationPanelState;
|
|
36
|
+
pdfDocument: PdfDocument.PdfDocumentState;
|
|
37
|
+
search: Search.SearchState;
|
|
38
|
+
options: WebViewerOptionsInterface;
|
|
39
|
+
canvasModules: CanvasModule[];
|
|
40
|
+
closeCallback?: () => void;
|
|
41
|
+
}
|
|
42
|
+
/** internal */
|
|
43
|
+
export declare const createState: (options: WebViewerOptionsInterface) => any;
|
|
44
|
+
/** internal */
|
|
45
|
+
export interface ActionDefinitions {
|
|
46
|
+
layout: Layout.LayoutActions;
|
|
47
|
+
passwordForm: PasswordForm.PasswordFormActions;
|
|
48
|
+
navigationPanel: NavigationPanel.NavigationPanelActions;
|
|
49
|
+
pdfDocument: PdfDocument.PdfDocumentActions;
|
|
50
|
+
search: Search.SearchActions;
|
|
51
|
+
loadScriptsCompleted(): RootState;
|
|
52
|
+
initializeAppFulfilled(settings: {
|
|
53
|
+
licenseFeatures: {
|
|
54
|
+
annotate: boolean;
|
|
55
|
+
fillFormFields: boolean;
|
|
56
|
+
pageRotation: boolean;
|
|
57
|
+
};
|
|
58
|
+
}): RootState;
|
|
59
|
+
initializeAppRejected(error: string): RootState;
|
|
60
|
+
setCanvasModules(canvasModules: CanvasModule[]): RootState;
|
|
61
|
+
loadDocumentBegin(): RootState;
|
|
62
|
+
loadDocumentFulfilled(): RootState;
|
|
63
|
+
loadDocumentCancel(): RootState;
|
|
64
|
+
loadDocumentPasswordForm(fileOpenArgs: FileOpenArgs): RootState;
|
|
65
|
+
closeDocument(): RootState;
|
|
66
|
+
showConfirmUnsavedChangesDialog(args: FileOpenArgs | null, closeCallback?: () => void): RootState;
|
|
67
|
+
unsavedChangesDialogCancel(): RootState;
|
|
68
|
+
unsavedChangesDialogFileSaved(): RootState;
|
|
69
|
+
unsavedChangesDialogDontSave(): RootState;
|
|
70
|
+
loadDocumentRejected(error: string): RootState;
|
|
71
|
+
loadDocumentConfirmRejected(): RootState;
|
|
72
|
+
saveDocumentBegin(): RootState;
|
|
73
|
+
saveDocumentFulfilled(): RootState;
|
|
74
|
+
saveDocumentRejected(error: string): RootState;
|
|
75
|
+
setError(error: string): RootState;
|
|
76
|
+
getState(): RootState;
|
|
77
|
+
open(file: File): RootState;
|
|
78
|
+
}
|
|
79
|
+
/** internal */
|
|
80
|
+
export declare const actions: ActionsType<RootState, ActionDefinitions>;
|