c2-mongoose 2.1.182 → 2.1.183
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 +4 -0
- package/package.json +1 -1
- package/src/flow/SearchFlow.ts +18 -13
package/dist/flow/SearchFlow.js
CHANGED
|
@@ -55,6 +55,10 @@ var mongoose_1 = require("mongoose");
|
|
|
55
55
|
var Utils_1 = require("../utils/Utils");
|
|
56
56
|
var SearchFlow = /** @class */ (function () {
|
|
57
57
|
function SearchFlow(params) {
|
|
58
|
+
// Incluir as propriedades adicionais de 'params' como propriedades da classe
|
|
59
|
+
for (var key in params) {
|
|
60
|
+
this[key] = params[key];
|
|
61
|
+
}
|
|
58
62
|
this.searchText = params.searchText || "";
|
|
59
63
|
this.orderSense = params.orderSense || "asc";
|
|
60
64
|
this.orderBy = params.orderBy || "_id";
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -19,6 +19,11 @@ abstract class SearchFlow {
|
|
|
19
19
|
projection: { [key: string]: number } | undefined
|
|
20
20
|
|
|
21
21
|
constructor(params: any) {
|
|
22
|
+
// Incluir as propriedades adicionais de 'params' como propriedades da classe
|
|
23
|
+
for (const key in params) {
|
|
24
|
+
this[key] = params[key];
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
this.searchText = params.searchText || ""
|
|
23
28
|
this.orderSense = params.orderSense || "asc"
|
|
24
29
|
this.orderBy = params.orderBy || "_id"
|
|
@@ -383,20 +388,20 @@ abstract class SearchFlow {
|
|
|
383
388
|
if (isNotEmpty(value)) {
|
|
384
389
|
let condition = {} as any
|
|
385
390
|
if ([
|
|
386
|
-
'onlyMetadata',
|
|
387
|
-
'projection',
|
|
388
|
-
'pageable',
|
|
389
|
-
'orderSense',
|
|
390
|
-
'orderBy',
|
|
391
|
-
'properties',
|
|
392
|
-
'populate',
|
|
393
|
-
'page',
|
|
394
|
-
'limit',
|
|
395
|
-
'model',
|
|
396
|
-
'select',
|
|
397
|
-
'searchText',
|
|
391
|
+
'onlyMetadata',
|
|
392
|
+
'projection',
|
|
393
|
+
'pageable',
|
|
394
|
+
'orderSense',
|
|
395
|
+
'orderBy',
|
|
396
|
+
'properties',
|
|
397
|
+
'populate',
|
|
398
|
+
'page',
|
|
399
|
+
'limit',
|
|
400
|
+
'model',
|
|
401
|
+
'select',
|
|
402
|
+
'searchText',
|
|
398
403
|
'sort',
|
|
399
|
-
'isPageable',
|
|
404
|
+
'isPageable',
|
|
400
405
|
'searchPageable'].includes(key)) {
|
|
401
406
|
return
|
|
402
407
|
}
|