@truedat/lm 4.37.4 → 4.38.2
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/CHANGELOG.md +10 -0
- package/package.json +5 -4
- package/src/components/ConceptLinkTags.js +23 -0
- package/src/components/StructureRelationForm.js +1 -1
- package/src/components/__tests__/ConceptLinkTags.spec.js +16 -0
- package/src/components/__tests__/__snapshots__/ConceptLinkTags.spec.js.snap +24 -0
- package/src/constants/structureLinkColumns.js +8 -2
- package/src/styles/ConceptLinkTags.less +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.38.1] 2022-02-17
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- [TD-4297] Add tags ("type") column to structure Linkage tab
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- [TD-4297] Relation tags traduction messages now have the prefix `conceptRelations.relationType.`
|
|
12
|
+
|
|
3
13
|
## [4.30.0] 2021-10-06
|
|
4
14
|
|
|
5
15
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/lm",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.38.2",
|
|
4
4
|
"description": "Truedat Link Manager",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@testing-library/jest-dom": "^5.14.1",
|
|
34
34
|
"@testing-library/react": "^12.0.0",
|
|
35
35
|
"@testing-library/user-event": "^13.2.1",
|
|
36
|
-
"@truedat/test": "4.
|
|
36
|
+
"@truedat/test": "4.38.2",
|
|
37
37
|
"babel-jest": "^27.0.6",
|
|
38
38
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
39
39
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"enzyme": "^3.11.0",
|
|
43
43
|
"enzyme-adapter-react-16": "^1.15.6",
|
|
44
44
|
"enzyme-to-json": "^3.6.2",
|
|
45
|
+
"identity-obj-proxy": "^3.0.0",
|
|
45
46
|
"jest": "^27.0.6",
|
|
46
47
|
"react": "^16.14.0",
|
|
47
48
|
"react-dom": "^16.14.0",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
]
|
|
83
84
|
},
|
|
84
85
|
"dependencies": {
|
|
85
|
-
"@truedat/core": "4.
|
|
86
|
+
"@truedat/core": "4.38.2",
|
|
86
87
|
"path-to-regexp": "^1.7.0",
|
|
87
88
|
"prop-types": "^15.7.2",
|
|
88
89
|
"react-graph-vis": "1.0.5",
|
|
@@ -99,5 +100,5 @@
|
|
|
99
100
|
"react-dom": ">= 16.8.6 < 17",
|
|
100
101
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
101
102
|
},
|
|
102
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "41504c0c5ccc40ea20e67985e3957fd7c1897e2e"
|
|
103
104
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import "../styles/ConceptLinkTags.less";
|
|
5
|
+
|
|
6
|
+
export const ConceptLinkTags = ({ tags }) => (
|
|
7
|
+
<ul className="concept-link-tags">
|
|
8
|
+
{tags.map((tag, i) => (
|
|
9
|
+
<li key={i}>
|
|
10
|
+
<FormattedMessage
|
|
11
|
+
id={`conceptRelations.relationType.${tag}`}
|
|
12
|
+
defaultMessage={tag}
|
|
13
|
+
/>
|
|
14
|
+
</li>
|
|
15
|
+
))}
|
|
16
|
+
</ul>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
ConceptLinkTags.propTypes = {
|
|
20
|
+
tags: PropTypes.array,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default ConceptLinkTags;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _ from "lodash/fp";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@truedat/test/render";
|
|
4
|
+
import { shallow } from "enzyme";
|
|
5
|
+
|
|
6
|
+
import ConceptLinkTags from "../ConceptLinkTags";
|
|
7
|
+
|
|
8
|
+
describe("ConceptLinkTags", () => {
|
|
9
|
+
it("matches the latest snapshot", () => {
|
|
10
|
+
const link = {
|
|
11
|
+
tags: ["otro tipo", "business_concept_to_field_master"],
|
|
12
|
+
};
|
|
13
|
+
const wrapper = shallow(<ConceptLinkTags {...link} />);
|
|
14
|
+
expect(wrapper).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`ConceptLinkTags matches the latest snapshot 1`] = `
|
|
4
|
+
<ul
|
|
5
|
+
className="concept-link-tags"
|
|
6
|
+
>
|
|
7
|
+
<li
|
|
8
|
+
key="0"
|
|
9
|
+
>
|
|
10
|
+
<MemoizedFormattedMessage
|
|
11
|
+
defaultMessage="otro tipo"
|
|
12
|
+
id="conceptRelations.relationType.otro tipo"
|
|
13
|
+
/>
|
|
14
|
+
</li>
|
|
15
|
+
<li
|
|
16
|
+
key="1"
|
|
17
|
+
>
|
|
18
|
+
<MemoizedFormattedMessage
|
|
19
|
+
defaultMessage="business_concept_to_field_master"
|
|
20
|
+
id="conceptRelations.relationType.business_concept_to_field_master"
|
|
21
|
+
/>
|
|
22
|
+
</li>
|
|
23
|
+
</ul>
|
|
24
|
+
`;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import ConceptLink from "../components/ConceptLink";
|
|
3
|
+
import ConceptLinkTags from "../components/ConceptLinkTags";
|
|
3
4
|
|
|
4
5
|
export const structureLinkColumns = [
|
|
5
6
|
{
|
|
6
7
|
header: "concepts.props.name",
|
|
7
8
|
fieldSelector: _.identity,
|
|
8
|
-
fieldDecorator: ConceptLink
|
|
9
|
+
fieldDecorator: ConceptLink,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
header: "Type",
|
|
13
|
+
fieldSelector: _.identity,
|
|
14
|
+
fieldDecorator: ConceptLinkTags,
|
|
9
15
|
},
|
|
10
16
|
{
|
|
11
17
|
header: "concepts.props.domain",
|
|
12
|
-
fieldSelector: _.path("domain.name")
|
|
18
|
+
fieldSelector: _.path("domain.name"),
|
|
13
19
|
}
|
|
14
20
|
];
|