@truedat/bg 8.6.7 → 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 (138) hide show
  1. package/package.json +3 -3
  2. package/src/concepts/api.js +3 -2
  3. package/src/concepts/components/Concept.js +7 -7
  4. package/src/concepts/components/ConceptActions.js +1 -1
  5. package/src/concepts/components/ConceptCompleteness.js +6 -6
  6. package/src/concepts/components/ConceptCreate.js +17 -8
  7. package/src/concepts/components/ConceptCrumbs.js +1 -1
  8. package/src/concepts/components/ConceptDetails.js +1 -1
  9. package/src/concepts/components/ConceptEdit.js +8 -4
  10. package/src/concepts/components/ConceptForm.js +4 -4
  11. package/src/concepts/components/ConceptHeader.js +2 -2
  12. package/src/concepts/components/ConceptLinksDropdownSelector.js +2 -2
  13. package/src/concepts/components/ConceptLinksUploadButton.js +1 -1
  14. package/src/concepts/components/ConceptLoader.js +1 -1
  15. package/src/concepts/components/ConceptRoutes.js +7 -5
  16. package/src/concepts/components/ConceptSubscription.js +2 -2
  17. package/src/concepts/components/ConceptSuggestions.js +40 -43
  18. package/src/concepts/components/ConceptTabs.js +12 -12
  19. package/src/concepts/components/ConceptsActions.js +1 -3
  20. package/src/concepts/components/ConceptsBulkUpdate.js +2 -2
  21. package/src/concepts/components/ConceptsLinksManagement.js +6 -6
  22. package/src/concepts/components/ConceptsTable.js +1 -1
  23. package/src/concepts/components/ConceptsUpdateButton.js +1 -1
  24. package/src/concepts/components/ConceptsUploadButton.js +27 -22
  25. package/src/concepts/components/ConceptsUploadEventsTable.js +9 -6
  26. package/src/concepts/components/EventRow.js +7 -3
  27. package/src/concepts/components/SharedToForm.js +4 -1
  28. package/src/concepts/components/__tests__/Concept.spec.js +2 -2
  29. package/src/concepts/components/__tests__/ConceptArchiveRow.spec.js +1 -1
  30. package/src/concepts/components/__tests__/ConceptCompleteness.spec.js +1 -1
  31. package/src/concepts/components/__tests__/ConceptContext.spec.js +3 -3
  32. package/src/concepts/components/__tests__/ConceptDeleteModalBody.spec.js +6 -6
  33. package/src/concepts/components/__tests__/ConceptEdit.spec.js +4 -4
  34. package/src/concepts/components/__tests__/ConceptForm.spec.js +4 -4
  35. package/src/concepts/components/__tests__/ConceptHeader.spec.js +3 -3
  36. package/src/concepts/components/__tests__/ConceptLinksManagement.spec.js +2 -2
  37. package/src/concepts/components/__tests__/ConceptLinksUploadButton.spec.js +1 -1
  38. package/src/concepts/components/__tests__/ConceptManageDomainPopup.spec.js +10 -10
  39. package/src/concepts/components/__tests__/ConceptRoutes.spec.js +3 -3
  40. package/src/concepts/components/__tests__/ConceptRow.spec.js +2 -2
  41. package/src/concepts/components/__tests__/ConceptSubscription.spec.js +1 -1
  42. package/src/concepts/components/__tests__/ConceptSuggestions.spec.js +60 -48
  43. package/src/concepts/components/__tests__/ConceptTabPane.spec.js +1 -1
  44. package/src/concepts/components/__tests__/ConceptTabs.spec.js +10 -4
  45. package/src/concepts/components/__tests__/Concepts.spec.js +1 -1
  46. package/src/concepts/components/__tests__/ConceptsActions.spec.js +1 -1
  47. package/src/concepts/components/__tests__/ConceptsBulkUpdate.spec.js +3 -3
  48. package/src/concepts/components/__tests__/ConceptsLabelResults.spec.js +1 -1
  49. package/src/concepts/components/__tests__/ConceptsPanel.spec.js +1 -1
  50. package/src/concepts/components/__tests__/ConceptsTable.spec.js +16 -16
  51. package/src/concepts/components/__tests__/ConceptsUpdateButton.spec.js +2 -2
  52. package/src/concepts/components/__tests__/ConceptsUploadButton.spec.js +3 -3
  53. package/src/concepts/components/__tests__/Events.spec.js +6 -4
  54. package/src/concepts/components/__tests__/SharedToDomains.spec.js +1 -1
  55. package/src/concepts/components/__tests__/SharedToDomainsPopup.spec.js +5 -5
  56. package/src/concepts/components/__tests__/SharedToForm.spec.js +4 -4
  57. package/src/concepts/constants/mappings.js +6 -6
  58. package/src/concepts/hooks/useConcepts.js +6 -6
  59. package/src/concepts/hooks/useUploadEvents.js +1 -1
  60. package/src/concepts/reducers/__tests__/bulkUpdateLoading.spec.js +2 -2
  61. package/src/concepts/reducers/__tests__/concept.spec.js +7 -7
  62. package/src/concepts/reducers/__tests__/conceptActions.spec.js +5 -5
  63. package/src/concepts/reducers/__tests__/conceptArchive.spec.js +2 -2
  64. package/src/concepts/reducers/__tests__/conceptArchiveLoading.spec.js +2 -2
  65. package/src/concepts/reducers/__tests__/conceptLoading.spec.js +1 -1
  66. package/src/concepts/reducers/__tests__/conceptPermissions.spec.js +7 -7
  67. package/src/concepts/reducers/__tests__/conceptRedirect.spec.js +17 -17
  68. package/src/concepts/reducers/__tests__/conceptUpdating.spec.js +2 -2
  69. package/src/concepts/reducers/__tests__/conceptsDownloading.spec.js +2 -2
  70. package/src/concepts/reducers/__tests__/savingSharedTo.spec.js +1 -1
  71. package/src/concepts/reducers/__tests__/sharedToDomains.spec.js +6 -6
  72. package/src/concepts/reducers/conceptArchive.js +1 -1
  73. package/src/concepts/reducers/conceptRedirect.js +2 -6
  74. package/src/concepts/relations/components/ConceptImplementationLinks.js +5 -5
  75. package/src/concepts/relations/components/ConceptLinkActions.js +3 -1
  76. package/src/concepts/relations/components/ConceptLinksApprovalResults.js +2 -1
  77. package/src/concepts/relations/components/ConceptLinksApprovals.js +4 -4
  78. package/src/concepts/relations/components/ConceptLinkstRequestGrantButton.js +2 -2
  79. package/src/concepts/relations/components/ConceptRelationForm.js +2 -2
  80. package/src/concepts/relations/components/ConceptRelationRow.js +2 -2
  81. package/src/concepts/relations/components/ConceptRelations.js +19 -33
  82. package/src/concepts/relations/components/ConceptRelationsRoutes.js +3 -3
  83. package/src/concepts/relations/components/ConceptRelationsSummary.js +2 -2
  84. package/src/concepts/relations/components/ConceptSelector.js +4 -4
  85. package/src/concepts/relations/components/ConceptStructureLinks.js +1 -1
  86. package/src/concepts/relations/components/SliderWithFilter.js +20 -7
  87. package/src/concepts/relations/components/__tests__/ConceptImplementationLinks.spec.js +0 -1
  88. package/src/concepts/relations/components/__tests__/ConceptLinkActions.spec.js +41 -10
  89. package/src/concepts/relations/components/__tests__/ConceptLinksActions.spec.js +5 -5
  90. package/src/concepts/relations/components/__tests__/ConceptLinksApprovalResults.spec.js +1 -1
  91. package/src/concepts/relations/components/__tests__/ConceptLinksApprovals.spec.js +1 -1
  92. package/src/concepts/relations/components/__tests__/ConceptLinksApprovalsLabelResults.spec.js +1 -1
  93. package/src/concepts/relations/components/__tests__/ConceptLinksApprovalsRow.spec.js +5 -5
  94. package/src/concepts/relations/components/__tests__/ConceptLinksApprovalsTable.spec.js +1 -1
  95. package/src/concepts/relations/components/__tests__/ConceptLinkstRequestGrantButton.spec.js +10 -5
  96. package/src/concepts/relations/components/__tests__/ConceptRelationForm.spec.js +4 -4
  97. package/src/concepts/relations/components/__tests__/ConceptRelations.spec.js +1 -1
  98. package/src/concepts/relations/components/__tests__/ConceptRelationsRoutes.spec.js +1 -1
  99. package/src/concepts/relations/components/__tests__/ConceptSelector.spec.js +10 -10
  100. package/src/concepts/relations/components/__tests__/ConceptStructureLinks.spec.js +3 -7
  101. package/src/concepts/relations/components/__tests__/SliderWithFilter.spec.js +6 -8
  102. package/src/concepts/relations/hooks/useLinks.js +3 -3
  103. package/src/concepts/relations/sagas/linkConcept.js +1 -1
  104. package/src/concepts/relations/selectors/__tests__/getBusinessConceptsLinksToImplementationsColumns.spec.js +1 -1
  105. package/src/concepts/relations/selectors/getBusinessConceptsLinksToImplementationsColumns.js +1 -1
  106. package/src/concepts/relations/selectors/getConceptImplementationLinks.js +4 -4
  107. package/src/concepts/relations/selectors/getConceptLinks.js +7 -7
  108. package/src/concepts/relations/selectors/getConceptRelations.js +9 -9
  109. package/src/concepts/relations/selectors/getLinksSearchColumns.js +3 -3
  110. package/src/concepts/sagas/bulkUpdate.js +1 -1
  111. package/src/concepts/selectors/__tests__/getConceptDomainPath.spec.js +1 -1
  112. package/src/concepts/selectors/getConceptColumns.js +1 -1
  113. package/src/concepts/selectors/getConceptDomainPath.js +1 -1
  114. package/src/concepts/selectors/getConceptUploadEventColumns.js +1 -1
  115. package/src/concepts/selectors/getConceptVersionPath.js +1 -1
  116. package/src/concepts/selectors/getTemplateFields.js +1 -1
  117. package/src/concepts/selectors/getTemplateGroups.js +1 -1
  118. package/src/hooks/useDomains.js +2 -2
  119. package/src/messages/index.js +1 -1
  120. package/src/taxonomy/components/DomainActions.js +4 -4
  121. package/src/taxonomy/components/DomainCards.js +3 -3
  122. package/src/taxonomy/components/DomainContent.js +1 -1
  123. package/src/taxonomy/components/DomainForm.js +6 -6
  124. package/src/taxonomy/components/DomainImplementations.js +2 -3
  125. package/src/taxonomy/components/DomainTabs.js +2 -2
  126. package/src/taxonomy/components/__tests__/Domain.spec.js +6 -6
  127. package/src/taxonomy/components/__tests__/DomainCards.spec.js +1 -1
  128. package/src/taxonomy/components/__tests__/DomainContent.spec.js +10 -10
  129. package/src/taxonomy/components/__tests__/DomainForm.spec.js +5 -5
  130. package/src/taxonomy/components/__tests__/DomainImplmentation.spec.js +3 -3
  131. package/src/taxonomy/components/__tests__/DomainRoutes.spec.js +1 -1
  132. package/src/taxonomy/components/__tests__/DomainStructures.spec.js +5 -3
  133. package/src/taxonomy/components/__tests__/DomainTabs.spec.js +7 -7
  134. package/src/taxonomy/components/__tests__/Domains.spec.js +8 -8
  135. package/src/taxonomy/components/__tests__/DomainsActions.spec.js +1 -1
  136. package/src/taxonomy/selectors/__tests__/getVisibleDomains.spec.js +4 -4
  137. package/src/taxonomy/selectors/getDomainsConcept.js +9 -9
  138. package/src/taxonomy/selectors/index.js +8 -8
