@truedat/dd 8.7.0 → 8.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/package.json +3 -3
  2. package/src/components/BucketView.js +2 -2
  3. package/src/components/CatalogCustomViewCards.js +1 -1
  4. package/src/components/DictionaryRoutes.js +3 -3
  5. package/src/components/FilteredNav.js +3 -3
  6. package/src/components/Grant.js +4 -4
  7. package/src/components/GrantApprovalRule.js +1 -1
  8. package/src/components/GrantApprovalRuleConditions.js +1 -1
  9. package/src/components/GrantApprovalRuleDeleteButton.js +1 -1
  10. package/src/components/GrantApprovalRuleEdit.js +1 -1
  11. package/src/components/GrantApprovalRuleForm.js +6 -6
  12. package/src/components/GrantApprovalRules.js +1 -1
  13. package/src/components/GrantFilters.js +1 -1
  14. package/src/components/GrantFiltersLoader.js +1 -1
  15. package/src/components/GrantRemovalDirectButton.js +1 -1
  16. package/src/components/GrantRemovalWorkflow.js +2 -2
  17. package/src/components/GrantRemovalWorkflowDropdown.js +1 -1
  18. package/src/components/GrantRequest.js +3 -3
  19. package/src/components/GrantRequestApprovalForm.js +2 -2
  20. package/src/components/GrantRequestApprovalResults.js +1 -1
  21. package/src/components/GrantRequestBulkActions.js +2 -2
  22. package/src/components/GrantRequestBulkRoleSelector.js +1 -1
  23. package/src/components/GrantRequestCartResult.js +13 -3
  24. package/src/components/GrantRequestSummary.js +1 -1
  25. package/src/components/GrantRequests.js +2 -2
  26. package/src/components/GrantRequestsSearchResults.js +7 -7
  27. package/src/components/GrantRoutes.js +3 -9
  28. package/src/components/Grants.js +14 -4
  29. package/src/components/GrantsDownloadButton.js +1 -1
  30. package/src/components/GrantsLabelResults.js +2 -5
  31. package/src/components/GrantsLoader.js +2 -2
  32. package/src/components/GrantsTable.js +3 -8
  33. package/src/components/GraphLoader.js +1 -1
  34. package/src/components/LineageContextMenu.js +1 -1
  35. package/src/components/LineageDownloadButton.js +2 -2
  36. package/src/components/LineageEventsTable.js +1 -1
  37. package/src/components/LineageGraph.js +7 -6
  38. package/src/components/LineageGroup.js +2 -7
  39. package/src/components/LinkLabelsSelector.js +1 -1
  40. package/src/components/MyGrantRequests.js +1 -1
  41. package/src/components/ProfileGroup.js +2 -2
  42. package/src/components/ReferenceDatasetActions.js +1 -1
  43. package/src/components/ReferenceDatasetCreate.js +1 -1
  44. package/src/components/ReferenceDatasetDetail.js +1 -1
  45. package/src/components/ReferenceDatasetFieldSelector.js +5 -5
  46. package/src/components/ReferenceDatasetForm.js +3 -3
  47. package/src/components/ReferenceDatasetSelectorInputField.js +3 -3
  48. package/src/components/ReferenceDatasetsTable.js +1 -1
  49. package/src/components/StructureChildrenRelations.js +1 -1
  50. package/src/components/StructureConfidentialButton.js +1 -1
  51. package/src/components/StructureCrumbs.js +3 -3
  52. package/src/components/StructureDeleteButton.js +1 -1
  53. package/src/components/StructureFields.js +3 -3
  54. package/src/components/StructureFieldsDropdown.js +10 -10
  55. package/src/components/StructureGrantCart.js +3 -3
  56. package/src/components/StructureGrantCartCheckout.js +9 -4
  57. package/src/components/StructureGrantCartInformation.js +2 -7
  58. package/src/components/StructureGrantListButton.js +5 -5
  59. package/src/components/StructureGrantRequestAddCart.js +1 -1
  60. package/src/components/StructureGrantSummaryButton.js +2 -2
  61. package/src/components/StructureGrants.js +2 -2
  62. package/src/components/StructureItem.js +4 -4
  63. package/src/components/StructureItemRoot.js +1 -1
  64. package/src/components/StructureLoader.js +1 -2
  65. package/src/components/StructureMetadata.js +23 -17
  66. package/src/components/StructureNav.js +1 -1
  67. package/src/components/StructureNavClassified.js +1 -1
  68. package/src/components/StructureNoteActions.js +1 -1
  69. package/src/components/StructureNotes.js +3 -3
  70. package/src/components/StructureNotesEdit.js +4 -4
  71. package/src/components/StructureProfileButton.js +1 -1
  72. package/src/components/StructureProperties.js +1 -1
  73. package/src/components/StructureSelector.js +3 -3
  74. package/src/components/StructureSelectorInputFieldJoin.js +2 -2
  75. package/src/components/StructureStructureForm.js +2 -2
  76. package/src/components/StructureStructureLinks.js +5 -5
  77. package/src/components/StructureTabPane.js +5 -5
  78. package/src/components/StructureTabPaneRoutes.js +92 -80
  79. package/src/components/StructureTabRoutes.js +30 -8
  80. package/src/components/StructureTabs.js +17 -16
  81. package/src/components/StructureTagForm.js +2 -2
  82. package/src/components/StructureTags.js +1 -1
  83. package/src/components/StructureTypeForm.js +3 -3
  84. package/src/components/StructureTypeLoader.js +1 -1
  85. package/src/components/StructureTypesLoader.js +1 -1
  86. package/src/components/StructureTypesRoutes.js +1 -1
  87. package/src/components/StructureVersions.js +17 -16
  88. package/src/components/StructureView.js +1 -1
  89. package/src/components/StructuresBulkUpdate.js +4 -4
  90. package/src/components/StructuresDomainsUploadOption.js +1 -1
  91. package/src/components/StructuresDownloadOption.js +1 -1
  92. package/src/components/StructuresGrantRequestView.js +1 -1
  93. package/src/components/StructuresLoader.js +1 -1
  94. package/src/components/StructuresRoutes.js +2 -2
  95. package/src/components/StructuresTable.js +4 -4
  96. package/src/components/StructuresUpdateOption.js +3 -3
  97. package/src/components/StructuresUploadEventsTable.js +9 -9
  98. package/src/components/StructuresUploadOption.js +14 -14
  99. package/src/components/StructuresView.js +1 -1
  100. package/src/components/SystemCards.js +7 -7
  101. package/src/components/SystemForm.js +2 -2
  102. package/src/components/SystemLoader.js +1 -1
  103. package/src/components/SystemStructures.js +2 -2
  104. package/src/components/SystemView.js +3 -3
  105. package/src/components/Task.js +6 -6
  106. package/src/components/Tasks.js +1 -1
  107. package/src/components/ValueConditionStructure.js +2 -2
  108. package/src/components/__tests__/BucketView.spec.js +2 -2
  109. package/src/components/__tests__/CatalogCustomViewCards.spec.js +1 -1
  110. package/src/components/__tests__/CatalogViewConfigForm.spec.js +2 -2
  111. package/src/components/__tests__/CatalogViewConfigs.spec.js +2 -2
  112. package/src/components/__tests__/DictionaryRoutes.spec.js +7 -3
  113. package/src/components/__tests__/EditDomainForm.spec.js +3 -3
  114. package/src/components/__tests__/FilteredNav.spec.js +4 -4
  115. package/src/components/__tests__/Grant.spec.js +4 -4
  116. package/src/components/__tests__/GrantApprovalRuleConditions.spec.js +6 -6
  117. package/src/components/__tests__/GrantApprovalRuleDeleteButton.spec.js +2 -2
  118. package/src/components/__tests__/GrantApprovalRuleForm.spec.js +9 -7
  119. package/src/components/__tests__/GrantApprovalRules.spec.js +3 -3
  120. package/src/components/__tests__/GrantRemoval.spec.js +4 -4
  121. package/src/components/__tests__/GrantRemovalDirectButton.spec.js +8 -8
  122. package/src/components/__tests__/GrantRemovalWorkflow.spec.js +8 -8
  123. package/src/components/__tests__/GrantRequest.spec.js +1 -1
  124. package/src/components/__tests__/GrantRequestApprovalForm.spec.js +6 -6
  125. package/src/components/__tests__/GrantRequestApprovalPopup.spec.js +1 -1
  126. package/src/components/__tests__/GrantRequestBulkActions.spec.js +8 -8
  127. package/src/components/__tests__/GrantRequestBulkApprovalForm.spec.js +2 -2
  128. package/src/components/__tests__/GrantRequestBulkRoleSelector.spec.js +2 -2
  129. package/src/components/__tests__/GrantRequestCartResult.spec.js +13 -3
  130. package/src/components/__tests__/GrantRequestHeader.spec.js +2 -2
  131. package/src/components/__tests__/GrantRequestRow.spec.js +4 -4
  132. package/src/components/__tests__/GrantRequestSummary.spec.js +1 -1
  133. package/src/components/__tests__/GrantRequests.spec.js +2 -2
  134. package/src/components/__tests__/GrantRequestsLabelResults.spec.js +3 -3
  135. package/src/components/__tests__/GrantRequestsSearchResults.spec.js +2 -2
  136. package/src/components/__tests__/GrantRequestsTable.spec.js +1 -1
  137. package/src/components/__tests__/GrantRoutes.spec.js +16 -16
  138. package/src/components/__tests__/GrantsDownloadButton.spec.js +68 -40
  139. package/src/components/__tests__/GrantsLabelResults.spec.js +2 -2
  140. package/src/components/__tests__/GrantsLoader.spec.js +1 -1
  141. package/src/components/__tests__/GrantsTable.spec.js +4 -4
  142. package/src/components/__tests__/LineageForm.spec.js +5 -5
  143. package/src/components/__tests__/LineageGroup.spec.js +6 -6
  144. package/src/components/__tests__/LineageResource.spec.js +5 -5
  145. package/src/components/__tests__/LineageRoutes.spec.js +6 -6
  146. package/src/components/__tests__/PendingStructureNoteRow.spec.js +4 -4
  147. package/src/components/__tests__/PendingStructureNotes.spec.js +1 -1
  148. package/src/components/__tests__/PendingStructureNotesLabelResults.spec.js +1 -1
  149. package/src/components/__tests__/PendingStructureNotesPagination.spec.js +1 -1
  150. package/src/components/__tests__/PendingStructureNotesTable.spec.js +2 -2
  151. package/src/components/__tests__/ProfileExecution.spec.js +2 -2
  152. package/src/components/__tests__/ProfileGroup.spec.js +2 -2
  153. package/src/components/__tests__/ReferenceDataset.spec.js +7 -5
  154. package/src/components/__tests__/ReferenceDatasetCreate.spec.js +1 -1
  155. package/src/components/__tests__/ReferenceDatasetDetail.spec.js +1 -1
  156. package/src/components/__tests__/ReferenceDatasetFieldSelector.spec.js +9 -9
  157. package/src/components/__tests__/ReferenceDatasetForm.spec.js +9 -7
  158. package/src/components/__tests__/ReferenceDatasetRoutes.spec.js +1 -1
  159. package/src/components/__tests__/StructureFieldRow.spec.js +3 -3
  160. package/src/components/__tests__/StructureFieldsDropdown.spec.js +5 -5
  161. package/src/components/__tests__/StructureGrantCartCheckout.spec.js +2 -2
  162. package/src/components/__tests__/StructureGrantCartInformation.spec.js +1 -1
  163. package/src/components/__tests__/StructureGrantCartUserSelector.spec.js +4 -4
  164. package/src/components/__tests__/StructureGrantDropdown.spec.js +3 -3
  165. package/src/components/__tests__/StructureGrantListButton.spec.js +4 -4
  166. package/src/components/__tests__/StructureGrantSummaryButton.spec.js +5 -5
  167. package/src/components/__tests__/StructureItem.spec.js +3 -3
  168. package/src/components/__tests__/StructureMetadata.spec.js +2 -4
  169. package/src/components/__tests__/StructureNavClassified.spec.js +1 -1
  170. package/src/components/__tests__/StructureNoteActions.spec.js +17 -15
  171. package/src/components/__tests__/StructureNoteLink.spec.js +8 -9
  172. package/src/components/__tests__/StructureNotes.spec.js +3 -3
  173. package/src/components/__tests__/StructureNotesDownloadButton.spec.js +15 -15
  174. package/src/components/__tests__/StructureNotesEdit.spec.js +1 -1
  175. package/src/components/__tests__/StructureRelationRow.spec.js +2 -2
  176. package/src/components/__tests__/StructureRelations.spec.js +2 -2
  177. package/src/components/__tests__/StructureRow.spec.js +2 -2
  178. package/src/components/__tests__/StructureSelectorInputField.spec.js +2 -2
  179. package/src/components/__tests__/StructureSelectorInputFieldJoin.spec.js +1 -1
  180. package/src/components/__tests__/StructureStructureForm.spec.js +1 -1
  181. package/src/components/__tests__/StructureStructureLinks.spec.js +15 -15
  182. package/src/components/__tests__/StructureSummary.spec.js +1 -1
  183. package/src/components/__tests__/StructureTabPane.spec.js +10 -12
  184. package/src/components/__tests__/StructureTabRoutes.spec.js +1 -1
  185. package/src/components/__tests__/StructureTabs.spec.js +24 -8
  186. package/src/components/__tests__/StructureTag.spec.js +11 -11
  187. package/src/components/__tests__/StructureTagForm.spec.js +17 -17
  188. package/src/components/__tests__/StructureTypesRoutes.spec.js +4 -4
  189. package/src/components/__tests__/StructureVersions.spec.js +0 -1
  190. package/src/components/__tests__/StructuresBulkUpdate.spec.js +3 -3
  191. package/src/components/__tests__/StructuresDownloadOption.spec.js +3 -3
  192. package/src/components/__tests__/StructuresEditableDownloadOption.spec.js +2 -2
  193. package/src/components/__tests__/StructuresGrantRequestView.spec.js +2 -2
  194. package/src/components/__tests__/StructuresLabelResults.spec.js +1 -1
  195. package/src/components/__tests__/StructuresLoader.spec.js +1 -1
  196. package/src/components/__tests__/StructuresOptions.spec.js +15 -9
  197. package/src/components/__tests__/StructuresRoutes.spec.js +1 -1
  198. package/src/components/__tests__/StructuresSearchResults.spec.js +2 -2
  199. package/src/components/__tests__/StructuresTable.spec.js +5 -5
  200. package/src/components/__tests__/StructuresUpdateOption.spec.js +2 -2
  201. package/src/components/__tests__/StructuresUploadOption.spec.js +2 -2
  202. package/src/components/__tests__/StructuresView.spec.js +6 -6
  203. package/src/components/__tests__/SystemCards.spec.js +2 -2
  204. package/src/components/__tests__/SystemFilteredNav.spec.js +1 -1
  205. package/src/components/__tests__/SystemStructuresLoader.spec.js +1 -1
  206. package/src/components/__tests__/SystemsRoutes.spec.js +1 -1
  207. package/src/components/__tests__/TagForm.spec.js +7 -5
  208. package/src/components/__tests__/TagsRoutes.spec.js +1 -1
  209. package/src/components/__tests__/Tasks.spec.js +9 -9
  210. package/src/components/__tests__/TasksRoutes.spec.js +1 -1
  211. package/src/components/__tests__/ValueConditionStructure.spec.js +2 -2
  212. package/src/hooks/useBucketPaths.js +1 -1
  213. package/src/hooks/useBucketStructures.js +1 -1
  214. package/src/hooks/useCustomTabs.js +1 -1
  215. package/src/hooks/useGrant.js +7 -3
  216. package/src/hooks/useGrantRequest.js +4 -4
  217. package/src/hooks/useStructures.js +4 -5
  218. package/src/hooks/useTemplatesByIds.js +10 -5
  219. package/src/messages/en.js +1 -2
  220. package/src/messages/es.js +1 -2
  221. package/src/messages/index.js +1 -1
  222. package/src/reducers/__tests__/bulkUpdateStructuresLoading.spec.js +5 -5
  223. package/src/reducers/__tests__/creatingGrantRequestApproval.spec.js +3 -3
  224. package/src/reducers/__tests__/csvGraphDownloading.spec.js +4 -4
  225. package/src/reducers/__tests__/ddMessage.spec.js +3 -3
  226. package/src/reducers/__tests__/grantFilters.spec.js +1 -1
  227. package/src/reducers/__tests__/grantQuery.spec.js +6 -6
  228. package/src/reducers/__tests__/grantRequests.spec.js +2 -2
  229. package/src/reducers/__tests__/grantRequestsCart.spec.js +31 -31
  230. package/src/reducers/__tests__/grantRequestsLoading.spec.js +3 -3
  231. package/src/reducers/__tests__/grantRequestsQuery.spec.js +2 -2
  232. package/src/reducers/__tests__/grants.spec.js +2 -2
  233. package/src/reducers/__tests__/graph.spec.js +1 -1
  234. package/src/reducers/__tests__/graphLoading.spec.js +6 -4
  235. package/src/reducers/__tests__/graphRedirect.spec.js +11 -7
  236. package/src/reducers/__tests__/lineageEventsLoading.spec.js +2 -2
  237. package/src/reducers/__tests__/lineageQuery.spec.js +6 -6
  238. package/src/reducers/__tests__/nodes.spec.js +1 -1
  239. package/src/reducers/__tests__/nodesLoading.spec.js +2 -2
  240. package/src/reducers/__tests__/profileExecution.spec.js +6 -6
  241. package/src/reducers/__tests__/profileExecutionLoading.spec.js +5 -3
  242. package/src/reducers/__tests__/profileGroup.spec.js +12 -12
  243. package/src/reducers/__tests__/profileGroupLoading.spec.js +6 -6
  244. package/src/reducers/__tests__/referenceDatasetSaving.spec.js +8 -4
  245. package/src/reducers/__tests__/selectedGroups.spec.js +2 -2
  246. package/src/reducers/__tests__/selectedNode.spec.js +5 -5
  247. package/src/reducers/__tests__/selectedResources.spec.js +5 -5
  248. package/src/reducers/__tests__/selectedUserSearchFilter.spec.js +3 -3
  249. package/src/reducers/__tests__/structure.spec.js +2 -2
  250. package/src/reducers/__tests__/structureActions.spec.js +4 -4
  251. package/src/reducers/__tests__/structureAncestry.spec.js +6 -6
  252. package/src/reducers/__tests__/structureChildren.spec.js +2 -2
  253. package/src/reducers/__tests__/structureFields.spec.js +5 -5
  254. package/src/reducers/__tests__/structureImpactGraph.spec.js +6 -6
  255. package/src/reducers/__tests__/structureImpactId.spec.js +7 -7
  256. package/src/reducers/__tests__/structureLineageGraph.spec.js +7 -7
  257. package/src/reducers/__tests__/structureLineageId.spec.js +7 -7
  258. package/src/reducers/__tests__/structureLinks.spec.js +6 -6
  259. package/src/reducers/__tests__/structureLoading.spec.js +2 -2
  260. package/src/reducers/__tests__/structureNotes.spec.js +1 -1
  261. package/src/reducers/__tests__/structureParents.spec.js +2 -2
  262. package/src/reducers/__tests__/structureProfile.spec.js +9 -6
  263. package/src/reducers/__tests__/structureQuery.spec.js +4 -4
  264. package/src/reducers/__tests__/structureRedirect.spec.js +9 -9
  265. package/src/reducers/__tests__/structureRelations.spec.js +4 -4
  266. package/src/reducers/__tests__/structureSiblings.spec.js +2 -2
  267. package/src/reducers/__tests__/structureSystem.spec.js +3 -3
  268. package/src/reducers/__tests__/structureTagSaving.spec.js +2 -2
  269. package/src/reducers/__tests__/structureType.spec.js +2 -2
  270. package/src/reducers/__tests__/structureTypeLoading.spec.js +6 -6
  271. package/src/reducers/__tests__/structureVersion.spec.js +4 -4
  272. package/src/reducers/__tests__/structureVersions.spec.js +9 -5
  273. package/src/reducers/__tests__/structures.spec.js +3 -3
  274. package/src/reducers/__tests__/structuresAliasNameMode.spec.js +5 -5
  275. package/src/reducers/__tests__/structuresUploadEvents.spec.js +1 -1
  276. package/src/reducers/__tests__/structuresUploadEventsLoading.spec.js +4 -4
  277. package/src/reducers/__tests__/system.spec.js +2 -2
  278. package/src/reducers/__tests__/systemId.spec.js +3 -3
  279. package/src/reducers/__tests__/systemStructures.spec.js +3 -3
  280. package/src/reducers/__tests__/systemStructuresLoading.spec.js +2 -2
  281. package/src/reducers/ddMessage.js +1 -1
  282. package/src/reducers/grantFilters.js +1 -1
  283. package/src/reducers/grantRequestsCart.js +16 -13
  284. package/src/reducers/grantSelectedFilter.js +1 -1
  285. package/src/reducers/profileGroup.js +1 -1
  286. package/src/reducers/selectedResources.js +1 -1
  287. package/src/reducers/selectedUserSearchFilter.js +1 -1
  288. package/src/reducers/structure.js +1 -1
  289. package/src/reducers/structureImpactGraph.js +1 -1
  290. package/src/reducers/structureLineageGraph.js +1 -1
  291. package/src/reducers/structureRedirect.js +1 -1
  292. package/src/reducers/structuresAliasNameMode.js +1 -1
  293. package/src/reducers/structuresUploadEvents.js +1 -1
  294. package/src/reducers/systemId.js +1 -1
  295. package/src/reducers/userSearchFilters.js +1 -1
  296. package/src/routines.js +31 -32
  297. package/src/sagas/__tests__/createGrantApprovalRule.spec.js +1 -1
  298. package/src/sagas/__tests__/createGrantRequestApproval.spec.js +1 -1
  299. package/src/sagas/__tests__/createGrantRequestStatus.spec.js +1 -1
  300. package/src/sagas/__tests__/createGraph.spec.js +5 -5
  301. package/src/sagas/__tests__/createProfileGroup.spec.js +10 -10
  302. package/src/sagas/__tests__/deleteGrantApprovalRule.spec.js +1 -1
  303. package/src/sagas/__tests__/deleteStructureStructureLink.spec.js +1 -1
  304. package/src/sagas/__tests__/doStructureNoteAction.spec.js +6 -6
  305. package/src/sagas/__tests__/downloadCsvGraph.spec.js +2 -2
  306. package/src/sagas/__tests__/fetchGrantFilters.spec.js +1 -1
  307. package/src/sagas/__tests__/fetchGrantRequestsFilters.spec.js +3 -3
  308. package/src/sagas/__tests__/fetchProfileExecution.spec.js +3 -3
  309. package/src/sagas/__tests__/fetchProfileGroup.spec.js +6 -6
  310. package/src/sagas/__tests__/fetchStructureNotes.spec.js +3 -3
  311. package/src/sagas/__tests__/fetchStructures.spec.js +2 -2
  312. package/src/sagas/__tests__/fetchStructuresUploadEvents.spec.js +1 -1
  313. package/src/sagas/__tests__/fetchSystemStructures.spec.js +4 -4
  314. package/src/sagas/__tests__/requestGrantRemoval.spec.js +2 -2
  315. package/src/sagas/__tests__/updateGrantApprovalRule.spec.js +1 -1
  316. package/src/sagas/__tests__/updateStructure.spec.js +1 -1
  317. package/src/sagas/__tests__/uploadStructuresDomains.spec.js +3 -3
  318. package/src/sagas/bulkUpdateStructures.js +1 -1
  319. package/src/sagas/createGrantApprovalRule.js +1 -1
  320. package/src/sagas/createGrantRequestApproval.js +1 -1
  321. package/src/sagas/createGrantRequestStatus.js +2 -2
  322. package/src/sagas/createGraph.js +3 -3
  323. package/src/sagas/createProfileGroup.js +1 -1
  324. package/src/sagas/createSystem.js +2 -2
  325. package/src/sagas/deleteCatalogViewConfig.js +1 -1
  326. package/src/sagas/deleteGrantApprovalRule.js +1 -1
  327. package/src/sagas/deleteStructureStructureLink.js +1 -1
  328. package/src/sagas/doStructureNoteAction.js +9 -4
  329. package/src/sagas/downloadCsvGraph.js +2 -2
  330. package/src/sagas/downloadReferenceDataset.js +1 -1
  331. package/src/sagas/fetchGrantRequestsFilters.js +1 -1
  332. package/src/sagas/fetchGraph.js +1 -1
  333. package/src/sagas/fetchStructuresUploadEvents.js +1 -1
  334. package/src/sagas/graph/polling.js +4 -4
  335. package/src/sagas/linkStructureToStructure.js +2 -2
  336. package/src/sagas/requestGrantRemoval.js +1 -1
  337. package/src/sagas/updateGrantApprovalRule.js +1 -1
  338. package/src/sagas/updateStructure.js +1 -1
  339. package/src/sagas/uploadStructuresDomains.js +2 -2
  340. package/src/sagas/upsertCatalogViewConfig.js +1 -1
  341. package/src/selectors/__tests__/getActiveTab.spec.js +99 -28
  342. package/src/selectors/__tests__/getBusinessConceptsLinksToStructuresColumnsSelector.spec.js +1 -1
  343. package/src/selectors/__tests__/getGrantRequestsColumns.spec.js +2 -2
  344. package/src/selectors/__tests__/getGrantRequestsSearchColumns.spec.js +1 -1
  345. package/src/selectors/__tests__/getGrantsColumns.spec.js +4 -4
  346. package/src/selectors/__tests__/getParsedEvents.spec.js +1 -1
  347. package/src/selectors/__tests__/getSortedRelations.spec.js +5 -5
  348. package/src/selectors/__tests__/getStructureFieldColumns.spec.js +1 -1
  349. package/src/selectors/__tests__/getStructureRelations.spec.js +1 -1
  350. package/src/selectors/__tests__/getTabVisibility.spec.js +38 -28
  351. package/src/selectors/__tests__/messages.spec.js +4 -4
  352. package/src/selectors/getActiveTab.js +16 -4
  353. package/src/selectors/getBusinessConceptsLinksToStructuresColumnsSelector.js +1 -1
  354. package/src/selectors/getGrantAvailableFilters.js +2 -2
  355. package/src/selectors/getGrantRequestTemplate.js +1 -1
  356. package/src/selectors/getGrantRequests.js +2 -2
  357. package/src/selectors/getGrantRequestsColumns.js +6 -6
  358. package/src/selectors/getGrantRequestsQuery.js +1 -1
  359. package/src/selectors/getGrantRequestsSearchColumns.js +2 -2
  360. package/src/selectors/getGrantSelectedFilters.js +1 -1
  361. package/src/selectors/getGrantsColumns.js +5 -5
  362. package/src/selectors/getLineageLevels.js +1 -1
  363. package/src/selectors/getLinkedImplementationsToStructuresColumns.js +1 -1
  364. package/src/selectors/getRelationSortingCriteria.js +1 -1
  365. package/src/selectors/getSortedRelations.js +5 -5
  366. package/src/selectors/getSortedStructureNotes.js +4 -4
  367. package/src/selectors/getStructureDeletedAt.js +2 -2
  368. package/src/selectors/getStructureFieldColumns.js +1 -1
  369. package/src/selectors/getStructureLinks.js +1 -1
  370. package/src/selectors/getStructureParent.js +2 -2
  371. package/src/selectors/getStructureProperties.js +1 -1
  372. package/src/selectors/getStructureRelations.js +4 -4
  373. package/src/selectors/getStructureSortingCriteria.js +1 -1
  374. package/src/selectors/getStructureUpdatedAt.js +1 -1
  375. package/src/selectors/getStructuresFields.js +5 -5
  376. package/src/selectors/getStructuresUploadEventColumns.js +1 -1
  377. package/src/selectors/getSystem.js +1 -1
  378. package/src/selectors/getSystemTemplate.js +1 -1
  379. package/src/selectors/getTabVisibility.js +2 -2
  380. package/src/selectors/groupOptionsSelector.js +2 -2
  381. package/src/selectors/leafClassesSelector.js +1 -1
  382. package/src/selectors/messages.js +1 -1
  383. package/src/selectors/metadataViewsSelector.js +6 -6
  384. package/src/selectors/resourceOptionsSelector.js +2 -2
  385. package/src/selectors/structureColumnsSelector.js +2 -2
  386. package/src/selectors/structureNotesColumnsSelector.js +1 -1
  387. package/src/selectors/templateNamesSelector.js +1 -1
  388. 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("fields");
