@truedat/bg 7.5.9 → 7.5.11

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 (236) hide show
  1. package/package.json +41 -70
  2. package/src/concepts/components/Concept.js +22 -19
  3. package/src/concepts/components/ConceptActions.js +39 -34
  4. package/src/concepts/components/ConceptArchive.js +0 -1
  5. package/src/concepts/components/ConceptArchiveRow.js +3 -4
  6. package/src/concepts/components/ConceptCompleteness.js +1 -2
  7. package/src/concepts/components/ConceptConfidentialButton.js +1 -2
  8. package/src/concepts/components/ConceptCreate.js +1 -1
  9. package/src/concepts/components/ConceptCrumbs.js +10 -8
  10. package/src/concepts/components/ConceptDeleteModalBody.js +7 -10
  11. package/src/concepts/components/ConceptDetails.js +3 -3
  12. package/src/concepts/components/ConceptEdit.js +5 -5
  13. package/src/concepts/components/ConceptForm.js +39 -43
  14. package/src/concepts/components/ConceptHeader.js +0 -1
  15. package/src/concepts/components/ConceptLinksDropdownSelector.js +1 -2
  16. package/src/concepts/components/ConceptLoader.js +3 -3
  17. package/src/concepts/components/ConceptManageDomain.js +2 -1
  18. package/src/concepts/components/ConceptManageDomainPopup.js +1 -1
  19. package/src/concepts/components/ConceptRoutes.js +263 -226
  20. package/src/concepts/components/ConceptRow.js +0 -1
  21. package/src/concepts/components/ConceptSubscription.js +15 -14
  22. package/src/concepts/components/ConceptSummary.js +0 -1
  23. package/src/concepts/components/ConceptTabPane.js +36 -41
  24. package/src/concepts/components/ConceptTabs.js +1 -4
  25. package/src/concepts/components/ConceptTaxonomy.js +1 -3
  26. package/src/concepts/components/Concepts.js +0 -1
  27. package/src/concepts/components/ConceptsActions.js +2 -3
  28. package/src/concepts/components/ConceptsBulkUpdate.js +3 -6
  29. package/src/concepts/components/ConceptsLabelResults.js +0 -1
  30. package/src/concepts/components/ConceptsLinkDecorator.js +1 -2
  31. package/src/concepts/components/ConceptsLinksManagement.js +7 -8
  32. package/src/concepts/components/ConceptsPagination.js +0 -1
  33. package/src/concepts/components/ConceptsPanel.js +5 -4
  34. package/src/concepts/components/ConceptsTable.js +2 -3
  35. package/src/concepts/components/ConceptsUpdateButton.js +6 -6
  36. package/src/concepts/components/ConceptsUploadButton.js +0 -1
  37. package/src/concepts/components/ConceptsUploadEvents.js +0 -2
  38. package/src/concepts/components/ConceptsUploadEventsTable.js +12 -19
  39. package/src/concepts/components/DomainConcepts.js +0 -1
  40. package/src/concepts/components/EventRow.js +0 -1
  41. package/src/concepts/components/Events.js +3 -4
  42. package/src/concepts/components/FieldGroupTable.js +1 -2
  43. package/src/concepts/components/LinkedMessage.js +9 -13
  44. package/src/concepts/components/SharedToDomains.js +8 -7
  45. package/src/concepts/components/SharedToDomainsPopup.js +1 -1
  46. package/src/concepts/components/SharedToForm.js +3 -6
  47. package/src/concepts/components/__tests__/Concept.spec.js +8 -42
  48. package/src/concepts/components/__tests__/ConceptActions.spec.js +7 -7
  49. package/src/concepts/components/__tests__/ConceptArchive.spec.js +5 -5
  50. package/src/concepts/components/__tests__/ConceptArchiveLoader.spec.js +15 -14
  51. package/src/concepts/components/__tests__/ConceptArchiveRow.spec.js +0 -1
  52. package/src/concepts/components/__tests__/ConceptCompleteness.spec.js +0 -1
  53. package/src/concepts/components/__tests__/ConceptConfidentialButton.spec.js +10 -17
  54. package/src/concepts/components/__tests__/ConceptContext.spec.js +1 -1
  55. package/src/concepts/components/__tests__/ConceptCrumbs.spec.js +12 -34
  56. package/src/concepts/components/__tests__/ConceptDeleteModalBody.spec.js +47 -26
  57. package/src/concepts/components/__tests__/ConceptDetails.spec.js +1 -9
  58. package/src/concepts/components/__tests__/ConceptEdit.spec.js +2 -2
  59. package/src/concepts/components/__tests__/ConceptForm.spec.js +26 -19
  60. package/src/concepts/components/__tests__/ConceptHeader.spec.js +33 -57
  61. package/src/concepts/components/__tests__/ConceptLinksManagement.spec.js +27 -34
  62. package/src/concepts/components/__tests__/ConceptLoader.spec.js +51 -37
  63. package/src/concepts/components/__tests__/ConceptManageDomain.spec.js +12 -47
  64. package/src/concepts/components/__tests__/ConceptManageDomainPopup.spec.js +65 -24
  65. package/src/concepts/components/__tests__/ConceptRow.spec.js +6 -17
  66. package/src/concepts/components/__tests__/ConceptSubscription.spec.js +9 -9
  67. package/src/concepts/components/__tests__/ConceptSubscriptionLoader.spec.js +20 -16
  68. package/src/concepts/components/__tests__/ConceptSummary.spec.js +11 -10
  69. package/src/concepts/components/__tests__/ConceptTabPane.spec.js +73 -5
  70. package/src/concepts/components/__tests__/ConceptTabs.spec.js +6 -21
  71. package/src/concepts/components/__tests__/ConceptTaxonomy.spec.js +16 -12
  72. package/src/concepts/components/__tests__/Concepts.spec.js +6 -26
  73. package/src/concepts/components/__tests__/ConceptsActions.spec.js +0 -1
  74. package/src/concepts/components/__tests__/ConceptsBulkUpdate.spec.js +31 -36
  75. package/src/concepts/components/__tests__/ConceptsLabelResults.spec.js +4 -5
  76. package/src/concepts/components/__tests__/ConceptsLinkDecorator.spec.js +3 -4
  77. package/src/concepts/components/__tests__/ConceptsPanel.spec.js +7 -26
  78. package/src/concepts/components/__tests__/ConceptsTable.spec.js +34 -60
  79. package/src/concepts/components/__tests__/ConceptsUpdateButton.spec.js +6 -7
  80. package/src/concepts/components/__tests__/ConceptsUploadButton.spec.js +25 -13
  81. package/src/concepts/components/__tests__/ConceptsUploadEventsTable.spec.js +11 -9
  82. package/src/concepts/components/__tests__/Events.spec.js +10 -10
  83. package/src/concepts/components/__tests__/SharedToDomains.spec.js +25 -19
  84. package/src/concepts/components/__tests__/SharedToDomainsPopup.spec.js +48 -36
  85. package/src/concepts/components/__tests__/SharedToForm.spec.js +24 -32
  86. package/src/concepts/components/__tests__/__snapshots__/Concept.spec.js.snap +108 -23
  87. package/src/concepts/components/__tests__/__snapshots__/ConceptActions.spec.js.snap +12 -16
  88. package/src/concepts/components/__tests__/__snapshots__/ConceptArchive.spec.js.snap +77 -65
  89. package/src/concepts/components/__tests__/__snapshots__/ConceptArchiveRow.spec.js.snap +2 -4
  90. package/src/concepts/components/__tests__/__snapshots__/ConceptConfidentialButton.spec.js.snap +11 -31
  91. package/src/concepts/components/__tests__/__snapshots__/ConceptCrumbs.spec.js.snap +41 -56
  92. package/src/concepts/components/__tests__/__snapshots__/ConceptDeleteModalBody.spec.js.snap +3 -5
  93. package/src/concepts/components/__tests__/__snapshots__/ConceptDetails.spec.js.snap +0 -1
  94. package/src/concepts/components/__tests__/__snapshots__/ConceptEdit.spec.js.snap +1 -12
  95. package/src/concepts/components/__tests__/__snapshots__/ConceptForm.spec.js.snap +10 -11
  96. package/src/concepts/components/__tests__/__snapshots__/ConceptHeader.spec.js.snap +2 -2
  97. package/src/concepts/components/__tests__/__snapshots__/ConceptLinksManagement.spec.js.snap +14 -14
  98. package/src/concepts/components/__tests__/__snapshots__/ConceptLoader.spec.js.snap +14 -9
  99. package/src/concepts/components/__tests__/__snapshots__/ConceptManageDomain.spec.js.snap +43 -5
  100. package/src/concepts/components/__tests__/__snapshots__/ConceptManageDomainPopup.spec.js.snap +10 -163
  101. package/src/concepts/components/__tests__/__snapshots__/ConceptRow.spec.js.snap +4 -7
  102. package/src/concepts/components/__tests__/__snapshots__/ConceptSubscription.spec.js.snap +8 -55
  103. package/src/concepts/components/__tests__/__snapshots__/ConceptSubscriptionLoader.spec.js.snap +1 -1
  104. package/src/concepts/components/__tests__/__snapshots__/ConceptSummary.spec.js.snap +6 -6
  105. package/src/concepts/components/__tests__/__snapshots__/ConceptTabPane.spec.js.snap +18 -34
  106. package/src/concepts/components/__tests__/__snapshots__/ConceptTabs.spec.js.snap +26 -13
  107. package/src/concepts/components/__tests__/__snapshots__/ConceptTaxonomy.spec.js.snap +63 -53
  108. package/src/concepts/components/__tests__/__snapshots__/Concepts.spec.js.snap +10 -25
  109. package/src/concepts/components/__tests__/__snapshots__/ConceptsActions.spec.js.snap +1 -0
  110. package/src/concepts/components/__tests__/__snapshots__/ConceptsBulkUpdate.spec.js.snap +7 -6
  111. package/src/concepts/components/__tests__/__snapshots__/ConceptsLabelResults.spec.js.snap +1 -1
  112. package/src/concepts/components/__tests__/__snapshots__/ConceptsLinkDecorator.spec.js.snap +1 -0
  113. package/src/concepts/components/__tests__/__snapshots__/ConceptsPanel.spec.js.snap +10 -25
  114. package/src/concepts/components/__tests__/__snapshots__/ConceptsTable.spec.js.snap +1 -1
  115. package/src/concepts/components/__tests__/__snapshots__/ConceptsUpdateButton.spec.js.snap +1 -1
  116. package/src/concepts/components/__tests__/__snapshots__/ConceptsUploadButton.spec.js.snap +9 -74
  117. package/src/concepts/components/__tests__/__snapshots__/ConceptsUploadEventsTable.spec.js.snap +14 -14
  118. package/src/concepts/components/__tests__/__snapshots__/Events.spec.js.snap +83 -43
  119. package/src/concepts/components/__tests__/__snapshots__/SharedToDomains.spec.js.snap +56 -33
  120. package/src/concepts/components/__tests__/__snapshots__/SharedToDomainsPopup.spec.js.snap +9 -145
  121. package/src/concepts/components/__tests__/__snapshots__/SharedToForm.spec.js.snap +2 -2
  122. package/src/concepts/reducers/__tests__/conceptRedirect.spec.js +1 -1
  123. package/src/concepts/reducers/conceptRedirect.js +4 -6
  124. package/src/concepts/relations/components/ConceptImplementationLinks.js +5 -4
  125. package/src/concepts/relations/components/ConceptLinkActions.js +1 -1
  126. package/src/concepts/relations/components/ConceptLinksActions.js +4 -4
  127. package/src/concepts/relations/components/ConceptRelationActions.js +3 -4
  128. package/src/concepts/relations/components/ConceptRelationForm.js +3 -3
  129. package/src/concepts/relations/components/ConceptRelationRow.js +10 -10
  130. package/src/concepts/relations/components/ConceptRelations.js +10 -11
  131. package/src/concepts/relations/components/ConceptRelationsRoutes.js +20 -39
  132. package/src/concepts/relations/components/ConceptRelationsSummary.js +26 -29
  133. package/src/concepts/relations/components/ConceptSelector.js +4 -7
  134. package/src/concepts/relations/components/ConceptStructureLinks.js +2 -2
  135. package/src/concepts/relations/components/__tests__/ConceptImplementationLinks.spec.js +19 -59
  136. package/src/concepts/relations/components/__tests__/ConceptLinksActions.spec.js +9 -10
  137. package/src/concepts/relations/components/__tests__/ConceptRelationActions.spec.js +9 -7
  138. package/src/concepts/relations/components/__tests__/ConceptRelationForm.spec.js +30 -42
  139. package/src/concepts/relations/components/__tests__/ConceptRelationRow.spec.js +11 -16
  140. package/src/concepts/relations/components/__tests__/ConceptRelations.spec.js +11 -14
  141. package/src/concepts/relations/components/__tests__/ConceptRelationsRoutes.spec.js +108 -8
  142. package/src/concepts/relations/components/__tests__/ConceptRelationsSummary.spec.js +39 -38
  143. package/src/concepts/relations/components/__tests__/ConceptSelector.spec.js +24 -36
  144. package/src/concepts/relations/components/__tests__/ConceptStructureLinks.spec.js +21 -11
  145. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptImplementationLinks.spec.js.snap +131 -28
  146. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptLinksActions.spec.js.snap +4 -3
  147. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationActions.spec.js.snap +10 -26
  148. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationForm.spec.js.snap +15 -19
  149. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationRow.spec.js.snap +36 -33
  150. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelations.spec.js.snap +76 -51
  151. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationsRoutes.spec.js.snap +15 -29
  152. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationsSummary.spec.js.snap +45 -100
  153. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptSelector.spec.js.snap +9 -9
  154. package/src/concepts/relations/components/__tests__/__snapshots__/ConceptStructureLinks.spec.js.snap +10 -10
  155. package/src/concepts/relations/sagas/conceptLinkAction.js +2 -2
  156. package/src/concepts/relations/sagas/linkConcept.js +1 -1
  157. package/src/concepts/relations/selectors/getBusinessConceptsLinksToImplementationsColumns.js +1 -2
  158. package/src/concepts/relations/selectors/getConceptLinks.js +1 -2
  159. package/src/concepts/relations/selectors/getConceptRelations.js +14 -14
  160. package/src/concepts/sagas/__tests__/saveSharedTo.spec.js +3 -3
  161. package/src/concepts/sagas/__tests__/setConfidentialConcept.spec.js +5 -5
  162. package/src/concepts/sagas/conceptAction.js +2 -2
  163. package/src/concepts/sagas/fetchConceptArchive.js +1 -1
  164. package/src/concepts/sagas/setConfidentialConcept.js +2 -2
  165. package/src/concepts/selectors/__tests__/getConceptDomainPath.spec.js +2 -2
  166. package/src/concepts/selectors/getConceptColumns.js +1 -2
  167. package/src/concepts/selectors/getConceptTemplate.js +1 -1
  168. package/src/concepts/selectors/getConceptUploadEventColumns.js +0 -1
  169. package/src/concepts/selectors/getConceptVersionPath.js +2 -2
  170. package/src/concepts/selectors/getParsedEvents.js +2 -2
  171. package/src/concepts/selectors/getTemplateFields.js +3 -3
  172. package/src/concepts/selectors/getTemplateGroups.js +1 -1
  173. package/src/hooks/__mocks__/useDomains.js +42 -0
  174. package/src/hooks/useDomains.js +3 -3
  175. package/src/taxonomy/components/AddDomainMember.js +3 -4
  176. package/src/taxonomy/components/Domain.js +19 -23
  177. package/src/taxonomy/components/DomainActions.js +1 -2
  178. package/src/taxonomy/components/DomainCards.js +4 -6
  179. package/src/taxonomy/components/DomainContent.js +42 -87
  180. package/src/taxonomy/components/DomainCrumbs.js +4 -4
  181. package/src/taxonomy/components/DomainDetail.js +4 -5
  182. package/src/taxonomy/components/DomainForm.js +1 -3
  183. package/src/taxonomy/components/DomainImplementations.js +8 -7
  184. package/src/taxonomy/components/DomainItem.js +1 -2
  185. package/src/taxonomy/components/DomainMembers.js +0 -1
  186. package/src/taxonomy/components/DomainRoutes.js +15 -21
  187. package/src/taxonomy/components/DomainSearch.js +0 -1
  188. package/src/taxonomy/components/DomainStructures.js +0 -1
  189. package/src/taxonomy/components/DomainTabs.js +3 -4
  190. package/src/taxonomy/components/DomainTaxonomy.js +1 -2
  191. package/src/taxonomy/components/Domains.js +15 -5
  192. package/src/taxonomy/components/DomainsActions.js +2 -4
  193. package/src/taxonomy/components/EditDomain.js +5 -5
  194. package/src/taxonomy/components/NewDomain.js +4 -4
  195. package/src/taxonomy/components/__tests__/AddDomainMember.spec.js +6 -5
  196. package/src/taxonomy/components/__tests__/Domain.spec.js +63 -123
  197. package/src/taxonomy/components/__tests__/DomainActions.spec.js +0 -1
  198. package/src/taxonomy/components/__tests__/DomainCards.spec.js +44 -51
  199. package/src/taxonomy/components/__tests__/DomainContent.spec.js +138 -158
  200. package/src/taxonomy/components/__tests__/DomainCrumbs.spec.js +14 -19
  201. package/src/taxonomy/components/__tests__/DomainDetail.spec.js +2 -3
  202. package/src/taxonomy/components/__tests__/DomainForm.spec.js +44 -60
  203. package/src/taxonomy/components/__tests__/DomainItem.spec.js +17 -14
  204. package/src/taxonomy/components/__tests__/DomainMembers.spec.js +9 -13
  205. package/src/taxonomy/components/__tests__/DomainRoutes.spec.js +54 -0
  206. package/src/taxonomy/components/__tests__/DomainStructures.spec.js +10 -51
  207. package/src/taxonomy/components/__tests__/DomainTabs.spec.js +14 -33
  208. package/src/taxonomy/components/__tests__/DomainTaxonomy.spec.js +17 -16
  209. package/src/taxonomy/components/__tests__/Domains.spec.js +63 -95
  210. package/src/taxonomy/components/__tests__/DomainsActions.spec.js +12 -11
  211. package/src/taxonomy/components/__tests__/EditDomain.spec.js +13 -54
  212. package/src/taxonomy/components/__tests__/NewDomain.spec.js +17 -61
  213. package/src/taxonomy/components/__tests__/__snapshots__/AddDomainMember.spec.js.snap +10 -9
  214. package/src/taxonomy/components/__tests__/__snapshots__/Domain.spec.js.snap +53 -72
  215. package/src/taxonomy/components/__tests__/__snapshots__/DomainActions.spec.js.snap +2 -1
  216. package/src/taxonomy/components/__tests__/__snapshots__/DomainCards.spec.js.snap +247 -27
  217. package/src/taxonomy/components/__tests__/__snapshots__/DomainContent.spec.js.snap +14 -294
  218. package/src/taxonomy/components/__tests__/__snapshots__/DomainCrumbs.spec.js.snap +6 -2
  219. package/src/taxonomy/components/__tests__/__snapshots__/DomainDetail.spec.js.snap +5 -4
  220. package/src/taxonomy/components/__tests__/__snapshots__/DomainForm.spec.js.snap +13 -12
  221. package/src/taxonomy/components/__tests__/__snapshots__/DomainItem.spec.js.snap +16 -12
  222. package/src/taxonomy/components/__tests__/__snapshots__/DomainRoutes.spec.js.snap +52 -0
  223. package/src/taxonomy/components/__tests__/__snapshots__/DomainStructures.spec.js.snap +7 -7
  224. package/src/taxonomy/components/__tests__/__snapshots__/DomainTabs.spec.js.snap +10 -5
  225. package/src/taxonomy/components/__tests__/__snapshots__/DomainTaxonomy.spec.js.snap +37 -29
  226. package/src/taxonomy/components/__tests__/__snapshots__/Domains.spec.js.snap +123 -6
  227. package/src/taxonomy/components/__tests__/__snapshots__/DomainsActions.spec.js.snap +2 -1
  228. package/src/taxonomy/components/__tests__/__snapshots__/EditDomain.spec.js.snap +15 -14
  229. package/src/taxonomy/components/__tests__/__snapshots__/NewDomain.spec.js.snap +31 -28
  230. package/src/taxonomy/selectors/index.js +0 -1
  231. package/src/concepts/relations/components/__tests__/ConceptSelector2.spec.js +0 -76
  232. package/src/concepts/selectors/__tests__/getConceptSubscope.spec.js +0 -37
  233. package/src/concepts/selectors/__tests__/getSidemenuGlossarySubscopes.spec.js +0 -17
  234. package/src/concepts/selectors/getConceptStatus.js +0 -1
  235. package/src/concepts/selectors/getConceptSubscope.js +0 -19
  236. package/src/concepts/selectors/getSidemenuGlossarySubscopes.js +0 -8
