@truedat/core 7.5.9 → 7.5.10
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 +34 -68
- package/src/__tests__/routesTree.spec.js +108 -0
- package/src/api/queries.js +10 -0
- package/src/api.js +3 -0
- package/src/components/AddMemberForm.js +10 -10
- package/src/components/AddResourceMember.js +0 -2
- package/src/components/AdminMenu.js +0 -1
- package/src/components/AiMenu.js +0 -1
- package/src/components/Alert.js +1 -1
- package/src/components/AlertExporter.js +0 -1
- package/src/components/ArrayDecorator.js +0 -1
- package/src/components/Authorized.js +2 -2
- package/src/components/AvailableFilters.js +1 -2
- package/src/components/CSVFileModal.js +1 -1
- package/src/components/CardGroupsAccordion.js +1 -1
- package/src/components/CatalogMenu.js +1 -2
- package/src/components/CommentRow.js +7 -8
- package/src/components/Comments.js +3 -4
- package/src/components/CommentsForm.js +2 -2
- package/src/components/ConfirmModal.js +0 -1
- package/src/components/CursorPagination.js +1 -2
- package/src/components/DashboardMenu.js +0 -1
- package/src/components/Date.js +0 -1
- package/src/components/DateFilter.js +1 -1
- package/src/components/DateRangeFilter.js +1 -1
- package/src/components/DateTime.js +0 -1
- package/src/components/DescriptionInput.js +1 -1
- package/src/components/DomainSelector.js +2 -3
- package/src/components/DropdownMenuItem.js +0 -1
- package/src/components/ErrorBoundary.js +8 -7
- package/src/components/FieldLabel.js +0 -1
- package/src/components/FilterDropdown.js +3 -3
- package/src/components/FilterItem.js +0 -1
- package/src/components/FilterMultilevelDropdown.js +1 -1
- package/src/components/GenericCrumbs.js +3 -4
- package/src/components/GlossaryMenu.js +24 -31
- package/src/components/GrantMenu.js +0 -1
- package/src/components/GroupActions.js +15 -15
- package/src/components/Hierarchy.js +7 -10
- package/src/components/HierarchyFilterDropdown.js +1 -2
- package/src/components/HierarchyNodeFinder.js +4 -4
- package/src/components/HierarchySelector.js +1 -2
- package/src/components/HistoryBackButton.js +6 -6
- package/src/components/IngestMenu.js +0 -1
- package/src/components/LanguagesTabs.js +4 -4
- package/src/components/LineageMenu.js +0 -1
- package/src/components/Loading.js +1 -2
- package/src/components/MembersMenu.js +0 -1
- package/src/components/ModalSaveFilter.js +1 -1
- package/src/components/NodeOpenActions.js +0 -1
- package/src/components/OptionGroup.js +1 -2
- package/src/components/OptionModal.js +0 -1
- package/src/components/Pagination.js +0 -1
- package/src/components/QualityMenu.js +0 -1
- package/src/components/QxMenu.js +0 -1
- package/src/components/Redirector.js +3 -3
- package/src/components/ResourceMember.js +1 -2
- package/src/components/ResourceMembers.js +3 -3
- package/src/components/ResourceMembersActions.js +1 -2
- package/src/components/RichTextEditor.js +7 -8
- package/src/components/RouteListener.js +11 -32
- package/src/components/SafeLink.js +0 -1
- package/src/components/ScrollToTop.js +13 -16
- package/src/components/SearchFilterDropdown.js +1 -1
- package/src/components/SearchInput.js +3 -3
- package/src/components/SearchMenu.js +0 -1
- package/src/components/SelectedFilters.js +1 -2
- package/src/components/SideMenu.js +0 -1
- package/src/components/SidebarToggle.js +2 -2
- package/src/components/StructureFilterItem.js +0 -1
- package/src/components/Submenu.js +8 -7
- package/src/components/SystemsLoader.js +27 -0
- package/src/components/TaxonomyMenu.js +0 -1
- package/src/components/TemplateSelector.js +1 -1
- package/src/components/TemplatesLoader.js +24 -0
- package/src/components/TreeSelector.js +4 -4
- package/src/components/Unauthorized.js +0 -1
- package/src/components/UploadModal.js +152 -176
- package/src/components/UserFilter.js +0 -2
- package/src/components/UserFilters.js +0 -2
- package/src/components/__tests__/AddMemberForm.spec.js +26 -38
- package/src/components/__tests__/AddResourceMember.spec.js +0 -1
- package/src/components/__tests__/AdminMenu.spec.js +0 -1
- package/src/components/__tests__/Alert.spec.js +17 -21
- package/src/components/__tests__/AvailableFilters.spec.js +19 -14
- package/src/components/__tests__/CardGroupsAccordion.spec.js +24 -15
- package/src/components/__tests__/CatalogMenu.spec.js +27 -45
- package/src/components/__tests__/CommentsLoader.spec.js +17 -14
- package/src/components/__tests__/CursorPagination.spec.js +0 -1
- package/src/components/__tests__/DashboardMenu.spec.js +0 -1
- package/src/components/__tests__/DateFilter.spec.js +6 -28
- package/src/components/__tests__/DateTime.spec.js +0 -1
- package/src/components/__tests__/DomainSelector.spec.js +4 -4
- package/src/components/__tests__/DropdownMenuItem.spec.js +0 -1
- package/src/components/__tests__/FilterDropdown.spec.js +28 -27
- package/src/components/__tests__/FilterItem.spec.js +19 -20
- package/src/components/__tests__/FilterMultilevelDropdown.spec.js +16 -16
- package/src/components/__tests__/FiltersLoader.spec.js +25 -20
- package/src/components/__tests__/GenericCrumbs.spec.js +0 -1
- package/src/components/__tests__/GlossaryMenu.spec.js +0 -1
- package/src/components/__tests__/GrantMenu.spec.js +0 -1
- package/src/components/__tests__/GroupActions.spec.js +0 -1
- package/src/components/__tests__/Hierarchy.spec.js +0 -1
- package/src/components/__tests__/HierarchyFilterDropdown.spec.js +16 -14
- package/src/components/__tests__/HierarchyNodeFinder.spec.js +0 -1
- package/src/components/__tests__/HierarchySelector.spec.js +28 -35
- package/src/components/__tests__/HistoryBackButton.spec.js +23 -23
- package/src/components/__tests__/IngestMenu.spec.js +0 -1
- package/src/components/__tests__/LineageMenu.spec.js +0 -1
- package/src/components/__tests__/Loading.spec.js +4 -5
- package/src/components/__tests__/MembersMenu.spec.js +0 -1
- package/src/components/__tests__/ModalSaveFilter.spec.js +0 -1
- package/src/components/__tests__/OptionGroup.spec.js +5 -7
- package/src/components/__tests__/Pagination.spec.js +22 -16
- package/src/components/__tests__/QualityMenu.spec.js +0 -1
- package/src/components/__tests__/Redirector.spec.js +5 -10
- package/src/components/__tests__/ResourceMembers.spec.js +36 -27
- package/src/components/__tests__/ResourceMembersAction.spec.js +1 -2
- package/src/components/__tests__/RouteListener.spec.js +25 -26
- package/src/components/__tests__/SafeLink.spec.js +0 -1
- package/src/components/__tests__/SearchDateFilter.spec.js +0 -1
- package/src/components/__tests__/SearchFilterDropdown.spec.js +32 -24
- package/src/components/__tests__/SearchInput.spec.js +5 -5
- package/src/components/__tests__/SearchMenu.spec.js +0 -1
- package/src/components/__tests__/SelectedFilters.spec.js +50 -47
- package/src/components/__tests__/SideMenu.spec.js +5 -8
- package/src/components/__tests__/StructureFilterItem.spec.js +13 -11
- package/src/components/__tests__/Submenu.spec.js +0 -1
- package/src/components/__tests__/SystemsLoader.spec.js +40 -0
- package/src/components/__tests__/TaxonomyMenu.spec.js +0 -1
- package/src/components/__tests__/TemplateSelector.spec.js +27 -29
- package/src/components/__tests__/TemplatesLoader.spec.js +30 -0
- package/src/components/__tests__/TreeSelector.spec.js +110 -83
- package/src/components/__tests__/UploadModal.spec.js +171 -0
- package/src/components/__tests__/UserFilters.spec.js +44 -37
- package/src/components/__tests__/__snapshots__/AddMemberForm.spec.js.snap +1 -0
- package/src/components/__tests__/__snapshots__/AddResourceMember.spec.js.snap +10 -9
- package/src/components/__tests__/__snapshots__/AdminMenu.spec.js.snap +22 -11
- package/src/components/__tests__/__snapshots__/Alert.spec.js.snap +29 -17
- package/src/components/__tests__/__snapshots__/AvailableFilters.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/CatalogMenu.spec.js.snap +18 -8
- package/src/components/__tests__/__snapshots__/CursorPagination.spec.js.snap +3 -0
- package/src/components/__tests__/__snapshots__/DateFilter.spec.js.snap +165 -107
- package/src/components/__tests__/__snapshots__/DomainSelector.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/FilterItem.spec.js.snap +13 -20
- package/src/components/__tests__/__snapshots__/GlossaryMenu.spec.js.snap +8 -0
- package/src/components/__tests__/__snapshots__/GrantMenu.spec.js.snap +14 -7
- package/src/components/__tests__/__snapshots__/GroupActions.spec.js.snap +0 -1
- package/src/components/__tests__/__snapshots__/Hierarchy.spec.js.snap +0 -1
- package/src/components/__tests__/__snapshots__/HierarchySelector.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/HistoryBackButton.spec.js.snap +10 -20
- package/src/components/__tests__/__snapshots__/IngestMenu.spec.js.snap +3 -1
- package/src/components/__tests__/__snapshots__/LineageMenu.spec.js.snap +6 -3
- package/src/components/__tests__/__snapshots__/Loading.spec.js.snap +5 -4
- package/src/components/__tests__/__snapshots__/MembersMenu.spec.js.snap +6 -3
- package/src/components/__tests__/__snapshots__/OptionGroup.spec.js.snap +38 -28
- package/src/components/__tests__/__snapshots__/Pagination.spec.js.snap +213 -64
- package/src/components/__tests__/__snapshots__/QualityMenu.spec.js.snap +14 -8
- package/src/components/__tests__/__snapshots__/ResourceMembers.spec.js.snap +1 -0
- package/src/components/__tests__/__snapshots__/ResourceMembersAction.spec.js.snap +2 -1
- package/src/components/__tests__/__snapshots__/RouteListener.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/SearchInput.spec.js.snap +10 -12
- package/src/components/__tests__/__snapshots__/SearchMenu.spec.js.snap +3 -1
- package/src/components/__tests__/__snapshots__/SelectedFilters.spec.js.snap +8 -8
- package/src/components/__tests__/__snapshots__/SideMenu.spec.js.snap +112 -50
- package/src/components/__tests__/__snapshots__/Submenu.spec.js.snap +3 -0
- package/src/components/__tests__/__snapshots__/SystemsLoader.spec.js.snap +3 -0
- package/src/components/__tests__/__snapshots__/TaxonomyMenu.spec.js.snap +3 -1
- package/src/components/__tests__/__snapshots__/TemplateSelector.spec.js.snap +7 -7
- package/src/components/common/SearchContextWrapper.js +1 -4
- package/src/hooks/__mocks__/useAuthorized.js +2 -0
- package/src/hooks/__mocks__/useUserFilters.js +17 -0
- package/src/hooks/__tests__/{useAclEntries.spec.js → useAclEntries.spec.js.disabled} +1 -1
- package/src/hooks/__tests__/useAuthorized.spec.js +1 -1
- package/src/hooks/useAclEntries.js +6 -3
- package/src/hooks/useActiveRoute.js +3 -3
- package/src/hooks/useActiveRoutes.js +4 -4
- package/src/hooks/useHierarchies.js +112 -0
- package/src/hooks/useLocales.js +1 -1
- package/src/hooks/useMessages.js +1 -1
- package/src/hooks/usePath.js +4 -4
- package/src/hooks/useUserFilters.js +1 -1
- package/src/i18n/components/EditableCell.js +1 -1
- package/src/i18n/components/I18nRoutes.js +11 -16
- package/src/i18n/components/LangProvider.js +56 -101
- package/src/i18n/components/LangProviderWrapper.js +26 -33
- package/src/i18n/components/Languages.js +8 -7
- package/src/i18n/components/MessageForm.js +9 -23
- package/src/i18n/components/Messages.js +5 -4
- package/src/i18n/components/MessagesTable.js +0 -1
- package/src/i18n/components/NewMessage.js +5 -4
- package/src/i18n/components/__tests__/EditableCell.spec.js +18 -20
- package/src/i18n/components/__tests__/I18nRoutes.spec.js +39 -5
- package/src/i18n/components/__tests__/MessageForm.spec.js +0 -1
- package/src/i18n/components/__tests__/Messages.spec.js +9 -21
- package/src/i18n/components/__tests__/NewMessage.spec.js +0 -1
- package/src/i18n/components/__tests__/__snapshots__/I18nRoutes.spec.js.snap +25 -1
- package/src/i18n/components/__tests__/__snapshots__/MessageForm.spec.js.snap +1 -0
- package/src/i18n/components/__tests__/__snapshots__/Messages.spec.js.snap +5 -13
- package/src/i18n/components/__tests__/__snapshots__/NewMessage.spec.js.snap +2 -0
- package/src/reducers/__tests__/comments.spec.js +9 -6
- package/src/reducers/__tests__/commentsResource.spec.js +5 -2
- package/src/reducers/__tests__/coreMessage.spec.js +1 -1
- package/src/reducers/__tests__/dashboardDomains.spec.js +5 -5
- package/src/reducers/__tests__/systems.spec.js +42 -0
- package/src/reducers/__tests__/systemsLoading.spec.js +22 -0
- package/src/reducers/index.js +5 -1
- package/src/reducers/systems.js +19 -0
- package/src/reducers/systemsLoading.js +14 -0
- package/src/router/Loader.js +10 -0
- package/src/router/ProtectedRoute.js +11 -0
- package/src/router/Unauthorized.js +16 -0
- package/src/router/__tests__/ProtectedRoute.spec.js +49 -0
- package/src/router/__tests__/Unauthorized.spec.js +15 -0
- package/src/router/__tests__/__snapshots__/ProtectedRoute.spec.js.snap +44 -0
- package/src/router/__tests__/__snapshots__/Unauthorized.spec.js.snap +26 -0
- package/src/router/index.js +5 -0
- package/src/routes.js +7 -7
- package/src/routesTree.js +93 -0
- package/src/routines.js +8 -0
- package/src/sagas/__tests__/addComment.spec.js +3 -5
- package/src/sagas/__tests__/fetchComments.spec.js +1 -1
- package/src/sagas/__tests__/fetchSystems.spec.js +69 -0
- package/src/sagas/fetchSystems.js +25 -0
- package/src/sagas/index.js +3 -0
- package/src/search/FilterDropdown.js +0 -1
- package/src/search/FilterItem.js +0 -1
- package/src/search/FilterMultilevelDropdown.js +1 -1
- package/src/search/FilterQueryDropdown.js +38 -42
- package/src/search/HierarchyFilterDropdown.js +3 -4
- package/src/search/ModalSaveFilter.js +1 -1
- package/src/search/Pagination.js +0 -1
- package/src/search/SearchContext.js +9 -11
- package/src/search/SearchDateFilter.js +0 -1
- package/src/search/SearchFilters.js +1 -2
- package/src/search/SearchSelectedFilters.js +4 -4
- package/src/search/SearchWidget.js +0 -4
- package/src/search/UserFilter.js +0 -2
- package/src/search/UserFilters.js +4 -3
- package/src/search/__tests__/FilterDropdown.spec.js +54 -51
- package/src/search/__tests__/FilterItem.spec.js +20 -15
- package/src/search/__tests__/FilterQueryDropdown.spec.js +106 -84
- package/src/search/__tests__/ModalSaveFilter.spec.js +4 -5
- package/src/search/__tests__/SearchContext.spec.js +3 -4
- package/src/search/__tests__/SearchWidget.spec.js +0 -1
- package/src/selectors/__tests__/getConceptSubscope.spec.js +37 -0
- package/src/selectors/__tests__/getDashboardConfig.spec.js +9 -9
- package/src/selectors/__tests__/getMessage.spec.js +1 -1
- package/src/selectors/__tests__/getSidemenuGlossarySubscopes.spec.js +17 -0
- package/src/selectors/__tests__/makeActiveFiltersSelector.spec.js +2 -2
- package/src/selectors/__tests__/makeSearchQuerySelector.spec.js +1 -1
- package/src/selectors/__tests__/makeTagOptionsSelector.spec.js +6 -6
- package/src/selectors/getConceptSubscope.js +19 -0
- package/src/selectors/getMessage.js +2 -2
- package/src/selectors/getRecipients.js +34 -0
- package/src/selectors/getSidemenuGlossarySubscopes.js +8 -0
- package/src/selectors/index.js +5 -0
- package/src/selectors/makeActiveFiltersSelector.js +2 -6
- package/src/selectors/makeSearchQuerySelector.js +4 -11
- package/src/selectors/makeTagOptionsSelector.js +4 -8
- package/src/selectors/subscopedTemplates.js +16 -0
- package/src/selectors/taxonomy.js +170 -0
- package/src/services/__tests__/columnDecorator.spec.js +1 -1
- package/src/services/__tests__/dateFilterFormatter.spec.js +2 -2
- package/src/services/__tests__/fieldType.spec.js +2 -2
- package/src/services/__tests__/filters.spec.js +1 -1
- package/src/services/__tests__/message.spec.js +2 -2
- package/src/services/__tests__/operators.spec.js +5 -5
- package/src/services/__tests__/sort.spec.js +8 -8
- package/src/services/__tests__/storage.spec.js +17 -0
- package/src/services/arrays.js +16 -14
- package/src/services/columnDecoratorComponent.js +2 -2
- package/src/services/columnDecorators.js +0 -1
- package/src/services/fieldType.js +8 -8
- package/src/services/filters.js +5 -5
- package/src/services/message.js +1 -4
- package/src/services/operators.js +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { Message } from "semantic-ui-react";
|
|
5
5
|
import { usePath } from "../hooks";
|
|
6
6
|
|
|
7
|
-
const Error = () => {
|
|
7
|
+
export const Error = () => {
|
|
8
8
|
const { formatMessage } = useIntl();
|
|
9
9
|
const path = usePath();
|
|
10
10
|
return (
|
|
@@ -13,23 +13,23 @@ const Error = () => {
|
|
|
13
13
|
icon="warning sign"
|
|
14
14
|
header={formatMessage({
|
|
15
15
|
id: "error.header",
|
|
16
|
-
defaultMessage: "Eek! Something went wrong..."
|
|
16
|
+
defaultMessage: "Eek! Something went wrong...",
|
|
17
17
|
})}
|
|
18
18
|
list={[
|
|
19
19
|
formatMessage({
|
|
20
20
|
id: "error.content",
|
|
21
|
-
defaultMessage: "Please report this error to the Truedat team."
|
|
21
|
+
defaultMessage: "Please report this error to the Truedat team.",
|
|
22
22
|
}),
|
|
23
|
-
path
|
|
23
|
+
path,
|
|
24
24
|
]}
|
|
25
25
|
/>
|
|
26
26
|
);
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export class ErrorBoundary extends
|
|
29
|
+
export class ErrorBoundary extends Component {
|
|
30
30
|
static propTypes = {
|
|
31
31
|
children: PropTypes.node,
|
|
32
|
-
logError: PropTypes.func
|
|
32
|
+
logError: PropTypes.func,
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
constructor(props) {
|
|
@@ -42,6 +42,7 @@ export class ErrorBoundary extends React.Component {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
componentDidCatch(error, errorInfo) {
|
|
45
|
+
console.error({ error, errorInfo });
|
|
45
46
|
this.props.logError && this.props.logError({ error, errorInfo });
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import {
|
|
@@ -137,11 +137,11 @@ export const FilterDropdown = ({
|
|
|
137
137
|
))
|
|
138
138
|
)(filteredOptions)}
|
|
139
139
|
</>
|
|
140
|
-
{loading
|
|
140
|
+
{loading ? (
|
|
141
141
|
<Dimmer active inverted>
|
|
142
142
|
<Loader size="tiny" />
|
|
143
143
|
</Dimmer>
|
|
144
|
-
)}
|
|
144
|
+
) : null}
|
|
145
145
|
</Dimmer.Dimmable>
|
|
146
146
|
</Dropdown>
|
|
147
147
|
);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from "prop-types";
|
|
3
2
|
import { Breadcrumb } from "semantic-ui-react";
|
|
4
|
-
import {
|
|
3
|
+
import { useNavigate } from "react-router";
|
|
5
4
|
import { FormattedMessage } from "react-intl";
|
|
6
5
|
|
|
7
6
|
export const GenericCrumbs = ({ header, title }) => {
|
|
8
|
-
const
|
|
9
|
-
const goBack = () =>
|
|
7
|
+
const navigate = useNavigate();
|
|
8
|
+
const goBack = () => navigate(-1);
|
|
10
9
|
|
|
11
10
|
return (
|
|
12
11
|
<Breadcrumb>
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import TemplatesLoader from "@truedat/df/templates/components/TemplatesLoader";
|
|
4
|
-
import { connect } from "react-redux";
|
|
5
2
|
import PropTypes from "prop-types";
|
|
6
|
-
import { makeGetSubscopes } from "@truedat/df/selectors/subscopedTemplates";
|
|
7
|
-
import { matchPath } from "react-router-dom";
|
|
8
|
-
import { linkTo } from "@truedat/core/routes";
|
|
9
3
|
import { useIntl } from "react-intl";
|
|
10
|
-
import {
|
|
11
|
-
import { getConceptSubscope } from "@truedat/bg/concepts/selectors/getConceptSubscope";
|
|
12
|
-
import { getConceptStatus } from "@truedat/bg/concepts/selectors/getConceptStatus";
|
|
4
|
+
import { connect } from "react-redux";
|
|
13
5
|
import { useSelector } from "react-redux";
|
|
14
|
-
import { useLocation } from "react-router
|
|
6
|
+
import { useLocation, matchPath } from "react-router";
|
|
7
|
+
import { linkTo } from "@truedat/core/routes";
|
|
8
|
+
import { makeGetSubscopes } from "@truedat/core/selectors/subscopedTemplates";
|
|
9
|
+
import { getConceptSubscope } from "@truedat/core/selectors/getConceptSubscope";
|
|
10
|
+
import { getSidemenuGlossarySubscopes } from "@truedat/core/selectors/getSidemenuGlossarySubscopes";
|
|
11
|
+
import TemplatesLoader from "@truedat/core/components/TemplatesLoader";
|
|
15
12
|
import { useAuthorized } from "../hooks";
|
|
16
13
|
import {
|
|
17
14
|
CONCEPTS,
|
|
@@ -30,17 +27,20 @@ import {
|
|
|
30
27
|
import Submenu from "./Submenu";
|
|
31
28
|
|
|
32
29
|
function isMenuSubscope(pathname, subscope) {
|
|
33
|
-
const match = matchPath(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
// const match = matchPath(
|
|
31
|
+
// {
|
|
32
|
+
// path: [
|
|
33
|
+
// CONCEPTS_SUBSCOPE,
|
|
34
|
+
// CONCEPTS_SIDEMENU_SUBSCOPE,
|
|
35
|
+
// CONCEPTS_SIDEMENU_SUBSCOPE_DEPRECATED,
|
|
36
|
+
// CONCEPTS_SIDEMENU_SUBSCOPE_PENDING,
|
|
37
|
+
// ],
|
|
38
|
+
// },
|
|
39
|
+
// pathname
|
|
40
|
+
// );
|
|
41
|
+
|
|
42
|
+
// return !!match?.params?.subscope && subscope === match.params.subscope;
|
|
43
|
+
return false;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
function mainMenuSubscopes(allSubscopes, rootSubscopes) {
|
|
@@ -167,15 +167,8 @@ function buildManagementSubmenuItems() {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
function isMainConcepts(location, conceptSubscope, mainSubscopes) {
|
|
170
|
-
const isConceptsMatch = matchPath(location.pathname
|
|
171
|
-
|
|
172
|
-
exact: false,
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
const isConceptsVersionMatch = matchPath(location.pathname, {
|
|
176
|
-
path: [CONCEPT_VERSION],
|
|
177
|
-
exact: false,
|
|
178
|
-
});
|
|
170
|
+
const isConceptsMatch = matchPath(CONCEPTS, location.pathname);
|
|
171
|
+
const isConceptsVersionMatch = matchPath(CONCEPT_VERSION, location.pathname);
|
|
179
172
|
|
|
180
173
|
if (isConceptsVersionMatch) {
|
|
181
174
|
return conceptSubscope === null || mainSubscopes.includes(conceptSubscope);
|
|
@@ -190,7 +183,7 @@ export const GlossaryMenu = ({ bgSubscopes, rootSubscopes }) => {
|
|
|
190
183
|
const { formatMessage } = useIntl();
|
|
191
184
|
|
|
192
185
|
const conceptSubscope = useSelector(getConceptSubscope);
|
|
193
|
-
const conceptStatus = useSelector(
|
|
186
|
+
const conceptStatus = useSelector((state) => state.concept?.status ?? null);
|
|
194
187
|
|
|
195
188
|
const authorized = useAuthorized([
|
|
196
189
|
"business_glossary_view",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from "prop-types";
|
|
3
2
|
import { Dropdown } from "semantic-ui-react";
|
|
4
3
|
|
|
5
|
-
export const GroupActions = ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
export const GroupActions = ({
|
|
5
|
+
availableActions,
|
|
6
|
+
direction = "left",
|
|
7
|
+
disabled,
|
|
8
|
+
}) => {
|
|
9
|
+
return (
|
|
10
|
+
<Dropdown
|
|
11
|
+
icon="ellipsis vertical"
|
|
12
|
+
className="button icon group-actions"
|
|
13
|
+
floating
|
|
14
|
+
disabled={disabled}
|
|
15
|
+
options={availableActions}
|
|
16
|
+
direction={direction}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
GroupActions.propTypes = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { Icon, Grid, Label, Input, Form } from "semantic-ui-react";
|
|
@@ -37,7 +37,6 @@ const ListHierarchyItem = ({
|
|
|
37
37
|
}}
|
|
38
38
|
onClick={() => removeNode(id)}
|
|
39
39
|
/>
|
|
40
|
-
|
|
41
40
|
<div
|
|
42
41
|
style={{
|
|
43
42
|
display: "flex",
|
|
@@ -80,8 +79,8 @@ const ListHierarchyItem = ({
|
|
|
80
79
|
editionStatus == "dirty"
|
|
81
80
|
? "orange"
|
|
82
81
|
: editionStatus == "added"
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
? "green"
|
|
83
|
+
: null
|
|
85
84
|
}
|
|
86
85
|
/>
|
|
87
86
|
</Label>
|
|
@@ -94,8 +93,8 @@ const ListHierarchyItem = ({
|
|
|
94
93
|
editionStatus == "dirty"
|
|
95
94
|
? "orange"
|
|
96
95
|
: editionStatus == "added"
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
? "green"
|
|
97
|
+
: null
|
|
99
98
|
}
|
|
100
99
|
/>
|
|
101
100
|
</Label>
|
|
@@ -117,8 +116,8 @@ const ListHierarchyItem = ({
|
|
|
117
116
|
editionStatus == "dirty"
|
|
118
117
|
? "orange"
|
|
119
118
|
: editionStatus == "added"
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
? "green"
|
|
120
|
+
: null
|
|
122
121
|
}
|
|
123
122
|
name={expanded ? "dot circle outline" : "circle"}
|
|
124
123
|
/>
|
|
@@ -127,7 +126,6 @@ const ListHierarchyItem = ({
|
|
|
127
126
|
<input />
|
|
128
127
|
</Input>
|
|
129
128
|
</div>
|
|
130
|
-
|
|
131
129
|
<div className="description_wrapper">
|
|
132
130
|
<DescriptionInput
|
|
133
131
|
disabled={!isEditionMode}
|
|
@@ -188,7 +186,6 @@ const ListHierarchy = ({
|
|
|
188
186
|
value={newNodeName}
|
|
189
187
|
>
|
|
190
188
|
<input />
|
|
191
|
-
|
|
192
189
|
{!newNodeName || newNodeName == "" ? null : (
|
|
193
190
|
<Label
|
|
194
191
|
style={{ cursor: "pointer" }}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import PropTypes from "prop-types";
|
|
4
|
-
import { useHierarchy } from "@truedat/
|
|
3
|
+
import { useHierarchy } from "@truedat/core/hooks/useHierarchies";
|
|
5
4
|
import {
|
|
6
5
|
getHierarchyOptions,
|
|
7
6
|
getKeyAndParents,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import {
|
|
4
|
+
import { useNavigate } from "react-router";
|
|
5
5
|
import { linkTo } from "@truedat/core/routes";
|
|
6
6
|
import { Grid, Header, Icon, Segment } from "semantic-ui-react";
|
|
7
7
|
import { FormattedMessage } from "react-intl";
|
|
@@ -10,7 +10,7 @@ import DomainSelector from "./DomainSelector";
|
|
|
10
10
|
import NodeOpenActions from "./NodeOpenActions";
|
|
11
11
|
|
|
12
12
|
const HierarchyNodeFinder = ({ nodes = [], idSelectedNode }) => {
|
|
13
|
-
const
|
|
13
|
+
const navigate = useNavigate();
|
|
14
14
|
const [allOpen, setAllOpen] = useState(false);
|
|
15
15
|
|
|
16
16
|
const handleToggleAllNodes = () => {
|
|
@@ -18,7 +18,7 @@ const HierarchyNodeFinder = ({ nodes = [], idSelectedNode }) => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const handleNodeClick = (e, { value }) => {
|
|
21
|
-
if (value)
|
|
21
|
+
if (value) navigate(linkTo.DOMAIN({ id: value }));
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
return (
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import PropTypes from "prop-types";
|
|
4
3
|
import { useIntl } from "react-intl";
|
|
5
|
-
import { useHierarchy } from "@truedat/
|
|
4
|
+
import { useHierarchy } from "@truedat/core/hooks/useHierarchies";
|
|
6
5
|
import { accentInsensitivePathOrder } from "../services/sort";
|
|
7
6
|
import { stratify, flatten } from "../services/tree";
|
|
8
7
|
import TreeSelector from "./TreeSelector";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from "prop-types";
|
|
3
|
-
import {
|
|
2
|
+
import { Link } from "react-router";
|
|
3
|
+
import { useNavigate } from "react-router";
|
|
4
4
|
import { Button } from "semantic-ui-react";
|
|
5
5
|
|
|
6
6
|
export const HistoryBackButton = ({ content, disabled, secondary = true }) => {
|
|
7
|
-
const
|
|
7
|
+
const navigate = useNavigate();
|
|
8
8
|
return (
|
|
9
9
|
<Button
|
|
10
10
|
as={Link}
|
|
@@ -12,9 +12,9 @@ export const HistoryBackButton = ({ content, disabled, secondary = true }) => {
|
|
|
12
12
|
content={content}
|
|
13
13
|
disabled={disabled}
|
|
14
14
|
secondary={secondary}
|
|
15
|
-
onClick={e => {
|
|
15
|
+
onClick={(e) => {
|
|
16
16
|
e.preventDefault();
|
|
17
|
-
|
|
17
|
+
navigate(-1);
|
|
18
18
|
}}
|
|
19
19
|
/>
|
|
20
20
|
);
|
|
@@ -23,7 +23,7 @@ export const HistoryBackButton = ({ content, disabled, secondary = true }) => {
|
|
|
23
23
|
HistoryBackButton.propTypes = {
|
|
24
24
|
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
25
25
|
disabled: PropTypes.bool,
|
|
26
|
-
secondary: PropTypes.bool
|
|
26
|
+
secondary: PropTypes.bool,
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export default HistoryBackButton;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Tab } from "semantic-ui-react";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
@@ -13,9 +13,9 @@ const LanguagesTabs = ({
|
|
|
13
13
|
const [translationTabs, setTranslationTabs] = useState([]);
|
|
14
14
|
const [initLang, setInitLang] = useState(selectedLang);
|
|
15
15
|
const { formatMessage } = useIntl();
|
|
16
|
-
|
|
17
16
|
// Create the translation tabs
|
|
18
|
-
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
19
|
const updatedTranslationTabs = [
|
|
20
20
|
// First add required languages
|
|
21
21
|
...requiredLangs
|
|
@@ -44,7 +44,7 @@ const LanguagesTabs = ({
|
|
|
44
44
|
setTranslationTabs(updatedTranslationTabs);
|
|
45
45
|
initSelectedLang?.lang !== initLang && setInitLang(initSelectedLang?.lang);
|
|
46
46
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
-
}, [requiredLangs, altLangs
|
|
47
|
+
}, [requiredLangs, altLangs]);
|
|
48
48
|
|
|
49
49
|
useEffect(() => {
|
|
50
50
|
initLang !== selectedLang && onLangChange(initLang);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from "prop-types";
|
|
3
2
|
import { Loader, Message } from "semantic-ui-react";
|
|
4
3
|
|
|
@@ -11,7 +10,7 @@ export const Loading = ({ inline, error }) =>
|
|
|
11
10
|
|
|
12
11
|
Loading.propTypes = {
|
|
13
12
|
inline: PropTypes.string,
|
|
14
|
-
error: PropTypes.object
|
|
13
|
+
error: PropTypes.object,
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
export default Loading;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Dropdown } from "semantic-ui-react";
|
|
5
5
|
import { lowerDeburr } from "../services/sort";
|
|
@@ -121,7 +121,6 @@ export const OptionGroup = ({
|
|
|
121
121
|
return (
|
|
122
122
|
<>
|
|
123
123
|
{label && <label>{label}</label>}
|
|
124
|
-
|
|
125
124
|
<Dropdown
|
|
126
125
|
multiple={multiple}
|
|
127
126
|
options={flattenedOptions}
|
package/src/components/QxMenu.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
|
-
import {
|
|
4
|
+
import { Navigate } from "react-router";
|
|
5
5
|
import { clearRedirect } from "../routines";
|
|
6
6
|
|
|
7
7
|
export const Redirector = ({ redirect, clearRedirect }) => {
|
|
8
8
|
useEffect(() => {
|
|
9
9
|
clearRedirect();
|
|
10
10
|
}, [clearRedirect]);
|
|
11
|
-
return <
|
|
11
|
+
return <Navigate to={{ pathname: redirect }} />;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
Redirector.propTypes = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { Card, Form, Icon, Button, Popup } from "semantic-ui-react";
|
|
5
5
|
import PropTypes from "prop-types";
|
|
@@ -164,7 +164,6 @@ export const ResourceMember = ({
|
|
|
164
164
|
}}
|
|
165
165
|
/>
|
|
166
166
|
</Card.Description>
|
|
167
|
-
|
|
168
167
|
<ConfirmModal
|
|
169
168
|
header={formatMessage({ id: "domain.members.delete" })}
|
|
170
169
|
content={formatMessage({ id: "domain.members.delete.question" })}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { Fragment, useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Card, Header, Input, Message, Grid } from "semantic-ui-react";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
@@ -73,7 +73,7 @@ export const ResourceMembers = ({ type, id }) => {
|
|
|
73
73
|
)}
|
|
74
74
|
{groupedResourceMembers.map(([groupName, members], groupIndex) => {
|
|
75
75
|
return (
|
|
76
|
-
<
|
|
76
|
+
<Fragment key={`fragment_${groupIndex}`}>
|
|
77
77
|
<Header as="h3" key={`group_${groupIndex}`} dividing>
|
|
78
78
|
{groupName}
|
|
79
79
|
</Header>
|
|
@@ -89,7 +89,7 @@ export const ResourceMembers = ({ type, id }) => {
|
|
|
89
89
|
)
|
|
90
90
|
)}
|
|
91
91
|
</Card.Group>
|
|
92
|
-
</
|
|
92
|
+
</Fragment>
|
|
93
93
|
);
|
|
94
94
|
})}
|
|
95
95
|
</>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import PropTypes from "prop-types";
|
|
3
|
-
import { Link } from "react-router
|
|
2
|
+
import { Link } from "react-router";
|
|
4
3
|
import { Button } from "semantic-ui-react";
|
|
5
4
|
import { FormattedMessage } from "react-intl";
|
|
6
5
|
import { linkTo } from "../routes";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { isKeyHotkey } from "is-hotkey";
|
|
5
5
|
import isUrl from "is-url";
|
|
6
|
-
import { injectIntl } from "react-intl";
|
|
7
6
|
import { Editor, getEventTransfer } from "slate-react";
|
|
8
7
|
import { Value } from "slate";
|
|
9
8
|
import { Menu, Icon } from "semantic-ui-react";
|
|
@@ -51,7 +50,7 @@ function renderBlock(props, _editor, next) {
|
|
|
51
50
|
case "list-item":
|
|
52
51
|
return <li {...attributes}>{children}</li>;
|
|
53
52
|
case "numbered-list":
|
|
54
|
-
return <ol {...attributes}>
|
|
53
|
+
return <ol {...attributes}>{children}</ol>;
|
|
55
54
|
case "link":
|
|
56
55
|
return (
|
|
57
56
|
<SafeLink href={node.data?.get("href")} {...attributes}>
|
|
@@ -105,10 +104,10 @@ function onKeyDown(event, editor, next) {
|
|
|
105
104
|
const mark = isBoldHotkey(event)
|
|
106
105
|
? "bold"
|
|
107
106
|
: isItalicHotkey(event)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
? "italic"
|
|
108
|
+
: isUnderlinedHotkey(event)
|
|
109
|
+
? "underlined"
|
|
110
|
+
: undefined;
|
|
112
111
|
if (!_.isNil(mark)) {
|
|
113
112
|
event.preventDefault();
|
|
114
113
|
editor.toggleMark(mark);
|
|
@@ -363,4 +362,4 @@ RichTextEditor.propTypes = {
|
|
|
363
362
|
value: PropTypes.object,
|
|
364
363
|
};
|
|
365
364
|
|
|
366
|
-
export default
|
|
365
|
+
export default RichTextEditor;
|