@ynput/ayon-frontend-shared 0.2.20 → 0.2.22

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 (529) hide show
  1. package/dist/DetailsPanel.cjs.js +10 -8
  2. package/dist/DetailsPanel.cjs.js.map +1 -1
  3. package/dist/DetailsPanel.es.js +10 -8
  4. package/dist/DetailsPanel.es.js.map +1 -1
  5. package/dist/ProjectTreeTable.cjs.js +2 -2
  6. package/dist/ProjectTreeTable.es.js +2 -2
  7. package/dist/Views.cjs.js +41 -0
  8. package/dist/Views.cjs.js.map +1 -0
  9. package/dist/Views.es.js +41 -0
  10. package/dist/Views.es.js.map +1 -0
  11. package/dist/_virtual/index.cjs4.js +4 -4
  12. package/dist/_virtual/index.cjs5.js +5 -3
  13. package/dist/_virtual/index.cjs5.js.map +1 -1
  14. package/dist/_virtual/index.cjs6.js +3 -5
  15. package/dist/_virtual/index.cjs6.js.map +1 -1
  16. package/dist/_virtual/index.cjs7.js +2 -2
  17. package/dist/_virtual/index.es4.js +4 -4
  18. package/dist/_virtual/index.es5.js +5 -2
  19. package/dist/_virtual/index.es5.js.map +1 -1
  20. package/dist/_virtual/index.es6.js +2 -5
  21. package/dist/_virtual/index.es6.js.map +1 -1
  22. package/dist/_virtual/index.es7.js +2 -2
  23. package/dist/api.cjs.js +28 -20
  24. package/dist/api.cjs.js.map +1 -1
  25. package/dist/api.es.js +16 -8
  26. package/dist/api.es.js.map +1 -1
  27. package/dist/components.cjs.js +0 -17
  28. package/dist/components.cjs.js.map +1 -1
  29. package/dist/components.es.js +1 -18
  30. package/dist/components.es.js.map +1 -1
  31. package/dist/index.cjs.js +10 -8
  32. package/dist/index.cjs.js.map +1 -1
  33. package/dist/index.es.js +10 -8
  34. package/dist/index.es.js.map +1 -1
  35. package/dist/node_modules/match-sorter/dist/match-sorter.esm.cjs.js +1 -1
  36. package/dist/node_modules/match-sorter/dist/match-sorter.esm.es.js +1 -1
  37. package/dist/node_modules/parse-numeric-range/index.cjs.js +1 -1
  38. package/dist/node_modules/parse-numeric-range/index.es.js +1 -1
  39. package/dist/node_modules/rehype-prism-plus/dist/index.es.cjs.js +1 -1
  40. package/dist/node_modules/rehype-prism-plus/dist/index.es.es.js +1 -1
  41. package/dist/node_modules/remove-accents/index.cjs.js +1 -1
  42. package/dist/node_modules/remove-accents/index.es.js +1 -1
  43. package/dist/shared/node_modules/uuid/dist/esm-browser/native.cjs.js +3 -1
  44. package/dist/shared/node_modules/uuid/dist/esm-browser/native.cjs.js.map +1 -1
  45. package/dist/shared/node_modules/uuid/dist/esm-browser/native.es.js +3 -1
  46. package/dist/shared/node_modules/uuid/dist/esm-browser/native.es.js.map +1 -1
  47. package/dist/shared/node_modules/uuid/dist/esm-browser/rng.cjs.js +2 -2
  48. package/dist/shared/node_modules/uuid/dist/esm-browser/rng.cjs.js.map +1 -1
  49. package/dist/shared/node_modules/uuid/dist/esm-browser/rng.es.js +2 -2
  50. package/dist/shared/node_modules/uuid/dist/esm-browser/rng.es.js.map +1 -1
  51. package/dist/shared/node_modules/uuid/dist/esm-browser/stringify.cjs.js +1 -1
  52. package/dist/shared/node_modules/uuid/dist/esm-browser/stringify.cjs.js.map +1 -1
  53. package/dist/shared/node_modules/uuid/dist/esm-browser/stringify.es.js +1 -1
  54. package/dist/shared/node_modules/uuid/dist/esm-browser/stringify.es.js.map +1 -1
  55. package/dist/shared/node_modules/uuid/dist/esm-browser/v1.cjs.js +41 -58
  56. package/dist/shared/node_modules/uuid/dist/esm-browser/v1.cjs.js.map +1 -1
  57. package/dist/shared/node_modules/uuid/dist/esm-browser/v1.es.js +41 -57
  58. package/dist/shared/node_modules/uuid/dist/esm-browser/v1.es.js.map +1 -1
  59. package/dist/shared/node_modules/uuid/dist/esm-browser/v4.cjs.js +1 -5
  60. package/dist/shared/node_modules/uuid/dist/esm-browser/v4.cjs.js.map +1 -1
  61. package/dist/shared/node_modules/uuid/dist/esm-browser/v4.es.js +1 -5
  62. package/dist/shared/node_modules/uuid/dist/esm-browser/v4.es.js.map +1 -1
  63. package/dist/shared/src/api/base/client.cjs.js +20 -19
  64. package/dist/shared/src/api/base/client.cjs.js.map +1 -1
  65. package/dist/shared/src/api/base/client.es.js +20 -19
  66. package/dist/shared/src/api/base/client.es.js.map +1 -1
  67. package/dist/shared/src/api/generated/access.cjs.js +8 -0
  68. package/dist/shared/src/api/generated/access.cjs.js.map +1 -1
  69. package/dist/shared/src/api/generated/access.es.js +8 -0
  70. package/dist/shared/src/api/generated/access.es.js.map +1 -1
  71. package/dist/shared/src/api/generated/views.cjs.js +30 -2
  72. package/dist/shared/src/api/generated/views.cjs.js.map +1 -1
  73. package/dist/shared/src/api/generated/views.es.js +30 -2
  74. package/dist/shared/src/api/generated/views.es.js.map +1 -1
  75. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.cjs.js +6 -5
  76. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.cjs.js.map +1 -1
  77. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.es.js +6 -5
  78. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.es.js.map +1 -1
  79. package/dist/shared/src/api/queries/entities/updateEntity.cjs.js +6 -5
  80. package/dist/shared/src/api/queries/entities/updateEntity.cjs.js.map +1 -1
  81. package/dist/shared/src/api/queries/entities/updateEntity.es.js +6 -5
  82. package/dist/shared/src/api/queries/entities/updateEntity.es.js.map +1 -1
  83. package/dist/shared/src/api/queries/overview/updateOverview.cjs.js +6 -5
  84. package/dist/shared/src/api/queries/overview/updateOverview.cjs.js.map +1 -1
  85. package/dist/shared/src/api/queries/overview/updateOverview.es.js +6 -5
  86. package/dist/shared/src/api/queries/overview/updateOverview.es.js.map +1 -1
  87. package/dist/shared/src/api/queries/share/share.cjs.js +66 -0
  88. package/dist/shared/src/api/queries/share/share.cjs.js.map +1 -0
  89. package/dist/shared/src/api/queries/share/share.es.js +66 -0
  90. package/dist/shared/src/api/queries/share/share.es.js.map +1 -0
  91. package/dist/shared/src/api/queries/users/getUsers.cjs.js +6 -5
  92. package/dist/shared/src/api/queries/users/getUsers.cjs.js.map +1 -1
  93. package/dist/shared/src/api/queries/users/getUsers.es.js +6 -5
  94. package/dist/shared/src/api/queries/users/getUsers.es.js.map +1 -1
  95. package/dist/shared/src/api/queries/views/getViews.cjs.js +33 -5
  96. package/dist/shared/src/api/queries/views/getViews.cjs.js.map +1 -1
  97. package/dist/shared/src/api/queries/views/getViews.es.js +33 -5
  98. package/dist/shared/src/api/queries/views/getViews.es.js.map +1 -1
  99. package/dist/shared/src/api/queries/views/updateViews.cjs.js +167 -9
  100. package/dist/shared/src/api/queries/views/updateViews.cjs.js.map +1 -1
  101. package/dist/shared/src/api/queries/views/updateViews.es.js +168 -10
  102. package/dist/shared/src/api/queries/views/updateViews.es.js.map +1 -1
  103. package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js +6 -5
  104. package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js.map +1 -1
  105. package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js +6 -5
  106. package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js.map +1 -1
  107. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.cjs.js +6 -5
  108. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.cjs.js.map +1 -1
  109. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.es.js +6 -5
  110. package/dist/shared/src/components/DetailsPanelAttributes/DetailsPanelAttributes.es.js.map +1 -1
  111. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js +10 -8
  112. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js.map +1 -1
  113. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js +10 -8
  114. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js.map +1 -1
  115. package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js +7 -5
  116. package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js.map +1 -1
  117. package/dist/shared/src/components/Feedback/FeedbackContext.es.js +7 -5
  118. package/dist/shared/src/components/Feedback/FeedbackContext.es.js.map +1 -1
  119. package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js +10 -8
  120. package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js.map +1 -1
  121. package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js +10 -8
  122. package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js.map +1 -1
  123. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js +6 -5
  124. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js.map +1 -1
  125. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js +6 -5
  126. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js.map +1 -1
  127. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js +10 -8
  128. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js.map +1 -1
  129. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js +10 -8
  130. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js.map +1 -1
  131. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js +6 -5
  132. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js.map +1 -1
  133. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js +6 -5
  134. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js.map +1 -1
  135. package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js +10 -8
  136. package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js.map +1 -1
  137. package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js +10 -8
  138. package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js.map +1 -1
  139. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js +10 -8
  140. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js.map +1 -1
  141. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.es.js +10 -8
  142. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.es.js.map +1 -1
  143. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js +10 -8
  144. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js.map +1 -1
  145. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js +10 -8
  146. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js.map +1 -1
  147. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js +6 -5
  148. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js.map +1 -1
  149. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js +6 -5
  150. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js.map +1 -1
  151. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js +6 -5
  152. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js.map +1 -1
  153. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js +6 -5
  154. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js.map +1 -1
  155. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js +10 -8
  156. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js.map +1 -1
  157. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js +10 -8
  158. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js.map +1 -1
  159. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js +10 -8
  160. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js.map +1 -1
  161. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.es.js +10 -8
  162. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.es.js.map +1 -1
  163. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.cjs.js +6 -5
  164. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.cjs.js.map +1 -1
  165. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.es.js +6 -5
  166. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.es.js.map +1 -1
  167. package/dist/shared/src/components/Watchers/Watchers.cjs.js +6 -5
  168. package/dist/shared/src/components/Watchers/Watchers.cjs.js.map +1 -1
  169. package/dist/shared/src/components/Watchers/Watchers.es.js +6 -5
  170. package/dist/shared/src/components/Watchers/Watchers.es.js.map +1 -1
  171. package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js +10 -8
  172. package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js.map +1 -1
  173. package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js +10 -8
  174. package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js.map +1 -1
  175. package/dist/shared/src/containers/Actions/Actions.cjs.js +6 -5
  176. package/dist/shared/src/containers/Actions/Actions.cjs.js.map +1 -1
  177. package/dist/shared/src/containers/Actions/Actions.es.js +6 -5
  178. package/dist/shared/src/containers/Actions/Actions.es.js.map +1 -1
  179. package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js +10 -8
  180. package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js.map +1 -1
  181. package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js +10 -8
  182. package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js.map +1 -1
  183. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js +10 -8
  184. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js.map +1 -1
  185. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js +10 -8
  186. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js.map +1 -1
  187. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.cjs.js +10 -8
  188. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.cjs.js.map +1 -1
  189. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.es.js +10 -8
  190. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.es.js.map +1 -1
  191. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.cjs.js +10 -8
  192. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.cjs.js.map +1 -1
  193. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.es.js +10 -8
  194. package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.es.js.map +1 -1
  195. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.cjs.js +10 -8
  196. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.cjs.js.map +1 -1
  197. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.es.js +10 -8
  198. package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.es.js.map +1 -1
  199. package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js +6 -5
  200. package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js.map +1 -1
  201. package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js +6 -5
  202. package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js.map +1 -1
  203. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.cjs.js +6 -5
  204. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.cjs.js.map +1 -1
  205. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.es.js +6 -5
  206. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.es.js.map +1 -1
  207. package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js +6 -5
  208. package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js.map +1 -1
  209. package/dist/shared/src/containers/Feed/context/FeedContext.es.js +6 -5
  210. package/dist/shared/src/containers/Feed/context/FeedContext.es.js.map +1 -1
  211. package/dist/shared/src/containers/Feed/hooks/useCommentMutations.cjs.js +1 -1
  212. package/dist/shared/src/containers/Feed/hooks/useCommentMutations.cjs.js.map +1 -1
  213. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js +6 -5
  214. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js.map +1 -1
  215. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js +6 -5
  216. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js.map +1 -1
  217. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js +16 -11
  218. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js.map +1 -1
  219. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js +16 -11
  220. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js.map +1 -1
  221. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js +10 -8
  222. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js.map +1 -1
  223. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.es.js +10 -8
  224. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.es.js.map +1 -1
  225. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.cjs.js.map +1 -1
  226. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.es.js.map +1 -1
  227. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js +48 -25
  228. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js.map +1 -1
  229. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js +48 -25
  230. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js.map +1 -1
  231. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js +6 -5
  232. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js.map +1 -1
  233. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js +6 -5
  234. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js.map +1 -1
  235. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableContext.cjs.js.map +1 -1
  236. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableContext.es.js.map +1 -1
  237. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js +0 -5
  238. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js.map +1 -1
  239. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.es.js +0 -5
  240. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.es.js.map +1 -1
  241. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js +6 -5
  242. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js.map +1 -1
  243. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js +6 -5
  244. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js.map +1 -1
  245. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js +6 -5
  246. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js.map +1 -1
  247. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js +6 -5
  248. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js.map +1 -1
  249. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js +6 -5
  250. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js.map +1 -1
  251. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.es.js +6 -5
  252. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.es.js.map +1 -1
  253. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js +9 -10
  254. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js.map +1 -1
  255. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.es.js +9 -10
  256. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.es.js.map +1 -1
  257. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js +6 -5
  258. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js.map +1 -1
  259. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.es.js +6 -5
  260. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.es.js.map +1 -1
  261. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetTaskGroups.cjs.js +6 -5
  262. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetTaskGroups.cjs.js.map +1 -1
  263. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetTaskGroups.es.js +6 -5
  264. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetTaskGroups.es.js.map +1 -1
  265. package/dist/shared/src/containers/ProjectTreeTable/hooks/useProjectTableModules.cjs.js +15 -9
  266. package/dist/shared/src/containers/ProjectTreeTable/hooks/useProjectTableModules.cjs.js.map +1 -1
  267. package/dist/shared/src/containers/ProjectTreeTable/hooks/useProjectTableModules.es.js +15 -9
  268. package/dist/shared/src/containers/ProjectTreeTable/hooks/useProjectTableModules.es.js.map +1 -1
  269. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js +24 -15
  270. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js.map +1 -1
  271. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js +24 -15
  272. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js.map +1 -1
  273. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js +6 -5
  274. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js.map +1 -1
  275. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js +6 -5
  276. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js.map +1 -1
  277. package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.cjs.js +106 -0
  278. package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.cjs.js.map +1 -0
  279. package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.es.js +106 -0
  280. package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.es.js.map +1 -0
  281. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js +10 -8
  282. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js.map +1 -1
  283. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.es.js +10 -8
  284. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.es.js.map +1 -1
  285. package/dist/shared/src/containers/Views/ViewItem/ViewItem.cjs.js +65 -0
  286. package/dist/shared/src/containers/Views/ViewItem/ViewItem.cjs.js.map +1 -0
  287. package/dist/shared/src/containers/Views/ViewItem/ViewItem.es.js +65 -0
  288. package/dist/shared/src/containers/Views/ViewItem/ViewItem.es.js.map +1 -0
  289. package/dist/shared/src/{components → containers}/Views/ViewItem/ViewItem.styled.cjs.js +26 -12
  290. package/dist/shared/src/containers/Views/ViewItem/ViewItem.styled.cjs.js.map +1 -0
  291. package/dist/shared/src/{components → containers}/Views/ViewItem/ViewItem.styled.es.js +26 -12
  292. package/dist/shared/src/containers/Views/ViewItem/ViewItem.styled.es.js.map +1 -0
  293. package/dist/shared/src/{components → containers}/Views/Views.cjs.js +6 -10
  294. package/dist/shared/src/containers/Views/Views.cjs.js.map +1 -0
  295. package/dist/shared/src/{components → containers}/Views/Views.es.js +7 -11
  296. package/dist/shared/src/containers/Views/Views.es.js.map +1 -0
  297. package/dist/shared/src/{components → containers}/Views/Views.styled.cjs.js +4 -3
  298. package/dist/shared/src/containers/Views/Views.styled.cjs.js.map +1 -0
  299. package/dist/shared/src/{components → containers}/Views/Views.styled.es.js +4 -3
  300. package/dist/shared/src/containers/Views/Views.styled.es.js.map +1 -0
  301. package/dist/shared/src/{components → containers}/Views/ViewsButton/ViewsButton.cjs.js +11 -2
  302. package/dist/shared/src/containers/Views/ViewsButton/ViewsButton.cjs.js.map +1 -0
  303. package/dist/shared/src/{components → containers}/Views/ViewsButton/ViewsButton.es.js +11 -2
  304. package/dist/shared/src/containers/Views/ViewsButton/ViewsButton.es.js.map +1 -0
  305. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewFormDialogFallback.cjs.js +4 -0
  306. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewFormDialogFallback.cjs.js.map +1 -0
  307. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewFormDialogFallback.es.js +5 -0
  308. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewFormDialogFallback.es.js.map +1 -0
  309. package/dist/shared/src/{components/Views/context/ViewsContext.cjs.js → containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js} +76 -62
  310. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js.map +1 -0
  311. package/dist/shared/src/{components/Views/context/ViewsContext.es.js → containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js} +75 -61
  312. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js.map +1 -0
  313. package/dist/shared/src/{components → containers}/Views/ViewsMenu/ViewsMenu.cjs.js +1 -0
  314. package/dist/shared/src/containers/Views/ViewsMenu/ViewsMenu.cjs.js.map +1 -0
  315. package/dist/shared/src/{components → containers}/Views/ViewsMenu/ViewsMenu.es.js +1 -0
  316. package/dist/shared/src/containers/Views/ViewsMenu/ViewsMenu.es.js.map +1 -0
  317. package/dist/shared/src/{components → containers}/Views/ViewsMenu/ViewsMenu.styled.cjs.js.map +1 -1
  318. package/dist/shared/src/{components → containers}/Views/ViewsMenu/ViewsMenu.styled.es.js.map +1 -1
  319. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js +105 -0
  320. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js.map +1 -0
  321. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js +105 -0
  322. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js.map +1 -0
  323. package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js +238 -0
  324. package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js.map +1 -0
  325. package/dist/shared/src/containers/Views/context/ViewsContext.es.js +238 -0
  326. package/dist/shared/src/containers/Views/context/ViewsContext.es.js.map +1 -0
  327. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.cjs.js +52 -0
  328. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.cjs.js.map +1 -0
  329. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.es.js +52 -0
  330. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.es.js.map +1 -0
  331. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.cjs.js +95 -0
  332. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.cjs.js.map +1 -0
  333. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.es.js +95 -0
  334. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.es.js.map +1 -0
  335. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.cjs.js +44 -0
  336. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.cjs.js.map +1 -0
  337. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.es.js +44 -0
  338. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.es.js.map +1 -0
  339. package/dist/shared/src/{components → containers}/Views/hooks/useBuildViewMenuItems.cjs.js +70 -38
  340. package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.cjs.js.map +1 -0
  341. package/dist/shared/src/{components → containers}/Views/hooks/useBuildViewMenuItems.es.js +71 -39
  342. package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js.map +1 -0
  343. package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.cjs.js +33 -0
  344. package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.cjs.js.map +1 -0
  345. package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.es.js +33 -0
  346. package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.es.js.map +1 -0
  347. package/dist/shared/src/{components/Views/ViewForm/ViewFormContainer.cjs.js → containers/Views/hooks/useSelectedView.cjs.js} +39 -119
  348. package/dist/shared/src/containers/Views/hooks/useSelectedView.cjs.js.map +1 -0
  349. package/dist/shared/src/containers/Views/hooks/useSelectedView.es.js +109 -0
  350. package/dist/shared/src/containers/Views/hooks/useSelectedView.es.js.map +1 -0
  351. package/dist/shared/src/containers/Views/hooks/useViewSettingsChanged.cjs.js +19 -0
  352. package/dist/shared/src/containers/Views/hooks/useViewSettingsChanged.cjs.js.map +1 -0
  353. package/dist/shared/src/containers/Views/hooks/useViewSettingsChanged.es.js +19 -0
  354. package/dist/shared/src/containers/Views/hooks/useViewSettingsChanged.es.js.map +1 -0
  355. package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js +182 -0
  356. package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js.map +1 -0
  357. package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js +182 -0
  358. package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js.map +1 -0
  359. package/dist/shared/src/containers/Views/hooks/useViewsShortcuts.cjs.js +30 -0
  360. package/dist/shared/src/containers/Views/hooks/useViewsShortcuts.cjs.js.map +1 -0
  361. package/dist/shared/src/containers/Views/hooks/useViewsShortcuts.es.js +30 -0
  362. package/dist/shared/src/containers/Views/hooks/useViewsShortcuts.es.js.map +1 -0
  363. package/dist/shared/src/containers/Views/utils/generateWorkingView.cjs.js +13 -0
  364. package/dist/shared/src/containers/Views/utils/generateWorkingView.cjs.js.map +1 -0
  365. package/dist/shared/src/containers/Views/utils/generateWorkingView.es.js +13 -0
  366. package/dist/shared/src/containers/Views/utils/generateWorkingView.es.js.map +1 -0
  367. package/dist/shared/src/containers/Views/utils/getCustomViewsFallback.cjs.js.map +1 -0
  368. package/dist/shared/src/containers/Views/utils/getCustomViewsFallback.es.js.map +1 -0
  369. package/dist/shared/src/{components → containers}/Views/utils/portalUtils.cjs.js +1 -1
  370. package/dist/shared/src/{components → containers}/Views/utils/portalUtils.cjs.js.map +1 -1
  371. package/dist/shared/src/{components → containers}/Views/utils/portalUtils.es.js +1 -1
  372. package/dist/shared/src/{components → containers}/Views/utils/portalUtils.es.js.map +1 -1
  373. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js +126 -0
  374. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js.map +1 -0
  375. package/dist/shared/src/{components/Views/ViewForm/ViewFormContainer.es.js → containers/Views/utils/viewUpdateHelper.es.js} +54 -117
  376. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js.map +1 -0
  377. package/dist/shared/src/context/AddonProjectContext.cjs.js +6 -5
  378. package/dist/shared/src/context/AddonProjectContext.cjs.js.map +1 -1
  379. package/dist/shared/src/context/AddonProjectContext.es.js +6 -5
  380. package/dist/shared/src/context/AddonProjectContext.es.js.map +1 -1
  381. package/dist/shared/src/context/DetailsPanelContext.cjs.js +6 -5
  382. package/dist/shared/src/context/DetailsPanelContext.cjs.js.map +1 -1
  383. package/dist/shared/src/context/DetailsPanelContext.es.js +6 -5
  384. package/dist/shared/src/context/DetailsPanelContext.es.js.map +1 -1
  385. package/dist/shared/src/context/PowerpackContext.cjs.js +15 -8
  386. package/dist/shared/src/context/PowerpackContext.cjs.js.map +1 -1
  387. package/dist/shared/src/context/PowerpackContext.es.js +15 -8
  388. package/dist/shared/src/context/PowerpackContext.es.js.map +1 -1
  389. package/dist/shared/src/context/RemoteModulesContext.cjs.js +6 -5
  390. package/dist/shared/src/context/RemoteModulesContext.cjs.js.map +1 -1
  391. package/dist/shared/src/context/RemoteModulesContext.es.js +6 -5
  392. package/dist/shared/src/context/RemoteModulesContext.es.js.map +1 -1
  393. package/dist/shared/src/hooks/useActionTriggers.cjs.js +6 -5
  394. package/dist/shared/src/hooks/useActionTriggers.cjs.js.map +1 -1
  395. package/dist/shared/src/hooks/useActionTriggers.es.js +6 -5
  396. package/dist/shared/src/hooks/useActionTriggers.es.js.map +1 -1
  397. package/dist/shared/src/hooks/useEntityUpdate.cjs.js +6 -5
  398. package/dist/shared/src/hooks/useEntityUpdate.cjs.js.map +1 -1
  399. package/dist/shared/src/hooks/useEntityUpdate.es.js +6 -5
  400. package/dist/shared/src/hooks/useEntityUpdate.es.js.map +1 -1
  401. package/dist/shared/src/hooks/useLoadModule.cjs.js +1 -1
  402. package/dist/shared/src/hooks/useLoadModule.cjs.js.map +1 -1
  403. package/dist/shared/src/hooks/useLoadModule.es.js +1 -1
  404. package/dist/shared/src/hooks/useLoadModule.es.js.map +1 -1
  405. package/dist/shared/src/hooks/useScopedStatuses.cjs.js +6 -5
  406. package/dist/shared/src/hooks/useScopedStatuses.cjs.js.map +1 -1
  407. package/dist/shared/src/hooks/useScopedStatuses.es.js +6 -5
  408. package/dist/shared/src/hooks/useScopedStatuses.es.js.map +1 -1
  409. package/dist/shared/src/hooks/useUserProjectConfig.cjs.js +6 -5
  410. package/dist/shared/src/hooks/useUserProjectConfig.cjs.js.map +1 -1
  411. package/dist/shared/src/hooks/useUserProjectConfig.es.js +6 -5
  412. package/dist/shared/src/hooks/useUserProjectConfig.es.js.map +1 -1
  413. package/dist/shared/src/util/columnConfigConverter.cjs.js +116 -0
  414. package/dist/shared/src/util/columnConfigConverter.cjs.js.map +1 -0
  415. package/dist/shared/src/util/columnConfigConverter.es.js +116 -0
  416. package/dist/shared/src/util/columnConfigConverter.es.js.map +1 -0
  417. package/dist/types/Views.d.ts +2 -0
  418. package/dist/types/api/generated/access.d.ts +15 -0
  419. package/dist/types/api/generated/views.d.ts +130 -22
  420. package/dist/types/api/queries/index.d.ts +6 -5
  421. package/dist/types/api/queries/share/index.d.ts +1 -0
  422. package/dist/types/api/queries/share/share.d.ts +150 -0
  423. package/dist/types/api/queries/views/getViews.d.ts +161 -22
  424. package/dist/types/api/queries/views/updateViews.d.ts +500 -13
  425. package/dist/types/components/index.d.ts +0 -1
  426. package/dist/types/containers/ProjectTreeTable/context/ColumnSettingsContext.d.ts +10 -5
  427. package/dist/types/containers/ProjectTreeTable/context/ColumnSettingsProvider.d.ts +1 -1
  428. package/dist/types/containers/ProjectTreeTable/context/ProjectTableContext.d.ts +0 -2
  429. package/dist/types/containers/ProjectTreeTable/context/ProjectTableProvider.d.ts +2 -4
  430. package/dist/types/containers/ProjectTreeTable/hooks/index.d.ts +0 -1
  431. package/dist/types/containers/ProjectTreeTable/hooks/useFetchOverviewData.d.ts +3 -5
  432. package/dist/types/containers/ProjectTreeTable/hooks/useProjectTableModules.d.ts +2 -5
  433. package/dist/types/containers/ProjectTreeTable/hooks/useQueryFilters.d.ts +5 -3
  434. package/dist/types/containers/ProjectTreeTable/types/index.d.ts +1 -0
  435. package/dist/types/containers/ProjectTreeTable/types/overviewContext.d.ts +5 -6
  436. package/dist/types/containers/ProjectTreeTable/utils/index.d.ts +1 -0
  437. package/dist/types/containers/ProjectTreeTable/utils/queryFilterToClientFilter.d.ts +24 -0
  438. package/dist/types/{components → containers}/Views/ViewItem/ViewItem.d.ts +4 -1
  439. package/dist/types/{components → containers}/Views/ViewItem/ViewItem.styled.d.ts +1 -1
  440. package/dist/types/containers/Views/Views.d.ts +2 -0
  441. package/dist/types/containers/Views/ViewsDialogContainer/ViewFormDialogFallback.d.ts +25 -0
  442. package/dist/types/containers/Views/ViewsDialogContainer/ViewsDialogContainer.d.ts +6 -0
  443. package/dist/types/{components → containers}/Views/ViewsMenu/ViewsMenu.d.ts +1 -2
  444. package/dist/types/{components → containers}/Views/ViewsMenuContainer/ViewsMenuContainer.d.ts +1 -1
  445. package/dist/types/containers/Views/context/ViewsContext.d.ts +48 -0
  446. package/dist/types/containers/Views/hooks/index.d.ts +5 -0
  447. package/dist/types/containers/Views/hooks/pages/useListsViewSettings.d.ts +9 -0
  448. package/dist/types/containers/Views/hooks/pages/useOverviewViewSettings.d.ts +12 -0
  449. package/dist/types/containers/Views/hooks/pages/useTaskProgressViewSettings.d.ts +10 -0
  450. package/dist/types/containers/Views/hooks/pages/viewUpdateHelper.d.ts +0 -0
  451. package/dist/types/containers/Views/hooks/useBuildViewMenuItems.d.ts +23 -0
  452. package/dist/types/containers/Views/hooks/useSaveViewFromCurrent.d.ts +12 -0
  453. package/dist/types/containers/Views/hooks/useSelectedView.d.ts +12 -0
  454. package/dist/types/containers/Views/hooks/useViewSettingsChanged.d.ts +6 -0
  455. package/dist/types/containers/Views/hooks/useViewsMutations.d.ts +20 -0
  456. package/dist/types/containers/Views/hooks/useViewsShortcuts.d.ts +13 -0
  457. package/dist/types/containers/Views/index.d.ts +19 -0
  458. package/dist/types/containers/Views/utils/generateWorkingView.d.ts +3 -0
  459. package/dist/types/containers/Views/utils/getCustomViewsFallback.d.ts +13 -0
  460. package/dist/types/{components → containers}/Views/utils/portalUtils.d.ts +1 -1
  461. package/dist/types/containers/Views/utils/viewUpdateHelper.d.ts +17 -0
  462. package/dist/types/containers/index.d.ts +1 -0
  463. package/dist/types/context/PowerpackContext.d.ts +4 -1
  464. package/dist/types/util/columnConfigConverter.d.ts +15 -0
  465. package/dist/types/util/index.d.ts +1 -0
  466. package/dist/util.cjs.js +3 -0
  467. package/dist/util.cjs.js.map +1 -1
  468. package/dist/util.es.js +3 -0
  469. package/dist/util.es.js.map +1 -1
  470. package/package.json +6 -1
  471. package/dist/shared/src/components/Views/ViewForm/ViewForm.cjs.js +0 -164
  472. package/dist/shared/src/components/Views/ViewForm/ViewForm.cjs.js.map +0 -1
  473. package/dist/shared/src/components/Views/ViewForm/ViewForm.es.js +0 -164
  474. package/dist/shared/src/components/Views/ViewForm/ViewForm.es.js.map +0 -1
  475. package/dist/shared/src/components/Views/ViewForm/ViewForm.styled.cjs.js +0 -71
  476. package/dist/shared/src/components/Views/ViewForm/ViewForm.styled.cjs.js.map +0 -1
  477. package/dist/shared/src/components/Views/ViewForm/ViewForm.styled.es.js +0 -71
  478. package/dist/shared/src/components/Views/ViewForm/ViewForm.styled.es.js.map +0 -1
  479. package/dist/shared/src/components/Views/ViewForm/ViewFormContainer.cjs.js.map +0 -1
  480. package/dist/shared/src/components/Views/ViewForm/ViewFormContainer.es.js.map +0 -1
  481. package/dist/shared/src/components/Views/ViewItem/ViewItem.cjs.js +0 -36
  482. package/dist/shared/src/components/Views/ViewItem/ViewItem.cjs.js.map +0 -1
  483. package/dist/shared/src/components/Views/ViewItem/ViewItem.es.js +0 -36
  484. package/dist/shared/src/components/Views/ViewItem/ViewItem.es.js.map +0 -1
  485. package/dist/shared/src/components/Views/ViewItem/ViewItem.styled.cjs.js.map +0 -1
  486. package/dist/shared/src/components/Views/ViewItem/ViewItem.styled.es.js.map +0 -1
  487. package/dist/shared/src/components/Views/Views.cjs.js.map +0 -1
  488. package/dist/shared/src/components/Views/Views.es.js.map +0 -1
  489. package/dist/shared/src/components/Views/Views.styled.cjs.js.map +0 -1
  490. package/dist/shared/src/components/Views/Views.styled.es.js.map +0 -1
  491. package/dist/shared/src/components/Views/ViewsButton/ViewsButton.cjs.js.map +0 -1
  492. package/dist/shared/src/components/Views/ViewsButton/ViewsButton.es.js.map +0 -1
  493. package/dist/shared/src/components/Views/ViewsMenu/ViewsMenu.cjs.js.map +0 -1
  494. package/dist/shared/src/components/Views/ViewsMenu/ViewsMenu.es.js.map +0 -1
  495. package/dist/shared/src/components/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js +0 -132
  496. package/dist/shared/src/components/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js.map +0 -1
  497. package/dist/shared/src/components/Views/ViewsMenuContainer/ViewsMenuContainer.es.js +0 -132
  498. package/dist/shared/src/components/Views/ViewsMenuContainer/ViewsMenuContainer.es.js.map +0 -1
  499. package/dist/shared/src/components/Views/context/ViewsContext.cjs.js.map +0 -1
  500. package/dist/shared/src/components/Views/context/ViewsContext.es.js.map +0 -1
  501. package/dist/shared/src/components/Views/hooks/useBuildViewMenuItems.cjs.js.map +0 -1
  502. package/dist/shared/src/components/Views/hooks/useBuildViewMenuItems.es.js.map +0 -1
  503. package/dist/shared/src/components/Views/utils/generatePersonalView.cjs.js +0 -13
  504. package/dist/shared/src/components/Views/utils/generatePersonalView.cjs.js.map +0 -1
  505. package/dist/shared/src/components/Views/utils/generatePersonalView.es.js +0 -13
  506. package/dist/shared/src/components/Views/utils/generatePersonalView.es.js.map +0 -1
  507. package/dist/shared/src/components/Views/utils/getCustomViewsFallback.cjs.js.map +0 -1
  508. package/dist/shared/src/components/Views/utils/getCustomViewsFallback.es.js.map +0 -1
  509. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnSorting.cjs.js +0 -24
  510. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnSorting.cjs.js.map +0 -1
  511. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnSorting.es.js +0 -24
  512. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnSorting.es.js.map +0 -1
  513. package/dist/types/components/Views/ViewForm/ViewForm.d.ts +0 -14
  514. package/dist/types/components/Views/ViewForm/ViewForm.styled.d.ts +0 -9
  515. package/dist/types/components/Views/ViewForm/ViewFormContainer.d.ts +0 -15
  516. package/dist/types/components/Views/Views.d.ts +0 -8
  517. package/dist/types/components/Views/context/ViewsContext.d.ts +0 -31
  518. package/dist/types/components/Views/hooks/useBuildViewMenuItems.d.ts +0 -14
  519. package/dist/types/components/Views/index.d.ts +0 -11
  520. package/dist/types/components/Views/utils/generatePersonalView.d.ts +0 -3
  521. package/dist/types/components/Views/utils/getCustomViewsFallback.d.ts +0 -12
  522. package/dist/types/containers/ProjectTreeTable/hooks/useColumnSorting.d.ts +0 -12
  523. /package/dist/shared/src/{components → containers}/Views/ViewsMenu/ViewsMenu.styled.cjs.js +0 -0
  524. /package/dist/shared/src/{components → containers}/Views/ViewsMenu/ViewsMenu.styled.es.js +0 -0
  525. /package/dist/shared/src/{components → containers}/Views/utils/getCustomViewsFallback.cjs.js +0 -0
  526. /package/dist/shared/src/{components → containers}/Views/utils/getCustomViewsFallback.es.js +0 -0
  527. /package/dist/types/{components → containers}/Views/Views.styled.d.ts +0 -0
  528. /package/dist/types/{components → containers}/Views/ViewsButton/ViewsButton.d.ts +0 -0
  529. /package/dist/types/{components → containers}/Views/ViewsMenu/ViewsMenu.styled.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Watchers.es.js","sources":["../../../../../src/components/Watchers/Watchers.tsx"],"sourcesContent":["import { useGetEntitiesWatchersQuery, useSetEntitiesWatchersMutation } from '@shared/api'\nimport { DropdownRef, WatcherSelect, WatcherSelectProps } from '@ynput/ayon-react-components'\nimport { forwardRef } from 'react'\nimport { toast } from 'react-toastify'\n\ninterface WatchersProps extends Omit<WatcherSelectProps, 'currentUser' | 'value'> {\n entities: { id: string; projectName: string }[]\n entityType: string\n onWatchersUpdate?: (added: any[], removed: any[]) => void\n userName: string\n}\n\nexport const Watchers = forwardRef<DropdownRef, WatchersProps>(\n ({ entities, entityType, onWatchersUpdate, userName, ...props }, ref) => {\n const entitiesQuery = entities.map((entity) => ({\n entityId: entity.id,\n entityType,\n projectName: entity.projectName,\n }))\n\n const { data: watchers = [] } = useGetEntitiesWatchersQuery(\n {\n entities: entitiesQuery,\n },\n { skip: !entities.length },\n )\n\n // merge all watchers into a single unique array\n const uniqueWatchers = Array.from(new Set(watchers.flatMap((watcher) => watcher.watchers)))\n\n const [setEntitiesWatchers] = useSetEntitiesWatchersMutation()\n\n const handleChange = async (value: string[]) => {\n // find the difference between the current watchers and the new watchers\n // which users were added and which were removed\n const added = value.filter((watcher) => !uniqueWatchers.includes(watcher))\n const removed = uniqueWatchers.filter((watcher) => !value.includes(watcher))\n\n // for each entity, add or remove the watchers\n // we do this to preserve the unique watchers for each entity (rather than setting the same watchers for all entities)\n const updatedEntities = watchers.map((entity) => {\n // first remove\n const newWatchers = entity.watchers.filter((watcher) => !removed.includes(watcher))\n // then add\n newWatchers.push(...added)\n\n return {\n ...entity,\n watchers: newWatchers,\n }\n })\n\n // update\n try {\n await setEntitiesWatchers({ entities: updatedEntities }).unwrap()\n onWatchersUpdate && onWatchersUpdate(added, removed)\n } catch (error) {\n toast.error('Failed to update watchers')\n }\n }\n\n return (\n <WatcherSelect\n align=\"right\"\n {...props}\n value={uniqueWatchers}\n currentUser={userName}\n onChange={handleChange}\n ref={ref}\n // @ts-expect-error\n buttonProps={{ 'data-tooltip': 'Watchers' }}\n />\n )\n },\n)\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAM,WAAW;AAAA,EACtB,CAAC,EAAE,UAAU,YAAY,kBAAkB,UAAU,GAAG,MAAM,GAAG,QAAQ;AACvE,UAAM,gBAAgB,SAAS,IAAI,CAAC,YAAY;AAAA,MAC9C,UAAU,OAAO;AAAA,MACjB;AAAA,MACA,aAAa,OAAO;AAAA,IAAA,EACpB;AAEF,UAAM,EAAE,MAAM,WAAW,CAAA,EAAO,IAAA;AAAA,MAC9B;AAAA,QACE,UAAU;AAAA,MACZ;AAAA,MACA,EAAE,MAAM,CAAC,SAAS,OAAO;AAAA,IAC3B;AAGA,UAAM,iBAAiB,MAAM,KAAK,IAAI,IAAI,SAAS,QAAQ,CAAC,YAAY,QAAQ,QAAQ,CAAC,CAAC;AAEpF,UAAA,CAAC,mBAAmB,IAAI,+BAA+B;AAEvD,UAAA,eAAe,OAAO,UAAoB;AAGxC,YAAA,QAAQ,MAAM,OAAO,CAAC,YAAY,CAAC,eAAe,SAAS,OAAO,CAAC;AACnE,YAAA,UAAU,eAAe,OAAO,CAAC,YAAY,CAAC,MAAM,SAAS,OAAO,CAAC;AAI3E,YAAM,kBAAkB,SAAS,IAAI,CAAC,WAAW;AAEzC,cAAA,cAAc,OAAO,SAAS,OAAO,CAAC,YAAY,CAAC,QAAQ,SAAS,OAAO,CAAC;AAEtE,oBAAA,KAAK,GAAG,KAAK;AAElB,eAAA;AAAA,UACL,GAAG;AAAA,UACH,UAAU;AAAA,QACZ;AAAA,MAAA,CACD;AAGG,UAAA;AACF,cAAM,oBAAoB,EAAE,UAAU,gBAAiB,CAAA,EAAE,OAAO;AAC5C,4BAAA,iBAAiB,OAAO,OAAO;AAAA,eAC5C,OAAO;AACd,cAAM,MAAM,2BAA2B;AAAA,MAAA;AAAA,IAE3C;AAGE,WAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACL,GAAG;AAAA,QACJ,OAAO;AAAA,QACP,aAAa;AAAA,QACb,UAAU;AAAA,QACV;AAAA,QAEA,aAAa,EAAE,gBAAgB,WAAW;AAAA,MAAA;AAAA,IAC5C;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Watchers.es.js","sources":["../../../../../src/components/Watchers/Watchers.tsx"],"sourcesContent":["import { useGetEntitiesWatchersQuery, useSetEntitiesWatchersMutation } from '@shared/api'\nimport { DropdownRef, WatcherSelect, WatcherSelectProps } from '@ynput/ayon-react-components'\nimport { forwardRef } from 'react'\nimport { toast } from 'react-toastify'\n\ninterface WatchersProps extends Omit<WatcherSelectProps, 'currentUser' | 'value'> {\n entities: { id: string; projectName: string }[]\n entityType: string\n onWatchersUpdate?: (added: any[], removed: any[]) => void\n userName: string\n}\n\nexport const Watchers = forwardRef<DropdownRef, WatchersProps>(\n ({ entities, entityType, onWatchersUpdate, userName, ...props }, ref) => {\n const entitiesQuery = entities.map((entity) => ({\n entityId: entity.id,\n entityType,\n projectName: entity.projectName,\n }))\n\n const { data: watchers = [] } = useGetEntitiesWatchersQuery(\n {\n entities: entitiesQuery,\n },\n { skip: !entities.length },\n )\n\n // merge all watchers into a single unique array\n const uniqueWatchers = Array.from(new Set(watchers.flatMap((watcher) => watcher.watchers)))\n\n const [setEntitiesWatchers] = useSetEntitiesWatchersMutation()\n\n const handleChange = async (value: string[]) => {\n // find the difference between the current watchers and the new watchers\n // which users were added and which were removed\n const added = value.filter((watcher) => !uniqueWatchers.includes(watcher))\n const removed = uniqueWatchers.filter((watcher) => !value.includes(watcher))\n\n // for each entity, add or remove the watchers\n // we do this to preserve the unique watchers for each entity (rather than setting the same watchers for all entities)\n const updatedEntities = watchers.map((entity) => {\n // first remove\n const newWatchers = entity.watchers.filter((watcher) => !removed.includes(watcher))\n // then add\n newWatchers.push(...added)\n\n return {\n ...entity,\n watchers: newWatchers,\n }\n })\n\n // update\n try {\n await setEntitiesWatchers({ entities: updatedEntities }).unwrap()\n onWatchersUpdate && onWatchersUpdate(added, removed)\n } catch (error) {\n toast.error('Failed to update watchers')\n }\n }\n\n return (\n <WatcherSelect\n align=\"right\"\n {...props}\n value={uniqueWatchers}\n currentUser={userName}\n onChange={handleChange}\n ref={ref}\n // @ts-expect-error\n buttonProps={{ 'data-tooltip': 'Watchers' }}\n />\n )\n },\n)\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACP,aAAa;AAAA,QACb,UAAU;AAAA,QACV;AAAA,QAEA,aAAa,EAAE,gBAAgB,WAAW;AAAA,MAAA;AAAA,IAC5C;AAAA,EAAA;AAGN;"}
@@ -55,6 +55,7 @@ require("../../api/queries/addons/updateAddons.cjs.js");
55
55
  require("../../api/queries/attributes/getAttributes.cjs.js");
56
56
  require("../../api/queries/attributes/updateAttributes.cjs.js");
57
57
  require("../../api/queries/authentication/getAuthentication.cjs.js");
58
+ require("../../api/queries/cloud/cloud.cjs.js");
58
59
  require("../../api/queries/entities/getEntity.cjs.js");
59
60
  require("../../api/queries/entities/getEntityPanel.cjs.js");
60
61
  require("../../api/queries/entities/updateEntity.cjs.js");
@@ -63,24 +64,24 @@ require("../../api/queries/entityLists/updateLists.cjs.js");
63
64
  require("../../api/queries/entityLists/getListsAttributes.cjs.js");
64
65
  require("../../api/queries/entityLists/updateListsAttributes.cjs.js");
65
66
  require("../../api/queries/folders/getFolders.cjs.js");
67
+ require("../../api/queries/grouping/getGrouping.cjs.js");
66
68
  require("../../api/queries/overview/getOverview.cjs.js");
67
69
  require("../../api/queries/overview/updateOverview.cjs.js");
70
+ require("../../api/queries/permissions/getPermissions.cjs.js");
71
+ require("../../api/queries/products/createProduct.cjs.js");
68
72
  require("../../api/queries/project/getProject.cjs.js");
69
73
  require("../../api/queries/project/updateProject.cjs.js");
70
74
  require("../../api/queries/review/getReview.cjs.js");
71
75
  require("../../api/queries/review/updateReview.cjs.js");
76
+ require("../../api/queries/share/share.cjs.js");
72
77
  require("../../api/queries/system/getSystem.cjs.js");
73
78
  require("../../api/queries/userDashboard/getUserDashboard.cjs.js");
74
79
  require("../../api/queries/users/getUsers.cjs.js");
75
80
  require("../../api/queries/users/updateUsers.cjs.js");
76
- require("../../api/queries/watchers/getWatchers.cjs.js");
77
- require("../../api/queries/permissions/getPermissions.cjs.js");
78
- require("../../api/queries/grouping/getGrouping.cjs.js");
79
81
  require("../../api/queries/versions/updateVersions.cjs.js");
80
- require("../../api/queries/products/createProduct.cjs.js");
81
- require("../../api/queries/cloud/cloud.cjs.js");
82
82
  require("../../api/queries/views/getViews.cjs.js");
83
83
  require("../../api/queries/views/updateViews.cjs.js");
84
+ require("../../api/queries/watchers/getWatchers.cjs.js");
84
85
  require("@dnd-kit/core");
85
86
  require("@dnd-kit/sortable");
86
87
  require("../../components/ReviewablesList/ReviewablesList.styled.cjs.js");
@@ -171,6 +172,10 @@ require("../DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.styled.cjs.js
171
172
  require("./Actions.styled.cjs.js");
172
173
  require("./ActionsDropdown/ActionsDropdown.cjs.js");
173
174
  require("./ActionIcon.cjs.js");
175
+ require("../Views/context/ViewsContext.cjs.js");
176
+ require("../Views/Views.styled.cjs.js");
177
+ require("../Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js");
178
+ require("../Views/ViewsMenu/ViewsMenu.cjs.js");
174
179
  require("../../components/EntityPanelUploader/EntityPanelUploader.styled.cjs.js");
175
180
  const SimpleFormDialog = require("../../components/SimpleFormDialog/SimpleFormDialog.cjs.js");
176
181
  require("../../components/EntityPath/EntityPath.styled.cjs.js");
@@ -192,9 +197,6 @@ require("../../components/VersionUploader/components/UploadVersionDialog.cjs.js"
192
197
  require("../../components/VersionUploader/context/VersionUploadContext.cjs.js");
193
198
  require("../../components/Feedback/FeedbackContext.cjs.js");
194
199
  require("../../components/Feedback/SupportBubble.cjs.js");
195
- require("../../components/Views/context/ViewsContext.cjs.js");
196
- require("../../components/Views/Views.styled.cjs.js");
197
- require("../../components/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js");
198
200
  const ActionConfigDialog = ({ action, onClose, context }) => {
199
201
  const requestParams = React.useMemo(() => {
200
202
  if (!action) return null;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionConfigDialog.cjs.js","sources":["../../../../../src/containers/Actions/ActionConfigDialog.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { toast } from 'react-toastify'\nimport { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormValueDict } from '@shared/components'\n\nimport { useGetActionConfigQuery, useSetActionConfigMutation } from '@shared/api'\nimport type { ActionContext, BaseActionManifest } from '@shared/api'\n\ntype ConfigData = Record<string, any>\n\ninterface ActionConfigDialogProps {\n action: BaseActionManifest\n context: ActionContext\n onClose: () => void\n}\n\ninterface ActionConfigRequestQueryParams {\n addonName: string\n addonVersion: string\n variant?: string\n identifier: string\n}\n\nexport const ActionConfigDialog = ({ action, onClose, context }: ActionConfigDialogProps) => {\n const requestParams: ActionConfigRequestQueryParams | null =\n useMemo<ActionConfigRequestQueryParams | null>(() => {\n if (!action) return null\n if (!(action.addonName && action.addonVersion)) return null // this should never happen\n return {\n addonName: action.addonName,\n addonVersion: action.addonVersion,\n variant: action.variant,\n identifier: action.identifier,\n }\n }, [action])\n\n const [configureAction] = useSetActionConfigMutation()\n\n // make typescript happily unknowing about the type\n // because even if we pass skip, arguments are still required in the right type. that's cursed\n const qp: any = { actionConfig: context, ...(requestParams || {}) }\n const { data: initValues } = useGetActionConfigQuery(qp, { skip: !requestParams })\n\n // it would be sooo cool if i could do this BEFORE the query and ommit that\n // qp thing, but i can't. because it would change the hook order. ffs\n if (!(initValues && action?.configFields && action && requestParams)) {\n return null\n }\n\n const handleSubmit = async (data: ConfigData) => {\n try {\n await configureAction({\n actionConfig: { ...context, value: data },\n ...requestParams,\n }).unwrap()\n onClose()\n } catch (error) {\n console.warn('Error configuring action', error)\n toast.error('Unable to set the action configuration')\n }\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`Configure action ${action.label}`}\n fields={action.configFields}\n values={initValues as SimpleFormValueDict}\n onClose={onClose}\n onSubmit={handleSubmit}\n submitLabel=\"Save action config\"\n cancelLabel=\"Cancel\"\n submitIcon=\"check\"\n cancelIcon=\"close\"\n />\n )\n}\n"],"names":["useMemo","useSetActionConfigMutation","useGetActionConfigQuery","toast","jsx","SimpleFormDialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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R;AAAA,MACA,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,YAAW;AAAA,MACX,YAAW;AAAA,IAAA;AAAA,EACb;AAEJ;;"}
1
+ {"version":3,"file":"ActionConfigDialog.cjs.js","sources":["../../../../../src/containers/Actions/ActionConfigDialog.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { toast } from 'react-toastify'\nimport { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormValueDict } from '@shared/components'\n\nimport { useGetActionConfigQuery, useSetActionConfigMutation } from '@shared/api'\nimport type { ActionContext, BaseActionManifest } from '@shared/api'\n\ntype ConfigData = Record<string, any>\n\ninterface ActionConfigDialogProps {\n action: BaseActionManifest\n context: ActionContext\n onClose: () => void\n}\n\ninterface ActionConfigRequestQueryParams {\n addonName: string\n addonVersion: string\n variant?: string\n identifier: string\n}\n\nexport const ActionConfigDialog = ({ action, onClose, context }: ActionConfigDialogProps) => {\n const requestParams: ActionConfigRequestQueryParams | null =\n useMemo<ActionConfigRequestQueryParams | null>(() => {\n if (!action) return null\n if (!(action.addonName && action.addonVersion)) return null // this should never happen\n return {\n addonName: action.addonName,\n addonVersion: action.addonVersion,\n variant: action.variant,\n identifier: action.identifier,\n }\n }, [action])\n\n const [configureAction] = useSetActionConfigMutation()\n\n // make typescript happily unknowing about the type\n // because even if we pass skip, arguments are still required in the right type. that's cursed\n const qp: any = { actionConfig: context, ...(requestParams || {}) }\n const { data: initValues } = useGetActionConfigQuery(qp, { skip: !requestParams })\n\n // it would be sooo cool if i could do this BEFORE the query and ommit that\n // qp thing, but i can't. because it would change the hook order. ffs\n if (!(initValues && action?.configFields && action && requestParams)) {\n return null\n }\n\n const handleSubmit = async (data: ConfigData) => {\n try {\n await configureAction({\n actionConfig: { ...context, value: data },\n ...requestParams,\n }).unwrap()\n onClose()\n } catch (error) {\n console.warn('Error configuring action', error)\n toast.error('Unable to set the action configuration')\n }\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`Configure action ${action.label}`}\n fields={action.configFields}\n values={initValues as SimpleFormValueDict}\n onClose={onClose}\n onSubmit={handleSubmit}\n submitLabel=\"Save action config\"\n cancelLabel=\"Cancel\"\n submitIcon=\"check\"\n cancelIcon=\"close\"\n />\n )\n}\n"],"names":["useMemo","useSetActionConfigMutation","useGetActionConfigQuery","toast","jsx","SimpleFormDialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,qBAAqB,CAAC,EAAE,QAAQ,SAAS,cAAuC;AACrF,QAAA,gBACJA,MAAAA,QAA+C,MAAM;AAC/C,QAAA,CAAC,OAAe,QAAA;AACpB,QAAI,EAAE,OAAO,aAAa,OAAO,cAAsB,QAAA;AAChD,WAAA;AAAA,MACL,WAAW,OAAO;AAAA,MAClB,cAAc,OAAO;AAAA,MACrB,SAAS,OAAO;AAAA,MAChB,YAAY,OAAO;AAAA,IACrB;AAAA,EAAA,GACC,CAAC,MAAM,CAAC;AAEP,QAAA,CAAC,eAAe,IAAIC,sCAA2B;AAIrD,QAAM,KAAU,EAAE,cAAc,SAAS,GAAI,iBAAiB,CAAA,EAAI;AAC5D,QAAA,EAAE,MAAM,eAAeC,WAAAA,wBAAwB,IAAI,EAAE,MAAM,CAAC,eAAe;AAIjF,MAAI,EAAE,eAAc,iCAAQ,iBAAgB,UAAU,gBAAgB;AAC7D,WAAA;AAAA,EAAA;AAGH,QAAA,eAAe,OAAO,SAAqB;AAC3C,QAAA;AACF,YAAM,gBAAgB;AAAA,QACpB,cAAc,EAAE,GAAG,SAAS,OAAO,KAAK;AAAA,QACxC,GAAG;AAAA,MACJ,CAAA,EAAE,OAAO;AACF,cAAA;AAAA,aACD,OAAO;AACN,cAAA,KAAK,4BAA4B,KAAK;AAC9CC,oBAAA,MAAM,MAAM,wCAAwC;AAAA,IAAA;AAAA,EAExD;AAGE,SAAAC,2BAAA,kBAAA;AAAA,IAACC,iBAAA;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,OAAO,oBAAoB,OAAO,KAAK;AAAA,MACvC,QAAQ,OAAO;AAAA,MACf,QAAQ;AAAA,MACR;AAAA,MACA,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,YAAW;AAAA,MACX,YAAW;AAAA,IAAA;AAAA,EACb;AAEJ;;"}
@@ -53,6 +53,7 @@ import "../../api/queries/addons/updateAddons.es.js";
53
53
  import "../../api/queries/attributes/getAttributes.es.js";
54
54
  import "../../api/queries/attributes/updateAttributes.es.js";
55
55
  import "../../api/queries/authentication/getAuthentication.es.js";
56
+ import "../../api/queries/cloud/cloud.es.js";
56
57
  import "../../api/queries/entities/getEntity.es.js";
57
58
  import "../../api/queries/entities/getEntityPanel.es.js";
58
59
  import "../../api/queries/entities/updateEntity.es.js";
@@ -61,24 +62,24 @@ import "../../api/queries/entityLists/updateLists.es.js";
61
62
  import "../../api/queries/entityLists/getListsAttributes.es.js";
62
63
  import "../../api/queries/entityLists/updateListsAttributes.es.js";
63
64
  import "../../api/queries/folders/getFolders.es.js";
65
+ import "../../api/queries/grouping/getGrouping.es.js";
64
66
  import "../../api/queries/overview/getOverview.es.js";
65
67
  import "../../api/queries/overview/updateOverview.es.js";
68
+ import "../../api/queries/permissions/getPermissions.es.js";
69
+ import "../../api/queries/products/createProduct.es.js";
66
70
  import "../../api/queries/project/getProject.es.js";
67
71
  import "../../api/queries/project/updateProject.es.js";
68
72
  import "../../api/queries/review/getReview.es.js";
69
73
  import "../../api/queries/review/updateReview.es.js";
74
+ import "../../api/queries/share/share.es.js";
70
75
  import "../../api/queries/system/getSystem.es.js";
71
76
  import "../../api/queries/userDashboard/getUserDashboard.es.js";
72
77
  import "../../api/queries/users/getUsers.es.js";
73
78
  import "../../api/queries/users/updateUsers.es.js";
74
- import "../../api/queries/watchers/getWatchers.es.js";
75
- import "../../api/queries/permissions/getPermissions.es.js";
76
- import "../../api/queries/grouping/getGrouping.es.js";
77
79
  import "../../api/queries/versions/updateVersions.es.js";
78
- import "../../api/queries/products/createProduct.es.js";
79
- import "../../api/queries/cloud/cloud.es.js";
80
80
  import "../../api/queries/views/getViews.es.js";
81
81
  import "../../api/queries/views/updateViews.es.js";
82
+ import "../../api/queries/watchers/getWatchers.es.js";
82
83
  import "@dnd-kit/core";
83
84
  import "@dnd-kit/sortable";
84
85
  import "../../components/ReviewablesList/ReviewablesList.styled.es.js";
@@ -169,6 +170,10 @@ import "../DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.styled.es.js";
169
170
  import "./Actions.styled.es.js";
170
171
  import "./ActionsDropdown/ActionsDropdown.es.js";
171
172
  import "./ActionIcon.es.js";
173
+ import "../Views/context/ViewsContext.es.js";
174
+ import "../Views/Views.styled.es.js";
175
+ import "../Views/ViewsMenuContainer/ViewsMenuContainer.es.js";
176
+ import "../Views/ViewsMenu/ViewsMenu.es.js";
172
177
  import "../../components/EntityPanelUploader/EntityPanelUploader.styled.es.js";
173
178
  import { SimpleFormDialog } from "../../components/SimpleFormDialog/SimpleFormDialog.es.js";
174
179
  import "../../components/EntityPath/EntityPath.styled.es.js";
@@ -190,9 +195,6 @@ import "../../components/VersionUploader/components/UploadVersionDialog.es.js";
190
195
  import "../../components/VersionUploader/context/VersionUploadContext.es.js";
191
196
  import "../../components/Feedback/FeedbackContext.es.js";
192
197
  import "../../components/Feedback/SupportBubble.es.js";
193
- import "../../components/Views/context/ViewsContext.es.js";
194
- import "../../components/Views/Views.styled.es.js";
195
- import "../../components/Views/ViewsMenuContainer/ViewsMenuContainer.es.js";
196
198
  const ActionConfigDialog = ({ action, onClose, context }) => {
197
199
  const requestParams = useMemo(() => {
198
200
  if (!action) return null;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionConfigDialog.es.js","sources":["../../../../../src/containers/Actions/ActionConfigDialog.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { toast } from 'react-toastify'\nimport { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormValueDict } from '@shared/components'\n\nimport { useGetActionConfigQuery, useSetActionConfigMutation } from '@shared/api'\nimport type { ActionContext, BaseActionManifest } from '@shared/api'\n\ntype ConfigData = Record<string, any>\n\ninterface ActionConfigDialogProps {\n action: BaseActionManifest\n context: ActionContext\n onClose: () => void\n}\n\ninterface ActionConfigRequestQueryParams {\n addonName: string\n addonVersion: string\n variant?: string\n identifier: string\n}\n\nexport const ActionConfigDialog = ({ action, onClose, context }: ActionConfigDialogProps) => {\n const requestParams: ActionConfigRequestQueryParams | null =\n useMemo<ActionConfigRequestQueryParams | null>(() => {\n if (!action) return null\n if (!(action.addonName && action.addonVersion)) return null // this should never happen\n return {\n addonName: action.addonName,\n addonVersion: action.addonVersion,\n variant: action.variant,\n identifier: action.identifier,\n }\n }, [action])\n\n const [configureAction] = useSetActionConfigMutation()\n\n // make typescript happily unknowing about the type\n // because even if we pass skip, arguments are still required in the right type. that's cursed\n const qp: any = { actionConfig: context, ...(requestParams || {}) }\n const { data: initValues } = useGetActionConfigQuery(qp, { skip: !requestParams })\n\n // it would be sooo cool if i could do this BEFORE the query and ommit that\n // qp thing, but i can't. because it would change the hook order. ffs\n if (!(initValues && action?.configFields && action && requestParams)) {\n return null\n }\n\n const handleSubmit = async (data: ConfigData) => {\n try {\n await configureAction({\n actionConfig: { ...context, value: data },\n ...requestParams,\n }).unwrap()\n onClose()\n } catch (error) {\n console.warn('Error configuring action', error)\n toast.error('Unable to set the action configuration')\n }\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`Configure action ${action.label}`}\n fields={action.configFields}\n values={initValues as SimpleFormValueDict}\n onClose={onClose}\n onSubmit={handleSubmit}\n submitLabel=\"Save action config\"\n cancelLabel=\"Cancel\"\n submitIcon=\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;AAAA,MACvC,QAAQ,OAAO;AAAA,MACf,QAAQ;AAAA,MACR;AAAA,MACA,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,YAAW;AAAA,MACX,YAAW;AAAA,IAAA;AAAA,EACb;AAEJ;"}
1
+ {"version":3,"file":"ActionConfigDialog.es.js","sources":["../../../../../src/containers/Actions/ActionConfigDialog.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { toast } from 'react-toastify'\nimport { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormValueDict } from '@shared/components'\n\nimport { useGetActionConfigQuery, useSetActionConfigMutation } from '@shared/api'\nimport type { ActionContext, BaseActionManifest } from '@shared/api'\n\ntype ConfigData = Record<string, any>\n\ninterface ActionConfigDialogProps {\n action: BaseActionManifest\n context: ActionContext\n onClose: () => void\n}\n\ninterface ActionConfigRequestQueryParams {\n addonName: string\n addonVersion: string\n variant?: string\n identifier: string\n}\n\nexport const ActionConfigDialog = ({ action, onClose, context }: ActionConfigDialogProps) => {\n const requestParams: ActionConfigRequestQueryParams | null =\n useMemo<ActionConfigRequestQueryParams | null>(() => {\n if (!action) return null\n if (!(action.addonName && action.addonVersion)) return null // this should never happen\n return {\n addonName: action.addonName,\n addonVersion: action.addonVersion,\n variant: action.variant,\n identifier: action.identifier,\n }\n }, [action])\n\n const [configureAction] = useSetActionConfigMutation()\n\n // make typescript happily unknowing about the type\n // because even if we pass skip, arguments are still required in the right type. that's cursed\n const qp: any = { actionConfig: context, ...(requestParams || {}) }\n const { data: initValues } = useGetActionConfigQuery(qp, { skip: !requestParams })\n\n // it would be sooo cool if i could do this BEFORE the query and ommit that\n // qp thing, but i can't. because it would change the hook order. ffs\n if (!(initValues && action?.configFields && action && requestParams)) {\n return null\n }\n\n const handleSubmit = async (data: ConfigData) => {\n try {\n await configureAction({\n actionConfig: { ...context, value: data },\n ...requestParams,\n }).unwrap()\n onClose()\n } catch (error) {\n console.warn('Error configuring action', error)\n toast.error('Unable to set the action configuration')\n }\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`Configure action ${action.label}`}\n fields={action.configFields}\n values={initValues as SimpleFormValueDict}\n onClose={onClose}\n onSubmit={handleSubmit}\n submitLabel=\"Save action config\"\n cancelLabel=\"Cancel\"\n submitIcon=\"check\"\n cancelIcon=\"close\"\n />\n )\n}\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,qBAAqB,CAAC,EAAE,QAAQ,SAAS,cAAuC;AACrF,QAAA,gBACJ,QAA+C,MAAM;AAC/C,QAAA,CAAC,OAAe,QAAA;AACpB,QAAI,EAAE,OAAO,aAAa,OAAO,cAAsB,QAAA;AAChD,WAAA;AAAA,MACL,WAAW,OAAO;AAAA,MAClB,cAAc,OAAO;AAAA,MACrB,SAAS,OAAO;AAAA,MAChB,YAAY,OAAO;AAAA,IACrB;AAAA,EAAA,GACC,CAAC,MAAM,CAAC;AAEP,QAAA,CAAC,eAAe,IAAI,2BAA2B;AAIrD,QAAM,KAAU,EAAE,cAAc,SAAS,GAAI,iBAAiB,CAAA,EAAI;AAC5D,QAAA,EAAE,MAAM,eAAe,wBAAwB,IAAI,EAAE,MAAM,CAAC,eAAe;AAIjF,MAAI,EAAE,eAAc,iCAAQ,iBAAgB,UAAU,gBAAgB;AAC7D,WAAA;AAAA,EAAA;AAGH,QAAA,eAAe,OAAO,SAAqB;AAC3C,QAAA;AACF,YAAM,gBAAgB;AAAA,QACpB,cAAc,EAAE,GAAG,SAAS,OAAO,KAAK;AAAA,QACxC,GAAG;AAAA,MACJ,CAAA,EAAE,OAAO;AACF,cAAA;AAAA,aACD,OAAO;AACN,cAAA,KAAK,4BAA4B,KAAK;AAC9C,YAAM,MAAM,wCAAwC;AAAA,IAAA;AAAA,EAExD;AAGE,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,OAAO,oBAAoB,OAAO,KAAK;AAAA,MACvC,QAAQ,OAAO;AAAA,MACf,QAAQ;AAAA,MACR;AAAA,MACA,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,YAAW;AAAA,MACX,YAAW;AAAA,IAAA;AAAA,EACb;AAEJ;"}
@@ -52,6 +52,7 @@ require("../../api/queries/addons/updateAddons.cjs.js");
52
52
  require("../../api/queries/attributes/getAttributes.cjs.js");
53
53
  require("../../api/queries/attributes/updateAttributes.cjs.js");
54
54
  require("../../api/queries/authentication/getAuthentication.cjs.js");
55
+ require("../../api/queries/cloud/cloud.cjs.js");
55
56
  require("../../api/queries/entities/getEntity.cjs.js");
56
57
  require("../../api/queries/entities/getEntityPanel.cjs.js");
57
58
  require("../../api/queries/entities/updateEntity.cjs.js");
@@ -60,24 +61,24 @@ require("../../api/queries/entityLists/updateLists.cjs.js");
60
61
  require("../../api/queries/entityLists/getListsAttributes.cjs.js");
61
62
  require("../../api/queries/entityLists/updateListsAttributes.cjs.js");
62
63
  require("../../api/queries/folders/getFolders.cjs.js");
64
+ require("../../api/queries/grouping/getGrouping.cjs.js");
63
65
  require("../../api/queries/overview/getOverview.cjs.js");
64
66
  require("../../api/queries/overview/updateOverview.cjs.js");
67
+ require("../../api/queries/permissions/getPermissions.cjs.js");
68
+ require("../../api/queries/products/createProduct.cjs.js");
65
69
  require("../../api/queries/project/getProject.cjs.js");
66
70
  require("../../api/queries/project/updateProject.cjs.js");
67
71
  require("../../api/queries/review/getReview.cjs.js");
68
72
  require("../../api/queries/review/updateReview.cjs.js");
73
+ require("../../api/queries/share/share.cjs.js");
69
74
  require("../../api/queries/system/getSystem.cjs.js");
70
75
  require("../../api/queries/userDashboard/getUserDashboard.cjs.js");
71
76
  require("../../api/queries/users/getUsers.cjs.js");
72
77
  require("../../api/queries/users/updateUsers.cjs.js");
73
- require("../../api/queries/watchers/getWatchers.cjs.js");
74
- require("../../api/queries/permissions/getPermissions.cjs.js");
75
- require("../../api/queries/grouping/getGrouping.cjs.js");
76
78
  require("../../api/queries/versions/updateVersions.cjs.js");
77
- require("../../api/queries/products/createProduct.cjs.js");
78
- require("../../api/queries/cloud/cloud.cjs.js");
79
79
  require("../../api/queries/views/getViews.cjs.js");
80
80
  require("../../api/queries/views/updateViews.cjs.js");
81
+ require("../../api/queries/watchers/getWatchers.cjs.js");
81
82
  const ActionsDropdown = require("./ActionsDropdown/ActionsDropdown.cjs.js");
82
83
  const ActionIcon = require("./ActionIcon.cjs.js");
83
84
  require("../../context/RemoteModulesContext.cjs.js");
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.cjs.js","sources":["../../../../../src/containers/Actions/Actions.tsx"],"sourcesContent":["import * as Styled from './Actions.styled'\nimport { MouseEvent, useState } from 'react'\nimport clsx from 'clsx'\nimport { toast } from 'react-toastify'\nimport { useMemo, useEffect } from 'react'\nimport { ActionContext, useExecuteActionMutation, useGetActionsFromContextQuery } from '@shared/api'\nimport { ActionsDropdown, ActionsDropdownProps } from './ActionsDropdown'\nimport ActionIcon from './ActionIcon'\nimport { ActionTriggersProps, useActionTriggers } from '@shared/hooks'\nimport { ActionConfigDialog } from './ActionConfigDialog'\nimport { InteractiveActionDialog, InteractiveForm } from './InteractiveActionDialog'\n\nconst placeholder = {\n identifier: 'placeholder',\n label: 'Featured action slot',\n isPlaceholder: true,\n icon: { type: 'material-symbols', name: 'sync' },\n groupLabel: '',\n}\n\ninterface ActionsProps extends ActionTriggersProps {\n entities: { id: string; projectName: string; entitySubType?: string }[]\n entityType: ActionContext['entityType']\n entitySubTypes?: string[]\n isLoadingEntity: boolean\n projectActionsProjectName?: string\n featuredCount?: number\n isDeveloperMode: boolean\n align?: ActionsDropdownProps['align']\n pt?: {\n dropdown?: Partial<ActionsDropdownProps>\n }\n}\n\nexport const Actions = ({\n entities,\n entityType,\n entitySubTypes,\n isLoadingEntity,\n projectActionsProjectName,\n searchParams,\n featuredCount = 2,\n isDeveloperMode,\n onNavigate,\n onSetSearchParams,\n align,\n pt,\n}: ActionsProps) => {\n // special triggers the actions can make to perform stuff on the client\n const { handleActionPayload } = useActionTriggers({ onNavigate, onSetSearchParams, searchParams })\n const [actionBeingConfigured, setActionBeingConfigured] = useState<any>(null)\n const [interactiveForm, setInteractiveForm] = useState<any>(null)\n\n const context: ActionContext | null = useMemo(() => {\n if (projectActionsProjectName) {\n return {\n entityType: 'project',\n projectName: projectActionsProjectName,\n }\n }\n if (!entities.length) return null\n if (!entities[0].projectName) return null\n\n // get a list of unique entity subtypes from loaded data\n const entitySubtypesLoaded = entities\n .filter((entity) => entity.entitySubType)\n .map((entity) => entity.entitySubType as string)\n .filter((value, index, self) => self.indexOf(value) === index && value)\n\n // try and use the passed in entitySubTypes, if not use the loaded ones\n const entitySubTypesToUse = entitySubTypes?.length ? entitySubTypes : entitySubtypesLoaded\n\n // all types except version/representation should have subtypes\n if (\n !entitySubTypesToUse?.length &&\n entityType !== 'version' &&\n entityType !== 'representation'\n ) {\n console.warn('No entity subtypes found')\n return null\n }\n\n return {\n projectName: entities[0].projectName,\n entityType: entityType,\n entityIds: entities.map((entity) => entity.id),\n entitySubtypes: entitySubTypesToUse,\n }\n }, [entities, entityType])\n\n useEffect(() => {\n setInteractiveForm(null)\n }, [context])\n\n const { data, isFetching: isFetchingActions } = useGetActionsFromContextQuery(\n { mode: 'simple', actionContext: context as ActionContext },\n { skip: !context },\n )\n\n const actions = data?.actions || []\n\n const categoryOrder = ['application', 'admin', 'workflow']\n // group actions by category\n // sort by hardcoded category, this will changing the future\n const groupedActions = useMemo(() => {\n // Step 1: Group actions by category\n const grouped = actions.reduce((acc: { [key: string]: any[] }, action) => {\n const category = action.category || 'uncategorized'\n if (!acc[category]) {\n acc[category] = []\n }\n acc[category].push(action)\n return acc\n }, {})\n\n // Step 5: Return the ordered groups\n return grouped\n }, [actions])\n\n // get categories that don't have a specific order (not in categoryOrder)\n // then sort them alphabetically\n const unorderedCategories = useMemo(\n () => [\n ...new Set(\n Object.keys(groupedActions)\n .filter((category) => !categoryOrder.includes(category))\n .sort((a, b) => a.localeCompare(b)),\n ),\n ],\n [groupedActions],\n )\n\n const categories = [...categoryOrder, ...unorderedCategories]\n\n // create the options for the dropdown, each category is separated by a divider and a title\n // for the divider we will use a custom dropdown item template\n const dropdownOptions = useMemo(() => {\n const options = []\n\n categories.forEach((category) => {\n if (!groupedActions[category] || !groupedActions[category].length) return\n\n options.push({\n label: category,\n header: true,\n value: category,\n disabled: true,\n })\n\n const groupOptions = groupedActions[category].map((action) => ({\n value: action.identifier,\n label: action.groupLabel ? action.groupLabel + ' ' + action.label : action.label,\n icon: action.icon,\n hasConfig: !!action.configFields,\n }))\n\n options.push(...groupOptions)\n })\n\n // if no actions, add placeholder\n if (!options.length) {\n options.push({\n label: 'No actions available',\n value: 'no-actions',\n disabled: true,\n header: true,\n })\n }\n\n return options\n }, [groupedActions, unorderedCategories, categoryOrder])\n\n const featuredActions = useMemo(() => {\n // Filter and sort to get initial featured actions\n let tempFeaturedActions = actions\n .filter((action) => action.featured)\n .sort((a, b) => (a.order || 0) - (b.order || 0))\n .slice(0, featuredCount)\n\n // Check if we need to add more actions to reach featuredCount\n if (tempFeaturedActions.length < featuredCount) {\n categories.forEach((category) => {\n if (tempFeaturedActions.length >= featuredCount) return\n const actions = groupedActions[category]\n if (!actions || !actions.length) return\n\n for (let i = tempFeaturedActions.length; i < featuredCount; i++) {\n const action = actions[i]\n if (!action) break\n if (!action.icon) continue\n tempFeaturedActions.push(action)\n }\n })\n }\n\n return tempFeaturedActions\n }, [actions, groupedActions, placeholder])\n\n const [executeAction, { isLoading: isLoadingExecution, originalArgs }] =\n useExecuteActionMutation()\n const executingAction = isLoadingExecution && originalArgs?.identifier\n\n const handleExecuteAction = async (\n identifier: string,\n e?: MouseEvent<HTMLElement> | null,\n formData?: InteractiveForm,\n ) => {\n e?.preventDefault()\n const action = actions.find((option) => option.identifier === identifier)\n\n if (!action) {\n toast.error('Action not found')\n console.warn('Action not found', identifier)\n return\n }\n\n const params = {\n addonName: action.addonName as string,\n addonVersion: action.addonVersion as string,\n variant: action.variant,\n identifier: action.identifier,\n }\n\n const actionContext = { ...context }\n if (formData) {\n actionContext.formData = formData\n }\n\n let response = null\n\n try {\n response = await executeAction({ actionContext, ...params }).unwrap()\n } catch (error: any) {\n console.error('Error executing action', error)\n toast.error(error?.data?.detail || 'Error executing action')\n return\n }\n\n try {\n // Toast the message if it is available\n if (response?.message) {\n if (response?.success) {\n toast.success(response.message, { autoClose: 2000 })\n } else {\n toast.error(response.message, { autoClose: 2000 })\n }\n }\n\n // Even if response?.success is false, we still want to handle the payload\n // as it may contain useful information - complex error messages in form,\n // redirect to another page etc. If the action just needs to abort,\n // it raises exception instead of returning a response with success: false\n\n // Use the new hook to handle payload\n if (response?.payload) {\n if (response.type === 'form') {\n // action requests additional information from the user.\n // we show a dialog with the form and when the user submits it we call the action again\n\n // It probably does not make sense to move to the useActionTriggers hook\n // as it need contexts and the dialog\n const intf = {\n identifier,\n // @ts-expect-error\n title: response.payload['title'],\n // @ts-expect-error\n fields: response.payload['fields'],\n // @ts-expect-error\n submitLabel: response.payload['submit_label'],\n // @ts-expect-error\n cancelLabel: response.payload['cancel_label'],\n // @ts-expect-error\n submitIcon: response.payload['submit_icon'],\n // @ts-expect-error\n cancelIcon: response.payload['cancel_icon'],\n }\n setInteractiveForm(intf)\n } else {\n handleActionPayload(response.type as string, response.payload)\n }\n }\n } catch (error) {\n // got response, but failed to process it\n console.warn('Error during action response processing', error)\n toast.error('Error occured during action processing')\n }\n }\n\n const handleConfigureAction = (identifier: string) => {\n const action = actions.find((data) => data.identifier === identifier)\n if (!action) return\n setActionBeingConfigured(action)\n }\n\n const handleSubmitInteractiveForm = async (identifier: string, formData: InteractiveForm) => {\n handleExecuteAction(identifier, null, formData)\n }\n\n const loadingActions = useMemo(\n () => Array(featuredCount).fill(placeholder),\n [featuredCount, placeholder],\n )\n\n const isLoading = isFetchingActions || isLoadingEntity\n const featuredActionsToDisplay = isLoading ? loadingActions : featuredActions\n\n return (\n <Styled.Actions className=\"actions\">\n {featuredActionsToDisplay.map((action, i) => (\n <Styled.FeaturedAction\n key={action.identifier + '-' + i}\n className={clsx('action', {\n loading: isLoading,\n isPlaceholder: action.isPlaceholder,\n })}\n data-tooltip={action.groupLabel ? action.groupLabel + ' ' + action.label : action.label}\n disabled={action.isPlaceholder}\n onClick={(e) => handleExecuteAction(action.identifier, e)}\n >\n {/* @ts-ignore */}\n <ActionIcon icon={action.icon} isExecuting={executingAction === action.identifier} />\n </Styled.FeaturedAction>\n ))}\n <ActionsDropdown\n options={dropdownOptions}\n isLoading={isLoading && featuredCount > 0}\n onAction={handleExecuteAction}\n onConfig={handleConfigureAction}\n isDeveloperMode={isDeveloperMode}\n align={align}\n {...pt?.dropdown}\n />\n <ActionConfigDialog\n action={actionBeingConfigured}\n // @ts-expect-error\n context={context}\n onClose={() => setActionBeingConfigured(null)}\n />\n <InteractiveActionDialog\n interactiveForm={interactiveForm}\n onClose={() => setInteractiveForm(null)}\n // @ts-expect-error\n onSubmit={handleSubmitInteractiveForm}\n />\n </Styled.Actions>\n )\n}\n"],"names":["useActionTriggers","useState","useMemo","useEffect","useGetActionsFromContextQuery","actions","useExecuteActionMutation","toast","data","jsxs","Styled.Actions","jsx","Styled.FeaturedAction","ActionsDropdown","ActionConfigDialog","InteractiveActionDialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,eAAe;AAAA,EACf,MAAM,EAAE,MAAM,oBAAoB,MAAM,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ACxC,UAAU;AAAA,QACV,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACC,GAAG,yBAAI;AAAA,MAAA;AAAA,IACV;AAAA,IACAF,2BAAA,kBAAA;AAAA,MAACG,mBAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QAER;AAAA,QACA,SAAS,MAAM,yBAAyB,IAAI;AAAA,MAAA;AAAA,IAC9C;AAAA,IACAH,2BAAA,kBAAA;AAAA,MAACI,wBAAA;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAS,MAAM,mBAAmB,IAAI;AAAA,QAEtC,UAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;;"}
1
+ {"version":3,"file":"Actions.cjs.js","sources":["../../../../../src/containers/Actions/Actions.tsx"],"sourcesContent":["import * as Styled from './Actions.styled'\nimport { MouseEvent, useState } from 'react'\nimport clsx from 'clsx'\nimport { toast } from 'react-toastify'\nimport { useMemo, useEffect } from 'react'\nimport { ActionContext, useExecuteActionMutation, useGetActionsFromContextQuery } from '@shared/api'\nimport { ActionsDropdown, ActionsDropdownProps } from './ActionsDropdown'\nimport ActionIcon from './ActionIcon'\nimport { ActionTriggersProps, useActionTriggers } from '@shared/hooks'\nimport { ActionConfigDialog } from './ActionConfigDialog'\nimport { InteractiveActionDialog, InteractiveForm } from './InteractiveActionDialog'\n\nconst placeholder = {\n identifier: 'placeholder',\n label: 'Featured action slot',\n isPlaceholder: true,\n icon: { type: 'material-symbols', name: 'sync' },\n groupLabel: '',\n}\n\ninterface ActionsProps extends ActionTriggersProps {\n entities: { id: string; projectName: string; entitySubType?: string }[]\n entityType: ActionContext['entityType']\n entitySubTypes?: string[]\n isLoadingEntity: boolean\n projectActionsProjectName?: string\n featuredCount?: number\n isDeveloperMode: boolean\n align?: ActionsDropdownProps['align']\n pt?: {\n dropdown?: Partial<ActionsDropdownProps>\n }\n}\n\nexport const Actions = ({\n entities,\n entityType,\n entitySubTypes,\n isLoadingEntity,\n projectActionsProjectName,\n searchParams,\n featuredCount = 2,\n isDeveloperMode,\n onNavigate,\n onSetSearchParams,\n align,\n pt,\n}: ActionsProps) => {\n // special triggers the actions can make to perform stuff on the client\n const { handleActionPayload } = useActionTriggers({ onNavigate, onSetSearchParams, searchParams })\n const [actionBeingConfigured, setActionBeingConfigured] = useState<any>(null)\n const [interactiveForm, setInteractiveForm] = useState<any>(null)\n\n const context: ActionContext | null = useMemo(() => {\n if (projectActionsProjectName) {\n return {\n entityType: 'project',\n projectName: projectActionsProjectName,\n }\n }\n if (!entities.length) return null\n if (!entities[0].projectName) return null\n\n // get a list of unique entity subtypes from loaded data\n const entitySubtypesLoaded = entities\n .filter((entity) => entity.entitySubType)\n .map((entity) => entity.entitySubType as string)\n .filter((value, index, self) => self.indexOf(value) === index && value)\n\n // try and use the passed in entitySubTypes, if not use the loaded ones\n const entitySubTypesToUse = entitySubTypes?.length ? entitySubTypes : entitySubtypesLoaded\n\n // all types except version/representation should have subtypes\n if (\n !entitySubTypesToUse?.length &&\n entityType !== 'version' &&\n entityType !== 'representation'\n ) {\n console.warn('No entity subtypes found')\n return null\n }\n\n return {\n projectName: entities[0].projectName,\n entityType: entityType,\n entityIds: entities.map((entity) => entity.id),\n entitySubtypes: entitySubTypesToUse,\n }\n }, [entities, entityType])\n\n useEffect(() => {\n setInteractiveForm(null)\n }, [context])\n\n const { data, isFetching: isFetchingActions } = useGetActionsFromContextQuery(\n { mode: 'simple', actionContext: context as ActionContext },\n { skip: !context },\n )\n\n const actions = data?.actions || []\n\n const categoryOrder = ['application', 'admin', 'workflow']\n // group actions by category\n // sort by hardcoded category, this will changing the future\n const groupedActions = useMemo(() => {\n // Step 1: Group actions by category\n const grouped = actions.reduce((acc: { [key: string]: any[] }, action) => {\n const category = action.category || 'uncategorized'\n if (!acc[category]) {\n acc[category] = []\n }\n acc[category].push(action)\n return acc\n }, {})\n\n // Step 5: Return the ordered groups\n return grouped\n }, [actions])\n\n // get categories that don't have a specific order (not in categoryOrder)\n // then sort them alphabetically\n const unorderedCategories = useMemo(\n () => [\n ...new Set(\n Object.keys(groupedActions)\n .filter((category) => !categoryOrder.includes(category))\n .sort((a, b) => a.localeCompare(b)),\n ),\n ],\n [groupedActions],\n )\n\n const categories = [...categoryOrder, ...unorderedCategories]\n\n // create the options for the dropdown, each category is separated by a divider and a title\n // for the divider we will use a custom dropdown item template\n const dropdownOptions = useMemo(() => {\n const options = []\n\n categories.forEach((category) => {\n if (!groupedActions[category] || !groupedActions[category].length) return\n\n options.push({\n label: category,\n header: true,\n value: category,\n disabled: true,\n })\n\n const groupOptions = groupedActions[category].map((action) => ({\n value: action.identifier,\n label: action.groupLabel ? action.groupLabel + ' ' + action.label : action.label,\n icon: action.icon,\n hasConfig: !!action.configFields,\n }))\n\n options.push(...groupOptions)\n })\n\n // if no actions, add placeholder\n if (!options.length) {\n options.push({\n label: 'No actions available',\n value: 'no-actions',\n disabled: true,\n header: true,\n })\n }\n\n return options\n }, [groupedActions, unorderedCategories, categoryOrder])\n\n const featuredActions = useMemo(() => {\n // Filter and sort to get initial featured actions\n let tempFeaturedActions = actions\n .filter((action) => action.featured)\n .sort((a, b) => (a.order || 0) - (b.order || 0))\n .slice(0, featuredCount)\n\n // Check if we need to add more actions to reach featuredCount\n if (tempFeaturedActions.length < featuredCount) {\n categories.forEach((category) => {\n if (tempFeaturedActions.length >= featuredCount) return\n const actions = groupedActions[category]\n if (!actions || !actions.length) return\n\n for (let i = tempFeaturedActions.length; i < featuredCount; i++) {\n const action = actions[i]\n if (!action) break\n if (!action.icon) continue\n tempFeaturedActions.push(action)\n }\n })\n }\n\n return tempFeaturedActions\n }, [actions, groupedActions, placeholder])\n\n const [executeAction, { isLoading: isLoadingExecution, originalArgs }] =\n useExecuteActionMutation()\n const executingAction = isLoadingExecution && originalArgs?.identifier\n\n const handleExecuteAction = async (\n identifier: string,\n e?: MouseEvent<HTMLElement> | null,\n formData?: InteractiveForm,\n ) => {\n e?.preventDefault()\n const action = actions.find((option) => option.identifier === identifier)\n\n if (!action) {\n toast.error('Action not found')\n console.warn('Action not found', identifier)\n return\n }\n\n const params = {\n addonName: action.addonName as string,\n addonVersion: action.addonVersion as string,\n variant: action.variant,\n identifier: action.identifier,\n }\n\n const actionContext = { ...context }\n if (formData) {\n actionContext.formData = formData\n }\n\n let response = null\n\n try {\n response = await executeAction({ actionContext, ...params }).unwrap()\n } catch (error: any) {\n console.error('Error executing action', error)\n toast.error(error?.data?.detail || 'Error executing action')\n return\n }\n\n try {\n // Toast the message if it is available\n if (response?.message) {\n if (response?.success) {\n toast.success(response.message, { autoClose: 2000 })\n } else {\n toast.error(response.message, { autoClose: 2000 })\n }\n }\n\n // Even if response?.success is false, we still want to handle the payload\n // as it may contain useful information - complex error messages in form,\n // redirect to another page etc. If the action just needs to abort,\n // it raises exception instead of returning a response with success: false\n\n // Use the new hook to handle payload\n if (response?.payload) {\n if (response.type === 'form') {\n // action requests additional information from the user.\n // we show a dialog with the form and when the user submits it we call the action again\n\n // It probably does not make sense to move to the useActionTriggers hook\n // as it need contexts and the dialog\n const intf = {\n identifier,\n // @ts-expect-error\n title: response.payload['title'],\n // @ts-expect-error\n fields: response.payload['fields'],\n // @ts-expect-error\n submitLabel: response.payload['submit_label'],\n // @ts-expect-error\n cancelLabel: response.payload['cancel_label'],\n // @ts-expect-error\n submitIcon: response.payload['submit_icon'],\n // @ts-expect-error\n cancelIcon: response.payload['cancel_icon'],\n }\n setInteractiveForm(intf)\n } else {\n handleActionPayload(response.type as string, response.payload)\n }\n }\n } catch (error) {\n // got response, but failed to process it\n console.warn('Error during action response processing', error)\n toast.error('Error occured during action processing')\n }\n }\n\n const handleConfigureAction = (identifier: string) => {\n const action = actions.find((data) => data.identifier === identifier)\n if (!action) return\n setActionBeingConfigured(action)\n }\n\n const handleSubmitInteractiveForm = async (identifier: string, formData: InteractiveForm) => {\n handleExecuteAction(identifier, null, formData)\n }\n\n const loadingActions = useMemo(\n () => Array(featuredCount).fill(placeholder),\n [featuredCount, placeholder],\n )\n\n const isLoading = isFetchingActions || isLoadingEntity\n const featuredActionsToDisplay = isLoading ? loadingActions : featuredActions\n\n return (\n <Styled.Actions className=\"actions\">\n {featuredActionsToDisplay.map((action, i) => (\n <Styled.FeaturedAction\n key={action.identifier + '-' + i}\n className={clsx('action', {\n loading: isLoading,\n isPlaceholder: action.isPlaceholder,\n })}\n data-tooltip={action.groupLabel ? action.groupLabel + ' ' + action.label : action.label}\n disabled={action.isPlaceholder}\n onClick={(e) => handleExecuteAction(action.identifier, e)}\n >\n {/* @ts-ignore */}\n <ActionIcon icon={action.icon} isExecuting={executingAction === action.identifier} />\n </Styled.FeaturedAction>\n ))}\n <ActionsDropdown\n options={dropdownOptions}\n isLoading={isLoading && featuredCount > 0}\n onAction={handleExecuteAction}\n onConfig={handleConfigureAction}\n isDeveloperMode={isDeveloperMode}\n align={align}\n {...pt?.dropdown}\n />\n <ActionConfigDialog\n action={actionBeingConfigured}\n // @ts-expect-error\n context={context}\n onClose={() => setActionBeingConfigured(null)}\n />\n <InteractiveActionDialog\n interactiveForm={interactiveForm}\n onClose={() => setInteractiveForm(null)}\n // @ts-expect-error\n onSubmit={handleSubmitInteractiveForm}\n />\n </Styled.Actions>\n )\n}\n"],"names":["useActionTriggers","useState","useMemo","useEffect","useGetActionsFromContextQuery","actions","useExecuteActionMutation","toast","data","jsxs","Styled.Actions","jsx","Styled.FeaturedAction","ActionsDropdown","ActionConfigDialog","InteractiveActionDialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,eAAe;AAAA,EACf,MAAM,EAAE,MAAM,oBAAoB,MAAM,OAAO;AAAA,EAC/C,YAAY;AACd;AAgBO,MAAM,UAAU,CAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EAC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AAA,IACAF,2BAAA,kBAAA;AAAA,MAACG,mBAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QAER;AAAA,QACA,SAAS,MAAM,yBAAyB,IAAI;AAAA,MAAA;AAAA,IAC9C;AAAA,IACAH,2BAAA,kBAAA;AAAA,MAACI,wBAAA;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAS,MAAM,mBAAmB,IAAI;AAAA,QAEtC,UAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;;"}
@@ -50,6 +50,7 @@ import "../../api/queries/addons/updateAddons.es.js";
50
50
  import "../../api/queries/attributes/getAttributes.es.js";
51
51
  import "../../api/queries/attributes/updateAttributes.es.js";
52
52
  import "../../api/queries/authentication/getAuthentication.es.js";
53
+ import "../../api/queries/cloud/cloud.es.js";
53
54
  import "../../api/queries/entities/getEntity.es.js";
54
55
  import "../../api/queries/entities/getEntityPanel.es.js";
55
56
  import "../../api/queries/entities/updateEntity.es.js";
@@ -58,24 +59,24 @@ import "../../api/queries/entityLists/updateLists.es.js";
58
59
  import "../../api/queries/entityLists/getListsAttributes.es.js";
59
60
  import "../../api/queries/entityLists/updateListsAttributes.es.js";
60
61
  import "../../api/queries/folders/getFolders.es.js";
62
+ import "../../api/queries/grouping/getGrouping.es.js";
61
63
  import "../../api/queries/overview/getOverview.es.js";
62
64
  import "../../api/queries/overview/updateOverview.es.js";
65
+ import "../../api/queries/permissions/getPermissions.es.js";
66
+ import "../../api/queries/products/createProduct.es.js";
63
67
  import "../../api/queries/project/getProject.es.js";
64
68
  import "../../api/queries/project/updateProject.es.js";
65
69
  import "../../api/queries/review/getReview.es.js";
66
70
  import "../../api/queries/review/updateReview.es.js";
71
+ import "../../api/queries/share/share.es.js";
67
72
  import "../../api/queries/system/getSystem.es.js";
68
73
  import "../../api/queries/userDashboard/getUserDashboard.es.js";
69
74
  import "../../api/queries/users/getUsers.es.js";
70
75
  import "../../api/queries/users/updateUsers.es.js";
71
- import "../../api/queries/watchers/getWatchers.es.js";
72
- import "../../api/queries/permissions/getPermissions.es.js";
73
- import "../../api/queries/grouping/getGrouping.es.js";
74
76
  import "../../api/queries/versions/updateVersions.es.js";
75
- import "../../api/queries/products/createProduct.es.js";
76
- import "../../api/queries/cloud/cloud.es.js";
77
77
  import "../../api/queries/views/getViews.es.js";
78
78
  import "../../api/queries/views/updateViews.es.js";
79
+ import "../../api/queries/watchers/getWatchers.es.js";
79
80
  import { ActionsDropdown } from "./ActionsDropdown/ActionsDropdown.es.js";
80
81
  import ActionIcon from "./ActionIcon.es.js";
81
82
  import "../../context/RemoteModulesContext.es.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.es.js","sources":["../../../../../src/containers/Actions/Actions.tsx"],"sourcesContent":["import * as Styled from './Actions.styled'\nimport { MouseEvent, useState } from 'react'\nimport clsx from 'clsx'\nimport { toast } from 'react-toastify'\nimport { useMemo, useEffect } from 'react'\nimport { ActionContext, useExecuteActionMutation, useGetActionsFromContextQuery } from '@shared/api'\nimport { ActionsDropdown, ActionsDropdownProps } from './ActionsDropdown'\nimport ActionIcon from './ActionIcon'\nimport { ActionTriggersProps, useActionTriggers } from '@shared/hooks'\nimport { ActionConfigDialog } from './ActionConfigDialog'\nimport { InteractiveActionDialog, InteractiveForm } from './InteractiveActionDialog'\n\nconst placeholder = {\n identifier: 'placeholder',\n label: 'Featured action slot',\n isPlaceholder: true,\n icon: { type: 'material-symbols', name: 'sync' },\n groupLabel: '',\n}\n\ninterface ActionsProps extends ActionTriggersProps {\n entities: { id: string; projectName: string; entitySubType?: string }[]\n entityType: ActionContext['entityType']\n entitySubTypes?: string[]\n isLoadingEntity: boolean\n projectActionsProjectName?: string\n featuredCount?: number\n isDeveloperMode: boolean\n align?: ActionsDropdownProps['align']\n pt?: {\n dropdown?: Partial<ActionsDropdownProps>\n }\n}\n\nexport const Actions = ({\n entities,\n entityType,\n entitySubTypes,\n isLoadingEntity,\n projectActionsProjectName,\n searchParams,\n featuredCount = 2,\n isDeveloperMode,\n onNavigate,\n onSetSearchParams,\n align,\n pt,\n}: ActionsProps) => {\n // special triggers the actions can make to perform stuff on the client\n const { handleActionPayload } = useActionTriggers({ onNavigate, onSetSearchParams, searchParams })\n const [actionBeingConfigured, setActionBeingConfigured] = useState<any>(null)\n const [interactiveForm, setInteractiveForm] = useState<any>(null)\n\n const context: ActionContext | null = useMemo(() => {\n if (projectActionsProjectName) {\n return {\n entityType: 'project',\n projectName: projectActionsProjectName,\n }\n }\n if (!entities.length) return null\n if (!entities[0].projectName) return null\n\n // get a list of unique entity subtypes from loaded data\n const entitySubtypesLoaded = entities\n .filter((entity) => entity.entitySubType)\n .map((entity) => entity.entitySubType as string)\n .filter((value, index, self) => self.indexOf(value) === index && value)\n\n // try and use the passed in entitySubTypes, if not use the loaded ones\n const entitySubTypesToUse = entitySubTypes?.length ? entitySubTypes : entitySubtypesLoaded\n\n // all types except version/representation should have subtypes\n if (\n !entitySubTypesToUse?.length &&\n entityType !== 'version' &&\n entityType !== 'representation'\n ) {\n console.warn('No entity subtypes found')\n return null\n }\n\n return {\n projectName: entities[0].projectName,\n entityType: entityType,\n entityIds: entities.map((entity) => entity.id),\n entitySubtypes: entitySubTypesToUse,\n }\n }, [entities, entityType])\n\n useEffect(() => {\n setInteractiveForm(null)\n }, [context])\n\n const { data, isFetching: isFetchingActions } = useGetActionsFromContextQuery(\n { mode: 'simple', actionContext: context as ActionContext },\n { skip: !context },\n )\n\n const actions = data?.actions || []\n\n const categoryOrder = ['application', 'admin', 'workflow']\n // group actions by category\n // sort by hardcoded category, this will changing the future\n const groupedActions = useMemo(() => {\n // Step 1: Group actions by category\n const grouped = actions.reduce((acc: { [key: string]: any[] }, action) => {\n const category = action.category || 'uncategorized'\n if (!acc[category]) {\n acc[category] = []\n }\n acc[category].push(action)\n return acc\n }, {})\n\n // Step 5: Return the ordered groups\n return grouped\n }, [actions])\n\n // get categories that don't have a specific order (not in categoryOrder)\n // then sort them alphabetically\n const unorderedCategories = useMemo(\n () => [\n ...new Set(\n Object.keys(groupedActions)\n .filter((category) => !categoryOrder.includes(category))\n .sort((a, b) => a.localeCompare(b)),\n ),\n ],\n [groupedActions],\n )\n\n const categories = [...categoryOrder, ...unorderedCategories]\n\n // create the options for the dropdown, each category is separated by a divider and a title\n // for the divider we will use a custom dropdown item template\n const dropdownOptions = useMemo(() => {\n const options = []\n\n categories.forEach((category) => {\n if (!groupedActions[category] || !groupedActions[category].length) return\n\n options.push({\n label: category,\n header: true,\n value: category,\n disabled: true,\n })\n\n const groupOptions = groupedActions[category].map((action) => ({\n value: action.identifier,\n label: action.groupLabel ? action.groupLabel + ' ' + action.label : action.label,\n icon: action.icon,\n hasConfig: !!action.configFields,\n }))\n\n options.push(...groupOptions)\n })\n\n // if no actions, add placeholder\n if (!options.length) {\n options.push({\n label: 'No actions available',\n value: 'no-actions',\n disabled: true,\n header: true,\n })\n }\n\n return options\n }, [groupedActions, unorderedCategories, categoryOrder])\n\n const featuredActions = useMemo(() => {\n // Filter and sort to get initial featured actions\n let tempFeaturedActions = actions\n .filter((action) => action.featured)\n .sort((a, b) => (a.order || 0) - (b.order || 0))\n .slice(0, featuredCount)\n\n // Check if we need to add more actions to reach featuredCount\n if (tempFeaturedActions.length < featuredCount) {\n categories.forEach((category) => {\n if (tempFeaturedActions.length >= featuredCount) return\n const actions = groupedActions[category]\n if (!actions || !actions.length) return\n\n for (let i = tempFeaturedActions.length; i < featuredCount; i++) {\n const action = actions[i]\n if (!action) break\n if (!action.icon) continue\n tempFeaturedActions.push(action)\n }\n })\n }\n\n return tempFeaturedActions\n }, [actions, groupedActions, placeholder])\n\n const [executeAction, { isLoading: isLoadingExecution, originalArgs }] =\n useExecuteActionMutation()\n const executingAction = isLoadingExecution && originalArgs?.identifier\n\n const handleExecuteAction = async (\n identifier: string,\n e?: MouseEvent<HTMLElement> | null,\n formData?: InteractiveForm,\n ) => {\n e?.preventDefault()\n const action = actions.find((option) => option.identifier === identifier)\n\n if (!action) {\n toast.error('Action not found')\n console.warn('Action not found', identifier)\n return\n }\n\n const params = {\n addonName: action.addonName as string,\n addonVersion: action.addonVersion as string,\n variant: action.variant,\n identifier: action.identifier,\n }\n\n const actionContext = { ...context }\n if (formData) {\n actionContext.formData = formData\n }\n\n let response = null\n\n try {\n response = await executeAction({ actionContext, ...params }).unwrap()\n } catch (error: any) {\n console.error('Error executing action', error)\n toast.error(error?.data?.detail || 'Error executing action')\n return\n }\n\n try {\n // Toast the message if it is available\n if (response?.message) {\n if (response?.success) {\n toast.success(response.message, { autoClose: 2000 })\n } else {\n toast.error(response.message, { autoClose: 2000 })\n }\n }\n\n // Even if response?.success is false, we still want to handle the payload\n // as it may contain useful information - complex error messages in form,\n // redirect to another page etc. If the action just needs to abort,\n // it raises exception instead of returning a response with success: false\n\n // Use the new hook to handle payload\n if (response?.payload) {\n if (response.type === 'form') {\n // action requests additional information from the user.\n // we show a dialog with the form and when the user submits it we call the action again\n\n // It probably does not make sense to move to the useActionTriggers hook\n // as it need contexts and the dialog\n const intf = {\n identifier,\n // @ts-expect-error\n title: response.payload['title'],\n // @ts-expect-error\n fields: response.payload['fields'],\n // @ts-expect-error\n submitLabel: response.payload['submit_label'],\n // @ts-expect-error\n cancelLabel: response.payload['cancel_label'],\n // @ts-expect-error\n submitIcon: response.payload['submit_icon'],\n // @ts-expect-error\n cancelIcon: response.payload['cancel_icon'],\n }\n setInteractiveForm(intf)\n } else {\n handleActionPayload(response.type as string, response.payload)\n }\n }\n } catch (error) {\n // got response, but failed to process it\n console.warn('Error during action response processing', error)\n toast.error('Error occured during action processing')\n }\n }\n\n const handleConfigureAction = (identifier: string) => {\n const action = actions.find((data) => data.identifier === identifier)\n if (!action) return\n setActionBeingConfigured(action)\n }\n\n const handleSubmitInteractiveForm = async (identifier: string, formData: InteractiveForm) => {\n handleExecuteAction(identifier, null, formData)\n }\n\n const loadingActions = useMemo(\n () => Array(featuredCount).fill(placeholder),\n [featuredCount, placeholder],\n )\n\n const isLoading = isFetchingActions || isLoadingEntity\n const featuredActionsToDisplay = isLoading ? loadingActions : featuredActions\n\n return (\n <Styled.Actions className=\"actions\">\n {featuredActionsToDisplay.map((action, i) => (\n <Styled.FeaturedAction\n key={action.identifier + '-' + i}\n className={clsx('action', {\n loading: isLoading,\n isPlaceholder: action.isPlaceholder,\n })}\n data-tooltip={action.groupLabel ? action.groupLabel + ' ' + action.label : action.label}\n disabled={action.isPlaceholder}\n onClick={(e) => handleExecuteAction(action.identifier, e)}\n >\n {/* @ts-ignore */}\n <ActionIcon icon={action.icon} isExecuting={executingAction === action.identifier} />\n </Styled.FeaturedAction>\n ))}\n <ActionsDropdown\n options={dropdownOptions}\n isLoading={isLoading && featuredCount > 0}\n onAction={handleExecuteAction}\n onConfig={handleConfigureAction}\n isDeveloperMode={isDeveloperMode}\n align={align}\n {...pt?.dropdown}\n />\n <ActionConfigDialog\n action={actionBeingConfigured}\n // @ts-expect-error\n context={context}\n onClose={() => setActionBeingConfigured(null)}\n />\n <InteractiveActionDialog\n interactiveForm={interactiveForm}\n onClose={() => setInteractiveForm(null)}\n // @ts-expect-error\n onSubmit={handleSubmitInteractiveForm}\n />\n </Styled.Actions>\n )\n}\n"],"names":["actions","data","jsxs","Styled.Actions","jsx","Styled.FeaturedAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,eAAe;AAAA,EACf,MAAM,EAAE,MAAM,oBAAoB,MAAM,OAAO;AAAA,EAC/C,YAAY;AACd;AAgBO,MAAM,UAAU,CAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAoB;AAEZ,QAAA,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"version":3,"file":"Actions.es.js","sources":["../../../../../src/containers/Actions/Actions.tsx"],"sourcesContent":["import * as Styled from './Actions.styled'\nimport { MouseEvent, useState } from 'react'\nimport clsx from 'clsx'\nimport { toast } from 'react-toastify'\nimport { useMemo, useEffect } from 'react'\nimport { ActionContext, useExecuteActionMutation, useGetActionsFromContextQuery } from '@shared/api'\nimport { ActionsDropdown, ActionsDropdownProps } from './ActionsDropdown'\nimport ActionIcon from './ActionIcon'\nimport { ActionTriggersProps, useActionTriggers } from '@shared/hooks'\nimport { ActionConfigDialog } from './ActionConfigDialog'\nimport { InteractiveActionDialog, InteractiveForm } from './InteractiveActionDialog'\n\nconst placeholder = {\n identifier: 'placeholder',\n label: 'Featured action slot',\n isPlaceholder: true,\n icon: { type: 'material-symbols', name: 'sync' },\n groupLabel: '',\n}\n\ninterface ActionsProps extends ActionTriggersProps {\n entities: { id: string; projectName: string; entitySubType?: string }[]\n entityType: ActionContext['entityType']\n entitySubTypes?: string[]\n isLoadingEntity: boolean\n projectActionsProjectName?: string\n featuredCount?: number\n isDeveloperMode: boolean\n align?: ActionsDropdownProps['align']\n pt?: {\n dropdown?: Partial<ActionsDropdownProps>\n }\n}\n\nexport const Actions = ({\n entities,\n entityType,\n entitySubTypes,\n isLoadingEntity,\n projectActionsProjectName,\n searchParams,\n featuredCount = 2,\n isDeveloperMode,\n onNavigate,\n onSetSearchParams,\n align,\n pt,\n}: ActionsProps) => {\n // special triggers the actions can make to perform stuff on the client\n const { handleActionPayload } = useActionTriggers({ onNavigate, onSetSearchParams, searchParams })\n const [actionBeingConfigured, setActionBeingConfigured] = useState<any>(null)\n const [interactiveForm, setInteractiveForm] = useState<any>(null)\n\n const context: ActionContext | null = useMemo(() => {\n if (projectActionsProjectName) {\n return {\n entityType: 'project',\n projectName: projectActionsProjectName,\n }\n }\n if (!entities.length) return null\n if (!entities[0].projectName) return null\n\n // get a list of unique entity subtypes from loaded data\n const entitySubtypesLoaded = entities\n .filter((entity) => entity.entitySubType)\n .map((entity) => entity.entitySubType as string)\n .filter((value, index, self) => self.indexOf(value) === index && value)\n\n // try and use the passed in entitySubTypes, if not use the loaded ones\n const entitySubTypesToUse = entitySubTypes?.length ? entitySubTypes : entitySubtypesLoaded\n\n // all types except version/representation should have subtypes\n if (\n !entitySubTypesToUse?.length &&\n entityType !== 'version' &&\n entityType !== 'representation'\n ) {\n console.warn('No entity subtypes found')\n return null\n }\n\n return {\n projectName: entities[0].projectName,\n entityType: entityType,\n entityIds: entities.map((entity) => entity.id),\n entitySubtypes: entitySubTypesToUse,\n }\n }, [entities, entityType])\n\n useEffect(() => {\n setInteractiveForm(null)\n }, [context])\n\n const { data, isFetching: isFetchingActions } = useGetActionsFromContextQuery(\n { mode: 'simple', actionContext: context as ActionContext },\n { skip: !context },\n )\n\n const actions = data?.actions || []\n\n const categoryOrder = ['application', 'admin', 'workflow']\n // group actions by category\n // sort by hardcoded category, this will changing the future\n const groupedActions = useMemo(() => {\n // Step 1: Group actions by category\n const grouped = actions.reduce((acc: { [key: string]: any[] }, action) => {\n const category = action.category || 'uncategorized'\n if (!acc[category]) {\n acc[category] = []\n }\n acc[category].push(action)\n return acc\n }, {})\n\n // Step 5: Return the ordered groups\n return grouped\n }, [actions])\n\n // get categories that don't have a specific order (not in categoryOrder)\n // then sort them alphabetically\n const unorderedCategories = useMemo(\n () => [\n ...new Set(\n Object.keys(groupedActions)\n .filter((category) => !categoryOrder.includes(category))\n .sort((a, b) => a.localeCompare(b)),\n ),\n ],\n [groupedActions],\n )\n\n const categories = [...categoryOrder, ...unorderedCategories]\n\n // create the options for the dropdown, each category is separated by a divider and a title\n // for the divider we will use a custom dropdown item template\n const dropdownOptions = useMemo(() => {\n const options = []\n\n categories.forEach((category) => {\n if (!groupedActions[category] || !groupedActions[category].length) return\n\n options.push({\n label: category,\n header: true,\n value: category,\n disabled: true,\n })\n\n const groupOptions = groupedActions[category].map((action) => ({\n value: action.identifier,\n label: action.groupLabel ? action.groupLabel + ' ' + action.label : action.label,\n icon: action.icon,\n hasConfig: !!action.configFields,\n }))\n\n options.push(...groupOptions)\n })\n\n // if no actions, add placeholder\n if (!options.length) {\n options.push({\n label: 'No actions available',\n value: 'no-actions',\n disabled: true,\n header: true,\n })\n }\n\n return options\n }, [groupedActions, unorderedCategories, categoryOrder])\n\n const featuredActions = useMemo(() => {\n // Filter and sort to get initial featured actions\n let tempFeaturedActions = actions\n .filter((action) => action.featured)\n .sort((a, b) => (a.order || 0) - (b.order || 0))\n .slice(0, featuredCount)\n\n // Check if we need to add more actions to reach featuredCount\n if (tempFeaturedActions.length < featuredCount) {\n categories.forEach((category) => {\n if (tempFeaturedActions.length >= featuredCount) return\n const actions = groupedActions[category]\n if (!actions || !actions.length) return\n\n for (let i = tempFeaturedActions.length; i < featuredCount; i++) {\n const action = actions[i]\n if (!action) break\n if (!action.icon) continue\n tempFeaturedActions.push(action)\n }\n })\n }\n\n return tempFeaturedActions\n }, [actions, groupedActions, placeholder])\n\n const [executeAction, { isLoading: isLoadingExecution, originalArgs }] =\n useExecuteActionMutation()\n const executingAction = isLoadingExecution && originalArgs?.identifier\n\n const handleExecuteAction = async (\n identifier: string,\n e?: MouseEvent<HTMLElement> | null,\n formData?: InteractiveForm,\n ) => {\n e?.preventDefault()\n const action = actions.find((option) => option.identifier === identifier)\n\n if (!action) {\n toast.error('Action not found')\n console.warn('Action not found', identifier)\n return\n }\n\n const params = {\n addonName: action.addonName as string,\n addonVersion: action.addonVersion as string,\n variant: action.variant,\n identifier: action.identifier,\n }\n\n const actionContext = { ...context }\n if (formData) {\n actionContext.formData = formData\n }\n\n let response = null\n\n try {\n response = await executeAction({ actionContext, ...params }).unwrap()\n } catch (error: any) {\n console.error('Error executing action', error)\n toast.error(error?.data?.detail || 'Error executing action')\n return\n }\n\n try {\n // Toast the message if it is available\n if (response?.message) {\n if (response?.success) {\n toast.success(response.message, { autoClose: 2000 })\n } else {\n toast.error(response.message, { autoClose: 2000 })\n }\n }\n\n // Even if response?.success is false, we still want to handle the payload\n // as it may contain useful information - complex error messages in form,\n // redirect to another page etc. If the action just needs to abort,\n // it raises exception instead of returning a response with success: false\n\n // Use the new hook to handle payload\n if (response?.payload) {\n if (response.type === 'form') {\n // action requests additional information from the user.\n // we show a dialog with the form and when the user submits it we call the action again\n\n // It probably does not make sense to move to the useActionTriggers hook\n // as it need contexts and the dialog\n const intf = {\n identifier,\n // @ts-expect-error\n title: response.payload['title'],\n // @ts-expect-error\n fields: response.payload['fields'],\n // @ts-expect-error\n submitLabel: response.payload['submit_label'],\n // @ts-expect-error\n cancelLabel: response.payload['cancel_label'],\n // @ts-expect-error\n submitIcon: response.payload['submit_icon'],\n // @ts-expect-error\n cancelIcon: response.payload['cancel_icon'],\n }\n setInteractiveForm(intf)\n } else {\n handleActionPayload(response.type as string, response.payload)\n }\n }\n } catch (error) {\n // got response, but failed to process it\n console.warn('Error during action response processing', error)\n toast.error('Error occured during action processing')\n }\n }\n\n const handleConfigureAction = (identifier: string) => {\n const action = actions.find((data) => data.identifier === identifier)\n if (!action) return\n setActionBeingConfigured(action)\n }\n\n const handleSubmitInteractiveForm = async (identifier: string, formData: InteractiveForm) => {\n handleExecuteAction(identifier, null, formData)\n }\n\n const loadingActions = useMemo(\n () => Array(featuredCount).fill(placeholder),\n [featuredCount, placeholder],\n )\n\n const isLoading = isFetchingActions || isLoadingEntity\n const featuredActionsToDisplay = isLoading ? loadingActions : featuredActions\n\n return (\n <Styled.Actions className=\"actions\">\n {featuredActionsToDisplay.map((action, i) => (\n <Styled.FeaturedAction\n key={action.identifier + '-' + i}\n className={clsx('action', {\n loading: isLoading,\n isPlaceholder: action.isPlaceholder,\n })}\n data-tooltip={action.groupLabel ? action.groupLabel + ' ' + action.label : action.label}\n disabled={action.isPlaceholder}\n onClick={(e) => handleExecuteAction(action.identifier, e)}\n >\n {/* @ts-ignore */}\n <ActionIcon icon={action.icon} isExecuting={executingAction === action.identifier} />\n </Styled.FeaturedAction>\n ))}\n <ActionsDropdown\n options={dropdownOptions}\n isLoading={isLoading && featuredCount > 0}\n onAction={handleExecuteAction}\n onConfig={handleConfigureAction}\n isDeveloperMode={isDeveloperMode}\n align={align}\n {...pt?.dropdown}\n />\n <ActionConfigDialog\n action={actionBeingConfigured}\n // @ts-expect-error\n context={context}\n onClose={() => setActionBeingConfigured(null)}\n />\n <InteractiveActionDialog\n interactiveForm={interactiveForm}\n onClose={() => setInteractiveForm(null)}\n // @ts-expect-error\n onSubmit={handleSubmitInteractiveForm}\n />\n </Styled.Actions>\n )\n}\n"],"names":["actions","data","jsxs","Styled.Actions","jsx","Styled.FeaturedAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,eAAe;AAAA,EACf,MAAM,EAAE,MAAM,oBAAoB,MAAM,OAAO;AAAA,EAC/C,YAAY;AACd;AAgBO,MAAM,UAAU,CAAC;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAoB;AAEZ,QAAA,EAAE,wBAAwB,kBAAkB,EAAE,YAAY,mBAAmB,cAAc;AACjG,QAAM,CAAC,uBAAuB,wBAAwB,IAAI,SAAc,IAAI;AAC5E,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAc,IAAI;AAE1D,QAAA,UAAgC,QAAQ,MAAM;AAClD,QAAI,2BAA2B;AACtB,aAAA;AAAA,QACL,YAAY;AAAA,QACZ,aAAa;AAAA,MACf;AAAA,IAAA;AAEE,QAAA,CAAC,SAAS,OAAe,QAAA;AAC7B,QAAI,CAAC,SAAS,CAAC,EAAE,YAAoB,QAAA;AAG/B,UAAA,uBAAuB,SAC1B,OAAO,CAA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Ae,OAAO;AAAA,QAAA,CACvB;AAAA,QACD,gBAAc,OAAO,aAAa,OAAO,aAAa,MAAM,OAAO,QAAQ,OAAO;AAAA,QAClF,UAAU,OAAO;AAAA,QACjB,SAAS,CAAC,MAAM,oBAAoB,OAAO,YAAY,CAAC;AAAA,QAGxD,UAAAD,kCAAA,IAAC,cAAW,MAAM,OAAO,MAAM,aAAa,oBAAoB,OAAO,WAAY,CAAA;AAAA,MAAA;AAAA,MAV9E,OAAO,aAAa,MAAM;AAAA,IAAA,CAYlC;AAAA,IACDA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAW,aAAa,gBAAgB;AAAA,QACxC,UAAU;AAAA,QACV,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACC,GAAG,yBAAI;AAAA,MAAA;AAAA,IACV;AAAA,IACAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QAER;AAAA,QACA,SAAS,MAAM,yBAAyB,IAAI;AAAA,MAAA;AAAA,IAC9C;AAAA,IACAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAS,MAAM,mBAAmB,IAAI;AAAA,QAEtC,UAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;"}
@@ -54,6 +54,7 @@ require("../../api/queries/addons/updateAddons.cjs.js");
54
54
  require("../../api/queries/attributes/getAttributes.cjs.js");
55
55
  require("../../api/queries/attributes/updateAttributes.cjs.js");
56
56
  require("../../api/queries/authentication/getAuthentication.cjs.js");
57
+ require("../../api/queries/cloud/cloud.cjs.js");
57
58
  require("../../api/queries/entities/getEntity.cjs.js");
58
59
  require("../../api/queries/entities/getEntityPanel.cjs.js");
59
60
  require("../../api/queries/entities/updateEntity.cjs.js");
@@ -62,24 +63,24 @@ require("../../api/queries/entityLists/updateLists.cjs.js");
62
63
  require("../../api/queries/entityLists/getListsAttributes.cjs.js");
63
64
  require("../../api/queries/entityLists/updateListsAttributes.cjs.js");
64
65
  require("../../api/queries/folders/getFolders.cjs.js");
66
+ require("../../api/queries/grouping/getGrouping.cjs.js");
65
67
  require("../../api/queries/overview/getOverview.cjs.js");
66
68
  require("../../api/queries/overview/updateOverview.cjs.js");
69
+ require("../../api/queries/permissions/getPermissions.cjs.js");
70
+ require("../../api/queries/products/createProduct.cjs.js");
67
71
  require("../../api/queries/project/getProject.cjs.js");
68
72
  require("../../api/queries/project/updateProject.cjs.js");
69
73
  require("../../api/queries/review/getReview.cjs.js");
70
74
  require("../../api/queries/review/updateReview.cjs.js");
75
+ require("../../api/queries/share/share.cjs.js");
71
76
  require("../../api/queries/system/getSystem.cjs.js");
72
77
  require("../../api/queries/userDashboard/getUserDashboard.cjs.js");
73
78
  require("../../api/queries/users/getUsers.cjs.js");
74
79
  require("../../api/queries/users/updateUsers.cjs.js");
75
- require("../../api/queries/watchers/getWatchers.cjs.js");
76
- require("../../api/queries/permissions/getPermissions.cjs.js");
77
- require("../../api/queries/grouping/getGrouping.cjs.js");
78
80
  require("../../api/queries/versions/updateVersions.cjs.js");
79
- require("../../api/queries/products/createProduct.cjs.js");
80
- require("../../api/queries/cloud/cloud.cjs.js");
81
81
  require("../../api/queries/views/getViews.cjs.js");
82
82
  require("../../api/queries/views/updateViews.cjs.js");
83
+ require("../../api/queries/watchers/getWatchers.cjs.js");
83
84
  require("react");
84
85
  require("@dnd-kit/core");
85
86
  require("@dnd-kit/sortable");
@@ -171,6 +172,10 @@ require("../DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.styled.cjs.js
171
172
  require("./Actions.styled.cjs.js");
172
173
  require("./ActionsDropdown/ActionsDropdown.cjs.js");
173
174
  require("./ActionIcon.cjs.js");
175
+ require("../Views/context/ViewsContext.cjs.js");
176
+ require("../Views/Views.styled.cjs.js");
177
+ require("../Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js");
178
+ require("../Views/ViewsMenu/ViewsMenu.cjs.js");
174
179
  require("../../components/EntityPanelUploader/EntityPanelUploader.styled.cjs.js");
175
180
  const SimpleFormDialog = require("../../components/SimpleFormDialog/SimpleFormDialog.cjs.js");
176
181
  require("../../components/EntityPath/EntityPath.styled.cjs.js");
@@ -192,9 +197,6 @@ require("../../components/VersionUploader/components/UploadVersionDialog.cjs.js"
192
197
  require("../../components/VersionUploader/context/VersionUploadContext.cjs.js");
193
198
  require("../../components/Feedback/FeedbackContext.cjs.js");
194
199
  require("../../components/Feedback/SupportBubble.cjs.js");
195
- require("../../components/Views/context/ViewsContext.cjs.js");
196
- require("../../components/Views/Views.styled.cjs.js");
197
- require("../../components/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js");
198
200
  const InteractiveActionDialog = ({
199
201
  interactiveForm,
200
202
  onClose,
@@ -1 +1 @@
1
- {"version":3,"file":"InteractiveActionDialog.cjs.js","sources":["../../../../../src/containers/Actions/InteractiveActionDialog.tsx"],"sourcesContent":["import { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormField } from '@shared/api'\n\nexport interface InteractiveForm {\n identifier: string\n title: string\n fields: SimpleFormField[]\n submitLabel?: string\n cancelLabel?: string\n submitIcon?: string\n cancelIcon?: string\n}\n\nexport interface InteractiveActionDialogProps {\n interactiveForm: InteractiveForm | null\n onClose: () => void\n onSubmit: (identifier: string, formData: Record<string, any>) => void\n}\n\nexport const InteractiveActionDialog = ({\n interactiveForm,\n onClose,\n onSubmit,\n}: InteractiveActionDialogProps) => {\n if (!interactiveForm) return null\n\n const handleSubmit = (formData: Record<string, any>) => {\n onSubmit(interactiveForm.identifier, formData)\n onClose()\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`${interactiveForm.title}`}\n fields={interactiveForm.fields}\n submitLabel={interactiveForm.submitLabel}\n cancelLabel={interactiveForm.cancelLabel}\n submitIcon={interactiveForm.submitIcon}\n cancelIcon={interactiveForm.cancelIcon}\n onClose={onClose}\n onSubmit={handleSubmit}\n />\n )\n}\n"],"names":["jsx","SimpleFormDialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,0BAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AACF,MAAoC;AAC9B,MAAA,CAAC,gBAAwB,QAAA;AAEvB,QAAA,eAAe,CAAC,aAAkC;AAC7C,aAAA,gBAAgB,YAAY,QAAQ;AACrC,YAAA;AAAA,EACV;AAGE,SAAAA,2BAAA,kBAAA;AAAA,IAACC,iBAAA;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,OAAO,GAAG,gBAAgB,KAAK;AAAA,MAC/B,QAAQ,gBAAgB;AAAA,MACxB,aAAa,gBAAgB;AAAA,MAC7B,aAAa,gBAAgB;AAAA,MAC7B,YAAY,gBAAgB;AAAA,MAC5B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;;"}
1
+ {"version":3,"file":"InteractiveActionDialog.cjs.js","sources":["../../../../../src/containers/Actions/InteractiveActionDialog.tsx"],"sourcesContent":["import { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormField } from '@shared/api'\n\nexport interface InteractiveForm {\n identifier: string\n title: string\n fields: SimpleFormField[]\n submitLabel?: string\n cancelLabel?: string\n submitIcon?: string\n cancelIcon?: string\n}\n\nexport interface InteractiveActionDialogProps {\n interactiveForm: InteractiveForm | null\n onClose: () => void\n onSubmit: (identifier: string, formData: Record<string, any>) => void\n}\n\nexport const InteractiveActionDialog = ({\n interactiveForm,\n onClose,\n onSubmit,\n}: InteractiveActionDialogProps) => {\n if (!interactiveForm) return null\n\n const handleSubmit = (formData: Record<string, any>) => {\n onSubmit(interactiveForm.identifier, formData)\n onClose()\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`${interactiveForm.title}`}\n fields={interactiveForm.fields}\n submitLabel={interactiveForm.submitLabel}\n cancelLabel={interactiveForm.cancelLabel}\n submitIcon={interactiveForm.submitIcon}\n cancelIcon={interactiveForm.cancelIcon}\n onClose={onClose}\n onSubmit={handleSubmit}\n />\n )\n}\n"],"names":["jsx","SimpleFormDialog"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,0BAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AACF,MAAoC;AAC9B,MAAA,CAAC,gBAAwB,QAAA;AAEvB,QAAA,eAAe,CAAC,aAAkC;AAC7C,aAAA,gBAAgB,YAAY,QAAQ;AACrC,YAAA;AAAA,EACV;AAGE,SAAAA,2BAAA,kBAAA;AAAA,IAACC,iBAAA;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,OAAO,GAAG,gBAAgB,KAAK;AAAA,MAC/B,QAAQ,gBAAgB;AAAA,MACxB,aAAa,gBAAgB;AAAA,MAC7B,aAAa,gBAAgB;AAAA,MAC7B,YAAY,gBAAgB;AAAA,MAC5B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;;"}
@@ -52,6 +52,7 @@ import "../../api/queries/addons/updateAddons.es.js";
52
52
  import "../../api/queries/attributes/getAttributes.es.js";
53
53
  import "../../api/queries/attributes/updateAttributes.es.js";
54
54
  import "../../api/queries/authentication/getAuthentication.es.js";
55
+ import "../../api/queries/cloud/cloud.es.js";
55
56
  import "../../api/queries/entities/getEntity.es.js";
56
57
  import "../../api/queries/entities/getEntityPanel.es.js";
57
58
  import "../../api/queries/entities/updateEntity.es.js";
@@ -60,24 +61,24 @@ import "../../api/queries/entityLists/updateLists.es.js";
60
61
  import "../../api/queries/entityLists/getListsAttributes.es.js";
61
62
  import "../../api/queries/entityLists/updateListsAttributes.es.js";
62
63
  import "../../api/queries/folders/getFolders.es.js";
64
+ import "../../api/queries/grouping/getGrouping.es.js";
63
65
  import "../../api/queries/overview/getOverview.es.js";
64
66
  import "../../api/queries/overview/updateOverview.es.js";
67
+ import "../../api/queries/permissions/getPermissions.es.js";
68
+ import "../../api/queries/products/createProduct.es.js";
65
69
  import "../../api/queries/project/getProject.es.js";
66
70
  import "../../api/queries/project/updateProject.es.js";
67
71
  import "../../api/queries/review/getReview.es.js";
68
72
  import "../../api/queries/review/updateReview.es.js";
73
+ import "../../api/queries/share/share.es.js";
69
74
  import "../../api/queries/system/getSystem.es.js";
70
75
  import "../../api/queries/userDashboard/getUserDashboard.es.js";
71
76
  import "../../api/queries/users/getUsers.es.js";
72
77
  import "../../api/queries/users/updateUsers.es.js";
73
- import "../../api/queries/watchers/getWatchers.es.js";
74
- import "../../api/queries/permissions/getPermissions.es.js";
75
- import "../../api/queries/grouping/getGrouping.es.js";
76
78
  import "../../api/queries/versions/updateVersions.es.js";
77
- import "../../api/queries/products/createProduct.es.js";
78
- import "../../api/queries/cloud/cloud.es.js";
79
79
  import "../../api/queries/views/getViews.es.js";
80
80
  import "../../api/queries/views/updateViews.es.js";
81
+ import "../../api/queries/watchers/getWatchers.es.js";
81
82
  import "react";
82
83
  import "@dnd-kit/core";
83
84
  import "@dnd-kit/sortable";
@@ -169,6 +170,10 @@ import "../DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.styled.es.js";
169
170
  import "./Actions.styled.es.js";
170
171
  import "./ActionsDropdown/ActionsDropdown.es.js";
171
172
  import "./ActionIcon.es.js";
173
+ import "../Views/context/ViewsContext.es.js";
174
+ import "../Views/Views.styled.es.js";
175
+ import "../Views/ViewsMenuContainer/ViewsMenuContainer.es.js";
176
+ import "../Views/ViewsMenu/ViewsMenu.es.js";
172
177
  import "../../components/EntityPanelUploader/EntityPanelUploader.styled.es.js";
173
178
  import { SimpleFormDialog } from "../../components/SimpleFormDialog/SimpleFormDialog.es.js";
174
179
  import "../../components/EntityPath/EntityPath.styled.es.js";
@@ -190,9 +195,6 @@ import "../../components/VersionUploader/components/UploadVersionDialog.es.js";
190
195
  import "../../components/VersionUploader/context/VersionUploadContext.es.js";
191
196
  import "../../components/Feedback/FeedbackContext.es.js";
192
197
  import "../../components/Feedback/SupportBubble.es.js";
193
- import "../../components/Views/context/ViewsContext.es.js";
194
- import "../../components/Views/Views.styled.es.js";
195
- import "../../components/Views/ViewsMenuContainer/ViewsMenuContainer.es.js";
196
198
  const InteractiveActionDialog = ({
197
199
  interactiveForm,
198
200
  onClose,
@@ -1 +1 @@
1
- {"version":3,"file":"InteractiveActionDialog.es.js","sources":["../../../../../src/containers/Actions/InteractiveActionDialog.tsx"],"sourcesContent":["import { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormField } from '@shared/api'\n\nexport interface InteractiveForm {\n identifier: string\n title: string\n fields: SimpleFormField[]\n submitLabel?: string\n cancelLabel?: string\n submitIcon?: string\n cancelIcon?: string\n}\n\nexport interface InteractiveActionDialogProps {\n interactiveForm: InteractiveForm | null\n onClose: () => void\n onSubmit: (identifier: string, formData: Record<string, any>) => void\n}\n\nexport const InteractiveActionDialog = ({\n interactiveForm,\n onClose,\n onSubmit,\n}: InteractiveActionDialogProps) => {\n if (!interactiveForm) return null\n\n const handleSubmit = (formData: Record<string, any>) => {\n onSubmit(interactiveForm.identifier, formData)\n onClose()\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`${interactiveForm.title}`}\n fields={interactiveForm.fields}\n submitLabel={interactiveForm.submitLabel}\n cancelLabel={interactiveForm.cancelLabel}\n submitIcon={interactiveForm.submitIcon}\n cancelIcon={interactiveForm.cancelIcon}\n onClose={onClose}\n onSubmit={handleSubmit}\n />\n )\n}\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,0BAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AACF,MAAoC;AAC9B,MAAA,CAAC,gBAAwB,QAAA;AAEvB,QAAA,eAAe,CAAC,aAAkC;AAC7C,aAAA,gBAAgB,YAAY,QAAQ;AACrC,YAAA;AAAA,EACV;AAGE,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,OAAO,GAAG,gBAAgB,KAAK;AAAA,MAC/B,QAAQ,gBAAgB;AAAA,MACxB,aAAa,gBAAgB;AAAA,MAC7B,aAAa,gBAAgB;AAAA,MAC7B,YAAY,gBAAgB;AAAA,MAC5B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;"}
1
+ {"version":3,"file":"InteractiveActionDialog.es.js","sources":["../../../../../src/containers/Actions/InteractiveActionDialog.tsx"],"sourcesContent":["import { SimpleFormDialog } from '@shared/components'\nimport type { SimpleFormField } from '@shared/api'\n\nexport interface InteractiveForm {\n identifier: string\n title: string\n fields: SimpleFormField[]\n submitLabel?: string\n cancelLabel?: string\n submitIcon?: string\n cancelIcon?: string\n}\n\nexport interface InteractiveActionDialogProps {\n interactiveForm: InteractiveForm | null\n onClose: () => void\n onSubmit: (identifier: string, formData: Record<string, any>) => void\n}\n\nexport const InteractiveActionDialog = ({\n interactiveForm,\n onClose,\n onSubmit,\n}: InteractiveActionDialogProps) => {\n if (!interactiveForm) return null\n\n const handleSubmit = (formData: Record<string, any>) => {\n onSubmit(interactiveForm.identifier, formData)\n onClose()\n }\n\n return (\n <SimpleFormDialog\n isOpen\n title={`${interactiveForm.title}`}\n fields={interactiveForm.fields}\n submitLabel={interactiveForm.submitLabel}\n cancelLabel={interactiveForm.cancelLabel}\n submitIcon={interactiveForm.submitIcon}\n cancelIcon={interactiveForm.cancelIcon}\n onClose={onClose}\n onSubmit={handleSubmit}\n />\n )\n}\n"],"names":["jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,MAAM,0BAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AACF,MAAoC;AAC9B,MAAA,CAAC,gBAAwB,QAAA;AAEvB,QAAA,eAAe,CAAC,aAAkC;AAC7C,aAAA,gBAAgB,YAAY,QAAQ;AACrC,YAAA;AAAA,EACV;AAGE,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,OAAO,GAAG,gBAAgB,KAAK;AAAA,MAC/B,QAAQ,gBAAgB;AAAA,MACxB,aAAa,gBAAgB;AAAA,MAC7B,aAAa,gBAAgB;AAAA,MAC7B,YAAY,gBAAgB;AAAA,MAC5B,YAAY,gBAAgB;AAAA,MAC5B;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;"}