@imposium-hub/components 1.41.6 → 1.42.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/components/publish-wizard/PublishWizard.tsx +33 -5
- package/components/publish-wizard/publish/EmailWorkflow.tsx +1 -1
- package/components/tabs/Tabs.tsx +11 -3
- package/constants/copy.ts +1 -1
- package/dist/components.js +2 -2
- package/dist/components.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/styles.less +7 -4
- package/dist/styles.less.map +1 -1
- package/less/components/publish-wizard.less +7 -4
- package/package.json +1 -1
|
@@ -37,7 +37,9 @@ interface IPublishWizardProps {
|
|
|
37
37
|
importBatchFromCsv : (storyId : string, batchId : string, batchName : string, csvFile : File, accessKey : string, compId : string, addEmbed : boolean, addMedia : boolean) => any;
|
|
38
38
|
handleNotification? : (n) => void;
|
|
39
39
|
batchJobs : any;
|
|
40
|
+
activeComposition : string;
|
|
40
41
|
renderBatch : (batchId : string, batchName ? : string) => any;
|
|
42
|
+
publishData : any;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export interface ICredential {
|
|
@@ -96,13 +98,25 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
96
98
|
|
|
97
99
|
public componentDidMount() {
|
|
98
100
|
|
|
99
|
-
const {story, api, handleError} = this.props;
|
|
101
|
+
const {story, api, handleError, activeComposition} = this.props;
|
|
100
102
|
|
|
101
103
|
// Pull in all of the access creds for the composition dropdown
|
|
102
104
|
api.getAssets({type: ASSET_TYPES.VIDEO_COMPOSITION}, story.id).then((res) => {
|
|
105
|
+
const firstCompId = (res.assets[0]) ? res.assets[0].id : null;
|
|
103
106
|
this.setState({
|
|
104
|
-
compositions: res.assets
|
|
107
|
+
compositions: res.assets,
|
|
108
|
+
selectedComposition: (activeComposition) ? activeComposition : firstCompId
|
|
105
109
|
});
|
|
110
|
+
if (res.assets.length > 0) {
|
|
111
|
+
const comp = res.assets[0];
|
|
112
|
+
const composition = {
|
|
113
|
+
value: comp.id,
|
|
114
|
+
label: comp.name
|
|
115
|
+
};
|
|
116
|
+
this.setState({
|
|
117
|
+
selectedComposition: composition
|
|
118
|
+
});
|
|
119
|
+
}
|
|
106
120
|
}).catch((credsError) => {
|
|
107
121
|
handleError(copy.integration.errorPullingComps);
|
|
108
122
|
});
|
|
@@ -185,6 +199,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
185
199
|
}
|
|
186
200
|
|
|
187
201
|
public onSelectOption = (index) => {
|
|
202
|
+
const {publishing} = this.props.publishData;
|
|
203
|
+
if (publishing) {
|
|
204
|
+
alert('WARNING: Your publish is still in progress, your changes will not be present in the rendered videos until the publish is complete');
|
|
205
|
+
}
|
|
188
206
|
this.setState({screenIndex: index, done: false});
|
|
189
207
|
}
|
|
190
208
|
|
|
@@ -319,6 +337,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
319
337
|
<HRule/>
|
|
320
338
|
<p>{copy.publish.distributeStepDesc}</p>
|
|
321
339
|
<HRule/>
|
|
340
|
+
{!this.state.selectedComposition && (
|
|
341
|
+
<p className={'text-danger'}>{copy.publish.noCompErrorDesc}</p>
|
|
342
|
+
)}
|
|
343
|
+
<div style={{marginTop: '10px'}}>
|
|
322
344
|
<SelectField
|
|
323
345
|
label={copy.project.compName}
|
|
324
346
|
value={selectedComposition}
|
|
@@ -337,12 +359,14 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
337
359
|
return (
|
|
338
360
|
<BigButton
|
|
339
361
|
key={index}
|
|
362
|
+
disabled={!this.state.selectedComposition}
|
|
340
363
|
label={option.label}
|
|
341
364
|
onClick={option.onClick}
|
|
342
365
|
/>
|
|
343
366
|
);
|
|
344
367
|
})}
|
|
345
368
|
</div>
|
|
369
|
+
</div>
|
|
346
370
|
</div>
|
|
347
371
|
);
|
|
348
372
|
}
|
|
@@ -421,15 +445,19 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
421
445
|
}
|
|
422
446
|
}
|
|
423
447
|
|
|
448
|
+
const mapStateToProps = (state) => ({
|
|
449
|
+
publishData: state.publish
|
|
450
|
+
});
|
|
451
|
+
|
|
424
452
|
const mapDispatchToProps = (dispatch) => {
|
|
425
453
|
return bindActionCreators({publishVersion}, dispatch);
|
|
426
454
|
};
|
|
427
455
|
|
|
428
|
-
export default connect (
|
|
456
|
+
export default connect (mapStateToProps, mapDispatchToProps)(PublishWizard);
|
|
429
457
|
|
|
430
458
|
export const BigButton : React.FC<IBigButtonProps> = (p) => (
|
|
431
|
-
<div className = {`big-link ${(p.disabled)
|
|
432
|
-
<h1
|
|
459
|
+
<div className = {`big-link ${(p.disabled) && 'disabled'}`} onClick = {() => p.onClick()} style={p.style}>
|
|
460
|
+
<h1>{p.label}</h1>
|
|
433
461
|
</div>
|
|
434
462
|
);
|
|
435
463
|
|
|
@@ -80,7 +80,7 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
|
|
|
80
80
|
const emptyRow : any = maskConfig.map((m : any) => (m.id))
|
|
81
81
|
.reduce((prevState : any, currId : string) => ({...prevState, [currId]: ''}), {});
|
|
82
82
|
|
|
83
|
-
const filename = `${alphaNumeric(name)}-batch-template
|
|
83
|
+
const filename = `${alphaNumeric(name)}-batch-template`;
|
|
84
84
|
const exporter = new ExportToCsv({
|
|
85
85
|
...EmailWorkflow.CSV_EXPORT_CONFIG,
|
|
86
86
|
filename
|
package/components/tabs/Tabs.tsx
CHANGED
|
@@ -12,7 +12,7 @@ interface ITab {
|
|
|
12
12
|
key : string;
|
|
13
13
|
canClose? : boolean;
|
|
14
14
|
resize? : boolean;
|
|
15
|
-
label :
|
|
15
|
+
label : any;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
interface ITabsProps {
|
|
@@ -72,10 +72,18 @@ class Tabs extends React.PureComponent<ITabsProps, ITabsState> {
|
|
|
72
72
|
for (let i = 0; i < options.length; i++) {
|
|
73
73
|
|
|
74
74
|
const option = options[i];
|
|
75
|
-
|
|
75
|
+
let buttonWidth = option.canClose ? 20 : 0;
|
|
76
76
|
let div = document.createElement('div');
|
|
77
77
|
div.className = 'tab-header-option';
|
|
78
|
-
|
|
78
|
+
|
|
79
|
+
// check typeof label
|
|
80
|
+
if (typeof option.label !== 'string') {
|
|
81
|
+
// set label
|
|
82
|
+
div.innerHTML = option.label.props.children[0];
|
|
83
|
+
buttonWidth = 20;
|
|
84
|
+
} else {
|
|
85
|
+
div.innerHTML = option.label;
|
|
86
|
+
}
|
|
79
87
|
container.appendChild(div);
|
|
80
88
|
totalTabWidths += div.offsetWidth + buttonWidth;
|
|
81
89
|
container.removeChild(div);
|
package/constants/copy.ts
CHANGED
|
@@ -159,7 +159,7 @@ export const publish = {
|
|
|
159
159
|
btnBack: 'Back',
|
|
160
160
|
btnFinished: 'Done',
|
|
161
161
|
noCompErrorTitle: 'No Compositions Found',
|
|
162
|
-
noCompErrorDesc: `You
|
|
162
|
+
noCompErrorDesc: `You must have at least 1 composition on your story to render and distribute videos.`
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
export const integration = {
|