@capillarytech/creatives-library 7.17.186 → 7.17.188
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
|
@@ -144,7 +144,9 @@ export const Viber = (props) => {
|
|
|
144
144
|
updateButtonUrl(url);
|
|
145
145
|
setIsCtaSaved(true);
|
|
146
146
|
setButtonType(button?.text ? VIBER_BUTTON_TYPES.CTA : NONE);
|
|
147
|
-
|
|
147
|
+
if (!isEmpty(button)) {
|
|
148
|
+
setCtadata({ buttonText: button?.text, buttonURL: button?.url });
|
|
149
|
+
}
|
|
148
150
|
if (!isEmpty(image)) {
|
|
149
151
|
setTemplateMediaType(VIBER_MEDIA_TYPES.IMAGE);
|
|
150
152
|
updateImageSrc(image?.url);
|
|
@@ -543,10 +545,16 @@ export const Viber = (props) => {
|
|
|
543
545
|
<CapLabel type="label3">{formatMessage(messages.btnDesc)}</CapLabel>
|
|
544
546
|
}
|
|
545
547
|
/>
|
|
548
|
+
{templateMediaType === VIBER_MEDIA_TYPES.VIDEO && (
|
|
549
|
+
<CapLabel type="label3">
|
|
550
|
+
{formatMessage(messages.videoButtonDisabled)}
|
|
551
|
+
</CapLabel>
|
|
552
|
+
)}
|
|
546
553
|
<CapRadioGroup
|
|
547
554
|
options={buttonRadioOptions}
|
|
548
555
|
value={buttonType}
|
|
549
556
|
onChange={onChangeButtonType}
|
|
557
|
+
disabled={templateMediaType === VIBER_MEDIA_TYPES.VIDEO}
|
|
550
558
|
className="viber-btn-radio-group"
|
|
551
559
|
/>
|
|
552
560
|
{isBtnTypeCta && ButtonViber}
|
|
@@ -571,6 +579,7 @@ export const Viber = (props) => {
|
|
|
571
579
|
messageData.video.thumbnailUrl = viberVideoPreviewImg;
|
|
572
580
|
messageData.video.duration = duration; // integer value in seconds
|
|
573
581
|
}
|
|
582
|
+
|
|
574
583
|
if (!isEmpty(ctaData)) {
|
|
575
584
|
messageData.button = {};
|
|
576
585
|
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',
|