@imposium-hub/components 1.35.0 → 1.36.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/Entry.ts
CHANGED
|
@@ -54,6 +54,8 @@ import DroppableAssetRenderer from './components/assets/DroppableAssetRenderer';
|
|
|
54
54
|
import ImagePlayer from './components/players/ImagePlayer';
|
|
55
55
|
import VideoPlayer from './components/players/VideoPlayer';
|
|
56
56
|
import AudioPlayer from './components/players/AudioPlayer';
|
|
57
|
+
import VideoPreview from './components/players/VideoPreview';
|
|
58
|
+
import ImagePreview from './components/players/ImagePreview';
|
|
57
59
|
import ImageSequencePlayer from './components/players/ImageSequencePlayer';
|
|
58
60
|
import LogViewer from './components/log-viewer/LogViewer';
|
|
59
61
|
import StoryPreviewer from './components/story-previewer/StoryPreviewer';
|
|
@@ -74,19 +76,19 @@ import auth from './redux/reducers/auth';
|
|
|
74
76
|
import {login, clearCachedAuth} from './redux/actions/auth';
|
|
75
77
|
import access from './redux/reducers/access';
|
|
76
78
|
import {
|
|
77
|
-
cacheAccessData, clearCachedAccessList, storyAdded,
|
|
79
|
+
cacheAccessData, clearCachedAccessList, storyAdded,
|
|
78
80
|
storyNameMutated, orgNameMutated, storyDeleted
|
|
79
81
|
} from './redux/actions/access';
|
|
80
82
|
import { updateFilters } from './redux/actions/asset-filters';
|
|
81
|
-
import {
|
|
83
|
+
import {
|
|
82
84
|
getAssets, deleteAssets, addAssetTag,
|
|
83
85
|
deleteAssetTag, updateAssetName, updateAssetData, doAssetTableHydration
|
|
84
86
|
} from './redux/actions/asset-list';
|
|
85
|
-
import {
|
|
87
|
+
import {
|
|
86
88
|
getAssetTagList, addAssetTagToList
|
|
87
89
|
} from './redux/actions/asset-tags';
|
|
88
90
|
import { toggleAutoTag, uploadAssets } from './redux/actions/asset-uploads';
|
|
89
|
-
import {
|
|
91
|
+
import {
|
|
90
92
|
selectAsset, deselectAsset, resetSelection
|
|
91
93
|
} from './redux/actions/selected-assets';
|
|
92
94
|
import assetFilters from './redux/reducers/asset-filters';
|
|
@@ -152,6 +154,8 @@ export {
|
|
|
152
154
|
ImagePlayer,
|
|
153
155
|
VideoPlayer,
|
|
154
156
|
AudioPlayer,
|
|
157
|
+
VideoPreview,
|
|
158
|
+
ImagePreview,
|
|
155
159
|
ImageSequencePlayer,
|
|
156
160
|
|
|
157
161
|
AssetsTypeIcon,
|
|
@@ -231,7 +235,7 @@ export {
|
|
|
231
235
|
filterHotkeys,
|
|
232
236
|
mimetypeConformsToOverlay,
|
|
233
237
|
validateAssetMimetype,
|
|
234
|
-
toFixed,
|
|
238
|
+
toFixed,
|
|
235
239
|
padStart,
|
|
236
240
|
formatDateDefault,
|
|
237
241
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Portal from '../portal/Portal';
|
|
3
|
+
|
|
4
|
+
interface IVideoPreviewProps {
|
|
5
|
+
showMedia : boolean;
|
|
6
|
+
url : string;
|
|
7
|
+
playbackSettings? : any;
|
|
8
|
+
style? : React.CSSProperties | any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class ImagePreview extends React.PureComponent<IVideoPreviewProps> {
|
|
12
|
+
private imageNode : any = null;
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
this.imageNode = React.createRef();
|
|
16
|
+
}
|
|
17
|
+
public render() {
|
|
18
|
+
const {showMedia, url, style} = this.props;
|
|
19
|
+
if (showMedia) {
|
|
20
|
+
return (
|
|
21
|
+
<Portal id='portal-root'>
|
|
22
|
+
<img
|
|
23
|
+
src={url}
|
|
24
|
+
ref={this.imageNode}
|
|
25
|
+
className='media-preview'
|
|
26
|
+
style={style}/>
|
|
27
|
+
</Portal>
|
|
28
|
+
);
|
|
29
|
+
} else {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default ImagePreview;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Portal from '../portal/Portal';
|
|
3
|
+
|
|
4
|
+
interface IVideoPreviewProps {
|
|
5
|
+
showMedia : boolean;
|
|
6
|
+
url : string;
|
|
7
|
+
playbackSettings? : any;
|
|
8
|
+
style? : React.CSSProperties | {};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class VideoPreview extends React.PureComponent<IVideoPreviewProps> {
|
|
12
|
+
private videoNode : any = null;
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
this.videoNode = React.createRef();
|
|
16
|
+
}
|
|
17
|
+
public render() {
|
|
18
|
+
const {showMedia, url, playbackSettings, style} = this.props;
|
|
19
|
+
if (showMedia) {
|
|
20
|
+
return (
|
|
21
|
+
<Portal id='portal-root'>
|
|
22
|
+
<video
|
|
23
|
+
style = {style}
|
|
24
|
+
muted
|
|
25
|
+
ref = {this.videoNode}
|
|
26
|
+
autoPlay = {playbackSettings.autoPlay}
|
|
27
|
+
loop = {playbackSettings.loop}
|
|
28
|
+
controls
|
|
29
|
+
preload = 'preload'
|
|
30
|
+
src={url}
|
|
31
|
+
className='media-preview' />
|
|
32
|
+
</Portal>
|
|
33
|
+
);
|
|
34
|
+
} else {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default VideoPreview;
|