@ynput/ayon-frontend-shared 0.3.31 → 0.3.32

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 (877) hide show
  1. package/dist/DetailsPanel.cjs.js +1 -1
  2. package/dist/DetailsPanel.es.js +24 -22
  3. package/dist/DetailsPanel.es.js.map +1 -1
  4. package/dist/ProjectTreeTable.cjs.js +1 -1
  5. package/dist/ProjectTreeTable.es.js +213 -197
  6. package/dist/ProjectTreeTable.es.js.map +1 -1
  7. package/dist/Slicer.cjs.js +1 -1
  8. package/dist/Slicer.es.js +19 -18
  9. package/dist/Slicer.es.js.map +1 -1
  10. package/dist/_virtual/index.cjs22.js +1 -1
  11. package/dist/_virtual/index.cjs23.js +1 -1
  12. package/dist/_virtual/index.cjs24.js +1 -1
  13. package/dist/_virtual/index.cjs4.js +1 -1
  14. package/dist/_virtual/index.cjs5.js +1 -1
  15. package/dist/_virtual/index.cjs6.js +1 -1
  16. package/dist/_virtual/index.cjs8.js +1 -1
  17. package/dist/_virtual/index.es19.js +2 -2
  18. package/dist/_virtual/index.es20.js +2 -2
  19. package/dist/_virtual/index.es22.js +3 -3
  20. package/dist/_virtual/index.es23.js +5 -5
  21. package/dist/_virtual/index.es24.js +5 -5
  22. package/dist/_virtual/index.es4.js +2 -5
  23. package/dist/_virtual/index.es4.js.map +1 -1
  24. package/dist/_virtual/index.es5.js +5 -2
  25. package/dist/_virtual/index.es5.js.map +1 -1
  26. package/dist/_virtual/index.es6.js +2 -2
  27. package/dist/_virtual/index.es8.js +2 -2
  28. package/dist/api.cjs.js +1 -1
  29. package/dist/api.es.js +453 -434
  30. package/dist/api.es.js.map +1 -1
  31. package/dist/index.cjs.js +1 -1
  32. package/dist/index.es.js +11 -9
  33. package/dist/index.es.js.map +1 -1
  34. package/dist/node_modules/match-sorter/dist/match-sorter.esm.cjs.js +1 -1
  35. package/dist/node_modules/match-sorter/dist/match-sorter.esm.es.js +1 -1
  36. package/dist/node_modules/parse-numeric-range/index.cjs.js +1 -1
  37. package/dist/node_modules/parse-numeric-range/index.es.js +1 -1
  38. package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js +1 -1
  39. package/dist/node_modules/rehype/node_modules/unified/lib/index.es.js +2 -2
  40. package/dist/node_modules/rehype/node_modules/vfile/lib/index.cjs.js +1 -1
  41. package/dist/node_modules/rehype/node_modules/vfile/lib/index.es.js +1 -1
  42. package/dist/node_modules/rehype-parse/lib/index.cjs.js +1 -1
  43. package/dist/node_modules/rehype-parse/lib/index.es.js +1 -1
  44. package/dist/node_modules/remove-accents/index.cjs.js +1 -1
  45. package/dist/node_modules/remove-accents/index.es.js +1 -1
  46. package/dist/shared/node_modules/@module-federation/error-codes/dist/index.cjs.js +1 -1
  47. package/dist/shared/node_modules/@module-federation/error-codes/dist/index.es.js +1 -1
  48. package/dist/shared/node_modules/@module-federation/runtime/dist/index.cjs.js +1 -1
  49. package/dist/shared/node_modules/@module-federation/runtime/dist/index.es.js +1 -1
  50. package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.cjs.js +1 -1
  51. package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.es.js +1 -1
  52. package/dist/shared/node_modules/prop-types/index.cjs.js +1 -1
  53. package/dist/shared/node_modules/prop-types/index.es.js +1 -1
  54. package/dist/shared/src/api/base/client.cjs.js +1 -1
  55. package/dist/shared/src/api/base/client.cjs.js.map +1 -1
  56. package/dist/shared/src/api/base/client.es.js +21 -17
  57. package/dist/shared/src/api/base/client.es.js.map +1 -1
  58. package/dist/shared/src/api/generated/folders.cjs.js +1 -1
  59. package/dist/shared/src/api/generated/folders.cjs.js.map +1 -1
  60. package/dist/shared/src/api/generated/folders.es.js +2 -14
  61. package/dist/shared/src/api/generated/folders.es.js.map +1 -1
  62. package/dist/shared/src/api/generated/graphql.cjs.js +237 -55
  63. package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
  64. package/dist/shared/src/api/generated/graphql.es.js +361 -161
  65. package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
  66. package/dist/shared/src/api/generated/graphqlLinks.cjs.js.map +1 -1
  67. package/dist/shared/src/api/generated/graphqlLinks.es.js.map +1 -1
  68. package/dist/shared/src/api/queries/activities/activityQueries.cjs.js +1 -0
  69. package/dist/shared/src/api/queries/activities/activityQueries.cjs.js.map +1 -1
  70. package/dist/shared/src/api/queries/activities/activityQueries.es.js +1 -0
  71. package/dist/shared/src/api/queries/activities/activityQueries.es.js.map +1 -1
  72. package/dist/shared/src/api/queries/activities/util/activitiesHelpers.cjs.js +1 -1
  73. package/dist/shared/src/api/queries/activities/util/activitiesHelpers.cjs.js.map +1 -1
  74. package/dist/shared/src/api/queries/activities/util/activitiesHelpers.es.js +33 -21
  75. package/dist/shared/src/api/queries/activities/util/activitiesHelpers.es.js.map +1 -1
  76. package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.cjs.js +1 -1
  77. package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.cjs.js.map +1 -1
  78. package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.es.js +74 -60
  79. package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.es.js.map +1 -1
  80. package/dist/shared/src/api/queries/columnStats/columnStats.cjs.js +2 -0
  81. package/dist/shared/src/api/queries/columnStats/columnStats.cjs.js.map +1 -0
  82. package/dist/shared/src/api/queries/columnStats/columnStats.es.js +96 -0
  83. package/dist/shared/src/api/queries/columnStats/columnStats.es.js.map +1 -0
  84. package/dist/shared/src/api/queries/columnStats/metricTargets.cjs.js +2 -0
  85. package/dist/shared/src/api/queries/columnStats/metricTargets.cjs.js.map +1 -0
  86. package/dist/shared/src/api/queries/columnStats/metricTargets.es.js +88 -0
  87. package/dist/shared/src/api/queries/columnStats/metricTargets.es.js.map +1 -0
  88. package/dist/shared/src/api/queries/entities/getEntityPanel.cjs.js +1 -1
  89. package/dist/shared/src/api/queries/entities/getEntityPanel.cjs.js.map +1 -1
  90. package/dist/shared/src/api/queries/entities/getEntityPanel.es.js +62 -48
  91. package/dist/shared/src/api/queries/entities/getEntityPanel.es.js.map +1 -1
  92. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.cjs.js +1 -1
  93. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.cjs.js.map +1 -1
  94. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.es.js +7 -3
  95. package/dist/shared/src/api/queries/entities/transformDetailsPanelData.es.js.map +1 -1
  96. package/dist/shared/src/api/queries/entityLists/getLists.cjs.js +1 -1
  97. package/dist/shared/src/api/queries/entityLists/getLists.cjs.js.map +1 -1
  98. package/dist/shared/src/api/queries/entityLists/getLists.es.js +94 -79
  99. package/dist/shared/src/api/queries/entityLists/getLists.es.js.map +1 -1
  100. package/dist/shared/src/api/queries/folders/getFolders.cjs.js +1 -1
  101. package/dist/shared/src/api/queries/folders/getFolders.cjs.js.map +1 -1
  102. package/dist/shared/src/api/queries/folders/getFolders.es.js +104 -71
  103. package/dist/shared/src/api/queries/folders/getFolders.es.js.map +1 -1
  104. package/dist/shared/src/api/queries/overview/getOverview.cjs.js +1 -1
  105. package/dist/shared/src/api/queries/overview/getOverview.cjs.js.map +1 -1
  106. package/dist/shared/src/api/queries/overview/getOverview.es.js +265 -216
  107. package/dist/shared/src/api/queries/overview/getOverview.es.js.map +1 -1
  108. package/dist/shared/src/api/queries/overview/updateOverview.cjs.js +1 -1
  109. package/dist/shared/src/api/queries/overview/updateOverview.cjs.js.map +1 -1
  110. package/dist/shared/src/api/queries/overview/updateOverview.es.js +198 -183
  111. package/dist/shared/src/api/queries/overview/updateOverview.es.js.map +1 -1
  112. package/dist/shared/src/api/queries/userDashboard/getUserDashboard.cjs.js +1 -1
  113. package/dist/shared/src/api/queries/userDashboard/getUserDashboard.cjs.js.map +1 -1
  114. package/dist/shared/src/api/queries/userDashboard/getUserDashboard.es.js +138 -107
  115. package/dist/shared/src/api/queries/userDashboard/getUserDashboard.es.js.map +1 -1
  116. package/dist/shared/src/api/queries/versions/getVersionsProducts.cjs.js +1 -1
  117. package/dist/shared/src/api/queries/versions/getVersionsProducts.cjs.js.map +1 -1
  118. package/dist/shared/src/api/queries/versions/getVersionsProducts.es.js +332 -239
  119. package/dist/shared/src/api/queries/versions/getVersionsProducts.es.js.map +1 -1
  120. package/dist/shared/src/api/queries/views/updateViews.cjs.js +1 -1
  121. package/dist/shared/src/api/queries/views/updateViews.cjs.js.map +1 -1
  122. package/dist/shared/src/api/queries/views/updateViews.es.js +38 -38
  123. package/dist/shared/src/api/queries/views/updateViews.es.js.map +1 -1
  124. package/dist/shared/src/components/ColumnHeaderMenuUI.cjs.js +1 -1
  125. package/dist/shared/src/components/ColumnHeaderMenuUI.cjs.js.map +1 -1
  126. package/dist/shared/src/components/ColumnHeaderMenuUI.es.js +3 -2
  127. package/dist/shared/src/components/ColumnHeaderMenuUI.es.js.map +1 -1
  128. package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js +1 -1
  129. package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js.map +1 -1
  130. package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js +3 -2
  131. package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js.map +1 -1
  132. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js +1 -1
  133. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js.map +1 -1
  134. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js +4 -2
  135. package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js.map +1 -1
  136. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js +1 -1
  137. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js.map +1 -1
  138. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.es.js +3 -2
  139. package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.es.js.map +1 -1
  140. package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js +1 -1
  141. package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js.map +1 -1
  142. package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.es.js +3 -2
  143. package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.es.js.map +1 -1
  144. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js +1 -1
  145. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js.map +1 -1
  146. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js +3 -2
  147. package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js.map +1 -1
  148. package/dist/shared/src/components/EntityIcon/EntityIcon.cjs.js +1 -1
  149. package/dist/shared/src/components/EntityIcon/EntityIcon.cjs.js.map +1 -1
  150. package/dist/shared/src/components/EntityIcon/EntityIcon.es.js +3 -2
  151. package/dist/shared/src/components/EntityIcon/EntityIcon.es.js.map +1 -1
  152. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js +1 -1
  153. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js.map +1 -1
  154. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js +137 -158
  155. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js.map +1 -1
  156. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.cjs.js +1 -1
  157. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.cjs.js.map +1 -1
  158. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.es.js +4 -2
  159. package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.es.js.map +1 -1
  160. package/dist/shared/src/components/EntityPath/SegmentProvider.cjs.js +1 -1
  161. package/dist/shared/src/components/EntityPath/SegmentProvider.cjs.js.map +1 -1
  162. package/dist/shared/src/components/EntityPath/SegmentProvider.es.js +3 -2
  163. package/dist/shared/src/components/EntityPath/SegmentProvider.es.js.map +1 -1
  164. package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js +1 -1
  165. package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js.map +1 -1
  166. package/dist/shared/src/components/Feedback/FeedbackContext.es.js +5 -4
  167. package/dist/shared/src/components/Feedback/FeedbackContext.es.js.map +1 -1
  168. package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js +1 -1
  169. package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js.map +1 -1
  170. package/dist/shared/src/components/LinksManager/AddNewLinks.es.js +3 -2
  171. package/dist/shared/src/components/LinksManager/AddNewLinks.es.js.map +1 -1
  172. package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js +1 -1
  173. package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js.map +1 -1
  174. package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js +3 -2
  175. package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js.map +1 -1
  176. package/dist/shared/src/components/LinksManager/LinksManager.cjs.js +1 -1
  177. package/dist/shared/src/components/LinksManager/LinksManager.cjs.js.map +1 -1
  178. package/dist/shared/src/components/LinksManager/LinksManager.es.js +3 -2
  179. package/dist/shared/src/components/LinksManager/LinksManager.es.js.map +1 -1
  180. package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js +1 -1
  181. package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js.map +1 -1
  182. package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.es.js +4 -2
  183. package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.es.js.map +1 -1
  184. package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js +1 -1
  185. package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js.map +1 -1
  186. package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.es.js +3 -2
  187. package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.es.js.map +1 -1
  188. package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js +1 -1
  189. package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js.map +1 -1
  190. package/dist/shared/src/components/ListMetaData/ListMetaData.es.js +3 -2
  191. package/dist/shared/src/components/ListMetaData/ListMetaData.es.js.map +1 -1
  192. package/dist/shared/src/components/Menu/Menu.cjs.js +1 -1
  193. package/dist/shared/src/components/Menu/Menu.cjs.js.map +1 -1
  194. package/dist/shared/src/components/Menu/Menu.es.js +3 -2
  195. package/dist/shared/src/components/Menu/Menu.es.js.map +1 -1
  196. package/dist/shared/src/components/Menu/MenuItem.cjs.js +1 -1
  197. package/dist/shared/src/components/Menu/MenuItem.cjs.js.map +1 -1
  198. package/dist/shared/src/components/Menu/MenuItem.es.js +1 -0
  199. package/dist/shared/src/components/Menu/MenuItem.es.js.map +1 -1
  200. package/dist/shared/src/components/Menu/MenuList.cjs.js +1 -1
  201. package/dist/shared/src/components/Menu/MenuList.cjs.js.map +1 -1
  202. package/dist/shared/src/components/Menu/MenuList.es.js +3 -2
  203. package/dist/shared/src/components/Menu/MenuList.es.js.map +1 -1
  204. package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js +1 -1
  205. package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js.map +1 -1
  206. package/dist/shared/src/components/Powerpack/PowerpackButton.es.js +3 -2
  207. package/dist/shared/src/components/Powerpack/PowerpackButton.es.js.map +1 -1
  208. package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js +1 -1
  209. package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js.map +1 -1
  210. package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js +3 -2
  211. package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js.map +1 -1
  212. package/dist/shared/src/components/Powerpack/useFreeTrialLink.cjs.js +1 -1
  213. package/dist/shared/src/components/Powerpack/useFreeTrialLink.cjs.js.map +1 -1
  214. package/dist/shared/src/components/Powerpack/useFreeTrialLink.es.js +3 -2
  215. package/dist/shared/src/components/Powerpack/useFreeTrialLink.es.js.map +1 -1
  216. package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js +1 -1
  217. package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js.map +1 -1
  218. package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js +79 -77
  219. package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js.map +1 -1
  220. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js +1 -1
  221. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js.map +1 -1
  222. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js +6 -4
  223. package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js.map +1 -1
  224. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js +1 -1
  225. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js.map +1 -1
  226. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js +3 -2
  227. package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js.map +1 -1
  228. package/dist/shared/src/components/RemotePage/ProjectPageRemote.cjs.js +1 -1
  229. package/dist/shared/src/components/RemotePage/ProjectPageRemote.cjs.js.map +1 -1
  230. package/dist/shared/src/components/RemotePage/ProjectPageRemote.es.js +4 -2
  231. package/dist/shared/src/components/RemotePage/ProjectPageRemote.es.js.map +1 -1
  232. package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js +1 -1
  233. package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js.map +1 -1
  234. package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js +4 -2
  235. package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js.map +1 -1
  236. package/dist/shared/src/components/RenameForm/RenameForm.cjs.js +1 -1
  237. package/dist/shared/src/components/RenameForm/RenameForm.cjs.js.map +1 -1
  238. package/dist/shared/src/components/RenameForm/RenameForm.es.js +4 -2
  239. package/dist/shared/src/components/RenameForm/RenameForm.es.js.map +1 -1
  240. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js +1 -1
  241. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js.map +1 -1
  242. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js +3 -2
  243. package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js.map +1 -1
  244. package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js +1 -1
  245. package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js.map +1 -1
  246. package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js +4 -2
  247. package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js.map +1 -1
  248. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js +1 -1
  249. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js.map +1 -1
  250. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.es.js +5 -3
  251. package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.es.js.map +1 -1
  252. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js +1 -1
  253. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js.map +1 -1
  254. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js +4 -2
  255. package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js.map +1 -1
  256. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js +1 -1
  257. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js.map +1 -1
  258. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js +3 -2
  259. package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js.map +1 -1
  260. package/dist/shared/src/components/ReviewablesSelector/Card.cjs.js +1 -1
  261. package/dist/shared/src/components/ReviewablesSelector/Card.cjs.js.map +1 -1
  262. package/dist/shared/src/components/ReviewablesSelector/Card.es.js +4 -2
  263. package/dist/shared/src/components/ReviewablesSelector/Card.es.js.map +1 -1
  264. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js +1 -1
  265. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js.map +1 -1
  266. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js +7 -6
  267. package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js.map +1 -1
  268. package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js +1 -1
  269. package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js.map +1 -1
  270. package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js +3 -2
  271. package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js.map +1 -1
  272. package/dist/shared/src/components/SimpleFormDialog/FormFile.cjs.js +1 -1
  273. package/dist/shared/src/components/SimpleFormDialog/FormFile.cjs.js.map +1 -1
  274. package/dist/shared/src/components/SimpleFormDialog/FormFile.es.js +6 -4
  275. package/dist/shared/src/components/SimpleFormDialog/FormFile.es.js.map +1 -1
  276. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js +1 -1
  277. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js.map +1 -1
  278. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js +4 -2
  279. package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js.map +1 -1
  280. package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.cjs.js +1 -1
  281. package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.cjs.js.map +1 -1
  282. package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.es.js +3 -2
  283. package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.es.js.map +1 -1
  284. package/dist/shared/src/components/Thumbnail/StackedThumbnails.cjs.js +2 -2
  285. package/dist/shared/src/components/Thumbnail/StackedThumbnails.cjs.js.map +1 -1
  286. package/dist/shared/src/components/Thumbnail/StackedThumbnails.es.js +11 -10
  287. package/dist/shared/src/components/Thumbnail/StackedThumbnails.es.js.map +1 -1
  288. package/dist/shared/src/components/Thumbnail/Thumbnail.cjs.js +1 -1
  289. package/dist/shared/src/components/Thumbnail/Thumbnail.cjs.js.map +1 -1
  290. package/dist/shared/src/components/Thumbnail/Thumbnail.es.js +49 -44
  291. package/dist/shared/src/components/Thumbnail/Thumbnail.es.js.map +1 -1
  292. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.cjs.js +3 -3
  293. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.cjs.js.map +1 -1
  294. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.es.js +32 -22
  295. package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.es.js.map +1 -1
  296. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js +1 -1
  297. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js.map +1 -1
  298. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.es.js +4 -2
  299. package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.es.js.map +1 -1
  300. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.cjs.js +1 -1
  301. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.cjs.js.map +1 -1
  302. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.es.js +8 -6
  303. package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.es.js.map +1 -1
  304. package/dist/shared/src/components/Watchers/Watchers.cjs.js +1 -1
  305. package/dist/shared/src/components/Watchers/Watchers.cjs.js.map +1 -1
  306. package/dist/shared/src/components/Watchers/Watchers.es.js +3 -2
  307. package/dist/shared/src/components/Watchers/Watchers.es.js.map +1 -1
  308. package/dist/shared/src/config/powerpackFeatures.cjs.js +1 -1
  309. package/dist/shared/src/config/powerpackFeatures.cjs.js.map +1 -1
  310. package/dist/shared/src/config/powerpackFeatures.es.js +7 -1
  311. package/dist/shared/src/config/powerpackFeatures.es.js.map +1 -1
  312. package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js +1 -1
  313. package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js.map +1 -1
  314. package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js +4 -2
  315. package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js.map +1 -1
  316. package/dist/shared/src/containers/Actions/Actions.cjs.js +1 -1
  317. package/dist/shared/src/containers/Actions/Actions.cjs.js.map +1 -1
  318. package/dist/shared/src/containers/Actions/Actions.es.js +3 -2
  319. package/dist/shared/src/containers/Actions/Actions.es.js.map +1 -1
  320. package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js +1 -1
  321. package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js.map +1 -1
  322. package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js +4 -2
  323. package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js.map +1 -1
  324. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js +1 -1
  325. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js.map +1 -1
  326. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js +4 -2
  327. package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js.map +1 -1
  328. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js +1 -1
  329. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js.map +1 -1
  330. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.es.js +4 -2
  331. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.es.js.map +1 -1
  332. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.cjs.js +1 -1
  333. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.cjs.js.map +1 -1
  334. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.es.js +41 -38
  335. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.es.js.map +1 -1
  336. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.cjs.js +1 -1
  337. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.cjs.js.map +1 -1
  338. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.es.js +4 -2
  339. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.es.js.map +1 -1
  340. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.cjs.js +1 -1
  341. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.cjs.js.map +1 -1
  342. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.es.js +4 -2
  343. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.es.js.map +1 -1
  344. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.cjs.js +1 -1
  345. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.cjs.js.map +1 -1
  346. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.es.js +4 -2
  347. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.es.js.map +1 -1
  348. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js +1 -1
  349. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js.map +1 -1
  350. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js +3 -2
  351. package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js.map +1 -1
  352. package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js +1 -1
  353. package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js.map +1 -1
  354. package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js +18 -16
  355. package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js.map +1 -1
  356. package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.cjs.js +1 -1
  357. package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.cjs.js.map +1 -1
  358. package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.es.js +4 -2
  359. package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.es.js.map +1 -1
  360. package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.cjs.js +1 -1
  361. package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.cjs.js.map +1 -1
  362. package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.es.js +4 -2
  363. package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.es.js.map +1 -1
  364. package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.cjs.js +1 -1
  365. package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.cjs.js.map +1 -1
  366. package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.es.js +13 -11
  367. package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.es.js.map +1 -1
  368. package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.cjs.js +1 -1
  369. package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.cjs.js.map +1 -1
  370. package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.es.js +14 -14
  371. package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.es.js.map +1 -1
  372. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.cjs.js +1 -1
  373. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.cjs.js.map +1 -1
  374. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.es.js +13 -9
  375. package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.es.js.map +1 -1
  376. package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.cjs.js +1 -1
  377. package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.cjs.js.map +1 -1
  378. package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.es.js +4 -2
  379. package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.es.js.map +1 -1
  380. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.cjs.js +1 -1
  381. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.cjs.js.map +1 -1
  382. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.es.js +4 -2
  383. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.es.js.map +1 -1
  384. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.cjs.js +1 -1
  385. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.cjs.js.map +1 -1
  386. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.es.js +4 -2
  387. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.es.js.map +1 -1
  388. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.cjs.js +1 -1
  389. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.cjs.js.map +1 -1
  390. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.es.js +4 -2
  391. package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.es.js.map +1 -1
  392. package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.cjs.js +1 -1
  393. package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.cjs.js.map +1 -1
  394. package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.es.js +3 -2
  395. package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.es.js.map +1 -1
  396. package/dist/shared/src/containers/Feed/Feed.cjs.js +1 -1
  397. package/dist/shared/src/containers/Feed/Feed.cjs.js.map +1 -1
  398. package/dist/shared/src/containers/Feed/Feed.es.js +5 -4
  399. package/dist/shared/src/containers/Feed/Feed.es.js.map +1 -1
  400. package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.cjs.js +1 -1
  401. package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.cjs.js.map +1 -1
  402. package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.es.js +4 -2
  403. package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.es.js.map +1 -1
  404. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.cjs.js +1 -1
  405. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.cjs.js.map +1 -1
  406. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.es.js +4 -2
  407. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.es.js.map +1 -1
  408. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.cjs.js +1 -1
  409. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.cjs.js.map +1 -1
  410. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.es.js +4 -2
  411. package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.es.js.map +1 -1
  412. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js +1 -1
  413. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js.map +1 -1
  414. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js +28 -27
  415. package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js.map +1 -1
  416. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.cjs.js +1 -1
  417. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.cjs.js.map +1 -1
  418. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.es.js +4 -2
  419. package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.es.js.map +1 -1
  420. package/dist/shared/src/containers/Feed/components/CommentInput/helpers.cjs.js +1 -1
  421. package/dist/shared/src/containers/Feed/components/CommentInput/helpers.cjs.js.map +1 -1
  422. package/dist/shared/src/containers/Feed/components/CommentInput/helpers.es.js +8 -6
  423. package/dist/shared/src/containers/Feed/components/CommentInput/helpers.es.js.map +1 -1
  424. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.cjs.js +1 -1
  425. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.cjs.js.map +1 -1
  426. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.es.js +3 -2
  427. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.es.js.map +1 -1
  428. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.cjs.js +1 -1
  429. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.cjs.js.map +1 -1
  430. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.es.js +3 -2
  431. package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.es.js.map +1 -1
  432. package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.cjs.js +1 -1
  433. package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.cjs.js.map +1 -1
  434. package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.es.js +3 -2
  435. package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.es.js.map +1 -1
  436. package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.cjs.js +1 -1
  437. package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.cjs.js.map +1 -1
  438. package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.es.js +37 -44
  439. package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.es.js.map +1 -1
  440. package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.cjs.js +1 -1
  441. package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.cjs.js.map +1 -1
  442. package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.es.js +3 -2
  443. package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.es.js.map +1 -1
  444. package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js +1 -1
  445. package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js.map +1 -1
  446. package/dist/shared/src/containers/Feed/context/FeedContext.es.js +6 -5
  447. package/dist/shared/src/containers/Feed/context/FeedContext.es.js.map +1 -1
  448. package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.cjs.js +1 -1
  449. package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.cjs.js.map +1 -1
  450. package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.es.js +14 -13
  451. package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.es.js.map +1 -1
  452. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js +1 -1
  453. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js.map +1 -1
  454. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js +3 -2
  455. package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js.map +1 -1
  456. package/dist/shared/src/containers/ListTable/ListTable.cjs.js +1 -1
  457. package/dist/shared/src/containers/ListTable/ListTable.cjs.js.map +1 -1
  458. package/dist/shared/src/containers/ListTable/ListTable.es.js +212 -204
  459. package/dist/shared/src/containers/ListTable/ListTable.es.js.map +1 -1
  460. package/dist/shared/src/containers/ListTable/ListTableCell.cjs.js +1 -1
  461. package/dist/shared/src/containers/ListTable/ListTableCell.cjs.js.map +1 -1
  462. package/dist/shared/src/containers/ListTable/ListTableCell.es.js +4 -2
  463. package/dist/shared/src/containers/ListTable/ListTableCell.es.js.map +1 -1
  464. package/dist/shared/src/containers/ListTable/ListTableHeader.cjs.js +1 -1
  465. package/dist/shared/src/containers/ListTable/ListTableHeader.cjs.js.map +1 -1
  466. package/dist/shared/src/containers/ListTable/ListTableHeader.es.js +4 -2
  467. package/dist/shared/src/containers/ListTable/ListTableHeader.es.js.map +1 -1
  468. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js +1 -1
  469. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js.map +1 -1
  470. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js +729 -675
  471. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js.map +1 -1
  472. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.cjs.js +32 -10
  473. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.cjs.js.map +1 -1
  474. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.es.js +42 -18
  475. package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.es.js.map +1 -1
  476. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js +1 -1
  477. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js.map +1 -1
  478. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js +17 -14
  479. package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js.map +1 -1
  480. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.cjs.js +1 -1
  481. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.cjs.js.map +1 -1
  482. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.es.js +57 -43
  483. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.es.js.map +1 -1
  484. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.cjs.js +1 -1
  485. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.cjs.js.map +1 -1
  486. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.es.js +4 -2
  487. package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.es.js.map +1 -1
  488. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js +1 -1
  489. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js.map +1 -1
  490. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.es.js +4 -2
  491. package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.es.js.map +1 -1
  492. package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.cjs.js +48 -0
  493. package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.cjs.js.map +1 -0
  494. package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.es.js +103 -0
  495. package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.es.js.map +1 -0
  496. package/dist/shared/src/containers/ProjectTreeTable/constants.cjs.js +2 -0
  497. package/dist/shared/src/containers/ProjectTreeTable/constants.cjs.js.map +1 -0
  498. package/dist/shared/src/containers/ProjectTreeTable/constants.es.js +6 -0
  499. package/dist/shared/src/containers/ProjectTreeTable/constants.es.js.map +1 -0
  500. package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.cjs.js +1 -1
  501. package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.cjs.js.map +1 -1
  502. package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.es.js +4 -2
  503. package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.es.js.map +1 -1
  504. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js +4 -4
  505. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js.map +1 -1
  506. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js +7 -5
  507. package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js.map +1 -1
  508. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.cjs.js.map +1 -1
  509. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.es.js.map +1 -1
  510. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js +1 -1
  511. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js.map +1 -1
  512. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js +215 -181
  513. package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js.map +1 -1
  514. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js +1 -1
  515. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js.map +1 -1
  516. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js +5 -4
  517. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js.map +1 -1
  518. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js +1 -1
  519. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js.map +1 -1
  520. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.es.js +3 -2
  521. package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.es.js.map +1 -1
  522. package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.cjs.js +1 -1
  523. package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.cjs.js.map +1 -1
  524. package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.es.js +21 -17
  525. package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.es.js.map +1 -1
  526. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.cjs.js +1 -1
  527. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.cjs.js.map +1 -1
  528. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.es.js +1 -2
  529. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.es.js.map +1 -1
  530. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js +1 -1
  531. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js.map +1 -1
  532. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js +17 -11
  533. package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js.map +1 -1
  534. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js +1 -1
  535. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js.map +1 -1
  536. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js +3 -2
  537. package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js.map +1 -1
  538. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js +1 -1
  539. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js.map +1 -1
  540. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js +83 -81
  541. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js.map +1 -1
  542. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.cjs.js +1 -1
  543. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.cjs.js.map +1 -1
  544. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.es.js +116 -111
  545. package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.es.js.map +1 -1
  546. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js +1 -1
  547. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js.map +1 -1
  548. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.es.js +6 -3
  549. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.es.js.map +1 -1
  550. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js +1 -1
  551. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js.map +1 -1
  552. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.es.js +4 -2
  553. package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.es.js.map +1 -1
  554. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.cjs.js +1 -1
  555. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.cjs.js.map +1 -1
  556. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.es.js +4 -2
  557. package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.es.js.map +1 -1
  558. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.cjs.js +1 -1
  559. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.cjs.js.map +1 -1
  560. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.es.js +4 -2
  561. package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.es.js.map +1 -1
  562. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js +1 -1
  563. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js.map +1 -1
  564. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.es.js +3 -2
  565. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.es.js.map +1 -1
  566. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFolderRelationships.cjs.js.map +1 -1
  567. package/dist/shared/src/containers/ProjectTreeTable/hooks/useFolderRelationships.es.js.map +1 -1
  568. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js +1 -1
  569. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js.map +1 -1
  570. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.es.js +4 -2
  571. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.es.js.map +1 -1
  572. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.cjs.js +1 -1
  573. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.cjs.js.map +1 -1
  574. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.es.js +4 -2
  575. package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.es.js.map +1 -1
  576. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.cjs.js +1 -1
  577. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.cjs.js.map +1 -1
  578. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.es.js +4 -2
  579. package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.es.js.map +1 -1
  580. package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.cjs.js +1 -1
  581. package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.cjs.js.map +1 -1
  582. package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.es.js +4 -2
  583. package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.es.js.map +1 -1
  584. package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.cjs.js +1 -1
  585. package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.cjs.js.map +1 -1
  586. package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.es.js +4 -2
  587. package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.es.js.map +1 -1
  588. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js +1 -1
  589. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js.map +1 -1
  590. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js +80 -78
  591. package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js.map +1 -1
  592. package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.cjs.js +1 -1
  593. package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.cjs.js.map +1 -1
  594. package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.es.js +4 -2
  595. package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.es.js.map +1 -1
  596. package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.cjs.js +1 -1
  597. package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.cjs.js.map +1 -1
  598. package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.es.js +45 -44
  599. package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.es.js.map +1 -1
  600. package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.cjs.js +2 -0
  601. package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.cjs.js.map +1 -0
  602. package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.es.js +16 -0
  603. package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.es.js.map +1 -0
  604. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js +1 -1
  605. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js.map +1 -1
  606. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js +15 -13
  607. package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js.map +1 -1
  608. package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.cjs.js +1 -1
  609. package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.cjs.js.map +1 -1
  610. package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.es.js +29 -25
  611. package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.es.js.map +1 -1
  612. package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.cjs.js +2 -0
  613. package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.cjs.js.map +1 -0
  614. package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.es.js +17 -0
  615. package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.es.js.map +1 -0
  616. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js +1 -1
  617. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js.map +1 -1
  618. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js +4 -2
  619. package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js.map +1 -1
  620. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js +1 -1
  621. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js.map +1 -1
  622. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js +12 -10
  623. package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js.map +1 -1
  624. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js +1 -1
  625. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js.map +1 -1
  626. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js +6 -4
  627. package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js.map +1 -1
  628. package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.cjs.js +1 -1
  629. package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.cjs.js.map +1 -1
  630. package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.es.js +3 -2
  631. package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.es.js.map +1 -1
  632. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js +1 -1
  633. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js.map +1 -1
  634. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js +4 -2
  635. package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js.map +1 -1
  636. package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.cjs.js +1 -1
  637. package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.cjs.js.map +1 -1
  638. package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.es.js +4 -2
  639. package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.es.js.map +1 -1
  640. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.cjs.js +1 -1
  641. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.cjs.js.map +1 -1
  642. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.es.js +3 -2
  643. package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.es.js.map +1 -1
  644. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.cjs.js +4 -4
  645. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.cjs.js.map +1 -1
  646. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.es.js +24 -19
  647. package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.es.js.map +1 -1
  648. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js +1 -1
  649. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js.map +1 -1
  650. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.es.js +4 -2
  651. package/dist/shared/src/containers/RepresentationsList/RepresentationsList.es.js.map +1 -1
  652. package/dist/shared/src/containers/SimpleTable/SimpleTable.cjs.js +1 -1
  653. package/dist/shared/src/containers/SimpleTable/SimpleTable.cjs.js.map +1 -1
  654. package/dist/shared/src/containers/SimpleTable/SimpleTable.es.js +4 -2
  655. package/dist/shared/src/containers/SimpleTable/SimpleTable.es.js.map +1 -1
  656. package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.cjs.js +1 -1
  657. package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.cjs.js.map +1 -1
  658. package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.es.js +3 -2
  659. package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.es.js.map +1 -1
  660. package/dist/shared/src/containers/Slicer/components/SlicerSearch.cjs.js +1 -1
  661. package/dist/shared/src/containers/Slicer/components/SlicerSearch.cjs.js.map +1 -1
  662. package/dist/shared/src/containers/Slicer/components/SlicerSearch.es.js +4 -2
  663. package/dist/shared/src/containers/Slicer/components/SlicerSearch.es.js.map +1 -1
  664. package/dist/shared/src/containers/Slicer/context/SlicerContext.cjs.js +1 -1
  665. package/dist/shared/src/containers/Slicer/context/SlicerContext.cjs.js.map +1 -1
  666. package/dist/shared/src/containers/Slicer/context/SlicerContext.es.js +5 -4
  667. package/dist/shared/src/containers/Slicer/context/SlicerContext.es.js.map +1 -1
  668. package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.cjs.js +1 -1
  669. package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.cjs.js.map +1 -1
  670. package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.es.js +3 -2
  671. package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.es.js.map +1 -1
  672. package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.cjs.js +1 -1
  673. package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.cjs.js.map +1 -1
  674. package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.es.js +3 -2
  675. package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.es.js.map +1 -1
  676. package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.cjs.js +1 -1
  677. package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.cjs.js.map +1 -1
  678. package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.es.js +4 -2
  679. package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.es.js.map +1 -1
  680. package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.cjs.js +1 -1
  681. package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.cjs.js.map +1 -1
  682. package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.es.js +3 -2
  683. package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.es.js.map +1 -1
  684. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js +1 -1
  685. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js.map +1 -1
  686. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js +12 -11
  687. package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js.map +1 -1
  688. package/dist/shared/src/containers/Slicer/hooks/useUsersTable.cjs.js +1 -1
  689. package/dist/shared/src/containers/Slicer/hooks/useUsersTable.cjs.js.map +1 -1
  690. package/dist/shared/src/containers/Slicer/hooks/useUsersTable.es.js +3 -2
  691. package/dist/shared/src/containers/Slicer/hooks/useUsersTable.es.js.map +1 -1
  692. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js +1 -1
  693. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js.map +1 -1
  694. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js +3 -2
  695. package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js.map +1 -1
  696. package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js +1 -1
  697. package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js.map +1 -1
  698. package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js +4 -2
  699. package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js.map +1 -1
  700. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js +1 -1
  701. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js.map +1 -1
  702. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js +3 -2
  703. package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js.map +1 -1
  704. package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js +1 -1
  705. package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js.map +1 -1
  706. package/dist/shared/src/containers/Views/context/ViewsContext.es.js +119 -118
  707. package/dist/shared/src/containers/Views/context/ViewsContext.es.js.map +1 -1
  708. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.cjs.js +1 -1
  709. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.cjs.js.map +1 -1
  710. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.es.js +18 -16
  711. package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.es.js.map +1 -1
  712. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.cjs.js +1 -1
  713. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.cjs.js.map +1 -1
  714. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.es.js +79 -51
  715. package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.es.js.map +1 -1
  716. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.cjs.js +1 -1
  717. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.cjs.js.map +1 -1
  718. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.es.js +19 -17
  719. package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.es.js.map +1 -1
  720. package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js +1 -1
  721. package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js.map +1 -1
  722. package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js +3 -2
  723. package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js.map +1 -1
  724. package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.cjs.js +1 -1
  725. package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.cjs.js.map +1 -1
  726. package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js +6 -5
  727. package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js.map +1 -1
  728. package/dist/shared/src/containers/Views/hooks/useSelectedView.cjs.js +1 -1
  729. package/dist/shared/src/containers/Views/hooks/useSelectedView.cjs.js.map +1 -1
  730. package/dist/shared/src/containers/Views/hooks/useSelectedView.es.js +12 -11
  731. package/dist/shared/src/containers/Views/hooks/useSelectedView.es.js.map +1 -1
  732. package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js +1 -1
  733. package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js.map +1 -1
  734. package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js +3 -2
  735. package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js.map +1 -1
  736. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js +1 -1
  737. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js.map +1 -1
  738. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js +78 -65
  739. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js.map +1 -1
  740. package/dist/shared/src/context/AddonProjectContext.cjs.js +1 -1
  741. package/dist/shared/src/context/AddonProjectContext.cjs.js.map +1 -1
  742. package/dist/shared/src/context/AddonProjectContext.es.js +5 -4
  743. package/dist/shared/src/context/AddonProjectContext.es.js.map +1 -1
  744. package/dist/shared/src/context/DetailsPanelContext.cjs.js +1 -1
  745. package/dist/shared/src/context/DetailsPanelContext.cjs.js.map +1 -1
  746. package/dist/shared/src/context/DetailsPanelContext.es.js +5 -4
  747. package/dist/shared/src/context/DetailsPanelContext.es.js.map +1 -1
  748. package/dist/shared/src/context/GlobalContext.cjs.js +1 -1
  749. package/dist/shared/src/context/GlobalContext.cjs.js.map +1 -1
  750. package/dist/shared/src/context/GlobalContext.es.js +5 -4
  751. package/dist/shared/src/context/GlobalContext.es.js.map +1 -1
  752. package/dist/shared/src/context/PowerpackContext.cjs.js +1 -1
  753. package/dist/shared/src/context/PowerpackContext.cjs.js.map +1 -1
  754. package/dist/shared/src/context/PowerpackContext.es.js +7 -6
  755. package/dist/shared/src/context/PowerpackContext.es.js.map +1 -1
  756. package/dist/shared/src/context/ProjectContext.cjs.js +1 -1
  757. package/dist/shared/src/context/ProjectContext.cjs.js.map +1 -1
  758. package/dist/shared/src/context/ProjectContext.es.js +5 -4
  759. package/dist/shared/src/context/ProjectContext.es.js.map +1 -1
  760. package/dist/shared/src/context/ProjectFoldersContext.cjs.js +1 -1
  761. package/dist/shared/src/context/ProjectFoldersContext.cjs.js.map +1 -1
  762. package/dist/shared/src/context/ProjectFoldersContext.es.js +5 -4
  763. package/dist/shared/src/context/ProjectFoldersContext.es.js.map +1 -1
  764. package/dist/shared/src/context/RemoteModulesContext.cjs.js +1 -1
  765. package/dist/shared/src/context/RemoteModulesContext.cjs.js.map +1 -1
  766. package/dist/shared/src/context/RemoteModulesContext.es.js +5 -4
  767. package/dist/shared/src/context/RemoteModulesContext.es.js.map +1 -1
  768. package/dist/shared/src/context/SubtasksModulesContext.cjs.js +1 -1
  769. package/dist/shared/src/context/SubtasksModulesContext.cjs.js.map +1 -1
  770. package/dist/shared/src/context/SubtasksModulesContext.es.js +5 -4
  771. package/dist/shared/src/context/SubtasksModulesContext.es.js.map +1 -1
  772. package/dist/shared/src/context/UriContext.cjs.js +1 -1
  773. package/dist/shared/src/context/UriContext.cjs.js.map +1 -1
  774. package/dist/shared/src/context/UriContext.es.js +6 -5
  775. package/dist/shared/src/context/UriContext.es.js.map +1 -1
  776. package/dist/shared/src/context/WebsocketContext.cjs.js +1 -1
  777. package/dist/shared/src/context/WebsocketContext.cjs.js.map +1 -1
  778. package/dist/shared/src/context/WebsocketContext.es.js +6 -4
  779. package/dist/shared/src/context/WebsocketContext.es.js.map +1 -1
  780. package/dist/shared/src/hooks/useActionTriggers.cjs.js +1 -1
  781. package/dist/shared/src/hooks/useActionTriggers.cjs.js.map +1 -1
  782. package/dist/shared/src/hooks/useActionTriggers.es.js +3 -2
  783. package/dist/shared/src/hooks/useActionTriggers.es.js.map +1 -1
  784. package/dist/shared/src/hooks/useEntityUpdate.cjs.js +1 -1
  785. package/dist/shared/src/hooks/useEntityUpdate.cjs.js.map +1 -1
  786. package/dist/shared/src/hooks/useEntityUpdate.es.js +3 -2
  787. package/dist/shared/src/hooks/useEntityUpdate.es.js.map +1 -1
  788. package/dist/shared/src/hooks/useGetEntityGroups.cjs.js +1 -1
  789. package/dist/shared/src/hooks/useGetEntityGroups.cjs.js.map +1 -1
  790. package/dist/shared/src/hooks/useGetEntityGroups.es.js +3 -2
  791. package/dist/shared/src/hooks/useGetEntityGroups.es.js.map +1 -1
  792. package/dist/shared/src/hooks/useGroupByRemoteModules.cjs.js +1 -1
  793. package/dist/shared/src/hooks/useGroupByRemoteModules.cjs.js.map +1 -1
  794. package/dist/shared/src/hooks/useGroupByRemoteModules.es.js +3 -2
  795. package/dist/shared/src/hooks/useGroupByRemoteModules.es.js.map +1 -1
  796. package/dist/shared/src/hooks/useHierarchyTable.cjs.js +1 -1
  797. package/dist/shared/src/hooks/useHierarchyTable.cjs.js.map +1 -1
  798. package/dist/shared/src/hooks/useHierarchyTable.es.js +3 -2
  799. package/dist/shared/src/hooks/useHierarchyTable.es.js.map +1 -1
  800. package/dist/shared/src/hooks/useScopedStatuses.cjs.js +1 -1
  801. package/dist/shared/src/hooks/useScopedStatuses.cjs.js.map +1 -1
  802. package/dist/shared/src/hooks/useScopedStatuses.es.js +5 -4
  803. package/dist/shared/src/hooks/useScopedStatuses.es.js.map +1 -1
  804. package/dist/shared/src/hooks/useScopedTypes.cjs.js +1 -1
  805. package/dist/shared/src/hooks/useScopedTypes.cjs.js.map +1 -1
  806. package/dist/shared/src/hooks/useScopedTypes.es.js +3 -2
  807. package/dist/shared/src/hooks/useScopedTypes.es.js.map +1 -1
  808. package/dist/shared/src/hooks/useUserProjectConfig.cjs.js +1 -1
  809. package/dist/shared/src/hooks/useUserProjectConfig.cjs.js.map +1 -1
  810. package/dist/shared/src/hooks/useUserProjectConfig.es.js +3 -2
  811. package/dist/shared/src/hooks/useUserProjectConfig.es.js.map +1 -1
  812. package/dist/shared/src/util/columnConfigConverter.cjs.js +1 -1
  813. package/dist/shared/src/util/columnConfigConverter.cjs.js.map +1 -1
  814. package/dist/shared/src/util/columnConfigConverter.es.js +86 -65
  815. package/dist/shared/src/util/columnConfigConverter.es.js.map +1 -1
  816. package/dist/shared/src/util/getThumbnailUrl.cjs.js +2 -0
  817. package/dist/shared/src/util/getThumbnailUrl.cjs.js.map +1 -0
  818. package/dist/shared/src/util/getThumbnailUrl.es.js +23 -0
  819. package/dist/shared/src/util/getThumbnailUrl.es.js.map +1 -0
  820. package/dist/shared/src/util/thumbnailWebsocket.cjs.js +2 -0
  821. package/dist/shared/src/util/thumbnailWebsocket.cjs.js.map +1 -0
  822. package/dist/shared/src/util/thumbnailWebsocket.es.js +54 -0
  823. package/dist/shared/src/util/thumbnailWebsocket.es.js.map +1 -0
  824. package/dist/types/api/generated/folders.d.ts +1 -6
  825. package/dist/types/api/generated/graphql.d.ts +275 -6
  826. package/dist/types/api/generated/graphqlLinks.d.ts +7 -4
  827. package/dist/types/api/queries/activities/activityQueries.d.ts +1 -0
  828. package/dist/types/api/queries/activities/getActivities.d.ts +47 -0
  829. package/dist/types/api/queries/activities/updateActivities.d.ts +94 -0
  830. package/dist/types/api/queries/activities/util/activitiesHelpers.d.ts +1 -0
  831. package/dist/types/api/queries/columnStats/columnStats.d.ts +28 -0
  832. package/dist/types/api/queries/columnStats/index.d.ts +2 -0
  833. package/dist/types/api/queries/columnStats/metricTargets.d.ts +31 -0
  834. package/dist/types/api/queries/entities/getEntity.d.ts +47 -0
  835. package/dist/types/api/queries/entities/getEntityPanel.d.ts +47 -0
  836. package/dist/types/api/queries/entities/transformDetailsPanelData.d.ts +1 -0
  837. package/dist/types/api/queries/entities/updateEntity.d.ts +47 -0
  838. package/dist/types/api/queries/entityLists/getLists.d.ts +47 -0
  839. package/dist/types/api/queries/index.d.ts +1 -0
  840. package/dist/types/api/queries/overview/getOverview.d.ts +733 -1
  841. package/dist/types/api/queries/project/getProject.d.ts +47 -0
  842. package/dist/types/api/queries/userDashboard/getUserDashboard.d.ts +69 -0
  843. package/dist/types/api/queries/users/getUsers.d.ts +47 -0
  844. package/dist/types/api/queries/versions/getVersionsProducts.d.ts +828 -1
  845. package/dist/types/components/EntityPanelUploader/EntityPanelUploader.d.ts +1 -11
  846. package/dist/types/components/Thumbnail/StackedThumbnails.d.ts +2 -2
  847. package/dist/types/components/Thumbnail/Thumbnail.d.ts +2 -2
  848. package/dist/types/components/ThumbnailSimple/ThumbnailSimple.d.ts +1 -1
  849. package/dist/types/config/powerpackFeatures.d.ts +1 -1
  850. package/dist/types/containers/DetailsPanel/containers/FeedWrapper.d.ts +1 -0
  851. package/dist/types/containers/DetailsPanel/helpers/getThumbnails.d.ts +2 -2
  852. package/dist/types/containers/Feed/components/ActivityVersions/ActivityVersions.d.ts +1 -0
  853. package/dist/types/containers/ProjectTreeTable/ProjectTreeTable.d.ts +8 -3
  854. package/dist/types/containers/ProjectTreeTable/ProjectTreeTable.styled.d.ts +2 -0
  855. package/dist/types/containers/ProjectTreeTable/buildTreeTableColumns.d.ts +1 -1
  856. package/dist/types/containers/ProjectTreeTable/components/TableFooterRow.d.ts +14 -0
  857. package/dist/types/containers/ProjectTreeTable/constants.d.ts +2 -0
  858. package/dist/types/containers/ProjectTreeTable/context/ColumnSettingsContext.d.ts +10 -0
  859. package/dist/types/containers/ProjectTreeTable/context/SelectionCellsContext.d.ts +0 -1
  860. package/dist/types/containers/ProjectTreeTable/index.d.ts +1 -0
  861. package/dist/types/containers/ProjectTreeTable/types/index.d.ts +17 -1
  862. package/dist/types/containers/ProjectTreeTable/types/overviewContext.d.ts +2 -0
  863. package/dist/types/containers/ProjectTreeTable/types/summaryTypes.d.ts +50 -0
  864. package/dist/types/containers/ProjectTreeTable/types/table.d.ts +3 -0
  865. package/dist/types/containers/ProjectTreeTable/utils/checkColumnVisibility.d.ts +2 -0
  866. package/dist/types/containers/ProjectTreeTable/utils/index.d.ts +1 -0
  867. package/dist/types/containers/ProjectTreeTable/utils/pinningUtils.d.ts +6 -0
  868. package/dist/types/containers/ProjectTreeTable/widgets/ThumbnailWidget.d.ts +1 -1
  869. package/dist/types/containers/Views/hooks/useSelectedView.d.ts +2 -1
  870. package/dist/types/containers/Views/utils/viewUpdateHelper.d.ts +7 -3
  871. package/dist/types/util/getThumbnailUrl.d.ts +18 -0
  872. package/dist/types/util/index.d.ts +2 -0
  873. package/dist/types/util/thumbnailWebsocket.d.ts +21 -0
  874. package/dist/util.cjs.js +1 -1
  875. package/dist/util.es.js +35 -30
  876. package/dist/util.es.js.map +1 -1
  877. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdateTableData.cjs.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","e","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorAttrib","entityPatch","inheritedDependent","newAttrib"],"mappings":"ihNAYA,MAAMA,EAAkB,CACtBC,EACAC,EACAC,IACW,CACX,OAAQF,EAAA,CACN,IAAK,mBACH,MAAO,GAAGC,CAAU,mBAAmBC,CAAU,mBACnD,IAAK,qBACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,+BACrC,IAAK,wBACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,4BACrC,IAAK,iCACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,kCACrC,QACE,MAAO,oBAAoBD,CAAU,KAAKC,CAAU,EAAA,CAE1D,EAyCMC,EAAsBC,GAAoC,CAC9D,KAAM,CAAE,YAAAC,EAAa,qBAAAC,CAAA,EAAyBF,GAAS,CAAA,EACjD,CAAE,YAAAG,CAAA,EAAgBC,oBAAA,EAClB,CACJ,cAAAC,EACA,uBAAAC,EACA,gCAAAC,EACA,uBAAAC,CAAA,EACEC,yBAAA,EACE,CAAE,eAAAC,CAAA,EAAmBC,gCAAA,EAErBC,EAAuBC,EAAAA,YAC3B,MAAOC,EAAW,CAAA,EAAIC,EAAgB,KAAS,CAC7C,GAAI,CAACD,EAAS,QAAU,CAACX,EACvB,OAIF,IAAIa,EAAgBF,EAAS,OAAQ,GAAM,CAAC,EAAE,MAAM,EAGpD,MAAMG,EAAkBD,EAAc,OAAQE,GACxC,EAAAA,EAAO,QAAU,cAAgBA,EAAO,OAAS,UAChCb,EA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,EAAgBvB,CAAsB,EAChE,IAAI2B,EAAY,CAEd,GAAIzB,EAAkB,MAAM,QAAU,CAAA,EAEtC,GAAIwB,EAAmB,MAAM,QAAU,CAAA,CAAC,EAG1CH,EAAgBvB,CAAsB,EAAI,CACxC,GAAGE,EACH,KAAM,CAAE,OAAQyB,CAAA,CAAU,CAE9B,MAEEJ,EAAgB,KAAK,CACnB,SAAUG,EAAmB,SAC7B,WAAYA,EAAmB,WAC/B,KAAMA,EAAmB,IAAA,CAC1B,CAEL,CACF,CAGA,GAAI,CACF,MAAMtD,EAAe,CACnB,WAAA0B,EACA,gBAAAyB,CAAA,CACD,CACH,OAASjB,EAAY,CAEfR,EAAW,SAAW,EACxBQ,EAAM,WAAW,QAAShD,GAAsB,CAC9C,MAAM2C,EAAKH,EAAW,CAAC,EACjBlB,EAASb,EAAckC,EAAG,QAAkB,EAC5CzC,EAAaoB,GAAQ,OAASA,GAAQ,MAAQqB,EAAG,UAAY,GAC7DM,EAAUlD,EAAgBC,EAAW2C,EAAG,WAAYzC,CAAU,EACpEsB,EAAAA,MAAM,MAAMyB,CAAO,CACrB,CAAC,EAEDzB,EAAAA,MAAM,MAAM,2BAA2B,EAIrCL,GAAiBd,GAAeC,GAClCA,EAAqB,CAAC,CAE1B,CACF,EACA,CACEC,EACAO,EACAJ,EACAC,EACAN,EACAC,CAAA,CACF,EAGF,MAAO,CAAE,eAAgBU,EAAsB,kBAAAkC,CAAA,CACjD"}
