c2-mongoose 2.1.85 → 2.1.86
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/flow/SearchFlow.js
CHANGED
|
@@ -411,6 +411,7 @@ var SearchFlow = /** @class */ (function () {
|
|
|
411
411
|
});
|
|
412
412
|
};
|
|
413
413
|
SearchFlow.prototype.buildDefaultFilters = function (objectSearch) {
|
|
414
|
+
var _this = this;
|
|
414
415
|
var filters = { $and: [] };
|
|
415
416
|
Object.entries(objectSearch.model).forEach(function (_a) {
|
|
416
417
|
var key = _a[0], value = _a[1];
|
|
@@ -449,7 +450,7 @@ var SearchFlow = /** @class */ (function () {
|
|
|
449
450
|
}
|
|
450
451
|
else if (key.endsWith('Like')) {
|
|
451
452
|
var fieldName = key.replace('Like', '');
|
|
452
|
-
condition[fieldName] = { $regex: value, $options: 'i' }
|
|
453
|
+
condition[fieldName] = _this.buildRegex(value); //{ $regex: value as any, $options: 'i' }
|
|
453
454
|
filters.$and.push(condition);
|
|
454
455
|
}
|
|
455
456
|
else {
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -350,7 +350,7 @@ abstract class SearchFlow {
|
|
|
350
350
|
filters.$and.push(condition)
|
|
351
351
|
} else if (key.endsWith('Like')) {
|
|
352
352
|
var fieldName = key.replace('Like', '')
|
|
353
|
-
condition[fieldName] = { $regex: value as any, $options: 'i' }
|
|
353
|
+
condition[fieldName] = this.buildRegex(value as string) //{ $regex: value as any, $options: 'i' }
|
|
354
354
|
filters.$and.push(condition)
|
|
355
355
|
} else {
|
|
356
356
|
if (!Array.isArray(value)) {
|