@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,145 @@
|
|
|
1
|
+
/*****************************************************************************
|
|
2
|
+
* Copyright (c) 2023, 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
|
+
|
|
15
|
+
import { Dialog, DialogContent, DialogContentText, DialogTitle } from '@mui/material';
|
|
16
|
+
import { makeStyles } from 'tss-react/mui';
|
|
17
|
+
import Button from '@mui/material/Button';
|
|
18
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
19
|
+
import List from '@mui/material/List';
|
|
20
|
+
import ListItem from '@mui/material/ListItem';
|
|
21
|
+
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
22
|
+
import ListItemText from '@mui/material/ListItemText';
|
|
23
|
+
import DragHandleIcon from '@mui/icons-material/DragHandle';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
import { ReorderItemsDialogProps, ReorderItemsDialogState } from './ReorderItemsDialog.types';
|
|
26
|
+
import { IconOverlay } from '@eclipse-sirius/sirius-components-core';
|
|
27
|
+
|
|
28
|
+
const useStyles = makeStyles()((theme) => ({
|
|
29
|
+
dialogContent: {
|
|
30
|
+
overflowX: 'hidden',
|
|
31
|
+
},
|
|
32
|
+
root: {
|
|
33
|
+
margin: 'auto',
|
|
34
|
+
},
|
|
35
|
+
paper: {
|
|
36
|
+
width: 400,
|
|
37
|
+
height: 370,
|
|
38
|
+
border: '1px solid',
|
|
39
|
+
borderColor: theme.palette.grey[500],
|
|
40
|
+
overflow: 'auto',
|
|
41
|
+
},
|
|
42
|
+
borderStyle: {
|
|
43
|
+
height: 300,
|
|
44
|
+
overflow: 'auto',
|
|
45
|
+
},
|
|
46
|
+
button: {
|
|
47
|
+
margin: theme.spacing(0.5, 0),
|
|
48
|
+
},
|
|
49
|
+
dragIcon: {
|
|
50
|
+
minWidth: '0px;',
|
|
51
|
+
marginRight: '10px',
|
|
52
|
+
},
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
const ReorderItemsDialog = ({ items, onClose, moveElement }: ReorderItemsDialogProps) => {
|
|
56
|
+
const { classes } = useStyles();
|
|
57
|
+
const [state, setState] = useState<ReorderItemsDialogState>({
|
|
58
|
+
draggingItemId: undefined,
|
|
59
|
+
draggingStartIndex: -1,
|
|
60
|
+
draggingIndex: -1,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const handleDragStartOrder = (id: string, index: number) => {
|
|
64
|
+
setState((prevState) => {
|
|
65
|
+
return {
|
|
66
|
+
...prevState,
|
|
67
|
+
draggingItemId: id,
|
|
68
|
+
draggingStartIndex: index,
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const handleDragOverOrder = (event: React.DragEvent, index: number) => {
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
if (state.draggingItemId) {
|
|
76
|
+
setState((prevState) => {
|
|
77
|
+
return {
|
|
78
|
+
...prevState,
|
|
79
|
+
draggingIndex: index,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const handleDragEndOrder = () => {
|
|
86
|
+
if (state.draggingItemId) {
|
|
87
|
+
moveElement(state.draggingItemId, state.draggingStartIndex, state.draggingIndex);
|
|
88
|
+
}
|
|
89
|
+
setState((prevState) => {
|
|
90
|
+
return {
|
|
91
|
+
...prevState,
|
|
92
|
+
draggingItemId: undefined,
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<Dialog
|
|
99
|
+
open={true}
|
|
100
|
+
onClose={() => onClose()}
|
|
101
|
+
aria-labelledby="dialog-title"
|
|
102
|
+
maxWidth={false}
|
|
103
|
+
data-testid="containment-reference-reorder-items-dialog">
|
|
104
|
+
<DialogTitle id="dialog-title">Sort elements</DialogTitle>
|
|
105
|
+
<DialogContent className={classes.dialogContent}>
|
|
106
|
+
<DialogContentText>Drag and drop elements to reorder them.</DialogContentText>
|
|
107
|
+
<div className={classes.paper}>
|
|
108
|
+
<List dense component="div" role="list" data-testid="containment-reference-items-list">
|
|
109
|
+
{items.map(({ label, id, iconURL }, index) => (
|
|
110
|
+
<ListItem
|
|
111
|
+
style={{ cursor: 'grab' }}
|
|
112
|
+
key={id}
|
|
113
|
+
role="listitem"
|
|
114
|
+
data-testid={label}
|
|
115
|
+
draggable
|
|
116
|
+
onDragStart={() => handleDragStartOrder(id, index)}
|
|
117
|
+
onDragOver={(event) => handleDragOverOrder(event, index)}
|
|
118
|
+
onDragEnd={handleDragEndOrder}>
|
|
119
|
+
<ListItemIcon className={classes.dragIcon}>
|
|
120
|
+
<DragHandleIcon />
|
|
121
|
+
</ListItemIcon>
|
|
122
|
+
<ListItemIcon className={classes.dragIcon}>
|
|
123
|
+
<IconOverlay iconURLs={iconURL} alt={label} />
|
|
124
|
+
</ListItemIcon>
|
|
125
|
+
<ListItemText id={`containment-reference-reorder-item-${id}-label`} primary={label} />
|
|
126
|
+
</ListItem>
|
|
127
|
+
))}
|
|
128
|
+
</List>
|
|
129
|
+
</div>
|
|
130
|
+
</DialogContent>
|
|
131
|
+
<DialogActions>
|
|
132
|
+
<Button
|
|
133
|
+
variant="contained"
|
|
134
|
+
color="primary"
|
|
135
|
+
type="button"
|
|
136
|
+
data-testid="close-containment-reference-reorder-items-dialog"
|
|
137
|
+
onClick={() => onClose()}>
|
|
138
|
+
close
|
|
139
|
+
</Button>
|
|
140
|
+
</DialogActions>
|
|
141
|
+
</Dialog>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export default ReorderItemsDialog;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*****************************************************************************
|
|
2
|
+
* Copyright (c) 2023, 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
|
+
|
|
15
|
+
export interface ReorderItemsDialogProps {
|
|
16
|
+
items: ReorderingItem[];
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
moveElement: (itemId: string, fromIndex: number, toIndex: number) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface ReorderItemsDialogState {
|
|
21
|
+
draggingItemId: string | undefined;
|
|
22
|
+
draggingStartIndex: number;
|
|
23
|
+
draggingIndex: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ReorderingItem {
|
|
27
|
+
label: string;
|
|
28
|
+
id: string;
|
|
29
|
+
iconURL: string[];
|
|
30
|
+
}
|
package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionFragment.types.ts
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*****************************************************************************
|
|
2
|
+
* Copyright (c) 2023, 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
|
+
|
|
15
|
+
import { GQLWidget } from '@eclipse-sirius/sirius-components-forms';
|
|
16
|
+
import { GQLMessage } from '@eclipse-sirius/sirius-components-core';
|
|
17
|
+
|
|
18
|
+
export interface GQLLanguageExpression extends GQLWidget {
|
|
19
|
+
languages: Array<GQLLanguageElement> | null;
|
|
20
|
+
predefinedLanguages: Array<string>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface GQLLanguageElement {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
body: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface GQLAddLanguageData {
|
|
30
|
+
addLanguage: GQLAddLanguagePayload;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface GQLAddLanguageVariables {
|
|
34
|
+
input: GQLAddLanguageInput;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface GQLAddLanguageInput {
|
|
38
|
+
id: string;
|
|
39
|
+
editingContextId: string;
|
|
40
|
+
representationId: string;
|
|
41
|
+
languageExpressionId: string;
|
|
42
|
+
language: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface GQLAddLanguagePayload {
|
|
46
|
+
__typename: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface GQLSuccessPayload extends GQLAddLanguagePayload {
|
|
50
|
+
messages: GQLMessage[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface GQLErrorPayload extends GQLAddLanguagePayload {
|
|
54
|
+
messages: GQLMessage[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface GQLDeleteLanguageVariables {
|
|
58
|
+
input: GQLDeleteLanguageInput;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface GQLDeleteLanguageInput {
|
|
62
|
+
id: string;
|
|
63
|
+
editingContextId: string;
|
|
64
|
+
representationId: string;
|
|
65
|
+
languageExpressionId: string;
|
|
66
|
+
language: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface GQLDeleteLanguageData {
|
|
70
|
+
deleteLanguage: GQLDeleteLanguagePayload;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface GQLDeleteLanguagePayload {
|
|
74
|
+
__typename: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface GQLEditLanguageBodyVariables {
|
|
78
|
+
input: GQLEditLanguageBodyInput;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface GQLEditLanguageBodyInput {
|
|
82
|
+
id: string;
|
|
83
|
+
editingContextId: string;
|
|
84
|
+
representationId: string;
|
|
85
|
+
languageExpressionId: string;
|
|
86
|
+
language: string;
|
|
87
|
+
newBody: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface GQLEditLanguageBodyData {
|
|
91
|
+
editLanguageBody: GQLEditLanguageBodyPayload;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface GQLEditLanguageBodyPayload {
|
|
95
|
+
__typename: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface GQLMoveLanguageVariables {
|
|
99
|
+
input: GQLMoveLanguageInput;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface GQLMoveLanguageInput {
|
|
103
|
+
id: string;
|
|
104
|
+
editingContextId: string;
|
|
105
|
+
representationId: string;
|
|
106
|
+
languageExpressionId: string;
|
|
107
|
+
language: string;
|
|
108
|
+
direction: 'BACKWARD' | 'FORWARD';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface GQLMoveLanguageData {
|
|
112
|
+
moveLanguage: GQLMoveLanguagePayload;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface GQLMoveLanguagePayload {
|
|
116
|
+
__typename: string;
|
|
117
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*****************************************************************************
|
|
2
|
+
* Copyright (c) 2023, 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
|
+
|
|
15
|
+
import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
|
|
16
|
+
|
|
17
|
+
export const LanguageExpressionIcon = (props: SvgIconProps) => {
|
|
18
|
+
return (
|
|
19
|
+
<SvgIcon
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
viewBox="0 0 24 24"
|
|
22
|
+
aria-labelledby="title"
|
|
23
|
+
aria-describedby="desc"
|
|
24
|
+
role="img"
|
|
25
|
+
{...props}>
|
|
26
|
+
<g>
|
|
27
|
+
<title>language Expression icon</title>
|
|
28
|
+
<path d="m3,3.01l0.01,12.96l6.98,-0.01l-0.01,-2.47l-4.49,0l0.01,-10.49l-2.51,0.01z" fill="#333333" />
|
|
29
|
+
<path
|
|
30
|
+
d="m13.02,21.49l7.97,0l0,-2.48l-4.99,0l-0.02,-3l3.55,0l0,-2.48l-3.55,-0.01l0.03,-2.52l4.98,0l0,-2.5l-8,0l0.03,12.99z"
|
|
31
|
+
fill="#333333"
|
|
32
|
+
/>
|
|
33
|
+
</g>
|
|
34
|
+
</SvgIcon>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*****************************************************************************
|
|
2
|
+
* Copyright (c) 2023, 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 { useSelection } from '@eclipse-sirius/sirius-components-core';
|
|
15
|
+
import MuiAccordion from '@mui/material/Accordion';
|
|
16
|
+
import MuiAccordionDetails from '@mui/material/AccordionDetails';
|
|
17
|
+
import MuiAccordionSummary from '@mui/material/AccordionSummary';
|
|
18
|
+
import Box from '@mui/material/Box';
|
|
19
|
+
import IconButton from '@mui/material/IconButton';
|
|
20
|
+
import TextField from '@mui/material/TextField';
|
|
21
|
+
import Typography from '@mui/material/Typography';
|
|
22
|
+
import { makeStyles, withStyles } from 'tss-react/mui';
|
|
23
|
+
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
|
24
|
+
import ArrowForwardIosSharpIcon from '@mui/icons-material/ArrowForwardIosSharp';
|
|
25
|
+
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
26
|
+
import HelpOutlineOutlined from '@mui/icons-material/HelpOutlineOutlined';
|
|
27
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
28
|
+
import { useEffect, useRef, useState } from 'react';
|
|
29
|
+
import { GQLLanguageExpression } from './LanguageExpressionFragment.types';
|
|
30
|
+
import { WidgetProps } from '@eclipse-sirius/sirius-components-formdescriptioneditors';
|
|
31
|
+
|
|
32
|
+
const Accordion = withStyles(MuiAccordion, (theme) => ({
|
|
33
|
+
root: {
|
|
34
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
35
|
+
boxShadow: 'none',
|
|
36
|
+
'&:not(:last-child)': {
|
|
37
|
+
borderBottom: 0,
|
|
38
|
+
},
|
|
39
|
+
'&:before': {
|
|
40
|
+
display: 'none',
|
|
41
|
+
},
|
|
42
|
+
'&$expanded': {
|
|
43
|
+
margin: 'auto',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
expanded: {},
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
const AccordionSummary = withStyles(MuiAccordionSummary, (_theme) => ({
|
|
50
|
+
root: {
|
|
51
|
+
backgroundColor: 'rgba(0, 0, 0, .03)',
|
|
52
|
+
borderBottom: '1px solid rgba(0, 0, 0, .125)',
|
|
53
|
+
marginBottom: -1,
|
|
54
|
+
minHeight: 56,
|
|
55
|
+
paddingLeft: 8,
|
|
56
|
+
flexDirection: 'row-reverse',
|
|
57
|
+
'& .MuiAccordionSummary-expandIcon.Mui-expanded': {
|
|
58
|
+
transform: 'rotate(90deg)',
|
|
59
|
+
},
|
|
60
|
+
'& .MuiIconButton-edgeEnd': {
|
|
61
|
+
marginRight: 0,
|
|
62
|
+
},
|
|
63
|
+
'&$expanded': {
|
|
64
|
+
minHeight: 56,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
content: {
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
'&$expanded': {
|
|
70
|
+
margin: '12px 0',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
expanded: {},
|
|
74
|
+
}));
|
|
75
|
+
|
|
76
|
+
const AccordionDetails = withStyles(MuiAccordionDetails, (theme) => ({
|
|
77
|
+
root: {
|
|
78
|
+
padding: theme.spacing(1),
|
|
79
|
+
borderTop: '1px solid rgba(0, 0, 0, .125)',
|
|
80
|
+
},
|
|
81
|
+
}));
|
|
82
|
+
|
|
83
|
+
const useStyles = makeStyles()((theme) => ({
|
|
84
|
+
style: {
|
|
85
|
+
color: theme.palette.secondary.main,
|
|
86
|
+
},
|
|
87
|
+
selected: {
|
|
88
|
+
color: theme.palette.selected,
|
|
89
|
+
},
|
|
90
|
+
propertySectionLabel: {
|
|
91
|
+
display: 'flex',
|
|
92
|
+
flexDirection: 'row',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
},
|
|
95
|
+
}));
|
|
96
|
+
|
|
97
|
+
type PropertySectionComponentProps = WidgetProps<GQLLanguageExpression>;
|
|
98
|
+
|
|
99
|
+
export const LanguageExpressionPreview = ({ widget }: PropertySectionComponentProps) => {
|
|
100
|
+
const { classes } = useStyles();
|
|
101
|
+
const [selected, setSelected] = useState<boolean>(false);
|
|
102
|
+
const [expanded, setExpanded] = useState<boolean>(false);
|
|
103
|
+
|
|
104
|
+
const { selection } = useSelection();
|
|
105
|
+
|
|
106
|
+
const ref = useRef<HTMLInputElement | null>(null);
|
|
107
|
+
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
if (ref.current && selection.entries.find((entry) => entry.id === widget.id)) {
|
|
110
|
+
ref.current.focus();
|
|
111
|
+
setSelected(true);
|
|
112
|
+
} else {
|
|
113
|
+
setSelected(false);
|
|
114
|
+
}
|
|
115
|
+
}, [selection, widget]);
|
|
116
|
+
|
|
117
|
+
const handlePanelExpansion = () => (_event: React.SyntheticEvent, expanded: boolean) => {
|
|
118
|
+
setExpanded(expanded);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<div>
|
|
123
|
+
<div className={classes.propertySectionLabel}>
|
|
124
|
+
<Typography variant="subtitle2" className={selected ? classes.selected : ''}>
|
|
125
|
+
{widget.label}
|
|
126
|
+
</Typography>
|
|
127
|
+
{widget.hasHelpText && <HelpOutlineOutlined color="secondary" style={{ marginLeft: 8, fontSize: 16 }} />}
|
|
128
|
+
</div>
|
|
129
|
+
<Accordion square elevation={0} ref={ref} onChange={handlePanelExpansion()} expanded={expanded}>
|
|
130
|
+
<AccordionSummary
|
|
131
|
+
aria-controls="panel1d-content"
|
|
132
|
+
expandIcon={<ArrowForwardIosSharpIcon style={{ fontSize: '0.9rem' }} />}
|
|
133
|
+
id="panel1d-header">
|
|
134
|
+
<Typography>Language</Typography>
|
|
135
|
+
<Box sx={{ marginLeft: 'auto' }}>
|
|
136
|
+
<IconButton size="small" disabled>
|
|
137
|
+
<ArrowUpwardIcon />
|
|
138
|
+
</IconButton>
|
|
139
|
+
<IconButton size="small" disabled>
|
|
140
|
+
<ArrowDownwardIcon />
|
|
141
|
+
</IconButton>
|
|
142
|
+
<IconButton size="small" disabled>
|
|
143
|
+
<DeleteIcon />
|
|
144
|
+
</IconButton>
|
|
145
|
+
</Box>
|
|
146
|
+
</AccordionSummary>
|
|
147
|
+
<AccordionDetails>
|
|
148
|
+
<TextField
|
|
149
|
+
fullWidth
|
|
150
|
+
id="outlined-multiline-flexible"
|
|
151
|
+
value={
|
|
152
|
+
'Lorem ipsum dolor, sit amet consectetur adipisicing elit. Qui fugit saepe tenetur molestiae officia cupiditate rem voluptas repellendus, consequatur cumque!'
|
|
153
|
+
}
|
|
154
|
+
multiline
|
|
155
|
+
variant="outlined"
|
|
156
|
+
minRows={5}
|
|
157
|
+
maxRows={8}
|
|
158
|
+
/>
|
|
159
|
+
</AccordionDetails>
|
|
160
|
+
</Accordion>
|
|
161
|
+
</div>
|
|
162
|
+
);
|
|
163
|
+
};
|