Split SimpleOperatorConfig
Reviewed By: lblasa Differential Revision: D49822512 fbshipit-source-id: 82fc6a72cd5ff3b5f9d577baea49367b4f2521fd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b4b2f93662
commit
446147b9fe
@@ -9,11 +9,13 @@
|
|||||||
|
|
||||||
// Mostly matches https://www.internalfb.com/code/www/html/intern/js/ui/PowerSearch/PowerSearchExampleConfig.js
|
// Mostly matches https://www.internalfb.com/code/www/html/intern/js/ui/PowerSearch/PowerSearchExampleConfig.js
|
||||||
|
|
||||||
export type SimpleFilterValueType =
|
export type NullishFilterValueType = 'NO_VALUE';
|
||||||
| 'NO_VALUE'
|
|
||||||
| 'INTEGER'
|
export type StringFilterValueType = 'STRING';
|
||||||
| 'STRING'
|
|
||||||
| 'STRING_SET';
|
export type StringSetFilterValueType = 'STRING_SET';
|
||||||
|
|
||||||
|
export type IntegerFilterValueType = 'INTEGER';
|
||||||
|
|
||||||
export type FloatFilterValueType = 'FLOAT';
|
export type FloatFilterValueType = 'FLOAT';
|
||||||
|
|
||||||
@@ -21,8 +23,27 @@ export type EnumFilterValueType = 'ENUM' | 'ENUM_SET';
|
|||||||
|
|
||||||
export type AbsoluteDateFilterValueType = 'ABSOLUTE_DATE';
|
export type AbsoluteDateFilterValueType = 'ABSOLUTE_DATE';
|
||||||
|
|
||||||
export type SimpleOperatorConfig = {
|
export type NullishOperatorConfig = {
|
||||||
valueType: SimpleFilterValueType;
|
valueType: NullishFilterValueType;
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type StringOperatorConfig = {
|
||||||
|
valueType: StringFilterValueType;
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
handleUnknownValues?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type StringSetOperatorConfig = {
|
||||||
|
valueType: StringSetFilterValueType;
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type IntegerOperatorConfig = {
|
||||||
|
valueType: IntegerFilterValueType;
|
||||||
key: string;
|
key: string;
|
||||||
label: string;
|
label: string;
|
||||||
};
|
};
|
||||||
@@ -51,7 +72,10 @@ export type AbsoluteDateOperatorConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type OperatorConfig =
|
export type OperatorConfig =
|
||||||
| SimpleOperatorConfig
|
| NullishOperatorConfig
|
||||||
|
| StringOperatorConfig
|
||||||
|
| StringSetOperatorConfig
|
||||||
|
| IntegerOperatorConfig
|
||||||
| FloatOperatorConfig
|
| FloatOperatorConfig
|
||||||
| EnumOperatorConfig
|
| EnumOperatorConfig
|
||||||
| AbsoluteDateOperatorConfig;
|
| AbsoluteDateOperatorConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user