@eclipse-papyrus/papyrus-web-parent 2026.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +22 -0
- package/.project +11 -0
- package/.turbo/cache/2e7de991e3eb5b77-meta.json +1 -0
- package/.turbo/cache/2e7de991e3eb5b77.tar.zst +0 -0
- package/.turbo/cache/6d4efa6c3019818e-meta.json +1 -0
- package/.turbo/cache/6d4efa6c3019818e.tar.zst +0 -0
- package/.turbo/cache/904b84e8ab6fefb1-meta.json +1 -0
- package/.turbo/cache/904b84e8ab6fefb1.tar.zst +0 -0
- package/.turbo/cache/b657accc57a869a6-meta.json +1 -0
- package/.turbo/cache/b657accc57a869a6.tar.zst +0 -0
- package/.turbo/cookies/1.cookie +0 -0
- package/.turbo/cookies/2.cookie +0 -0
- package/.turbo/cookies/3.cookie +0 -0
- package/.turbo/cookies/4.cookie +0 -0
- package/.turbo/cookies/5.cookie +0 -0
- package/.turbo/cookies/6.cookie +0 -0
- package/.turbo/cookies/7.cookie +0 -0
- package/.turbo/cookies/8.cookie +0 -0
- package/.turbo/daemon/8a1f25190e5082e3-turbo.log.2026-04-01 +0 -0
- package/package.json +32 -0
- package/papyrus-web/.env.development +2 -0
- package/papyrus-web/.prettierrc +22 -0
- package/papyrus-web/.turbo/turbo-build.log +30 -0
- package/papyrus-web/.turbo/turbo-format-lint.log +6 -0
- package/papyrus-web/README.adoc +84 -0
- package/papyrus-web/dist/assets/Lato-Black-B_kLSaRn.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-BlackItalic-B2JUbIh8.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-Bold-DBmunEOG.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-BoldItalic-DfTVlc2v.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-Italic-CxPt6gM6.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-Light-Cg7pVZQZ.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-LightItalic-BkbZ6uep.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-Regular-57KsL5Ww.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-Thin-CvSM47fD.ttf +0 -0
- package/papyrus-web/dist/assets/Lato-ThinItalic-9M4CJfMt.ttf +0 -0
- package/papyrus-web/dist/assets/browser-ponyfill-CVpHIrSq.js +2 -0
- package/papyrus-web/dist/assets/index-CjSWMYED.js +6122 -0
- package/papyrus-web/dist/assets/index-DJjGIuFa.css +1 -0
- package/papyrus-web/dist/assets/papyrus-icon-DqmMeq_6.png +0 -0
- package/papyrus-web/dist/favicon.ico +0 -0
- package/papyrus-web/dist/index.html +42 -0
- package/papyrus-web/dist/manifest.json +15 -0
- package/papyrus-web/dist/papyrus.ico +0 -0
- package/papyrus-web/index.html +41 -0
- package/papyrus-web/package.json +104 -0
- package/papyrus-web/public/favicon.ico +0 -0
- package/papyrus-web/public/manifest.json +15 -0
- package/papyrus-web/public/papyrus.ico +0 -0
- package/papyrus-web/src/ReactFlow.css +17 -0
- package/papyrus-web/src/core/PapyrusIcon.tsx +17 -0
- package/papyrus-web/src/core/PapyrusNavigationBarIcon.tsx +46 -0
- package/papyrus-web/src/core/URL.ts +34 -0
- package/papyrus-web/src/extensions/ExtensionRegistryMergeStrategy.ts +50 -0
- package/papyrus-web/src/fonts/Lato/Lato-Black.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-BlackItalic.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-Bold.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-BoldItalic.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-Italic.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-Light.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-LightItalic.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-Regular.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-Thin.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/Lato-ThinItalic.ttf +0 -0
- package/papyrus-web/src/fonts/Lato/OFL.txt +93 -0
- package/papyrus-web/src/fonts.css +81 -0
- package/papyrus-web/src/footer/Footer.tsx +50 -0
- package/papyrus-web/src/icons/papyrus-icon.png +0 -0
- package/papyrus-web/src/index.tsx +325 -0
- package/papyrus-web/src/portals.css +16 -0
- package/papyrus-web/src/react-app-env.d.ts +1 -0
- package/papyrus-web/src/reset.css +218 -0
- package/papyrus-web/src/variables.css +111 -0
- package/papyrus-web/src/vite-env.d.ts +1 -0
- package/papyrus-web/tsconfig.json +34 -0
- package/papyrus-web/vite.config.js +24 -0
- package/papyrus-web-components/.prettierrc +22 -0
- package/papyrus-web-components/.turbo/turbo-build.log +77 -0
- package/papyrus-web-components/.turbo/turbo-format-lint.log +6 -0
- package/papyrus-web-components/README.adoc +13 -0
- package/papyrus-web-components/dist/diagram-tools/EditProjectView.types.d.ts +48 -0
- package/papyrus-web-components/dist/diagram-tools/EditProjectView.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.d.ts +3 -0
- package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.types.d.ts +33 -0
- package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.d.ts +15 -0
- package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.types.d.ts +20 -0
- package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.d.ts +3 -0
- package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.types.d.ts +53 -0
- package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/TransferModal.d.ts +3 -0
- package/papyrus-web-components/dist/diagram-tools/TransferModal.d.ts.map +1 -0
- package/papyrus-web-components/dist/diagram-tools/TransferModal.types.d.ts +32 -0
- package/papyrus-web-components/dist/diagram-tools/TransferModal.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/index.d.ts +61 -0
- package/papyrus-web-components/dist/index.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/NodesDocumentTransform.d.ts +15 -0
- package/papyrus-web-components/dist/nodes/NodesDocumentTransform.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.d.ts +18 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.types.d.ts +29 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeLayoutHandler.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListLayoutHandler.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.d.ts +3 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.types.d.ts +34 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeConverter.d.ts +22 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeLayoutHandler.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.d.ts +15 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.types.d.ts +33 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeConverter.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeLayoutHandler.d.ts +25 -0
- package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.d.ts +18 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.types.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeLayoutHandler.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/note/NoteLabel.d.ts +18 -0
- package/papyrus-web-components/dist/nodes/note/NoteLabel.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/note/NoteNode.d.ts +19 -0
- package/papyrus-web-components/dist/nodes/note/NoteNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/note/NoteNode.types.d.ts +41 -0
- package/papyrus-web-components/dist/nodes/note/NoteNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/note/NoteNodeConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/note/NoteNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/note/NoteNodeLayoutHandler.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/note/NoteNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.d.ts +18 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.types.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeLayoutHandler.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/package/PackageNode.d.ts +18 -0
- package/papyrus-web-components/dist/nodes/package/PackageNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/package/PackageNode.types.d.ts +29 -0
- package/papyrus-web-components/dist/nodes/package/PackageNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeLayoutHandler.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeListConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeListConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeListLayoutHandler.d.ts +24 -0
- package/papyrus-web-components/dist/nodes/package/PackageNodeListLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.d.ts +18 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.types.d.ts +23 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeConverter.d.ts +21 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeConverter.d.ts.map +1 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeLayoutHandler.d.ts +20 -0
- package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeLayoutHandler.d.ts.map +1 -0
- package/papyrus-web-components/dist/papyrus-web-components.es.js +11710 -0
- package/papyrus-web-components/dist/papyrus-web-components.umd.js +11664 -0
- package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.d.ts +3 -0
- package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.types.d.ts +55 -0
- package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModalMachine.d.ts +65 -0
- package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModalMachine.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/apply-profile/UMLModelTreeItemContextMenuContribution.d.ts +16 -0
- package/papyrus-web-components/dist/profile/apply-profile/UMLModelTreeItemContextMenuContribution.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.d.ts +15 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.types.d.ts +48 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModalMachine.d.ts +65 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModalMachine.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/UMLElementTreeItemContextMenuContribution.d.ts +16 -0
- package/papyrus-web-components/dist/profile/apply-stereotype/UMLElementTreeItemContextMenuContribution.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.d.ts +16 -0
- package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.types.d.ts +72 -0
- package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/profile/publish-profile/PublishProfileTreeItemContextMenuContribution.d.ts +16 -0
- package/papyrus-web-components/dist/profile/publish-profile/PublishProfileTreeItemContextMenuContribution.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/CustomWidgetsDocumentTransform.d.ts +15 -0
- package/papyrus-web-components/dist/widgets/CustomWidgetsDocumentTransform.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceFragment.types.d.ts +145 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceFragment.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceIcon.d.ts +16 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceIcon.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferencePreview.d.ts +19 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferencePreview.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceSection.d.ts +21 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceSection.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ReorderIcon.d.ts +18 -0
- package/papyrus-web-components/dist/widgets/containmentReference/ReorderIcon.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.d.ts +17 -0
- package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.types.d.ts +23 -0
- package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/customImage/AddImageIcon.d.ts +17 -0
- package/papyrus-web-components/dist/widgets/customImage/AddImageIcon.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImageFragment.types.d.ts +83 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImageFragment.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImageIcon.d.ts +17 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImageIcon.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImagePreview.d.ts +20 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImagePreview.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImageSection.d.ts +21 -0
- package/papyrus-web-components/dist/widgets/customImage/CustomImageSection.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.d.ts +17 -0
- package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.types.d.ts +29 -0
- package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionFragment.types.d.ts +97 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionFragment.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionIcon.d.ts +16 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionIcon.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionPreview.d.ts +6 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionPreview.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionSection.d.ts +21 -0
- package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionSection.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPreview.d.ts +19 -0
- package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPreview.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.d.ts +7 -0
- package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.types.d.ts +135 -0
- package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.types.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioFragment.type.d.ts +42 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioFragment.type.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioIcon.d.ts +16 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioIcon.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioPreview.d.ts +19 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioPreview.d.ts.map +1 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioSection.d.ts +18 -0
- package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioSection.d.ts.map +1 -0
- package/papyrus-web-components/package.json +105 -0
- package/papyrus-web-components/src/diagram-tools/EditProjectView.types.ts +56 -0
- package/papyrus-web-components/src/diagram-tools/FilterableSortableList.tsx +172 -0
- package/papyrus-web-components/src/diagram-tools/FilterableSortableList.types.ts +34 -0
- package/papyrus-web-components/src/diagram-tools/ModelBrowserFilterBar.tsx +73 -0
- package/papyrus-web-components/src/diagram-tools/ModelBrowserFilterBar.types.ts +19 -0
- package/papyrus-web-components/src/diagram-tools/PapyrusPopupToolContribution.tsx +206 -0
- package/papyrus-web-components/src/diagram-tools/PapyrusPopupToolContribution.types.ts +61 -0
- package/papyrus-web-components/src/diagram-tools/TransferModal.tsx +235 -0
- package/papyrus-web-components/src/diagram-tools/TransferModal.types.ts +35 -0
- package/papyrus-web-components/src/index.ts +61 -0
- package/papyrus-web-components/src/nodes/NodesDocumentTransform.ts +242 -0
- package/papyrus-web-components/src/nodes/cuboid/CuboidNode.tsx +183 -0
- package/papyrus-web-components/src/nodes/cuboid/CuboidNode.types.ts +30 -0
- package/papyrus-web-components/src/nodes/cuboid/CuboidNodeConverter.ts +201 -0
- package/papyrus-web-components/src/nodes/cuboid/CuboidNodeLayoutHandler.ts +283 -0
- package/papyrus-web-components/src/nodes/cuboid/CuboidNodeListConverter.ts +238 -0
- package/papyrus-web-components/src/nodes/cuboid/CuboidNodeListLayoutHandler.ts +260 -0
- package/papyrus-web-components/src/nodes/customImage/CustomImageNode.tsx +153 -0
- package/papyrus-web-components/src/nodes/customImage/CustomImageNode.types.ts +37 -0
- package/papyrus-web-components/src/nodes/customImage/CustomImageNodeConverter.ts +212 -0
- package/papyrus-web-components/src/nodes/customImage/CustomImageNodeLayoutHandler.ts +53 -0
- package/papyrus-web-components/src/nodes/ellipse/EllipseNode.tsx +119 -0
- package/papyrus-web-components/src/nodes/ellipse/EllipseNode.types.ts +35 -0
- package/papyrus-web-components/src/nodes/ellipse/EllipseNodeConverter.ts +208 -0
- package/papyrus-web-components/src/nodes/ellipse/EllipseNodeLayoutHandler.ts +284 -0
- package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNode.tsx +156 -0
- package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNode.types.ts +23 -0
- package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNodeConverter.ts +200 -0
- package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNodeLayoutHandler.ts +118 -0
- package/papyrus-web-components/src/nodes/note/NoteLabel.tsx +146 -0
- package/papyrus-web-components/src/nodes/note/NoteNode.tsx +168 -0
- package/papyrus-web-components/src/nodes/note/NoteNode.types.ts +43 -0
- package/papyrus-web-components/src/nodes/note/NoteNodeConverter.ts +200 -0
- package/papyrus-web-components/src/nodes/note/NoteNodeLayoutHandler.ts +85 -0
- package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNode.tsx +153 -0
- package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNode.types.ts +23 -0
- package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNodeConverter.ts +200 -0
- package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNodeLayoutHandler.ts +116 -0
- package/papyrus-web-components/src/nodes/package/PackageNode.tsx +200 -0
- package/papyrus-web-components/src/nodes/package/PackageNode.types.ts +30 -0
- package/papyrus-web-components/src/nodes/package/PackageNodeConverter.ts +243 -0
- package/papyrus-web-components/src/nodes/package/PackageNodeLayoutHandler.ts +229 -0
- package/papyrus-web-components/src/nodes/package/PackageNodeListConverter.ts +254 -0
- package/papyrus-web-components/src/nodes/package/PackageNodeListLayoutHandler.ts +253 -0
- package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.tsx +155 -0
- package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.types.ts +23 -0
- package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeConverter.ts +205 -0
- package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeLayoutHandler.ts +55 -0
- package/papyrus-web-components/src/profile/apply-profile/ApplyProfileModal.tsx +238 -0
- package/papyrus-web-components/src/profile/apply-profile/ApplyProfileModal.types.tsx +65 -0
- package/papyrus-web-components/src/profile/apply-profile/ApplyProfileModalMachine.tsx +175 -0
- package/papyrus-web-components/src/profile/apply-profile/UMLModelTreeItemContextMenuContribution.tsx +74 -0
- package/papyrus-web-components/src/profile/apply-stereotype/ApplyStereotypeModal.tsx +248 -0
- package/papyrus-web-components/src/profile/apply-stereotype/ApplyStereotypeModal.types.ts +57 -0
- package/papyrus-web-components/src/profile/apply-stereotype/ApplyStereotypeModalMachine.ts +185 -0
- package/papyrus-web-components/src/profile/apply-stereotype/UMLElementTreeItemContextMenuContribution.tsx +70 -0
- package/papyrus-web-components/src/profile/publish-profile/PublishProfileDialog.tsx +380 -0
- package/papyrus-web-components/src/profile/publish-profile/PublishProfileDialog.types.ts +84 -0
- package/papyrus-web-components/src/profile/publish-profile/PublishProfileTreeItemContextMenuContribution.tsx +59 -0
- package/papyrus-web-components/src/widgets/CustomWidgetsDocumentTransform.ts +215 -0
- package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferenceFragment.types.ts +178 -0
- package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferenceIcon.tsx +38 -0
- package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferencePreview.tsx +106 -0
- package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferenceSection.tsx +508 -0
- package/papyrus-web-components/src/widgets/containmentReference/ReorderIcon.tsx +31 -0
- package/papyrus-web-components/src/widgets/containmentReference/dialogs/CreateNewChildDialog.tsx +104 -0
- package/papyrus-web-components/src/widgets/containmentReference/dialogs/CreateNewChildDialog.types.ts +24 -0
- package/papyrus-web-components/src/widgets/customImage/AddImageIcon.tsx +35 -0
- package/papyrus-web-components/src/widgets/customImage/CustomImageFragment.types.ts +98 -0
- package/papyrus-web-components/src/widgets/customImage/CustomImageIcon.tsx +34 -0
- package/papyrus-web-components/src/widgets/customImage/CustomImagePreview.tsx +87 -0
- package/papyrus-web-components/src/widgets/customImage/CustomImageSection.tsx +348 -0
- package/papyrus-web-components/src/widgets/dialogs/ReorderItemsDialog.tsx +145 -0
- package/papyrus-web-components/src/widgets/dialogs/ReorderItemsDialog.types.ts +30 -0
- package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionFragment.types.ts +117 -0
- package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionIcon.tsx +36 -0
- package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionPreview.tsx +163 -0
- package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionSection.tsx +548 -0
- package/papyrus-web-components/src/widgets/primitiveList/PrimitiveListWidgetPreview.tsx +158 -0
- package/papyrus-web-components/src/widgets/primitiveList/PrimitiveListWidgetPropertySection.tsx +616 -0
- package/papyrus-web-components/src/widgets/primitiveList/PrimitiveListWidgetPropertySection.types.ts +162 -0
- package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioFragment.type.ts +49 -0
- package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioIcon.tsx +36 -0
- package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioPreview.tsx +88 -0
- package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioSection.tsx +128 -0
- package/papyrus-web-components/tsconfig.json +14 -0
- package/papyrus-web-components/vite.config.js +26 -0
- package/turbo.json +31 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/*****************************************************************************
|
|
2
|
+
* Copyright (c) 2024, 2025 CEA LIST, Obeo.
|
|
3
|
+
*
|
|
4
|
+
* All rights reserved. This program and the accompanying materials
|
|
5
|
+
* are made available under the terms of the Eclipse Public License 2.0
|
|
6
|
+
* which accompanies this distribution, and is available at
|
|
7
|
+
* https://www.eclipse.org/legal/epl-2.0/
|
|
8
|
+
*
|
|
9
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
10
|
+
*
|
|
11
|
+
* Contributors:
|
|
12
|
+
* Obeo - Initial API and implementation
|
|
13
|
+
*****************************************************************************/
|
|
14
|
+
import {
|
|
15
|
+
Diagram,
|
|
16
|
+
DiagramNodeType,
|
|
17
|
+
ILayoutEngine,
|
|
18
|
+
INodeLayoutHandler,
|
|
19
|
+
NodeData,
|
|
20
|
+
computeNodesBox,
|
|
21
|
+
computePreviousPosition,
|
|
22
|
+
computePreviousSize,
|
|
23
|
+
findNodeIndex,
|
|
24
|
+
getBorderNodeExtent,
|
|
25
|
+
getChildNodePosition,
|
|
26
|
+
getEastBorderNodeFootprintHeight,
|
|
27
|
+
getNorthBorderNodeFootprintWidth,
|
|
28
|
+
getSouthBorderNodeFootprintWidth,
|
|
29
|
+
getWestBorderNodeFootprintHeight,
|
|
30
|
+
setBorderNodesPosition,
|
|
31
|
+
ForcedDimensions,
|
|
32
|
+
getHeaderHeightFootprint,
|
|
33
|
+
getInsideLabelWidthConstraint,
|
|
34
|
+
} from '@eclipse-sirius/sirius-components-diagrams';
|
|
35
|
+
import { Node } from '@xyflow/react';
|
|
36
|
+
import { CuboidNodeData } from './CuboidNode.types';
|
|
37
|
+
const rectangularNodePadding: number = 8;
|
|
38
|
+
|
|
39
|
+
// The number of px reserved on the right & top of the cuboid node to draw perspective lines.
|
|
40
|
+
const cuboidBorder: number = 20;
|
|
41
|
+
// The padding around the label (which is not computed by headerHeightFootprint)
|
|
42
|
+
const labelPadding: number = 18;
|
|
43
|
+
|
|
44
|
+
export class CuboidNodeLayoutHandler implements INodeLayoutHandler<CuboidNodeData> {
|
|
45
|
+
public canHandle(node: Node<NodeData, DiagramNodeType>) {
|
|
46
|
+
return node.type === 'cuboidNode';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public handle(
|
|
50
|
+
layoutEngine: ILayoutEngine,
|
|
51
|
+
previousDiagram: Diagram | null,
|
|
52
|
+
node: Node<CuboidNodeData, 'cuboidNode'>,
|
|
53
|
+
visibleNodes: Node<NodeData, DiagramNodeType>[],
|
|
54
|
+
directChildren: Node<NodeData, DiagramNodeType>[],
|
|
55
|
+
newlyAddedNode: Node<NodeData, DiagramNodeType>[],
|
|
56
|
+
forceWidth?: ForcedDimensions
|
|
57
|
+
) {
|
|
58
|
+
const nodeIndex = findNodeIndex(visibleNodes, node.id);
|
|
59
|
+
const nodeElement = document.getElementById(`${node.id}-cuboidNode-${nodeIndex}`)?.children[0];
|
|
60
|
+
const borderWidth = nodeElement ? parseFloat(window.getComputedStyle(nodeElement).borderWidth) : 0;
|
|
61
|
+
if (directChildren.length > 0) {
|
|
62
|
+
this.handleParentNode(
|
|
63
|
+
layoutEngine,
|
|
64
|
+
previousDiagram,
|
|
65
|
+
node,
|
|
66
|
+
visibleNodes,
|
|
67
|
+
directChildren,
|
|
68
|
+
newlyAddedNode,
|
|
69
|
+
borderWidth,
|
|
70
|
+
forceWidth
|
|
71
|
+
);
|
|
72
|
+
} else {
|
|
73
|
+
this.handleLeafNode(previousDiagram, node, visibleNodes, borderWidth, forceWidth);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private handleParentNode(
|
|
78
|
+
layoutEngine: ILayoutEngine,
|
|
79
|
+
previousDiagram: Diagram | null,
|
|
80
|
+
node: Node<CuboidNodeData, 'cuboidNode'>,
|
|
81
|
+
visibleNodes: Node<NodeData, DiagramNodeType>[],
|
|
82
|
+
directChildren: Node<NodeData, DiagramNodeType>[],
|
|
83
|
+
newlyAddedNodes: Node<NodeData, DiagramNodeType>[],
|
|
84
|
+
borderWidth: number,
|
|
85
|
+
_forceWidth?: ForcedDimensions
|
|
86
|
+
) {
|
|
87
|
+
layoutEngine.layoutNodes(previousDiagram, visibleNodes, directChildren, newlyAddedNodes);
|
|
88
|
+
|
|
89
|
+
const nodeIndex = findNodeIndex(visibleNodes, node.id);
|
|
90
|
+
const labelElement = document.getElementById(`${node.id}-label-${nodeIndex}`);
|
|
91
|
+
const labelWidth =
|
|
92
|
+
getInsideLabelWidthConstraint(node.data.insideLabel, labelElement) + 2 * borderWidth + labelPadding;
|
|
93
|
+
const headerHeightFootprint = getHeaderHeightFootprint(labelElement, node.data.insideLabel, 'TOP');
|
|
94
|
+
const borderNodes = directChildren.filter((node) => node.data.isBorderNode);
|
|
95
|
+
const directNodesChildren = directChildren.filter((child) => !child.data.isBorderNode);
|
|
96
|
+
|
|
97
|
+
// Update children position to be under the label and at the right padding.
|
|
98
|
+
directNodesChildren.forEach((child, index) => {
|
|
99
|
+
const previousNode = (previousDiagram?.nodes ?? []).find((prevNode) => prevNode.id === child.id);
|
|
100
|
+
const previousPosition = computePreviousPosition(previousNode, child);
|
|
101
|
+
const createdNode = newlyAddedNodes.find((node) => node?.id === child.id);
|
|
102
|
+
|
|
103
|
+
if (!!createdNode) {
|
|
104
|
+
child.position = createdNode.position;
|
|
105
|
+
if (
|
|
106
|
+
child.position.y <
|
|
107
|
+
borderWidth + headerHeightFootprint + rectangularNodePadding + cuboidBorder + labelPadding
|
|
108
|
+
) {
|
|
109
|
+
child.position = {
|
|
110
|
+
...child.position,
|
|
111
|
+
y: borderWidth + headerHeightFootprint + rectangularNodePadding + cuboidBorder + labelPadding,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
if (
|
|
115
|
+
child.width !== undefined &&
|
|
116
|
+
node.width !== undefined &&
|
|
117
|
+
child.position.x + child.width > node.width - cuboidBorder - rectangularNodePadding - borderWidth
|
|
118
|
+
) {
|
|
119
|
+
child.position = {
|
|
120
|
+
...child.position,
|
|
121
|
+
x: node.width - child.width - cuboidBorder - borderWidth - rectangularNodePadding,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
if (child.position.x < 0) {
|
|
125
|
+
child.position = { ...child.position, x: rectangularNodePadding };
|
|
126
|
+
}
|
|
127
|
+
} else if (previousPosition) {
|
|
128
|
+
child.position = previousPosition;
|
|
129
|
+
if (child.position.y < headerHeightFootprint + rectangularNodePadding + cuboidBorder + labelPadding) {
|
|
130
|
+
child.position = {
|
|
131
|
+
...child.position,
|
|
132
|
+
y: headerHeightFootprint + rectangularNodePadding + cuboidBorder + labelPadding,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (
|
|
137
|
+
child.width !== undefined &&
|
|
138
|
+
node.width !== undefined &&
|
|
139
|
+
child.position.x + child.width > node.width - cuboidBorder - rectangularNodePadding - borderWidth
|
|
140
|
+
) {
|
|
141
|
+
child.position = {
|
|
142
|
+
...child.position,
|
|
143
|
+
x: node.width - child.width - cuboidBorder - borderWidth - rectangularNodePadding,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
// Force the position.x to rectangularNodePadding if the child is moved outside the west border.
|
|
147
|
+
if (child.position.x < 0) {
|
|
148
|
+
child.position = { ...child.position, x: rectangularNodePadding };
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
child.position = getChildNodePosition(visibleNodes, child, headerHeightFootprint, borderWidth);
|
|
152
|
+
const previousSibling = directNodesChildren[index - 1];
|
|
153
|
+
if (previousSibling) {
|
|
154
|
+
child.position = getChildNodePosition(
|
|
155
|
+
visibleNodes,
|
|
156
|
+
child,
|
|
157
|
+
headerHeightFootprint,
|
|
158
|
+
borderWidth,
|
|
159
|
+
previousSibling
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
if (child.position.y < headerHeightFootprint + rectangularNodePadding + cuboidBorder + labelPadding) {
|
|
163
|
+
child.position = {
|
|
164
|
+
...child.position,
|
|
165
|
+
y: child.position.y + headerHeightFootprint + cuboidBorder + labelPadding,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (
|
|
169
|
+
child.width !== undefined &&
|
|
170
|
+
node.width !== undefined &&
|
|
171
|
+
child.position.x + child.width > node.width - cuboidBorder - rectangularNodePadding - borderWidth
|
|
172
|
+
) {
|
|
173
|
+
child.position = {
|
|
174
|
+
...child.position,
|
|
175
|
+
x: node.width - child.width - cuboidBorder - borderWidth - rectangularNodePadding,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
// Force the position.x to rectangularNodePadding if the child is moved outside the west border.
|
|
179
|
+
if (child.position.x < 0) {
|
|
180
|
+
child.position = { ...child.position, x: rectangularNodePadding };
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// Update node to layout size
|
|
186
|
+
// WARN: We suppose label are always on top of children (that wrong)
|
|
187
|
+
const childrenContentBox = computeNodesBox(visibleNodes, directNodesChildren); // WARN: The current content box algorithm does not take the margin of direct children (it should)
|
|
188
|
+
const directChildrenAwareNodeWidth = childrenContentBox.x + childrenContentBox.width + rectangularNodePadding;
|
|
189
|
+
const northBorderNodeFootprintWidth = getNorthBorderNodeFootprintWidth(visibleNodes, borderNodes, previousDiagram);
|
|
190
|
+
const southBorderNodeFootprintWidth = getSouthBorderNodeFootprintWidth(visibleNodes, borderNodes, previousDiagram);
|
|
191
|
+
|
|
192
|
+
const nodeWidth =
|
|
193
|
+
Math.max(
|
|
194
|
+
directChildrenAwareNodeWidth,
|
|
195
|
+
northBorderNodeFootprintWidth,
|
|
196
|
+
southBorderNodeFootprintWidth,
|
|
197
|
+
labelWidth + cuboidBorder,
|
|
198
|
+
node.data.defaultWidth ? node.data.defaultWidth : 0
|
|
199
|
+
) +
|
|
200
|
+
borderWidth * 2 +
|
|
201
|
+
cuboidBorder +
|
|
202
|
+
rectangularNodePadding * 2;
|
|
203
|
+
|
|
204
|
+
// WARN: the label is not used for the height because children are already position under the label
|
|
205
|
+
const directChildrenAwareNodeHeight = childrenContentBox.y + childrenContentBox.height + rectangularNodePadding;
|
|
206
|
+
const eastBorderNodeFootprintHeight = getEastBorderNodeFootprintHeight(visibleNodes, borderNodes, previousDiagram);
|
|
207
|
+
const westBorderNodeFootprintHeight = getWestBorderNodeFootprintHeight(visibleNodes, borderNodes, previousDiagram);
|
|
208
|
+
|
|
209
|
+
const nodeHeight =
|
|
210
|
+
Math.max(
|
|
211
|
+
directChildrenAwareNodeHeight,
|
|
212
|
+
eastBorderNodeFootprintHeight,
|
|
213
|
+
westBorderNodeFootprintHeight,
|
|
214
|
+
node.data.defaultHeight ? node.data.defaultHeight : 0
|
|
215
|
+
) +
|
|
216
|
+
borderWidth * 2;
|
|
217
|
+
|
|
218
|
+
const minNodeWith = nodeWidth;
|
|
219
|
+
const minNodeheight = nodeHeight;
|
|
220
|
+
|
|
221
|
+
const previousNode = (previousDiagram?.nodes ?? []).find((previouseNode) => previouseNode.id === node.id);
|
|
222
|
+
const previousDimensions = computePreviousSize(previousNode, node);
|
|
223
|
+
if (node.data.nodeDescription?.userResizable) {
|
|
224
|
+
if (minNodeWith > previousDimensions.width) {
|
|
225
|
+
node.width = minNodeWith;
|
|
226
|
+
} else {
|
|
227
|
+
node.width = previousDimensions.width;
|
|
228
|
+
}
|
|
229
|
+
if (minNodeheight > previousDimensions.height) {
|
|
230
|
+
node.height = minNodeheight;
|
|
231
|
+
} else {
|
|
232
|
+
node.height = previousDimensions.height;
|
|
233
|
+
}
|
|
234
|
+
} else {
|
|
235
|
+
node.width = minNodeWith;
|
|
236
|
+
node.height = minNodeheight;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Update border nodes positions
|
|
240
|
+
borderNodes.forEach((borderNode) => {
|
|
241
|
+
borderNode.extent = getBorderNodeExtent(node, borderNode);
|
|
242
|
+
});
|
|
243
|
+
setBorderNodesPosition(borderNodes, node, previousDiagram);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
private handleLeafNode(
|
|
247
|
+
previousDiagram: Diagram | null,
|
|
248
|
+
node: Node<CuboidNodeData, 'cuboidNode'>,
|
|
249
|
+
visibleNodes: Node<NodeData, DiagramNodeType>[],
|
|
250
|
+
borderWidth: number,
|
|
251
|
+
_forceWidth?: ForcedDimensions
|
|
252
|
+
) {
|
|
253
|
+
const nodeIndex = findNodeIndex(visibleNodes, node.id);
|
|
254
|
+
const labelElement = document.getElementById(`${node.id}-label-${nodeIndex}`);
|
|
255
|
+
const labelWidth =
|
|
256
|
+
getInsideLabelWidthConstraint(node.data.insideLabel, labelElement) + 2 * borderWidth + labelPadding;
|
|
257
|
+
|
|
258
|
+
const labelHeight =
|
|
259
|
+
rectangularNodePadding + (labelElement?.getBoundingClientRect().height ?? 0) + rectangularNodePadding;
|
|
260
|
+
|
|
261
|
+
const minNodeWith = Math.max(labelWidth + cuboidBorder, node.data.defaultWidth ? node.data.defaultWidth : 0);
|
|
262
|
+
const minNodeheight = Math.max(labelHeight, node.data.defaultHeight ? node.data.defaultHeight : 0);
|
|
263
|
+
|
|
264
|
+
const previousNode = (previousDiagram?.nodes ?? []).find((previouseNode) => previouseNode.id === node.id);
|
|
265
|
+
const previousDimensions = computePreviousSize(previousNode, node);
|
|
266
|
+
|
|
267
|
+
if (node.data.resizedByUser) {
|
|
268
|
+
if (minNodeWith > previousDimensions.width) {
|
|
269
|
+
node.width = minNodeWith;
|
|
270
|
+
} else {
|
|
271
|
+
node.width = previousDimensions.width;
|
|
272
|
+
}
|
|
273
|
+
if (minNodeheight > previousDimensions.height) {
|
|
274
|
+
node.height = minNodeheight;
|
|
275
|
+
} else {
|
|
276
|
+
node.height = previousDimensions.height;
|
|
277
|
+
}
|
|
278
|
+
} else {
|
|
279
|
+
node.width = minNodeWith;
|
|
280
|
+
node.height = minNodeheight;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/*****************************************************************************
|
|
2
|
+
* Copyright (c) 2024, 2026 CEA LIST, Obeo.
|
|
3
|
+
*
|
|
4
|
+
* All rights reserved. This program and the accompanying materials
|
|
5
|
+
* are made available under the terms of the Eclipse Public License 2.0
|
|
6
|
+
* which accompanies this distribution, and is available at
|
|
7
|
+
* https://www.eclipse.org/legal/epl-2.0/
|
|
8
|
+
*
|
|
9
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
10
|
+
*
|
|
11
|
+
* Contributors:
|
|
12
|
+
* Obeo - Initial API and implementation
|
|
13
|
+
*****************************************************************************/
|
|
14
|
+
import {
|
|
15
|
+
BorderNodePosition,
|
|
16
|
+
ConnectionHandle,
|
|
17
|
+
convertHandles,
|
|
18
|
+
convertInsideLabel,
|
|
19
|
+
convertLineStyle,
|
|
20
|
+
convertOutsideLabels,
|
|
21
|
+
GQLDiagram,
|
|
22
|
+
GQLDiagramDescription,
|
|
23
|
+
GQLEdge,
|
|
24
|
+
GQLHandleLayoutData,
|
|
25
|
+
GQLNode,
|
|
26
|
+
GQLNodeDescription,
|
|
27
|
+
GQLNodeLayoutData,
|
|
28
|
+
GQLNodeStyle,
|
|
29
|
+
GQLViewModifier,
|
|
30
|
+
IConvertEngine,
|
|
31
|
+
INodeConverter,
|
|
32
|
+
isListLayoutStrategy,
|
|
33
|
+
NodeData,
|
|
34
|
+
} from '@eclipse-sirius/sirius-components-diagrams';
|
|
35
|
+
import { Node, XYPosition } from '@xyflow/react';
|
|
36
|
+
import { CuboidNodeListData, GQLCuboidNodeStyle } from './CuboidNode.types';
|
|
37
|
+
|
|
38
|
+
const defaultPosition: XYPosition = { x: 0, y: 0 };
|
|
39
|
+
|
|
40
|
+
const toCuboidListNode = (
|
|
41
|
+
gqlDiagram: GQLDiagram,
|
|
42
|
+
gqlNode: GQLNode<GQLCuboidNodeStyle>,
|
|
43
|
+
gqlParentNode: GQLNode<GQLNodeStyle> | null,
|
|
44
|
+
nodeDescription: GQLNodeDescription,
|
|
45
|
+
isBorderNode: boolean,
|
|
46
|
+
gqlEdges: GQLEdge[]
|
|
47
|
+
): Node<CuboidNodeListData> => {
|
|
48
|
+
const {
|
|
49
|
+
targetObjectId,
|
|
50
|
+
targetObjectLabel,
|
|
51
|
+
targetObjectKind,
|
|
52
|
+
descriptionId,
|
|
53
|
+
id,
|
|
54
|
+
insideLabel,
|
|
55
|
+
outsideLabels,
|
|
56
|
+
state,
|
|
57
|
+
pinned,
|
|
58
|
+
style,
|
|
59
|
+
labelEditable,
|
|
60
|
+
deletable,
|
|
61
|
+
} = gqlNode;
|
|
62
|
+
|
|
63
|
+
const handleLayoutData: GQLHandleLayoutData[] = gqlDiagram.layoutData.nodeLayoutData
|
|
64
|
+
.filter((nodeLayoutData) => nodeLayoutData.id === id)
|
|
65
|
+
.flatMap((nodeLayoutData) => nodeLayoutData.handleLayoutData);
|
|
66
|
+
|
|
67
|
+
const connectionHandles: ConnectionHandle[] = convertHandles(gqlNode.id, gqlEdges, handleLayoutData);
|
|
68
|
+
const gqlNodeLayoutData: GQLNodeLayoutData | undefined = gqlDiagram.layoutData.nodeLayoutData.find(
|
|
69
|
+
(nodeLayoutData) => nodeLayoutData.id === id
|
|
70
|
+
);
|
|
71
|
+
const isNew = gqlNodeLayoutData === undefined;
|
|
72
|
+
const resizedByUser = gqlNodeLayoutData?.resizedByUser ?? false;
|
|
73
|
+
const movedByUser = gqlNodeLayoutData?.movedByUser ?? false;
|
|
74
|
+
|
|
75
|
+
const data: CuboidNodeListData = {
|
|
76
|
+
targetObjectId,
|
|
77
|
+
targetObjectLabel,
|
|
78
|
+
targetObjectKind,
|
|
79
|
+
descriptionId,
|
|
80
|
+
style: {
|
|
81
|
+
display: 'flex',
|
|
82
|
+
background: style.background,
|
|
83
|
+
borderColor: style.borderColor,
|
|
84
|
+
borderWidth: style.borderSize,
|
|
85
|
+
borderStyle: convertLineStyle(style.borderStyle),
|
|
86
|
+
},
|
|
87
|
+
insideLabel: null,
|
|
88
|
+
outsideLabels: convertOutsideLabels(outsideLabels, gqlDiagram.layoutData.labelLayoutData),
|
|
89
|
+
isBorderNode: isBorderNode,
|
|
90
|
+
borderNodePosition: isBorderNode ? BorderNodePosition.EAST : null,
|
|
91
|
+
faded: state === GQLViewModifier.Faded,
|
|
92
|
+
pinned,
|
|
93
|
+
labelEditable,
|
|
94
|
+
nodeDescription,
|
|
95
|
+
connectionHandles,
|
|
96
|
+
defaultWidth: gqlNode.defaultWidth,
|
|
97
|
+
defaultHeight: gqlNode.defaultHeight,
|
|
98
|
+
isNew,
|
|
99
|
+
areChildNodesDraggable: isListLayoutStrategy(gqlNode.style.childrenLayoutStrategy)
|
|
100
|
+
? gqlNode.style.childrenLayoutStrategy.areChildNodesDraggable
|
|
101
|
+
: true,
|
|
102
|
+
topGap: isListLayoutStrategy(gqlNode.style.childrenLayoutStrategy)
|
|
103
|
+
? gqlNode.style.childrenLayoutStrategy.topGap
|
|
104
|
+
: 0,
|
|
105
|
+
bottomGap: isListLayoutStrategy(gqlNode.style.childrenLayoutStrategy)
|
|
106
|
+
? gqlNode.style.childrenLayoutStrategy.bottomGap
|
|
107
|
+
: 0,
|
|
108
|
+
isListChild: isListLayoutStrategy(gqlParentNode?.style.childrenLayoutStrategy),
|
|
109
|
+
isDraggedNode: false,
|
|
110
|
+
resizedByUser,
|
|
111
|
+
movedByUser,
|
|
112
|
+
growableNodeIds: isListLayoutStrategy(gqlNode.style.childrenLayoutStrategy)
|
|
113
|
+
? gqlNode.style.childrenLayoutStrategy.growableNodeIds
|
|
114
|
+
: [],
|
|
115
|
+
isDropNodeTarget: false,
|
|
116
|
+
isDropNodeCandidate: false,
|
|
117
|
+
isHovered: false,
|
|
118
|
+
connectionLinePositionOnNode: 'none',
|
|
119
|
+
nodeAppearanceData: {
|
|
120
|
+
gqlStyle: style,
|
|
121
|
+
customizedStyleProperties: [],
|
|
122
|
+
},
|
|
123
|
+
minComputedWidth: gqlNodeLayoutData?.minComputedSize.width ?? null,
|
|
124
|
+
minComputedHeight: gqlNodeLayoutData?.minComputedSize.height ?? null,
|
|
125
|
+
deletable,
|
|
126
|
+
isLastNodeSelected: false,
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
data.insideLabel = convertInsideLabel(
|
|
130
|
+
insideLabel,
|
|
131
|
+
data,
|
|
132
|
+
`${style.borderSize}px ${style.borderStyle} ${style.borderColor}`
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
if (data.insideLabel) {
|
|
136
|
+
data.insideLabel.isHeader = true;
|
|
137
|
+
data.insideLabel.headerPosition = 'TOP';
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const node: Node<CuboidNodeListData> = {
|
|
141
|
+
id,
|
|
142
|
+
type: 'cuboidNodeList',
|
|
143
|
+
data,
|
|
144
|
+
position: defaultPosition,
|
|
145
|
+
hidden: gqlNode.state === GQLViewModifier.Hidden,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
if (gqlParentNode) {
|
|
149
|
+
node.parentId = gqlParentNode.id;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const nodeLayoutData = gqlDiagram.layoutData.nodeLayoutData.filter((data) => data.id === id)[0];
|
|
153
|
+
if (nodeLayoutData) {
|
|
154
|
+
const {
|
|
155
|
+
position,
|
|
156
|
+
size: { height, width },
|
|
157
|
+
} = nodeLayoutData;
|
|
158
|
+
node.position = position;
|
|
159
|
+
node.height = height;
|
|
160
|
+
node.width = width;
|
|
161
|
+
node.style = {
|
|
162
|
+
...node.style,
|
|
163
|
+
width: `${node.width}px`,
|
|
164
|
+
height: `${node.height}px`,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return node;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const adaptChildrenBorderNodes = (nodes: Node[], gqlChildrenNodes: GQLNode<GQLNodeStyle>[]): void => {
|
|
172
|
+
const visibleChildrenNodes = nodes
|
|
173
|
+
.filter(
|
|
174
|
+
(child) =>
|
|
175
|
+
gqlChildrenNodes.map((gqlChild) => gqlChild.id).find((gqlChildId) => gqlChildId === child.id) !== undefined
|
|
176
|
+
)
|
|
177
|
+
.filter((child) => !child.hidden);
|
|
178
|
+
visibleChildrenNodes.forEach((child, _index) => {
|
|
179
|
+
let childData = child.data as NodeData;
|
|
180
|
+
child.data.style = {
|
|
181
|
+
...childData.style,
|
|
182
|
+
borderTopWidth: childData.style.borderWidth,
|
|
183
|
+
borderLeftWidth: childData.style.borderWidth,
|
|
184
|
+
borderRightWidth: childData.style.borderWidth,
|
|
185
|
+
borderBottomWidth: childData.style.borderWidth,
|
|
186
|
+
};
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export class CuboidNodeListConverter implements INodeConverter {
|
|
191
|
+
canHandle(gqlNode: GQLNode<GQLNodeStyle>) {
|
|
192
|
+
return gqlNode.style.__typename === 'CuboidNodeStyle' && gqlNode.style.childrenLayoutStrategy?.kind === 'List';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
handle(
|
|
196
|
+
convertEngine: IConvertEngine,
|
|
197
|
+
gqlDiagram: GQLDiagram,
|
|
198
|
+
gqlNode: GQLNode<GQLCuboidNodeStyle>,
|
|
199
|
+
gqlEdges: GQLEdge[],
|
|
200
|
+
parentNode: GQLNode<GQLNodeStyle> | null,
|
|
201
|
+
isBorderNode: boolean,
|
|
202
|
+
nodes: Node[],
|
|
203
|
+
diagramDescription: GQLDiagramDescription,
|
|
204
|
+
nodeDescriptions: GQLNodeDescription[]
|
|
205
|
+
) {
|
|
206
|
+
const nodeDescription = nodeDescriptions.find((description) => description.id === gqlNode.descriptionId);
|
|
207
|
+
if (nodeDescription) {
|
|
208
|
+
nodes.push(toCuboidListNode(gqlDiagram, gqlNode, parentNode, nodeDescription, isBorderNode, gqlEdges));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const borderNodeDescriptions: GQLNodeDescription[] = (nodeDescription?.borderNodeDescriptionIds ?? []).flatMap(
|
|
212
|
+
(nodeDescriptionId) =>
|
|
213
|
+
diagramDescription.nodeDescriptions.filter((nodeDescription) => nodeDescription.id === nodeDescriptionId)
|
|
214
|
+
);
|
|
215
|
+
const childNodeDescriptions: GQLNodeDescription[] = (nodeDescription?.childNodeDescriptionIds ?? []).flatMap(
|
|
216
|
+
(nodeDescriptionId) =>
|
|
217
|
+
diagramDescription.nodeDescriptions.filter((nodeDescription) => nodeDescription.id === nodeDescriptionId)
|
|
218
|
+
);
|
|
219
|
+
|
|
220
|
+
convertEngine.convertNodes(
|
|
221
|
+
gqlDiagram,
|
|
222
|
+
gqlNode.borderNodes ?? [],
|
|
223
|
+
gqlNode,
|
|
224
|
+
nodes,
|
|
225
|
+
diagramDescription,
|
|
226
|
+
borderNodeDescriptions
|
|
227
|
+
);
|
|
228
|
+
convertEngine.convertNodes(
|
|
229
|
+
gqlDiagram,
|
|
230
|
+
gqlNode.childNodes ?? [],
|
|
231
|
+
gqlNode,
|
|
232
|
+
nodes,
|
|
233
|
+
diagramDescription,
|
|
234
|
+
childNodeDescriptions
|
|
235
|
+
);
|
|
236
|
+
adaptChildrenBorderNodes(nodes, gqlNode.childNodes ?? []);
|
|
237
|
+
}
|
|
238
|
+
}
|