@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,162 @@
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 { Selection, GQLMessage } from '@eclipse-sirius/sirius-components-core';
15
+ import { GQLListItem, GQLListStyle, GQLWidget } from '@eclipse-sirius/sirius-components-forms';
16
+
17
+ export interface PrimitiveListStyleProps {
18
+ color: string | null;
19
+ fontSize: number | null;
20
+ italic: boolean | null;
21
+ bold: boolean | null;
22
+ underline: boolean | null;
23
+ strikeThrough: boolean | null;
24
+ }
25
+
26
+ export interface PrimitiveListPropertySectionProps {
27
+ editingContextId: string;
28
+ formId: string;
29
+ widget: EditableGQLList;
30
+ readOnly: boolean;
31
+ setSelection: (selection: Selection) => void;
32
+ }
33
+
34
+ export interface EditableGQLList extends GQLWidget {
35
+ canAdd: boolean;
36
+ canReorder: boolean;
37
+ hasCandidates: boolean;
38
+ items: GQLActionableListItem[];
39
+ style: GQLListStyle;
40
+ }
41
+
42
+ export interface GQLActionableListItem extends GQLListItem {
43
+ hasAction: Boolean;
44
+ actionIconURL: string;
45
+ }
46
+
47
+ export interface GQLDeletePrimitiveListItemMutationData {
48
+ deletePrimitiveListItem: GQLDeletePrimitiveListItemPayload;
49
+ }
50
+
51
+ export interface GQLAddPrimitiveListItemMutationData {
52
+ addPrimitiveListItem: GQLDeletePrimitiveListItemPayload;
53
+ }
54
+
55
+ export interface GQLDeletePrimitiveListItemPayload {
56
+ __typename: string;
57
+ }
58
+
59
+ export interface GQLAddPrimitiveListItemPayload {
60
+ __typename: string;
61
+ }
62
+
63
+ export interface GQLErrorPayload extends GQLDeletePrimitiveListItemPayload {
64
+ messages: GQLMessage[];
65
+ }
66
+
67
+ export interface GQLSuccessPayload extends GQLDeletePrimitiveListItemPayload {
68
+ messages: GQLMessage[];
69
+ }
70
+
71
+ export interface GQLErrorPayload extends GQLAddPrimitiveListItemPayload {
72
+ messages: GQLMessage[];
73
+ }
74
+
75
+ export interface GQLSuccessPayload extends GQLAddPrimitiveListItemPayload {
76
+ messages: GQLMessage[];
77
+ }
78
+ export interface GQLReorderPrimitiveListItemsMutationData {
79
+ reorderPrimitiveListItems: GQLReorderPrimitiveListItemsPayload;
80
+ }
81
+
82
+ export interface GQLReorderPrimitiveListItemsPayload {
83
+ __typename: string;
84
+ }
85
+
86
+ export interface GQLReorderPrimitiveListItemsMutationVariables {
87
+ input: GQLReorderPrimitiveListItemsInput;
88
+ }
89
+
90
+ export interface GQLReorderPrimitiveListItemsInput {
91
+ id: string;
92
+ editingContextId: string;
93
+ representationId: string;
94
+ listId: string;
95
+ itemId: string;
96
+ fromIndex: number;
97
+ toIndex: number;
98
+ }
99
+
100
+ export interface GQLActionPrimitiveListItemMutationData {
101
+ actionPrimitiveListItem: GQLActionPrimitiveListItemPayload;
102
+ }
103
+
104
+ export interface GQLActionPrimitiveListItemPayload {
105
+ __typename: string;
106
+ }
107
+
108
+ export interface GQLActionPrimitiveListItemMutationVariables {
109
+ input: GQLActionPrimitiveListItemInput;
110
+ }
111
+
112
+ export interface GQLActionPrimitiveListItemInput {
113
+ id: string;
114
+ editingContextId: string;
115
+ representationId: string;
116
+ listId: string;
117
+ itemId: string;
118
+ }
119
+
120
+ export interface GQLPrimitiveListCandidate {
121
+ value: string;
122
+ label: string;
123
+ }
124
+
125
+ export interface PrimitiveListAutocompleteState {
126
+ open: boolean;
127
+ candidates: GQLPrimitiveListCandidate[] | null;
128
+ }
129
+
130
+ export interface GQLGetPrimitiveListCandidatesQueryData {
131
+ viewer: GQLViewer;
132
+ }
133
+
134
+ export interface GQLViewer {
135
+ editingContext: GQLEditingContext;
136
+ }
137
+
138
+ export interface GQLEditingContext {
139
+ representation: GQLRepresentationMetadata;
140
+ }
141
+
142
+ export interface GQLRepresentationMetadata {
143
+ id: string;
144
+ label: string;
145
+ kind: string;
146
+ description: GQLRepresentationDescription;
147
+ }
148
+
149
+ export interface GQLRepresentationDescription {
150
+ id: string;
151
+ __typename: string;
152
+ }
153
+
154
+ export interface GQLFormDescription extends GQLRepresentationDescription {
155
+ primitiveListCandidates: GQLPrimitiveListCandidate[];
156
+ }
157
+
158
+ export interface GQLGetPrimitiveListCandidatesQueryVariables {
159
+ editingContextId: string;
160
+ representationId: string;
161
+ primitiveListId: string;
162
+ }
@@ -0,0 +1,49 @@
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 GQLPrimitiveRadio extends GQLWidget {
19
+ candidateList: Array<string> | null;
20
+ candidateValue: string;
21
+ }
22
+
23
+ export interface GQLNewValueData {
24
+ newValue: GQLNewValuePayload;
25
+ }
26
+
27
+ export interface GQLNewValueVariables {
28
+ input: GQLNewValueInput;
29
+ }
30
+
31
+ export interface GQLNewValueInput {
32
+ id: string;
33
+ editingContextId: string;
34
+ representationId: string;
35
+ primitiveRadioId: string;
36
+ value: string;
37
+ }
38
+
39
+ export interface GQLNewValuePayload {
40
+ __typename: string;
41
+ }
42
+
43
+ export interface GQLSuccessPayload extends GQLNewValuePayload {
44
+ messages: GQLMessage[];
45
+ }
46
+
47
+ export interface GQLErrorPayload extends GQLNewValuePayload {
48
+ messages: GQLMessage[];
49
+ }
@@ -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 PrimitiveRadioIcon = (props: SvgIconProps) => {
18
+ return (
19
+ <SvgIcon
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ width="512.000000pt"
22
+ height="512.000000pt"
23
+ viewBox="0 0 512.000000 512.000000"
24
+ aria-labelledby="title"
25
+ role="img"
26
+ {...props}>
27
+ <g>
28
+ <title>Primitive radio widget icon</title>
29
+ <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)" fill="#333333" stroke="none">
30
+ <path d="M2330 5110 c-199 -18 -464 -78 -649 -146 -237 -88 -529 -254 -727 -414 -101 -82 -302 -283 -384 -384 -160 -198 -326 -490 -414 -727 -124 -336 -178 -742 -146 -1097 19 -216 76 -470 146 -661 88 -237 254 -529 414 -727 82 -101 283 -302 384 -384 198 -160 490 -326 727 -414 336 -124 742 -178 1097 -146 216 19 470 76 661 146 237 88 529 254 727 414 101 82 302 283 384 384 160 198 326 490 414 727 70 191 127 445 146 661 32 355 -22 761 -146 1097 -88 237 -254 529 -414 727 -82 101 -283 302 -384 384 -198 160 -490 326 -727 414 -337 124 -747 178 -1109 146z m405 -510 c486 -46 924 -251 1269 -596 675 -676 796 -1699 298 -2514 -157 -257 -415 -515 -672 -672 -544 -333 -1188 -397 -1778 -176 -279 104 -523 262 -736 474 -625 626 -781 1564 -390 2347 378 757 1185 1214 2009 1137z" />
31
+ <path d="M2375 3825 c-680 -95 -1155 -702 -1087 -1388 62 -625 524 -1087 1149 -1149 562 -55 1089 257 1303 773 130 311 130 687 0 998 -222 537 -778 848 -1365 766z" />
32
+ </g>
33
+ </g>
34
+ </SvgIcon>
35
+ );
36
+ };
@@ -0,0 +1,88 @@
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 { useSelection } from '@eclipse-sirius/sirius-components-core';
16
+ import { WidgetProps } from '@eclipse-sirius/sirius-components-formdescriptioneditors';
17
+ import { FormControl, FormControlLabel, Radio, RadioGroup } from '@mui/material';
18
+ import Typography from '@mui/material/Typography';
19
+ import { makeStyles } from 'tss-react/mui';
20
+ import HelpOutlineOutlined from '@mui/icons-material/HelpOutlineOutlined';
21
+ import { useEffect, useRef, useState } from 'react';
22
+ import { GQLPrimitiveRadio } from './PrimitiveRadioFragment.type';
23
+
24
+ const useStyles = makeStyles()((theme) => ({
25
+ style: {
26
+ color: theme.palette.secondary.main,
27
+ },
28
+ selected: {
29
+ color: theme.palette.selected,
30
+ },
31
+ propertySectionLabel: {
32
+ display: 'flex',
33
+ flexDirection: 'row',
34
+ alignItems: 'center',
35
+ },
36
+ }));
37
+
38
+ type PropertySectionComponentProps = WidgetProps<GQLPrimitiveRadio>;
39
+
40
+ export const PrimitiveRadioPreview = ({ widget }: PropertySectionComponentProps) => {
41
+ const { classes } = useStyles();
42
+ const [selected, setSelected] = useState<boolean>(false);
43
+
44
+ const { selection } = useSelection();
45
+
46
+ const ref = useRef<HTMLInputElement | null>(null);
47
+
48
+ useEffect(() => {
49
+ if (ref.current && selection.entries.find((entry) => entry.id === widget.id)) {
50
+ ref.current.focus();
51
+ setSelected(true);
52
+ } else {
53
+ setSelected(false);
54
+ }
55
+ }, [selection, widget]);
56
+
57
+ const candidateList = ['option1', 'option2', 'option3'];
58
+
59
+ return (
60
+ <div>
61
+ <div className={classes.propertySectionLabel}>
62
+ <Typography variant="subtitle2" className={selected ? classes.selected : ''}>
63
+ {widget.label}
64
+ </Typography>
65
+ {widget.hasHelpText && <HelpOutlineOutlined color="secondary" style={{ marginLeft: 8, fontSize: 16 }} />}
66
+ </div>
67
+ <FormControl component="fieldset" style={{ marginLeft: '16px' }}>
68
+ <RadioGroup
69
+ ref={ref}
70
+ row
71
+ aria-label="primitive radio"
72
+ name="primitive-radio"
73
+ value={candidateList.at(1)}
74
+ data-testid="primitive-radio-candidates">
75
+ {candidateList.map((candidate) => (
76
+ <FormControlLabel
77
+ color="primary"
78
+ key={candidate}
79
+ value={candidate}
80
+ control={<Radio color="primary" />}
81
+ label={candidate}
82
+ />
83
+ ))}
84
+ </RadioGroup>
85
+ </FormControl>
86
+ </div>
87
+ );
88
+ };
@@ -0,0 +1,128 @@
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 { gql, useMutation } from '@apollo/client';
16
+ import { useMultiToast } from '@eclipse-sirius/sirius-components-core';
17
+ import { PropertySectionComponentProps, PropertySectionLabel } from '@eclipse-sirius/sirius-components-forms';
18
+ import FormControl from '@mui/material/FormControl';
19
+ import FormControlLabel from '@mui/material/FormControlLabel';
20
+ import Radio from '@mui/material/Radio';
21
+ import RadioGroup from '@mui/material/RadioGroup';
22
+ import { ChangeEvent, useEffect } from 'react';
23
+ import {
24
+ GQLErrorPayload,
25
+ GQLNewValueData,
26
+ GQLNewValueInput,
27
+ GQLNewValuePayload,
28
+ GQLNewValueVariables,
29
+ GQLPrimitiveRadio,
30
+ GQLSuccessPayload,
31
+ } from './PrimitiveRadioFragment.type';
32
+
33
+ export const newValueMutation = gql`
34
+ mutation newValue($input: NewValueInput!) {
35
+ newValue(input: $input) {
36
+ __typename
37
+ ... on ErrorPayload {
38
+ messages {
39
+ body
40
+ level
41
+ }
42
+ }
43
+ ... on SuccessPayload {
44
+ messages {
45
+ body
46
+ level
47
+ }
48
+ }
49
+ }
50
+ }
51
+ `;
52
+
53
+ export const PrimitiveRadioSection = ({
54
+ editingContextId,
55
+ formId,
56
+ widget,
57
+ readOnly,
58
+ }: PropertySectionComponentProps<GQLPrimitiveRadio>) => {
59
+ const { addErrorMessage, addMessages } = useMultiToast();
60
+
61
+ const [newValueApi, { loading: newValueLoading, data: newValueData, error: newValueError }] = useMutation<
62
+ GQLNewValueData,
63
+ GQLNewValueVariables
64
+ >(newValueMutation);
65
+
66
+ const isErrorPayload = (payload: GQLNewValuePayload): payload is GQLErrorPayload =>
67
+ payload.__typename === 'ErrorPayload';
68
+ const isSuccessPayload = (payload: GQLNewValuePayload): payload is GQLSuccessPayload =>
69
+ payload.__typename === 'SuccessPayload';
70
+
71
+ useEffect(() => {
72
+ if (!newValueLoading) {
73
+ if (newValueError) {
74
+ addErrorMessage('An unexpected error has occurred, please refresh the page');
75
+ }
76
+ if (newValueData) {
77
+ const { newValue } = newValueData;
78
+ if (isErrorPayload(newValue) || isSuccessPayload(newValue)) {
79
+ addMessages(newValue.messages);
80
+ }
81
+ }
82
+ }
83
+ }, [newValueLoading, newValueError, newValueData]);
84
+
85
+ function handleChange(event: ChangeEvent<HTMLInputElement>, _value: string): void {
86
+ const input: GQLNewValueInput = {
87
+ id: crypto.randomUUID(),
88
+ editingContextId,
89
+ representationId: formId,
90
+ primitiveRadioId: widget.id,
91
+ value: event.target.value,
92
+ };
93
+ const variables: GQLNewValueVariables = { input };
94
+ newValueApi({ variables });
95
+ }
96
+
97
+ return (
98
+ <div data-testid="primitive-radio-widget">
99
+ <PropertySectionLabel
100
+ editingContextId={editingContextId}
101
+ formId={formId}
102
+ widget={widget}
103
+ data-testid={widget.label}
104
+ />
105
+ <FormControl component="fieldset" style={{ marginLeft: '16px' }}>
106
+ <RadioGroup
107
+ row
108
+ aria-label="primitive radio"
109
+ name="primitive-radio"
110
+ value={widget.candidateValue}
111
+ onChange={handleChange}
112
+ data-testid="primitive-radio-candidates">
113
+ {widget.candidateList?.map((candidate) => (
114
+ <FormControlLabel
115
+ color="primary"
116
+ key={candidate}
117
+ value={candidate}
118
+ control={<Radio color="primary" />}
119
+ label={candidate}
120
+ data-testid={`primitive-radio-${candidate}`}
121
+ disabled={readOnly}
122
+ />
123
+ ))}
124
+ </RadioGroup>
125
+ </FormControl>
126
+ </div>
127
+ );
128
+ };
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "@eclipse-sirius/sirius-components-tsconfig/strict-react-library.json",
4
+ "compilerOptions": {
5
+ "emitDeclarationOnly": true,
6
+ "outDir": "./dist",
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "strictNullChecks": true,
10
+ "noUncheckedIndexedAccess": false
11
+ },
12
+ "include": ["./src/index.ts"],
13
+ "exclude": ["dist", "build", "node_modules"]
14
+ }
@@ -0,0 +1,26 @@
1
+ import react from '@vitejs/plugin-react';
2
+ import path from 'node:path';
3
+ import peerDepsExternal from 'rollup-plugin-peer-deps-external';
4
+ import { defineConfig } from 'vite';
5
+
6
+ export default defineConfig(() => {
7
+ const configuration = {
8
+ plugins: [peerDepsExternal(), react()],
9
+ build: {
10
+ minify: false,
11
+ lib: {
12
+ name: 'papyrus-web-components',
13
+ entry: path.resolve(__dirname, 'src/index.ts'),
14
+ formats: ['es', 'umd'],
15
+ fileName: (format) => `papyrus-web-components.${format}.js`,
16
+ },
17
+ },
18
+ test: {
19
+ environment: 'jsdom',
20
+ coverage: {
21
+ reporter: ['text', 'html'],
22
+ },
23
+ },
24
+ };
25
+ return configuration;
26
+ });
package/turbo.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://turborepo.org/schema.json",
3
+ "tasks": {
4
+ "format": {
5
+ "outputs": []
6
+ },
7
+ "format-lint": {
8
+ "outputs": []
9
+ },
10
+ "build": {
11
+ "dependsOn": ["format-lint", "^build"],
12
+ "outputs": ["dist/**"]
13
+ },
14
+ "test": {
15
+ "dependsOn": ["build"]
16
+ },
17
+ "coverage": {
18
+ "dependsOn": ["build"]
19
+ },
20
+ "publish:local": {
21
+ "dependsOn": ["build"]
22
+ },
23
+ "build-dev": {
24
+ "dependsOn": ["format-lint", "^build-dev"]
25
+ },
26
+ "start": {
27
+ "dependsOn": ["format-lint", "^start"],
28
+ "persistent": true
29
+ }
30
+ }
31
+ }