@react-pdf-viewer/scroll-mode
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -86,11 +86,7 @@ 'use strict'; | ||
case ScrollMode$1.Horizontal: | ||
label = (l10n && l10n.scrollMode | ||
? l10n.scrollMode.horizontalScrolling | ||
: 'Horizontal scrolling'); | ||
label = (l10n && l10n.scrollMode ? l10n.scrollMode.horizontalScrolling : 'Horizontal scrolling'); | ||
icon = React__namespace.createElement(HorizontalScrollingIcon, null); | ||
break; | ||
case ScrollMode$1.Wrapped: | ||
label = (l10n && l10n.scrollMode | ||
? l10n.scrollMode.wrappedScrolling | ||
: 'Wrapped scrolling'); | ||
label = (l10n && l10n.scrollMode ? l10n.scrollMode.wrappedScrolling : 'Wrapped scrolling'); | ||
icon = React__namespace.createElement(WrappedScrollingIcon, null); | ||
@@ -100,5 +96,3 @@ break; | ||
default: | ||
label = (l10n && l10n.scrollMode | ||
? l10n.scrollMode.verticalScrolling | ||
: 'Vertical scrolling'); | ||
label = (l10n && l10n.scrollMode ? l10n.scrollMode.verticalScrolling : 'Vertical scrolling'); | ||
icon = React__namespace.createElement(VerticalScrollingIcon, null); | ||
@@ -200,8 +194,15 @@ break; | ||
var scrollModePlugin = function (props) { | ||
var store = React__namespace.useMemo(function () { return core.createStore({ | ||
scrollMode: props && props.scrollMode ? props.scrollMode : ScrollMode$1.Vertical, | ||
}); }, []); | ||
var SwitchScrollModeDecorator = function (props) { return (React__namespace.createElement(SwitchScrollMode, __assign({}, props, { store: store }))); }; | ||
var SwitchScrollModeButtonDecorator = function (props) { return (React__namespace.createElement(SwitchScrollModeDecorator, { mode: props.mode }, function (p) { return (React__namespace.createElement(SwitchScrollModeButton, { isSelected: p.isSelected, mode: p.mode, onClick: function () { p.onClick(); } })); })); }; | ||
var SwitchScrollModeMenuItemDecorator = function (props) { return (React__namespace.createElement(SwitchScrollModeDecorator, { mode: props.mode }, function (p) { return (React__namespace.createElement(SwitchScrollModeMenuItem, { isSelected: p.isSelected, mode: p.mode, onClick: function () { p.onClick(); props.onClick(); } })); })); }; | ||
var store = React__namespace.useMemo(function () { | ||
return core.createStore({ | ||
scrollMode: props && props.scrollMode ? props.scrollMode : ScrollMode$1.Vertical, | ||
}); | ||
}, []); | ||
var SwitchScrollModeDecorator = function (props) { return React__namespace.createElement(SwitchScrollMode, __assign({}, props, { store: store })); }; | ||
var SwitchScrollModeButtonDecorator = function (props) { return (React__namespace.createElement(SwitchScrollModeDecorator, { mode: props.mode }, function (p) { return (React__namespace.createElement(SwitchScrollModeButton, { isSelected: p.isSelected, mode: p.mode, onClick: function () { | ||
p.onClick(); | ||
} })); })); }; | ||
var SwitchScrollModeMenuItemDecorator = function (props) { return (React__namespace.createElement(SwitchScrollModeDecorator, { mode: props.mode }, function (p) { return (React__namespace.createElement(SwitchScrollModeMenuItem, { isSelected: p.isSelected, mode: p.mode, onClick: function () { | ||
p.onClick(); | ||
props.onClick(); | ||
} })); })); }; | ||
var renderViewer = function (props) { | ||
@@ -208,0 +209,0 @@ var currentSlot = props.slot; |
@@ -40,8 +40,4 @@ /** | ||
SwitchScrollMode(props: SwitchScrollModeProps): React.ReactElement; | ||
SwitchScrollModeButton( | ||
props: SwitchScrollModeButtonProps | ||
): React.ReactElement; | ||
SwitchScrollModeMenuItem( | ||
props: SwitchScrollModeMenuItemProps | ||
): React.ReactElement; | ||
SwitchScrollModeButton(props: SwitchScrollModeButtonProps): React.ReactElement; | ||
SwitchScrollModeMenuItem(props: SwitchScrollModeMenuItemProps): React.ReactElement; | ||
} | ||
@@ -53,5 +49,3 @@ | ||
export function scrollModePlugin( | ||
props?: ScrollModePluginProps | ||
): ScrollModePlugin; | ||
export function scrollModePlugin(props?: ScrollModePluginProps): ScrollModePlugin; | ||
@@ -58,0 +52,0 @@ // ----- |
{ | ||
"name": "@react-pdf-viewer/scroll-mode", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"description": "A React component to view a PDF document", | ||
@@ -36,3 +36,3 @@ "license": "https://react-pdf-viewer.dev/license", | ||
"dependencies": { | ||
"@react-pdf-viewer/core": "2.6.0" | ||
"@react-pdf-viewer/core": "2.6.1" | ||
}, | ||
@@ -52,3 +52,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "91d6279570bd3d4672b131100392afd6e8658892" | ||
"gitHead": "500247f24514da033bf92266f6903decaffebb68" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21496
307
+ Added@react-pdf-viewer/core@2.6.1(transitive)
- Removed@react-pdf-viewer/core@2.6.0(transitive)
Updated@react-pdf-viewer/core@2.6.1