@ssplib/react-components 0.0.204 → 0.0.205

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.
@@ -43,6 +43,13 @@ const DatePicker_1 = __importDefault(require("../date/DatePicker"));
43
43
  const dayjs_1 = __importDefault(require("dayjs"));
44
44
  const jszip_1 = __importDefault(require("jszip"));
45
45
  const NavigateNextRounded_1 = __importDefault(require("@mui/icons-material/NavigateNextRounded"));
46
+ function removePunctuationAndAccents(text) {
47
+ // Remove accents and diacritics
48
+ const normalizedText = text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
49
+ // Remove punctuation marks
50
+ const cleanedText = normalizedText.replace(/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/g, '');
51
+ return cleanedText;
52
+ }
46
53
  let startData = [];
47
54
  function Table({ columns, fetchFunc, emptyMsg = {
48
55
  user: 'Nenhum dado encontrado',
@@ -189,7 +196,7 @@ function Table({ columns, fetchFunc, emptyMsg = {
189
196
  return;
190
197
  }
191
198
  }
192
- if (key.toLowerCase().includes(searchValue.toLowerCase())) {
199
+ if (removePunctuationAndAccents(key.toLowerCase()).includes(removePunctuationAndAccents(searchValue.toLowerCase()))) {
193
200
  exists = true;
194
201
  }
195
202
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.204",
3
+ "version": "0.0.205",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",