@@ -4,7 +4,6 @@ exports[`<ConceptStructureLinksPane /> matches the latest snapshot 1`] = `
4
4
  <div>
5
5
  <div
6
6
  class="ui bottom attached segment"
7
- style=""
8
7
  >
9
8
  <div
10
9
  class="ui grid"
@@ -25,7 +24,7 @@ exports[`<ConceptStructureLinksPane /> matches the latest snapshot 1`] = `
25
24
  <h3
26
25
  class="ui header"
27
26
  >
28
- Links to Structures
27
+ conceptRelation.master.table.title
29
28
  </h3>
30
29
  <table
31
30
  class="ui table"
@@ -39,7 +38,7 @@ exports[`<ConceptStructureLinksPane /> matches the latest snapshot 1`] = `
39
38
  <th
40
39
  class=""
41
40
  >
42
- Structure
41
+ name
43
42
  </th>
44
43
  </tr>
45
44
  </thead>
@@ -91,7 +90,7 @@ exports[`<ConceptStructureLinksPane /> matches the latest snapshot with grantVie
91
90
  <div
92
91
  class="ui label structures-label-results"
93
92
  >
94
- NaN structures found
93
+ structures.retrieved.results
95
94
  </div>
96
95
  <table
97
96
  class="ui sortable table"