1
+ {"version":3,"file":"useUpdateTableData.cjs.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","e","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorAttrib","entityPatch","inheritedDependent","newAttrib"],"mappings":"klNAYA,MAAMA,EAAkB,CACtBC,EACAC,EACAC,IACW,CACX,OA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EAAM,WAAW,QAAShD,GAAsB,CAC9C,MAAM2C,EAAKH,EAAW,CAAC,EACjBlB,EAASb,EAAckC,EAAG,QAAkB,EAC5CzC,EAAaoB,GAAQ,OAASA,GAAQ,MAAQqB,EAAG,UAAY,GAC7DM,EAAUlD,EAAgBC,EAAW2C,EAAG,WAAYzC,CAAU,EACpEsB,EAAAA,MAAM,MAAMyB,CAAO,CACrB,CAAC,EAEDzB,EAAAA,MAAM,MAAM,2BAA2B,EAIrCL,GAAiBd,GAAeC,GAClCA,EAAqB,CAAC,CAE1B,CACF,EACA,CACEC,EACAO,EACAJ,EACAC,EACAN,EACAC,CAAA,CACF,EAGF,MAAO,CAAE,eAAgBU,EAAsB,kBAAAkC,CAAA,CACjD"}
@@ -58,6 +58,7 @@ import "../../../api/queries/attributes/getAttributes.es.js";
58
58
  import "../../../api/queries/attributes/updateAttributes.es.js";
