@truedat/bg 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.
- package/package.json +3 -3
- package/src/concepts/api.js +3 -2
- package/src/concepts/components/Concept.js +7 -7
- package/src/concepts/components/ConceptActions.js +1 -1
- package/src/concepts/components/ConceptCompleteness.js +6 -6
- package/src/concepts/components/ConceptCrumbs.js +1 -1
- package/src/concepts/components/ConceptDetails.js +1 -1
- package/src/concepts/components/ConceptHeader.js +2 -2
- package/src/concepts/components/ConceptLinksDropdownSelector.js +2 -2
- package/src/concepts/components/ConceptLinksUploadButton.js +1 -1
- package/src/concepts/components/ConceptLoader.js +1 -1
- package/src/concepts/components/ConceptRoutes.js +7 -5
- package/src/concepts/components/ConceptSubscription.js +2 -2
- package/src/concepts/components/ConceptSuggestions.js +40 -43
- package/src/concepts/components/ConceptTabs.js +12 -12
- package/src/concepts/components/ConceptsActions.js +1 -3
- package/src/concepts/components/ConceptsBulkUpdate.js +2 -2
- package/src/concepts/components/ConceptsLinksManagement.js +6 -6
- package/src/concepts/components/ConceptsTable.js +1 -1
- package/src/concepts/components/ConceptsUpdateButton.js +1 -1
- package/src/concepts/components/ConceptsUploadButton.js +27 -22
- package/src/concepts/components/ConceptsUploadEventsTable.js +9 -6
- package/src/concepts/components/EventRow.js +7 -3
- package/src/concepts/components/SharedToForm.js +4 -1
- package/src/concepts/components/__tests__/Concept.spec.js +2 -2
- package/src/concepts/components/__tests__/ConceptArchiveRow.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptCompleteness.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptContext.spec.js +3 -3
- package/src/concepts/components/__tests__/ConceptDeleteModalBody.spec.js +6 -6
- package/src/concepts/components/__tests__/ConceptEdit.spec.js +4 -4
- package/src/concepts/components/__tests__/ConceptForm.spec.js +4 -4
- package/src/concepts/components/__tests__/ConceptHeader.spec.js +3 -3
- package/src/concepts/components/__tests__/ConceptLinksManagement.spec.js +2 -2
- package/src/concepts/components/__tests__/ConceptLinksUploadButton.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptManageDomainPopup.spec.js +10 -10
- package/src/concepts/components/__tests__/ConceptRoutes.spec.js +3 -3
- package/src/concepts/components/__tests__/ConceptRow.spec.js +2 -2
- package/src/concepts/components/__tests__/ConceptSubscription.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptSuggestions.spec.js +60 -48
- package/src/concepts/components/__tests__/ConceptTabPane.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptTabs.spec.js +10 -4
- package/src/concepts/components/__tests__/Concepts.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptsActions.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptsBulkUpdate.spec.js +3 -3
- package/src/concepts/components/__tests__/ConceptsLabelResults.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptsPanel.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptsTable.spec.js +16 -16
- package/src/concepts/components/__tests__/ConceptsUpdateButton.spec.js +2 -2
- package/src/concepts/components/__tests__/ConceptsUploadButton.spec.js +3 -3
- package/src/concepts/components/__tests__/Events.spec.js +6 -4
- package/src/concepts/components/__tests__/SharedToDomains.spec.js +1 -1
- package/src/concepts/components/__tests__/SharedToDomainsPopup.spec.js +5 -5
- package/src/concepts/components/__tests__/SharedToForm.spec.js +4 -4
- package/src/concepts/constants/mappings.js +6 -6
- package/src/concepts/hooks/useConcepts.js +6 -6
- package/src/concepts/hooks/useUploadEvents.js +1 -1
- package/src/concepts/reducers/__tests__/bulkUpdateLoading.spec.js +2 -2
- package/src/concepts/reducers/__tests__/concept.spec.js +7 -7
- package/src/concepts/reducers/__tests__/conceptActions.spec.js +5 -5
- package/src/concepts/reducers/__tests__/conceptArchive.spec.js +2 -2
- package/src/concepts/reducers/__tests__/conceptArchiveLoading.spec.js +2 -2
- package/src/concepts/reducers/__tests__/conceptLoading.spec.js +1 -1
- package/src/concepts/reducers/__tests__/conceptPermissions.spec.js +7 -7
- package/src/concepts/reducers/__tests__/conceptRedirect.spec.js +17 -17
- package/src/concepts/reducers/__tests__/conceptUpdating.spec.js +2 -2
- package/src/concepts/reducers/__tests__/conceptsDownloading.spec.js +2 -2
- package/src/concepts/reducers/__tests__/savingSharedTo.spec.js +1 -1
- package/src/concepts/reducers/__tests__/sharedToDomains.spec.js +6 -6
- package/src/concepts/reducers/conceptArchive.js +1 -1
- package/src/concepts/reducers/conceptRedirect.js +2 -6
- package/src/concepts/relations/components/ConceptImplementationLinks.js +5 -5
- package/src/concepts/relations/components/ConceptLinkActions.js +3 -1
- package/src/concepts/relations/components/ConceptLinksApprovalResults.js +2 -1
- package/src/concepts/relations/components/ConceptLinksApprovals.js +4 -4
- package/src/concepts/relations/components/ConceptLinkstRequestGrantButton.js +2 -2
- package/src/concepts/relations/components/ConceptRelationForm.js +2 -2
- package/src/concepts/relations/components/ConceptRelationRow.js +2 -2
- package/src/concepts/relations/components/ConceptRelations.js +19 -33
- package/src/concepts/relations/components/ConceptRelationsRoutes.js +3 -3
- package/src/concepts/relations/components/ConceptRelationsSummary.js +2 -2
- package/src/concepts/relations/components/ConceptSelector.js +4 -4
- package/src/concepts/relations/components/ConceptStructureLinks.js +1 -1
- package/src/concepts/relations/components/SliderWithFilter.js +20 -7
- package/src/concepts/relations/components/__tests__/ConceptImplementationLinks.spec.js +0 -1
- package/src/concepts/relations/components/__tests__/ConceptLinkActions.spec.js +41 -10
- package/src/concepts/relations/components/__tests__/ConceptLinksActions.spec.js +5 -5
- package/src/concepts/relations/components/__tests__/ConceptLinksApprovalResults.spec.js +1 -1
- package/src/concepts/relations/components/__tests__/ConceptLinksApprovals.spec.js +1 -1
- package/src/concepts/relations/components/__tests__/ConceptLinksApprovalsLabelResults.spec.js +1 -1
- package/src/concepts/relations/components/__tests__/ConceptLinksApprovalsRow.spec.js +5 -5
- package/src/concepts/relations/components/__tests__/ConceptLinksApprovalsTable.spec.js +1 -1
- package/src/concepts/relations/components/__tests__/ConceptLinkstRequestGrantButton.spec.js +10 -5
- package/src/concepts/relations/components/__tests__/ConceptRelationForm.spec.js +4 -4
- package/src/concepts/relations/components/__tests__/ConceptRelations.spec.js +1 -1
- package/src/concepts/relations/components/__tests__/ConceptRelationsRoutes.spec.js +1 -1
- package/src/concepts/relations/components/__tests__/ConceptSelector.spec.js +10 -10
- package/src/concepts/relations/components/__tests__/ConceptStructureLinks.spec.js +3 -7
- package/src/concepts/relations/components/__tests__/SliderWithFilter.spec.js +6 -8
- package/src/concepts/relations/hooks/useLinks.js +3 -3
- package/src/concepts/relations/sagas/linkConcept.js +1 -1
- package/src/concepts/relations/selectors/__tests__/getBusinessConceptsLinksToImplementationsColumns.spec.js +1 -1
- package/src/concepts/relations/selectors/getBusinessConceptsLinksToImplementationsColumns.js +1 -1
- package/src/concepts/relations/selectors/getConceptImplementationLinks.js +4 -4
- package/src/concepts/relations/selectors/getConceptLinks.js +7 -7
- package/src/concepts/relations/selectors/getConceptRelations.js +9 -9
- package/src/concepts/relations/selectors/getLinksSearchColumns.js +3 -3
- package/src/concepts/sagas/bulkUpdate.js +1 -1
- package/src/concepts/selectors/__tests__/getConceptDomainPath.spec.js +1 -1
- package/src/concepts/selectors/getConceptColumns.js +1 -1
- package/src/concepts/selectors/getConceptDomainPath.js +1 -1
- package/src/concepts/selectors/getConceptUploadEventColumns.js +1 -1
- package/src/concepts/selectors/getConceptVersionPath.js +1 -1
- package/src/concepts/selectors/getTemplateFields.js +1 -1
- package/src/concepts/selectors/getTemplateGroups.js +1 -1
- package/src/hooks/useDomains.js +2 -2
- package/src/messages/index.js +1 -1
- package/src/taxonomy/components/DomainActions.js +4 -4
- package/src/taxonomy/components/DomainCards.js +3 -3
- package/src/taxonomy/components/DomainContent.js +1 -1
- package/src/taxonomy/components/DomainForm.js +6 -6
- package/src/taxonomy/components/DomainImplementations.js +2 -3
- package/src/taxonomy/components/DomainTabs.js +2 -2
- package/src/taxonomy/components/__tests__/Domain.spec.js +6 -6
- package/src/taxonomy/components/__tests__/DomainCards.spec.js +1 -1
- package/src/taxonomy/components/__tests__/DomainContent.spec.js +10 -10
- package/src/taxonomy/components/__tests__/DomainForm.spec.js +5 -5
- package/src/taxonomy/components/__tests__/DomainImplmentation.spec.js +3 -3
- package/src/taxonomy/components/__tests__/DomainRoutes.spec.js +1 -1
- package/src/taxonomy/components/__tests__/DomainStructures.spec.js +5 -3
- package/src/taxonomy/components/__tests__/DomainTabs.spec.js +7 -7
- package/src/taxonomy/components/__tests__/Domains.spec.js +8 -8
- package/src/taxonomy/components/__tests__/DomainsActions.spec.js +1 -1
- package/src/taxonomy/selectors/__tests__/getVisibleDomains.spec.js +4 -4
- package/src/taxonomy/selectors/getDomainsConcept.js +9 -9
- package/src/taxonomy/selectors/index.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/bg",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.1",
|
|
4
4
|
"description": "Truedat Web Business Glossary",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@testing-library/jest-dom": "^6.6.3",
|
|
55
55
|
"@testing-library/react": "^16.3.0",
|
|
56
56
|
"@testing-library/user-event": "^14.6.1",
|
|
57
|
-
"@truedat/test": "8.7.
|
|
57
|
+
"@truedat/test": "8.7.1",
|
|
58
58
|
"identity-obj-proxy": "^3.0.0",
|
|
59
59
|
"jest": "^29.7.0",
|
|
60
60
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"semantic-ui-react": "^3.0.0-beta.2",
|
|
88
88
|
"swr": "^2.3.3"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "f7605a6ea3f78839b42bb7d8339eec125ba49acb"
|
|
91
91
|
}
|
package/src/concepts/api.js
CHANGED
|
@@ -10,7 +10,8 @@ const API_BUSINESS_CONCEPT_VERSIONS_SEARCH =
|
|
|
10
10
|
const API_BUSINESS_CONCEPT_VERSIONS_UPLOAD =
|
|
11
11
|
"/api/business_concept_versions/upload";
|
|
12
12
|
const API_CONCEPT_ARCHIVE = "/api/business_concepts/:id/versions";
|
|
13
|
-
const API_CONCEPT_LINKS_DOWNLOAD =
|
|
13
|
+
const API_CONCEPT_LINKS_DOWNLOAD =
|
|
14
|
+
"/api/business_concept_versions/links/download";
|
|
14
15
|
const API_CONCEPT_LINKS_UPLOAD = "/api/relations/links/upload";
|
|
15
16
|
const API_CONCEPT_FILTERS = "/api/business_concept_filters/search";
|
|
16
17
|
const API_CONCEPT_SHARED_DOMAINS = "/api/business_concepts/:id/shared_domains";
|
|
@@ -20,7 +21,7 @@ const API_BUSINESS_CONCEPT_BULK_UPLOAD =
|
|
|
20
21
|
"/api/business_concepts/bulk_upload_event";
|
|
21
22
|
const API_BUSINESS_CONCEPT_SET_CONFIDENTIAL =
|
|
22
23
|
"/api/business_concept_versions/:id/set_confidential";
|
|
23
|
-
const API_CONCEPT_SUGGESTIONS = "/api/business_concept_versions/suggestions"
|
|
24
|
+
const API_CONCEPT_SUGGESTIONS = "/api/business_concept_versions/suggestions";
|
|
24
25
|
|
|
25
26
|
export {
|
|
26
27
|
API_CONCEPT_SUGGESTIONS,
|
|
@@ -24,15 +24,15 @@ import SharedToDomains from "./SharedToDomains";
|
|
|
24
24
|
import ConceptContextProvider, { useConceptContext } from "./ConceptContext";
|
|
25
25
|
|
|
26
26
|
const EventsLoader = lazy(
|
|
27
|
-
() => import("@truedat/audit/components/EventsLoader")
|
|
27
|
+
() => import("@truedat/audit/components/EventsLoader"),
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
const RelationsLoader = lazy(
|
|
31
|
-
() => import("@truedat/lm/components/RelationsLoader")
|
|
31
|
+
() => import("@truedat/lm/components/RelationsLoader"),
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
const ConceptRulesLoader = lazy(
|
|
35
|
-
() => import("@truedat/dq/components/ConceptRulesLoader")
|
|
35
|
+
() => import("@truedat/dq/components/ConceptRulesLoader"),
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
export const Concept = ({ id, concept }) => {
|
|
@@ -44,7 +44,7 @@ export const Concept = ({ id, concept }) => {
|
|
|
44
44
|
|
|
45
45
|
const defaultLang = _.flow(
|
|
46
46
|
_.find({ is_default: true }),
|
|
47
|
-
_.prop("lang")
|
|
47
|
+
_.prop("lang"),
|
|
48
48
|
)(locales);
|
|
49
49
|
|
|
50
50
|
const initialLang = concept.status == "published" ? locale : defaultLang;
|
|
@@ -57,10 +57,10 @@ export const Concept = ({ id, concept }) => {
|
|
|
57
57
|
const content = _.getOr({}, "dynamic_content")(concept);
|
|
58
58
|
|
|
59
59
|
const { noTranslatable: noTranslatableFields } = splitTranslatableFields(
|
|
60
|
-
concept.template
|
|
60
|
+
concept.template,
|
|
61
61
|
);
|
|
62
62
|
const noTranslatableContent = _.pick(_.keys(noTranslatableFields))(
|
|
63
|
-
concept.dynamic_content
|
|
63
|
+
concept.dynamic_content,
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
const i18nContent = concept.i18n_content || {};
|
|
@@ -92,7 +92,7 @@ export const Concept = ({ id, concept }) => {
|
|
|
92
92
|
};
|
|
93
93
|
}),
|
|
94
94
|
_.orderBy(["isDefault", "isRequired", "lang"], ["desc", "desc", "asc"]),
|
|
95
|
-
_.keyBy("lang")
|
|
95
|
+
_.keyBy("lang"),
|
|
96
96
|
)(locales);
|
|
97
97
|
|
|
98
98
|
const selectedContent = i18nConcept[selectedLang]?.content || concept.content;
|
|
@@ -11,7 +11,7 @@ const fetchMissingRequiredFields = (
|
|
|
11
11
|
concept,
|
|
12
12
|
content,
|
|
13
13
|
isDefault,
|
|
14
|
-
splitFields
|
|
14
|
+
splitFields,
|
|
15
15
|
) => {
|
|
16
16
|
return _.flow(
|
|
17
17
|
_.path("template.content"),
|
|
@@ -27,8 +27,8 @@ const fetchMissingRequiredFields = (
|
|
|
27
27
|
isRequired(field, content) &&
|
|
28
28
|
(_.isNil(value) || _.isEmpty(value))
|
|
29
29
|
);
|
|
30
|
-
})(fields)
|
|
31
|
-
)
|
|
30
|
+
})(fields),
|
|
31
|
+
),
|
|
32
32
|
)(concept);
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -120,7 +120,7 @@ export const ConceptCompleteness = ({ concept }) => {
|
|
|
120
120
|
const i18nContent = concept.i18n_content || {};
|
|
121
121
|
const splitFields = splitTranslatableFields(concept.template);
|
|
122
122
|
const noTranslatableContent = _.pick(_.keys(splitFields.noTranslatable))(
|
|
123
|
-
concept.content
|
|
123
|
+
concept.content,
|
|
124
124
|
);
|
|
125
125
|
|
|
126
126
|
const i18nConcept = _.flow(
|
|
@@ -147,7 +147,7 @@ export const ConceptCompleteness = ({ concept }) => {
|
|
|
147
147
|
};
|
|
148
148
|
}),
|
|
149
149
|
_.orderBy(["isDefault", "isRequired", "lang"], ["desc", "desc", "asc"]),
|
|
150
|
-
_.keyBy("lang")
|
|
150
|
+
_.keyBy("lang"),
|
|
151
151
|
)(locales);
|
|
152
152
|
|
|
153
153
|
return (
|
|
@@ -173,7 +173,7 @@ export const ConceptCompleteness = ({ concept }) => {
|
|
|
173
173
|
isDefault={isDefault}
|
|
174
174
|
splitFields={splitFields}
|
|
175
175
|
/>
|
|
176
|
-
)
|
|
176
|
+
),
|
|
177
177
|
)(i18nConcept)}
|
|
178
178
|
</Segment>
|
|
179
179
|
);
|
|
@@ -5,7 +5,7 @@ import { Segment } from "semantic-ui-react";
|
|
|
5
5
|
import { I18nProvider } from "@truedat/core/i18n";
|
|
6
6
|
|
|
7
7
|
const DynamicFormViewer = lazy(
|
|
8
|
-
() => import("@truedat/df/components/DynamicFormViewer")
|
|
8
|
+
() => import("@truedat/df/components/DynamicFormViewer"),
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
export const ConceptDetails = ({ concept, selectedContent, lang }) => {
|
|
@@ -35,7 +35,7 @@ export const ConceptHeader = ({
|
|
|
35
35
|
|
|
36
36
|
const i18nContent = _.flow(
|
|
37
37
|
_.get("i18n_content"),
|
|
38
|
-
_.get(selectedLang)
|
|
38
|
+
_.get(selectedLang),
|
|
39
39
|
)(concept);
|
|
40
40
|
|
|
41
41
|
const name = _.isUndefined(i18nContent) ? concept?.name : i18nContent?.name;
|
|
@@ -93,7 +93,7 @@ export const ConceptHeader = ({
|
|
|
93
93
|
active={selectedLang == lang}
|
|
94
94
|
/>
|
|
95
95
|
) : null;
|
|
96
|
-
})
|
|
96
|
+
}),
|
|
97
97
|
)(i18nConcept)}
|
|
98
98
|
</ButtonGroup>
|
|
99
99
|
) : null}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Button } from "semantic-ui-react";
|
|
2
2
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
3
3
|
import { UploadModal } from "@truedat/core/components";
|
|
4
|
-
import { useConceptLinksUpload } from "../hooks/useConcepts";
|
|
5
4
|
import { useWebContext } from "@truedat/core/webContext";
|
|
5
|
+
import { useConceptLinksUpload } from "../hooks/useConcepts";
|
|
6
6
|
import { getUploadAlertMessage } from "../selectors/messages";
|
|
7
7
|
|
|
8
8
|
export const ConceptLinksUploadButton = () => {
|
|
@@ -26,6 +26,8 @@ import { useIntl } from "react-intl";
|
|
|
26
26
|
import { getSidemenuGlossarySubscopes } from "@truedat/core/selectors/getSidemenuGlossarySubscopes";
|
|
27
27
|
import { SearchContextProvider } from "@truedat/core/search/SearchContext";
|
|
28
28
|
import { useLinksSearch, useLinksFilters } from "../relations/hooks/useLinks";
|
|
29
|
+
import ConceptLinksApprovals from "../relations/components/ConceptLinksApprovals";
|
|
30
|
+
import ConceptLinksApprovalResults from "../relations/components/ConceptLinksApprovalResults";
|
|
29
31
|
import Concept from "./Concept";
|
|
30
32
|
import ConceptCrumbs from "./ConceptCrumbs";
|
|
31
33
|
import ConceptEdit from "./ConceptEdit";
|
|
@@ -37,19 +39,17 @@ import ConceptsBulkUpdate from "./ConceptsBulkUpdate";
|
|
|
37
39
|
|
|
38
40
|
import ConceptSubscriptionLoader from "./ConceptSubscriptionLoader";
|
|
39
41
|
import ConceptsUploadEvents from "./ConceptsUploadEvents";
|
|
40
|
-
import ConceptLinksApprovals from "../relations/components/ConceptLinksApprovals";
|
|
41
|
-
import ConceptLinksApprovalResults from "../relations/components/ConceptLinksApprovalResults";
|
|
42
42
|
|
|
43
43
|
const RelationTagsLoader = React.lazy(
|
|
44
|
-
() => import("@truedat/lm/components/RelationTagsLoader")
|
|
44
|
+
() => import("@truedat/lm/components/RelationTagsLoader"),
|
|
45
45
|
);
|
|
46
46
|
|
|
47
47
|
const TemplatesLoader = React.lazy(
|
|
48
|
-
() => import("@truedat/core/components/TemplatesLoader")
|
|
48
|
+
() => import("@truedat/core/components/TemplatesLoader"),
|
|
49
49
|
);
|
|
50
50
|
|
|
51
51
|
const RelationsGraphLoader = React.lazy(
|
|
52
|
-
() => import("@truedat/lm/components/RelationsGraphLoader")
|
|
52
|
+
() => import("@truedat/lm/components/RelationsGraphLoader"),
|
|
53
53
|
);
|
|
54
54
|
|
|
55
55
|
const ConceptsComponent = ({ filters, viewKey }) => {
|
|
@@ -189,7 +189,9 @@ const ConceptRoutes = ({
|
|
|
189
189
|
<SearchContextProvider
|
|
190
190
|
initialSortColumn="updated_at"
|
|
191
191
|
initialSortDirection="ascending"
|
|
192
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
192
193
|
useSearch={() => useLinksSearch({ linkable: true })}
|
|
194
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
193
195
|
useFilters={() => useLinksFilters({ linkable: true })}
|
|
194
196
|
pageSize={20}
|
|
195
197
|
defaultFilters={{ status: ["pending"] }}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@truedat/core/routines";
|
|
12
12
|
|
|
13
13
|
const SubscriptionWatchForm = lazy(
|
|
14
|
-
() => import("@truedat/audit/components/SubscriptionWatchForm")
|
|
14
|
+
() => import("@truedat/audit/components/SubscriptionWatchForm"),
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
export const ConceptSubscription = ({
|
|
@@ -143,5 +143,5 @@ const mapDispatchToProps = {
|
|
|
143
143
|
|
|
144
144
|
export default connect(
|
|
145
145
|
mapStateToProps,
|
|
146
|
-
mapDispatchToProps
|
|
146
|
+
mapDispatchToProps,
|
|
147
147
|
)(ConceptSubscription);
|
|
@@ -9,63 +9,60 @@ import { useConceptSuggestions } from "../hooks/useConcepts";
|
|
|
9
9
|
import { ConceptSelectorTable } from "../relations/components/ConceptSelector";
|
|
10
10
|
|
|
11
11
|
const SimilarityColumn = (similarity) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
const { formatMessage } = useIntl();
|
|
13
|
+
return (
|
|
14
|
+
<Popup
|
|
15
|
+
content={formatMessage({ id: "suggestions.similarity.cosine.popup" })}
|
|
16
|
+
trigger={<span>{similarity.toFixed(3)}</span>}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const similarityColumnDefinition = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
name: "similarity",
|
|
23
|
+
fieldSelector: _.prop("similarity"),
|
|
24
|
+
fieldDecorator: SimilarityColumn,
|
|
25
|
+
width: 1,
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export const ConceptSuggestions = ({
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
selectedConcept,
|
|
30
|
+
handleConceptSelected,
|
|
31
31
|
}) => {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const { id } = useParams();
|
|
33
|
+
const structureLinks = useSelector((state) => state.structureLinks);
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
trigger: fetchSuggestions,
|
|
37
|
-
data,
|
|
38
|
-
} = useConceptSuggestions();
|
|
35
|
+
const { trigger: fetchSuggestions, data } = useConceptSuggestions();
|
|
39
36
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (id && structureLinks) {
|
|
39
|
+
fetchSuggestions({
|
|
40
|
+
resource: {
|
|
41
|
+
id,
|
|
42
|
+
type: "structures",
|
|
43
|
+
links: _.filter(({ resource_type }) => resource_type == "concept")(
|
|
44
|
+
structureLinks,
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}, [id, structureLinks]);
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
const concepts = data?.data?.data || [];
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
return (
|
|
54
|
+
<ConceptSelectorTable
|
|
55
|
+
concepts={concepts}
|
|
56
|
+
selectedConcept={selectedConcept}
|
|
57
|
+
handleConceptSelected={handleConceptSelected}
|
|
58
|
+
extraColumns={[similarityColumnDefinition]}
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
64
61
|
};
|
|
65
62
|
|
|
66
63
|
ConceptSuggestions.propTypes = {
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
handleSelectedStructure: PropTypes.func,
|
|
65
|
+
selectedStructure: PropTypes.object,
|
|
69
66
|
};
|
|
70
67
|
|
|
71
68
|
export default ConceptSuggestions;
|
|
@@ -83,15 +83,15 @@ export const ConceptTabs = ({
|
|
|
83
83
|
{(!emptyImplementationLinks ||
|
|
84
84
|
createImplementation ||
|
|
85
85
|
createRawImplementation) && (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
<Menu.Item
|
|
87
|
+
active={implementationsActive}
|
|
88
|
+
as={Link}
|
|
89
|
+
to={linkTo.CONCEPT_LINKS_IMPLEMENTATIONS(concept)}
|
|
90
|
+
replace
|
|
91
|
+
>
|
|
92
|
+
<FormattedMessage id="tabs.bg.qualityImplementations" />
|
|
93
|
+
</Menu.Item>
|
|
94
|
+
)}
|
|
95
95
|
<Menu.Item
|
|
96
96
|
active={archiveActive}
|
|
97
97
|
as={Link}
|
|
@@ -132,16 +132,16 @@ const mapStateToProps = ({
|
|
|
132
132
|
}) => ({
|
|
133
133
|
emptyConceptTags: _.flow(
|
|
134
134
|
_.filter(_.pathEq("value.target_type", "business_concept")),
|
|
135
|
-
_.isEmpty
|
|
135
|
+
_.isEmpty,
|
|
136
136
|
)(relationTags),
|
|
137
137
|
concept,
|
|
138
138
|
emptyImplementationLinks: _.flow(
|
|
139
139
|
_.filter(_.pathEq("resource_type", "implementation")),
|
|
140
|
-
_.isEmpty
|
|
140
|
+
_.isEmpty,
|
|
141
141
|
)(conceptLinks),
|
|
142
142
|
createImplementation: _.prop("create_implementation")(conceptPermissions),
|
|
143
143
|
createRawImplementation: _.prop("create_raw_implementation")(
|
|
144
|
-
conceptPermissions
|
|
144
|
+
conceptPermissions,
|
|
145
145
|
),
|
|
146
146
|
manageQualityRule: _.prop("manage_quality_rule")(conceptPermissions),
|
|
147
147
|
viewQualityRule: _.prop("view_quality_rule")(conceptPermissions),
|
|
@@ -71,6 +71,4 @@ const mapStateToProps = ({ conceptsDownloading }) => ({
|
|
|
71
71
|
conceptsDownloading: conceptsDownloading,
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
export default connect(mapStateToProps, { downloadConcepts })(
|
|
75
|
-
ConceptsActions
|
|
76
|
-
);
|
|
74
|
+
export default connect(mapStateToProps, { downloadConcepts })(ConceptsActions);
|
|
@@ -90,7 +90,7 @@ export const ConceptsBulkUpdate = ({
|
|
|
90
90
|
templates && concept?.type
|
|
91
91
|
? _.flow(
|
|
92
92
|
_.find(_.propEq("name", concept.type)),
|
|
93
|
-
_.prop("name")
|
|
93
|
+
_.prop("name"),
|
|
94
94
|
)(templates)
|
|
95
95
|
: null;
|
|
96
96
|
|
|
@@ -121,7 +121,7 @@ export const ConceptsBulkUpdate = ({
|
|
|
121
121
|
const parsedContent = _.flow(
|
|
122
122
|
applyTemplateWithoutDefaults(template, domainId),
|
|
123
123
|
_.omit(fieldsToOmit),
|
|
124
|
-
_.omitBy(isEmptyValue)
|
|
124
|
+
_.omitBy(isEmptyValue),
|
|
125
125
|
)(content);
|
|
126
126
|
|
|
127
127
|
bulkUpdate({
|
|
@@ -12,15 +12,15 @@ import LinkedMessage from "./LinkedMessage";
|
|
|
12
12
|
import ConceptLinksDropdownSelector from "./ConceptLinksDropdownSelector";
|
|
13
13
|
|
|
14
14
|
const RelationsLoader = lazy(
|
|
15
|
-
() => import("@truedat/lm/components/RelationsLoader")
|
|
15
|
+
() => import("@truedat/lm/components/RelationsLoader"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
const TagTypeDropdownSelector = lazy(
|
|
19
|
-
() => import("@truedat/lm/components/TagTypeDropdownSelector")
|
|
19
|
+
() => import("@truedat/lm/components/TagTypeDropdownSelector"),
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
const StructureSelector = lazy(
|
|
23
|
-
() => import("@truedat/dd/components/StructureSelector")
|
|
23
|
+
() => import("@truedat/dd/components/StructureSelector"),
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
const linksDefaultFilters = {
|
|
@@ -91,7 +91,7 @@ export const ConceptsLinksManagement = ({
|
|
|
91
91
|
return _.find(
|
|
92
92
|
(link) =>
|
|
93
93
|
_.propEq("target_id", id)(link) &&
|
|
94
|
-
_.propEq("target_type", targetType)(link)
|
|
94
|
+
_.propEq("target_type", targetType)(link),
|
|
95
95
|
)(conceptLinks);
|
|
96
96
|
};
|
|
97
97
|
|
|
@@ -108,7 +108,7 @@ export const ConceptsLinksManagement = ({
|
|
|
108
108
|
const isConceptLinked = isLinked(
|
|
109
109
|
conceptLinks,
|
|
110
110
|
concept.business_concept_id,
|
|
111
|
-
"business_concept"
|
|
111
|
+
"business_concept",
|
|
112
112
|
);
|
|
113
113
|
if (isConceptLinked) {
|
|
114
114
|
setStatus(STATUS_DELETED);
|
|
@@ -137,7 +137,7 @@ export const ConceptsLinksManagement = ({
|
|
|
137
137
|
const isStructureLinked = isLinked(
|
|
138
138
|
conceptLinks,
|
|
139
139
|
structure.id,
|
|
140
|
-
"data_structure"
|
|
140
|
+
"data_structure",
|
|
141
141
|
);
|
|
142
142
|
if (isStructureLinked) {
|
|
143
143
|
setStatus(STATUS_DELETED);
|
|
@@ -29,7 +29,7 @@ export const ConceptsTable = ({ columnsByScope, subscope }) => {
|
|
|
29
29
|
|
|
30
30
|
const conceptColumns = columns.filter(
|
|
31
31
|
(column) =>
|
|
32
|
-
_.last(CONCEPTS_PENDING.split("/")) === scope || column.name !== "status"
|
|
32
|
+
_.last(CONCEPTS_PENDING.split("/")) === scope || column.name !== "status",
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
return (
|
|
@@ -2,13 +2,14 @@ import PropTypes from "prop-types";
|
|
|
2
2
|
import { Button } from "semantic-ui-react";
|
|
3
3
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
4
4
|
import { UploadModal } from "@truedat/core/components";
|
|
5
|
-
import { useConceptsUpload } from "../hooks/useConcepts";
|
|
6
5
|
import { useWebContext } from "@truedat/core/webContext";
|
|
6
|
+
import { useConceptsUpload } from "../hooks/useConcepts";
|
|
7
7
|
import { getUploadAlertMessage } from "../selectors/messages";
|
|
8
8
|
|
|
9
9
|
export const ConceptsUploadButton = ({ canAutoPublish }) => {
|
|
10
10
|
const { formatMessage, locale } = useIntl();
|
|
11
|
-
const { trigger: triggerUpload, isMutating: conceptsLoading } =
|
|
11
|
+
const { trigger: triggerUpload, isMutating: conceptsLoading } =
|
|
12
|
+
useConceptsUpload();
|
|
12
13
|
const { setAlertMessage } = useWebContext();
|
|
13
14
|
|
|
14
15
|
const extraAction = {
|
|
@@ -18,18 +19,20 @@ export const ConceptsUploadButton = ({ canAutoPublish }) => {
|
|
|
18
19
|
onClick: (data) => {
|
|
19
20
|
data.append("auto_publish", canAutoPublish);
|
|
20
21
|
data.append("lang", locale);
|
|
21
|
-
triggerUpload(data)
|
|
22
|
-
|
|
23
|
-
setAlertMessage(alertMessage);
|
|
24
|
-
}).catch((error) => {
|
|
25
|
-
if (error.response) {
|
|
26
|
-
const { status, data } = error.response;
|
|
22
|
+
triggerUpload(data)
|
|
23
|
+
.then(({ status, data }) => {
|
|
27
24
|
const alertMessage = getUploadAlertMessage({ status, data });
|
|
28
25
|
setAlertMessage(alertMessage);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
})
|
|
27
|
+
.catch((error) => {
|
|
28
|
+
if (error.response) {
|
|
29
|
+
const { status, data } = error.response;
|
|
30
|
+
const alertMessage = getUploadAlertMessage({ status, data });
|
|
31
|
+
setAlertMessage(alertMessage);
|
|
32
|
+
} else {
|
|
33
|
+
setAlertMessage({ error: true, content: error.message });
|
|
34
|
+
}
|
|
35
|
+
});
|
|
33
36
|
},
|
|
34
37
|
};
|
|
35
38
|
return (
|
|
@@ -55,18 +58,20 @@ export const ConceptsUploadButton = ({ canAutoPublish }) => {
|
|
|
55
58
|
}
|
|
56
59
|
param="business_concepts"
|
|
57
60
|
handleSubmit={(data) => {
|
|
58
|
-
triggerUpload(data)
|
|
59
|
-
|
|
60
|
-
setAlertMessage(alertMessage);
|
|
61
|
-
}).catch((error) => {
|
|
62
|
-
if (error.response) {
|
|
63
|
-
const { status, data } = error.response;
|
|
61
|
+
triggerUpload(data)
|
|
62
|
+
.then(({ status, data }) => {
|
|
64
63
|
const alertMessage = getUploadAlertMessage({ status, data });
|
|
65
64
|
setAlertMessage(alertMessage);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
})
|
|
66
|
+
.catch((error) => {
|
|
67
|
+
if (error.response) {
|
|
68
|
+
const { status, data } = error.response;
|
|
69
|
+
const alertMessage = getUploadAlertMessage({ status, data });
|
|
70
|
+
setAlertMessage(alertMessage);
|
|
71
|
+
} else {
|
|
72
|
+
setAlertMessage(error.message);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
70
75
|
}}
|
|
71
76
|
/>
|
|
72
77
|
);
|
|
@@ -12,7 +12,9 @@ import "../styles/conceptsUploadEventColumns.less";
|
|
|
12
12
|
|
|
13
13
|
const getColumnsWithData = (conceptsResults, columns) =>
|
|
14
14
|
_.filter((column) =>
|
|
15
|
-
_.any(_.flow(columnDecorator(column), _.negate(_.isEmpty)))(
|
|
15
|
+
_.any(_.flow(columnDecorator(column), _.negate(_.isEmpty)))(
|
|
16
|
+
conceptsResults,
|
|
17
|
+
),
|
|
16
18
|
)(columns);
|
|
17
19
|
|
|
18
20
|
const messagesImp = (data) => {
|
|
@@ -63,17 +65,18 @@ const ConceptsUploadEventsTable = ({ getColumns }) => {
|
|
|
63
65
|
count_created: event.response.created?.length ?? 0,
|
|
64
66
|
count_updated: event.response.updated?.length ?? 0,
|
|
65
67
|
count_errors: event.response.errors?.length ?? 0,
|
|
66
|
-
}
|
|
68
|
+
},
|
|
67
69
|
)
|
|
68
70
|
: "";
|
|
69
71
|
|
|
70
72
|
const translatedErrors = _.map((error) =>
|
|
71
73
|
formatMessage(
|
|
72
74
|
{ id: error.id ?? "unknown_error" },
|
|
73
|
-
error.context ?? {}
|
|
74
|
-
)
|
|
75
|
+
error.context ?? {},
|
|
76
|
+
),
|
|
75
77
|
)(messagesImp(event.response));
|
|
76
78
|
|
|
79
|
+
// eslint-disable-next-line fp/no-mutation
|
|
77
80
|
acc[eventKey] = {
|
|
78
81
|
...event,
|
|
79
82
|
response: {
|
|
@@ -87,7 +90,7 @@ const ConceptsUploadEventsTable = ({ getColumns }) => {
|
|
|
87
90
|
return acc;
|
|
88
91
|
},
|
|
89
92
|
{},
|
|
90
|
-
data.data
|
|
93
|
+
data.data,
|
|
91
94
|
)
|
|
92
95
|
: [];
|
|
93
96
|
|
|
@@ -160,7 +163,7 @@ const ConceptsUploadEventsTable = ({ getColumns }) => {
|
|
|
160
163
|
)}
|
|
161
164
|
</Table.Row>
|
|
162
165
|
),
|
|
163
|
-
Object.keys(events)
|
|
166
|
+
Object.keys(events),
|
|
164
167
|
)}
|
|
165
168
|
</Table.Body>
|
|
166
169
|
</Table>
|