@@ -6,7 +6,7 @@ const fooState = { foo: "bar" };
6
6
  describe("reducers: conceptPermissions", () => {
7
7
  const initialState = {};
8
8
  const actions = {
9
- share: { href: "/api/share", method: "PATCH" }
9
+ share: { href: "/api/share", method: "PATCH" },
10
10
  };
11
11
 
12
12
  it("should provide the initial state", () => {
@@ -15,13 +15,13 @@ describe("reducers: conceptPermissions", () => {
15
15
 
16
16
  it("should handle the clearConcept.TRIGGER action", () => {
17
17
  expect(
18
- conceptPermissions(fooState, { type: clearConcept.TRIGGER })
18
+ conceptPermissions(fooState, { type: clearConcept.TRIGGER }),
19
19
  ).toEqual(initialState);
20
20
  });
21
21
 
22
22
  it("should handle the fetchConcept.TRIGGER action", () => {
23
23
  expect(
24
- conceptPermissions(fooState, { type: fetchConcept.TRIGGER })
24
+ conceptPermissions(fooState, { type: fetchConcept.TRIGGER }),
25
25
  ).toEqual(initialState);
26
26
  });
27
27
 
@@ -29,8 +29,8 @@ describe("reducers: conceptPermissions", () => {
29
29
  expect(
30
30
  conceptPermissions(fooState, {
31
31
  type: fetchConcept.SUCCESS,
32
- payload: { data: { actions } }
33
- })
32
+ payload: { data: { actions } },
33
+ }),
34
34
  ).toEqual(actions);
35
35
  });
36
36
 
@@ -38,8 +38,8 @@ describe("reducers: conceptPermissions", () => {
38
38
  expect(
39
39
  conceptPermissions(fooState, {
40
40
  type: conceptAction.SUCCESS,
41
- payload: { data: { actions } }
42
- })
41
+ payload: { data: { actions } },
42
+ }),
43
43
  ).toEqual(actions);
44
44
  });
45
45
 
@@ -2,7 +2,7 @@ import {
2
2
  clearRedirect,
3
3
  createSubscription,
4
4
  deleteSubscription,
5
- updateSubscription
5
+ updateSubscription,
6
6
  } from "@truedat/core/routines";
7
7
  import { bulkUpdate, conceptAction, linkConcept } from "../../routines";
8
8
  import { conceptUrl } from "../conceptRedirect";
@@ -25,8 +25,8 @@ describe("reducers: conceptRedirect", () => {
25
25
  conceptRedirect(fooState, {
26
26
  type: conceptAction.SUCCESS,
27
27
  payload: { data },
28
- meta
29
- })
28
+ meta,
29
+ }),
30
30
  ).toBe(conceptUrl(concept));
31
31
  });
