dbf-mirador 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +203 -0
- package/README.md +133 -0
- package/dist/CommentSharp-B0J_-jEq.js +325 -0
- package/dist/CommentSharp-B0J_-jEq.js.map +1 -0
- package/dist/FailedImageContext-aQXnWSHN.js +318 -0
- package/dist/FailedImageContext-aQXnWSHN.js.map +1 -0
- package/dist/PluginHook-CFw_6P5c.js +54 -0
- package/dist/PluginHook-CFw_6P5c.js.map +1 -0
- package/dist/WindowCanvasNavigationControls-CUX723BQ.js +242 -0
- package/dist/WindowCanvasNavigationControls-CUX723BQ.js.map +1 -0
- package/dist/action-types-DjIbTE-A.js +74 -0
- package/dist/action-types-DjIbTE-A.js.map +1 -0
- package/dist/canvas-C8oHvXFN.js +41 -0
- package/dist/canvas-C8oHvXFN.js.map +1 -0
- package/dist/canvases-gRqhr-IH.js +3154 -0
- package/dist/canvases-gRqhr-IH.js.map +1 -0
- package/dist/createSvgIcon-Cwt8YPfm.js +2 -0
- package/dist/getters-COus7Mvg.js +2066 -0
- package/dist/getters-COus7Mvg.js.map +1 -0
- package/dist/index.module-CbBRf_R8.js +403 -0
- package/dist/index.module-CbBRf_R8.js.map +1 -0
- package/dist/mirador.es.js +39600 -0
- package/dist/mirador.es.js.map +1 -0
- package/dist/mirador.min.js +334 -0
- package/dist/mirador.min.js.map +1 -0
- package/dist/react-error-boundary.esm-B_pT-oCS.js +67 -0
- package/dist/react-error-boundary.esm-B_pT-oCS.js.map +1 -0
- package/dist/visuallyHidden-DmYvwNdU.js +98 -0
- package/dist/visuallyHidden-DmYvwNdU.js.map +1 -0
- package/dist/window-zelwU7wz.js +138 -0
- package/dist/window-zelwU7wz.js.map +1 -0
- package/package.json +138 -0
- package/src/components/AccessTokenSender.jsx +34 -0
- package/src/components/AnnotationSettings.jsx +31 -0
- package/src/components/AnnotationsOverlay.jsx +328 -0
- package/src/components/App.jsx +34 -0
- package/src/components/AppProviders.jsx +129 -0
- package/src/components/AttributionPanel.jsx +78 -0
- package/src/components/AudioViewer.jsx +39 -0
- package/src/components/BackgroundPluginArea.jsx +9 -0
- package/src/components/Branding.jsx +33 -0
- package/src/components/CanvasAnnotations.jsx +125 -0
- package/src/components/CanvasInfo.jsx +46 -0
- package/src/components/CanvasLayers.jsx +367 -0
- package/src/components/ChangeThemeDialog.jsx +65 -0
- package/src/components/CollapsibleSection.jsx +53 -0
- package/src/components/CollectionDialog.jsx +236 -0
- package/src/components/CollectionInfo.jsx +48 -0
- package/src/components/CompanionArea.jsx +140 -0
- package/src/components/CompanionWindow.jsx +228 -0
- package/src/components/CompanionWindowFactory.jsx +38 -0
- package/src/components/CompanionWindowSection.jsx +11 -0
- package/src/components/CustomPanel.jsx +22 -0
- package/src/components/ErrorContent.jsx +65 -0
- package/src/components/ErrorDialog.jsx +47 -0
- package/src/components/FullScreenButton.jsx +47 -0
- package/src/components/GalleryView.jsx +36 -0
- package/src/components/GalleryViewThumbnail.jsx +160 -0
- package/src/components/IIIFAuthentication.jsx +144 -0
- package/src/components/IIIFDropTarget.jsx +168 -0
- package/src/components/IIIFIFrameCommunication.jsx +45 -0
- package/src/components/IIIFResourceLabel.jsx +26 -0
- package/src/components/IIIFThumbnail.jsx +214 -0
- package/src/components/ImageFailureMessage.jsx +42 -0
- package/src/components/LabelValueMetadata.jsx +46 -0
- package/src/components/LanguageSettings.jsx +46 -0
- package/src/components/LayersPanel.jsx +24 -0
- package/src/components/LocalePicker.jsx +56 -0
- package/src/components/ManifestForm.jsx +79 -0
- package/src/components/ManifestInfo.jsx +67 -0
- package/src/components/ManifestListItem.jsx +209 -0
- package/src/components/ManifestListItemError.jsx +53 -0
- package/src/components/ManifestRelatedLinks.jsx +154 -0
- package/src/components/MinimalWindow.jsx +104 -0
- package/src/components/MiradorMenuButton.jsx +71 -0
- package/src/components/MosaicRenderPreview.jsx +16 -0
- package/src/components/NestedMenu.jsx +42 -0
- package/src/components/NewBrowserWindow.jsx +34 -0
- package/src/components/OpenSeadragonComponent.jsx +258 -0
- package/src/components/OpenSeadragonTileSource.jsx +105 -0
- package/src/components/OpenSeadragonViewer.jsx +161 -0
- package/src/components/PluginHook.jsx +27 -0
- package/src/components/PrimaryWindow.jsx +115 -0
- package/src/components/SanitizedHtml.jsx +37 -0
- package/src/components/ScrollIndicatedDialogContent.jsx +60 -0
- package/src/components/ScrollTo.jsx +61 -0
- package/src/components/SearchHit.jsx +220 -0
- package/src/components/SearchPanel.jsx +80 -0
- package/src/components/SearchPanelControls.jsx +174 -0
- package/src/components/SearchPanelNavigation.jsx +84 -0
- package/src/components/SearchResults.jsx +138 -0
- package/src/components/SelectCollection.jsx +44 -0
- package/src/components/SidebarIndexItem.jsx +11 -0
- package/src/components/SidebarIndexList.jsx +73 -0
- package/src/components/SidebarIndexTableOfContents.jsx +170 -0
- package/src/components/SidebarIndexThumbnail.jsx +22 -0
- package/src/components/TextViewer.jsx +37 -0
- package/src/components/ThumbnailCanvasGrouping.jsx +122 -0
- package/src/components/ThumbnailNavigation.jsx +231 -0
- package/src/components/VideoViewer.jsx +35 -0
- package/src/components/ViewerInfo.jsx +55 -0
- package/src/components/ViewerNavigation.jsx +72 -0
- package/src/components/Window.jsx +150 -0
- package/src/components/WindowAuthenticationBar.jsx +176 -0
- package/src/components/WindowCanvasNavigationControls.jsx +91 -0
- package/src/components/WindowList.jsx +71 -0
- package/src/components/WindowListButton.jsx +57 -0
- package/src/components/WindowSideBar.jsx +48 -0
- package/src/components/WindowSideBarAnnotationsPanel.jsx +51 -0
- package/src/components/WindowSideBarButtons.jsx +151 -0
- package/src/components/WindowSideBarCanvasPanel.jsx +165 -0
- package/src/components/WindowSideBarCollectionPanel.jsx +179 -0
- package/src/components/WindowSideBarInfoPanel.jsx +67 -0
- package/src/components/WindowThumbnailSettings.jsx +130 -0
- package/src/components/WindowTopBar.jsx +125 -0
- package/src/components/WindowTopBarPluginArea.jsx +8 -0
- package/src/components/WindowTopBarPluginMenu.jsx +78 -0
- package/src/components/WindowTopBarTitle.jsx +73 -0
- package/src/components/WindowTopMenu.jsx +81 -0
- package/src/components/WindowTopMenuButton.jsx +49 -0
- package/src/components/WindowViewSettings.jsx +95 -0
- package/src/components/WindowViewer.jsx +26 -0
- package/src/components/Workspace.jsx +124 -0
- package/src/components/WorkspaceAdd.jsx +221 -0
- package/src/components/WorkspaceAddButton.jsx +73 -0
- package/src/components/WorkspaceArea.jsx +66 -0
- package/src/components/WorkspaceControlPanel.jsx +85 -0
- package/src/components/WorkspaceControlPanelButtons.jsx +20 -0
- package/src/components/WorkspaceDialog.jsx +11 -0
- package/src/components/WorkspaceElastic.jsx +88 -0
- package/src/components/WorkspaceElasticWindow.jsx +79 -0
- package/src/components/WorkspaceExport.jsx +99 -0
- package/src/components/WorkspaceImport.jsx +89 -0
- package/src/components/WorkspaceMenu.jsx +126 -0
- package/src/components/WorkspaceMenuButton.jsx +42 -0
- package/src/components/WorkspaceMosaic.jsx +149 -0
- package/src/components/WorkspaceOptionsButton.jsx +35 -0
- package/src/components/WorkspaceOptionsMenu.jsx +112 -0
- package/src/components/WorkspaceSelectionDialog.jsx +165 -0
- package/src/components/ZoomControls.jsx +57 -0
- package/src/components/icons/BookViewIcon.jsx +14 -0
- package/src/components/icons/CanvasIndexIcon.jsx +14 -0
- package/src/components/icons/GalleryViewIcon.jsx +17 -0
- package/src/components/icons/MiradorIcon.jsx +14 -0
- package/src/components/icons/RestoreZoomIcon.jsx +15 -0
- package/src/components/icons/ThumbnailNavigationBottomIcon.jsx +15 -0
- package/src/components/icons/ThumbnailNavigationRightIcon.jsx +16 -0
- package/src/components/icons/WindowMaxIcon.jsx +15 -0
- package/src/components/icons/WindowMinIcon.jsx +15 -0
- package/src/components/icons/WindowOptionsIcon.jsx +16 -0
- package/src/components/icons/WorkspaceTypeElasticIcon.jsx +157 -0
- package/src/components/icons/WorkspaceTypeMosaicIcon.jsx +162 -0
- package/src/components/icons/index.js +27 -0
- package/src/components/index.js +108 -0
- package/src/config/css-ns.js +10 -0
- package/src/config/index.js +2 -0
- package/src/config/settings.js +607 -0
- package/src/containers/AnnotationSettings.js +27 -0
- package/src/containers/AnnotationsOverlay.js +51 -0
- package/src/containers/AppProviders.js +20 -0
- package/src/containers/AttributionPanel.js +20 -0
- package/src/containers/AudioViewer.js +16 -0
- package/src/containers/BackgroundPluginArea.js +4 -0
- package/src/containers/Branding.js +4 -0
- package/src/containers/CanvasAnnotations.js +32 -0
- package/src/containers/CanvasInfo.js +20 -0
- package/src/containers/CanvasLayers.js +25 -0
- package/src/containers/ChangeThemeDialog.js +29 -0
- package/src/containers/CollapsibleSection.js +3 -0
- package/src/containers/CollectionDialog.js +48 -0
- package/src/containers/CollectionInfo.js +29 -0
- package/src/containers/CompanionArea.js +22 -0
- package/src/containers/CompanionWindow.js +40 -0
- package/src/containers/CompanionWindowFactory.js +23 -0
- package/src/containers/CustomPanel.js +13 -0
- package/src/containers/ErrorContent.js +20 -0
- package/src/containers/ErrorDialog.js +28 -0
- package/src/containers/FullScreenButton.js +22 -0
- package/src/containers/GalleryView.js +23 -0
- package/src/containers/GalleryViewThumbnail.js +51 -0
- package/src/containers/IIIFAuthentication.js +86 -0
- package/src/containers/IIIFThumbnail.js +17 -0
- package/src/containers/LabelValueMetadata.js +14 -0
- package/src/containers/LanguageSettings.js +26 -0
- package/src/containers/LayersPanel.js +16 -0
- package/src/containers/LocalePicker.js +3 -0
- package/src/containers/ManifestForm.js +16 -0
- package/src/containers/ManifestInfo.js +29 -0
- package/src/containers/ManifestListItem.js +52 -0
- package/src/containers/ManifestListItemError.js +15 -0
- package/src/containers/ManifestRelatedLinks.js +28 -0
- package/src/containers/MinimalWindow.js +25 -0
- package/src/containers/MiradorMenuButton.js +7 -0
- package/src/containers/MosaicRenderPreview.js +14 -0
- package/src/containers/OpenSeadragonViewer.js +59 -0
- package/src/containers/PrimaryWindow.js +27 -0
- package/src/containers/SanitizedHtml.js +3 -0
- package/src/containers/ScrollIndicatedDialogContent.js +3 -0
- package/src/containers/SearchHit.js +71 -0
- package/src/containers/SearchPanel.js +23 -0
- package/src/containers/SearchPanelControls.js +36 -0
- package/src/containers/SearchPanelNavigation.js +39 -0
- package/src/containers/SearchResults.js +38 -0
- package/src/containers/SelectCollection.js +24 -0
- package/src/containers/SidebarIndexItem.js +8 -0
- package/src/containers/SidebarIndexList.js +28 -0
- package/src/containers/SidebarIndexTableOfContents.js +31 -0
- package/src/containers/SidebarIndexThumbnail.js +18 -0
- package/src/containers/TextViewer.js +19 -0
- package/src/containers/ThumbnailCanvasGrouping.js +29 -0
- package/src/containers/ThumbnailNavigation.js +48 -0
- package/src/containers/VideoViewer.js +16 -0
- package/src/containers/ViewerInfo.js +30 -0
- package/src/containers/ViewerNavigation.js +31 -0
- package/src/containers/Window.js +45 -0
- package/src/containers/WindowAuthenticationBar.js +7 -0
- package/src/containers/WindowCanvasNavigationControls.js +15 -0
- package/src/containers/WindowList.js +30 -0
- package/src/containers/WindowListButton.js +15 -0
- package/src/containers/WindowSideBar.js +20 -0
- package/src/containers/WindowSideBarAnnotationsPanel.js +23 -0
- package/src/containers/WindowSideBarButtons.js +75 -0
- package/src/containers/WindowSideBarCanvasPanel.js +50 -0
- package/src/containers/WindowSideBarCollectionPanel.js +48 -0
- package/src/containers/WindowSideBarInfoPanel.js +35 -0
- package/src/containers/WindowThumbnailSettings.js +31 -0
- package/src/containers/WindowTopBar.js +39 -0
- package/src/containers/WindowTopBarPluginArea.js +8 -0
- package/src/containers/WindowTopBarPluginMenu.js +7 -0
- package/src/containers/WindowTopBarTitle.js +17 -0
- package/src/containers/WindowTopMenu.js +28 -0
- package/src/containers/WindowTopMenuButton.js +7 -0
- package/src/containers/WindowViewSettings.js +30 -0
- package/src/containers/WindowViewer.js +10 -0
- package/src/containers/Workspace.js +36 -0
- package/src/containers/WorkspaceAdd.js +27 -0
- package/src/containers/WorkspaceAddButton.js +30 -0
- package/src/containers/WorkspaceArea.js +21 -0
- package/src/containers/WorkspaceControlPanel.js +10 -0
- package/src/containers/WorkspaceControlPanelButtons.js +7 -0
- package/src/containers/WorkspaceElastic.js +41 -0
- package/src/containers/WorkspaceElasticWindow.js +36 -0
- package/src/containers/WorkspaceExport.js +18 -0
- package/src/containers/WorkspaceImport.js +19 -0
- package/src/containers/WorkspaceMenu.js +30 -0
- package/src/containers/WorkspaceMenuButton.js +10 -0
- package/src/containers/WorkspaceMosaic.js +32 -0
- package/src/containers/WorkspaceOptionsButton.js +7 -0
- package/src/containers/WorkspaceOptionsMenu.js +3 -0
- package/src/containers/WorkspaceSelectionDialog.js +26 -0
- package/src/containers/ZoomControls.js +26 -0
- package/src/containers/index.js +94 -0
- package/src/contexts/FailedImageContext.js +8 -0
- package/src/contexts/FailedImageProvider.jsx +34 -0
- package/src/contexts/FullScreenContext.js +5 -0
- package/src/contexts/LocaleContext.js +5 -0
- package/src/contexts/OpenSeadragonViewerContext.js +5 -0
- package/src/contexts/WorkspaceContext.js +5 -0
- package/src/contexts/index.js +4 -0
- package/src/extend/PluginContext.js +5 -0
- package/src/extend/PluginProvider.jsx +22 -0
- package/src/extend/index.js +9 -0
- package/src/extend/pluginMapping.js +44 -0
- package/src/extend/pluginPreprocessing.js +45 -0
- package/src/extend/pluginValidation.js +58 -0
- package/src/extend/usePlugins.js +13 -0
- package/src/extend/withPlugins.jsx +46 -0
- package/src/hooks/index.js +4 -0
- package/src/hooks/useCanvasWorldService.js +10 -0
- package/src/hooks/useThumbnailService.js +8 -0
- package/src/i18n.js +71 -0
- package/src/index.js +18 -0
- package/src/init.js +20 -0
- package/src/lib/AnnotationFactory.js +23 -0
- package/src/lib/AnnotationItem.js +123 -0
- package/src/lib/AnnotationList.js +31 -0
- package/src/lib/AnnotationPage.js +41 -0
- package/src/lib/AnnotationResource.js +122 -0
- package/src/lib/CanvasAnnotationDisplay.js +148 -0
- package/src/lib/CanvasGroupings.js +55 -0
- package/src/lib/CanvasWorld.js +214 -0
- package/src/lib/CompanionWindowRegistry.js +23 -0
- package/src/lib/FullScreenHandle.jsx +76 -0
- package/src/lib/MiradorCanvas.js +211 -0
- package/src/lib/MiradorManifest.js +44 -0
- package/src/lib/MiradorViewer.jsx +53 -0
- package/src/lib/MosaicLayout.js +77 -0
- package/src/lib/OpenSeadragonCanvasOverlay.js +114 -0
- package/src/lib/ThumbnailFactory.js +310 -0
- package/src/lib/TruncatedHit.js +34 -0
- package/src/lib/asArray.js +11 -0
- package/src/lib/htmlRules.js +28 -0
- package/src/lib/iiif.js +12 -0
- package/src/lib/index.js +23 -0
- package/src/lib/readImageMetadata.js +21 -0
- package/src/lib/svgShapesToPath.js +49 -0
- package/src/locales/README.md +60 -0
- package/src/locales/ar/translation.json +141 -0
- package/src/locales/bg/translation.json +164 -0
- package/src/locales/de/translation.json +169 -0
- package/src/locales/en/translation.json +170 -0
- package/src/locales/et/translation.json +164 -0
- package/src/locales/fa/translation.json +164 -0
- package/src/locales/fr/translation.json +158 -0
- package/src/locales/hr/translation.json +164 -0
- package/src/locales/hu/translation.json +166 -0
- package/src/locales/it/translation.json +162 -0
- package/src/locales/ja/translation.json +156 -0
- package/src/locales/kr/translation.json +162 -0
- package/src/locales/lt/translation.json +153 -0
- package/src/locales/nbNo/translation.json +162 -0
- package/src/locales/nl/translation.json +139 -0
- package/src/locales/pl/translation.json +162 -0
- package/src/locales/ptBr/translation.json +133 -0
- package/src/locales/sr/translation.json +155 -0
- package/src/locales/sv/translation.json +157 -0
- package/src/locales/ta/translation.json +167 -0
- package/src/locales/vi/translation.json +156 -0
- package/src/locales/zhCn/translation.json +163 -0
- package/src/locales/zhTw/translation.json +163 -0
- package/src/plugins/OSDReferences.js +15 -0
- package/src/plugins/index.js +1 -0
- package/src/state/actions/action-types.js +76 -0
- package/src/state/actions/annotation.js +123 -0
- package/src/state/actions/auth.js +109 -0
- package/src/state/actions/canvas.js +65 -0
- package/src/state/actions/catalog.js +22 -0
- package/src/state/actions/companionWindow.js +107 -0
- package/src/state/actions/config.js +49 -0
- package/src/state/actions/elasticLayout.js +10 -0
- package/src/state/actions/errors.js +22 -0
- package/src/state/actions/index.js +19 -0
- package/src/state/actions/infoResponse.js +90 -0
- package/src/state/actions/layers.js +14 -0
- package/src/state/actions/manifest.js +65 -0
- package/src/state/actions/search.js +97 -0
- package/src/state/actions/window.js +209 -0
- package/src/state/actions/workspace.js +84 -0
- package/src/state/createPluggableStore.js +24 -0
- package/src/state/createStore.js +33 -0
- package/src/state/index.js +21 -0
- package/src/state/reducers/accessTokens.js +59 -0
- package/src/state/reducers/annotations.js +48 -0
- package/src/state/reducers/auth.js +43 -0
- package/src/state/reducers/catalog.js +30 -0
- package/src/state/reducers/companionWindows.js +49 -0
- package/src/state/reducers/config.js +39 -0
- package/src/state/reducers/elasticLayout.js +29 -0
- package/src/state/reducers/errors.js +51 -0
- package/src/state/reducers/index.js +15 -0
- package/src/state/reducers/infoResponses.js +61 -0
- package/src/state/reducers/layers.js +23 -0
- package/src/state/reducers/manifests.js +52 -0
- package/src/state/reducers/rootReducer.js +44 -0
- package/src/state/reducers/search.js +145 -0
- package/src/state/reducers/utils.js +45 -0
- package/src/state/reducers/viewers.js +42 -0
- package/src/state/reducers/windows.js +185 -0
- package/src/state/reducers/workspace.js +111 -0
- package/src/state/sagas/annotations.js +48 -0
- package/src/state/sagas/app.js +56 -0
- package/src/state/sagas/auth.js +151 -0
- package/src/state/sagas/iiif.js +233 -0
- package/src/state/sagas/index.js +30 -0
- package/src/state/sagas/windows.js +293 -0
- package/src/state/selectors/annotations.js +138 -0
- package/src/state/selectors/auth.js +100 -0
- package/src/state/selectors/canvases.js +260 -0
- package/src/state/selectors/companionWindows.js +182 -0
- package/src/state/selectors/config.js +100 -0
- package/src/state/selectors/getters.js +90 -0
- package/src/state/selectors/index.js +17 -0
- package/src/state/selectors/layers.js +79 -0
- package/src/state/selectors/manifests.js +433 -0
- package/src/state/selectors/ranges.js +147 -0
- package/src/state/selectors/searches.js +249 -0
- package/src/state/selectors/sequences.js +134 -0
- package/src/state/selectors/thumbnails.js +28 -0
- package/src/state/selectors/utils.js +18 -0
- package/src/state/selectors/viewer.js +19 -0
- package/src/state/selectors/windows.js +98 -0
- package/src/state/selectors/workspace.js +52 -0
- package/src/state/selectors/wrappers.js +15 -0
- package/src/styles/react-mosaic-component.js +288 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { connect } from 'react-redux';
|
|
2
|
+
import { compose } from 'redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import * as actions from '../state/actions';
|
|
5
|
+
import { ManifestForm } from '../components/ManifestForm';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* mapDispatchToProps - used to hook up connect to action creators
|
|
9
|
+
* @memberof ManifestForm
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
const mapDispatchToProps = { addResource: actions.addResource };
|
|
13
|
+
|
|
14
|
+
const enhance = compose(connect(null, mapDispatchToProps), withPlugins('ManifestForm'));
|
|
15
|
+
|
|
16
|
+
export default enhance(ManifestForm);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { getManifestDescription, getManifestSummary, getManifestTitle, getManifestMetadata } from '../state/selectors';
|
|
5
|
+
import { ManifestInfo } from '../components/ManifestInfo';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* mapStateToProps - to hook up connect
|
|
9
|
+
* @memberof WindowSideBarInfoPanel
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
const mapStateToProps = (state, { companionWindowId, manifestId, windowId }) => ({
|
|
13
|
+
manifestDescription: getManifestDescription(state, {
|
|
14
|
+
companionWindowId,
|
|
15
|
+
manifestId,
|
|
16
|
+
windowId,
|
|
17
|
+
}),
|
|
18
|
+
manifestLabel: getManifestTitle(state, { companionWindowId, manifestId, windowId }),
|
|
19
|
+
manifestMetadata: getManifestMetadata(state, { companionWindowId, manifestId, windowId }),
|
|
20
|
+
manifestSummary: getManifestSummary(state, {
|
|
21
|
+
companionWindowId,
|
|
22
|
+
manifestId,
|
|
23
|
+
windowId,
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const enhance = compose(connect(mapStateToProps), withPlugins('ManifestInfo'));
|
|
28
|
+
|
|
29
|
+
export default enhance(ManifestInfo);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import {
|
|
5
|
+
getManifest,
|
|
6
|
+
getManifestTitle,
|
|
7
|
+
getManifestThumbnail,
|
|
8
|
+
getCanvases,
|
|
9
|
+
getManifestLogo,
|
|
10
|
+
getManifestProviderName,
|
|
11
|
+
getWindowManifests,
|
|
12
|
+
getManifestoInstance,
|
|
13
|
+
getSequenceBehaviors,
|
|
14
|
+
} from '../state/selectors';
|
|
15
|
+
import * as actions from '../state/actions';
|
|
16
|
+
import { ManifestListItem } from '../components/ManifestListItem';
|
|
17
|
+
|
|
18
|
+
/** */
|
|
19
|
+
const mapStateToProps = (state, { manifestId, provider }) => {
|
|
20
|
+
const manifest = getManifest(state, { manifestId }) || {};
|
|
21
|
+
const manifesto = getManifestoInstance(state, { manifestId });
|
|
22
|
+
const isCollection = (manifesto || { isCollection: () => false }).isCollection();
|
|
23
|
+
|
|
24
|
+
const size = isCollection ? manifesto.getTotalItems() : getCanvases(state, { manifestId }).length;
|
|
25
|
+
return {
|
|
26
|
+
active: getWindowManifests(state).includes(manifestId),
|
|
27
|
+
error: manifest.error || (!manifesto && !!manifest.json),
|
|
28
|
+
isCollection,
|
|
29
|
+
isFetching: manifest.isFetching,
|
|
30
|
+
isMultipart: isCollection && getSequenceBehaviors(state, { manifestId }).includes('multi-part'),
|
|
31
|
+
manifestLogo: getManifestLogo(state, { manifestId }),
|
|
32
|
+
provider: provider || getManifestProviderName(state, { manifestId }),
|
|
33
|
+
ready: !!manifest.json,
|
|
34
|
+
size,
|
|
35
|
+
thumbnail: getManifestThumbnail(state, { manifestId }),
|
|
36
|
+
title: getManifestTitle(state, { manifestId }),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* mapDispatchToProps - used to hook up connect to action creators
|
|
42
|
+
* @memberof ManifestListItem
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
const mapDispatchToProps = {
|
|
46
|
+
addWindow: actions.addWindow,
|
|
47
|
+
fetchManifest: actions.fetchManifest,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('ManifestListItem'));
|
|
51
|
+
|
|
52
|
+
export default enhance(ManifestListItem);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { fetchManifest, removeResource } from '../state/actions';
|
|
5
|
+
import { ManifestListItemError } from '../components/ManifestListItemError';
|
|
6
|
+
|
|
7
|
+
/** */
|
|
8
|
+
const mapDispatchToProps = {
|
|
9
|
+
onDismissClick: removeResource,
|
|
10
|
+
onTryAgainClick: fetchManifest,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const enhance = compose(connect(null, mapDispatchToProps), withPlugins('ManifestListItemError'));
|
|
14
|
+
|
|
15
|
+
export default enhance(ManifestListItemError);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import {
|
|
5
|
+
getManifestHomepage,
|
|
6
|
+
getManifestRelated,
|
|
7
|
+
getManifestRenderings,
|
|
8
|
+
getManifestSeeAlso,
|
|
9
|
+
getManifestUrl,
|
|
10
|
+
} from '../state/selectors';
|
|
11
|
+
import { ManifestRelatedLinks } from '../components/ManifestRelatedLinks';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* mapStateToProps - to hook up connect
|
|
15
|
+
* @memberof WindowSideBarInfoPanel
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
const mapStateToProps = (state, { companionWindowId, windowId }) => ({
|
|
19
|
+
homepage: getManifestHomepage(state, { windowId }),
|
|
20
|
+
manifestUrl: getManifestUrl(state, { windowId }),
|
|
21
|
+
related: getManifestRelated(state, { windowId }),
|
|
22
|
+
renderings: getManifestRenderings(state, { windowId }),
|
|
23
|
+
seeAlso: getManifestSeeAlso(state, { windowId }),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const enhance = compose(connect(mapStateToProps), withPlugins('ManifestRelatedLinks'));
|
|
27
|
+
|
|
28
|
+
export default enhance(ManifestRelatedLinks);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import * as actions from '../state/actions';
|
|
5
|
+
import { MinimalWindow } from '../components/MinimalWindow';
|
|
6
|
+
import { getWindowConfig } from '../state/selectors';
|
|
7
|
+
|
|
8
|
+
/** mapStateToProps */
|
|
9
|
+
const mapStateToProps = (state, { windowId }) => ({
|
|
10
|
+
allowClose: getWindowConfig(state, { windowId }).allowClose,
|
|
11
|
+
allowWindowSideBar: getWindowConfig(state, { windowId }).allowWindowSideBar,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* mapDispatchToProps - used to hook up connect to action creators
|
|
16
|
+
* @memberof ManifestListItem
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
const mapDispatchToProps = (dispatch, { windowId }) => ({
|
|
20
|
+
removeWindow: () => dispatch(actions.removeWindow(windowId)),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('MinimalWindow'));
|
|
24
|
+
|
|
25
|
+
export default enhance(MinimalWindow);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
3
|
+
import { MiradorMenuButton } from '../components/MiradorMenuButton';
|
|
4
|
+
|
|
5
|
+
const enhance = compose(withPlugins('MiradorMenuButton'));
|
|
6
|
+
|
|
7
|
+
export default enhance(MiradorMenuButton);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { getManifestTitle } from '../state/selectors';
|
|
5
|
+
import { MosaicRenderPreview } from '../components/MosaicRenderPreview';
|
|
6
|
+
|
|
7
|
+
/** */
|
|
8
|
+
const mapStateToProps = (state, { windowId }) => ({
|
|
9
|
+
title: getManifestTitle(state, { windowId }),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const enhance = compose(connect(mapStateToProps, null), withPlugins('MosaicRenderPreview'));
|
|
13
|
+
|
|
14
|
+
export default enhance(MosaicRenderPreview);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { OpenSeadragonViewer } from '../components/OpenSeadragonViewer';
|
|
5
|
+
import * as actions from '../state/actions';
|
|
6
|
+
import {
|
|
7
|
+
getVisibleCanvasNonTiledResources,
|
|
8
|
+
getCurrentCanvas,
|
|
9
|
+
getCanvasLabel,
|
|
10
|
+
getViewer,
|
|
11
|
+
getConfig,
|
|
12
|
+
getCompanionWindowsForContent,
|
|
13
|
+
selectInfoResponses,
|
|
14
|
+
getCurrentCanvasWorld,
|
|
15
|
+
} from '../state/selectors';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* mapStateToProps - used to hook up connect to action creators
|
|
19
|
+
* @memberof Window
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
const mapStateToProps = (state, { windowId }) => {
|
|
23
|
+
const canvasWorld = getCurrentCanvasWorld(state, { windowId });
|
|
24
|
+
const infoResponses = selectInfoResponses(state);
|
|
25
|
+
const imageServiceIds = canvasWorld.canvases.flatMap((c) => c.imageServiceIds);
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
canvasWorld,
|
|
29
|
+
drawAnnotations:
|
|
30
|
+
getConfig(state).window.forceDrawAnnotations ||
|
|
31
|
+
getCompanionWindowsForContent(state, { content: 'annotations', windowId }).length > 0 ||
|
|
32
|
+
getCompanionWindowsForContent(state, { content: 'search', windowId }).length > 0,
|
|
33
|
+
infoResponses: imageServiceIds
|
|
34
|
+
.map((id) => infoResponses[id])
|
|
35
|
+
.filter(
|
|
36
|
+
(infoResponse) => infoResponse !== undefined && infoResponse.isFetching === false && infoResponse.error === undefined,
|
|
37
|
+
),
|
|
38
|
+
label: getCanvasLabel(state, {
|
|
39
|
+
canvasId: (getCurrentCanvas(state, { windowId }) || {}).id,
|
|
40
|
+
windowId,
|
|
41
|
+
}),
|
|
42
|
+
nonTiledImages: getVisibleCanvasNonTiledResources(state, { windowId }),
|
|
43
|
+
osdConfig: getConfig(state).osdConfig,
|
|
44
|
+
viewerConfig: getViewer(state, { windowId }),
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* mapDispatchToProps - used to hook up connect to action creators
|
|
50
|
+
* @memberof ManifestListItem
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
const mapDispatchToProps = {
|
|
54
|
+
updateViewport: actions.updateViewport,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('OpenSeadragonViewer'));
|
|
58
|
+
|
|
59
|
+
export default enhance(OpenSeadragonViewer);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import {
|
|
5
|
+
getManifestoInstance,
|
|
6
|
+
getVisibleCanvasAudioResources,
|
|
7
|
+
getVisibleCanvasTextResources,
|
|
8
|
+
getVisibleCanvasVideoResources,
|
|
9
|
+
getWindow,
|
|
10
|
+
} from '../state/selectors';
|
|
11
|
+
import { PrimaryWindow } from '../components/PrimaryWindow';
|
|
12
|
+
|
|
13
|
+
/** */
|
|
14
|
+
const mapStateToProps = (state, { windowId }) => {
|
|
15
|
+
const manifestoInstance = getManifestoInstance(state, { windowId });
|
|
16
|
+
return {
|
|
17
|
+
audioResources: getVisibleCanvasAudioResources(state, { windowId }) || [],
|
|
18
|
+
isCollection: manifestoInstance && manifestoInstance.isCollection(),
|
|
19
|
+
isCollectionDialogVisible: getWindow(state, { windowId }).collectionDialogOn,
|
|
20
|
+
textResources: getVisibleCanvasTextResources(state, { windowId }) || [],
|
|
21
|
+
videoResources: getVisibleCanvasVideoResources(state, { windowId }) || [],
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const enhance = compose(connect(mapStateToProps, null), withPlugins('PrimaryWindow'));
|
|
26
|
+
|
|
27
|
+
export default enhance(PrimaryWindow);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { SearchHit } from '../components/SearchHit';
|
|
5
|
+
import * as actions from '../state/actions';
|
|
6
|
+
import {
|
|
7
|
+
getCanvasLabel,
|
|
8
|
+
getVisibleCanvasIds,
|
|
9
|
+
getResourceAnnotationForSearchHit,
|
|
10
|
+
getResourceAnnotationLabel,
|
|
11
|
+
getSelectedContentSearchAnnotationIds,
|
|
12
|
+
getSelectedAnnotationId,
|
|
13
|
+
} from '../state/selectors';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* mapStateToProps - used to hook up connect to state
|
|
17
|
+
* @memberof SearchHit
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
const mapStateToProps = (state, { annotationId, hit = { annotations: [] }, companionWindowId, windowId }) => {
|
|
21
|
+
const realAnnoId = annotationId || hit.annotations[0];
|
|
22
|
+
const hitAnnotation = getResourceAnnotationForSearchHit(state, {
|
|
23
|
+
annotationUri: realAnnoId,
|
|
24
|
+
companionWindowId,
|
|
25
|
+
windowId,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const annotationLabel = getResourceAnnotationLabel(state, {
|
|
29
|
+
annotationUri: realAnnoId,
|
|
30
|
+
companionWindowId,
|
|
31
|
+
windowId,
|
|
32
|
+
});
|
|
33
|
+
const selectedCanvasIds = getVisibleCanvasIds(state, { windowId });
|
|
34
|
+
|
|
35
|
+
const selectedContentSearchAnnotationsIds = getSelectedContentSearchAnnotationIds(state, {
|
|
36
|
+
companionWindowId,
|
|
37
|
+
windowId,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const windowSelectedAnnotationId = getSelectedAnnotationId(state, { windowId });
|
|
41
|
+
|
|
42
|
+
const allAnnoIds = [annotationId, ...hit.annotations];
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
adjacent: selectedCanvasIds.includes(hitAnnotation?.targetId),
|
|
46
|
+
annotation: hitAnnotation,
|
|
47
|
+
annotationId: realAnnoId,
|
|
48
|
+
annotationLabel: annotationLabel[0],
|
|
49
|
+
canvasLabel:
|
|
50
|
+
hitAnnotation &&
|
|
51
|
+
getCanvasLabel(state, {
|
|
52
|
+
canvasId: hitAnnotation.targetId,
|
|
53
|
+
windowId,
|
|
54
|
+
}),
|
|
55
|
+
selected: selectedContentSearchAnnotationsIds[0] && allAnnoIds.includes(selectedContentSearchAnnotationsIds[0]),
|
|
56
|
+
windowSelected: windowSelectedAnnotationId && allAnnoIds.includes(windowSelectedAnnotationId),
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* mapDispatchToProps - to hook up connect
|
|
62
|
+
* @memberof SearchPanelNavigation
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
const mapDispatchToProps = (dispatch, { windowId }) => ({
|
|
66
|
+
selectAnnotation: (...args) => dispatch(actions.selectAnnotation(windowId, ...args)),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SearchHit'));
|
|
70
|
+
|
|
71
|
+
export default enhance(SearchHit);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import * as actions from '../state/actions';
|
|
4
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
5
|
+
import { SearchPanel } from '../components/SearchPanel';
|
|
6
|
+
import { getManifestSearchService, getSearchQuery, getWindow } from '../state/selectors';
|
|
7
|
+
|
|
8
|
+
/** */
|
|
9
|
+
const mapStateToProps = (state, { id, windowId }) => ({
|
|
10
|
+
query: getSearchQuery(state, { companionWindowId: id, windowId }),
|
|
11
|
+
searchService: getManifestSearchService(state, { windowId }),
|
|
12
|
+
suggestedSearches: getWindow(state, { windowId }).suggestedSearches,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
/** */
|
|
16
|
+
const mapDispatchToProps = (dispatch, props) => ({
|
|
17
|
+
fetchSearch: (searchId, query) => dispatch(actions.fetchSearch(props.windowId, props.id, searchId, query)),
|
|
18
|
+
removeSearch: () => dispatch(actions.removeSearch(props.windowId, props.id)),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SearchPanel'));
|
|
22
|
+
|
|
23
|
+
export default enhance(SearchPanel);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { SearchPanelControls } from '../components/SearchPanelControls';
|
|
5
|
+
import * as actions from '../state/actions';
|
|
6
|
+
import {
|
|
7
|
+
getManifestAutocompleteService,
|
|
8
|
+
getManifestSearchService,
|
|
9
|
+
getSearchIsFetching,
|
|
10
|
+
getSearchQuery,
|
|
11
|
+
} from '../state/selectors';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* mapStateToProps - used to hook up connect to state
|
|
15
|
+
* @memberof SearchPanelControls
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
const mapStateToProps = (state, { companionWindowId, windowId }) => ({
|
|
19
|
+
autocompleteService: getManifestAutocompleteService(state, { windowId }),
|
|
20
|
+
query: getSearchQuery(state, { companionWindowId, windowId }),
|
|
21
|
+
searchIsFetching: getSearchIsFetching(state, { companionWindowId, windowId }),
|
|
22
|
+
searchService: getManifestSearchService(state, { windowId }),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* mapDispatchToProps - to hook up connect
|
|
27
|
+
* @memberof SearchPanelControls
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
const mapDispatchToProps = {
|
|
31
|
+
fetchSearch: actions.fetchSearch,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SearchPanelControls'));
|
|
35
|
+
|
|
36
|
+
export default enhance(SearchPanelControls);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { SearchPanelNavigation } from '../components/SearchPanelNavigation';
|
|
5
|
+
import * as actions from '../state/actions';
|
|
6
|
+
import {
|
|
7
|
+
getSelectedContentSearchAnnotationIds,
|
|
8
|
+
getSearchNumTotal,
|
|
9
|
+
getSortedSearchHitsForCompanionWindow,
|
|
10
|
+
getThemeDirection,
|
|
11
|
+
} from '../state/selectors';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* mapStateToProps - used to hook up connect to state
|
|
15
|
+
* @memberof SearchPanelControls
|
|
16
|
+
* @private
|
|
17
|
+
*/
|
|
18
|
+
const mapStateToProps = (state, { companionWindowId, windowId }) => ({
|
|
19
|
+
direction: getThemeDirection(state),
|
|
20
|
+
numTotal: getSearchNumTotal(state, { companionWindowId, windowId }),
|
|
21
|
+
searchHits: getSortedSearchHitsForCompanionWindow(state, { companionWindowId, windowId }),
|
|
22
|
+
selectedContentSearchAnnotation: getSelectedContentSearchAnnotationIds(state, {
|
|
23
|
+
companionWindowId,
|
|
24
|
+
windowId,
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* mapDispatchToProps - to hook up connect
|
|
30
|
+
* @memberof SearchPanelNavigation
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
const mapDispatchToProps = (dispatch, { windowId }) => ({
|
|
34
|
+
selectAnnotation: (...args) => dispatch(actions.selectAnnotation(windowId, ...args)),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SearchPanelNavigation'));
|
|
38
|
+
|
|
39
|
+
export default enhance(SearchPanelNavigation);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { SearchResults } from '../components/SearchResults';
|
|
5
|
+
import * as actions from '../state/actions';
|
|
6
|
+
import {
|
|
7
|
+
getNextSearchId,
|
|
8
|
+
getSearchQuery,
|
|
9
|
+
getSearchIsFetching,
|
|
10
|
+
getSearchNumTotal,
|
|
11
|
+
getSortedSearchHitsForCompanionWindow,
|
|
12
|
+
getSortedSearchAnnotationsForCompanionWindow,
|
|
13
|
+
} from '../state/selectors';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* mapStateToProps - used to hook up connect to state
|
|
17
|
+
* @memberof SearchResult
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
const mapStateToProps = (state, { companionWindowId, windowId }) => ({
|
|
21
|
+
isFetching: getSearchIsFetching(state, { companionWindowId, windowId }),
|
|
22
|
+
nextSearch: getNextSearchId(state, { companionWindowId, windowId }),
|
|
23
|
+
query: getSearchQuery(state, { companionWindowId, windowId }),
|
|
24
|
+
searchAnnotations: getSortedSearchAnnotationsForCompanionWindow(state, {
|
|
25
|
+
companionWindowId,
|
|
26
|
+
windowId,
|
|
27
|
+
}),
|
|
28
|
+
searchHits: getSortedSearchHitsForCompanionWindow(state, { companionWindowId, windowId }),
|
|
29
|
+
searchNumTotal: getSearchNumTotal(state, { companionWindowId, windowId }),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const mapDispatchToProps = {
|
|
33
|
+
fetchSearch: actions.fetchSearch,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SearchResults'));
|
|
37
|
+
|
|
38
|
+
export default enhance(SearchResults);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import * as actions from '../state/actions';
|
|
4
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
5
|
+
import { getWindow } from '../state/selectors';
|
|
6
|
+
import { SelectCollection } from '../components/SelectCollection';
|
|
7
|
+
|
|
8
|
+
/** */
|
|
9
|
+
const mapStateToProps = (state, { windowId }) => {
|
|
10
|
+
const { collectionPath, manifestId } = getWindow(state, { windowId }) || {};
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
collectionPath,
|
|
14
|
+
manifestId,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const mapDispatchToProps = {
|
|
19
|
+
showCollectionDialog: actions.showCollectionDialog,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SelectCollection'));
|
|
23
|
+
|
|
24
|
+
export default enhance(SelectCollection);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { SidebarIndexItem } from '../components/SidebarIndexItem';
|
|
5
|
+
|
|
6
|
+
const enhance = compose(connect(null, null), withPlugins('SidebarIndexItem'));
|
|
7
|
+
|
|
8
|
+
export default enhance(SidebarIndexItem);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import * as actions from '../state/actions';
|
|
5
|
+
import { getCompanionWindow, getCanvases, getVisibleCanvasIds } from '../state/selectors';
|
|
6
|
+
import { SidebarIndexList } from '../components/SidebarIndexList';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* mapStateToProps - to hook up connect
|
|
10
|
+
*/
|
|
11
|
+
const mapStateToProps = (state, { id, windowId }) => ({
|
|
12
|
+
canvases: getCanvases(state, { windowId }),
|
|
13
|
+
selectedCanvasIds: getVisibleCanvasIds(state, { windowId }),
|
|
14
|
+
variant: getCompanionWindow(state, { companionWindowId: id, windowId }).variant,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* mapStateToProps - used to hook up connect to state
|
|
19
|
+
* @memberof SidebarIndexList
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
const mapDispatchToProps = (dispatch, { id, windowId }) => ({
|
|
23
|
+
setCanvas: (...args) => dispatch(actions.setCanvas(...args)),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SidebarIndexList'));
|
|
27
|
+
|
|
28
|
+
export default enhance(SidebarIndexList);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { SidebarIndexTableOfContents } from '../components/SidebarIndexTableOfContents';
|
|
5
|
+
import { getSequenceTreeStructure, getVisibleNodeIds, getExpandedNodeIds, getNodeIdToScrollTo } from '../state/selectors';
|
|
6
|
+
import * as actions from '../state/actions';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* mapStateToProps - to hook up connect
|
|
10
|
+
*/
|
|
11
|
+
const mapStateToProps = (state, { id, windowId }) => ({
|
|
12
|
+
expandedNodeIds: getExpandedNodeIds(state, { companionWindowId: id, windowId }),
|
|
13
|
+
nodeIdToScrollTo: getNodeIdToScrollTo(state, { companionWindowId: id, windowId }),
|
|
14
|
+
treeStructure: getSequenceTreeStructure(state, { windowId }),
|
|
15
|
+
visibleNodeIds: getVisibleNodeIds(state, { companionWindowId: id, windowId }),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* mapStateToProps - used to hook up connect to state
|
|
20
|
+
* @memberof SidebarIndexTableOfContents
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
const mapDispatchToProps = (dispatch, { id, windowId }) => ({
|
|
24
|
+
expandNodes: (nodeIds) => dispatch(actions.expandNodes(windowId, id, nodeIds)),
|
|
25
|
+
setCanvas: (...args) => dispatch(actions.setCanvas(...args)),
|
|
26
|
+
toggleNode: (nodeId) => dispatch(actions.toggleNode(windowId, id, nodeId)),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SidebarIndexTableOfContents'));
|
|
30
|
+
|
|
31
|
+
export default enhance(SidebarIndexTableOfContents);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { SidebarIndexThumbnail } from '../components/SidebarIndexThumbnail';
|
|
5
|
+
import { getConfig } from '../state/selectors';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* mapStateToProps - used to hook up state to props
|
|
9
|
+
* @memberof SidebarIndexThumbnail
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
const mapStateToProps = (state, { data }) => ({
|
|
13
|
+
...(getConfig(state).canvasNavigation || {}),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const enhance = compose(connect(mapStateToProps, null), withPlugins('SidebarIndexThumbnail'));
|
|
17
|
+
|
|
18
|
+
export default enhance(SidebarIndexThumbnail);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { compose } from 'redux';
|
|
2
|
+
import { connect } from 'react-redux';
|
|
3
|
+
import { withPlugins } from '../extend/withPlugins';
|
|
4
|
+
import { getConfig, getVisibleCanvasTextResources } from '../state/selectors';
|
|
5
|
+
import { TextViewer } from '../components/TextViewer';
|
|
6
|
+
|
|
7
|
+
/** */
|
|
8
|
+
const mapStateToProps = (state, { windowId }) => ({
|
|
9
|
+
textOptions: getConfig(state).textOptions,
|
|
10
|
+
textResources: getVisibleCanvasTextResources(state, { windowId }) || [],
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const enhance = compose(
|
|
14
|
+
connect(mapStateToProps, null),
|
|
15
|
+
withPlugins('TextViewer'),
|
|
16
|
+
// further HOC go here
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default enhance(TextViewer);
|