@capillarytech/creatives-library 7.5.7 → 7.5.8
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/CapVideoUpload/index.js +5 -0
- package/v2Components/CapVideoUpload/index.scss +4 -1
- package/v2Components/CapVideoUpload/messages.js +4 -0
- package/v2Containers/CapFacebookPreview/index.js +1 -1
- package/v2Containers/Facebook/Advertisement/constant.js +1 -0
- package/v2Containers/Facebook/Advertisement/index.js +17 -12
- package/v2Containers/Facebook/Advertisement/index.scss +18 -4
- package/v2Containers/Templates/index.js +2 -2
package/package.json
CHANGED
|
@@ -274,6 +274,11 @@ function CapVideoUpload(props) {
|
|
|
274
274
|
<CapHeading.CapHeadingSpan type="h6" className="video-description">
|
|
275
275
|
<FormattedMessage {...messages.videoRatioDescription} />
|
|
276
276
|
|
|
277
|
+
</CapHeading.CapHeadingSpan>
|
|
278
|
+
{' '}
|
|
279
|
+
<CapHeading.CapHeadingSpan type="h6" className="video-description file-format">
|
|
280
|
+
<FormattedMessage {...messages.fileFormat} />
|
|
281
|
+
|
|
277
282
|
</CapHeading.CapHeadingSpan>
|
|
278
283
|
<CapHeading.CapHeadingSpan type="h6" className="video-description video-details">
|
|
279
284
|
<FormattedMessage {...messages.videoSizeDescription} values={{size: bytes2Size(videoSize)}} />
|
|
@@ -52,6 +52,7 @@ import {
|
|
|
52
52
|
VIDEO,
|
|
53
53
|
CAROUSEL,
|
|
54
54
|
IMAGE_VIDEO,
|
|
55
|
+
NO_CALL_TO_ACTION,
|
|
55
56
|
} from './constant';
|
|
56
57
|
|
|
57
58
|
export const Advertisement = (props) => {
|
|
@@ -105,7 +106,7 @@ export const Advertisement = (props) => {
|
|
|
105
106
|
const [primaryText, setPrimaryText] = useState('');
|
|
106
107
|
const [pageId, setPageId] = useState(false);
|
|
107
108
|
const [displayLink, setDisplayLink] = useState('');
|
|
108
|
-
const [callToAction, setCallToAction] = useState(
|
|
109
|
+
const [callToAction, setCallToAction] = useState(NO_CALL_TO_ACTION);
|
|
109
110
|
const [callToActionError, setCallToActionError] = useState(false);
|
|
110
111
|
const [messageTitle, updateMessageTitle] = useState('');
|
|
111
112
|
const [step, updateStep] = useState('modeSelection');
|
|
@@ -428,6 +429,7 @@ export const Advertisement = (props) => {
|
|
|
428
429
|
flag = true;
|
|
429
430
|
return flag;
|
|
430
431
|
}
|
|
432
|
+
const subTypes = [];
|
|
431
433
|
carouselData.forEach((obj) => {
|
|
432
434
|
const {
|
|
433
435
|
webSiteLink,
|
|
@@ -444,17 +446,19 @@ export const Advertisement = (props) => {
|
|
|
444
446
|
} else if (Object.keys(videoData).length === 0 && subType === VIDEO) {
|
|
445
447
|
flag = true;
|
|
446
448
|
}
|
|
447
|
-
|
|
448
|
-
if (callToAction === "NO_CALL_TO_ACTION" && !callToActionError) {
|
|
449
|
-
setCallToActionError(messages.callToActionMandatoryError);
|
|
450
|
-
flag = true;
|
|
451
|
-
} else if (callToAction !== "NO_CALL_TO_ACTION" && callToActionError) {
|
|
452
|
-
setCallToActionError(false);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
449
|
+
subTypes.push(subType);
|
|
455
450
|
});
|
|
456
|
-
if (
|
|
457
|
-
|
|
451
|
+
if (subTypes.includes(VIDEO) ) {
|
|
452
|
+
if (callToAction === NO_CALL_TO_ACTION && !callToActionError) {
|
|
453
|
+
setCallToActionError(messages.callToActionMandatoryError);
|
|
454
|
+
flag = true;
|
|
455
|
+
} else if (callToAction !== NO_CALL_TO_ACTION && callToActionError) {
|
|
456
|
+
setCallToActionError(false);
|
|
457
|
+
flag = false;
|
|
458
|
+
}
|
|
459
|
+
} else if (callToActionError) {
|
|
460
|
+
setCallToActionError(false);
|
|
461
|
+
flag = false;
|
|
458
462
|
}
|
|
459
463
|
return flag;
|
|
460
464
|
}, [
|
|
@@ -547,6 +551,7 @@ export const Advertisement = (props) => {
|
|
|
547
551
|
onChange={onChangePrimaryText}
|
|
548
552
|
defaultValue={primaryText || ''}
|
|
549
553
|
value={primaryText || ''}
|
|
554
|
+
maxLength={125}
|
|
550
555
|
rows={3}
|
|
551
556
|
cols={2}
|
|
552
557
|
placeholder={formatMessage(messages.primaryTextPlaceholder)}
|
|
@@ -856,7 +861,7 @@ export const Advertisement = (props) => {
|
|
|
856
861
|
<div className="cap-header-facebook-ad">
|
|
857
862
|
<CapHeading
|
|
858
863
|
type="h2"
|
|
859
|
-
|
|
864
|
+
className="truncate-text"
|
|
860
865
|
>
|
|
861
866
|
{editNameState ? <CapInput
|
|
862
867
|
type="input"
|
|
@@ -12,6 +12,13 @@ $classPrefix: add-facebook-ad-section;
|
|
|
12
12
|
padding: 0;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
.truncate-text{
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
min-width: 112px;
|
|
20
|
+
max-width: 920px;
|
|
21
|
+
}
|
|
15
22
|
.cap-header-facebook-ad{
|
|
16
23
|
position: fixed;
|
|
17
24
|
top: 27px;
|
|
@@ -29,15 +36,22 @@ $classPrefix: add-facebook-ad-section;
|
|
|
29
36
|
margin-left: 6px;
|
|
30
37
|
}
|
|
31
38
|
}
|
|
32
|
-
.cap-image-upload
|
|
39
|
+
.cap-custom-image-upload{
|
|
33
40
|
.dragger-button.re-upload{
|
|
34
|
-
margin-top:
|
|
35
|
-
top:
|
|
41
|
+
margin-top: 50px;
|
|
42
|
+
top: 0px;
|
|
36
43
|
position: absolute;
|
|
37
|
-
right:
|
|
44
|
+
right: 60px;
|
|
38
45
|
color: $FONT_COLOR_05;
|
|
39
46
|
}
|
|
47
|
+
.cap-image-upload-CAROUSEL{
|
|
48
|
+
.dragger-button.re-upload{
|
|
49
|
+
margin-top: 90px;
|
|
50
|
+
right: 0px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
40
53
|
}
|
|
54
|
+
|
|
41
55
|
.facebook-ad-type-card{
|
|
42
56
|
.ant-card-body {
|
|
43
57
|
display:flex;
|
|
@@ -422,7 +422,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
422
422
|
}
|
|
423
423
|
if (!nextProps.Templates.deleteTemplateInProgress && !isEqual(nextProps.Templates.deleteTemplateInProgress, this.props.Templates.deleteTemplateInProgress) &&
|
|
424
424
|
nextProps.Templates.deleteResponse) {
|
|
425
|
-
const message = `${this.state.channel
|
|
425
|
+
const message = `${this.state.channel} ${this.props.intl.formatMessage(messages['Template deleted successfully'])}`;
|
|
426
426
|
CapNotification.success({key: 'deleteSucess', message});
|
|
427
427
|
this.getAllTemplates({params, resetPage: true});
|
|
428
428
|
}
|
|
@@ -1802,7 +1802,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1802
1802
|
const isMobilePushChannel = channel === MOBILE_PUSH;
|
|
1803
1803
|
const isLineChannel = channel === LINE;
|
|
1804
1804
|
|
|
1805
|
-
|
|
1805
|
+
|
|
1806
1806
|
if ((isWechatChannel || isMobilePushChannel || isLineChannel) && !isEmpty(weCrmAccounts)) {
|
|
1807
1807
|
forEach(weCrmAccounts, (account) => {
|
|
1808
1808
|
if ((isWechatChannel && account.configs && account.configs.is_wecrm_enabled) || isMobilePushChannel || isLineChannel) {
|