@truedat/bg 7.5.10 → 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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/bg",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.11",
|
|
4
4
|
"description": "Truedat Web Business Glossary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@testing-library/jest-dom": "^6.6.3",
|
|
49
49
|
"@testing-library/react": "^16.2.0",
|
|
50
50
|
"@testing-library/user-event": "^14.6.1",
|
|
51
|
-
"@truedat/test": "7.5.
|
|
51
|
+
"@truedat/test": "7.5.11",
|
|
52
52
|
"identity-obj-proxy": "^3.0.0",
|
|
53
53
|
"jest": "^29.7.0",
|
|
54
54
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"semantic-ui-react": "^3.0.0-beta.2",
|
|
83
83
|
"swr": "^2.3.3"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "cbb92d5206752fe2add4195432b0401da17a0f23"
|
|
86
86
|
}
|
|
@@ -2,10 +2,10 @@ import _ from "lodash/fp";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
4
|
import { Button, Icon } from "semantic-ui-react";
|
|
5
|
-
import { Link } from "react-router";
|
|
5
|
+
import { Link, useNavigate } from "react-router";
|
|
6
6
|
import { FormattedMessage } from "react-intl";
|
|
7
7
|
import { ConfirmModal, GroupActions } from "@truedat/core/components";
|
|
8
|
-
import { linkTo } from "@truedat/core/routes";
|
|
8
|
+
import { CONCEPTS, linkTo } from "@truedat/core/routes";
|
|
9
9
|
import { conceptAction } from "../routines";
|
|
10
10
|
import { mapActionProps } from "../constants/mappings";
|
|
11
11
|
import ConceptDeleteModalBody from "./ConceptDeleteModalBody";
|
|
@@ -45,37 +45,43 @@ const ModalDelete = ({
|
|
|
45
45
|
deleteAction,
|
|
46
46
|
conceptVersion,
|
|
47
47
|
concept,
|
|
48
|
-
}) =>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
)
|
|
48
|
+
}) => {
|
|
49
|
+
const navigate = useNavigate();
|
|
50
|
+
return (
|
|
51
|
+
<ConfirmModal
|
|
52
|
+
icon="trash"
|
|
53
|
+
trigger={
|
|
54
|
+
<Button
|
|
55
|
+
icon={<Icon name="trash alternate outline" color="red" />}
|
|
56
|
+
content={<FormattedMessage id="actions.delete" />}
|
|
57
|
+
/>
|
|
58
|
+
}
|
|
59
|
+
header={
|
|
60
|
+
<FormattedMessage id="concepts.actions.delete.confirmation.header" />
|
|
61
|
+
}
|
|
62
|
+
content={
|
|
63
|
+
<>
|
|
64
|
+
{conceptVersion === 1 ? (
|
|
65
|
+
<ConceptDeleteModalBody
|
|
66
|
+
conceptName={_.prop("name")(concept)}
|
|
67
|
+
conceptDomain={_.prop("domain.name")(concept)}
|
|
68
|
+
linkCount={_.prop("link_count")(concept)}
|
|
69
|
+
ruleCount={_.prop("rule_count")(concept)}
|
|
70
|
+
conceptCount={_.prop("concept_count")(concept)}
|
|
71
|
+
conceptVersion={_.prop("version")(concept)}
|
|
72
|
+
/>
|
|
73
|
+
) : (
|
|
74
|
+
<FormattedMessage id="concepts.actions.delete.confirmation.content" />
|
|
75
|
+
)}
|
|
76
|
+
</>
|
|
77
|
+
}
|
|
78
|
+
onConfirm={() => {
|
|
79
|
+
conceptAction({ action: "delete", ...deleteAction });
|
|
80
|
+
navigate(CONCEPTS);
|
|
81
|
+
}}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
79
85
|
|
|
80
86
|
ModalDelete.propTypes = {
|
|
81
87
|
concept: PropTypes.object,
|
|
@@ -46,7 +46,7 @@ export const ConceptEdit = ({
|
|
|
46
46
|
|
|
47
47
|
const business_concept_version = {
|
|
48
48
|
name: defaultContent.name,
|
|
49
|
-
domain_id: domain
|
|
49
|
+
domain_id: domain?.id,
|
|
50
50
|
type: template.name,
|
|
51
51
|
content: newContent,
|
|
52
52
|
i18n_content: i18nSendConcept,
|
|
@@ -63,7 +63,7 @@ export const ConceptEdit = ({
|
|
|
63
63
|
<>
|
|
64
64
|
<ConceptForm
|
|
65
65
|
actionKey={actionKey}
|
|
66
|
-
domainId={domain
|
|
66
|
+
domainId={domain?.id}
|
|
67
67
|
template={template}
|
|
68
68
|
i18nConcept={i18nConcept}
|
|
69
69
|
loading={templateLoading || localesLoading}
|
|
@@ -94,7 +94,7 @@ export const ConceptEditLoader = (props) => {
|
|
|
94
94
|
const { locales } = useLanguage();
|
|
95
95
|
const { data, loading: templateLoading } = useTemplate({
|
|
96
96
|
name: templateName,
|
|
97
|
-
domainIds: [domain
|
|
97
|
+
domainIds: [domain?.id],
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
const template = _.prop("template")(data);
|
|
@@ -26,11 +26,9 @@ export const conceptRedirect = (
|
|
|
26
26
|
return initialState;
|
|
27
27
|
case conceptAction.SUCCESS:
|
|
28
28
|
const data = _.prop("data")(payload);
|
|
29
|
-
return _.
|
|
30
|
-
?
|
|
31
|
-
:
|
|
32
|
-
? conceptUrl(_.pick(["id", "business_concept_id"])(data))
|
|
33
|
-
: state;
|
|
29
|
+
return _.includes(_.prop("action")(meta))(["version", "update", "create"])
|
|
30
|
+
? conceptUrl(_.pick(["id", "business_concept_id"])(data))
|
|
31
|
+
: state;
|
|
34
32
|
case linkConcept.SUCCESS: {
|
|
35
33
|
const { redirectUrl } = meta;
|
|
36
34
|
return redirectUrl;
|
|
@@ -211,7 +211,8 @@ export const ConceptRelations = ({
|
|
|
211
211
|
maxDepth={maxDepth}
|
|
212
212
|
/>
|
|
213
213
|
<RelationGraph
|
|
214
|
-
|
|
214
|
+
key={`graph-${depth}-${_.size(limitedRelationGraph?.nodes)}`}
|
|
215
|
+
navigate={navigateToConcept}
|
|
215
216
|
currentId={currentId}
|
|
216
217
|
relationsGraph={limitedRelationGraph}
|
|
217
218
|
/>
|