@ynput/ayon-frontend-shared 0.2.39 → 0.2.41
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/api.cjs.js +1 -1
- package/dist/api.es.js +256 -248
- 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/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 +16 -16
- package/dist/shared/src/api/queries/activities/util/activityRealtimeHandler.es.js.map +1 -1
- package/dist/shared/src/api/queries/config/getConfig.cjs.js +2 -0
- package/dist/shared/src/api/queries/config/getConfig.cjs.js.map +1 -0
- package/dist/shared/src/api/queries/config/getConfig.es.js +111 -0
- package/dist/shared/src/api/queries/config/getConfig.es.js.map +1 -0
- package/dist/shared/src/api/queries/config/updateConfig.cjs.js +2 -0
- package/dist/shared/src/api/queries/config/updateConfig.cjs.js.map +1 -0
- package/dist/shared/src/api/queries/config/updateConfig.es.js +13 -0
- package/dist/shared/src/api/queries/config/updateConfig.es.js.map +1 -0
- 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 +5 -3
- package/dist/shared/src/api/queries/entities/transformDetailsPanelData.es.js.map +1 -1
- package/dist/shared/src/api/queries/entities/updateEntity.cjs.js +1 -1
- package/dist/shared/src/api/queries/entities/updateEntity.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/entities/updateEntity.es.js +5 -3
- package/dist/shared/src/api/queries/entities/updateEntity.es.js.map +1 -1
- package/dist/shared/src/api/queries/links/getEntityLinks.cjs.js +1 -1
- package/dist/shared/src/api/queries/links/getEntityLinks.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/links/getEntityLinks.es.js +106 -86
- package/dist/shared/src/api/queries/links/getEntityLinks.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 +68 -66
- package/dist/shared/src/api/queries/overview/updateOverview.es.js.map +1 -1
- package/dist/shared/src/api/queries/users/getUsers.cjs.js +2 -2
- package/dist/shared/src/api/queries/users/getUsers.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/users/getUsers.es.js +34 -32
- package/dist/shared/src/api/queries/users/getUsers.es.js.map +1 -1
- package/dist/shared/src/components/AddonLoadingScreen/AddonLoadingScreen.cjs.js +8 -7
- package/dist/shared/src/components/AddonLoadingScreen/AddonLoadingScreen.cjs.js.map +1 -1
- package/dist/shared/src/components/AddonLoadingScreen/AddonLoadingScreen.es.js +24 -20
- package/dist/shared/src/components/AddonLoadingScreen/AddonLoadingScreen.es.js.map +1 -1
- package/dist/shared/src/components/Chips/Chips.cjs.js +10 -6
- package/dist/shared/src/components/Chips/Chips.cjs.js.map +1 -1
- package/dist/shared/src/components/Chips/Chips.es.js +44 -38
- package/dist/shared/src/components/Chips/Chips.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 +4 -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 +4 -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 +4 -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 +4 -2
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.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 +4 -2
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.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 +6 -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 +4 -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 +28 -25
- package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.styled.cjs.js +5 -0
- package/dist/shared/src/components/LinksManager/LinksManager.styled.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.styled.es.js +5 -0
- package/dist/shared/src/components/LinksManager/LinksManager.styled.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 +4 -2
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.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 +4 -2
- package/dist/shared/src/components/Powerpack/PowerpackDialog.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 +4 -2
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.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 +4 -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 +4 -2
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.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 +8 -6
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.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/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 +6 -4
- 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 +4 -2
- package/dist/shared/src/components/Watchers/Watchers.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 +4 -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/DetailsPanelFiles/DetailsPanelFiles.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelFiles/DetailsPanelFiles.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.es.js +5 -3
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelFloating/DetailsPanelFloating.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelHeader/DetailsPanelHeader.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.es.js +4 -2
- package/dist/shared/src/containers/DetailsPanel/FeedContextWrapper.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 +4 -2
- 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 +4 -2
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.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/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/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 +4 -2
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.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 +7 -5
- package/dist/shared/src/containers/Feed/context/FeedContext.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 +4 -2
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.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 +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.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 +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.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/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/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 +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.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 +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.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 +7 -5
- 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 +4 -2
- 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 +4 -2
- 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/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 +30 -28
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.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 +4 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js.map +1 -1
- 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/linksToTableData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/linksToTableData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/linksToTableData.es.js +34 -21
- package/dist/shared/src/containers/ProjectTreeTable/utils/linksToTableData.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 +31 -28
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.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/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/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 +4 -2
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.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 +6 -4
- package/dist/shared/src/containers/Views/context/ViewsContext.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 +4 -2
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.es.js +4 -2
- package/dist/shared/src/containers/Views/hooks/useSaveViewFromCurrent.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 +4 -2
- 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 +4 -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 +4 -2
- 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 +6 -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 +6 -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 +6 -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 +8 -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 +44 -38
- 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 +6 -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 +6 -4
- package/dist/shared/src/context/RemoteModulesContext.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 +7 -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 +4 -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 +4 -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 +4 -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 +4 -2
- package/dist/shared/src/hooks/useGroupByRemoteModules.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 +6 -4
- package/dist/shared/src/hooks/useScopedStatuses.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 +4 -2
- package/dist/shared/src/hooks/useUserProjectConfig.es.js.map +1 -1
- package/dist/types/api/queries/config/getConfig.d.ts +747 -0
- package/dist/types/api/queries/config/index.d.ts +2 -0
- package/dist/types/api/queries/config/updateConfig.d.ts +171 -0
- package/dist/types/api/queries/index.d.ts +1 -0
- package/dist/types/api/queries/links/getEntityLinks.d.ts +2 -1
- package/dist/types/components/AddonLoadingScreen/AddonLoadingScreen.d.ts +7 -2
- package/dist/types/components/Chips/Chips.d.ts +1 -0
- package/dist/types/components/LinksManager/LinksManager.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateOverview.cjs.js","sources":["../../../../../../src/api/queries/overview/updateOverview.ts"],"sourcesContent":["import {\n foldersQueries,\n detailsPanelQueries,\n operationsApi,\n entityListsQueriesGql,\n} from '@shared/api'\nimport type { OperationsResponseModel, OperationModel, OperationsApiArg } from '@shared/api'\nimport getOverviewApi from './getOverview'\nimport { DetailsPanelEntityData, DetailsPanelEntityType } from '@shared/api/queries/entities'\nimport { FetchBaseQueryError, RootState } from '@reduxjs/toolkit/query'\nimport { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit'\nimport { EditorTaskNode } from '@shared/containers/ProjectTreeTable'\nimport { getUpdatedEntityIds } from './filterRefetchUtils'\nimport {\n refetchTasksForCacheEntry,\n refetchOverviewTasksForCacheEntry,\n} from './refetchFilteredEntities'\nimport { patchVersions } from './patchVersions'\nimport { patchProducts } from './patchProducts'\n// these operations are dedicated to the overview page\n// this mean cache updates are custom for the overview page here\n\n// Helper function to update entities with operation data\nconst updateEntityWithOperation = (entity: any, operationData: any) => {\n // Update top-level properties directly\n Object.keys(operationData).forEach((key) => {\n if (key === 'attrib' || key === 'links' || key === 'deleteLinks') return\n entity[key] = operationData[key]\n })\n\n // Handle attrib merging\n if (operationData.attrib) {\n entity.attrib = {\n ...entity.attrib,\n ...operationData.attrib,\n }\n }\n\n // Handle links merging\n if (operationData.links) {\n const existingLinks = entity.links || []\n const newLinks = operationData.links || []\n\n // Ensure links structure exists\n if (!entity.links) entity.links = []\n\n // Process links directly\n entity.links = [...existingLinks]\n\n newLinks.forEach((newLink: any) => {\n const existingIndex = entity.links.findIndex((link: any) => link.id === newLink.id)\n\n if (existingIndex !== -1) {\n entity.links[existingIndex] = { ...entity.links[existingIndex], ...newLink }\n } else {\n entity.links.push(newLink)\n }\n })\n }\n\n // Handle links deletion\n if (operationData.deleteLinks) {\n const linksToDelete = operationData.deleteLinks || []\n\n // Ensure links structure exists\n if (!entity.links) entity.links = []\n\n // Remove links by ID\n linksToDelete.forEach((linkId: string) => {\n entity.links = entity.links.filter((link: any) => link.id !== linkId)\n })\n }\n}\n\nconst getOverviewTaskTags = (tasks: Pick<OperationModel, 'entityId' | 'data'>[]) => {\n return [\n { type: 'overviewTask', id: 'LIST' },\n ...tasks.map((op) => ({ type: 'overviewTask', id: op.entityId })),\n // we also add the projectName so that tasks that do not exist in the cache can still invalidate\n ...tasks\n .filter((op) => op.data?.projectName)\n .map((op) => ({\n type: 'overviewTask',\n id: op.data?.projectName,\n })),\n ]\n}\n\nconst getOverviewFolderTags = (folders: Pick<OperationModel, 'entityId' | 'data'>[]) => {\n return [\n ...folders.map((op) => ({ type: 'folder', id: op.entityId })),\n // we also add the projectName so that tasks that do not exist in the cache can still invalidate\n ...folders\n .filter((op) => op.data?.projectName)\n .map((op) => ({\n type: 'folder',\n id: op.data?.projectName,\n })),\n ]\n}\n\nexport type PatchOperation = Pick<OperationModel, 'entityId' | 'entityType' | 'data'> & {\n type?: OperationModel['type']\n}\n\n// Helper function to create a patch operation for deleting links\nexport const createLinkDeletionPatch = (\n entityId: string,\n entityType: OperationModel['entityType'],\n linkIds: string[],\n): PatchOperation => {\n return {\n entityId,\n entityType,\n type: 'update',\n data: { deleteLinks: linkIds },\n }\n}\n\n// Utility function to delete specific links by ID from entities\nexport const deleteLinksFromEntities = (\n entities: { entityId: string; entityType: OperationModel['entityType'] }[],\n linkIds: string[],\n): PatchOperation[] => {\n return entities.map((entity) =>\n createLinkDeletionPatch(entity.entityId, entity.entityType, linkIds),\n )\n}\n\n// Generic helper function to patch entities based on their type\nexport const patchOverviewEntities = (\n entities: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n // Group entities by type\n const entitiesByType = entities.reduce((acc, entity) => {\n if (!acc[entity.entityType]) {\n acc[entity.entityType] = []\n }\n acc[entity.entityType].push(entity)\n return acc\n }, {} as Record<string, PatchOperation[]>)\n\n // Patch each entity type using the appropriate function\n if (entitiesByType.task) {\n patchOverviewTasks(entitiesByType.task, { state, dispatch }, patches)\n }\n if (entitiesByType.folder) {\n patchOverviewFolders(entitiesByType.folder, { state, dispatch }, patches)\n }\n // Add more entity types as needed\n // if (entitiesByType.product) { ... }\n // if (entitiesByType.version) { ... }\n // etc.\n}\n\nexport const patchOverviewTasks = (\n tasks: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n const tags = getOverviewTaskTags(tasks)\n const taskEntries = getOverviewApi.util.selectInvalidatedBy(state, tags)\n\n for (const entry of taskEntries) {\n if (entry.endpointName === 'getTasksListInfinite') {\n // patch getTasksListInfinite\n const tasksPatch = dispatch(\n getOverviewApi.util.updateQueryData('getTasksListInfinite', entry.originalArgs, (draft) => {\n // Apply each change to matching tasks in all pages\n for (const taskOperation of tasks) {\n if (taskOperation.type === 'create' && taskOperation.data) {\n // push operation data to first page\n // @ts-expect-error\n draft.pages[0].tasks.push(taskOperation.data)\n } else {\n // Iterate through all pages in the infinite query\n for (const page of draft.pages) {\n // TODO: task is not found here, why?\n const task = page.tasks.find((task) => task.id === taskOperation.entityId)\n if (task) {\n updateEntityWithOperation(task, taskOperation.data)\n }\n }\n }\n }\n }),\n )\n\n // add the patch to the list of patches\n patches?.push(tasksPatch)\n } else {\n // this updates the main overview cache task\n // it also updates any GetTasksByParent caches\n const tasksPatch = dispatch(\n getOverviewApi.util.updateQueryData(\n entry.endpointName as 'getOverviewTasksByFolders' | 'GetTasksByParent' | 'GetTasksList',\n entry.originalArgs,\n (draft) => {\n // Apply each change to matching tasks in the cache\n for (const taskOperation of tasks) {\n if (\n taskOperation.type === 'create' &&\n taskOperation.data &&\n entry.originalArgs.parentIds?.includes(taskOperation.data.folderId)\n ) {\n const patchTask = (tasksArrayDraft: EditorTaskNode[]) => {\n // @ts-expect-error\n tasksArrayDraft.push(taskOperation.data)\n }\n\n // Check if draft is an array or an object with a tasks property\n if (Array.isArray(draft)) {\n patchTask(draft)\n } else if (draft.tasks && Array.isArray(draft.tasks)) {\n // Handle object with tasks array case (like in GetTasksList)\n const draftArray = draft.tasks\n patchTask(draftArray)\n }\n } else {\n const patchTask = (tasksArrayDraft: EditorTaskNode[]) => {\n const task = tasksArrayDraft.find((task) => task.id === taskOperation.entityId)\n if (task) {\n updateEntityWithOperation(task, taskOperation.data)\n }\n }\n\n // Check if draft is an array or an object with a tasks property\n if (Array.isArray(draft)) {\n patchTask(draft)\n } else if (draft.tasks && Array.isArray(draft.tasks)) {\n // Handle object with tasks array case (like in GetTasksList)\n const draftArray = draft.tasks\n patchTask(draftArray)\n }\n }\n }\n },\n ),\n )\n // add the patch to the list of patches\n patches?.push(tasksPatch)\n }\n }\n}\n\nconst invalidateOverviewTasks = (\n tasks: PatchOperation[],\n {\n dispatch,\n }: {\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n) => {\n if (!tasks.length) return\n dispatch(getOverviewApi.util.invalidateTags(getOverviewTaskTags(tasks)))\n}\n\nexport const patchOverviewFolders = (\n folders: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n const folderEntries = foldersQueries.util\n .selectInvalidatedBy(state, getOverviewFolderTags(folders))\n .filter((entry) => entry.endpointName === 'getFolderList')\n for (const entry of folderEntries) {\n const folderPatch = dispatch(\n foldersQueries.util.updateQueryData(\n entry.endpointName as 'getFolderList',\n entry.originalArgs,\n (draft) => {\n // Create a Map for O(1) folder lookups\n const folderMap = new Map()\n draft.folders.forEach((folder) => {\n folderMap.set(folder.id, folder)\n })\n\n for (const folderOperation of folders) {\n if (folderOperation.type === 'create' && folderOperation.data) {\n // push operation data to first page\n // @ts-expect-error\n draft.folders.push(folderOperation.data)\n } else {\n const folder = folderMap.get(folderOperation.entityId)\n\n if (folder) {\n updateEntityWithOperation(folder, folderOperation.data)\n }\n }\n }\n },\n ),\n )\n // add the patch to the list of patches\n patches?.push(folderPatch)\n }\n}\n\ntype DeepPartial<T> = T extends object\n ? {\n [P in keyof T]?: DeepPartial<T[P]>\n }\n : T\n\nconst operationDataToDetailsData = (\n data: Record<string, any>,\n entityType: DetailsPanelEntityType,\n): DeepPartial<DetailsPanelEntityData> => {\n const sharedData: DeepPartial<DetailsPanelEntityData> = {\n name: data.name,\n attrib: data.attrib,\n status: data.status,\n tags: data.tags,\n label: data.label,\n updatedAt: data.updatedAt,\n createdAt: data.createdAt,\n hasReviewables: data.hasReviewables,\n thumbnailId: data.thumbnailId,\n }\n\n switch (entityType) {\n case 'task':\n return {\n ...sharedData,\n task: {\n assignees: data.assignees,\n label: data.label,\n name: data.name,\n taskType: data.taskType,\n },\n }\n case 'folder':\n return {\n ...sharedData,\n folder: {\n id: data.id,\n name: data.name,\n label: data.label,\n folderType: data.folderType,\n },\n }\n case 'version':\n return {\n ...sharedData,\n version: {\n id: data.id,\n name: data.name,\n },\n }\n case 'representation':\n return {\n ...sharedData,\n }\n }\n}\n\nexport const patchDetailsPanelEntity = (\n operations: PatchOperation[] = [],\n draft: DetailsPanelEntityData,\n) => {\n // find the entity we are updating from the draft\n const operation = operations.find((op) => op.entityId === draft.id)\n const operationData = operation?.data\n\n if (!operationData || operation.entityType === 'product' || operation.entityType === 'workfile')\n return console.warn('No operation data found or entity type not supported')\n\n // transform the data to match the details panel entity data\n const detailsPanelData = operationDataToDetailsData(operationData, operation.entityType)\n\n // If this is a folder and name is being updated, also update the path\n if (operation.entityType === 'folder' && operationData.name && draft.path) {\n // Construct new path by replacing the last segment with the new name\n const pathParts = draft.path.split('/')\n pathParts[pathParts.length - 1] = operationData.name\n detailsPanelData.path = pathParts.join('/')\n }\n\n // helper to deep‐clean undefined values\n function cleanUndefined(obj: any): void {\n Object.entries(obj).forEach(([key, val]) => {\n if (val === undefined) {\n delete obj[key]\n } else if (val !== null && typeof val === 'object') {\n cleanUndefined(val)\n }\n })\n }\n\n // remove all undefineds at root and nested levels\n cleanUndefined(detailsPanelData as Record<string, any>)\n\n const newData: DeepPartial<DetailsPanelEntityData> = {\n ...draft,\n ...detailsPanelData,\n attrib: {\n ...(draft?.attrib || {}),\n ...detailsPanelData.attrib,\n },\n folder: {\n ...(draft?.folder || {}),\n ...detailsPanelData.folder,\n },\n task: {\n ...(draft?.task || {}),\n ...detailsPanelData.task,\n },\n version: {\n ...(draft?.version || {}),\n ...detailsPanelData.version,\n },\n }\n\n // patch data onto the entity\n Object.assign(draft, newData)\n}\n\nconst patchListItems = (\n entities: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n const tags = entities.map((op) => ({ type: 'entityListItem', id: op.entityId }))\n const entries = entityListsQueriesGql.util.selectInvalidatedBy(state, tags)\n\n for (const entry of entries) {\n if (entry.endpointName === 'getListItemsInfinite') {\n const listItemsPatch = dispatch(\n entityListsQueriesGql.util.updateQueryData(\n 'getListItemsInfinite',\n entry.originalArgs,\n (draft) => {\n // Apply each change to matching tasks in all pages\n for (const listOperation of entities) {\n if (listOperation.type === 'update' && listOperation.data) {\n // Iterate through all pages in the infinite query\n for (const page of draft.pages) {\n const item = page.items.find((item) => item.entityId === listOperation.entityId)\n if (item) {\n updateEntityWithOperation(item, listOperation.data)\n }\n }\n }\n }\n },\n ),\n )\n\n // add the patch to the list of patches\n patches?.push(listItemsPatch)\n }\n }\n}\n\nconst splitByOpType = (operations: OperationModel[]) => {\n return operations.reduce(\n (acc: Record<OperationModel['type'], OperationModel[]>, operation) => {\n acc[operation.type].push(operation)\n return acc\n },\n {\n create: [],\n update: [],\n delete: [],\n },\n )\n}\n\nconst operationsEnhanced = operationsApi.enhanceEndpoints({\n endpoints: {\n operations: {},\n },\n})\n\n// enhance the argument type to include some extra fields\ninterface UpdateOverviewEntitiesArg extends OperationsApiArg {\n patchOperations?: PatchOperation[] // extra entities to patch\n}\n\nconst operationsApiEnhancedInjected = operationsEnhanced.injectEndpoints({\n endpoints: (build) => ({\n updateOverviewEntities: build.mutation<\n OperationsResponseModel | undefined,\n UpdateOverviewEntitiesArg\n >({\n async queryFn(arg, { dispatch }) {\n try {\n const result = await dispatch(operationsEnhanced.endpoints.operations.initiate(arg))\n\n // Check if the network request itself failed (offline, timeout, etc.)\n if (result.error) {\n return { error: result.error as FetchBaseQueryError }\n }\n\n const data = result.data\n // check for any errors in the result\n const uniqueErrors = new Set()\n const uniqueErrorCodes = new Set()\n for (const op of data?.operations || []) {\n if (op.success === false && op.detail) {\n if (!uniqueErrors.has(op.detail)) {\n uniqueErrors.add(op.detail)\n }\n if (!uniqueErrorCodes.has(op.errorCode)) {\n uniqueErrorCodes.add(op.errorCode)\n }\n }\n }\n\n if (uniqueErrors.size > 0) {\n const error = {\n status: 'FETCH_ERROR',\n error: Array.from(uniqueErrors).join(', '),\n errorCodes: Array.from(uniqueErrorCodes),\n } as FetchBaseQueryError\n return { error }\n } else {\n return { data }\n }\n } catch (e: any) {\n console.error(e)\n const error = { status: 'FETCH_ERROR', error: e.message } as FetchBaseQueryError\n return { error }\n }\n },\n async onQueryStarted(\n { operationsRequestModel, patchOperations = [], projectName },\n { dispatch, queryFulfilled, getState },\n ) {\n if (!operationsRequestModel.operations?.length) return\n const { operations } = operationsRequestModel\n // we need to split the operations by entity type\n const operationsByType = operations.reduce(\n (acc: Record<OperationModel['entityType'], OperationModel[]>, operation) => {\n acc[operation.entityType].push(operation)\n return acc\n },\n {\n task: [],\n folder: [],\n product: [],\n version: [],\n representation: [],\n workfile: [],\n },\n )\n\n // collect patches incase we need to undo them\n const state = getState()\n const patches: any[] = []\n\n // patch the overview tasks\n if (operationsByType.task?.length) {\n // split operations by operation type\n const { delete: deleteOps, update } = splitByOpType(operationsByType.task)\n // filter out updates that are in updateToPatch as we patch them later on\n const updatesToPatch = update.filter(\n (op) => !patchOperations.some((dep) => dep.entityId === op.entityId),\n )\n // update existing tasks\n patchOverviewTasks(updatesToPatch, { state, dispatch }, patches)\n // invalidate the caches for tasks being created and deleted\n invalidateOverviewTasks([...deleteOps], {\n dispatch,\n })\n }\n\n // patch the overview folders (any other folders from foldersList)\n if (operationsByType.folder?.length) {\n // split operations by operation type\n const { delete: deleteOps, update } = splitByOpType(operationsByType.folder)\n // filter out updates that are in updateToPatch as we patch them later on\n const updatesToPatch = update.filter(\n (op) => !patchOperations.some((dep) => dep.entityId === op.entityId),\n )\n // update existing folders\n patchOverviewFolders(updatesToPatch, { state, dispatch }, patches)\n // invalidate the caches for folders being created and deleted\n if (deleteOps.length) {\n dispatch(foldersQueries.util.invalidateTags([{ type: 'folder', id: 'LIST' }]))\n }\n }\n\n const patchExtraTasks = patchOperations.filter((op) => op.entityType === 'task')\n const patchExtraFolders = patchOperations.filter((op) => op.entityType === 'folder')\n\n if (patchExtraTasks.length) {\n // often used for updating inherited dependents\n patchOverviewTasks(patchExtraTasks, { state, dispatch }, patches)\n }\n\n if (patchExtraFolders.length) {\n // often used for updating inherited dependents\n patchOverviewFolders(patchExtraFolders, { state, dispatch }, patches)\n }\n\n // patch the list items\n patchListItems([...operations, ...patchOperations], { state, dispatch }, patches)\n\n // patch versions\n if (operationsByType.version?.length) {\n patchVersions(operationsByType.version, { state, dispatch }, patches)\n }\n\n // patch products\n if (operationsByType.product?.length) {\n patchProducts(operationsByType.product, { state, dispatch }, patches)\n }\n\n // try to patch any details panels\n // first we patch the individual entities\n // then we patch the details panel cache\n const entityTags = operations.map((op) => ({\n id: op.entityId,\n type: op.entityType,\n }))\n const entitiesTags = entityTags.map((tag) => ({\n type: 'entities',\n id: tag.id,\n }))\n\n // invalidates the details panel cache so that it fetches all individual entities again (using it's updated cache)\n const invalidateEntryPanel = () =>\n dispatch(detailsPanelQueries.util.invalidateTags(entitiesTags))\n\n // the individual entities that are patched for the details panel\n // remember the details panel cache is made up of individual entity caches\n const detailsPanelEntityCaches = detailsPanelQueries.util.selectInvalidatedBy(\n state,\n entityTags,\n )\n\n // the cache for the whole details panel\n const detailsPanelEntitiesCaches = detailsPanelQueries.util.selectInvalidatedBy(\n state,\n entitiesTags,\n )\n\n for (const entry of detailsPanelEntitiesCaches) {\n if (entry.endpointName !== 'getEntitiesDetailsPanel') continue\n const entitiesDetailsResult = dispatch(\n detailsPanelQueries.util.updateQueryData(\n entry.endpointName as 'getEntitiesDetailsPanel',\n entry.originalArgs,\n (draft) => {\n for (const entity of draft) {\n patchDetailsPanelEntity(operations, entity)\n }\n },\n ),\n )\n\n // add the patch to the list of patches\n patches.push(entitiesDetailsResult)\n }\n\n try {\n await queryFulfilled\n\n // Background refetch logic - runs after successful mutation\n // This ensures calculated attributes are up-to-date and entities are correctly filtered\n\n const taskOperations = operationsByType.task || []\n const folderOperations = operationsByType.folder || []\n\n // Early exit if no operations\n if (taskOperations.length === 0 && folderOperations.length === 0) {\n return\n }\n\n // Extract updated entity IDs (always needed for refetch)\n const updatedTaskIds = getUpdatedEntityIds(taskOperations)\n const updatedFolderIds = getUpdatedEntityIds(folderOperations)\n\n // Get all active task list cache entries\n const overviewTaskTags = updatedTaskIds.map((id) => ({ type: 'overviewTask', id }))\n const tasksListInfiniteEntries = getOverviewApi.util\n .selectInvalidatedBy(state, overviewTaskTags)\n .filter((entry) => entry.endpointName === 'getTasksListInfinite')\n\n // Requirement: \"refetch the full data for the specific entity/entities\"\n // For each cache with its own filter, fetch entities and update that cache\n if (updatedTaskIds.length > 0 && projectName) {\n // Process getTasksListInfinite caches\n for (const entry of tasksListInfiniteEntries) {\n await refetchTasksForCacheEntry({\n dispatch,\n projectName,\n updatedTaskIds,\n cacheEntry: entry,\n })\n }\n\n // Process getOverviewTasksByFolders caches\n // Use selectInvalidatedBy to get only caches that contain the updated tasks\n const overviewTasksEntries = getOverviewApi.util\n .selectInvalidatedBy(state, overviewTaskTags)\n .filter((entry) => entry.endpointName === 'getOverviewTasksByFolders')\n\n for (const entry of overviewTasksEntries) {\n await refetchOverviewTasksForCacheEntry({\n dispatch,\n projectName,\n updatedTaskIds,\n cacheEntry: entry,\n })\n }\n }\n\n // Always refetch folders if they were updated (for calculated attributes)\n // Not conditional on affectsFilter - requirement says \"always refetch entities\"\n // Only invalidate if we haven't already done so for delete operations\n const hasDeleteOps = (operationsByType.folder || []).some(\n (op: OperationModel) => op.type === 'delete',\n )\n if (updatedFolderIds.length > 0 && projectName && !hasDeleteOps) {\n dispatch(foldersQueries.util.invalidateTags([{ type: 'folder', id: 'LIST' }]))\n }\n } catch (error) {\n // undo all patches if there is an error\n for (const patch of patches) {\n patch.undo()\n }\n\n if (detailsPanelEntityCaches.length) {\n // we invalidate the tags for the detailsPanelEntityCaches that were patched\n // invalidate the details panel cache\n invalidateEntryPanel()\n }\n }\n },\n invalidatesTags: (_r, _e, { operationsRequestModel, projectName }) => {\n type Tags = { id: string; type: string }[]\n const userDashboardTags: Tags = [{ type: 'kanban', id: 'project-' + projectName }],\n taskProgressTags: Tags = [],\n entityListItemTags: Tags = []\n\n operationsRequestModel.operations?.forEach((op) => {\n const { entityId } = op\n if (entityId) {\n taskProgressTags.push({ type: 'progress', id: entityId })\n // Invalidate list item cache for this entity to trigger background refetch\n entityListItemTags.push({ type: 'entityListItem', id: entityId })\n } else {\n // new entity created, so we should invalidate everything\n taskProgressTags.push({ type: 'progress', id: 'LIST' })\n }\n })\n\n return [...userDashboardTags, ...taskProgressTags, ...entityListItemTags]\n },\n }),\n }),\n})\n\nexport const { useUpdateOverviewEntitiesMutation } = operationsApiEnhancedInjected\n"],"names":["updateEntityWithOperation","entity","operationData","key","existingLinks","newLinks","newLink","existingIndex","link","linksToDelete","linkId","getOverviewTaskTags","tasks","op","_a","getOverviewFolderTags","folders","createLinkDeletionPatch","entityId","entityType","linkIds","deleteLinksFromEntities","entities","patchOverviewEntities","state","dispatch","patches","entitiesByType","acc","patchOverviewTasks","patchOverviewFolders","tags","taskEntries","getOverviewApi","entry","tasksPatch","draft","taskOperation","page","task","patchTask","tasksArrayDraft","draftArray","invalidateOverviewTasks","folderEntries","foldersQueries","folderPatch","folderMap","folder","folderOperation","operationDataToDetailsData","data","sharedData","patchDetailsPanelEntity","operations","operation","detailsPanelData","pathParts","cleanUndefined","obj","val","newData","patchListItems","entries","entityListsQueriesGql","listItemsPatch","listOperation","item","splitByOpType","operationsEnhanced","operationsApi","operationsApiEnhancedInjected","build","arg","result","uniqueErrors","uniqueErrorCodes","e","operationsRequestModel","patchOperations","projectName","queryFulfilled","getState","operationsByType","_b","deleteOps","update","updatesToPatch","dep","_c","patchExtraTasks","patchExtraFolders","_d","patchVersions","_e","patchProducts","entityTags","entitiesTags","tag","invalidateEntryPanel","detailsPanelQueries","detailsPanelEntityCaches","detailsPanelEntitiesCaches","entitiesDetailsResult","taskOperations","folderOperations","updatedTaskIds","getUpdatedEntityIds","updatedFolderIds","overviewTaskTags","id","tasksListInfiniteEntries","refetchTasksForCacheEntry","overviewTasksEntries","refetchOverviewTasksForCacheEntry","hasDeleteOps","patch","_r","userDashboardTags","taskProgressTags","entityListItemTags","useUpdateOverviewEntitiesMutation"],"mappings":"ksHAuBMA,EAA4B,CAACC,EAAaC,IAAuB,CAgBrE,GAdA,OAAO,KAAKA,CAAa,EAAE,QAASC,GAAQ,CACtCA,IAAQ,UAAYA,IAAQ,SAAWA,IAAQ,gBAC5CF,EAAAE,CAAG,EAAID,EAAcC,CAAG,EAAA,CAChC,EAGGD,EAAc,SAChBD,EAAO,OAAS,CACd,GAAGA,EAAO,OACV,GAAGC,EAAc,MACnB,GAIEA,EAAc,MAAO,CACjB,MAAAE,EAAgBH,EAAO,OAAS,CAAC,EACjCI,EAAWH,EAAc,OAAS,CAAC,EAGpCD,EAAO,QAAOA,EAAO,MAAQ,CAAC,GAG5BA,EAAA,MAAQ,CAAC,GAAGG,CAAa,EAEvBC,EAAA,QAASC,GAAiB,CAC3B,MAAAC,EAAgBN,EAAO,MAAM,UAAWO,GAAcA,EAAK,KAAOF,EAAQ,EAAE,EAE9EC,IAAkB,GACbN,EAAA,MAAMM,CAAa,EAAI,CAAE,GAAGN,EAAO,MAAMM,CAAa,EAAG,GAAGD,CAAQ,EAEpEL,EAAA,MAAM,KAAKK,CAAO,CAC3B,CACD,CAAA,CAIH,GAAIJ,EAAc,YAAa,CACvB,MAA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,SAAU,GAAI,WAAatC,CAAa,CAAA,EAC/EuC,EAAyB,CAAC,EAC1BC,EAA2B,CAAC,EAEP,OAAA1G,EAAAgE,EAAA,aAAA,MAAAhE,EAAY,QAASD,GAAO,CAC3C,KAAA,CAAE,SAAAK,GAAaL,EACjBK,GACFqG,EAAiB,KAAK,CAAE,KAAM,WAAY,GAAIrG,EAAU,EAExDsG,EAAmB,KAAK,CAAE,KAAM,iBAAkB,GAAItG,EAAU,GAGhEqG,EAAiB,KAAK,CAAE,KAAM,WAAY,GAAI,OAAQ,CACxD,GAGK,CAAC,GAAGD,EAAmB,GAAGC,EAAkB,GAAGC,CAAkB,CAAA,CAE3E,CAAA,CACH,EACF,CAAC,EAEY,CAAE,kCAAAC,IAAsClD"}
|
|
1
|
+
{"version":3,"file":"updateOverview.cjs.js","sources":["../../../../../../src/api/queries/overview/updateOverview.ts"],"sourcesContent":["import {\n foldersQueries,\n detailsPanelQueries,\n operationsApi,\n entityListsQueriesGql,\n} from '@shared/api'\nimport type { OperationsResponseModel, OperationModel, OperationsApiArg } from '@shared/api'\nimport getOverviewApi from './getOverview'\nimport { DetailsPanelEntityData, DetailsPanelEntityType } from '@shared/api/queries/entities'\nimport { FetchBaseQueryError, RootState } from '@reduxjs/toolkit/query'\nimport { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit'\nimport { EditorTaskNode } from '@shared/containers/ProjectTreeTable'\nimport { getUpdatedEntityIds } from './filterRefetchUtils'\nimport {\n refetchTasksForCacheEntry,\n refetchOverviewTasksForCacheEntry,\n} from './refetchFilteredEntities'\nimport { patchVersions } from './patchVersions'\nimport { patchProducts } from './patchProducts'\n// these operations are dedicated to the overview page\n// this mean cache updates are custom for the overview page here\n\n// Helper function to update entities with operation data\nconst updateEntityWithOperation = (entity: any, operationData: any) => {\n // Update top-level properties directly\n Object.keys(operationData).forEach((key) => {\n if (key === 'attrib' || key === 'links' || key === 'deleteLinks') return\n entity[key] = operationData[key]\n })\n\n // Handle attrib merging\n if (operationData.attrib) {\n entity.attrib = {\n ...entity.attrib,\n ...operationData.attrib,\n }\n }\n\n // Handle links merging\n if (operationData.links) {\n const existingLinks = entity.links || []\n const newLinks = operationData.links || []\n\n // Ensure links structure exists\n if (!entity.links) entity.links = []\n\n // Process links directly\n entity.links = [...existingLinks]\n\n newLinks.forEach((newLink: any) => {\n const existingIndex = entity.links.findIndex((link: any) => link.id === newLink.id)\n\n if (existingIndex !== -1) {\n entity.links[existingIndex] = { ...entity.links[existingIndex], ...newLink }\n } else {\n entity.links.push(newLink)\n }\n })\n }\n\n // Handle links deletion\n if (operationData.deleteLinks) {\n const linksToDelete = operationData.deleteLinks || []\n\n // Ensure links structure exists\n if (!entity.links) entity.links = []\n\n // Remove links by ID\n linksToDelete.forEach((linkId: string) => {\n entity.links = entity.links.filter((link: any) => link.id !== linkId)\n })\n }\n}\n\nconst getOverviewTaskTags = (tasks: Pick<OperationModel, 'entityId' | 'data'>[]) => {\n return [\n { type: 'overviewTask', id: 'LIST' },\n ...tasks.map((op) => ({ type: 'overviewTask', id: op.entityId })),\n // we also add the projectName so that tasks that do not exist in the cache can still invalidate\n ...tasks\n .filter((op) => op.data?.projectName)\n .map((op) => ({\n type: 'overviewTask',\n id: op.data?.projectName,\n })),\n ]\n}\n\nconst getOverviewFolderTags = (folders: Pick<OperationModel, 'entityId' | 'data'>[]) => {\n return [\n ...folders.map((op) => ({ type: 'folder', id: op.entityId })),\n // we also add the projectName so that tasks that do not exist in the cache can still invalidate\n ...folders\n .filter((op) => op.data?.projectName)\n .map((op) => ({\n type: 'folder',\n id: op.data?.projectName,\n })),\n ]\n}\n\nexport type PatchOperation = Pick<OperationModel, 'entityId' | 'entityType' | 'data'> & {\n type?: OperationModel['type']\n}\n\n// Helper function to create a patch operation for deleting links\nexport const createLinkDeletionPatch = (\n entityId: string,\n entityType: OperationModel['entityType'],\n linkIds: string[],\n): PatchOperation => {\n return {\n entityId,\n entityType,\n type: 'update',\n data: { deleteLinks: linkIds },\n }\n}\n\n// Utility function to delete specific links by ID from entities\nexport const deleteLinksFromEntities = (\n entities: { entityId: string; entityType: OperationModel['entityType'] }[],\n linkIds: string[],\n): PatchOperation[] => {\n return entities.map((entity) =>\n createLinkDeletionPatch(entity.entityId, entity.entityType, linkIds),\n )\n}\n\n// Generic helper function to patch entities based on their type\nexport const patchOverviewEntities = (\n entities: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n // Group entities by type\n const entitiesByType = entities.reduce((acc, entity) => {\n if (!acc[entity.entityType]) {\n acc[entity.entityType] = []\n }\n acc[entity.entityType].push(entity)\n return acc\n }, {} as Record<string, PatchOperation[]>)\n\n // Patch each entity type using the appropriate function\n if (entitiesByType.task) {\n patchOverviewTasks(entitiesByType.task, { state, dispatch }, patches)\n }\n if (entitiesByType.folder) {\n patchOverviewFolders(entitiesByType.folder, { state, dispatch }, patches)\n }\n // Add more entity types as needed\n // if (entitiesByType.product) { ... }\n // if (entitiesByType.version) { ... }\n // etc.\n}\n\nexport const patchOverviewTasks = (\n tasks: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n const tags = getOverviewTaskTags(tasks)\n const taskEntries = getOverviewApi.util.selectInvalidatedBy(state, tags)\n\n for (const entry of taskEntries) {\n if (entry.endpointName === 'getTasksListInfinite') {\n // patch getTasksListInfinite\n const tasksPatch = dispatch(\n getOverviewApi.util.updateQueryData('getTasksListInfinite', entry.originalArgs, (draft) => {\n // Apply each change to matching tasks in all pages\n for (const taskOperation of tasks) {\n if (taskOperation.type === 'create' && taskOperation.data) {\n // push operation data to first page\n // @ts-expect-error\n draft.pages[0].tasks.push(taskOperation.data)\n } else {\n // Iterate through all pages in the infinite query\n for (const page of draft.pages) {\n // TODO: task is not found here, why?\n const task = page.tasks.find((task) => task.id === taskOperation.entityId)\n if (task) {\n updateEntityWithOperation(task, taskOperation.data)\n }\n }\n }\n }\n }),\n )\n\n // add the patch to the list of patches\n patches?.push(tasksPatch)\n } else {\n // this updates the main overview cache task\n // it also updates any GetTasksByParent caches\n const tasksPatch = dispatch(\n getOverviewApi.util.updateQueryData(\n entry.endpointName as 'getOverviewTasksByFolders' | 'GetTasksByParent' | 'GetTasksList',\n entry.originalArgs,\n (draft) => {\n // Apply each change to matching tasks in the cache\n for (const taskOperation of tasks) {\n if (\n taskOperation.type === 'create' &&\n taskOperation.data &&\n entry.originalArgs.parentIds?.includes(taskOperation.data.folderId)\n ) {\n const patchTask = (tasksArrayDraft: EditorTaskNode[]) => {\n // @ts-expect-error\n tasksArrayDraft.push(taskOperation.data)\n }\n\n // Check if draft is an array or an object with a tasks property\n if (Array.isArray(draft)) {\n patchTask(draft)\n } else if (draft.tasks && Array.isArray(draft.tasks)) {\n // Handle object with tasks array case (like in GetTasksList)\n const draftArray = draft.tasks\n patchTask(draftArray)\n }\n } else {\n const patchTask = (tasksArrayDraft: EditorTaskNode[]) => {\n const task = tasksArrayDraft.find((task) => task.id === taskOperation.entityId)\n if (task) {\n updateEntityWithOperation(task, taskOperation.data)\n }\n }\n\n // Check if draft is an array or an object with a tasks property\n if (Array.isArray(draft)) {\n patchTask(draft)\n } else if (draft.tasks && Array.isArray(draft.tasks)) {\n // Handle object with tasks array case (like in GetTasksList)\n const draftArray = draft.tasks\n patchTask(draftArray)\n }\n }\n }\n },\n ),\n )\n // add the patch to the list of patches\n patches?.push(tasksPatch)\n }\n }\n}\n\nconst invalidateOverviewTasks = (\n tasks: PatchOperation[],\n {\n dispatch,\n }: {\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n) => {\n if (!tasks.length) return\n dispatch(getOverviewApi.util.invalidateTags(getOverviewTaskTags(tasks)))\n}\n\nexport const patchOverviewFolders = (\n folders: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n const folderEntries = foldersQueries.util\n .selectInvalidatedBy(state, getOverviewFolderTags(folders))\n .filter((entry) => entry.endpointName === 'getFolderList')\n for (const entry of folderEntries) {\n const folderPatch = dispatch(\n foldersQueries.util.updateQueryData(\n entry.endpointName as 'getFolderList',\n entry.originalArgs,\n (draft) => {\n // Create a Map for O(1) folder lookups\n const folderMap = new Map()\n draft.folders.forEach((folder) => {\n folderMap.set(folder.id, folder)\n })\n\n for (const folderOperation of folders) {\n if (folderOperation.type === 'create' && folderOperation.data) {\n // push operation data to first page\n // @ts-expect-error\n draft.folders.push(folderOperation.data)\n } else {\n const folder = folderMap.get(folderOperation.entityId)\n\n if (folder) {\n updateEntityWithOperation(folder, folderOperation.data)\n }\n }\n }\n },\n ),\n )\n // add the patch to the list of patches\n patches?.push(folderPatch)\n }\n}\n\ntype DeepPartial<T> = T extends object\n ? {\n [P in keyof T]?: DeepPartial<T[P]>\n }\n : T\n\nconst operationDataToDetailsData = (\n data: Record<string, any>,\n entityType: DetailsPanelEntityType,\n): DeepPartial<DetailsPanelEntityData> => {\n const sharedData: DeepPartial<DetailsPanelEntityData> = {\n name: data.name,\n attrib: data.attrib,\n status: data.status,\n tags: data.tags,\n label: data.label,\n updatedAt: data.updatedAt,\n createdAt: data.createdAt,\n hasReviewables: data.hasReviewables,\n thumbnailId: data.thumbnailId,\n }\n\n switch (entityType) {\n case 'task':\n return {\n ...sharedData,\n task: {\n assignees: data.assignees,\n label: data.label,\n name: data.name,\n taskType: data.taskType,\n },\n }\n case 'folder':\n return {\n ...sharedData,\n folder: {\n id: data.id,\n name: data.name,\n label: data.label,\n folderType: data.folderType,\n },\n }\n case 'version':\n return {\n ...sharedData,\n version: {\n id: data.id,\n name: data.name,\n },\n }\n case 'representation':\n return {\n ...sharedData,\n }\n }\n}\n\nexport const patchDetailsPanelEntity = (\n operations: PatchOperation[] = [],\n draft: DetailsPanelEntityData,\n) => {\n // find the entity we are updating from the draft\n const operation = operations.find((op) => op.entityId === draft.id)\n const operationData = operation?.data\n\n if (!operationData || operation.entityType === 'product' || operation.entityType === 'workfile')\n return console.warn('No operation data found or entity type not supported')\n\n // transform the data to match the details panel entity data\n const detailsPanelData = operationDataToDetailsData(operationData, operation.entityType)\n\n // If this is a folder and name is being updated, also update the path\n if (operation.entityType === 'folder' && operationData.name && draft.path) {\n // Construct new path by replacing the last segment with the new name\n const pathParts = draft.path.split('/')\n pathParts[pathParts.length - 1] = operationData.name\n detailsPanelData.path = pathParts.join('/')\n }\n\n // helper to deep‐clean undefined values\n function cleanUndefined(obj: any): void {\n Object.entries(obj).forEach(([key, val]) => {\n if (val === undefined) {\n delete obj[key]\n } else if (val !== null && typeof val === 'object') {\n cleanUndefined(val)\n }\n })\n }\n\n // remove all undefineds at root and nested levels\n cleanUndefined(detailsPanelData as Record<string, any>)\n\n const newData: DeepPartial<DetailsPanelEntityData> = {\n ...draft,\n ...detailsPanelData,\n attrib: {\n ...(draft?.attrib || {}),\n ...detailsPanelData.attrib,\n },\n folder: {\n ...(draft?.folder || {}),\n ...detailsPanelData.folder,\n },\n task: {\n ...(draft?.task || {}),\n ...detailsPanelData.task,\n },\n version: {\n ...(draft?.version || {}),\n ...detailsPanelData.version,\n },\n }\n\n // patch data onto the entity\n Object.assign(draft, newData)\n}\n\nconst patchListItems = (\n entities: PatchOperation[],\n {\n state,\n dispatch,\n }: {\n state: RootState<any, any, 'restApi'>\n dispatch: ThunkDispatch<any, any, UnknownAction>\n },\n patches?: any[],\n) => {\n const tags = entities.map((op) => ({ type: 'entityListItem', id: op.entityId }))\n const entries = entityListsQueriesGql.util.selectInvalidatedBy(state, tags)\n\n for (const entry of entries) {\n if (entry.endpointName === 'getListItemsInfinite') {\n const listItemsPatch = dispatch(\n entityListsQueriesGql.util.updateQueryData(\n 'getListItemsInfinite',\n entry.originalArgs,\n (draft) => {\n // Apply each change to matching tasks in all pages\n for (const listOperation of entities) {\n if (listOperation.type === 'update' && listOperation.data) {\n // Iterate through all pages in the infinite query\n for (const page of draft.pages) {\n const item = page.items.find((item) => item.entityId === listOperation.entityId)\n if (item) {\n updateEntityWithOperation(item, listOperation.data)\n }\n }\n }\n }\n },\n ),\n )\n\n // add the patch to the list of patches\n patches?.push(listItemsPatch)\n }\n }\n}\n\nconst splitByOpType = (operations: OperationModel[]) => {\n return operations.reduce(\n (acc: Record<OperationModel['type'], OperationModel[]>, operation) => {\n acc[operation.type].push(operation)\n return acc\n },\n {\n create: [],\n update: [],\n delete: [],\n },\n )\n}\n\nconst operationsEnhanced = operationsApi.enhanceEndpoints({\n endpoints: {\n operations: {},\n },\n})\n\n// enhance the argument type to include some extra fields\ninterface UpdateOverviewEntitiesArg extends OperationsApiArg {\n patchOperations?: PatchOperation[] // extra entities to patch\n}\n\nconst operationsApiEnhancedInjected = operationsEnhanced.injectEndpoints({\n endpoints: (build) => ({\n updateOverviewEntities: build.mutation<\n OperationsResponseModel | undefined,\n UpdateOverviewEntitiesArg\n >({\n async queryFn(arg, { dispatch }) {\n try {\n const result = await dispatch(operationsEnhanced.endpoints.operations.initiate(arg))\n\n // Check if the network request itself failed (offline, timeout, etc.)\n if (result.error) {\n return { error: result.error as FetchBaseQueryError }\n }\n\n const data = result.data\n // check for any errors in the result\n const uniqueErrors = new Set()\n const uniqueErrorCodes = new Set()\n for (const op of data?.operations || []) {\n if (op.success === false && op.detail) {\n if (!uniqueErrors.has(op.detail)) {\n uniqueErrors.add(op.detail)\n }\n if (!uniqueErrorCodes.has(op.errorCode)) {\n uniqueErrorCodes.add(op.errorCode)\n }\n }\n }\n\n if (uniqueErrors.size > 0) {\n const error = {\n status: 'FETCH_ERROR',\n error: Array.from(uniqueErrors).join(', '),\n errorCodes: Array.from(uniqueErrorCodes),\n } as FetchBaseQueryError\n return { error }\n } else {\n return { data }\n }\n } catch (e: any) {\n console.error(e)\n const error = { status: 'FETCH_ERROR', error: e.message } as FetchBaseQueryError\n return { error }\n }\n },\n async onQueryStarted(\n { operationsRequestModel, patchOperations = [], projectName },\n { dispatch, queryFulfilled, getState },\n ) {\n if (!operationsRequestModel.operations?.length) return\n const { operations } = operationsRequestModel\n // we need to split the operations by entity type\n const operationsByType = operations.reduce(\n (acc: Record<OperationModel['entityType'], OperationModel[]>, operation) => {\n acc[operation.entityType].push(operation)\n return acc\n },\n {\n task: [],\n folder: [],\n product: [],\n version: [],\n representation: [],\n workfile: [],\n },\n )\n\n // collect patches incase we need to undo them\n const state = getState()\n const patches: any[] = []\n\n // patch the overview tasks\n if (operationsByType.task?.length) {\n // split operations by operation type\n const { delete: deleteOps, update } = splitByOpType(operationsByType.task)\n // filter out updates that are in updateToPatch as we patch them later on\n const updatesToPatch = update.filter(\n (op) => !patchOperations.some((dep) => dep.entityId === op.entityId),\n )\n // update existing tasks\n patchOverviewTasks(updatesToPatch, { state, dispatch }, patches)\n // invalidate the caches for tasks being created and deleted\n invalidateOverviewTasks([...deleteOps], {\n dispatch,\n })\n }\n\n // patch the overview folders (any other folders from foldersList)\n if (operationsByType.folder?.length) {\n // split operations by operation type\n const { delete: deleteOps, update } = splitByOpType(operationsByType.folder)\n // filter out updates that are in updateToPatch as we patch them later on\n const updatesToPatch = update.filter(\n (op) => !patchOperations.some((dep) => dep.entityId === op.entityId),\n )\n // update existing folders\n patchOverviewFolders(updatesToPatch, { state, dispatch }, patches)\n // invalidate the caches for folders being created and deleted\n if (deleteOps.length) {\n dispatch(foldersQueries.util.invalidateTags([{ type: 'folder', id: 'LIST' }]))\n }\n }\n\n const patchExtraTasks = patchOperations.filter((op) => op.entityType === 'task')\n const patchExtraFolders = patchOperations.filter((op) => op.entityType === 'folder')\n\n if (patchExtraTasks.length) {\n // often used for updating inherited dependents\n patchOverviewTasks(patchExtraTasks, { state, dispatch }, patches)\n }\n\n if (patchExtraFolders.length) {\n // often used for updating inherited dependents\n patchOverviewFolders(patchExtraFolders, { state, dispatch }, patches)\n }\n\n // patch the list items\n patchListItems([...operations, ...patchOperations], { state, dispatch }, patches)\n\n // patch versions\n if (operationsByType.version?.length) {\n patchVersions(operationsByType.version, { state, dispatch }, patches)\n }\n\n // patch products\n if (operationsByType.product?.length) {\n patchProducts(operationsByType.product, { state, dispatch }, patches)\n }\n\n // try to patch any details panels\n // first we patch the individual entities\n // then we patch the details panel cache\n const entityTags = operations.map((op) => ({\n id: op.entityId,\n type: op.entityType,\n }))\n const entitiesTags = entityTags.map((tag) => ({\n type: 'entities',\n id: tag.id,\n }))\n\n // invalidates the details panel cache so that it fetches all individual entities again (using it's updated cache)\n const invalidateEntryPanel = () =>\n dispatch(detailsPanelQueries.util.invalidateTags(entitiesTags))\n\n // the individual entities that are patched for the details panel\n // remember the details panel cache is made up of individual entity caches\n const detailsPanelEntityCaches = detailsPanelQueries.util.selectInvalidatedBy(\n state,\n entityTags,\n )\n\n // the cache for the whole details panel\n const detailsPanelEntitiesCaches = detailsPanelQueries.util.selectInvalidatedBy(\n state,\n entitiesTags,\n )\n\n for (const entry of detailsPanelEntitiesCaches) {\n if (entry.endpointName !== 'getEntitiesDetailsPanel') continue\n const entitiesDetailsResult = dispatch(\n detailsPanelQueries.util.updateQueryData(\n entry.endpointName as 'getEntitiesDetailsPanel',\n entry.originalArgs,\n (draft) => {\n for (const entity of draft) {\n patchDetailsPanelEntity(operations, entity)\n }\n },\n ),\n )\n\n // add the patch to the list of patches\n patches.push(entitiesDetailsResult)\n }\n\n try {\n await queryFulfilled\n\n // Background refetch logic - runs after successful mutation\n // This ensures calculated attributes are up-to-date and entities are correctly filtered\n\n const taskOperations = operationsByType.task || []\n const folderOperations = operationsByType.folder || []\n\n // Early exit if no operations\n if (taskOperations.length === 0 && folderOperations.length === 0) {\n return\n }\n\n // Extract updated entity IDs (always needed for refetch)\n const updatedTaskIds = getUpdatedEntityIds(taskOperations)\n const updatedFolderIds = getUpdatedEntityIds(folderOperations)\n\n // Get all active task list cache entries\n const overviewTaskTags = updatedTaskIds.map((id) => ({ type: 'overviewTask', id }))\n const tasksListInfiniteEntries = getOverviewApi.util\n .selectInvalidatedBy(state, overviewTaskTags)\n .filter((entry) => entry.endpointName === 'getTasksListInfinite')\n\n // Requirement: \"refetch the full data for the specific entity/entities\"\n // For each cache with its own filter, fetch entities and update that cache\n if (updatedTaskIds.length > 0 && projectName) {\n // Process getTasksListInfinite caches\n for (const entry of tasksListInfiniteEntries) {\n await refetchTasksForCacheEntry({\n dispatch,\n projectName,\n updatedTaskIds,\n cacheEntry: entry,\n })\n }\n\n // Process getOverviewTasksByFolders caches\n // Use selectInvalidatedBy to get only caches that contain the updated tasks\n const overviewTasksEntries = getOverviewApi.util\n .selectInvalidatedBy(state, overviewTaskTags)\n .filter((entry) => entry.endpointName === 'getOverviewTasksByFolders')\n\n for (const entry of overviewTasksEntries) {\n await refetchOverviewTasksForCacheEntry({\n dispatch,\n projectName,\n updatedTaskIds,\n cacheEntry: entry,\n })\n }\n }\n\n // Always refetch folders if they were updated (for calculated attributes)\n // Not conditional on affectsFilter - requirement says \"always refetch entities\"\n // Only invalidate if we haven't already done so for delete operations\n const hasDeleteOps = (operationsByType.folder || []).some(\n (op: OperationModel) => op.type === 'delete',\n )\n if (updatedFolderIds.length > 0 && projectName && !hasDeleteOps) {\n dispatch(foldersQueries.util.invalidateTags([{ type: 'folder', id: 'LIST' }]))\n }\n } catch (error) {\n // undo all patches if there is an error\n for (const patch of patches) {\n patch.undo()\n }\n\n if (detailsPanelEntityCaches.length) {\n // we invalidate the tags for the detailsPanelEntityCaches that were patched\n // invalidate the details panel cache\n invalidateEntryPanel()\n }\n }\n },\n invalidatesTags: (_r, _e, { operationsRequestModel, projectName }) => {\n type Tags = { id: string; type: string }[]\n const userDashboardTags: Tags = [{ type: 'kanban', id: 'project-' + projectName }],\n taskProgressTags: Tags = [],\n entityListItemTags: Tags = []\n\n operationsRequestModel.operations?.forEach((op) => {\n const { entityId } = op\n if (entityId) {\n taskProgressTags.push({ type: 'progress', id: entityId })\n // Invalidate list item cache for this entity to trigger background refetch\n entityListItemTags.push({ type: 'entityListItem', id: entityId })\n } else {\n // new entity created, so we should invalidate everything\n taskProgressTags.push({ type: 'progress', id: 'LIST' })\n }\n })\n\n return [...userDashboardTags, ...taskProgressTags, ...entityListItemTags]\n },\n }),\n }),\n})\n\nexport const { useUpdateOverviewEntitiesMutation } = operationsApiEnhancedInjected\n"],"names":["updateEntityWithOperation","entity","operationData","key","existingLinks","newLinks","newLink","existingIndex","link","linksToDelete","linkId","getOverviewTaskTags","tasks","op","_a","getOverviewFolderTags","folders","createLinkDeletionPatch","entityId","entityType","linkIds","deleteLinksFromEntities","entities","patchOverviewEntities","state","dispatch","patches","entitiesByType","acc","patchOverviewTasks","patchOverviewFolders","tags","taskEntries","getOverviewApi","entry","tasksPatch","draft","taskOperation","page","task","patchTask","tasksArrayDraft","draftArray","invalidateOverviewTasks","folderEntries","foldersQueries","folderPatch","folderMap","folder","folderOperation","operationDataToDetailsData","data","sharedData","patchDetailsPanelEntity","operations","operation","detailsPanelData","pathParts","cleanUndefined","obj","val","newData","patchListItems","entries","entityListsQueriesGql","listItemsPatch","listOperation","item","splitByOpType","operationsEnhanced","operationsApi","operationsApiEnhancedInjected","build","arg","result","uniqueErrors","uniqueErrorCodes","e","operationsRequestModel","patchOperations","projectName","queryFulfilled","getState","operationsByType","_b","deleteOps","update","updatesToPatch","dep","_c","patchExtraTasks","patchExtraFolders","_d","patchVersions","_e","patchProducts","entityTags","entitiesTags","tag","invalidateEntryPanel","detailsPanelQueries","detailsPanelEntityCaches","detailsPanelEntitiesCaches","entitiesDetailsResult","taskOperations","folderOperations","updatedTaskIds","getUpdatedEntityIds","updatedFolderIds","overviewTaskTags","id","tasksListInfiniteEntries","refetchTasksForCacheEntry","overviewTasksEntries","refetchOverviewTasksForCacheEntry","hasDeleteOps","patch","_r","userDashboardTags","taskProgressTags","entityListItemTags","useUpdateOverviewEntitiesMutation"],"mappings":"ixHAuBMA,EAA4B,CAACC,EAAaC,IAAuB,CAgBrE,GAdA,OAAO,KAAKA,CAAa,EAA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AKH,MAAM+E,EAAuBhF,EAAA,QAAe,KACzC,oBAAoBT,EAAOqF,CAAgB,EAC3C,OAAQ3E,GAAUA,EAAM,eAAiB,2BAA2B,EAEvE,UAAWA,KAAS+E,EAClB,MAAMC,oCAAkC,CACtC,SAAAzF,EACA,YAAAuD,EACA,eAAA0B,EACA,WAAYxE,CAAA,CACb,CACH,CAMF,MAAMiF,GAAgBhC,EAAiB,QAAU,CAAI,GAAA,KAClDtE,GAAuBA,EAAG,OAAS,QACtC,EACI+F,EAAiB,OAAS,GAAK5B,GAAe,CAACmC,GACxC1F,EAAAoB,EAAA,eAAe,KAAK,eAAe,CAAC,CAAE,KAAM,SAAU,GAAI,MAAQ,CAAA,CAAC,CAAC,OAEjE,CAEd,UAAWuE,KAAS1F,EAClB0F,EAAM,KAAK,EAGTf,EAAyB,QAGNF,EAAA,CACvB,CAEJ,EACA,gBAAiB,CAACkB,EAAIvB,EAAI,CAAE,uBAAAhB,EAAwB,YAAAE,KAAkB,OAEpE,MAAMsC,EAA0B,CAAC,CAAE,KAAM,SAAU,GAAI,WAAatC,CAAa,CAAA,EAC/EuC,EAAyB,CAAC,EAC1BC,EAA2B,CAAC,EAEP,OAAA1G,EAAAgE,EAAA,aAAA,MAAAhE,EAAY,QAASD,GAAO,CAC3C,KAAA,CAAE,SAAAK,GAAaL,EACjBK,GACFqG,EAAiB,KAAK,CAAE,KAAM,WAAY,GAAIrG,EAAU,EAExDsG,EAAmB,KAAK,CAAE,KAAM,iBAAkB,GAAItG,EAAU,GAGhEqG,EAAiB,KAAK,CAAE,KAAM,WAAY,GAAI,OAAQ,CACxD,GAGK,CAAC,GAAGD,EAAmB,GAAGC,EAAkB,GAAGC,CAAkB,CAAA,CAE3E,CAAA,CACH,EACF,CAAC,EAEY,CAAE,kCAAAC,IAAsClD"}
|
|
@@ -48,6 +48,8 @@ import "../attributes/getAttributes.es.js";
|
|
|
48
48
|
import "../attributes/updateAttributes.es.js";
|
|
49
49
|
import "../authentication/getAuthentication.es.js";
|
|
50
50
|
import "../cloud/cloud.es.js";
|
|
51
|
+
import "../config/getConfig.es.js";
|
|
52
|
+
import "../config/updateConfig.es.js";
|
|
51
53
|
import "../entities/getEntity.es.js";
|
|
52
54
|
import { detailsPanelQueries as w } from "../entities/getEntityPanel.es.js";
|
|
53
55
|
import "../entities/updateEntity.es.js";
|
|
@@ -91,16 +93,16 @@ const b = (t, e) => {
|
|
|
91
93
|
...t.attrib,
|
|
92
94
|
...e.attrib
|
|
93
95
|
}), e.links) {
|
|
94
|
-
const i = t.links || [],
|
|
95
|
-
t.links || (t.links = []), t.links = [...i],
|
|
96
|
+
const i = t.links || [], s = e.links || [];
|
|
97
|
+
t.links || (t.links = []), t.links = [...i], s.forEach((r) => {
|
|
96
98
|
const l = t.links.findIndex((p) => p.id === r.id);
|
|
97
99
|
l !== -1 ? t.links[l] = { ...t.links[l], ...r } : t.links.push(r);
|
|
98
100
|
});
|
|
99
101
|
}
|
|
100
102
|
if (e.deleteLinks) {
|
|
101
103
|
const i = e.deleteLinks || [];
|
|
102
|
-
t.links || (t.links = []), i.forEach((
|
|
103
|
-
t.links = t.links.filter((r) => r.id !==
|
|
104
|
+
t.links || (t.links = []), i.forEach((s) => {
|
|
105
|
+
t.links = t.links.filter((r) => r.id !== s);
|
|
104
106
|
});
|
|
105
107
|
}
|
|
106
108
|
}, x = (t) => [
|
|
@@ -135,43 +137,43 @@ const b = (t, e) => {
|
|
|
135
137
|
entityType: e,
|
|
136
138
|
type: "update",
|
|
137
139
|
data: { deleteLinks: i }
|
|
138
|
-
}),
|
|
140
|
+
}), Qe = (t, e) => t.map(
|
|
139
141
|
(i) => K(i.entityId, i.entityType, e)
|
|
140
|
-
),
|
|
142
|
+
), Re = (t, {
|
|
141
143
|
state: e,
|
|
142
144
|
dispatch: i
|
|
143
|
-
},
|
|
145
|
+
}, s) => {
|
|
144
146
|
const r = t.reduce((l, p) => (l[p.entityType] || (l[p.entityType] = []), l[p.entityType].push(p), l), {});
|
|
145
|
-
r.task && L(r.task, { state: e, dispatch: i },
|
|
147
|
+
r.task && L(r.task, { state: e, dispatch: i }, s), r.folder && O(r.folder, { state: e, dispatch: i }, s);
|
|
146
148
|
}, L = (t, {
|
|
147
149
|
state: e,
|
|
148
150
|
dispatch: i
|
|
149
|
-
},
|
|
151
|
+
}, s) => {
|
|
150
152
|
const r = x(t), l = v.util.selectInvalidatedBy(e, r);
|
|
151
153
|
for (const p of l)
|
|
152
154
|
if (p.endpointName === "getTasksListInfinite") {
|
|
153
155
|
const a = i(
|
|
154
156
|
v.util.updateQueryData("getTasksListInfinite", p.originalArgs, (n) => {
|
|
155
|
-
for (const
|
|
156
|
-
if (
|
|
157
|
-
n.pages[0].tasks.push(
|
|
157
|
+
for (const o of t)
|
|
158
|
+
if (o.type === "create" && o.data)
|
|
159
|
+
n.pages[0].tasks.push(o.data);
|
|
158
160
|
else
|
|
159
161
|
for (const d of n.pages) {
|
|
160
|
-
const c = d.tasks.find((f) => f.id ===
|
|
161
|
-
c && b(c,
|
|
162
|
+
const c = d.tasks.find((f) => f.id === o.entityId);
|
|
163
|
+
c && b(c, o.data);
|
|
162
164
|
}
|
|
163
165
|
})
|
|
164
166
|
);
|
|
165
|
-
|
|
167
|
+
s == null || s.push(a);
|
|
166
168
|
} else {
|
|
167
169
|
const a = i(
|
|
168
170
|
v.util.updateQueryData(
|
|
169
171
|
p.endpointName,
|
|
170
172
|
p.originalArgs,
|
|
171
173
|
(n) => {
|
|
172
|
-
var
|
|
174
|
+
var o;
|
|
173
175
|
for (const d of t)
|
|
174
|
-
if (d.type === "create" && d.data && ((
|
|
176
|
+
if (d.type === "create" && d.data && ((o = p.originalArgs.parentIds) != null && o.includes(d.data.folderId))) {
|
|
175
177
|
const c = (f) => {
|
|
176
178
|
f.push(d.data);
|
|
177
179
|
};
|
|
@@ -196,7 +198,7 @@ const b = (t, e) => {
|
|
|
196
198
|
}
|
|
197
199
|
)
|
|
198
200
|
);
|
|
199
|
-
|
|
201
|
+
s == null || s.push(a);
|
|
200
202
|
}
|
|
201
203
|
}, X = (t, {
|
|
202
204
|
dispatch: e
|
|
@@ -205,7 +207,7 @@ const b = (t, e) => {
|
|
|
205
207
|
}, O = (t, {
|
|
206
208
|
state: e,
|
|
207
209
|
dispatch: i
|
|
208
|
-
},
|
|
210
|
+
}, s) => {
|
|
209
211
|
const r = A.util.selectInvalidatedBy(e, J(t)).filter((l) => l.endpointName === "getFolderList");
|
|
210
212
|
for (const l of r) {
|
|
211
213
|
const p = i(
|
|
@@ -214,20 +216,20 @@ const b = (t, e) => {
|
|
|
214
216
|
l.originalArgs,
|
|
215
217
|
(a) => {
|
|
216
218
|
const n = /* @__PURE__ */ new Map();
|
|
217
|
-
a.folders.forEach((
|
|
218
|
-
n.set(
|
|
219
|
+
a.folders.forEach((o) => {
|
|
220
|
+
n.set(o.id, o);
|
|
219
221
|
});
|
|
220
|
-
for (const
|
|
221
|
-
if (
|
|
222
|
-
a.folders.push(
|
|
222
|
+
for (const o of t)
|
|
223
|
+
if (o.type === "create" && o.data)
|
|
224
|
+
a.folders.push(o.data);
|
|
223
225
|
else {
|
|
224
|
-
const d = n.get(
|
|
225
|
-
d && b(d,
|
|
226
|
+
const d = n.get(o.entityId);
|
|
227
|
+
d && b(d, o.data);
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
230
|
)
|
|
229
231
|
);
|
|
230
|
-
|
|
232
|
+
s == null || s.push(p);
|
|
231
233
|
}
|
|
232
234
|
}, Y = (t, e) => {
|
|
233
235
|
const i = {
|
|
@@ -276,17 +278,17 @@ const b = (t, e) => {
|
|
|
276
278
|
};
|
|
277
279
|
}
|
|
278
280
|
}, Z = (t = [], e) => {
|
|
279
|
-
const i = t.find((a) => a.entityId === e.id),
|
|
280
|
-
if (!
|
|
281
|
+
const i = t.find((a) => a.entityId === e.id), s = i == null ? void 0 : i.data;
|
|
282
|
+
if (!s || i.entityType === "product" || i.entityType === "workfile")
|
|
281
283
|
return console.warn("No operation data found or entity type not supported");
|
|
282
|
-
const r = Y(
|
|
283
|
-
if (i.entityType === "folder" &&
|
|
284
|
+
const r = Y(s, i.entityType);
|
|
285
|
+
if (i.entityType === "folder" && s.name && e.path) {
|
|
284
286
|
const a = e.path.split("/");
|
|
285
|
-
a[a.length - 1] =
|
|
287
|
+
a[a.length - 1] = s.name, r.path = a.join("/");
|
|
286
288
|
}
|
|
287
289
|
function l(a) {
|
|
288
|
-
Object.entries(a).forEach(([n,
|
|
289
|
-
|
|
290
|
+
Object.entries(a).forEach(([n, o]) => {
|
|
291
|
+
o === void 0 ? delete a[n] : o !== null && typeof o == "object" && l(o);
|
|
290
292
|
});
|
|
291
293
|
}
|
|
292
294
|
l(r);
|
|
@@ -314,7 +316,7 @@ const b = (t, e) => {
|
|
|
314
316
|
}, $ = (t, {
|
|
315
317
|
state: e,
|
|
316
318
|
dispatch: i
|
|
317
|
-
},
|
|
319
|
+
}, s) => {
|
|
318
320
|
const r = t.map((p) => ({ type: "entityListItem", id: p.entityId })), l = N.util.selectInvalidatedBy(e, r);
|
|
319
321
|
for (const p of l)
|
|
320
322
|
if (p.endpointName === "getListItemsInfinite") {
|
|
@@ -323,16 +325,16 @@ const b = (t, e) => {
|
|
|
323
325
|
"getListItemsInfinite",
|
|
324
326
|
p.originalArgs,
|
|
325
327
|
(n) => {
|
|
326
|
-
for (const
|
|
327
|
-
if (
|
|
328
|
+
for (const o of t)
|
|
329
|
+
if (o.type === "update" && o.data)
|
|
328
330
|
for (const d of n.pages) {
|
|
329
|
-
const c = d.items.find((f) => f.entityId ===
|
|
330
|
-
c && b(c,
|
|
331
|
+
const c = d.items.find((f) => f.entityId === o.entityId);
|
|
332
|
+
c && b(c, o.data);
|
|
331
333
|
}
|
|
332
334
|
}
|
|
333
335
|
)
|
|
334
336
|
);
|
|
335
|
-
|
|
337
|
+
s == null || s.push(a);
|
|
336
338
|
}
|
|
337
339
|
}, Q = (t) => t.reduce(
|
|
338
340
|
(e, i) => (e[i.type].push(i), e),
|
|
@@ -350,10 +352,10 @@ const b = (t, e) => {
|
|
|
350
352
|
updateOverviewEntities: t.mutation({
|
|
351
353
|
async queryFn(e, { dispatch: i }) {
|
|
352
354
|
try {
|
|
353
|
-
const
|
|
354
|
-
if (
|
|
355
|
-
return { error:
|
|
356
|
-
const r =
|
|
355
|
+
const s = await i(R.endpoints.operations.initiate(e));
|
|
356
|
+
if (s.error)
|
|
357
|
+
return { error: s.error };
|
|
358
|
+
const r = s.data, l = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set();
|
|
357
359
|
for (const a of (r == null ? void 0 : r.operations) || [])
|
|
358
360
|
a.success === !1 && a.detail && (l.has(a.detail) || l.add(a.detail), p.has(a.errorCode) || p.add(a.errorCode));
|
|
359
361
|
return l.size > 0 ? { error: {
|
|
@@ -361,11 +363,11 @@ const b = (t, e) => {
|
|
|
361
363
|
error: Array.from(l).join(", "),
|
|
362
364
|
errorCodes: Array.from(p)
|
|
363
365
|
} } : { data: r };
|
|
364
|
-
} catch (
|
|
365
|
-
return console.error(
|
|
366
|
+
} catch (s) {
|
|
367
|
+
return console.error(s), { error: { status: "FETCH_ERROR", error: s.message } };
|
|
366
368
|
}
|
|
367
369
|
},
|
|
368
|
-
async onQueryStarted({ operationsRequestModel: e, patchOperations: i = [], projectName:
|
|
370
|
+
async onQueryStarted({ operationsRequestModel: e, patchOperations: i = [], projectName: s }, { dispatch: r, queryFulfilled: l, getState: p }) {
|
|
369
371
|
var P, j, D, F, B;
|
|
370
372
|
if (!((P = e.operations) != null && P.length)) return;
|
|
371
373
|
const { operations: a } = e, n = a.reduce(
|
|
@@ -378,12 +380,12 @@ const b = (t, e) => {
|
|
|
378
380
|
representation: [],
|
|
379
381
|
workfile: []
|
|
380
382
|
}
|
|
381
|
-
),
|
|
383
|
+
), o = p(), d = [];
|
|
382
384
|
if ((j = n.task) != null && j.length) {
|
|
383
385
|
const { delete: m, update: u } = Q(n.task), y = u.filter(
|
|
384
386
|
(g) => !i.some((T) => T.entityId === g.entityId)
|
|
385
387
|
);
|
|
386
|
-
L(y, { state:
|
|
388
|
+
L(y, { state: o, dispatch: r }, d), X([...m], {
|
|
387
389
|
dispatch: r
|
|
388
390
|
});
|
|
389
391
|
}
|
|
@@ -391,10 +393,10 @@ const b = (t, e) => {
|
|
|
391
393
|
const { delete: m, update: u } = Q(n.folder), y = u.filter(
|
|
392
394
|
(g) => !i.some((T) => T.entityId === g.entityId)
|
|
393
395
|
);
|
|
394
|
-
O(y, { state:
|
|
396
|
+
O(y, { state: o, dispatch: r }, d), m.length && r(A.util.invalidateTags([{ type: "folder", id: "LIST" }]));
|
|
395
397
|
}
|
|
396
398
|
const c = i.filter((m) => m.entityType === "task"), f = i.filter((m) => m.entityType === "folder");
|
|
397
|
-
c.length && L(c, { state:
|
|
399
|
+
c.length && L(c, { state: o, dispatch: r }, d), f.length && O(f, { state: o, dispatch: r }, d), $([...a, ...i], { state: o, dispatch: r }, d), (F = n.version) != null && F.length && z(n.version, { state: o, dispatch: r }, d), (B = n.product) != null && B.length && G(n.product, { state: o, dispatch: r }, d);
|
|
398
400
|
const I = a.map((m) => ({
|
|
399
401
|
id: m.entityId,
|
|
400
402
|
type: m.entityType
|
|
@@ -402,10 +404,10 @@ const b = (t, e) => {
|
|
|
402
404
|
type: "entities",
|
|
403
405
|
id: m.id
|
|
404
406
|
})), S = () => r(w.util.invalidateTags(E)), _ = w.util.selectInvalidatedBy(
|
|
405
|
-
|
|
407
|
+
o,
|
|
406
408
|
I
|
|
407
409
|
), q = w.util.selectInvalidatedBy(
|
|
408
|
-
|
|
410
|
+
o,
|
|
409
411
|
E
|
|
410
412
|
);
|
|
411
413
|
for (const m of q) {
|
|
@@ -427,20 +429,20 @@ const b = (t, e) => {
|
|
|
427
429
|
const m = n.task || [], u = n.folder || [];
|
|
428
430
|
if (m.length === 0 && u.length === 0)
|
|
429
431
|
return;
|
|
430
|
-
const y = C(m), g = C(u), T = y.map((k) => ({ type: "overviewTask", id: k })), U = v.util.selectInvalidatedBy(
|
|
431
|
-
if (y.length > 0 &&
|
|
432
|
+
const y = C(m), g = C(u), T = y.map((k) => ({ type: "overviewTask", id: k })), U = v.util.selectInvalidatedBy(o, T).filter((k) => k.endpointName === "getTasksListInfinite");
|
|
433
|
+
if (y.length > 0 && s) {
|
|
432
434
|
for (const h of U)
|
|
433
435
|
await V({
|
|
434
436
|
dispatch: r,
|
|
435
|
-
projectName:
|
|
437
|
+
projectName: s,
|
|
436
438
|
updatedTaskIds: y,
|
|
437
439
|
cacheEntry: h
|
|
438
440
|
});
|
|
439
|
-
const k = v.util.selectInvalidatedBy(
|
|
441
|
+
const k = v.util.selectInvalidatedBy(o, T).filter((h) => h.endpointName === "getOverviewTasksByFolders");
|
|
440
442
|
for (const h of k)
|
|
441
443
|
await W({
|
|
442
444
|
dispatch: r,
|
|
443
|
-
projectName:
|
|
445
|
+
projectName: s,
|
|
444
446
|
updatedTaskIds: y,
|
|
445
447
|
cacheEntry: h
|
|
446
448
|
});
|
|
@@ -448,31 +450,31 @@ const b = (t, e) => {
|
|
|
448
450
|
const H = (n.folder || []).some(
|
|
449
451
|
(k) => k.type === "delete"
|
|
450
452
|
);
|
|
451
|
-
g.length > 0 &&
|
|
453
|
+
g.length > 0 && s && !H && r(A.util.invalidateTags([{ type: "folder", id: "LIST" }]));
|
|
452
454
|
} catch {
|
|
453
455
|
for (const u of d)
|
|
454
456
|
u.undo();
|
|
455
457
|
_.length && S();
|
|
456
458
|
}
|
|
457
459
|
},
|
|
458
|
-
invalidatesTags: (e, i, { operationsRequestModel:
|
|
460
|
+
invalidatesTags: (e, i, { operationsRequestModel: s, projectName: r }) => {
|
|
459
461
|
var n;
|
|
460
462
|
const l = [{ type: "kanban", id: "project-" + r }], p = [], a = [];
|
|
461
|
-
return (n =
|
|
462
|
-
const { entityId: d } =
|
|
463
|
+
return (n = s.operations) == null || n.forEach((o) => {
|
|
464
|
+
const { entityId: d } = o;
|
|
463
465
|
d ? (p.push({ type: "progress", id: d }), a.push({ type: "entityListItem", id: d })) : p.push({ type: "progress", id: "LIST" });
|
|
464
466
|
}), [...l, ...p, ...a];
|
|
465
467
|
}
|
|
466
468
|
})
|
|
467
469
|
})
|
|
468
|
-
}), { useUpdateOverviewEntitiesMutation:
|
|
470
|
+
}), { useUpdateOverviewEntitiesMutation: xe } = tt;
|
|
469
471
|
export {
|
|
470
472
|
K as createLinkDeletionPatch,
|
|
471
|
-
|
|
473
|
+
Qe as deleteLinksFromEntities,
|
|
472
474
|
Z as patchDetailsPanelEntity,
|
|
473
|
-
|
|
475
|
+
Re as patchOverviewEntities,
|
|
474
476
|
O as patchOverviewFolders,
|
|
475
477
|
L as patchOverviewTasks,
|
|
476
|
-
|
|
478
|
+
xe as useUpdateOverviewEntitiesMutation
|
|
477
479
|
};
|
|
478
480
|
//# sourceMappingURL=updateOverview.es.js.map
|