@capillarytech/creatives-library 7.14.18 → 7.14.20
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
|
}
|
|
@@ -691,6 +691,7 @@ export function SlideBoxContent(props) {
|
|
|
691
691
|
templateData={templateData}
|
|
692
692
|
selectedAccount={selectedAccount}
|
|
693
693
|
handleClose={handleClose}
|
|
694
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
694
695
|
/>
|
|
695
696
|
)
|
|
696
697
|
}
|
|
@@ -708,6 +709,7 @@ export function SlideBoxContent(props) {
|
|
|
708
709
|
onShowTemplates={onShowTemplates}
|
|
709
710
|
createNew
|
|
710
711
|
handleClose={handleClose}
|
|
712
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
711
713
|
/>
|
|
712
714
|
)
|
|
713
715
|
}
|
|
@@ -41,6 +41,7 @@ export const LineText = ({
|
|
|
41
41
|
activeKey,
|
|
42
42
|
Templates,
|
|
43
43
|
getAllTemplates,
|
|
44
|
+
selectedOfferDetails,
|
|
44
45
|
}) => {
|
|
45
46
|
if (activeKey !== 'text') {
|
|
46
47
|
return null;
|
|
@@ -260,6 +261,7 @@ export const LineText = ({
|
|
|
260
261
|
// className={val.className ? val.className : ''}
|
|
261
262
|
id={`${id}_tags`}
|
|
262
263
|
userLocale={localStorage.getItem('jlocale') || 'en'}
|
|
264
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
263
265
|
/>
|
|
264
266
|
</>
|
|
265
267
|
);
|
|
@@ -60,7 +60,7 @@ export const LineContainer = ({
|
|
|
60
60
|
createNew,
|
|
61
61
|
onShowTemplates,
|
|
62
62
|
handleClose,
|
|
63
|
-
|
|
63
|
+
selectedOfferDetails
|
|
64
64
|
}) => {
|
|
65
65
|
const paramObj = params || {};
|
|
66
66
|
const initialWrapperContent = [{ type: TEXT, isError: true, isInit: true }];
|
|
@@ -327,6 +327,7 @@ export const LineContainer = ({
|
|
|
327
327
|
uploadedAssetList={uploadedAssetList}
|
|
328
328
|
deleteUploadedImgList={deleteUploadedImgList}
|
|
329
329
|
updateUploadedAssetList={updateUploadedAssetList}
|
|
330
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
330
331
|
/>
|
|
331
332
|
);
|
|
332
333
|
});
|
|
@@ -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;
|
|
@@ -1071,8 +1072,8 @@ export const Whatsapp = (props) => {
|
|
|
1071
1072
|
if (templateMessage.trim() === '' || templateMessageError) {
|
|
1072
1073
|
return true;
|
|
1073
1074
|
}
|
|
1074
|
-
//if media type is image and
|
|
1075
|
-
if (
|
|
1075
|
+
//if media type is image, video or document and the mediaType file is not uploaded
|
|
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}>
|