@truedat/lm 8.5.6 → 8.5.8
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/components/ImplementationLinks.js +1 -0
- package/src/components/QualityControlConcepts.js +1 -0
- package/src/components/QualityControlStructures.js +1 -0
- package/src/components/StructureLinks.js +15 -14
- package/src/components/StructureSuggestionLinkForm.js +1 -1
- package/src/components/__tests__/StructureSuggestionLinkForm.spec.js +1 -1
- package/src/components/__tests__/__snapshots__/ConceptStructureLinkForm.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/ImplementationLinks.spec.js.snap +8 -0
- package/src/components/__tests__/__snapshots__/ImplementationRelationForm.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/NewRelationTag.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/QualityControlConcepts.spec.js.snap +4 -0
- package/src/components/__tests__/__snapshots__/QualityControlStructures.spec.js.snap +4 -0
- package/src/components/__tests__/__snapshots__/RelationTagForm.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/StructureRelationForm.spec.js.snap +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/lm",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.8",
|
|
4
4
|
"description": "Truedat Link Manager",
|
|
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.5.
|
|
57
|
+
"@truedat/test": "8.5.8",
|
|
58
58
|
"identity-obj-proxy": "^3.0.0",
|
|
59
59
|
"jest": "^29.7.0",
|
|
60
60
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"semantic-ui-react": "^3.0.0-beta.2",
|
|
87
87
|
"swr": "^2.3.3"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "61ad9443b3d822d30dcfa977f5fad3494b3ed5b4"
|
|
90
90
|
}
|
|
@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
|
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
4
|
import { Table, Button, Grid } from "semantic-ui-react";
|
|
5
5
|
import { FormattedMessage } from "react-intl";
|
|
6
|
-
import { Link } from "react-router";
|
|
6
|
+
import { Link, useNavigate } from "react-router";
|
|
7
7
|
import { linkTo } from "@truedat/core/routes";
|
|
8
8
|
import { accentInsensitivePathOrder } from "@truedat/core/services/sort";
|
|
9
9
|
import { getStructureToConceptLinks } from "../selectors/getStructureLinks";
|
|
@@ -12,14 +12,16 @@ import ConceptLinkTags from "../components/ConceptLinkTags";
|
|
|
12
12
|
import StructureLinkRow from "./StructureLinkRow";
|
|
13
13
|
import { useQuery } from "@apollo/client";
|
|
14
14
|
import { DATA_STRUCTURE_VERSION_LINKS_QUERY } from "@truedat/dd/api/queries";
|
|
15
|
+
import SuggestLinkButton from "@truedat/ai/components/SuggestLinkButton";
|
|
15
16
|
|
|
16
17
|
export const StructureLinks = ({
|
|
17
18
|
structure,
|
|
18
19
|
canCreateLink,
|
|
19
20
|
canSuggestConceptLink,
|
|
20
21
|
}) => {
|
|
22
|
+
const navigate = useNavigate();
|
|
21
23
|
const { data } = useQuery(DATA_STRUCTURE_VERSION_LINKS_QUERY, {
|
|
22
|
-
fetchPolicy: "network-only",
|
|
24
|
+
fetchPolicy: "network-only",
|
|
23
25
|
variables: { dataStructureId: structure.id, version: "latest" },
|
|
24
26
|
});
|
|
25
27
|
const structureLinks = data?.dataStructureVersion.links;
|
|
@@ -55,7 +57,7 @@ export const StructureLinks = ({
|
|
|
55
57
|
|
|
56
58
|
const columns = _.every(
|
|
57
59
|
(structureLink) => _.isEmpty(structureLink.tags),
|
|
58
|
-
structureLinks
|
|
60
|
+
structureLinks,
|
|
59
61
|
)
|
|
60
62
|
? structureLinkColumnsWithoutTags
|
|
61
63
|
: structureLinkColumnsWithTags;
|
|
@@ -79,21 +81,20 @@ export const StructureLinks = ({
|
|
|
79
81
|
<Button
|
|
80
82
|
floated="right"
|
|
81
83
|
primary
|
|
84
|
+
icon="linkify"
|
|
82
85
|
as={Link}
|
|
83
86
|
to={linkTo.STRUCTURE_LINKS_NEW({ id })}
|
|
84
87
|
content={<FormattedMessage id="links.actions.create" />}
|
|
85
88
|
/>
|
|
86
89
|
{canSuggestConceptLink && (
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/>
|
|
96
|
-
</Grid.Column>
|
|
90
|
+
<SuggestLinkButton
|
|
91
|
+
floated="right"
|
|
92
|
+
onSubmit={(prompt) =>
|
|
93
|
+
navigate(linkTo.STRUCTURE_LINKS_CONCEPTS_SUGGEST({ id }), {
|
|
94
|
+
state: { prompt },
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
/>
|
|
97
98
|
)}
|
|
98
99
|
</Grid.Column>
|
|
99
100
|
)}
|
|
@@ -120,7 +121,7 @@ StructureLinks.propTypes = {
|
|
|
120
121
|
const mapStateToProps = (state) => ({
|
|
121
122
|
structure: state.structure,
|
|
122
123
|
structureLinks: _.sortBy(accentInsensitivePathOrder("name"))(
|
|
123
|
-
getStructureToConceptLinks(state)
|
|
124
|
+
getStructureToConceptLinks(state),
|
|
124
125
|
),
|
|
125
126
|
canCreateLink: _.has("create_link")(state.structureActions),
|
|
126
127
|
canSuggestConceptLink: _.has("suggest_concept_link")(state.structureActions),
|
|
@@ -13,7 +13,7 @@ import { linkConcept, clearSelectedRelationTags } from "../routines";
|
|
|
13
13
|
import TagTypeDropdownSelector from "./TagTypeDropdownSelector";
|
|
14
14
|
import RelationTagsLoader from "./RelationTagsLoader";
|
|
15
15
|
|
|
16
|
-
const ConceptSuggestions = React.lazy(() => import("@truedat/
|
|
16
|
+
const ConceptSuggestions = React.lazy(() => import("@truedat/ai/components/ConceptSuggestions"));
|
|
17
17
|
|
|
18
18
|
const selectTagOptions = makeTagOptionsSelector("data_field");
|
|
19
19
|
|
|
@@ -164,7 +164,7 @@ exports[`<ConceptStructureLinkForm /> matches the latest snapshot 1`] = `
|
|
|
164
164
|
actions.create
|
|
165
165
|
</button>
|
|
166
166
|
<a
|
|
167
|
-
class="ui secondary button"
|
|
167
|
+
class="ui secondary button td-icon-text-control"
|
|
168
168
|
data-discover="true"
|
|
169
169
|
href="/"
|
|
170
170
|
role="button"
|
|
@@ -17,6 +17,10 @@ exports[`<ImplementationLinks /> matches the latest snapshot 1`] = `
|
|
|
17
17
|
href="/implementations/4/links/concepts/new"
|
|
18
18
|
role="button"
|
|
19
19
|
>
|
|
20
|
+
<i
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
class="linkify icon"
|
|
23
|
+
/>
|
|
20
24
|
create
|
|
21
25
|
</a>
|
|
22
26
|
</div>
|
|
@@ -122,6 +126,10 @@ exports[`<ImplementationLinks /> matches the latest snapshot when implementation
|
|
|
122
126
|
href="/implementations/4/links/concepts/new"
|
|
123
127
|
role="button"
|
|
124
128
|
>
|
|
129
|
+
<i
|
|
130
|
+
aria-hidden="true"
|
|
131
|
+
class="linkify icon"
|
|
132
|
+
/>
|
|
125
133
|
create
|
|
126
134
|
</a>
|
|
127
135
|
</div>
|
|
@@ -286,7 +286,7 @@ exports[`<ImplementationRelationForm /> matches the latest snapshot 1`] = `
|
|
|
286
286
|
actions.create
|
|
287
287
|
</button>
|
|
288
288
|
<a
|
|
289
|
-
class="ui secondary button"
|
|
289
|
+
class="ui secondary button td-icon-text-control"
|
|
290
290
|
data-discover="true"
|
|
291
291
|
href="/"
|
|
292
292
|
role="button"
|
|
@@ -16,6 +16,10 @@ exports[`<QualityControlStructures /> matches the latest snapshot 1`] = `
|
|
|
16
16
|
href="/qualityControls/10/version/1/links/structures/new"
|
|
17
17
|
role="button"
|
|
18
18
|
>
|
|
19
|
+
<i
|
|
20
|
+
aria-hidden="true"
|
|
21
|
+
class="linkify icon"
|
|
22
|
+
/>
|
|
19
23
|
links.actions.create
|
|
20
24
|
</a>
|
|
21
25
|
</div>
|