Skip to content

Commit

Permalink
Designer for Camel YAML DSL 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mgubaidullin committed Oct 20, 2023
1 parent 86beea5 commit 31a94c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions karavan-designer/src/designer/beans/BeanProperties.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion karavan-designer/src/designer/beans/BeansDesigner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion karavan-designer/src/designer/kamelet/KameletDesigner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 31a94c6

Please sign in to comment.