add regex operators

This commit is contained in:
Francis Cao committed 2026-02-20 13:43:16 -08:00
1 parent 67626652f9
commit f2cf071523
59 files changed
+136 -2

No files matched your search

+12 -1
View File
@@ -14,6 +14,8 @@ export function useFilters() {
{ name: 'neq', type: 'string', label: t(labels.isNot) },
{ name: 'c', type: 'string', label: t(labels.contains) },
{ name: 'dnc', type: 'string', label: t(labels.doesNotContain) },
{ name: 're', type: 'string', label: t(labels.regexMatch) },
{ name: 'nre', type: 'string', label: t(labels.regexNotMatch) },
{ name: 'i', type: 'array', label: t(labels.includes) },
{ name: 'dni', type: 'array', label: t(labels.doesNotInclude) },
{ name: 't', type: 'boolean', label: t(labels.isTrue) },
@@ -36,6 +38,8 @@ export function useFilters() {
[OPERATORS.notSet]: t(labels.isNotSet),
[OPERATORS.contains]: t(labels.contains),
[OPERATORS.doesNotContain]: t(labels.doesNotContain),
[OPERATORS.regex]: t(labels.regexMatch),
[OPERATORS.notRegex]: t(labels.regexNotMatch),
[OPERATORS.true]: t(labels.true),
[OPERATORS.false]: t(labels.false),
[OPERATORS.greaterThan]: t(labels.greaterThan),
@@ -47,7 +51,14 @@ export function useFilters() {
};
const typeFilters = {
string: [OPERATORS.equals, OPERATORS.notEquals, OPERATORS.contains, OPERATORS.doesNotContain],
string: [
OPERATORS.equals,
OPERATORS.notEquals,
OPERATORS.contains,
OPERATORS.doesNotContain,
OPERATORS.regex,
OPERATORS.notRegex,
],
array: [OPERATORS.contains, OPERATORS.doesNotContain],
boolean: [OPERATORS.true, OPERATORS.false],
number: [
+2
View File
@@ -198,6 +198,8 @@ export const labels: Record<string, string> = {
lessThanEquals: 'label.less-than-equals',
contains: 'label.contains',
doesNotContain: 'label.does-not-contain',
regexMatch: 'label.regex-match',
regexNotMatch: 'label.regex-not-match',
includes: 'label.includes',
doesNotInclude: 'label.does-not-include',
before: 'label.before',