@capillarytech/creatives-library 8.0.87-alpha.2 → 8.0.87-alpha.21

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 (41) hide show
  1. package/initialState.js +1 -0
  2. package/package.json +1 -1
  3. package/services/api.js +9 -10
  4. package/utils/transformerUtils.js +474 -0
  5. package/v2Components/CapWhatsappCTA/messages.js +0 -4
  6. package/v2Components/FormBuilder/index.js +7 -3
  7. package/v2Components/TemplatePreview/_templatePreview.scss +0 -9
  8. package/v2Components/TemplatePreview/index.js +104 -169
  9. package/v2Containers/Cap/actions.js +8 -0
  10. package/v2Containers/Cap/constants.js +4 -0
  11. package/v2Containers/Cap/reducer.js +6 -0
  12. package/v2Containers/Cap/sagas.js +23 -0
  13. package/v2Containers/Cap/selectors.js +6 -0
  14. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1 -0
  15. package/v2Containers/CreativesContainer/SlideBoxContent.js +11 -1
  16. package/v2Containers/CreativesContainer/constants.js +3 -0
  17. package/v2Containers/CreativesContainer/index.js +77 -88
  18. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +25 -0
  19. package/v2Containers/CreativesContainer/tests/index.test.js +2 -0
  20. package/v2Containers/Email/index.js +1 -0
  21. package/v2Containers/EmailWrapper/index.js +2 -0
  22. package/v2Containers/MobilePush/Create/index.js +1 -0
  23. package/v2Containers/MobilePush/Edit/index.js +1 -0
  24. package/v2Containers/MobilepushWrapper/index.js +2 -1
  25. package/v2Containers/Sms/Create/index.js +1 -0
  26. package/v2Containers/Sms/Edit/index.js +1 -0
  27. package/v2Containers/SmsWrapper/index.js +2 -0
  28. package/v2Containers/Templates/_templates.scss +0 -35
  29. package/v2Containers/Templates/index.js +5 -64
  30. package/v2Containers/TemplatesV2/index.js +7 -0
  31. package/v2Containers/Whatsapp/constants.js +1 -83
  32. package/v2Containers/Whatsapp/index.js +182 -709
  33. package/v2Containers/Whatsapp/index.scss +1 -52
  34. package/v2Containers/Whatsapp/messages.js +2 -38
  35. package/v2Containers/Whatsapp/utils.js +0 -34
  36. package/v2Containers/mockdata.js +3 -0
  37. package/v2Components/CapWhatsappCarouselButton/constant.js +0 -51
  38. package/v2Components/CapWhatsappCarouselButton/index.js +0 -446
  39. package/v2Components/CapWhatsappCarouselButton/index.scss +0 -39
  40. package/v2Components/TemplatePreview/assets/images/empty_image_preview.svg +0 -4
  41. package/v2Components/TemplatePreview/assets/images/empty_video_preview.svg +0 -4
