@truedat/dd 8.7.0 → 8.7.2
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/package.json +3 -3
- package/src/api/queries.js +1 -0
- package/src/components/BucketView.js +2 -2
- package/src/components/CatalogCustomViewCards.js +1 -1
- package/src/components/DictionaryRoutes.js +3 -3
- package/src/components/FilteredNav.js +3 -3
- package/src/components/Grant.js +4 -4
- package/src/components/GrantApprovalRule.js +1 -1
- package/src/components/GrantApprovalRuleConditions.js +1 -1
- package/src/components/GrantApprovalRuleDeleteButton.js +1 -1
- package/src/components/GrantApprovalRuleEdit.js +1 -1
- package/src/components/GrantApprovalRuleForm.js +6 -6
- package/src/components/GrantApprovalRules.js +1 -1
- package/src/components/GrantFilters.js +1 -1
- package/src/components/GrantFiltersLoader.js +1 -1
- package/src/components/GrantRemovalDirectButton.js +1 -1
- package/src/components/GrantRemovalWorkflow.js +2 -2
- package/src/components/GrantRemovalWorkflowDropdown.js +1 -1
- package/src/components/GrantRequest.js +3 -3
- package/src/components/GrantRequestApprovalForm.js +2 -2
- package/src/components/GrantRequestApprovalResults.js +1 -1
- package/src/components/GrantRequestBulkActions.js +2 -2
- package/src/components/GrantRequestBulkRoleSelector.js +1 -1
- package/src/components/GrantRequestCartResult.js +13 -3
- package/src/components/GrantRequestSummary.js +1 -1
- package/src/components/GrantRequests.js +2 -2
- package/src/components/GrantRequestsSearchResults.js +7 -7
- package/src/components/GrantRoutes.js +3 -9
- package/src/components/Grants.js +14 -4
- package/src/components/GrantsDownloadButton.js +1 -1
- package/src/components/GrantsLabelResults.js +2 -5
- package/src/components/GrantsLoader.js +2 -2
- package/src/components/GrantsTable.js +3 -8
- package/src/components/GraphLoader.js +1 -1
- package/src/components/LineageContextMenu.js +1 -1
- package/src/components/LineageDownloadButton.js +2 -2
- package/src/components/LineageEventsTable.js +1 -1
- package/src/components/LineageGraph.js +7 -6
- package/src/components/LineageGroup.js +2 -7
- package/src/components/LinkLabelsSelector.js +1 -1
- package/src/components/MyGrantRequests.js +1 -1
- package/src/components/ProfileGroup.js +2 -2
- package/src/components/ReferenceDatasetActions.js +1 -1
- package/src/components/ReferenceDatasetCreate.js +1 -1
- package/src/components/ReferenceDatasetDetail.js +1 -1
- package/src/components/ReferenceDatasetFieldSelector.js +5 -5
- package/src/components/ReferenceDatasetForm.js +3 -3
- package/src/components/ReferenceDatasetSelectorInputField.js +3 -3
- package/src/components/ReferenceDatasetsTable.js +1 -1
- package/src/components/StructureChildrenRelations.js +1 -1
- package/src/components/StructureConfidentialButton.js +1 -1
- package/src/components/StructureCrumbs.js +3 -3
- package/src/components/StructureDeleteButton.js +1 -1
- package/src/components/StructureFields.js +3 -3
- package/src/components/StructureFieldsDropdown.js +10 -10
- package/src/components/StructureGrantCart.js +3 -3
- package/src/components/StructureGrantCartCheckout.js +9 -4
- package/src/components/StructureGrantCartInformation.js +2 -7
- package/src/components/StructureGrantListButton.js +5 -5
- package/src/components/StructureGrantRequestAddCart.js +1 -1
- package/src/components/StructureGrantSummaryButton.js +2 -2
- package/src/components/StructureGrants.js +2 -2
- package/src/components/StructureItem.js +4 -4
- package/src/components/StructureItemRoot.js +1 -1
- package/src/components/StructureLoader.js +1 -2
- package/src/components/StructureMetadata.js +23 -17
- package/src/components/StructureNav.js +1 -1
- package/src/components/StructureNavClassified.js +1 -1
- package/src/components/StructureNoteActions.js +1 -1
- package/src/components/StructureNotes.js +3 -3
- package/src/components/StructureNotesEdit.js +4 -4
- package/src/components/StructureProfileButton.js +1 -1
- package/src/components/StructureProperties.js +1 -1
- package/src/components/StructureSelector.js +3 -3
- package/src/components/StructureSelectorInputFieldJoin.js +2 -2
- package/src/components/StructureStructureForm.js +2 -2
- package/src/components/StructureStructureLinks.js +5 -5
- package/src/components/StructureTabPane.js +5 -5
- package/src/components/StructureTabPaneRoutes.js +92 -80
- package/src/components/StructureTabRoutes.js +30 -8
- package/src/components/StructureTabs.js +17 -16
- package/src/components/StructureTagForm.js +2 -2
- package/src/components/StructureTags.js +1 -1
- package/src/components/StructureTypeForm.js +3 -3
- package/src/components/StructureTypeLoader.js +1 -1
- package/src/components/StructureTypesLoader.js +1 -1
- package/src/components/StructureTypesRoutes.js +1 -1
- package/src/components/StructureVersions.js +17 -16
- package/src/components/StructureView.js +1 -1
- package/src/components/StructuresBulkUpdate.js +4 -4
- package/src/components/StructuresDomainsUploadOption.js +1 -1
- package/src/components/StructuresDownloadOption.js +1 -1
- package/src/components/StructuresGrantRequestView.js +1 -1
- package/src/components/StructuresLoader.js +1 -1
- package/src/components/StructuresRoutes.js +2 -2
- package/src/components/StructuresTable.js +4 -4
- package/src/components/StructuresUpdateOption.js +3 -3
- package/src/components/StructuresUploadEventsTable.js +9 -9
- package/src/components/StructuresUploadOption.js +14 -14
- package/src/components/StructuresView.js +1 -1
- package/src/components/SystemCards.js +7 -7
- package/src/components/SystemForm.js +2 -2
- package/src/components/SystemLoader.js +1 -1
- package/src/components/SystemStructures.js +2 -2
- package/src/components/SystemView.js +3 -3
- package/src/components/Task.js +6 -6
- package/src/components/Tasks.js +1 -1
- package/src/components/ValueConditionStructure.js +2 -2
- package/src/components/__tests__/BucketView.spec.js +2 -2
- package/src/components/__tests__/CatalogCustomViewCards.spec.js +1 -1
- package/src/components/__tests__/CatalogViewConfigForm.spec.js +2 -2
- package/src/components/__tests__/CatalogViewConfigs.spec.js +2 -2
- package/src/components/__tests__/DictionaryRoutes.spec.js +7 -3
- package/src/components/__tests__/EditDomainForm.spec.js +3 -3
- package/src/components/__tests__/FilteredNav.spec.js +4 -4
- package/src/components/__tests__/Grant.spec.js +4 -4
- package/src/components/__tests__/GrantApprovalRuleConditions.spec.js +6 -6
- package/src/components/__tests__/GrantApprovalRuleDeleteButton.spec.js +2 -2
- package/src/components/__tests__/GrantApprovalRuleForm.spec.js +9 -7
- package/src/components/__tests__/GrantApprovalRules.spec.js +3 -3
- package/src/components/__tests__/GrantRemoval.spec.js +4 -4
- package/src/components/__tests__/GrantRemovalDirectButton.spec.js +8 -8
- package/src/components/__tests__/GrantRemovalWorkflow.spec.js +8 -8
- package/src/components/__tests__/GrantRequest.spec.js +1 -1
- package/src/components/__tests__/GrantRequestApprovalForm.spec.js +6 -6
- package/src/components/__tests__/GrantRequestApprovalPopup.spec.js +1 -1
- package/src/components/__tests__/GrantRequestBulkActions.spec.js +8 -8
- package/src/components/__tests__/GrantRequestBulkApprovalForm.spec.js +2 -2
- package/src/components/__tests__/GrantRequestBulkRoleSelector.spec.js +2 -2
- package/src/components/__tests__/GrantRequestCartResult.spec.js +13 -3
- package/src/components/__tests__/GrantRequestHeader.spec.js +2 -2
- package/src/components/__tests__/GrantRequestRow.spec.js +4 -4
- package/src/components/__tests__/GrantRequestSummary.spec.js +1 -1
- package/src/components/__tests__/GrantRequests.spec.js +2 -2
- package/src/components/__tests__/GrantRequestsLabelResults.spec.js +3 -3
- package/src/components/__tests__/GrantRequestsSearchResults.spec.js +2 -2
- package/src/components/__tests__/GrantRequestsTable.spec.js +1 -1
- package/src/components/__tests__/GrantRoutes.spec.js +16 -16
- package/src/components/__tests__/GrantsDownloadButton.spec.js +68 -40
- package/src/components/__tests__/GrantsLabelResults.spec.js +2 -2
- package/src/components/__tests__/GrantsLoader.spec.js +1 -1
- package/src/components/__tests__/GrantsTable.spec.js +4 -4
- package/src/components/__tests__/LineageForm.spec.js +5 -5
- package/src/components/__tests__/LineageGroup.spec.js +6 -6
- package/src/components/__tests__/LineageResource.spec.js +5 -5
- package/src/components/__tests__/LineageRoutes.spec.js +6 -6
- package/src/components/__tests__/PendingStructureNoteRow.spec.js +4 -4
- package/src/components/__tests__/PendingStructureNotes.spec.js +1 -1
- package/src/components/__tests__/PendingStructureNotesLabelResults.spec.js +1 -1
- package/src/components/__tests__/PendingStructureNotesPagination.spec.js +1 -1
- package/src/components/__tests__/PendingStructureNotesTable.spec.js +2 -2
- package/src/components/__tests__/ProfileExecution.spec.js +2 -2
- package/src/components/__tests__/ProfileGroup.spec.js +2 -2
- package/src/components/__tests__/ReferenceDataset.spec.js +7 -5
- package/src/components/__tests__/ReferenceDatasetCreate.spec.js +1 -1
- package/src/components/__tests__/ReferenceDatasetDetail.spec.js +1 -1
- package/src/components/__tests__/ReferenceDatasetFieldSelector.spec.js +9 -9
- package/src/components/__tests__/ReferenceDatasetForm.spec.js +9 -7
- package/src/components/__tests__/ReferenceDatasetRoutes.spec.js +1 -1
- package/src/components/__tests__/StructureFieldRow.spec.js +3 -3
- package/src/components/__tests__/StructureFieldsDropdown.spec.js +5 -5
- package/src/components/__tests__/StructureGrantCartCheckout.spec.js +2 -2
- package/src/components/__tests__/StructureGrantCartInformation.spec.js +1 -1
- package/src/components/__tests__/StructureGrantCartUserSelector.spec.js +4 -4
- package/src/components/__tests__/StructureGrantDropdown.spec.js +3 -3
- package/src/components/__tests__/StructureGrantListButton.spec.js +4 -4
- package/src/components/__tests__/StructureGrantSummaryButton.spec.js +5 -5
- package/src/components/__tests__/StructureItem.spec.js +3 -3
- package/src/components/__tests__/StructureMetadata.spec.js +2 -4
- package/src/components/__tests__/StructureNavClassified.spec.js +1 -1
- package/src/components/__tests__/StructureNoteActions.spec.js +17 -15
- package/src/components/__tests__/StructureNoteLink.spec.js +8 -9
- package/src/components/__tests__/StructureNotes.spec.js +3 -3
- package/src/components/__tests__/StructureNotesDownloadButton.spec.js +15 -15
- package/src/components/__tests__/StructureNotesEdit.spec.js +1 -1
- package/src/components/__tests__/StructureRelationRow.spec.js +2 -2
- package/src/components/__tests__/StructureRelations.spec.js +2 -2
- package/src/components/__tests__/StructureRow.spec.js +2 -2
- package/src/components/__tests__/StructureSelectorInputField.spec.js +2 -2
- package/src/components/__tests__/StructureSelectorInputFieldJoin.spec.js +1 -1
- package/src/components/__tests__/StructureStructureForm.spec.js +1 -1
- package/src/components/__tests__/StructureStructureLinks.spec.js +15 -15
- package/src/components/__tests__/StructureSummary.spec.js +1 -1
- package/src/components/__tests__/StructureTabPane.spec.js +10 -12
- package/src/components/__tests__/StructureTabRoutes.spec.js +1 -1
- package/src/components/__tests__/StructureTabs.spec.js +24 -8
- package/src/components/__tests__/StructureTag.spec.js +11 -11
- package/src/components/__tests__/StructureTagForm.spec.js +17 -17
- package/src/components/__tests__/StructureTypesRoutes.spec.js +4 -4
- package/src/components/__tests__/StructureVersions.spec.js +0 -1
- package/src/components/__tests__/StructuresBulkUpdate.spec.js +3 -3
- package/src/components/__tests__/StructuresDownloadOption.spec.js +3 -3
- package/src/components/__tests__/StructuresEditableDownloadOption.spec.js +2 -2
- package/src/components/__tests__/StructuresGrantRequestView.spec.js +2 -2
- package/src/components/__tests__/StructuresLabelResults.spec.js +1 -1
- package/src/components/__tests__/StructuresLoader.spec.js +1 -1
- package/src/components/__tests__/StructuresOptions.spec.js +15 -9
- package/src/components/__tests__/StructuresRoutes.spec.js +1 -1
- package/src/components/__tests__/StructuresSearchResults.spec.js +2 -2
- package/src/components/__tests__/StructuresTable.spec.js +5 -5
- package/src/components/__tests__/StructuresUpdateOption.spec.js +2 -2
- package/src/components/__tests__/StructuresUploadOption.spec.js +2 -2
- package/src/components/__tests__/StructuresView.spec.js +6 -6
- package/src/components/__tests__/SystemCards.spec.js +2 -2
- package/src/components/__tests__/SystemFilteredNav.spec.js +1 -1
- package/src/components/__tests__/SystemStructuresLoader.spec.js +1 -1
- package/src/components/__tests__/SystemsRoutes.spec.js +1 -1
- package/src/components/__tests__/TagForm.spec.js +7 -5
- package/src/components/__tests__/TagsRoutes.spec.js +1 -1
- package/src/components/__tests__/Tasks.spec.js +9 -9
- package/src/components/__tests__/TasksRoutes.spec.js +1 -1
- package/src/components/__tests__/ValueConditionStructure.spec.js +2 -2
- package/src/hooks/useBucketPaths.js +1 -1
- package/src/hooks/useBucketStructures.js +1 -1
- package/src/hooks/useCustomTabs.js +1 -1
- package/src/hooks/useGrant.js +7 -3
- package/src/hooks/useGrantRequest.js +4 -4
- package/src/hooks/useStructures.js +4 -5
- package/src/hooks/useTemplatesByIds.js +10 -5
- package/src/messages/en.js +1 -2
- package/src/messages/es.js +1 -2
- package/src/messages/index.js +1 -1
- package/src/reducers/__tests__/bulkUpdateStructuresLoading.spec.js +5 -5
- package/src/reducers/__tests__/creatingGrantRequestApproval.spec.js +3 -3
- package/src/reducers/__tests__/csvGraphDownloading.spec.js +4 -4
- package/src/reducers/__tests__/ddMessage.spec.js +3 -3
- package/src/reducers/__tests__/grantFilters.spec.js +1 -1
- package/src/reducers/__tests__/grantQuery.spec.js +6 -6
- package/src/reducers/__tests__/grantRequests.spec.js +2 -2
- package/src/reducers/__tests__/grantRequestsCart.spec.js +31 -31
- package/src/reducers/__tests__/grantRequestsLoading.spec.js +3 -3
- package/src/reducers/__tests__/grantRequestsQuery.spec.js +2 -2
- package/src/reducers/__tests__/grants.spec.js +2 -2
- package/src/reducers/__tests__/graph.spec.js +1 -1
- package/src/reducers/__tests__/graphLoading.spec.js +6 -4
- package/src/reducers/__tests__/graphRedirect.spec.js +11 -7
- package/src/reducers/__tests__/lineageEventsLoading.spec.js +2 -2
- package/src/reducers/__tests__/lineageQuery.spec.js +6 -6
- package/src/reducers/__tests__/nodes.spec.js +1 -1
- package/src/reducers/__tests__/nodesLoading.spec.js +2 -2
- package/src/reducers/__tests__/profileExecution.spec.js +6 -6
- package/src/reducers/__tests__/profileExecutionLoading.spec.js +5 -3
- package/src/reducers/__tests__/profileGroup.spec.js +12 -12
- package/src/reducers/__tests__/profileGroupLoading.spec.js +6 -6
- package/src/reducers/__tests__/referenceDatasetSaving.spec.js +8 -4
- package/src/reducers/__tests__/selectedGroups.spec.js +2 -2
- package/src/reducers/__tests__/selectedNode.spec.js +5 -5
- package/src/reducers/__tests__/selectedResources.spec.js +5 -5
- package/src/reducers/__tests__/selectedUserSearchFilter.spec.js +3 -3
- package/src/reducers/__tests__/structure.spec.js +2 -2
- package/src/reducers/__tests__/structureActions.spec.js +4 -4
- package/src/reducers/__tests__/structureAncestry.spec.js +6 -6
- package/src/reducers/__tests__/structureChildren.spec.js +2 -2
- package/src/reducers/__tests__/structureFields.spec.js +5 -5
- package/src/reducers/__tests__/structureImpactGraph.spec.js +6 -6
- package/src/reducers/__tests__/structureImpactId.spec.js +7 -7
- package/src/reducers/__tests__/structureLineageGraph.spec.js +7 -7
- package/src/reducers/__tests__/structureLineageId.spec.js +7 -7
- package/src/reducers/__tests__/structureLinks.spec.js +6 -6
- package/src/reducers/__tests__/structureLoading.spec.js +2 -2
- package/src/reducers/__tests__/structureNotes.spec.js +1 -1
- package/src/reducers/__tests__/structureParents.spec.js +2 -2
- package/src/reducers/__tests__/structureProfile.spec.js +9 -6
- package/src/reducers/__tests__/structureQuery.spec.js +4 -4
- package/src/reducers/__tests__/structureRedirect.spec.js +9 -9
- package/src/reducers/__tests__/structureRelations.spec.js +4 -4
- package/src/reducers/__tests__/structureSiblings.spec.js +2 -2
- package/src/reducers/__tests__/structureSystem.spec.js +3 -3
- package/src/reducers/__tests__/structureTagSaving.spec.js +2 -2
- package/src/reducers/__tests__/structureType.spec.js +2 -2
- package/src/reducers/__tests__/structureTypeLoading.spec.js +6 -6
- package/src/reducers/__tests__/structureVersion.spec.js +4 -4
- package/src/reducers/__tests__/structureVersions.spec.js +9 -5
- package/src/reducers/__tests__/structures.spec.js +3 -3
- package/src/reducers/__tests__/structuresAliasNameMode.spec.js +5 -5
- package/src/reducers/__tests__/structuresUploadEvents.spec.js +1 -1
- package/src/reducers/__tests__/structuresUploadEventsLoading.spec.js +4 -4
- package/src/reducers/__tests__/system.spec.js +2 -2
- package/src/reducers/__tests__/systemId.spec.js +3 -3
- package/src/reducers/__tests__/systemStructures.spec.js +3 -3
- package/src/reducers/__tests__/systemStructuresLoading.spec.js +2 -2
- package/src/reducers/ddMessage.js +1 -1
- package/src/reducers/grantFilters.js +1 -1
- package/src/reducers/grantRequestsCart.js +16 -13
- package/src/reducers/grantSelectedFilter.js +1 -1
- package/src/reducers/profileGroup.js +1 -1
- package/src/reducers/selectedResources.js +1 -1
- package/src/reducers/selectedUserSearchFilter.js +1 -1
- package/src/reducers/structure.js +2 -1
- package/src/reducers/structureImpactGraph.js +1 -1
- package/src/reducers/structureLineageGraph.js +1 -1
- package/src/reducers/structureRedirect.js +1 -1
- package/src/reducers/structuresAliasNameMode.js +1 -1
- package/src/reducers/structuresUploadEvents.js +1 -1
- package/src/reducers/systemId.js +1 -1
- package/src/reducers/userSearchFilters.js +1 -1
- package/src/routines.js +31 -32
- package/src/sagas/__tests__/createGrantApprovalRule.spec.js +1 -1
- package/src/sagas/__tests__/createGrantRequestApproval.spec.js +1 -1
- package/src/sagas/__tests__/createGrantRequestStatus.spec.js +1 -1
- package/src/sagas/__tests__/createGraph.spec.js +5 -5
- package/src/sagas/__tests__/createProfileGroup.spec.js +10 -10
- package/src/sagas/__tests__/deleteGrantApprovalRule.spec.js +1 -1
- package/src/sagas/__tests__/deleteStructureStructureLink.spec.js +1 -1
- package/src/sagas/__tests__/doStructureNoteAction.spec.js +6 -6
- package/src/sagas/__tests__/downloadCsvGraph.spec.js +2 -2
- package/src/sagas/__tests__/fetchGrantFilters.spec.js +1 -1
- package/src/sagas/__tests__/fetchGrantRequestsFilters.spec.js +3 -3
- package/src/sagas/__tests__/fetchProfileExecution.spec.js +3 -3
- package/src/sagas/__tests__/fetchProfileGroup.spec.js +6 -6
- package/src/sagas/__tests__/fetchStructureNotes.spec.js +3 -3
- package/src/sagas/__tests__/fetchStructures.spec.js +2 -2
- package/src/sagas/__tests__/fetchStructuresUploadEvents.spec.js +1 -1
- package/src/sagas/__tests__/fetchSystemStructures.spec.js +4 -4
- package/src/sagas/__tests__/requestGrantRemoval.spec.js +2 -2
- package/src/sagas/__tests__/updateGrantApprovalRule.spec.js +1 -1
- package/src/sagas/__tests__/updateStructure.spec.js +1 -1
- package/src/sagas/__tests__/uploadStructuresDomains.spec.js +3 -3
- package/src/sagas/bulkUpdateStructures.js +1 -1
- package/src/sagas/createGrantApprovalRule.js +1 -1
- package/src/sagas/createGrantRequestApproval.js +1 -1
- package/src/sagas/createGrantRequestStatus.js +2 -2
- package/src/sagas/createGraph.js +3 -3
- package/src/sagas/createProfileGroup.js +1 -1
- package/src/sagas/createSystem.js +2 -2
- package/src/sagas/deleteCatalogViewConfig.js +1 -1
- package/src/sagas/deleteGrantApprovalRule.js +1 -1
- package/src/sagas/deleteStructureStructureLink.js +1 -1
- package/src/sagas/doStructureNoteAction.js +9 -4
- package/src/sagas/downloadCsvGraph.js +2 -2
- package/src/sagas/downloadReferenceDataset.js +1 -1
- package/src/sagas/fetchGrantRequestsFilters.js +1 -1
- package/src/sagas/fetchGraph.js +1 -1
- package/src/sagas/fetchStructuresUploadEvents.js +1 -1
- package/src/sagas/graph/polling.js +4 -4
- package/src/sagas/linkStructureToStructure.js +2 -2
- package/src/sagas/requestGrantRemoval.js +1 -1
- package/src/sagas/updateGrantApprovalRule.js +1 -1
- package/src/sagas/updateStructure.js +1 -1
- package/src/sagas/uploadStructuresDomains.js +2 -2
- package/src/sagas/upsertCatalogViewConfig.js +1 -1
- package/src/selectors/__tests__/getActiveTab.spec.js +99 -28
- package/src/selectors/__tests__/getBusinessConceptsLinksToStructuresColumnsSelector.spec.js +1 -1
- package/src/selectors/__tests__/getGrantRequestsColumns.spec.js +2 -2
- package/src/selectors/__tests__/getGrantRequestsSearchColumns.spec.js +1 -1
- package/src/selectors/__tests__/getGrantsColumns.spec.js +4 -4
- package/src/selectors/__tests__/getParsedEvents.spec.js +1 -1
- package/src/selectors/__tests__/getSortedRelations.spec.js +5 -5
- package/src/selectors/__tests__/getStructureFieldColumns.spec.js +1 -1
- package/src/selectors/__tests__/getStructureRelations.spec.js +1 -1
- package/src/selectors/__tests__/getTabVisibility.spec.js +49 -38
- package/src/selectors/__tests__/messages.spec.js +4 -4
- package/src/selectors/getActiveTab.js +16 -4
- package/src/selectors/getBusinessConceptsLinksToStructuresColumnsSelector.js +1 -1
- package/src/selectors/getGrantAvailableFilters.js +2 -2
- package/src/selectors/getGrantRequestTemplate.js +1 -1
- package/src/selectors/getGrantRequests.js +2 -2
- package/src/selectors/getGrantRequestsColumns.js +6 -6
- package/src/selectors/getGrantRequestsQuery.js +1 -1
- package/src/selectors/getGrantRequestsSearchColumns.js +2 -2
- package/src/selectors/getGrantSelectedFilters.js +1 -1
- package/src/selectors/getGrantsColumns.js +5 -5
- package/src/selectors/getLineageLevels.js +1 -1
- package/src/selectors/getLinkedImplementationsToStructuresColumns.js +1 -1
- package/src/selectors/getRelationSortingCriteria.js +1 -1
- package/src/selectors/getSortedRelations.js +5 -5
- package/src/selectors/getSortedStructureNotes.js +4 -4
- package/src/selectors/getStructureDeletedAt.js +2 -2
- package/src/selectors/getStructureFieldColumns.js +1 -1
- package/src/selectors/getStructureLinks.js +1 -1
- package/src/selectors/getStructureParent.js +2 -2
- package/src/selectors/getStructureProperties.js +1 -1
- package/src/selectors/getStructureRelations.js +4 -4
- package/src/selectors/getStructureSortingCriteria.js +1 -1
- package/src/selectors/getStructureUpdatedAt.js +1 -1
- package/src/selectors/getStructuresFields.js +5 -5
- package/src/selectors/getStructuresUploadEventColumns.js +1 -1
- package/src/selectors/getSystem.js +1 -1
- package/src/selectors/getSystemTemplate.js +1 -1
- package/src/selectors/getTabVisibility.js +5 -6
- package/src/selectors/groupOptionsSelector.js +2 -2
- package/src/selectors/leafClassesSelector.js +1 -1
- package/src/selectors/messages.js +1 -1
- package/src/selectors/metadataViewsSelector.js +6 -6
- package/src/selectors/resourceOptionsSelector.js +2 -2
- package/src/selectors/structureColumnsSelector.js +2 -2
- package/src/selectors/structureNotesColumnsSelector.js +1 -1
- package/src/selectors/templateNamesSelector.js +1 -1
- package/src/selectors/utils/decorators.js +32 -20
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
STRUCTURE_VERSION_VERSIONS,
|
|
18
18
|
STRUCTURE_GRANTS,
|
|
19
19
|
} from "@truedat/core/routes";
|
|
20
|
-
const customPath = "/structures/:id/custom";
|
|
21
20
|
|
|
22
21
|
import { defaultTab, getActiveTab } from "../getActiveTab";
|
|
22
|
+
const customPath = "/structures/:id/custom";
|
|
23
23
|
|
|
24
24
|
describe("selectors: defaultTab", () => {
|
|
25
25
|
const truthy = true;
|
|
@@ -144,26 +144,62 @@ describe("selectors: getActiveTab", () => {
|
|
|
144
144
|
|
|
145
145
|
it("should determine value according to path and tab visibility", () => {
|
|
146
146
|
expect(getActiveTab({ tabVisibility, path: STRUCTURE })).toBe("fields");
|
|
147
|
-
expect(getActiveTab({ tabVisibility, path: STRUCTURE_VERSION })).toBe(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
expect(getActiveTab({ tabVisibility, path:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
expect(getActiveTab({ tabVisibility, path:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
expect(getActiveTab({ tabVisibility, path:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
147
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_VERSION })).toBe(
|
|
148
|
+
"fields",
|
|
149
|
+
);
|
|
150
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_CHILDREN })).toBe(
|
|
151
|
+
"children",
|
|
152
|
+
);
|
|
153
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_NOTES })).toBe(
|
|
154
|
+
"notes",
|
|
155
|
+
);
|
|
156
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_NOTES_EDIT })).toBe(
|
|
157
|
+
"notes",
|
|
158
|
+
);
|
|
159
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_PARENTS })).toBe(
|
|
160
|
+
"parents",
|
|
161
|
+
);
|
|
162
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_PROFILE })).toBe(
|
|
163
|
+
"profile",
|
|
164
|
+
);
|
|
165
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_RULES })).toBe(
|
|
166
|
+
"rules",
|
|
167
|
+
);
|
|
168
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_MEMBERS })).toBe(
|
|
169
|
+
"roles",
|
|
170
|
+
);
|
|
171
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_LINKS })).toBe(
|
|
172
|
+
"links",
|
|
173
|
+
);
|
|
174
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_LINKS_NEW })).toBe(
|
|
175
|
+
"links",
|
|
176
|
+
);
|
|
177
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_VERSIONS })).toBe(
|
|
178
|
+
"versions",
|
|
179
|
+
);
|
|
180
|
+
expect(
|
|
181
|
+
getActiveTab({ tabVisibility, path: STRUCTURE_VERSION_VERSIONS }),
|
|
182
|
+
).toBe("versions");
|
|
183
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_EVENTS })).toBe(
|
|
184
|
+
"events",
|
|
185
|
+
);
|
|
186
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_LINEAGE })).toBe(
|
|
187
|
+
"lineage",
|
|
188
|
+
);
|
|
189
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_IMPACT })).toBe(
|
|
190
|
+
"impact",
|
|
191
|
+
);
|
|
192
|
+
expect(getActiveTab({ tabVisibility, path: STRUCTURE_GRANTS })).toBe(
|
|
193
|
+
"grants",
|
|
160
194
|
);
|
|
161
|
-
expect(getActiveTab({ tabVisibility, path: STRUCTURE_EVENTS })).toBe("events");
|
|
162
|
-
expect(getActiveTab({ tabVisibility, path: STRUCTURE_LINEAGE })).toBe("lineage");
|
|
163
|
-
expect(getActiveTab({ tabVisibility, path: STRUCTURE_IMPACT })).toBe("impact");
|
|
164
|
-
expect(getActiveTab({ tabVisibility, path: STRUCTURE_GRANTS })).toBe("grants");
|
|
165
195
|
expect(getActiveTab({ tabVisibility, path: "foo" })).toBe(undefined);
|
|
166
|
-
expect(
|
|
196
|
+
expect(
|
|
197
|
+
getActiveTab({
|
|
198
|
+
tabVisibility,
|
|
199
|
+
path: customPath,
|
|
200
|
+
customTabs: [{ name: "custom", route: customPath }],
|
|
201
|
+
}),
|
|
202
|
+
).toBe("custom");
|
|
167
203
|
});
|
|
168
204
|
|
|
169
205
|
it("should return the first visible tab according to structureTabsOrder when path is STRUCTURE", () => {
|
|
@@ -173,7 +209,9 @@ describe("selectors: getActiveTab", () => {
|
|
|
173
209
|
fields: true,
|
|
174
210
|
notes: true,
|
|
175
211
|
};
|
|
176
|
-
expect(
|
|
212
|
+
expect(
|
|
213
|
+
getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder }),
|
|
214
|
+
).toBe("links");
|
|
177
215
|
});
|
|
178
216
|
|
|
179
217
|
it("should return the first visible tab according to structureTabsOrder when path is STRUCTURE_VERSION", () => {
|
|
@@ -183,7 +221,13 @@ describe("selectors: getActiveTab", () => {
|
|
|
183
221
|
fields: true,
|
|
184
222
|
links: true,
|
|
185
223
|
};
|
|
186
|
-
expect(
|
|
224
|
+
expect(
|
|
225
|
+
getActiveTab({
|
|
226
|
+
tabVisibility,
|
|
227
|
+
path: STRUCTURE_VERSION,
|
|
228
|
+
structureTabsOrder,
|
|
229
|
+
}),
|
|
230
|
+
).toBe("notes");
|
|
187
231
|
});
|
|
188
232
|
|
|
189
233
|
it("should skip invisible tabs in structureTabsOrder and return the first visible one", () => {
|
|
@@ -193,7 +237,9 @@ describe("selectors: getActiveTab", () => {
|
|
|
193
237
|
fields: true,
|
|
194
238
|
notes: true,
|
|
195
239
|
};
|
|
196
|
-
expect(
|
|
240
|
+
expect(
|
|
241
|
+
getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder }),
|
|
242
|
+
).toBe("fields");
|
|
197
243
|
});
|
|
198
244
|
|
|
199
245
|
it("should return first visible tab from default order when all tabs in structureTabsOrder are invisible", () => {
|
|
@@ -204,7 +250,9 @@ describe("selectors: getActiveTab", () => {
|
|
|
204
250
|
fields: true,
|
|
205
251
|
notes: true,
|
|
206
252
|
};
|
|
207
|
-
expect(
|
|
253
|
+
expect(
|
|
254
|
+
getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder }),
|
|
255
|
+
).toBe("fields");
|
|
208
256
|
});
|
|
209
257
|
|
|
210
258
|
it("should handle tabs in structureTabsOrder that are not in tabVisibility", () => {
|
|
@@ -213,18 +261,27 @@ describe("selectors: getActiveTab", () => {
|
|
|
213
261
|
fields: true,
|
|
214
262
|
notes: true,
|
|
215
263
|
};
|
|
216
|
-
expect(
|
|
264
|
+
expect(
|
|
265
|
+
getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder }),
|
|
266
|
+
).toBe("fields");
|
|
217
267
|
});
|
|
218
268
|
|
|
219
269
|
it("should handle structureLinks, lineage, and impact tabs in custom order", () => {
|
|
220
|
-
const structureTabsOrder = [
|
|
270
|
+
const structureTabsOrder = [
|
|
271
|
+
"lineage",
|
|
272
|
+
"structureLinks",
|
|
273
|
+
"impact",
|
|
274
|
+
"fields",
|
|
275
|
+
];
|
|
221
276
|
const tabVisibility = {
|
|
222
277
|
lineage: true,
|
|
223
278
|
structureLinks: true,
|
|
224
279
|
impact: true,
|
|
225
280
|
fields: true,
|
|
226
281
|
};
|
|
227
|
-
expect(
|
|
282
|
+
expect(
|
|
283
|
+
getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder }),
|
|
284
|
+
).toBe("lineage");
|
|
228
285
|
});
|
|
229
286
|
|
|
230
287
|
it("should return custom tab as first when it is first in structureTabsOrder", () => {
|
|
@@ -235,7 +292,14 @@ describe("selectors: getActiveTab", () => {
|
|
|
235
292
|
fields: true,
|
|
236
293
|
notes: true,
|
|
237
294
|
};
|
|
238
|
-
expect(
|
|
295
|
+
expect(
|
|
296
|
+
getActiveTab({
|
|
297
|
+
tabVisibility,
|
|
298
|
+
path: STRUCTURE,
|
|
299
|
+
structureTabsOrder,
|
|
300
|
+
customTabs,
|
|
301
|
+
}),
|
|
302
|
+
).toBe("custom");
|
|
239
303
|
});
|
|
240
304
|
|
|
241
305
|
it("should skip custom tab if it is not in customTabs array even if in structureTabsOrder", () => {
|
|
@@ -245,6 +309,13 @@ describe("selectors: getActiveTab", () => {
|
|
|
245
309
|
links: true,
|
|
246
310
|
fields: true,
|
|
247
311
|
};
|
|
248
|
-
expect(
|
|
312
|
+
expect(
|
|
313
|
+
getActiveTab({
|
|
314
|
+
tabVisibility,
|
|
315
|
+
path: STRUCTURE,
|
|
316
|
+
structureTabsOrder,
|
|
317
|
+
customTabs,
|
|
318
|
+
}),
|
|
319
|
+
).toBe("links");
|
|
249
320
|
});
|
|
250
321
|
});
|
|
@@ -17,7 +17,7 @@ describe("selectors: getBusinessConceptsLinksToStructuresColumns", () => {
|
|
|
17
17
|
const res = getBusinessConceptsLinksToStructuresColumns({});
|
|
18
18
|
|
|
19
19
|
expect(res).toHaveLength(
|
|
20
|
-
defaultBusinessConceptsLinksToStructuresColumns.length
|
|
20
|
+
defaultBusinessConceptsLinksToStructuresColumns.length,
|
|
21
21
|
);
|
|
22
22
|
});
|
|
23
23
|
});
|
|
@@ -12,8 +12,8 @@ describe("selectors: getMyGrantRequestsColumns", () => {
|
|
|
12
12
|
expect(_.map("name")(columns)).toEqual(
|
|
13
13
|
_.flow(
|
|
14
14
|
_.map("name"),
|
|
15
|
-
_.reject((name) => name === "user")
|
|
16
|
-
)(defaultGrantRequestsTableColumns)
|
|
15
|
+
_.reject((name) => name === "user"),
|
|
16
|
+
)(defaultGrantRequestsTableColumns),
|
|
17
17
|
);
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -10,7 +10,7 @@ describe("selectors: getGrantRequestsSearchColumns", () => {
|
|
|
10
10
|
it("get default grant requests columns", () => {
|
|
11
11
|
const columns = getGrantRequestsSearchColumns(state);
|
|
12
12
|
expect(_.map("name")(columns)).toEqual(
|
|
13
|
-
_.flow(_.map("name"))(defaultGrantRequestsSearchTableColumns)
|
|
13
|
+
_.flow(_.map("name"))(defaultGrantRequestsSearchTableColumns),
|
|
14
14
|
);
|
|
15
15
|
});
|
|
16
16
|
|
|
@@ -59,7 +59,7 @@ describe("selectors: getGrantsTableColumns", () => {
|
|
|
59
59
|
it("get default grant columns", () => {
|
|
60
60
|
const columns = getGrantsTableColumns(state);
|
|
61
61
|
expect(_.map("name")(columns)).toEqual(
|
|
62
|
-
_.map("name")(defaultGrantsTableColumns)
|
|
62
|
+
_.map("name")(defaultGrantsTableColumns),
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -95,7 +95,7 @@ describe("GrantStructureDecorator", () => {
|
|
|
95
95
|
};
|
|
96
96
|
const { container } = render(
|
|
97
97
|
<GrantStructureDecorator {...props} />,
|
|
98
|
-
renderOpts
|
|
98
|
+
renderOpts,
|
|
99
99
|
);
|
|
100
100
|
expect(container).toMatchSnapshot();
|
|
101
101
|
});
|
|
@@ -111,7 +111,7 @@ describe("GrantStructureDecorator", () => {
|
|
|
111
111
|
};
|
|
112
112
|
const { container } = render(
|
|
113
113
|
<GrantStructureDecorator {...props} />,
|
|
114
|
-
renderOpts
|
|
114
|
+
renderOpts,
|
|
115
115
|
);
|
|
116
116
|
expect(container).toMatchSnapshot();
|
|
117
117
|
});
|
|
@@ -124,7 +124,7 @@ describe("GrantTableStructureDecorator", () => {
|
|
|
124
124
|
};
|
|
125
125
|
const { container } = render(
|
|
126
126
|
<GrantTableStructureDecorator {...props} />,
|
|
127
|
-
renderOpts
|
|
127
|
+
renderOpts,
|
|
128
128
|
);
|
|
129
129
|
expect(container).toMatchSnapshot();
|
|
130
130
|
});
|
|
@@ -2,23 +2,23 @@ import { getSortedParentRelations, getSortedChildrenRelations } from "..";
|
|
|
2
2
|
|
|
3
3
|
const folders = [
|
|
4
4
|
{ structure: { name: "foo2" }, relation_type: { name: "folder" } },
|
|
5
|
-
{ structure: { name: "foo1" }, relation_type: { name: "folder" } }
|
|
5
|
+
{ structure: { name: "foo1" }, relation_type: { name: "folder" } },
|
|
6
6
|
];
|
|
7
7
|
const columns = [
|
|
8
8
|
{ structure: { name: "bar1" }, relation_type: { name: "column" } },
|
|
9
|
-
{ structure: { name: "bar2" }, relation_type: { name: "column" } }
|
|
9
|
+
{ structure: { name: "bar2" }, relation_type: { name: "column" } },
|
|
10
10
|
];
|
|
11
11
|
|
|
12
12
|
const state = {
|
|
13
13
|
childrenRelations: [...folders, ...columns],
|
|
14
|
-
parentRelations: [...folders, ...columns]
|
|
14
|
+
parentRelations: [...folders, ...columns],
|
|
15
15
|
};
|
|
16
16
|
const foo = [
|
|
17
17
|
...columns,
|
|
18
18
|
...[
|
|
19
19
|
{ structure: { name: "foo1" }, relation_type: { name: "folder" } },
|
|
20
|
-
{ structure: { name: "foo2" }, relation_type: { name: "folder" } }
|
|
21
|
-
]
|
|
20
|
+
{ structure: { name: "foo2" }, relation_type: { name: "folder" } },
|
|
21
|
+
],
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
describe("selectors: getSortedChildrenRelations", () => {
|
|
@@ -4,7 +4,7 @@ describe("selectors: getStructureFieldColumns", () => {
|
|
|
4
4
|
it("should return custom StructureFieldColumns when present", () => {
|
|
5
5
|
const structureFieldColumns = [{ name: "test" }];
|
|
6
6
|
const res = getStructureFieldColumns({
|
|
7
|
-
structureFieldsColumns: structureFieldColumns
|
|
7
|
+
structureFieldsColumns: structureFieldColumns,
|
|
8
8
|
});
|
|
9
9
|
expect(res).toHaveLength(1);
|
|
10
10
|
expect(res).toEqual(structureFieldColumns);
|
|
@@ -2,29 +2,33 @@ import { getTabVisibility } from "../getTabVisibility";
|
|
|
2
2
|
|
|
3
3
|
describe("selectors: getTabVisibility", () => {
|
|
4
4
|
it("should include fields iff structureFields is not empty", () => {
|
|
5
|
-
expect(
|
|
5
|
+
expect(
|
|
6
|
+
getTabVisibility({ structure: { data_fields_count: 1 } }),
|
|
7
|
+
).toMatchObject({
|
|
6
8
|
fields: true,
|
|
7
9
|
});
|
|
8
|
-
expect(
|
|
10
|
+
expect(
|
|
11
|
+
getTabVisibility({ structure: { data_fields_count: 0 } }),
|
|
12
|
+
).toMatchObject({
|
|
9
13
|
fields: false,
|
|
10
14
|
});
|
|
11
15
|
});
|
|
12
16
|
|
|
13
17
|
it("should include lineage iff structure has in degree", () => {
|
|
14
18
|
expect(
|
|
15
|
-
getTabVisibility({ structure: { degree: { in: 1 } } })
|
|
19
|
+
getTabVisibility({ structure: { degree: { in: 1 } } }),
|
|
16
20
|
).toMatchObject({ lineage: true });
|
|
17
21
|
expect(
|
|
18
|
-
getTabVisibility({ structure: { degree: { in: 0 } } })
|
|
22
|
+
getTabVisibility({ structure: { degree: { in: 0 } } }),
|
|
19
23
|
).toMatchObject({ lineage: false });
|
|
20
24
|
});
|
|
21
25
|
|
|
22
26
|
it("should include impact iff structure has out degree", () => {
|
|
23
27
|
expect(
|
|
24
|
-
getTabVisibility({ structure: { degree: { out: 1 } } })
|
|
28
|
+
getTabVisibility({ structure: { degree: { out: 1 } } }),
|
|
25
29
|
).toMatchObject({ impact: true });
|
|
26
30
|
expect(
|
|
27
|
-
getTabVisibility({ structure: { degree: { out: 0 } } })
|
|
31
|
+
getTabVisibility({ structure: { degree: { out: 0 } } }),
|
|
28
32
|
).toMatchObject({ impact: false });
|
|
29
33
|
});
|
|
30
34
|
|
|
@@ -35,7 +39,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
35
39
|
profile: false,
|
|
36
40
|
});
|
|
37
41
|
expect(
|
|
38
|
-
getTabVisibility({ structureFields, userPermissions })
|
|
42
|
+
getTabVisibility({ structureFields, userPermissions }),
|
|
39
43
|
).toMatchObject({ profile: true });
|
|
40
44
|
});
|
|
41
45
|
|
|
@@ -48,43 +52,44 @@ describe("selectors: getTabVisibility", () => {
|
|
|
48
52
|
getTabVisibility({
|
|
49
53
|
structure: { profile: { foo: "foo" } },
|
|
50
54
|
userPermissions,
|
|
51
|
-
})
|
|
55
|
+
}),
|
|
52
56
|
).toMatchObject({ profile: false });
|
|
53
57
|
expect(
|
|
54
58
|
getTabVisibility({
|
|
55
59
|
structureProfile: { patterns: "foo" },
|
|
56
60
|
userPermissions,
|
|
57
|
-
})
|
|
61
|
+
}),
|
|
58
62
|
).toMatchObject({ profile: true });
|
|
59
63
|
expect(
|
|
60
64
|
getTabVisibility({
|
|
61
65
|
structureProfile: { most_frequent: "foo" },
|
|
62
66
|
userPermissions,
|
|
63
|
-
})
|
|
67
|
+
}),
|
|
64
68
|
).toMatchObject({ profile: true });
|
|
65
69
|
});
|
|
66
70
|
|
|
67
|
-
it("should include links
|
|
71
|
+
it("should include links tab if user has create_link permission", () => {
|
|
68
72
|
expect(
|
|
69
|
-
getTabVisibility({
|
|
73
|
+
getTabVisibility({ structureActions: { create_link: {} } }),
|
|
70
74
|
).toMatchObject({
|
|
71
75
|
links: true,
|
|
72
76
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
78
|
-
expect(
|
|
79
|
-
getTabVisibility({
|
|
80
|
-
structureLinks: [{ resource_type: "foo" }],
|
|
81
|
-
structureActions: { create_link: {} },
|
|
82
|
-
})
|
|
83
|
-
).toMatchObject({
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("should include links tab if structure has links_count > 0", () => {
|
|
80
|
+
expect(getTabVisibility({ structure: { links_count: 2 } })).toMatchObject({
|
|
84
81
|
links: true,
|
|
85
82
|
});
|
|
86
83
|
});
|
|
87
84
|
|
|
85
|
+
it("should not include links tab if no permission and no links", () => {
|
|
86
|
+
expect(getTabVisibility({})).toMatchObject({ links: false });
|
|
87
|
+
expect(getTabVisibility({ structure: {} })).toMatchObject({ links: false });
|
|
88
|
+
expect(getTabVisibility({ structure: { links_count: 0 } })).toMatchObject({
|
|
89
|
+
links: false,
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
88
93
|
it("should include notes if template_id is in structure_note", () => {
|
|
89
94
|
const structure = { type: "foo", structure_type: { template_id: 1 } };
|
|
90
95
|
const templates = [{ name: "foo", id: 1 }];
|
|
@@ -95,7 +100,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
95
100
|
getTabVisibility({
|
|
96
101
|
structure,
|
|
97
102
|
templates,
|
|
98
|
-
})
|
|
103
|
+
}),
|
|
99
104
|
).toMatchObject({
|
|
100
105
|
notes: true,
|
|
101
106
|
});
|
|
@@ -114,7 +119,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
114
119
|
templates,
|
|
115
120
|
structureTypes,
|
|
116
121
|
structureTypesLoading: false,
|
|
117
|
-
})
|
|
122
|
+
}),
|
|
118
123
|
).toMatchObject({
|
|
119
124
|
notes: false,
|
|
120
125
|
});
|
|
@@ -122,12 +127,16 @@ describe("selectors: getTabVisibility", () => {
|
|
|
122
127
|
|
|
123
128
|
it("should include versions iff structureVersions is not empty", () => {
|
|
124
129
|
expect(getTabVisibility({})).toMatchObject({ versions: false });
|
|
125
|
-
expect(getTabVisibility({ structure: { version_count: 0 } })).toMatchObject(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
})
|
|
130
|
+
expect(getTabVisibility({ structure: { version_count: 0 } })).toMatchObject(
|
|
131
|
+
{
|
|
132
|
+
versions: false,
|
|
133
|
+
},
|
|
134
|
+
);
|
|
135
|
+
expect(getTabVisibility({ structure: { version_count: 1 } })).toMatchObject(
|
|
136
|
+
{
|
|
137
|
+
versions: true,
|
|
138
|
+
},
|
|
139
|
+
);
|
|
131
140
|
});
|
|
132
141
|
|
|
133
142
|
it("should not include events iff structureVersion is empty", () => {
|
|
@@ -154,7 +163,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
154
163
|
|
|
155
164
|
it("should include rules iff structure.implementation_count is greater than 0 with permissions", () => {
|
|
156
165
|
expect(
|
|
157
|
-
getTabVisibility({ userPermissions: { view_quality: true } })
|
|
166
|
+
getTabVisibility({ userPermissions: { view_quality: true } }),
|
|
158
167
|
).toMatchObject({
|
|
159
168
|
rules: false,
|
|
160
169
|
});
|
|
@@ -162,7 +171,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
162
171
|
getTabVisibility({
|
|
163
172
|
structure: { implementation_count: 0 },
|
|
164
173
|
userPermissions: { view_quality: true },
|
|
165
|
-
})
|
|
174
|
+
}),
|
|
166
175
|
).toMatchObject({
|
|
167
176
|
rules: false,
|
|
168
177
|
});
|
|
@@ -170,7 +179,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
170
179
|
getTabVisibility({
|
|
171
180
|
structure: { implementation_count: 123 },
|
|
172
181
|
userPermissions: { view_quality: true },
|
|
173
|
-
})
|
|
182
|
+
}),
|
|
174
183
|
).toMatchObject({
|
|
175
184
|
rules: true,
|
|
176
185
|
});
|
|
@@ -178,7 +187,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
178
187
|
|
|
179
188
|
it("should not include rules iff structure.implementation_count is greater than 0 without permissions", () => {
|
|
180
189
|
expect(
|
|
181
|
-
getTabVisibility({ userPermissions: { view_quality: false } })
|
|
190
|
+
getTabVisibility({ userPermissions: { view_quality: false } }),
|
|
182
191
|
).toMatchObject({
|
|
183
192
|
rules: false,
|
|
184
193
|
});
|
|
@@ -186,7 +195,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
186
195
|
getTabVisibility({
|
|
187
196
|
structure: { implementation_count: 0 },
|
|
188
197
|
userPermissions: { view_quality: false },
|
|
189
|
-
})
|
|
198
|
+
}),
|
|
190
199
|
).toMatchObject({
|
|
191
200
|
rules: false,
|
|
192
201
|
});
|
|
@@ -194,7 +203,7 @@ describe("selectors: getTabVisibility", () => {
|
|
|
194
203
|
getTabVisibility({
|
|
195
204
|
structure: { implementation_count: 123 },
|
|
196
205
|
userPermissions: { view_quality: false },
|
|
197
|
-
})
|
|
206
|
+
}),
|
|
198
207
|
).toMatchObject({
|
|
199
208
|
rules: false,
|
|
200
209
|
});
|
|
@@ -235,7 +244,9 @@ describe("selectors: getTabVisibility", () => {
|
|
|
235
244
|
it("should include roles if manage_structure_acl_entry action is present in structureActions", () => {
|
|
236
245
|
expect(getTabVisibility({})).toMatchObject({ roles: false });
|
|
237
246
|
expect(
|
|
238
|
-
getTabVisibility({
|
|
247
|
+
getTabVisibility({
|
|
248
|
+
structureActions: { manage_structure_acl_entry: {} },
|
|
249
|
+
}),
|
|
239
250
|
).toMatchObject({ roles: true });
|
|
240
251
|
});
|
|
241
252
|
});
|
|
@@ -6,7 +6,7 @@ describe("selectors: getUploadAlertMessage", () => {
|
|
|
6
6
|
expect(result.anchor).toBeDefined();
|
|
7
7
|
expect(result.anchor.reference).toBeDefined();
|
|
8
8
|
expect(result.header).toBe(
|
|
9
|
-
"structures.bulkUpdateStructures.success.accepted.header"
|
|
9
|
+
"structures.bulkUpdateStructures.success.accepted.header",
|
|
10
10
|
);
|
|
11
11
|
});
|
|
12
12
|
|
|
@@ -29,10 +29,10 @@ describe("selectors: getUploadAlertMessage", () => {
|
|
|
29
29
|
const result = getUploadAlertMessage({ status: 200, data });
|
|
30
30
|
expect(result.messages).toHaveLength(2);
|
|
31
31
|
expect(result.messages[0].id).toBe(
|
|
32
|
-
"structures.bulkUpdateStructures.failed.note.content_unchanged"
|
|
32
|
+
"structures.bulkUpdateStructures.failed.note.content_unchanged",
|
|
33
33
|
);
|
|
34
34
|
expect(result.messages[1].id).toBe(
|
|
35
|
-
"structures.bulkUpdateStructures.failed.note.invalid_transition"
|
|
35
|
+
"structures.bulkUpdateStructures.failed.note.invalid_transition",
|
|
36
36
|
);
|
|
37
37
|
expect(result.fields.count_errors).toBe(2);
|
|
38
38
|
});
|
|
@@ -50,7 +50,7 @@ describe("selectors: getUploadAlertMessage", () => {
|
|
|
50
50
|
};
|
|
51
51
|
const result = getUploadAlertMessage({ status: 200, data });
|
|
52
52
|
expect(result.messages[0].id).toBe(
|
|
53
|
-
"structures.bulkUpdateStructures.failed.note.only_draft_are_editable"
|
|
53
|
+
"structures.bulkUpdateStructures.failed.note.only_draft_are_editable",
|
|
54
54
|
);
|
|
55
55
|
});
|
|
56
56
|
});
|
|
@@ -65,12 +65,24 @@ export const defaultTab = (tabVisibility, tabsOrder = [], customTabs = []) => {
|
|
|
65
65
|
return _.find((tab) => isTabVisible(tab))(order);
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
const getCustomTabs = (customTabs) =>
|
|
68
|
+
const getCustomTabs = (customTabs) =>
|
|
69
|
+
_.map((tab) => [_.eq(tab.route), _.constant(tab.name)])(customTabs);
|
|
69
70
|
|
|
70
|
-
export const getActiveTab = ({
|
|
71
|
+
export const getActiveTab = ({
|
|
72
|
+
tabVisibility,
|
|
73
|
+
path,
|
|
74
|
+
structureTabsOrder,
|
|
75
|
+
customTabs,
|
|
76
|
+
}) => {
|
|
71
77
|
return _.cond([
|
|
72
|
-
[
|
|
73
|
-
|
|
78
|
+
[
|
|
79
|
+
_.eq(STRUCTURE),
|
|
80
|
+
_.constant(defaultTab(tabVisibility, structureTabsOrder, customTabs)),
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
_.eq(STRUCTURE_VERSION),
|
|
84
|
+
_.constant(defaultTab(tabVisibility, structureTabsOrder, customTabs)),
|
|
85
|
+
],
|
|
74
86
|
[_.eq(STRUCTURE_VERSION_FIELDS), _.constant("fields")],
|
|
75
87
|
[_.eq(STRUCTURE_FIELDS), _.constant("fields")],
|
|
76
88
|
[_.eq(STRUCTURE_CHILDREN), _.constant("children")],
|
|
@@ -81,5 +81,5 @@ export const defaultBusinessConceptsLinksToStructuresColumns = [
|
|
|
81
81
|
|
|
82
82
|
export const getBusinessConceptsLinksToStructuresColumns = createSelector(
|
|
83
83
|
_.prop("businessConceptsLinksToStructuresColumns"),
|
|
84
|
-
_.defaultTo(defaultBusinessConceptsLinksToStructuresColumns)
|
|
84
|
+
_.defaultTo(defaultBusinessConceptsLinksToStructuresColumns),
|
|
85
85
|
);
|