Skip to content

Commit

Permalink
update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Zasa-san committed Jan 10, 2025
1 parent 99e8601 commit 4c07fef
Show file tree
Hide file tree
Showing 318 changed files with 399 additions and 379 deletions.
4 changes: 1 addition & 3 deletions app/react/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import { Outlet, useLocation, useParams } from 'react-router-dom';
import { useAtom } from 'jotai';
import Notifications from 'app/Notifications';
import Cookiepopup from 'app/App/Cookiepopup';
import { TranslateForm, t } from 'app/I18N';
import { Icon } from 'UI';
import { socket } from 'app/socket';
import { NotificationsContainer } from 'V2/Components/UI';
import { Matomo, CleanInsights } from 'app/V2/Components/Analitycs';
import { settingsAtom } from 'V2/atoms/settingsAtom';
import { TranslateModal } from 'app/I18N/components/TranslateModal';
import { TranslateModal, t } from 'V2/i18n';
import { inlineEditAtom } from 'V2/atoms';
import Confirm from './Confirm';
import { Menu } from './Menu';
Expand Down Expand Up @@ -95,7 +94,6 @@ const App = ({ customParams }) => {
<main className="app-content container-fluid">
<AppMainContext.Provider value={appContext}>
<Confirm {...confirmOptions} />
<TranslateForm />
<Outlet />
<GoogleAnalytics />
<Matomo />
Expand Down
2 changes: 1 addition & 1 deletion app/react/App/Confirm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Translate, t } from 'app/I18N';
import { Translate, t } from 'V2/i18n';

import Modal from 'app/Layout/Modal';
import { Loader } from 'app/components/Elements/Loader';
Expand Down
2 changes: 1 addition & 1 deletion app/react/App/Cookiepopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { isClient } from 'app/utils';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';

import { Notification } from 'app/Notifications/components/Notification';

Expand Down
5 changes: 3 additions & 2 deletions app/react/App/DropdownMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { I18NLink, Translate } from 'app/I18N';
import { useOnClickOutsideElement } from 'app/utils/useOnClickOutsideElementHook';
import { I18NLink } from 'app/I18N';
import { Icon } from 'UI';
import React, { useRef, useState, useCallback } from 'react';
import { useOnClickOutsideElement } from 'app/utils/useOnClickOutsideElementHook';
import { ILink, ISublink } from 'app/V2/shared/types';
import { IImmutable } from 'shared/types/Immutable';
import { Translate } from 'V2/i18n';