package/initialState.js CHANGED
@@ -50,4 +50,5 @@ export default {
50
50
  facebook: {
51
51
 
52
52
  },
53
+ metaTagsStatus: '',
53
54
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.87-alpha.2",
4
+ "version": "8.0.87-alpha.21",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -118,7 +118,7 @@ function request(url, options, handleUnauthorizedStatus) {
118
118
  .catch((error) => error);
119
119
  }
120
120
 
121
- function getAPICallObject(method, body, isFileUpload = false, loadCampaignHeaders = false, orgUnitId = false) {
121
+ function getAPICallObject(method, body, isFileUpload = false, loadCampaignHeaders = false, orgUnitId = false, allowOrgInProd = false) {
122
122
  const token = loadItem('token');
123
123
  const orgID = loadItem('orgID');
124
124
  const user = loadItem('user');
@@ -145,8 +145,8 @@ function getAPICallObject(method, body, isFileUpload = false, loadCampaignHeader
145
145
  headers['X-CAP-REMOTE-USER'] = user.refID;
146
146
  }
147
147
 
148
- if (process.env.NODE_ENV !== 'production' && orgID !== undefined) {
149
- headers['X-CAP-API-AUTH-ORG-ID'] = orgID;
148
+ if ((allowOrgInProd || process.env.NODE_ENV !== "production") && orgID !== undefined) {
149
+ headers["X-CAP-API-AUTH-ORG-ID"] = orgID;
150
150
  }
151
151
 
152
152
  if (process.env.NODE_ENV !== 'production' && token !== undefined) {
@@ -520,13 +520,7 @@ export const checkBulkDuplicates = (data) => {
520
520
  export const createWhatsappTemplate = ({payload, gupshupMediaFile }) => {
521
521
  const data = new FormData();
522
522
  data.append('payload', JSON.stringify(payload));
523
- if (Array.isArray(gupshupMediaFile) && gupshupMediaFile.length) {
524
- gupshupMediaFile.forEach((file, index) => {
525
- data.append(`gupshupMediaFile_${index}`, file);
526
- });
527
- } else {
528
- data.append('gupshupMediaFile', gupshupMediaFile);
529
- }
523
+ data.append('gupshupMediaFile', gupshupMediaFile);
530
524
  const url = `${API_ENDPOINT}/templates/WHATSAPP`;
531
525
  return request(url, getAPICallObject('POST', data, true));
532
526
  };
@@ -575,4 +569,9 @@ export const getLiquidTags = (content) => {
575
569
  return request(url, getAPICallObject("POST", { content }, false, true));
576
570
  };
577
571
 
572
+ export const createCentralCommsMetaId = (payload, metaId = 'TRANSACTION') => {
573
+ const url = `${API_ENDPOINT}/common/central-comms/meta-id/${metaId}`;
574
+ return request(url, getAPICallObject('POST', payload, false, false, false, true));
575
+ };
576
+
578
577
  export {request, getAPICallObject};
@@ -0,0 +1,474 @@
1
+ // Import channel constants from the existing constants file
2
+ import {
3
+ SMS,
4
+ EMAIL,
5
+ MOBILE_PUSH,
6
+ WHATSAPP,
7
+ PUSH,
8
+ ZALO
9
+ } from "../v2Containers/CreativesContainer/constants";
10
+
11
+ // Creates a base payload structure common to all channels
12
+ const createBasePayload = (channelType, metadata = {}) => {
13
+ const { actionId, ouId, clientName, module } = metadata;
14
+
15
+ return {
16
+ centralCommsPayload: {
17
+ ouId: ouId || -1,
18
+ sourceEntityId: actionId,
19
+ channel: channelType,
20
+ module,
21
+ executionParams: {},
22
+ clientName:
23
+ clientName ||
24
+ (channelType === SMS || channelType === EMAIL ? "EMF" : "VENENO")
25
+ }
26
+ };
27
+ };
28
+
29
+ // Transforms the channel payload based on the channel type
30
+ /**
31
+ * General transformer function that handles different channel types
32
+ * @param {Object} data - The input data
33
+ * @param {Object} options - Additional options for transformation
34
+ * @returns {Object} - Transformed payload based on channel type
35
+ */
36
+ export const transformChannelPayload = (data, options = {}) => {
37
+ const channel = data.channel?.toUpperCase();
38
+
39
+ switch (channel) {
40
+ case SMS:
41
+ return transformSmsPayload(data, options);
42
+ case MOBILE_PUSH:
43
+ return transformMpushPayload(data, options);
44
+ case EMAIL:
45
+ return transformEmailPayload(data, options);
46
+ case WHATSAPP:
47
+ return transformWhatsappPayload(data, options);
48
+ case ZALO:
49
+ return transformZaloPayload(data, options);
50
+ default:
51
+ return data; // Return unchanged for unsupported channels
52
+ }
53
+ };
54
+ /**
55
+ * Transforms SMS data to the required payload format
56
+ * @param {Object} smsData - Current SMS data
57
+ * @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
58
+ * @returns {Object} - Transformed SMS payload
59
+ */
60
+ const transformSmsPayload = (smsData, options = {}) => {
61
+ const { loyaltyMetaData = {} } = options;
62
+ const { transformedMessageDetails = {} } = loyaltyMetaData;
63
+ const { smsDeliverySettings } = transformedMessageDetails;
64
+
65
+ // Get base payload structure
66
+ const payload = createBasePayload(SMS, loyaltyMetaData);
67
+
68
+ // Add SMS-specific properties
69
+ payload.centralCommsPayload.smsMessageContent = {
70
+ channel: SMS,
71
+ // Override the message property if messageBody exists
72
+ message: smsData?.messageBody || "",
73
+ ...smsData
74
+ };
75
+ payload.centralCommsPayload.smsDeliverySettings = smsDeliverySettings || {};
76
+
77
+ return payload;
78
+ };
79
+ /**
80
+ * Transforms Email data to the required payload format
81
+ * @param {Object} emailData - Current email data
82
+ * @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
83
+ * @returns {Object} - Transformed Email payload
84
+ */
85
+ const transformEmailPayload = (emailData, options = {}) => {
86
+ const { loyaltyMetaData = {} } = options;
87
+ const { transformedMessageDetails = {} } = loyaltyMetaData;
88
+ const { emailDeliverySettings = {} } = transformedMessageDetails;
89
+
90
+ // Get base payload structure
91
+ const payload = createBasePayload(EMAIL, loyaltyMetaData);
92
+
93
+ // Add Email-specific properties
94
+ payload.centralCommsPayload.emailMessageContent = {
95
+ channel: EMAIL,
96
+ messageBody: emailData?.emailBody || "",
97
+ messageSubject: emailData?.emailSubject || "",
98
+ ...emailData
99
+ };
100
+ payload.centralCommsPayload.emailDeliverySettings =
101
+ emailDeliverySettings || {};
102
+
103
+ return payload;
104
+ };
105
+ /**
106
+ * Transforms Mobile Push data to the required payload format
107
+ * @param {Object} mpushData - Current mobile push data
108
+ * @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
109
+ * @returns {Object} - Transformed Mobile Push payload
110
+ */
111
+ const transformMpushPayload = (mpushData, options = {}) => {
112
+ const { loyaltyMetaData = {} } = options;
113
+ const { transformedMessageDetails = {} } = loyaltyMetaData;
114
+ const { mobilePushDeliverySettings = {} } = transformedMessageDetails;
115
+
116
+ // Get default values for Android and iOS content
117
+ const androidContent = mpushData?.androidContent || {};
118
+ const iosContent = mpushData?.iosContent || {
119
+ type: androidContent?.type || "TEXT",
120
+ deviceType: "IOS",
121
+ title: mpushData?.messageSubject || "",
122
+ message: ""
123
+ };
124
+
125
+ // Get base payload structure
126
+ const payload = createBasePayload(PUSH, loyaltyMetaData);
127
+
128
+ // Add Mobile Push-specific properties with spread operator
129
+ payload.centralCommsPayload.mpushMessageContent = {
130
+ channel: PUSH,
131
+ messageSubject: mpushData?.messageSubject || "",
132
+ androidContent: {
133
+ type: "TEXT",
134
+ deviceType: "ANDROID",
135
+ ...androidContent,
136
+ cta: {
137
+ type: "EXTERNAL_URL",
138
+ actionText: null,
139
+ templateCtaId: null,
140
+ ...(androidContent?.cta || {})
141
+ },
142
+ expandableDetails: {
143
+ style: "BIG_TEXT",
144
+ ...androidContent?.expandableDetails
145
+ },
146
+ customProperties: androidContent?.custom || {}
147
+ },
148
+ iosContent: {
149
+ type: "TEXT",
150
+ deviceType: "IOS",
151
+ ...iosContent,
152
+ cta: {
153
+ type: "EXTERNAL_URL",
154
+ actionText: null,
155
+ templateCtaId: null,
156
+ ...(iosContent?.cta || {})
157
+ },
158
+ expandableDetails: {
159
+ style: "BIG_TEXT",
160
+ ...iosContent?.expandableDetails
161
+ },
162
+ customProperties: iosContent?.custom || {}
163
+ },
164
+ accountId: mpushData?.accountId || 0
165
+ };
166
+ payload.centralCommsPayload.mpushDeliverySettings =
167
+ mobilePushDeliverySettings || {};
168
+
169
+ return payload;
170
+ };
171
+ /**
172
+ * Transforms WhatsApp data to the required payload format
173
+ * @param {Object} whatsappData - Current WhatsApp data
174
+ * @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
175
+ * @returns {Object} - Transformed WhatsApp payload
176
+ */
177
+ const transformWhatsappPayload = (whatsappData, options = {}) => {
178
+ const { loyaltyMetaData = {} } = options;
179
+ const { transformedMessageDetails = {} } = loyaltyMetaData;
180
+ const { whatsappDeliverySettings = {} } = transformedMessageDetails;
181
+
182
+ // Get base payload structure
183
+ const payload = createBasePayload(WHATSAPP, loyaltyMetaData);
184
+
185
+ // Add WhatsApp-specific properties
186
+ payload.centralCommsPayload.whatsappMessageContent = {
187
+ channel: WHATSAPP,
188
+ messageBody: "",
189
+ ...whatsappData,
190
+ // Ensure templateConfigs is preserved (it might contain complex nested objects)
191
+ templateConfigs: whatsappData?.templateConfigs || {}
192
+ };
193
+ payload.centralCommsPayload.whatsappDeliverySettings =
194
+ whatsappDeliverySettings || {};
195
+
196
+ return payload;
197
+ };
198
+ /**
199
+ * Transforms Zalo data to the required payload format
200
+ * @param {Object} zaloData - Current Zalo data
201
+ * @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
202
+ * @returns {Object} - Transformed Zalo payload
203
+ */
204
+ const transformZaloPayload = (zaloData, options = {}) => {
205
+ const { loyaltyMetaData = {} } = options;
206
+ const { transformedMessageDetails = {} } = loyaltyMetaData;
207
+ const { zaloDeliverySettings = {} } = transformedMessageDetails;
208
+
209
+ // Get base payload structure
210
+ const payload = createBasePayload(ZALO, loyaltyMetaData);
211
+
212
+ // Add Zalo-specific properties
213
+ payload.centralCommsPayload.zaloMessageContent = {
214
+ channel: ZALO,
215
+ messageBody: "",
216
+ accountId: "",
217
+ accountName: "",
218
+ token: "",
219
+ ...zaloData,
220
+ // Ensure templateConfigs is preserved (it might contain complex nested objects)
221
+ templateConfigs: zaloData?.templateConfigs || {}
222
+ };
223
+ payload.centralCommsPayload.zaloDeliverySettings = zaloDeliverySettings || {};
224
+
225
+ return payload;
226
+ };
227
+
228
+ // Checks if the template has changed
229
+ export const getTemplateDiffState = (channel, oldData, newData) => {
230
+ switch (channel.toUpperCase()) {
231
+ case SMS:
232
+ return checkSmsDiff(oldData, newData);
233
+ case EMAIL:
234
+ return checkEmailDiff(oldData, newData);
235
+ case MOBILE_PUSH:
236
+ case PUSH:
237
+ return checkPushDiff(oldData, newData);
238
+ case WHATSAPP:
239
+ return checkWhatsappDiff(oldData, newData);
240
+ case ZALO:
241
+ return checkZaloDiff(oldData, newData);
242
+ default:
243
+ return false;
244
+ }
245
+ };
246
+ /**
247
+ * Checks differences between old and new SMS data
248
+ * @param {Object} oldData - Previous SMS template data
249
+ * @param {Object} newData - Updated SMS template data
250
+ * @returns {Boolean} - Whether the template has changed
251
+ */
252
+ const checkSmsDiff = (oldData, newData) => {
253
+ // Extract old message content
254
+ const oldMessage =
255
+ oldData?.transformedMessageDetails?.smsMessageContent?.message || "";
256
+
257
+ // Extract new message content
258
+ const newMessage = newData?.messageBody || "";
259
+
260
+ // Compare message content
261
+ return oldMessage !== newMessage;
262
+ };
263
+ /**
264
+ * Checks differences between old and new Email data
265
+ * @param {Object} oldData - Previous Email template data
266
+ * @param {Object} newData - Updated Email template data
267
+ * @returns {Boolean} - Whether the template has changed
268
+ */
269
+ const checkEmailDiff = (oldData, newData) => {
270
+ // Extract old email content
271
+ const oldEmailBody =
272
+ oldData?.transformedMessageDetails?.emailMessageContent?.messageBody || "";
273
+ const oldEmailSubject =
274
+ oldData?.transformedMessageDetails?.emailMessageContent?.messageSubject ||
275
+ "";
276
+
277
+ // Extract new email content
278
+ const newEmailBody = newData?.emailBody || "";
279
+ const newEmailSubject = newData?.emailSubject || "";
280
+
281
+ // Compare both subject and body
282
+ return oldEmailBody !== newEmailBody || oldEmailSubject !== newEmailSubject;
283
+ };
284
+ /**
285
+ * Checks differences between old and new Push data
286
+ * @param {Object} oldData - Previous Push template data
287
+ * @param {Object} newData - Updated Push template data
288
+ * @returns {Boolean} - Whether the template has changed
289
+ */
290
+ const checkPushDiff = (oldData, newData) => {
291
+ // Extract old push content
292
+ const oldAndroidContent =
293
+ oldData?.transformedMessageDetails?.mpushMessageContent?.androidContent ||
294
+ {};
295
+ const oldIosContent =
296
+ oldData?.transformedMessageDetails?.mpushMessageContent?.iosContent || {};
297
+ const oldSubject =
298
+ oldData?.transformedMessageDetails?.mpushMessageContent?.messageSubject ||
299
+ "";
300
+
301
+ // Extract new push content
302
+ const newAndroidContent = newData?.androidContent || {};
303
+ const newIosContent = newData?.iosContent || {};
304
+ const newSubject = newData?.messageSubject || "";
305
+
306
+ // Compare subject
307
+ if (oldSubject !== newSubject) return true;
308
+
309
+ // Compare Android content
310
+ if (oldAndroidContent.title !== newAndroidContent.title) return true;
311
+ if (oldAndroidContent.message !== newAndroidContent.message) return true;
312
+ if (oldAndroidContent.cta?.actionLink !== newAndroidContent.cta?.actionLink) {
313
+ return true;
314
+ }
315
+
316
+ // Compare iOS content
317
+ if (oldIosContent.title !== newIosContent.title) return true;
318
+ if (oldIosContent.message !== newIosContent.message) return true;
319
+ if (oldIosContent.cta?.actionLink !== newIosContent.cta?.actionLink) {
320
+ return true;
321
+ }
322
+
323
+ return false;
324
+ };
325
+ /**
326
+ * Checks differences between old and new WhatsApp data
327
+ * @param {Object} oldData - Previous WhatsApp template data
328
+ * @param {Object} newData - Updated WhatsApp template data
329
+ * @returns {Boolean} - Whether the template has changed
330
+ */
331
+ const checkWhatsappDiff = (oldData, newData) => {
332
+ // Extract old WhatsApp content
333
+ const oldMessage =
334
+ oldData?.transformedMessageDetails?.whatsappMessageContent?.messageBody ||
335
+ "";
336
+ const oldTemplateConfigs =
337
+ oldData?.transformedMessageDetails?.whatsappMessageContent
338
+ ?.templateConfigs || {};
339
+
340
+ // Extract new WhatsApp content
341
+ const newMessage = newData?.messageBody || "";
342
+ const newTemplateConfigs = newData?.templateConfigs || {};
343
+
344
+ // Compare message content
345
+ if (oldMessage !== newMessage) return true;
346
+
347
+ // If new data has template configs but old data doesn't, there is a change
348
+ if (
349
+ Object.keys(newTemplateConfigs).length > 0 &&
350
+ Object.keys(oldTemplateConfigs).length === 0
351
+ ) {
352
+ return true;
353
+ }
354
+
355
+ // If both have template configs, perform detailed comparison
356
+ if (
357
+ Object.keys(newTemplateConfigs).length > 0 &&
358
+ Object.keys(oldTemplateConfigs).length > 0
359
+ ) {
360
+ // Compare template names and IDs
361
+ if (oldTemplateConfigs.id !== newTemplateConfigs.id) return true;
362
+ if (oldTemplateConfigs.name !== newTemplateConfigs.name) return true;
363
+ if (oldTemplateConfigs.template !== newTemplateConfigs.template) {
364
+ return true;
365
+ }
366
+
367
+ // Compare template variables
368
+ if (
369
+ JSON.stringify(oldTemplateConfigs.varMapped) !==
370
+ JSON.stringify(newTemplateConfigs.varMapped)
371
+ ) {
372
+ return true;
373
+ }
374
+
375
+ // Compare media settings
376
+ if (
377
+ JSON.stringify(oldTemplateConfigs.whatsappMedia) !==
378
+ JSON.stringify(newTemplateConfigs.whatsappMedia)
379
+ ) {
380
+ return true;
381
+ }
382
+
383
+ // Compare other template properties
384
+ if (oldTemplateConfigs.category !== newTemplateConfigs.category) {
385
+ return true;
386
+ }
387
+ if (oldTemplateConfigs.language !== newTemplateConfigs.language) {
388
+ return true;
389
+ }
390
+ if (oldTemplateConfigs.buttonType !== newTemplateConfigs.buttonType) {
391
+ return true;
392
+ }
393
+ if (
394
+ JSON.stringify(oldTemplateConfigs.buttons) !==
395
+ JSON.stringify(newTemplateConfigs.buttons)
396
+ ) {
397
+ return true;
398
+ }
399
+ }
400
+
401
+ // Check if account details have changed
402
+ if (
403
+ oldData?.transformedMessageDetails?.whatsappMessageContent?.accountId !==
404
+ newData?.accountId
405
+ ) {
406
+ return true;
407
+ }
408
+ if (
409
+ oldData?.transformedMessageDetails?.whatsappMessageContent
410
+ ?.sourceAccountIdentifier !== newData?.sourceAccountIdentifier
411
+ ) {
412
+ return true;
413
+ }
414
+
415
+ return false;
416
+ };
417
+ /**
418
+ * Checks differences between old and new Zalo data
419
+ * @param {Object} oldData - Previous Zalo template data
420
+ * @param {Object} newData - Updated Zalo template data
421
+ * @returns {Boolean} - Whether the template has changed
422
+ */
423
+ const checkZaloDiff = (oldData, newData) => {
424
+ // Extract old Zalo content
425
+ const oldTemplateConfigs =
426
+ oldData?.transformedMessageDetails?.zaloMessageContent?.templateConfigs ||
427
+ {};
428
+ const oldAccountId =
429
+ oldData?.transformedMessageDetails?.zaloMessageContent?.accountId || "";
430
+ const oldToken =
431
+ oldData?.transformedMessageDetails?.zaloMessageContent?.token || "";
432
+
433
+ // Extract new Zalo content
434
+ const newTemplateConfigs = newData?.templateConfigs || {};
435
+ const newAccountId = newData?.accountId || "";
436
+ const newToken = newData?.token || "";
437
+
438
+ // Compare account ID
439
+ if (oldAccountId !== newAccountId) return true;
440
+
441
+ // Compare token
442
+ if (oldToken !== newToken) return true;
443
+
444
+ // If new data has template configs but old data doesn't, there is a change
445
+ if (
446
+ Object.keys(newTemplateConfigs).length > 0 &&
447
+ Object.keys(oldTemplateConfigs).length === 0
448
+ ) {
449
+ return true;
450
+ }
451
+
452
+ // If both have template configs, perform detailed comparison
453
+ if (
454
+ Object.keys(newTemplateConfigs).length > 0 &&
455
+ Object.keys(oldTemplateConfigs).length > 0
456
+ ) {
457
+ // Compare template IDs and names
458
+ if (oldTemplateConfigs.id !== newTemplateConfigs.id) return true;
459
+ if (oldTemplateConfigs.name !== newTemplateConfigs.name) return true;
460
+ if (oldTemplateConfigs.template !== newTemplateConfigs.template) {
461
+ return true;
462
+ }
463
+
464
+ // Compare template variables
465
+ if (
466
+ JSON.stringify(oldTemplateConfigs.varMapped) !==
467
+ JSON.stringify(newTemplateConfigs.varMapped)
468
+ ) {
469
+ return true;
470
+ }
471
+ }
472
+
473
+ return false;
474
+ };
@@ -104,8 +104,4 @@ export default defineMessages({
104
104
  id: `${prefix}.whatsappCtaTagListRevert`,
105
105
  defaultMessage: 'Reset website URL label to default value',
106
106
  },
107
- url: {
108
- id: `${prefix}.url`,
109
- defaultMessage: 'URL',
110
- },
111
107
  });
@@ -44,7 +44,7 @@ import EDMEditor from "../Edmeditor";
44
44
  import BeeEditor from '../../v2Containers/BeeEditor';
45
45
  import CustomPopOver from '../CustomPopOver';
46
46
  import messages from './messages';
47
- import { makeSelectMetaEntities, selectCurrentOrgDetails, selectLiquidStateDetails } from "../../v2Containers/Cap/selectors";
47
+ import { makeSelectMetaEntities, selectCurrentOrgDetails, selectLiquidStateDetails, selectMetaTagsStatus } from "../../v2Containers/Cap/selectors";
48
48
  import * as actions from "../../v2Containers/Cap/actions";
49
49
  import './_formBuilder.scss';
50
50
  import {updateCharCount, checkUnicode} from "../../utils/smsCharCountV2";
@@ -56,6 +56,7 @@ import { OUTBOUND } from './constants';
56
56
  import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
57
57
  import moment from 'moment';
58
58
  import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../containers/App/constants';
59
+ import { REQUEST } from '../../v2Containers/Cap/constants'
59
60
  import { hasLiquidSupportFeature, isEmailUnsubscribeTagMandatory } from '../../utils/common';
60
61
  import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
61
62
  import { bindActionCreators } from 'redux';
@@ -1082,6 +1083,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1082
1083
  }
1083
1084
  });}
1084
1085
  }
