@capillarytech/creatives-library 4.0.2 → 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.
- package/package.json +1 -1
- package/services/api.js +10 -2
- package/translations/en.json +3 -2
- package/translations/zh.json +1 -0
package/package.json
CHANGED
package/services/api.js
CHANGED
|
@@ -79,7 +79,11 @@ function checkStatus(response) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
function request(url, options) {
|
|
82
|
-
|
|
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');
|
package/translations/en.json
CHANGED
|
@@ -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": "
|
|
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": "
|
|
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",
|
package/translations/zh.json
CHANGED
|
@@ -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": "",
|