@ynput/ayon-frontend-shared 0.3.32 → 0.3.34
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 +26 -24
- package/dist/DetailsPanel.es.js.map +1 -1
- package/dist/ProjectTreeTable.cjs.js +1 -1
- package/dist/ProjectTreeTable.es.js +218 -214
- package/dist/ProjectTreeTable.es.js.map +1 -1
- package/dist/Slicer.cjs.js +1 -1
- package/dist/Slicer.es.js +19 -18
- package/dist/Slicer.es.js.map +1 -1
- package/dist/_virtual/index.cjs14.js +1 -1
- package/dist/_virtual/index.cjs15.js +1 -1
- package/dist/_virtual/index.cjs19.js +1 -1
- package/dist/_virtual/index.cjs4.js +1 -1
- package/dist/_virtual/index.cjs5.js +1 -1
- package/dist/_virtual/index.cjs6.js +1 -1
- package/dist/_virtual/index.cjs8.js +1 -1
- package/dist/_virtual/index.cjs9.js +1 -1
- package/dist/_virtual/index.es10.js +2 -2
- package/dist/_virtual/index.es11.js +2 -2
- package/dist/_virtual/index.es13.js +2 -2
- package/dist/_virtual/index.es14.js +2 -5
- package/dist/_virtual/index.es14.js.map +1 -1
- package/dist/_virtual/index.es15.js +2 -2
- package/dist/_virtual/index.es16.js +2 -2
- package/dist/_virtual/index.es17.js +2 -2
- package/dist/_virtual/index.es18.js +2 -2
- package/dist/_virtual/index.es19.js +2 -2
- package/dist/_virtual/index.es4.js +5 -2
- package/dist/_virtual/index.es4.js.map +1 -1
- package/dist/_virtual/index.es5.js +2 -5
- package/dist/_virtual/index.es5.js.map +1 -1
- package/dist/_virtual/index.es6.js +2 -2
- package/dist/_virtual/index.es8.js +2 -2
- package/dist/_virtual/index.es9.js +5 -2
- package/dist/_virtual/index.es9.js.map +1 -1
- package/dist/api.cjs.js +1 -1
- package/dist/api.es.js +435 -430
- package/dist/api.es.js.map +1 -1
- package/dist/components.cjs.js +1 -1
- package/dist/components.es.js +83 -80
- package/dist/components.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +13 -11
- package/dist/index.es.js.map +1 -1
- package/dist/node_modules/match-sorter/dist/match-sorter.esm.cjs.js +1 -1
- package/dist/node_modules/match-sorter/dist/match-sorter.esm.es.js +1 -1
- package/dist/node_modules/remove-accents/index.cjs.js +1 -1
- package/dist/node_modules/remove-accents/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/error-codes/dist/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/error-codes/dist/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime/dist/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime/dist/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/module/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/module/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/plugins/snapshot/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/plugins/snapshot/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/remote/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/remote/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/shared/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/shared/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/type/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/type/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/hooks/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/hooks/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/semver/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/semver/index.cjs.js.map +1 -1
- package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/semver/index.es.js +1 -1
- package/dist/shared/node_modules/@module-federation/sdk/dist/index.cjs.js +1 -1
- package/dist/shared/node_modules/@module-federation/sdk/dist/index.es.js +1 -1
- package/dist/shared/node_modules/prop-types/index.cjs.js +1 -1
- package/dist/shared/node_modules/prop-types/index.es.js +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.cjs.js +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.cjs.js.map +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.es.js +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/Transition.cjs.js +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/Transition.cjs.js.map +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/Transition.es.js +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.cjs.js +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.cjs.js.map +1 -1
- package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.es.js +1 -1
- package/dist/shared/src/api/base/client.cjs.js +1 -1
- package/dist/shared/src/api/base/client.cjs.js.map +1 -1
- package/dist/shared/src/api/base/client.es.js +1 -0
- package/dist/shared/src/api/base/client.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.cjs.js +104 -48
- package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphql.es.js +175 -115
- package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.cjs.js.map +1 -1
- package/dist/shared/src/api/generated/graphqlLinks.es.js.map +1 -1
- package/dist/shared/src/api/queries/activities/getActivities.cjs.js +1 -1
- package/dist/shared/src/api/queries/activities/getActivities.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/activities/getActivities.es.js +26 -24
- package/dist/shared/src/api/queries/activities/getActivities.es.js.map +1 -1
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.cjs.js +1 -1
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.es.js +6 -6
- package/dist/shared/src/api/queries/activities/util/activitiesHelpers.es.js.map +1 -1
- package/dist/shared/src/api/queries/entityLists/listItemsColumnStats.cjs.js +2 -0
- package/dist/shared/src/api/queries/entityLists/listItemsColumnStats.cjs.js.map +1 -0
- package/dist/shared/src/api/queries/entityLists/listItemsColumnStats.es.js +68 -0
- package/dist/shared/src/api/queries/entityLists/listItemsColumnStats.es.js.map +1 -0
- package/dist/shared/src/api/queries/entityLists/updateLists.cjs.js +1 -1
- package/dist/shared/src/api/queries/entityLists/updateLists.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/entityLists/updateLists.es.js +73 -69
- package/dist/shared/src/api/queries/entityLists/updateLists.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 +60 -55
- package/dist/shared/src/api/queries/overview/updateOverview.es.js.map +1 -1
- package/dist/shared/src/api/queries/users/getUsers.cjs.js +4 -4
- package/dist/shared/src/api/queries/users/getUsers.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/users/getUsers.es.js +11 -11
- package/dist/shared/src/api/queries/users/getUsers.es.js.map +1 -1
- package/dist/shared/src/components/ColumnHeaderMenuUI.cjs.js +1 -1
- package/dist/shared/src/components/ColumnHeaderMenuUI.cjs.js.map +1 -1
- package/dist/shared/src/components/ColumnHeaderMenuUI.es.js +3 -2
- package/dist/shared/src/components/ColumnHeaderMenuUI.es.js.map +1 -1
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js +1 -1
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js +3 -2
- package/dist/shared/src/components/DetailsDialog/DetailsDialog.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js +6 -4
- package/dist/shared/src/components/DetailsPanelAttributes/components/RenderFieldWidget.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.es.js +3 -2
- package/dist/shared/src/components/DetailsPanelDetails/DescriptionSection.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.es.js +3 -2
- package/dist/shared/src/components/DetailsPanelDetails/DetailsPanelDetails.es.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.cjs.js.map +1 -1
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js +3 -2
- package/dist/shared/src/components/DetailsPanelDetails/hooks/useEntityEditing.es.js.map +1 -1
- package/dist/shared/src/components/EntityIcon/EntityIcon.cjs.js +1 -1
- package/dist/shared/src/components/EntityIcon/EntityIcon.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityIcon/EntityIcon.es.js +3 -2
- package/dist/shared/src/components/EntityIcon/EntityIcon.es.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js +6 -4
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploader.es.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.cjs.js +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.es.js +6 -4
- package/dist/shared/src/components/EntityPanelUploader/EntityPanelUploaderDialog.es.js.map +1 -1
- package/dist/shared/src/components/EntityPath/SegmentProvider.cjs.js +1 -1
- package/dist/shared/src/components/EntityPath/SegmentProvider.cjs.js.map +1 -1
- package/dist/shared/src/components/EntityPath/SegmentProvider.es.js +3 -2
- package/dist/shared/src/components/EntityPath/SegmentProvider.es.js.map +1 -1
- package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js +1 -1
- package/dist/shared/src/components/Feedback/FeedbackContext.cjs.js.map +1 -1
- package/dist/shared/src/components/Feedback/FeedbackContext.es.js +5 -4
- package/dist/shared/src/components/Feedback/FeedbackContext.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/AddNewLinks.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/AddNewLinks.es.js +3 -2
- package/dist/shared/src/components/LinksManager/AddNewLinks.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js +3 -2
- package/dist/shared/src/components/LinksManager/LinkManagerItem.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/LinksManager.es.js +3 -2
- package/dist/shared/src/components/LinksManager/LinksManager.es.js.map +1 -1
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js +1 -1
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.cjs.js.map +1 -1
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.es.js +6 -4
- package/dist/shared/src/components/LinksManager/hooks/useUpdateLinks.es.js.map +1 -1
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js +1 -1
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.cjs.js.map +1 -1
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.es.js +3 -2
- package/dist/shared/src/components/ListAttributeForm/ListAttributeForm.es.js.map +1 -1
- package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js +1 -1
- package/dist/shared/src/components/ListMetaData/ListMetaData.cjs.js.map +1 -1
- package/dist/shared/src/components/ListMetaData/ListMetaData.es.js +3 -2
- package/dist/shared/src/components/ListMetaData/ListMetaData.es.js.map +1 -1
- package/dist/shared/src/components/Menu/Menu.cjs.js +1 -1
- package/dist/shared/src/components/Menu/Menu.cjs.js.map +1 -1
- package/dist/shared/src/components/Menu/Menu.es.js +3 -2
- package/dist/shared/src/components/Menu/Menu.es.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuItem.cjs.js +1 -1
- package/dist/shared/src/components/Menu/MenuItem.cjs.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuItem.es.js +1 -0
- package/dist/shared/src/components/Menu/MenuItem.es.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuList.cjs.js +1 -1
- package/dist/shared/src/components/Menu/MenuList.cjs.js.map +1 -1
- package/dist/shared/src/components/Menu/MenuList.es.js +3 -2
- package/dist/shared/src/components/Menu/MenuList.es.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackButton.cjs.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackButton.es.js +3 -2
- package/dist/shared/src/components/Powerpack/PowerpackButton.es.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js +3 -2
- package/dist/shared/src/components/Powerpack/PowerpackDialog.es.js.map +1 -1
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.cjs.js +1 -1
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.cjs.js.map +1 -1
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.es.js +3 -2
- package/dist/shared/src/components/Powerpack/useFreeTrialLink.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js +6 -4
- package/dist/shared/src/components/ProjectTableSettings/ColumnsSettings.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js +8 -6
- package/dist/shared/src/components/ProjectTableSettings/ProjectTableSettings.es.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js +1 -1
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.cjs.js.map +1 -1
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js +3 -2
- package/dist/shared/src/components/ProjectTableSettings/TableSettingsFallback.es.js.map +1 -1
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.cjs.js +1 -1
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.cjs.js.map +1 -1
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.es.js +6 -4
- package/dist/shared/src/components/RemotePage/ProjectPageRemote.es.js.map +1 -1
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js +1 -1
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js.map +1 -1
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js +6 -4
- package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js.map +1 -1
- package/dist/shared/src/components/RenameForm/RenameForm.cjs.js +1 -1
- package/dist/shared/src/components/RenameForm/RenameForm.cjs.js.map +1 -1
- package/dist/shared/src/components/RenameForm/RenameForm.es.js +6 -4
- package/dist/shared/src/components/RenameForm/RenameForm.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js +3 -2
- package/dist/shared/src/components/ReviewablesList/EditReviewableDialog.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesList.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/ReviewablesList.es.js +6 -4
- 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 +7 -5
- 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 +6 -4
- package/dist/shared/src/components/ReviewablesList/SortableReviewableCard.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js +3 -2
- package/dist/shared/src/components/ReviewablesList/useReviewablesUpload.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesSelector/Card.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesSelector/Card.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesSelector/Card.es.js +6 -4
- package/dist/shared/src/components/ReviewablesSelector/Card.es.js.map +1 -1
- package/dist/shared/src/components/ReviewablesSelector/ReviewablesSelector.cjs.js +1 -1
- package/dist/shared/src/components/ReviewablesSelector/ReviewablesSelector.cjs.js.map +1 -1
- package/dist/shared/src/components/ReviewablesSelector/ReviewablesSelector.es.js +2 -1
- package/dist/shared/src/components/ReviewablesSelector/ReviewablesSelector.es.js.map +1 -1
- package/dist/shared/src/components/SearchFilter/filterScopeRegistry.cjs.js +2 -0
- package/dist/shared/src/components/SearchFilter/filterScopeRegistry.cjs.js.map +1 -0
- package/dist/shared/src/components/SearchFilter/filterScopeRegistry.es.js +24 -0
- package/dist/shared/src/components/SearchFilter/filterScopeRegistry.es.js.map +1 -0
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js +1 -1
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.cjs.js.map +1 -1
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js +7 -6
- package/dist/shared/src/components/SearchFilter/useBuildFilterOptions.es.js.map +1 -1
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js +1 -1
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.cjs.js.map +1 -1
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js +3 -2
- package/dist/shared/src/components/SettingsPanel/SettingsPanel.es.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/FormFile.cjs.js +1 -1
- package/dist/shared/src/components/SimpleFormDialog/FormFile.cjs.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/FormFile.es.js +8 -6
- package/dist/shared/src/components/SimpleFormDialog/FormFile.es.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js +1 -1
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.cjs.js.map +1 -1
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js +6 -4
- package/dist/shared/src/components/SimpleFormDialog/SimpleFormDialog.es.js.map +1 -1
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.cjs.js +1 -1
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.cjs.js.map +1 -1
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.es.js +3 -2
- package/dist/shared/src/components/SubtasksManager/SubtasksManagerWrapper.es.js.map +1 -1
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.cjs.js +1 -1
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.cjs.js.map +1 -1
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.es.js +3 -2
- package/dist/shared/src/components/Thumbnail/StackedThumbnails.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 +6 -4
- 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 +10 -8
- package/dist/shared/src/components/VersionUploader/context/VersionUploadContext.es.js.map +1 -1
- package/dist/shared/src/components/Watchers/Watchers.cjs.js +1 -1
- package/dist/shared/src/components/Watchers/Watchers.cjs.js.map +1 -1
- package/dist/shared/src/components/Watchers/Watchers.es.js +3 -2
- package/dist/shared/src/components/Watchers/Watchers.es.js.map +1 -1
- package/dist/shared/src/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 +6 -4
- package/dist/shared/src/containers/Actions/ActionConfigDialog.es.js.map +1 -1
- package/dist/shared/src/containers/Actions/Actions.cjs.js +1 -1
- package/dist/shared/src/containers/Actions/Actions.cjs.js.map +1 -1
- package/dist/shared/src/containers/Actions/Actions.es.js +3 -2
- package/dist/shared/src/containers/Actions/Actions.es.js.map +1 -1
- package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js +1 -1
- package/dist/shared/src/containers/Actions/InteractiveActionDialog.cjs.js.map +1 -1
- package/dist/shared/src/containers/Actions/InteractiveActionDialog.es.js +6 -4
- 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 +6 -4
- package/dist/shared/src/containers/DetailsPanel/DetailsPanel.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.es.js +6 -4
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.es.js +6 -4
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.es.js +6 -4
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.es.js +6 -4
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/DetailsPanelMoreMenu.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.es.js +6 -4
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelMoreMenu/hooks/useContextAccess.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js +3 -2
- package/dist/shared/src/containers/DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js +19 -17
- package/dist/shared/src/containers/DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.es.js +6 -4
- package/dist/shared/src/containers/DetailsPanel/containers/DetailsPanelSubtasks.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.es.js +5 -3
- package/dist/shared/src/containers/DetailsPanel/containers/FeedContextWrapper.es.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.cjs.js +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.cjs.js.map +1 -1
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.es.js +3 -2
- package/dist/shared/src/containers/DetailsPanel/containers/FeedWrapper.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 +3 -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 +6 -4
- 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 +6 -4
- 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 +6 -4
- 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 +6 -4
- package/dist/shared/src/containers/EntityPickerDialog/components/EntityTypeTableSearch.es.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.cjs.js +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.cjs.js.map +1 -1
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.es.js +3 -2
- package/dist/shared/src/containers/EntityPickerDialog/hooks/useGetEntityPickerData.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/Feed.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/Feed.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/Feed.es.js +164 -146
- package/dist/shared/src/containers/Feed/Feed.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.es.js +6 -4
- package/dist/shared/src/containers/Feed/components/ActivityCheckbox/ActivityCheckbox.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityComment.es.js +131 -144
- 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 +6 -4
- package/dist/shared/src/containers/Feed/components/ActivityComment/ActivityCommentMenu.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityDate.cjs.js +3 -3
- package/dist/shared/src/containers/Feed/components/ActivityDate.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityDate.es.js +39 -29
- package/dist/shared/src/containers/Feed/components/ActivityDate.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityItem.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityItem.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityItem.es.js +24 -20
- package/dist/shared/src/containers/Feed/components/ActivityItem.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.cjs.js +2 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.cjs.js.map +1 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.es.js +345 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.es.js.map +1 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.styled.cjs.js +59 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.styled.cjs.js.map +1 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.styled.es.js +65 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.styled.es.js.map +1 -0
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/ActivityVersions/ActivityVersions.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.cjs.js +2 -2
- 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 +349 -290
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.cjs.js +89 -12
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.es.js +101 -19
- package/dist/shared/src/containers/Feed/components/CommentInput/CommentInput.styled.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/VersionReviewPill.cjs.js +2 -0
- package/dist/shared/src/containers/Feed/components/CommentInput/VersionReviewPill.cjs.js.map +1 -0
- package/dist/shared/src/containers/Feed/components/CommentInput/VersionReviewPill.es.js +34 -0
- package/dist/shared/src/containers/Feed/components/CommentInput/VersionReviewPill.es.js.map +1 -0
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.es.js +10 -8
- package/dist/shared/src/containers/Feed/components/CommentInput/helpers.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useAnnotationsSync.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/CommentInput/hooks/useMentionLink.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/FileUploadCard/FileUploadCard.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.es.js +5 -3
- package/dist/shared/src/containers/Feed/components/Tooltips/EntityTooltip/EntityTooltip.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.es.js +3 -2
- package/dist/shared/src/containers/Feed/components/Tooltips/TeamTooltip/TeamTooltip.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/context/FeedContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/context/FeedContext.es.js +6 -5
- package/dist/shared/src/containers/Feed/context/FeedContext.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useCategoryData.cjs.js +2 -0
- package/dist/shared/src/containers/Feed/hooks/useCategoryData.cjs.js.map +1 -0
- package/dist/shared/src/containers/Feed/hooks/useCategoryData.es.js +27 -0
- package/dist/shared/src/containers/Feed/hooks/useCategoryData.es.js.map +1 -0
- package/dist/shared/src/containers/Feed/hooks/useCommentMutations.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/hooks/useCommentMutations.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useCommentMutations.es.js +88 -68
- package/dist/shared/src/containers/Feed/hooks/useCommentMutations.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js +1 -1
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.cjs.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js +3 -2
- package/dist/shared/src/containers/Feed/hooks/useGetFeedActivitiesData.es.js.map +1 -1
- package/dist/shared/src/containers/Feed/hooks/useLastVersionReview.cjs.js +2 -0
- package/dist/shared/src/containers/Feed/hooks/useLastVersionReview.cjs.js.map +1 -0
- package/dist/shared/src/containers/Feed/hooks/useLastVersionReview.es.js +113 -0
- package/dist/shared/src/containers/Feed/hooks/useLastVersionReview.es.js.map +1 -0
- package/dist/shared/src/containers/ListTable/ListTable.cjs.js +1 -1
- package/dist/shared/src/containers/ListTable/ListTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTable.es.js +6 -4
- package/dist/shared/src/containers/ListTable/ListTable.es.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableCell.cjs.js +1 -1
- package/dist/shared/src/containers/ListTable/ListTableCell.cjs.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableCell.es.js +6 -4
- package/dist/shared/src/containers/ListTable/ListTableCell.es.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableHeader.cjs.js +1 -1
- package/dist/shared/src/containers/ListTable/ListTableHeader.cjs.js.map +1 -1
- package/dist/shared/src/containers/ListTable/ListTableHeader.es.js +6 -4
- package/dist/shared/src/containers/ListTable/ListTableHeader.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/ProjectTreeTable.es.js +34 -32
- 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 +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnDndProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/components/ColumnHeaderMenu.es.js +6 -4
- 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 +6 -4
- 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 +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/CellEditingProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js +5 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/ColumnSettingsProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js +5 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectDataContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.es.js +93 -90
- package/dist/shared/src/containers/ProjectTreeTable/context/ProjectTableProvider.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 +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/SelectionCellsProvider.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useAttributesList.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js +9 -7
- 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 +121 -104
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.es.js +6 -4
- 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 +6 -4
- 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 +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useColumnGroupBy.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useDeleteEntities.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useFetchOverviewData.es.js +178 -175
- 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 +6 -4
- 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 +6 -4
- 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 +6 -4
- 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 +6 -4
- 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 +6 -4
- 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 +20 -17
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useQueryFilters.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useSortBySettings.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useUpdateTableData.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 +17 -15
- package/dist/shared/src/containers/ProjectTreeTable/utils/cellUtils.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.es.js +61 -61
- package/dist/shared/src/containers/ProjectTreeTable/utils/queryFilterToClientFilter.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/utils/sanitizeQueryFilter.cjs.js +2 -0
- package/dist/shared/src/containers/ProjectTreeTable/utils/sanitizeQueryFilter.cjs.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/utils/sanitizeQueryFilter.es.js +15 -0
- package/dist/shared/src/containers/ProjectTreeTable/utils/sanitizeQueryFilter.es.js.map +1 -0
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/widgets/BooleanWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js +7 -5
- package/dist/shared/src/containers/ProjectTreeTable/widgets/CellWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js +8 -6
- package/dist/shared/src/containers/ProjectTreeTable/widgets/LinksWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/MarkdownWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/widgets/NameWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.es.js +6 -4
- package/dist/shared/src/containers/ProjectTreeTable/widgets/SubtasksWidget.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.es.js +3 -2
- package/dist/shared/src/containers/ProjectTreeTable/widgets/TextContentWidget.es.js.map +1 -1
- package/dist/shared/src/containers/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 +6 -4
- 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 +6 -4
- package/dist/shared/src/containers/SimpleTable/SimpleTable.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/Slicer.cjs.js +2 -2
- package/dist/shared/src/containers/Slicer/components/Slicer.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/Slicer.es.js +52 -50
- package/dist/shared/src/containers/Slicer/components/Slicer.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.es.js +3 -2
- package/dist/shared/src/containers/Slicer/components/SlicerDropdownFallback.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.es.js +6 -4
- package/dist/shared/src/containers/Slicer/components/SlicerSearch.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/context/SlicerContext.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/context/SlicerContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/context/SlicerContext.es.js +56 -53
- package/dist/shared/src/containers/Slicer/context/SlicerContext.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useEntityListsSlice.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useProjectAnatomySlices.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.es.js +6 -4
- package/dist/shared/src/containers/Slicer/hooks/useSelectedEntityIds.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useSlicerAttributesData.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerViewSync.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerViewSync.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useSlicerViewSync.es.js +12 -18
- package/dist/shared/src/containers/Slicer/hooks/useSlicerViewSync.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useTableDataBySlice.es.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.cjs.js +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.cjs.js.map +1 -1
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.es.js +3 -2
- package/dist/shared/src/containers/Slicer/hooks/useUsersTable.es.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js +1 -1
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js +3 -2
- package/dist/shared/src/containers/Views/ViewsDialogContainer/ViewsDialogContainer.es.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js +6 -4
- package/dist/shared/src/containers/Views/ViewsMenuContainer/BaseViewsTags.es.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js +3 -2
- package/dist/shared/src/containers/Views/ViewsMenuContainer/ViewsMenuContainer.es.js.map +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/context/ViewsContext.es.js +5 -4
- package/dist/shared/src/containers/Views/context/ViewsContext.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js +3 -2
- package/dist/shared/src/containers/Views/hooks/useBaseViewMutations.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js +6 -5
- package/dist/shared/src/containers/Views/hooks/useBuildViewMenuItems.es.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useSelectedView.cjs.js +1 -1
- package/dist/shared/src/containers/Views/hooks/useSelectedView.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/hooks/useSelectedView.es.js +3 -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 +3 -2
- package/dist/shared/src/containers/Views/hooks/useViewsMutations.es.js.map +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js.map +1 -1
- package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js +3 -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 +5 -4
- package/dist/shared/src/context/AddonProjectContext.es.js.map +1 -1
- package/dist/shared/src/context/DetailsPanelContext.cjs.js +1 -1
- package/dist/shared/src/context/DetailsPanelContext.cjs.js.map +1 -1
- package/dist/shared/src/context/DetailsPanelContext.es.js +5 -4
- package/dist/shared/src/context/DetailsPanelContext.es.js.map +1 -1
- package/dist/shared/src/context/GlobalContext.cjs.js +1 -1
- package/dist/shared/src/context/GlobalContext.cjs.js.map +1 -1
- package/dist/shared/src/context/GlobalContext.es.js +5 -4
- package/dist/shared/src/context/GlobalContext.es.js.map +1 -1
- package/dist/shared/src/context/PowerpackContext.cjs.js +1 -1
- package/dist/shared/src/context/PowerpackContext.cjs.js.map +1 -1
- package/dist/shared/src/context/PowerpackContext.es.js +7 -6
- package/dist/shared/src/context/PowerpackContext.es.js.map +1 -1
- package/dist/shared/src/context/ProjectContext.cjs.js +1 -1
- package/dist/shared/src/context/ProjectContext.cjs.js.map +1 -1
- package/dist/shared/src/context/ProjectContext.es.js +5 -4
- package/dist/shared/src/context/ProjectContext.es.js.map +1 -1
- package/dist/shared/src/context/ProjectFoldersContext.cjs.js +1 -1
- package/dist/shared/src/context/ProjectFoldersContext.cjs.js.map +1 -1
- package/dist/shared/src/context/ProjectFoldersContext.es.js +5 -4
- package/dist/shared/src/context/ProjectFoldersContext.es.js.map +1 -1
- package/dist/shared/src/context/RemoteModulesContext.cjs.js +1 -1
- package/dist/shared/src/context/RemoteModulesContext.cjs.js.map +1 -1
- package/dist/shared/src/context/RemoteModulesContext.es.js +5 -4
- package/dist/shared/src/context/RemoteModulesContext.es.js.map +1 -1
- package/dist/shared/src/context/SubtasksModulesContext.cjs.js +1 -1
- package/dist/shared/src/context/SubtasksModulesContext.cjs.js.map +1 -1
- package/dist/shared/src/context/SubtasksModulesContext.es.js +5 -4
- package/dist/shared/src/context/SubtasksModulesContext.es.js.map +1 -1
- package/dist/shared/src/context/UriContext.cjs.js +1 -1
- package/dist/shared/src/context/UriContext.cjs.js.map +1 -1
- package/dist/shared/src/context/UriContext.es.js +6 -5
- package/dist/shared/src/context/UriContext.es.js.map +1 -1
- package/dist/shared/src/context/WebsocketContext.cjs.js +1 -1
- package/dist/shared/src/context/WebsocketContext.cjs.js.map +1 -1
- package/dist/shared/src/context/WebsocketContext.es.js +8 -6
- package/dist/shared/src/context/WebsocketContext.es.js.map +1 -1
- package/dist/shared/src/hooks/useActionTriggers.cjs.js +1 -1
- package/dist/shared/src/hooks/useActionTriggers.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useActionTriggers.es.js +3 -2
- package/dist/shared/src/hooks/useActionTriggers.es.js.map +1 -1
- package/dist/shared/src/hooks/useEntityUpdate.cjs.js +1 -1
- package/dist/shared/src/hooks/useEntityUpdate.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useEntityUpdate.es.js +3 -2
- package/dist/shared/src/hooks/useEntityUpdate.es.js.map +1 -1
- package/dist/shared/src/hooks/useGetEntityGroups.cjs.js +1 -1
- package/dist/shared/src/hooks/useGetEntityGroups.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useGetEntityGroups.es.js +3 -2
- package/dist/shared/src/hooks/useGetEntityGroups.es.js.map +1 -1
- package/dist/shared/src/hooks/useGroupByRemoteModules.cjs.js +1 -1
- package/dist/shared/src/hooks/useGroupByRemoteModules.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useGroupByRemoteModules.es.js +3 -2
- package/dist/shared/src/hooks/useGroupByRemoteModules.es.js.map +1 -1
- package/dist/shared/src/hooks/useHierarchyTable.cjs.js +1 -1
- package/dist/shared/src/hooks/useHierarchyTable.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useHierarchyTable.es.js +3 -2
- package/dist/shared/src/hooks/useHierarchyTable.es.js.map +1 -1
- package/dist/shared/src/hooks/useScopedStatuses.cjs.js +1 -1
- package/dist/shared/src/hooks/useScopedStatuses.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useScopedStatuses.es.js +5 -4
- package/dist/shared/src/hooks/useScopedStatuses.es.js.map +1 -1
- package/dist/shared/src/hooks/useScopedTypes.cjs.js +1 -1
- package/dist/shared/src/hooks/useScopedTypes.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useScopedTypes.es.js +3 -2
- package/dist/shared/src/hooks/useScopedTypes.es.js.map +1 -1
- package/dist/shared/src/hooks/useUserProjectConfig.cjs.js +1 -1
- package/dist/shared/src/hooks/useUserProjectConfig.cjs.js.map +1 -1
- package/dist/shared/src/hooks/useUserProjectConfig.es.js +3 -2
- package/dist/shared/src/hooks/useUserProjectConfig.es.js.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +129 -0
- package/dist/types/api/generated/graphqlLinks.d.ts +74 -0
- package/dist/types/api/queries/activities/getActivities.d.ts +459 -0
- package/dist/types/api/queries/activities/updateActivities.d.ts +22 -0
- package/dist/types/api/queries/entities/getEntity.d.ts +10 -0
- package/dist/types/api/queries/entities/getEntityPanel.d.ts +10 -0
- package/dist/types/api/queries/entities/updateEntity.d.ts +10 -0
- package/dist/types/api/queries/entityLists/getLists.d.ts +10 -0
- package/dist/types/api/queries/entityLists/index.d.ts +1 -0
- package/dist/types/api/queries/entityLists/listItemsColumnStats.d.ts +312 -0
- package/dist/types/api/queries/entityLists/types.d.ts +3 -0
- package/dist/types/api/queries/overview/getOverview.d.ts +10 -0
- package/dist/types/api/queries/project/getProject.d.ts +10 -0
- package/dist/types/api/queries/userDashboard/getUserDashboard.d.ts +10 -0
- package/dist/types/api/queries/users/getUsers.d.ts +10 -0
- package/dist/types/api/queries/versions/getVersionsProducts.d.ts +20 -0
- package/dist/types/components/SearchFilter/filterScopeRegistry.d.ts +5 -0
- package/dist/types/components/SearchFilter/index.d.ts +1 -0
- package/dist/types/containers/Feed/Feed.d.ts +2 -1
- package/dist/types/containers/Feed/components/ActivityDate.d.ts +3 -1
- package/dist/types/containers/Feed/components/ActivityItem.d.ts +1 -0
- package/dist/types/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.d.ts +21 -0
- package/dist/types/containers/Feed/components/ActivityVersionReview/ActivityVersionReview.styled.d.ts +3 -0
- package/dist/types/containers/Feed/components/CommentInput/CommentInput.d.ts +8 -0
- package/dist/types/containers/Feed/components/CommentInput/CommentInput.styled.d.ts +19 -0
- package/dist/types/containers/Feed/components/CommentInput/VersionReviewPill.d.ts +7 -0
- package/dist/types/containers/Feed/hooks/useCategoryData.d.ts +7 -0
- package/dist/types/containers/Feed/hooks/useCommentMutations.d.ts +2 -0
- package/dist/types/containers/Feed/hooks/useGetFeedActivitiesData.d.ts +3 -0
- package/dist/types/containers/Feed/hooks/useLastVersionReview.d.ts +11 -0
- package/dist/types/containers/ProjectTreeTable/context/ProjectTableProvider.d.ts +2 -1
- package/dist/types/containers/ProjectTreeTable/hooks/useBuildProjectDataTable.d.ts +2 -1
- package/dist/types/containers/ProjectTreeTable/hooks/useFetchOverviewData.d.ts +2 -1
- package/dist/types/containers/ProjectTreeTable/hooks/useQueryFilters.d.ts +1 -1
- package/dist/types/containers/ProjectTreeTable/types/table.d.ts +1 -0
- package/dist/types/containers/ProjectTreeTable/utils/index.d.ts +1 -0
- package/dist/types/containers/ProjectTreeTable/utils/sanitizeQueryFilter.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUpdateTableData.cjs.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","e","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorAttrib","entityPatch","inheritedDependent","newAttrib"],"mappings":"klNAYA,MAAMA,EAAkB,CACtBC,EACAC,EACAC,IACW,CACX,OAAQF,EAAA,CACN,IAAK,mBACH,MAAO,GAAGC,CAAU,mBAAmBC,CAAU,mBACnD,IAAK,qBACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,+BACrC,IAAK,wBACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,4BACrC,IAAK,iCACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,kCACrC,QACE,MAAO,oBAAoBD,CAAU,KAAKC,CAAU,EAAA,CAE1D,EAyCMC,EAAsBC,GAAoC,CAC9D,KAAM,CAAE,YAAAC,EAAa,qBAAAC,CAAA,EAAyBF,GAAS,CAAA,EACjD,CAAE,YAAAG,CAAA,EAAgBC,oBAAA,EAClB,CACJ,cAAAC,EACA,uBAAAC,EACA,gCAAAC,EACA,uBAAAC,CAAA,EACEC,yBAAA,EACE,CAAE,eAAAC,CAAA,EAAmBC,gCAAA,EAErBC,EAAuBC,EAAAA,YAC3B,MAAOC,EAAW,CAAA,EAAIC,EAAgB,KAAS,CAC7C,GAAI,CAACD,EAAS,QAAU,CAACX,EACvB,OAIF,IAAIa,EAAgBF,EAAS,OAAQ,GAAM,CAAC,EAAE,MAAM,EAGpD,MAAMG,EAAkBD,EAAc,OAAQE,GACxC,EAAAA,EAAO,QAAU,cAAgBA,EAAO,OAAS,UAChCb,EAAca,EAAO,EAAE,GAC1B,YAKnB,EAGKC,EAAgBH,EAAc,OAASC,EAAgB,OAY7D,GAXIE,EAAgB,GAClBC,EAAAA,MAAM,MACJ,iCAAiCD,CAAa,UAC5CA,EAAgB,EAAI,IAAM,EAC5B,0BAAA,EAIJH,EAAgBC,EAGZ,CAACD,EAAc,OACjB,OAIF,GAAIf,GAAec,EAAe,CAChC,MAAMM,EAAyCL,EAAc,IAC3D,CAAC,CAAE,MAAAM,EAAO,GAAAC,EAAI,KAAAC,EAA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F,CAGA,GAAI,CACF,MAAMtD,EAAe,CACnB,WAAA0B,EACA,gBAAAyB,CAAA,CACD,CACH,OAASjB,EAAY,CAEfR,EAAW,SAAW,EACxBQ,EAAM,WAAW,QAAShD,GAAsB,CAC9C,MAAM2C,EAAKH,EAAW,CAAC,EACjBlB,EAASb,EAAckC,EAAG,QAAkB,EAC5CzC,EAAaoB,GAAQ,OAASA,GAAQ,MAAQqB,EAAG,UAAY,GAC7DM,EAAUlD,EAAgBC,EAAW2C,EAAG,WAAYzC,CAAU,EACpEsB,EAAAA,MAAM,MAAMyB,CAAO,CACrB,CAAC,EAEDzB,EAAAA,MAAM,MAAM,2BAA2B,EAIrCL,GAAiBd,GAAeC,GAClCA,EAAqB,CAAC,CAE1B,CACF,EACA,CACEC,EACAO,EACAJ,EACAC,EACAN,EACAC,CAAA,CACF,EAGF,MAAO,CAAE,eAAgBU,EAAsB,kBAAAkC,CAAA,CACjD"}
|
|
1
|
+
{"version":3,"file":"useUpdateTableData.cjs.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","e","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorAttrib","entityPatch","inheritedDependent","newAttrib"],"mappings":"0pNAYA,MAAMA,EAAkB,CACtBC,EACAC,EACAC,IACW,CACX,OAAQF,EAAA,CACN,IAAK,mBACH,MAAO,GAAGC,CAAU,mBAAmBC,CAAU,mBACnD,IAAK,qBACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,+BACrC,IAAK,wBACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,4BACrC,IAAK,iCACH,MAAO,GAAGD,CAAU,KAAKC,CAAU,kCACrC,QACE,MAAO,oBAAoBD,CAAU,KAAKC,CAAU,EAAA,CAE1D,EAyCMC,EAAsBC,GAAoC,CAC9D,KAA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AeC,GAClCA,EAAqB,CAAC,CAE1B,CACF,EACA,CACEC,EACAO,EACAJ,EACAC,EACAN,EACAC,CAAA,CACF,EAGF,MAAO,CAAE,eAAgBU,EAAsB,kBAAAkC,CAAA,CACjD"}
|
|
@@ -71,6 +71,7 @@ import "../../../api/queries/entities/updateEntity.es.js";
|
|
|
71
71
|
import "../../../api/queries/entityLists/getLists.es.js";
|
|
72
72
|
import "../../../api/queries/entityLists/updateLists.es.js";
|
|
73
73
|
import "../../../api/queries/entityLists/getListsAttributes.es.js";
|
|
74
|
+
import "../../../api/queries/entityLists/listItemsColumnStats.es.js";
|
|
74
75
|
import "../../../api/queries/entityLists/updateListsAttributes.es.js";
|
|
75
76
|
import "../../../api/queries/entityLists/listFolders.es.js";
|
|
76
77
|
import "../../../api/queries/folders/getFolders.es.js";
|
|
@@ -136,7 +137,7 @@ const j = (O, d, u) => {
|
|
|
136
137
|
default:
|
|
137
138
|
return `Failed to update ${d}: ${u}`;
|
|
138
139
|
}
|
|
139
|
-
},
|
|
140
|
+
}, nr = (O) => {
|
|
140
141
|
const { pushHistory: d, removeHistoryEntries: u } = O || {}, { projectName: F } = Q(), {
|
|
141
142
|
getEntityById: g,
|
|
142
143
|
getInheritedDependents: $,
|
|
@@ -410,6 +411,6 @@ const j = (O, d, u) => {
|
|
|
410
411
|
return { updateEntities: M, inheritFromParent: q };
|
|
411
412
|
};
|
|
412
413
|
export {
|
|
413
|
-
|
|
414
|
+
nr as default
|
|
414
415
|
};
|
|
415
416
|
//# sourceMappingURL=useUpdateTableData.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUpdateTableData.es.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","e","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorA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AAgB,KAAK;AAAA,cACnB,UAAUG,EAAmB;AAAA,cAC7B,YAAYA,EAAmB;AAAA,cAC/B,MAAMA,EAAmB;AAAA,YAAA,CAC1B;AAAA,QAEL;AAAA,MACF;AAGA,UAAI;AACF,cAAMtD,EAAe;AAAA,UACnB,YAAA2B;AAAA,UACA,iBAAAwB;AAAA,QAAA,CACD;AAAA,MACH,SAAShB,GAAY;AAEnB,QAAIR,EAAW,WAAW,IACxBQ,EAAM,WAAW,QAAQ,CAACjD,MAAsB;AAC9C,gBAAM4C,IAAKH,EAAW,CAAC,GACjBlB,IAASd,EAAcmC,EAAG,QAAkB,GAC5C1C,IAAaqB,GAAQ,SAASA,GAAQ,QAAQqB,EAAG,YAAY,IAC7DM,IAAUnD,EAAgBC,GAAW4C,EAAG,YAAY1C,CAAU;AACpE,UAAAuB,EAAM,MAAMyB,CAAO;AAAA,QACrB,CAAC,IAEDzB,EAAM,MAAM,2BAA2B,GAIrCN,KAAiBd,KAAeC,KAClCA,EAAqB,CAAC;AAAA,MAE1B;AAAA,IACF;AAAA,IACA;AAAA,MACEC;AAAA,MACAO;AAAA,MACAJ;AAAA,MACAC;AAAA,MACAN;AAAA,MACAC;AAAA,IAAA;AAAA,EACF;AAGF,SAAO,EAAE,gBAAgBU,GAAsB,mBAAAmC,EAAA;AACjD;"}
|
|
1
|
+
{"version":3,"file":"useUpdateTableData.es.js","sources":["../../../../../../src/containers/ProjectTreeTable/hooks/useUpdateTableData.ts"],"sourcesContent":["import { CellId } from '../utils/cellUtils'\nimport { CellValue } from '../widgets/CellWidget'\nimport { toast } from 'react-toastify'\nimport { useProjectTableQueriesContext } from '../context/ProjectTableQueriesContext'\nimport { useCallback } from 'react'\nimport { InheritedDependent } from './useFolderRelationships'\nimport { useProjectTableContext } from '../context/ProjectTableContext'\nimport { OperationModel } from '../types/operations'\nimport { PatchOperation } from '../types'\nimport { HistoryEntityUpdate, UseHistoryReturn } from './useHistory'\nimport { useProjectContext } from '@shared/context'\n\nconst getErrorMessage = (\n errorCode: string | undefined,\n entityType: string,\n entityName: string,\n): string => {\n switch (errorCode) {\n case 'unique-violation':\n return `${entityType} with the name \"${entityName}\" already exists`\n case 'not-null-violation':\n return `${entityType} \"${entityName}\" is missing required fields`\n case 'foreign-key-violation':\n return `${entityType} \"${entityName}\" references invalid data`\n case 'integrity-constraint-violation':\n return `${entityType} \"${entityName}\" violates data integrity rules`\n default:\n return `Failed to update ${entityType}: ${entityName}`\n }\n}\n\nexport type EntityUpdate = {\n rowId: string\n id: string\n type: string\n field: string\n value: CellValue | CellValue[] | null\n isAttrib?: boolean\n isLink?: boolean // link updates use different endpoint\n meta?: Record<string, any>\n}\nexport type UpdateTableEntities = (entities: EntityUpdate[], pushHistory?: boolean) => Promise<void>\n\nexport type InheritFromParentEntity = {\n rowId: string\n entityId: string\n entityType: string\n attribs: string[]\n ownAttrib: string[]\n folderId?: string // the parent folder ID\n meta?: Record<string, any>\n}\nexport type InheritFromParent = (\n entities: InheritFromParentEntity[],\n pushHistory?: boolean,\n) => Promise<void>\n\nexport type UpdateTableEntity = (\n cellId: CellId,\n value: string,\n { includeSelection }: { includeSelection: boolean },\n) => Promise<void>\n\nexport type OperationWithRowId = OperationModel & { rowId: string; meta?: Record<string, any> }\n\ninterface UseUpdateTableDataProps {\n pushHistory?: UseHistoryReturn['pushHistory']\n removeHistoryEntries?: UseHistoryReturn['removeHistoryEntries']\n}\n\nconst useUpdateTableData = (props?: UseUpdateTableDataProps) => {\n const { pushHistory, removeHistoryEntries } = props || {}\n const { projectName } = useProjectContext()\n const {\n getEntityById,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n findNonInheritedValues,\n } = useProjectTableContext()\n const { updateEntities } = useProjectTableQueriesContext()\n\n const handleUpdateEntities = useCallback<UpdateTableEntities>(\n async (entities = [], pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Filter out link updates - they should be handled by useUpdateTableLinks\n let entityUpdates = entities.filter((e) => !e.isLink)\n\n // Filter out folder type updates for folders with versions\n const filteredUpdates = entityUpdates.filter((entity) => {\n if (entity.field === 'folderType' && entity.type === 'folder') {\n const entityData = getEntityById(entity.id)\n if (entityData?.hasVersions) {\n return false\n }\n }\n return true\n })\n\n // Show warning if any updates were filtered out\n const filteredCount = entityUpdates.length - filteredUpdates.length\n if (filteredCount > 0) {\n toast.error(\n `Cannot change folder type for ${filteredCount} folder${\n filteredCount > 1 ? 's' : ''\n } with published versions`,\n )\n }\n\n entityUpdates = filteredUpdates\n\n // If no entity updates to process, return early\n if (!entityUpdates.length) {\n return\n }\n\n // Record history of previous values before applying update\n if (pushHistory && pushToHistory) {\n const inverseEntities: HistoryEntityUpdate[] = entityUpdates.map(\n ({ rowId, id, type, field, isAttrib, meta }) => {\n const entityData = getEntityById(id) as Record<string, any>\n if (!entityData) {\n throw 'Entity not found: ' + id\n }\n const entityId = entityData?.entityId || entityData.id\n const oldValue = isAttrib\n ? (entityData.attrib as Record<string, any>)?.[field] ?? null\n : entityData[field] ?? null\n\n // Check if the field was inherited (not in ownAttrib)\n const ownAttrib = entityData?.ownAttrib || []\n const wasInherited = isAttrib && !ownAttrib.includes(field)\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value: oldValue,\n isAttrib,\n wasInherited, // Track inheritance status for undo\n ownAttrib: ownAttrib,\n folderId: entityData?.folderId || entityData?.parentId,\n meta,\n }\n },\n )\n const historyEntities: HistoryEntityUpdate[] = entityUpdates.flatMap(\n ({ rowId, id, type, field, value, isAttrib, meta }) => {\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n\n if (!entityData) return []\n\n return {\n rowId: rowId,\n id: entityId,\n type,\n field,\n value,\n isAttrib,\n ownAttrib: entityData?.ownAttrib || [],\n folderId: 'folderId' in entityData ? entityData.folderId : entityData?.parentId,\n meta,\n }\n },\n )\n pushHistory(inverseEntities, historyEntities)\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = [\n 'task',\n 'folder',\n 'product',\n 'version',\n ]\n // Group operations by entity type for bulk processing\n let operations: OperationWithRowId[] = []\n for (const entity of entityUpdates) {\n let { id, type, field, value, isAttrib, meta } = entity\n const entityData = getEntityById(id)\n const entityId = entityData?.entityId || entityData?.id || id\n // Skip unsupported entity types\n let entityType = type as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n\n // create data object for change, taking into account if it's an attribute change\n const data: Record<string, any> = isAttrib\n ? { attrib: { [field]: value } }\n : { [field]: value }\n\n // if the entity is an attribute get the entity data\n // then update ownAttrib to include the new value\n if (isAttrib) {\n const ownAttrib = [...(entityData?.ownAttrib || [])]\n // add the new value to the ownAttrib if it doesn't already exist\n if (!ownAttrib.includes(field)) {\n ownAttrib.push(field)\n }\n // update the data object with the new ownAttrib\n data.ownAttrib = ownAttrib\n }\n\n const existingOperationIndex = operations.findIndex(\n (op) => op.entityId === entityId && op.entityType === entityType,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge data with existing operation\n const existingOperation = operations[existingOperationIndex]\n let newData = { ...existingOperation.data, ...data }\n\n // @ts-ignore\n if (existingOperation.data?.attrib && data.attrib) {\n // @ts-ignore\n newData = { ...newData, attrib: { ...existingOperation.data.attrib, ...data.attrib } }\n }\n\n operations[existingOperationIndex] = {\n ...existingOperation,\n data: newData,\n }\n } else {\n // Add new operation\n operations.push({\n entityType: entityType,\n entityId: entityId,\n rowId: entity.rowId,\n type: 'update',\n data: data,\n meta: meta,\n })\n }\n }\n\n const folderAttribEntities: InheritedDependent[] = operations\n .filter((op) => !!op.entityId && op.type === 'update' && op.data && 'attrib' in op.data)\n .map((op) => ({\n entityId: op.entityId as string,\n entityType: op.entityType as 'folder' | 'task',\n attrib:\n op.data && 'attrib' in op.data ? (op.data?.attrib as InheritedDependent['attrib']) : {},\n }))\n\n const inheritedDependents = getInheritedDependents(folderAttribEntities)\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // now make api call to update all entities and links\n try {\n if (operations.length) {\n await updateEntities({\n operations,\n patchOperations: inheritedDependentsOperations,\n })\n }\n } catch (error: any) {\n console.error('Error updating entities:', error)\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n // Remove the failed update from history stack\n if (pushHistory && pushToHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities, //\n getEntityById,\n getInheritedDependents,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n // set the attrib fields to be inherited from the parent\n // (remove the field from the ownAttrib array)\n // invalidate the cache for the folder/task so that it can be re-fetched with inherited values\n const inheritFromParent = useCallback<InheritFromParent>(\n async (entities, pushToHistory = true) => {\n if (!entities.length || !projectName) {\n return\n }\n\n // Record history for the inheritance operation\n if (pushToHistory && pushHistory) {\n // Create undo entities (restore explicit values)\n const undoEntities: HistoryEntityUpdate[] = []\n\n // For each entity and attribute being inherited, record current values\n for (const entity of entities) {\n const entityData = getEntityById(entity.entityId) as Record<string, any>\n\n // For each attribute that will be inherited, record its current value\n for (const attrib of entity.attribs) {\n if (entityData?.attrib && attrib in entityData.attrib) {\n undoEntities.push({\n rowId: entity.rowId,\n id: entityData?.entityId || entityData?.id || entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: (entityData.attrib as Record<string, any>)[attrib],\n isAttrib: true,\n wasInherited: false, // Mark as not inherited\n ownAttrib: entityData?.ownAttrib || [],\n folderId: entityData?.folderId,\n meta: entityData.meta,\n })\n }\n }\n }\n\n // Create redo entities (to re-inherit)\n const redoEntities: HistoryEntityUpdate[] = entities.flatMap((entity) =>\n entity.attribs.map((attrib) => ({\n rowId: entity.rowId,\n id: entity.entityId,\n type: entity.entityType,\n field: attrib,\n value: null,\n isAttrib: true,\n wasInherited: true, // Mark as inherited\n ownAttrib: entity.ownAttrib,\n folderId: entity.folderId,\n meta: entity.meta,\n })),\n )\n\n // Push to history if we have changes to record\n if (undoEntities.length > 0) {\n pushHistory(undoEntities, redoEntities)\n }\n }\n\n const supportedEntityTypes: OperationModel['entityType'][] = ['task', 'folder']\n // Group operations by entity type for bulk processing\n const operations: OperationWithRowId[] = [] // operations sent to the server\n const entitiesToPatch: InheritFromParentEntity[] = []\n for (const entity of entities) {\n // Skip unsupported entity types\n let entityType = entity.entityType as OperationModel['entityType']\n if (!supportedEntityTypes.includes(entityType)) {\n continue\n }\n entityType = entityType as 'task' | 'folder'\n\n // Create data object with null values for each attrib to inherit\n const attribData: Record<string, null> = {}\n entity.attribs.forEach((attrib) => {\n attribData[attrib] = null\n })\n\n // Add new operation this is what's sent to the server and is actually updated in the DB\n operations.push({\n entityType: entityType,\n entityId: entity.entityId,\n rowId: entity.rowId,\n type: 'update',\n data: {\n attrib: attribData,\n },\n meta: entity.meta,\n })\n\n // check if this entity has a folderId that is in entities\n // if so we check their intersection attrib names\n const findTopFolder = () => {\n // For each entity, we need to find the top-most folder in the hierarchy\n const folderId = entity.folderId\n\n // Find all ancestor folders that are in our entities list\n const ancestorChain: InheritFromParentEntity[] = []\n let currentFolderId = folderId\n let currentFolder = entities.find((e) => e.entityId === currentFolderId)\n\n // Climb up the folder hierarchy to build the chain of ancestors\n while (currentFolder) {\n ancestorChain.push(currentFolder)\n currentFolderId = currentFolder.folderId\n currentFolder = entities.find((e) => e.entityId === currentFolderId)\n }\n\n // The top folder is the last one in our ancestor chain (if any)\n const topFolder =\n ancestorChain.length > 0 ? ancestorChain[ancestorChain.length - 1] : null\n\n return topFolder\n }\n\n const topFolder = findTopFolder()\n const folderAttribs = topFolder?.attribs || []\n const entityAttribsIntersection = entity.attribs.filter((attrib) =>\n folderAttribs.includes(attrib),\n )\n const entityAttribsRemoved = entity.attribs.filter(\n (attrib) => !folderAttribs.includes(attrib),\n )\n\n // only add to patch operations if there are attribs left\n if (entityAttribsRemoved.length > 0)\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsRemoved,\n })\n\n if (topFolder && entityAttribsIntersection.length > 0) {\n entitiesToPatch.push({\n ...entity,\n attribs: entityAttribsIntersection,\n folderId: topFolder.folderId,\n })\n }\n }\n\n const patchOperations: PatchOperation[] = [] // operations only for patching the cache\n for (const entity of entitiesToPatch) {\n const entityType = entity.entityType as 'task' | 'folder'\n // we also need to update ownAttrib to remove the inherited attribs\n const ownAttrib = [...(entity.ownAttrib || [])].filter(\n (attrib) => !entity.attribs.includes(attrib),\n )\n\n // now we must calculate all the entities that need to be updated in the cache\n // first we need to find the the ancestor folder to inherit from\n const ancestorAttrib = findNonInheritedValues(entity.folderId, entity.attribs)\n\n const entityPatch = {\n entityId: entity.entityId,\n entityType: entityType,\n data: {\n attrib: ancestorAttrib,\n ownAttrib: ownAttrib,\n },\n }\n\n // create new patch operation for the entity\n patchOperations.push(entityPatch)\n\n // now find any dependent that also need updating\n const inheritedDependents = getInheritedDependents([\n { entityId: entity.entityId, entityType: entityType, attrib: ancestorAttrib },\n ])\n\n // convert to operations\n const inheritedDependentsOperations: PatchOperation[] = inheritedDependents.map((op) => ({\n entityId: op.entityId,\n entityType: op.entityType,\n data: {\n attrib: op.attrib,\n },\n }))\n\n // try to add to patch operations\n // if it already exists then merge the attribs\n for (const inheritedDependent of inheritedDependentsOperations) {\n const existingOperationIndex = patchOperations.findIndex(\n (op) => op.entityId === inheritedDependent.entityId,\n )\n\n if (existingOperationIndex !== -1) {\n // Merge attribs with existing operation\n const existingOperation = patchOperations[existingOperationIndex]\n let newAttrib = {\n // @ts-ignore\n ...(existingOperation.data?.attrib || {}),\n // @ts-ignore\n ...(inheritedDependent.data?.attrib || {}),\n }\n\n patchOperations[existingOperationIndex] = {\n ...existingOperation,\n data: { attrib: newAttrib },\n }\n } else {\n // Add new operation\n patchOperations.push({\n entityId: inheritedDependent.entityId,\n entityType: inheritedDependent.entityType,\n data: inheritedDependent.data,\n })\n }\n }\n }\n\n // now make api call to update all entities\n try {\n await updateEntities({\n operations,\n patchOperations,\n })\n } catch (error: any) {\n // Extract error code from operation result - check multiple paths\n if (operations.length === 1) {\n error.errorCodes.forEach((errorCode: string) => {\n const op = operations[0]\n const entity = getEntityById(op.entityId as string)\n const entityName = entity?.label || entity?.name || op.entityId || ''\n const message = getErrorMessage(errorCode, op.entityType, entityName)\n toast.error(message)\n })\n } else {\n toast.error('Failed to update entities')\n }\n\n // Remove the failed update from history stack\n if (pushToHistory && pushHistory && removeHistoryEntries) {\n removeHistoryEntries(1)\n }\n }\n },\n [\n projectName,\n updateEntities,\n getInheritedDependents,\n findInheritedValueFromAncestors,\n pushHistory,\n removeHistoryEntries,\n ],\n )\n\n return { updateEntities: handleUpdateEntities, inheritFromParent }\n}\n\nexport default useUpdateTableData\n"],"names":["getErrorMessage","errorCode","entityType","entityName","useUpdateTableData","props","pushHistory","removeHistoryEntries","projectName","useProjectContext","getEntityById","getInheritedDependents","findInheritedValueFromAncestors","findNonInheritedValues","useProjectTableContext","updateEntities","useProjectTableQueriesContext","handleUpdateEntities","useCallback","entities","pushToHistory","entityUpdates","e","filteredUpdates","entity","filteredCount","toast","inverseEntities","rowId","id","type","field","isAttrib","meta","entityData","entityId","oldValue","ownAttrib","wasInherited","historyEntities","value","supportedEntityTypes","operations","data","existingOperationIndex","op","existingOperation","newData","folderAttribEntities","inheritedDependentsOperations","error","message","inheritFromParent","undoEntities","attrib","redoEntities","entitiesToPatch","attribData","topFolder","folderId","ancestorChain","currentFolderId","currentFolder","folderAttribs","entityAttribsIntersection","entityAttribsRemoved","patchOperations","ancestorAttrib","entityPatch","inheritedDependent","newAttrib"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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e;AAAA,UACnB,YAAA2B;AAAA,UACA,iBAAAwB;AAAA,QAAA,CACD;AAAA,MACH,SAAShB,GAAY;AAEnB,QAAIR,EAAW,WAAW,IACxBQ,EAAM,WAAW,QAAQ,CAACjD,MAAsB;AAC9C,gBAAM4C,IAAKH,EAAW,CAAC,GACjBlB,IAASd,EAAcmC,EAAG,QAAkB,GAC5C1C,IAAaqB,GAAQ,SAASA,GAAQ,QAAQqB,EAAG,YAAY,IAC7DM,IAAUnD,EAAgBC,GAAW4C,EAAG,YAAY1C,CAAU;AACpE,UAAAuB,EAAM,MAAMyB,CAAO;AAAA,QACrB,CAAC,IAEDzB,EAAM,MAAM,2BAA2B,GAIrCN,KAAiBd,KAAeC,KAClCA,EAAqB,CAAC;AAAA,MAE1B;AAAA,IACF;AAAA,IACA;AAAA,MACEC;AAAA,MACAO;AAAA,MACAJ;AAAA,MACAC;AAAA,MACAN;AAAA,MACAC;AAAA,IAAA;AAAA,EACF;AAGF,SAAO,EAAE,gBAAgBU,GAAsB,mBAAAmC,EAAA;AACjD;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react-toastify");require("lodash");require("uuid");require("../../../util/pubsub.cjs.js");require("../context/CellEditingContext.cjs.js");require("../../../../../_virtual/jsx-runtime.cjs.js");require("react");require("@ynput/ayon-react-components");require("../../../components/SearchFilter/filterDates.cjs.js");require("date-fns");require("short-uuid");require("@tanstack/react-table");require("../widgets/CollapsedWidget.cjs.js");require("../widgets/DateWidget.cjs.js");require("../widgets/EnumWidget.cjs.js");require("../widgets/EnumCellValue.cjs.js");require("../widgets/TextWidget.cjs.js");require("../widgets/MarkdownWidget.cjs.js");require("../widgets/BooleanWidget.cjs.js");require("../widgets/CellWidget.cjs.js");require("../widgets/EntityNameWidget.cjs.js");require("../widgets/GroupHeaderWidget.cjs.js");require("../widgets/ThumbnailWidget.cjs.js");require("../../../components/AddonLoadingScreen/AddonLoadingScreen.cjs.js");require("../../../../../node_modules/match-sorter/dist/match-sorter.esm.cjs.js");require("../../../components/AccessSearchInput/AccessSearchInput.styled.cjs.js");require("../../../components/AccessUser/AccessUser.cjs.js");require("clsx");require("../../../components/AttributeEditor/AttributeEditor.cjs.js");require("../../../components/AttributeEditor/attributeTypeMap.cjs.js");require("../../../components/Badge/Badge.cjs.js");require("../../../components/Chips/Chips.cjs.js");require("react-dom");require("../../../components/DateRangePicker/DateRangePicker.styled.cjs.js");require("../../../components/LinksManager/CellEditingDialog.cjs.js");require("../../../api/base/client.cjs.js");require("../../../api/generated/graphql.cjs.js");require("../../../api/generated/graphqlLinks.cjs.js");require("../../../api/generated/access.cjs.js");require("../../../api/generated/actions.cjs.js");require("../../../api/generated/activityFeed.cjs.js");require("../../../api/generated/addons.cjs.js");require("../../../api/generated/anatomy.cjs.js");require("../../../api/generated/attributes.cjs.js");require("../../../api/generated/authentication.cjs.js");require("../../../api/generated/bundles.cjs.js");require("../../../api/generated/configuration.cjs.js");require("../../../api/generated/dataImport.cjs.js");require("../../../api/generated/desktop.cjs.js");require("../../../api/generated/entityLists.cjs.js");require("../../../api/generated/events.cjs.js");require("../../../api/generated/files.cjs.js");require("../../../api/generated/folders.cjs.js");require("../../../api/generated/inbox.cjs.js");require("../../../api/generated/links.cjs.js");require("../../../api/generated/market.cjs.js");require("../../../api/generated/onboarding.cjs.js");require("../../../api/generated/operations.cjs.js");require("../../../api/generated/products.cjs.js");require("../../../api/generated/projectDashboard.cjs.js");require("../../../api/generated/projects.cjs.js");require("../../../api/generated/projectFolders.cjs.js");require("../../../api/generated/reviewables.cjs.js");require("../../../api/generated/services.cjs.js");require("../../../api/generated/system.cjs.js");require("../../../api/generated/tasks.cjs.js");require("../../../api/generated/teams.cjs.js");require("../../../api/generated/thumbnails.cjs.js");require("../../../api/generated/uRIs.cjs.js");require("../../../api/generated/users.cjs.js");require("../../../api/generated/versions.cjs.js");require("../../../api/generated/workfiles.cjs.js");require("../../../api/generated/ynputCloud.cjs.js");require("../../../api/generated/grouping.cjs.js");require("../../../api/generated/views.cjs.js");require("../../../api/queries/actions/getActions.cjs.js");require("../../../api/queries/activities/getActivities.cjs.js");require("../../../api/queries/activities/updateActivities.cjs.js");require("../../../api/queries/activities/updateReaction.cjs.js");require("../../../api/queries/activities/getMentions.cjs.js");require("../../../api/queries/activities/getCategories.cjs.js");require("../../../api/queries/addons/getAddons.cjs.js");require("../../../api/queries/addons/updateAddons.cjs.js");require("../../../api/queries/attributes/getAttributes.cjs.js");require("../../../api/queries/attributes/updateAttributes.cjs.js");require("../../../api/queries/authentication/getAuthentication.cjs.js");require("../../../api/queries/cloud/cloud.cjs.js");require("../../../api/queries/columnStats/metricTargets.cjs.js");require("../../../api/queries/config/getConfig.cjs.js");require("../../../api/queries/config/updateConfig.cjs.js");require("../../../api/queries/entities/getEntity.cjs.js");require("../../../api/queries/entities/getEntityPanel.cjs.js");require("../../../api/queries/overview/getOverview.cjs.js");require("../../../api/queries/overview/updateOverview.cjs.js");require("../../../api/queries/versions/getVersionsProducts.cjs.js");require("../../../api/queries/links/getEntityLinks.cjs.js");require("../../../api/queries/entities/updateEntity.cjs.js");require("../../../api/queries/entityLists/getLists.cjs.js");require("../../../api/queries/entityLists/updateLists.cjs.js");require("../../../api/queries/entityLists/getListsAttributes.cjs.js");require("../../../api/queries/entityLists/updateListsAttributes.cjs.js");require("../../../api/queries/entityLists/listFolders.cjs.js");require("../../../api/queries/folders/getFolders.cjs.js");require("../../../api/queries/folders/getFolderDeleteInfo.cjs.js");require("../../../api/queries/grouping/getGrouping.cjs.js");require("../../../api/queries/links/updateLinks.cjs.js");require("../../../api/queries/links/getLinks.cjs.js");require("../../../api/queries/permissions/getPermissions.cjs.js");require("../../../api/queries/products/createProduct.cjs.js");require("../../../api/queries/products/getFolderProducts.cjs.js");require("../../../api/queries/project/getProject.cjs.js");require("../../../api/queries/project/updateProject.cjs.js");require("../../../api/queries/projectFolders/projectFolders.cjs.js");require("../../../api/queries/review/getReview.cjs.js");require("../../../api/queries/review/updateReview.cjs.js");require("../../../api/queries/share/share.cjs.js");require("../../../api/queries/system/getSystem.cjs.js");require("../../../api/queries/tasks/getTasks.cjs.js");require("../../../api/queries/tasks/updateTasks.cjs.js");require("../../../api/queries/teams/getTeams.cjs.js");require("../../../api/queries/userDashboard/getUserDashboard.cjs.js");require("../../../api/queries/users/getUsers.cjs.js");require("../../../api/queries/users/updateUsers.cjs.js");require("../../../api/queries/users/guests.cjs.js");require("../../../api/queries/versions/updateVersions.cjs.js");require("../../../api/queries/views/getViews.cjs.js");require("../../../api/queries/views/updateViews.cjs.js");require("../../../api/queries/watchers/getWatchers.cjs.js");require("../../../api/queries/uris/getUris.cjs.js");require("../../../../../_virtual/index.cjs.js");require("../../../../../node_modules/refractor/lib/common.cjs.js");require("../../../../../node_modules/refractor/lib/all.cjs.js");;/* empty css */require("../../../components/DetailsPanelAttributes/DetailsPanelAttributesEditor.cjs.js");require("../../../components/DetailsPanelDetails/DetailsPanelDetails.cjs.js");require("react-quill-ayon");require("../../../components/DetailsPanelDetails/BorderedSection.cjs.js");require("../../../components/QuillListStyles/QuillListStyles.cjs.js");require("../../../components/DetailsPanelDetails/DescriptionSection.styles.cjs.js");require("react-markdown");require("remark-gfm");require("rehype-raw");require("../../Feed/components/CommentInput/quillToMarkdown.cjs.js");require("../../../components/DetailsPanelDetails/hooks/useMentionSystem.cjs.js");require("../../Feed/components/CommentInput/modules/index.cjs.js");require("../../../context/RemoteModulesContext.cjs.js");require("../../../../../_virtual/runtime.cjs.js");require("../../../../../_virtual/semver.cjs.js");require("../../../context/PowerpackContextInstance.cjs.js");require("../../../context/UriContext.cjs.js");require("../../../context/DetailsPanelContextInstance.cjs.js");require("../../../context/SubtasksModulesContextInstance.cjs.js");require("../../../context/ThumbnailUploaderContext.cjs.js");require("../../../context/SettingsPanelContext.cjs.js");require("../../../context/pip/PiPProvider.cjs.js");require("../../../context/pip/PiPWrapper.cjs.js");require("../../../context/AddonProjectContext.cjs.js");require("../../../context/AddonContext.cjs.js");require("../../../context/MoveEntityContext.cjs.js");require("../../../context/MenuContext.cjs.js");require("../../../context/WebsocketContext.cjs.js");require("../../../context/GlobalContext.cjs.js");require("../../../context/ProjectContext.cjs.js");require("../../../context/ProjectFoldersContext.cjs.js");require("react-redux");require("custom-protocol-check");require("../components/GroupSettingsFallback.cjs.js");require("../../../components/DetailsPanelDetails/DetailsSection.cjs.js");require("../../../components/DetailsPanelDetails/FieldLabel.cjs.js");require("../../../components/DoneCheckbox/DoneCheckbox.cjs.js");require("../../../components/EarlyPreview/EarlyPreview.cjs.js");require("../../../components/EmptyPlaceholder/EmptyPlaceholder.cjs.js");require("../../../components/EmptyPlaceholder/EmptyPlaceholderFlex.styled.cjs.js");require("@dnd-kit/core");require("@dnd-kit/sortable");require("../../../components/EnumEditor/EnumEditor.styled.cjs.js");require("../../ContextMenu/ContextMenuContext.cjs.js");;/* empty css */require("../../Feed/context/FeedContext.cjs.js");require("../../Feed/components/Tooltips/UserTooltipItem.cjs.js");require("../../Feed/components/Tooltips/UserTooltip/UserTooltip.styled.cjs.js");require("../../Feed/components/Tooltips/TeamTooltip/TeamTooltip.styled.cjs.js");require("../../Feed/components/Tooltips/EntityTooltip/EntityTooltip.styled.cjs.js");require("../../Feed/components/FileUploadPreview/FileUploadPreview.styled.cjs.js");require("../../Feed/components/FileUploadPreview/Mimes/TextMime.cjs.js");require("remark-emoji");require("remark-directive");require("remark-directive-rehype");require("../../Feed/components/CommentInput/CommentInput.cjs.js");require("../../Feed/components/ReactionContainer/Reactions.styled.cjs.js");require("../../Feed/components/FilesGrid/FilesGrid.styled.cjs.js");require("../../Feed/components/FileUploadCard/FileUploadCard.styled.cjs.js");require("../../Feed/components/ActivityComment/ActivityComment.styled.cjs.js");require("../../Feed/components/ActivityCheckbox/ActivityCheckbox.styled.cjs.js");require("../../Feed/components/ActivityReference/ActivityReference.styled.cjs.js");require("react-router-dom");require("../../Feed/components/ActivityStatus/ActivityStatus.cjs.js");require("../../Feed/components/ActivityHeader/ActivityHeader.styled.cjs.js");require("../../Feed/components/ActivityDate.cjs.js");require("../../Feed/components/ActivityCategorySelect/CategoryTag.cjs.js");require("../../Feed/components/ActivityStatusChange/ActivityStatusChange.styled.cjs.js");require("../../Feed/components/ActivityAssigneeChange/ActivityAssigneeChange.styled.cjs.js");require("../../Feed/components/ActivityVersions/ActivityVersions.styled.cjs.js");require("../../Feed/components/ActivityGroup/ActivityGroup.styled.cjs.js");require("../../Feed/Feed.styled.cjs.js");require("../../DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js");require("../../Feed/components/ActivityCategorySelect/ActivityCategorySelect.cjs.js");require("../../Feed/components/ActivityCategorySelect/CategoryDropdownItem.cjs.js");require("@tanstack/react-virtual");require("../ProjectTreeTable.styled.cjs.js");require("../components/HeaderActionButton.cjs.js");require("../components/RowSelectionHeader.cjs.js");require("../components/SelectionCell.cjs.js");require("../context/ProjectTableQueriesContext.cjs.js");require("../context/ProjectTableContext.cjs.js");require("../components/DeleteConfirmContent.cjs.js");require("../context/ClipboardContext.cjs.js");require("../context/SelectionCellsContext.cjs.js");require("../context/ProjectDataContext.cjs.js");require("../components/TableFooterRow.cjs.js");require("../context/SelectedRowsContext.cjs.js");require("../context/ColumnSettingsContext.cjs.js");require("../context/DetailsPanelEntityContext.cjs.js");require("../../EntityPickerDialog/EntityPickerDialog.cjs.js");require("../../Slicer/components/Slicer.cjs.js");require("../../Slicer/context/SlicerContext.cjs.js");require("../../Slicer/hooks/useTableDataBySlice.cjs.js");require("../../DetailsPanel/DetailsPanel.styled.cjs.js");require("../../DetailsPanel/components/DetailsPanelTabs/DetailsPanelTabs.styled.cjs.js");require("../../DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.styled.cjs.js");require("../../../components/PlayableIcon/PlayableIcon.cjs.js");require("../../DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js");require("../../DetailsPanel/components/DetailsPanelMoreMenu/components/ShareDialog.cjs.js");require("../../DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.styled.cjs.js");require("../../DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.styled.cjs.js");require("../../Actions/Actions.styled.cjs.js");require("../../Actions/ActionsDropdown/ActionsDropdown.cjs.js");require("../../Actions/ActionIcon.cjs.js");require("../../Views/ViewsMenu/ViewsMenu.cjs.js");require("../../Views/context/ViewsContextInstance.cjs.js");require("../../Views/Views.styled.cjs.js");require("../../Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js");require("../../ListTable/ListTableRow.cjs.js");require("../../ListTable/ListTable.styled.cjs.js");require("../../../components/EntityPanelUploader/EntityPanelUploader.styled.cjs.js");require("axios");require("../../../components/ReviewablesList/ReviewablesList.styled.cjs.js");require("../../../components/ReviewablesList/ReviewablesUpload.styled.cjs.js");require("../../../components/EntityPath/EntityPath.styled.cjs.js");require("../../../components/EntityPath/SegmentProvider.cjs.js");require("../../../components/FeaturedVersionOrder/FeaturedVersionOrder.cjs.js");require("../../../components/Feedback/FeedbackContextInstance.cjs.js");require("../../../components/Feedback/SupportBubble.cjs.js");require("../../../components/FileThumbnail/FileThumbnail.cjs.js");require("../../../components/LegacyBadge/LegacyBadge.cjs.js");require("../../../components/LinksManager/LinksManager.styled.cjs.js");require("../../../components/Powerpack/PowerpackButton.cjs.js");require("../../../components/Powerpack/FreeTrialLink.cjs.js");require("../../../components/Powerpack/PowerpackDialog.styled.cjs.js");require("../../../components/Powerpack/CTAButton.cjs.js");require("../../../components/Powerpack/RequiredAddonVersion.cjs.js");require("../../../components/ProjectTableSettings/ProjectTableSettings.cjs.js");require("../../../components/SizeSlider/SizeSlider.cjs.js");require("../../../components/ReviewableCard/ReviewableCard.cjs.js");require("../../../components/ReviewableProgressCard/ReviewableProgressCard.styled.cjs.js");require("../../../components/SettingsPanel/SettingsPanel.cjs.js");require("../../../components/SettingsPanel/SettingsPanelItemTemplate.cjs.js");require("../../../components/ShareOptionIcon/ShareOptionIcon.cjs.js");require("../../../components/SimpleFormDialog/SimpleFormDialog.cjs.js");require("../../../components/StyledLink/StyledLink.cjs.js");require("../../../components/TableGridSwitch/TableGridSwitch.cjs.js");require("../../../components/Thumbnail/Thumbnail.styled.cjs.js");require("../../../components/Thumbnail/StackedThumbnails.cjs.js");require("../../../components/ThumbnailSimple/ThumbnailSimple.cjs.js");require("../../../components/VersionUploader/components/UploadVersionDialog.cjs.js");require("../../../components/VersionUploader/context/VersionUploadContext.cjs.js");require("../../../components/Watchers/Watchers.cjs.js");require("../../../components/Menu/Menu.styled.cjs.js");require("../../../components/Menu/MenuItem.cjs.js");require("../../../components/ReviewablesSelector/ReviewablesSelector.cjs.js");require("../../../components/ColumnHeaderMenuUI.cjs.js");require("../widgets/EmptyWidget.cjs.js");require("../widgets/ErrorWidget.cjs.js");require("../widgets/LoadMoreWidget.cjs.js");const a=require("../context/ProjectTableProvider.cjs.js");var n=(e=>(e[e.None=0]="None",e[e.Top=1]="Top",e[e.Right=2]="Right",e[e.Bottom=4]="Bottom",e[e.Left=8]="Left",e[e.All=15]="All",e))(n||{});const f=(e,r)=>`cell-${e}-${r}`,p=e=>{const r=e.match(/^cell-(.+)-(.+)$/);return r?{rowId:r[1],colId:r[2]}:null},c=(e,r)=>{if(!e||!r)return;const i=r.split("_");let u=e;for(const t of i)if(u&&typeof u=="object"&&t in u)u=u[t];else return;return u},g=(e,r)=>{const[i,u,t,m,s]=r.split("_"),l=e.filter(q=>q.linkType===u&&q.direction===s);return l.length?l.map(q=>q.node.id).join(","):""},y=(e,r,i)=>{if(!i[e]?.[r])return 0;let u=0;return(e===0||!i[e-1]?.[r])&&(u|=1),i[e]?.[r+1]||(u|=2),i[e+1]?.[r]||(u|=4),(r===0||!i[e]?.[r-1])&&(u|=8),u},h=e=>{const r=[];return e&1&&r.push("shadow-top"),e&2&&r.push("shadow-right"),e&4&&r.push("shadow-bottom"),e&8&&r.push("shadow-left"),r},o=(e,r)=>r.get(a.parseRowId(e));exports.BorderPosition=n;exports.getBorderClasses=h;exports.getCellBorders=y;exports.getCellId=f;exports.getCellValue=c;exports.getEntityDataById=o;exports.getLinkEntityIdsByColumnId=g;exports.parseCellId=p;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react-toastify");require("lodash");require("uuid");require("../../../util/pubsub.cjs.js");require("../context/CellEditingContext.cjs.js");require("../../../../../_virtual/jsx-runtime.cjs.js");require("react");require("@ynput/ayon-react-components");require("../../../components/SearchFilter/filterDates.cjs.js");require("date-fns");require("short-uuid");require("@tanstack/react-table");require("../widgets/CollapsedWidget.cjs.js");require("../widgets/DateWidget.cjs.js");require("../widgets/EnumWidget.cjs.js");require("../widgets/EnumCellValue.cjs.js");require("../widgets/TextWidget.cjs.js");require("../widgets/MarkdownWidget.cjs.js");require("../widgets/BooleanWidget.cjs.js");require("../widgets/CellWidget.cjs.js");require("../widgets/EntityNameWidget.cjs.js");require("../widgets/GroupHeaderWidget.cjs.js");require("../widgets/ThumbnailWidget.cjs.js");require("../../../components/AddonLoadingScreen/AddonLoadingScreen.cjs.js");require("../../../../../node_modules/match-sorter/dist/match-sorter.esm.cjs.js");require("../../../components/AccessSearchInput/AccessSearchInput.styled.cjs.js");require("../../../components/AccessUser/AccessUser.cjs.js");require("clsx");require("../../../components/AttributeEditor/AttributeEditor.cjs.js");require("../../../components/AttributeEditor/attributeTypeMap.cjs.js");require("../../../components/Badge/Badge.cjs.js");require("../../../components/Chips/Chips.cjs.js");require("react-dom");require("../../../components/DateRangePicker/DateRangePicker.styled.cjs.js");require("../../../components/LinksManager/CellEditingDialog.cjs.js");require("../../../api/base/client.cjs.js");require("../../../api/generated/graphql.cjs.js");require("../../../api/generated/graphqlLinks.cjs.js");require("../../../api/generated/access.cjs.js");require("../../../api/generated/actions.cjs.js");require("../../../api/generated/activityFeed.cjs.js");require("../../../api/generated/addons.cjs.js");require("../../../api/generated/anatomy.cjs.js");require("../../../api/generated/attributes.cjs.js");require("../../../api/generated/authentication.cjs.js");require("../../../api/generated/bundles.cjs.js");require("../../../api/generated/configuration.cjs.js");require("../../../api/generated/dataImport.cjs.js");require("../../../api/generated/desktop.cjs.js");require("../../../api/generated/entityLists.cjs.js");require("../../../api/generated/events.cjs.js");require("../../../api/generated/files.cjs.js");require("../../../api/generated/folders.cjs.js");require("../../../api/generated/inbox.cjs.js");require("../../../api/generated/links.cjs.js");require("../../../api/generated/market.cjs.js");require("../../../api/generated/onboarding.cjs.js");require("../../../api/generated/operations.cjs.js");require("../../../api/generated/products.cjs.js");require("../../../api/generated/projectDashboard.cjs.js");require("../../../api/generated/projects.cjs.js");require("../../../api/generated/projectFolders.cjs.js");require("../../../api/generated/reviewables.cjs.js");require("../../../api/generated/services.cjs.js");require("../../../api/generated/system.cjs.js");require("../../../api/generated/tasks.cjs.js");require("../../../api/generated/teams.cjs.js");require("../../../api/generated/thumbnails.cjs.js");require("../../../api/generated/uRIs.cjs.js");require("../../../api/generated/users.cjs.js");require("../../../api/generated/versions.cjs.js");require("../../../api/generated/workfiles.cjs.js");require("../../../api/generated/ynputCloud.cjs.js");require("../../../api/generated/grouping.cjs.js");require("../../../api/generated/views.cjs.js");require("../../../api/queries/actions/getActions.cjs.js");require("../../../api/queries/activities/getActivities.cjs.js");require("../../../api/queries/activities/updateActivities.cjs.js");require("../../../api/queries/activities/updateReaction.cjs.js");require("../../../api/queries/activities/getMentions.cjs.js");require("../../../api/queries/activities/getCategories.cjs.js");require("../../../api/queries/addons/getAddons.cjs.js");require("../../../api/queries/addons/updateAddons.cjs.js");require("../../../api/queries/attributes/getAttributes.cjs.js");require("../../../api/queries/attributes/updateAttributes.cjs.js");require("../../../api/queries/authentication/getAuthentication.cjs.js");require("../../../api/queries/cloud/cloud.cjs.js");require("../../../api/queries/columnStats/metricTargets.cjs.js");require("../../../api/queries/config/getConfig.cjs.js");require("../../../api/queries/config/updateConfig.cjs.js");require("../../../api/queries/entities/getEntity.cjs.js");require("../../../api/queries/entities/getEntityPanel.cjs.js");require("../../../api/queries/overview/getOverview.cjs.js");require("../../../api/queries/overview/updateOverview.cjs.js");require("../../../api/queries/versions/getVersionsProducts.cjs.js");require("../../../api/queries/links/getEntityLinks.cjs.js");require("../../../api/queries/entities/updateEntity.cjs.js");require("../../../api/queries/entityLists/getLists.cjs.js");require("../../../api/queries/entityLists/updateLists.cjs.js");require("../../../api/queries/entityLists/getListsAttributes.cjs.js");require("../../../api/queries/entityLists/listItemsColumnStats.cjs.js");require("../../../api/queries/entityLists/updateListsAttributes.cjs.js");require("../../../api/queries/entityLists/listFolders.cjs.js");require("../../../api/queries/folders/getFolders.cjs.js");require("../../../api/queries/folders/getFolderDeleteInfo.cjs.js");require("../../../api/queries/grouping/getGrouping.cjs.js");require("../../../api/queries/links/updateLinks.cjs.js");require("../../../api/queries/links/getLinks.cjs.js");require("../../../api/queries/permissions/getPermissions.cjs.js");require("../../../api/queries/products/createProduct.cjs.js");require("../../../api/queries/products/getFolderProducts.cjs.js");require("../../../api/queries/project/getProject.cjs.js");require("../../../api/queries/project/updateProject.cjs.js");require("../../../api/queries/projectFolders/projectFolders.cjs.js");require("../../../api/queries/review/getReview.cjs.js");require("../../../api/queries/review/updateReview.cjs.js");require("../../../api/queries/share/share.cjs.js");require("../../../api/queries/system/getSystem.cjs.js");require("../../../api/queries/tasks/getTasks.cjs.js");require("../../../api/queries/tasks/updateTasks.cjs.js");require("../../../api/queries/teams/getTeams.cjs.js");require("../../../api/queries/userDashboard/getUserDashboard.cjs.js");require("../../../api/queries/users/getUsers.cjs.js");require("../../../api/queries/users/updateUsers.cjs.js");require("../../../api/queries/users/guests.cjs.js");require("../../../api/queries/versions/updateVersions.cjs.js");require("../../../api/queries/views/getViews.cjs.js");require("../../../api/queries/views/updateViews.cjs.js");require("../../../api/queries/watchers/getWatchers.cjs.js");require("../../../api/queries/uris/getUris.cjs.js");require("../../../../../_virtual/index.cjs.js");require("../../../../../node_modules/refractor/lib/common.cjs.js");require("../../../../../node_modules/refractor/lib/all.cjs.js");;/* empty css */require("../../../components/DetailsPanelAttributes/DetailsPanelAttributesEditor.cjs.js");require("../../../components/DetailsPanelDetails/DetailsPanelDetails.cjs.js");require("react-quill-ayon");require("../../../components/DetailsPanelDetails/BorderedSection.cjs.js");require("../../../components/QuillListStyles/QuillListStyles.cjs.js");require("../../../components/DetailsPanelDetails/DescriptionSection.styles.cjs.js");require("react-markdown");require("remark-gfm");require("rehype-raw");require("../../Feed/components/CommentInput/quillToMarkdown.cjs.js");require("../../../components/DetailsPanelDetails/hooks/useMentionSystem.cjs.js");require("../../Feed/components/CommentInput/modules/index.cjs.js");require("../../../context/RemoteModulesContext.cjs.js");require("../../../../../_virtual/runtime.cjs.js");require("../../../../../_virtual/semver.cjs.js");require("../../../context/PowerpackContextInstance.cjs.js");require("../../../context/UriContext.cjs.js");require("../../../context/DetailsPanelContextInstance.cjs.js");require("../../../context/SubtasksModulesContextInstance.cjs.js");require("../../../context/ThumbnailUploaderContext.cjs.js");require("../../../context/SettingsPanelContext.cjs.js");require("../../../context/pip/PiPProvider.cjs.js");require("../../../context/pip/PiPWrapper.cjs.js");require("../../../context/AddonProjectContext.cjs.js");require("../../../context/AddonContext.cjs.js");require("../../../context/MoveEntityContext.cjs.js");require("../../../context/MenuContext.cjs.js");require("../../../context/WebsocketContext.cjs.js");require("../../../context/GlobalContext.cjs.js");require("../../../context/ProjectContext.cjs.js");require("../../../context/ProjectFoldersContext.cjs.js");require("react-redux");require("custom-protocol-check");require("../components/GroupSettingsFallback.cjs.js");require("../../../components/DetailsPanelDetails/DetailsSection.cjs.js");require("../../../components/DetailsPanelDetails/FieldLabel.cjs.js");require("../../../components/DoneCheckbox/DoneCheckbox.cjs.js");require("../../../components/EarlyPreview/EarlyPreview.cjs.js");require("../../../components/EmptyPlaceholder/EmptyPlaceholder.cjs.js");require("../../../components/EmptyPlaceholder/EmptyPlaceholderFlex.styled.cjs.js");require("@dnd-kit/core");require("@dnd-kit/sortable");require("../../../components/EnumEditor/EnumEditor.styled.cjs.js");require("../../ContextMenu/ContextMenuContext.cjs.js");;/* empty css */require("../../Feed/context/FeedContext.cjs.js");require("../../Feed/components/Tooltips/UserTooltipItem.cjs.js");require("../../Feed/components/Tooltips/UserTooltip/UserTooltip.styled.cjs.js");require("../../Feed/components/Tooltips/TeamTooltip/TeamTooltip.styled.cjs.js");require("../../Feed/components/Tooltips/EntityTooltip/EntityTooltip.styled.cjs.js");require("../../Feed/components/FileUploadPreview/FileUploadPreview.styled.cjs.js");require("../../Feed/components/FileUploadPreview/Mimes/TextMime.cjs.js");require("remark-emoji");require("remark-directive");require("remark-directive-rehype");require("../../Feed/components/CommentInput/CommentInput.cjs.js");require("../../Feed/components/ReactionContainer/Reactions.styled.cjs.js");require("../../Feed/components/FilesGrid/FilesGrid.styled.cjs.js");require("../../Feed/components/FileUploadCard/FileUploadCard.styled.cjs.js");require("../../Feed/components/ActivityComment/ActivityComment.styled.cjs.js");require("../../Feed/components/ActivityCheckbox/ActivityCheckbox.styled.cjs.js");require("../../Feed/components/ActivityReference/ActivityReference.styled.cjs.js");require("react-router-dom");require("../../Feed/components/ActivityStatus/ActivityStatus.cjs.js");require("../../Feed/components/ActivityHeader/ActivityHeader.styled.cjs.js");require("../../Feed/components/ActivityDate.cjs.js");require("../../Feed/components/ActivityCategorySelect/CategoryTag.cjs.js");require("../../Feed/components/ActivityStatusChange/ActivityStatusChange.styled.cjs.js");require("../../Feed/components/ActivityAssigneeChange/ActivityAssigneeChange.styled.cjs.js");require("../../Feed/components/ActivityVersions/ActivityVersions.styled.cjs.js");require("../../Feed/components/ActivityGroup/ActivityGroup.styled.cjs.js");require("../../Feed/components/ActivityVersionReview/ActivityVersionReview.styled.cjs.js");require("../../Feed/components/ActivityCategorySelect/ActivityCategorySelect.cjs.js");require("../../Feed/components/ActivityCategorySelect/CategoryDropdownItem.cjs.js");require("../../Feed/Feed.styled.cjs.js");require("../../DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.cjs.js");require("@tanstack/react-virtual");require("../ProjectTreeTable.styled.cjs.js");require("../components/HeaderActionButton.cjs.js");require("../components/RowSelectionHeader.cjs.js");require("../components/SelectionCell.cjs.js");require("../context/ProjectTableQueriesContext.cjs.js");require("../context/ProjectTableContext.cjs.js");require("../components/DeleteConfirmContent.cjs.js");require("../context/ClipboardContext.cjs.js");require("../context/SelectionCellsContext.cjs.js");require("../context/ProjectDataContext.cjs.js");require("../components/TableFooterRow.cjs.js");require("../context/SelectedRowsContext.cjs.js");require("../context/ColumnSettingsContext.cjs.js");require("../context/DetailsPanelEntityContext.cjs.js");require("../../EntityPickerDialog/EntityPickerDialog.cjs.js");require("../../Slicer/components/Slicer.cjs.js");require("../../Slicer/context/SlicerContext.cjs.js");require("../../Slicer/hooks/useTableDataBySlice.cjs.js");require("../../DetailsPanel/DetailsPanel.styled.cjs.js");require("../../DetailsPanel/components/DetailsPanelTabs/DetailsPanelTabs.styled.cjs.js");require("../../DetailsPanel/components/DetailsPanelHeader/DetailsPanelHeader.styled.cjs.js");require("../../../components/PlayableIcon/PlayableIcon.cjs.js");require("../../DetailsPanel/components/DetailsPanelFiles/DetailsPanelFiles.cjs.js");require("../../DetailsPanel/components/DetailsPanelMoreMenu/components/ShareDialog.cjs.js");require("../../DetailsPanel/components/DetailsPanelSlideOut/DetailsPanelSlideOut.styled.cjs.js");require("../../DetailsPanel/components/DetailsPanelFloating/DetailsPanelFloating.styled.cjs.js");require("../../Actions/Actions.styled.cjs.js");require("../../Actions/ActionsDropdown/ActionsDropdown.cjs.js");require("../../Actions/ActionIcon.cjs.js");require("../../Views/ViewsMenu/ViewsMenu.cjs.js");require("../../Views/context/ViewsContextInstance.cjs.js");require("../../Views/Views.styled.cjs.js");require("../../Views/ViewsMenuContainer/ViewsMenuContainer.cjs.js");require("../../ListTable/ListTableRow.cjs.js");require("../../ListTable/ListTable.styled.cjs.js");require("../../../components/EntityPanelUploader/EntityPanelUploader.styled.cjs.js");require("axios");require("../../../components/ReviewablesList/ReviewablesList.styled.cjs.js");require("../../../components/ReviewablesList/ReviewablesUpload.styled.cjs.js");require("../../../components/EntityPath/EntityPath.styled.cjs.js");require("../../../components/EntityPath/SegmentProvider.cjs.js");require("../../../components/FeaturedVersionOrder/FeaturedVersionOrder.cjs.js");require("../../../components/Feedback/FeedbackContextInstance.cjs.js");require("../../../components/Feedback/SupportBubble.cjs.js");require("../../../components/FileThumbnail/FileThumbnail.cjs.js");require("../../../components/LegacyBadge/LegacyBadge.cjs.js");require("../../../components/LinksManager/LinksManager.styled.cjs.js");require("../../../components/Powerpack/PowerpackButton.cjs.js");require("../../../components/Powerpack/FreeTrialLink.cjs.js");require("../../../components/Powerpack/PowerpackDialog.styled.cjs.js");require("../../../components/Powerpack/CTAButton.cjs.js");require("../../../components/Powerpack/RequiredAddonVersion.cjs.js");require("../../../components/ProjectTableSettings/ProjectTableSettings.cjs.js");require("../../../components/SizeSlider/SizeSlider.cjs.js");require("../../../components/ReviewableCard/ReviewableCard.cjs.js");require("../../../components/ReviewableProgressCard/ReviewableProgressCard.styled.cjs.js");require("../../../components/SettingsPanel/SettingsPanel.cjs.js");require("../../../components/SettingsPanel/SettingsPanelItemTemplate.cjs.js");require("../../../components/ShareOptionIcon/ShareOptionIcon.cjs.js");require("../../../components/SimpleFormDialog/SimpleFormDialog.cjs.js");require("../../../components/StyledLink/StyledLink.cjs.js");require("../../../components/TableGridSwitch/TableGridSwitch.cjs.js");require("../../../components/Thumbnail/Thumbnail.styled.cjs.js");require("../../../components/Thumbnail/StackedThumbnails.cjs.js");require("../../../components/ThumbnailSimple/ThumbnailSimple.cjs.js");require("../../../components/VersionUploader/components/UploadVersionDialog.cjs.js");require("../../../components/VersionUploader/context/VersionUploadContext.cjs.js");require("../../../components/Watchers/Watchers.cjs.js");require("../../../components/Menu/Menu.styled.cjs.js");require("../../../components/Menu/MenuItem.cjs.js");require("../../../components/ReviewablesSelector/ReviewablesSelector.cjs.js");require("../../../components/ColumnHeaderMenuUI.cjs.js");require("../widgets/EmptyWidget.cjs.js");require("../widgets/ErrorWidget.cjs.js");require("../widgets/LoadMoreWidget.cjs.js");const a=require("../context/ProjectTableProvider.cjs.js");var n=(e=>(e[e.None=0]="None",e[e.Top=1]="Top",e[e.Right=2]="Right",e[e.Bottom=4]="Bottom",e[e.Left=8]="Left",e[e.All=15]="All",e))(n||{});const f=(e,r)=>`cell-${e}-${r}`,p=e=>{const r=e.match(/^cell-(.+)-(.+)$/);return r?{rowId:r[1],colId:r[2]}:null},c=(e,r)=>{if(!e||!r)return;const i=r.split("_");let u=e;for(const t of i)if(u&&typeof u=="object"&&t in u)u=u[t];else return;return u},g=(e,r)=>{const[i,u,t,m,s]=r.split("_"),l=e.filter(q=>q.linkType===u&&q.direction===s);return l.length?l.map(q=>q.node.id).join(","):""},y=(e,r,i)=>{if(!i[e]?.[r])return 0;let u=0;return(e===0||!i[e-1]?.[r])&&(u|=1),i[e]?.[r+1]||(u|=2),i[e+1]?.[r]||(u|=4),(r===0||!i[e]?.[r-1])&&(u|=8),u},h=e=>{const r=[];return e&1&&r.push("shadow-top"),e&2&&r.push("shadow-right"),e&4&&r.push("shadow-bottom"),e&8&&r.push("shadow-left"),r},o=(e,r)=>r.get(a.parseRowId(e));exports.BorderPosition=n;exports.getBorderClasses=h;exports.getCellBorders=y;exports.getCellId=f;exports.getCellValue=c;exports.getEntityDataById=o;exports.getLinkEntityIdsByColumnId=g;exports.parseCellId=p;
|
|
2
2
|
//# sourceMappingURL=cellUtils.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cellUtils.cjs.js","sources":["../../../../../../src/containers/ProjectTreeTable/utils/cellUtils.ts"],"sourcesContent":["/**\n * Shared cell utilities for table operations\n */\n\nimport { TaskLink } from '@shared/api'\nimport { parseRowId } from '../context'\nimport { EMapResult, EntitiesMap } from '../types'\n\n// Type definitions for cell identifiers\nexport type CellId = string\nexport type RowId = string\nexport type ColId = string\n\n// Cell position in the grid\nexport interface CellPosition {\n rowId: RowId\n colId: ColId\n}\n\n// Cell border position flags - used for determining which borders to show\nexport enum BorderPosition {\n None = 0,\n Top = 1 << 0,\n Right = 1 << 1,\n Bottom = 1 << 2,\n Left = 1 << 3,\n All = Top | Right | Bottom | Left,\n}\n\n/**\n * Create a standardized cell ID from row and column IDs\n */\nexport const getCellId = (rowId: RowId, colId: ColId): CellId => `cell-${rowId}-${colId}`\n\n/**\n * Parse a cell ID to extract row and column IDs\n * @returns CellPosition or null if invalid format\n */\nexport const parseCellId = (cellId: CellId): CellPosition | null => {\n const match = cellId.match(/^cell-(.+)-(.+)$/)\n if (!match) return null\n return { rowId: match[1], colId: match[2] }\n}\n\nexport const getCellValue = (obj: any, path: string): any => {\n if (!obj || !path) return undefined\n\n const parts = path.split('_')\n let current = obj\n\n for (const part of parts) {\n if (current && typeof current === 'object' && part in current) {\n current = current[part]\n } else {\n return undefined // Return undefined if any part of the path is invalid\n }\n }\n\n return current\n}\n\n// return the link entity ids for a given column id\nexport const getLinkEntityIdsByColumnId = (links: TaskLink[], columnId: CellId): string => {\n // split the columnId\n const [_link, linkType, _inType, _outType, direction] = columnId.split('_')\n const cellLinks = links.filter(\n (link) => link.linkType === linkType && link.direction === direction,\n )\n if (cellLinks.length) {\n return cellLinks.map((link) => link.node.id).join(',')\n } else {\n return ''\n }\n}\n\n/**\n * Determines which borders to display for a selected cell\n * based on its position within the selection grid\n *\n * @param rowIndex Current cell's row index\n * @param colIndex Current cell's column index\n * @param selectedCells 2D array representing selection state (true = selected)\n * @returns BorderPosition flags indicating which borders to display\n */\nexport const getCellBorders = (\n rowIndex: number,\n colIndex: number,\n selectedCells: boolean[][],\n): BorderPosition => {\n if (!selectedCells[rowIndex]?.[colIndex]) {\n return BorderPosition.None\n }\n\n let borders = BorderPosition.None\n\n // Check top border\n if (rowIndex === 0 || !selectedCells[rowIndex - 1]?.[colIndex]) {\n borders |= BorderPosition.Top\n }\n\n // Check right border\n if (!selectedCells[rowIndex]?.[colIndex + 1]) {\n borders |= BorderPosition.Right\n }\n\n // Check bottom border\n if (!selectedCells[rowIndex + 1]?.[colIndex]) {\n borders |= BorderPosition.Bottom\n }\n\n // Check left border\n if (colIndex === 0 || !selectedCells[rowIndex]?.[colIndex - 1]) {\n borders |= BorderPosition.Left\n }\n\n return borders\n}\n\n/**\n * Converts border position flags to CSS classes for shadow styling\n */\nexport const getBorderClasses = (borders: BorderPosition): string[] => {\n const classes: string[] = []\n\n if (borders & BorderPosition.Top) classes.push('shadow-top')\n if (borders & BorderPosition.Right) classes.push('shadow-right')\n if (borders & BorderPosition.Bottom) classes.push('shadow-bottom')\n if (borders & BorderPosition.Left) classes.push('shadow-left')\n\n return classes\n}\n\n// get a entity from it's id\nexport const getEntityDataById = <T extends 'folder' | 'task' | 'product' | 'version'>(\n id: string,\n entitiesMap: EntitiesMap,\n) => entitiesMap.get(parseRowId(id)) as EMapResult<T> | undefined\n"],"names":["BorderPosition","getCellId","rowId","colId","parseCellId","cellId","match","getCellValue","obj","path","parts","current","part","getLinkEntityIdsByColumnId","links","columnId","_link","linkType","_inType","_outType","direction","cellLinks","link","getCellBorders","rowIndex","colIndex","selectedCells","borders","getBorderClasses","classes","getEntityDataById","id","entitiesMap","parseRowId"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cellUtils.cjs.js","sources":["../../../../../../src/containers/ProjectTreeTable/utils/cellUtils.ts"],"sourcesContent":["/**\n * Shared cell utilities for table operations\n */\n\nimport { TaskLink } from '@shared/api'\nimport { parseRowId } from '../context'\nimport { EMapResult, EntitiesMap } from '../types'\n\n// Type definitions for cell identifiers\nexport type CellId = string\nexport type RowId = string\nexport type ColId = string\n\n// Cell position in the grid\nexport interface CellPosition {\n rowId: RowId\n colId: ColId\n}\n\n// Cell border position flags - used for determining which borders to show\nexport enum BorderPosition {\n None = 0,\n Top = 1 << 0,\n Right = 1 << 1,\n Bottom = 1 << 2,\n Left = 1 << 3,\n All = Top | Right | Bottom | Left,\n}\n\n/**\n * Create a standardized cell ID from row and column IDs\n */\nexport const getCellId = (rowId: RowId, colId: ColId): CellId => `cell-${rowId}-${colId}`\n\n/**\n * Parse a cell ID to extract row and column IDs\n * @returns CellPosition or null if invalid format\n */\nexport const parseCellId = (cellId: CellId): CellPosition | null => {\n const match = cellId.match(/^cell-(.+)-(.+)$/)\n if (!match) return null\n return { rowId: match[1], colId: match[2] }\n}\n\nexport const getCellValue = (obj: any, path: string): any => {\n if (!obj || !path) return undefined\n\n const parts = path.split('_')\n let current = obj\n\n for (const part of parts) {\n if (current && typeof current === 'object' && part in current) {\n current = current[part]\n } else {\n return undefined // Return undefined if any part of the path is invalid\n }\n }\n\n return current\n}\n\n// return the link entity ids for a given column id\nexport const getLinkEntityIdsByColumnId = (links: TaskLink[], columnId: CellId): string => {\n // split the columnId\n const [_link, linkType, _inType, _outType, direction] = columnId.split('_')\n const cellLinks = links.filter(\n (link) => link.linkType === linkType && link.direction === direction,\n )\n if (cellLinks.length) {\n return cellLinks.map((link) => link.node.id).join(',')\n } else {\n return ''\n }\n}\n\n/**\n * Determines which borders to display for a selected cell\n * based on its position within the selection grid\n *\n * @param rowIndex Current cell's row index\n * @param colIndex Current cell's column index\n * @param selectedCells 2D array representing selection state (true = selected)\n * @returns BorderPosition flags indicating which borders to display\n */\nexport const getCellBorders = (\n rowIndex: number,\n colIndex: number,\n selectedCells: boolean[][],\n): BorderPosition => {\n if (!selectedCells[rowIndex]?.[colIndex]) {\n return BorderPosition.None\n }\n\n let borders = BorderPosition.None\n\n // Check top border\n if (rowIndex === 0 || !selectedCells[rowIndex - 1]?.[colIndex]) {\n borders |= BorderPosition.Top\n }\n\n // Check right border\n if (!selectedCells[rowIndex]?.[colIndex + 1]) {\n borders |= BorderPosition.Right\n }\n\n // Check bottom border\n if (!selectedCells[rowIndex + 1]?.[colIndex]) {\n borders |= BorderPosition.Bottom\n }\n\n // Check left border\n if (colIndex === 0 || !selectedCells[rowIndex]?.[colIndex - 1]) {\n borders |= BorderPosition.Left\n }\n\n return borders\n}\n\n/**\n * Converts border position flags to CSS classes for shadow styling\n */\nexport const getBorderClasses = (borders: BorderPosition): string[] => {\n const classes: string[] = []\n\n if (borders & BorderPosition.Top) classes.push('shadow-top')\n if (borders & BorderPosition.Right) classes.push('shadow-right')\n if (borders & BorderPosition.Bottom) classes.push('shadow-bottom')\n if (borders & BorderPosition.Left) classes.push('shadow-left')\n\n return classes\n}\n\n// get a entity from it's id\nexport const getEntityDataById = <T extends 'folder' | 'task' | 'product' | 'version'>(\n id: string,\n entitiesMap: EntitiesMap,\n) => entitiesMap.get(parseRowId(id)) as EMapResult<T> | undefined\n"],"names":["BorderPosition","getCellId","rowId","colId","parseCellId","cellId","match","getCellValue","obj","path","parts","current","part","getLinkEntityIdsByColumnId","links","columnId","_link","linkType","_inType","_outType","direction","cellLinks","link","getCellBorders","rowIndex","colIndex","selectedCells","borders","getBorderClasses","classes","getEntityDataById","id","entitiesMap","parseRowId"],"mappings":"62gBAoBO,IAAKA,GAAAA,IACVA,EAAAA,EAAA,KAAO,CAAA,EAAP,OACAA,EAAAA,EAAA,IAAM,CAAA,EAAN,MACAA,EAAAA,EAAA,MAAQ,CAAA,EAAR,QACAA,EAAAA,EAAA,OAAS,CAAA,EAAT,SACAA,EAAAA,EAAA,KAAO,CAAA,EAAP,OACAA,EAAAA,EAAA,IAAM,EAAA,EAAN,MANUA,IAAAA,GAAA,CAAA,CAAA,EAYL,MAAMC,EAAY,CAACC,EAAcC,IAAyB,QAAQD,CAAK,IAAIC,CAAK,GAM1EC,EAAeC,GAAwC,CAClE,MAAMC,EAAQD,EAAO,MAAM,kBAAkB,EAC7C,OAAKC,EACE,CAAE,MAAOA,EAAM,CAAC,EAAG,MAAOA,EAAM,CAAC,CAAA,EADrB,IAErB,EAEaC,EAAe,CAACC,EAAUC,IAAsB,CAC3D,GAAI,CAACD,GAAO,CAACC,EAAM,OAEnB,MAAMC,EAAQD,EAAK,MAAM,GAAG,EAC5B,IAAIE,EAAUH,EAEd,UAAWI,KAAQF,EACjB,GAAIC,GAAW,OAAOA,GAAY,UAAYC,KAAQD,EACpDA,EAAUA,EAAQC,CAAI,MAEtB,QAIJ,OAAOD,CACT,EAGaE,EAA6B,CAACC,EAAmBC,IAA6B,CAEzF,KAAM,CAACC,EAAOC,EAAUC,EAASC,EAAUC,CAAS,EAAIL,EAAS,MAAM,GAAG,EACpEM,EAAYP,EAAM,OACrBQ,GAASA,EAAK,WAAaL,GAAYK,EAAK,YAAcF,CAAA,EAE7D,OAAIC,EAAU,OACLA,EAAU,IAAKC,GAASA,EAAK,KAAK,EAAE,EAAE,KAAK,GAAG,EAE9C,EAEX,EAWaC,EAAiB,CAC5BC,EACAC,EACAC,IACmB,CACnB,GAAI,CAACA,EAAcF,CAAQ,IAAIC,CAAQ,EACrC,MAAO,GAGT,IAAIE,EAAU,EAGd,OAAIH,IAAa,GAAK,CAACE,EAAcF,EAAW,CAAC,IAAIC,CAAQ,KAC3DE,GAAW,GAIRD,EAAcF,CAAQ,IAAIC,EAAW,CAAC,IACzCE,GAAW,GAIRD,EAAcF,EAAW,CAAC,IAAIC,CAAQ,IACzCE,GAAW,IAITF,IAAa,GAAK,CAACC,EAAcF,CAAQ,IAAIC,EAAW,CAAC,KAC3DE,GAAW,GAGNA,CACT,EAKaC,EAAoBD,GAAsC,CACrE,MAAME,EAAoB,CAAA,EAE1B,OAAIF,EAAU,GAAoBE,EAAQ,KAAK,YAAY,EACvDF,EAAU,GAAsBE,EAAQ,KAAK,cAAc,EAC3DF,EAAU,GAAuBE,EAAQ,KAAK,eAAe,EAC7DF,EAAU,GAAqBE,EAAQ,KAAK,aAAa,EAEtDA,CACT,EAGaC,EAAoB,CAC/BC,EACAC,IACGA,EAAY,IAAIC,EAAAA,WAAWF,CAAE,CAAC"}
|
|
@@ -98,6 +98,7 @@ import "../../../api/queries/entities/updateEntity.es.js";
|
|
|
98
98
|
import "../../../api/queries/entityLists/getLists.es.js";
|
|
99
99
|
import "../../../api/queries/entityLists/updateLists.es.js";
|
|
100
100
|
import "../../../api/queries/entityLists/getListsAttributes.es.js";
|
|
101
|
+
import "../../../api/queries/entityLists/listItemsColumnStats.es.js";
|
|
101
102
|
import "../../../api/queries/entityLists/updateListsAttributes.es.js";
|
|
102
103
|
import "../../../api/queries/entityLists/listFolders.es.js";
|
|
103
104
|
import "../../../api/queries/folders/getFolders.es.js";
|
|
@@ -202,10 +203,11 @@ import "../../Feed/components/ActivityStatusChange/ActivityStatusChange.styled.e
|
|
|
202
203
|
import "../../Feed/components/ActivityAssigneeChange/ActivityAssigneeChange.styled.es.js";
|
|
203
204
|
import "../../Feed/components/ActivityVersions/ActivityVersions.styled.es.js";
|
|
204
205
|
import "../../Feed/components/ActivityGroup/ActivityGroup.styled.es.js";
|
|
205
|
-
import "../../Feed/
|
|
206
|
-
import "../../DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js";
|
|
206
|
+
import "../../Feed/components/ActivityVersionReview/ActivityVersionReview.styled.es.js";
|
|
207
207
|
import "../../Feed/components/ActivityCategorySelect/ActivityCategorySelect.es.js";
|
|
208
208
|
import "../../Feed/components/ActivityCategorySelect/CategoryDropdownItem.es.js";
|
|
209
|
+
import "../../Feed/Feed.styled.es.js";
|
|
210
|
+
import "../../DetailsPanel/components/TabHeaderAndFilters/TabHeaderAndFilters.styled.es.js";
|
|
209
211
|
import "@tanstack/react-virtual";
|
|
210
212
|
import "../ProjectTreeTable.styled.es.js";
|
|
211
213
|
import "../components/HeaderActionButton.es.js";
|
|
@@ -284,10 +286,10 @@ import "../widgets/ErrorWidget.es.js";
|
|
|
284
286
|
import "../widgets/LoadMoreWidget.es.js";
|
|
285
287
|
import { parseRowId as u } from "../context/ProjectTableProvider.es.js";
|
|
286
288
|
var l = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Top = 1] = "Top", t[t.Right = 2] = "Right", t[t.Bottom = 4] = "Bottom", t[t.Left = 8] = "Left", t[t.All = 15] = "All", t))(l || {});
|
|
287
|
-
const
|
|
289
|
+
const jm = (t, p) => `cell-${t}-${p}`, wm = (t) => {
|
|
288
290
|
const p = t.match(/^cell-(.+)-(.+)$/);
|
|
289
291
|
return p ? { rowId: p[1], colId: p[2] } : null;
|
|
290
|
-
},
|
|
292
|
+
}, Dm = (t, p) => {
|
|
291
293
|
if (!t || !p) return;
|
|
292
294
|
const r = p.split("_");
|
|
293
295
|
let i = t;
|
|
@@ -297,28 +299,28 @@ const Em = (t, p) => `cell-${t}-${p}`, Nm = (t) => {
|
|
|
297
299
|
else
|
|
298
300
|
return;
|
|
299
301
|
return i;
|
|
300
|
-
},
|
|
302
|
+
}, Vm = (t, p) => {
|
|
301
303
|
const [r, i, o, e, n] = p.split("_"), f = t.filter(
|
|
302
304
|
(m) => m.linkType === i && m.direction === n
|
|
303
305
|
);
|
|
304
306
|
return f.length ? f.map((m) => m.node.id).join(",") : "";
|
|
305
|
-
},
|
|
307
|
+
}, qm = (t, p, r) => {
|
|
306
308
|
if (!r[t]?.[p])
|
|
307
309
|
return 0;
|
|
308
310
|
let i = 0;
|
|
309
311
|
return (t === 0 || !r[t - 1]?.[p]) && (i |= 1), r[t]?.[p + 1] || (i |= 2), r[t + 1]?.[p] || (i |= 4), (p === 0 || !r[t]?.[p - 1]) && (i |= 8), i;
|
|
310
|
-
},
|
|
312
|
+
}, zm = (t) => {
|
|
311
313
|
const p = [];
|
|
312
314
|
return t & 1 && p.push("shadow-top"), t & 2 && p.push("shadow-right"), t & 4 && p.push("shadow-bottom"), t & 8 && p.push("shadow-left"), p;
|
|
313
|
-
},
|
|
315
|
+
}, Fm = (t, p) => p.get(u(t));
|
|
314
316
|
export {
|
|
315
317
|
l as BorderPosition,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
318
|
+
zm as getBorderClasses,
|
|
319
|
+
qm as getCellBorders,
|
|
320
|
+
jm as getCellId,
|
|
321
|
+
Dm as getCellValue,
|
|
322
|
+
Fm as getEntityDataById,
|
|
323
|
+
Vm as getLinkEntityIdsByColumnId,
|
|
324
|
+
wm as parseCellId
|
|
323
325
|
};
|
|
324
326
|
//# sourceMappingURL=cellUtils.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cellUtils.es.js","sources":["../../../../../../src/containers/ProjectTreeTable/utils/cellUtils.ts"],"sourcesContent":["/**\n * Shared cell utilities for table operations\n */\n\nimport { TaskLink } from '@shared/api'\nimport { parseRowId } from '../context'\nimport { EMapResult, EntitiesMap } from '../types'\n\n// Type definitions for cell identifiers\nexport type CellId = string\nexport type RowId = string\nexport type ColId = string\n\n// Cell position in the grid\nexport interface CellPosition {\n rowId: RowId\n colId: ColId\n}\n\n// Cell border position flags - used for determining which borders to show\nexport enum BorderPosition {\n None = 0,\n Top = 1 << 0,\n Right = 1 << 1,\n Bottom = 1 << 2,\n Left = 1 << 3,\n All = Top | Right | Bottom | Left,\n}\n\n/**\n * Create a standardized cell ID from row and column IDs\n */\nexport const getCellId = (rowId: RowId, colId: ColId): CellId => `cell-${rowId}-${colId}`\n\n/**\n * Parse a cell ID to extract row and column IDs\n * @returns CellPosition or null if invalid format\n */\nexport const parseCellId = (cellId: CellId): CellPosition | null => {\n const match = cellId.match(/^cell-(.+)-(.+)$/)\n if (!match) return null\n return { rowId: match[1], colId: match[2] }\n}\n\nexport const getCellValue = (obj: any, path: string): any => {\n if (!obj || !path) return undefined\n\n const parts = path.split('_')\n let current = obj\n\n for (const part of parts) {\n if (current && typeof current === 'object' && part in current) {\n current = current[part]\n } else {\n return undefined // Return undefined if any part of the path is invalid\n }\n }\n\n return current\n}\n\n// return the link entity ids for a given column id\nexport const getLinkEntityIdsByColumnId = (links: TaskLink[], columnId: CellId): string => {\n // split the columnId\n const [_link, linkType, _inType, _outType, direction] = columnId.split('_')\n const cellLinks = links.filter(\n (link) => link.linkType === linkType && link.direction === direction,\n )\n if (cellLinks.length) {\n return cellLinks.map((link) => link.node.id).join(',')\n } else {\n return ''\n }\n}\n\n/**\n * Determines which borders to display for a selected cell\n * based on its position within the selection grid\n *\n * @param rowIndex Current cell's row index\n * @param colIndex Current cell's column index\n * @param selectedCells 2D array representing selection state (true = selected)\n * @returns BorderPosition flags indicating which borders to display\n */\nexport const getCellBorders = (\n rowIndex: number,\n colIndex: number,\n selectedCells: boolean[][],\n): BorderPosition => {\n if (!selectedCells[rowIndex]?.[colIndex]) {\n return BorderPosition.None\n }\n\n let borders = BorderPosition.None\n\n // Check top border\n if (rowIndex === 0 || !selectedCells[rowIndex - 1]?.[colIndex]) {\n borders |= BorderPosition.Top\n }\n\n // Check right border\n if (!selectedCells[rowIndex]?.[colIndex + 1]) {\n borders |= BorderPosition.Right\n }\n\n // Check bottom border\n if (!selectedCells[rowIndex + 1]?.[colIndex]) {\n borders |= BorderPosition.Bottom\n }\n\n // Check left border\n if (colIndex === 0 || !selectedCells[rowIndex]?.[colIndex - 1]) {\n borders |= BorderPosition.Left\n }\n\n return borders\n}\n\n/**\n * Converts border position flags to CSS classes for shadow styling\n */\nexport const getBorderClasses = (borders: BorderPosition): string[] => {\n const classes: string[] = []\n\n if (borders & BorderPosition.Top) classes.push('shadow-top')\n if (borders & BorderPosition.Right) classes.push('shadow-right')\n if (borders & BorderPosition.Bottom) classes.push('shadow-bottom')\n if (borders & BorderPosition.Left) classes.push('shadow-left')\n\n return classes\n}\n\n// get a entity from it's id\nexport const getEntityDataById = <T extends 'folder' | 'task' | 'product' | 'version'>(\n id: string,\n entitiesMap: EntitiesMap,\n) => entitiesMap.get(parseRowId(id)) as EMapResult<T> | undefined\n"],"names":["BorderPosition","getCellId","rowId","colId","parseCellId","cellId","match","getCellValue","obj","path","parts","current","part","getLinkEntityIdsByColumnId","links","columnId","_link","linkType","_inType","_outType","direction","cellLinks","link","getCellBorders","rowIndex","colIndex","selectedCells","borders","getBorderClasses","classes","getEntityDataById","id","entitiesMap","parseRowId"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cellUtils.es.js","sources":["../../../../../../src/containers/ProjectTreeTable/utils/cellUtils.ts"],"sourcesContent":["/**\n * Shared cell utilities for table operations\n */\n\nimport { TaskLink } from '@shared/api'\nimport { parseRowId } from '../context'\nimport { EMapResult, EntitiesMap } from '../types'\n\n// Type definitions for cell identifiers\nexport type CellId = string\nexport type RowId = string\nexport type ColId = string\n\n// Cell position in the grid\nexport interface CellPosition {\n rowId: RowId\n colId: ColId\n}\n\n// Cell border position flags - used for determining which borders to show\nexport enum BorderPosition {\n None = 0,\n Top = 1 << 0,\n Right = 1 << 1,\n Bottom = 1 << 2,\n Left = 1 << 3,\n All = Top | Right | Bottom | Left,\n}\n\n/**\n * Create a standardized cell ID from row and column IDs\n */\nexport const getCellId = (rowId: RowId, colId: ColId): CellId => `cell-${rowId}-${colId}`\n\n/**\n * Parse a cell ID to extract row and column IDs\n * @returns CellPosition or null if invalid format\n */\nexport const parseCellId = (cellId: CellId): CellPosition | null => {\n const match = cellId.match(/^cell-(.+)-(.+)$/)\n if (!match) return null\n return { rowId: match[1], colId: match[2] }\n}\n\nexport const getCellValue = (obj: any, path: string): any => {\n if (!obj || !path) return undefined\n\n const parts = path.split('_')\n let current = obj\n\n for (const part of parts) {\n if (current && typeof current === 'object' && part in current) {\n current = current[part]\n } else {\n return undefined // Return undefined if any part of the path is invalid\n }\n }\n\n return current\n}\n\n// return the link entity ids for a given column id\nexport const getLinkEntityIdsByColumnId = (links: TaskLink[], columnId: CellId): string => {\n // split the columnId\n const [_link, linkType, _inType, _outType, direction] = columnId.split('_')\n const cellLinks = links.filter(\n (link) => link.linkType === linkType && link.direction === direction,\n )\n if (cellLinks.length) {\n return cellLinks.map((link) => link.node.id).join(',')\n } else {\n return ''\n }\n}\n\n/**\n * Determines which borders to display for a selected cell\n * based on its position within the selection grid\n *\n * @param rowIndex Current cell's row index\n * @param colIndex Current cell's column index\n * @param selectedCells 2D array representing selection state (true = selected)\n * @returns BorderPosition flags indicating which borders to display\n */\nexport const getCellBorders = (\n rowIndex: number,\n colIndex: number,\n selectedCells: boolean[][],\n): BorderPosition => {\n if (!selectedCells[rowIndex]?.[colIndex]) {\n return BorderPosition.None\n }\n\n let borders = BorderPosition.None\n\n // Check top border\n if (rowIndex === 0 || !selectedCells[rowIndex - 1]?.[colIndex]) {\n borders |= BorderPosition.Top\n }\n\n // Check right border\n if (!selectedCells[rowIndex]?.[colIndex + 1]) {\n borders |= BorderPosition.Right\n }\n\n // Check bottom border\n if (!selectedCells[rowIndex + 1]?.[colIndex]) {\n borders |= BorderPosition.Bottom\n }\n\n // Check left border\n if (colIndex === 0 || !selectedCells[rowIndex]?.[colIndex - 1]) {\n borders |= BorderPosition.Left\n }\n\n return borders\n}\n\n/**\n * Converts border position flags to CSS classes for shadow styling\n */\nexport const getBorderClasses = (borders: BorderPosition): string[] => {\n const classes: string[] = []\n\n if (borders & BorderPosition.Top) classes.push('shadow-top')\n if (borders & BorderPosition.Right) classes.push('shadow-right')\n if (borders & BorderPosition.Bottom) classes.push('shadow-bottom')\n if (borders & BorderPosition.Left) classes.push('shadow-left')\n\n return classes\n}\n\n// get a entity from it's id\nexport const getEntityDataById = <T extends 'folder' | 'task' | 'product' | 'version'>(\n id: string,\n entitiesMap: EntitiesMap,\n) => entitiesMap.get(parseRowId(id)) as EMapResult<T> | undefined\n"],"names":["BorderPosition","getCellId","rowId","colId","parseCellId","cellId","match","getCellValue","obj","path","parts","current","part","getLinkEntityIdsByColumnId","links","columnId","_link","linkType","_inType","_outType","direction","cellLinks","link","getCellBorders","rowIndex","colIndex","selectedCells","borders","getBorderClasses","classes","getEntityDataById","id","entitiesMap","parseRowId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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