@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,21 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { ScreenSize } from '../../state/layout';
|
|
3
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
4
|
+
import { ToolbarButton } from '../../../common/ToolbarButton';
|
|
5
|
+
import { classNames } from '../../../common/classNames';
|
|
6
|
+
import { icons } from '../../../common/icons';
|
|
7
|
+
import { CustomButtons } from '../CustomButtons';
|
|
8
|
+
/** internal */
|
|
9
|
+
export const Annotationbar = ({}) => (state, actions) => {
|
|
10
|
+
const smallScreen = state.layout.screenSize === ScreenSize.Small;
|
|
11
|
+
if (smallScreen || !state.licenseFeatures.annotate) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (h("div", { class: classNames('pwv-annotationbar', `pwv-annotationbar-${state.options.viewer.general.annotationBarPosition}`) },
|
|
15
|
+
state.options.modules
|
|
16
|
+
.filter(({ moduleInfo }) => moduleInfo.requiredFeatures.annotate)
|
|
17
|
+
.map((m) => (h(ToolbarButton, { icon: icons[m.moduleInfo.icon], tooltip: translationManager.getText(m.moduleInfo.translationKey), onClick: () => {
|
|
18
|
+
actions.api.activateModule(m.moduleInfo.name, undefined);
|
|
19
|
+
} }))),
|
|
20
|
+
h(CustomButtons, { location: "annotationbar", style: "button" })));
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { ScreenSize } from '../../state/layout';
|
|
3
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
4
|
+
import { icons } from '../../../common/icons';
|
|
5
|
+
import { ToolbarItemGroup } from '../../../common/ToolbarItemGroup';
|
|
6
|
+
import { ToolbarButton } from '../../../common/ToolbarButton';
|
|
7
|
+
import { AnnotationsMenu } from './AnnotationsMenu';
|
|
8
|
+
import { CustomButtons } from '../CustomButtons';
|
|
9
|
+
/** internal */
|
|
10
|
+
export const AddonsToolbar = ({}) => (state, actions) => {
|
|
11
|
+
const smallScreen = state.layout.screenSize === ScreenSize.Small;
|
|
12
|
+
const mediumScreen = state.layout.screenSize <= ScreenSize.Medium;
|
|
13
|
+
const { sidebar } = state.options.viewer;
|
|
14
|
+
const { disableAnnotationToolbar } = state.options.viewer.general;
|
|
15
|
+
return (h(ToolbarItemGroup, { className: "pwv-AddonsBar" },
|
|
16
|
+
!disableAnnotationToolbar && smallScreen && h(AnnotationsMenu, null),
|
|
17
|
+
state.options.viewer.permissions.enableSearch && (h(ToolbarButton, { name: "toggleSearch", tooltip: translationManager.getText('toolbar.search'), icon: icons.search, onClick: () => {
|
|
18
|
+
if (!state.search.showSearch) {
|
|
19
|
+
actions.api.resetViewerMode();
|
|
20
|
+
actions.search.openSearch();
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
actions.api.endSearch();
|
|
24
|
+
actions.search.closeSearch();
|
|
25
|
+
}
|
|
26
|
+
}, active: state.search.showSearch })),
|
|
27
|
+
!smallScreen &&
|
|
28
|
+
(sidebar.thumbnailNavigation ||
|
|
29
|
+
sidebar.outlineNavigation ||
|
|
30
|
+
sidebar.annotationNavigation) && (h(ToolbarButton, { name: "toggleSidePane", tooltip: translationManager.getText('toolbar.toggleSidePane'), icon: icons.docNavigation, onClick: () => {
|
|
31
|
+
actions.api.loadNavigationItems();
|
|
32
|
+
actions.navigationPanel.toggleNavigationPanel();
|
|
33
|
+
}, active: state.navigationPanel.showNavigation })),
|
|
34
|
+
h(CustomButtons, { location: "informationbar", style: "button" })));
|
|
35
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
3
|
+
import { Icon, icons } from '../../../common/Icon';
|
|
4
|
+
import { DropdownMenu } from '../../../common/DropdownMenu';
|
|
5
|
+
import { CustomButtons } from '../CustomButtons';
|
|
6
|
+
/** internal */
|
|
7
|
+
export const AnnotationsMenu = ({}) => (state, actions) => {
|
|
8
|
+
if (!state.licenseFeatures.annotate) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return (h(DropdownMenu, { className: "pwv-LgHidden pwv-AnnotationMenu", tooltip: translationManager.getText('toolbar.annotationsMenuButton'), icon: icons.edit },
|
|
12
|
+
h("div", null,
|
|
13
|
+
state.options.modules
|
|
14
|
+
.filter((m) => m.moduleInfo.requiredFeatures.annotate)
|
|
15
|
+
.map((m) => (h("button", { class: "pwv-DropdownItem", onclick: () => {
|
|
16
|
+
actions.api.activateModule(m.moduleInfo.name, undefined);
|
|
17
|
+
} },
|
|
18
|
+
h(Icon, { icon: icons[m.moduleInfo.icon] }),
|
|
19
|
+
' ',
|
|
20
|
+
translationManager.getText(m.moduleInfo.translationKey)))),
|
|
21
|
+
h(CustomButtons, { location: "annotationbar", style: "listItem" }))));
|
|
22
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { ScreenSize } from '../../state/layout';
|
|
3
|
+
import { Toolbar } from '../../../common/Toolbar';
|
|
4
|
+
import { ToolbarSeparator } from '../../../common/ToolbarSeparator';
|
|
5
|
+
import { Menu } from './Menu';
|
|
6
|
+
import { DocumentBar } from './DocumentBar';
|
|
7
|
+
import { NavigationBar } from './NavigationBar';
|
|
8
|
+
import { ZoomBar } from './ZoomBar';
|
|
9
|
+
import { SearchBar } from './SearchBar';
|
|
10
|
+
import { ViewBar } from './ViewBar';
|
|
11
|
+
import { AddonsToolbar } from './AddonsToolbar';
|
|
12
|
+
/** internal */
|
|
13
|
+
export const AppBar = ({}) => (state, actions) => {
|
|
14
|
+
const mediumScreen = state.layout.screenSize <= ScreenSize.Medium;
|
|
15
|
+
const { disableMainToolbar } = state.options.viewer.general;
|
|
16
|
+
return (h("div", { class: "pwv-AppBar" },
|
|
17
|
+
!state.options.viewer.general.disableMainToolbar && (h(Toolbar, { allowWrap: true },
|
|
18
|
+
mediumScreen ? h(Menu, null) : h(DocumentBar, null),
|
|
19
|
+
h(NavigationBar, null),
|
|
20
|
+
h(ToolbarSeparator, null),
|
|
21
|
+
h(ZoomBar, null),
|
|
22
|
+
h(ToolbarSeparator, null),
|
|
23
|
+
h(ViewBar, null),
|
|
24
|
+
h(AddonsToolbar, null))),
|
|
25
|
+
state.search.showSearch && state.options.viewer.permissions.enableSearch && h(SearchBar, null)));
|
|
26
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
3
|
+
import { ToolbarItemGroup } from '../../../common/ToolbarItemGroup';
|
|
4
|
+
import { ToolbarButton } from '../../../common/ToolbarButton';
|
|
5
|
+
import { icons } from '../../../common/Icon';
|
|
6
|
+
import { ToolbarFileButton } from '../../../common/ToolbarFileButton';
|
|
7
|
+
import { CustomButtons } from '../CustomButtons';
|
|
8
|
+
/** internal */
|
|
9
|
+
export const DocumentBar = ({}) => (state, actions) => {
|
|
10
|
+
const { permissions, callbacks } = state.options.viewer;
|
|
11
|
+
const onSaveFileButtonClicked = () => {
|
|
12
|
+
var _a;
|
|
13
|
+
if (callbacks.onSaveFileButtonClicked) {
|
|
14
|
+
callbacks.onSaveFileButtonClicked();
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const password = (_a = state.passwordForm) === null || _a === void 0 ? void 0 : _a.password;
|
|
18
|
+
actions.api.downloadFile(password ? { password } : undefined);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const onCloseFileButtonClicked = () => {
|
|
22
|
+
if (callbacks.onCloseFileButtonClicked) {
|
|
23
|
+
callbacks.onCloseFileButtonClicked();
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
actions.api.close();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return (h(ToolbarItemGroup, { className: "pwv-DocumentBar" },
|
|
30
|
+
permissions.allowOpenFile && !callbacks.onOpenFileButtonClicked && (h(ToolbarFileButton, { name: "openDocument", className: "pwv-MdHidden pwv-SmHidden", icon: icons.openFile, accept: ".pdf", tooltip: translationManager.getText('toolbar.openDocument'), onFileSelected: (file) => actions.api.open({ pdfFile: { data: file } }) })),
|
|
31
|
+
permissions.allowOpenFile && callbacks.onOpenFileButtonClicked && (h(ToolbarButton, { name: "openDocument", className: "pwv-MdHidden pwv-SmHidden", icon: icons.openFile, tooltip: translationManager.getText('toolbar.openDocument'), onClick: callbacks.onOpenFileButtonClicked })),
|
|
32
|
+
permissions.allowSaveFile && (h(ToolbarButton, { name: "saveDocument", className: "pwv-MdHidden pwv-SmHidden", icon: icons.saveFile, tooltip: translationManager.getText('toolbar.saveDocument'), onClick: onSaveFileButtonClicked })),
|
|
33
|
+
permissions.allowCloseFile && (h(ToolbarButton, { name: "closeDocument", className: "pwv-MdHidden pwv-SmHidden", icon: icons.closeFile, tooltip: translationManager.getText('toolbar.closeDocument'), onClick: onCloseFileButtonClicked })),
|
|
34
|
+
permissions.allowPrinting && (h(ToolbarButton, { name: "print", className: "pwv-MdHidden pwv-SmHidden", icon: icons.print, tooltip: translationManager.getText('toolbar.print'), onClick: actions.api.print })),
|
|
35
|
+
h(CustomButtons, { location: "documentbar", style: "button" })));
|
|
36
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { ScreenSize } from '../../state/layout';
|
|
3
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
4
|
+
import { ToolbarItemGroup } from '../../../common/ToolbarItemGroup';
|
|
5
|
+
import { Icon, icons } from '../../../common/Icon';
|
|
6
|
+
import { DropdownMenu } from '../../../common/DropdownMenu';
|
|
7
|
+
import { DropdownSeparator } from '../../../common/DropdownSeparator';
|
|
8
|
+
import { CustomButtons } from '../CustomButtons';
|
|
9
|
+
/** internal */
|
|
10
|
+
export const Menu = ({}) => (state, actions) => {
|
|
11
|
+
const { permissions, callbacks } = state.options.viewer;
|
|
12
|
+
const { outlineNavigation, annotationNavigation } = state.options.viewer.sidebar;
|
|
13
|
+
const { screenSize } = state.layout;
|
|
14
|
+
const onSaveFileButtonClicked = () => {
|
|
15
|
+
if (callbacks.onSaveFileButtonClicked) {
|
|
16
|
+
callbacks.onSaveFileButtonClicked();
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
actions.api.downloadFile();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const onCloseFileButtonClicked = () => {
|
|
23
|
+
if (callbacks.onCloseFileButtonClicked) {
|
|
24
|
+
callbacks.onCloseFileButtonClicked();
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
actions.api.close();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return (h(ToolbarItemGroup, { className: "pwv-DocumentBar" },
|
|
31
|
+
h(DropdownMenu, { className: "pwv-LgHidden", icon: icons.bars },
|
|
32
|
+
h("div", null,
|
|
33
|
+
permissions.allowOpenFile && !callbacks.onOpenFileButtonClicked && (h("label", { class: "pwv-DropdownItem" },
|
|
34
|
+
h(Icon, { icon: icons.openFile }),
|
|
35
|
+
" ",
|
|
36
|
+
translationManager.getText('toolbar.openDocument'),
|
|
37
|
+
h("input", { accept: ".pdf", type: "file", onchange: (e) => {
|
|
38
|
+
if (e.currentTarget.files && e.currentTarget.files.length) {
|
|
39
|
+
const file = e.currentTarget.files[0];
|
|
40
|
+
actions.api.open({ pdfFile: { data: file } });
|
|
41
|
+
}
|
|
42
|
+
}, style: { display: 'none' } }))),
|
|
43
|
+
permissions.allowOpenFile && callbacks.onOpenFileButtonClicked && (h("button", { class: "pwv-DropdownItem", onclick: callbacks.onOpenFileButtonClicked },
|
|
44
|
+
h(Icon, { icon: icons.openFile }),
|
|
45
|
+
" ",
|
|
46
|
+
translationManager.getText('toolbar.openDocument'))),
|
|
47
|
+
permissions.allowSaveFile && (h("button", { class: "pwv-DropdownItem", onclick: onSaveFileButtonClicked },
|
|
48
|
+
h(Icon, { icon: icons.saveFile }),
|
|
49
|
+
" ",
|
|
50
|
+
translationManager.getText('toolbar.saveDocument'))),
|
|
51
|
+
permissions.allowCloseFile && (h("button", { class: "pwv-DropdownItem", onclick: onCloseFileButtonClicked },
|
|
52
|
+
h(Icon, { icon: icons.closeFile }),
|
|
53
|
+
' ',
|
|
54
|
+
translationManager.getText('toolbar.closeDocument'))),
|
|
55
|
+
permissions.allowPrinting && (h("button", { class: "pwv-DropdownItem", onclick: actions.api.print },
|
|
56
|
+
h(Icon, { icon: icons.print }),
|
|
57
|
+
" ",
|
|
58
|
+
translationManager.getText('toolbar.print'))),
|
|
59
|
+
h(CustomButtons, { location: "documentbar", style: "listItem" }),
|
|
60
|
+
permissions.allowRotateView && h(DropdownSeparator, null),
|
|
61
|
+
permissions.allowRotateView && (h("button", { class: "pwv-DropdownItem", onclick: actions.api.rotate },
|
|
62
|
+
h(Icon, { icon: icons.rotate }),
|
|
63
|
+
" ",
|
|
64
|
+
translationManager.getText('toolbar.rotateView'))),
|
|
65
|
+
screenSize === ScreenSize.Small && (outlineNavigation || annotationNavigation) && (h(DropdownSeparator, null)),
|
|
66
|
+
screenSize === ScreenSize.Small && outlineNavigation && (h("button", { class: "pwv-DropdownItem", onclick: () => {
|
|
67
|
+
actions.api.loadNavigationItems();
|
|
68
|
+
actions.navigationPanel.selectNavigation('outline');
|
|
69
|
+
} },
|
|
70
|
+
h(Icon, { icon: icons.sidePaneOutline }),
|
|
71
|
+
' ',
|
|
72
|
+
translationManager.getText('sideNavigation.outline'))),
|
|
73
|
+
screenSize === ScreenSize.Small && annotationNavigation && (h("button", { class: "pwv-DropdownItem", onclick: () => {
|
|
74
|
+
actions.api.loadNavigationItems();
|
|
75
|
+
actions.navigationPanel.selectNavigation('annotation');
|
|
76
|
+
} },
|
|
77
|
+
h(Icon, { icon: icons.sidePaneAnnotation }),
|
|
78
|
+
' ',
|
|
79
|
+
translationManager.getText('sideNavigation.annotation')))))));
|
|
80
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
3
|
+
import { ToolbarItemGroup } from '../../../common/ToolbarItemGroup';
|
|
4
|
+
import { ToolbarButton } from '../../../common/ToolbarButton';
|
|
5
|
+
import { icons } from '../../../common/icons';
|
|
6
|
+
const resizeObserver = new ResizeObserver((e) => {
|
|
7
|
+
if (e.length) {
|
|
8
|
+
e.forEach((elm) => {
|
|
9
|
+
if (elm.target && elm.target.parentElement) {
|
|
10
|
+
const input = elm.target.parentElement.querySelector('input');
|
|
11
|
+
if (input) {
|
|
12
|
+
input.style.minWidth = `${elm.contentRect.width + 4}px`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
/** internal */
|
|
19
|
+
export const NavigationBar = ({}) => (state, actions) => {
|
|
20
|
+
const { pdfDocument } = state;
|
|
21
|
+
return (h(ToolbarItemGroup, { className: "pwv-NavigationBar" },
|
|
22
|
+
h(ToolbarButton, { name: "previewsPage", tooltip: translationManager.getText('toolbar.previewsPage'), icon: icons.previousPage, onClick: () => actions.api.previousPage(), disabled: pdfDocument.pageNumber <= 1 }),
|
|
23
|
+
h("div", { class: "pwv-ToolbarItem pwv-navigation-toolbar-pageinput" },
|
|
24
|
+
h("input", { name: "pageNumber", value: pdfDocument.pageNumber, onkeydown: (e) => {
|
|
25
|
+
if (e.key === 'ArrowDown') {
|
|
26
|
+
actions.api.nextPage();
|
|
27
|
+
}
|
|
28
|
+
else if (e.key === 'ArrowUp') {
|
|
29
|
+
actions.api.previousPage();
|
|
30
|
+
}
|
|
31
|
+
else if (e.key === 'Enter') {
|
|
32
|
+
const input = e.currentTarget;
|
|
33
|
+
if (input && input.value) {
|
|
34
|
+
actions.api.setPageNumber(parseInt(input.value, undefined));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if ((e.key.charCodeAt(0) >= 48 && e.key.charCodeAt(0) <= 57) || // allow numbers 0-9
|
|
38
|
+
e.key === 'Delete' ||
|
|
39
|
+
e.key === 'Backspace' ||
|
|
40
|
+
e.key === 'ArrowLeft' ||
|
|
41
|
+
e.key === 'ArrowRight' ||
|
|
42
|
+
e.key === 'Tab') {
|
|
43
|
+
// do nothing
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
}
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
}, onblur: (e) => {
|
|
50
|
+
let page = parseInt(e.target.value, undefined);
|
|
51
|
+
if (Number.isNaN(page)) {
|
|
52
|
+
page = actions.api.getPageNumber();
|
|
53
|
+
}
|
|
54
|
+
else if (page < 1) {
|
|
55
|
+
page = 1;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
const pageCount = actions.api.getPageCount();
|
|
59
|
+
if (page > pageCount) {
|
|
60
|
+
page = pageCount;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
;
|
|
64
|
+
e.target.value = page.toString();
|
|
65
|
+
actions.api.setPageNumber(page);
|
|
66
|
+
}, disabled: pdfDocument.pageCount < 1 }),
|
|
67
|
+
h("span", null, translationManager.getText('toolbar.pageOf')),
|
|
68
|
+
h("label", { oncreate: (label) => {
|
|
69
|
+
resizeObserver.observe(label);
|
|
70
|
+
}, onremove: (label) => {
|
|
71
|
+
resizeObserver.unobserve(label);
|
|
72
|
+
} }, pdfDocument.pageCount)),
|
|
73
|
+
h(ToolbarButton, { name: "nextPage", tooltip: translationManager.getText('toolbar.nextPage'), icon: icons.nextPage, onClick: () => actions.api.nextPage(), disabled: pdfDocument.pageNumber === pdfDocument.pageCount })));
|
|
74
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { 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 { ToolbarSeparator } from '../../../common/ToolbarSeparator';
|
|
7
|
+
import { icons } from '../../../common/icons';
|
|
8
|
+
import { getKeyboardCommands } from '../../../common/utils';
|
|
9
|
+
import { SearchOptions } from './SearchOptions';
|
|
10
|
+
/** internal */
|
|
11
|
+
export const SearchBar = ({}) => (state, actions) => (h(Toolbar, { className: "pwv-SearchBar" },
|
|
12
|
+
h(ToolbarItemGroup, null,
|
|
13
|
+
h("div", { class: "pwv-ToolbarItem pwv-searchbar-input" },
|
|
14
|
+
h("input", { value: state.search.searchString, class: "pwv-SearchInputField", oncreate: (element) => {
|
|
15
|
+
element.focus();
|
|
16
|
+
element.addEventListener('keydown', (e) => {
|
|
17
|
+
e.cancelBubble = true;
|
|
18
|
+
const { shortcuts } = state.options;
|
|
19
|
+
const cmd = getKeyboardCommands(e, shortcuts, []);
|
|
20
|
+
if ((cmd === null || cmd === void 0 ? void 0 : cmd.length) &&
|
|
21
|
+
(cmd.some(el => el[0] === 'searchNext') ||
|
|
22
|
+
cmd.some(el => el[0] === 'searchPrevious') ||
|
|
23
|
+
cmd.some(el => el[0] === 'closeSearch'))) {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
}
|
|
26
|
+
}, false);
|
|
27
|
+
element.addEventListener('input', (e) => {
|
|
28
|
+
const inputValue = e.currentTarget.value;
|
|
29
|
+
actions.search.updateToSearch(inputValue);
|
|
30
|
+
if (inputValue !== '') {
|
|
31
|
+
actions.api.startSearch();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
actions.api.endSearch();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
element.addEventListener('keyup', (e) => {
|
|
38
|
+
e.cancelBubble = true;
|
|
39
|
+
const inputValue = e.currentTarget.value;
|
|
40
|
+
const { shortcuts } = state.options;
|
|
41
|
+
const cmd = getKeyboardCommands(e, shortcuts, []);
|
|
42
|
+
if (cmd === null || cmd === void 0 ? void 0 : cmd.some(el => el[0] === 'searchNext')) {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
actions.api.nextSearchMatch();
|
|
45
|
+
}
|
|
46
|
+
else if (cmd === null || cmd === void 0 ? void 0 : cmd.some(el => el[0] === 'searchPrevious')) {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
actions.api.previousSearchMatch();
|
|
49
|
+
}
|
|
50
|
+
else if (cmd === null || cmd === void 0 ? void 0 : cmd.some(el => el[0] === 'closeSearch')) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
actions.api.endSearch();
|
|
53
|
+
actions.search.closeSearch();
|
|
54
|
+
}
|
|
55
|
+
else if (e.key === 'Enter' || e.key === 'ArrowDown') {
|
|
56
|
+
if (inputValue !== '') {
|
|
57
|
+
actions.api.nextSearchMatch();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (e.key === 'ArrowUp') {
|
|
61
|
+
if (inputValue !== '') {
|
|
62
|
+
actions.api.previousSearchMatch();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else if (e.key === 'Escape') {
|
|
66
|
+
actions.api.endSearch();
|
|
67
|
+
actions.search.closeSearch();
|
|
68
|
+
}
|
|
69
|
+
}, false);
|
|
70
|
+
} })),
|
|
71
|
+
h(ToolbarButton, { tooltip: translationManager.getText('search.previousMatch'),
|
|
72
|
+
// icon={icons.previousMatch}
|
|
73
|
+
icon: icons.previousPage, disabled: state.search.searchString === '', onClick: actions.api.previousSearchMatch }),
|
|
74
|
+
h(ToolbarButton, { tooltip: translationManager.getText('search.nextMatch'), icon: icons.nextPage,
|
|
75
|
+
// icon={icons.nextMatch}
|
|
76
|
+
disabled: state.search.searchString === '', onClick: actions.api.nextSearchMatch }),
|
|
77
|
+
h(SearchOptions, null),
|
|
78
|
+
h(ToolbarSeparator, null)),
|
|
79
|
+
h(ToolbarItemGroup, { pushRight: true },
|
|
80
|
+
h(ToolbarButton, { icon: icons.close, onClick: () => {
|
|
81
|
+
actions.api.endSearch();
|
|
82
|
+
actions.search.closeSearch();
|
|
83
|
+
} }))));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ViewComponent } from '../../../lib/hyperapp';
|
|
2
|
+
import { PdfWebViewerState, PdfWebViewerActions } from '../../PdfWebViewer';
|
|
3
|
+
/** internal */
|
|
4
|
+
export interface SearchOptionsProps {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
onClick?(e: MouseEvent): void;
|
|
8
|
+
}
|
|
9
|
+
/** internal */
|
|
10
|
+
export declare const SearchOptions: ViewComponent<SearchOptionsProps, PdfWebViewerState, PdfWebViewerActions>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
3
|
+
import { DropdownComponent } from '../../../common/Dropdown';
|
|
4
|
+
import { Icon, icons } from '../../../common/Icon';
|
|
5
|
+
import { tooltipManager } from '../../../common/TooltipManager';
|
|
6
|
+
/** internal */
|
|
7
|
+
export const SearchOptions = (props) => ($state, actions) => {
|
|
8
|
+
if (props.disabled) {
|
|
9
|
+
return (h("div", { title: translationManager.getText('search.options'), class: "pwv-Dropdown pwv-searchoptions pwv-disabled pwv-Dropdown--alignRight" },
|
|
10
|
+
h("span", { class: "pwv-Dropdown-text" },
|
|
11
|
+
h(Icon, { icon: icons.options })),
|
|
12
|
+
h("span", { class: "pwv-Dropdown-caret" },
|
|
13
|
+
h(Icon, { icon: icons.dropdownCaret }))));
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return (h("div", { class: "pwv-Dropdown pwv-searchoptions pwv-Dropdown--alignRight" },
|
|
17
|
+
h("button", Object.assign({}, tooltipManager.createTooltip(translationManager.getText('search.options')), { oncreate: DropdownComponent.create, onremove: DropdownComponent.remove }),
|
|
18
|
+
h("span", { class: "pwv-Dropdown-text" },
|
|
19
|
+
h(Icon, { icon: icons.options })),
|
|
20
|
+
h("span", { class: "pwv-Dropdown-caret" },
|
|
21
|
+
h(Icon, { icon: icons.dropdownCaret }))),
|
|
22
|
+
h("div", { class: "pwv-DropdownPanel" },
|
|
23
|
+
h("ul", null,
|
|
24
|
+
h("li", { class: "pwv-checkbox-btn", onclick: (e) => {
|
|
25
|
+
const s = actions.search.toggleCaseSensitive();
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
e.cancelBubble = true;
|
|
28
|
+
if (s.searchString !== '') {
|
|
29
|
+
actions.api.startSearch();
|
|
30
|
+
}
|
|
31
|
+
} },
|
|
32
|
+
$state.search.caseSensitive ? (h(Icon, { icon: icons.checkboxChecked })) : (h(Icon, { icon: icons.checkbox })),
|
|
33
|
+
translationManager.getText('search.optionCaseSensitive')),
|
|
34
|
+
h("li", { class: "pwv-checkbox-btn", onclick: (e) => {
|
|
35
|
+
const s = actions.search.toggleWrappingSearch();
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
e.cancelBubble = true;
|
|
38
|
+
if (s.searchString !== '') {
|
|
39
|
+
actions.api.startSearch();
|
|
40
|
+
}
|
|
41
|
+
} },
|
|
42
|
+
$state.search.wrapSearch ? (h(Icon, { icon: icons.checkboxChecked })) : (h(Icon, { icon: icons.checkbox })),
|
|
43
|
+
translationManager.getText('search.optionWrap')),
|
|
44
|
+
h("li", { class: "pwv-checkbox-btn", onclick: (e) => {
|
|
45
|
+
const s = actions.search.toggleRegex();
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
e.cancelBubble = true;
|
|
48
|
+
if (s.searchString !== '') {
|
|
49
|
+
actions.api.startSearch();
|
|
50
|
+
}
|
|
51
|
+
} },
|
|
52
|
+
$state.search.useRegex ? (h(Icon, { icon: icons.checkboxChecked })) : (h(Icon, { icon: icons.checkbox })),
|
|
53
|
+
translationManager.getText('search.optionRegularExpression'))))));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { PdfFitMode, PdfPageLayoutMode } from '../../../pdf-viewer-api';
|
|
3
|
+
import { ScreenSize } from '../../state/layout';
|
|
4
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
5
|
+
import { ToolbarItemGroup } from '../../../common/ToolbarItemGroup';
|
|
6
|
+
import { ToolbarButton } from '../../../common/ToolbarButton';
|
|
7
|
+
import { Dropdown } from '../../../common/Dropdown';
|
|
8
|
+
import { Icon } from '../../../common/Icon';
|
|
9
|
+
import { icons } from '../../../common/icons';
|
|
10
|
+
function getPageLayoutModeTranslation(layoutMode) {
|
|
11
|
+
switch (layoutMode) {
|
|
12
|
+
case PdfPageLayoutMode.ONE_COLUMN:
|
|
13
|
+
return translationManager.getText('pageLayoutMode.oneColumn');
|
|
14
|
+
case PdfPageLayoutMode.SINGLE_PAGE:
|
|
15
|
+
return translationManager.getText('pageLayoutMode.singlePage');
|
|
16
|
+
case PdfPageLayoutMode.TWO_COLUMN_LEFT:
|
|
17
|
+
return translationManager.getText('pageLayoutMode.twoColumnLeft');
|
|
18
|
+
case PdfPageLayoutMode.TWO_COLUMN_RIGHT:
|
|
19
|
+
return translationManager.getText('pageLayoutMode.twoColumnRight');
|
|
20
|
+
case PdfPageLayoutMode.TWO_PAGE_LEFT:
|
|
21
|
+
return translationManager.getText('pageLayoutMode.twoPageLeft');
|
|
22
|
+
case PdfPageLayoutMode.TWO_PAGE_RIGHT:
|
|
23
|
+
return translationManager.getText('pageLayoutMode.twoPageRight');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/** internal */
|
|
27
|
+
export const ViewBar = ({}) => (state, actions) => {
|
|
28
|
+
const { pdfDocument } = state;
|
|
29
|
+
const { screenSize } = state.layout;
|
|
30
|
+
const layoutModeItems = state.options.viewer.general.pageLayoutModes.map((m) => ({
|
|
31
|
+
text: getPageLayoutModeTranslation(m),
|
|
32
|
+
value: m,
|
|
33
|
+
renderItem: (i) => (h("span", { className: "pwv-page-layout-mode-item" },
|
|
34
|
+
h(Icon, { icon: icons[`pageLayoutMode${i.value}`], className: "pwv-page-layout-mode-icon" }),
|
|
35
|
+
i.text)),
|
|
36
|
+
}));
|
|
37
|
+
return (h(ToolbarItemGroup, { className: "pwv-ViewBar" },
|
|
38
|
+
pdfDocument.fitMode === PdfFitMode.NONE && (h(ToolbarButton, { name: "fitMode", tooltip: translationManager.getText('fitMode.none'), icon: icons.fitActualSize, onClick: () => {
|
|
39
|
+
actions.api.setFitMode(PdfFitMode.FIT_PAGE);
|
|
40
|
+
} })),
|
|
41
|
+
pdfDocument.fitMode === PdfFitMode.FIT_PAGE && (h(ToolbarButton, { name: "fitMode", tooltip: translationManager.getText('fitMode.page'), icon: icons.fitPage, onClick: () => {
|
|
42
|
+
actions.api.setFitMode(PdfFitMode.FIT_WIDTH);
|
|
43
|
+
} })),
|
|
44
|
+
pdfDocument.fitMode === PdfFitMode.FIT_WIDTH && (h(ToolbarButton, { name: "fitMode", tooltip: translationManager.getText('fitMode.width'), icon: icons.fitWidth, onClick: () => {
|
|
45
|
+
actions.api.setFitMode(PdfFitMode.NONE);
|
|
46
|
+
actions.api.setZoom(100);
|
|
47
|
+
} })),
|
|
48
|
+
state.options.viewer.permissions.enablePageLayoutMode && (h(Dropdown, { name: "pageLayoutMode", tooltip: getPageLayoutModeTranslation(pdfDocument.pageLayoutMode), items: layoutModeItems, value: pdfDocument.pageLayoutMode, className: "pwv-page-layout-mode", renderButton: (i, text) => (h(Icon, { icon: icons[`pageLayoutMode${i}`], className: "pwv-page-layout-mode-icon" })), onChange: (value) => {
|
|
49
|
+
actions.api.setPageLayoutMode(value);
|
|
50
|
+
} })),
|
|
51
|
+
state.options.viewer.permissions.allowRotateView && screenSize === ScreenSize.Large && (h(ToolbarButton, { name: "rotateView", tooltip: translationManager.getText('toolbar.rotateView'), icon: icons.rotate, onClick: actions.api.rotate }))));
|
|
52
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
3
|
+
import { icons } from '../../../common/icons';
|
|
4
|
+
import { ToolbarItemGroup } from '../../../common/ToolbarItemGroup';
|
|
5
|
+
import { ToolbarButton } from '../../../common/ToolbarButton';
|
|
6
|
+
import { Dropdown } from '../../../common/Dropdown';
|
|
7
|
+
/** internal */
|
|
8
|
+
export const ZoomBar = ({}) => (state, actions) => {
|
|
9
|
+
const { defaultZoomLevels } = state.options.viewer.general;
|
|
10
|
+
const { zoom } = state.pdfDocument;
|
|
11
|
+
return (h(ToolbarItemGroup, { className: "pwv-ZoomBar" },
|
|
12
|
+
h(ToolbarButton, { name: "zoomIn", tooltip: translationManager.getText('toolbar.zoomIn'), className: "pwv-MdHidden pwv-SmHidden", icon: icons.zoomIn, disabled: zoom >= defaultZoomLevels[defaultZoomLevels.length - 1] * 100, onClick: () => actions.api.zoomIn() }),
|
|
13
|
+
h(ToolbarButton, { name: "zoomOut", tooltip: translationManager.getText('toolbar.zoomOut'), className: "pwv-MdHidden pwv-SmHidden", icon: icons.zoomOut, disabled: zoom <= defaultZoomLevels[0] * 100, onClick: () => actions.api.zoomOut() }),
|
|
14
|
+
h(Dropdown, { name: "zoom", tooltip: translationManager.getText('toolbar.zoom'), className: "pwv-Dropdown-zoom", items: defaultZoomLevels.map((zoom) => ({
|
|
15
|
+
value: zoom * 100,
|
|
16
|
+
text: Math.floor(zoom * 100) + '%',
|
|
17
|
+
})), value: zoom, text: Math.floor(zoom) + '%', align: "right", onChange: (zoom) => actions.api.setZoom(zoom) })));
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { Icon, icons } from '../../../common/Icon';
|
|
3
|
+
import { translationManager } from '../../../common/TranslationManager';
|
|
4
|
+
/** internal */
|
|
5
|
+
export const ApplicationError = ({}) => (state, actions) => {
|
|
6
|
+
let message = translationManager.getText('applicationError.defaultMessage');
|
|
7
|
+
switch (state.errorMessage) {
|
|
8
|
+
case 'Invalid License':
|
|
9
|
+
message = translationManager.getText('applicationError.invalidLicense');
|
|
10
|
+
break;
|
|
11
|
+
}
|
|
12
|
+
const btnText = translationManager.getText('applicationError.reload');
|
|
13
|
+
return (h("div", { class: "pwv-modal pwv-modal--applicationError" },
|
|
14
|
+
h("div", { class: "pwv-modal-dialog" },
|
|
15
|
+
h("div", { class: "pwv-modal-header" },
|
|
16
|
+
h(Icon, { icon: icons.error }),
|
|
17
|
+
h("h2", null, translationManager.getText('applicationError.title'))),
|
|
18
|
+
h("div", { class: "pwv-modal-body" },
|
|
19
|
+
h("div", { class: "pwv-modal-message" },
|
|
20
|
+
h("p", null, message)),
|
|
21
|
+
btnText && (h("div", { class: "pwv-btn-row" },
|
|
22
|
+
h("button", { class: "pwv-btn", onclick: () => {
|
|
23
|
+
document.location && document.location.reload();
|
|
24
|
+
} }, btnText)))))));
|
|
25
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { h } from '../../../lib/hyperapp';
|
|
2
|
+
import { Loader } from '../../../common/Loader';
|
|
3
|
+
/** internal */
|
|
4
|
+
export const LoadApplication = ({}) => (h("div", { class: "pwv-modal pwv-modal--loadApplication" },
|
|
5
|
+
h("div", { class: "pwv-modal-body-noborder" },
|
|
6
|
+
h(Loader, null))));
|