@capillarytech/creatives-library 7.10.61 → 7.10.63

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/config/app.js CHANGED
@@ -17,7 +17,6 @@ const config = {
17
17
  },
18
18
  development: {
19
19
  api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
20
- //api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
21
20
  campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
22
21
  campaigns_api_org_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/org/campaign',
23
22
  auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
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.63",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -391,10 +391,10 @@ class Creatives extends React.Component {
391
391
  languages: [
392
392
  {
393
393
  language,
394
- content: `$'${template}'`,
395
- }
396
- ]
397
- }
394
+ content: template,
395
+ },
396
+ ],
397
+ },
398
398
  },
399
399
  },
400
400
  },
@@ -184,14 +184,16 @@ 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`,
191
191
  '',
192
192
  );
193
193
  //removing last var added for Click {{unsubscribe}} to unsubscribe
194
- validVarArr.pop();
194
+ if (isFullMode) {
195
+ validVarArr.pop();
196
+ }
195
197
  while (msg.length !== 0) {
196
198
  //converting content string to an array split at var
197
199
  const index = msg.indexOf(validVarArr[0]);
@@ -500,9 +502,12 @@ export const Whatsapp = (props) => {
500
502
  ? `${updatedSmsEditor.join('')} ${formatMessage(
501
503
  messages.templateMessageUnsubscribeText,
502
504
  )}`
503
- : `$'${templateMessage}\nClick {{${
504
- addedVarCount + 1
505
- }}} to unsubscribe'`,
505
+ : `${templateMessage}\n${formatMessage(
506
+ messages.modifiedUnsubscribeText,
507
+ {
508
+ value: `{{${addedVarCount + 1}}}`,
509
+ },
510
+ )}`,
506
511
  },
507
512
  ],
508
513
  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