@capillarytech/creatives-library 7.12.97 → 7.12.102

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.12.97",
4
+ "version": "7.12.102",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -359,10 +359,11 @@ export const SmsTraiCreate = (props) => {
359
359
 
360
360
  const headerValidationHandler = (senderIdString) => {
361
361
  //each row must contain atleast 1 header
362
- //each header can be either 6 letters or 6 numbers, no mixing
362
+ //each header can contain letters or numbers with length in range 3 to 9, no mixing
363
363
  //it cannot contain special characters except {}
364
364
  //eg: valid: "123456" "abcdef" "{123456}" invalid: "abc123" "abc$ef" "1234567"
365
- if (senderIdString.length < 6) {
365
+ let senderIdLength=senderIdString.length;
366
+ if (senderIdLength < 3) {
366
367
  return true;
367
368
  }
368
369
  const lettersOnly = /^[a-zA-Z]*$/;
@@ -371,7 +372,7 @@ export const SmsTraiCreate = (props) => {
371
372
  senderIdString.split(',').forEach((value) => {
372
373
  const _value = value.trim()?.replace(/[{}]/g, '');
373
374
  if (_value) {
374
- if (_value.length !== 6) {
375
+ if (! (_value.length >= 3 && _value.length <= 9) ) {
375
376
  isError = true;
376
377
  return;
377
378
  }
@@ -506,7 +507,7 @@ export const SmsTraiCreate = (props) => {
506
507
  transformedResults[row].forEach((cell, index) => {
507
508
  if (index === headerIndex && headerValidationHandler(cell)) {
508
509
  columnErrorArray.push(
509
- `${selectedHeaderAlias.toUpperCase()} is mandatory and each ${selectedHeaderAlias.toUpperCase()} must contain either 6 letters or 6 digits. It cannot contain special characters. `,
510
+ `${selectedHeaderAlias.toUpperCase()} is mandatory and each ${selectedHeaderAlias.toUpperCase()} must contain either letters or digits with length between 3 to 9. It cannot contain special characters. `,
510
511
  );
511
512
  } else if (statusIndexes.includes(index) && !statusErrorIndicator) {
512
513
  statusErrorIndicator = statusValidationHandler(
@@ -60,7 +60,7 @@ export const mockData = {
60
60
  '--',
61
61
  'CAP71871_12',
62
62
  'Service-Explicit',
63
- 'VISHMM',
63
+ 'VISHMMCAP',
64
64
  '--',
65
65
  'Vodafone Idea',
66
66
  '07/10/20 17:52',
@@ -75,7 +75,7 @@ export const mockData = {
75
75
  '--',
76
76
  '',
77
77
  'Service-Explicit',
78
- '',
78
+ '12',
79
79
  '--',
80
80
  'Vodafone Idea',
81
81
  '07/10/20 17:52',