@capillarytech/creatives-library 8.0.144 → 8.0.146
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/initialReducer.js +0 -2
- package/package.json +1 -1
- package/services/api.js +0 -5
- package/services/tests/api.test.js +0 -17
- package/v2Components/MobilePushPreviewV2/index.js +2 -10
- package/v2Components/NavigationBar/saga.js +1 -1
- package/v2Components/NavigationBar/tests/saga.test.js +2 -2
- package/v2Components/TemplatePreview/index.js +6 -32
- package/v2Components/TemplatePreview/messages.js +0 -4
- package/v2Components/TestAndPreviewSlidebox/PreviewSection.js +1 -1
- package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +8 -26
- package/v2Containers/CreativesContainer/index.js +14 -68
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +0 -5
- package/v2Containers/Email/index.js +1 -1
- package/v2Containers/InApp/actions.js +0 -7
- package/v2Containers/InApp/constants.js +1 -8
- package/v2Containers/InApp/index.js +53 -76
- package/v2Containers/InApp/reducer.js +0 -17
- package/v2Containers/InApp/sagas.js +0 -27
- package/v2Containers/InApp/selectors.js +1 -23
- package/v2Containers/InApp/tests/index.test.js +9 -0
- package/v2Containers/InApp/tests/reducer.test.js +0 -33
- package/v2Containers/InApp/tests/sagas.test.js +1 -57
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +0 -3
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +0 -2
- package/v2Containers/Line/Container/Text/index.js +6 -6
- package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +0 -2
- package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +0 -9
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +0 -18
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +0 -4
- package/v2Containers/Templates/_templates.scss +0 -3
- package/v2Containers/Templates/index.js +4 -4
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +0 -35
- package/v2Components/TemplatePreview/assets/images/empty_android.svg +0 -8
- package/v2Components/TemplatePreview/assets/images/empty_ios.svg +0 -5
- package/v2Components/TestAndPreviewSlidebox/tests/PreviewSection.test.js +0 -99
- package/v2Containers/BeePopupEditor/constants.js +0 -10
- package/v2Containers/BeePopupEditor/index.js +0 -169
- package/v2Containers/BeePopupEditor/tests/index.test.js +0 -628
- package/v2Containers/InApp/tests/selector.test.js +0 -612
- package/v2Containers/InappAdvanced/index.js +0 -459
- package/v2Containers/InappAdvanced/index.scss +0 -11
- package/v2Containers/InappAdvanced/tests/index.test.js +0 -442
- package/v2Containers/InappWrapper/_inappWrapper.scss +0 -19
- package/v2Containers/InappWrapper/index.js +0 -195
- package/v2Containers/InappWrapper/messages.js +0 -38
- package/v2Containers/InappWrapper/tests/index.test.js +0 -247
package/initialReducer.js
CHANGED
|
@@ -15,7 +15,6 @@ import galleryReducer from './v2Containers/Assets/Gallery/reducer';
|
|
|
15
15
|
import CapCollapsibleLeftNavigationReducer from '@capillarytech/cap-ui-library/CapCollapsibleLeftNavigation/reducer';
|
|
16
16
|
import { AIRA_REDUCER_DOMAIN, askAiraReducer } from '@capillarytech/cap-ui-library/CapAskAira';
|
|
17
17
|
import previewAndTestReducer from './v2Components/TestAndPreviewSlidebox/reducer';
|
|
18
|
-
import inAppReducer from './v2Containers/InApp/reducer';
|
|
19
18
|
|
|
20
19
|
export const initialReducer = {
|
|
21
20
|
language: languageProviderReducer,
|
|
@@ -34,5 +33,4 @@ export const initialReducer = {
|
|
|
34
33
|
gallery: galleryReducer,
|
|
35
34
|
navigationConfig: CapCollapsibleLeftNavigationReducer,
|
|
36
35
|
previewAndTest: previewAndTestReducer,
|
|
37
|
-
inapp: inAppReducer,
|
|
38
36
|
};
|
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -684,9 +684,4 @@ export const updateTestMessageMeta = (payload) => {
|
|
|
684
684
|
return request(url, getAPICallObject('POST', payload?.data, false, true));
|
|
685
685
|
};
|
|
686
686
|
|
|
687
|
-
export const getBeePopupBuilderToken = () => {
|
|
688
|
-
const url = `${API_ENDPOINT}/common/getInappTokenData`;
|
|
689
|
-
return request(url, getAPICallObject('GET'));
|
|
690
|
-
};
|
|
691
|
-
|
|
692
687
|
export {request, getAPICallObject};
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
getBulkCustomerDetails,
|
|
24
24
|
createTestMessageMeta,
|
|
25
25
|
updateTestMessageMeta,
|
|
26
|
-
getBeePopupBuilderToken,
|
|
27
26
|
} from '../api';
|
|
28
27
|
import { mockData } from './mockData';
|
|
29
28
|
import getSchema from '../getSchema';
|
|
@@ -805,19 +804,3 @@ describe('updateTestMessageMeta', () => {
|
|
|
805
804
|
});
|
|
806
805
|
});
|
|
807
806
|
});
|
|
808
|
-
describe('getBeePopupBuilderToken', () => {
|
|
809
|
-
it('should return correct response', async () => {
|
|
810
|
-
global.fetch.mockReturnValue(Promise.resolve({
|
|
811
|
-
status: 200,
|
|
812
|
-
json: () => Promise.resolve({
|
|
813
|
-
status: 200,
|
|
814
|
-
response: 'test',
|
|
815
|
-
}),
|
|
816
|
-
}));
|
|
817
|
-
const result = await getBeePopupBuilderToken();
|
|
818
|
-
expect(result).toEqual({
|
|
819
|
-
status: 200,
|
|
820
|
-
response: 'test',
|
|
821
|
-
});
|
|
822
|
-
});
|
|
823
|
-
});
|
|
@@ -45,14 +45,6 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
|
|
|
45
45
|
if (channel === INAPP.toUpperCase()) {
|
|
46
46
|
const androidContent = get(templateData, 'versions.base.content.ANDROID') || get(templateData, 'androidContent');
|
|
47
47
|
const iosContent = get(templateData, 'versions.base.content.IOS') || get(templateData, 'iosContent');
|
|
48
|
-
const isBeeFreeTemplate = get(androidContent, 'isBEEeditor') || get(iosContent, 'isBEEeditor');
|
|
49
|
-
if (isBeeFreeTemplate) {
|
|
50
|
-
content = {
|
|
51
|
-
inAppPreviewContent: device === ANDROID.toLowerCase() ? androidContent?.beeHtml : iosContent?.beeHtml,
|
|
52
|
-
isBeeFreeTemplate: true,
|
|
53
|
-
};
|
|
54
|
-
return content;
|
|
55
|
-
}
|
|
56
48
|
const androidPreviewContent = {
|
|
57
49
|
templateTitle: androidContent?.title,
|
|
58
50
|
templateMsg: androidContent?.message,
|
|
@@ -87,8 +79,8 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
|
|
|
87
79
|
|
|
88
80
|
if (media?.length > 0) {
|
|
89
81
|
const mediaItem = media[0];
|
|
90
|
-
const { type, url } = mediaItem;
|
|
91
|
-
if (
|
|
82
|
+
const { type: mediaType, url } = mediaItem;
|
|
83
|
+
if (mediaType === VIDEO) {
|
|
92
84
|
// Distinguish between actual video and GIF based on URL extension
|
|
93
85
|
if (url && url?.toLowerCase()?.includes('.gif')) {
|
|
94
86
|
bodyGif = url;
|
|
@@ -11,8 +11,8 @@ describe("analyticsBotSagaFn", () => {
|
|
|
11
11
|
);
|
|
12
12
|
return expectSaga(analyticsBotSagaFn)
|
|
13
13
|
.provide([
|
|
14
|
-
[matchers.call.fn(analyticsBotSaga
|
|
15
|
-
[matchers.call.fn(analyticsBotSaga
|
|
14
|
+
[matchers.call.fn(analyticsBotSaga[0]), undefined],
|
|
15
|
+
[matchers.call.fn(analyticsBotSaga[1]), undefined]
|
|
16
16
|
])
|
|
17
17
|
.run();
|
|
18
18
|
});
|
|
@@ -182,17 +182,17 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
182
182
|
key={`carousel-card-${idx}`}
|
|
183
183
|
className="mobile-push-carousel-card message-pop align-left message-pop-carousel"
|
|
184
184
|
>
|
|
185
|
-
{item?.mediaType === IMAGE
|
|
185
|
+
{item?.mediaType?.toLowerCase() === IMAGE && (item?.imageUrl || item?.url) && (
|
|
186
186
|
<CapImage
|
|
187
|
-
src={item?.imageUrl}
|
|
187
|
+
src={item?.imageUrl || item?.url}
|
|
188
188
|
alt="carousel-img"
|
|
189
189
|
className="carousel-image"
|
|
190
190
|
/>
|
|
191
191
|
)}
|
|
192
|
-
{item?.mediaType === VIDEO
|
|
192
|
+
{item?.mediaType?.toLowerCase() === VIDEO && item?.videoPreviewImg && (
|
|
193
193
|
<CapRow className="video-preview">
|
|
194
194
|
<CapImage
|
|
195
|
-
src={item?.videoPreviewImg}
|
|
195
|
+
src={item?.videoPreviewImg || item?.url}
|
|
196
196
|
alt="carousel-video-preview"
|
|
197
197
|
className="carousel-video-preview"
|
|
198
198
|
/>
|
|
@@ -236,7 +236,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
236
236
|
} = this.props;
|
|
237
237
|
let content = channel && channel.toLowerCase() === 'sms' ? [this.props.content] : this.props.content;
|
|
238
238
|
const { formatMessage } = intl;
|
|
239
|
-
const { rcsPreviewContent, inAppPreviewContent, viberPreviewContent
|
|
239
|
+
const { rcsPreviewContent, inAppPreviewContent, viberPreviewContent } = content || {};
|
|
240
240
|
const { rcsImageSrc, rcsTitle, rcsDesc, buttonText: rcsButtonText } = rcsPreviewContent || {};
|
|
241
241
|
const {
|
|
242
242
|
videoParams,
|
|
@@ -1326,31 +1326,6 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
1326
1326
|
</div>
|
|
1327
1327
|
)}
|
|
1328
1328
|
{channel?.toUpperCase() === INAPP && (
|
|
1329
|
-
isBeeFreeTemplate ? (
|
|
1330
|
-
<div className="shell-v2 align-center">
|
|
1331
|
-
<div style={{ position: 'relative', display: 'inline-block', width: '100%', height: '100%' }}>
|
|
1332
|
-
<CapImage
|
|
1333
|
-
className="preview-image"
|
|
1334
|
-
src={this.props.device === ANDROID ? inAppMobileAndroidFull : inAppMobileIOSFull}
|
|
1335
|
-
alt={formatMessage(messages.previewGenerated)}
|
|
1336
|
-
/>
|
|
1337
|
-
<iframe
|
|
1338
|
-
srcDoc={inAppPreviewContent?.value}
|
|
1339
|
-
title={formatMessage(messages.inappPreview)}
|
|
1340
|
-
style={{
|
|
1341
|
-
position: 'absolute',
|
|
1342
|
-
top: '3rem',
|
|
1343
|
-
left: '5rem',
|
|
1344
|
-
width: '60%',
|
|
1345
|
-
height: '100%',
|
|
1346
|
-
zIndex: 1,
|
|
1347
|
-
pointerEvents: 'none'
|
|
1348
|
-
}}
|
|
1349
|
-
frameBorder="0"
|
|
1350
|
-
/>
|
|
1351
|
-
</div>
|
|
1352
|
-
</div>
|
|
1353
|
-
) : (
|
|
1354
1329
|
<div className="shell-v2 align-center">
|
|
1355
1330
|
<CapImage
|
|
1356
1331
|
className="preview-image"
|
|
@@ -1427,9 +1402,8 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
1427
1402
|
)}
|
|
1428
1403
|
</div>
|
|
1429
1404
|
</div>
|
|
1430
|
-
</div>
|
|
1431
1405
|
</div>
|
|
1432
|
-
|
|
1406
|
+
</div>
|
|
1433
1407
|
)}
|
|
1434
1408
|
</CapRow>
|
|
1435
1409
|
</CapColumn>
|
|
@@ -94,8 +94,4 @@ export default defineMessages({
|
|
|
94
94
|
id: 'creatives.componentsV2.TemplatePreview.videoNotSupported',
|
|
95
95
|
defaultMessage: 'Your browser does not support the video tag.',
|
|
96
96
|
},
|
|
97
|
-
inappPreview: {
|
|
98
|
-
id: 'creatives.componentsV2.TemplatePreview.inappPreview',
|
|
99
|
-
defaultMessage: 'Inapp Preview',
|
|
100
|
-
},
|
|
101
97
|
});
|
|
@@ -15,7 +15,7 @@ const PreviewSection = ({
|
|
|
15
15
|
formatMessage,
|
|
16
16
|
PreviewChrome,
|
|
17
17
|
}) => (
|
|
18
|
-
<CapRow className="preview-section
|
|
18
|
+
<CapRow className="preview-section panel-section">
|
|
19
19
|
<PreviewChrome
|
|
20
20
|
device={previewDevice}
|
|
21
21
|
onDeviceChange={setPreviewDevice}
|
|
@@ -27,7 +27,6 @@ import Rcs from '../Rcs';
|
|
|
27
27
|
import { getWhatsappContent } from '../Whatsapp/utils';
|
|
28
28
|
import * as commonUtil from '../../utils/common';
|
|
29
29
|
import Zalo from '../Zalo';
|
|
30
|
-
import InappWrapper from '../InappWrapper';
|
|
31
30
|
import MobilePushNew from '../MobilePushNew';
|
|
32
31
|
const CreativesWrapper = styled.div`
|
|
33
32
|
.ant-popover,
|
|
@@ -116,8 +115,6 @@ export function SlideBoxContent(props) {
|
|
|
116
115
|
emailCreateMode,
|
|
117
116
|
onMobilepushModeChange,
|
|
118
117
|
mobilePushCreateMode,
|
|
119
|
-
inAppCreateMode,
|
|
120
|
-
onInAppModeChange,
|
|
121
118
|
templateStep,
|
|
122
119
|
onEnterTemplateName,
|
|
123
120
|
onRemoveTemplateName,
|
|
@@ -938,32 +935,25 @@ export function SlideBoxContent(props) {
|
|
|
938
935
|
/>
|
|
939
936
|
)}
|
|
940
937
|
|
|
941
|
-
{isCreateInApp && (<
|
|
942
|
-
key="creatives-inapp-wrapper"
|
|
943
|
-
date={new Date().getMilliseconds()}
|
|
938
|
+
{isCreateInApp && (<InApp
|
|
944
939
|
isFullMode={isFullMode}
|
|
945
940
|
onCreateComplete={onCreateComplete}
|
|
946
941
|
handleClose={handleClose}
|
|
942
|
+
location={{
|
|
943
|
+
pathname: `/inapp/create`,
|
|
944
|
+
query,
|
|
945
|
+
search: '',
|
|
946
|
+
}}
|
|
947
947
|
getFormData={getFormData}
|
|
948
948
|
isGetFormData={isGetFormData}
|
|
949
949
|
templateData={templateData}
|
|
950
950
|
getDefaultTags={type}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
onInAppModeChange={onInAppModeChange}
|
|
954
|
-
onEnterTemplateName={onEnterTemplateName}
|
|
955
|
-
onRemoveTemplateName={onRemoveTemplateName}
|
|
956
|
-
inAppCreateMode={inAppCreateMode}
|
|
957
|
-
forwardedTags={forwardedTags}
|
|
958
|
-
type={type}
|
|
959
|
-
query={query}
|
|
960
|
-
selectedOfferDetails={selectedOfferDetails}
|
|
961
|
-
onValidationFail={onValidationFail}
|
|
951
|
+
eventContextTags={eventContextTags}
|
|
952
|
+
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
962
953
|
/>
|
|
963
954
|
)}
|
|
964
955
|
|
|
965
956
|
{isEditInApp && (<InApp
|
|
966
|
-
isEditInApp={true}
|
|
967
957
|
isFullMode={isFullMode}
|
|
968
958
|
templateData={templateData}
|
|
969
959
|
getFormData={getFormData}
|
|
@@ -981,14 +971,6 @@ export function SlideBoxContent(props) {
|
|
|
981
971
|
search: '',
|
|
982
972
|
}}
|
|
983
973
|
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
984
|
-
setIsLoadingContent={setIsLoadingContent}
|
|
985
|
-
onInAppModeChange={onInAppModeChange}
|
|
986
|
-
inAppCreateMode={inAppCreateMode}
|
|
987
|
-
isGetFormData={isGetFormData}
|
|
988
|
-
showTemplateName={showTemplateName}
|
|
989
|
-
onValidationFail={onValidationFail}
|
|
990
|
-
type={type}
|
|
991
|
-
query={query}
|
|
992
974
|
/>
|
|
993
975
|
)}
|
|
994
976
|
|
|
@@ -363,16 +363,16 @@ export class Creatives extends React.Component {
|
|
|
363
363
|
const iosContent = { ...(templateData?.iosContent || {}) };
|
|
364
364
|
if (androidCarouselMedia?.length) {
|
|
365
365
|
androidContent.expandableDetails.carouselData = androidCarouselMedia.map((media) => ({
|
|
366
|
-
mediaType: media
|
|
367
|
-
imageUrl: media
|
|
366
|
+
mediaType: media?.type,
|
|
367
|
+
imageUrl: media?.url,
|
|
368
368
|
buttons: [],
|
|
369
369
|
videoSrc: '',
|
|
370
370
|
}));
|
|
371
371
|
}
|
|
372
372
|
if (iosCarouselMedia?.length) {
|
|
373
373
|
iosContent.expandableDetails.carouselData = iosCarouselMedia.map((media) => ({
|
|
374
|
-
mediaType: media
|
|
375
|
-
imageUrl: media
|
|
374
|
+
mediaType: media?.type,
|
|
375
|
+
imageUrl: media?.url,
|
|
376
376
|
buttons: [],
|
|
377
377
|
videoSrc: '',
|
|
378
378
|
}));
|
|
@@ -398,22 +398,8 @@ export class Creatives extends React.Component {
|
|
|
398
398
|
versions: {
|
|
399
399
|
base: {
|
|
400
400
|
content: {
|
|
401
|
-
ANDROID: templateData?.androidContent
|
|
402
|
-
|
|
403
|
-
bodyType: templateData?.androidContent?.bodyType,
|
|
404
|
-
deviceType: constants.ANDROID,
|
|
405
|
-
beeHtml: { value: templateData?.androidContent?.message },
|
|
406
|
-
beeJson: templateData?.androidContent?.expandableDetails?.message,
|
|
407
|
-
isBEEeditor: true,
|
|
408
|
-
} : templateData?.androidContent,
|
|
409
|
-
IOS: templateData?.iosContent?.type === 'HTML' ? {
|
|
410
|
-
type: templateData?.iosContent?.type,
|
|
411
|
-
bodyType: templateData?.iosContent?.bodyType,
|
|
412
|
-
deviceType: constants.IOS,
|
|
413
|
-
beeHtml: { value: templateData?.iosContent?.message },
|
|
414
|
-
beeJson: templateData?.iosContent?.expandableDetails?.message,
|
|
415
|
-
isBEEeditor: true,
|
|
416
|
-
} : templateData?.iosContent,
|
|
401
|
+
ANDROID: templateData?.androidContent,
|
|
402
|
+
IOS: templateData?.iosContent,
|
|
417
403
|
},
|
|
418
404
|
},
|
|
419
405
|
},
|
|
@@ -815,24 +801,9 @@ export class Creatives extends React.Component {
|
|
|
815
801
|
if (channel === constants.MOBILE_PUSH && androidContent?.expandableDetails?.carouselData?.length) {
|
|
816
802
|
androidContent.expandableDetails = this.getMobilePushCarouselData({...androidContent?.expandableDetails});
|
|
817
803
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
// replace the TEXT in above line when backend supports HTML
|
|
822
|
-
templateData.androidContent.message = androidContent?.beeHtml?.value || '';
|
|
823
|
-
templateData.androidContent.title = 'bee free template';
|
|
824
|
-
templateData.androidContent.bodyType = androidContent?.bodyType;
|
|
825
|
-
templateData.androidContent.deviceType = constants.ANDROID;
|
|
826
|
-
templateData.androidContent.expandableDetails = {
|
|
827
|
-
style: 'BIG_TEXT',
|
|
828
|
-
// replace the BIG_TEXT in above line when backend supports HTML
|
|
829
|
-
message: androidContent?.beeJson || '',
|
|
830
|
-
};
|
|
831
|
-
} else if (!androidContent?.isBEEeditor) {
|
|
832
|
-
templateData.androidContent = androidContent;
|
|
833
|
-
templateData.androidContent.type = androidContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || constants.TEXT;
|
|
834
|
-
templateData.androidContent.deviceType = constants.ANDROID;
|
|
835
|
-
}
|
|
804
|
+
templateData.androidContent = androidContent;
|
|
805
|
+
templateData.androidContent.type = androidContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || constants.TEXT;
|
|
806
|
+
templateData.androidContent.deviceType = constants.ANDROID;
|
|
836
807
|
}
|
|
837
808
|
const iosContent = channel === constants.INAPP ? get(channelTemplate, 'versions.base.content.IOS') : get(channelTemplate, 'versions.base.IOS');
|
|
838
809
|
if (!isEmpty(iosContent)) {
|
|
@@ -852,24 +823,9 @@ export class Creatives extends React.Component {
|
|
|
852
823
|
if (channel === constants.MOBILE_PUSH && iosContent?.expandableDetails?.carouselData?.length) {
|
|
853
824
|
iosContent.expandableDetails = this.getMobilePushCarouselData({...iosContent?.expandableDetails});
|
|
854
825
|
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
// replace the TEXT in above line when backend supports HTML
|
|
859
|
-
templateData.iosContent.message = iosContent?.beeHtml?.value || '';
|
|
860
|
-
templateData.iosContent.title = 'bee free template';
|
|
861
|
-
templateData.iosContent.bodyType = iosContent?.bodyType;
|
|
862
|
-
templateData.iosContent.deviceType = constants.IOS;
|
|
863
|
-
templateData.iosContent.expandableDetails = {
|
|
864
|
-
style: 'BIG_TEXT',
|
|
865
|
-
// replace the BIG_TEXT in above line when backend supports HTML
|
|
866
|
-
message: iosContent?.beeJson || '',
|
|
867
|
-
};
|
|
868
|
-
} else if (!iosContent?.isBEEeditor) {
|
|
869
|
-
templateData.iosContent = iosContent;
|
|
870
|
-
templateData.iosContent.type = iosContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || 'TEXT';
|
|
871
|
-
templateData.iosContent.deviceType = constants.IOS;
|
|
872
|
-
}
|
|
826
|
+
templateData.iosContent = iosContent;
|
|
827
|
+
templateData.iosContent.type = iosContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || 'TEXT';
|
|
828
|
+
templateData.iosContent.deviceType = constants.IOS;
|
|
873
829
|
}
|
|
874
830
|
templateData.messageSubject = channelTemplate?.name ? channelTemplate?.name : "messageSubject";
|
|
875
831
|
}
|
|
@@ -1311,7 +1267,7 @@ export class Creatives extends React.Component {
|
|
|
1311
1267
|
shouldShowFooter = () => {
|
|
1312
1268
|
const { isFullMode } = this.props;
|
|
1313
1269
|
const {
|
|
1314
|
-
slidBoxContent, currentChannel, emailCreateMode, templateNameExists, templateStep, mobilePushCreateMode, weChatTemplateType, templateData,
|
|
1270
|
+
slidBoxContent, currentChannel, emailCreateMode, templateNameExists, templateStep, mobilePushCreateMode, weChatTemplateType, templateData,
|
|
1315
1271
|
} = this.state;
|
|
1316
1272
|
const channel = currentChannel.toUpperCase();
|
|
1317
1273
|
const currentStep = this.creativesTemplateSteps[templateStep];
|
|
@@ -1354,13 +1310,6 @@ export class Creatives extends React.Component {
|
|
|
1354
1310
|
showFooter = true;
|
|
1355
1311
|
}
|
|
1356
1312
|
|
|
1357
|
-
if (channel === constants.INAPP &&
|
|
1358
|
-
((slidBoxContent === 'createTemplate' && !isEmpty(inAppCreateMode))
|
|
1359
|
-
|| (slidBoxContent === 'editTemplate' && currentStep === 'modeSelection')) &&
|
|
1360
|
-
templateNameExists) {
|
|
1361
|
-
showFooter = true;
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
1313
|
if (showFooter) {
|
|
1365
1314
|
if (slidBoxContent === "createTemplate" && ((channel === constants.EMAIL && currentStep === 'createTemplateContent') ||
|
|
1366
1315
|
([constants.SMS, constants.WECHAT].includes(channel) && currentStep === 'modeSelection'))) {
|
|
@@ -1481,7 +1430,7 @@ export class Creatives extends React.Component {
|
|
|
1481
1430
|
} else if (currentChannel.toUpperCase() === constants.WECHAT) {
|
|
1482
1431
|
isShowContinueFooter = !isEmpty(weChatTemplateType) && currentStep === "modeSelection";
|
|
1483
1432
|
} else if (currentChannel.toUpperCase() === constants.INAPP) {
|
|
1484
|
-
isShowContinueFooter = !isEmpty(inAppCreateMode) &&
|
|
1433
|
+
isShowContinueFooter = !isEmpty(inAppCreateMode) && currentChannel === "modeSelection";
|
|
1485
1434
|
}
|
|
1486
1435
|
|
|
1487
1436
|
return isShowContinueFooter;
|
|
@@ -1518,7 +1467,6 @@ export class Creatives extends React.Component {
|
|
|
1518
1467
|
templateStep,
|
|
1519
1468
|
isLoadingContent,
|
|
1520
1469
|
mobilePushCreateMode,
|
|
1521
|
-
inAppCreateMode,
|
|
1522
1470
|
isDiscardMessage,
|
|
1523
1471
|
weChatTemplateType,
|
|
1524
1472
|
weChatMaptemplateStep,
|
|
@@ -1621,8 +1569,6 @@ export class Creatives extends React.Component {
|
|
|
1621
1569
|
setIsLoadingContent={this.setIsLoadingContent}
|
|
1622
1570
|
onMobilepushModeChange={this.onMobilepushModeChange}
|
|
1623
1571
|
mobilePushCreateMode={mobilePushCreateMode}
|
|
1624
|
-
inAppCreateMode={inAppCreateMode}
|
|
1625
|
-
onInAppModeChange={this.onInAppModeChange}
|
|
1626
1572
|
showTemplateName={this.showTemplateName}
|
|
1627
1573
|
onValidationFail={this.onValidationFail}
|
|
1628
1574
|
channelsToHide={channelsToHide}
|
|
@@ -31,7 +31,6 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
|
|
|
31
31
|
onEnterTemplateName={[Function]}
|
|
32
32
|
onFTPSubmit={[MockFunction]}
|
|
33
33
|
onFacebookSubmit={[MockFunction]}
|
|
34
|
-
onInAppModeChange={[Function]}
|
|
35
34
|
onMobilepushModeChange={[Function]}
|
|
36
35
|
onPreviewTemplate={[Function]}
|
|
37
36
|
onRemoveTemplateName={[Function]}
|
|
@@ -117,7 +116,6 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
|
|
|
117
116
|
onEnterTemplateName={[Function]}
|
|
118
117
|
onFTPSubmit={[MockFunction]}
|
|
119
118
|
onFacebookSubmit={[MockFunction]}
|
|
120
|
-
onInAppModeChange={[Function]}
|
|
121
119
|
onMobilepushModeChange={[Function]}
|
|
122
120
|
onPreviewTemplate={[Function]}
|
|
123
121
|
onRemoveTemplateName={[Function]}
|
|
@@ -203,7 +201,6 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
|
|
|
203
201
|
onEnterTemplateName={[Function]}
|
|
204
202
|
onFTPSubmit={[MockFunction]}
|
|
205
203
|
onFacebookSubmit={[MockFunction]}
|
|
206
|
-
onInAppModeChange={[Function]}
|
|
207
204
|
onMobilepushModeChange={[Function]}
|
|
208
205
|
onPreviewTemplate={[Function]}
|
|
209
206
|
onRemoveTemplateName={[Function]}
|
|
@@ -301,7 +298,6 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
|
|
|
301
298
|
onEnterTemplateName={[Function]}
|
|
302
299
|
onFTPSubmit={[MockFunction]}
|
|
303
300
|
onFacebookSubmit={[MockFunction]}
|
|
304
|
-
onInAppModeChange={[Function]}
|
|
305
301
|
onMobilepushModeChange={[Function]}
|
|
306
302
|
onPreviewTemplate={[Function]}
|
|
307
303
|
onRemoveTemplateName={[Function]}
|
|
@@ -399,7 +395,6 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
|
|
|
399
395
|
onEnterTemplateName={[Function]}
|
|
400
396
|
onFTPSubmit={[MockFunction]}
|
|
401
397
|
onFacebookSubmit={[MockFunction]}
|
|
402
|
-
onInAppModeChange={[Function]}
|
|
403
398
|
onMobilepushModeChange={[Function]}
|
|
404
399
|
onPreviewTemplate={[Function]}
|
|
405
400
|
onRemoveTemplateName={[Function]}
|
|
@@ -2709,7 +2709,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2709
2709
|
return (
|
|
2710
2710
|
<div className="email-container">
|
|
2711
2711
|
<CapSpin spinning={isLoading}>
|
|
2712
|
-
{
|
|
2712
|
+
{ showTestAndPreview &&
|
|
2713
2713
|
<div className="test-and-preview-container">
|
|
2714
2714
|
{this.showTestAndPreviewIcons('PREVIEW')}
|
|
2715
2715
|
{this.showTestAndPreviewIcons('TEST')}
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
UPLOAD_INAPP_ASSET_REQUEST,
|
|
8
8
|
CLEAR_INAPP_ASSET,
|
|
9
9
|
INAPP_EDIT_TEMPLATE_REQUEST,
|
|
10
|
-
GET_BEE_POPUP_BUILDER_TOKEN_REQUEST,
|
|
11
10
|
} from "./constants";
|
|
12
11
|
|
|
13
12
|
export function createInAppTemplate(payload, callback) {
|
|
@@ -63,9 +62,3 @@ export const clearInAppAsset = (templateType) => ({
|
|
|
63
62
|
type: CLEAR_INAPP_ASSET,
|
|
64
63
|
templateType,
|
|
65
64
|
});
|
|
66
|
-
|
|
67
|
-
export function getBeePopupBuilderToken() {
|
|
68
|
-
return {
|
|
69
|
-
type: GET_BEE_POPUP_BUILDER_TOKEN_REQUEST,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
@@ -34,10 +34,6 @@ export const UPLOAD_INAPP_ASSET_SUCCESS = `${prefix}/UPLOAD_INAPP_ASSET_SUCCESS`
|
|
|
34
34
|
export const UPLOAD_INAPP_ASSET_FAILURE = `${prefix}/UPLOAD_INAPP_ASSET_FAILURE`;
|
|
35
35
|
export const CLEAR_INAPP_ASSET = `${prefix}/CLEAR_INAPP_ASSET`;
|
|
36
36
|
|
|
37
|
-
export const GET_BEE_POPUP_BUILDER_TOKEN_REQUEST = `${prefix}/GET_BEE_POPUP_BUILDER_TOKEN_REQUEST`;
|
|
38
|
-
export const GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS = `${prefix}/GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS`;
|
|
39
|
-
export const GET_BEE_POPUP_BUILDER_TOKEN_FAILURE = `${prefix}/GET_BEE_POPUP_BUILDER_TOKEN_FAILURE`;
|
|
40
|
-
|
|
41
37
|
export const INAPP_MEDIA_TYPES = {
|
|
42
38
|
TEXT: "TEXT",
|
|
43
39
|
IMAGE: "IMAGE",
|
|
@@ -163,7 +159,4 @@ export const INAPP_LAYOUT_DETAILS = {
|
|
|
163
159
|
};
|
|
164
160
|
|
|
165
161
|
export const DEVICE_SUPPORTED = '1';
|
|
166
|
-
export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
|
|
167
|
-
export const MODE_SELECTION = "modeSelection";
|
|
168
|
-
export const BASIC_EDITOR = "basicEditor";
|
|
169
|
-
export const BEE_EDITOR = "beeEditor";
|
|
162
|
+
export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
|