@capillarytech/creatives-library 7.12.16 → 7.12.17
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/CapImageUpload/index.js +3 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -0
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +11 -10
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +1 -0
- package/v2Containers/Rcs/index.js +1 -0
- package/v2Containers/Whatsapp/index.js +2 -0
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +0 -1024
package/package.json
CHANGED
|
@@ -40,6 +40,7 @@ function CapImageUpload(props) {
|
|
|
40
40
|
className,
|
|
41
41
|
imageData,
|
|
42
42
|
channel,
|
|
43
|
+
channelSpecificStyle,
|
|
43
44
|
} = props;
|
|
44
45
|
const {
|
|
45
46
|
formatMessage,
|
|
@@ -205,6 +206,7 @@ function CapImageUpload(props) {
|
|
|
205
206
|
className="dragger-button re-upload"
|
|
206
207
|
type="flat"
|
|
207
208
|
onClick={onReUpload}
|
|
209
|
+
style={ channelSpecificStyle ? { marginTop:'-16px'} : {}}
|
|
208
210
|
>
|
|
209
211
|
<FormattedMessage {...messages.imageReUpload} />
|
|
210
212
|
</CapButton>
|
|
@@ -274,6 +276,7 @@ CapImageUpload.propTypes = {
|
|
|
274
276
|
imageData: PropTypes.object,
|
|
275
277
|
index: PropTypes.number,
|
|
276
278
|
channel: PropTypes.string,
|
|
279
|
+
channelSpecificStyle: PropTypes.bool,
|
|
277
280
|
};
|
|
278
281
|
|
|
279
282
|
export default injectIntl(CapImageUpload);
|
|
@@ -25,7 +25,7 @@ const StyledLabel = styled(CapLabelInline)`
|
|
|
25
25
|
const PrefixWrapper = styled.div`
|
|
26
26
|
margin-right: 16px;
|
|
27
27
|
`;
|
|
28
|
-
const
|
|
28
|
+
const renderData = (type, value) => (
|
|
29
29
|
<StyledLabel type={type}>
|
|
30
30
|
{value}
|
|
31
31
|
</StyledLabel>
|
|
@@ -37,7 +37,6 @@ export function SlideBoxHeader(props) {
|
|
|
37
37
|
const mapTemplateCreate = !showTemplateNameHeader && slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
|
|
38
38
|
const isTraiDlt = isTraiDLTEnable(isFullMode, smsRegister);
|
|
39
39
|
const showCreateTraiSMSHeader = isTraiDlt && channel.toLowerCase() === "sms";
|
|
40
|
-
const showTemplateName = [WHATSAPP, RCS].includes(channel.toLowerCase()) & slidBoxContent === 'editTemplate' & !isFullMode;
|
|
41
40
|
const isWhatsappEdit = channel.toLowerCase() === WHATSAPP && slidBoxContent === 'editTemplate';
|
|
42
41
|
const isWhatsappCreate = channel.toLowerCase() === WHATSAPP && slidBoxContent === 'createTemplate';
|
|
43
42
|
const whatsappOverview = isWhatsappEdit && isFullMode;
|
|
@@ -48,6 +47,8 @@ export function SlideBoxHeader(props) {
|
|
|
48
47
|
whatsappTemplateLanguageCode,
|
|
49
48
|
} = templateData || {};
|
|
50
49
|
const templateName = whatsappTemplateName || templateData?.name;
|
|
50
|
+
const showRcsTemplateName = channel.toLowerCase() === RCS && slidBoxContent === 'editTemplate' && !isFullMode && templateName;
|
|
51
|
+
const showTemplateName = isWhatsappEdit || showRcsTemplateName;
|
|
51
52
|
const whatsappCategory = whatsappTemplateCategory || get(templateData, `versions.base.content.whatsapp.category`, '');
|
|
52
53
|
const whatsappLanguageCode = whatsappTemplateLanguageCode || get(templateData, `versions.base.content.whatsapp.languages[0].language`, '');
|
|
53
54
|
|
|
@@ -100,18 +101,18 @@ export function SlideBoxHeader(props) {
|
|
|
100
101
|
<>
|
|
101
102
|
{showTemplateName ? (
|
|
102
103
|
<>
|
|
103
|
-
{
|
|
104
|
-
{
|
|
104
|
+
{renderData("label1", <FormattedMessage {...globalMessages.templateNameLabel} />)}
|
|
105
|
+
{renderData("label2", templateName)}
|
|
105
106
|
</>
|
|
106
107
|
) : ""}
|
|
107
108
|
{isWhatsappEdit && (
|
|
108
109
|
<>
|
|
109
|
-
{
|
|
110
|
-
{
|
|
111
|
-
{
|
|
112
|
-
{
|
|
113
|
-
{
|
|
114
|
-
{
|
|
110
|
+
{renderData("label3", <FormattedMessage {...whatsppMsg.labelSeperator} />)}
|
|
111
|
+
{renderData("label1", <FormattedMessage {...whatsppMsg.templateCategoryLabel} />)}
|
|
112
|
+
{renderData("label2", formatString(whatsappCategory))}
|
|
113
|
+
{renderData("label3", <FormattedMessage {...whatsppMsg.labelSeperator} />)}
|
|
114
|
+
{renderData("label1", <FormattedMessage {...whatsppMsg.languageLabel} />)}
|
|
115
|
+
{renderData("label2", LANGUAGE_OPTIONS?.find((option) => option.value === whatsappLanguageCode)?.label)}
|
|
115
116
|
</>)
|
|
116
117
|
}
|
|
117
118
|
</>
|
|
@@ -181,6 +181,7 @@ exports[`Test SlideBoxContent container Should render correct component for what
|
|
|
181
181
|
"type": "WHATSAPP",
|
|
182
182
|
"validity": true,
|
|
183
183
|
"whatsappTemplateCategory": "ALERT_UPDATE",
|
|
184
|
+
"whatsappTemplateLanguageCode": "en",
|
|
184
185
|
"whatsappTemplateName": "amit123456",
|
|
185
186
|
}
|
|
186
187
|
}
|
|
@@ -82,6 +82,7 @@ export const Whatsapp = (props) => {
|
|
|
82
82
|
injectedTags,
|
|
83
83
|
loadingTags,
|
|
84
84
|
getFormData,
|
|
85
|
+
selectedOfferDetails,
|
|
85
86
|
} = props || {};
|
|
86
87
|
const { formatMessage } = intl;
|
|
87
88
|
const { TextArea } = CapInput;
|
|
@@ -903,6 +904,7 @@ export const Whatsapp = (props) => {
|
|
|
903
904
|
tags={tags || []}
|
|
904
905
|
onContextChange={handleOnTagsContextChange}
|
|
905
906
|
injectedTags={injectedTags || {}}
|
|
907
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
906
908
|
/>
|
|
907
909
|
)
|
|
908
910
|
}
|