eservices-core 1.0.545 → 1.0.547

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.
@@ -1,5 +1,5 @@
1
1
  export interface IFilters {
2
- [filterName: string]: IFilterDate | IFilterString | IFilterEnum | number;
2
+ [filterName: string]: IFilterDate | IFilterString | IFilterEnum | number | null;
3
3
  }
4
4
  /**
5
5
  * @description Generate filter's string by provided input data.
@@ -27,6 +27,7 @@ declare namespace Filter {
27
27
  export var eq: (name: string, values: string | number | IFilterEnum) => string;
28
28
  var _a: (name: string, values: IFilterEnum) => string;
29
29
  export var and: (...expressions: string[]) => string;
30
+ export var is: (name: string, value: string) => string;
30
31
  export { _a as in };
31
32
  }
32
33
  export default Filter;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * eservices-core v1.0.545
2
+ * eservices-core v1.0.547
3
3
  * (c) 2023 ESERVICES
4
4
  */
5
5
  'use strict';
@@ -5164,6 +5164,10 @@ function Filter(filters) {
5164
5164
  arrayFilter.push(`@${name} eq ${values}`);
5165
5165
  return arrayFilter;
5166
5166
  }
5167
+ if (values === null) {
5168
+ arrayFilter.push(Filter.is(name, values));
5169
+ return arrayFilter;
5170
+ }
5167
5171
  return arrayFilter;
5168
5172
  }, []).join(" and ");
5169
5173
  }
@@ -5184,6 +5188,9 @@ Filter.in = function include(name, values) {
5184
5188
  };
5185
5189
  Filter.and = function and(...expressions) {
5186
5190
  return expressions.join(' and ');
5191
+ };
5192
+ Filter.is = function is(name, value) {
5193
+ return `@${name} is ${value}`;
5187
5194
  };
5188
5195
 
5189
5196
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "1.0.545",
3
+ "version": "1.0.547",
4
4
  "description": "Core library",
5
5
  "author": "",
6
6
  "scripts": {