@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.
Files changed (367) hide show
  1. package/LICENSE.md +446 -0
  2. package/README.md +145 -0
  3. package/css/pdf-web-viewer.css +2407 -0
  4. package/doc/PdfWebViewer.pdf +0 -0
  5. package/es6/common/Checkbox.d.ts +9 -0
  6. package/es6/common/Checkbox.js +8 -0
  7. package/es6/common/Color.d.ts +23 -0
  8. package/es6/common/Color.js +118 -0
  9. package/es6/common/ColorPicker.d.ts +15 -0
  10. package/es6/common/ColorPicker.js +46 -0
  11. package/es6/common/Contextbar.d.ts +6 -0
  12. package/es6/common/Contextbar.js +19 -0
  13. package/es6/common/DragMoveHandler.d.ts +51 -0
  14. package/es6/common/DragMoveHandler.js +175 -0
  15. package/es6/common/Dropdown.d.ts +36 -0
  16. package/es6/common/Dropdown.js +76 -0
  17. package/es6/common/DropdownMenu.d.ts +9 -0
  18. package/es6/common/DropdownMenu.js +10 -0
  19. package/es6/common/DropdownSeparator.d.ts +3 -0
  20. package/es6/common/DropdownSeparator.js +6 -0
  21. package/es6/common/Icon.d.ts +13 -0
  22. package/es6/common/Icon.js +8 -0
  23. package/es6/common/Loader.d.ts +3 -0
  24. package/es6/common/Loader.js +6 -0
  25. package/es6/common/RangeSlider.d.ts +17 -0
  26. package/es6/common/RangeSlider.js +42 -0
  27. package/es6/common/StrokeStylePicker.d.ts +11 -0
  28. package/es6/common/StrokeStylePicker.js +20 -0
  29. package/es6/common/StrokeWidthPicker.d.ts +11 -0
  30. package/es6/common/StrokeWidthPicker.js +20 -0
  31. package/es6/common/Toolbar.d.ts +10 -0
  32. package/es6/common/Toolbar.js +6 -0
  33. package/es6/common/ToolbarButton.d.ts +14 -0
  34. package/es6/common/ToolbarButton.js +21 -0
  35. package/es6/common/ToolbarFileButton.d.ts +15 -0
  36. package/es6/common/ToolbarFileButton.js +27 -0
  37. package/es6/common/ToolbarItemGroup.d.ts +8 -0
  38. package/es6/common/ToolbarItemGroup.js +12 -0
  39. package/es6/common/ToolbarSeparator.d.ts +3 -0
  40. package/es6/common/ToolbarSeparator.js +6 -0
  41. package/es6/common/Tools.d.ts +10 -0
  42. package/es6/common/Tools.js +89 -0
  43. package/es6/common/TooltipManager.d.ts +12 -0
  44. package/es6/common/TooltipManager.js +54 -0
  45. package/es6/common/TranslationManager.d.ts +11 -0
  46. package/es6/common/TranslationManager.js +61 -0
  47. package/es6/common/classNames.d.ts +2 -0
  48. package/es6/common/classNames.js +18 -0
  49. package/es6/common/formatDate.d.ts +1 -0
  50. package/es6/common/formatDate.js +1 -0
  51. package/es6/common/icons.d.ts +13 -0
  52. package/es6/common/icons.js +412 -0
  53. package/es6/common/utils.d.ts +2 -0
  54. package/es6/common/utils.js +19 -0
  55. package/es6/custom/history.d.ts +2 -0
  56. package/es6/custom/history.js +59 -0
  57. package/es6/index.d.ts +5 -0
  58. package/es6/index.js +5 -0
  59. package/es6/lib/hyperapp/index.d.ts +108 -0
  60. package/es6/lib/hyperapp/index.js +327 -0
  61. package/es6/modules/CanvasLayer.d.ts +32 -0
  62. package/es6/modules/CanvasLayer.js +83 -0
  63. package/es6/modules/CanvasModule.d.ts +59 -0
  64. package/es6/modules/CanvasModule.js +98 -0
  65. package/es6/modules/eraser/EraserLayer.d.ts +13 -0
  66. package/es6/modules/eraser/EraserLayer.js +141 -0
  67. package/es6/modules/eraser/EraserModule.d.ts +19 -0
  68. package/es6/modules/eraser/EraserModule.js +34 -0
  69. package/es6/modules/eraser/EraserToolbar.d.ts +10 -0
  70. package/es6/modules/eraser/EraserToolbar.js +30 -0
  71. package/es6/modules/form-fields/CheckBoxWidget.d.ts +9 -0
  72. package/es6/modules/form-fields/CheckBoxWidget.js +45 -0
  73. package/es6/modules/form-fields/ComboBoxWidget.d.ts +22 -0
  74. package/es6/modules/form-fields/ComboBoxWidget.js +152 -0
  75. package/es6/modules/form-fields/EditFormFieldLayer.d.ts +17 -0
  76. package/es6/modules/form-fields/EditFormFieldLayer.js +238 -0
  77. package/es6/modules/form-fields/FormFieldModule.d.ts +15 -0
  78. package/es6/modules/form-fields/FormFieldModule.js +27 -0
  79. package/es6/modules/form-fields/ListBoxWidget.d.ts +9 -0
  80. package/es6/modules/form-fields/ListBoxWidget.js +73 -0
  81. package/es6/modules/form-fields/RadioButtonWidget.d.ts +9 -0
  82. package/es6/modules/form-fields/RadioButtonWidget.js +45 -0
  83. package/es6/modules/form-fields/SelectListWidget.d.ts +9 -0
  84. package/es6/modules/form-fields/SelectListWidget.js +45 -0
  85. package/es6/modules/form-fields/TextBoxWidget.d.ts +9 -0
  86. package/es6/modules/form-fields/TextBoxWidget.js +53 -0
  87. package/es6/modules/form-fields/WidgetBase.d.ts +23 -0
  88. package/es6/modules/form-fields/WidgetBase.js +29 -0
  89. package/es6/modules/freetext-annotation/AddFreetextAnnotationLayer.d.ts +19 -0
  90. package/es6/modules/freetext-annotation/AddFreetextAnnotationLayer.js +181 -0
  91. package/es6/modules/freetext-annotation/AddFreetextAnnotationToolbar.d.ts +21 -0
  92. package/es6/modules/freetext-annotation/AddFreetextAnnotationToolbar.js +37 -0
  93. package/es6/modules/freetext-annotation/EditFreetextAnnotationLayer.d.ts +20 -0
  94. package/es6/modules/freetext-annotation/EditFreetextAnnotationLayer.js +211 -0
  95. package/es6/modules/freetext-annotation/EditFreetextAnnotationToolbar.d.ts +50 -0
  96. package/es6/modules/freetext-annotation/EditFreetextAnnotationToolbar.js +118 -0
  97. package/es6/modules/freetext-annotation/FreetextAnnotationModule.d.ts +28 -0
  98. package/es6/modules/freetext-annotation/FreetextAnnotationModule.js +58 -0
  99. package/es6/modules/freetext-annotation/RichTextEditor.d.ts +31 -0
  100. package/es6/modules/freetext-annotation/RichTextEditor.js +223 -0
  101. package/es6/modules/highlight-annotation/AddHighlightAnnotationLayer.d.ts +31 -0
  102. package/es6/modules/highlight-annotation/AddHighlightAnnotationLayer.js +289 -0
  103. package/es6/modules/highlight-annotation/AddHighlightAnnotationToolbar.d.ts +20 -0
  104. package/es6/modules/highlight-annotation/AddHighlightAnnotationToolbar.js +52 -0
  105. package/es6/modules/highlight-annotation/EditHighlightAnnotationLayer.d.ts +15 -0
  106. package/es6/modules/highlight-annotation/EditHighlightAnnotationLayer.js +104 -0
  107. package/es6/modules/highlight-annotation/EditHighlightAnnotationToolbar.d.ts +15 -0
  108. package/es6/modules/highlight-annotation/EditHighlightAnnotationToolbar.js +28 -0
  109. package/es6/modules/highlight-annotation/HighlightAnnotationModule.d.ts +27 -0
  110. package/es6/modules/highlight-annotation/HighlightAnnotationModule.js +54 -0
  111. package/es6/modules/image-annotations/ImageAnnotationModule.d.ts +23 -0
  112. package/es6/modules/image-annotations/ImageAnnotationModule.js +169 -0
  113. package/es6/modules/index.d.ts +13 -0
  114. package/es6/modules/index.js +13 -0
  115. package/es6/modules/ink-annotation/AddInkAnnotationLayer.d.ts +40 -0
  116. package/es6/modules/ink-annotation/AddInkAnnotationLayer.js +503 -0
  117. package/es6/modules/ink-annotation/AddInkAnnotationToolbar.d.ts +30 -0
  118. package/es6/modules/ink-annotation/AddInkAnnotationToolbar.js +53 -0
  119. package/es6/modules/ink-annotation/EditInkAnnotationLayer.d.ts +20 -0
  120. package/es6/modules/ink-annotation/EditInkAnnotationLayer.js +137 -0
  121. package/es6/modules/ink-annotation/EditInkAnnotationToolbar.d.ts +25 -0
  122. package/es6/modules/ink-annotation/EditInkAnnotationToolbar.js +47 -0
  123. package/es6/modules/ink-annotation/InkAnnotationModule.d.ts +27 -0
  124. package/es6/modules/ink-annotation/InkAnnotationModule.js +50 -0
  125. package/es6/modules/popup/Popup.d.ts +64 -0
  126. package/es6/modules/popup/Popup.js +360 -0
  127. package/es6/modules/popup/PopupLayer.d.ts +31 -0
  128. package/es6/modules/popup/PopupLayer.js +509 -0
  129. package/es6/modules/popup/PopupModule.d.ts +16 -0
  130. package/es6/modules/popup/PopupModule.js +25 -0
  131. package/es6/modules/print-service/PrintServiceDialog.d.ts +30 -0
  132. package/es6/modules/print-service/PrintServiceDialog.js +134 -0
  133. package/es6/modules/print-service/PrintServiceLayer.d.ts +24 -0
  134. package/es6/modules/print-service/PrintServiceLayer.js +310 -0
  135. package/es6/modules/print-service/PrintServiceModule.d.ts +18 -0
  136. package/es6/modules/print-service/PrintServiceModule.js +30 -0
  137. package/es6/modules/shape-annotations/AddShapeAnnotationLayer.d.ts +24 -0
  138. package/es6/modules/shape-annotations/AddShapeAnnotationLayer.js +210 -0
  139. package/es6/modules/shape-annotations/AddShapeAnnotationToolbar.d.ts +26 -0
  140. package/es6/modules/shape-annotations/AddShapeAnnotationToolbar.js +69 -0
  141. package/es6/modules/shape-annotations/EditShapeAnnotationLayer.d.ts +19 -0
  142. package/es6/modules/shape-annotations/EditShapeAnnotationLayer.js +148 -0
  143. package/es6/modules/shape-annotations/EditShapeAnnotationToolbar.d.ts +24 -0
  144. package/es6/modules/shape-annotations/EditShapeAnnotationToolbar.js +57 -0
  145. package/es6/modules/shape-annotations/ShapeAnnotationModule.d.ts +28 -0
  146. package/es6/modules/shape-annotations/ShapeAnnotationModule.js +50 -0
  147. package/es6/modules/stamp-annotation/AddStampAnnotationLayer.d.ts +19 -0
  148. package/es6/modules/stamp-annotation/AddStampAnnotationLayer.js +257 -0
  149. package/es6/modules/stamp-annotation/AddStampAnnotationToolbar.d.ts +17 -0
  150. package/es6/modules/stamp-annotation/AddStampAnnotationToolbar.js +68 -0
  151. package/es6/modules/stamp-annotation/StampAnnotationModule.d.ts +20 -0
  152. package/es6/modules/stamp-annotation/StampAnnotationModule.js +35 -0
  153. package/es6/modules/text-annotation/AddTextAnnotationLayer.d.ts +14 -0
  154. package/es6/modules/text-annotation/AddTextAnnotationLayer.js +132 -0
  155. package/es6/modules/text-annotation/AddTextAnnotationToolbar.d.ts +15 -0
  156. package/es6/modules/text-annotation/AddTextAnnotationToolbar.js +27 -0
  157. package/es6/modules/text-annotation/TextAnnotationModule.d.ts +19 -0
  158. package/es6/modules/text-annotation/TextAnnotationModule.js +34 -0
  159. package/es6/pdf-viewer-api/ImageContainer.d.ts +10 -0
  160. package/es6/pdf-viewer-api/ImageContainer.js +43 -0
  161. package/es6/pdf-viewer-api/PdfViewerApi.d.ts +463 -0
  162. package/es6/pdf-viewer-api/PdfViewerApi.js +732 -0
  163. package/es6/pdf-viewer-api/PdfViewingWrapper.d.ts +178 -0
  164. package/es6/pdf-viewer-api/PdfViewingWrapper.js +2037 -0
  165. package/es6/pdf-viewer-api/annotationDefaultBehaviors.d.ts +3 -0
  166. package/es6/pdf-viewer-api/annotationDefaultBehaviors.js +30 -0
  167. package/es6/pdf-viewer-api/enums.d.ts +100 -0
  168. package/es6/pdf-viewer-api/enums.js +113 -0
  169. package/es6/pdf-viewer-api/index.d.ts +3 -0
  170. package/es6/pdf-viewer-api/index.js +3 -0
  171. package/es6/pdf-viewer-api/types.d.ts +284 -0
  172. package/es6/pdf-viewer-api/types.js +6 -0
  173. package/es6/pdf-viewer-canvas/CanvasEvents.d.ts +76 -0
  174. package/es6/pdf-viewer-canvas/CanvasEvents.js +345 -0
  175. package/es6/pdf-viewer-canvas/PdfViewerCanvas.d.ts +175 -0
  176. package/es6/pdf-viewer-canvas/PdfViewerCanvas.js +1226 -0
  177. package/es6/pdf-viewer-canvas/state/annotations.d.ts +36 -0
  178. package/es6/pdf-viewer-canvas/state/annotations.js +157 -0
  179. package/es6/pdf-viewer-canvas/state/appState.d.ts +10 -0
  180. package/es6/pdf-viewer-canvas/state/appState.js +60 -0
  181. package/es6/pdf-viewer-canvas/state/canvas.d.ts +31 -0
  182. package/es6/pdf-viewer-canvas/state/canvas.js +41 -0
  183. package/es6/pdf-viewer-canvas/state/document.d.ts +50 -0
  184. package/es6/pdf-viewer-canvas/state/document.js +99 -0
  185. package/es6/pdf-viewer-canvas/state/pointer.d.ts +31 -0
  186. package/es6/pdf-viewer-canvas/state/pointer.js +31 -0
  187. package/es6/pdf-viewer-canvas/state/scroll.d.ts +22 -0
  188. package/es6/pdf-viewer-canvas/state/scroll.js +25 -0
  189. package/es6/pdf-viewer-canvas/state/search.d.ts +36 -0
  190. package/es6/pdf-viewer-canvas/state/search.js +27 -0
  191. package/es6/pdf-viewer-canvas/state/store.d.ts +39 -0
  192. package/es6/pdf-viewer-canvas/state/store.js +52 -0
  193. package/es6/pdf-viewer-canvas/state/viewer.d.ts +91 -0
  194. package/es6/pdf-viewer-canvas/state/viewer.js +175 -0
  195. package/es6/pdf-viewer-canvas/view-layers/AnnotationSelectionLayer.d.ts +28 -0
  196. package/es6/pdf-viewer-canvas/view-layers/AnnotationSelectionLayer.js +452 -0
  197. package/es6/pdf-viewer-canvas/view-layers/BusyStateLayer.d.ts +9 -0
  198. package/es6/pdf-viewer-canvas/view-layers/BusyStateLayer.js +25 -0
  199. package/es6/pdf-viewer-canvas/view-layers/PdfDocumentLayer.d.ts +10 -0
  200. package/es6/pdf-viewer-canvas/view-layers/PdfDocumentLayer.js +149 -0
  201. package/es6/pdf-viewer-canvas/view-layers/ScrollLayer.d.ts +48 -0
  202. package/es6/pdf-viewer-canvas/view-layers/ScrollLayer.js +308 -0
  203. package/es6/pdf-viewer-canvas/view-layers/TextSelectionLayer.d.ts +19 -0
  204. package/es6/pdf-viewer-canvas/view-layers/TextSelectionLayer.js +289 -0
  205. package/es6/pdf-viewer-canvas/view-layers/ViewLayerBase.d.ts +31 -0
  206. package/es6/pdf-viewer-canvas/view-layers/ViewLayerBase.js +106 -0
  207. package/es6/pdf-viewer-canvas/view-layers/canvasShapes.d.ts +11 -0
  208. package/es6/pdf-viewer-canvas/view-layers/canvasShapes.js +149 -0
  209. package/es6/pdf-viewer-canvas/view-layers/canvasUtlis.d.ts +3 -0
  210. package/es6/pdf-viewer-canvas/view-layers/canvasUtlis.js +10 -0
  211. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationBorder.d.ts +52 -0
  212. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationBorder.js +377 -0
  213. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationContextBar.d.ts +47 -0
  214. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationContextBar.js +102 -0
  215. package/es6/pdf-viewer-canvas/view-layers/views/TextSelectionContextBar.d.ts +14 -0
  216. package/es6/pdf-viewer-canvas/view-layers/views/TextSelectionContextBar.js +36 -0
  217. package/es6/pdf-viewing/PdfViewing.d.ts +4865 -0
  218. package/es6/pdf-viewing/PdfViewing.js +9611 -0
  219. package/es6/pdf-web-viewer/PdfWebViewer.d.ts +372 -0
  220. package/es6/pdf-web-viewer/PdfWebViewer.js +1386 -0
  221. package/es6/pdf-web-viewer/UserSettings.d.ts +8 -0
  222. package/es6/pdf-web-viewer/UserSettings.js +40 -0
  223. package/es6/pdf-web-viewer/WebViewerOptions.d.ts +387 -0
  224. package/es6/pdf-web-viewer/WebViewerOptions.js +582 -0
  225. package/es6/pdf-web-viewer/state/index.d.ts +80 -0
  226. package/es6/pdf-web-viewer/state/index.js +98 -0
  227. package/es6/pdf-web-viewer/state/layout.d.ts +24 -0
  228. package/es6/pdf-web-viewer/state/layout.js +21 -0
  229. package/es6/pdf-web-viewer/state/mobile.d.ts +16 -0
  230. package/es6/pdf-web-viewer/state/mobile.js +11 -0
  231. package/es6/pdf-web-viewer/state/navigationPanel.d.ts +61 -0
  232. package/es6/pdf-web-viewer/state/navigationPanel.js +84 -0
  233. package/es6/pdf-web-viewer/state/passwordForm.d.ts +18 -0
  234. package/es6/pdf-web-viewer/state/passwordForm.js +21 -0
  235. package/es6/pdf-web-viewer/state/pdfDocument.d.ts +31 -0
  236. package/es6/pdf-web-viewer/state/pdfDocument.js +41 -0
  237. package/es6/pdf-web-viewer/state/search.d.ts +29 -0
  238. package/es6/pdf-web-viewer/state/search.js +23 -0
  239. package/es6/pdf-web-viewer/views/App.d.ts +4 -0
  240. package/es6/pdf-web-viewer/views/App.js +19 -0
  241. package/es6/pdf-web-viewer/views/CustomButtons.d.ts +9 -0
  242. package/es6/pdf-web-viewer/views/CustomButtons.js +18 -0
  243. package/es6/pdf-web-viewer/views/DropZone.d.ts +9 -0
  244. package/es6/pdf-web-viewer/views/DropZone.js +53 -0
  245. package/es6/pdf-web-viewer/views/Layout.d.ts +4 -0
  246. package/es6/pdf-web-viewer/views/Layout.js +22 -0
  247. package/es6/pdf-web-viewer/views/annotationbar/Annotationbar.d.ts +4 -0
  248. package/es6/pdf-web-viewer/views/annotationbar/Annotationbar.js +21 -0
  249. package/es6/pdf-web-viewer/views/appbar/AddonsToolbar.d.ts +4 -0
  250. package/es6/pdf-web-viewer/views/appbar/AddonsToolbar.js +35 -0
  251. package/es6/pdf-web-viewer/views/appbar/AnnotationsMenu.d.ts +4 -0
  252. package/es6/pdf-web-viewer/views/appbar/AnnotationsMenu.js +22 -0
  253. package/es6/pdf-web-viewer/views/appbar/AppBar.d.ts +4 -0
  254. package/es6/pdf-web-viewer/views/appbar/AppBar.js +26 -0
  255. package/es6/pdf-web-viewer/views/appbar/DocumentBar.d.ts +4 -0
  256. package/es6/pdf-web-viewer/views/appbar/DocumentBar.js +36 -0
  257. package/es6/pdf-web-viewer/views/appbar/Menu.d.ts +4 -0
  258. package/es6/pdf-web-viewer/views/appbar/Menu.js +80 -0
  259. package/es6/pdf-web-viewer/views/appbar/NavigationBar.d.ts +4 -0
  260. package/es6/pdf-web-viewer/views/appbar/NavigationBar.js +74 -0
  261. package/es6/pdf-web-viewer/views/appbar/SearchBar.d.ts +4 -0
  262. package/es6/pdf-web-viewer/views/appbar/SearchBar.js +83 -0
  263. package/es6/pdf-web-viewer/views/appbar/SearchOptions.d.ts +10 -0
  264. package/es6/pdf-web-viewer/views/appbar/SearchOptions.js +55 -0
  265. package/es6/pdf-web-viewer/views/appbar/ViewBar.d.ts +4 -0
  266. package/es6/pdf-web-viewer/views/appbar/ViewBar.js +52 -0
  267. package/es6/pdf-web-viewer/views/appbar/ZoomBar.d.ts +4 -0
  268. package/es6/pdf-web-viewer/views/appbar/ZoomBar.js +18 -0
  269. package/es6/pdf-web-viewer/views/modal/ApplicationError.d.ts +4 -0
  270. package/es6/pdf-web-viewer/views/modal/ApplicationError.js +25 -0
  271. package/es6/pdf-web-viewer/views/modal/LoadApplication.d.ts +3 -0
  272. package/es6/pdf-web-viewer/views/modal/LoadApplication.js +6 -0
  273. package/es6/pdf-web-viewer/views/modal/LoadFile.d.ts +3 -0
  274. package/es6/pdf-web-viewer/views/modal/LoadFile.js +10 -0
  275. package/es6/pdf-web-viewer/views/modal/Modal.d.ts +4 -0
  276. package/es6/pdf-web-viewer/views/modal/Modal.js +39 -0
  277. package/es6/pdf-web-viewer/views/modal/OpenFile.d.ts +4 -0
  278. package/es6/pdf-web-viewer/views/modal/OpenFile.js +30 -0
  279. package/es6/pdf-web-viewer/views/modal/OpenFileError.d.ts +4 -0
  280. package/es6/pdf-web-viewer/views/modal/OpenFileError.js +13 -0
  281. package/es6/pdf-web-viewer/views/modal/PasswordForm.d.ts +4 -0
  282. package/es6/pdf-web-viewer/views/modal/PasswordForm.js +54 -0
  283. package/es6/pdf-web-viewer/views/modal/SaveFile.d.ts +4 -0
  284. package/es6/pdf-web-viewer/views/modal/SaveFile.js +10 -0
  285. package/es6/pdf-web-viewer/views/modal/UnsavedChanges.d.ts +4 -0
  286. package/es6/pdf-web-viewer/views/modal/UnsavedChanges.js +32 -0
  287. package/es6/pdf-web-viewer/views/navigation/AnnotationList.d.ts +8 -0
  288. package/es6/pdf-web-viewer/views/navigation/AnnotationList.js +26 -0
  289. package/es6/pdf-web-viewer/views/navigation/AnnotationListItem.d.ts +8 -0
  290. package/es6/pdf-web-viewer/views/navigation/AnnotationListItem.js +158 -0
  291. package/es6/pdf-web-viewer/views/navigation/AnnotationNavigation.d.ts +4 -0
  292. package/es6/pdf-web-viewer/views/navigation/AnnotationNavigation.js +11 -0
  293. package/es6/pdf-web-viewer/views/navigation/NavigationPanel.d.ts +4 -0
  294. package/es6/pdf-web-viewer/views/navigation/NavigationPanel.js +50 -0
  295. package/es6/pdf-web-viewer/views/navigation/OutlineList.d.ts +12 -0
  296. package/es6/pdf-web-viewer/views/navigation/OutlineList.js +19 -0
  297. package/es6/pdf-web-viewer/views/navigation/OutlineNavigation.d.ts +4 -0
  298. package/es6/pdf-web-viewer/views/navigation/OutlineNavigation.js +10 -0
  299. package/es6/pdf-web-viewer/views/navigation/ThumbnailNavigation.d.ts +16 -0
  300. package/es6/pdf-web-viewer/views/navigation/ThumbnailNavigation.js +32 -0
  301. package/package.json +24 -0
  302. package/pdfwebviewer/PdfViewing.data +0 -0
  303. package/pdfwebviewer/PdfViewing_Main.js +1 -0
  304. package/pdfwebviewer/PdfViewing_Main.wasm +0 -0
  305. package/pdfwebviewer/PdfViewing_Worker.js +1 -0
  306. package/pdfwebviewer/PdfViewing_Worker.wasm +0 -0
  307. package/pdfwebviewer/pdf-web-viewer.css +2407 -0
  308. package/pdfwebviewer/pdf-web-viewer.development.js +25955 -0
  309. package/pdfwebviewer/pdf-web-viewer.min.js +1 -0
  310. package/pdfwebviewer/translations.de.json +151 -0
  311. package/pdfwebviewer/translations.en.json +151 -0
  312. package/pdfwebviewer/translations.fr.json +151 -0
  313. package/pdfwebviewer/translations.it.json +151 -0
  314. package/scss/common/_breakpoints.scss +44 -0
  315. package/scss/common/_buttons.scss +42 -0
  316. package/scss/common/_colorpicker.scss +89 -0
  317. package/scss/common/_common.scss +21 -0
  318. package/scss/common/_contextbar.scss +44 -0
  319. package/scss/common/_dropdown.scss +176 -0
  320. package/scss/common/_icon.scss +9 -0
  321. package/scss/common/_index.scss +19 -0
  322. package/scss/common/_loader.scss +30 -0
  323. package/scss/common/_rangeslider.scss +24 -0
  324. package/scss/common/_scrollbars.scss +64 -0
  325. package/scss/common/_stroke-style-picker.scss +64 -0
  326. package/scss/common/_stroke-width-picker.scss +23 -0
  327. package/scss/common/_toolbar.scss +117 -0
  328. package/scss/common/_tooltip.scss +39 -0
  329. package/scss/modules/_eraser.scss +28 -0
  330. package/scss/modules/_forms.scss +56 -0
  331. package/scss/modules/_highlightannotation.scss +12 -0
  332. package/scss/modules/_index.scss +5 -0
  333. package/scss/modules/_inkannotation.scss +41 -0
  334. package/scss/modules/_stampannotation.scss +19 -0
  335. package/scss/pdf-viewer-canvas/_annotationborder.scss +107 -0
  336. package/scss/pdf-viewer-canvas/_busy-loader.scss +53 -0
  337. package/scss/pdf-viewer-canvas/_freetexteditor.scss +28 -0
  338. package/scss/pdf-viewer-canvas/_index.scss +7 -0
  339. package/scss/pdf-viewer-canvas/_layout.scss +52 -0
  340. package/scss/pdf-viewer-canvas/_popup.scss +217 -0
  341. package/scss/pdf-viewer-canvas/_printservice.scss +171 -0
  342. package/scss/pdf-viewer-canvas/_textselection.scss +17 -0
  343. package/scss/pdf-web-viewer/_annotationbar.scss +47 -0
  344. package/scss/pdf-web-viewer/_index.scss +8 -0
  345. package/scss/pdf-web-viewer/_layout.scss +63 -0
  346. package/scss/pdf-web-viewer/_modal.scss +186 -0
  347. package/scss/pdf-web-viewer/_navigationpanel.scss +398 -0
  348. package/scss/pdf-web-viewer/_searchbar.scss +47 -0
  349. package/scss/pdf-web-viewer/_toolbar.scss +134 -0
  350. package/scss/pdf-web-viewer/_viewer.scss +54 -0
  351. package/scss/pdf-web-viewer.scss +1 -0
  352. package/scss/themes/default/_light.scss +32 -0
  353. package/scss/themes/default/_mixins.scss +129 -0
  354. package/scss/themes/default/_theme.scss +161 -0
  355. package/scss/themes/pdf-web-viewer.scss +1 -0
  356. package/umd/pdf-web-viewer.development.js +25955 -0
  357. package/umd/pdf-web-viewer.development.js.map +1 -0
  358. package/umd/pdf-web-viewer.min.js +1 -0
  359. package/wasm/PdfViewing.data +0 -0
  360. package/wasm/PdfViewing_Main.js +1 -0
  361. package/wasm/PdfViewing_Main.wasm +0 -0
  362. package/wasm/PdfViewing_Worker.js +1 -0
  363. package/wasm/PdfViewing_Worker.wasm +0 -0
  364. package/wasm/translations.de.json +151 -0
  365. package/wasm/translations.en.json +151 -0
  366. package/wasm/translations.fr.json +151 -0
  367. 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>;