From 31a94c611f9b073d7a3283de0bf666c2135281b2 Mon Sep 17 00:00:00 2001 From: Marat Gubaidullin Date: Fri, 20 Oct 2023 09:22:08 -0400 Subject: [PATCH] Designer for Camel YAML DSL 4.1.0 --- karavan-designer/src/designer/beans/BeanProperties.tsx | 6 +++--- karavan-designer/src/designer/beans/BeansDesigner.tsx | 2 +- karavan-designer/src/designer/kamelet/KameletDesigner.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/karavan-designer/src/designer/beans/BeanProperties.tsx b/karavan-designer/src/designer/beans/BeanProperties.tsx index fdb73d2af16..455291c435f 100644 --- a/karavan-designer/src/designer/beans/BeanProperties.tsx +++ b/karavan-designer/src/designer/beans/BeanProperties.tsx @@ -73,7 +73,7 @@ export function BeanProperties (props: Props) { function onBeanPropertyUpdate () { if (selectedStep) { - const bean = CamelUtil.cloneBean(selectedStep); + const bean = CamelUtil.cloneBean(selectedStep as RegistryBeanDefinition); const beanProperties: any = {}; properties.forEach((p: any) => beanProperties[p[0]] = p[1]); bean.properties = beanProperties; @@ -83,7 +83,7 @@ export function BeanProperties (props: Props) { function beanFieldChanged (fieldId: string, value: string) { if (selectedStep) { - const bean = CamelUtil.cloneBean(selectedStep); + const bean = CamelUtil.cloneBean(selectedStep as RegistryBeanDefinition); (bean as any)[fieldId] = value; props.onChange(bean); } @@ -137,7 +137,7 @@ export function BeanProperties (props: Props) { function cloneBean () { if (selectedStep) { - const bean = CamelUtil.cloneBean(selectedStep); + const bean = CamelUtil.cloneBean(selectedStep as RegistryBeanDefinition); bean.uuid = uuidv4(); props.onClone(bean); } diff --git a/karavan-designer/src/designer/beans/BeansDesigner.tsx b/karavan-designer/src/designer/beans/BeansDesigner.tsx index 64bac96fe27..8cd99f254a8 100644 --- a/karavan-designer/src/designer/beans/BeansDesigner.tsx +++ b/karavan-designer/src/designer/beans/BeansDesigner.tsx @@ -49,7 +49,7 @@ export function BeansDesigner() { } function deleteBean() { - const i = CamelDefinitionApiExt.deleteBeanFromIntegration(integration, selectedStep); + const i = CamelDefinitionApiExt.deleteBeanFromIntegration(integration, selectedStep as RegistryBeanDefinition); setIntegration(i, false); setShowDeleteConfirmation(false); setSelectedStep(undefined); diff --git a/karavan-designer/src/designer/kamelet/KameletDesigner.tsx b/karavan-designer/src/designer/kamelet/KameletDesigner.tsx index dd889b92d34..c235ef9b48f 100644 --- a/karavan-designer/src/designer/kamelet/KameletDesigner.tsx +++ b/karavan-designer/src/designer/kamelet/KameletDesigner.tsx @@ -52,7 +52,7 @@ export function KameletDesigner() { } function deleteBean() { - const i = CamelDefinitionApiExt.deleteBeanFromIntegration(integration, selectedStep); + const i = CamelDefinitionApiExt.deleteBeanFromIntegration(integration, selectedStep as RegistryBeanDefinition); setIntegration(i, false); setShowDeleteConfirmation(false); setSelectedStep(undefined);