32
32
 
@@ -34,8 +34,8 @@ describe("reducers: conceptRedirect", () => {
34
34
  expect(
35
35
  conceptRedirect(fooState, {
36
36
  type: linkConcept.SUCCESS,
37
- meta: { redirectUrl }
38
- })
37
+ meta: { redirectUrl },
38
+ }),
39
39
  ).toBe(redirectUrl);
40
40
  });
41
41
 
@@ -43,8 +43,8 @@ describe("reducers: conceptRedirect", () => {
43
43
  expect(
44
44
  conceptRedirect(fooState, {
45
45
  type: bulkUpdate.SUCCESS,
46
- meta: { redirectUrl }
47
- })
46
+ meta: { redirectUrl },
47
+ }),
48
48
  ).toBe(redirectUrl);
49
49
  });
50
50
 
@@ -52,8 +52,8 @@ describe("reducers: conceptRedirect", () => {
52
52
  expect(
53
53
  conceptRedirect(fooState, {
54
54
  type: updateSubscription.SUCCESS,
55
- payload: { bar: "baz" }
56
- })
55
+ payload: { bar: "baz" },
56
+ }),
57
57
  ).toBe(fooState);
58
58
  });
59
59
 
@@ -61,8 +61,8 @@ describe("reducers: conceptRedirect", () => {
61
61
  expect(
62
62
  conceptRedirect(fooState, {
63
63
  type: deleteSubscription.SUCCESS,
64
- payload: { bar: "baz" }
65
- })
64
+ payload: { bar: "baz" },
65
+ }),
66
66
  ).toBe(fooState);