@@ -105,27 +104,27 @@ exports[`<ConceptStructureLinksPane /> matches the latest snapshot with grantVie
105
104
  <th
106
105
  class="two wide"
107
106
  >
108
- Structure
107
+ structure.name
109
108
  </th>
110
109
  <th
111
110
  class="one wide disabled"
112
111
  >
113
- Type
112
+ structure.type
114
113
  </th>
115
114
  <th
116
115
  class="one wide"
117
116
  >
118
- System
117
+ structure.system
119
118
  </th>
120
119
  <th
121
120
  class="one wide disabled"
122
121
  >
123
- Relation Type
122
+ structure.relation.relation_type_name
124
123
  </th>
125
124
  <th
126
125
  class="one wide disabled"
127
126
  >
128
- Group
127
+ structure.group
129
128
  </th>
130
129
  <th
131
130
  class="one wide"
@@ -149,6 +148,7 @@ exports[`<ConceptStructureLinksPane /> matches the latest snapshot with grantVie
149
148
  class="structure-cell-overflow"
150
149
  >
151
150
  <a
151
+ data-discover="true"
152
152
  href="/structures/1"
153
153
  title="test structure"
154
154
  >
@@ -177,7 +177,7 @@ exports[`<ConceptStructureLinksPane /> matches the latest snapshot with grantVie
177
177
  class=""
178
178
  >
179
179
  <time
180
- datetime="1735725600100"
180
+ datetime="1735725600050"
181
181
  >
182
182
  2025-01-01 10:00
183
183
  </time>
@@ -5,7 +5,7 @@ import {
5
5
  apiJsonPatch,
6
6
  apiJsonPost,
7
7
  apiJsonPut,
8
- JSON_OPTS
8
+ JSON_OPTS,
9
9
  } from "@truedat/core/services/api";
10
10
  import { conceptLinkAction } from "../routines";
11
11
 
@@ -14,7 +14,7 @@ const methodFromVerb = {
14
14
  DELETE: apiJsonDelete,
15
15
  PATCH: apiJsonPatch,
16
16
  POST: apiJsonPost,
17
- PUT: apiJsonPut
17
+ PUT: apiJsonPut,
18
18
  };
19
19
 
20
20
  export function* conceptLinkActionSaga({ payload }) {
@@ -12,7 +12,7 @@ export function* linkConceptSaga({ payload }) {
12
12
  "source_type",
13
13
  "target_id",
14
14
  "target_type",
15
- "tag_ids"
15
+ "tag_ids",
16
16
  ])(payload);
17
17
 
18
18
  const redirectUrl = _.prop("redirectUrl")(payload);
@@ -1,8 +1,7 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import { createSelector } from "reselect";
4
3
  import { FormattedMessage } from "react-intl";
5
- import { Link } from "react-router-dom";
4
+ import { Link } from "react-router";
6
5
  import DateTime from "@truedat/core/components/DateTime";
7
6
  import { formatNumber } from "@truedat/core/services/format";
8
7
  import { linkTo } from "@truedat/core/routes";
@@ -1,7 +1,6 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import PropTypes from "prop-types";
4
- import { Link } from "react-router-dom";
3
+ import { Link } from "react-router";
5
4
  import { Icon, Label } from "semantic-ui-react";
6
5
  import { createSelector } from "reselect";
7
6
  import { accentInsensitivePathOrder } from "@truedat/core/services/sort";
@@ -24,7 +24,7 @@ export const getConceptToConceptRelations = createSelector(
24
24
  )
25
25
  );
26
26
 
27
- export const getConceptRelations = formatMessage =>
27
+ export const getConceptRelations = (formatMessage) =>
28
28
  createSelector(
29
29
  [getRelations, getBusinessConceptId],
30
30
  (relations, business_concept_id) => {
@@ -39,10 +39,10 @@ const _getConceptSourceRelations = (relations, business_concept_id) => {
39
39
  const bcRelations = _.filter({
40
40
  source_id: _.toInteger(business_concept_id),
41
41
  target_type: "business_concept",
42
- source_type: "business_concept"
42
+ source_type: "business_concept",
43
43
  })(relations);
44
44
 
45
- return _.map(rel => {
45
+ return _.map((rel) => {
46
46
  return { relationSide: "source", ...rel };
47
47
  })(bcRelations);
48
48
  };
@@ -51,31 +51,31 @@ const _getConceptTargetRelations = (relations, business_concept_id) => {
51
51
  const bcRelations = _.filter({
52
52
  target_id: _.toInteger(business_concept_id),
53
53
  target_type: "business_concept",
54
- source_type: "business_concept"
54
+ source_type: "business_concept",
55
55
  })(relations);
56
56
 
57
- return _.map(rel => {
57
+ return _.map((rel) => {
58
58
  return { relationSide: "target", ...rel };
59
59
  })(bcRelations);
60
60
  };
61
61
 
62
62
  const groupRelationsByLabel = (bcRelations, formatMessage) => {
63
- const relations = _.map(r => {
63
+ const relations = _.map((r) => {
64
64
  const tags = _.flow(
65
- _.map(t => {
65
+ _.map((t) => {
66
66
  return {
67
67
  relationSide: r.relationSide,
68
68
  i18n: formatMessage({
69
69
  id: `${r.relationSide}.${t.value.type}`,
70
- defaultMessage: t.value.type
70
+ defaultMessage: t.value.type,
71
71
  }),
72
- ...t
72
+ ...t,
73
73
  };
74
74
  })
75
75
  )(r.tags);
76
76
  return {
77
77
  ...r,
78
- tags: tags
78
+ tags: tags,
79
79
  };
80
80
  })(bcRelations);
81
81
 
@@ -85,10 +85,10 @@ const groupRelationsByLabel = (bcRelations, formatMessage) => {
85
85
  _.sortBy("relationSide")
86
86
  )(relations);
87
87
 
88
- const tagsRelations = _.map(tag => {
89
- const relationsByLabel = _.filter(r => _.find({ i18n: tag.i18n })(r.tags))(
90
- relations
91
- );
88
+ const tagsRelations = _.map((tag) => {
89
+ const relationsByLabel = _.filter((r) =>
90
+ _.find({ i18n: tag.i18n })(r.tags)
91
+ )(relations);
92
92
  return { ...tag, relations: relationsByLabel };
93
93
  })(labels);
94
94
  return tagsRelations;
@@ -26,13 +26,13 @@ describe("sagas: saveSharedToRequestSaga", () => {
26
26
  });
27
27
 
28
28
  describe("sagas: saveSharedToRequestSaga", () => {
29
- const payload = { id: 1, sharedTo: [1, 2] };
29
+ const payload = { id: "1", sharedTo: [1, 2] };
30
30
  const body = {
31
- domain_ids: [1, 2]
31
+ domain_ids: [1, 2],
32
32
  };
33
33
  const data = [
34
34
  { id: 1, name: "foo" },
35
- { id: 2, name: "bar" }
35
+ { id: 2, name: "bar" },
36
36
  ];
37
37
  const url = compile(API_CONCEPT_SHARED_DOMAINS)(payload);
38
38
  it("should put a success action when a response is returned", () => {
@@ -5,7 +5,7 @@ import { setConfidentialConcept } from "../../routines";
5
5
  import { API_BUSINESS_CONCEPT_SET_CONFIDENTIAL } from "../../api";
6
6
  import {
7
7
  setConfidentialConceptRequestSaga,
8
- setConfidentialConceptSaga
8
+ setConfidentialConceptSaga,
9
9
  } from "../setConfidentialConcept";
10
10
 
11
11
  describe("sagas: setConfidentialConceptRequestSaga", () => {
@@ -29,8 +29,8 @@ describe("sagas: setConfidentialConceptRequestSaga", () => {
29
29
  });
30
30
 
31
31
  describe("sagas: setConfidentialConceptSaga", () => {
32
- const id = 5;
33
- const business_concept_version = { id: 5, confidential: true };
32
+ const id = "5";
33
+ const business_concept_version = { id: "5", confidential: true };
34
34
  const url = compile(API_BUSINESS_CONCEPT_SET_CONFIDENTIAL)({ id });
35
35
  const meta = {};
36
36
  const requestData = { id: id, confidential: true };
@@ -38,7 +38,7 @@ describe("sagas: setConfidentialConceptSaga", () => {
38
38
  it("should put a success action when a response is returned", () => {
39
39
  expect(() => {
40
40
  testSaga(setConfidentialConceptSaga, {
41
- payload
41
+ payload,
42
42
  })
43
43
  .next()
44
44
  .put({ meta, ...setConfidentialConcept.request() })
@@ -47,7 +47,7 @@ describe("sagas: setConfidentialConceptSaga", () => {
47
47
  .next({ data: payload })
48
48
  .put({
49
49
  meta,
50
- ...setConfidentialConcept.success({ business_concept_version })
50
+ ...setConfidentialConcept.success({ business_concept_version }),
51
51
  })
52
52
  .next()
53
53
  .put(setConfidentialConcept.fulfill())
@@ -5,7 +5,7 @@ import {
5
5
  apiJsonPatch,
6
6
  apiJsonPost,
7
7
  apiJsonPut,
8
- JSON_OPTS
8
+ JSON_OPTS,
9
9
  } from "@truedat/core/services/api";
10
10
  import { conceptAction } from "../routines";
11
11
 
@@ -14,7 +14,7 @@ const methodFromVerb = {
14
14
  DELETE: apiJsonDelete,
15
15
  PATCH: apiJsonPatch,
16
16
  POST: apiJsonPost,
17
- PUT: apiJsonPut
17
+ PUT: apiJsonPut,
18
18
  };
19
19
 
20
20
  export function* conceptActionSaga({ payload }) {
@@ -7,7 +7,7 @@ import { API_CONCEPT_ARCHIVE } from "../api";
7
7
  export function* fetchConceptArchiveSaga({ payload }) {
8
8
  try {
9
9
  const { id } = payload;
10
- const url = compile(API_CONCEPT_ARCHIVE)({ id });
10
+ const url = compile(API_CONCEPT_ARCHIVE)({ id: `${id}` });
11
11
  yield put(fetchConceptArchive.request());
12
12
  const { data } = yield call(apiJson, url, JSON_OPTS);
13
13
  yield put(fetchConceptArchive.success(data));
@@ -6,9 +6,9 @@ import { API_BUSINESS_CONCEPT_SET_CONFIDENTIAL } from "../api";
6
6
 
7
7
  export function* setConfidentialConceptSaga({ payload }) {
8
8
  const {
9
- business_concept_version: { id, confidential }
9
+ business_concept_version: { id, confidential },
10
10
  } = payload;
11
- const url = compile(API_BUSINESS_CONCEPT_SET_CONFIDENTIAL)({ id });
11
+ const url = compile(API_BUSINESS_CONCEPT_SET_CONFIDENTIAL)({ id: `${id}` });
12
12
  const requestData = { id: id, confidential };
13
13
  const meta = {};
14
14
  try {
@@ -5,10 +5,10 @@ describe("selectors: getConceptDomainPath", () => {
5
5
  const domain_parents = [
6
6
  { id: 2, name: "name2", external_id: "eid2" },
7
7
  { id: 1, name: "name1", external_id: "eid1" },
8
- { id: 0, name: "name0", external_id: "eid0" }
8
+ { id: 0, name: "name0", external_id: "eid0" },
9
9
  ];
10
10
  const concept = {
11
- domain_parents
11
+ domain_parents,
12
12
  };
13
13
  const state = { concept };
14
14
 
@@ -1,10 +1,9 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import { Icon } from "semantic-ui-react";
4
3
  import { FormattedMessage } from "react-intl";
5
4
  import { createSelector } from "reselect";
6
5
  import Moment from "react-moment";
7
- import { Link } from "react-router-dom";
6
+ import { Link } from "react-router";
8
7
  import { linkTo } from "@truedat/core/routes";
9
8
 
10
9
  const ConceptLink = (concept) =>
@@ -1,7 +1,7 @@
1
1
  import { createSelector } from "reselect";
2
2
  import { getConcept } from "./getConcept";
3
3
 
4
- export const getConceptTemplate = createSelector([getConcept], concept => {
4
+ export const getConceptTemplate = createSelector([getConcept], (concept) => {
5
5
  const { template } = concept;
6
6
  return template ? template.content : {};
7
7
  });
@@ -1,5 +1,4 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import { createSelector } from "reselect";
4
3
  import { FormattedMessage } from "react-intl";
5
4
  import Moment from "react-moment";
@@ -6,8 +6,8 @@ import {
6
6
  CONCEPTS_PENDING,
7
7
  } from "@truedat/core/routes";
8
8
  import { linkTo } from "@truedat/core/routes";
9
- import { getConceptSubscope } from "./getConceptSubscope";
10
- import { getSidemenuGlossarySubscopes } from "./getSidemenuGlossarySubscopes";
9
+ import { getConceptSubscope } from "@truedat/core/selectors/getConceptSubscope";
10
+ import { getSidemenuGlossarySubscopes } from "@truedat/core/selectors/getSidemenuGlossarySubscopes";
11
11
 
12
12
  function isPending(status) {
13
13
  return (
@@ -8,8 +8,8 @@ const toStr = (field) =>
8
8
  _.isObject(field)
9
9
  ? JSON.stringify(field)
10
10
  : _.isBoolean(field)
11
- ? _.toString(field)
12
- : field;
11
+ ? _.toString(field)
12
+ : field;
13
13
 
14
14
  const getDeleteConceptDraftEvent = (e) => {
15
15
  const msg_key = "deleted_version";
@@ -4,11 +4,11 @@ import { getConceptTemplate } from "./getConceptTemplate";
4
4
 
5
5
  export const getTemplateFields = createSelector(
6
6
  [getConceptTemplate],
7
- template => {
7
+ (template) => {
8
8
  if (_.isArray(template)) {
9
- const fields = _.map(f => [
9
+ const fields = _.map((f) => [
10
10
  _.propOr("", "name", f),
11
- _.propOr("", "default", f)
11
+ _.propOr("", "default", f),
12
12
  ])(template);
13
13
  return _.fromPairs(fields);
14
14
  } else {
@@ -4,7 +4,7 @@ import { getConceptTemplate } from "./getConceptTemplate";
4
4
 
5
5
  export const getTemplateGroups = createSelector(
6
6
  [getConceptTemplate],
7
- template => {
7
+ (template) => {
8
8
  if (_.isArray(template)) {
9
9
  return _.toPairs(_.groupBy("group")(template));
10
10
  } else {
@@ -0,0 +1,42 @@
1
+ export const useDomains = jest.fn(() => ({
2
+ data: [],
3
+ actions: {},
4
+ error: null,
5
+ loading: false,
6
+ }));
7
+
8
+ export const useDomain = jest.fn((domainId) => ({
9
+ data: domainId
10
+ ? {
11
+ description: "DOMAIN DESCRIPTION",
12
+ domain_group: null,
13
+ external_id: "EXTERNAL ID",
14
+ id: domainId,
15
+ name: "DOMAIN NAME",
16
+ parent_id: 6,
17
+ parents: null,
18
+ type: null,
19
+ }
20
+ : null,
21
+ actions: {},
22
+ error: null,
23
+ loading: false,
24
+ }));
25
+
26
+ export const useDomainCreate = jest.fn(() => ({
27
+ trigger: jest.fn(() => ({
28
+ then: jest.fn(),
29
+ })),
30
+ }));
31
+
32
+ export const useDomainUpdate = jest.fn(() => ({
33
+ trigger: jest.fn(() => ({
34
+ then: jest.fn(),
35
+ })),
36
+ }));
37
+
38
+ export const useDomainDelete = jest.fn(() => ({
39
+ trigger: jest.fn(() => ({
40
+ then: jest.fn(),
41
+ })),
42
+ }));
@@ -24,7 +24,7 @@ export const useDomains = () => {
24
24
 
25
25
  export const useDomain = (id) => {
26
26
  const toApiPath = compile(API_DOMAIN, "api");
27
- const url = toApiPath({ id });
27
+ const url = toApiPath({ id: `${id}` });
28
28
  const { data, error } = useSWR(url, apiJson);
29
29
  return {
30
30
  data: data?.data?.data,
@@ -42,7 +42,7 @@ export const useDomainCreate = () => {
42
42
 
43
43
  export const useDomainUpdate = (id) => {
44
44
  const { mutate } = useSWRConfig();
45
- const url = compile(API_DOMAIN)({ id });
45
+ const url = compile(API_DOMAIN)({ id: `${id}` });
46
46
  const mutator = useSWRMutations(url, (url, { arg }) =>
47
47
  apiJsonPatch(url, arg)
48
48
  );
@@ -60,7 +60,7 @@ export const useDomainUpdate = (id) => {
60
60
 
61
61
  export const useDomainDelete = (id) => {
62
62
  const { mutate } = useSWRConfig();
63
- const url = compile(API_DOMAIN)({ id });
63
+ const url = compile(API_DOMAIN)({ id: `${id}` });
64
64
  const mutator = useSWRMutations(url, (url, { arg }) =>
65
65
  apiJsonDelete(url, arg)
66
66
  );
@@ -1,13 +1,12 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
- import { useHistory } from "react-router-dom";
2
+ import { useNavigate } from "react-router";
4
3
 
5
4
  import { linkTo } from "@truedat/core/routes";
6
5
  import AddResourceMember from "@truedat/core/components/AddResourceMember";
7
6
 
8
7
  const AddDomainMember = ({ id }) => {
9
- const history = useHistory();
10
- const onSuccess = () => history.push(linkTo.DOMAIN_MEMBERS({ id }));
8
+ const navigate = useNavigate();
9
+ const onSuccess = () => navigate(linkTo.DOMAIN_MEMBERS({ id }));
11
10
  return <AddResourceMember type="domain" id={`${id}`} onSuccess={onSuccess} />;
12
11
  };
13
12
 
@@ -1,6 +1,5 @@
1
- import React from "react";
2
1
  import PropTypes from "prop-types";
3
- import { Route, Switch } from "react-router-dom";
2
+ import { Route, Routes } from "react-router";
4
3
  import { Segment } from "semantic-ui-react";
5
4
  import { DOMAIN_NEW, DOMAIN_EDIT } from "@truedat/core/routes";
6
5
  import { useDomain } from "../../hooks/useDomains";
@@ -15,29 +14,26 @@ export const Domain = ({ domainId, domains, taxonomyConfig }) => {
15
14
 
16
15
  return domain ? (
17
16
  <Segment>
18
- <Switch>
17
+ <Routes>
18
+ <Route path="edit" element={<EditDomain domain={domain} />} />
19
+ <Route path="new" element={<NewDomain domain={domain} />} />
19
20
  <Route
20
- exact
21
- path={DOMAIN_EDIT}
22
- render={() => <EditDomain domain={domain} />}
21
+ path="*"
22
+ element={
23
+ <>
24
+ <DomainDetail id={domain.id} />
25
+ <DomainTabs domain={domain} taxonomyConfig={taxonomyConfig} />
26
+ <Segment attached="bottom">
27
+ <DomainContent
28
+ domain={domain}
29
+ domains={domains}
30
+ taxonomyConfig={taxonomyConfig}
31
+ />
32
+ </Segment>
33
+ </>
34
+ }
23
35
  />
24
- <Route
25
- exact
26
- path={DOMAIN_NEW}
27
- render={() => <NewDomain domain={domain} />}
28
- />
29
- <>
30
- <DomainDetail id={domain.id} />
31
- <DomainTabs domain={domain} taxonomyConfig={taxonomyConfig} />
32
- <Segment attached="bottom">
33
- <DomainContent
34
- domain={domain}
35
- domains={domains}
36
- taxonomyConfig={taxonomyConfig}
37
- />
38
- </Segment>
39
- </>
40
- </Switch>
36
+ </Routes>
41
37
  </Segment>
42
38
  ) : null;
43
39
  };
@@ -1,7 +1,6 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import PropTypes from "prop-types";
4
- import { Link } from "react-router-dom";
3
+ import { Link } from "react-router";
5
4
  import { Button, Icon } from "semantic-ui-react";
6
5
  import { FormattedMessage, useIntl } from "react-intl";
7
6
  import { ConfirmModal, GroupActions } from "@truedat/core/components";
@@ -1,7 +1,7 @@
1
1
  import _ from "lodash/fp";
2
- import React, { useState } from "react";
2
+ import { useState } from "react";
3
3
  import PropTypes from "prop-types";
4
- import { Link } from "react-router-dom";
4
+ import { Link } from "react-router";
5
5
  import { Card, Header, Icon, Message, Input } from "semantic-ui-react";
6
6
  import { FormattedMessage, useIntl } from "react-intl";
7
7
  import { linkTo } from "@truedat/core/routes";
@@ -24,7 +24,8 @@ export const DomainCard = ({
24
24
  <Card.Meta>
25
25
  {_.get("name")(domain_group) && (
26
26
  <>
27
- <Icon name="object group" /> {_.get("name")(domain_group)}
27
+ <Icon name="object group" />
28
+ {_.get("name")(domain_group)}
28
29
  <br />
29
30
  </>
30
31
  )}
@@ -85,7 +86,6 @@ export const DomainCards = ({ actions, domain, domains }) => {
85
86
  {_.isEmpty(domain) ? <DomainsActions actions={actions} /> : null}
86
87
  </Header.Content>
87
88
  </Header>
88
-
89
89
  {_.isEmpty(visibleDomains) && !_.isEmpty(domainChildren) ? (
90
90
  <Header as="h4">
91
91
  <Icon name="search" />
@@ -94,11 +94,9 @@ export const DomainCards = ({ actions, domain, domains }) => {
94
94
  </Header.Content>
95
95
  </Header>
96
96
  ) : null}
97
-
98
97
  {_.isEmpty(domainChildren) && domain && domain.id ? (
99
98
  <Message header={formatMessage({ id: "domain.children.empty" })} />
100
99
  ) : null}
101
-
102
100
  <Card.Group>{visibleDomains.map(DomainCard)}</Card.Group>
103
101
  </>
104
102
  );