@steedos/filters 2.2.53-beta.2 → 2.2.53-beta.3
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/lib/filter.js +3 -2
- package/lib/format.js +3 -3
- package/package.json +2 -2
package/lib/filter.js
CHANGED
|
@@ -186,7 +186,8 @@ var SteedosFilter = /*#__PURE__*/function () {
|
|
|
186
186
|
"contains": this.createStringFuncFormatter("contains"),
|
|
187
187
|
"notcontains": this.createStringFuncFormatter("not contains"),
|
|
188
188
|
"notstartswith": this.createStringFuncFormatter("not startswith"),
|
|
189
|
-
"notendswith": this.createStringFuncFormatter("not endswith")
|
|
189
|
+
"notendswith": this.createStringFuncFormatter("not endswith"),
|
|
190
|
+
"in": this.createBinaryOperationFormatter("in")
|
|
190
191
|
});
|
|
191
192
|
}
|
|
192
193
|
|
|
@@ -270,7 +271,7 @@ var SteedosFilter = /*#__PURE__*/function () {
|
|
|
270
271
|
|
|
271
272
|
var fieldName = criteria[0],
|
|
272
273
|
value = criteria[2];
|
|
273
|
-
return formatter(DevExpressOData.serializePropName(fieldName), DevExpressOData.serializeValue(value, this.protocolVersion));
|
|
274
|
+
return formatter(DevExpressOData.serializePropName(fieldName), op === 'in' ? value : DevExpressOData.serializeValue(value, this.protocolVersion));
|
|
274
275
|
}
|
|
275
276
|
}, {
|
|
276
277
|
key: "compileCore",
|
package/lib/format.js
CHANGED
|
@@ -208,9 +208,9 @@ var formatFiltersToDev = function formatFiltersToDev(filters) {
|
|
|
208
208
|
|
|
209
209
|
if (["=", "in"].indexOf(option) > -1) {
|
|
210
210
|
if (value.length) {
|
|
211
|
-
_.each(value, function (v) {
|
|
212
|
-
|
|
213
|
-
});
|
|
211
|
+
sub_selector.push([field, "in", "(".concat(JSON.stringify(value).replace(/\"/g, "'").slice(1).slice(0, -1), ")")], "and"); // _.each(value, function (v) {
|
|
212
|
+
// return sub_selector.push([field, "=", v], "or");
|
|
213
|
+
// });
|
|
214
214
|
} else {
|
|
215
215
|
// 空数组返回空值
|
|
216
216
|
sub_selector.push([field, "=", "__badQueryForEmptyArray"], "and");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/filters",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.2.53-beta.
|
|
4
|
+
"version": "2.2.53-beta.3",
|
|
5
5
|
"description": "filters lib for steedos",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"files": [
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "5782f1171133c05cce158adef71e527d970ef50e"
|
|
35
35
|
}
|