@ -1,14 +1,18 @@
import * as filterTypes from './filterTypes' ;
export const ARRAY = 'array' ;
export const CONTAINS = 'contains' ;
export const DATE = 'date' ;
export const EQUAL = 'equal' ;
export const EXACT = 'exact' ;
export const NUMBER = 'number' ;
export const STRING = 'string' ;
export const all = [
ARRAY ,
CONTAINS ,
DATE ,
EQUAL ,
EXACT ,
NUMBER ,
STRING
@ -20,6 +24,10 @@ export const possibleFilterTypes = {
{ key : filterTypes . NOT _CONTAINS , value : 'does not contain' }
] ,
[ CONTAINS ] : [
{ key : filterTypes . CONTAINS , value : 'contains' }
] ,
[ DATE ] : [
{ key : filterTypes . LESS _THAN , value : 'is before' } ,
{ key : filterTypes . GREATER _THAN , value : 'is after' } ,
@ -29,6 +37,10 @@ export const possibleFilterTypes = {
{ key : filterTypes . NOT _IN _NEXT , value : 'not in the next' }
] ,
[ EQUAL ] : [
{ key : filterTypes . EQUAL , value : 'is' }
] ,
[ EXACT ] : [
{ key : filterTypes . EQUAL , value : 'is' } ,
{ key : filterTypes . NOT _EQUAL , value : 'is not' }
@ -47,6 +59,10 @@ export const possibleFilterTypes = {
{ key : filterTypes . CONTAINS , value : 'contains' } ,
{ key : filterTypes . NOT _CONTAINS , value : 'does not contain' } ,
{ key : filterTypes . EQUAL , value : 'equal' } ,
{ key : filterTypes . NOT _EQUAL , value : 'not equal' }
{ key : filterTypes . NOT _EQUAL , value : 'not equal' } ,
{ key : filterTypes . STARTS _WITH , value : 'starts with' } ,
{ key : filterTypes . NOT _STARTS _WITH , value : 'does not start with' } ,
{ key : filterTypes . ENDS _WITH , value : 'ends with' } ,
{ key : filterTypes . NOT _ENDS _WITH , value : 'does not end with' }
]
} ;