@capillarytech/creatives-library 8.0.125-alpha.6 → 8.0.126

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.
Files changed (105) hide show
  1. package/config/app.js +6 -0
  2. package/containers/App/constants.js +0 -1
  3. package/containers/Email/index.js +5 -5
  4. package/containers/WeChat/RichmediaTemplates/Create/index.js +1 -1
  5. package/initialReducer.js +2 -0
  6. package/package.json +1 -1
  7. package/services/api.js +94 -1
  8. package/services/tests/api.test.js +191 -0
  9. package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +3 -8
  10. package/tests/integration/TemplateCreation/api-response.js +0 -5
  11. package/tests/integration/TemplateCreation/msw-handler.js +63 -42
  12. package/utils/common.js +0 -7
  13. package/utils/commonUtils.js +6 -2
  14. package/v2Components/CapImageUpload/index.js +45 -51
  15. package/v2Components/CapInAppCTA/index.js +0 -1
  16. package/v2Components/CapTagList/index.js +120 -177
  17. package/v2Components/CapVideoUpload/constants.js +0 -3
  18. package/v2Components/CapVideoUpload/index.js +110 -167
  19. package/v2Components/CapVideoUpload/messages.js +0 -16
  20. package/v2Components/Carousel/index.js +13 -15
  21. package/v2Components/CustomerSearchSection/_customerSearch.scss +309 -0
  22. package/v2Components/CustomerSearchSection/constants.js +5 -0
  23. package/v2Components/CustomerSearchSection/index.js +362 -0
  24. package/v2Components/CustomerSearchSection/messages.js +20 -0
  25. package/v2Components/CustomerSearchSection/tests/utils.test.js +334 -0
  26. package/v2Components/CustomerSearchSection/utils.js +49 -0
  27. package/v2Components/ErrorInfoNote/style.scss +0 -1
  28. package/v2Components/MobilePushPreviewV2/index.js +5 -37
  29. package/v2Components/TemplatePreview/_templatePreview.scss +72 -114
  30. package/v2Components/TemplatePreview/index.js +50 -178
  31. package/v2Components/TemplatePreview/messages.js +0 -4
  32. package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +543 -0
  33. package/v2Components/TestAndPreviewSlidebox/actions.js +67 -0
  34. package/v2Components/TestAndPreviewSlidebox/constants.js +67 -0
  35. package/v2Components/TestAndPreviewSlidebox/index.js +771 -0
  36. package/v2Components/TestAndPreviewSlidebox/messages.js +147 -0
  37. package/v2Components/TestAndPreviewSlidebox/reducer.js +233 -0
  38. package/v2Components/TestAndPreviewSlidebox/sagas.js +258 -0
  39. package/v2Components/TestAndPreviewSlidebox/selectors.js +142 -0
  40. package/v2Components/TestAndPreviewSlidebox/tests/actions.test.js +80 -0
  41. package/v2Components/TestAndPreviewSlidebox/tests/reducer.test.js +367 -0
  42. package/v2Components/TestAndPreviewSlidebox/tests/saga.rtl.test.js +192 -0
  43. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +652 -0
  44. package/v2Components/TestAndPreviewSlidebox/tests/selector.test.js +182 -0
  45. package/v2Containers/CreativesContainer/SlideBoxContent.js +21 -9
  46. package/v2Containers/CreativesContainer/SlideBoxFooter.js +23 -2
  47. package/v2Containers/CreativesContainer/index.js +160 -195
  48. package/v2Containers/CreativesContainer/messages.js +4 -0
  49. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +21 -0
  50. package/v2Containers/Email/index.js +18 -6
  51. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +10 -0
  52. package/v2Containers/EmailWrapper/index.js +6 -0
  53. package/v2Containers/InApp/constants.js +0 -1
  54. package/v2Containers/InApp/index.js +13 -13
  55. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
  56. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
  57. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -0
  58. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -0
  59. package/v2Containers/MobilePush/Create/index.js +0 -1
  60. package/v2Containers/MobilePush/commonMethods.js +14 -7
  61. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +23 -5
  62. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -0
  63. package/v2Containers/TagList/index.js +10 -56
  64. package/v2Containers/Templates/_templates.scss +1 -101
  65. package/v2Containers/Templates/index.js +35 -147
  66. package/v2Containers/Templates/messages.js +0 -8
  67. package/v2Containers/Templates/sagas.js +0 -2
  68. package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +1 -1
  69. package/v2Containers/Whatsapp/constants.js +0 -1
  70. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -0
  71. package/utils/createPayload.js +0 -270
  72. package/utils/tests/createPayload.test.js +0 -761
  73. package/v2Components/CapMpushCTA/constants.js +0 -25
  74. package/v2Components/CapMpushCTA/index.js +0 -332
  75. package/v2Components/CapMpushCTA/index.scss +0 -95
  76. package/v2Components/CapMpushCTA/messages.js +0 -89
  77. package/v2Components/TemplatePreview/assets/images/Android _ With date and time.svg +0 -29
  78. package/v2Components/TemplatePreview/assets/images/android.svg +0 -9
  79. package/v2Components/TemplatePreview/assets/images/iOS _ With date and time.svg +0 -26
  80. package/v2Components/TemplatePreview/assets/images/ios.svg +0 -9
  81. package/v2Containers/Email/tests/index.test.js +0 -35
  82. package/v2Containers/MobilePushNew/actions.js +0 -116
  83. package/v2Containers/MobilePushNew/components/CtaButtons.js +0 -170
  84. package/v2Containers/MobilePushNew/components/MediaUploaders.js +0 -686
  85. package/v2Containers/MobilePushNew/components/PlatformContentFields.js +0 -279
  86. package/v2Containers/MobilePushNew/components/index.js +0 -5
  87. package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +0 -779
  88. package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +0 -2114
  89. package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +0 -343
  90. package/v2Containers/MobilePushNew/constants.js +0 -115
  91. package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +0 -1299
  92. package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +0 -1223
  93. package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +0 -246
  94. package/v2Containers/MobilePushNew/hooks/useUpload.js +0 -709
  95. package/v2Containers/MobilePushNew/index.js +0 -2170
  96. package/v2Containers/MobilePushNew/index.scss +0 -308
  97. package/v2Containers/MobilePushNew/messages.js +0 -226
  98. package/v2Containers/MobilePushNew/reducer.js +0 -160
  99. package/v2Containers/MobilePushNew/sagas.js +0 -198
  100. package/v2Containers/MobilePushNew/selectors.js +0 -55
  101. package/v2Containers/MobilePushNew/tests/reducer.test.js +0 -741
  102. package/v2Containers/MobilePushNew/tests/sagas.test.js +0 -863
  103. package/v2Containers/MobilePushNew/tests/selectors.test.js +0 -425
  104. package/v2Containers/MobilePushNew/tests/utils.test.js +0 -322
  105. package/v2Containers/MobilePushNew/utils.js +0 -33