export type DropdownMenuProps = {
link: IImmutable<ILink>;
Expand Down
3 changes: 2 additions & 1 deletion app/react/App/Footer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { I18NLink, Translate } from 'app/I18N';
import { I18NLink } from 'app/I18N';
import { createSelector } from 'reselect';
import { libraryViewInfo } from 'app/App/libraryViewInfo';
import { Translate } from 'V2/i18n';

const getLibraryURL = libraryView =>
libraryViewInfo[libraryView] ? `/${libraryViewInfo[libraryView].url}` : '/library';
Expand Down
3 changes: 2 additions & 1 deletion app/react/App/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { connect, ConnectedProps } from 'react-redux';
import { fromJS } from 'immutable';
import { wrapDispatch } from 'app/Multireducer';
import { NeedAuthorization } from 'app/Auth';
import { I18NLink, I18NMenu, t, Translate } from 'app/I18N';
import { I18NLink, I18NMenu } from 'app/I18N';
import { t, Translate } from 'V2/i18n';
import { processFilters, encodeSearch } from 'app/Library/actions/libraryActions';
import { showSemanticSearch as showSemanticSearchAction } from 'app/SemanticSearch/actions/actions';
import { FeatureToggleSemanticSearch } from 'app/SemanticSearch/components/FeatureToggleSemanticSearch';
Expand Down
2 changes: 1 addition & 1 deletion app/react/App/ModalTips.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';
import Modal from 'app/Layout/Modal';
// eslint-disable-next-line import/exports-last
export default class ModalTips extends Component {
Expand Down
100 changes: 49 additions & 51 deletions app/react/App/SearchTipsContent.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,53 @@
import React from 'react';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';

const SearchTipsContent = () => {
return (
<ul>
<li>
{t(
'System',
'Search Tips: wildcard',
'Use an * for wildcard search. Ie: "juris*" will match words ' +
'such as jurisdiction, jurisdictional, jurists, jurisprudence, etc.',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: one char wildcard',
'? for one character wildcard. Ie: "198?" will match 1980 to 1989 and also 198a, 198b, etc.',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: exact term',
'Exact term match by enclosing your search string with quotes. Ie. "Costa Rica"' +
' will toss different results compared to Costa Rica without quotes.',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: proximity',
'~ for proximity searches. Ie: "the status"~5 will find anything having "the" and' +
'"status" within a distance of 5 words, such as "the procedural status", "the specific legal status".',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: boolean',
'AND, OR and NOT for boolean searches. Ie. "status AND women NOT Nicaragua" will match anything ' +
'containing both the words status and women, and necessarily not containing the word Nicaragua.',
false
)}
</li>
</ul>
);
};
const SearchTipsContent = () => (
<ul>
<li>
{t(
'System',
'Search Tips: wildcard',
'Use an * for wildcard search. Ie: "juris*" will match words ' +
'such as jurisdiction, jurisdictional, jurists, jurisprudence, etc.',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: one char wildcard',
'? for one character wildcard. Ie: "198?" will match 1980 to 1989 and also 198a, 198b, etc.',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: exact term',
'Exact term match by enclosing your search string with quotes. Ie. "Costa Rica"' +
' will toss different results compared to Costa Rica without quotes.',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: proximity',
'~ for proximity searches. Ie: "the status"~5 will find anything having "the" and' +
'"status" within a distance of 5 words, such as "the procedural status", "the specific legal status".',
false
)}
</li>
<li>
{t(
'System',
'Search Tips: boolean',
'AND, OR and NOT for boolean searches. Ie. "status AND women NOT Nicaragua" will match anything ' +
'containing both the words status and women, and necessarily not containing the word Nicaragua.',
false
)}
</li>
</ul>
);

export { SearchTipsContent };
2 changes: 1 addition & 1 deletion app/react/App/sockets.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { actions } from 'app/BasicReducer';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';
import { notificationActions } from 'app/Notifications';
import { documentProcessed } from 'app/Uploads/actions/uploadsActions';
import { atomStore, translationsAtom } from 'V2/atoms';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { updateEntity, selectSingleDocument } from 'app/Library/actions/libraryA
import api from 'app/utils/api';
import { RequestParams } from 'app/utils/RequestParams';
import { actions as basicReducerActions } from 'app/BasicReducer';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';

import * as types from './actionTypes';

Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/Attachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Icon } from 'UI';
import { withContext } from 'app/componentWrappers';
import { NeedAuthorization } from 'app/Auth';
import ShowIf from 'app/App/ShowIf';
import { Translate, t } from 'app/I18N';
import { Translate, t } from 'V2/i18n';
import AttachmentForm from 'app/Attachments/components/AttachmentForm';
import { wrapDispatch } from 'app/Multireducer';
import { notify } from 'app/Notifications/actions/notificationsActions';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/AttachmentForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Form, Field } from 'react-redux-form';

import { FormGroup, Select } from 'app/ReactReduxForms';
import { elasticLanguages } from 'shared/language';
import t from 'app/I18N/t';
import { t } from 'V2/i18n';
import ShowIf from 'app/App/ShowIf';

export class AttachmentForm extends Component {
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/AttachmentsList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';
import { advancedSort } from 'app/utils/advancedSort';
import { NeedAuthorization } from 'app/Auth';
import Attachment from 'app/Attachments/components/Attachment';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/AttachmentsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Tabs, TabLink, TabContent } from 'react-tabs-redux';
import Dropzone from 'react-dropzone';
import { bindActionCreators, Dispatch } from 'redux';
import { actions as formActions } from 'react-redux-form';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';
import { Icon } from 'app/UI';
import { WebMediaResourceForm } from 'app/Attachments/components/WebMediaResourceForm';

Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/File.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect, ConnectedProps } from 'react-redux';
import { bindActionCreators, Dispatch } from 'redux';
import { Control } from 'react-redux-form';
import { withContext } from 'app/componentWrappers';
import { t, Translate } from 'app/I18N';
import { t, Translate } from 'V2/i18n';
import { Icon } from 'UI';
import { APIURL } from 'app/config.js';
import { ClientBlobFile } from 'app/istore';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/FileList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { withContext } from 'app/componentWrappers';
import { advancedSort } from 'app/utils/advancedSort';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';
import { FileType } from 'shared/types/fileType';
import { EntitySchema } from 'shared/types/entityType';
import UploadButton from 'app/Metadata/components/UploadButton';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/UploadAttachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import t from 'app/I18N/t';
import { t } from 'V2/i18n';
import { Icon } from 'UI';