148
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_CHILDREN })).toBe("children");
149
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_NOTES })).toBe("notes");
150
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_NOTES_EDIT })).toBe("notes");
151
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_PARENTS })).toBe("parents");
152
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_PROFILE })).toBe("profile");
153
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_RULES })).toBe("rules");
154
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_MEMBERS })).toBe("roles");
155
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_LINKS })).toBe("links");
156
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_LINKS_NEW })).toBe("links");
157
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_VERSIONS })).toBe("versions");
158
- expect(getActiveTab({ tabVisibility, path: STRUCTURE_VERSION_VERSIONS })).toBe(
159
- "versions"
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(getActiveTab({ tabVisibility, path: customPath, customTabs: [{ name: "custom", route: customPath }] })).toBe("custom");
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(getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder })).toBe("links");
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(getActiveTab({ tabVisibility, path: STRUCTURE_VERSION, structureTabsOrder })).toBe("notes");
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(getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder })).toBe("fields");
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(getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder })).toBe("fields");
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(getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder })).toBe("fields");
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 = ["lineage", "structureLinks", "impact", "fields"];
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(getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder })).toBe("lineage");
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(getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder, customTabs })).toBe("custom");
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(getActiveTab({ tabVisibility, path: STRUCTURE, structureTabsOrder, customTabs })).toBe("links");
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
  });
