Skip to content

Commit

Permalink
chore(CanvasForm): Move CanvasForm to dedicated folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lordrip committed Aug 30, 2024
1 parent 1ede935 commit 76cb4e6
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TopologySideBar } from '@patternfly/react-topology';
import { FunctionComponent } from 'react';
import { ErrorBoundary } from '../../ErrorBoundary';
import { CanvasForm } from './CanvasForm';
import { CanvasForm } from './Form/CanvasForm';
import { CanvasNode } from './canvas.models';
import './CanvasSideBar.scss';
import { FilteredFieldProvider } from '../../../providers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ import {
IKameletDefinition,
KameletVisualEntity,
KaotoSchemaDefinition,
} from '../../../models';
import { IVisualizationNode, VisualComponentSchema } from '../../../models/visualization/base-visual-entity';
import { VisualFlowsApi } from '../../../models/visualization/flows/support/flows-visibility';
} from '../../../../models';
import { IVisualizationNode, VisualComponentSchema } from '../../../../models/visualization/base-visual-entity';
import { VisualFlowsApi } from '../../../../models/visualization/flows/support/flows-visibility';
import {
CanvasFormTabsContext,
CanvasFormTabsProvider,
VisibleFlowsContext,
VisibleFlowsProvider,
} from '../../../providers';
import { EntitiesContext, EntitiesProvider } from '../../../providers/entities.provider';
import { camelRouteJson, kameletJson } from '../../../stubs';
import { getFirstCatalogMap } from '../../../stubs/test-load-catalog';
import { ROOT_PATH } from '../../../utils';
} from '../../../../providers';
import { EntitiesContext, EntitiesProvider } from '../../../../providers/entities.provider';
import { camelRouteJson, kameletJson } from '../../../../stubs';
import { getFirstCatalogMap } from '../../../../stubs/test-load-catalog';
import { ROOT_PATH } from '../../../../utils';
import { CanvasForm } from './CanvasForm';
import { CanvasNode } from './canvas.models';
import { FlowService } from './flow.service';
import { CanvasNode } from '../canvas.models';
import { FlowService } from '../flow.service';

describe('CanvasForm', () => {
let camelRouteVisualEntity: CamelRouteVisualEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Card, CardBody, CardHeader } from '@patternfly/react-core';
import { FunctionComponent, useCallback, useContext, useEffect, useMemo, useRef } from 'react';
import { VisibleFlowsContext } from '../../../providers';
import { ErrorBoundary } from '../../ErrorBoundary';
import { CanvasNode } from './canvas.models';
import { VisibleFlowsContext } from '../../../../providers';
import { ErrorBoundary } from '../../../ErrorBoundary';
import { CanvasNode } from '../canvas.models';
import './CanvasForm.scss';
import { CanvasFormBody } from './Form/CanvasFormBody';
import { CanvasFormHeader } from './Form/CanvasFormHeader';
import { CanvasFormBody } from './CanvasFormBody';
import { CanvasFormHeader } from './CanvasFormHeader';

interface CanvasFormProps {
selectedNode: CanvasNode;
Expand All @@ -29,6 +29,7 @@ export const CanvasForm: FunctionComponent<CanvasFormProps> = (props) => {
/** Store the flow's initial Id */
useEffect(() => {
flowIdRef.current = props.selectedNode.data?.vizNode?.getId();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const onClose = useCallback(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { AutoField, AutoFields, AutoForm } from '@kaoto-next/uniforms-patternfly
import catalogLibrary from '@kaoto/camel-catalog/index.json';
import { CatalogLibrary } from '@kaoto/camel-catalog/types';
import { render } from '@testing-library/react';
import { CamelCatalogService, CatalogKind, ICamelComponentDefinition } from '../../../models';
import { getFirstCatalogMap } from '../../../stubs/test-load-catalog';
import { SchemaService } from '../../Form';
import { CustomAutoFieldDetector } from '../../Form/CustomAutoField';
import { CamelCatalogService, CatalogKind, ICamelComponentDefinition } from '../../../../models';
import { getFirstCatalogMap } from '../../../../stubs/test-load-catalog';
import { SchemaService } from '../../../Form';
import { CustomAutoFieldDetector } from '../../../Form/CustomAutoField';

describe('Form - components', () => {
let componentCatalogMap: Record<string, ICamelComponentDefinition>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { AutoField, AutoFields, AutoForm } from '@kaoto-next/uniforms-patternfly
import catalogLibrary from '@kaoto/camel-catalog/index.json';
import { CatalogLibrary } from '@kaoto/camel-catalog/types';
import { render } from '@testing-library/react';
import { CamelCatalogService, CatalogKind, ICamelProcessorDefinition } from '../../../models';
import { getFirstCatalogMap } from '../../../stubs/test-load-catalog';
import { SchemaService } from '../../Form';
import { CustomAutoFieldDetector } from '../../Form/CustomAutoField';
import { CamelCatalogService, CatalogKind, ICamelProcessorDefinition } from '../../../../models';
import { getFirstCatalogMap } from '../../../../stubs/test-load-catalog';
import { SchemaService } from '../../../Form';
import { CustomAutoFieldDetector } from '../../../Form/CustomAutoField';

describe('Form - EIPs', () => {
let patternCatalogMap: Record<string, ICamelProcessorDefinition>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { AutoField, AutoFields, AutoForm } from '@kaoto-next/uniforms-patternfly
import catalogLibrary from '@kaoto/camel-catalog/index.json';
import { CatalogLibrary } from '@kaoto/camel-catalog/types';
import { render } from '@testing-library/react';
import { CamelCatalogService, CatalogKind, IKameletDefinition } from '../../../models';
import { getFirstCatalogMap } from '../../../stubs/test-load-catalog';
import { SchemaService } from '../../Form';
import { CustomAutoFieldDetector } from '../../Form/CustomAutoField';
import { CamelCatalogService, CatalogKind, IKameletDefinition } from '../../../../models';
import { getFirstCatalogMap } from '../../../../stubs/test-load-catalog';
import { SchemaService } from '../../../Form';
import { CustomAutoFieldDetector } from '../../../Form/CustomAutoField';

describe('Form - Kamelets', () => {
let kameletCatalogMap: Record<string, IKameletDefinition>;
Expand Down

0 comments on commit 76cb4e6

Please sign in to comment.