@truedat/bg 4.48.8 → 4.48.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/CHANGELOG.md +6 -0
- package/package.json +4 -4
- package/src/taxonomy/components/Domain.js +8 -1
- package/src/taxonomy/components/DomainRoutes.js +2 -0
- package/src/taxonomy/components/DomainStructures.js +27 -0
- package/src/taxonomy/components/DomainTabs.js +10 -0
- package/src/taxonomy/components/__tests__/DomainStructures.spec.js +12 -0
- package/src/taxonomy/components/__tests__/__snapshots__/Domain.spec.js.snap +10 -0
- package/src/taxonomy/components/__tests__/__snapshots__/DomainStructures.spec.js.snap +151 -0
- package/src/taxonomy/components/index.js +4 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/bg",
|
|
3
|
-
"version": "4.48.
|
|
3
|
+
"version": "4.48.11",
|
|
4
4
|
"description": "Truedat Web Business Glossary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@truedat/core": "4.48.
|
|
90
|
-
"@truedat/df": "4.48.
|
|
89
|
+
"@truedat/core": "4.48.11",
|
|
90
|
+
"@truedat/df": "4.48.11",
|
|
91
91
|
"file-saver": "^2.0.5",
|
|
92
92
|
"moment": "^2.24.0",
|
|
93
93
|
"path-to-regexp": "^1.7.0",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"react-dom": ">= 16.8.6 < 17",
|
|
108
108
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "c174776672b9079d23a00a6561db635d43cbeb32"
|
|
111
111
|
}
|
|
@@ -8,15 +8,17 @@ import {
|
|
|
8
8
|
DOMAIN,
|
|
9
9
|
DOMAIN_CONCEPTS,
|
|
10
10
|
DOMAIN_MEMBERS,
|
|
11
|
+
DOMAIN_STRUCTURES,
|
|
11
12
|
linkTo,
|
|
12
13
|
} from "@truedat/core/routes";
|
|
13
14
|
import DomainConcepts from "../../concepts/components/DomainConcepts";
|
|
14
15
|
import DomainActions from "./DomainActions";
|
|
15
|
-
import DomainCrumbs from "./DomainCrumbs";
|
|
16
16
|
import DomainCards from "./DomainCards";
|
|
17
|
+
import DomainCrumbs from "./DomainCrumbs";
|
|
17
18
|
import DomainDetail from "./DomainDetail";
|
|
18
19
|
import DomainMembers from "./DomainMembers";
|
|
19
20
|
import DomainSearch from "./DomainSearch";
|
|
21
|
+
import DomainStructures from "./DomainStructures";
|
|
20
22
|
import DomainTabs from "./DomainTabs";
|
|
21
23
|
|
|
22
24
|
export const Domain = ({ hasChildren, domain, domainLoading }) => {
|
|
@@ -58,6 +60,11 @@ export const Domain = ({ hasChildren, domain, domainLoading }) => {
|
|
|
58
60
|
render={() => <DomainConcepts />}
|
|
59
61
|
exact
|
|
60
62
|
/>
|
|
63
|
+
<Route
|
|
64
|
+
path={DOMAIN_STRUCTURES}
|
|
65
|
+
render={() => <DomainStructures />}
|
|
66
|
+
exact
|
|
67
|
+
/>
|
|
61
68
|
</Switch>
|
|
62
69
|
</Segment>
|
|
63
70
|
</Segment>
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
DOMAIN_MEMBERS,
|
|
13
13
|
DOMAIN_MEMBERS_NEW,
|
|
14
14
|
DOMAIN_NEW,
|
|
15
|
+
DOMAIN_STRUCTURES,
|
|
15
16
|
} from "@truedat/core/routes";
|
|
16
17
|
import AddDomainMember from "./AddMember";
|
|
17
18
|
import Domain from "./Domain";
|
|
@@ -41,6 +42,7 @@ const AuthorizedRoutes = () => (
|
|
|
41
42
|
<Route component={DomainMembersLoader} />
|
|
42
43
|
<Route path={DOMAIN} component={Domain} exact />
|
|
43
44
|
<Route path={DOMAIN_CONCEPTS} component={Domain} exact />
|
|
45
|
+
<Route path={DOMAIN_STRUCTURES} component={Domain} exact />
|
|
44
46
|
<Route path={DOMAIN_MEMBERS} component={Domain} exact />
|
|
45
47
|
<Route path={DOMAIN_EDIT} component={EditDomain} exact />
|
|
46
48
|
<Route path={DOMAIN_NEW} component={NewDomain} exact />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { connect } from "react-redux";
|
|
4
|
+
import StructureFiltersLoader from "@truedat/dd/components/StructureFiltersLoader";
|
|
5
|
+
import StructuresLoader from "@truedat/dd/components/StructuresLoader";
|
|
6
|
+
import StructuresView from "@truedat/dd/components/StructuresView";
|
|
7
|
+
|
|
8
|
+
export const DomainStructures = ({ domain = {} }) => {
|
|
9
|
+
const defaultFilters = {
|
|
10
|
+
taxonomy: [domain.id],
|
|
11
|
+
};
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<StructureFiltersLoader defaultFilters={defaultFilters} />
|
|
15
|
+
<StructuresLoader defaultFilters={defaultFilters} />
|
|
16
|
+
<StructuresView embedded />
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
DomainStructures.propTypes = {
|
|
22
|
+
domain: PropTypes.object.isRequired,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const mapStateToProps = ({ domain }) => ({ domain });
|
|
26
|
+
|
|
27
|
+
export default connect(mapStateToProps)(DomainStructures);
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DOMAIN,
|
|
11
11
|
DOMAIN_CONCEPTS,
|
|
12
12
|
DOMAIN_MEMBERS,
|
|
13
|
+
DOMAIN_STRUCTURES,
|
|
13
14
|
linkTo,
|
|
14
15
|
} from "@truedat/core/routes";
|
|
15
16
|
|
|
@@ -42,6 +43,15 @@ const DomainTabs = ({ domain }) => {
|
|
|
42
43
|
>
|
|
43
44
|
<FormattedMessage id="tabs.concepts" />
|
|
44
45
|
</Menu.Item>
|
|
46
|
+
|
|
47
|
+
<Menu.Item
|
|
48
|
+
active={path === DOMAIN_STRUCTURES}
|
|
49
|
+
as={Link}
|
|
50
|
+
to={linkTo.DOMAIN_STRUCTURES({ id })}
|
|
51
|
+
replace
|
|
52
|
+
>
|
|
53
|
+
<FormattedMessage id="tabs.structures" />
|
|
54
|
+
</Menu.Item>
|
|
45
55
|
</Menu>
|
|
46
56
|
);
|
|
47
57
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import DomainStructures from "../DomainStructures";
|
|
4
|
+
|
|
5
|
+
describe("<DomainStructures />", () => {
|
|
6
|
+
const renderOpts = { state: { domain: { id: 1, name: "domain" } } };
|
|
7
|
+
|
|
8
|
+
it("matches the latest snapshot", () => {
|
|
9
|
+
const { container } = render(<DomainStructures />, renderOpts);
|
|
10
|
+
expect(container).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -25,6 +25,11 @@ exports[`<Domain /> matches the latest snapshot (no subdomains) 1`] = `
|
|
|
25
25
|
path="/domains/:id/concepts"
|
|
26
26
|
render={[Function]}
|
|
27
27
|
/>
|
|
28
|
+
<Route
|
|
29
|
+
exact={true}
|
|
30
|
+
path="/domains/:id/structures"
|
|
31
|
+
render={[Function]}
|
|
32
|
+
/>
|
|
28
33
|
</Switch>
|
|
29
34
|
</Segment>
|
|
30
35
|
</Segment>
|
|
@@ -56,6 +61,11 @@ exports[`<Domain /> matches the latest snapshot (with subdomains) 1`] = `
|
|
|
56
61
|
path="/domains/:id/concepts"
|
|
57
62
|
render={[Function]}
|
|
58
63
|
/>
|
|
64
|
+
<Route
|
|
65
|
+
exact={true}
|
|
66
|
+
path="/domains/:id/structures"
|
|
67
|
+
render={[Function]}
|
|
68
|
+
/>
|
|
59
69
|
</Switch>
|
|
60
70
|
</Segment>
|
|
61
71
|
</Segment>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<DomainStructures /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
aria-expanded="false"
|
|
7
|
+
class="ui floating dropdown button icon group-actions button-update"
|
|
8
|
+
role="listbox"
|
|
9
|
+
tabindex="0"
|
|
10
|
+
>
|
|
11
|
+
<i
|
|
12
|
+
aria-hidden="true"
|
|
13
|
+
class="ellipsis vertical icon"
|
|
14
|
+
/>
|
|
15
|
+
<div
|
|
16
|
+
class="menu transition left"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="divider"
|
|
20
|
+
/>
|
|
21
|
+
<div
|
|
22
|
+
aria-disabled="true"
|
|
23
|
+
class="disabled item"
|
|
24
|
+
role="option"
|
|
25
|
+
>
|
|
26
|
+
<i
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
class="download icon"
|
|
29
|
+
/>
|
|
30
|
+
<span>
|
|
31
|
+
Download structures metadata
|
|
32
|
+
</span>
|
|
33
|
+
<p
|
|
34
|
+
class="menu-item-description"
|
|
35
|
+
>
|
|
36
|
+
You must search or filter to download structures
|
|
37
|
+
</p>
|
|
38
|
+
</div>
|
|
39
|
+
<div
|
|
40
|
+
aria-disabled="true"
|
|
41
|
+
class="disabled item"
|
|
42
|
+
role="option"
|
|
43
|
+
>
|
|
44
|
+
<i
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
class="download icon"
|
|
47
|
+
/>
|
|
48
|
+
<span>
|
|
49
|
+
Download editable structures metadata
|
|
50
|
+
</span>
|
|
51
|
+
<p
|
|
52
|
+
class="menu-item-description"
|
|
53
|
+
>
|
|
54
|
+
You must search or filter to download structures
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
<div
|
|
58
|
+
class="divider"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div
|
|
63
|
+
class="ui action left icon input"
|
|
64
|
+
>
|
|
65
|
+
<i
|
|
66
|
+
aria-hidden="true"
|
|
67
|
+
class="search link icon"
|
|
68
|
+
/>
|
|
69
|
+
<input
|
|
70
|
+
placeholder="Search structures..."
|
|
71
|
+
type="text"
|
|
72
|
+
value=""
|
|
73
|
+
/>
|
|
74
|
+
<button
|
|
75
|
+
class="ui icon button"
|
|
76
|
+
>
|
|
77
|
+
<i
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
class="calendar alternate outline icon"
|
|
80
|
+
/>
|
|
81
|
+
</button>
|
|
82
|
+
<div
|
|
83
|
+
aria-expanded="false"
|
|
84
|
+
class="ui button floating labeled scrolling dropdown icon"
|
|
85
|
+
role="listbox"
|
|
86
|
+
tabindex="0"
|
|
87
|
+
>
|
|
88
|
+
<div
|
|
89
|
+
aria-atomic="true"
|
|
90
|
+
aria-live="polite"
|
|
91
|
+
class="divider text"
|
|
92
|
+
role="alert"
|
|
93
|
+
>
|
|
94
|
+
Filters
|
|
95
|
+
</div>
|
|
96
|
+
<i
|
|
97
|
+
aria-hidden="true"
|
|
98
|
+
class="filter icon"
|
|
99
|
+
/>
|
|
100
|
+
<div
|
|
101
|
+
class="menu transition"
|
|
102
|
+
>
|
|
103
|
+
<div
|
|
104
|
+
class="item"
|
|
105
|
+
role="option"
|
|
106
|
+
>
|
|
107
|
+
<em>
|
|
108
|
+
(reset all filters)
|
|
109
|
+
</em>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div
|
|
115
|
+
class="selectedFilters"
|
|
116
|
+
/>
|
|
117
|
+
<div
|
|
118
|
+
class="dimmable"
|
|
119
|
+
>
|
|
120
|
+
<div
|
|
121
|
+
class="ui inverted dimmer"
|
|
122
|
+
>
|
|
123
|
+
<div
|
|
124
|
+
class="content"
|
|
125
|
+
>
|
|
126
|
+
<div
|
|
127
|
+
class="ui large loader"
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div
|
|
132
|
+
class="ui icon info message"
|
|
133
|
+
>
|
|
134
|
+
<i
|
|
135
|
+
aria-hidden="true"
|
|
136
|
+
class="search icon"
|
|
137
|
+
/>
|
|
138
|
+
<div
|
|
139
|
+
class="content"
|
|
140
|
+
>
|
|
141
|
+
<div
|
|
142
|
+
class="header"
|
|
143
|
+
>
|
|
144
|
+
Nothing found...
|
|
145
|
+
</div>
|
|
146
|
+
No structures have been found matching these filters.
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
`;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import DomainsLoader from "./DomainsLoader";
|
|
2
|
-
import DomainRoutes from "./DomainRoutes";
|
|
3
1
|
import DomainDropdownSelector from "./DomainDropdownSelector";
|
|
4
2
|
import DomainMenuSelector from "./DomainMenuSelector";
|
|
3
|
+
import DomainRoutes from "./DomainRoutes";
|
|
4
|
+
import DomainsLoader from "./DomainsLoader";
|
|
5
|
+
import DomainStructures from "./DomainStructures";
|
|
5
6
|
|
|
6
7
|
export {
|
|
7
8
|
DomainDropdownSelector,
|
|
8
9
|
DomainMenuSelector,
|
|
9
10
|
DomainRoutes,
|
|
10
11
|
DomainsLoader,
|
|
12
|
+
DomainStructures,
|
|
11
13
|
};
|