@capillarytech/creatives-library 8.0.329 → 8.0.330
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 -14
- package/package.json +1 -1
- package/services/api.js +0 -17
- package/services/tests/api.test.js +0 -85
- package/utils/commonUtils.js +0 -10
- package/utils/tests/commonUtil.test.js +0 -169
- 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 +53 -87
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +1 -20
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +4 -133
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +34 -145
- package/v2Components/CommonTestAndPreview/actions.js +0 -10
- package/v2Components/CommonTestAndPreview/constants.js +1 -53
- package/v2Components/CommonTestAndPreview/index.js +168 -1006
- package/v2Components/CommonTestAndPreview/messages.js +3 -147
- package/v2Components/CommonTestAndPreview/reducer.js +0 -10
- package/v2Components/CommonTestAndPreview/sagas.js +6 -15
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +286 -328
- 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/SendTestMessage.test.js +24 -65
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
- package/v2Components/CommonTestAndPreview/tests/constants.test.js +1 -31
- package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -168
- package/v2Components/CommonTestAndPreview/tests/reducer.test.js +0 -71
- package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
- package/v2Components/CommonTestAndPreview/tests/selectors.test.js +0 -17
- package/v2Components/FormBuilder/index.js +1 -7
- package/v2Components/TestAndPreviewSlidebox/index.js +1 -8
- package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
- package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
- package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -36
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -10
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -29
- package/v2Containers/CreativesContainer/constants.js +0 -9
- package/v2Containers/CreativesContainer/index.js +93 -286
- package/v2Containers/CreativesContainer/index.scss +1 -51
- 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 +10 -20
- package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
- package/v2Containers/Rcs/constants.js +1 -34
- package/v2Containers/Rcs/index.js +884 -999
- package/v2Containers/Rcs/index.scss +6 -85
- package/v2Containers/Rcs/messages.js +1 -10
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +2453 -41456
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +5 -0
- package/v2Containers/Rcs/tests/index.test.js +38 -41
- package/v2Containers/Rcs/tests/mockData.js +0 -38
- package/v2Containers/Rcs/tests/utils.test.js +1 -379
- package/v2Containers/Rcs/utils.js +10 -358
- package/v2Containers/Sms/Create/index.js +38 -100
- package/v2Containers/SmsTrai/Create/index.js +4 -9
- package/v2Containers/SmsTrai/Edit/constants.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +128 -609
- package/v2Containers/SmsTrai/Edit/messages.js +4 -9
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2600 -4586
- package/v2Containers/SmsWrapper/index.js +8 -37
- package/v2Containers/TagList/index.js +0 -6
- package/v2Containers/Templates/_templates.scss +2 -63
- package/v2Containers/Templates/actions.js +0 -11
- package/v2Containers/Templates/constants.js +0 -2
- package/v2Containers/Templates/index.js +40 -90
- package/v2Containers/Templates/sagas.js +12 -57
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1079 -1043
- package/v2Containers/Templates/tests/sagas.test.js +123 -193
- 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 +4872 -5790
- package/utils/templateVarUtils.js +0 -172
- package/utils/tests/templateVarUtils.test.js +0 -160
- package/v2Components/CommonTestAndPreview/AddTestCustomer.js +0 -42
- package/v2Components/CommonTestAndPreview/CustomerCreationModal.js +0 -155
- package/v2Components/CommonTestAndPreview/ExistingCustomerModal.js +0 -93
- package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
- package/v2Components/CommonTestAndPreview/tests/AddTestCustomer.test.js +0 -66
- package/v2Components/CommonTestAndPreview/tests/CommonTestAndPreview.addTestCustomer.test.js +0 -648
- package/v2Components/CommonTestAndPreview/tests/CustomerCreationModal.test.js +0 -174
- package/v2Components/CommonTestAndPreview/tests/ExistingCustomerModal.test.js +0 -114
- 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 -107
- 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 -261
- package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
- package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
- 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/rcsLibraryHydrationUtils.js +0 -205
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -251
- 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
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
GET_PREFILLED_VALUES_SUCCESS,
|
|
35
35
|
GET_PREFILLED_VALUES_FAILURE,
|
|
36
36
|
} from './constants';
|
|
37
|
-
import { extractPreviewFromLiquidResponse } from '../CommonTestAndPreview/previewApiUtils';
|
|
38
37
|
|
|
39
38
|
// Search Customers Saga
|
|
40
39
|
export function* searchCustomersSaga(action) {
|
|
@@ -81,12 +80,11 @@ export function* updatePreviewSaga(action) {
|
|
|
81
80
|
const customValues = action.payload.resolvedTags;
|
|
82
81
|
|
|
83
82
|
const response = yield call(Api.updateEmailPreview, action.payload);
|
|
84
|
-
|
|
85
|
-
if (previewPayload) {
|
|
83
|
+
if (response?.data) {
|
|
86
84
|
yield put({
|
|
87
85
|
type: UPDATE_PREVIEW_SUCCESS,
|
|
88
86
|
payload: {
|
|
89
|
-
previewData:
|
|
87
|
+
previewData: response.data,
|
|
90
88
|
customValues, // Pass custom values to be preserved
|
|
91
89
|
},
|
|
92
90
|
});
|
|
@@ -223,13 +221,8 @@ export function* createMessageMetaSaga(action) {
|
|
|
223
221
|
export function* getPrefilledValuesSaga(action) {
|
|
224
222
|
try {
|
|
225
223
|
const response = yield call(Api.updateEmailPreview, action.payload);
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
? response.data
|
|
229
|
-
: response;
|
|
230
|
-
const resolvedTagValues = body?.resolvedTagValues;
|
|
231
|
-
if (resolvedTagValues != null) {
|
|
232
|
-
yield put({ type: GET_PREFILLED_VALUES_SUCCESS, payload: { values: resolvedTagValues } });
|
|
224
|
+
if (response?.data) {
|
|
225
|
+
yield put({ type: GET_PREFILLED_VALUES_SUCCESS, payload: { values: response?.data?.resolvedTagValues } });
|
|
233
226
|
} else {
|
|
234
227
|
yield put({ type: GET_PREFILLED_VALUES_FAILURE, payload: { error: response.error || 'Failed to fetch prefilled values' } });
|
|
235
228
|
}
|
|
@@ -136,9 +136,7 @@ describe('TestAndPreviewSlidebox Sagas', () => {
|
|
|
136
136
|
describe('updatePreviewSaga', () => {
|
|
137
137
|
it('should handle successful preview update', () => {
|
|
138
138
|
const mockResponse = {
|
|
139
|
-
data:
|
|
140
|
-
resolvedBody: 'Test Preview Data',
|
|
141
|
-
},
|
|
139
|
+
data: 'Test Preview Data',
|
|
142
140
|
};
|
|
143
141
|
const customValues = { test: 'value' };
|
|
144
142
|
return expectSaga(sagas.updatePreviewSaga, {
|
|
@@ -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';
|
|
@@ -181,8 +179,6 @@ export function SlideBoxContent(props) {
|
|
|
181
179
|
isTestAndPreviewMode,
|
|
182
180
|
onHtmlEditorValidationStateChange,
|
|
183
181
|
} = props;
|
|
184
|
-
const localTemplatesConfig = props.localTemplatesConfig || pick(props, constants.LOCAL_TEMPLATE_CONFIG_KEYS);
|
|
185
|
-
const useLocalTemplates = !!get(localTemplatesConfig, 'useLocalTemplates');
|
|
186
182
|
const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
|
|
187
183
|
const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
|
|
188
184
|
const creativesLocationProps = {
|
|
@@ -402,37 +398,12 @@ export function SlideBoxContent(props) {
|
|
|
402
398
|
}
|
|
403
399
|
case constants.RCS: {
|
|
404
400
|
const template = cloneDeep(templateDataObject);
|
|
405
|
-
const
|
|
406
|
-
const card = get(template, cardPath, {}) || {};
|
|
407
|
-
const {
|
|
408
|
-
description = '',
|
|
409
|
-
media: { mediaUrl = '' } = {},
|
|
410
|
-
title = '',
|
|
411
|
-
mediaType: cardMediaType,
|
|
412
|
-
suggestions = [],
|
|
413
|
-
cardVarMapped: nestedCardVarMapped,
|
|
414
|
-
} = card;
|
|
415
|
-
const rootMirror = templateDataObject?.rcsCardVarMapped;
|
|
416
|
-
const nestedRecord =
|
|
417
|
-
nestedCardVarMapped != null && typeof nestedCardVarMapped === 'object'
|
|
418
|
-
? nestedCardVarMapped
|
|
419
|
-
: {};
|
|
420
|
-
const rootRecord =
|
|
421
|
-
rootMirror != null && typeof rootMirror === 'object' ? rootMirror : {};
|
|
422
|
-
const mergedCardVarMapped = { ...rootRecord, ...nestedRecord };
|
|
423
|
-
const textOnlyCard = isRcsTextOnlyCardMediaType(cardMediaType);
|
|
424
|
-
const { rcsTitle, rcsDesc } = resolveRcsCardPreviewStrings(
|
|
425
|
-
title,
|
|
426
|
-
description,
|
|
427
|
-
mergedCardVarMapped,
|
|
428
|
-
!isFullMode,
|
|
429
|
-
textOnlyCard,
|
|
430
|
-
);
|
|
401
|
+
const { description = "", media: { mediaUrl = "" } = {}, title = "", suggestions = [] } = get(template, 'versions.base.content.RCS.rcsContent.cardContent[0]', {});
|
|
431
402
|
return {
|
|
432
403
|
rcsPreviewContent: {
|
|
433
404
|
rcsImageSrc: mediaUrl,
|
|
434
|
-
rcsTitle,
|
|
435
|
-
rcsDesc,
|
|
405
|
+
rcsTitle: title,
|
|
406
|
+
rcsDesc: description,
|
|
436
407
|
...(suggestions.length > 0 && {
|
|
437
408
|
buttonText: suggestions[0]?.text,
|
|
438
409
|
}),
|
|
@@ -457,7 +428,7 @@ export function SlideBoxContent(props) {
|
|
|
457
428
|
|
|
458
429
|
return (
|
|
459
430
|
<CreativesWrapper>
|
|
460
|
-
{slidBoxContent === 'templates' && (
|
|
431
|
+
{!isFullMode && slidBoxContent === 'templates' && (
|
|
461
432
|
<TemplatesV2
|
|
462
433
|
isFullMode={isFullMode}
|
|
463
434
|
onSelectTemplate={onSelectTemplate}
|
|
@@ -489,7 +460,6 @@ export function SlideBoxContent(props) {
|
|
|
489
460
|
eventContextTags={eventContextTags}
|
|
490
461
|
loyaltyMetaData={loyaltyMetaData}
|
|
491
462
|
isLoyaltyModule={isLoyaltyModule}
|
|
492
|
-
localTemplatesConfig={localTemplatesConfig}
|
|
493
463
|
/>
|
|
494
464
|
)}
|
|
495
465
|
{isPreview && (
|
|
@@ -658,7 +628,6 @@ export function SlideBoxContent(props) {
|
|
|
658
628
|
route={{ name: 'sms' }}
|
|
659
629
|
isCreateSms={isCreateSms}
|
|
660
630
|
isComponent
|
|
661
|
-
templateData={templateData}
|
|
662
631
|
isGetFormData={isGetFormData}
|
|
663
632
|
getFormSubscriptionData={getFormData}
|
|
664
633
|
getLiquidTags={getLiquidTags}
|
|
@@ -1234,7 +1203,6 @@ export function SlideBoxContent(props) {
|
|
|
1234
1203
|
)}
|
|
1235
1204
|
{isCreateRcs && (<Rcs
|
|
1236
1205
|
{...rcsCommonProps}
|
|
1237
|
-
templateData={templateData}
|
|
1238
1206
|
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
1239
1207
|
showTestAndPreviewSlidebox={showTestAndPreviewSlidebox}
|
|
1240
1208
|
handleTestAndPreview={handleTestAndPreview}
|
|
@@ -48,8 +48,6 @@ function SlideBoxFooter(props) {
|
|
|
48
48
|
isAnonymousType = false,
|
|
49
49
|
templateData = {},
|
|
50
50
|
hasPersonalizationTokenError: hasPersonalizationTokenErrorProp = false,
|
|
51
|
-
/** When set (e.g. SMS library create), overrides `creativesTemplatesSave` (“Done”) for the primary button */
|
|
52
|
-
primarySaveButtonMessage,
|
|
53
51
|
} = props;
|
|
54
52
|
// Calculate if buttons should be disabled
|
|
55
53
|
// Only apply validation state checks for EMAIL channel in HTML Editor mode (not BEE/DragDrop)
|
|
@@ -188,9 +186,7 @@ function SlideBoxFooter(props) {
|
|
|
188
186
|
onClick={onSave}
|
|
189
187
|
disabled={isTemplateNameEmpty || fetchingCmsData || shouldDisableButtons || hasPersonalizationTokenError}
|
|
190
188
|
>
|
|
191
|
-
{
|
|
192
|
-
<FormattedMessage {...primarySaveButtonMessage} />
|
|
193
|
-
) : isFullMode ? (
|
|
189
|
+
{isFullMode ? (
|
|
194
190
|
getFullModeSaveBtn(slidBoxContent, isCreatingTemplate)
|
|
195
191
|
) : (
|
|
196
192
|
<FormattedMessage {...messages.creativesTemplatesSave} />
|
|
@@ -266,10 +262,6 @@ SlideBoxFooter.propTypes = {
|
|
|
266
262
|
templateData: PropTypes.object,
|
|
267
263
|
formData: PropTypes.array,
|
|
268
264
|
hasPersonalizationTokenError: PropTypes.bool,
|
|
269
|
-
primarySaveButtonMessage: PropTypes.shape({
|
|
270
|
-
id: PropTypes.string,
|
|
271
|
-
defaultMessage: PropTypes.string,
|
|
272
|
-
}),
|
|
273
265
|
};
|
|
274
266
|
|
|
275
267
|
SlideBoxFooter.defaultProps = {
|
|
@@ -297,6 +289,5 @@ SlideBoxFooter.defaultProps = {
|
|
|
297
289
|
selectedEmailCreateMode: '',
|
|
298
290
|
formData: [],
|
|
299
291
|
hasPersonalizationTokenError: false,
|
|
300
|
-
primarySaveButtonMessage: undefined,
|
|
301
292
|
};
|
|
302
293
|
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
|
-
];
|