1086
+
1085
1087
  saveForm(saveForm) {
1086
1088
  if (this.props.isNewVersionFlow && !saveForm) {
1087
1089
  this.props.getValidationData();
@@ -3793,7 +3795,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3793
3795
 
3794
3796
 
3795
3797
  return (
3796
- <CapSpin spinning={Boolean(this.liquidFlow && this.props.liquidExtractionInProgress)} tip={this.props.intl.formatMessage(messages.liquidSpinText)} >
3798
+ <CapSpin spinning={Boolean((this.liquidFlow && this.props.liquidExtractionInProgress) || this.props.metaIdStatus === REQUEST)} tip={this.props.intl.formatMessage(messages.liquidSpinText)} >
3797
3799
  <CapRow>
3798
3800
  {this.props.schema && this.renderForm()}
3799
3801
  <SlideBox
@@ -3827,6 +3829,7 @@ FormBuilder.defaultProps = {
3827
3829
  isNewVersionFlow: false,
3828
3830
  userLocale: localStorage.getItem('jlocale') || 'en',
3829
3831
  showLiquidErrorInFooter: () => {},
3832
+ metaIdStatus: false,
3830
3833
  };
3831
3834
 
3832
3835
  FormBuilder.propTypes = {
@@ -3874,12 +3877,13 @@ FormBuilder.propTypes = {
3874
3877
  isFullMode: PropTypes.bool,
3875
3878
  currentOrgDetails: PropTypes.object,
3876
3879
  liquidExtractionInProgress: PropTypes.bool,
3877
- showLiquidErrorInFooter: PropTypes.func,
3880
+ showLiquidErrorInFooter: PropTypes.func
3878
3881
  };
3879
3882
 
3880
3883
  const mapStateToProps = createStructuredSelector({
3881
3884
  currentOrgDetails: selectCurrentOrgDetails(),
3882
3885
  liquidExtractionInProgress: selectLiquidStateDetails(),
3886
+ metaIdStatus: selectMetaTagsStatus(),
3883
3887
  metaEntities: makeSelectMetaEntities(),
3884
3888
  });
3885
3889
 
@@ -567,10 +567,6 @@
567
567
  font-size: 10px;
568
568
  font-family: 'open-sans';
569
569
  }
570
- &.message-pop-carousel {
571
- position: relative;
572
- margin-right: 4px;
573
- }
574
570
  }
575
571
  }
576
572
  .android-push-message-Container, .iphone-push-message-Container{
@@ -751,11 +747,6 @@
751
747
  width: 153px;
752
748
  }
753
749
  }
754
-
755
- .msg-container-carousel {
756
- display: flex;
757
- flex-direction: column;
758
- }
759
750
  }
760
751
 
761
752
  .align-center {