@@ -313,7 +313,7 @@ describe("selectors: getParsedEvents", () => {
313
313
  r13,
314
314
  r14,
315
315
  r15,
316
- ])
316
+ ]),
317
317
  );
318
318
  });
319
319
 
@@ -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);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getChildrenRelationColumns,
3
3
  getParentRelationColumns,
4
- defaultRelationColumns
4
+ defaultRelationColumns,
5
5
  } from "../getStructureRelations";
6
6
 
7
7
  const structureRelationColumns = [{ name: "test" }, { name: "test2" }];
@@ -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(getTabVisibility({ structure: { data_fields_count: 1 } })).toMatchObject({
5
+ expect(
6
+ getTabVisibility({ structure: { data_fields_count: 1 } }),
7
+ ).toMatchObject({
6
8
  fields: true,
7
9
  });
8
- expect(getTabVisibility({ structure: { data_fields_count: 0 } })).toMatchObject({
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,30 +52,30 @@ 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
71
  it("should include links iff structure has links", () => {
68
72
  expect(
69
- getTabVisibility({ structureLinks: [{ resource_type: "concept" }] })
73
+ getTabVisibility({ structureLinks: [{ resource_type: "concept" }] }),
70
74
  ).toMatchObject({
71
75
  links: true,
72
76
  });
73
77
  expect(
74
- getTabVisibility({ structureLinks: [{ resource_type: "foo" }] })
78
+ getTabVisibility({ structureLinks: [{ resource_type: "foo" }] }),
75
79
  ).toMatchObject({
76
80
  links: false,
77
81
  });
@@ -79,7 +83,7 @@ describe("selectors: getTabVisibility", () => {
79
83
  getTabVisibility({
80
84
  structureLinks: [{ resource_type: "foo" }],
81
85
  structureActions: { create_link: {} },
82
- })
86
+ }),
83
87
  ).toMatchObject({
84
88
  links: true,
85
89
  });
@@ -95,7 +99,7 @@ describe("selectors: getTabVisibility", () => {
95
99
  getTabVisibility({
96
100
  structure,
97
101
  templates,
98
- })
102
+ }),
99
103
  ).toMatchObject({
100
104
  notes: true,
101
105
  });
@@ -114,7 +118,7 @@ describe("selectors: getTabVisibility", () => {
114
118
  templates,
115
119
  structureTypes,
116
120
  structureTypesLoading: false,
117
- })
121
+ }),
118
122
  ).toMatchObject({
119
123
  notes: false,
120
124
  });
@@ -122,12 +126,16 @@ describe("selectors: getTabVisibility", () => {
122
126
 
123
127
  it("should include versions iff structureVersions is not empty", () => {
124
128
  expect(getTabVisibility({})).toMatchObject({ versions: false });
125
- expect(getTabVisibility({ structure: { version_count: 0 } })).toMatchObject({
126
- versions: false,
127
- });
128
- expect(getTabVisibility({ structure: { version_count: 1 } })).toMatchObject({
129
- versions: true,
130
- });
129
+ expect(getTabVisibility({ structure: { version_count: 0 } })).toMatchObject(
130
+ {
131
+ versions: false,
132
+ },
133
+ );
134
+ expect(getTabVisibility({ structure: { version_count: 1 } })).toMatchObject(
135
+ {
136
+ versions: true,
137
+ },
138
+ );
131
139
  });
132
140
 
133
141
  it("should not include events iff structureVersion is empty", () => {
@@ -154,7 +162,7 @@ describe("selectors: getTabVisibility", () => {
154
162
 
155
163
  it("should include rules iff structure.implementation_count is greater than 0 with permissions", () => {
156
164
  expect(
157
- getTabVisibility({ userPermissions: { view_quality: true } })
165
+ getTabVisibility({ userPermissions: { view_quality: true } }),
158
166
  ).toMatchObject({
159
167
  rules: false,
160
168
  });
@@ -162,7 +170,7 @@ describe("selectors: getTabVisibility", () => {
162
170
  getTabVisibility({
163
171
  structure: { implementation_count: 0 },
164
172
  userPermissions: { view_quality: true },
165
- })
173
+ }),
166
174
  ).toMatchObject({
167
175
  rules: false,
168
176
  });
@@ -170,7 +178,7 @@ describe("selectors: getTabVisibility", () => {
170
178
  getTabVisibility({
171
179
  structure: { implementation_count: 123 },
172
180
  userPermissions: { view_quality: true },
173
- })
181
+ }),
174
182
  ).toMatchObject({
175
183
  rules: true,
176
184
  });
@@ -178,7 +186,7 @@ describe("selectors: getTabVisibility", () => {
178
186
 
179
187
  it("should not include rules iff structure.implementation_count is greater than 0 without permissions", () => {
180
188
  expect(
181
- getTabVisibility({ userPermissions: { view_quality: false } })
189
+ getTabVisibility({ userPermissions: { view_quality: false } }),
182
190
  ).toMatchObject({
183
191
  rules: false,
184
192
  });
@@ -186,7 +194,7 @@ describe("selectors: getTabVisibility", () => {
186
194
  getTabVisibility({
187
195
  structure: { implementation_count: 0 },
188
196
  userPermissions: { view_quality: false },
189
- })
197
+ }),
190
198
  ).toMatchObject({
191
199
  rules: false,
192
200
  });
@@ -194,7 +202,7 @@ describe("selectors: getTabVisibility", () => {
194
202
  getTabVisibility({
195
203
  structure: { implementation_count: 123 },
196
204
  userPermissions: { view_quality: false },
197
- })
205
+ }),
198
206
  ).toMatchObject({
199
207
  rules: false,
200
208
  });
@@ -235,7 +243,9 @@ describe("selectors: getTabVisibility", () => {
235
243
  it("should include roles if manage_structure_acl_entry action is present in structureActions", () => {
236
244
  expect(getTabVisibility({})).toMatchObject({ roles: false });
237
245
  expect(
238
- getTabVisibility({ structureActions: { manage_structure_acl_entry: {} } })
246
+ getTabVisibility({
247
+ structureActions: { manage_structure_acl_entry: {} },
248
+ }),
239
249
  ).toMatchObject({ roles: true });
240
250
  });
241
251
  });
@@ -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) => _.map((tab) => [_.eq(tab.route), _.constant(tab.name)])(customTabs);
68
+ const getCustomTabs = (customTabs) =>
69
+ _.map((tab) => [_.eq(tab.route), _.constant(tab.name)])(customTabs);
69
70
 
70
- export const getActiveTab = ({ tabVisibility, path, structureTabsOrder, customTabs }) => {
71
+ export const getActiveTab = ({
72
+ tabVisibility,
73
+ path,
74
+ structureTabsOrder,
75
+ customTabs,
76
+ }) => {
71
77
  return _.cond([
72
- [_.eq(STRUCTURE), _.constant(defaultTab(tabVisibility, structureTabsOrder, customTabs))],
73
- [_.eq(STRUCTURE_VERSION), _.constant(defaultTab(tabVisibility, structureTabsOrder, customTabs))],
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
  );
@@ -11,7 +11,7 @@ export const getGrantAvailableFilters = createSelector(
11
11
  return _.flow(
12
12
  _.omitBy(({ values }) => _.size(values) < 2),
13
13
  _.keys,
14
- _.without(grantSelectedFilters)
14
+ _.without(grantSelectedFilters),
15
15
  )(grantFilters);
16
- }
16
+ },
17
17
  );
@@ -10,5 +10,5 @@ export const getGrantRequestTemplate = createSelector(
10
10
  (grantRequest, templates) => {
11
11
  const type = grantRequest?._embedded?.group?.type;
12
12
  return _.find({ name: type })(templates);
13
- }
13
+ },
14
14
  );
@@ -6,7 +6,7 @@ export const getGrantRequests = createSelector(
6
6
  (grantRequests) => {
7
7
  return _.orderBy(
8
8
  [({ updated_at }) => updated_at || ""],
9
- ["desc"]
9
+ ["desc"],
10
10
  )(grantRequests);
11
- }
11
+ },
12
12
  );
@@ -26,7 +26,7 @@ export const PathDecorator = ({ data_structure, data_structure_version }) => {
26
26
  ({ data_structure, data_structure_version }) =>
27
27
  data_structure?.path || data_structure_version?.path,
28
28
  _.map("name"),
29
- _.join(" › ")
29
+ _.join(" › "),
30
30
  )({ data_structure, data_structure_version });
31
31
  return <>{path}</>;
32
32
  };
@@ -130,7 +130,7 @@ export const defaultGrantRequestsTableColumns = [
130
130
  data_structure_version:
131
131
  grantRequest?._embedded?.grant?.data_structure_version,
132
132
  modificationGrant: _.prop("_embedded.group._embedded.modification_grant")(
133
- grantRequest
133
+ grantRequest,
134
134
  ),
135
135
  grant: grantRequest?._embedded?.grant,
136
136
  }),
@@ -168,9 +168,9 @@ export const getMyGrantRequestsColumns = createSelector(
168
168
  (grantsRequestsColumns) => {
169
169
  return _.flow(
170
170
  _.defaultTo(defaultGrantRequestsTableColumns),
171
- _.reject({ name: "user" })
171
+ _.reject({ name: "user" }),
172
172
  )(grantsRequestsColumns);
173
- }
173
+ },
174
174
  );
175
175
 
176
176
  export const getGrantRequestsApprovalColumns = createSelector(
@@ -178,7 +178,7 @@ export const getGrantRequestsApprovalColumns = createSelector(
178
178
  (grantsRequestsColumns) => {
179
179
  return _.flow(
180
180
  _.defaultTo(defaultGrantRequestsTableColumns),
181
- _.reject({ name: "status" })
181
+ _.reject({ name: "status" }),
182
182
  )(grantsRequestsColumns);
183
- }
183
+ },
184
184
  );
@@ -9,5 +9,5 @@ export const getGrantRequestsQuery = createSelector(
9
9
  getGrantRequestsDefaults,
10
10
  (getGrantRequestsCustomQuery, grantRequestsDefault) => {
11
11
  return { ...grantRequestsDefault, ...getGrantRequestsCustomQuery };
12
- }
12
+ },
13
13
  );