namirasoft-core
Advanced tools
Comparing version 1.4.39 to 1.4.40
@@ -73,3 +73,3 @@ "use strict"; | ||
if (this.values.length != operator.count) | ||
throw new Error(`Invalid count of values: ${this.values.length}.${operator.count} is required.`); | ||
throw new Error(`Invalid count of values: ${this.values.length} is provided but ${operator.count} is required.`); | ||
} | ||
@@ -76,0 +76,0 @@ getCommand() { |
export declare enum FilterItemColumnType { | ||
Any = "Any", | ||
Unknown = "Any", | ||
Boolean = "Boolean", | ||
@@ -4,0 +4,0 @@ Number = "Number", |
@@ -6,3 +6,3 @@ "use strict"; | ||
(function (FilterItemColumnType) { | ||
FilterItemColumnType["Any"] = "Any"; | ||
FilterItemColumnType["Unknown"] = "Any"; | ||
FilterItemColumnType["Boolean"] = "Boolean"; | ||
@@ -9,0 +9,0 @@ FilterItemColumnType["Number"] = "Number"; |
@@ -9,2 +9,3 @@ import { FilterItemColumnType } from "./FilterItemColumnType"; | ||
exists: FilterItemOperator; | ||
includes: FilterItemOperator; | ||
startswith: FilterItemOperator; | ||
@@ -11,0 +12,0 @@ endswith: FilterItemOperator; |
@@ -34,7 +34,8 @@ "use strict"; | ||
FilterItemOperator.all = { | ||
equals: new FilterItemOperator("Equals", "=", 1, (_) => { return true; }), | ||
equals: new FilterItemOperator("Equals", "=", 1, (type) => { return type != FilterItemColumnType_1.FilterItemColumnType.Unknown; }), | ||
contains: new FilterItemOperator("Contains", ":", 1, (type) => { return type == FilterItemColumnType_1.FilterItemColumnType.Number || type == FilterItemColumnType_1.FilterItemColumnType.String; }), | ||
regex: new FilterItemOperator("Regex", "*", 1, (type) => { return type == FilterItemColumnType_1.FilterItemColumnType.Number || type == FilterItemColumnType_1.FilterItemColumnType.String; }), | ||
empty: new FilterItemOperator("Empty", "?", 0, (type) => { return type != FilterItemColumnType_1.FilterItemColumnType.Any; }), | ||
empty: new FilterItemOperator("Empty", "?", 0, (type) => { return type != FilterItemColumnType_1.FilterItemColumnType.Unknown; }), | ||
exists: new FilterItemOperator("Exists", "??", 0, (_, required) => { return !required; }), | ||
includes: new FilterItemOperator("Includes", "??", 1, (_, required) => { return !required; }), | ||
startswith: new FilterItemOperator("Starts With", "(", 1, (type) => { return type == FilterItemColumnType_1.FilterItemColumnType.String; }), | ||
@@ -41,0 +42,0 @@ endswith: new FilterItemOperator("Ends With", ")", 1, (type) => { return type == FilterItemColumnType_1.FilterItemColumnType.String; }), |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.4.39", | ||
"version": "1.4.40", | ||
"author": "Amir Abolhasani", | ||
@@ -26,4 +26,4 @@ "license": "MIT", | ||
"phone": "^3.1.57", | ||
"uuid": "^11.0.4" | ||
"uuid": "^11.0.5" | ||
} | ||
} |
@@ -96,3 +96,3 @@ import { BaseMetaColumn } from "./BaseMetaColumn"; | ||
if (this.values.length != operator.count) | ||
throw new Error(`Invalid count of values: ${this.values.length}.${operator.count} is required.`); | ||
throw new Error(`Invalid count of values: ${this.values.length} is provided but ${operator.count} is required.`); | ||
} | ||
@@ -99,0 +99,0 @@ getCommand() |
export enum FilterItemColumnType | ||
{ | ||
Any = "Any", | ||
Unknown = "Any", | ||
Boolean = "Boolean", | ||
@@ -5,0 +5,0 @@ Number = "Number", |
@@ -7,7 +7,8 @@ import { ErrorOperation } from "./ErrorOperation"; | ||
static all = { | ||
equals: new FilterItemOperator("Equals", "=", 1, (_: FilterItemColumnType) => { return true; }), | ||
equals: new FilterItemOperator("Equals", "=", 1, (type: FilterItemColumnType) => { return type != FilterItemColumnType.Unknown; }), | ||
contains: new FilterItemOperator("Contains", ":", 1, (type: FilterItemColumnType) => { return type == FilterItemColumnType.Number || type == FilterItemColumnType.String; }), | ||
regex: new FilterItemOperator("Regex", "*", 1, (type: FilterItemColumnType) => { return type == FilterItemColumnType.Number || type == FilterItemColumnType.String; }), | ||
empty: new FilterItemOperator("Empty", "?", 0, (type: FilterItemColumnType) => { return type != FilterItemColumnType.Any; }), | ||
empty: new FilterItemOperator("Empty", "?", 0, (type: FilterItemColumnType) => { return type != FilterItemColumnType.Unknown; }), | ||
exists: new FilterItemOperator("Exists", "??", 0, (_: FilterItemColumnType, required: boolean) => { return !required; }), | ||
includes: new FilterItemOperator("Includes", "??", 1, (_: FilterItemColumnType, required: boolean) => { return !required; }), | ||
startswith: new FilterItemOperator("Starts With", "(", 1, (type: FilterItemColumnType) => { return type == FilterItemColumnType.String; }), | ||
@@ -14,0 +15,0 @@ endswith: new FilterItemOperator("Ends With", ")", 1, (type: FilterItemColumnType) => { return type == FilterItemColumnType.String; }), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
434363
5809
Updateduuid@^11.0.5