@imposium-hub/components 1.59.4 → 1.60.1
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/dist/cjs/components/assets/AssetField.js +13 -11
- package/dist/cjs/components/assets/AssetField.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableDateCell.js +3 -1
- package/dist/cjs/components/assets/AssetsTableDateCell.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableNameCell.js +9 -2
- package/dist/cjs/components/assets/AssetsTableNameCell.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableSelectCell.js +8 -2
- package/dist/cjs/components/assets/AssetsTableSelectCell.js.map +1 -1
- package/dist/cjs/components/assets/AssetsTableTagsCell.js +3 -1
- package/dist/cjs/components/assets/AssetsTableTagsCell.js.map +1 -1
- package/dist/cjs/components/determinate-loader/DeterminateLoader.d.ts +1 -0
- package/dist/cjs/components/determinate-loader/DeterminateLoader.js +2 -1
- package/dist/cjs/components/determinate-loader/DeterminateLoader.js.map +1 -1
- package/dist/cjs/components/players/AudioPlayer.d.ts +4 -4
- package/dist/cjs/components/players/AudioPlayer.js +8 -8
- package/dist/cjs/components/story-previewer/StoryPreviewer.js +32 -3
- package/dist/cjs/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/cjs/constants/previewer.js +2 -1
- package/dist/cjs/constants/previewer.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/experience.d.ts +21 -1
- package/dist/cjs/services/API.js +1 -1
- package/dist/esm/components/assets/AssetField.js +13 -11
- package/dist/esm/components/assets/AssetField.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableDateCell.js +1 -1
- package/dist/esm/components/assets/AssetsTableDateCell.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableNameCell.js +9 -2
- package/dist/esm/components/assets/AssetsTableNameCell.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableSelectCell.js +8 -2
- package/dist/esm/components/assets/AssetsTableSelectCell.js.map +1 -1
- package/dist/esm/components/assets/AssetsTableTagsCell.js +1 -1
- package/dist/esm/components/assets/AssetsTableTagsCell.js.map +1 -1
- package/dist/esm/components/determinate-loader/DeterminateLoader.d.ts +1 -0
- package/dist/esm/components/determinate-loader/DeterminateLoader.js +2 -1
- package/dist/esm/components/determinate-loader/DeterminateLoader.js.map +1 -1
- package/dist/esm/components/players/AudioPlayer.d.ts +4 -4
- package/dist/esm/components/players/AudioPlayer.js +4 -4
- package/dist/esm/components/story-previewer/StoryPreviewer.js +32 -3
- package/dist/esm/components/story-previewer/StoryPreviewer.js.map +1 -1
- package/dist/esm/constants/previewer.js +2 -1
- package/dist/esm/constants/previewer.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/experience.d.ts +21 -1
- package/dist/esm/services/API.js +1 -1
- package/dist/styles.css +0 -1
- package/dist/styles.less +0 -1
- package/less/components/player.less +0 -1
- package/package.json +1 -1
- package/src/components/assets/AssetField.tsx +25 -12
- package/src/components/assets/AssetsTableDateCell.tsx +4 -3
- package/src/components/assets/AssetsTableNameCell.tsx +23 -8
- package/src/components/assets/AssetsTableSelectCell.tsx +19 -9
- package/src/components/assets/AssetsTableTagsCell.tsx +10 -9
- package/src/components/determinate-loader/DeterminateLoader.tsx +3 -2
- package/src/components/players/AudioPlayer.tsx +5 -5
- package/src/components/story-previewer/StoryPreviewer.tsx +37 -3
- package/src/constants/previewer.ts +2 -1
- package/src/index.ts +3 -2
- package/src/interfaces/experience.ts +25 -1
- package/src/services/API.ts +1 -1
package/dist/styles.less
CHANGED
package/package.json
CHANGED
|
@@ -11,6 +11,14 @@ import { connect } from 'react-redux';
|
|
|
11
11
|
import { bindActionCreators } from 'redux';
|
|
12
12
|
import { ICON_FILTER, ICON_TIMES } from '../../constants/icons';
|
|
13
13
|
|
|
14
|
+
interface IAssetList {
|
|
15
|
+
loading: boolean;
|
|
16
|
+
page: number;
|
|
17
|
+
total_pages: number;
|
|
18
|
+
asset_count: number;
|
|
19
|
+
assets: any[];
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
interface IAssetFieldProps {
|
|
15
23
|
api: any;
|
|
16
24
|
storyId: string;
|
|
@@ -30,6 +38,7 @@ interface IAssetFieldProps {
|
|
|
30
38
|
labelPosition?: string;
|
|
31
39
|
onError?: (message: string) => void;
|
|
32
40
|
labelWidth?: string | number;
|
|
41
|
+
assetList: IAssetList;
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
interface IAssetFieldState {
|
|
@@ -39,6 +48,8 @@ interface IAssetFieldState {
|
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
class AssetField extends React.PureComponent<IAssetFieldProps, IAssetFieldState> {
|
|
51
|
+
private loadAssetTimer: any;
|
|
52
|
+
|
|
42
53
|
constructor(props) {
|
|
43
54
|
super(props);
|
|
44
55
|
|
|
@@ -51,26 +62,24 @@ class AssetField extends React.PureComponent<IAssetFieldProps, IAssetFieldState>
|
|
|
51
62
|
|
|
52
63
|
public componentDidMount() {
|
|
53
64
|
const { assetId } = this.props;
|
|
54
|
-
|
|
55
65
|
// get the asset name from the API
|
|
56
66
|
if (assetId && !this.state.assetName) {
|
|
57
67
|
this.loadAsset();
|
|
58
68
|
}
|
|
59
69
|
}
|
|
60
70
|
|
|
61
|
-
public componentDidUpdate(prevProps
|
|
62
|
-
const {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
this.loadAsset();
|
|
66
|
-
} else if (!assetId) {
|
|
67
|
-
this.setState({
|
|
68
|
-
error: false,
|
|
69
|
-
assetName: ''
|
|
70
|
-
});
|
|
71
|
+
public componentDidUpdate(prevProps) {
|
|
72
|
+
const { assetList } = this.props;
|
|
73
|
+
if (assetList !== prevProps.assetList) {
|
|
74
|
+
clearTimeout(this.loadAssetTimer);
|
|
75
|
+
this.loadAssetTimer = setTimeout(() => this.loadAsset(), 300);
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
78
|
|
|
79
|
+
public componentWillUnmount(): void {
|
|
80
|
+
clearTimeout(this.loadAssetTimer);
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
private loadAsset() {
|
|
75
84
|
const { assetId, api } = this.props;
|
|
76
85
|
|
|
@@ -242,4 +251,8 @@ const mapDispatchToProps = (dispatch) => {
|
|
|
242
251
|
return bindActionCreators({ updateFilters, uploadAssets }, dispatch);
|
|
243
252
|
};
|
|
244
253
|
|
|
245
|
-
|
|
254
|
+
const mapStateToProps = (state): any => {
|
|
255
|
+
return { assetList: state.assetList };
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export default connect(mapStateToProps, mapDispatchToProps)(AssetField);
|
|
@@ -5,9 +5,10 @@ interface IAssetsTableDateCell {
|
|
|
5
5
|
cell: any;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const AssetsTableDateCell: React.FC<IAssetsTableDateCell> = (p: IAssetsTableDateCell) =>
|
|
9
|
-
|
|
10
|
-
)
|
|
8
|
+
const AssetsTableDateCell: React.FC<IAssetsTableDateCell> = (p: IAssetsTableDateCell) =>
|
|
9
|
+
p.cell.row.values.date_created ? (
|
|
10
|
+
<div>{formatDateDefault(p.cell.row.values.date_created)}</div>
|
|
11
|
+
) : null;
|
|
11
12
|
|
|
12
13
|
const AssetsTableDateCellMemoized = React.memo(AssetsTableDateCell);
|
|
13
14
|
export default AssetsTableDateCellMemoized;
|
|
@@ -5,6 +5,7 @@ import { updateAssetName } from '../../redux/actions/asset-list';
|
|
|
5
5
|
import { connect } from 'react-redux';
|
|
6
6
|
import { bindActionCreators } from 'redux';
|
|
7
7
|
import { IImposiumAPI } from '../../services/API';
|
|
8
|
+
import { DeterminateLoader } from '../determinate-loader/DeterminateLoader';
|
|
8
9
|
|
|
9
10
|
interface IAssetsTableNameCell {
|
|
10
11
|
cell: any;
|
|
@@ -17,10 +18,11 @@ const AssetsTableNameCell: React.FC<IAssetsTableNameCell> = (props: IAssetsTable
|
|
|
17
18
|
const {
|
|
18
19
|
cell: {
|
|
19
20
|
row: {
|
|
20
|
-
original: { name, id }
|
|
21
|
+
original: { name, id, percent: uploadProgress }
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
} = props;
|
|
25
|
+
|
|
24
26
|
const [localName, setLocalName] = useState('');
|
|
25
27
|
|
|
26
28
|
const onUpdate = (n) => {
|
|
@@ -40,13 +42,26 @@ const AssetsTableNameCell: React.FC<IAssetsTableNameCell> = (props: IAssetsTable
|
|
|
40
42
|
};
|
|
41
43
|
}, [name]);
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
if (uploadProgress) {
|
|
46
|
+
const loader: JSX.Element =
|
|
47
|
+
uploadProgress < 100 ? (
|
|
48
|
+
<DeterminateLoader
|
|
49
|
+
progress={uploadProgress}
|
|
50
|
+
text={name}
|
|
51
|
+
/>
|
|
52
|
+
) : (
|
|
53
|
+
<span>Preparing asset...</span>
|
|
54
|
+
);
|
|
55
|
+
return loader;
|
|
56
|
+
} else {
|
|
57
|
+
return (
|
|
58
|
+
<TextField
|
|
59
|
+
value={localName}
|
|
60
|
+
width={'100%'}
|
|
61
|
+
onChange={(n) => onUpdate(n)}
|
|
62
|
+
/>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
50
65
|
};
|
|
51
66
|
|
|
52
67
|
const mapDispatchToProps = (dispatch): any => {
|
|
@@ -23,7 +23,13 @@ class AssetsTableSelectCell extends React.PureComponent<IAssetsTableSelectCell>
|
|
|
23
23
|
|
|
24
24
|
public render = (): JSX.Element => {
|
|
25
25
|
const { cell, selectedAssets } = this.props;
|
|
26
|
-
const
|
|
26
|
+
const {
|
|
27
|
+
row: {
|
|
28
|
+
original: { type, id }
|
|
29
|
+
}
|
|
30
|
+
} = cell;
|
|
31
|
+
|
|
32
|
+
const assetId: string = id;
|
|
27
33
|
const isSelected: boolean = selectedAssets.indexOf(assetId) > -1;
|
|
28
34
|
const selectionHandler = (selected, e) => {
|
|
29
35
|
if (selected) {
|
|
@@ -37,14 +43,18 @@ class AssetsTableSelectCell extends React.PureComponent<IAssetsTableSelectCell>
|
|
|
37
43
|
}
|
|
38
44
|
};
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
if (type === 'upload') {
|
|
47
|
+
return null;
|
|
48
|
+
} else {
|
|
49
|
+
return (
|
|
50
|
+
<CheckboxField
|
|
51
|
+
label=''
|
|
52
|
+
width='auto'
|
|
53
|
+
value={isSelected}
|
|
54
|
+
onChange={(v, e) => selectionHandler(v, e)}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
48
58
|
};
|
|
49
59
|
}
|
|
50
60
|
|
|
@@ -5,15 +5,16 @@ interface IAssetsTableTagsCell {
|
|
|
5
5
|
onClick(e: any): void;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const AssetsTableTagsCell: React.FC<IAssetsTableTagsCell> = (p: IAssetsTableTagsCell) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const AssetsTableTagsCell: React.FC<IAssetsTableTagsCell> = (p: IAssetsTableTagsCell) =>
|
|
9
|
+
p.cell.row.values.tags ? (
|
|
10
|
+
<Button
|
|
11
|
+
color='secondary'
|
|
12
|
+
style='subtle'
|
|
13
|
+
size='small'
|
|
14
|
+
onClick={p.onClick}>
|
|
15
|
+
{p.cell.row.values.tags.length}
|
|
16
|
+
</Button>
|
|
17
|
+
) : null;
|
|
17
18
|
|
|
18
19
|
const AssetsTableTagsCellMemoized = React.memo(AssetsTableTagsCell);
|
|
19
20
|
export default AssetsTableTagsCellMemoized;
|
|
@@ -2,20 +2,21 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
export interface IDeterminateLoaderProps {
|
|
4
4
|
progress: number; // expects int 0-100 (%)
|
|
5
|
+
text?: string;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
export const DeterminateLoader: React.FC<IDeterminateLoaderProps> = (
|
|
8
9
|
p: IDeterminateLoaderProps
|
|
9
10
|
) => {
|
|
10
11
|
const transform: string = p.progress ? `scaleX(${p.progress / 100})` : 'scaleX(0)';
|
|
11
|
-
|
|
12
|
+
const text = p.text ? p.text : `${Math.round(p.progress)}%`;
|
|
12
13
|
return (
|
|
13
14
|
<div className='determinate-loader'>
|
|
14
15
|
<div
|
|
15
16
|
className='progress-bg'
|
|
16
17
|
style={{ transform }}
|
|
17
18
|
/>
|
|
18
|
-
<div className='progress-copy'>{
|
|
19
|
+
<div className='progress-copy'>{text}</div>
|
|
19
20
|
</div>
|
|
20
21
|
);
|
|
21
22
|
};
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { DEFAULT_PADDING } from '../../constants/player';
|
|
3
3
|
import { getPlayerStyle } from './VideoPlayer';
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
interface IAudioPlayerProps {
|
|
6
6
|
url: string;
|
|
7
7
|
height?: number;
|
|
8
8
|
width?: number;
|
|
@@ -10,7 +10,7 @@ interface IImagePlayerProps {
|
|
|
10
10
|
active?: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
class
|
|
13
|
+
class AudioPlayer extends React.PureComponent<IAudioPlayerProps, undefined> {
|
|
14
14
|
private audioNode: any;
|
|
15
15
|
|
|
16
16
|
private width = 1280;
|
|
@@ -23,7 +23,7 @@ class ImagePlayer extends React.PureComponent<IImagePlayerProps, undefined> {
|
|
|
23
23
|
this.audioNode = React.createRef();
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
public
|
|
26
|
+
public getAudioStyle(): any {
|
|
27
27
|
const { padding, width, height } = this.props;
|
|
28
28
|
const pad = padding !== undefined ? padding : DEFAULT_PADDING;
|
|
29
29
|
|
|
@@ -38,7 +38,7 @@ class ImagePlayer extends React.PureComponent<IImagePlayerProps, undefined> {
|
|
|
38
38
|
<div className='media-player'>
|
|
39
39
|
<div
|
|
40
40
|
className='inner-viewer'
|
|
41
|
-
style={this.
|
|
41
|
+
style={this.getAudioStyle()}>
|
|
42
42
|
<audio
|
|
43
43
|
controls
|
|
44
44
|
src={url}
|
|
@@ -53,4 +53,4 @@ class ImagePlayer extends React.PureComponent<IImagePlayerProps, undefined> {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export default
|
|
56
|
+
export default AudioPlayer;
|
|
@@ -22,6 +22,7 @@ import Timer from '../../services/Timer';
|
|
|
22
22
|
import LogViewer from '../log-viewer/LogViewer';
|
|
23
23
|
import { connect } from 'react-redux';
|
|
24
24
|
import { ICON_DOWNLOAD, ICON_CLIPBOARD } from '../../constants/icons';
|
|
25
|
+
import AudioPlayer from '../players/AudioPlayer';
|
|
25
26
|
|
|
26
27
|
interface IStoryPreviewerProps {
|
|
27
28
|
api: IImposiumAPI;
|
|
@@ -254,12 +255,14 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
254
255
|
} = this.state;
|
|
255
256
|
const videos = output.videos;
|
|
256
257
|
const images = output.images;
|
|
258
|
+
const audios = output.audio;
|
|
257
259
|
|
|
258
260
|
if (videos) {
|
|
259
261
|
for (const key in videos) {
|
|
260
262
|
if (videos.hasOwnProperty(key)) {
|
|
263
|
+
const name: string = videos[key].name ? videos[key].name : videos[key].format;
|
|
261
264
|
const v = {
|
|
262
|
-
label: `Video: ${
|
|
265
|
+
label: `Video: ${name}`,
|
|
263
266
|
value: `${OUTPUT_TYPES.VIDEO}.${key}`
|
|
264
267
|
};
|
|
265
268
|
opts.push(v);
|
|
@@ -271,7 +274,7 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
271
274
|
for (const key in images) {
|
|
272
275
|
if (images.hasOwnProperty(key)) {
|
|
273
276
|
const i = {
|
|
274
|
-
label: `Image: ${key}`,
|
|
277
|
+
label: `Image: ${images[key].name}`,
|
|
275
278
|
value: `${OUTPUT_TYPES.IMAGE}.${key}`
|
|
276
279
|
};
|
|
277
280
|
opts.push(i);
|
|
@@ -279,6 +282,18 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
279
282
|
}
|
|
280
283
|
}
|
|
281
284
|
|
|
285
|
+
if (audios) {
|
|
286
|
+
for (const key in audios) {
|
|
287
|
+
if (audios.hasOwnProperty(key)) {
|
|
288
|
+
const a = {
|
|
289
|
+
label: `Audio: ${audios[key].name}`,
|
|
290
|
+
value: `${OUTPUT_TYPES.AUDIO}.${key}`
|
|
291
|
+
};
|
|
292
|
+
opts.push(a);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
282
297
|
return opts;
|
|
283
298
|
}
|
|
284
299
|
|
|
@@ -395,6 +410,8 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
395
410
|
private getFirstOutput(experience: IExperience) {
|
|
396
411
|
const videos = experience.output.videos;
|
|
397
412
|
const images = experience.output.images;
|
|
413
|
+
const audios = experience.output.audio;
|
|
414
|
+
|
|
398
415
|
if (videos) {
|
|
399
416
|
for (const key in videos) {
|
|
400
417
|
if (videos.hasOwnProperty(key)) {
|
|
@@ -407,6 +424,12 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
407
424
|
return `${OUTPUT_TYPES.IMAGE}.${key}`;
|
|
408
425
|
}
|
|
409
426
|
}
|
|
427
|
+
} else if (audios) {
|
|
428
|
+
for (const key in audios) {
|
|
429
|
+
if (audios.hasOwnProperty(key)) {
|
|
430
|
+
return `${OUTPUT_TYPES.AUDIO}.${key}`;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
410
433
|
} else {
|
|
411
434
|
return null;
|
|
412
435
|
}
|
|
@@ -624,18 +647,27 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
624
647
|
} else if (experience && activeOutput) {
|
|
625
648
|
let player;
|
|
626
649
|
let url;
|
|
650
|
+
|
|
627
651
|
const outputArr = activeOutput.split('.');
|
|
628
652
|
const type = outputArr[0];
|
|
629
653
|
const key = outputArr[1];
|
|
630
654
|
|
|
631
655
|
if (type === OUTPUT_TYPES.IMAGE) {
|
|
632
|
-
url = experience.output.images[key];
|
|
656
|
+
url = experience.output.images[key].url;
|
|
633
657
|
player = (
|
|
634
658
|
<ImagePlayer
|
|
635
659
|
url={url}
|
|
636
660
|
active={true}
|
|
637
661
|
/>
|
|
638
662
|
);
|
|
663
|
+
} else if (type === OUTPUT_TYPES.AUDIO) {
|
|
664
|
+
url = experience.output.audio[key].url;
|
|
665
|
+
player = (
|
|
666
|
+
<AudioPlayer
|
|
667
|
+
url={url}
|
|
668
|
+
active={true}
|
|
669
|
+
/>
|
|
670
|
+
);
|
|
639
671
|
} else if (type === OUTPUT_TYPES.VIDEO) {
|
|
640
672
|
const output: any = experience.output.videos[key];
|
|
641
673
|
const mWidth = output.width !== undefined ? parseInt(output.width, 10) : null;
|
|
@@ -758,6 +790,8 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
758
790
|
|
|
759
791
|
if (type === OUTPUT_TYPES.IMAGE) {
|
|
760
792
|
url = experience.output.images[key];
|
|
793
|
+
} else if (type === OUTPUT_TYPES.AUDIO) {
|
|
794
|
+
url = experience.output.audio[key].url;
|
|
761
795
|
} else if (type === OUTPUT_TYPES.VIDEO) {
|
|
762
796
|
url = experience.output.videos[key].url;
|
|
763
797
|
}
|
package/src/index.ts
CHANGED
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
updateAssetStory
|
|
102
102
|
} from './redux/actions/asset-list';
|
|
103
103
|
import { getAssetTagList, addAssetTagToList } from './redux/actions/asset-tags';
|
|
104
|
-
import { toggleAutoTag, uploadAssets } from './redux/actions/asset-uploads';
|
|
104
|
+
import { cancelAssetUpload, toggleAutoTag, uploadAssets } from './redux/actions/asset-uploads';
|
|
105
105
|
import { selectAsset, deselectAsset, resetSelection } from './redux/actions/selected-assets';
|
|
106
106
|
import assetFilters from './redux/reducers/asset-filters';
|
|
107
107
|
import assetList from './redux/reducers/asset-list';
|
|
@@ -278,5 +278,6 @@ export {
|
|
|
278
278
|
HEADER_HEIGHT,
|
|
279
279
|
decoupleAssets,
|
|
280
280
|
updateAssetStory,
|
|
281
|
-
FontPicker
|
|
281
|
+
FontPicker,
|
|
282
|
+
cancelAssetUpload
|
|
282
283
|
};
|
|
@@ -7,11 +7,17 @@ export interface IOutputVideos {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface IOutputImages {
|
|
10
|
-
[s: string]:
|
|
10
|
+
[s: string]: IExperienceImage;
|
|
11
11
|
}
|
|
12
|
+
|
|
13
|
+
export interface IOutputAudios {
|
|
14
|
+
[s: string]: IExperienceAudio;
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
export interface IOutput {
|
|
13
18
|
videos: IOutputVideos;
|
|
14
19
|
images: IOutputImages;
|
|
20
|
+
audio: IOutputAudios;
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
export interface IExperienceVideo {
|
|
@@ -24,6 +30,24 @@ export interface IExperienceVideo {
|
|
|
24
30
|
width?: number | string;
|
|
25
31
|
}
|
|
26
32
|
|
|
33
|
+
export interface IExperienceImage {
|
|
34
|
+
format: string;
|
|
35
|
+
url: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
height?: number | string;
|
|
38
|
+
width?: number | string;
|
|
39
|
+
poster: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IExperienceAudio {
|
|
43
|
+
format: string;
|
|
44
|
+
url: string;
|
|
45
|
+
name: string;
|
|
46
|
+
bitrate: number;
|
|
47
|
+
sample_rate: number;
|
|
48
|
+
channels: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
27
51
|
export interface IExperience {
|
|
28
52
|
date_created: number;
|
|
29
53
|
id: string;
|
package/src/services/API.ts
CHANGED