@steedos/filters 2.2.52-beta.7 → 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/LICENSE.txt CHANGED
@@ -6,14 +6,11 @@ To determine under which license you may use a file from the Steedos source code
6
6
  please resort to the header of that file.
7
7
 
8
8
  If the file has no header, the following rules apply
9
- 1. project templates are licensed under MIT, see License.MIT.txt
10
- 2. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
11
- 3. source code that is neither (1) nor (2) is licensed under AGPL, see License.AGPL.txt
9
+ 1. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
10
+ 2. source code that is neither (1) is licensed under MIT, see https://opensource.org/licenses/MIT
12
11
 
13
12
  On request, licenses under different terms are available.
14
13
 
15
- Project templates can be found in the folders steedos-projects/
16
-
17
14
  Source code of enterprise features are files that
18
15
  * are in folders named "ee" or start with "ee_", or in subfolders of such folders.
19
16
  * contain the strings "ee_" in its filename name.
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
@@ -70,9 +70,9 @@ var formatFiltersToDev = function formatFiltersToDev(filters) {
70
70
  }
71
71
 
72
72
  var utcOffset = userContext.user ? userContext.user.utcOffset : 0;
73
- userContext = extendUserContext(userContext, utcOffset); // 2019-03-23T01:00:33.524Z2019-03-23T01:00:33Z这种格式
73
+ userContext = extendUserContext(userContext, utcOffset); // 2019-03-23T01:00:33.524Z2019-03-23T01:00:33Z、2022-06-11T00:00:00.444+08:00这种格式
74
74
 
75
- var regDate = /^\d{4}-\d{1,2}-\d{1,2}(T|\s)\d{1,2}\:\d{1,2}(\:\d{1,2}(\.\d{1,3})?)?(Z)?$/;
75
+ var regDate = /^\d{4}-\d{1,2}-\d{1,2}(T|\s)\d{1,2}\:\d{1,2}(\:\d{1,2}(\.\d{1,3})?)?(Z|((\+|\-)\d{1,2}\:\d{1,2}))?$/;
76
76
 
77
77
  var _filtersLooper, selector;
78
78
 
@@ -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
- return sub_selector.push([field, "=", v], "or");
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.52-beta.7",
4
+ "version": "2.2.53-beta.3",
5
5
  "description": "filters lib for steedos",
6
6
  "main": "lib/index.js",
7
7
  "files": [
@@ -13,28 +13,23 @@
13
13
  "build": "babel -d lib src/"
14
14
  },
15
15
  "dependencies": {
16
- "@babel/runtime": "^7.5.4",
16
+ "@babel/runtime": "7.12.18",
17
17
  "moment": "^2.24.0",
18
18
  "underscore": "^1.9.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@babel/cli": "^7.5.0",
22
- "@babel/core": "^7.5.4",
23
- "@babel/plugin-proposal-class-properties": "^7.5.0",
24
- "@babel/plugin-proposal-json-strings": "^7.2.0",
25
- "@babel/plugin-syntax-dynamic-import": "^7.2.0",
26
- "@babel/plugin-syntax-import-meta": "^7.2.0",
27
- "@babel/plugin-transform-runtime": "^7.4.4",
28
- "@babel/preset-env": "^7.5.4",
29
- "@babel/register": "^7.4.4",
30
- "chai": "^4.2.0",
31
- "chai-as-promised": "^7.1.1",
32
- "jslint": "^0.12.1",
33
- "mocha": "^5.2.0",
34
- "sinon-chai": "^3.3.0"
21
+ "@babel/cli": "^7.8.4",
22
+ "@babel/core": "^7.8.4",
23
+ "@babel/plugin-proposal-class-properties": "^7.8.4",
24
+ "@babel/plugin-proposal-json-strings": "^7.8.4",
25
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
26
+ "@babel/plugin-syntax-import-meta": "^7.8.4",
27
+ "@babel/plugin-transform-runtime": "^7.8.4",
28
+ "@babel/preset-env": "^7.8.4",
29
+ "@babel/register": "^7.8.4"
35
30
  },
36
31
  "publishConfig": {
37
32
  "access": "public"
38
33
  },
39
- "gitHead": "ecf8b1cc86813d63697cca572cde7a4d996643d6"
34
+ "gitHead": "5782f1171133c05cce158adef71e527d970ef50e"
40
35
  }