namirasoft-core
Advanced tools
Comparing version 1.3.66 to 1.3.67
@@ -17,3 +17,3 @@ import { FilterItemColumnType } from "./FilterItemColumnType"; | ||
static getAll(): FilterItemOperator[]; | ||
static getAllByType(type: FilterItemColumnType): FilterItemOperator[]; | ||
static getAllByType(type: FilterItemColumnType, required: boolean): FilterItemOperator[]; | ||
static getByName(name: string): FilterItemOperator; | ||
@@ -24,4 +24,4 @@ static getBySign(sign: string): FilterItemOperator; | ||
count: number; | ||
accepts: (type: FilterItemColumnType) => boolean; | ||
constructor(name: string, sign: string, count: number, accepts: (type: FilterItemColumnType) => boolean); | ||
accepts: (type: FilterItemColumnType, required: boolean) => boolean; | ||
constructor(name: string, sign: string, count: number, accepts: (type: FilterItemColumnType, required: boolean) => boolean); | ||
} |
@@ -10,4 +10,4 @@ "use strict"; | ||
} | ||
static getAllByType(type) { | ||
return FilterItemOperator.getAll().filter(f => f.accepts(type)); | ||
static getAllByType(type, required) { | ||
return FilterItemOperator.getAll().filter(f => f.accepts(type, required)); | ||
} | ||
@@ -39,3 +39,3 @@ static getByName(name) { | ||
empty: new FilterItemOperator("Empty", "?", 0, (type) => { return type != FilterItemColumnType_1.FilterItemColumnType.Any; }), | ||
exists: new FilterItemOperator("Exists", "??", 0, (_) => { return true; }), | ||
exists: new FilterItemOperator("Exists", "??", 0, (_, required) => { return !required; }), | ||
startswith: new FilterItemOperator("Starts With", "(", 1, (type) => { return type == FilterItemColumnType_1.FilterItemColumnType.String; }), | ||
@@ -42,0 +42,0 @@ endswith: new FilterItemOperator("Ends With", ")", 1, (type) => { return type == FilterItemColumnType_1.FilterItemColumnType.String; }), |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.3.66", | ||
"version": "1.3.67", | ||
"author": "Amir Abolhasani", | ||
@@ -14,0 +14,0 @@ "license": "MIT", |
@@ -11,3 +11,3 @@ import { ErrorOperation } from "./ErrorOperation"; | ||
empty: new FilterItemOperator("Empty", "?", 0, (type: FilterItemColumnType) => { return type != FilterItemColumnType.Any; }), | ||
exists: new FilterItemOperator("Exists", "??", 0, (_: FilterItemColumnType) => { return true; }), | ||
exists: new FilterItemOperator("Exists", "??", 0, (_: FilterItemColumnType, required: boolean) => { return !required; }), | ||
startswith: new FilterItemOperator("Starts With", "(", 1, (type: FilterItemColumnType) => { return type == FilterItemColumnType.String; }), | ||
@@ -24,5 +24,5 @@ endswith: new FilterItemOperator("Ends With", ")", 1, (type: FilterItemColumnType) => { return type == FilterItemColumnType.String; }), | ||
} | ||
static getAllByType(type: FilterItemColumnType): FilterItemOperator[] | ||
static getAllByType(type: FilterItemColumnType, required: boolean): FilterItemOperator[] | ||
{ | ||
return FilterItemOperator.getAll().filter(f => f.accepts(type)); | ||
return FilterItemOperator.getAll().filter(f => f.accepts(type, required)); | ||
} | ||
@@ -46,4 +46,4 @@ static getByName(name: string): FilterItemOperator | ||
count: number; | ||
accepts: (type: FilterItemColumnType) => boolean; | ||
constructor(name: string, sign: string, count: number, accepts: (type: FilterItemColumnType) => boolean) | ||
accepts: (type: FilterItemColumnType, required: boolean) => boolean; | ||
constructor(name: string, sign: string, count: number, accepts: (type: FilterItemColumnType, required: boolean) => boolean) | ||
{ | ||
@@ -50,0 +50,0 @@ this.name = name; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
361148