67
67
  });
68
68
 
@@ -70,16 +70,16 @@ describe("reducers: conceptRedirect", () => {
70
70
  expect(
71
71
  conceptRedirect(fooState, {
72
72
  type: createSubscription.SUCCESS,
73
- payload: { bar: "baz" }
74
- })
73
+ payload: { bar: "baz" },
74
+ }),
75
75
  ).toBe(fooState);
76
76
  });
77
77
 
78
78
  it("should return initial state on clearRedirect.TRIGGER", () => {
79
79
  expect(
80
80
  conceptRedirect(fooState, {
81
- type: clearRedirect.TRIGGER
82
- })
81
+ type: clearRedirect.TRIGGER,
82
+ }),
83
83
  ).toBe("");
84
84
  });
85
85
 
@@ -88,8 +88,8 @@ describe("reducers: conceptRedirect", () => {
88
88
  conceptRedirect(fooState, {
89
89
  type: conceptAction.SUCCESS,
90
90
  payload: { data },
91
- meta: { action: "archive" }
92
- })
91
+ meta: { action: "archive" },
92
+ }),
93
93
  ).toBe(fooState);
94
94
  });
95
95
  });
@@ -10,13 +10,13 @@ describe("reducers: conceptUpdating", () => {
10
10
 
11
11
  it("should be true after receiving the setConfidentialConcept.TRIGGER action", () => {
12
12
  expect(
13
- conceptUpdating(fooState, { type: setConfidentialConcept.TRIGGER })
13
+ conceptUpdating(fooState, { type: setConfidentialConcept.TRIGGER }),
14
14
  ).toBe(true);
15
15
  });
16
16
 
17
17
  it("should be false after receiving the setConfidentialConcept.FULFILL action", () => {
18
18
  expect(
19
- conceptUpdating(fooState, { type: setConfidentialConcept.FULFILL })
19
+ conceptUpdating(fooState, { type: setConfidentialConcept.FULFILL }),
20
20
  ).toBe(false);
21
21
  });
22
22
 
@@ -10,13 +10,13 @@ describe("reducers: conceptsDownloading", () => {
10
10
 
11
11
  it("should be true after receiving the downloadConcepts.TRIGGER action", () => {
12
12
  expect(
13
- conceptsDownloading(fooState, { type: downloadConcepts.TRIGGER })
13
+ conceptsDownloading(fooState, { type: downloadConcepts.TRIGGER }),
14
14
  ).toBe(true);
15
15
  });
16
16
 
17
17
  it("should be false after receiving the downloadConcepts.FULFILL action", () => {
18
18
  expect(
19
- conceptsDownloading(fooState, { type: downloadConcepts.FULFILL })
19
+ conceptsDownloading(fooState, { type: downloadConcepts.FULFILL }),
20
20
  ).toBe(false);
21
21
  });
22
22
 
@@ -14,7 +14,7 @@ describe("reducers: savingSharedTo", () => {
14
14
 
15
15
  it("should be false after receiving the fetchConcept.FULFILL action", () => {
16
16
  expect(savingSharedTo(fooState, { type: saveSharedTo.FULFILL })).toBe(
17
- false
17
+ false,
18
18
  );
19
19
  });
20
20
 
@@ -14,13 +14,13 @@ describe("reducers: sharedToDomains", () => {
14
14
 
15
15
  it("should handle the fetchConcept.TRIGGER action", () => {
16
16
  expect(sharedToDomains(fooState, { type: fetchConcept.TRIGGER })).toEqual(
17
- initialState
17
+ initialState,
18
18
  );
19
19
  });
20
20
 
21
21
  it("should handle the saveSharedTo.TRIGGER action", () => {
22
22
  expect(sharedToDomains(fooState, { type: saveSharedTo.TRIGGER })).toEqual(
23
- initialState
23
+ initialState,
24
24
  );
25
25
  });
26
26
 
@@ -28,8 +28,8 @@ describe("reducers: sharedToDomains", () => {
28
28
  expect(
29
29
  sharedToDomains(fooState, {
30
30
  type: saveSharedTo.SUCCESS,
31
- payload: { data }
32
- })
31
+ payload: { data },
32
+ }),
33
33
  ).toEqual(shared_to);
34
34
  });
35
35
 
@@ -37,8 +37,8 @@ describe("reducers: sharedToDomains", () => {
37
37
  expect(
38
38
  sharedToDomains(fooState, {
39
39
  type: fetchConcept.SUCCESS,
40
- payload: { data }
41
- })
40
+ payload: { data },
41
+ }),
42
42
  ).toEqual(shared_to);
43
43
  });
44
44
 
@@ -22,7 +22,7 @@ const conceptArchive = (state = initialState, { type, payload }) => {
22
22
  return _.flow(
23
23
  _.propOr([], "data"),
24
24
  _.map(pickFields),
25
- _.orderBy(["version"], ["desc"])
25
+ _.orderBy(["version"], ["desc"]),
26
26
  )(payload);
27
27
  default:
28
28
  return state;
@@ -6,11 +6,7 @@ import {
6
6
  deleteSubscription,
7
7
  updateSubscription,
8
8
  } from "@truedat/core/routines";
9
- import {
10
- bulkUpdate,
11
- conceptAction,
12
- linkConcept,
13
- } from "../routines";
9
+ import { bulkUpdate, conceptAction, linkConcept } from "../routines";
14
10
 
15
11
  const initialState = "";
16
12
 
@@ -18,7 +14,7 @@ export const conceptUrl = (concept) => linkTo.CONCEPT_VERSION(concept);
18
14
 
19
15
  export const conceptRedirect = (
20
16
  state = initialState,
21
- { type, payload, meta }
17
+ { type, payload, meta },
22
18
  ) => {
23
19
  switch (type) {
24
20
  case clearRedirect.TRIGGER:
@@ -19,7 +19,7 @@ import {
19
19
  } from "../selectors";
20
20
 
21
21
  const RuleImplementationsTable = lazy(
22
- () => import("@truedat/dq/components/SimpleRuleImplementationsTable")
22
+ () => import("@truedat/dq/components/SimpleRuleImplementationsTable"),
23
23
  );
24
24
 
25
25
  export const ConceptImplementationLinks = ({
@@ -84,7 +84,7 @@ export const ConceptImplementationLinks = ({
84
84
  columns={columns}
85
85
  />
86
86
  </Segment>
87
- )
87
+ ),
88
88
  )
89
89
  )}
90
90
  </Segment>
@@ -104,13 +104,13 @@ const mapStateToProps = (state) => ({
104
104
  columns: getBusinessConceptsLinksToImplementationsColumns(state),
105
105
  groups: getConceptImplementationLinks(state),
106
106
  createImplementation: _.prop("create_implementation")(
107
- state.conceptPermissions
107
+ state.conceptPermissions,
108
108
  ),
109
109
  createLinkImplementation: _.prop("create_link_implementation")(
110
- state.conceptPermissions
110
+ state.conceptPermissions,
111
111
  ),
112
112
  createRawImplementation: _.prop("create_raw_implementation")(
113
- state.conceptPermissions
113
+ state.conceptPermissions,
114
114
  ),
115
115
  visible: _.prop("status")(state.concept) != "deprecated",
116
116
  });
@@ -62,7 +62,9 @@ const mapStateToProps = ({ deleteRelationLoading }, { action }) => ({
62
62
  loading: _.pathEq("id")(deleteRelationLoading)(action),
63
63
  });
64
64
 
65
- export const DeleteLinkConnected = connect(mapStateToProps, { deleteRelation, })(DeleteLink);
65
+ export const DeleteLinkConnected = connect(mapStateToProps, { deleteRelation })(
66
+ DeleteLink,
67
+ );
66
68
 
67
69
  export const LinkActions = ({ delete: deleteAction }) =>
68
70
  deleteAction ? <DeleteLinkConnected action={deleteAction} /> : null;
@@ -13,6 +13,7 @@ export default function LinksApprovalResults() {
13
13
  return null;
14
14
  }
15
15
 
16
+ // eslint-disable-next-line react-hooks/rules-of-hooks
16
17
  const { formatMessage } = useIntl();
17
18
  const relations = state?.relations || [];
18
19
  const isRejection = state.status === "rejected";
@@ -82,7 +83,7 @@ export default function LinksApprovalResults() {
82
83
  })}
83
84
  </Message.Header>
84
85
  {_.map((relation) => relationDecorator(relation))(
85
- errorGroup.relations
86
+ errorGroup.relations,
86
87
  )}
87
88
  </Message>
88
89
  ))(state.errors)}
@@ -17,8 +17,8 @@ import {
17
17
  import { FormattedMessage, useIntl } from "react-intl";
18
18
  import SearchWidget from "@truedat/core/search/SearchWidget";
19
19
  import { useSearchContext } from "@truedat/core/search/SearchContext";
20
- import { useLinksBulkUpdateStatus } from "../hooks/useLinks";
21
20
  import Pagination from "@truedat/core/search/Pagination";
21
+ import { useLinksBulkUpdateStatus } from "../hooks/useLinks";
22
22
  import ConceptLinksApprovalsLabelResults from "./ConceptLinksApprovalsLabelResults";
23
23
  import ConceptLinksApprovalsTable from "./ConceptLinksApprovalsTable";
24
24
 
@@ -56,7 +56,7 @@ export const ConceptLinksApprovals = () => {
56
56
  checkedAll
57
57
  ? setSelectedLinks(_.flow(_.concat(ids), _.uniq)(selectedLinks))
58
58
  : setSelectedLinks(
59
- _.flow(_.difference(selectedLinks), _.uniq)(selectedLinks)
59
+ _.flow(_.difference(selectedLinks), _.uniq)(selectedLinks),
60
60
  );
61
61
  };
62
62
 
@@ -67,8 +67,8 @@ export const ConceptLinksApprovals = () => {
67
67
  ? setSelectedLinks(
68
68
  _.flow(
69
69
  _.remove((selectedId) => _.eq(id, selectedId)),
70
- _.uniq()
71
- )(selectedLinks)
70
+ _.uniq(),
71
+ )(selectedLinks),
72
72
  )
73
73
  : setSelectedLinks(_.flow(_.concat(id), _.uniq)(selectedLinks));
74
74
  };
@@ -20,7 +20,7 @@ export const ConceptLinkstRequestGrantButton = ({
20
20
  _.forEach((structure) => {
21
21
  const isRequested = _.flow(
22
22
  _.find({ id: `${structure.id}` }),
23
- _.negate(_.isUndefined)
23
+ _.negate(_.isUndefined),
24
24
  )(requested);
25
25
 
26
26
  if (!isRequested)
@@ -54,5 +54,5 @@ const mapStateToProps = ({ grantRequestsCart }) => ({
54
54
  });
55
55
 
56
56
  export default connect(mapStateToProps, { addGrantRequestToCart })(
57
- ConceptLinkstRequestGrantButton
57
+ ConceptLinkstRequestGrantButton,
58
58
  );
@@ -11,7 +11,7 @@ import { linkConcept } from "../routines";
11
11
  import ConceptSelector from "./ConceptSelector";
12
12
 
13
13
  const TagTypeDropdownSelector = lazy(
14
- () => import("@truedat/lm/components/TagTypeDropdownSelector")
14
+ () => import("@truedat/lm/components/TagTypeDropdownSelector"),
15
15
  );
16
16
 
17
17
  const filters = {
@@ -100,5 +100,5 @@ const makeMapStateToProps = () => {
100
100
  };
101
101
 
102
102
  export default connect(makeMapStateToProps, { linkConcept })(
103
- ConceptRelationForm
103
+ ConceptRelationForm,
104
104
  );
@@ -9,7 +9,7 @@ import { linkTo } from "@truedat/core/routes";
9
9
  import { deleteConceptRelation } from "../routines";
10
10
 
11
11
  const ConfirmDeleteRelation = lazy(
12
- () => import("@truedat/lm/components/ConfirmDeleteRelation")
12
+ () => import("@truedat/lm/components/ConfirmDeleteRelation"),
13
13
  );
14
14
 
15
15
  const goToConcept = ({ navigate, concept }) => {
@@ -108,5 +108,5 @@ const mapStateToProps = ({ concept, conceptActions }) => ({
108
108
  });
109
109
 
110
110
  export default connect(mapStateToProps, { deleteConceptRelation })(
111
- ConceptRelationRow
111
+ ConceptRelationRow,
112
112
  );
@@ -1,20 +1,9 @@
1
1
  import _ from "lodash/fp";
2
2
  import debounce from "lodash/debounce";
3
- import {
4
- useEffect,
5
- useMemo,
6
- useState,
7
- useRef,
8
- } from "react";
3
+ import { useEffect, useMemo, useState, useRef } from "react";
9
4
  import PropTypes from "prop-types";
10
5
  import { connect } from "react-redux";
11
- import {
12
- Button,
13
- Segment,
14
- Grid,
15
- Icon,
16
- Table,
17
- } from "semantic-ui-react";
6
+ import { Button, Segment, Grid, Icon, Table } from "semantic-ui-react";
18
7
  import { FormattedMessage, useIntl } from "react-intl";
19
8
  import { useLocation } from "react-router";
20
9
  import { useNavigate } from "react-router";
@@ -37,7 +26,6 @@ import ConceptRelationActions from "./ConceptRelationActions";
37
26
  import ConceptRelationRow from "./ConceptRelationRow";
38
27
  import SliderWithFilter from "./SliderWithFilter";
39
28
 
40
-
41
29
  export const ConceptRelationsHeaders = () => (
42
30
  <Table.Header>
43
31
  <Table.Row>
@@ -69,7 +57,8 @@ export const ConceptRelations = ({
69
57
  const hasAppliedConfig = useRef(false);
70
58
 
71
59
  const [graphRender, setGraphRender] = useState(
72
- _.propOr(true, "state.show_graph")(location) && !_.isEmpty(conceptRelations)
60
+ _.propOr(true, "state.show_graph")(location) &&
61
+ !_.isEmpty(conceptRelations),
73
62
  );
74
63
 
75
64
  useEffect(() => {
@@ -97,7 +86,7 @@ export const ConceptRelations = ({
97
86
  linkTo.CONCEPT_LINKS_CONCEPTS({
98
87
  business_concept_id: resource_id,
99
88
  id: "current",
100
- })
89
+ }),
101
90
  );
102
91
  };
103
92
 
@@ -107,20 +96,20 @@ export const ConceptRelations = ({
107
96
  const [traversalTags, setAllowedTags] = useState([]);
108
97
  const [localTraversalTags, setLocalTraversalTags] = useState([]);
109
98
  const traversalTagsDebounceMs = Number.isFinite(
110
- Number(config?.RelatedConceptsTagsDebounceMs)
99
+ Number(config?.RelatedConceptsTagsDebounceMs),
111
100
  )
112
101
  ? Number(config?.RelatedConceptsTagsDebounceMs)
113
102
  : 500;
114
103
  const debouncedSetAllowedTags = useMemo(
115
104
  () => debounce((value) => setAllowedTags(value), traversalTagsDebounceMs),
116
- [traversalTagsDebounceMs]
105
+ [traversalTagsDebounceMs],
117
106
  );
118
107
 
119
108
  useEffect(
120
109
  () => () => {
121
110
  debouncedSetAllowedTags.cancel();
122
111
  },
123
- [debouncedSetAllowedTags]
112
+ [debouncedSetAllowedTags],
124
113
  );
125
114
 
126
115
  const onTraversalTagsChange = (_event, { value }) => {
@@ -152,14 +141,10 @@ export const ConceptRelations = ({
152
141
  }, [relationsGraph, currentId, selectedDepth, maxDepth]);
153
142
 
154
143
  const limitedRelationGraph = useMemo(() => {
155
- if (_.isEmpty(relationsGraph) || !currentId) return { nodes: [], edges: [] };
144
+ if (_.isEmpty(relationsGraph) || !currentId)
145
+ return { nodes: [], edges: [] };
156
146
 
157
- const result = pruneGraph(
158
- relationsGraph,
159
- currentId,
160
- depth,
161
- traversalTags
162
- );
147
+ const result = pruneGraph(relationsGraph, currentId, depth, traversalTags);
163
148
 
164
149
  if (!result) return { nodes: [], edges: [] };
165
150
 
@@ -172,7 +157,7 @@ export const ConceptRelations = ({
172
157
 
173
158
  const colorMap = useMemo(
174
159
  () => buildColorMap(relationsGraph?.edges),
175
- [relationsGraph]
160
+ [relationsGraph],
176
161
  );
177
162
 
178
163
  useEffect(() => {
@@ -192,10 +177,9 @@ export const ConceptRelations = ({
192
177
  value: { target_type: "business_concept", type: "_empty" },
193
178
  },
194
179
  ...tags,
195
- ]
180
+ ],
196
181
  );
197
182
 
198
- // eslint-disable-next-line prettier/prettier
199
183
  _.flow(graphDistinctTags, tagsToOptions, setTagsOptions)(relationsGraph);
200
184
  }, [relationsGraph, formatMessage]);
201
185
 
@@ -203,7 +187,7 @@ export const ConceptRelations = ({
203
187
  const stableGraphKey = useMemo(
204
188
  () =>
205
189
  `graph-${currentId}-${depth}-${_.sortBy(_.identity, traversalTags).join(",")}`,
206
- [currentId, depth, traversalTags]
190
+ [currentId, depth, traversalTags],
207
191
  );
208
192
 
209
193
  return (
@@ -249,7 +233,9 @@ export const ConceptRelations = ({
249
233
  colorMap={colorMap}
250
234
  >
251
235
  <RelationGraphDepth
252
- onChange={(newDepth) => setSelectedDepth(parseInt(newDepth, 10))}
236
+ onChange={(newDepth) =>
237
+ setSelectedDepth(parseInt(newDepth, 10))
238
+ }
253
239
  depth={depth}
254
240
  maxDepth={maxDepth}
255
241
  />
@@ -273,7 +259,7 @@ export const ConceptRelations = ({
273
259
  relationContext={relation.context}
274
260
  {...relation}
275
261
  />
276
- ))
262
+ )),
277
263
  )(conceptRelations)}
278
264
  </Table.Body>
279
265
  </Table>
@@ -307,7 +293,7 @@ const sortByDirectionAndTag = (concept) => {
307
293
 
308
294
  const mapStateToProps = (state) => ({
309
295
  conceptRelations: sortByDirectionAndTag(state.concept)(
310
- getConceptToConceptRelations(state)
296
+ getConceptToConceptRelations(state),
311
297
  ),
312
298
  concept: state.concept,
313
299
  visible: _.prop("status")(state.concept) != "deprecated",
@@ -9,15 +9,15 @@ import ConceptRelationForm from "./ConceptRelationForm";
9
9
  import ConceptImplementationLinks from "./ConceptImplementationLinks";
10
10
 
11
11
  const ConceptStructureLinkForm = React.lazy(
12
- () => import("@truedat/lm/components/ConceptStructureLinkForm")
12
+ () => import("@truedat/lm/components/ConceptStructureLinkForm"),
13
13
  );
14
14
 
15
15
  const ConceptSuggestionLinkForm = React.lazy(
16
- () => import("@truedat/lm/components/ConceptSuggestionLinkForm")
16
+ () => import("@truedat/lm/components/ConceptSuggestionLinkForm"),
17
17
  );
18
18
 
19
19
  const StructureTypesLoader = React.lazy(
20
- () => import("@truedat/dd/components/StructureTypesLoader")
20
+ () => import("@truedat/dd/components/StructureTypesLoader"),
21
21
  );
22
22
 
23
23
  export const ConceptRelationsRoutes = ({ conceptLoaded, relationsLoading }) => {
@@ -38,7 +38,7 @@ const Tag = ({ tag }) => (
38
38
  id={getLinkId(relation, relation.relationSide)}
39
39
  name={relation.context.source.name}
40
40
  />
41
- )
41
+ ),
42
42
  )}
43
43
  </List.List>
44
44
  </List.Item>
@@ -86,5 +86,5 @@ const mapStateToProps = (state, { intl: { formatMessage } }) => ({
86
86
 
87
87
  export default compose(
88
88
  injectIntl,
89
- connect(mapStateToProps)
89
+ connect(mapStateToProps),
90
90
  )(ConceptRelationsSummary);
@@ -26,7 +26,7 @@ const isPositive = (links, id, selectedId) => {
26
26
  : _.find(
27
27
  (link) =>
28
28
  _.propEq("target_id", id)(link) &&
29
- _.propEq("target_type", "business_concept")(link)
29
+ _.propEq("target_type", "business_concept")(link),
30
30
  )(links);
31
31
  return link ? true : false;
32
32
  };
@@ -87,14 +87,14 @@ export const ConceptSelectorTable = ({
87
87
  }) => {
88
88
  const selectedConceptIsFiltered = !_.reduce(
89
89
  (acc, c) => (selectedConcept && c.id == selectedConcept.id) || acc,
90
- false
90
+ false,
91
91
  )(concepts);
92
92
 
93
93
  const isDisabled = (concept) => {
94
94
  return concept
95
95
  ? !_.flow(
96
96
  _.pathOr({}, "_actions"),
97
- _.propOr(true, "can_create_structure_link")
97
+ _.propOr(true, "can_create_structure_link"),
98
98
  )(concept)
99
99
  : false;
100
100
  };
@@ -135,7 +135,7 @@ export const ConceptSelectorTable = ({
135
135
  positive={isPositive(
136
136
  links,
137
137
  s.business_concept_id,
138
- businessConceptId
138
+ businessConceptId,
139
139
  )}
140
140
  extraColumns={extraColumns}
141
141
  />
@@ -74,7 +74,7 @@ ConceptStructureLinksSegment.propTypes = {
74
74
  export const ConceptStructureLinksPane = ({ groups, visible }) => {
75
75
  const structures_ids = _.flow(
76
76
  _.flatMap(([_columns, [_tag, links]]) => links),
77
- _.map(({ resource_id }) => parseInt(resource_id))
77
+ _.map(({ resource_id }) => parseInt(resource_id)),
78
78
  )(groups);
79
79
 
80
80
  const enrichSearchPayload = {