feat: add hover action support (#3994)

Co-authored-by: LawyZheng <lawyzheng1106@gmail.com>
This commit is contained in:
Mohamed Khalil
2025-12-09 17:27:26 +02:00
committed by GitHub
parent 0e8d667959
commit f49b07f30d
22 changed files with 281 additions and 13 deletions

View File

@@ -264,6 +264,7 @@ export interface CustomCredentialServiceConfigResponse {
export const ActionTypes = {
InputText: "input_text",
Click: "click",
Hover: "hover",
SelectOption: "select_option",
UploadFile: "upload_file",
complete: "complete",
@@ -290,6 +291,7 @@ export const ReadableActionTypes: {
} = {
input_text: "Input Text",
click: "Click",
hover: "Hover",
select_option: "Select Option",
upload_file: "Upload File",
complete: "Complete",

View File

@@ -7,6 +7,7 @@ type Props = {
const icons: Partial<Record<ActionType, React.ReactNode>> = {
click: <CursorArrowIcon className="h-4 w-4" />,
hover: <CursorArrowIcon className="h-4 w-4" />,
input_text: <InputIcon className="h-4 w-4" />,
};

View File

@@ -13,6 +13,7 @@ type Props = {
const icons: Partial<Record<ActionType, React.ReactNode>> = {
click: <CursorArrowIcon className="h-4 w-4" />,
hover: <CursorArrowIcon className="h-4 w-4" />,
complete: <CheckCircledIcon className="h-4 w-4" />,
input_text: <InputIcon className="h-4 w-4" />,
};

View File

@@ -18,6 +18,8 @@ function getActionInput(action: ActionApiResponse) {
input = action.text;
} else if (action.action_type === ActionTypes.Click) {
input = "Click";
} else if (action.action_type === ActionTypes.Hover) {
input = "Hover";
} else if (action.action_type === ActionTypes.SelectOption && action.option) {
input = action.option.label;
}