@truedat/core 7.1.2 → 7.1.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/package.json +3 -3
- package/src/components/GlossaryMenu.js +240 -37
- package/src/components/Submenu.js +55 -27
- package/src/components/__tests__/__snapshots__/AdminMenu.spec.js.snap +0 -10
- package/src/components/__tests__/__snapshots__/GlossaryMenu.spec.js.snap +8 -10
- package/src/components/__tests__/__snapshots__/SideMenu.spec.js.snap +87 -38
- package/src/routes.js +19 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/core",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.4",
|
|
4
4
|
"description": "Truedat Web Core",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@testing-library/react": "^12.0.0",
|
|
37
37
|
"@testing-library/react-hooks": "^8.0.1",
|
|
38
38
|
"@testing-library/user-event": "^13.2.1",
|
|
39
|
-
"@truedat/test": "7.1.
|
|
39
|
+
"@truedat/test": "7.1.4",
|
|
40
40
|
"babel-jest": "^28.1.0",
|
|
41
41
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
42
42
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"react-dom": ">= 16.8.6 < 17",
|
|
119
119
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "4b951559f6e84f85ed054bf9afe8699dc57f7b8f"
|
|
122
122
|
}
|
|
@@ -4,8 +4,14 @@ import TemplatesLoader from "@truedat/df/templates/components/TemplatesLoader";
|
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
6
6
|
import { makeGetSubscopes } from "@truedat/df/selectors/subscopedTemplates";
|
|
7
|
+
import { matchPath } from "react-router-dom";
|
|
7
8
|
import { linkTo } from "@truedat/core/routes";
|
|
8
9
|
import { useIntl } from "react-intl";
|
|
10
|
+
import { getSidemenuGlossarySubscopes } from "@truedat/bg/concepts/selectors/getSidemenuGlossarySubscopes";
|
|
11
|
+
import { getConceptSubscope } from "@truedat/bg/concepts/selectors/getConceptSubscope";
|
|
12
|
+
import { getConceptStatus } from "@truedat/bg/concepts/selectors/getConceptStatus";
|
|
13
|
+
import { useSelector } from "react-redux";
|
|
14
|
+
import { useLocation } from "react-router-dom";
|
|
9
15
|
import { useAuthorized } from "../hooks";
|
|
10
16
|
import {
|
|
11
17
|
CONCEPTS,
|
|
@@ -13,84 +19,281 @@ import {
|
|
|
13
19
|
CONCEPTS_DEPRECATED,
|
|
14
20
|
CONCEPT_LINKS_MANAGEMENT,
|
|
15
21
|
CONCEPTS_BULK_UPLOAD_EVENTS,
|
|
22
|
+
CONCEPTS_SIDEMENU_MANAGEMENT_LINKS,
|
|
23
|
+
CONCEPTS_SIDEMENU_MANAGEMENT_UPLOADS,
|
|
24
|
+
CONCEPTS_SUBSCOPE,
|
|
25
|
+
CONCEPTS_SIDEMENU_SUBSCOPE,
|
|
26
|
+
CONCEPTS_SIDEMENU_SUBSCOPE_DEPRECATED,
|
|
27
|
+
CONCEPTS_SIDEMENU_SUBSCOPE_PENDING,
|
|
28
|
+
CONCEPT_VERSION,
|
|
16
29
|
} from "../routes";
|
|
17
30
|
import Submenu from "./Submenu";
|
|
18
31
|
|
|
19
|
-
|
|
20
|
-
{
|
|
32
|
+
function isMenuSubscope(pathname, subscope) {
|
|
33
|
+
const match = matchPath(pathname, {
|
|
34
|
+
path: [
|
|
35
|
+
CONCEPTS_SUBSCOPE,
|
|
36
|
+
CONCEPTS_SIDEMENU_SUBSCOPE,
|
|
37
|
+
CONCEPTS_SIDEMENU_SUBSCOPE_DEPRECATED,
|
|
38
|
+
CONCEPTS_SIDEMENU_SUBSCOPE_PENDING,
|
|
39
|
+
],
|
|
40
|
+
exact: false,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return !!match?.params?.subscope && subscope === match.params.subscope;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function mainMenuSubscopes(allSubscopes, rootSubscopes) {
|
|
47
|
+
return allSubscopes.filter((sc) => !rootSubscopes.includes(sc));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function buildMainConceptsSubmenuItems(
|
|
51
|
+
rootSubscopes,
|
|
52
|
+
mainSubscopes,
|
|
53
|
+
conceptStatus,
|
|
54
|
+
conceptSubscope,
|
|
55
|
+
pathname
|
|
56
|
+
) {
|
|
57
|
+
const leftoverSubscopeItems = _.flow(
|
|
58
|
+
_.map((sc) => ({
|
|
59
|
+
name: sc,
|
|
60
|
+
routes: [linkTo.CONCEPTS_SUBSCOPE({ subscope: sc })],
|
|
61
|
+
groups: ["business_glossary_view"],
|
|
62
|
+
isActive: () =>
|
|
63
|
+
(conceptStatus === "published" && sc === conceptSubscope) ||
|
|
64
|
+
pathname === linkTo.CONCEPTS_SUBSCOPE({ subscope: sc }),
|
|
65
|
+
})),
|
|
66
|
+
_.orderBy(["name"], ["asc"])
|
|
67
|
+
)(mainSubscopes);
|
|
68
|
+
|
|
69
|
+
const mainItem = {
|
|
21
70
|
name: "concepts",
|
|
22
71
|
routes: [CONCEPTS],
|
|
23
72
|
groups: ["business_glossary_view"],
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
73
|
+
isActive: () =>
|
|
74
|
+
(conceptStatus === "published" && conceptSubscope == null) ||
|
|
75
|
+
pathname === CONCEPTS,
|
|
76
|
+
};
|
|
77
|
+
const mainPending = {
|
|
27
78
|
name: "concepts_management",
|
|
28
79
|
routes: [CONCEPTS_PENDING],
|
|
29
80
|
groups: ["business_glossary_management"],
|
|
30
|
-
|
|
31
|
-
|
|
81
|
+
isActive: () =>
|
|
82
|
+
["draft", "pending_approval", "rejected"].includes(conceptStatus) ||
|
|
83
|
+
pathname === CONCEPTS_PENDING,
|
|
84
|
+
};
|
|
85
|
+
const mainDeprecated = {
|
|
32
86
|
name: "concepts_deprecated",
|
|
33
87
|
routes: [CONCEPTS_DEPRECATED],
|
|
34
88
|
groups: ["business_glossary_management"],
|
|
35
|
-
|
|
36
|
-
|
|
89
|
+
isActive: () =>
|
|
90
|
+
conceptStatus === "deprecated" || pathname === CONCEPTS_DEPRECATED,
|
|
91
|
+
};
|
|
92
|
+
const manageLinks = {
|
|
37
93
|
name: "concepts_links_management",
|
|
38
94
|
routes: [CONCEPT_LINKS_MANAGEMENT],
|
|
39
95
|
groups: ["business_glossary_management"],
|
|
40
|
-
|
|
41
|
-
|
|
96
|
+
isActive: () => pathname === CONCEPT_LINKS_MANAGEMENT,
|
|
97
|
+
};
|
|
98
|
+
const manageUploads = {
|
|
42
99
|
name: "concepts_upload_events",
|
|
43
100
|
routes: [CONCEPTS_BULK_UPLOAD_EVENTS],
|
|
44
101
|
groups: ["business_glossary_management"],
|
|
45
|
-
|
|
46
|
-
|
|
102
|
+
isActive: () => pathname === CONCEPTS_BULK_UPLOAD_EVENTS,
|
|
103
|
+
};
|
|
47
104
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
105
|
+
return [
|
|
106
|
+
mainItem,
|
|
107
|
+
...leftoverSubscopeItems,
|
|
108
|
+
mainPending,
|
|
109
|
+
mainDeprecated,
|
|
110
|
+
...(rootSubscopes.length > 0 ? [] : [manageLinks, manageUploads]),
|
|
111
|
+
];
|
|
112
|
+
}
|
|
56
113
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
114
|
+
function buildRootSubscopeSubmenuItems(
|
|
115
|
+
name,
|
|
116
|
+
formatMessage,
|
|
117
|
+
conceptStatus,
|
|
118
|
+
pathname
|
|
119
|
+
) {
|
|
120
|
+
const publishedRoute = linkTo.CONCEPTS_SIDEMENU_SUBSCOPE({ subscope: name });
|
|
121
|
+
const pendingRoute = linkTo.CONCEPTS_SIDEMENU_SUBSCOPE_PENDING({
|
|
122
|
+
subscope: name,
|
|
123
|
+
});
|
|
124
|
+
const deprecatedRoute = linkTo.CONCEPTS_SIDEMENU_SUBSCOPE_DEPRECATED({
|
|
125
|
+
subscope: name,
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
const menuName = formatMessage({ id: `concepts.${name}.main.header` });
|
|
129
|
+
|
|
130
|
+
return [
|
|
131
|
+
{
|
|
132
|
+
name: menuName,
|
|
133
|
+
routes: [publishedRoute],
|
|
134
|
+
groups: ["business_glossary_view"],
|
|
135
|
+
isActive: () =>
|
|
136
|
+
conceptStatus === "published" || pathname === publishedRoute,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "concepts_management",
|
|
140
|
+
routes: [pendingRoute],
|
|
141
|
+
groups: ["business_glossary_management"],
|
|
142
|
+
isActive: () => conceptStatus === "draft" || pathname === pendingRoute,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "concepts_deprecated",
|
|
146
|
+
routes: [deprecatedRoute],
|
|
147
|
+
groups: ["business_glossary_management"],
|
|
148
|
+
isActive: () =>
|
|
149
|
+
conceptStatus === "deprecated" || pathname === deprecatedRoute,
|
|
150
|
+
},
|
|
151
|
+
];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function buildManagementSubmenuItems() {
|
|
155
|
+
return [
|
|
156
|
+
{
|
|
157
|
+
name: "concepts_links_management",
|
|
158
|
+
routes: [CONCEPTS_SIDEMENU_MANAGEMENT_LINKS],
|
|
159
|
+
groups: ["business_glossary_management"],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: "concepts_upload_events",
|
|
163
|
+
routes: [CONCEPTS_SIDEMENU_MANAGEMENT_UPLOADS],
|
|
164
|
+
groups: ["business_glossary_management"],
|
|
165
|
+
},
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function isMainConcepts(location, conceptSubscope, mainSubscopes) {
|
|
170
|
+
const isConceptsMatch = matchPath(location.pathname, {
|
|
171
|
+
path: [CONCEPTS],
|
|
172
|
+
exact: false,
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
const isConceptsVersionMatch = matchPath(location.pathname, {
|
|
176
|
+
path: [CONCEPT_VERSION],
|
|
177
|
+
exact: false,
|
|
62
178
|
});
|
|
179
|
+
|
|
180
|
+
if (isConceptsVersionMatch) {
|
|
181
|
+
return conceptSubscope === null || mainSubscopes.includes(conceptSubscope);
|
|
182
|
+
} else if (isConceptsMatch) {
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export const GlossaryMenu = ({ bgSubscopes, rootSubscopes }) => {
|
|
190
|
+
const { formatMessage } = useIntl();
|
|
191
|
+
|
|
192
|
+
const conceptSubscope = useSelector(getConceptSubscope);
|
|
193
|
+
const conceptStatus = useSelector(getConceptStatus);
|
|
194
|
+
|
|
63
195
|
const authorized = useAuthorized([
|
|
64
196
|
"business_glossary_view",
|
|
65
197
|
"business_glossary_management",
|
|
66
198
|
]);
|
|
67
199
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
200
|
+
const location = useLocation();
|
|
201
|
+
|
|
202
|
+
if (!authorized) return null;
|
|
203
|
+
|
|
204
|
+
const defaultIcon = formatMessage({
|
|
205
|
+
id: "sidemenu.glossary.icon",
|
|
206
|
+
defaultMessage: "tags",
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const managegmentIcon = formatMessage({
|
|
210
|
+
id: "sidemenu.glossary.managament.icon",
|
|
211
|
+
defaultMessage: "cogs",
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
const mainSubscopes = mainMenuSubscopes(bgSubscopes, rootSubscopes);
|
|
215
|
+
|
|
216
|
+
const mainItems = buildMainConceptsSubmenuItems(
|
|
217
|
+
rootSubscopes,
|
|
218
|
+
mainSubscopes,
|
|
219
|
+
conceptStatus,
|
|
220
|
+
conceptSubscope,
|
|
221
|
+
location.pathname
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
const rootSubscopeSubmenus = rootSubscopes.map((name) => {
|
|
225
|
+
const items = buildRootSubscopeSubmenuItems(
|
|
226
|
+
name,
|
|
227
|
+
formatMessage,
|
|
228
|
+
conceptStatus,
|
|
229
|
+
location.pathname
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
const icon = formatMessage({
|
|
233
|
+
id: `concepts.${name}.icon`,
|
|
234
|
+
defaultMessage: "tags",
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
const menuName = formatMessage({
|
|
238
|
+
id: `concepts.${name}.main.header`,
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
const isActiveSubscope = () =>
|
|
242
|
+
conceptSubscope === name || isMenuSubscope(location.pathname, name);
|
|
243
|
+
|
|
244
|
+
return (
|
|
245
|
+
<Submenu
|
|
246
|
+
key={name}
|
|
247
|
+
icon={icon}
|
|
248
|
+
name={menuName}
|
|
249
|
+
items={items}
|
|
250
|
+
isActiveOverride={isActiveSubscope}
|
|
251
|
+
/>
|
|
252
|
+
);
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
const managementSubmenu = rootSubscopes.length > 0 && (
|
|
256
|
+
<Submenu
|
|
257
|
+
key="glossary.management"
|
|
258
|
+
icon={managegmentIcon}
|
|
259
|
+
name="glossary.management"
|
|
260
|
+
items={buildManagementSubmenuItems()}
|
|
261
|
+
/>
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
return (
|
|
73
265
|
<>
|
|
74
266
|
<TemplatesLoader />
|
|
75
267
|
<Submenu
|
|
76
|
-
|
|
77
|
-
icon={iconGlossary}
|
|
268
|
+
icon={defaultIcon}
|
|
78
269
|
name="glossary"
|
|
270
|
+
items={mainItems}
|
|
271
|
+
isActiveOverride={() =>
|
|
272
|
+
isMainConcepts(location, conceptSubscope, mainSubscopes)
|
|
273
|
+
}
|
|
79
274
|
/>
|
|
275
|
+
{rootSubscopeSubmenus}
|
|
276
|
+
{managementSubmenu}
|
|
80
277
|
</>
|
|
81
|
-
)
|
|
278
|
+
);
|
|
82
279
|
};
|
|
83
280
|
|
|
84
281
|
GlossaryMenu.propTypes = {
|
|
85
|
-
bgSubscopes: PropTypes.array,
|
|
282
|
+
bgSubscopes: PropTypes.array.isRequired,
|
|
283
|
+
rootSubscopes: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
GlossaryMenu.defaultProps = {
|
|
287
|
+
bgSubscopes: [],
|
|
288
|
+
rootSubscopes: [],
|
|
86
289
|
};
|
|
87
290
|
|
|
88
291
|
const makeMapStateToProps = () => {
|
|
89
292
|
const getSubscopes = makeGetSubscopes("bg");
|
|
90
|
-
|
|
293
|
+
return (state, props) => ({
|
|
91
294
|
bgSubscopes: getSubscopes(state, props),
|
|
295
|
+
rootSubscopes: getSidemenuGlossarySubscopes(state) || [],
|
|
92
296
|
});
|
|
93
|
-
return mapStateToProps;
|
|
94
297
|
};
|
|
95
298
|
|
|
96
299
|
export default connect(makeMapStateToProps)(GlossaryMenu);
|
|
@@ -66,27 +66,43 @@ export const Submenu = ({
|
|
|
66
66
|
icon,
|
|
67
67
|
name,
|
|
68
68
|
sidebarVisible,
|
|
69
|
+
isActiveOverride,
|
|
69
70
|
}) => {
|
|
70
71
|
const [open, setOpen] = useState(false);
|
|
71
|
-
const active = useActiveRoutes(_.flatMap("routes")(items), navFilter);
|
|
72
|
-
const filteredItems = useAuthorizedItems(items);
|
|
73
|
-
const location = useLocation();
|
|
74
72
|
const history = useHistory();
|
|
73
|
+
const location = useLocation();
|
|
74
|
+
|
|
75
|
+
const activeRoute = useActiveRoutes(_.flatMap("routes")(items), navFilter);
|
|
76
|
+
|
|
77
|
+
const isActive = isActiveOverride ? isActiveOverride() : activeRoute;
|
|
78
|
+
|
|
79
|
+
const filteredItems = useAuthorizedItems(items);
|
|
80
|
+
|
|
75
81
|
useEffect(() => {
|
|
76
82
|
setOpen(false);
|
|
77
83
|
}, [location]);
|
|
84
|
+
|
|
78
85
|
const primaryRoute = _.flow(_.flatMap("routes"), _.head)(filteredItems);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
|
|
87
|
+
if (isActive && sidebarVisible) {
|
|
88
|
+
const menuItems = filteredItems.map((item, i) => {
|
|
89
|
+
const isItemActive =
|
|
90
|
+
isActive &&
|
|
91
|
+
(item.isActive
|
|
92
|
+
? item.isActive()
|
|
93
|
+
: _.includes(activeRoute, item.routes));
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<MenuItem
|
|
97
|
+
key={i}
|
|
98
|
+
{...{
|
|
99
|
+
...item,
|
|
100
|
+
clearNavFilter,
|
|
101
|
+
active: isItemActive,
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
);
|
|
105
|
+
});
|
|
90
106
|
return (
|
|
91
107
|
<Menu.Item
|
|
92
108
|
name={name}
|
|
@@ -103,7 +119,7 @@ export const Submenu = ({
|
|
|
103
119
|
</Menu.Item>
|
|
104
120
|
);
|
|
105
121
|
} else {
|
|
106
|
-
const className =
|
|
122
|
+
const className = isActive ? "active" : null;
|
|
107
123
|
|
|
108
124
|
const trigger = (
|
|
109
125
|
<Link to={primaryRoute} className="ui">
|
|
@@ -113,17 +129,25 @@ export const Submenu = ({
|
|
|
113
129
|
)}
|
|
114
130
|
</Link>
|
|
115
131
|
);
|
|
116
|
-
const dropdownItems = filteredItems.map((item, i) =>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
const dropdownItems = filteredItems.map((item, i) => {
|
|
133
|
+
const isItemActive =
|
|
134
|
+
isActive &&
|
|
135
|
+
(item.isActive
|
|
136
|
+
? item.isActive()
|
|
137
|
+
: _.includes(activeRoute, item.routes));
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<DropdownItem
|
|
141
|
+
key={i}
|
|
142
|
+
{...{
|
|
143
|
+
...item,
|
|
144
|
+
navFilter,
|
|
145
|
+
clearNavFilter,
|
|
146
|
+
active: isItemActive,
|
|
147
|
+
}}
|
|
148
|
+
/>
|
|
149
|
+
);
|
|
150
|
+
});
|
|
127
151
|
|
|
128
152
|
return (
|
|
129
153
|
<div
|
|
@@ -163,13 +187,17 @@ export const Submenu = ({
|
|
|
163
187
|
};
|
|
164
188
|
|
|
165
189
|
Submenu.propTypes = {
|
|
166
|
-
active: PropTypes.bool,
|
|
167
190
|
navFilter: PropTypes.object,
|
|
168
191
|
clearNavFilter: PropTypes.func,
|
|
169
192
|
items: PropTypes.array,
|
|
170
193
|
icon: PropTypes.string,
|
|
171
194
|
name: PropTypes.string,
|
|
172
195
|
sidebarVisible: PropTypes.bool,
|
|
196
|
+
isActiveOverride: PropTypes.func,
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
Submenu.defaultProps = {
|
|
200
|
+
isActiveOverride: null,
|
|
173
201
|
};
|
|
174
202
|
|
|
175
203
|
export const mapStateToProps = ({ sidebarVisible, navFilter }) => {
|
|
@@ -31,7 +31,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
31
31
|
class="divider"
|
|
32
32
|
/>
|
|
33
33
|
<a
|
|
34
|
-
aria-checked="false"
|
|
35
34
|
class="item"
|
|
36
35
|
href="/templates"
|
|
37
36
|
name="templates"
|
|
@@ -44,7 +43,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
44
43
|
</span>
|
|
45
44
|
</a>
|
|
46
45
|
<a
|
|
47
|
-
aria-checked="false"
|
|
48
46
|
class="item"
|
|
49
47
|
href="/hierarchies"
|
|
50
48
|
name="hierarchies"
|
|
@@ -57,7 +55,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
57
55
|
</span>
|
|
58
56
|
</a>
|
|
59
57
|
<a
|
|
60
|
-
aria-checked="false"
|
|
61
58
|
class="item"
|
|
62
59
|
href="/relationTags"
|
|
63
60
|
name="relations"
|
|
@@ -70,7 +67,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
70
67
|
</span>
|
|
71
68
|
</a>
|
|
72
69
|
<a
|
|
73
|
-
aria-checked="false"
|
|
74
70
|
class="item"
|
|
75
71
|
href="/subscriptions"
|
|
76
72
|
name="subscriptions"
|
|
@@ -83,7 +79,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
83
79
|
</span>
|
|
84
80
|
</a>
|
|
85
81
|
<a
|
|
86
|
-
aria-checked="false"
|
|
87
82
|
class="item"
|
|
88
83
|
href="/sources"
|
|
89
84
|
name="sources"
|
|
@@ -96,7 +91,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
96
91
|
</span>
|
|
97
92
|
</a>
|
|
98
93
|
<a
|
|
99
|
-
aria-checked="false"
|
|
100
94
|
class="item"
|
|
101
95
|
href="/jobs"
|
|
102
96
|
name="jobs"
|
|
@@ -109,7 +103,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
109
103
|
</span>
|
|
110
104
|
</a>
|
|
111
105
|
<a
|
|
112
|
-
aria-checked="false"
|
|
113
106
|
class="item"
|
|
114
107
|
href="/configurations"
|
|
115
108
|
name="configurations"
|
|
@@ -122,7 +115,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
122
115
|
</span>
|
|
123
116
|
</a>
|
|
124
117
|
<a
|
|
125
|
-
aria-checked="false"
|
|
126
118
|
class="item"
|
|
127
119
|
href="/i18n/messages"
|
|
128
120
|
name="i18nMessages"
|
|
@@ -135,7 +127,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
135
127
|
</span>
|
|
136
128
|
</a>
|
|
137
129
|
<a
|
|
138
|
-
aria-checked="false"
|
|
139
130
|
class="item"
|
|
140
131
|
href="/reindex"
|
|
141
132
|
name="tasks"
|
|
@@ -148,7 +139,6 @@ exports[`<AdminMenu /> matches the latest snapshot 1`] = `
|
|
|
148
139
|
</span>
|
|
149
140
|
</a>
|
|
150
141
|
<a
|
|
151
|
-
aria-checked="false"
|
|
152
142
|
class="item"
|
|
153
143
|
href="/search/elasticIndexes"
|
|
154
144
|
name="elasticIndexes"
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes submenus 1`] = `
|
|
4
4
|
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="active"
|
|
7
|
-
>
|
|
5
|
+
<div>
|
|
8
6
|
<div
|
|
9
7
|
aria-expanded="false"
|
|
10
|
-
class="ui item dropdown
|
|
8
|
+
class="ui item dropdown"
|
|
11
9
|
role="listbox"
|
|
12
10
|
tabindex="0"
|
|
13
11
|
>
|
|
@@ -47,7 +45,7 @@ exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes
|
|
|
47
45
|
<a
|
|
48
46
|
aria-checked="false"
|
|
49
47
|
class="item"
|
|
50
|
-
href="/
|
|
48
|
+
href="/concepts/subscope/subscope1"
|
|
51
49
|
name="subscope1"
|
|
52
50
|
role="option"
|
|
53
51
|
>
|
|
@@ -60,7 +58,7 @@ exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes
|
|
|
60
58
|
<a
|
|
61
59
|
aria-checked="false"
|
|
62
60
|
class="item"
|
|
63
|
-
href="/
|
|
61
|
+
href="/concepts/subscope/subscope2"
|
|
64
62
|
name="subscope2"
|
|
65
63
|
role="option"
|
|
66
64
|
>
|
|
@@ -73,7 +71,7 @@ exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes
|
|
|
73
71
|
<a
|
|
74
72
|
aria-checked="false"
|
|
75
73
|
class="item"
|
|
76
|
-
href="/
|
|
74
|
+
href="/concepts/pending"
|
|
77
75
|
name="concepts_management"
|
|
78
76
|
role="option"
|
|
79
77
|
>
|
|
@@ -86,7 +84,7 @@ exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes
|
|
|
86
84
|
<a
|
|
87
85
|
aria-checked="false"
|
|
88
86
|
class="item"
|
|
89
|
-
href="/
|
|
87
|
+
href="/concepts/deprecated"
|
|
90
88
|
name="concepts_deprecated"
|
|
91
89
|
role="option"
|
|
92
90
|
>
|
|
@@ -99,7 +97,7 @@ exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes
|
|
|
99
97
|
<a
|
|
100
98
|
aria-checked="false"
|
|
101
99
|
class="item"
|
|
102
|
-
href="/
|
|
100
|
+
href="/concepts/management/links"
|
|
103
101
|
name="concepts_links_management"
|
|
104
102
|
role="option"
|
|
105
103
|
>
|
|
@@ -112,7 +110,7 @@ exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes
|
|
|
112
110
|
<a
|
|
113
111
|
aria-checked="false"
|
|
114
112
|
class="item"
|
|
115
|
-
href="/concepts/bulk_upload_event"
|
|
113
|
+
href="/concepts/management/bulk_upload_event"
|
|
116
114
|
name="concepts_upload_events"
|
|
117
115
|
role="option"
|
|
118
116
|
>
|
|
@@ -21,51 +21,100 @@ exports[`<SideMenu /> matches the latest snapshot 1`] = `
|
|
|
21
21
|
Search
|
|
22
22
|
</a>
|
|
23
23
|
</div>
|
|
24
|
-
<div
|
|
25
|
-
class="active item selectable"
|
|
26
|
-
>
|
|
27
|
-
<a
|
|
28
|
-
href="/concepts"
|
|
29
|
-
>
|
|
30
|
-
<i
|
|
31
|
-
aria-hidden="true"
|
|
32
|
-
class="tags large icon"
|
|
33
|
-
/>
|
|
34
|
-
Glossary
|
|
35
|
-
</a>
|
|
24
|
+
<div>
|
|
36
25
|
<div
|
|
37
|
-
|
|
26
|
+
aria-expanded="false"
|
|
27
|
+
class="ui item dropdown"
|
|
28
|
+
role="listbox"
|
|
29
|
+
tabindex="0"
|
|
38
30
|
>
|
|
39
31
|
<a
|
|
40
|
-
class="
|
|
32
|
+
class="ui"
|
|
41
33
|
href="/concepts"
|
|
42
34
|
>
|
|
35
|
+
<i
|
|
36
|
+
aria-hidden="true"
|
|
37
|
+
class="tags large icon"
|
|
38
|
+
/>
|
|
43
39
|
Glossary
|
|
44
40
|
</a>
|
|
45
|
-
<
|
|
46
|
-
class="
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
41
|
+
<div
|
|
42
|
+
class="menu transition"
|
|
43
|
+
>
|
|
44
|
+
<div
|
|
45
|
+
class="header selectable"
|
|
46
|
+
>
|
|
47
|
+
Glossary
|
|
48
|
+
</div>
|
|
49
|
+
<div
|
|
50
|
+
class="divider"
|
|
51
|
+
/>
|
|
52
|
+
<a
|
|
53
|
+
aria-checked="false"
|
|
54
|
+
class="item"
|
|
55
|
+
href="/concepts"
|
|
56
|
+
name="concepts"
|
|
57
|
+
role="option"
|
|
58
|
+
>
|
|
59
|
+
<span
|
|
60
|
+
class="text"
|
|
61
|
+
>
|
|
62
|
+
Glossary
|
|
63
|
+
</span>
|
|
64
|
+
</a>
|
|
65
|
+
<a
|
|
66
|
+
aria-checked="false"
|
|
67
|
+
class="item"
|
|
68
|
+
href="/concepts/pending"
|
|
69
|
+
name="concepts_management"
|
|
70
|
+
role="option"
|
|
71
|
+
>
|
|
72
|
+
<span
|
|
73
|
+
class="text"
|
|
74
|
+
>
|
|
75
|
+
Drafts
|
|
76
|
+
</span>
|
|
77
|
+
</a>
|
|
78
|
+
<a
|
|
79
|
+
aria-checked="false"
|
|
80
|
+
class="item"
|
|
81
|
+
href="/concepts/deprecated"
|
|
82
|
+
name="concepts_deprecated"
|
|
83
|
+
role="option"
|
|
84
|
+
>
|
|
85
|
+
<span
|
|
86
|
+
class="text"
|
|
87
|
+
>
|
|
88
|
+
Deprecated
|
|
89
|
+
</span>
|
|
90
|
+
</a>
|
|
91
|
+
<a
|
|
92
|
+
aria-checked="false"
|
|
93
|
+
class="item"
|
|
94
|
+
href="/concepts/management/links"
|
|
95
|
+
name="concepts_links_management"
|
|
96
|
+
role="option"
|
|
97
|
+
>
|
|
98
|
+
<span
|
|
99
|
+
class="text"
|
|
100
|
+
>
|
|
101
|
+
Links manager
|
|
102
|
+
</span>
|
|
103
|
+
</a>
|
|
104
|
+
<a
|
|
105
|
+
aria-checked="false"
|
|
106
|
+
class="item"
|
|
107
|
+
href="/concepts/management/bulk_upload_event"
|
|
108
|
+
name="concepts_upload_events"
|
|
109
|
+
role="option"
|
|
110
|
+
>
|
|
111
|
+
<span
|
|
112
|
+
class="text"
|
|
113
|
+
>
|
|
114
|
+
My loads
|
|
115
|
+
</span>
|
|
116
|
+
</a>
|
|
117
|
+
</div>
|
|
69
118
|
</div>
|
|
70
119
|
</div>
|
|
71
120
|
<div
|
package/src/routes.js
CHANGED
|
@@ -14,11 +14,21 @@ export const BUCKET_VIEW_CONFIG_EDIT = "/bucketViewConfigs/:id/edit";
|
|
|
14
14
|
export const BUCKET_VIEW_CONFIG_NEW = "/bucketViewConfigs/new";
|
|
15
15
|
export const CONCEPTS = "/concepts";
|
|
16
16
|
export const CONCEPTS_BULK_UPDATE = "/concepts/bulk_update";
|
|
17
|
-
export const CONCEPTS_BULK_UPLOAD_EVENTS =
|
|
17
|
+
export const CONCEPTS_BULK_UPLOAD_EVENTS =
|
|
18
|
+
"/concepts/management/bulk_upload_event";
|
|
18
19
|
export const CONCEPTS_NEW = "/concepts/new";
|
|
19
|
-
export const CONCEPTS_PENDING = "/
|
|
20
|
-
export const CONCEPTS_DEPRECATED = "/
|
|
21
|
-
export const
|
|
20
|
+
export const CONCEPTS_PENDING = "/concepts/pending";
|
|
21
|
+
export const CONCEPTS_DEPRECATED = "/concepts/deprecated";
|
|
22
|
+
export const CONCEPTS_SUBSCOPE = "/concepts/subscope/:subscope";
|
|
23
|
+
export const CONCEPTS_SIDEMENU_SUBSCOPE =
|
|
24
|
+
"/glossarySubscope/:subscope/published";
|
|
25
|
+
export const CONCEPTS_SIDEMENU_SUBSCOPE_DEPRECATED =
|
|
26
|
+
"/glossarySubscope/:subscope/deprecated";
|
|
27
|
+
export const CONCEPTS_SIDEMENU_SUBSCOPE_PENDING =
|
|
28
|
+
"/glossarySubscope/:subscope/pending";
|
|
29
|
+
export const CONCEPTS_SIDEMENU_MANAGEMENT_LINKS = "/glossaryManagement/links";
|
|
30
|
+
export const CONCEPTS_SIDEMENU_MANAGEMENT_UPLOADS =
|
|
31
|
+
"/glossaryManagement/uploads";
|
|
22
32
|
export const CONCEPT_ARCHIVE =
|
|
23
33
|
"/concepts/:business_concept_id/versions/:id/archive";
|
|
24
34
|
export const CONCEPT_EDIT = "/concepts/:business_concept_id/versions/:id/edit";
|
|
@@ -28,7 +38,7 @@ export const CONCEPT_LINKS_CONCEPTS =
|
|
|
28
38
|
"/concepts/:business_concept_id/versions/:id/links/concepts";
|
|
29
39
|
export const CONCEPT_LINKS_CONCEPTS_NEW =
|
|
30
40
|
"/concepts/:business_concept_id/versions/:id/links/concepts/new";
|
|
31
|
-
export const CONCEPT_LINKS_MANAGEMENT = "/
|
|
41
|
+
export const CONCEPT_LINKS_MANAGEMENT = "/concepts/management/links";
|
|
32
42
|
export const CONCEPT_LINKS_IMPLEMENTATIONS =
|
|
33
43
|
"/concepts/:business_concept_id/versions/:id/links/implementations";
|
|
34
44
|
export const CONCEPT_LINKS_STRUCTURES =
|
|
@@ -280,8 +290,11 @@ const routes = {
|
|
|
280
290
|
CONCEPTS_BULK_UPDATE,
|
|
281
291
|
CONCEPTS_NEW,
|
|
282
292
|
CONCEPTS_PENDING,
|
|
283
|
-
|
|
293
|
+
CONCEPTS_SUBSCOPE,
|
|
284
294
|
CONCEPTS_DEPRECATED,
|
|
295
|
+
CONCEPTS_SIDEMENU_SUBSCOPE,
|
|
296
|
+
CONCEPTS_SIDEMENU_SUBSCOPE_DEPRECATED,
|
|
297
|
+
CONCEPTS_SIDEMENU_SUBSCOPE_PENDING,
|
|
285
298
|
CONCEPT_ARCHIVE,
|
|
286
299
|
CONCEPT_EDIT,
|
|
287
300
|
CONCEPT_EVENTS,
|
|
@@ -448,7 +461,6 @@ const routes = {
|
|
|
448
461
|
STRUCTURE_IMPACT,
|
|
449
462
|
STRUCTURE_LINEAGE,
|
|
450
463
|
STRUCTURE_STRUCTURE_LINKS,
|
|
451
|
-
STRUCTURE_STRUCTURE_LINKS,
|
|
452
464
|
STRUCTURE_STRUCTURE_LINKS_NEW,
|
|
453
465
|
STRUCTURE_LINKS,
|
|
454
466
|
STRUCTURE_LINKS_NEW,
|