@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.
Files changed (340) hide show
  1. package/.prettierrc +22 -0
  2. package/.project +11 -0
  3. package/.turbo/cache/2e7de991e3eb5b77-meta.json +1 -0
  4. package/.turbo/cache/2e7de991e3eb5b77.tar.zst +0 -0
  5. package/.turbo/cache/6d4efa6c3019818e-meta.json +1 -0
  6. package/.turbo/cache/6d4efa6c3019818e.tar.zst +0 -0
  7. package/.turbo/cache/904b84e8ab6fefb1-meta.json +1 -0
  8. package/.turbo/cache/904b84e8ab6fefb1.tar.zst +0 -0
  9. package/.turbo/cache/b657accc57a869a6-meta.json +1 -0
  10. package/.turbo/cache/b657accc57a869a6.tar.zst +0 -0
  11. package/.turbo/cookies/1.cookie +0 -0
  12. package/.turbo/cookies/2.cookie +0 -0
  13. package/.turbo/cookies/3.cookie +0 -0
  14. package/.turbo/cookies/4.cookie +0 -0
  15. package/.turbo/cookies/5.cookie +0 -0
  16. package/.turbo/cookies/6.cookie +0 -0
  17. package/.turbo/cookies/7.cookie +0 -0
  18. package/.turbo/cookies/8.cookie +0 -0
  19. package/.turbo/daemon/8a1f25190e5082e3-turbo.log.2026-04-01 +0 -0
  20. package/package.json +32 -0
  21. package/papyrus-web/.env.development +2 -0
  22. package/papyrus-web/.prettierrc +22 -0
  23. package/papyrus-web/.turbo/turbo-build.log +30 -0
  24. package/papyrus-web/.turbo/turbo-format-lint.log +6 -0
  25. package/papyrus-web/README.adoc +84 -0
  26. package/papyrus-web/dist/assets/Lato-Black-B_kLSaRn.ttf +0 -0
  27. package/papyrus-web/dist/assets/Lato-BlackItalic-B2JUbIh8.ttf +0 -0
  28. package/papyrus-web/dist/assets/Lato-Bold-DBmunEOG.ttf +0 -0
  29. package/papyrus-web/dist/assets/Lato-BoldItalic-DfTVlc2v.ttf +0 -0
  30. package/papyrus-web/dist/assets/Lato-Italic-CxPt6gM6.ttf +0 -0
  31. package/papyrus-web/dist/assets/Lato-Light-Cg7pVZQZ.ttf +0 -0
  32. package/papyrus-web/dist/assets/Lato-LightItalic-BkbZ6uep.ttf +0 -0
  33. package/papyrus-web/dist/assets/Lato-Regular-57KsL5Ww.ttf +0 -0
  34. package/papyrus-web/dist/assets/Lato-Thin-CvSM47fD.ttf +0 -0
  35. package/papyrus-web/dist/assets/Lato-ThinItalic-9M4CJfMt.ttf +0 -0
  36. package/papyrus-web/dist/assets/browser-ponyfill-CVpHIrSq.js +2 -0
  37. package/papyrus-web/dist/assets/index-CjSWMYED.js +6122 -0
  38. package/papyrus-web/dist/assets/index-DJjGIuFa.css +1 -0
  39. package/papyrus-web/dist/assets/papyrus-icon-DqmMeq_6.png +0 -0
  40. package/papyrus-web/dist/favicon.ico +0 -0
  41. package/papyrus-web/dist/index.html +42 -0
  42. package/papyrus-web/dist/manifest.json +15 -0
  43. package/papyrus-web/dist/papyrus.ico +0 -0
  44. package/papyrus-web/index.html +41 -0
  45. package/papyrus-web/package.json +104 -0
  46. package/papyrus-web/public/favicon.ico +0 -0
  47. package/papyrus-web/public/manifest.json +15 -0
  48. package/papyrus-web/public/papyrus.ico +0 -0
  49. package/papyrus-web/src/ReactFlow.css +17 -0
  50. package/papyrus-web/src/core/PapyrusIcon.tsx +17 -0
  51. package/papyrus-web/src/core/PapyrusNavigationBarIcon.tsx +46 -0
  52. package/papyrus-web/src/core/URL.ts +34 -0
  53. package/papyrus-web/src/extensions/ExtensionRegistryMergeStrategy.ts +50 -0
  54. package/papyrus-web/src/fonts/Lato/Lato-Black.ttf +0 -0
  55. package/papyrus-web/src/fonts/Lato/Lato-BlackItalic.ttf +0 -0
  56. package/papyrus-web/src/fonts/Lato/Lato-Bold.ttf +0 -0
  57. package/papyrus-web/src/fonts/Lato/Lato-BoldItalic.ttf +0 -0
  58. package/papyrus-web/src/fonts/Lato/Lato-Italic.ttf +0 -0
  59. package/papyrus-web/src/fonts/Lato/Lato-Light.ttf +0 -0
  60. package/papyrus-web/src/fonts/Lato/Lato-LightItalic.ttf +0 -0
  61. package/papyrus-web/src/fonts/Lato/Lato-Regular.ttf +0 -0
  62. package/papyrus-web/src/fonts/Lato/Lato-Thin.ttf +0 -0
  63. package/papyrus-web/src/fonts/Lato/Lato-ThinItalic.ttf +0 -0
  64. package/papyrus-web/src/fonts/Lato/OFL.txt +93 -0
  65. package/papyrus-web/src/fonts.css +81 -0
  66. package/papyrus-web/src/footer/Footer.tsx +50 -0
  67. package/papyrus-web/src/icons/papyrus-icon.png +0 -0
  68. package/papyrus-web/src/index.tsx +325 -0
  69. package/papyrus-web/src/portals.css +16 -0
  70. package/papyrus-web/src/react-app-env.d.ts +1 -0
  71. package/papyrus-web/src/reset.css +218 -0
  72. package/papyrus-web/src/variables.css +111 -0
  73. package/papyrus-web/src/vite-env.d.ts +1 -0
  74. package/papyrus-web/tsconfig.json +34 -0
  75. package/papyrus-web/vite.config.js +24 -0
  76. package/papyrus-web-components/.prettierrc +22 -0
  77. package/papyrus-web-components/.turbo/turbo-build.log +77 -0
  78. package/papyrus-web-components/.turbo/turbo-format-lint.log +6 -0
  79. package/papyrus-web-components/README.adoc +13 -0
  80. package/papyrus-web-components/dist/diagram-tools/EditProjectView.types.d.ts +48 -0
  81. package/papyrus-web-components/dist/diagram-tools/EditProjectView.types.d.ts.map +1 -0
  82. package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.d.ts +3 -0
  83. package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.d.ts.map +1 -0
  84. package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.types.d.ts +33 -0
  85. package/papyrus-web-components/dist/diagram-tools/FilterableSortableList.types.d.ts.map +1 -0
  86. package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.d.ts +15 -0
  87. package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.d.ts.map +1 -0
  88. package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.types.d.ts +20 -0
  89. package/papyrus-web-components/dist/diagram-tools/ModelBrowserFilterBar.types.d.ts.map +1 -0
  90. package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.d.ts +3 -0
  91. package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.d.ts.map +1 -0
  92. package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.types.d.ts +53 -0
  93. package/papyrus-web-components/dist/diagram-tools/PapyrusPopupToolContribution.types.d.ts.map +1 -0
  94. package/papyrus-web-components/dist/diagram-tools/TransferModal.d.ts +3 -0
  95. package/papyrus-web-components/dist/diagram-tools/TransferModal.d.ts.map +1 -0
  96. package/papyrus-web-components/dist/diagram-tools/TransferModal.types.d.ts +32 -0
  97. package/papyrus-web-components/dist/diagram-tools/TransferModal.types.d.ts.map +1 -0
  98. package/papyrus-web-components/dist/index.d.ts +61 -0
  99. package/papyrus-web-components/dist/index.d.ts.map +1 -0
  100. package/papyrus-web-components/dist/nodes/NodesDocumentTransform.d.ts +15 -0
  101. package/papyrus-web-components/dist/nodes/NodesDocumentTransform.d.ts.map +1 -0
  102. package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.d.ts +18 -0
  103. package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.d.ts.map +1 -0
  104. package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.types.d.ts +29 -0
  105. package/papyrus-web-components/dist/nodes/cuboid/CuboidNode.types.d.ts.map +1 -0
  106. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeConverter.d.ts +21 -0
  107. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeConverter.d.ts.map +1 -0
  108. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeLayoutHandler.d.ts +23 -0
  109. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeLayoutHandler.d.ts.map +1 -0
  110. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListConverter.d.ts +21 -0
  111. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListConverter.d.ts.map +1 -0
  112. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListLayoutHandler.d.ts +23 -0
  113. package/papyrus-web-components/dist/nodes/cuboid/CuboidNodeListLayoutHandler.d.ts.map +1 -0
  114. package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.d.ts +3 -0
  115. package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.d.ts.map +1 -0
  116. package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.types.d.ts +34 -0
  117. package/papyrus-web-components/dist/nodes/customImage/CustomImageNode.types.d.ts.map +1 -0
  118. package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeConverter.d.ts +22 -0
  119. package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeConverter.d.ts.map +1 -0
  120. package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeLayoutHandler.d.ts +23 -0
  121. package/papyrus-web-components/dist/nodes/customImage/CustomImageNodeLayoutHandler.d.ts.map +1 -0
  122. package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.d.ts +15 -0
  123. package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.d.ts.map +1 -0
  124. package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.types.d.ts +33 -0
  125. package/papyrus-web-components/dist/nodes/ellipse/EllipseNode.types.d.ts.map +1 -0
  126. package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeConverter.d.ts +23 -0
  127. package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeConverter.d.ts.map +1 -0
  128. package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeLayoutHandler.d.ts +25 -0
  129. package/papyrus-web-components/dist/nodes/ellipse/EllipseNodeLayoutHandler.d.ts.map +1 -0
  130. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.d.ts +18 -0
  131. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.d.ts.map +1 -0
  132. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.types.d.ts +23 -0
  133. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNode.types.d.ts.map +1 -0
  134. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeConverter.d.ts +21 -0
  135. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeConverter.d.ts.map +1 -0
  136. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeLayoutHandler.d.ts +21 -0
  137. package/papyrus-web-components/dist/nodes/innerFlag/InnerFlagNodeLayoutHandler.d.ts.map +1 -0
  138. package/papyrus-web-components/dist/nodes/note/NoteLabel.d.ts +18 -0
  139. package/papyrus-web-components/dist/nodes/note/NoteLabel.d.ts.map +1 -0
  140. package/papyrus-web-components/dist/nodes/note/NoteNode.d.ts +19 -0
  141. package/papyrus-web-components/dist/nodes/note/NoteNode.d.ts.map +1 -0
  142. package/papyrus-web-components/dist/nodes/note/NoteNode.types.d.ts +41 -0
  143. package/papyrus-web-components/dist/nodes/note/NoteNode.types.d.ts.map +1 -0
  144. package/papyrus-web-components/dist/nodes/note/NoteNodeConverter.d.ts +21 -0
  145. package/papyrus-web-components/dist/nodes/note/NoteNodeConverter.d.ts.map +1 -0
  146. package/papyrus-web-components/dist/nodes/note/NoteNodeLayoutHandler.d.ts +21 -0
  147. package/papyrus-web-components/dist/nodes/note/NoteNodeLayoutHandler.d.ts.map +1 -0
  148. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.d.ts +18 -0
  149. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.d.ts.map +1 -0
  150. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.types.d.ts +23 -0
  151. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNode.types.d.ts.map +1 -0
  152. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeConverter.d.ts +21 -0
  153. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeConverter.d.ts.map +1 -0
  154. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeLayoutHandler.d.ts +21 -0
  155. package/papyrus-web-components/dist/nodes/outerFlag/OuterFlagNodeLayoutHandler.d.ts.map +1 -0
  156. package/papyrus-web-components/dist/nodes/package/PackageNode.d.ts +18 -0
  157. package/papyrus-web-components/dist/nodes/package/PackageNode.d.ts.map +1 -0
  158. package/papyrus-web-components/dist/nodes/package/PackageNode.types.d.ts +29 -0
  159. package/papyrus-web-components/dist/nodes/package/PackageNode.types.d.ts.map +1 -0
  160. package/papyrus-web-components/dist/nodes/package/PackageNodeConverter.d.ts +21 -0
  161. package/papyrus-web-components/dist/nodes/package/PackageNodeConverter.d.ts.map +1 -0
  162. package/papyrus-web-components/dist/nodes/package/PackageNodeLayoutHandler.d.ts +23 -0
  163. package/papyrus-web-components/dist/nodes/package/PackageNodeLayoutHandler.d.ts.map +1 -0
  164. package/papyrus-web-components/dist/nodes/package/PackageNodeListConverter.d.ts +21 -0
  165. package/papyrus-web-components/dist/nodes/package/PackageNodeListConverter.d.ts.map +1 -0
  166. package/papyrus-web-components/dist/nodes/package/PackageNodeListLayoutHandler.d.ts +24 -0
  167. package/papyrus-web-components/dist/nodes/package/PackageNodeListLayoutHandler.d.ts.map +1 -0
  168. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.d.ts +18 -0
  169. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.d.ts.map +1 -0
  170. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.types.d.ts +23 -0
  171. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.types.d.ts.map +1 -0
  172. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeConverter.d.ts +21 -0
  173. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeConverter.d.ts.map +1 -0
  174. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeLayoutHandler.d.ts +20 -0
  175. package/papyrus-web-components/dist/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeLayoutHandler.d.ts.map +1 -0
  176. package/papyrus-web-components/dist/papyrus-web-components.es.js +11710 -0
  177. package/papyrus-web-components/dist/papyrus-web-components.umd.js +11664 -0
  178. package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.d.ts +3 -0
  179. package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.d.ts.map +1 -0
  180. package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.types.d.ts +55 -0
  181. package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModal.types.d.ts.map +1 -0
  182. package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModalMachine.d.ts +65 -0
  183. package/papyrus-web-components/dist/profile/apply-profile/ApplyProfileModalMachine.d.ts.map +1 -0
  184. package/papyrus-web-components/dist/profile/apply-profile/UMLModelTreeItemContextMenuContribution.d.ts +16 -0
  185. package/papyrus-web-components/dist/profile/apply-profile/UMLModelTreeItemContextMenuContribution.d.ts.map +1 -0
  186. package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.d.ts +15 -0
  187. package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.d.ts.map +1 -0
  188. package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.types.d.ts +48 -0
  189. package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModal.types.d.ts.map +1 -0
  190. package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModalMachine.d.ts +65 -0
  191. package/papyrus-web-components/dist/profile/apply-stereotype/ApplyStereotypeModalMachine.d.ts.map +1 -0
  192. package/papyrus-web-components/dist/profile/apply-stereotype/UMLElementTreeItemContextMenuContribution.d.ts +16 -0
  193. package/papyrus-web-components/dist/profile/apply-stereotype/UMLElementTreeItemContextMenuContribution.d.ts.map +1 -0
  194. package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.d.ts +16 -0
  195. package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.d.ts.map +1 -0
  196. package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.types.d.ts +72 -0
  197. package/papyrus-web-components/dist/profile/publish-profile/PublishProfileDialog.types.d.ts.map +1 -0
  198. package/papyrus-web-components/dist/profile/publish-profile/PublishProfileTreeItemContextMenuContribution.d.ts +16 -0
  199. package/papyrus-web-components/dist/profile/publish-profile/PublishProfileTreeItemContextMenuContribution.d.ts.map +1 -0
  200. package/papyrus-web-components/dist/widgets/CustomWidgetsDocumentTransform.d.ts +15 -0
  201. package/papyrus-web-components/dist/widgets/CustomWidgetsDocumentTransform.d.ts.map +1 -0
  202. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceFragment.types.d.ts +145 -0
  203. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceFragment.types.d.ts.map +1 -0
  204. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceIcon.d.ts +16 -0
  205. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceIcon.d.ts.map +1 -0
  206. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferencePreview.d.ts +19 -0
  207. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferencePreview.d.ts.map +1 -0
  208. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceSection.d.ts +21 -0
  209. package/papyrus-web-components/dist/widgets/containmentReference/ContainmentReferenceSection.d.ts.map +1 -0
  210. package/papyrus-web-components/dist/widgets/containmentReference/ReorderIcon.d.ts +18 -0
  211. package/papyrus-web-components/dist/widgets/containmentReference/ReorderIcon.d.ts.map +1 -0
  212. package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.d.ts +17 -0
  213. package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.d.ts.map +1 -0
  214. package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.types.d.ts +23 -0
  215. package/papyrus-web-components/dist/widgets/containmentReference/dialogs/CreateNewChildDialog.types.d.ts.map +1 -0
  216. package/papyrus-web-components/dist/widgets/customImage/AddImageIcon.d.ts +17 -0
  217. package/papyrus-web-components/dist/widgets/customImage/AddImageIcon.d.ts.map +1 -0
  218. package/papyrus-web-components/dist/widgets/customImage/CustomImageFragment.types.d.ts +83 -0
  219. package/papyrus-web-components/dist/widgets/customImage/CustomImageFragment.types.d.ts.map +1 -0
  220. package/papyrus-web-components/dist/widgets/customImage/CustomImageIcon.d.ts +17 -0
  221. package/papyrus-web-components/dist/widgets/customImage/CustomImageIcon.d.ts.map +1 -0
  222. package/papyrus-web-components/dist/widgets/customImage/CustomImagePreview.d.ts +20 -0
  223. package/papyrus-web-components/dist/widgets/customImage/CustomImagePreview.d.ts.map +1 -0
  224. package/papyrus-web-components/dist/widgets/customImage/CustomImageSection.d.ts +21 -0
  225. package/papyrus-web-components/dist/widgets/customImage/CustomImageSection.d.ts.map +1 -0
  226. package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.d.ts +17 -0
  227. package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.d.ts.map +1 -0
  228. package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.types.d.ts +29 -0
  229. package/papyrus-web-components/dist/widgets/dialogs/ReorderItemsDialog.types.d.ts.map +1 -0
  230. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionFragment.types.d.ts +97 -0
  231. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionFragment.types.d.ts.map +1 -0
  232. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionIcon.d.ts +16 -0
  233. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionIcon.d.ts.map +1 -0
  234. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionPreview.d.ts +6 -0
  235. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionPreview.d.ts.map +1 -0
  236. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionSection.d.ts +21 -0
  237. package/papyrus-web-components/dist/widgets/languageExpression/LanguageExpressionSection.d.ts.map +1 -0
  238. package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPreview.d.ts +19 -0
  239. package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPreview.d.ts.map +1 -0
  240. package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.d.ts +7 -0
  241. package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.d.ts.map +1 -0
  242. package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.types.d.ts +135 -0
  243. package/papyrus-web-components/dist/widgets/primitiveList/PrimitiveListWidgetPropertySection.types.d.ts.map +1 -0
  244. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioFragment.type.d.ts +42 -0
  245. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioFragment.type.d.ts.map +1 -0
  246. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioIcon.d.ts +16 -0
  247. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioIcon.d.ts.map +1 -0
  248. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioPreview.d.ts +19 -0
  249. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioPreview.d.ts.map +1 -0
  250. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioSection.d.ts +18 -0
  251. package/papyrus-web-components/dist/widgets/primitiveRadio/PrimitiveRadioSection.d.ts.map +1 -0
  252. package/papyrus-web-components/package.json +105 -0
  253. package/papyrus-web-components/src/diagram-tools/EditProjectView.types.ts +56 -0
  254. package/papyrus-web-components/src/diagram-tools/FilterableSortableList.tsx +172 -0
  255. package/papyrus-web-components/src/diagram-tools/FilterableSortableList.types.ts +34 -0
  256. package/papyrus-web-components/src/diagram-tools/ModelBrowserFilterBar.tsx +73 -0
  257. package/papyrus-web-components/src/diagram-tools/ModelBrowserFilterBar.types.ts +19 -0
  258. package/papyrus-web-components/src/diagram-tools/PapyrusPopupToolContribution.tsx +206 -0
  259. package/papyrus-web-components/src/diagram-tools/PapyrusPopupToolContribution.types.ts +61 -0
  260. package/papyrus-web-components/src/diagram-tools/TransferModal.tsx +235 -0
  261. package/papyrus-web-components/src/diagram-tools/TransferModal.types.ts +35 -0
  262. package/papyrus-web-components/src/index.ts +61 -0
  263. package/papyrus-web-components/src/nodes/NodesDocumentTransform.ts +242 -0
  264. package/papyrus-web-components/src/nodes/cuboid/CuboidNode.tsx +183 -0
  265. package/papyrus-web-components/src/nodes/cuboid/CuboidNode.types.ts +30 -0
  266. package/papyrus-web-components/src/nodes/cuboid/CuboidNodeConverter.ts +201 -0
  267. package/papyrus-web-components/src/nodes/cuboid/CuboidNodeLayoutHandler.ts +283 -0
  268. package/papyrus-web-components/src/nodes/cuboid/CuboidNodeListConverter.ts +238 -0
  269. package/papyrus-web-components/src/nodes/cuboid/CuboidNodeListLayoutHandler.ts +260 -0
  270. package/papyrus-web-components/src/nodes/customImage/CustomImageNode.tsx +153 -0
  271. package/papyrus-web-components/src/nodes/customImage/CustomImageNode.types.ts +37 -0
  272. package/papyrus-web-components/src/nodes/customImage/CustomImageNodeConverter.ts +212 -0
  273. package/papyrus-web-components/src/nodes/customImage/CustomImageNodeLayoutHandler.ts +53 -0
  274. package/papyrus-web-components/src/nodes/ellipse/EllipseNode.tsx +119 -0
  275. package/papyrus-web-components/src/nodes/ellipse/EllipseNode.types.ts +35 -0
  276. package/papyrus-web-components/src/nodes/ellipse/EllipseNodeConverter.ts +208 -0
  277. package/papyrus-web-components/src/nodes/ellipse/EllipseNodeLayoutHandler.ts +284 -0
  278. package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNode.tsx +156 -0
  279. package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNode.types.ts +23 -0
  280. package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNodeConverter.ts +200 -0
  281. package/papyrus-web-components/src/nodes/innerFlag/InnerFlagNodeLayoutHandler.ts +118 -0
  282. package/papyrus-web-components/src/nodes/note/NoteLabel.tsx +146 -0
  283. package/papyrus-web-components/src/nodes/note/NoteNode.tsx +168 -0
  284. package/papyrus-web-components/src/nodes/note/NoteNode.types.ts +43 -0
  285. package/papyrus-web-components/src/nodes/note/NoteNodeConverter.ts +200 -0
  286. package/papyrus-web-components/src/nodes/note/NoteNodeLayoutHandler.ts +85 -0
  287. package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNode.tsx +153 -0
  288. package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNode.types.ts +23 -0
  289. package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNodeConverter.ts +200 -0
  290. package/papyrus-web-components/src/nodes/outerFlag/OuterFlagNodeLayoutHandler.ts +116 -0
  291. package/papyrus-web-components/src/nodes/package/PackageNode.tsx +200 -0
  292. package/papyrus-web-components/src/nodes/package/PackageNode.types.ts +30 -0
  293. package/papyrus-web-components/src/nodes/package/PackageNodeConverter.ts +243 -0
  294. package/papyrus-web-components/src/nodes/package/PackageNodeLayoutHandler.ts +229 -0
  295. package/papyrus-web-components/src/nodes/package/PackageNodeListConverter.ts +254 -0
  296. package/papyrus-web-components/src/nodes/package/PackageNodeListLayoutHandler.ts +253 -0
  297. package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.tsx +155 -0
  298. package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNode.types.ts +23 -0
  299. package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeConverter.ts +205 -0
  300. package/papyrus-web-components/src/nodes/rectangleWithExternalLabel/RectangleWithExternalLabelNodeLayoutHandler.ts +55 -0
  301. package/papyrus-web-components/src/profile/apply-profile/ApplyProfileModal.tsx +238 -0
  302. package/papyrus-web-components/src/profile/apply-profile/ApplyProfileModal.types.tsx +65 -0
  303. package/papyrus-web-components/src/profile/apply-profile/ApplyProfileModalMachine.tsx +175 -0
  304. package/papyrus-web-components/src/profile/apply-profile/UMLModelTreeItemContextMenuContribution.tsx +74 -0
  305. package/papyrus-web-components/src/profile/apply-stereotype/ApplyStereotypeModal.tsx +248 -0
  306. package/papyrus-web-components/src/profile/apply-stereotype/ApplyStereotypeModal.types.ts +57 -0
  307. package/papyrus-web-components/src/profile/apply-stereotype/ApplyStereotypeModalMachine.ts +185 -0
  308. package/papyrus-web-components/src/profile/apply-stereotype/UMLElementTreeItemContextMenuContribution.tsx +70 -0
  309. package/papyrus-web-components/src/profile/publish-profile/PublishProfileDialog.tsx +380 -0
  310. package/papyrus-web-components/src/profile/publish-profile/PublishProfileDialog.types.ts +84 -0
  311. package/papyrus-web-components/src/profile/publish-profile/PublishProfileTreeItemContextMenuContribution.tsx +59 -0
  312. package/papyrus-web-components/src/widgets/CustomWidgetsDocumentTransform.ts +215 -0
  313. package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferenceFragment.types.ts +178 -0
  314. package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferenceIcon.tsx +38 -0
  315. package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferencePreview.tsx +106 -0
  316. package/papyrus-web-components/src/widgets/containmentReference/ContainmentReferenceSection.tsx +508 -0
  317. package/papyrus-web-components/src/widgets/containmentReference/ReorderIcon.tsx +31 -0
  318. package/papyrus-web-components/src/widgets/containmentReference/dialogs/CreateNewChildDialog.tsx +104 -0
  319. package/papyrus-web-components/src/widgets/containmentReference/dialogs/CreateNewChildDialog.types.ts +24 -0
  320. package/papyrus-web-components/src/widgets/customImage/AddImageIcon.tsx +35 -0
  321. package/papyrus-web-components/src/widgets/customImage/CustomImageFragment.types.ts +98 -0
  322. package/papyrus-web-components/src/widgets/customImage/CustomImageIcon.tsx +34 -0
  323. package/papyrus-web-components/src/widgets/customImage/CustomImagePreview.tsx +87 -0
  324. package/papyrus-web-components/src/widgets/customImage/CustomImageSection.tsx +348 -0
  325. package/papyrus-web-components/src/widgets/dialogs/ReorderItemsDialog.tsx +145 -0
  326. package/papyrus-web-components/src/widgets/dialogs/ReorderItemsDialog.types.ts +30 -0
  327. package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionFragment.types.ts +117 -0
  328. package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionIcon.tsx +36 -0
  329. package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionPreview.tsx +163 -0
  330. package/papyrus-web-components/src/widgets/languageExpression/LanguageExpressionSection.tsx +548 -0
  331. package/papyrus-web-components/src/widgets/primitiveList/PrimitiveListWidgetPreview.tsx +158 -0
  332. package/papyrus-web-components/src/widgets/primitiveList/PrimitiveListWidgetPropertySection.tsx +616 -0
  333. package/papyrus-web-components/src/widgets/primitiveList/PrimitiveListWidgetPropertySection.types.ts +162 -0
  334. package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioFragment.type.ts +49 -0
  335. package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioIcon.tsx +36 -0
  336. package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioPreview.tsx +88 -0
  337. package/papyrus-web-components/src/widgets/primitiveRadio/PrimitiveRadioSection.tsx +128 -0
  338. package/papyrus-web-components/tsconfig.json +14 -0
  339. package/papyrus-web-components/vite.config.js +26 -0
  340. package/turbo.json +31 -0
