@capillarytech/creatives-library 7.10.17 → 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/config/app.js
CHANGED
|
@@ -17,6 +17,7 @@ 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',
|
|
20
21
|
campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
|
|
21
22
|
campaigns_api_org_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/org/campaign',
|
|
22
23
|
auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
|
package/package.json
CHANGED
|
@@ -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';
|
|
@@ -318,7 +320,7 @@ export const SmsTraiEdit = (props) => {
|
|
|
318
320
|
};
|
|
319
321
|
|
|
320
322
|
const onTagSelect = (data) => {
|
|
321
|
-
if (textAreaId && varMap && updatedSmsEditor) {
|
|
323
|
+
if (textAreaId >= 0 && varMap && updatedSmsEditor) {
|
|
322
324
|
const arr = [...updatedSmsEditor];
|
|
323
325
|
const varMapKeys = Object.keys(varMap)?.map((key) => Number(key.slice(8)))?.sort((a, b) => a - b) || [];
|
|
324
326
|
const loopIndex = varMapKeys[varMapKeys?.indexOf(textAreaId) + 1] || arr.length;
|
|
@@ -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 =
|
|
353
|
+
varMap[`${SMS_TRAI_VAR}_${_id}`].data = value;
|
|
354
354
|
//based on entered value update updatedSmsEditor
|
|
355
|
-
if (
|
|
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;
|
|
@@ -372,7 +372,7 @@ export const SmsTraiEdit = (props) => {
|
|
|
372
372
|
};
|
|
373
373
|
|
|
374
374
|
const textAreaValue = (idValue) => {
|
|
375
|
-
if (idValue && updatedSmsEditor) {
|
|
375
|
+
if (idValue >= 0 && updatedSmsEditor) {
|
|
376
376
|
if (
|
|
377
377
|
updatedSmsEditor[idValue] &&
|
|
378
378
|
updatedSmsEditor[idValue] !== 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;
|