@capillarytech/creatives-library 7.10.11 → 7.10.12
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.
|
|
4
|
+
"version": "7.10.12",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "LicenseRef-LICENSE",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@babel/polyfill": "7.4.3",
|
|
15
16
|
"@bugsnag/js": "^7.2.1",
|
|
16
17
|
"@bugsnag/plugin-react": "^7.2.1",
|
|
17
18
|
"@capillarytech/cap-ui-utils": "1.4.2",
|
|
@@ -232,13 +232,16 @@ export const SmsTraiEdit = (props) => {
|
|
|
232
232
|
const arr = [...tempMsgArray];
|
|
233
233
|
const varMapKeys = Object.keys(varMap)?.map((key) => Number(key.slice(8)))?.sort((a, b) => a - b) || [];
|
|
234
234
|
for (const key in varMap) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
235
|
+
if (varMap[key].data !== '') {
|
|
236
|
+
const _id = Number(key.slice(8)); //Eg: -> extracting index 1 from keys like {#var# } _1
|
|
237
|
+
const loopIndex =
|
|
238
|
+
varMapKeys[varMapKeys?.indexOf(_id) + 1] || arr.length;
|
|
239
|
+
for (let i = _id; i < loopIndex; i += 1) {
|
|
240
|
+
if (i === _id) {
|
|
241
|
+
arr[i] = varMap[key].data; //data for first #var# of the textbox
|
|
242
|
+
} else if (arr[i] === SMS_TRAI_VAR) {
|
|
243
|
+
arr[i] = ''; //'' for remaining #var# of a textbox
|
|
244
|
+
}
|
|
242
245
|
}
|
|
243
246
|
}
|
|
244
247
|
}
|