@capillarytech/creatives-library 7.10.18 → 7.10.19

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.18",
4
+ "version": "7.10.19",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-restricted-syntax */
2
+ /* eslint-disable no-undef */
1
3
  import React, { useState, useEffect } from 'react';
2
4
  import { createStructuredSelector } from 'reselect';
3
5
  import { bindActionCreators } from 'redux';
@@ -343,16 +345,14 @@ export const SmsTraiEdit = (props) => {
343
345
  // on change event of Text Area
344
346
  const textAreaValueChange = ({ target: { value, id } }) => {
345
347
  const _id = Number(id);
346
- const _value = value.replace(/[\r\n]+/gm, "");//skip newlines eg: '/n'
347
348
  const arr = [...updatedSmsEditor];
348
- const selectedVarCount = varMap[`${SMS_TRAI_VAR}_${_id}`].count;
349
349
  const varMapKeys = Object.keys(varMap)?.map((key) => Number(key.slice(8)))?.sort((a, b) => a - b) || [];
350
350
  const loopIndex = varMapKeys[varMapKeys?.indexOf(_id) + 1] || arr.length;
351
351
 
352
352
  //assign entered value to varMap
353
- varMap[`${SMS_TRAI_VAR}_${_id}`].data = _value;
353
+ varMap[`${SMS_TRAI_VAR}_${_id}`].data = value;
354
354
  //based on entered value update updatedSmsEditor
355
- if (_value === '') {
355
+ if (value === '') {
356
356
  for (let i = _id; i < loopIndex; i += 1) {
357
357
  if (i === _id || arr[i] === '') {
358
358
  arr[i] = SMS_TRAI_VAR;
@@ -490,7 +490,7 @@ export const SmsTraiEdit = (props) => {
490
490
  if (varMap[i].data) {
491
491
  countVarChar += varMap[i].data?.length;
492
492
  if (!showMsgLengthNote && varMap[i].data?.length > varMap[i].count * CHARLIMIT) {
493
- updateshowMsgLengthNote(true)
493
+ updateshowMsgLengthNote(true);
494
494
  }
495
495
  } else {
496
496
  countVarChar += varMap[i].count * CHARLIMIT;