@@ -0,0 +1,334 @@
1
+ import {
2
+ checkForData,
3
+ removeExtraIdentifiers,
4
+ identifiersHighlight,
5
+ getNamingIcon,
6
+ } from '../utils';
7
+
8
+ describe('CustomerSearchSection Utils', () => {
9
+ describe('checkForData', () => {
10
+ it('should return filtered data based on source', () => {
11
+ const mockData = [
12
+ { source: 'INSTORE', value: 'test1' },
13
+ { source: 'ONLINE', value: 'test2' },
14
+ { source: 'INSTORE', value: 'test3' },
15
+ ];
16
+
17
+ const result = checkForData(mockData, 'INSTORE');
18
+
19
+ expect(result).toEqual([
20
+ { source: 'INSTORE', value: 'test1' },
21
+ { source: 'INSTORE', value: 'test3' },
22
+ ]);
23
+ expect(result).toHaveLength(2);
24
+ });
25
+
26
+ it('should return empty array when no matching source found', () => {
27
+ const mockData = [
28
+ { source: 'ONLINE', value: 'test1' },
29
+ { source: 'MOBILE', value: 'test2' },
30
+ ];
31
+
32
+ const result = checkForData(mockData, 'INSTORE');
33
+
34
+ expect(result).toEqual([]);
35
+ expect(result).toHaveLength(0);
36
+ });
37
+
38
+ it('should handle null/undefined data gracefully', () => {
39
+ expect(checkForData(null, 'INSTORE')).toBeUndefined();
40
+ expect(checkForData(undefined, 'INSTORE')).toBeUndefined();
41
+ expect(checkForData([], 'INSTORE')).toEqual([]);
42
+ });
43
+
44
+ it('should handle empty data array', () => {
45
+ const result = checkForData([], 'INSTORE');
46
+ expect(result).toEqual([]);
47
+ });
48
+
49
+ it('should handle case when source parameter is null/undefined', () => {
50
+ const mockData = [
51
+ { source: 'INSTORE', value: 'test1' },
52
+ { source: 'ONLINE', value: 'test2' },
53
+ ];
54
+
55
+ expect(checkForData(mockData, null)).toEqual([]);
56
+ expect(checkForData(mockData, undefined)).toEqual([]);
57
+ });
58
+ });
59
+
60
+ describe('removeExtraIdentifiers', () => {
61
+ const mockData = [
62
+ { idType: 'FIRSTNAME', idValue: 'John' },
63
+ { idType: 'LASTNAME', idValue: 'Doe' },
64
+ { idType: 'EMAIL', idValue: 'john@example.com' },
65
+ { idType: 'PHONE', idValue: '123456789' },
66
+ { idType: 'FIRSTNAME', idValue: 'Jane' },
67
+ ];
68
+
69
+ it('should remove identifiers with specified types', () => {
70
+ const result = removeExtraIdentifiers(mockData, 'FIRSTNAME', 'LASTNAME');
71
+
72
+ expect(result).toEqual([
73
+ { idType: 'EMAIL', idValue: 'john@example.com' },
74
+ { idType: 'PHONE', idValue: '123456789' },
75
+ ]);
76
+ expect(result).toHaveLength(2);
77
+ });
78
+
79
+ it('should return original data when no matching identifiers found', () => {
80
+ const result = removeExtraIdentifiers(mockData, 'NONEXISTENT', 'ALSO_NONEXISTENT');
81
+
82
+ expect(result).toEqual(mockData);
83
+ expect(result).toHaveLength(5);
84
+ });
85
+
86
+ it('should handle empty data array', () => {
87
+ const result = removeExtraIdentifiers([], 'FIRSTNAME', 'LASTNAME');
88
+ expect(result).toEqual([]);
89
+ });
90
+
91
+ it('should handle null/undefined data gracefully', () => {
92
+ expect(removeExtraIdentifiers(null, 'FIRSTNAME', 'LASTNAME')).toBeNull();
93
+ expect(removeExtraIdentifiers(undefined, 'FIRSTNAME', 'LASTNAME')).toBeUndefined();
94
+ });
95
+
96
+ it('should handle single identifier type to remove', () => {
97
+ const result = removeExtraIdentifiers(mockData, 'EMAIL', 'NONEXISTENT');
98
+
99
+ expect(result).toEqual([
100
+ { idType: 'FIRSTNAME', idValue: 'John' },
101
+ { idType: 'LASTNAME', idValue: 'Doe' },
102
+ { idType: 'PHONE', idValue: '123456789' },
103
+ { idType: 'FIRSTNAME', idValue: 'Jane' },
104
+ ]);
105
+ expect(result).toHaveLength(4);
106
+ });
107
+
108
+ it('should handle case when all identifiers match removal criteria', () => {
109
+ const onlyFirstLastData = [
110
+ { idType: 'FIRSTNAME', idValue: 'John' },
111
+ { idType: 'LASTNAME', idValue: 'Doe' },
112
+ ];
113
+
114
+ const result = removeExtraIdentifiers(onlyFirstLastData, 'FIRSTNAME', 'LASTNAME');
115
+
116
+ expect(result).toEqual([]);
117
+ expect(result).toHaveLength(0);
118
+ });
119
+ });
120
+
121
+ describe('identifiersHighlight', () => {
122
+ const mockData = [
123
+ { idValue: 'john@example.com' },
124
+ { idValue: 'jane.doe@test.com' },
125
+ { idValue: 'abcdefghijk' },
126
+ ];
127
+
128
+ it('should highlight search string in identifiers', () => {
129
+ const result = identifiersHighlight('john', mockData);
130
+
131
+ expect(result).toEqual([
132
+ {
133
+ firstString: '',
134
+ secondString: 'john',
135
+ thirdString: '@example.com',
136
+ },
137
+ {
138
+ firstString: '',
139
+ secondString: 'jan',
140
+ thirdString: 'e.doe@test.com',
141
+ },
142
+ {
143
+ firstString: '',
144
+ secondString: 'abc',
145
+ thirdString: 'defghijk',
146
+ },
147
+ ]);
148
+ });
149
+
150
+ it('should handle search string in middle of identifier', () => {
151
+ const result = identifiersHighlight('example', mockData);
152
+
153
+ expect(result).toEqual([
154
+ {
155
+ firstString: 'john@',
156
+ secondString: 'example',
157
+ thirdString: '.com',
158
+ },
159
+ {
160
+ firstString: '',
161
+ secondString: 'jane.d',
162
+ thirdString: 'oe@test.com',
163
+ },
164
+ {
165
+ firstString: '',
166
+ secondString: 'abcdef',
167
+ thirdString: 'ghijk',
168
+ },
169
+ ]);
170
+ });
171
+
172
+ it('should handle search string at end of identifier', () => {
173
+ const result = identifiersHighlight('com', mockData);
174
+
175
+ expect(result).toEqual([
176
+ {
177
+ firstString: 'john@example.',
178
+ secondString: 'com',
179
+ thirdString: '',
180
+ },
181
+ {
182
+ firstString: 'jane.doe@test.',
183
+ secondString: 'com',
184
+ thirdString: '',
185
+ },
186
+ {
187
+ firstString: '',
188
+ secondString: 'ab',
189
+ thirdString: 'cdefghijk',
190
+ },
191
+ ]);
192
+ });
193
+
194
+ it('should handle empty data array', () => {
195
+ const result = identifiersHighlight('john', []);
196
+ expect(result).toBeUndefined();
197
+ });
198
+
199
+ it('should handle null/undefined data gracefully', () => {
200
+ expect(identifiersHighlight('john', null)).toBeUndefined();
201
+ expect(identifiersHighlight('john', undefined)).toBeUndefined();
202
+ });
203
+
204
+ it('should handle empty search string', () => {
205
+ const result = identifiersHighlight('', mockData);
206
+
207
+ expect(result).toEqual([
208
+ {
209
+ firstString: '',
210
+ secondString: '',
211
+ thirdString: 'john@example.com',
212
+ },
213
+ {
214
+ firstString: '',
215
+ secondString: '',
216
+ thirdString: 'jane.doe@test.com',
217
+ },
218
+ {
219
+ firstString: '',
220
+ secondString: '',
221
+ thirdString: 'abcdefghijk',
222
+ },
223
+ ]);
224
+ });
225
+
226
+ it('should handle case when search string is not found', () => {
227
+ const result = identifiersHighlight('xyz', mockData);
228
+
229
+ expect(result).toEqual([
230
+ {
231
+ firstString: '',
232
+ secondString: 'jo',
233
+ thirdString: 'hn@example.com',
234
+ },
235
+ {
236
+ firstString: '',
237
+ secondString: 'ja',
238
+ thirdString: 'ne.doe@test.com',
239
+ },
240
+ {
241
+ firstString: '',
242
+ secondString: 'ab',
243
+ thirdString: 'cdefghijk',
244
+ },
245
+ ]);
246
+ });
247
+
248
+ it('should handle data with null/undefined idValue', () => {
249
+ const dataWithNullValues = [
250
+ { idValue: null },
251
+ { idValue: undefined },
252
+ { idValue: 'valid@email.com' },
253
+ ];
254
+
255
+ const result = identifiersHighlight('valid', dataWithNullValues);
256
+
257
+ expect(result).toEqual([
258
+ {
259
+ firstString: undefined,
260
+ secondString: undefined,
261
+ thirdString: undefined,
262
+ },
263
+ {
264
+ firstString: undefined,
265
+ secondString: undefined,
266
+ thirdString: undefined,
267
+ },
268
+ {
269
+ firstString: '',
270
+ secondString: 'valid',
271
+ thirdString: '@email.com',
272
+ },
273
+ ]);
274
+ });
275
+ });
276
+
277
+ describe('getNamingIcon', () => {
278
+ it('should return two uppercase initials for full name', () => {
279
+ expect(getNamingIcon('John Doe')).toBe('JD');
280
+ expect(getNamingIcon('Jane Smith')).toBe('JS');
281
+ expect(getNamingIcon('Mary Jane Watson')).toBe('MJ');
282
+ });
283
+
284
+ it('should return first two letters for single name', () => {
285
+ expect(getNamingIcon('John')).toBe('JO');
286
+ expect(getNamingIcon('Jane')).toBe('JA');
287
+ expect(getNamingIcon('Ab')).toBe('AB');
288
+ });
289
+
290
+ it('should handle names with extra spaces', () => {
291
+ expect(getNamingIcon('John Doe')).toBe('JD');
292
+ expect(getNamingIcon('Jane Smith')).toBe('JS');
293
+ });
294
+
295
+ it('should handle empty string', () => {
296
+ expect(getNamingIcon('')).toBe('');
297
+ });
298
+
299
+ it('should handle null/undefined gracefully', () => {
300
+ expect(() => getNamingIcon(null)).toThrow();
301
+ expect(() => getNamingIcon(undefined)).toThrow();
302
+ });
303
+
304
+ it('should handle lowercase names', () => {
305
+ expect(getNamingIcon('john doe')).toBe('JD');
306
+ expect(getNamingIcon('jane smith')).toBe('JS');
307
+ });
308
+
309
+ it('should handle mixed case names', () => {
310
+ expect(getNamingIcon('jOhN dOe')).toBe('JD');
311
+ expect(getNamingIcon('JaNe SmItH')).toBe('JS');
312
+ });
313
+
314
+ it('should handle special characters in names', () => {
315
+ expect(getNamingIcon('John-Doe')).toBe('JO');
316
+ expect(getNamingIcon("O'Connor Smith")).toBe('OS');
317
+ });
318
+
319
+ it('should handle very long names', () => {
320
+ expect(getNamingIcon('Johnathon Christopher')).toBe('JC');
321
+ expect(getNamingIcon('A B C D E F G')).toBe('AB');
322
+ });
323
+
324
+ it('should handle names with numbers', () => {
325
+ expect(getNamingIcon('John2 Doe3')).toBe('JD');
326
+ expect(getNamingIcon('User123')).toBe('US');
327
+ });
328
+
329
+ it('should handle single character names', () => {
330
+ expect(getNamingIcon('A')).toBe('A');
331
+ expect(getNamingIcon('X')).toBe('X');
332
+ });
333
+ });
334
+ });
@@ -0,0 +1,49 @@
1
+ export const checkForData = (data, source) => {
2
+ const expectedData = data?.filter((d) => d?.source === source);
3
+ return expectedData;
4
+ };
5
+
6
+ export const removeExtraIdentifiers = (
7
+ data,
8
+ identiferFirstKey,
9
+ identifiersSecondKey,
10
+ ) => {
11
+ let finalResult = data;
12
+ const extraIdentifiers = data?.filter(
13
+ (d) => d?.idType === identiferFirstKey || d?.idType === identifiersSecondKey,
14
+ );
15
+ finalResult = extraIdentifiers?.length > 0
16
+ ? data?.filter((item) => extraIdentifiers?.indexOf(item) === -1)
17
+ : data;
18
+
19
+ return finalResult;
20
+ };
21
+
22
+ export const identifiersHighlight = (searchString, data) => {
23
+ let finalResult;
24
+ if (data?.length > 0) {
25
+ finalResult = data?.map((d) => {
26
+ const searchedStringIndex = d?.idValue?.indexOf(searchString);
27
+ const searchStringLength = searchString?.length;
28
+ const sliceString = searchedStringIndex + searchStringLength;
29
+ return {
30
+ firstString: d?.idValue?.substring(0, searchedStringIndex),
31
+ secondString: d?.idValue?.substring(searchedStringIndex, sliceString),
32
+ thirdString: d?.idValue?.substring(sliceString),
33
+ };
34
+ });
35
+ }
36
+ return finalResult;
37
+ };
38
+
39
+ // Name breaking icon
40
+ export const getNamingIcon = (data) => {
41
+ let returnedString;
42
+ const splitStrings = data?.split(' ');
43
+ returnedString = splitStrings?.length > 1
44
+ ? splitStrings[0].charAt(0).toUpperCase()
45
+ + splitStrings[1].charAt(0).toUpperCase()
46
+ : splitStrings[0].charAt(0).toUpperCase()
47
+ + splitStrings[0].charAt(1).toUpperCase();
48
+ return returnedString;
49
+ };
@@ -1,7 +1,6 @@
1
1
  @import "~@capillarytech/cap-ui-library/styles/_variables.scss";