59
59
  import "../../../api/queries/authentication/getAuthentication.es.js";
60
60
  import "../../../api/queries/cloud/cloud.es.js";
61
+ import "../../../api/queries/columnStats/metricTargets.es.js";
61
62
  import "../../../api/queries/config/getConfig.es.js";
62
63
  import "../../../api/queries/config/updateConfig.es.js";
63
64
  import "../../../api/queries/entities/getEntity.es.js";
@@ -135,7 +136,7 @@ const j = (O, d, u) => {
135
136
  default:
136
137
  return `Failed to update ${d}: ${u}`;
137
138
  }
138
- }, re = (O) => {
139
+ }, or = (O) => {
139
140
  const { pushHistory: d, removeHistoryEntries: u } = O || {}, { projectName: F } = Q(), {
140
141
  getEntityById: g,
141
142
  getInheritedDependents: $,
@@ -153,10 +154,10 @@ const j = (O, d, u) => {
153
154
  return;
154
155
  if (d && v) {
155
156
  const t = h.map(
156
- ({ rowId: s, id: e, type: n, field: o, isAttrib: f, meta: I }) => {
157
- const m = g(e);
157
+ ({ rowId: s, id: r, type: n, field: o, isAttrib: f, meta: I }) => {
158
+ const m = g(r);
158
159
  if (!m)
159
- throw "Entity not found: " + e;
160
+ throw "Entity not found: " + r;
160
161
  const p = m?.entityId || m.id, w = f ? m.attrib?.[o] ?? null : m[o] ?? null, D = m?.ownAttrib || [], y = f && !D.includes(o);
161
162
  return {
162
163
  rowId: s,
@@ -173,8 +174,8 @@ const j = (O, d, u) => {
173
174
  };
174
175
  }
175
176
  ), c = h.flatMap(
176
- ({ rowId: s, id: e, type: n, field: o, value: f, isAttrib: I, meta: m }) => {
177
- const p = g(e), w = p?.entityId || p?.id || e;
177
+ ({ rowId: s, id: r, type: n, field: o, value: f, isAttrib: I, meta: m }) => {
178
+ const p = g(r), w = p?.entityId || p?.id || r;
178
179
  return p ? {
179
180
  rowId: s,
180
181
  id: w,
@@ -198,15 +199,15 @@ const j = (O, d, u) => {
198
199
  ];
199
200
  let i = [];
200
201
  for (const t of h) {
201
- let { id: c, type: s, field: e, value: n, isAttrib: o, meta: f } = t;
202
+ let { id: c, type: s, field: r, value: n, isAttrib: o, meta: f } = t;
202
203
  const I = g(c), m = I?.entityId || I?.id || c;
203
204
  let p = s;
204
205
  if (!A.includes(p))
205
206
  continue;
206
- const w = o ? { attrib: { [e]: n } } : { [e]: n };
207
+ const w = o ? { attrib: { [r]: n } } : { [r]: n };
207
208
  if (o) {
208
209
  const y = [...I?.ownAttrib || []];
209
- y.includes(e) || y.push(e), w.ownAttrib = y;
210
+ y.includes(r) || y.push(r), w.ownAttrib = y;
210
211
  }
211
212
  const D = i.findIndex(
212
213
  (y) => y.entityId === m && y.entityType === p
@@ -246,7 +247,7 @@ const j = (O, d, u) => {
246
247
  });
247
248
  } catch (t) {
248
249
  console.error("Error updating entities:", t), i.length === 1 ? t.errorCodes.forEach((c) => {
249
- const s = i[0], e = g(s.entityId), n = e?.label || e?.name || s.entityId || "", o = j(c, s.entityType, n);
250
+ const s = i[0], r = g(s.entityId), n = r?.label || r?.name || s.entityId || "", o = j(c, s.entityType, n);
250
251
  x.error(o);
251
252
  }) : x.error("Failed to update entities"), d && v && u && u(1);
252
253
  }
@@ -266,13 +267,13 @@ const j = (O, d, u) => {
266
267
  return;
267
268
  if (v && d) {
268
269
  const i = [];
269
- for (const r of b) {
270
- const a = g(r.entityId);
271
- for (const t of r.attribs)
270
+ for (const e of b) {
271
+ const a = g(e.entityId);
272
+ for (const t of e.attribs)
272
273
  a?.attrib && t in a.attrib && i.push({
273
- rowId: r.rowId,
274
- id: a?.entityId || a?.id || r.entityId,
275
- type: r.entityType,
274
+ rowId: e.rowId,
275
+ id: a?.entityId || a?.id || e.entityId,
276
+ type: e.entityType,
276
277
  field: t,
277
278
  value: a.attrib[t],
278
279
  isAttrib: !0,
@@ -284,18 +285,18 @@ const j = (O, d, u) => {
284
285
  });
285
286
  }
286
287
  const l = b.flatMap(
287
- (r) => r.attribs.map((a) => ({
288
- rowId: r.rowId,
289
- id: r.entityId,
290
- type: r.entityType,
288
+ (e) => e.attribs.map((a) => ({
289
+ rowId: e.rowId,
290
+ id: e.entityId,
291
+ type: e.entityType,
291
292
  field: a,
292
293
  value: null,
293
294
  isAttrib: !0,
294
295
  wasInherited: !0,
295
296
  // Mark as inherited
296
- ownAttrib: r.ownAttrib,
297
- folderId: r.folderId,
298
- meta: r.meta
297
+ ownAttrib: e.ownAttrib,
298
+ folderId: e.folderId,
299
+ meta: e.meta
299
300
  }))
300
301
  );
301
302
  i.length > 0 && d(i, l);
@@ -306,16 +307,16 @@ const j = (O, d, u) => {
306
307
  if (!h.includes(l))
307
308
  continue;
308
309
  l = l;
309
- const r = {};
310
+ const e = {};
310
311
  i.attribs.forEach((n) => {
311
- r[n] = null;
312
+ e[n] = null;
312
313
  }), T.push({
313
314
  entityType: l,
314
315
  entityId: i.entityId,
315
316
  rowId: i.rowId,
316
317
  type: "update",
317
318
  data: {
318
- attrib: r
319
+ attrib: e
319
320
  },
320
321
  meta: i.meta
321
322
  });
@@ -327,12 +328,12 @@ const j = (O, d, u) => {
327
328
  return o.length > 0 ? o[o.length - 1] : null;
328
329
  })(), c = t?.attribs || [], s = i.attribs.filter(
329
330
  (n) => c.includes(n)
330
- ), e = i.attribs.filter(
331
+ ), r = i.attribs.filter(
331
332
  (n) => !c.includes(n)
332
333
  );
333
- e.length > 0 && E.push({
334
+ r.length > 0 && E.push({
334
335
  ...i,
335
- attribs: e
336
+ attribs: r
336
337
  }), t && s.length > 0 && E.push({
337
338
  ...i,
338
339
  attribs: s,
@@ -341,29 +342,29 @@ const j = (O, d, u) => {
341
342
  }
342
343
  const A = [];
343
344
  for (const i of E) {
344
- const l = i.entityType, r = [...i.ownAttrib || []].filter(
345
- (e) => !i.attribs.includes(e)
345
+ const l = i.entityType, e = [...i.ownAttrib || []].filter(
346
+ (r) => !i.attribs.includes(r)
346
347
  ), a = V(i.folderId, i.attribs), t = {
347
348
  entityId: i.entityId,
348
349
  entityType: l,
349
350
  data: {
350
351
  attrib: a,
351
- ownAttrib: r
352
+ ownAttrib: e
352
353
  }
353
354
  };
354
355
  A.push(t);
355
356
  const s = $([
356
357
  { entityId: i.entityId, entityType: l, attrib: a }
357
- ]).map((e) => ({
358
- entityId: e.entityId,
359
- entityType: e.entityType,
358
+ ]).map((r) => ({
359
+ entityId: r.entityId,
360
+ entityType: r.entityType,
360
361
  data: {
361
- attrib: e.attrib
362
+ attrib: r.attrib
362
363
  }
363
364
  }));
364
- for (const e of s) {
365
+ for (const r of s) {
365
366
  const n = A.findIndex(
366
- (o) => o.entityId === e.entityId
367
+ (o) => o.entityId === r.entityId
367
368
  );
368
369
  if (n !== -1) {
369
370
  const o = A[n];
@@ -371,7 +372,7 @@ const j = (O, d, u) => {
371
372
  // @ts-ignore
372
373
  ...o.data?.attrib || {},
373
374
  // @ts-ignore
374
- ...e.data?.attrib || {}
375
+ ...r.data?.attrib || {}
375
376
  };
376
377
  A[n] = {
377
378
  ...o,
@@ -379,9 +380,9 @@ const j = (O, d, u) => {
379
380
  };
380
381
  } else
381
382
  A.push({
382
- entityId: e.entityId,
383
- entityType: e.entityType,
384
- data: e.data
383
+ entityId: r.entityId,
384
+ entityType: r.entityType,
385
+ data: r.data
385
386
  });
386
387
  }
387
388
  }
@@ -392,7 +393,7 @@ const j = (O, d, u) => {
392
393
  });
393
394
  } catch (i) {
394
395
  T.length === 1 ? i.errorCodes.forEach((l) => {
395
- const r = T[0], a = g(r.entityId), t = a?.label || a?.name || r.entityId || "", c = j(l, r.entityType, t);
396
+ const e = T[0], a = g(e.entityId), t = a?.label || a?.name || e.entityId || "", c = j(l, e.entityType, t);
396
397
  x.error(c);
397
398
  }) : x.error("Failed to update entities"), v && d && u && u(1);
398
399
  }
@@ -409,6 +410,6 @@ const j = (O, d, u) => {
409
410
  return { updateEntities: M, inheritFromParent: q };
410
411
  };
411
412
  export {
412
- re as default
413
+ or as default
413
414
  };
414
415
  //# sourceMappingURL=useUpdateTableData.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdateTableData.es.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","e","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorAttrib","entityPatch","inheritedDependent","newAttrib"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAkB,CACtBC,GACAC,GACAC,MACW;AACX,UAAQF,GAAA;AAAA,IACN,KAAK;AACH,aAAO,GAAGC,CAAU,mBAAmBC,CAAU;AAAA,IACnD,KAAK;AACH,aAAO,GAAGD,CAAU,KAAKC,CAAU;AAAA,IACrC,KAAK;AACH,aAAO,GAAGD,CAAU,KAAKC,CAAU;AAAA,IACrC,KAAK;AACH,aAAO,GAAGD,CAAU,KAAKC,CAAU;AAAA,IACrC;AACE,aAAO,oBAAoBD,CAAU,KAAKC,CAAU;AAAA,EAAA;AAE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AAA,QACrB,CAAC,IAEDzB,EAAM,MAAM,2BAA2B,GAIrCN,KAAiBd,KAAeC,KAClCA,EAAqB,CAAC;AAAA,MAE1B;AAAA,IACF;AAAA,IACA;AAAA,MACEC;AAAA,MACAO;AAAA,MACAJ;AAAA,MACAC;AAAA,MACAN;AAAA,MACAC;AAAA,IAAA;AAAA,EACF;AAGF,SAAO,EAAE,gBAAgBU,GAAsB,mBAAAmC,EAAA;AACjD;"}
1
+ {"version":3,"file":"useUpdateTableData.es.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","e","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorAttrib","entityPatch","inheritedDependent","newAttrib"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAkB,CACtBC,GACAC,GACAC,MACW;AACX,UAAQF,GAAA;AAAA,IACN,KAAK;AACH,aAAO,GAAGC,CAAU,mBAAmBC,CAAU;AAAA,IACnD,KAAK;AACH,aAAO,GAAGD,CAAU,KAAKC,CAAU;AAAA,IACrC,KAAK;AACH,aAAO,GAAGD,CAAU,KAAKC,CAAU;AAAA,IACrC,KAAK;AACH,aAAO,GAAGD,CAAU,KAAKC,CAAU;AAAA,IACrC;AACE,aAAO,oBAAoBD,CAAU,KAAKC,CAAU;AAAA,EAAA;AAE1D,GAyCMC,KAAqB,CAACC,MAAoC;AAC9D,QAAM,EAAE,aAAAC,GAAa,sBAAAC,EAAA,IAAyBF,KAAS,CAAA,GACjD,EAAE,aAAAG,EAAA,IAAgBC,EAAA,GAClB;AAAA,IACJ,eAAAC;AAAA,IAC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;AAAA,MACAN;AAAA,MACAC;AAAA,IAAA;AAAA,EACF;AAGF,SAAO,EAAE,gBAAgBU,GAAsB,mBAAAmC,EAAA;AACjD;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a="count",s=o=>o==="count"||o==="both",c=o=>o==="percent"||o==="both",e=(o,t)=>o&&t?"both":o?"count":t?"percent":"none",n="all",r=o=>o==="all"||o==="primary",l=o=>o==="all"||o==="secondary",m=(o,t)=>o&&t?"all":o?"primary":t?"secondary":"none",u={primary:"folders",secondary:"tasks"};exports.DEFAULT_MAIN_COUNT_LABELS=u;exports.DEFAULT_ROW_SCOPE=n;exports.DEFAULT_SUMMARY_FORMAT=a;exports.buildRowScope=m;exports.buildSummaryFormat=e;exports.formatHasCount=s;exports.formatHasPercent=c;exports.scopeHasGroups=r;exports.scopeHasRows=l;
2
+ //# sourceMappingURL=summaryTypes.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summaryTypes.cjs.js","sources":["../../../../../../src/containers/ProjectTreeTable/types/summaryTypes.ts"],"sourcesContent":["export type SummaryKind =\n | 'main'\n | 'number'\n | 'boolean'\n | 'text'\n | 'enum'\n | 'assignee'\n | 'blank'\n\nexport type NumberCalc = 'sum' | 'avg' | 'min' | 'max' | 'none'\nexport type BooleanCalc = 'checked' | 'notChecked'\nexport type TextCalc = 'filled' | 'notFilled'\n// enum bar mode: value distribution vs filled/empty split\nexport type EnumCalc = 'values' | 'fill'\n\nexport type SummaryCalc = NumberCalc | BooleanCalc | TextCalc | EnumCalc\n\n// Display format for count-style summaries, driven by the Count/Percentage toggles.\nexport type SummaryFormat = 'count' | 'percent' | 'both' | 'none'\nexport const DEFAULT_SUMMARY_FORMAT: SummaryFormat = 'count'\n\nexport const formatHasCount = (f: SummaryFormat): boolean => f === 'count' || f === 'both'\nexport const formatHasPercent = (f: SummaryFormat): boolean => f === 'percent' || f === 'both'\nexport const buildSummaryFormat = (count: boolean, percent: boolean): SummaryFormat =>\n count && percent ? 'both' : count ? 'count' : percent ? 'percent' : 'none'\n\n\nexport type RowScope = 'all' | 'primary' | 'secondary' | 'none'\nexport const DEFAULT_ROW_SCOPE: RowScope = 'all'\n\nexport const scopeHasGroups = (s: RowScope): boolean => s === 'all' || s === 'primary'\nexport const scopeHasRows = (s: RowScope): boolean => s === 'all' || s === 'secondary'\nexport const buildRowScope = (groups: boolean, rows: boolean): RowScope =>\n groups && rows ? 'all' : groups ? 'primary' : rows ? 'secondary' : 'none'\n\nexport type SummaryDistributionItem = {\n value: string\n label?: string\n color?: string\n icon?: string\n avatarUrl?: string\n fullName?: string\n count: number\n}\n\n// Mirrors backend ColumnStats plus pending distribution/sum fields.\nexport type ColumnSummary = {\n columnId: string\n\n filledCount?: number\n notFilledCount?: number\n percentageFilled?: number\n percentageNotFilled?: number\n\n checkedCount?: number\n notCheckedCount?: number\n percentageChecked?: number\n percentageNotChecked?: number\n\n sum?: number\n avg?: number\n min?: number\n max?: number\n\n distribution?: SummaryDistributionItem[]\n total?: number\n\n // main/count column: primary/secondary entity totals (folders/tasks, products/versions)\n primaryCount?: number\n secondaryCount?: number\n}\n\nexport type ColumnSummaryMap = Record<string, ColumnSummary>\n\n// Labels for the main/count cell's dual count. Defaults to folders/tasks (Overview);\n// Versions/Products page overrides with products/versions.\nexport type MainCountLabels = {\n primary: string\n secondary?: string\n}\n\nexport const DEFAULT_MAIN_COUNT_LABELS: MainCountLabels = {\n primary: 'folders',\n secondary: 'tasks',\n}\n"],"names":["DEFAULT_SUMMARY_FORMAT","formatHasCount","f","formatHasPercent","buildSummaryFormat","count","percent","DEFAULT_ROW_SCOPE","scopeHasGroups","s","scopeHasRows","buildRowScope","groups","rows","DEFAULT_MAIN_COUNT_LABELS"],"mappings":"gFAmBO,MAAMA,EAAwC,QAExCC,EAAkBC,GAA8BA,IAAM,SAAWA,IAAM,OACvEC,EAAoBD,GAA8BA,IAAM,WAAaA,IAAM,OAC3EE,EAAqB,CAACC,EAAgBC,IACjDD,GAASC,EAAU,OAASD,EAAQ,QAAUC,EAAU,UAAY,OAIzDC,EAA8B,MAE9BC,EAAkBC,GAAyBA,IAAM,OAASA,IAAM,UAChEC,EAAgBD,GAAyBA,IAAM,OAASA,IAAM,YAC9DE,EAAgB,CAACC,EAAiBC,IAC7CD,GAAUC,EAAO,MAAQD,EAAS,UAAYC,EAAO,YAAc,OAgDxDC,EAA6C,CACxD,QAAS,UACT,UAAW,OACb"}
@@ -0,0 +1,16 @@
1
+ const n = "count", a = (o) => o === "count" || o === "both", c = (o) => o === "percent" || o === "both", s = (o, t) => o && t ? "both" : o ? "count" : t ? "percent" : "none", r = "all", e = (o) => o === "all" || o === "primary", l = (o) => o === "all" || o === "secondary", m = (o, t) => o && t ? "all" : o ? "primary" : t ? "secondary" : "none", p = {
2
+ primary: "folders",
3
+ secondary: "tasks"
4
+ };
5
+ export {
6
+ p as DEFAULT_MAIN_COUNT_LABELS,
7
+ r as DEFAULT_ROW_SCOPE,
8
+ n as DEFAULT_SUMMARY_FORMAT,
9
+ m as buildRowScope,
10
+ s as buildSummaryFormat,
11
+ a as formatHasCount,
12
+ c as formatHasPercent,
13
+ e as scopeHasGroups,
14
+ l as scopeHasRows
15
+ };
16
+ //# sourceMappingURL=summaryTypes.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summaryTypes.es.js","sources":["../../../../../../src/containers/ProjectTreeTable/types/summaryTypes.ts"],"sourcesContent":["export type SummaryKind =\n | 'main'\n | 'number'\n | 'boolean'\n | 'text'\n | 'enum'\n | 'assignee'\n | 'blank'\n\nexport type NumberCalc = 'sum' | 'avg' | 'min' | 'max' | 'none'\nexport type BooleanCalc = 'checked' | 'notChecked'\nexport type TextCalc = 'filled' | 'notFilled'\n// enum bar mode: value distribution vs filled/empty split\nexport type EnumCalc = 'values' | 'fill'\n\nexport type SummaryCalc = NumberCalc | BooleanCalc | TextCalc | EnumCalc\n\n// Display format for count-style summaries, driven by the Count/Percentage toggles.\nexport type SummaryFormat = 'count' | 'percent' | 'both' | 'none'\nexport const DEFAULT_SUMMARY_FORMAT: SummaryFormat = 'count'\n\nexport const formatHasCount = (f: SummaryFormat): boolean => f === 'count' || f === 'both'\nexport const formatHasPercent = (f: SummaryFormat): boolean => f === 'percent' || f === 'both'\nexport const buildSummaryFormat = (count: boolean, percent: boolean): SummaryFormat =>\n count && percent ? 'both' : count ? 'count' : percent ? 'percent' : 'none'\n\n\nexport type RowScope = 'all' | 'primary' | 'secondary' | 'none'\nexport const DEFAULT_ROW_SCOPE: RowScope = 'all'\n\nexport const scopeHasGroups = (s: RowScope): boolean => s === 'all' || s === 'primary'\nexport const scopeHasRows = (s: RowScope): boolean => s === 'all' || s === 'secondary'\nexport const buildRowScope = (groups: boolean, rows: boolean): RowScope =>\n groups && rows ? 'all' : groups ? 'primary' : rows ? 'secondary' : 'none'\n\nexport type SummaryDistributionItem = {\n value: string\n label?: string\n color?: string\n icon?: string\n avatarUrl?: string\n fullName?: string\n count: number\n}\n\n// Mirrors backend ColumnStats plus pending distribution/sum fields.\nexport type ColumnSummary = {\n columnId: string\n\n filledCount?: number\n notFilledCount?: number\n percentageFilled?: number\n percentageNotFilled?: number\n\n checkedCount?: number\n notCheckedCount?: number\n percentageChecked?: number\n percentageNotChecked?: number\n\n sum?: number\n avg?: number\n min?: number\n max?: number\n\n distribution?: SummaryDistributionItem[]\n total?: number\n\n // main/count column: primary/secondary entity totals (folders/tasks, products/versions)\n primaryCount?: number\n secondaryCount?: number\n}\n\nexport type ColumnSummaryMap = Record<string, ColumnSummary>\n\n// Labels for the main/count cell's dual count. Defaults to folders/tasks (Overview);\n// Versions/Products page overrides with products/versions.\nexport type MainCountLabels = {\n primary: string\n secondary?: string\n}\n\nexport const DEFAULT_MAIN_COUNT_LABELS: MainCountLabels = {\n primary: 'folders',\n secondary: 'tasks',\n}\n"],"names":["DEFAULT_SUMMARY_FORMAT","formatHasCount","f","formatHasPercent","buildSummaryFormat","count","percent","DEFAULT_ROW_SCOPE","scopeHasGroups","s","scopeHasRows","buildRowScope","groups","rows","DEFAULT_MAIN_COUNT_LABELS"],"mappings":"AAmBO,MAAMA,IAAwC,SAExCC,IAAiB,CAACC,MAA8BA,MAAM,WAAWA,MAAM,QACvEC,IAAmB,CAACD,MAA8BA,MAAM,aAAaA,MAAM,QAC3EE,IAAqB,CAACC,GAAgBC,MACjDD,KAASC,IAAU,SAASD,IAAQ,UAAUC,IAAU,YAAY,QAIzDC,IAA8B,OAE9BC,IAAiB,CAACC,MAAyBA,MAAM,SAASA,MAAM,WAChEC,IAAe,CAACD,MAAyBA,MAAM,SAASA,MAAM,aAC9DE,IAAgB,CAACC,GAAiBC,MAC7CD,KAAUC,IAAO,QAAQD,IAAS,YAAYC,IAAO,cAAc,QAgDxDC,IAA6C;AAAA,EACxD,SAAS;AAAA,EACT,WAAW;AACb;"}