@capillarytech/creatives-library 7.10.61 → 7.10.62

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.10.61",
4
+ "version": "7.10.62",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -184,7 +184,7 @@ export const Whatsapp = (props) => {
184
184
  const validVarArr = msg.match(validVarRegex) || [];
185
185
  const templateMessageArray = [];
186
186
  //removing $'' which was added for twilio enter handling
187
- msg = msg.slice(2, -1);
187
+ // msg = msg.slice(2, -1);
188
188
  //removing Click {{unsubscribe}} to unsubscribe
189
189
  msg = msg.replace(
190
190
  `Click ${validVarArr[validVarArr.length - 1]} to unsubscribe`,
@@ -500,9 +500,12 @@ export const Whatsapp = (props) => {
500
500
  ? `${updatedSmsEditor.join('')} ${formatMessage(
501
501
  messages.templateMessageUnsubscribeText,
502
502
  )}`
503
- : `$'${templateMessage}\nClick {{${
504
- addedVarCount + 1
505
- }}} to unsubscribe'`,
503
+ : `${templateMessage}\n${formatMessage(
504
+ messages.modifiedUnsubscribeText,
505
+ {
506
+ value: `{{${addedVarCount + 1}}}`,
507
+ },
508
+ )}`,
506
509
  },
507
510
  ],
508
511
  mediaType: 'TEXT',
@@ -135,6 +135,10 @@ export default defineMessages({
135
135
  id: `${prefix}.templateMessageUnsubscribeText`,
136
136
  defaultMessage: 'Click {{unsubscribe}} to unsubscribe',
137
137
  },
138
+ modifiedUnsubscribeText: {
139
+ id: `${prefix}.modifiedUnsubscribeText`,
140
+ defaultMessage: 'Click {value} to unsubscribe',
141
+ },
138
142
  unsubscribeTextTooltip: {
139
143
  id: `${prefix}.unsubscribeTextTooltip`,
140
144
  defaultMessage: 'This is non-editable',
@@ -18,7 +18,7 @@ export const getWhatsappContent = (template) => {
18
18
  } = {},
19
19
  } = template;
20
20
  //removing $'' which was added for twilio enter handling
21
- let text = languages[0]?.content?.slice(2, -1) || '';
21
+ let text = languages[0]?.content || '';
22
22
  const validVarRegex = /{{([1-9]|1[0-9])}}/g;
23
23
  const validVarArr = text.match(validVarRegex) || [];
24
24
  //removing Click {{unsubscribe}} to unsubscribe