Add available variables dropdown (#7964)

- Add variable dropdown
- Insert variables on click
- Save variable as `{{stepName.object.myVar}}` and display only `myVar`


https://github.com/user-attachments/assets/9b49e32c-15e6-4b64-9901-0e63664bc3e8
This commit is contained in:
Thomas Trompette
2024-10-23 18:32:10 +02:00
committed by GitHub
parent 18778c55ac
commit 2e8b8452c1
17 changed files with 997 additions and 5 deletions

View File

@ -0,0 +1,30 @@
import { WorkflowStepMock } from '@/workflow/search-variables/types/WorkflowStepMock';
export const AVAILABLE_VARIABLES_MOCK: WorkflowStepMock[] = [
{
id: '1',
name: 'Person is Created',
output: {
userId: '1',
recordId: '123',
objectMetadataItem: {
id: '1234',
nameSingular: 'person',
namePlural: 'people',
},
properties: {
after: {
name: 'John Doe',
email: 'john.doe@email.com',
},
},
},
},
{
id: '2',
name: 'Send Email',
output: {
success: true,
},
},
];

View File

@ -0,0 +1 @@
export const SEARCH_VARIABLES_DROPDOWN_ID = 'search-variables';