Skip to content

Commit

Permalink
change GalleryContainer file to contain only explisit import (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
liatv committed Mar 7, 2024
1 parent 3c57c53 commit 8e0b133
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -175,3 +175,5 @@ export default class ScrollIndicator extends React.Component {
);
}
}

export default ScrollIndicator;
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {};
Expand Down
2 changes: 1 addition & 1 deletion packages/gallery/src/components/helpers/layoutUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function findNeighborItem(itemIdx, dir, layoutItems) {
export function findNeighborItem(itemIdx, dir, layoutItems) {
const currentItem = layoutItems[itemIdx];

let neighborItem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isEditMode } from 'pro-gallery-lib';

class VideoScrollHelperWrapper {
export class VideoScrollHelperWrapper {
constructor(setPlayingIdxState) {
this.left = 0;
this.top = 0;
Expand Down
2 changes: 2 additions & 0 deletions packages/gallery/src/components/item/videos/getStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ function getStyle(isCrop, isWiderThenContainer) {
};
}
}

export default getStyle;
1 change: 1 addition & 0 deletions packages/gallery/src/components/item/videos/videoItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8e0b133

Please sign in to comment.