2
2
 
3
3
  .error-container {
4
- width: max-content;
5
4
  margin-bottom: $CAP_SPACE_08;
6
5
  margin-top: $CAP_SPACE_12;
7
6
  background-color: $CAP_COLOR_05;
@@ -15,7 +15,6 @@ import { MOBILE_PUSH } from '../../v2Containers/CreativesContainer/constants';
15
15
  import { INAPP } from '../../v2Containers/App/constants';
16
16
  import { ANDROID, IOS } from '../../v2Containers/InApp/constants';
17
17
  import { getCtaObject } from '../../v2Containers/InApp/utils';
18
- import { VIDEO } from '../../v2Containers/MobilePushNew/constants';
19
18
 
20
19
  class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react/prefer-stateless-function
21
20
  constructor(props) {
@@ -65,40 +64,14 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
65
64
  const androidContent = get(templateData, 'versions.base.ANDROID') || get(templateData, 'androidContent');
66
65
  const iosContent = get(templateData, 'versions.base.IOS') || get(templateData, 'iosContent');
67
66
 
68
- const data = device?.toLowerCase() === "android" ? androidContent : iosContent;
69
- const { title = '', message = '', expandableDetails: { ctas = [], image = '', media = [], carouselData = [] } = {}} = data || {};
70
-
71
- // Handle video/GIF content from expandableDetails.media array (new format)
72
- let bodyVideo = {};
73
- let bodyGif = '';
74
- let bodyImage = image;
75
-
76
- if (media && Array.isArray(media) && media.length > 0) {
77
- const mediaItem = media[0];
78
- if (mediaItem.type === VIDEO) {
79
- // Distinguish between actual video and GIF based on URL extension
80
- if (mediaItem.url && mediaItem.url.toLowerCase().includes('.gif')) {
81
- bodyGif = mediaItem.url;
82
- } else {
83
- bodyVideo = {
84
- videoSrc: mediaItem.url,
85
- videoPreview: mediaItem.url,
86
- };
87
- }
88
- // Clear bodyImage when we have video/GIF content
89
- bodyImage = '';
90
- }
91
- }
92
-
67
+ const data = device === "android" ? androidContent : iosContent;
68
+ const { title = '', message = '', expandableDetails: { ctas = [], image = '' } = {}} = data || {};
93
69
  content = {
94
70
  header: title,
95
71
  bodyText: message,
96
- bodyImage,
97
- bodyVideo,
98
- bodyGif,
72
+ bodyImage: image,
99
73
  actions: [],
100
74
  appName: templateData?.appName,
101
- carouselData,
102
75
  };
103
76
  if (ctas && ctas?.length) {
104
77
  if (device === "android" ) {
@@ -110,7 +83,6 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
110
83
  }
111
84
  return content;
112
85
  }
113
-
114
86
  getPreview(device) {
115
87
  const deviceParam = device === ANDROID.toLowerCase() ? ANDROID : IOS;
116
88
  return (
@@ -123,21 +95,17 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
123
95
  />
124
96
  );
125
97
  }
126
-
127
98
  goToDuplicate() {
128
99
  this.props.onDuplicateClick(this.props.templateData);
129
100
  this.props.handleClose();
130
101
  }
131
-
132
102
  changeDevice(device) {
133
103
  const content = this.setContent(this.props.templateData, device, this.props.channel);
134
104
  this.setState({device, content });
135
105
  }
136
-
137
106
  goToEdit(e, path) {
138
107
  this.props.onEditClick(e, this.props.templateData._id, this.props.templateData.modeType, path);
139
108
  }
140
-
141
109
  render() {
142
110
  const {templateData} = this.props;
143
111
  let hasAndroid;
@@ -153,8 +121,8 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
153
121
  return (
154
122
  <div>
155
123
  <div className="devices">
156
- {!isEmpty(templateData)
157
- && ( hasBothAndroidAndIos ? (
124
+ {!isEmpty(templateData) &&
125
+ ( hasBothAndroidAndIos ? (
158
126
  <CapTab
159
127
  panes={[
160
128
  {