@capillarytech/creatives-library 8.0.345-alpha.12 → 8.0.345-alpha.13
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/constants/unified.js +0 -29
- package/package.json +1 -1
- package/services/api.js +20 -0
- package/services/tests/api.test.js +59 -13
- package/utils/commonUtils.js +1 -19
- package/v2Components/CapActionButton/constants.js +0 -7
- package/v2Components/CapActionButton/index.js +109 -167
- package/v2Components/CapActionButton/index.scss +6 -157
- package/v2Components/CapActionButton/messages.js +3 -19
- package/v2Components/CapActionButton/tests/index.test.js +17 -41
- package/v2Components/CapCustomSkeleton/index.js +1 -1
- package/v2Components/CapCustomSkeleton/tests/__snapshots__/index.test.js.snap +12 -12
- package/v2Components/CapTagList/index.js +0 -10
- package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +49 -70
- package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
- package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -207
- package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
- package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +10 -85
- package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
- package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -79
- package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +15 -160
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +76 -341
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +4 -133
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
- package/v2Components/CommonTestAndPreview/constants.js +2 -38
- package/v2Components/CommonTestAndPreview/index.js +186 -676
- package/v2Components/CommonTestAndPreview/messages.js +3 -49
- package/v2Components/CommonTestAndPreview/sagas.js +6 -15
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +284 -308
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +65 -231
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +5 -118
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +0 -341
- package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +1 -8
- package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +13 -34
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +283 -281
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
- package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -132
- package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
- package/v2Components/FormBuilder/index.js +10 -8
- package/v2Components/TemplatePreview/_templatePreview.scss +23 -33
- package/v2Components/TemplatePreview/index.js +28 -143
- package/v2Components/TemplatePreview/tests/index.test.js +0 -142
- package/v2Components/TestAndPreviewSlidebox/index.js +1 -13
- package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
- package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
- package/v2Containers/Assets/images/archive_Empty_Illustration.svg +9 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -36
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +4 -11
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -29
- package/v2Containers/CreativesContainer/constants.js +0 -9
- package/v2Containers/CreativesContainer/index.js +108 -300
- package/v2Containers/CreativesContainer/index.scss +1 -51
- package/v2Containers/CreativesContainer/messages.js +4 -0
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -78
- package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +16 -79
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -8
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +98 -357
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +18 -20
- package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
- package/v2Containers/Rcs/constants.js +8 -119
- package/v2Containers/Rcs/index.js +812 -2375
- package/v2Containers/Rcs/index.scss +6 -276
- package/v2Containers/Rcs/messages.js +3 -38
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +70345 -98302
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +5 -0
- package/v2Containers/Rcs/tests/index.test.js +121 -152
- package/v2Containers/Rcs/tests/mockData.js +0 -38
- package/v2Containers/Rcs/tests/utils.test.js +30 -646
- package/v2Containers/Rcs/utils.js +11 -478
- package/v2Containers/Sms/Create/index.js +40 -100
- package/v2Containers/SmsTrai/Create/index.js +4 -9
- package/v2Containers/SmsTrai/Edit/constants.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +130 -636
- package/v2Containers/SmsTrai/Edit/messages.js +4 -14
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2296 -4249
- package/v2Containers/SmsWrapper/index.js +8 -37
- package/v2Containers/TagList/index.js +0 -6
- package/v2Containers/Templates/ChannelTypeIllustration.js +23 -6
- package/v2Containers/Templates/_templates.scss +126 -181
- package/v2Containers/Templates/actions.js +36 -11
- package/v2Containers/Templates/constants.js +23 -2
- package/v2Containers/Templates/index.js +333 -142
- package/v2Containers/Templates/messages.js +68 -0
- package/v2Containers/Templates/reducer.js +68 -0
- package/v2Containers/Templates/sagas.js +98 -55
- package/v2Containers/Templates/selectors.js +12 -0
- package/v2Containers/Templates/tests/ChannelTypeIllustration.test.js +12 -0
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1256 -1042
- package/v2Containers/Templates/tests/index.test.js +6 -0
- package/v2Containers/Templates/tests/reducer.test.js +178 -0
- package/v2Containers/Templates/tests/sagas.test.js +436 -200
- package/v2Containers/Templates/tests/selector.test.js +32 -0
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +1 -72
- package/v2Containers/TemplatesV2/index.js +23 -86
- package/v2Containers/Whatsapp/index.js +20 -3
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34 -578
- package/utils/rcsPayloadUtils.js +0 -92
- package/utils/templateVarUtils.js +0 -201
- package/utils/tests/templateVarUtils.test.js +0 -204
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +0 -18
- package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
- package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
- package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -87
- package/v2Components/SmsFallback/constants.js +0 -73
- package/v2Components/SmsFallback/index.js +0 -955
- package/v2Components/SmsFallback/index.scss +0 -265
- package/v2Components/SmsFallback/messages.js +0 -78
- package/v2Components/SmsFallback/smsFallbackUtils.js +0 -118
- package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +0 -50
- package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +0 -147
- package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +0 -304
- package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +0 -197
- package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -277
- package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
- package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
- package/v2Components/TemplatePreview/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/index.js +0 -125
- package/v2Components/VarSegmentMessageEditor/index.scss +0 -46
- package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +0 -43
- package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -67
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +0 -90
- package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +0 -258
- package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +0 -125
- package/v2Containers/Rcs/index.js.rej +0 -1336
- package/v2Containers/Rcs/index.scss.rej +0 -74
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -225
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +0 -128
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -318
- package/v2Containers/Sms/smsFormDataHelpers.js +0 -67
- package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +0 -253
- package/v2Containers/SmsTrai/Edit/index.scss +0 -121
- package/v2Containers/Templates/TemplatesActionBar.js +0 -101
- package/v2Containers/Templates/tests/TemplatesActionBar.test.js +0 -120
- package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +0 -180
- package/v2Containers/Templates/utils/smsTemplatesListApi.js +0 -79
- package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +0 -131
|
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import get from 'lodash/get';
|
|
5
5
|
import isEmpty from 'lodash/isEmpty';
|
|
6
|
-
import pick from 'lodash/pick';
|
|
7
6
|
import cloneDeep from 'lodash/cloneDeep';
|
|
8
7
|
import TemplatesV2 from '../TemplatesV2';
|
|
9
8
|
import TemplatePreview from '../../v2Components/TemplatePreview';
|
|
@@ -26,7 +25,6 @@ import Viber from '../Viber';
|
|
|
26
25
|
import Whatsapp from '../Whatsapp';
|
|
27
26
|
import InApp from '../InApp';
|
|
28
27
|
import Rcs from '../Rcs';
|
|
29
|
-
import { isRcsTextOnlyCardMediaType, resolveRcsCardPreviewStrings } from '../Rcs/utils';
|
|
30
28
|
import { getWhatsappContent } from '../Whatsapp/utils';
|
|
31
29
|
import * as commonUtil from '../../utils/common';
|
|
32
30
|
import Zalo from '../Zalo';
|
|
@@ -182,8 +180,6 @@ export function SlideBoxContent(props) {
|
|
|
182
180
|
isTestAndPreviewMode,
|
|
183
181
|
onHtmlEditorValidationStateChange,
|
|
184
182
|
} = props;
|
|
185
|
-
const localTemplatesConfig = props.localTemplatesConfig || pick(props, constants.LOCAL_TEMPLATE_CONFIG_KEYS);
|
|
186
|
-
const useLocalTemplates = !!get(localTemplatesConfig, 'useLocalTemplates');
|
|
187
183
|
const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
|
|
188
184
|
const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
|
|
189
185
|
const creativesLocationProps = {
|
|
@@ -403,37 +399,12 @@ export function SlideBoxContent(props) {
|
|
|
403
399
|
}
|
|
404
400
|
case constants.RCS: {
|
|
405
401
|
const template = cloneDeep(templateDataObject);
|
|
406
|
-
const
|
|
407
|
-
const card = get(template, cardPath, {}) || {};
|
|
408
|
-
const {
|
|
409
|
-
description = '',
|
|
410
|
-
media: { mediaUrl = '' } = {},
|
|
411
|
-
title = '',
|
|
412
|
-
mediaType: cardMediaType,
|
|
413
|
-
suggestions = [],
|
|
414
|
-
cardVarMapped: nestedCardVarMapped,
|
|
415
|
-
} = card;
|
|
416
|
-
const rootMirror = templateDataObject?.rcsCardVarMapped;
|
|
417
|
-
const nestedRecord =
|
|
418
|
-
nestedCardVarMapped != null && typeof nestedCardVarMapped === 'object'
|
|
419
|
-
? nestedCardVarMapped
|
|
420
|
-
: {};
|
|
421
|
-
const rootRecord =
|
|
422
|
-
rootMirror != null && typeof rootMirror === 'object' ? rootMirror : {};
|
|
423
|
-
const mergedCardVarMapped = { ...rootRecord, ...nestedRecord };
|
|
424
|
-
const textOnlyCard = isRcsTextOnlyCardMediaType(cardMediaType);
|
|
425
|
-
const { rcsTitle, rcsDesc } = resolveRcsCardPreviewStrings(
|
|
426
|
-
title,
|
|
427
|
-
description,
|
|
428
|
-
mergedCardVarMapped,
|
|
429
|
-
!isFullMode,
|
|
430
|
-
textOnlyCard,
|
|
431
|
-
);
|
|
402
|
+
const { description = "", media: { mediaUrl = "" } = {}, title = "", suggestions = [] } = get(template, 'versions.base.content.RCS.rcsContent.cardContent[0]', {});
|
|
432
403
|
return {
|
|
433
404
|
rcsPreviewContent: {
|
|
434
405
|
rcsImageSrc: mediaUrl,
|
|
435
|
-
rcsTitle,
|
|
436
|
-
rcsDesc,
|
|
406
|
+
rcsTitle: title,
|
|
407
|
+
rcsDesc: description,
|
|
437
408
|
...(suggestions.length > 0 && {
|
|
438
409
|
buttonText: suggestions[0]?.text,
|
|
439
410
|
}),
|
|
@@ -459,7 +430,7 @@ export function SlideBoxContent(props) {
|
|
|
459
430
|
|
|
460
431
|
return (
|
|
461
432
|
<CreativesWrapper>
|
|
462
|
-
{slidBoxContent === 'templates' && (
|
|
433
|
+
{!isFullMode && slidBoxContent === 'templates' && (
|
|
463
434
|
<TemplatesV2
|
|
464
435
|
isFullMode={isFullMode}
|
|
465
436
|
onSelectTemplate={onSelectTemplate}
|
|
@@ -492,7 +463,6 @@ export function SlideBoxContent(props) {
|
|
|
492
463
|
waitEventContextTags={waitEventContextTags}
|
|
493
464
|
loyaltyMetaData={loyaltyMetaData}
|
|
494
465
|
isLoyaltyModule={isLoyaltyModule}
|
|
495
|
-
localTemplatesConfig={localTemplatesConfig}
|
|
496
466
|
/>
|
|
497
467
|
)}
|
|
498
468
|
{isPreview && (
|
|
@@ -663,7 +633,6 @@ export function SlideBoxContent(props) {
|
|
|
663
633
|
route={{ name: 'sms' }}
|
|
664
634
|
isCreateSms={isCreateSms}
|
|
665
635
|
isComponent
|
|
666
|
-
templateData={templateData}
|
|
667
636
|
isGetFormData={isGetFormData}
|
|
668
637
|
getFormSubscriptionData={getFormData}
|
|
669
638
|
getLiquidTags={getLiquidTags}
|
|
@@ -1270,7 +1239,6 @@ export function SlideBoxContent(props) {
|
|
|
1270
1239
|
)}
|
|
1271
1240
|
{isCreateRcs && (<Rcs
|
|
1272
1241
|
{...rcsCommonProps}
|
|
1273
|
-
templateData={templateData}
|
|
1274
1242
|
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
1275
1243
|
showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
|
|
1276
1244
|
handleTestAndPreview={handleTestAndPreview}
|
|
@@ -24,6 +24,7 @@ function SlideBoxFooter(props) {
|
|
|
24
24
|
slidBoxContent,
|
|
25
25
|
onSave,
|
|
26
26
|
onEditTemplate,
|
|
27
|
+
isTemplateArchived,
|
|
27
28
|
onCreateNextStep,
|
|
28
29
|
isFullMode,
|
|
29
30
|
fetchingCmsData,
|
|
@@ -48,8 +49,6 @@ function SlideBoxFooter(props) {
|
|
|
48
49
|
isAnonymousType = false,
|
|
49
50
|
templateData = {},
|
|
50
51
|
hasPersonalizationTokenError: hasPersonalizationTokenErrorProp = false,
|
|
51
|
-
/** When set (e.g. SMS library create), overrides `creativesTemplatesSave` (“Done”) for the primary button */
|
|
52
|
-
primarySaveButtonMessage,
|
|
53
52
|
} = props;
|
|
54
53
|
// Calculate if buttons should be disabled
|
|
55
54
|
// Only apply validation state checks for EMAIL channel in HTML Editor mode (not BEE/DragDrop)
|
|
@@ -188,9 +187,7 @@ function SlideBoxFooter(props) {
|
|
|
188
187
|
onClick={onSave}
|
|
189
188
|
disabled={isTemplateNameEmpty || fetchingCmsData || shouldDisableButtons || hasPersonalizationTokenError}
|
|
190
189
|
>
|
|
191
|
-
{
|
|
192
|
-
<FormattedMessage {...primarySaveButtonMessage} />
|
|
193
|
-
) : isFullMode ? (
|
|
190
|
+
{isFullMode ? (
|
|
194
191
|
getFullModeSaveBtn(slidBoxContent, isCreatingTemplate)
|
|
195
192
|
) : (
|
|
196
193
|
<FormattedMessage {...messages.creativesTemplatesSave} />
|
|
@@ -218,7 +215,7 @@ function SlideBoxFooter(props) {
|
|
|
218
215
|
<FormattedMessage {...(continueButtonLabel || messages.continue)} />
|
|
219
216
|
</CapButton>
|
|
220
217
|
)}
|
|
221
|
-
{slidBoxContent === PREVIEW && (
|
|
218
|
+
{slidBoxContent === PREVIEW && !isTemplateArchived && (
|
|
222
219
|
<CapButton onClick={onEditTemplate} type="secondary">
|
|
223
220
|
<FormattedMessage {...messages.creativesTemplatesEdit} />
|
|
224
221
|
</CapButton>
|
|
@@ -231,6 +228,7 @@ SlideBoxFooter.propTypes = {
|
|
|
231
228
|
slidBoxContent: PropTypes.node,
|
|
232
229
|
onSave: PropTypes.func,
|
|
233
230
|
onEditTemplate: PropTypes.func,
|
|
231
|
+
isTemplateArchived: PropTypes.bool,
|
|
234
232
|
onCreateNextStep: PropTypes.func,
|
|
235
233
|
shouldShowContinueFooter: PropTypes.func,
|
|
236
234
|
shouldShowDoneFooter: PropTypes.func,
|
|
@@ -266,10 +264,6 @@ SlideBoxFooter.propTypes = {
|
|
|
266
264
|
templateData: PropTypes.object,
|
|
267
265
|
formData: PropTypes.array,
|
|
268
266
|
hasPersonalizationTokenError: PropTypes.bool,
|
|
269
|
-
primarySaveButtonMessage: PropTypes.shape({
|
|
270
|
-
id: PropTypes.string,
|
|
271
|
-
defaultMessage: PropTypes.string,
|
|
272
|
-
}),
|
|
273
267
|
};
|
|
274
268
|
|
|
275
269
|
SlideBoxFooter.defaultProps = {
|
|
@@ -297,6 +291,5 @@ SlideBoxFooter.defaultProps = {
|
|
|
297
291
|
selectedEmailCreateMode: '',
|
|
298
292
|
formData: [],
|
|
299
293
|
hasPersonalizationTokenError: false,
|
|
300
|
-
primarySaveButtonMessage: undefined,
|
|
301
294
|
};
|
|
302
295
|
export default SlideBoxFooter;
|
|
@@ -16,7 +16,6 @@ import { isTraiDLTEnable } from '../../utils/common';
|
|
|
16
16
|
import { formatString } from '../../utils/Formatter';
|
|
17
17
|
import {
|
|
18
18
|
CAP_SPACE_12,
|
|
19
|
-
CAP_SPACE_16,
|
|
20
19
|
} from '@capillarytech/cap-ui-library/styled/variables';
|
|
21
20
|
import { WHATSAPP_HELP_DOC_LINK, JOURNEY } from './constants';
|
|
22
21
|
|
|
@@ -25,7 +24,7 @@ const StyledLabel = styled(CapLabelInline)`
|
|
|
25
24
|
margin-right: ${CAP_SPACE_12};
|
|
26
25
|
`;
|
|
27
26
|
const PrefixWrapper = styled.div`
|
|
28
|
-
margin-right:
|
|
27
|
+
margin-right: 16px;
|
|
29
28
|
`;
|
|
30
29
|
const renderData = (type, value, channel) => (
|
|
31
30
|
<StyledLabel className={channel?.toLowerCase() === ZALO ? 'zalo-template-name-spacing' : ''} type={type}>
|
|
@@ -34,25 +33,7 @@ const renderData = (type, value, channel) => (
|
|
|
34
33
|
);
|
|
35
34
|
|
|
36
35
|
export function SlideBoxHeader(props) {
|
|
37
|
-
const {
|
|
38
|
-
slidBoxContent,
|
|
39
|
-
templateData,
|
|
40
|
-
onShowTemplates,
|
|
41
|
-
creativesMode,
|
|
42
|
-
isFullMode,
|
|
43
|
-
showPrefix,
|
|
44
|
-
shouldShowTemplateName,
|
|
45
|
-
channel,
|
|
46
|
-
templateNameRenderProp,
|
|
47
|
-
weChatTemplateType,
|
|
48
|
-
onWeChatMaptemplateStepChange,
|
|
49
|
-
weChatMaptemplateStep,
|
|
50
|
-
templateStep,
|
|
51
|
-
smsRegister,
|
|
52
|
-
handleClose,
|
|
53
|
-
moduleType,
|
|
54
|
-
useLocalTemplates = false,
|
|
55
|
-
} = props;
|
|
36
|
+
const { slidBoxContent, templateData, onShowTemplates, creativesMode, isFullMode, showPrefix, shouldShowTemplateName, channel, templateNameRenderProp, weChatTemplateType, onWeChatMaptemplateStepChange, weChatMaptemplateStep, templateStep, smsRegister, handleClose, moduleType } = props;
|
|
56
37
|
const showTemplateNameHeader = isFullMode && shouldShowTemplateName;
|
|
57
38
|
const mapTemplateCreate = !showTemplateNameHeader && slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
|
|
58
39
|
const isTraiDlt = isTraiDLTEnable(isFullMode, smsRegister);
|
|
@@ -100,9 +81,6 @@ export function SlideBoxHeader(props) {
|
|
|
100
81
|
window.open(WHATSAPP_HELP_DOC_LINK, '_blank');
|
|
101
82
|
};
|
|
102
83
|
|
|
103
|
-
const showCreativesTemplatesBackButton =
|
|
104
|
-
!isFullMode && (moduleType === JOURNEY || useLocalTemplates);
|
|
105
|
-
|
|
106
84
|
return (
|
|
107
85
|
<div key="creatives-container-slidebox-header-content">
|
|
108
86
|
{slidBoxContent === 'templates' && !showTemplateNameHeader && (
|
|
@@ -111,7 +89,7 @@ export function SlideBoxHeader(props) {
|
|
|
111
89
|
description={![NO_COMMUNICATION, FTP].includes(channel) &&
|
|
112
90
|
<FormattedMessage {...messages.creativeTemplatesDesc} />
|
|
113
91
|
}
|
|
114
|
-
prefix={
|
|
92
|
+
prefix={!isFullMode && moduleType === JOURNEY &&
|
|
115
93
|
<PrefixWrapper>
|
|
116
94
|
<CapIcons.backIcon onClick={handleClose} />
|
|
117
95
|
</PrefixWrapper>
|
|
@@ -157,7 +135,7 @@ export function SlideBoxHeader(props) {
|
|
|
157
135
|
}
|
|
158
136
|
</>
|
|
159
137
|
}
|
|
160
|
-
prefix={!isFullMode && showPrefix &&
|
|
138
|
+
prefix={creativesMode !== 'edit' && !isFullMode && showPrefix &&
|
|
161
139
|
<PrefixWrapper>
|
|
162
140
|
<CapIcons.backIcon onClick={onShowTemplates} />
|
|
163
141
|
</PrefixWrapper>
|
|
@@ -213,8 +191,5 @@ SlideBoxHeader.propTypes = {
|
|
|
213
191
|
shouldShowTemplateName: PropTypes.bool,
|
|
214
192
|
templateNameRenderProp: PropTypes.func,
|
|
215
193
|
smsRegister: PropTypes.any,
|
|
216
|
-
handleClose: PropTypes.func,
|
|
217
|
-
moduleType: PropTypes.string,
|
|
218
|
-
useLocalTemplates: PropTypes.bool,
|
|
219
194
|
};
|
|
220
195
|
export default SlideBoxHeader;
|
|
@@ -67,12 +67,3 @@ export const ALLOWED_CHANNELS_FOR_ANONYMOUS = ['mobilepush', 'webpush'];
|
|
|
67
67
|
export const ALL_CHANNELS_NEW = [
|
|
68
68
|
'sms', 'email', 'whatsapp', 'facebook', 'line', 'viber', 'rcs', 'zalo', 'inapp', 'call_task', 'ftp',
|
|
69
69
|
];
|
|
70
|
-
|
|
71
|
-
export const LOCAL_TEMPLATE_CONFIG_KEYS = ['useLocalTemplates', 'localTemplates', 'localTemplatesLoading', 'localTemplatesFilterContent', 'localTemplatesUseSkeleton', 'localTemplatesOnPageChange'];
|
|
72
|
-
|
|
73
|
-
/** Keys passed from parents into `Templates` when using local SMS template list (extends `LOCAL_TEMPLATE_CONFIG_KEYS`). */
|
|
74
|
-
export const LOCAL_TEMPLATE_CONFIG_KEYS_FOR_PICK = [
|
|
75
|
-
...LOCAL_TEMPLATE_CONFIG_KEYS,
|
|
76
|
-
'localTemplatesLoadingTip',
|
|
77
|
-
'localTemplatesFooterContent',
|
|
78
|
-
];
|