@truedat/bg 4.46.1 → 4.46.4
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 +12 -0
- package/package.json +5 -5
- package/src/concepts/components/Concept.js +5 -6
- package/src/concepts/components/ConceptArchiveRow.js +8 -3
- package/src/concepts/components/ConceptDetails.js +3 -5
- package/src/concepts/components/ConceptEdit.js +1 -5
- package/src/concepts/components/ConceptFiltersLoader.js +1 -0
- package/src/concepts/components/ConceptForm.js +1 -5
- package/src/concepts/components/ConceptRoutes.js +1 -17
- package/src/concepts/components/ConceptSummary.js +11 -6
- package/src/concepts/components/ConceptTaxonomy.js +1 -4
- package/src/concepts/components/Concepts.js +6 -27
- package/src/concepts/components/ConceptsActions.js +12 -10
- package/src/concepts/components/ConceptsLoader.js +7 -28
- package/src/concepts/components/ConceptsPanel.js +34 -0
- package/src/concepts/components/ConceptsTable.js +13 -14
- package/src/concepts/components/DomainConcepts.js +29 -0
- package/src/concepts/components/__tests__/ConceptArchiveRow.spec.js +11 -14
- package/src/concepts/components/__tests__/ConceptsLoader.spec.js +2 -5
- package/src/concepts/components/__tests__/ConceptsPanel.spec.js +25 -0
- package/src/concepts/components/__tests__/__snapshots__/Concept.spec.js.snap +1 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptArchiveRow.spec.js.snap +34 -30
- package/src/concepts/components/__tests__/__snapshots__/ConceptDetails.spec.js.snap +1 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptForm.spec.js.snap +6 -6
- package/src/concepts/components/__tests__/__snapshots__/ConceptTaxonomy.spec.js.snap +1 -1
- package/src/concepts/components/__tests__/__snapshots__/Concepts.spec.js.snap +1 -30
- package/src/concepts/components/__tests__/__snapshots__/ConceptsPanel.spec.js.snap +157 -0
- package/src/concepts/components/__tests__/__snapshots__/ConceptsTable.spec.js.snap +36 -2
- package/src/concepts/reducers/conceptQuery.js +2 -2
- package/src/concepts/reducers/index.js +0 -2
- package/src/concepts/relations/components/ConceptImplementationLinks.js +1 -0
- package/src/concepts/relations/components/ConceptSelector.js +6 -3
- package/src/concepts/routines.js +0 -6
- package/src/messages/en.js +1 -0
- package/src/messages/es.js +1 -0
- package/src/taxonomy/components/Domain.js +22 -6
- package/src/taxonomy/components/DomainCrumbs.js +4 -3
- package/src/taxonomy/components/DomainDetail.js +3 -5
- package/src/taxonomy/components/DomainRoutes.js +3 -1
- package/src/taxonomy/components/DomainTabs.js +19 -5
- package/src/taxonomy/components/__tests__/__snapshots__/Domain.spec.js.snap +12 -18
- package/src/concepts/components/ConceptsDefaultFiltersLoader.js +0 -23
- package/src/concepts/components/__tests__/ConceptsDefaultFiltersLoader.spec.js +0 -18
- package/src/concepts/reducers/__tests__/conceptsDefaultFilters.spec.js +0 -37
- package/src/concepts/reducers/conceptsDefaultFilters.js +0 -20
|
@@ -4,9 +4,8 @@ import { ConceptsLoader } from "../ConceptsLoader";
|
|
|
4
4
|
|
|
5
5
|
const getProps = () => ({
|
|
6
6
|
clearConcepts: jest.fn(),
|
|
7
|
-
clearConceptDefaultFilters: jest.fn(),
|
|
8
7
|
conceptsLoading: false,
|
|
9
|
-
fetchConcepts: jest.fn()
|
|
8
|
+
fetchConcepts: jest.fn(),
|
|
10
9
|
});
|
|
11
10
|
|
|
12
11
|
describe("<ConceptsLoader />", () => {
|
|
@@ -18,14 +17,12 @@ describe("<ConceptsLoader />", () => {
|
|
|
18
17
|
expect(props.fetchConcepts).toHaveBeenCalledTimes(1);
|
|
19
18
|
});
|
|
20
19
|
|
|
21
|
-
it("calls clearConcepts
|
|
20
|
+
it("calls clearConcepts when component unmounts but not when it mounts", () => {
|
|
22
21
|
const props = getProps();
|
|
23
22
|
const wrapper = mount(<ConceptsLoader {...props} />);
|
|
24
23
|
expect(props.clearConcepts).toHaveBeenCalledTimes(0);
|
|
25
|
-
expect(props.clearConceptDefaultFilters).toHaveBeenCalledTimes(0);
|
|
26
24
|
wrapper.unmount();
|
|
27
25
|
expect(props.clearConcepts).toHaveBeenCalledTimes(1);
|
|
28
|
-
expect(props.clearConceptDefaultFilters).toHaveBeenCalledTimes(1);
|
|
29
26
|
});
|
|
30
27
|
|
|
31
28
|
it("merges default filters with query filters", () => {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import ConceptsPanel from "../ConceptsPanel";
|
|
4
|
+
|
|
5
|
+
const renderOpts = {
|
|
6
|
+
state: {
|
|
7
|
+
conceptCount: 123,
|
|
8
|
+
concepts: [
|
|
9
|
+
{
|
|
10
|
+
id: 1,
|
|
11
|
+
name: "concept",
|
|
12
|
+
domain: { name: "domain" },
|
|
13
|
+
status: "published",
|
|
14
|
+
last_change_at: "2020-01-01T00:00:00.000Z",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
describe("<ConceptsPanel />", () => {
|
|
21
|
+
it("matches latest snapshot", () => {
|
|
22
|
+
const { container } = render(<ConceptsPanel />, renderOpts);
|
|
23
|
+
expect(container).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<ConceptArchiveRow /> matches the latest snapshot 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</
|
|
4
|
+
<div>
|
|
5
|
+
<table>
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr
|
|
8
|
+
class=""
|
|
9
|
+
>
|
|
10
|
+
<td
|
|
11
|
+
class=""
|
|
12
|
+
>
|
|
13
|
+
Draft
|
|
14
|
+
</td>
|
|
15
|
+
<td
|
|
16
|
+
class=""
|
|
17
|
+
>
|
|
18
|
+
1
|
|
19
|
+
</td>
|
|
20
|
+
<td
|
|
21
|
+
class=""
|
|
22
|
+
>
|
|
23
|
+
|
|
24
|
+
</td>
|
|
25
|
+
<td
|
|
26
|
+
class=""
|
|
27
|
+
>
|
|
28
|
+
<time
|
|
29
|
+
datetime="1530084773154"
|
|
30
|
+
>
|
|
31
|
+
2018-06-27 07:32
|
|
32
|
+
</time>
|
|
33
|
+
</td>
|
|
34
|
+
</tr>
|
|
35
|
+
</tbody>
|
|
36
|
+
</table>
|
|
37
|
+
</div>
|
|
34
38
|
`;
|
|
@@ -203,23 +203,23 @@ exports[`<ConceptForm /> with a single template matches the latest snapshot 1`]
|
|
|
203
203
|
autocorrect="on"
|
|
204
204
|
contenteditable="true"
|
|
205
205
|
data-gramm="false"
|
|
206
|
-
data-key="
|
|
206
|
+
data-key="10"
|
|
207
207
|
data-slate-editor="true"
|
|
208
208
|
role="textbox"
|
|
209
209
|
spellcheck="true"
|
|
210
210
|
style="outline: none; white-space: pre-wrap; word-wrap: break-word;"
|
|
211
211
|
>
|
|
212
212
|
<div
|
|
213
|
-
data-key="
|
|
213
|
+
data-key="11"
|
|
214
214
|
data-slate-object="block"
|
|
215
215
|
style="position: relative;"
|
|
216
216
|
>
|
|
217
217
|
<span
|
|
218
|
-
data-key="
|
|
218
|
+
data-key="14"
|
|
219
219
|
data-slate-object="text"
|
|
220
220
|
>
|
|
221
221
|
<span
|
|
222
|
-
data-offset-key="
|
|
222
|
+
data-offset-key="14:0"
|
|
223
223
|
data-slate-leaf="true"
|
|
224
224
|
>
|
|
225
225
|
<span>
|
|
@@ -516,11 +516,11 @@ exports[`<ConceptForm /> with multiple templates matches the latest snapshot 1`]
|
|
|
516
516
|
style="position: relative;"
|
|
517
517
|
>
|
|
518
518
|
<span
|
|
519
|
-
data-key="
|
|
519
|
+
data-key="4"
|
|
520
520
|
data-slate-object="text"
|
|
521
521
|
>
|
|
522
522
|
<span
|
|
523
|
-
data-offset-key="
|
|
523
|
+
data-offset-key="4:0"
|
|
524
524
|
data-slate-leaf="true"
|
|
525
525
|
>
|
|
526
526
|
<span>
|
|
@@ -26,36 +26,7 @@ exports[`<Concepts /> matches the latest snapshot 1`] = `
|
|
|
26
26
|
<Segment
|
|
27
27
|
attached="bottom"
|
|
28
28
|
>
|
|
29
|
-
<Connect(
|
|
30
|
-
concepts={
|
|
31
|
-
Array [
|
|
32
|
-
Object {
|
|
33
|
-
"description": "dd",
|
|
34
|
-
"id": 1,
|
|
35
|
-
"name": "s1",
|
|
36
|
-
"status": "st",
|
|
37
|
-
"version": "vs",
|
|
38
|
-
},
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
create={true}
|
|
42
|
-
update={true}
|
|
43
|
-
/>
|
|
44
|
-
<Connect(ConceptsSearch) />
|
|
45
|
-
<ConceptSelectedFilters />
|
|
46
|
-
<DimmerDimmable
|
|
47
|
-
dimmed={false}
|
|
48
|
-
>
|
|
49
|
-
<Dimmer
|
|
50
|
-
active={false}
|
|
51
|
-
inverted={true}
|
|
52
|
-
>
|
|
53
|
-
<Loader />
|
|
54
|
-
</Dimmer>
|
|
55
|
-
<Connect(ConceptsLabelResults) />
|
|
56
|
-
<withRouter(Connect(ConceptsTable)) />
|
|
57
|
-
<Connect(Pagination) />
|
|
58
|
-
</DimmerDimmable>
|
|
29
|
+
<Connect(ConceptsPanel) />
|
|
59
30
|
</Segment>
|
|
60
31
|
</Segment>
|
|
61
32
|
</Fragment>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<ConceptsPanel /> matches latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui action left icon input"
|
|
7
|
+
>
|
|
8
|
+
<input
|
|
9
|
+
placeholder="Search concepts..."
|
|
10
|
+
type="text"
|
|
11
|
+
value=""
|
|
12
|
+
/>
|
|
13
|
+
<i
|
|
14
|
+
aria-hidden="true"
|
|
15
|
+
class="search link icon"
|
|
16
|
+
/>
|
|
17
|
+
<div
|
|
18
|
+
aria-expanded="false"
|
|
19
|
+
class="ui button floating labeled scrolling dropdown icon"
|
|
20
|
+
role="listbox"
|
|
21
|
+
tabindex="0"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
aria-atomic="true"
|
|
25
|
+
aria-live="polite"
|
|
26
|
+
class="divider text"
|
|
27
|
+
role="alert"
|
|
28
|
+
>
|
|
29
|
+
Filters
|
|
30
|
+
</div>
|
|
31
|
+
<i
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
class="filter icon"
|
|
34
|
+
/>
|
|
35
|
+
<div
|
|
36
|
+
class="menu transition"
|
|
37
|
+
>
|
|
38
|
+
<div
|
|
39
|
+
class="item"
|
|
40
|
+
role="option"
|
|
41
|
+
>
|
|
42
|
+
<em>
|
|
43
|
+
(reset all filters)
|
|
44
|
+
</em>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div
|
|
50
|
+
class="selectedFilters"
|
|
51
|
+
/>
|
|
52
|
+
<div
|
|
53
|
+
class="dimmable"
|
|
54
|
+
>
|
|
55
|
+
<div
|
|
56
|
+
class="ui inverted dimmer"
|
|
57
|
+
>
|
|
58
|
+
<div
|
|
59
|
+
class="content"
|
|
60
|
+
>
|
|
61
|
+
<div
|
|
62
|
+
class="ui loader"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div
|
|
67
|
+
class="ui label concepts-label-results"
|
|
68
|
+
>
|
|
69
|
+
123 concepts found
|
|
70
|
+
</div>
|
|
71
|
+
<table
|
|
72
|
+
class="ui selectable sortable table"
|
|
73
|
+
>
|
|
74
|
+
<thead
|
|
75
|
+
class=""
|
|
76
|
+
>
|
|
77
|
+
<tr
|
|
78
|
+
class=""
|
|
79
|
+
>
|
|
80
|
+
<th
|
|
81
|
+
class="seven wide"
|
|
82
|
+
>
|
|
83
|
+
Term
|
|
84
|
+
</th>
|
|
85
|
+
<th
|
|
86
|
+
class="three wide"
|
|
87
|
+
>
|
|
88
|
+
Domain
|
|
89
|
+
</th>
|
|
90
|
+
<th
|
|
91
|
+
class="two wide"
|
|
92
|
+
>
|
|
93
|
+
Status
|
|
94
|
+
</th>
|
|
95
|
+
<th
|
|
96
|
+
class="one wide"
|
|
97
|
+
>
|
|
98
|
+
Quality rules
|
|
99
|
+
</th>
|
|
100
|
+
<th
|
|
101
|
+
class="one wide"
|
|
102
|
+
>
|
|
103
|
+
Link to field
|
|
104
|
+
</th>
|
|
105
|
+
<th
|
|
106
|
+
class="two wide"
|
|
107
|
+
>
|
|
108
|
+
Last modification date
|
|
109
|
+
</th>
|
|
110
|
+
</tr>
|
|
111
|
+
</thead>
|
|
112
|
+
<tbody
|
|
113
|
+
class=""
|
|
114
|
+
>
|
|
115
|
+
<tr
|
|
116
|
+
class=""
|
|
117
|
+
>
|
|
118
|
+
<td
|
|
119
|
+
class=""
|
|
120
|
+
>
|
|
121
|
+
concept
|
|
122
|
+
</td>
|
|
123
|
+
<td
|
|
124
|
+
class=""
|
|
125
|
+
>
|
|
126
|
+
domain
|
|
127
|
+
</td>
|
|
128
|
+
<td
|
|
129
|
+
class=""
|
|
130
|
+
>
|
|
131
|
+
Published
|
|
132
|
+
</td>
|
|
133
|
+
<td
|
|
134
|
+
class="center aligned"
|
|
135
|
+
>
|
|
136
|
+
|
|
137
|
+
</td>
|
|
138
|
+
<td
|
|
139
|
+
class="center aligned"
|
|
140
|
+
>
|
|
141
|
+
|
|
142
|
+
</td>
|
|
143
|
+
<td
|
|
144
|
+
class="center aligned"
|
|
145
|
+
>
|
|
146
|
+
<time
|
|
147
|
+
datetime="1577836800000"
|
|
148
|
+
>
|
|
149
|
+
2020-01-01 00:00
|
|
150
|
+
</time>
|
|
151
|
+
</td>
|
|
152
|
+
</tr>
|
|
153
|
+
</tbody>
|
|
154
|
+
</table>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
`;
|
|
@@ -13,13 +13,47 @@ exports[`<ConceptsTable /> matches the latest snapshot 1`] = `
|
|
|
13
13
|
<TableRow
|
|
14
14
|
as="tr"
|
|
15
15
|
cellAs="td"
|
|
16
|
-
|
|
16
|
+
>
|
|
17
|
+
<TableHeaderCell
|
|
18
|
+
as="th"
|
|
19
|
+
className="disabled"
|
|
20
|
+
content={
|
|
21
|
+
<Memo(MemoizedFormattedMessage)
|
|
22
|
+
id="concepts.props.name"
|
|
23
|
+
/>
|
|
24
|
+
}
|
|
25
|
+
key="0"
|
|
26
|
+
onClick={[Function]}
|
|
27
|
+
sorted="ascending"
|
|
28
|
+
/>
|
|
29
|
+
<TableHeaderCell
|
|
30
|
+
as="th"
|
|
31
|
+
className="disabled"
|
|
32
|
+
content={
|
|
33
|
+
<Memo(MemoizedFormattedMessage)
|
|
34
|
+
id="concepts.props.status"
|
|
35
|
+
/>
|
|
36
|
+
}
|
|
37
|
+
key="1"
|
|
38
|
+
onClick={[Function]}
|
|
39
|
+
sorted="ascending"
|
|
40
|
+
/>
|
|
41
|
+
</TableRow>
|
|
17
42
|
</TableHeader>
|
|
18
43
|
<TableBody
|
|
19
44
|
as="tbody"
|
|
20
45
|
>
|
|
21
46
|
<ConceptRow
|
|
22
|
-
columns={
|
|
47
|
+
columns={
|
|
48
|
+
Array [
|
|
49
|
+
Object {
|
|
50
|
+
"name": "name",
|
|
51
|
+
},
|
|
52
|
+
Object {
|
|
53
|
+
"name": "status",
|
|
54
|
+
},
|
|
55
|
+
]
|
|
56
|
+
}
|
|
23
57
|
concept={
|
|
24
58
|
Object {
|
|
25
59
|
"id": 1,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
toggleConceptFilterValue,
|
|
7
7
|
searchConcepts,
|
|
8
8
|
selectConceptPage,
|
|
9
|
-
sortConcepts
|
|
9
|
+
sortConcepts,
|
|
10
10
|
} from "../routines";
|
|
11
11
|
|
|
12
12
|
const defaultPage = 1;
|
|
@@ -18,7 +18,7 @@ export const initialState = {
|
|
|
18
18
|
query: "",
|
|
19
19
|
page: defaultPage,
|
|
20
20
|
size: defaultSize,
|
|
21
|
-
sort: byNameSort
|
|
21
|
+
sort: byNameSort,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const conceptQuery = (state = initialState, { type, payload }) => {
|
|
@@ -16,7 +16,6 @@ import { conceptRedirect } from "./conceptRedirect";
|
|
|
16
16
|
import { conceptSelectedFilter } from "./conceptSelectedFilter";
|
|
17
17
|
import { concepts } from "./concepts";
|
|
18
18
|
import { conceptsActions } from "./conceptsActions";
|
|
19
|
-
import { conceptsDefaultFilters } from "./conceptsDefaultFilters";
|
|
20
19
|
import { conceptsDownloading } from "./conceptsDownloading";
|
|
21
20
|
import { conceptsLoading } from "./conceptsLoading";
|
|
22
21
|
import { conceptsPageSize } from "./conceptsPageSize";
|
|
@@ -39,7 +38,6 @@ export {
|
|
|
39
38
|
conceptArchive,
|
|
40
39
|
conceptArchiveLoading,
|
|
41
40
|
conceptCount,
|
|
42
|
-
conceptsDefaultFilters,
|
|
43
41
|
conceptFilters,
|
|
44
42
|
conceptFiltersLoading,
|
|
45
43
|
conceptLinking,
|
|
@@ -7,6 +7,7 @@ import { FormattedMessage } from "react-intl";
|
|
|
7
7
|
import { getConceptImplementationLinks } from "../selectors";
|
|
8
8
|
import { conceptLinkAction } from "../routines";
|
|
9
9
|
import ImplementationLinksAction from "./ImplementationLinksAction";
|
|
10
|
+
|
|
10
11
|
const RuleImplementationsTable = React.lazy(() =>
|
|
11
12
|
import("@truedat/dq/components/RuleImplementationsTable")
|
|
12
13
|
);
|
|
@@ -30,9 +30,12 @@ const ConceptSelectorRow = ({ concept, active, onClick, disabled }) => {
|
|
|
30
30
|
<Table.Cell
|
|
31
31
|
content={
|
|
32
32
|
<Label color={mapStatusColor[status]}>
|
|
33
|
-
{
|
|
34
|
-
<
|
|
35
|
-
|
|
33
|
+
{(
|
|
34
|
+
<FormattedMessage
|
|
35
|
+
id={`concepts.status.${status}`}
|
|
36
|
+
defaultMessage={status}
|
|
37
|
+
/>
|
|
38
|
+
) || <Icon name="ellipsis vertical" color="grey" />}
|
|
36
39
|
</Label>
|
|
37
40
|
}
|
|
38
41
|
/>
|
package/src/concepts/routines.js
CHANGED
|
@@ -36,12 +36,6 @@ export const toggleConceptFilterValue = createRoutine(
|
|
|
36
36
|
"TOGGLE_CONCEPT_FILTER_VALUE"
|
|
37
37
|
);
|
|
38
38
|
export const bulkUpdate = createRoutine("BULK_UPDATE");
|
|
39
|
-
export const setConceptDefaultFilters = createRoutine(
|
|
40
|
-
"SET_CONCEPT_DEFAULT_FILTERS"
|
|
41
|
-
);
|
|
42
|
-
export const clearConceptDefaultFilters = createRoutine(
|
|
43
|
-
"CLEAR_CONCEPT_DEFAULT_FILTERS"
|
|
44
|
-
);
|
|
45
39
|
export const saveSharedTo = createRoutine("SAVE_SHARED_TO");
|
|
46
40
|
export const setConfidentialConcept = createRoutine("SET_CONFIDENTIAL_CONCEPT");
|
|
47
41
|
|
package/src/messages/en.js
CHANGED
|
@@ -286,6 +286,7 @@ export default {
|
|
|
286
286
|
"tabs.bg.qualityImplementations": "Quality Implementations",
|
|
287
287
|
"tabs.bg.relations_business_concept": "Related Concepts",
|
|
288
288
|
"tabs.bg.relations_data_field": "Linkage",
|
|
289
|
+
"tabs.concepts": "Concepts",
|
|
289
290
|
"tabs.domains": "Domains",
|
|
290
291
|
"tabs.members": "Members",
|
|
291
292
|
"tabs.se.concepts": "Concepts",
|
package/src/messages/es.js
CHANGED
|
@@ -290,6 +290,7 @@ export default {
|
|
|
290
290
|
"tabs.bg.qualityImplementations": "Implementaciones",
|
|
291
291
|
"tabs.bg.relations_business_concept": "Conceptos relacionados",
|
|
292
292
|
"tabs.bg.relations_data_field": "Vinculación",
|
|
293
|
+
"tabs.concepts": "Conceptos",
|
|
293
294
|
"tabs.domains": "Dominios",
|
|
294
295
|
"tabs.members": "Roles",
|
|
295
296
|
"tabs.se.concepts": "Conceptos",
|
|
@@ -4,7 +4,13 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
5
|
import { Route, Switch } from "react-router-dom";
|
|
6
6
|
import { Segment } from "semantic-ui-react";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
DOMAIN,
|
|
9
|
+
DOMAIN_CONCEPTS,
|
|
10
|
+
DOMAIN_MEMBERS,
|
|
11
|
+
linkTo,
|
|
12
|
+
} from "@truedat/core/routes";
|
|
13
|
+
import DomainConcepts from "../../concepts/components/DomainConcepts";
|
|
8
14
|
import DomainActions from "./DomainActions";
|
|
9
15
|
import DomainCrumbs from "./DomainCrumbs";
|
|
10
16
|
import DomainCards from "./DomainCards";
|
|
@@ -19,8 +25,8 @@ export const Domain = ({ hasChildren, domain, domainLoading }) => {
|
|
|
19
25
|
order: 1,
|
|
20
26
|
icon: "cube",
|
|
21
27
|
messageId: "domain.actions.create",
|
|
22
|
-
action: id => linkTo.
|
|
23
|
-
}
|
|
28
|
+
action: (id) => linkTo.DOMAIN_NEW({ id }),
|
|
29
|
+
},
|
|
24
30
|
};
|
|
25
31
|
|
|
26
32
|
return domainLoading ? null : domain && domain.id ? (
|
|
@@ -42,7 +48,16 @@ export const Domain = ({ hasChildren, domain, domainLoading }) => {
|
|
|
42
48
|
</>
|
|
43
49
|
)}
|
|
44
50
|
/>
|
|
45
|
-
<Route
|
|
51
|
+
<Route
|
|
52
|
+
path={DOMAIN_MEMBERS}
|
|
53
|
+
render={() => <DomainMembers />}
|
|
54
|
+
exact
|
|
55
|
+
/>
|
|
56
|
+
<Route
|
|
57
|
+
path={DOMAIN_CONCEPTS}
|
|
58
|
+
render={() => <DomainConcepts />}
|
|
59
|
+
exact
|
|
60
|
+
/>
|
|
46
61
|
</Switch>
|
|
47
62
|
</Segment>
|
|
48
63
|
</Segment>
|
|
@@ -52,7 +67,8 @@ export const Domain = ({ hasChildren, domain, domainLoading }) => {
|
|
|
52
67
|
|
|
53
68
|
Domain.propTypes = {
|
|
54
69
|
hasChildren: PropTypes.bool,
|
|
55
|
-
domain: PropTypes.object
|
|
70
|
+
domain: PropTypes.object,
|
|
71
|
+
domainLoading: PropTypes.bool,
|
|
56
72
|
};
|
|
57
73
|
|
|
58
74
|
const mapStateToProps = ({ domain, domainLoading, domains }) => ({
|
|
@@ -62,7 +78,7 @@ const mapStateToProps = ({ domain, domainLoading, domains }) => ({
|
|
|
62
78
|
_.filter(_.prop("parent_id")),
|
|
63
79
|
_.filter(_.propEq("parent_id", _.prop("id")(domain))),
|
|
64
80
|
_.negate(_.isEmpty)
|
|
65
|
-
)(domains)
|
|
81
|
+
)(domains),
|
|
66
82
|
});
|
|
67
83
|
|
|
68
84
|
export default connect(mapStateToProps)(Domain);
|
|
@@ -44,13 +44,14 @@ export const DomainCrumbs = ({ parents, domain, actionCrumb }) => (
|
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
DomainCrumbs.propTypes = {
|
|
47
|
+
actionCrumb: PropTypes.string,
|
|
48
|
+
domain: PropTypes.object,
|
|
47
49
|
parents: PropTypes.array,
|
|
48
|
-
domain: PropTypes.object
|
|
49
50
|
};
|
|
50
51
|
|
|
51
|
-
const mapStateToProps = state => ({
|
|
52
|
+
const mapStateToProps = (state) => ({
|
|
52
53
|
domain: state.domain,
|
|
53
|
-
parents: getAncestorDomains(state)
|
|
54
|
+
parents: getAncestorDomains(state),
|
|
54
55
|
});
|
|
55
56
|
|
|
56
57
|
export default connect(mapStateToProps)(DomainCrumbs);
|
|
@@ -8,17 +8,15 @@ import { linkTo } from "@truedat/core/routes";
|
|
|
8
8
|
|
|
9
9
|
import DomainActions from "./DomainActions";
|
|
10
10
|
|
|
11
|
-
const toActionPath = linkTo.DOMAIN_ACTION;
|
|
12
|
-
|
|
13
11
|
export const DomainDetail = ({ type, name, description, domain_group }) => {
|
|
14
12
|
const available_actions = {
|
|
15
13
|
update: {
|
|
16
14
|
order: 2,
|
|
17
15
|
icon: "edit",
|
|
18
16
|
messageId: "actions.edit",
|
|
19
|
-
action: id =>
|
|
17
|
+
action: (id) => linkTo.DOMAIN_EDIT({ id }),
|
|
20
18
|
},
|
|
21
|
-
deleteOption: true
|
|
19
|
+
deleteOption: true,
|
|
22
20
|
};
|
|
23
21
|
return (
|
|
24
22
|
<>
|
|
@@ -57,7 +55,7 @@ DomainDetail.propTypes = {
|
|
|
57
55
|
type: PropTypes.string,
|
|
58
56
|
name: PropTypes.string,
|
|
59
57
|
description: PropTypes.string,
|
|
60
|
-
domain_group: PropTypes.object
|
|
58
|
+
domain_group: PropTypes.object,
|
|
61
59
|
};
|
|
62
60
|
|
|
63
61
|
const mapStateToProps = ({ domain }) => ({ ...domain });
|
|
@@ -4,13 +4,14 @@ import { Unauthorized } from "@truedat/core/components";
|
|
|
4
4
|
import { useAuthorized } from "@truedat/core/hooks";
|
|
5
5
|
import {
|
|
6
6
|
DOMAIN,
|
|
7
|
+
DOMAIN_CONCEPTS,
|
|
7
8
|
DOMAINS,
|
|
8
9
|
DOMAINS_NEW,
|
|
9
10
|
DOMAINS_SEARCH,
|
|
10
11
|
DOMAIN_EDIT,
|
|
11
12
|
DOMAIN_MEMBERS,
|
|
12
13
|
DOMAIN_MEMBERS_NEW,
|
|
13
|
-
DOMAIN_NEW
|
|
14
|
+
DOMAIN_NEW,
|
|
14
15
|
} from "@truedat/core/routes";
|
|
15
16
|
import AddDomainMember from "./AddMember";
|
|
16
17
|
import Domain from "./Domain";
|
|
@@ -39,6 +40,7 @@ const AuthorizedRoutes = () => (
|
|
|
39
40
|
<Route component={DomainLoader} />
|
|
40
41
|
<Route component={DomainMembersLoader} />
|
|
41
42
|
<Route path={DOMAIN} component={Domain} exact />
|
|
43
|
+
<Route path={DOMAIN_CONCEPTS} component={Domain} exact />
|
|
42
44
|
<Route path={DOMAIN_MEMBERS} component={Domain} exact />
|
|
43
45
|
<Route path={DOMAIN_EDIT} component={EditDomain} exact />
|
|
44
46
|
<Route path={DOMAIN_NEW} component={NewDomain} exact />
|