@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.
- package/dist/DetailsPanel.cjs.js +1 -1
- package/dist/DetailsPanel.es.js +24 -22
- package/dist/DetailsPanel.es.js.map +1 -1
- package/dist/ProjectTreeTable.cjs.js +1 -1
- package/dist/ProjectTreeTable.es.js +213 -197
- package/dist/ProjectTreeTable.es.js.map +1 -1
- package/dist/Slicer.cjs.js +1 -1
- package/dist/Slicer.es.js +19 -18
- package/dist/Slicer.es.js.map +1 -1
- package/dist/_virtual/index.cjs22.js +1 -1
- package/dist/_virtual/index.cjs23.js +1 -1
- package/dist/_virtual/index.cjs24.js +1 -1
- package/dist/_virtual/index.cjs4.js +1 -1
- package/dist/_virtual/index.cjs5.js +1 -1
- package/dist/_virtual/index.cjs6.js +1 -1
- package/dist/_virtual/index.cjs8.js +1 -1
- package/dist/_virtual/index.es19.js +2 -2
- package/dist/_virtual/index.es20.js +2 -2
- package/dist/_virtual/index.es22.js +3 -3
- package/dist/_virtual/index.es23.js +5 -5
- package/dist/_virtual/index.es24.js +5 -5
- package/dist/_virtual/index.es4.js +2 -5
- package/dist/_virtual/index.es4.js.map +1 -1
- package/dist/_virtual/index.es5.js +5 -2
- package/dist/_virtual/index.es5.js.map +1 -1
- package/dist/_virtual/index.es6.js +2 -2
- package/dist/_virtual/index.es8.js +2 -2
- package/dist/api.cjs.js +1 -1
- package/dist/api.es.js +453 -434
- package/dist/api.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +11 -9
- package/dist/index.es.js.map +1 -1
- package/dist/node_modules/match-sorter/dist/match-sorter.esm.cjs.js +1 -1
- package/dist/node_modules/match-sorter/dist/match-sorter.esm.es.js +1 -1
- package/dist/node_modules/parse-numeric-range/index.cjs.js +1 -1
- package/dist/node_modules/parse-numeric-range/index.es.js +1 -1
- package/dist/node_modules/rehype/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/node_modules/rehype/node_modules/unified/lib/index.es.js +2 -2
- package/dist/node_modules/rehype/node_modules/vfile/lib/index.cjs.js +1 -1
- package/dist/node_modules/rehype/node_modules/vfile/lib/index.es.js +1 -1
- package/dist/node_modules/rehype-parse/lib/index.cjs.js +1 -1
- package/dist/node_modules/rehype-parse/lib/index.es.js +1 -1
- package/dist/node_modules/remove-accents/index.cjs.js +1 -1
- package/dist/node_modules/remove-accents/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/error-codes/dist/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/error-codes/dist/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime/dist/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime/dist/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.es.js +1 -1
- package/dist/shared/node_modules/prop-types/index.cjs.js +1 -1
- package/dist/shared/node_modules/prop-types/index.es.js +1 -1
- package/dist/shared/src/api/base/client.cjs.js +1 -1
- package/dist/shared/src/api/base/client.cjs.js.map +1 -1
- package/dist/shared/src/api/base/client.es.js +21 -17
- package/dist/shared/src/api/base/client.es.js.map +1 -1
- package/dist/shared/src/api/generated/folders.cjs.js +1 -1
- package/dist/shared/src/api/generated/folders.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/folders.es.js +2 -14
- package/dist/shared/src/api/generated/folders.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.cjs.js +237 -55
- package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.es.js +361 -161
- package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.es.js.map +1 -1
- package/dist/shared/src/api/queries/activities/activityQueries.cjs.js +1 -0
- package/dist/shared/src/api/queries/activities/activityQueries.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/activities/activityQueries.es.js +1 -0
- package/dist/shared/src/api/queries/activities/activityQueries.es.js.map +1 -1
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.cjs.js +1 -1
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.es.js +33 -21
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.es.js.map +1 -1
- package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.cjs.js +1 -1
- package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.es.js +74 -60
- package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.es.js.map +1 -1
- package/dist/shared/src/api/queries/columnStats/columnStats.cjs.js +2 -0
- package/dist/shared/src/api/queries/columnStats/columnStats.cjs.js.map +1 -0
- package/dist/shared/src/api/queries/columnStats/columnStats.es.js +96 -0
- package/dist/shared/src/api/queries/columnStats/columnStats.es.js.map +1 -0
- package/dist/shared/src/api/queries/columnStats/metricTargets.cjs.js +2 -0
- package/dist/shared/src/api/queries/columnStats/metricTargets.cjs.js.map +1 -0
- package/dist/shared/src/api/queries/columnStats/metricTargets.es.js +88 -0
- package/dist/shared/src/api/queries/columnStats/metricTargets.es.js.map +1 -0
- package/dist/shared/src/api/queries/entities/getEntityPanel.cjs.js +1 -1
- package/dist/shared/src/api/queries/entities/getEntityPanel.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/entities/getEntityPanel.es.js +62 -48
- package/dist/shared/src/api/queries/entities/getEntityPanel.es.js.map +1 -1
- package/dist/shared/src/api/queries/entities/transformDetailsPanelData.cjs.js +1 -1
- package/dist/shared/src/api/queries/entities/transformDetailsPanelData.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/entities/transformDetailsPanelData.es.js +7 -3
- package/dist/shared/src/api/queries/entities/transformDetailsPanelData.es.js.map +1 -1
- package/dist/shared/src/api/queries/entityLists/getLists.cjs.js +1 -1
- package/dist/shared/src/api/queries/entityLists/getLists.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/entityLists/getLists.es.js +94 -79
- package/dist/shared/src/api/queries/entityLists/getLists.es.js.map +1 -1
- package/dist/shared/src/api/queries/folders/getFolders.cjs.js +1 -1
- package/dist/shared/src/api/queries/folders/getFolders.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/folders/getFolders.es.js +104 -71
- package/dist/shared/src/api/queries/folders/getFolders.es.js.map +1 -1
- package/dist/shared/src/api/queries/overview/getOverview.cjs.js +1 -1
- package/dist/shared/src/api/queries/overview/getOverview.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/overview/getOverview.es.js +265 -216
- package/dist/shared/src/api/queries/overview/getOverview.es.js.map +1 -1
- package/dist/shared/src/api/queries/overview/updateOverview.cjs.js +1 -1
- package/dist/shared/src/api/queries/overview/updateOverview.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/overview/updateOverview.es.js +198 -183
- package/dist/shared/src/api/queries/overview/updateOverview.es.js.map +1 -1
- package/dist/shared/src/api/queries/userDashboard/getUserDashboard.cjs.js +1 -1
- package/dist/shared/src/api/queries/userDashboard/getUserDashboard.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/userDashboard/getUserDashboard.es.js +138 -107
- package/dist/shared/src/api/queries/userDashboard/getUserDashboard.es.js.map +1 -1
- package/dist/shared/src/api/queries/versions/getVersionsProducts.cjs.js +1 -1
- package/dist/shared/src/api/queries/versions/getVersionsProducts.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/versions/getVersionsProducts.es.js +332 -239
- package/dist/shared/src/api/queries/versions/getVersionsProducts.es.js.map +1 -1
- package/dist/shared/src/api/queries/views/updateViews.cjs.js +1 -1
- package/dist/shared/src/api/queries/views/updateViews.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/views/updateViews.es.js +38 -38
- package/dist/shared/src/api/queries/views/updateViews.es.js.map +1 -1
- package/dist/shared/src/components/ColumnHeaderMenuUI.cjs.js +1 -1
- package/dist/shared/src/components/ColumnHeaderMenuUI.cjs.js.map +1 -1
- package/dist/shared/src/components/ColumnHeaderMenuUI.es.js +3 -2
- package/dist/shared/src/components/ColumnHeaderMenuUI.es.js.map +1 -1
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js +1 -1
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js +3 -2
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js +4 -2
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.es.js +3 -2
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.es.js +3 -2
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js +3 -2
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js.map +1 -1
- package/dist/shared/src/components/EntityIcon/EntityIcon.cjs.js +1 -1
- package/dist/shared/src/components/EntityIcon/EntityIcon.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityIcon/EntityIcon.es.js +3 -2
- package/dist/shared/src/components/EntityIcon/EntityIcon.es.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js +137 -158
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.cjs.js +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.es.js +4 -2
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.es.js.map +1 -1
- package/dist/shared/src/components/EntityPath/SegmentProvider.cjs.js +1 -1
- package/dist/shared/src/components/EntityPath/SegmentProvider.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityPath/SegmentProvider.es.js +3 -2
- package/dist/shared/src/components/EntityPath/SegmentProvider.es.js.map +1 -1
- package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js +1 -1
- package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js.map +1 -1
- package/dist/shared/src/components/Feedback/FeedbackContext.es.js +5 -4
- package/dist/shared/src/components/Feedback/FeedbackContext.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/AddNewLinks.es.js +3 -2
- package/dist/shared/src/components/LinksManager/AddNewLinks.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js +3 -2
- package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.es.js +3 -2
- package/dist/shared/src/components/LinksManager/LinksManager.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.es.js +4 -2
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.es.js.map +1 -1
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js +1 -1
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js.map +1 -1
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.es.js +3 -2
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.es.js.map +1 -1
- package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js +1 -1
- package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js.map +1 -1
- package/dist/shared/src/components/ListMetaData/ListMetaData.es.js +3 -2
- package/dist/shared/src/components/ListMetaData/ListMetaData.es.js.map +1 -1
- package/dist/shared/src/components/Menu/Menu.cjs.js +1 -1
- package/dist/shared/src/components/Menu/Menu.cjs.js.map +1 -1
- package/dist/shared/src/components/Menu/Menu.es.js +3 -2
- package/dist/shared/src/components/Menu/Menu.es.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuItem.cjs.js +1 -1
- package/dist/shared/src/components/Menu/MenuItem.cjs.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuItem.es.js +1 -0
- package/dist/shared/src/components/Menu/MenuItem.es.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuList.cjs.js +1 -1
- package/dist/shared/src/components/Menu/MenuList.cjs.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuList.es.js +3 -2
- package/dist/shared/src/components/Menu/MenuList.es.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackButton.es.js +3 -2
- package/dist/shared/src/components/Powerpack/PowerpackButton.es.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js +3 -2
- package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js.map +1 -1
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.cjs.js +1 -1
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.cjs.js.map +1 -1
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.es.js +3 -2
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js +79 -77
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js +6 -4
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js +1 -1
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js +3 -2
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js.map +1 -1
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.cjs.js +1 -1
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.cjs.js.map +1 -1
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.es.js +4 -2
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.es.js.map +1 -1
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js +1 -1
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js.map +1 -1
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js +4 -2
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js.map +1 -1
- package/dist/shared/src/components/RenameForm/RenameForm.cjs.js +1 -1
- package/dist/shared/src/components/RenameForm/RenameForm.cjs.js.map +1 -1
- package/dist/shared/src/components/RenameForm/RenameForm.es.js +4 -2
- package/dist/shared/src/components/RenameForm/RenameForm.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js +3 -2
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js +4 -2
- package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.es.js +5 -3
- package/dist/shared/src/components/ReviewablesList/ReviewablesUpload.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js +4 -2
- package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js +3 -2
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesSelector/Card.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesSelector/Card.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesSelector/Card.es.js +4 -2
- package/dist/shared/src/components/ReviewablesSelector/Card.es.js.map +1 -1
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js +1 -1
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js.map +1 -1
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js +7 -6
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js.map +1 -1
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js +1 -1
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js.map +1 -1
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js +3 -2
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/FormFile.cjs.js +1 -1
- package/dist/shared/src/components/SimpleFormDialog/FormFile.cjs.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/FormFile.es.js +6 -4
- package/dist/shared/src/components/SimpleFormDialog/FormFile.es.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js +1 -1
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js +4 -2
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js.map +1 -1
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.cjs.js +1 -1
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.cjs.js.map +1 -1
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.es.js +3 -2
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.es.js.map +1 -1
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.cjs.js +2 -2
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.cjs.js.map +1 -1
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.es.js +11 -10
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.es.js.map +1 -1
- package/dist/shared/src/components/Thumbnail/Thumbnail.cjs.js +1 -1
- package/dist/shared/src/components/Thumbnail/Thumbnail.cjs.js.map +1 -1
- package/dist/shared/src/components/Thumbnail/Thumbnail.es.js +49 -44
- package/dist/shared/src/components/Thumbnail/Thumbnail.es.js.map +1 -1
- package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.cjs.js +3 -3
- package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.cjs.js.map +1 -1
- package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.es.js +32 -22
- package/dist/shared/src/components/ThumbnailSimple/ThumbnailSimple.es.js.map +1 -1
- package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js +1 -1
- package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.cjs.js.map +1 -1
- package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.es.js +4 -2
- package/dist/shared/src/components/VersionUploader/components/UploadVersionForm.es.js.map +1 -1
- package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.cjs.js +1 -1
- package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.cjs.js.map +1 -1
- package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.es.js +8 -6
- package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.es.js.map +1 -1
- package/dist/shared/src/components/Watchers/Watchers.cjs.js +1 -1
- package/dist/shared/src/components/Watchers/Watchers.cjs.js.map +1 -1
- package/dist/shared/src/components/Watchers/Watchers.es.js +3 -2
- package/dist/shared/src/components/Watchers/Watchers.es.js.map +1 -1
- package/dist/shared/src/config/powerpackFeatures.cjs.js +1 -1
- package/dist/shared/src/config/powerpackFeatures.cjs.js.map +1 -1
- package/dist/shared/src/config/powerpackFeatures.es.js +7 -1
- package/dist/shared/src/config/powerpackFeatures.es.js.map +1 -1
- package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js +1 -1
- package/dist/shared/src/containers/Actions/ActionConfigDialog.cjs.js.map +1 -1
- package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js +4 -2
- package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js.map +1 -1
- package/dist/shared/src/containers/Actions/Actions.cjs.js +1 -1
- package/dist/shared/src/containers/Actions/Actions.cjs.js.map +1 -1
- package/dist/shared/src/containers/Actions/Actions.es.js +3 -2
- package/dist/shared/src/containers/Actions/Actions.es.js.map +1 -1
- package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js +1 -1
- package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js.map +1 -1
- package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js +4 -2
- package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanel.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.es.js +41 -38
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js +3 -2
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js +18 -16
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.es.js +13 -11
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.es.js +14 -14
- package/dist/shared/src/containers/DetailsPanel/helpers/getThumbnails.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.es.js +13 -9
- package/dist/shared/src/containers/DetailsPanel/hooks/useGetEntityPath.es.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.cjs.js +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.cjs.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.es.js +4 -2
- package/dist/shared/src/containers/EntityPickerDialog/EntityPickerDialog.es.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.cjs.js +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.es.js +4 -2
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTable.es.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.cjs.js +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.cjs.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.es.js +4 -2
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableHeader.es.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.cjs.js +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.cjs.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.es.js +4 -2
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.es.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.cjs.js +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.cjs.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.es.js +3 -2
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/Feed.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/Feed.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/Feed.es.js +5 -4
- package/dist/shared/src/containers/Feed/Feed.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.es.js +4 -2
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.es.js +4 -2
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.es.js +4 -2
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js +28 -27
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.es.js +4 -2
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.es.js +8 -6
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.es.js +37 -44
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/context/FeedContext.es.js +6 -5
- package/dist/shared/src/containers/Feed/context/FeedContext.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.es.js +14 -13
- package/dist/shared/src/containers/Feed/helpers/groupActivityVersions.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js +3 -2
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTable.cjs.js +1 -1
- package/dist/shared/src/containers/ListTable/ListTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTable.es.js +212 -204
- package/dist/shared/src/containers/ListTable/ListTable.es.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableCell.cjs.js +1 -1
- package/dist/shared/src/containers/ListTable/ListTableCell.cjs.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableCell.es.js +4 -2
- package/dist/shared/src/containers/ListTable/ListTableCell.es.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableHeader.cjs.js +1 -1
- package/dist/shared/src/containers/ListTable/ListTableHeader.cjs.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableHeader.es.js +4 -2
- package/dist/shared/src/containers/ListTable/ListTableHeader.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js +729 -675
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.cjs.js +32 -10
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.es.js +42 -18
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.styled.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js +17 -14
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.es.js +57 -43
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/components/GroupSettingsFallback.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.cjs.js +48 -0
- package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.cjs.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.es.js +103 -0
- package/dist/shared/src/containers/ProjectTreeTable/components/TableFooterRow.es.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/constants.cjs.js +2 -0
- package/dist/shared/src/containers/ProjectTreeTable/constants.cjs.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/constants.es.js +6 -0
- package/dist/shared/src/containers/ProjectTreeTable/constants.es.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js +4 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js +7 -5
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js +215 -181
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js +5 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.es.js +21 -17
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectedRowsProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.es.js +1 -2
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js +17 -11
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js +83 -81
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.es.js +116 -111
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.es.js +6 -3
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCheckSelectedCellsVisible.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFolderRelationships.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFolderRelationships.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGetGroupedFields.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useGroupBySettings.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useKeyboardNavigation.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useMoveEntities.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/usePasteLinks.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js +80 -78
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.es.js +45 -44
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.cjs.js +2 -0
- package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.cjs.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.es.js +16 -0
- package/dist/shared/src/containers/ProjectTreeTable/types/summaryTypes.es.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js +15 -13
- package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.es.js +29 -25
- package/dist/shared/src/containers/ProjectTreeTable/utils/checkColumnVisibility.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.cjs.js +2 -0
- package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.cjs.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.es.js +17 -0
- package/dist/shared/src/containers/ProjectTreeTable/utils/pinningUtils.es.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js +12 -10
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.es.js +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.cjs.js +4 -4
- package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.es.js +24 -19
- package/dist/shared/src/containers/ProjectTreeTable/widgets/ThumbnailWidget.es.js.map +1 -1
- package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js +1 -1
- package/dist/shared/src/containers/RepresentationsList/RepresentationsList.cjs.js.map +1 -1
- package/dist/shared/src/containers/RepresentationsList/RepresentationsList.es.js +4 -2
- package/dist/shared/src/containers/RepresentationsList/RepresentationsList.es.js.map +1 -1
- package/dist/shared/src/containers/SimpleTable/SimpleTable.cjs.js +1 -1
- package/dist/shared/src/containers/SimpleTable/SimpleTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/SimpleTable/SimpleTable.es.js +4 -2
- package/dist/shared/src/containers/SimpleTable/SimpleTable.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.es.js +3 -2
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.es.js +4 -2
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/context/SlicerContext.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/context/SlicerContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/context/SlicerContext.es.js +5 -4
- package/dist/shared/src/containers/Slicer/context/SlicerContext.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.es.js +4 -2
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js +12 -11
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.es.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js +1 -1
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js +3 -2
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js +4 -2
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js +3 -2
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js.map +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.es.js +119 -118
- package/dist/shared/src/containers/Views/context/ViewsContext.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.es.js +18 -16
- package/dist/shared/src/containers/Views/hooks/pages/useListsViewSettings.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.es.js +79 -51
- package/dist/shared/src/containers/Views/hooks/pages/useOverviewViewSettings.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.es.js +19 -17
- package/dist/shared/src/containers/Views/hooks/pages/useTaskProgressViewSettings.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js +3 -2
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js +6 -5
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useSelectedView.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useSelectedView.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useSelectedView.es.js +12 -11
- package/dist/shared/src/containers/Views/hooks/useSelectedView.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js +3 -2
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js.map +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js +78 -65
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js.map +1 -1
- package/dist/shared/src/context/AddonProjectContext.cjs.js +1 -1
- package/dist/shared/src/context/AddonProjectContext.cjs.js.map +1 -1
- package/dist/shared/src/context/AddonProjectContext.es.js +5 -4
- package/dist/shared/src/context/AddonProjectContext.es.js.map +1 -1
- package/dist/shared/src/context/DetailsPanelContext.cjs.js +1 -1
- package/dist/shared/src/context/DetailsPanelContext.cjs.js.map +1 -1
- package/dist/shared/src/context/DetailsPanelContext.es.js +5 -4
- package/dist/shared/src/context/DetailsPanelContext.es.js.map +1 -1
- package/dist/shared/src/context/GlobalContext.cjs.js +1 -1
- package/dist/shared/src/context/GlobalContext.cjs.js.map +1 -1
- package/dist/shared/src/context/GlobalContext.es.js +5 -4
- package/dist/shared/src/context/GlobalContext.es.js.map +1 -1
- package/dist/shared/src/context/PowerpackContext.cjs.js +1 -1
- package/dist/shared/src/context/PowerpackContext.cjs.js.map +1 -1
- package/dist/shared/src/context/PowerpackContext.es.js +7 -6
- package/dist/shared/src/context/PowerpackContext.es.js.map +1 -1
- package/dist/shared/src/context/ProjectContext.cjs.js +1 -1
- package/dist/shared/src/context/ProjectContext.cjs.js.map +1 -1
- package/dist/shared/src/context/ProjectContext.es.js +5 -4
- package/dist/shared/src/context/ProjectContext.es.js.map +1 -1
- package/dist/shared/src/context/ProjectFoldersContext.cjs.js +1 -1
- package/dist/shared/src/context/ProjectFoldersContext.cjs.js.map +1 -1
- package/dist/shared/src/context/ProjectFoldersContext.es.js +5 -4
- package/dist/shared/src/context/ProjectFoldersContext.es.js.map +1 -1
- package/dist/shared/src/context/RemoteModulesContext.cjs.js +1 -1
- package/dist/shared/src/context/RemoteModulesContext.cjs.js.map +1 -1
- package/dist/shared/src/context/RemoteModulesContext.es.js +5 -4
- package/dist/shared/src/context/RemoteModulesContext.es.js.map +1 -1
- package/dist/shared/src/context/SubtasksModulesContext.cjs.js +1 -1
- package/dist/shared/src/context/SubtasksModulesContext.cjs.js.map +1 -1
- package/dist/shared/src/context/SubtasksModulesContext.es.js +5 -4
- package/dist/shared/src/context/SubtasksModulesContext.es.js.map +1 -1
- package/dist/shared/src/context/UriContext.cjs.js +1 -1
- package/dist/shared/src/context/UriContext.cjs.js.map +1 -1
- package/dist/shared/src/context/UriContext.es.js +6 -5
- package/dist/shared/src/context/UriContext.es.js.map +1 -1
- package/dist/shared/src/context/WebsocketContext.cjs.js +1 -1
- package/dist/shared/src/context/WebsocketContext.cjs.js.map +1 -1
- package/dist/shared/src/context/WebsocketContext.es.js +6 -4
- package/dist/shared/src/context/WebsocketContext.es.js.map +1 -1
- package/dist/shared/src/hooks/useActionTriggers.cjs.js +1 -1
- package/dist/shared/src/hooks/useActionTriggers.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useActionTriggers.es.js +3 -2
- package/dist/shared/src/hooks/useActionTriggers.es.js.map +1 -1
- package/dist/shared/src/hooks/useEntityUpdate.cjs.js +1 -1
- package/dist/shared/src/hooks/useEntityUpdate.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useEntityUpdate.es.js +3 -2
- package/dist/shared/src/hooks/useEntityUpdate.es.js.map +1 -1
- package/dist/shared/src/hooks/useGetEntityGroups.cjs.js +1 -1
- package/dist/shared/src/hooks/useGetEntityGroups.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useGetEntityGroups.es.js +3 -2
- package/dist/shared/src/hooks/useGetEntityGroups.es.js.map +1 -1
- package/dist/shared/src/hooks/useGroupByRemoteModules.cjs.js +1 -1
- package/dist/shared/src/hooks/useGroupByRemoteModules.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useGroupByRemoteModules.es.js +3 -2
- package/dist/shared/src/hooks/useGroupByRemoteModules.es.js.map +1 -1
- package/dist/shared/src/hooks/useHierarchyTable.cjs.js +1 -1
- package/dist/shared/src/hooks/useHierarchyTable.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useHierarchyTable.es.js +3 -2
- package/dist/shared/src/hooks/useHierarchyTable.es.js.map +1 -1
- package/dist/shared/src/hooks/useScopedStatuses.cjs.js +1 -1
- package/dist/shared/src/hooks/useScopedStatuses.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useScopedStatuses.es.js +5 -4
- package/dist/shared/src/hooks/useScopedStatuses.es.js.map +1 -1
- package/dist/shared/src/hooks/useScopedTypes.cjs.js +1 -1
- package/dist/shared/src/hooks/useScopedTypes.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useScopedTypes.es.js +3 -2
- package/dist/shared/src/hooks/useScopedTypes.es.js.map +1 -1
- package/dist/shared/src/hooks/useUserProjectConfig.cjs.js +1 -1
- package/dist/shared/src/hooks/useUserProjectConfig.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useUserProjectConfig.es.js +3 -2
- package/dist/shared/src/hooks/useUserProjectConfig.es.js.map +1 -1
- package/dist/shared/src/util/columnConfigConverter.cjs.js +1 -1
- package/dist/shared/src/util/columnConfigConverter.cjs.js.map +1 -1
- package/dist/shared/src/util/columnConfigConverter.es.js +86 -65
- package/dist/shared/src/util/columnConfigConverter.es.js.map +1 -1
- package/dist/shared/src/util/getThumbnailUrl.cjs.js +2 -0
- package/dist/shared/src/util/getThumbnailUrl.cjs.js.map +1 -0
- package/dist/shared/src/util/getThumbnailUrl.es.js +23 -0
- package/dist/shared/src/util/getThumbnailUrl.es.js.map +1 -0
- package/dist/shared/src/util/thumbnailWebsocket.cjs.js +2 -0
- package/dist/shared/src/util/thumbnailWebsocket.cjs.js.map +1 -0
- package/dist/shared/src/util/thumbnailWebsocket.es.js +54 -0
- package/dist/shared/src/util/thumbnailWebsocket.es.js.map +1 -0
- package/dist/types/api/generated/folders.d.ts +1 -6
- package/dist/types/api/generated/graphql.d.ts +275 -6
- package/dist/types/api/generated/graphqlLinks.d.ts +7 -4
- package/dist/types/api/queries/activities/activityQueries.d.ts +1 -0
- package/dist/types/api/queries/activities/getActivities.d.ts +47 -0
- package/dist/types/api/queries/activities/updateActivities.d.ts +94 -0
- package/dist/types/api/queries/activities/util/activitiesHelpers.d.ts +1 -0
- package/dist/types/api/queries/columnStats/columnStats.d.ts +28 -0
- package/dist/types/api/queries/columnStats/index.d.ts +2 -0
- package/dist/types/api/queries/columnStats/metricTargets.d.ts +31 -0
- package/dist/types/api/queries/entities/getEntity.d.ts +47 -0
- package/dist/types/api/queries/entities/getEntityPanel.d.ts +47 -0
- package/dist/types/api/queries/entities/transformDetailsPanelData.d.ts +1 -0
- package/dist/types/api/queries/entities/updateEntity.d.ts +47 -0
- package/dist/types/api/queries/entityLists/getLists.d.ts +47 -0
- package/dist/types/api/queries/index.d.ts +1 -0
- package/dist/types/api/queries/overview/getOverview.d.ts +733 -1
- package/dist/types/api/queries/project/getProject.d.ts +47 -0
- package/dist/types/api/queries/userDashboard/getUserDashboard.d.ts +69 -0
- package/dist/types/api/queries/users/getUsers.d.ts +47 -0
- package/dist/types/api/queries/versions/getVersionsProducts.d.ts +828 -1
- package/dist/types/components/EntityPanelUploader/EntityPanelUploader.d.ts +1 -11
- package/dist/types/components/Thumbnail/StackedThumbnails.d.ts +2 -2
- package/dist/types/components/Thumbnail/Thumbnail.d.ts +2 -2
- package/dist/types/components/ThumbnailSimple/ThumbnailSimple.d.ts +1 -1
- package/dist/types/config/powerpackFeatures.d.ts +1 -1
- package/dist/types/containers/DetailsPanel/containers/FeedWrapper.d.ts +1 -0
- package/dist/types/containers/DetailsPanel/helpers/getThumbnails.d.ts +2 -2
- package/dist/types/containers/Feed/components/ActivityVersions/ActivityVersions.d.ts +1 -0
- package/dist/types/containers/ProjectTreeTable/ProjectTreeTable.d.ts +8 -3
- package/dist/types/containers/ProjectTreeTable/ProjectTreeTable.styled.d.ts +2 -0
- package/dist/types/containers/ProjectTreeTable/buildTreeTableColumns.d.ts +1 -1
- package/dist/types/containers/ProjectTreeTable/components/TableFooterRow.d.ts +14 -0
- package/dist/types/containers/ProjectTreeTable/constants.d.ts +2 -0
- package/dist/types/containers/ProjectTreeTable/context/ColumnSettingsContext.d.ts +10 -0
- package/dist/types/containers/ProjectTreeTable/context/SelectionCellsContext.d.ts +0 -1
- package/dist/types/containers/ProjectTreeTable/index.d.ts +1 -0
- package/dist/types/containers/ProjectTreeTable/types/index.d.ts +17 -1
- package/dist/types/containers/ProjectTreeTable/types/overviewContext.d.ts +2 -0
- package/dist/types/containers/ProjectTreeTable/types/summaryTypes.d.ts +50 -0
- package/dist/types/containers/ProjectTreeTable/types/table.d.ts +3 -0
- package/dist/types/containers/ProjectTreeTable/utils/checkColumnVisibility.d.ts +2 -0
- package/dist/types/containers/ProjectTreeTable/utils/index.d.ts +1 -0
- package/dist/types/containers/ProjectTreeTable/utils/pinningUtils.d.ts +6 -0
- package/dist/types/containers/ProjectTreeTable/widgets/ThumbnailWidget.d.ts +1 -1
- package/dist/types/containers/Views/hooks/useSelectedView.d.ts +2 -1
- package/dist/types/containers/Views/utils/viewUpdateHelper.d.ts +7 -3
- package/dist/types/util/getThumbnailUrl.d.ts +18 -0
- package/dist/types/util/index.d.ts +2 -0
- package/dist/types/util/thumbnailWebsocket.d.ts +21 -0
- package/dist/util.cjs.js +1 -1
- package/dist/util.es.js +35 -30
- package/dist/util.es.js.map +1 -1
- 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,uBA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BAAAkC,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,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,EAAca,EAAO,EAAE,GAC1B,YAKnB,EAGKC,EAAgBH,EAAc,OAASC,EAAgB,OAY7D,GAXIE,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AEtC,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"}
|
|
@@ -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
|
-
},
|
|
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:
|
|
157
|
-
const m = g(
|
|
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: " +
|
|
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:
|
|
177
|
-
const p = g(
|
|
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:
|
|
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: { [
|
|
207
|
+
const w = o ? { attrib: { [r]: n } } : { [r]: n };
|
|
207
208
|
if (o) {
|
|
208
209
|
const y = [...I?.ownAttrib || []];
|
|
209
|
-
y.includes(
|
|
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],
|
|
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
|
|
270
|
-
const a = g(
|
|
271
|
-
for (const t of
|
|
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:
|
|
274
|
-
id: a?.entityId || a?.id ||
|
|
275
|
-
type:
|
|
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
|
-
(
|
|
288
|
-
rowId:
|
|
289
|
-
id:
|
|
290
|
-
type:
|
|
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:
|
|
297
|
-
folderId:
|
|
298
|
-
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
|
|
310
|
+
const e = {};
|
|
310
311
|
i.attribs.forEach((n) => {
|
|
311
|
-
|
|
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:
|
|
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
|
-
),
|
|
331
|
+
), r = i.attribs.filter(
|
|
331
332
|
(n) => !c.includes(n)
|
|
332
333
|
);
|
|
333
|
-
|
|
334
|
+
r.length > 0 && E.push({
|
|
334
335
|
...i,
|
|
335
|
-
attribs:
|
|
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,
|
|
345
|
-
(
|
|
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:
|
|
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((
|
|
358
|
-
entityId:
|
|
359
|
-
entityType:
|
|
358
|
+
]).map((r) => ({
|
|
359
|
+
entityId: r.entityId,
|
|
360
|
+
entityType: r.entityType,
|
|
360
361
|
data: {
|
|
361
|
-
attrib:
|
|
362
|
+
attrib: r.attrib
|
|
362
363
|
}
|
|
363
364
|
}));
|
|
364
|
-
for (const
|
|
365
|
+
for (const r of s) {
|
|
365
366
|
const n = A.findIndex(
|
|
366
|
-
(o) => o.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
|
-
...
|
|
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:
|
|
383
|
-
entityType:
|
|
384
|
-
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
|
|
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
|
-
|
|
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,CAA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AAaqB,GAAQ,SAASA,GAAQ,QAAQqB,EAAG,YAAY,IAC7DM,IAAUnD,EAAgBC,GAAW4C,EAAG,YAAY1C,CAAU;AACpE,UAAAuB,EAAM,MAAMyB,CAAO;AAAA,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,MA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AM,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;"}
|
|
@@ -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;"}
|