Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2804] Add the ability to declare custom nodes with the sirius-web-ap…
…plication package Bug: #2804 Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
- Loading branch information
1 parent
b203bcb
commit 170b74c
Showing
12 changed files
with
146 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...s-web/frontend/sirius-web-application/src/diagrams/DiagramRepresentationConfiguration.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Obeo. | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Obeo - initial API and implementation | ||
*******************************************************************************/ | ||
|
||
import { NodeTypeContextValue } from '@eclipse-sirius/sirius-components-diagrams-reactflow'; | ||
import { DiagramRepresentationConfigurationProps } from './DiagramRepresentationConfiguration.types'; | ||
|
||
export const defaultNodeTypeRegistry: NodeTypeContextValue = { | ||
nodeConverterHandlers: [], | ||
nodeLayoutHandlers: [], | ||
graphQLNodeStyleFragments: [], | ||
nodeTypeContributions: [], | ||
}; | ||
|
||
export const DiagramRepresentationConfiguration = ({}: DiagramRepresentationConfigurationProps) => { | ||
return null; | ||
}; |
30 changes: 30 additions & 0 deletions
30
.../frontend/sirius-web-application/src/diagrams/DiagramRepresentationConfiguration.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Obeo. | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Obeo - initial API and implementation | ||
*******************************************************************************/ | ||
import { | ||
GraphQLNodeStyleFragment, | ||
INodeConverterHandler, | ||
INodeLayoutHandler, | ||
NodeData, | ||
NodeTypeContributionElement, | ||
} from '@eclipse-sirius/sirius-components-diagrams-reactflow'; | ||
|
||
export interface DiagramRepresentationConfigurationProps { | ||
nodeTypeRegistry: NodeTypeRegistry; | ||
} | ||
|
||
export interface NodeTypeRegistry { | ||
graphQLNodeStyleFragments: GraphQLNodeStyleFragment[]; | ||
nodeLayoutHandlers: INodeLayoutHandler<NodeData>[]; | ||
nodeConverterHandlers: INodeConverterHandler[]; | ||
nodeTypeContributions: NodeTypeContributionElement[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.