@@ -0,0 +1,84 @@
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 { GQLTreeItem } from '@eclipse-sirius/sirius-components-trees';
16
+
17
+ export interface PublishProfileDialogProps {
18
+ editingContextId: string;
19
+ item: GQLTreeItem;
20
+ onClose: () => void;
21
+ }
22
+
23
+ export type NewVersionKind = 'Development' | 'Release' | 'Major' | 'Custom';
24
+
25
+ export interface GQLGetProfileLastVersionQueryVariables {
26
+ editingContextId: string;
27
+ profileId: string;
28
+ }
29
+
30
+ export interface GQLGetProfileLastVersionQueryData {
31
+ viewer: GQLViewer;
32
+ }
33
+
34
+ export interface GQLViewer {
35
+ editingContext: GQLEditingContext;
36
+ }
37
+
38
+ export interface GQLEditingContext {
39
+ profileLastVersion: GQLProfileLastVersion;
40
+ }
41
+
42
+ export interface GQLProfileLastVersion {
43
+ major: string;
44
+ minor: string;
45
+ micro: string;
46
+ }
47
+ export interface PublishProfileDialogState {
48
+ customVersion: string;
49
+ selectedNewVersionKind: NewVersionKind;
50
+ date: string;
51
+ author: string;
52
+ comments: string;
53
+ copyright: string;
54
+ message: string | null;
55
+ }
56
+
57
+ export interface PublishProfileVariables {
58
+ input: PublishProfileInput;
59
+ }
60
+
61
+ export interface PublishProfileInput {
62
+ id: string;
63
+ editingContextId: string;
64
+ objectId: string;
65
+ version: String;
66
+ comment: String;
67
+ copyright: String;
68
+ author: String;
69
+ date: string;
70
+ saveOCLConstraint: Boolean;
71
+ }
72
+
73
+ export interface PublishProfileData {
74
+ publishProfile: PublishProfilePayload;
75
+ }
76
+
77
+ export interface PublishProfilePayload {
78
+ __typename: string;
79
+ }
80
+
81
+ export interface ErrorPayload extends PublishProfilePayload {
82
+ __typename: 'ErrorPayload';
83
+ message: string;
84
+ }
@@ -0,0 +1,59 @@
1
+ /*******************************************************************************
2
+ * Copyright (c) 2021, 2025 CEA LIST, Obeo.
3
+ * This program and the accompanying materials
4
+ * are made available under the terms of the Eclipse Public License v2.0
5
+ * which accompanies this distribution, and is available at
6
+ * https://www.eclipse.org/legal/epl-2.0/
7
+ *
8
+ * SPDX-License-Identifier: EPL-2.0
9
+ *
10
+ * Contributors:
11
+ * Obeo - initial API and implementation
12
+ *******************************************************************************/
13
+ import { TreeItemContextMenuComponentProps } from '@eclipse-sirius/sirius-components-trees';
14
+ import ListItemIcon from '@mui/material/ListItemIcon';
15
+ import ListItemText from '@mui/material/ListItemText';
16
+ import MenuItem from '@mui/material/MenuItem';
17
+ import AddIcon from '@mui/icons-material/Add';
18
+ import { forwardRef, Fragment, useState } from 'react';
19
+ import { PublishProfileDialog } from './PublishProfileDialog';
20
+
21
+ type Modal = 'PublishProfile';
22
+
23
+ export const PublishProfileTreeItemContextMenuContribution = forwardRef(
24
+ (
25
+ { editingContextId, item, treeId, readOnly, onClose }: TreeItemContextMenuComponentProps,
26
+ _ref: React.ForwardedRef<HTMLLIElement>
27
+ ) => {
28
+ const [modal, setModal] = useState<Modal | null>(null);
29
+
30
+ let modalElement: JSX.Element | null = null;
31
+ if (modal === 'PublishProfile') {
32
+ modalElement = <PublishProfileDialog editingContextId={editingContextId} item={item} onClose={onClose} />;
33
+ }
34
+ const isProfileMenuVisible =
35
+ treeId.startsWith('explorer://') &&
36
+ item.editable &&
37
+ item.kind.includes('siriusComponents://semantic?domain=uml&entity=Profile');
38
+ if (isProfileMenuVisible) {
39
+ return (
40
+ <Fragment key="umlelement-tree-item-context-menu-contribution">
41
+ <MenuItem
42
+ key="publish-profile"
43
+ data-testid="publish-profile"
44
+ onClick={() => setModal('PublishProfile')}
45
+ disabled={readOnly}
46
+ aria-disabled>
47
+ <ListItemIcon>
48
+ <AddIcon fontSize="small" />
49
+ </ListItemIcon>
50
+ <ListItemText primary="Publish profile" />
51
+ </MenuItem>
52
+ {modalElement}
53
+ </Fragment>
54
+ );
55
+ } else {
56
+ return null;
57
+ }
58
+ }
59
+ );
@@ -0,0 +1,215 @@
1
+ /*******************************************************************************
2
+ * Copyright (c) 2025 CEA LIST, Obeo.
3
+ * This program and the accompanying materials
4
+ * are made available under the terms of the Eclipse Public License v2.0
5
+ * which accompanies this distribution, and is available at
6
+ * https://www.eclipse.org/legal/epl-2.0/
7
+ *
8
+ * SPDX-License-Identifier: EPL-2.0
9
+ *
10
+ * Contributors:
11
+ * Obeo - initial API and implementation
12
+ *******************************************************************************/
13
+
14
+ import { DocumentTransform } from '@apollo/client';
15
+ import { DocumentNode, FragmentDefinitionNode, InlineFragmentNode, Kind, SelectionNode, visit } from 'graphql';
16
+
17
+ const shouldTransform = (document: DocumentNode) => {
18
+ return document.definitions.some(
19
+ (definition) =>
20
+ definition.kind === Kind.OPERATION_DEFINITION &&
21
+ (definition.name?.value === 'detailsEvent' ||
22
+ definition.name?.value === 'formEvent' ||
23
+ definition.name?.value === 'formDescriptionEditorEvent')
24
+ );
25
+ };
26
+
27
+ const isWidgetFragmentDefinition = (node: FragmentDefinitionNode) => {
28
+ return node.name.value === 'widgetFields';
29
+ };
30
+
31
+ const fieldBuilder = (label: string): SelectionNode => {
32
+ return {
33
+ kind: Kind.FIELD,
34
+ name: {
35
+ kind: Kind.NAME,
36
+ value: label,
37
+ },
38
+ };
39
+ };
40
+
41
+ const structuredFieldBuilder = (label: string, children: SelectionNode[]): SelectionNode => {
42
+ return {
43
+ kind: Kind.FIELD,
44
+ name: {
45
+ kind: Kind.NAME,
46
+ value: label,
47
+ },
48
+ selectionSet: {
49
+ kind: Kind.SELECTION_SET,
50
+ selections: children,
51
+ },
52
+ };
53
+ };
54
+
55
+ const styleField: SelectionNode = structuredFieldBuilder('style', [
56
+ fieldBuilder('color'),
57
+ fieldBuilder('fontSize'),
58
+ fieldBuilder('italic'),
59
+ fieldBuilder('bold'),
60
+ fieldBuilder('underline'),
61
+ fieldBuilder('strikeThrough'),
62
+ ]);
63
+
64
+ export const customWidgetsDocumentTransform = new DocumentTransform((document) => {
65
+ if (shouldTransform(document)) {
66
+ return visit(document, {
67
+ FragmentDefinition(node) {
68
+ if (!isWidgetFragmentDefinition(node)) {
69
+ return undefined;
70
+ }
71
+
72
+ const primitiveListInlineFragment: InlineFragmentNode = {
73
+ kind: Kind.INLINE_FRAGMENT,
74
+ selectionSet: {
75
+ kind: Kind.SELECTION_SET,
76
+ selections: [
77
+ fieldBuilder('label'),
78
+ fieldBuilder('iconURL'),
79
+ fieldBuilder('canAdd'),
80
+ fieldBuilder('canReorder'),
81
+ fieldBuilder('hasCandidates'),
82
+ structuredFieldBuilder('items', [
83
+ fieldBuilder('id'),
84
+ fieldBuilder('label'),
85
+ fieldBuilder('iconURL'),
86
+ fieldBuilder('deletable'),
87
+ fieldBuilder('hasAction'),
88
+ fieldBuilder('actionIconURL'),
89
+ ]),
90
+ styleField,
91
+ ],
92
+ },
93
+ typeCondition: {
94
+ kind: Kind.NAMED_TYPE,
95
+ name: {
96
+ kind: Kind.NAME,
97
+ value: 'PrimitiveListWidget',
98
+ },
99
+ },
100
+ };
101
+
102
+ const containmentReferenceWidgetInlineFragment: InlineFragmentNode = {
103
+ kind: Kind.INLINE_FRAGMENT,
104
+ selectionSet: {
105
+ kind: Kind.SELECTION_SET,
106
+ selections: [
107
+ fieldBuilder('label'),
108
+ fieldBuilder('iconURL'),
109
+ fieldBuilder('ownerId'),
110
+ fieldBuilder('descriptionId'),
111
+ structuredFieldBuilder('containmentReference', [
112
+ fieldBuilder('ownerKind'),
113
+ fieldBuilder('referenceKind'),
114
+ fieldBuilder('isMany'),
115
+ fieldBuilder('canMove'),
116
+ ]),
117
+ structuredFieldBuilder('referenceValues', [
118
+ fieldBuilder('id'),
119
+ fieldBuilder('label'),
120
+ fieldBuilder('kind'),
121
+ fieldBuilder('iconURL'),
122
+ ]),
123
+ styleField,
124
+ ],
125
+ },
126
+ typeCondition: {
127
+ kind: Kind.NAMED_TYPE,
128
+ name: {
129
+ kind: Kind.NAME,
130
+ value: 'ContainmentReferenceWidget',
131
+ },
132
+ },
133
+ };
134
+
135
+ const languageExpressionInlineFragment: InlineFragmentNode = {
136
+ kind: Kind.INLINE_FRAGMENT,
137
+ selectionSet: {
138
+ kind: Kind.SELECTION_SET,
139
+ selections: [
140
+ fieldBuilder('id'),
141
+ fieldBuilder('label'),
142
+ fieldBuilder('iconURL'),
143
+ structuredFieldBuilder('languages', [fieldBuilder('id'), fieldBuilder('label'), fieldBuilder('body')]),
144
+ fieldBuilder('predefinedLanguages'),
145
+ ],
146
+ },
147
+ typeCondition: {
148
+ kind: Kind.NAMED_TYPE,
149
+ name: {
150
+ kind: Kind.NAME,
151
+ value: 'LanguageExpression',
152
+ },
153
+ },
154
+ };
155
+
156
+ const primitiveRadioInlineFragment: InlineFragmentNode = {
157
+ kind: Kind.INLINE_FRAGMENT,
158
+ selectionSet: {
159
+ kind: Kind.SELECTION_SET,
160
+ selections: [
161
+ fieldBuilder('id'),
162
+ fieldBuilder('label'),
163
+ fieldBuilder('iconURL'),
164
+ fieldBuilder('candidateList'),
165
+ fieldBuilder('candidateValue'),
166
+ ],
167
+ },
168
+ typeCondition: {
169
+ kind: Kind.NAMED_TYPE,
170
+ name: {
171
+ kind: Kind.NAME,
172
+ value: 'PrimitiveRadio',
173
+ },
174
+ },
175
+ };
176
+
177
+ const customImageInlineFragment: InlineFragmentNode = {
178
+ kind: Kind.INLINE_FRAGMENT,
179
+ selectionSet: {
180
+ kind: Kind.SELECTION_SET,
181
+ selections: [
182
+ fieldBuilder('id'),
183
+ fieldBuilder('label'),
184
+ fieldBuilder('iconURL'),
185
+ fieldBuilder('currentUuid'),
186
+ ],
187
+ },
188
+ typeCondition: {
189
+ kind: Kind.NAMED_TYPE,
190
+ name: {
191
+ kind: Kind.NAME,
192
+ value: 'CustomImageWidget',
193
+ },
194
+ },
195
+ };
196
+
197
+ return {
198
+ ...node,
199
+ selectionSet: {
200
+ ...node.selectionSet,
201
+ selections: [
202
+ ...node.selectionSet.selections,
203
+ containmentReferenceWidgetInlineFragment,
204
+ primitiveListInlineFragment,
205
+ languageExpressionInlineFragment,
206
+ primitiveRadioInlineFragment,
207
+ customImageInlineFragment,
208
+ ],
209
+ },
210
+ };
211
+ },
212
+ });
213
+ }
214
+ return document;
215
+ });
@@ -0,0 +1,178 @@
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 { GQLMessage } from '@eclipse-sirius/sirius-components-core';
16
+ import { GQLWidget } from '@eclipse-sirius/sirius-components-forms';
17
+ import { GQLReferenceWidgetStyle } from '@eclipse-sirius/sirius-components-widget-reference';
18
+
19
+ export type ContainmentReferenceDialogKind = 'REORDER' | 'NEW_INSTANCE';
20
+
21
+ export interface GQLContainmentReferenceWidget extends GQLWidget {
22
+ label: string;
23
+ ownerId: string;
24
+ descriptionId: string;
25
+ containmentReference: GQLContainmentReference;
26
+ referenceValues: GQLContainmentReferenceItem[] | null;
27
+ style: GQLReferenceWidgetStyle | null;
28
+ }
29
+
30
+ export interface GQLContainmentReference {
31
+ ownerKind: string;
32
+ referenceKind: string;
33
+ isMany: boolean;
34
+ canMove: boolean;
35
+ }
36
+
37
+ export interface GQLContainmentReferenceItem {
38
+ id: string;
39
+ label: string;
40
+ kind: string;
41
+ iconURL: string[];
42
+ hasClickAction: boolean;
43
+ }
44
+
45
+ export interface GQLGetChildCreationDescriptionsQueryVariables {
46
+ editingContextId: string;
47
+ containerId: string;
48
+ referenceKind?: string;
49
+ descriptionId: string;
50
+ }
51
+
52
+ export interface GQLGetChildCreationDescriptionsQueryData {
53
+ viewer: GQLViewer;
54
+ }
55
+
56
+ export interface GQLViewer {
57
+ editingContext: GQLEditingContext;
58
+ }
59
+
60
+ export interface GQLEditingContext {
61
+ referenceWidgetChildCreationDescriptions: GQLChildCreationDescription[];
62
+ }
63
+
64
+ export interface GQLChildCreationDescription {
65
+ id: string;
66
+ label: string;
67
+ iconURL: string;
68
+ }
69
+
70
+ export interface GQLObject {
71
+ id: string;
72
+ label: string;
73
+ kind: string;
74
+ }
75
+
76
+ export interface GQLCreateElementInReferenceMutationVariables {
77
+ input: GQLCreateElementInReferenceInput;
78
+ }
79
+
80
+ export interface GQLCreateElementInReferenceInput {
81
+ id: string;
82
+ editingContextId: string;
83
+ representationId: string;
84
+ referenceWidgetId: string;
85
+ containerId: string;
86
+ domainId: string | null;
87
+ creationDescriptionId: string;
88
+ descriptionId: string;
89
+ }
90
+
91
+ export interface GQLCreateElementInReferenceMutationData {
92
+ createElementInReference: GQLCreateElementInReferencePayload;
93
+ }
94
+
95
+ export interface GQLCreateElementInReferencePayload {
96
+ __typename: string;
97
+ }
98
+
99
+ export interface GQLCreateElementInReferenceSuccessPayload extends GQLCreateElementInReferencePayload {
100
+ id: string;
101
+ object: GQLObject;
102
+ messages: GQLMessage[];
103
+ }
104
+
105
+ export interface GQLErrorPayload
106
+ extends GQLClickContainmentReferenceItemPayload,
107
+ GQLRemoveContainmentReferenceItemPayload {
108
+ messages: GQLMessage[];
109
+ }
110
+
111
+ export interface GQLSuccessPayload
112
+ extends GQLClickContainmentReferenceItemPayload,
113
+ GQLRemoveContainmentReferenceItemPayload {
114
+ messages: GQLMessage[];
115
+ }
116
+
117
+ export interface GQLClickContainmentReferenceItemMutationData {
118
+ clickContainmentReferenceItem: GQLClickContainmentReferenceItemPayload;
119
+ }
120
+
121
+ export interface GQLClickContainmentReferenceItemPayload {
122
+ __typename: string;
123
+ }
124
+
125
+ export interface GQLClickContainmentReferenceItemMutationVariables {
126
+ input: GQLClickContainmentReferenceItemInput;
127
+ }
128
+
129
+ export interface GQLClickContainmentReferenceItemInput {
130
+ id: string;
131
+ editingContextId: string;
132
+ representationId: string;
133
+ referenceWidgetId: string;
134
+ referenceItemId: string;
135
+ clickEventKind: 'SINGLE_CLICK' | 'DOUBLE_CLICK';
136
+ }
137
+
138
+ export interface GQLRemoveContainmentReferenceItemMutationData {
139
+ removeContainmentReferenceItem: GQLRemoveContainmentReferenceItemPayload;
140
+ }
141
+
142
+ export interface GQLRemoveContainmentReferenceItemPayload {
143
+ __typename: string;
144
+ }
145
+
146
+ export interface GQLRemoveContainmentReferenceItemMutationVariables {
147
+ input: GQLRemoveContainmentReferenceItemInput;
148
+ }
149
+
150
+ export interface GQLRemoveContainmentReferenceItemInput {
151
+ id: string;
152
+ editingContextId: string;
153
+ representationId: string;
154
+ referenceWidgetId: string;
155
+ referenceItemId: string;
156
+ }
157
+
158
+ export interface GQLMoveContainmentReferenceItemMutationData {
159
+ moveContainmentReferenceItem: GQLMoveContainmentReferenceItemPayload;
160
+ }
161
+
162
+ export interface GQLMoveContainmentReferenceItemPayload {
163
+ __typename: string;
164
+ }
165
+
166
+ export interface GQLMoveContainmentReferenceItemMutationVariables {
167
+ input: GQLMoveContainmentReferenceItemInput;
168
+ }
169
+
170
+ export interface GQLMoveContainmentReferenceItemInput {
171
+ id: string;
172
+ editingContextId: string;
173
+ representationId: string;
174
+ referenceWidgetId: string;
175
+ referenceItemId: string;
176
+ fromIndex: number;
177
+ toIndex: number;
178
+ }
@@ -0,0 +1,38 @@
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 ContainmentReferenceIcon = (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
+ <rect fill="none" height="24" width="24" />
28
+ </g>
29
+ <g>
30
+ <polygon
31
+ points="17,17 22,12 17,7 15.59,8.41 18.17,11 9,11 9,13 18.17,13 15.59,15.59"
32
+ transform="matrix(-1,0,0,1,28.981308,0)"
33
+ />
34
+ <path d="M19,19H5V5h14v2h2V5c0-1.1-0.89-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.11,0,2-0.9,2-2v-2h-2V19z" />
35
+ </g>
36
+ </SvgIcon>
37
+ );
38
+ };
@@ -0,0 +1,106 @@
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 { IconOverlay, useSelection } from '@eclipse-sirius/sirius-components-core';
16
+ import { WidgetProps } from '@eclipse-sirius/sirius-components-formdescriptioneditors';
17
+ import Chip from '@mui/material/Chip';
18
+ import IconButton from '@mui/material/IconButton';
19
+ import AddIcon from '@mui/icons-material/Add';
20
+ import Typography from '@mui/material/Typography';
21
+ import { makeStyles } from 'tss-react/mui';
22
+ import HelpOutlineOutlined from '@mui/icons-material/HelpOutlineOutlined';
23
+ import { useEffect, useRef, useState } from 'react';
24
+ import { GQLContainmentReferenceWidget } from './ContainmentReferenceFragment.types';
25
+ import ReorderIcon from './ReorderIcon';
26
+
27
+ const useStyles = makeStyles()((theme) => ({
28
+ style: {
29
+ color: theme.palette.secondary.main,
30
+ },
31
+ selected: {
32
+ color: theme.palette.selected,
33
+ },
34
+ propertySectionLabel: {
35
+ display: 'flex',
36
+ flexDirection: 'row',
37
+ alignItems: 'center',
38
+ },
39
+ toolbar: {
40
+ marginLeft: 'auto',
41
+ display: 'flex',
42
+ alignItems: 'center',
43
+ },
44
+ chip: {
45
+ margin: '3px',
46
+ },
47
+ }));
48
+
49
+ type PropertySectionComponentProps = WidgetProps<GQLContainmentReferenceWidget>;
50
+
51
+ export const ContainmentReferencePreview = ({ widget }: PropertySectionComponentProps) => {
52
+ const { classes } = useStyles();
53
+ const [selected, setSelected] = useState<boolean>(false);
54
+
55
+ const { selection } = useSelection();
56
+
57
+ const ref = useRef<HTMLInputElement | null>(null);
58
+
59
+ useEffect(() => {
60
+ if (ref.current && selection.entries.find((entry) => entry.id === widget.id)) {
61
+ ref.current.focus();
62
+ setSelected(true);
63
+ } else {
64
+ setSelected(false);
65
+ }
66
+ }, [selection, widget]);
67
+
68
+ const values = ['element-1', 'element-2', 'element-3'];
69
+
70
+ return (
71
+ <div>
72
+ <div className={classes.propertySectionLabel}>
73
+ <Typography variant="subtitle2" className={selected ? classes.selected : ''}>
74
+ {widget.label}
75
+ </Typography>
76
+ {widget.hasHelpText && <HelpOutlineOutlined color="secondary" style={{ marginLeft: 8, fontSize: 16 }} />}
77
+ <div className={classes.toolbar} data-testid="containment-reference-toolbar">
78
+ <IconButton data-testid="containment-reference-create-child" disabled size="small">
79
+ <AddIcon />
80
+ </IconButton>
81
+ {widget.containmentReference.canMove && (
82
+ <IconButton data-testid="containment-reference-reorder-children" disabled size="small">
83
+ <ReorderIcon fill="#B3BFC5" />
84
+ </IconButton>
85
+ )}
86
+ </div>
87
+ </div>
88
+ <div ref={ref}>
89
+ {values.map((label) => (
90
+ <Chip
91
+ key={label}
92
+ classes={{ root: classes.chip }}
93
+ label={label}
94
+ data-testid={`${label}`}
95
+ icon={
96
+ <div>
97
+ <IconOverlay iconURLs={['/api/images/icons-override/full/obj16/Class.svg']} alt={label} />
98
+ </div>
99
+ }
100
+ onDelete={() => console.log('deleted')}
101
+ />
102
+ ))}
103
+ </div>
104
+ </div>
105
+ );
106
+ };