Add first filter step version (#13093)

I rebuilt the advanced filters used in views and workflow search for a
specific filter step.

Components structure remains the same, using `stepFilterGroups` and
`stepFilters`. But those filters are directly sent to backend.

Also re-using the same kind of states we use for advanced filters to
share the current filters used. And a context to share what's coming
from workflow props (function to update step settings and readonly)

⚠️ this PR only focusses on the content of the step. There is still a
lot to do on the filter icon behavior in the workflow



https://github.com/user-attachments/assets/8a6a76f0-11fa-444a-82b9-71fc96b18af4
This commit is contained in:
Thomas Trompette
2025-07-09 13:52:07 +02:00
committed by GitHub
parent 0316c857d8
commit 6e79339e64
67 changed files with 3851 additions and 396 deletions

View File

@ -1,4 +1,4 @@
import { ObjectRecordsPermissions } from '@/types/ObjectRecordsPermissions';
import { ObjectRecordsPermissions } from './ObjectRecordsPermissions';
type RoleId = string;
export type ObjectRecordsPermissionsByRoleId = Record<

View File

@ -0,0 +1,36 @@
export enum StepLogicalOperator {
AND = 'AND',
OR = 'OR',
}
export enum StepOperand {
EQ = 'eq',
NE = 'ne',
GT = 'gt',
GTE = 'gte',
LT = 'lt',
LTE = 'lte',
LIKE = 'like',
ILIKE = 'ilike',
IN = 'in',
IS = 'is',
}
export type StepFilterGroup = {
id: string;
logicalOperator: StepLogicalOperator;
parentStepFilterGroupId?: string;
positionInStepFilterGroup?: number;
};
export type StepFilter = {
id: string;
type: string;
label: string;
value: string;
operand: StepOperand;
displayValue: string;
stepFilterGroupId: string;
stepOutputKey: string;
positionInStepFilterGroup?: number;
};

View File

@ -13,3 +13,5 @@ export { FieldMetadataType } from './FieldMetadataType';
export type { IsExactly } from './IsExactly';
export type { ObjectRecordsPermissions } from './ObjectRecordsPermissions';
export type { ObjectRecordsPermissionsByRoleId } from './ObjectRecordsPermissionsByRoleId';
export type { StepFilterGroup, StepFilter } from './StepFilters';
export { StepLogicalOperator, StepOperand } from './StepFilters';