@truedat/dd 8.7.4 → 8.7.5
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/dd",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.5",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@testing-library/jest-dom": "^6.6.3",
|
|
52
52
|
"@testing-library/react": "^16.3.0",
|
|
53
53
|
"@testing-library/user-event": "^14.6.1",
|
|
54
|
-
"@truedat/test": "8.7.
|
|
54
|
+
"@truedat/test": "8.7.5",
|
|
55
55
|
"identity-obj-proxy": "^3.0.0",
|
|
56
56
|
"jest": "^29.7.0",
|
|
57
57
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"svg-pan-zoom": "^3.6.2",
|
|
87
87
|
"swr": "^2.3.3"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "c6330f05c6d7eb7b601ff861385deedb257efc3d"
|
|
90
90
|
}
|
|
@@ -20,4 +20,26 @@ describe("selectors: getBusinessConceptsLinksToStructuresColumns", () => {
|
|
|
20
20
|
defaultBusinessConceptsLinksToStructuresColumns.length,
|
|
21
21
|
);
|
|
22
22
|
});
|
|
23
|
+
|
|
24
|
+
it("should render path as text", () => {
|
|
25
|
+
const res = getBusinessConceptsLinksToStructuresColumns({});
|
|
26
|
+
const pathIndex = res.findIndex(({ name }) => name === "path");
|
|
27
|
+
const pathColumn = res[pathIndex];
|
|
28
|
+
|
|
29
|
+
expect(pathIndex).toBeGreaterThan(-1);
|
|
30
|
+
expect(pathColumn.fieldDecorator(["system", "group", "field"])).toEqual(
|
|
31
|
+
"system › group › field",
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("should style dates through a class instead of inline styles", () => {
|
|
36
|
+
const res = getBusinessConceptsLinksToStructuresColumns({});
|
|
37
|
+
const dateColumn = res.find(({ name }) => name === "updated_at");
|
|
38
|
+
const date = dateColumn.fieldDecorator("2026-06-15T10:00:00Z");
|
|
39
|
+
|
|
40
|
+
expect(date.props.className).toContain(
|
|
41
|
+
"business-concept-links__date-label",
|
|
42
|
+
);
|
|
43
|
+
expect(date.props.style).toBeUndefined();
|
|
44
|
+
});
|
|
23
45
|
});
|
|
@@ -3,6 +3,7 @@ import { Link } from "react-router";
|
|
|
3
3
|
import { createSelector } from "reselect";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import Moment from "react-moment";
|
|
6
|
+
import { Icon, Label } from "semantic-ui-react";
|
|
6
7
|
import { linkTo } from "@truedat/core/routes";
|
|
7
8
|
|
|
8
9
|
const typeTranslateDecorator = ({ type }) => (
|
|
@@ -10,7 +11,10 @@ const typeTranslateDecorator = ({ type }) => (
|
|
|
10
11
|
);
|
|
11
12
|
|
|
12
13
|
const dateDecorator = (date) => (
|
|
13
|
-
<
|
|
14
|
+
<Label className="alert info business-concept-links__date-label">
|
|
15
|
+
<Icon name="info circle" color="blue" />
|
|
16
|
+
<Moment locale="es" date={date} format="YYYY-MM-DD HH:mm" />
|
|
17
|
+
</Label>
|
|
14
18
|
);
|
|
15
19
|
|
|
16
20
|
const relationTypeDecorator = _.map((relationTag) => (
|
|
@@ -20,39 +24,34 @@ const relationTypeDecorator = _.map((relationTag) => (
|
|
|
20
24
|
defaultMessage={relationTag}
|
|
21
25
|
/>
|
|
22
26
|
));
|
|
23
|
-
const pathDecorator = (
|
|
24
|
-
<span title={_.join(" › ")(path)}>
|
|
25
|
-
{_.flow(_.join(" › "), _.truncate({ length: 90 }))(path)}{" "}
|
|
26
|
-
</span>
|
|
27
|
-
);
|
|
27
|
+
const pathDecorator = _.flow(_.defaultTo([]), _.join(" › "));
|
|
28
28
|
|
|
29
29
|
export const defaultBusinessConceptsLinksToStructuresColumns = [
|
|
30
30
|
{
|
|
31
31
|
name: "name",
|
|
32
|
-
width: 2,
|
|
33
32
|
},
|
|
34
33
|
{
|
|
35
34
|
name: "type",
|
|
36
35
|
fieldSelector: _.pick(["type"]),
|
|
37
36
|
fieldDecorator: typeTranslateDecorator,
|
|
38
|
-
width: 1,
|
|
39
37
|
},
|
|
40
38
|
{
|
|
41
39
|
name: "system",
|
|
42
40
|
fieldSelector: _.path("system.name"),
|
|
43
|
-
width: 1,
|
|
44
41
|
},
|
|
45
42
|
{
|
|
46
43
|
name: "relation.relation_type_name",
|
|
47
44
|
fieldSelector: _.path("tags"),
|
|
48
45
|
fieldDecorator: relationTypeDecorator,
|
|
49
|
-
width: 1,
|
|
50
46
|
},
|
|
51
|
-
{
|
|
47
|
+
{
|
|
48
|
+
name: "path",
|
|
49
|
+
fieldDecorator: pathDecorator,
|
|
50
|
+
},
|
|
52
51
|
{
|
|
53
52
|
name: "updated_at",
|
|
54
53
|
fieldDecorator: dateDecorator,
|
|
55
|
-
|
|
54
|
+
textAlign: "center",
|
|
56
55
|
},
|
|
57
56
|
{
|
|
58
57
|
name: "relationTags.props.expandable",
|
|
@@ -71,11 +70,6 @@ export const defaultBusinessConceptsLinksToStructuresColumns = [
|
|
|
71
70
|
</Link>
|
|
72
71
|
);
|
|
73
72
|
},
|
|
74
|
-
width: 1,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: "path",
|
|
78
|
-
fieldDecorator: pathDecorator,
|
|
79
73
|
},
|
|
80
74
|
];
|
|
81
75
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.ui.label.business-concept-links__date-label {
|
|
2
|
+
background-color: #dbeafe;
|
|
3
|
+
border-color: #bfdbfe;
|
|
4
|
+
color: #1f2937;
|
|
5
|
+
white-space: nowrap;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.business-concept-links__icon-popup {
|
|
9
|
+
max-width: 420px;
|
|
10
|
+
overflow-wrap: anywhere;
|
|
11
|
+
white-space: pre-wrap;
|
|
12
|
+
word-break: break-word;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.business-concept-links__icon-trigger {
|
|
16
|
+
align-items: center;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ui.icon.business-concept-links__icon {
|
|
23
|
+
cursor: default;
|
|
24
|
+
margin: 0;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
}
|