Skip to content

Commit

Permalink
chore: Move supporting classes to support folder
Browse files Browse the repository at this point in the history
As preparation to reorganize Visual entities classes, the first step is
to move the non-visual classes to the `support` folder.
  • Loading branch information
lordrip committed Mar 21, 2024
1 parent d6e068f commit 762c337
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PlusIcon } from '@patternfly/react-icons';
import { FunctionComponent, PropsWithChildren, useCallback, useContext, useState } from 'react';
import { useEntityContext } from '../../../../hooks/useEntityContext/useEntityContext';
import { SourceSchemaType } from '../../../../models/camel';
import { FlowTemplateService } from '../../../../models/visualization/flows/flow-templates-service';
import { FlowTemplateService } from '../../../../models/visualization/flows/support/flow-templates-service';
import { SourceCodeApiContext } from '../../../../providers';
import { VisibleFlowsContext } from '../../../../providers/visible-flows.provider';
import { FlowTypeSelector } from './FlowTypeSelector';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { FlowsList } from './FlowsList';
import { act, fireEvent, render } from '@testing-library/react';
import { EntitiesContextResult } from '../../../../hooks';
import { SourceSchemaType } from '../../../../models/camel';
import { CamelRouteVisualEntity } from '../../../../models/visualization/flows';
import { IVisibleFlows, VisualFlowsApi } from '../../../../models/visualization/flows/support/flows-visibility';
import { EntitiesContext } from '../../../../providers/entities.provider';
import { EntitiesContextResult } from '../../../../hooks';
import { IVisibleFlows, VisualFlowsApi } from '../../../../models/visualization/flows/flows-visibility';
import { VisibleFlowsContext, VisibleFLowsContextResult } from '../../../../providers/visible-flows.provider';
import { VisibleFLowsContextResult, VisibleFlowsContext } from '../../../../providers/visible-flows.provider';
import { FlowsList } from './FlowsList';

const getContextValue = () => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { act, fireEvent, render } from '@testing-library/react';
import { EntitiesContextResult } from '../../../../hooks';
import { SourceSchemaType } from '../../../../models/camel';
import { CamelRouteVisualEntity } from '../../../../models/visualization/flows';
import { IVisibleFlows } from '../../../../models/visualization/flows/flows-visibility';
import { IVisibleFlows } from '../../../../models/visualization/flows/support/flows-visibility';
import { EntitiesContext } from '../../../../providers/entities.provider';
import { VisibleFLowsContextResult, VisibleFlowsContext } from '../../../../providers/visible-flows.provider';
import { FlowsMenu } from './FlowsMenu';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Badge, Icon, MenuToggle, MenuToggleAction, MenuToggleElement, Select } from '@patternfly/react-core';
import { ListIcon } from '@patternfly/react-icons';
import { FunctionComponent, Ref, useCallback, useContext, useState } from 'react';
import { getVisibleFlowsInformation } from '../../../../models/visualization/flows/flows-visibility';
import { getVisibleFlowsInformation } from '../../../../models/visualization/flows/support/flows-visibility';
import { VisibleFlowsContext } from '../../../../providers/visible-flows.provider';
import { FlowsList } from './FlowsList';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/models/camel/camel-route-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { AddStepMode } from '../visualization/base-visual-entity';
import { CamelRouteVisualEntity, isCamelFrom, isCamelRoute } from '../visualization/flows';
import { CamelErrorHandlerVisualEntity } from '../visualization/flows/camel-error-handler-visual-entity';
import { CamelOnExceptionVisualEntity } from '../visualization/flows/camel-on-exception-visual-entity';
import { FlowTemplateService } from '../visualization/flows/flow-templates-service';
import { NonVisualEntity } from '../visualization/flows/non-visual-entity';
import { CamelComponentFilterService } from '../visualization/flows/support/camel-component-filter.service';
import { CamelRouteVisualEntityData } from '../visualization/flows/support/camel-component-types';
import { FlowTemplateService } from '../visualization/flows/support/flow-templates-service';
import { BeansEntity, isBeans } from '../visualization/metadata';
import { BeansAwareResource, CamelResource } from './camel-resource';
import { BaseCamelEntity } from './entities';
Expand Down
10 changes: 5 additions & 5 deletions packages/ui/src/models/camel/kamelet-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import set from 'lodash/set';
import { TileFilter } from '../../public-api';
import { IKameletDefinition } from '../kamelets-catalog';
import { AddStepMode } from '../visualization/base-visual-entity';
import { FlowTemplateService } from '../visualization/flows/flow-templates-service';
import { CamelComponentFilterService } from '../visualization/flows/support/camel-component-filter.service';
import { CamelRouteVisualEntityData } from '../visualization/flows/support/camel-component-types';
import { KameletVisualEntity } from './../visualization/flows/kamelet-visual-entity';
import { CamelKResource } from './camel-k-resource';
import { SourceSchemaType } from './source-schema-type';
import { RouteTemplateBeansAwareResource } from './camel-resource';
import { FlowTemplateService } from '../visualization/flows/support/flow-templates-service';
import {
RouteTemplateBeansEntity,
RouteTemplateBeansParentType,
} from '../visualization/metadata/routeTemplateBeansEntity';
import { KameletVisualEntity } from './../visualization/flows/kamelet-visual-entity';
import { CamelKResource } from './camel-k-resource';
import { RouteTemplateBeansAwareResource } from './camel-resource';
import { SourceSchemaType } from './source-schema-type';

export class KameletResource extends CamelKResource implements RouteTemplateBeansAwareResource {
private flow: KameletVisualEntity;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/models/camel/pipe-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ITile, TileFilter } from '../../components/Catalog/Catalog.models';
import { CatalogKind } from '../catalog-kind';
import { AddStepMode, IVisualizationNodeData } from '../visualization/base-visual-entity';
import { PipeVisualEntity } from '../visualization/flows';
import { FlowTemplateService } from '../visualization/flows/flow-templates-service';
import { FlowTemplateService } from '../visualization/flows/support/flow-templates-service';
import { PipeErrorHandlerEntity } from '../visualization/metadata/pipeErrorHandlerEntity';
import { CamelKResource } from './camel-k-resource';
import { BaseCamelEntity, PipeSpecErrorHandler } from './entities';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { parse } from 'yaml';
import { SourceSchemaType } from '../../camel/source-schema-type';
import { kameletTemplate } from './templates/kamelet';
import { pipeTemplate } from './templates/pipe';
import { routeTemplate } from './templates/route';
import { SourceSchemaType } from '../../../camel/source-schema-type';
import { kameletTemplate } from '../templates/kamelet';
import { pipeTemplate } from '../templates/pipe';
import { routeTemplate } from '../templates/route';

export class FlowTemplateService {
static getFlowTemplate = (type: SourceSchemaType) => {
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/src/providers/visible-flows.provider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { FunctionComponent, PropsWithChildren, createContext, useContext, useEffect, useMemo, useReducer } from 'react';
import { IVisibleFlows, VisibleFlowsReducer, VisualFlowsApi } from '../models/visualization/flows/flows-visibility';
import {
IVisibleFlows,
VisibleFlowsReducer,
VisualFlowsApi,
} from '../models/visualization/flows/support/flows-visibility';
import { EntitiesContext } from './entities.provider';

export interface VisibleFLowsContextResult {
Expand Down

0 comments on commit 762c337

Please sign in to comment.