@capillarytech/creatives-library 4.0.1 → 4.0.3

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.
@@ -76,7 +76,7 @@ export default defineMessages({
76
76
  },
77
77
  "Template content has unsupported/missing tags!": {
78
78
  id: 'creatives.containers.Edit.tagsErrorMessage',
79
- defaultMessage: '"Optout" label is mandatory. Please add "Optout" label to this message',
79
+ defaultMessage: 'Please check the message content for unsupported/missing tags',
80
80
  },
81
81
  "Please input sms template content.": {
82
82
  id: 'creatives.containers.Edit.smsEditorPlaceholder',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "4.0.1",
4
+ "version": "4.0.3",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -79,7 +79,11 @@ function checkStatus(response) {
79
79
  }
80
80
 
81
81
  function request(url, options) {
82
- requestCallerName = getCallerName();
82
+ try {
83
+ requestCallerName = getCallerName();
84
+ } catch (e) {
85
+ console.log('requestCallerName error :', e);
86
+ }
83
87
  const fetchUrl = url.indexOf('?') !== -1 ? `${url}&time=${Date.now()}` : `${url}?time=${Date.now()}`;
84
88
  return fetch(fetchUrl, options)
85
89
  .then(checkStatus)
@@ -103,8 +107,12 @@ const getCallerName = () => {
103
107
  }
104
108
  }
105
109
  nameTrace = stackLines[callerIndex].match(/([^(]+)@|at ([^(]+) \(/);
110
+ if (nameTrace === null) {
111
+ callerIndex -= 2;
112
+ nameTrace = stackLines[callerIndex].match(/([^(]+)@|at ([^(]+) \(/);
113
+ }
106
114
  }
107
- return nameTrace[1] || nameTrace[2];
115
+ return nameTrace !== null ? nameTrace[1] || nameTrace[2] : '';
108
116
  };
109
117
  function getAPICallObject(method, body, isFileUpload = false, loadCampaignHeaders = false) {
110
118
  const token = loadItem('token');
@@ -242,6 +242,7 @@
242
242
  "creatives.containers.Create.header": "This is Create container !",
243
243
  "creatives.containers.Create.http_example": "Example: http://example.com",
244
244
  "creatives.containers.Create.imageGallery": "Gallery",
245
+ "creatives.containers.Create.lineImageIncorrectSize": "Please upload the image with correct type, size and dimension",
245
246
  "creatives.containers.Create.markFinalVersionLabel": "Mark as final",
246
247
  "creatives.containers.Create.maxContentCount": "You have reached the maximum template size",
247
248
  "creatives.containers.Create.messageLabel": "Message",
@@ -257,7 +258,7 @@
257
258
  "creatives.containers.Create.smsEditorPlaceholder": "Please enter the message content",
258
259
  "creatives.containers.Create.somethingWentWrong": "Something went wrong!!",
259
260
  "creatives.containers.Create.sourceLinkEmpty": "Cannot leave source link field empty",
260
- "creatives.containers.Create.tagsErrorMessage": "Message cannot be empty",
261
+ "creatives.containers.Create.tagsErrorMessage": "Please check the message content for unsupported/missing tags",
261
262
  "creatives.containers.Create.tagsLabel": "Tags",
262
263
  "creatives.containers.Create.templateAddTag": "Add tag",
263
264
  "creatives.containers.Create.templateDataNotValid": "Template data is not valid",
@@ -315,7 +316,7 @@
315
316
  "creatives.containers.Edit.saveTemplateLoader": "Saving template...",
316
317
  "creatives.containers.Edit.smsEditorPlaceholder": "Please enter the message content",
317
318
  "creatives.containers.Edit.somethingWentWrong": "Something went wrong!!",
318
- "creatives.containers.Edit.tagsErrorMessage": "\"Optout\" label is mandatory. Please add \"Optout\" label to this message",
319
+ "creatives.containers.Edit.tagsErrorMessage": "Please check the message content for unsupported/missing tags",
319
320
  "creatives.containers.Edit.tagsLabel": "Tags",
320
321
  "creatives.containers.Edit.templateMarkedFinal": "Template Marked as Final Successfully",
321
322
  "creatives.containers.Edit.templateNamePlaceHolder": "Enter template name",
@@ -242,6 +242,7 @@
242
242
  "creatives.containers.Create.header": "",
243
243
  "creatives.containers.Create.http_example": "",
244
244
  "creatives.containers.Create.imageGallery": "",
245
+ "creatives.containers.Create.lineImageIncorrectSize": "",
245
246
  "creatives.containers.Create.markFinalVersionLabel": "",
246
247
  "creatives.containers.Create.maxContentCount": "",
247
248
  "creatives.containers.Create.messageLabel": "",