overview-components 1.1.179 → 1.1.181
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 type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'doesNotContain' | 'isEmpty' | 'isNotEmpty' | 'in' | 'nin' | 'fromTo' | 'startsWith' | 'endsWith' | 'is' | 'not' | 'isAnyOfValue';
|
|
2
|
-
export type FieldType = 'string' | 'select' | 'number' | 'date' | 'multiselect';
|
|
2
|
+
export type FieldType = 'string' | 'select' | 'number' | 'date' | 'dateTime' | 'multiselect';
|
|
3
3
|
export declare function getOperatorsByColumnType(type: FieldType): {
|
|
4
4
|
value: Operator;
|
|
5
5
|
label: string;
|
|
@@ -46,6 +46,19 @@ export function getOperatorsByColumnType(type) {
|
|
|
46
46
|
{ label: msg('není prázdné'), value: 'isNotEmpty' },
|
|
47
47
|
{ label: msg('od - do'), value: 'fromTo' },
|
|
48
48
|
];
|
|
49
|
+
case 'dateTime':
|
|
50
|
+
return [
|
|
51
|
+
{ label: msg('obsahuje'), value: 'contains' },
|
|
52
|
+
{ label: msg('rovná se'), value: '=' },
|
|
53
|
+
{ label: msg('nerovná se'), value: '!=' },
|
|
54
|
+
{ label: msg('větší než'), value: '>' },
|
|
55
|
+
{ label: msg('větší nebo rovné'), value: '>=' },
|
|
56
|
+
{ label: msg('menší než'), value: '<' },
|
|
57
|
+
{ label: msg('menší nebo rovné'), value: '<=' },
|
|
58
|
+
{ label: msg('je prázdné'), value: 'isEmpty' },
|
|
59
|
+
{ label: msg('není prázdné'), value: 'isNotEmpty' },
|
|
60
|
+
{ label: msg('od - do'), value: 'fromTo' },
|
|
61
|
+
];
|
|
49
62
|
default:
|
|
50
63
|
return [];
|
|
51
64
|
}
|
|
@@ -61,9 +74,10 @@ export function getDefaultOperator(type) {
|
|
|
61
74
|
case 'number':
|
|
62
75
|
return '=';
|
|
63
76
|
case 'date':
|
|
77
|
+
case 'dateTime':
|
|
64
78
|
return '=';
|
|
65
79
|
}
|
|
66
80
|
}
|
|
67
81
|
export function isAllowedType(type) {
|
|
68
|
-
return ['string', 'select', 'multiselect', 'number', 'date'].includes(type);
|
|
82
|
+
return ['string', 'select', 'multiselect', 'number', 'date', 'dateTime'].includes(type);
|
|
69
83
|
}
|