@imposium-hub/components 1.41.7 → 1.42.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.
@@ -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 {
@@ -102,9 +103,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
102
103
  // Pull in all of the access creds for the composition dropdown
103
104
  api.getAssets({type: ASSET_TYPES.VIDEO_COMPOSITION}, story.id).then((res) => {
104
105
  const firstCompId = (res.assets[0]) ? res.assets[0].id : null;
106
+ const compId = (activeComposition) ? activeComposition : firstCompId;
105
107
  this.setState({
106
108
  compositions: res.assets,
107
- selectedComposition: (activeComposition) ? activeComposition : firstCompId
109
+ selectedComposition: compId
108
110
  });
109
111
  }).catch((credsError) => {
110
112
  handleError(copy.integration.errorPullingComps);
@@ -188,6 +190,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
188
190
  }
189
191
 
190
192
  public onSelectOption = (index) => {
193
+ const {publishing} = this.props.publishData;
194
+ if (publishing) {
195
+ alert('WARNING: Your publish is still in progress, your changes will not be present in the rendered videos until the publish is complete');
196
+ }
191
197
  this.setState({screenIndex: index, done: false});
192
198
  }
193
199
 
@@ -322,6 +328,10 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
322
328
  <HRule/>
323
329
  <p>{copy.publish.distributeStepDesc}</p>
324
330
  <HRule/>
331
+ {!this.state.selectedComposition && (
332
+ <p className={'text-danger'}>{copy.publish.noCompErrorDesc}</p>
333
+ )}
334
+ <div style={{marginTop: '10px'}}>
325
335
  <SelectField
326
336
  label={copy.project.compName}
327
337
  value={selectedComposition}
@@ -340,12 +350,14 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
340
350
  return (
341
351
  <BigButton
342
352
  key={index}
353
+ disabled={!this.state.selectedComposition}
343
354
  label={option.label}
344
355
  onClick={option.onClick}
345
356
  />
346
357
  );
347
358
  })}
348
359
  </div>
360
+ </div>
349
361
  </div>
350
362
  );
351
363
  }
@@ -424,15 +436,19 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
424
436
  }
425
437
  }
426
438
 
439
+ const mapStateToProps = (state) => ({
440
+ publishData: state.publish
441
+ });
442
+
427
443
  const mapDispatchToProps = (dispatch) => {
428
444
  return bindActionCreators({publishVersion}, dispatch);
429
445
  };
430
446
 
431
- export default connect (null, mapDispatchToProps)(PublishWizard);
447
+ export default connect (mapStateToProps, mapDispatchToProps)(PublishWizard);
432
448
 
433
449
  export const BigButton : React.FC<IBigButtonProps> = (p) => (
434
- <div className = {`big-link ${(p.disabled) ? 'disabled' : ''}`} onClick = {() => p.onClick()} style={p.style}>
435
- <h1 style={{color: p.selected && '#2d8ceb' }}>{p.label}</h1>
450
+ <div className = {`big-link ${(p.disabled) && 'disabled'}`} onClick = {() => p.onClick()} style={p.style}>
451
+ <h1>{p.label}</h1>
436
452
  </div>
437
453
  );
438
454
 
@@ -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.csv`;
83
+ const filename = `${alphaNumeric(name)}-batch-template`;
84
84
  const exporter = new ExportToCsv({
85
85
  ...EmailWorkflow.CSV_EXPORT_CONFIG,
86
86
  filename
@@ -12,7 +12,7 @@ interface ITab {
12
12
  key : string;
13
13
  canClose? : boolean;
14
14
  resize? : boolean;
15
- label : string;
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
- const buttonWidth = option.canClose ? 20 : 0;
75
+ let buttonWidth = option.canClose ? 20 : 0;
76
76
  let div = document.createElement('div');
77
77
  div.className = 'tab-header-option';
78
- div.innerHTML = option.label;
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 can't publish and deliver your project until you have created your first composition.`
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 = {