@imposium-hub/components 1.41.7 → 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 +28 -3
- 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
|
@@ -39,6 +39,7 @@ interface IPublishWizardProps {
|
|
|
39
39
|
batchJobs : any;
|
|
40
40
|
activeComposition : string;
|
|
41
41
|
renderBatch : (batchId : string, batchName ? : string) => any;
|
|
42
|
+
publishData : any;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
export interface ICredential {
|
|
@@ -106,6 +107,16 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
106
107
|
compositions: res.assets,
|
|
107
108
|
selectedComposition: (activeComposition) ? activeComposition : firstCompId
|
|
108
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
|
+
}
|
|
109
120
|
}).catch((credsError) => {
|
|
110
121
|
handleError(copy.integration.errorPullingComps);
|
|
111
122
|
});
|
|
@@ -188,6 +199,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
188
199
|
}
|
|
189
200
|
|
|
190
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
|
+
}
|
|
191
206
|
this.setState({screenIndex: index, done: false});
|
|
192
207
|
}
|
|
193
208
|
|
|
@@ -322,6 +337,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
322
337
|
<HRule/>
|
|
323
338
|
<p>{copy.publish.distributeStepDesc}</p>
|
|
324
339
|
<HRule/>
|
|
340
|
+
{!this.state.selectedComposition && (
|
|
341
|
+
<p className={'text-danger'}>{copy.publish.noCompErrorDesc}</p>
|
|
342
|
+
)}
|
|
343
|
+
<div style={{marginTop: '10px'}}>
|
|
325
344
|
<SelectField
|
|
326
345
|
label={copy.project.compName}
|
|
327
346
|
value={selectedComposition}
|
|
@@ -340,12 +359,14 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
340
359
|
return (
|
|
341
360
|
<BigButton
|
|
342
361
|
key={index}
|
|
362
|
+
disabled={!this.state.selectedComposition}
|
|
343
363
|
label={option.label}
|
|
344
364
|
onClick={option.onClick}
|
|
345
365
|
/>
|
|
346
366
|
);
|
|
347
367
|
})}
|
|
348
368
|
</div>
|
|
369
|
+
</div>
|
|
349
370
|
</div>
|
|
350
371
|
);
|
|
351
372
|
}
|
|
@@ -424,15 +445,19 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
|
|
|
424
445
|
}
|
|
425
446
|
}
|
|
426
447
|
|
|
448
|
+
const mapStateToProps = (state) => ({
|
|
449
|
+
publishData: state.publish
|
|
450
|
+
});
|
|
451
|
+
|
|
427
452
|
const mapDispatchToProps = (dispatch) => {
|
|
428
453
|
return bindActionCreators({publishVersion}, dispatch);
|
|
429
454
|
};
|
|
430
455
|
|
|
431
|
-
export default connect (
|
|
456
|
+
export default connect (mapStateToProps, mapDispatchToProps)(PublishWizard);
|
|
432
457
|
|
|
433
458
|
export const BigButton : React.FC<IBigButtonProps> = (p) => (
|
|
434
|
-
<div className = {`big-link ${(p.disabled)
|
|
435
|
-
<h1
|
|
459
|
+
<div className = {`big-link ${(p.disabled) && 'disabled'}`} onClick = {() => p.onClick()} style={p.style}>
|
|
460
|
+
<h1>{p.label}</h1>
|
|
436
461
|
</div>
|
|
437
462
|
);
|
|
438
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 = {
|