@capillarytech/creatives-library 7.10.51 → 7.10.52
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/containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +2 -0
- package/containers/Email/index.js +3 -2
- package/package.json +1 -1
- package/v2Components/TemplatePreview/_templatePreview.scss +17 -9
- package/v2Components/TemplatePreview/index.js +66 -52
- package/v2Components/WhatsappStatusContainer/_whatsappStatusContainer.scss +13 -0
- package/v2Components/WhatsappStatusContainer/index.js +58 -0
- package/v2Containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +2 -0
- package/v2Containers/Cap/messages.js +8 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -6
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -1
- package/v2Containers/CreativesContainer/index.js +18 -1
- package/v2Containers/Email/index.js +3 -1
- package/v2Containers/Templates/_templates.scss +19 -31
- package/v2Containers/Templates/actions.js +10 -16
- package/v2Containers/Templates/index.js +37 -15
- package/v2Containers/Whatsapp/index.js +4 -3
- package/v2Containers/Whatsapp/index.scss +53 -54
- package/v2Containers/Whatsapp/messages.js +0 -8
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +1343 -863
- package/v2Containers/Whatsapp/tests/index.test.js +2 -4
- package/v2Containers/Whatsapp/utils.js +0 -47
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
} from './constants';
|
|
48
48
|
import { DATE_DISPLAY_FORMAT, TIME_DISPLAY_FORMAT } from '../App/constants';
|
|
49
49
|
import messages from './messages';
|
|
50
|
+
import globalMessages from '../Cap/messages'
|
|
50
51
|
import withCreatives from '../../hoc/withCreatives';
|
|
51
52
|
import TemplatePreview from '../../v2Components/TemplatePreview';
|
|
52
53
|
import TagList from '../TagList';
|
|
@@ -540,7 +541,7 @@ export const Whatsapp = (props) => {
|
|
|
540
541
|
<CapHeader
|
|
541
542
|
title={
|
|
542
543
|
<CapHeading type="h4">
|
|
543
|
-
{formatMessage(
|
|
544
|
+
{formatMessage(globalMessages.templateNameLabel)}
|
|
544
545
|
<CapTooltipWithInfo
|
|
545
546
|
infoIconProps={{
|
|
546
547
|
style: { marginLeft: CAP_SPACE_04 },
|
|
@@ -560,7 +561,7 @@ export const Whatsapp = (props) => {
|
|
|
560
561
|
id={`whatsapp_template_name_input`}
|
|
561
562
|
onChange={onTemplateNameChange}
|
|
562
563
|
errorMessage={templateNameError}
|
|
563
|
-
placeholder={formatMessage(
|
|
564
|
+
placeholder={formatMessage(globalMessages.templateNamePlaceholder)}
|
|
564
565
|
defaultValue={templateName || ''}
|
|
565
566
|
value={templateName || ''}
|
|
566
567
|
size="default"
|
|
@@ -842,7 +843,7 @@ export const Whatsapp = (props) => {
|
|
|
842
843
|
|
|
843
844
|
return (
|
|
844
845
|
<CapSpin spinning={spin}>
|
|
845
|
-
<CapRow>
|
|
846
|
+
<CapRow className='cap-whatsapp-creatives'>
|
|
846
847
|
<CapColumn span={14}>
|
|
847
848
|
{isEditFlow ? editModeContent : createModeContent}
|
|
848
849
|
<div className="whatsapp-scroll-div" />
|
|
@@ -1,56 +1,55 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import "~@capillarytech/cap-ui-library/styles/_variables";
|
|
2
2
|
|
|
3
|
-
.whatsapp-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
margin
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
width: 100%;
|
|
3
|
+
.cap-whatsapp-creatives {
|
|
4
|
+
.whatsapp-render-heading {
|
|
5
|
+
margin-top: $CAP_SPACE_16;
|
|
6
|
+
margin-bottom: 6px;
|
|
7
|
+
}
|
|
8
|
+
.whatsapp-template-name-desc {
|
|
9
|
+
margin-bottom: 6px;
|
|
10
|
+
}
|
|
11
|
+
.whatsapp-create-render-unsubscribe-text {
|
|
12
|
+
color: $FONT_COLOR_02;
|
|
13
|
+
margin: $CAP_SPACE_08 0px $CAP_SPACE_08 16px;
|
|
14
|
+
}
|
|
15
|
+
.whatsapp-edit-render-unsubscribe-text {
|
|
16
|
+
color: $FONT_COLOR_02;
|
|
17
|
+
}
|
|
18
|
+
.whatsapp-render-message-length {
|
|
19
|
+
text-align: right;
|
|
20
|
+
}
|
|
21
|
+
.whatsapp-create-template-message-input {
|
|
22
|
+
background-color: $CAP_G10;
|
|
23
|
+
padding-top: $CAP_SPACE_16;
|
|
24
|
+
}
|
|
25
|
+
.whatsapp-template-message-error {
|
|
26
|
+
margin-left: $CAP_SPACE_16;
|
|
27
|
+
margin-right: $CAP_SPACE_16;
|
|
28
|
+
}
|
|
29
|
+
.whatsapp-scroll-div {
|
|
30
|
+
margin-bottom: 250px;
|
|
31
|
+
}
|
|
32
|
+
.whatsapp-edit-alert-margin {
|
|
33
|
+
margin-top: 46px;
|
|
34
|
+
}
|
|
35
|
+
.whatsapp-edit-template-message-input {
|
|
36
|
+
background-color: $CAP_G10;
|
|
37
|
+
padding: 0 $CAP_SPACE_16;
|
|
38
|
+
}
|
|
39
|
+
.whatsapp-edit-template-message-heading {
|
|
40
|
+
margin-top: $CAP_SPACE_16;
|
|
41
|
+
margin-bottom: $CAP_SPACE_08;
|
|
42
|
+
}
|
|
43
|
+
.whatsapp-edit-disabled {
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
opacity: 0.4;
|
|
46
|
+
}
|
|
47
|
+
#whatsapp-create-template-message-input {
|
|
48
|
+
margin-left: $CAP_SPACE_16;
|
|
49
|
+
margin-right: $CAP_SPACE_16;
|
|
50
|
+
width: 95%;
|
|
51
|
+
}
|
|
52
|
+
#select-whatsapp-category {
|
|
53
|
+
width: 100%;
|
|
54
|
+
}
|
|
56
55
|
}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl';
|
|
2
2
|
const prefix = `creatives.containersV2.Whatsapp`;
|
|
3
3
|
export default defineMessages({
|
|
4
|
-
templateNameLabel: {
|
|
5
|
-
id: `${prefix}.templateNameLabel`,
|
|
6
|
-
defaultMessage: 'Template name',
|
|
7
|
-
},
|
|
8
4
|
templateNameDesc: {
|
|
9
5
|
id: `${prefix}.templateNameDesc`,
|
|
10
6
|
defaultMessage:
|
|
11
7
|
'Must be a unique name and can only contain lowercase alphanumeric characters and underscores.',
|
|
12
8
|
},
|
|
13
|
-
templateNamePlaceholder: {
|
|
14
|
-
id: `${prefix}.templateNamePlaceholder`,
|
|
15
|
-
defaultMessage: 'Enter template name',
|
|
16
|
-
},
|
|
17
9
|
templateNameTooltip: {
|
|
18
10
|
id: `${prefix}.templateNameTooltip`,
|
|
19
11
|
defaultMessage: `Tip : Use a name that helps WhatsApp's reviewer understand the purpose of your message, for example "order_delivery" rather than "template_1"`,
|