@bluemarble/bm-components 1.19.0 → 1.20.0
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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5173,17 +5173,25 @@ function searchKeysForValue(row, accKey, compare) {
|
|
|
5173
5173
|
}
|
|
5174
5174
|
return match;
|
|
5175
5175
|
}
|
|
5176
|
+
var normalize = (str) => str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
5176
5177
|
function createSearch(options) {
|
|
5177
5178
|
const searchValue = options.caseSensitive ? options.value : String(options.value).toLowerCase();
|
|
5179
|
+
function getValue2(value) {
|
|
5180
|
+
if (options.caseSensitive)
|
|
5181
|
+
return String(value);
|
|
5182
|
+
return String(value).toLowerCase();
|
|
5183
|
+
}
|
|
5178
5184
|
function compare(key, objValue) {
|
|
5179
5185
|
if (options.ignoredKeys) {
|
|
5180
5186
|
const isIgnoredKey = options.ignoredKeys.includes(key);
|
|
5181
5187
|
if (isIgnoredKey)
|
|
5182
5188
|
return false;
|
|
5183
5189
|
}
|
|
5184
|
-
const value =
|
|
5190
|
+
const value = getValue2(objValue);
|
|
5185
5191
|
if (options.exact)
|
|
5186
5192
|
return value === searchValue;
|
|
5193
|
+
if (options.ignoreAccentMark)
|
|
5194
|
+
return normalize(value).includes(normalize(searchValue));
|
|
5187
5195
|
return value.includes(searchValue);
|
|
5188
5196
|
}
|
|
5189
5197
|
return (row) => {
|