@capillarytech/creatives-library 7.14.17 → 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 +1 -1
- package/v2Components/CapDocumentUpload/index.js +2 -1
- package/v2Components/CapDocumentUpload/index.scss +1 -1
- package/v2Components/CapVideoUpload/index.js +2 -0
- package/v2Components/CapVideoUpload/index.scss +2 -2
- package/v2Containers/Whatsapp/index.js +5 -2
- package/v2Containers/Whatsapp/index.scss +8 -8
- package/v2Containers/Whatsapp/styles.scss +6 -6
package/package.json
CHANGED
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
CapButton,
|
|
9
9
|
} from '@capillarytech/cap-ui-library';
|
|
10
10
|
import { injectIntl, FormattedMessage} from 'react-intl';
|
|
11
|
-
import
|
|
11
|
+
import get from 'lodash/get';
|
|
12
|
+
import isEmpty from 'lodash/isEmpty';
|
|
12
13
|
import './index.scss';
|
|
13
14
|
import messages from './messages';
|
|
14
15
|
import { convertPdfToImages } from '../WhatsappDocumentPreview/index';
|
|
@@ -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
|
}
|
|
@@ -42,12 +42,12 @@ $classPrefix: cap-custom-video-upload;
|
|
|
42
42
|
.video-panel-wp {
|
|
43
43
|
display: flex;
|
|
44
44
|
justify-content: center;
|
|
45
|
-
margin:
|
|
45
|
+
margin: $CAP_SPACE_04;
|
|
46
46
|
}
|
|
47
47
|
.video-panel-wp {
|
|
48
48
|
display: flex;
|
|
49
49
|
justify-content: center;
|
|
50
|
-
margin:
|
|
50
|
+
margin: $CAP_SPACE_04;
|
|
51
51
|
}
|
|
52
52
|
.video-panel {
|
|
53
53
|
display: flex;
|
|
@@ -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}>
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
|
|
8
8
|
.whatsapp-render-heading {
|
|
9
9
|
margin-top: $CAP_SPACE_16;
|
|
10
|
-
margin-bottom:
|
|
10
|
+
margin-bottom: $CAP_SPACE_06;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.whatsapp-template-name-desc {
|
|
14
|
-
margin-bottom:
|
|
14
|
+
margin-bottom: $CAP_SPACE_06;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.whatsapp-unsubscribe-checkbox {
|
|
18
18
|
.ant-checkbox-inner {
|
|
19
|
-
height:
|
|
20
|
-
width:
|
|
19
|
+
height: $CAP_SPACE_16;
|
|
20
|
+
width: $CAP_SPACE_16;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
|
|
102
102
|
.whatsapp-button-none {
|
|
103
103
|
display: inline-grid;
|
|
104
|
-
margin-top:
|
|
104
|
+
margin-top: $CAP_SPACE_16;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.whatsapp-button-cta {
|
|
108
108
|
display: inline-grid;
|
|
109
|
-
margin-top:
|
|
109
|
+
margin-top: $CAP_SPACE_24;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.whatsapp-button-quick-reply {
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
margin-left: 8px;
|
|
118
118
|
color: $FONT_COLOR_03;
|
|
119
119
|
font-weight: normal;
|
|
120
|
-
font-size:
|
|
120
|
+
font-size: $CAP_SPACE_12;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.whatsapp-media-radio>label.ant-radio-wrapper {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
.cap-custom-video-upload {
|
|
136
|
-
padding-top:
|
|
136
|
+
padding-top: $CAP_SPACE_20;
|
|
137
137
|
.dragger-button.re-upload {
|
|
138
138
|
top: -175px;
|
|
139
139
|
position: relative;
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
background-color: $CAP_G09;
|
|
14
14
|
display: flex;
|
|
15
15
|
.cap-image-v2 {
|
|
16
|
-
margin:
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
16
|
+
margin: $CAP_SPACE_06 $CAP_SPACE_04;
|
|
17
|
+
width: $CAP_SPACE_32;
|
|
18
|
+
height: $CAP_SPACE_32;
|
|
19
19
|
}
|
|
20
20
|
.pdf-info {
|
|
21
|
-
margin:
|
|
21
|
+
margin: $CAP_SPACE_08 $CAP_SPACE_04;
|
|
22
22
|
max-width: 114px;
|
|
23
23
|
.pdf-info-sec {
|
|
24
24
|
color: $CAP_G04;
|
|
25
|
-
font-size:
|
|
25
|
+
font-size: $CAP_SPACE_08;
|
|
26
26
|
font-weight: 400;
|
|
27
|
-
line-height:
|
|
27
|
+
line-height: $CAP_SPACE_12;
|
|
28
28
|
}
|
|
29
29
|
.pdf-name-div {
|
|
30
30
|
display: flex;
|