import { uploadAttachment } from '../actions/actions';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/UploadSupportingFile.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators, Dispatch } from 'redux';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';
import { Icon } from 'UI';
import { attachmentCompleted } from 'app/Metadata/actions/supportingFilesActions';
import { uploadAttachment, uploadAttachmentFromUrl } from '../actions/actions';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/WebMediaResourceForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Icon } from 'UI';
import React from 'react';
import { FormGroup } from 'app/Forms';
import { LocalForm } from 'app/Forms/Form';
import { Translate, t } from 'app/I18N';
import { Translate, t } from 'V2/i18n';

interface WebMediaResourceFormProps {
handleSubmit: (args: any) => void;
Expand Down
2 changes: 1 addition & 1 deletion app/react/Attachments/components/specs/File.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';
import { LocalForm } from 'app/Forms/Form';
import { FileType } from 'shared/types/fileType';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';
import { File, FileProps } from '../File';

describe('file', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/react/Auth/actions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @format */

import api from 'app/utils/api';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';
import { actions } from 'app/BasicReducer';
import { notify } from 'app/Notifications/actions/notificationsActions';
import { RequestParams } from 'app/utils/RequestParams';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Charts/components/LibraryChart.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';

import { Pie, Bar } from 'app/Charts';

Expand Down
2 changes: 1 addition & 1 deletion app/react/Charts/components/LibraryCharts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';

import { parseWithAggregations } from 'app/Library/helpers/libraryFilters';

Expand Down
2 changes: 1 addition & 1 deletion app/react/Charts/components/specs/LibraryCharts.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { shallow } from 'enzyme';
import { fromJS } from 'immutable';
import { store } from 'app/store';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';

import { LibraryCharts, mapStateToProps } from '../LibraryCharts';
import LibraryChart from '../LibraryChart';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Charts/utils/arrayUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';
import colorScheme from './colorScheme';

const compareStrings = (a, b) => a.label.toLowerCase().localeCompare(b.label.toLowerCase());
Expand Down
2 changes: 1 addition & 1 deletion app/react/Charts/utils/specs/arrayUtils.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable max-statements */
import React from 'react';
import Immutable from 'immutable';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';
import {
aggregationWithNestedValues,
expectNestedResult,
Expand Down
2 changes: 1 addition & 1 deletion app/react/Connections/actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { notificationActions } from 'app/Notifications';
import api from 'app/utils/api';
import debounce from 'app/utils/debounce';
import { RequestParams } from 'app/utils/RequestParams';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';

import * as types from './actionTypes';
import * as uiActions from './uiActions';
Expand Down
2 changes: 1 addition & 1 deletion app/react/Connections/components/ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Map } from 'immutable';
import { Icon } from 'UI';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';
import { saveConnection, selectRangedTarget } from '../actions/actions';

class ActionButton extends Component {
Expand Down
2 changes: 1 addition & 1 deletion app/react/Connections/components/CreateConnectionPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { Component } from 'react';

import { Icon } from 'UI';
import SidePanel from 'app/Layout/SidePanel';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';

import { closePanel } from '../actions/uiActions';
import { setRelationType, setTargetDocument } from '../actions/actions';
Expand Down
2 changes: 1 addition & 1 deletion app/react/ConnectionsList/components/ConnectionsGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { is, fromJS as Immutable } from 'immutable';
import PropTypes from 'prop-types';
import React, { Component } from 'react';

import { t } from 'app/I18N';
import { t } from 'V2/i18n';
import ShowIf from 'app/App/ShowIf';
import { Icon } from 'UI';

Expand Down
2 changes: 1 addition & 1 deletion app/react/ConnectionsList/components/ConnectionsGroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Immutable from 'immutable';
import React, { Component } from 'react';
import { Icon } from 'UI';
import { connect } from 'react-redux';
import { t } from 'app/I18N';
import { t } from 'V2/i18n';
import ConnectionsGroup from './ConnectionsGroup';
import { LibraryViewRelationships } from './LibraryViewRelationships';

Expand Down
2 changes: 1 addition & 1 deletion app/react/ConnectionsList/components/ResetSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';

import ShowIf from 'app/App/ShowIf';
import { Translate } from 'app/I18N';
import { Translate } from 'V2/i18n';
import { Icon } from 'UI';

import { resetSearch } from '../actions/actions';
Expand Down
Loading

0 comments on commit 4c07fef

Please sign in to comment.