@capillarytech/creatives-library 7.17.185 → 7.17.187

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.17.185",
4
+ "version": "7.17.187",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -1012,4 +1012,7 @@
1012
1012
  -webkit-box-orient: vertical;
1013
1013
  overflow: hidden;
1014
1014
  color: $CAP_WHITE;
1015
+ }
1016
+ .viber-image-preview {
1017
+ width: 9.75rem;
1015
1018
  }
@@ -917,6 +917,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
917
917
  {imageURL && (
918
918
  <CapImage
919
919
  src={imageURL}
920
+ className="viber-image-preview"
920
921
  alt="brand-name"
921
922
  rest={{
922
923
  style: {
@@ -520,10 +520,16 @@ export const Viber = (props) => {
520
520
  <CapLabel type="label3">{formatMessage(messages.btnDesc)}</CapLabel>
521
521
  }
522
522
  />
523
+ {templateMediaType === VIBER_MEDIA_TYPES.VIDEO && (
524
+ <CapLabel type="label3">
525
+ {formatMessage(messages.videoButtonDisabled)}
526
+ </CapLabel>
527
+ )}
523
528
  <CapRadioGroup
524
529
  options={buttonRadioOptions}
525
530
  value={buttonType}
526
531
  onChange={onChangeButtonType}
532
+ disabled={templateMediaType === VIBER_MEDIA_TYPES.VIDEO}
527
533
  className="viber-btn-radio-group"
528
534
  />
529
535
  {isBtnTypeCta && ButtonViber}
@@ -548,6 +554,7 @@ export const Viber = (props) => {
548
554
  messageData.video.thumbnailUrl = viberVideoPreviewImg;
549
555
  messageData.video.duration = duration; // integer value in seconds
550
556
  }
557
+
551
558
  if (!isEmpty(ctaData)) {
552
559
  messageData.button = {};
553
560
  messageData.button.text = ctaData?.buttonText;
@@ -190,6 +190,10 @@ export default defineMessages({
190
190
  id: `${scope}.ctaDesc`,
191
191
  defaultMessage: 'Create a button that lets customers respond to your messages or take action',
192
192
  },
193
+ videoButtonDisabled: {
194
+ id: `${scope}.videoButtonDisabled`,
195
+ defaultMessage: 'Not supported for video media type',
196
+ },
193
197
  buttonTextTooltip: {
194
198
  id: `${scope}.buttonTextTooltip`,
195
199
  defaultMessage: 'Use this to name the button. We would recommend not to use special characters here',