@ssplib/react-components 0.0.232 → 0.0.233

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.
@@ -53,6 +53,12 @@ function removePunctuationAndAccents(text) {
53
53
  const cleanedText = normalizedText.replace(/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/g, '');
54
54
  return cleanedText;
55
55
  }
56
+ function formatarString(str) {
57
+ return str
58
+ .normalize('NFD')
59
+ .replace(/[\u0300-\u036f]/g, '')
60
+ .toLowerCase();
61
+ }
56
62
  let startData = [];
57
63
  let isExpandAll = false;
58
64
  let localTableName = '';
@@ -506,7 +512,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
506
512
  case 'igual':
507
513
  currentData.forEach((cd) => {
508
514
  const value = (0, lodash_get_1.default)(cd, dt.keyName, '');
509
- if (value === dt.value) {
515
+ if (formatarString(value) === formatarString(dt.value)) {
510
516
  filteredData.push(cd);
511
517
  }
512
518
  });
@@ -517,12 +523,12 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
517
523
  if (!value)
518
524
  return;
519
525
  if (dt.useList) {
520
- if (value.includes(dt.value.id)) {
526
+ if (formatarString(value).includes(formatarString(dt.value.id))) {
521
527
  filteredData.push(cd);
522
528
  }
523
529
  }
524
530
  else {
525
- if (value.includes(dt.value)) {
531
+ if (formatarString(value).includes(formatarString(dt.value))) {
526
532
  filteredData.push(cd);
527
533
  }
528
534
  }
@@ -533,7 +539,7 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
533
539
  const value = (0, lodash_get_1.default)(cd, dt.keyName, '');
534
540
  if (!value)
535
541
  return;
536
- if (dt.value.map((x) => x.id).includes(value)) {
542
+ if (dt.value.map((x) => formatarString(x.id)).includes(formatarString(value))) {
537
543
  filteredData.push(cd);
538
544
  }
539
545
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.232",
3
+ "version": "0.0.233",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",