@react-pdf-kit/viewer 2.6.0-beta.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnnotationLayer-D6BfL976.js +113 -0
- package/dist/Button-jStpvb3T.js +21 -0
- package/dist/Checkbox-Brta-YKG.js +195 -0
- package/dist/Combination-DqNkTtir.js +695 -0
- package/dist/Container-DTWaZzc7.js +16 -0
- package/dist/CustomThumbnailElement-C2quEICO.js +19 -0
- package/dist/DarkPdfIcon-B5ehd9CV.js +9 -0
- package/dist/DocumentDialog-DHAWcYIz.js +324 -0
- package/dist/DropDown-DikL-krI.js +33 -0
- package/dist/Input-Bb_-ljl1.js +31 -0
- package/dist/LightPdfIcon-DL8MYtWQ.js +9 -0
- package/dist/LoaderIcon-D9YjinGf.js +14 -0
- package/dist/LoadingIndicator-MWrbKa6X.js +45 -0
- package/dist/MenuItem-BJDWfzAw.js +15 -0
- package/dist/MenuSeparator-D1H5l8Ej.js +6 -0
- package/dist/MostPageTool.module-BRVv-sGz.js +4 -0
- package/dist/OtherTool.module-BQY9Nfqz.js +4 -0
- package/dist/Paginate.module-B0GMw-MB.js +8 -0
- package/dist/PaginationContext--n91mIJ4.js +232 -0
- package/dist/PasswordModal-BDHdSpxf.js +76 -0
- package/dist/PropertyItem-evJWWmWZ.js +18 -0
- package/dist/RPDropFileZone-BunRfzst.js +35 -0
- package/dist/RPLayout.module-Vc3h4xxS.js +14 -0
- package/dist/RPPage-BuSGUFzw.js +91 -0
- package/dist/RPPages-V5CNUXFD.js +1007 -0
- package/dist/RPSplitter-C63X9M8w.js +121 -0
- package/dist/RPToolbar.module-BwqWLviy.js +10 -0
- package/dist/RPTooltip-ZZoFqP7C.js +381 -0
- package/dist/RotateTool.module-DH5yWbvM.js +4 -0
- package/dist/SearchTool.module-DUkVXfOn.js +16 -0
- package/dist/SkipLink-Bvbn3miT.js +18 -0
- package/dist/TextHighlightLayer-BSVgBxR3.js +157 -0
- package/dist/TextLayer-DWGFN9SF.js +125 -0
- package/dist/Thumbnail-Dwo2-4Ki.js +97 -0
- package/dist/Thumbnails-ComClyJJ.js +52 -0
- package/dist/ToolbarLayout.module-Zo715dbb.js +12 -0
- package/dist/WrapperLayout-Dcd9l9xH.js +13 -0
- package/dist/ZoomTool.module-BrIPy8pO.js +11 -0
- package/dist/assets/AnnotationLayer.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Checkbox.css +1 -0
- package/dist/assets/Container.css +1 -0
- package/dist/assets/CustomThumbnailElement.css +1 -0
- package/dist/assets/DocumentDialog.css +1 -0
- package/dist/assets/DropDown.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/LoaderIcon.css +1 -0
- package/dist/assets/LoadingIndicator.css +1 -0
- package/dist/assets/MenuItem.css +1 -0
- package/dist/assets/MenuSeparator.css +1 -0
- package/dist/assets/MostPageTool.css +1 -0
- package/dist/assets/OtherTool.css +1 -0
- package/dist/assets/Paginate.css +1 -0
- package/dist/assets/PasswordModal.css +1 -0
- package/dist/assets/PropertyItem.css +1 -0
- package/dist/assets/RPDropFileZone.css +1 -0
- package/dist/assets/RPLayout.css +1 -0
- package/dist/assets/RPPage.css +1 -0
- package/dist/assets/RPPages.css +1 -0
- package/dist/assets/RPSplitter.css +1 -0
- package/dist/assets/RPToolbar.css +1 -0
- package/dist/assets/RPTooltip.css +1 -0
- package/dist/assets/RotateTool.css +1 -0
- package/dist/assets/SearchTool.css +1 -0
- package/dist/assets/SkipLink.css +1 -0
- package/dist/assets/TextHighlightLayer.css +1 -0
- package/dist/assets/TextLayer.css +1 -0
- package/dist/assets/Thumbnail.css +1 -0
- package/dist/assets/Thumbnails.css +1 -0
- package/dist/assets/ToolbarLayout.css +1 -0
- package/dist/assets/WrapperLayout.css +1 -0
- package/dist/assets/ZoomTool.css +1 -0
- package/dist/assets/style.js +2 -77
- package/dist/chunk-C_CI6nMA.js +13 -0
- package/dist/clsx-B7LyVm5O.js +16 -0
- package/dist/components/RPConfig.js +24 -26
- package/dist/components/RPController.js +85 -135
- package/dist/components/RPDropFileZone.js +3 -61
- package/dist/components/RPPages.js +3 -1115
- package/dist/components/RPProvider.js +50 -131
- package/dist/components/RPTheme.js +20 -21
- package/dist/components/icons/CheckIcon.js +16 -22
- package/dist/components/icons/ChevronDownIcon.js +17 -23
- package/dist/components/icons/ChevronUpIcon.js +16 -22
- package/dist/components/icons/ClearIcon.js +26 -25
- package/dist/components/icons/ClockwiseIcon.js +16 -22
- package/dist/components/icons/CloseIcon.js +16 -22
- package/dist/components/icons/DarkPdfIcon.js +2 -15
- package/dist/components/icons/DualPageIcon.js +16 -22
- package/dist/components/icons/DualPageWithCoverIcon.js +16 -22
- package/dist/components/icons/FileDownloadDefaultIcon.js +20 -23
- package/dist/components/icons/FileUploadDefaultIcon.js +20 -23
- package/dist/components/icons/FullScreenIcon.js +16 -22
- package/dist/components/icons/GoToDownIcon.js +16 -22
- package/dist/components/icons/HandModeDefaultIcon.js +16 -22
- package/dist/components/icons/HorizontalScrollingIcon.js +18 -24
- package/dist/components/icons/InfoIcon.js +16 -22
- package/dist/components/icons/LightPdfIcon.js +2 -15
- package/dist/components/icons/LoaderIcon.js +2 -17
- package/dist/components/icons/MoonIcon.js +16 -22
- package/dist/components/icons/PageScrollingIcon.js +18 -24
- package/dist/components/icons/PrintDefaultIcon.js +20 -23
- package/dist/components/icons/SearchIcon.js +16 -22
- package/dist/components/icons/SinglePageIcon.js +15 -21
- package/dist/components/icons/SunIcon.js +26 -25
- package/dist/components/icons/TextSelectionDefaultIcon.js +20 -23
- package/dist/components/icons/ThreeDotIcon.js +16 -22
- package/dist/components/icons/Thumbnail.js +39 -54
- package/dist/components/icons/VerticalScrollingIcon.js +18 -24
- package/dist/components/icons/WrappedScrollingIcon.js +18 -24
- package/dist/components/icons/ZoomInIcon.js +16 -22
- package/dist/components/icons/ZoomOutIcon.js +16 -22
- package/dist/components/layout/Container.js +2 -21
- package/dist/components/layout/LayoutContainer.js +23 -34
- package/dist/components/layout/LayoutWrapper.js +14 -10
- package/dist/components/layout/RPDefaultLayout.js +99 -244
- package/dist/components/layout/RPLayout.js +70 -220
- package/dist/components/layout/SkipLink.js +3 -29
- package/dist/components/layout/WrapperLayout.js +2 -27
- package/dist/components/layout/sidebar/CustomThumbnailElement.js +2 -68
- package/dist/components/layout/sidebar/RPSidebar.js +61 -112
- package/dist/components/layout/sidebar/RPSplitter.js +2 -9
- package/dist/components/layout/sidebar/Thumbnail.js +3 -155
- package/dist/components/layout/sidebar/Thumbnails.js +2 -82
- package/dist/components/layout/toolbar/DarkModeTool.js +44 -36
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -322
- package/dist/components/layout/toolbar/DocumentProperties.js +30 -39
- package/dist/components/layout/toolbar/FileDownloadTool.js +54 -50
- package/dist/components/layout/toolbar/FileUploadTool.js +54 -49
- package/dist/components/layout/toolbar/FullScreenTool.js +62 -72
- package/dist/components/layout/toolbar/MenuItem.js +2 -19
- package/dist/components/layout/toolbar/MenuSeparator.js +2 -15
- package/dist/components/layout/toolbar/MostPageTool.js +62 -81
- package/dist/components/layout/toolbar/OtherTool.js +97 -198
- package/dist/components/layout/toolbar/Paginate.js +111 -145
- package/dist/components/layout/toolbar/PrintTool.js +70 -72
- package/dist/components/layout/toolbar/PropertyItem.js +2 -12
- package/dist/components/layout/toolbar/RPMenuItem.js +22 -31
- package/dist/components/layout/toolbar/RPMoreOptions.js +140 -220
- package/dist/components/layout/toolbar/RPToolbar.js +45 -151
- package/dist/components/layout/toolbar/RPToolbarEnd.js +23 -121
- package/dist/components/layout/toolbar/RotateTool.js +49 -60
- package/dist/components/layout/toolbar/ScrollModeTool.js +79 -67
- package/dist/components/layout/toolbar/SearchCloseButton.js +23 -31
- package/dist/components/layout/toolbar/SearchResultNavigator.js +39 -100
- package/dist/components/layout/toolbar/SearchTool.js +226 -267
- package/dist/components/layout/toolbar/SelectionModeTool.js +59 -51
- package/dist/components/layout/toolbar/ThumbnailTool.js +30 -39
- package/dist/components/layout/toolbar/ToolbarCustom.js +56 -113
- package/dist/components/layout/toolbar/ToolbarDefault.js +58 -196
- package/dist/components/layout/toolbar/ToolbarLayout.js +12 -158
- package/dist/components/layout/toolbar/ViewModeTool.js +82 -62
- package/dist/components/layout/toolbar/ZoomTool.js +139 -150
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +24 -54
- package/dist/components/layout/toolbar/tools/DualPageTool.js +23 -25
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +2 -206
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +23 -35
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +23 -34
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +2 -201
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +25 -33
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/InputPageTool.js +51 -92
- package/dist/components/layout/toolbar/tools/LastPageTool.js +2 -201
- package/dist/components/layout/toolbar/tools/NextPageTool.js +32 -61
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +21 -62
- package/dist/components/layout/toolbar/tools/PrintTool.js +23 -35
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +23 -47
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +26 -47
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +29 -38
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +22 -24
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +24 -35
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +24 -46
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +29 -58
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +26 -26
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +94 -133
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +29 -58
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +60 -148
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +31 -42
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +23 -28
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +25 -52
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +25 -51
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +26 -42
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +57 -87
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +25 -52
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +44 -64
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +80 -71
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +59 -57
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +79 -66
- package/dist/components/page/AnnotationLayer.js +2 -146
- package/dist/components/page/CanvasLayer.js +47 -71
- package/dist/components/page/CustomElement.js +18 -53
- package/dist/components/page/DualPage.js +43 -98
- package/dist/components/page/DualPageWithCover.js +66 -130
- package/dist/components/page/RPPage.js +2 -143
- package/dist/components/page/SinglePage.js +27 -88
- package/dist/components/page/TextHighlightLayer.js +2 -198
- package/dist/components/page/TextLayer.js +2 -202
- package/dist/components/page/searchHighlight.js +32 -37
- package/dist/components/ui/Button.js +2 -25
- package/dist/components/ui/Checkbox.js +2 -273
- package/dist/components/ui/DropDown.js +2 -36
- package/dist/components/ui/Input.js +2 -28
- package/dist/components/ui/LoadingIndicator.js +2 -59
- package/dist/components/ui/PasswordModal.js +2 -75
- package/dist/components/ui/RPTooltip.js +2 -357
- package/dist/contexts/ConfigContext.js +13 -12
- package/dist/contexts/DarkModeContext.js +26 -27
- package/dist/contexts/DimensionPagesContext.js +49 -60
- package/dist/contexts/DocumentPasswordContext.js +37 -35
- package/dist/contexts/DownloadContext.js +13 -21
- package/dist/contexts/DropFileZoneContext.js +35 -62
- package/dist/contexts/ElementPageContext.js +114 -139
- package/dist/contexts/ElementThumbnailContext.js +132 -195
- package/dist/contexts/EventCallbackContext.js +19 -34
- package/dist/contexts/FileInputContext.js +30 -49
- package/dist/contexts/FullScreenContext.js +31 -24
- package/dist/contexts/GlobalCurrentPage.js +21 -18
- package/dist/contexts/HighlightContext.js +22 -31
- package/dist/contexts/IconContext.js +9 -11
- package/dist/contexts/IconToolContext.js +14 -11
- package/dist/contexts/InitialStateContext.js +9 -11
- package/dist/contexts/LayerContext.js +9 -8
- package/dist/contexts/LayoutContainerContext.js +12 -16
- package/dist/contexts/LayoutDropFileZoneContext.js +8 -11
- package/dist/contexts/LicenseContext.js +12 -17
- package/dist/contexts/LoaderContext.js +14 -27
- package/dist/contexts/LocalizationContext.js +22 -33
- package/dist/contexts/OtherToolContext.js +17 -17
- package/dist/contexts/PageViewportContext.js +9 -8
- package/dist/contexts/PagesRotateContext.js +42 -43
- package/dist/contexts/PaginationContext.js +2 -40
- package/dist/contexts/PrintContext.js +67 -78
- package/dist/contexts/RPDocumentContext.js +60 -73
- package/dist/contexts/RenderQueueProvider.js +43 -72
- package/dist/contexts/RenderedPagesCache.js +17 -13
- package/dist/contexts/RotationContext.js +27 -38
- package/dist/contexts/ScrollModeContext.js +22 -20
- package/dist/contexts/SearchContext.js +39 -97
- package/dist/contexts/SelectionModeContext.js +22 -23
- package/dist/contexts/SmoothScrollContext.js +18 -16
- package/dist/contexts/ThemeContext.js +5 -7
- package/dist/contexts/ThumbnailsContext.js +26 -43
- package/dist/contexts/ToolComponentContext.js +54 -51
- package/dist/contexts/ToolbarComponentContext.js +48 -47
- package/dist/contexts/ViewModeContext.js +34 -31
- package/dist/contexts/ViewportContext.js +91 -85
- package/dist/contexts/VirtualGridContext.js +17 -14
- package/dist/contexts/VirtualScrollContext.js +42 -52
- package/dist/contexts/ZoomContext.js +95 -107
- package/dist/de_DE--0LF-SJR.js +483 -0
- package/dist/dist-7FA4Do6I.js +1286 -0
- package/dist/dist-BRVqFn7R.js +144 -0
- package/dist/dist-C3WNMuW2.js +29 -0
- package/dist/dist-CKteKPPA.js +947 -0
- package/dist/dist-bK-AHWLF.js +314 -0
- package/dist/lib-BiapEtK1.js +10261 -0
- package/dist/libInjectCss.js +7 -8
- package/dist/main-CHO5p1qM.js +60 -0
- package/dist/main.js +53 -296
- package/dist/style-9n_QpMZt.js +5 -0
- package/dist/useWatermark-CvAAf66v.js +67 -0
- package/dist/utils/Queue.js +40 -46
- package/dist/utils/annotations.js +227 -261
- package/dist/utils/appConsole.js +24 -42
- package/dist/utils/approximateFragtion.js +16 -21
- package/dist/utils/calculatePage.js +29 -20
- package/dist/utils/charators.js +39 -48
- package/dist/utils/const.js +8 -11
- package/dist/utils/constants.js +4 -8
- package/dist/utils/convertPdfDate.js +20 -24
- package/dist/utils/dateFormatter.js +7 -7
- package/dist/utils/elementPagePosition.js +10 -10
- package/dist/utils/formatFileSize.js +17 -8
- package/dist/utils/getElementPositionInPage.js +44 -82
- package/dist/utils/getScrollDistance.js +4 -4
- package/dist/utils/getThumbnailViewport.js +12 -6
- package/dist/utils/getWordPositionInPage.js +24 -24
- package/dist/utils/getZoomLevel.js +16 -23
- package/dist/utils/highlight.js +195 -212
- package/dist/utils/hooks/useCopyText.js +23 -33
- package/dist/utils/hooks/useDarkMode.js +10 -10
- package/dist/utils/hooks/useDarkModeProps.js +9 -10
- package/dist/utils/hooks/useDebounce.js +22 -18
- package/dist/utils/hooks/useDropFileZone.js +13 -11
- package/dist/utils/hooks/useElementSize.js +24 -20
- package/dist/utils/hooks/useFileDownload.js +16 -33
- package/dist/utils/hooks/useFlickerSelectText.js +19 -24
- package/dist/utils/hooks/useFullScreen.js +31 -28
- package/dist/utils/hooks/useGrabScroll.js +52 -51
- package/dist/utils/hooks/useHighlight.js +92 -92
- package/dist/utils/hooks/useInfiniteScroll.js +17 -18
- package/dist/utils/hooks/useLicense.js +113 -135
- package/dist/utils/hooks/useLoadPdf.js +107 -100
- package/dist/utils/hooks/useLoadWorker.js +13 -15
- package/dist/utils/hooks/useLocalization.js +25 -25
- package/dist/utils/hooks/useMousePressed.js +25 -19
- package/dist/utils/hooks/usePageRotateContext.js +25 -41
- package/dist/utils/hooks/usePaginate.js +2 -38
- package/dist/utils/hooks/usePdfProperties.js +38 -36
- package/dist/utils/hooks/usePinch.js +65 -100
- package/dist/utils/hooks/usePresentPage.js +69 -92
- package/dist/utils/hooks/usePrint.js +167 -178
- package/dist/utils/hooks/useRequestAnimationFrame.js +16 -16
- package/dist/utils/hooks/useResizeObserver.js +18 -21
- package/dist/utils/hooks/useRotate.js +15 -27
- package/dist/utils/hooks/useScrollToPage.js +2 -38
- package/dist/utils/hooks/useSearch.js +125 -163
- package/dist/utils/hooks/useTextSelection.js +69 -75
- package/dist/utils/hooks/useThumbnail.js +42 -59
- package/dist/utils/hooks/useVirtualReactWindow.js +85 -96
- package/dist/utils/hooks/useWatermark.js +2 -78
- package/dist/utils/injectPrintCSS.js +6 -21
- package/dist/utils/link_service.js +59 -137
- package/dist/utils/renderPage.js +20 -19
- package/dist/utils/sanitizeExternalUrl.js +12 -15
- package/dist/utils/smoothScrollTo.js +8 -5
- package/dist/utils/types.js +29 -21
- package/dist/utils/withRef.js +7 -7
- package/dist/utils/zoom.js +5 -6
- package/package.json +7 -7
- package/dist/Combination-17ab8af1.js +0 -698
- package/dist/MostPageTool.module-13578ad6.js +0 -6
- package/dist/OtherTool.module-a4be5f1f.js +0 -6
- package/dist/Paginate.module-4eef00aa.js +0 -8
- package/dist/PaginationContext-87f832f2.js +0 -233
- package/dist/RPLayout.module-92fa19f7.js +0 -14
- package/dist/RPSplitter-b62772f9.js +0 -122
- package/dist/RPToolbar.module-27d7fe77.js +0 -10
- package/dist/RotateTool.module-67946714.js +0 -6
- package/dist/SearchTool.module-99f60dc7.js +0 -16
- package/dist/ToolbarLayout.module-6e339802.js +0 -12
- package/dist/ZoomTool.module-7082af8c.js +0 -12
- package/dist/assets/style.css +0 -1
- package/dist/clsx-0c6e471a.js +0 -22
- package/dist/de_DE-8145915f.js +0 -489
- package/dist/index-113053cf.js +0 -309
- package/dist/index-11f3cd64.js +0 -983
- package/dist/index-23911b43.js +0 -150
- package/dist/index-ada501c4.js +0 -27
- package/dist/index-d0f0aa9a.js +0 -1542
- package/dist/index-e04c91b1.js +0 -11671
|
@@ -1,38 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useDarkModeContext as e } from "../../../contexts/DarkModeContext.js";
|
|
2
|
+
import { useToolbarComponentContext as t } from "../../../contexts/ToolbarComponentContext.js";
|
|
3
|
+
import { useToolComponentContext as n } from "../../../contexts/ToolComponentContext.js";
|
|
4
|
+
import { useLocalizationContext as r } from "../../../contexts/LocalizationContext.js";
|
|
5
|
+
import { useIconToolContext as i } from "../../../contexts/IconToolContext.js";
|
|
6
|
+
import { t as a } from "../../../Button-jStpvb3T.js";
|
|
7
|
+
import { useIconContext as o } from "../../../contexts/IconContext.js";
|
|
8
|
+
import { t as s } from "../../../RPTooltip-ZZoFqP7C.js";
|
|
9
|
+
import { MoonIcon as c } from "../../icons/MoonIcon.js";
|
|
10
|
+
import { SunIcon as l } from "../../icons/SunIcon.js";
|
|
2
11
|
import { useCallback as u } from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
N as DarkModeTool
|
|
12
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
13
|
+
//#region lib/components/layout/toolbar/DarkModeTool.tsx
|
|
14
|
+
var f = () => {
|
|
15
|
+
let { lightModeIcon: e } = o(), { lightModeIcon: t } = i();
|
|
16
|
+
return e || t || /* @__PURE__ */ d(c, {});
|
|
17
|
+
}, p = () => {
|
|
18
|
+
let { darkModeIcon: e } = o(), { darkModeIcon: t } = i();
|
|
19
|
+
return e || t || /* @__PURE__ */ d(l, {});
|
|
20
|
+
}, m = () => {
|
|
21
|
+
let { darkMode: i, setDarkMode: o } = e(), { themeSwitcher: c = !0 } = t(), { themeSwitcher: l = !0 } = n(), { localeMessages: m } = r(), h = i ? m?.themeEnableLightTooltip : m?.themeEnableDarkTooltip, g = u(() => {
|
|
22
|
+
o((e) => !e);
|
|
23
|
+
}, [o]);
|
|
24
|
+
return !c || !l ? null : typeof c == "function" ? /* @__PURE__ */ d(s, {
|
|
25
|
+
content: h,
|
|
26
|
+
children: /* @__PURE__ */ d(c, {
|
|
27
|
+
darkMode: i,
|
|
28
|
+
setDarkMode: o
|
|
29
|
+
})
|
|
30
|
+
}) : typeof l == "function" ? /* @__PURE__ */ d(s, {
|
|
31
|
+
content: h,
|
|
32
|
+
children: /* @__PURE__ */ d(l, {
|
|
33
|
+
darkMode: i,
|
|
34
|
+
setDarkMode: o
|
|
35
|
+
})
|
|
36
|
+
}) : /* @__PURE__ */ d(s, {
|
|
37
|
+
content: h,
|
|
38
|
+
children: /* @__PURE__ */ d(a, {
|
|
39
|
+
onClick: g,
|
|
40
|
+
"aria-label": h,
|
|
41
|
+
children: d(i ? p : f, {})
|
|
42
|
+
})
|
|
43
|
+
});
|
|
38
44
|
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { m as DarkModeTool };
|
|
@@ -1,322 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { useMemo as J } from "react";
|
|
4
|
-
import { c as Q, a as R, P as D, b as v, d as y, e as X, f as M, g as ee } from "../../../index-113053cf.js";
|
|
5
|
-
import { D as te, u as P } from "../../../index-23911b43.js";
|
|
6
|
-
import { R as oe, h as re, u as ne, F as ie, P as ae } from "../../../Combination-17ab8af1.js";
|
|
7
|
-
import { useLayoutContainer as le } from "../../../contexts/LayoutContainerContext.js";
|
|
8
|
-
import { CloseIcon as ce } from "../../icons/CloseIcon.js";
|
|
9
|
-
import { dateFormatter as A } from "../../../utils/dateFormatter.js";
|
|
10
|
-
import { useDocumentContext as se } from "../../../contexts/RPDocumentContext.js";
|
|
11
|
-
import { PropertyItem as ue } from "./PropertyItem.js";
|
|
12
|
-
import { useOtherToolContext as de } from "../../../contexts/OtherToolContext.js";
|
|
13
|
-
import { useLocalizationContext as pe } from "../../../contexts/LocalizationContext.js";
|
|
14
|
-
import "react-dom";
|
|
15
|
-
import "../../../utils/hooks/useLoadPdf.js";
|
|
16
|
-
import "pdfjs-dist";
|
|
17
|
-
import "../../../utils/types.js";
|
|
18
|
-
import "../../../de_DE-8145915f.js";
|
|
19
|
-
import "../../../utils/getThumbnailViewport.js";
|
|
20
|
-
import "../../../contexts/ConfigContext.js";
|
|
21
|
-
import "../../../contexts/DocumentPasswordContext.js";
|
|
22
|
-
import "../../../utils/appConsole.js";
|
|
23
|
-
import "../../../utils/const.js";
|
|
24
|
-
import "../../../utils/hooks/usePdfProperties.js";
|
|
25
|
-
import "../../../utils/convertPdfDate.js";
|
|
26
|
-
import "../../../utils/formatFileSize.js";
|
|
27
|
-
import "../../../utils/hooks/useLocalization.js";
|
|
28
|
-
var h = "Dialog", [T, ot] = Q(h), [fe, u] = T(h), L = (t) => {
|
|
29
|
-
const {
|
|
30
|
-
__scopeDialog: r,
|
|
31
|
-
children: n,
|
|
32
|
-
open: i,
|
|
33
|
-
defaultOpen: e,
|
|
34
|
-
onOpenChange: o,
|
|
35
|
-
modal: l = !0
|
|
36
|
-
} = t, s = c.useRef(null), d = c.useRef(null), [p, g] = M({
|
|
37
|
-
prop: i,
|
|
38
|
-
defaultProp: e ?? !1,
|
|
39
|
-
onChange: o,
|
|
40
|
-
caller: h
|
|
41
|
-
});
|
|
42
|
-
return /* @__PURE__ */ a(
|
|
43
|
-
fe,
|
|
44
|
-
{
|
|
45
|
-
scope: r,
|
|
46
|
-
triggerRef: s,
|
|
47
|
-
contentRef: d,
|
|
48
|
-
contentId: P(),
|
|
49
|
-
titleId: P(),
|
|
50
|
-
descriptionId: P(),
|
|
51
|
-
open: p,
|
|
52
|
-
onOpenChange: g,
|
|
53
|
-
onOpenToggle: c.useCallback(() => g((b) => !b), [g]),
|
|
54
|
-
modal: l,
|
|
55
|
-
children: n
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
L.displayName = h;
|
|
60
|
-
var w = "DialogTrigger", me = c.forwardRef(
|
|
61
|
-
(t, r) => {
|
|
62
|
-
const { __scopeDialog: n, ...i } = t, e = u(w, n), o = R(r, e.triggerRef);
|
|
63
|
-
return /* @__PURE__ */ a(
|
|
64
|
-
D.button,
|
|
65
|
-
{
|
|
66
|
-
type: "button",
|
|
67
|
-
"aria-haspopup": "dialog",
|
|
68
|
-
"aria-expanded": e.open,
|
|
69
|
-
"aria-controls": e.contentId,
|
|
70
|
-
"data-state": x(e.open),
|
|
71
|
-
...i,
|
|
72
|
-
ref: o,
|
|
73
|
-
onClick: v(t.onClick, e.onOpenToggle)
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
me.displayName = w;
|
|
79
|
-
var N = "DialogPortal", [ge, F] = T(N, {
|
|
80
|
-
forceMount: void 0
|
|
81
|
-
}), S = (t) => {
|
|
82
|
-
const { __scopeDialog: r, forceMount: n, children: i, container: e } = t, o = u(N, r);
|
|
83
|
-
return /* @__PURE__ */ a(ge, { scope: r, forceMount: n, children: c.Children.map(i, (l) => /* @__PURE__ */ a(y, { present: n || o.open, children: /* @__PURE__ */ a(ae, { asChild: !0, container: e, children: l }) })) });
|
|
84
|
-
};
|
|
85
|
-
S.displayName = N;
|
|
86
|
-
var _ = "DialogOverlay", W = c.forwardRef(
|
|
87
|
-
(t, r) => {
|
|
88
|
-
const n = F(_, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = u(_, t.__scopeDialog);
|
|
89
|
-
return o.modal ? /* @__PURE__ */ a(y, { present: i || o.open, children: /* @__PURE__ */ a(De, { ...e, ref: r }) }) : null;
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
W.displayName = _;
|
|
93
|
-
var ve = ee("DialogOverlay.RemoveScroll"), De = c.forwardRef(
|
|
94
|
-
(t, r) => {
|
|
95
|
-
const { __scopeDialog: n, ...i } = t, e = u(_, n);
|
|
96
|
-
return (
|
|
97
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
98
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
99
|
-
/* @__PURE__ */ a(oe, { as: ve, allowPinchZoom: !0, shards: [e.contentRef], children: /* @__PURE__ */ a(
|
|
100
|
-
D.div,
|
|
101
|
-
{
|
|
102
|
-
"data-state": x(e.open),
|
|
103
|
-
...i,
|
|
104
|
-
ref: r,
|
|
105
|
-
style: { pointerEvents: "auto", ...i.style }
|
|
106
|
-
}
|
|
107
|
-
) })
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
), m = "DialogContent", k = c.forwardRef(
|
|
111
|
-
(t, r) => {
|
|
112
|
-
const n = F(m, t.__scopeDialog), { forceMount: i = n.forceMount, ...e } = t, o = u(m, t.__scopeDialog);
|
|
113
|
-
return /* @__PURE__ */ a(y, { present: i || o.open, children: o.modal ? /* @__PURE__ */ a(be, { ...e, ref: r }) : /* @__PURE__ */ a(Ce, { ...e, ref: r }) });
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
k.displayName = m;
|
|
117
|
-
var be = c.forwardRef(
|
|
118
|
-
(t, r) => {
|
|
119
|
-
const n = u(m, t.__scopeDialog), i = c.useRef(null), e = R(r, n.contentRef, i);
|
|
120
|
-
return c.useEffect(() => {
|
|
121
|
-
const o = i.current;
|
|
122
|
-
if (o)
|
|
123
|
-
return re(o);
|
|
124
|
-
}, []), /* @__PURE__ */ a(
|
|
125
|
-
G,
|
|
126
|
-
{
|
|
127
|
-
...t,
|
|
128
|
-
ref: e,
|
|
129
|
-
trapFocus: n.open,
|
|
130
|
-
disableOutsidePointerEvents: !0,
|
|
131
|
-
onCloseAutoFocus: v(t.onCloseAutoFocus, (o) => {
|
|
132
|
-
var l;
|
|
133
|
-
o.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
|
|
134
|
-
}),
|
|
135
|
-
onPointerDownOutside: v(t.onPointerDownOutside, (o) => {
|
|
136
|
-
const l = o.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0;
|
|
137
|
-
(l.button === 2 || s) && o.preventDefault();
|
|
138
|
-
}),
|
|
139
|
-
onFocusOutside: v(
|
|
140
|
-
t.onFocusOutside,
|
|
141
|
-
(o) => o.preventDefault()
|
|
142
|
-
)
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
), Ce = c.forwardRef(
|
|
147
|
-
(t, r) => {
|
|
148
|
-
const n = u(m, t.__scopeDialog), i = c.useRef(!1), e = c.useRef(!1);
|
|
149
|
-
return /* @__PURE__ */ a(
|
|
150
|
-
G,
|
|
151
|
-
{
|
|
152
|
-
...t,
|
|
153
|
-
ref: r,
|
|
154
|
-
trapFocus: !1,
|
|
155
|
-
disableOutsidePointerEvents: !1,
|
|
156
|
-
onCloseAutoFocus: (o) => {
|
|
157
|
-
var l, s;
|
|
158
|
-
(l = t.onCloseAutoFocus) == null || l.call(t, o), o.defaultPrevented || (i.current || (s = n.triggerRef.current) == null || s.focus(), o.preventDefault()), i.current = !1, e.current = !1;
|
|
159
|
-
},
|
|
160
|
-
onInteractOutside: (o) => {
|
|
161
|
-
var d, p;
|
|
162
|
-
(d = t.onInteractOutside) == null || d.call(t, o), o.defaultPrevented || (i.current = !0, o.detail.originalEvent.type === "pointerdown" && (e.current = !0));
|
|
163
|
-
const l = o.target;
|
|
164
|
-
((p = n.triggerRef.current) == null ? void 0 : p.contains(l)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && e.current && o.preventDefault();
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
), G = c.forwardRef(
|
|
170
|
-
(t, r) => {
|
|
171
|
-
const { __scopeDialog: n, trapFocus: i, onOpenAutoFocus: e, onCloseAutoFocus: o, ...l } = t, s = u(m, n), d = c.useRef(null), p = R(r, d);
|
|
172
|
-
return ne(), /* @__PURE__ */ C(I, { children: [
|
|
173
|
-
/* @__PURE__ */ a(
|
|
174
|
-
ie,
|
|
175
|
-
{
|
|
176
|
-
asChild: !0,
|
|
177
|
-
loop: !0,
|
|
178
|
-
trapped: i,
|
|
179
|
-
onMountAutoFocus: e,
|
|
180
|
-
onUnmountAutoFocus: o,
|
|
181
|
-
children: /* @__PURE__ */ a(
|
|
182
|
-
te,
|
|
183
|
-
{
|
|
184
|
-
role: "dialog",
|
|
185
|
-
id: s.contentId,
|
|
186
|
-
"aria-describedby": s.descriptionId,
|
|
187
|
-
"aria-labelledby": s.titleId,
|
|
188
|
-
"data-state": x(s.open),
|
|
189
|
-
...l,
|
|
190
|
-
ref: p,
|
|
191
|
-
onDismiss: () => s.onOpenChange(!1)
|
|
192
|
-
}
|
|
193
|
-
)
|
|
194
|
-
}
|
|
195
|
-
),
|
|
196
|
-
/* @__PURE__ */ C(I, { children: [
|
|
197
|
-
/* @__PURE__ */ a(he, { titleId: s.titleId }),
|
|
198
|
-
/* @__PURE__ */ a(Re, { contentRef: d, descriptionId: s.descriptionId })
|
|
199
|
-
] })
|
|
200
|
-
] });
|
|
201
|
-
}
|
|
202
|
-
), O = "DialogTitle", $ = c.forwardRef(
|
|
203
|
-
(t, r) => {
|
|
204
|
-
const { __scopeDialog: n, ...i } = t, e = u(O, n);
|
|
205
|
-
return /* @__PURE__ */ a(D.h2, { id: e.titleId, ...i, ref: r });
|
|
206
|
-
}
|
|
207
|
-
);
|
|
208
|
-
$.displayName = O;
|
|
209
|
-
var j = "DialogDescription", _e = c.forwardRef(
|
|
210
|
-
(t, r) => {
|
|
211
|
-
const { __scopeDialog: n, ...i } = t, e = u(j, n);
|
|
212
|
-
return /* @__PURE__ */ a(D.p, { id: e.descriptionId, ...i, ref: r });
|
|
213
|
-
}
|
|
214
|
-
);
|
|
215
|
-
_e.displayName = j;
|
|
216
|
-
var z = "DialogClose", B = c.forwardRef(
|
|
217
|
-
(t, r) => {
|
|
218
|
-
const { __scopeDialog: n, ...i } = t, e = u(z, n);
|
|
219
|
-
return /* @__PURE__ */ a(
|
|
220
|
-
D.button,
|
|
221
|
-
{
|
|
222
|
-
type: "button",
|
|
223
|
-
...i,
|
|
224
|
-
ref: r,
|
|
225
|
-
onClick: v(t.onClick, () => e.onOpenChange(!1))
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
);
|
|
230
|
-
B.displayName = z;
|
|
231
|
-
function x(t) {
|
|
232
|
-
return t ? "open" : "closed";
|
|
233
|
-
}
|
|
234
|
-
var V = "DialogTitleWarning", [rt, H] = X(V, {
|
|
235
|
-
contentName: m,
|
|
236
|
-
titleName: O,
|
|
237
|
-
docsSlug: "dialog"
|
|
238
|
-
}), he = ({ titleId: t }) => {
|
|
239
|
-
const r = H(V), n = `\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
|
240
|
-
|
|
241
|
-
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
242
|
-
|
|
243
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;
|
|
244
|
-
return c.useEffect(() => {
|
|
245
|
-
t && (document.getElementById(t) || console.error(n));
|
|
246
|
-
}, [n, t]), null;
|
|
247
|
-
}, Pe = "DialogDescriptionWarning", Re = ({ contentRef: t, descriptionId: r }) => {
|
|
248
|
-
const i = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H(Pe).contentName}}.`;
|
|
249
|
-
return c.useEffect(() => {
|
|
250
|
-
var o;
|
|
251
|
-
const e = (o = t.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
252
|
-
r && e && (document.getElementById(r) || console.warn(i));
|
|
253
|
-
}, [i, t, r]), null;
|
|
254
|
-
}, ye = L, Ne = S, Oe = W, xe = k, Ee = $, Ie = B;
|
|
255
|
-
const f = {
|
|
256
|
-
"rp-dialog-wrapper": "_rp-dialog-wrapper_xb722_1",
|
|
257
|
-
"rp-dialog-overlay": "_rp-dialog-overlay_xb722_7",
|
|
258
|
-
"rp-document-dialog": "_rp-document-dialog_xb722_13",
|
|
259
|
-
"rp-dialog-title": "_rp-dialog-title_xb722_35",
|
|
260
|
-
"rp-dialog-close": "_rp-dialog-close_xb722_44",
|
|
261
|
-
"rp-properties-divider": "_rp-properties-divider_xb722_52"
|
|
262
|
-
}, nt = () => {
|
|
263
|
-
const { pdfProperties: t } = se(), { container: r } = le(), { activeDocumentProperties: n, setActiveDocumentProperties: i } = de(), { localeMessages: e } = pe(), o = J(() => {
|
|
264
|
-
if (!t)
|
|
265
|
-
return [];
|
|
266
|
-
const {
|
|
267
|
-
fileSize: l,
|
|
268
|
-
filename: s,
|
|
269
|
-
title: d,
|
|
270
|
-
author: p,
|
|
271
|
-
subject: g,
|
|
272
|
-
createdOn: b,
|
|
273
|
-
creator: K,
|
|
274
|
-
keywords: q,
|
|
275
|
-
modifiedOn: E,
|
|
276
|
-
pdfProducer: U,
|
|
277
|
-
pdfVersion: Y,
|
|
278
|
-
pageCount: Z
|
|
279
|
-
} = t;
|
|
280
|
-
return [
|
|
281
|
-
{ label: e == null ? void 0 : e.propertiesFilenameLabel, value: s },
|
|
282
|
-
{ label: e == null ? void 0 : e.propertiesFileSizeLabel, value: l },
|
|
283
|
-
{ separate: !0 },
|
|
284
|
-
{ label: e == null ? void 0 : e.propertiesTitleLabel, value: d },
|
|
285
|
-
{ label: e == null ? void 0 : e.propertiesAuthorLabel, value: p },
|
|
286
|
-
{ label: e == null ? void 0 : e.propertiesSubjectLabel, value: g },
|
|
287
|
-
{ label: e == null ? void 0 : e.propertiesKeywordLabel, value: q },
|
|
288
|
-
{ label: e == null ? void 0 : e.propertiesCreatorLabel, value: K },
|
|
289
|
-
{
|
|
290
|
-
label: e == null ? void 0 : e.propertiesCreateOnLabel,
|
|
291
|
-
value: b ? A(b) : ""
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
label: e == null ? void 0 : e.propertiesModifiedOnLabel,
|
|
295
|
-
value: E ? A(E) : ""
|
|
296
|
-
},
|
|
297
|
-
{ separate: !0 },
|
|
298
|
-
{ label: e == null ? void 0 : e.propertiesPDFProducerLabel, value: U },
|
|
299
|
-
{ label: e == null ? void 0 : e.propertiesPDFVersionLabel, value: Y },
|
|
300
|
-
{ label: e == null ? void 0 : e.propertiesPageCountLabel, value: Z }
|
|
301
|
-
];
|
|
302
|
-
}, [t, e]);
|
|
303
|
-
return /* @__PURE__ */ a(ye, { open: n, onOpenChange: i, children: /* @__PURE__ */ a(Ne, { container: r, children: /* @__PURE__ */ C("div", { className: f["rp-dialog-wrapper"], children: [
|
|
304
|
-
/* @__PURE__ */ a(Oe, { className: f["rp-dialog-overlay"] }),
|
|
305
|
-
/* @__PURE__ */ C(xe, { className: f["rp-document-dialog"], "aria-describedby": void 0, children: [
|
|
306
|
-
/* @__PURE__ */ a(Ee, { className: f["rp-dialog-title"], children: (e == null ? void 0 : e.documentPropertiesLabel) ?? "Document properties" }),
|
|
307
|
-
/* @__PURE__ */ a(
|
|
308
|
-
"div",
|
|
309
|
-
{
|
|
310
|
-
className: f["rp-document-properties"],
|
|
311
|
-
role: "region",
|
|
312
|
-
"aria-label": (e == null ? void 0 : e.documentPropertiesLabel) ?? "Document properties",
|
|
313
|
-
children: o.map((l, s) => /* @__PURE__ */ a("div", { children: l.separate ? /* @__PURE__ */ a("div", { className: f["rp-properties-divider"], role: "separator", "aria-orientation": "horizontal" }) : /* @__PURE__ */ a(ue, { label: l.label, value: l.value }) }, s))
|
|
314
|
-
}
|
|
315
|
-
),
|
|
316
|
-
/* @__PURE__ */ a(Ie, { asChild: !0, className: f["rp-dialog-close"], "aria-label": (e == null ? void 0 : e.searchCloseButtonTooltip) || "Close dialog", children: /* @__PURE__ */ a(ce, { "aria-hidden": "true" }) })
|
|
317
|
-
] })
|
|
318
|
-
] }) }) });
|
|
319
|
-
};
|
|
320
|
-
export {
|
|
321
|
-
nt as DocumentDialog
|
|
322
|
-
};
|
|
1
|
+
import { t as e } from "../../../DocumentDialog-DHAWcYIz.js";
|
|
2
|
+
export { e as DocumentDialog };
|
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useIconContext as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
const { setActiveDocumentProperties: r } = l(), { documentProperties: e = !0 } = d(), { documentProperties: n = !0, scrollModeTool: i } = I(), { localeMessages: o } = x();
|
|
30
|
-
return !e || !n ? null : /* @__PURE__ */ m(c, { children: [
|
|
31
|
-
i && /* @__PURE__ */ t(T, {}),
|
|
32
|
-
/* @__PURE__ */ t(u, { onClick: () => r((p) => !p), children: /* @__PURE__ */ m(P, { className: "rp-menu-item", content: o == null ? void 0 : o.documentPropertiesTooltip, children: [
|
|
33
|
-
/* @__PURE__ */ t("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ t(a, {}) }),
|
|
34
|
-
o == null ? void 0 : o.documentPropertiesLabel
|
|
35
|
-
] }) })
|
|
36
|
-
] });
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
Q as DocumentProperties
|
|
1
|
+
import { useToolbarComponentContext as e } from "../../../contexts/ToolbarComponentContext.js";
|
|
2
|
+
import { useToolComponentContext as t } from "../../../contexts/ToolComponentContext.js";
|
|
3
|
+
import { useLocalizationContext as n } from "../../../contexts/LocalizationContext.js";
|
|
4
|
+
import { useIconToolContext as r } from "../../../contexts/IconToolContext.js";
|
|
5
|
+
import { useOtherToolContext as i } from "../../../contexts/OtherToolContext.js";
|
|
6
|
+
import { useIconContext as a } from "../../../contexts/IconContext.js";
|
|
7
|
+
import { t as o } from "../../../RPTooltip-ZZoFqP7C.js";
|
|
8
|
+
import { t as s } from "../../../MenuItem-BJDWfzAw.js";
|
|
9
|
+
import { InfoIcon as c } from "../../icons/InfoIcon.js";
|
|
10
|
+
import { t as l } from "../../../MenuSeparator-D1H5l8Ej.js";
|
|
11
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
//#region lib/components/layout/toolbar/DocumentProperties.tsx
|
|
13
|
+
var p = () => {
|
|
14
|
+
let { documentPropertiesIcon: e } = a(), { documentPropertiesIcon: t } = r();
|
|
15
|
+
return e || t || /* @__PURE__ */ d(c, {});
|
|
16
|
+
}, m = () => {
|
|
17
|
+
let { setActiveDocumentProperties: r } = i(), { documentProperties: a = !0 } = e(), { documentProperties: c = !0, scrollModeTool: m } = t(), { localeMessages: h } = n();
|
|
18
|
+
return !a || !c ? null : /* @__PURE__ */ f(u, { children: [m && /* @__PURE__ */ d(l, {}), /* @__PURE__ */ d(s, {
|
|
19
|
+
onClick: () => r((e) => !e),
|
|
20
|
+
children: /* @__PURE__ */ f(o, {
|
|
21
|
+
className: "rp-menu-item",
|
|
22
|
+
content: h?.documentPropertiesTooltip,
|
|
23
|
+
children: [/* @__PURE__ */ d("div", {
|
|
24
|
+
className: "rp-menu-item-left",
|
|
25
|
+
children: /* @__PURE__ */ d(p, {})
|
|
26
|
+
}), h?.documentPropertiesLabel]
|
|
27
|
+
})
|
|
28
|
+
})] });
|
|
40
29
|
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { m as DocumentProperties };
|
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { useViewportContext as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
import { useToolbarComponentContext as e } from "../../../contexts/ToolbarComponentContext.js";
|
|
2
|
+
import { useToolComponentContext as t } from "../../../contexts/ToolComponentContext.js";
|
|
3
|
+
import { useLocalizationContext as n } from "../../../contexts/LocalizationContext.js";
|
|
4
|
+
import { useIconToolContext as r } from "../../../contexts/IconToolContext.js";
|
|
5
|
+
import { useFileDownload as i } from "../../../utils/hooks/useFileDownload.js";
|
|
6
|
+
import { t as a } from "../../../Button-jStpvb3T.js";
|
|
7
|
+
import { useIconContext as o } from "../../../contexts/IconContext.js";
|
|
8
|
+
import { useViewportContext as s } from "../../../contexts/ViewportContext.js";
|
|
9
|
+
import { t as c } from "../../../RPTooltip-ZZoFqP7C.js";
|
|
10
|
+
import { t as l } from "../../../MenuItem-BJDWfzAw.js";
|
|
11
|
+
import { FileDownloadDefaultIcon as u } from "../../icons/FileDownloadDefaultIcon.js";
|
|
12
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
13
|
+
//#region lib/components/layout/toolbar/FileDownloadTool.tsx
|
|
14
|
+
var p = () => {
|
|
15
|
+
let { downloadIcon: e } = o(), { downloadIcon: t } = r();
|
|
16
|
+
return e || t || /* @__PURE__ */ d(u, {});
|
|
17
|
+
}, m = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ d(c, {
|
|
18
|
+
className: t,
|
|
19
|
+
content: n?.downloadFileTooltip,
|
|
20
|
+
children: e
|
|
21
|
+
}), h = ({ download: e, localeMessages: t }) => /* @__PURE__ */ d(m, {
|
|
22
|
+
localeMessages: t,
|
|
23
|
+
children: /* @__PURE__ */ d(a, {
|
|
24
|
+
onClick: e,
|
|
25
|
+
"aria-label": t?.downloadFileTooltip,
|
|
26
|
+
children: /* @__PURE__ */ d(p, {})
|
|
27
|
+
})
|
|
28
|
+
}), g = ({ download: e, localeMessages: t }) => /* @__PURE__ */ d(l, {
|
|
29
|
+
onClick: e,
|
|
30
|
+
children: /* @__PURE__ */ f(m, {
|
|
31
|
+
className: "rp-menu-item",
|
|
32
|
+
localeMessages: t,
|
|
33
|
+
children: [/* @__PURE__ */ d("div", {
|
|
34
|
+
className: "rp-menu-item-left",
|
|
35
|
+
children: /* @__PURE__ */ d(p, {})
|
|
36
|
+
}), t?.downloadFileLabel]
|
|
37
|
+
})
|
|
38
|
+
}), _ = () => {
|
|
39
|
+
let { download: r } = i(), { downloadTool: a = !0 } = e(), { downloadTool: o = !0 } = t(), { isSmallScreen: l } = s(), { localeMessages: u } = n(), f = u?.downloadFileTooltip;
|
|
40
|
+
return !a || !o ? null : l ? /* @__PURE__ */ d(g, {
|
|
41
|
+
download: r,
|
|
42
|
+
localeMessages: u
|
|
43
|
+
}) : typeof a == "function" ? /* @__PURE__ */ d(c, {
|
|
44
|
+
content: f,
|
|
45
|
+
children: /* @__PURE__ */ d(a, { download: r })
|
|
46
|
+
}) : typeof o == "function" ? /* @__PURE__ */ d(c, {
|
|
47
|
+
content: f,
|
|
48
|
+
children: /* @__PURE__ */ d(o, { download: r })
|
|
49
|
+
}) : /* @__PURE__ */ d(h, {
|
|
50
|
+
download: r,
|
|
51
|
+
localeMessages: u
|
|
52
|
+
});
|
|
51
53
|
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { _ as FileDownloadTool };
|