@imposium-hub/components 1.41.3 → 1.41.5

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.
@@ -3,7 +3,7 @@ import Portal from '../portal/Portal';
3
3
  import {ICON_TIMES} from '../../constants/icons';
4
4
  import Button from '../button/Button';
5
5
  import {assets as copy} from '../../constants/copy';
6
- interface IVideoPreviewProps {
6
+ interface IImagePreviewProps {
7
7
  showMedia : boolean;
8
8
  url : string;
9
9
  playbackSettings? : any;
@@ -11,7 +11,11 @@ interface IVideoPreviewProps {
11
11
  onRequestClose?(e) : void;
12
12
  }
13
13
 
14
- class ImagePreview extends React.PureComponent<IVideoPreviewProps> {
14
+ interface IImagePreviewState {
15
+ loaded : boolean;
16
+ }
17
+
18
+ class ImagePreview extends React.PureComponent<IImagePreviewProps, IImagePreviewState> {
15
19
  private imageNode : any = null;
16
20
  private evtHandlers : any;
17
21
  constructor(props) {
@@ -20,6 +24,9 @@ class ImagePreview extends React.PureComponent<IVideoPreviewProps> {
20
24
  this.evtHandlers = {
21
25
  onClose: (e) => this.onClose(e)
22
26
  };
27
+ this.state = {
28
+ loaded: false
29
+ };
23
30
  }
24
31
 
25
32
  private onClose(e) {
@@ -28,8 +35,11 @@ class ImagePreview extends React.PureComponent<IVideoPreviewProps> {
28
35
 
29
36
  onRequestClose(e);
30
37
  }
38
+
31
39
  public render() {
32
40
  const {showMedia, url, style} = this.props;
41
+ const {loaded} = this.state;
42
+
33
43
  if (showMedia) {
34
44
  return (
35
45
  <Portal id='portal-root'>
@@ -45,9 +55,10 @@ class ImagePreview extends React.PureComponent<IVideoPreviewProps> {
45
55
  </Button>
46
56
  </div>
47
57
  <img
58
+ onLoad = {() => this.setState({loaded: true})}
48
59
  src={url}
49
60
  ref={this.imageNode}
50
- className='asset-preview-background'
61
+ className={`asset-preview-background transparent ${!loaded ? 'hidden' : ''}`}
51
62
  style={style}
52
63
  />
53
64
  </Portal>
@@ -332,15 +332,17 @@ class PublishWizard extends React.PureComponent<IPublishWizardProps, IPublishWiz
332
332
  options={credOpts}
333
333
  tooltip={copy.publish.tooltipAccessKey}/>
334
334
 
335
- {distributionOptions?.map((option, index) => {
336
- return (
337
- <BigButton
338
- key={index}
339
- label={option.label}
340
- onClick={option.onClick}
341
- />
342
- );
343
- })}
335
+ <div className = 'link-wrapper'>
336
+ {distributionOptions?.map((option, index) => {
337
+ return (
338
+ <BigButton
339
+ key={index}
340
+ label={option.label}
341
+ onClick={option.onClick}
342
+ />
343
+ );
344
+ })}
345
+ </div>
344
346
  </div>
345
347
  );
346
348
  }
@@ -11,15 +11,17 @@ class APIIntegration extends React.PureComponent {
11
11
  <h2>{copy.integration.documentation}</h2>
12
12
  <HRule/>
13
13
  <p>{copy.integration.docParagraph}</p>
14
- {documentationLinks?.map((link) => {
15
- return (
16
- <BigLink
17
- key={link.key}
18
- label = {link.label}
19
- link = {link.link}
20
- />
21
- );
22
- })}
14
+ <div className = 'link-wrapper'>
15
+ {documentationLinks?.map((link) => {
16
+ return (
17
+ <BigLink
18
+ key={link.key}
19
+ label = {link.label}
20
+ link = {link.link}
21
+ />
22
+ );
23
+ })}
24
+ </div>
23
25
  </div>
24
26
  );
25
27
  }
@@ -235,13 +235,16 @@ class EmailWorkflow extends React.PureComponent<IEmailWorkflowProps, IEmailWorkf
235
235
  accept='text/csv'
236
236
  ref={this.hiddenFileInputRef}
237
237
  onChange={this.doUploadCsv}/>
238
- {emailOptions?.map((option, index) => {
239
- return <BigButton
240
- label={<span>{option.label}</span>}
241
- onClick={option.onClick}
242
- disabled={option?.disabled}
243
- key={option.key}/>;
244
- })}
238
+ <div className = 'link-wrapper'>
239
+ {emailOptions?.map((option, index) => {
240
+
241
+ return <BigButton
242
+ label={<span>{option.label}</span>}
243
+ onClick={option.onClick}
244
+ disabled={option?.disabled}
245
+ key={option.key}/>;
246
+ })}
247
+ </div>
245
248
  </div>;
246
249
 
247
250
  return (isExport ? renderedBatch : uploadComplete) ? downloadCSV : uploadCSV;
@@ -89,30 +89,34 @@ class WebpageHosted extends React.PureComponent<IWebpageHostedProps> {
89
89
  <HRule/>
90
90
  <p>{copy.publish.webpageDesc}</p>
91
91
  <HRule/>
92
- {webPageOptions?.map((option, index) => {
93
- return (
94
- <BigButton
95
- key={index}
96
- label={option.label}
97
- onClick={() => option.onClick()}
98
- />
99
- );
100
- })}
92
+ <div className = 'link-wrapper'>
93
+ {webPageOptions?.map((option, index) => {
94
+ return (
95
+ <BigButton
96
+ key={index}
97
+ label={option.label}
98
+ onClick={() => option.onClick()}
99
+ />
100
+ );
101
+ })}
102
+ </div>
101
103
  <br/>
102
104
  <br/>
103
105
  <h2>{copy.integration.documentation}</h2>
104
106
  <HRule/>
105
107
  <p>{copy.integration.docParagraph}</p>
106
- {documentationLinks?.map((link) => {
107
- return (
108
- <BigLink
109
- key={link.key}
110
- label = {link.label}
111
- link = {link.link}
112
- />
113
- );
114
- })}
115
- </div>
108
+ <div className = 'link-wrapper'>
109
+ {documentationLinks?.map((link) => {
110
+ return (
111
+ <BigLink
112
+ key={link.key}
113
+ label = {link.label}
114
+ link = {link.link}
115
+ />
116
+ );
117
+ })}
118
+ </div>
119
+ </div>
116
120
  );
117
121
  }
118
122
  }