From 8e0b133a47f492b8cb1f9d2ae34a6b968195da7b Mon Sep 17 00:00:00 2001 From: liatvi Date: Thu, 7 Mar 2024 09:28:03 +0200 Subject: [PATCH] change GalleryContainer file to contain only explisit import (#1196) --- .../components/gallery/proGallery/galleryContainer.js | 10 +++++----- .../gallery/proGallery/galleryScrollIndicator.js | 4 +++- .../src/components/gallery/proGallery/galleryView.js | 2 +- .../src/components/gallery/proGallery/slideshowView.js | 2 +- packages/gallery/src/components/helpers/layoutUtils.js | 2 +- .../src/components/helpers/videoScrollHelperWrapper.js | 2 +- .../gallery/src/components/item/videos/getStyle.js | 2 ++ .../gallery/src/components/item/videos/videoItem.js | 1 + 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/gallery/src/components/gallery/proGallery/galleryContainer.js b/packages/gallery/src/components/gallery/proGallery/galleryContainer.js index a7492e2ad0..290f20b31c 100644 --- a/packages/gallery/src/components/gallery/proGallery/galleryContainer.js +++ b/packages/gallery/src/components/gallery/proGallery/galleryContainer.js @@ -10,18 +10,18 @@ import { windowWrapper, } from 'pro-gallery-lib'; import { ItemsHelper } from 'pro-layouts'; -import GalleryView from './galleryView'; -import SlideshowView from './slideshowView'; +import { GalleryView } from './galleryView'; +import { SlideshowView } from './slideshowView'; import { scrollToItemImp, scrollToGroupImp, haltScroll, } from '../../helpers/scrollHelper'; -import ScrollIndicator from './galleryScrollIndicator'; +import { ScrollIndicator } from './galleryScrollIndicator'; import { createCssLayouts } from '../../helpers/cssLayoutsHelper.js'; import { cssScrollHelper } from '../../helpers/cssScrollHelper.js'; -import VideoScrollHelperWrapper from '../../helpers/videoScrollHelperWrapper'; -import findNeighborItem from '../../helpers/layoutUtils'; +import { VideoScrollHelperWrapper } from '../../helpers/videoScrollHelperWrapper'; +import { findNeighborItem } from '../../helpers/layoutUtils'; import { isGalleryInViewport, Deferred } from './galleryHelpers'; export class GalleryContainer extends React.Component { diff --git a/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js b/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js index ddcbc72f70..26cd8ed7b4 100644 --- a/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js +++ b/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js @@ -2,7 +2,7 @@ import React from 'react'; import { utils, GALLERY_CONSTS } from 'pro-gallery-lib'; import { cssScrollHelper } from '../../helpers/cssScrollHelper'; -export default class ScrollIndicator extends React.Component { +export class ScrollIndicator extends React.Component { constructor(props) { super(); @@ -175,3 +175,5 @@ export default class ScrollIndicator extends React.Component { ); } } + +export default ScrollIndicator; diff --git a/packages/gallery/src/components/gallery/proGallery/galleryView.js b/packages/gallery/src/components/gallery/proGallery/galleryView.js index a1079d5cd7..2a19cb0c51 100644 --- a/packages/gallery/src/components/gallery/proGallery/galleryView.js +++ b/packages/gallery/src/components/gallery/proGallery/galleryView.js @@ -4,7 +4,7 @@ import GalleryDebugMessage from './galleryDebugMessage'; import itemView from '../../item/itemView.js'; import { getItemsInViewportOrMarginByScrollLocation } from '../../helpers/virtualization'; -class GalleryView extends React.Component { +export class GalleryView extends React.Component { constructor(props) { super(props); this.handleKeys = this.handleKeys.bind(this); diff --git a/packages/gallery/src/components/gallery/proGallery/slideshowView.js b/packages/gallery/src/components/gallery/proGallery/slideshowView.js index 089d6386b9..777213d4d7 100644 --- a/packages/gallery/src/components/gallery/proGallery/slideshowView.js +++ b/packages/gallery/src/components/gallery/proGallery/slideshowView.js @@ -28,7 +28,7 @@ function getDirection(code) { throw new Error(`no direction is defined for charCode: ${code}`); } -class SlideshowView extends React.Component { +export class SlideshowView extends React.Component { constructor(props) { super(props); this.navigationPanelCallbackOnIndexChange = () => {}; diff --git a/packages/gallery/src/components/helpers/layoutUtils.js b/packages/gallery/src/components/helpers/layoutUtils.js index 70bd36f828..7211c8760c 100644 --- a/packages/gallery/src/components/helpers/layoutUtils.js +++ b/packages/gallery/src/components/helpers/layoutUtils.js @@ -1,4 +1,4 @@ -function findNeighborItem(itemIdx, dir, layoutItems) { +export function findNeighborItem(itemIdx, dir, layoutItems) { const currentItem = layoutItems[itemIdx]; let neighborItem; diff --git a/packages/gallery/src/components/helpers/videoScrollHelperWrapper.js b/packages/gallery/src/components/helpers/videoScrollHelperWrapper.js index 7ab683378a..8c8a3ae277 100644 --- a/packages/gallery/src/components/helpers/videoScrollHelperWrapper.js +++ b/packages/gallery/src/components/helpers/videoScrollHelperWrapper.js @@ -1,6 +1,6 @@ import { isEditMode } from 'pro-gallery-lib'; -class VideoScrollHelperWrapper { +export class VideoScrollHelperWrapper { constructor(setPlayingIdxState) { this.left = 0; this.top = 0; diff --git a/packages/gallery/src/components/item/videos/getStyle.js b/packages/gallery/src/components/item/videos/getStyle.js index fb427ed1cb..3ab0fc054f 100644 --- a/packages/gallery/src/components/item/videos/getStyle.js +++ b/packages/gallery/src/components/item/videos/getStyle.js @@ -26,3 +26,5 @@ function getStyle(isCrop, isWiderThenContainer) { }; } } + +export default getStyle; diff --git a/packages/gallery/src/components/item/videos/videoItem.js b/packages/gallery/src/components/item/videos/videoItem.js index 80c86a7b1e..d6bbf567d3 100644 --- a/packages/gallery/src/components/item/videos/videoItem.js +++ b/packages/gallery/src/components/item/videos/videoItem.js @@ -306,6 +306,7 @@ class VideoItem extends React.Component { if (this.state.playedOnce && this.state.ready) { baseClassName.push('playedOnce'); } + // if (this.props.isCurrentHover) { baseClassName.push('item-content-hover'); } else {