@capillarytech/creatives-library 7.14.18 → 7.14.19
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
|
@@ -54,6 +54,7 @@ function CapVideoUpload(props) {
|
|
|
54
54
|
videoHeight,
|
|
55
55
|
videoWidth,
|
|
56
56
|
videoId,
|
|
57
|
+
fileHandle = '',
|
|
57
58
|
} = uploadedAssetList;
|
|
58
59
|
|
|
59
60
|
const [isTemplateDrawerRequired, updateTemplateDrawerRequirement] = useState(false);
|
|
@@ -227,6 +228,7 @@ function CapVideoUpload(props) {
|
|
|
227
228
|
videoHeight: metaVideoHeight,
|
|
228
229
|
videoWidth: metaVideoWidth,
|
|
229
230
|
previewUrl,
|
|
231
|
+
fileHandle,
|
|
230
232
|
}
|
|
231
233
|
);
|
|
232
234
|
}
|
|
@@ -160,6 +160,7 @@ export const Whatsapp = (props) => {
|
|
|
160
160
|
const validVarRegex = /{{([1-9]|1[0-9])}}/g;
|
|
161
161
|
|
|
162
162
|
const isBtnTypeCta = buttonType === WHATSAPP_BUTTON_TYPES.CTA;
|
|
163
|
+
const isMediaTypeText = templateMediaType === WHATSAPP_MEDIA_TYPES.TEXT;
|
|
163
164
|
const isMediaTypeImage = templateMediaType === WHATSAPP_MEDIA_TYPES.IMAGE;
|
|
164
165
|
const isMediaTypeVideo = templateMediaType === WHATSAPP_MEDIA_TYPES.VIDEO;
|
|
165
166
|
const isMediaTypeDoc = templateMediaType === WHATSAPP_MEDIA_TYPES.DOCUMENT;
|
|
@@ -1072,7 +1073,7 @@ export const Whatsapp = (props) => {
|
|
|
1072
1073
|
return true;
|
|
1073
1074
|
}
|
|
1074
1075
|
//if media type is image and image is not uploaded
|
|
1075
|
-
if (
|
|
1076
|
+
if ( !isMediaTypeText && karixFileHandle === '') {
|
|
1076
1077
|
return true;
|
|
1077
1078
|
}
|
|
1078
1079
|
//cta
|
|
@@ -1518,7 +1519,9 @@ export const Whatsapp = (props) => {
|
|
|
1518
1519
|
Object.values(varMap).some((inputValue) => inputValue === '') ||
|
|
1519
1520
|
computeTextLength() > TEMPLATE_MESSAGE_MAX_LENGTH ||
|
|
1520
1521
|
(isBtnTypeCta && ctaData.some((btn) => btn?.url?.includes('{{1}}'))) ||
|
|
1521
|
-
(isMediaTypeImage && whatsappImageSrc === '')
|
|
1522
|
+
(isMediaTypeImage && whatsappImageSrc === '') ||
|
|
1523
|
+
(isMediaTypeVideo && whatsappVideoSrcAndPreview?.whatsappVideoSrc === '') ||
|
|
1524
|
+
(isMediaTypeDoc && whatsappDocSource === '');
|
|
1522
1525
|
|
|
1523
1526
|
return (
|
|
1524
1527
|
<CapSpin spinning={spin}>
|