,
diff --git a/packages/a11y/src/Gesture/withTreeGesture.test.js b/packages/a11y/src/Gesture/withTreeGesture.test.js
index 363f57c593..aea3e463e2 100644
--- a/packages/a11y/src/Gesture/withTreeGesture.test.js
+++ b/packages/a11y/src/Gesture/withTreeGesture.test.js
@@ -2,8 +2,9 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import cases from 'jest-in-case';
-import { withTreeGesture } from './withTreeGesture';
+
import Tree from '../__mocks__/tree';
+import { withTreeGesture } from './withTreeGesture';
// Legend : the comments indicates 2 numbers, level and index
// Those are used in the following tests
diff --git a/packages/a11y/src/Gesture/withTreeGesture.tsx b/packages/a11y/src/Gesture/withTreeGesture.tsx
index 955689bc38..9c49ca115a 100644
--- a/packages/a11y/src/Gesture/withTreeGesture.tsx
+++ b/packages/a11y/src/Gesture/withTreeGesture.tsx
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
-import { KeyboardEvent, ComponentType, Component } from 'react';
+import { Component, ComponentType, KeyboardEvent } from 'react';
+
import { focusOn } from './focus';
function getAllItems(ref: HTMLElement) {
diff --git a/packages/cmf-cqrs/src/middleware/smartWebsocket.test.js b/packages/cmf-cqrs/src/middleware/smartWebsocket.test.js
index 0ad7ecaa80..3a798ec107 100644
--- a/packages/cmf-cqrs/src/middleware/smartWebsocket.test.js
+++ b/packages/cmf-cqrs/src/middleware/smartWebsocket.test.js
@@ -1,7 +1,8 @@
-import { WebSocket, Server } from 'mock-socket';
+import { Server, WebSocket } from 'mock-socket';
// fixme
import { setTimeout } from 'timers';
-import SmartWebsocket, { wsSend, wsIsClosed } from './smartWebsocket';
+
+import SmartWebsocket, { wsIsClosed, wsSend } from './smartWebsocket';
// Set the websocket mock used by smartWebsocket middleware
global.WebSocket = WebSocket;
diff --git a/packages/cmf/__tests__/App.test.js b/packages/cmf/__tests__/App.test.js
index 1688b0fc32..dd459b91b1 100644
--- a/packages/cmf/__tests__/App.test.js
+++ b/packages/cmf/__tests__/App.test.js
@@ -1,8 +1,10 @@
-import { render, screen } from '@testing-library/react';
import { Provider } from 'react-redux';
-import RegistryProvider from '../src/RegistryProvider';
-import ErrorBoundary from '../src/components/ErrorBoundary/ErrorBoundary.component';
+
+import { render, screen } from '@testing-library/react';
+
import App from '../src/App';
+import ErrorBoundary from '../src/components/ErrorBoundary/ErrorBoundary.component';
+import RegistryProvider from '../src/RegistryProvider';
jest.mock('react-redux', () => ({
esModule: true,
diff --git a/packages/cmf/__tests__/bootstrap.test.js b/packages/cmf/__tests__/bootstrap.test.js
index c143f797d2..5ca1ca77e8 100644
--- a/packages/cmf/__tests__/bootstrap.test.js
+++ b/packages/cmf/__tests__/bootstrap.test.js
@@ -1,15 +1,16 @@
import ReactDOM from 'react-dom/client';
+
import createSagaMiddleware from 'redux-saga';
import bootstrap, * as internals from '../src/bootstrap';
-import { registerInternals } from '../src/register';
import actionCreator from '../src/actionCreator';
import component from '../src/component';
import expression from '../src/expression';
+import onError from '../src/onError';
+import { registerInternals } from '../src/register';
import registry from '../src/registry';
-import storeAPI from '../src/store';
import sagas from '../src/sagas';
-import onError from '../src/onError';
+import storeAPI from '../src/store';
jest.mock('react-dom/client', () => ({
createRoot: jest.fn().mockImplementation(() => ({
diff --git a/packages/cmf/__tests__/cmfConnect.test.js b/packages/cmf/__tests__/cmfConnect.test.js
index 8b619c5e39..99b910f873 100644
--- a/packages/cmf/__tests__/cmfConnect.test.js
+++ b/packages/cmf/__tests__/cmfConnect.test.js
@@ -1,24 +1,23 @@
/**
* @jest-environment jsdom
*/
-
import { Component } from 'react';
-import PropTypes from 'prop-types';
-import { fromJS, Map } from 'immutable';
+
import { fireEvent, render, screen } from '@testing-library/react';
+import { fromJS, Map } from 'immutable';
+import PropTypes from 'prop-types';
-import expression from '../src/expression';
import { mock } from '../src';
-import { mapStateToViewProps } from '../src/settings';
-
import cmfConnect, {
- getComponentName,
getComponentId,
- getStateToProps,
+ getComponentName,
getDispatchToProps,
getMergeProps,
+ getStateToProps,
} from '../src/cmfConnect';
import component from '../src/component';
+import expression from '../src/expression';
+import { mapStateToViewProps } from '../src/settings';
describe('cmfConnect', () => {
describe('#getComponentName', () => {
diff --git a/packages/cmf/__tests__/expression.test.js b/packages/cmf/__tests__/expression.test.js
index c86b987ebb..4ab0671bc3 100644
--- a/packages/cmf/__tests__/expression.test.js
+++ b/packages/cmf/__tests__/expression.test.js
@@ -1,4 +1,5 @@
import { render, screen } from '@testing-library/react';
+
import cmf, { mock } from '../src';
import expression from '../src/expression';
diff --git a/packages/components/src/ActionIntercom/Intercom.component.test.js b/packages/components/src/ActionIntercom/Intercom.component.test.js
index 2cb87d628e..6b3cddb41f 100644
--- a/packages/components/src/ActionIntercom/Intercom.component.test.js
+++ b/packages/components/src/ActionIntercom/Intercom.component.test.js
@@ -1,4 +1,5 @@
import { act } from 'react-dom/test-utils';
+
import { configure, render, screen } from '@testing-library/react';
import Intercom from './Intercom.component';
diff --git a/packages/components/src/ActionList/ActionList.test.js b/packages/components/src/ActionList/ActionList.test.js
index fef0ca1376..4f7c0074a8 100644
--- a/packages/components/src/ActionList/ActionList.test.js
+++ b/packages/components/src/ActionList/ActionList.test.js
@@ -1,4 +1,5 @@
import { render, screen } from '@testing-library/react';
+
import ActionList from './ActionList.component';
describe('ActionList', () => {
diff --git a/packages/components/src/Actions/ActionButton/ActionButton.test.js b/packages/components/src/Actions/ActionButton/ActionButton.test.js
index c74c40aac8..3b0687c151 100644
--- a/packages/components/src/Actions/ActionButton/ActionButton.test.js
+++ b/packages/components/src/Actions/ActionButton/ActionButton.test.js
@@ -1,5 +1,6 @@
-import { render, screen, fireEvent, within } from '@testing-library/react';
+import { fireEvent, render, screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import ActionButton from './ActionButton.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/Actions/ActionDropdown/ActionDropdown.test.js b/packages/components/src/Actions/ActionDropdown/ActionDropdown.test.js
index d83cbe0ae7..0b16d58bb7 100644
--- a/packages/components/src/Actions/ActionDropdown/ActionDropdown.test.js
+++ b/packages/components/src/Actions/ActionDropdown/ActionDropdown.test.js
@@ -1,8 +1,10 @@
/* eslint-disable react/prop-types */
+
/* eslint-disable react/display-name */
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import ActionDropdown, { InjectDropdownMenuItem, getMenuItem } from './ActionDropdown.component';
+
+import ActionDropdown, { getMenuItem, InjectDropdownMenuItem } from './ActionDropdown.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/Actions/ActionIconToggle/ActionIconToggle.component.test.js b/packages/components/src/Actions/ActionIconToggle/ActionIconToggle.component.test.js
index 7273d6cbe3..dca2582b57 100644
--- a/packages/components/src/Actions/ActionIconToggle/ActionIconToggle.component.test.js
+++ b/packages/components/src/Actions/ActionIconToggle/ActionIconToggle.component.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import ActionIconToggle from './ActionIconToggle.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/Actions/ActionSplitDropdown/ActionSplitDropdown.test.js b/packages/components/src/Actions/ActionSplitDropdown/ActionSplitDropdown.test.js
index e8f43e279e..22bbb17675 100644
--- a/packages/components/src/Actions/ActionSplitDropdown/ActionSplitDropdown.test.js
+++ b/packages/components/src/Actions/ActionSplitDropdown/ActionSplitDropdown.test.js
@@ -1,6 +1,8 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import ActionSplitDropdown from './ActionSplitDropdown.component';
+
jest.unmock('@talend/design-system');
const items = [
diff --git a/packages/components/src/AppGuidedTour/AppGuidedTour.test.js b/packages/components/src/AppGuidedTour/AppGuidedTour.test.js
index 104c4adcc2..920f5d18ec 100644
--- a/packages/components/src/AppGuidedTour/AppGuidedTour.test.js
+++ b/packages/components/src/AppGuidedTour/AppGuidedTour.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import AppGuidedTour, { DEFAULT_LOCAL_STORAGE_KEY } from './AppGuidedTour.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/AppSwitcher/AppSwitcher.component.test.js b/packages/components/src/AppSwitcher/AppSwitcher.component.test.js
index 21cd35ec8b..1da70bc2dc 100644
--- a/packages/components/src/AppSwitcher/AppSwitcher.component.test.js
+++ b/packages/components/src/AppSwitcher/AppSwitcher.component.test.js
@@ -1,5 +1,6 @@
-import userEvent from '@testing-library/user-event';
import { render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+
import AppSwitcher from './AppSwitcher.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/Badge/BadgeComposition/BadgeDelete/BadgeDelete.component.test.js b/packages/components/src/Badge/BadgeComposition/BadgeDelete/BadgeDelete.component.test.js
index 88038f8c1f..40b6b93fe6 100644
--- a/packages/components/src/Badge/BadgeComposition/BadgeDelete/BadgeDelete.component.test.js
+++ b/packages/components/src/Badge/BadgeComposition/BadgeDelete/BadgeDelete.component.test.js
@@ -1,7 +1,8 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import BadgeDelete from './BadgeDelete.component';
+
import getDefaultT from '../../../translate';
+import BadgeDelete from './BadgeDelete.component';
describe('BadgeDelete', () => {
it('should render', () => {
diff --git a/packages/components/src/Badge/BadgeComposition/BadgeDropdown/BadgeDropdown.component.test.js b/packages/components/src/Badge/BadgeComposition/BadgeDropdown/BadgeDropdown.component.test.js
index 6e9b95d080..e5d17e7404 100644
--- a/packages/components/src/Badge/BadgeComposition/BadgeDropdown/BadgeDropdown.component.test.js
+++ b/packages/components/src/Badge/BadgeComposition/BadgeDropdown/BadgeDropdown.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import BadgeDropdown from './BadgeDropdown.component';
describe('BadgeDropdown', () => {
diff --git a/packages/components/src/Breadcrumbs/Breadcrumbs.test.js b/packages/components/src/Breadcrumbs/Breadcrumbs.test.js
index cea4e62154..ed1bc887c8 100644
--- a/packages/components/src/Breadcrumbs/Breadcrumbs.test.js
+++ b/packages/components/src/Breadcrumbs/Breadcrumbs.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Breadcrumbs from './Breadcrumbs.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/CollapsiblePanel/CollapsiblePanel.test.js b/packages/components/src/CollapsiblePanel/CollapsiblePanel.test.js
index 10c58b3902..0a72086dec 100644
--- a/packages/components/src/CollapsiblePanel/CollapsiblePanel.test.js
+++ b/packages/components/src/CollapsiblePanel/CollapsiblePanel.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import CollapsiblePanel from './CollapsiblePanel.component';
const version1 = {
diff --git a/packages/components/src/ConfirmDialog/ConfirmDialog.test.js b/packages/components/src/ConfirmDialog/ConfirmDialog.test.js
index 966c898987..405b63335f 100644
--- a/packages/components/src/ConfirmDialog/ConfirmDialog.test.js
+++ b/packages/components/src/ConfirmDialog/ConfirmDialog.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import ConfirmDialog from './ConfirmDialog.component';
const children =
diff --git a/packages/components/src/DateTimePickers/pickers/DatePicker/DatePicker.test.js b/packages/components/src/DateTimePickers/pickers/DatePicker/DatePicker.test.js
index 70243a3792..9fb9597680 100644
--- a/packages/components/src/DateTimePickers/pickers/DatePicker/DatePicker.test.js
+++ b/packages/components/src/DateTimePickers/pickers/DatePicker/DatePicker.test.js
@@ -1,7 +1,8 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import isSameDay from 'date-fns/is_same_day';
import isToday from 'date-fns/is_today';
+
import DatePicker from './DatePicker.component';
jest.mock('date-fns/is_today');
diff --git a/packages/components/src/DateTimePickers/pickers/MonthPicker/MonthPicker.test.js b/packages/components/src/DateTimePickers/pickers/MonthPicker/MonthPicker.test.js
index ba429f6977..e52a94b8ca 100644
--- a/packages/components/src/DateTimePickers/pickers/MonthPicker/MonthPicker.test.js
+++ b/packages/components/src/DateTimePickers/pickers/MonthPicker/MonthPicker.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import MonthPicker from './MonthPicker.component';
describe('MonthPicker', () => {
diff --git a/packages/components/src/DateTimePickers/pickers/TimePicker/TimePicker.component.test.js b/packages/components/src/DateTimePickers/pickers/TimePicker/TimePicker.component.test.js
index d24fdd4567..9992150ef4 100644
--- a/packages/components/src/DateTimePickers/pickers/TimePicker/TimePicker.component.test.js
+++ b/packages/components/src/DateTimePickers/pickers/TimePicker/TimePicker.component.test.js
@@ -1,4 +1,4 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { TimePicker } from './TimePicker.component';
diff --git a/packages/components/src/DateTimePickers/pickers/YearPicker/YearPicker.test.js b/packages/components/src/DateTimePickers/pickers/YearPicker/YearPicker.test.js
index 0d2d5484c0..b8f96485ee 100644
--- a/packages/components/src/DateTimePickers/pickers/YearPicker/YearPicker.test.js
+++ b/packages/components/src/DateTimePickers/pickers/YearPicker/YearPicker.test.js
@@ -1,7 +1,8 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import YearPicker from './YearPicker.component';
+
import dateMock from '../../../../../../mocks/dateMock';
+import YearPicker from './YearPicker.component';
describe('YearPicker', () => {
afterEach(() => {
diff --git a/packages/components/src/DateTimePickers/views/DateView/DateView.test.js b/packages/components/src/DateTimePickers/views/DateView/DateView.test.js
index fe045c2c27..92c9ad8adf 100644
--- a/packages/components/src/DateTimePickers/views/DateView/DateView.test.js
+++ b/packages/components/src/DateTimePickers/views/DateView/DateView.test.js
@@ -1,6 +1,6 @@
/* eslint-disable react/display-name */
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { screen, render } from '@testing-library/react';
import DateView from './DateView.component';
diff --git a/packages/components/src/DateTimePickers/views/MonthYearView/MonthYearView.test.js b/packages/components/src/DateTimePickers/views/MonthYearView/MonthYearView.test.js
index 4962088a20..6e41e5e805 100644
--- a/packages/components/src/DateTimePickers/views/MonthYearView/MonthYearView.test.js
+++ b/packages/components/src/DateTimePickers/views/MonthYearView/MonthYearView.test.js
@@ -1,8 +1,9 @@
/* eslint-disable react/display-name */
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import MonthYearView from './MonthYearView.component';
+
jest.mock('../../pickers/MonthPicker', () => props => (
));
diff --git a/packages/components/src/Dialog/Dialog.test.js b/packages/components/src/Dialog/Dialog.test.js
index 0ae10590b4..2066539125 100644
--- a/packages/components/src/Dialog/Dialog.test.js
+++ b/packages/components/src/Dialog/Dialog.test.js
@@ -1,7 +1,9 @@
/* eslint-disable react/prop-types */
+
/* eslint-disable react/display-name */
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Dialog from './Dialog.component';
jest.mock('@talend/react-bootstrap', () => {
diff --git a/packages/components/src/EditableText/InlineForm.component.js b/packages/components/src/EditableText/InlineForm.component.js
index 01b7e1af34..045bfd1959 100644
--- a/packages/components/src/EditableText/InlineForm.component.js
+++ b/packages/components/src/EditableText/InlineForm.component.js
@@ -1,11 +1,14 @@
import { Component } from 'react';
-import PropTypes from 'prop-types';
+
import classNames from 'classnames';
+import PropTypes from 'prop-types';
+
import { Action } from '../Actions';
import FocusManager from '../FocusManager';
-import theme from './InlineForm.module.scss';
import getDefaultT from '../translate';
+import theme from './InlineForm.module.scss';
+
class InlineForm extends Component {
static propTypes = {
text: PropTypes.string.isRequired,
diff --git a/packages/components/src/EditableText/InlineForm.component.test.js b/packages/components/src/EditableText/InlineForm.component.test.js
index cb2b6d5553..9c05a00196 100644
--- a/packages/components/src/EditableText/InlineForm.component.test.js
+++ b/packages/components/src/EditableText/InlineForm.component.test.js
@@ -1,7 +1,8 @@
-import InlineForm from './InlineForm.component';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import getDefaultT from '../translate';
+import InlineForm from './InlineForm.component';
describe('InlineForm', () => {
let defaultProps;
diff --git a/packages/components/src/EditableText/PlainTextTitle.component.test.js b/packages/components/src/EditableText/PlainTextTitle.component.test.js
index 4529f49853..80f89ca3c4 100644
--- a/packages/components/src/EditableText/PlainTextTitle.component.test.js
+++ b/packages/components/src/EditableText/PlainTextTitle.component.test.js
@@ -1,7 +1,8 @@
-import { PlainTextTitle } from './PlainTextTitle.component';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import { PlainTextTitle } from './PlainTextTitle.component';
+
describe('PlainTextTitle', () => {
it('should render', () => {
const props = {
diff --git a/packages/components/src/Enumeration/Header/Header.test.js b/packages/components/src/Enumeration/Header/Header.test.js
index a2e0ff4704..8f841e8bd8 100644
--- a/packages/components/src/Enumeration/Header/Header.test.js
+++ b/packages/components/src/Enumeration/Header/Header.test.js
@@ -2,6 +2,7 @@ import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Header from './Header.component';
+
jest.unmock('@talend/design-system');
describe('Header', () => {
it('should trigger callback when clicking on header button', async () => {
diff --git a/packages/components/src/Enumeration/Header/HeaderInput.test.js b/packages/components/src/Enumeration/Header/HeaderInput.test.js
index f01c0d21c8..b248e5608e 100644
--- a/packages/components/src/Enumeration/Header/HeaderInput.test.js
+++ b/packages/components/src/Enumeration/Header/HeaderInput.test.js
@@ -1,4 +1,4 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import HeaderInput from './HeaderInput.component';
diff --git a/packages/components/src/Enumeration/Header/headerSelected.test.js b/packages/components/src/Enumeration/Header/headerSelected.test.js
index bc69da109f..aed68aec93 100644
--- a/packages/components/src/Enumeration/Header/headerSelected.test.js
+++ b/packages/components/src/Enumeration/Header/headerSelected.test.js
@@ -1,4 +1,4 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import HeaderSelected from './HeaderSelected.component';
diff --git a/packages/components/src/Enumeration/Items/Item/Item.test.js b/packages/components/src/Enumeration/Items/Item/Item.test.js
index b586111e02..7a6928d931 100644
--- a/packages/components/src/Enumeration/Items/Item/Item.test.js
+++ b/packages/components/src/Enumeration/Items/Item/Item.test.js
@@ -1,9 +1,9 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-
import cloneDeep from 'lodash/cloneDeep';
import Item from './Item.component';
+
jest.unmock('@talend/design-system');
const item = {
diff --git a/packages/components/src/Enumeration/Items/Item/ItemEdit.component.js b/packages/components/src/Enumeration/Items/Item/ItemEdit.component.js
index 0dc1eb2a60..e26509d05c 100644
--- a/packages/components/src/Enumeration/Items/Item/ItemEdit.component.js
+++ b/packages/components/src/Enumeration/Items/Item/ItemEdit.component.js
@@ -1,13 +1,15 @@
-import PropTypes from 'prop-types';
import { Component } from 'react';
-import classNames from 'classnames';
import { withTranslation } from 'react-i18next';
+import classNames from 'classnames';
+import PropTypes from 'prop-types';
+
import Action from '../../../Actions/Action';
-import theme from './Item.module.scss';
+import I18N_DOMAIN_COMPONENTS from '../../../constants';
import ItemPropTypes from './Item.propTypes';
import ItemEditPropTypes from './ItemEdit.propTypes';
-import I18N_DOMAIN_COMPONENTS from '../../../constants';
+
+import theme from './Item.module.scss';
function itemClasses(error) {
return classNames(theme['tc-enumeration-item'], 'tc-enumeration-item', {
diff --git a/packages/components/src/Enumeration/Items/Item/ItemEdit.test.js b/packages/components/src/Enumeration/Items/Item/ItemEdit.test.js
index 4ee10eb63a..f981b89ace 100644
--- a/packages/components/src/Enumeration/Items/Item/ItemEdit.test.js
+++ b/packages/components/src/Enumeration/Items/Item/ItemEdit.test.js
@@ -1,4 +1,4 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import ItemEdit from './ItemEdit.component';
diff --git a/packages/components/src/FilterBar/FilterBar.component.js b/packages/components/src/FilterBar/FilterBar.component.js
index 93f97d860d..d80cb01fb9 100644
--- a/packages/components/src/FilterBar/FilterBar.component.js
+++ b/packages/components/src/FilterBar/FilterBar.component.js
@@ -1,12 +1,16 @@
-import PropTypes from 'prop-types';
import { useEffect, useState } from 'react';
-import classNames from 'classnames';
import DebounceInput from 'react-debounce-input';
-import { FormControl } from '@talend/react-bootstrap';
import { useTranslation } from 'react-i18next';
+
+import classNames from 'classnames';
+import PropTypes from 'prop-types';
+
+import { FormControl } from '@talend/react-bootstrap';
+
import { Action } from '../Actions';
-import Icon from '../Icon';
import I18N_DOMAIN_COMPONENTS from '../constants';
+import Icon from '../Icon';
+
import theme from './FilterBar.module.scss';
function forceBlur(event) {
diff --git a/packages/components/src/FilterBar/FilterBar.test.js b/packages/components/src/FilterBar/FilterBar.test.js
index e82eae8dd4..d0b9ea7559 100644
--- a/packages/components/src/FilterBar/FilterBar.test.js
+++ b/packages/components/src/FilterBar/FilterBar.test.js
@@ -1,4 +1,4 @@
-import { render, screen, fireEvent, waitFor } from '@testing-library/react';
+import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import FilterBar from './FilterBar.component';
diff --git a/packages/components/src/HeaderBar/HeaderBar.test.js b/packages/components/src/HeaderBar/HeaderBar.test.js
index 2bcb37159d..50b6d6f2b8 100644
--- a/packages/components/src/HeaderBar/HeaderBar.test.js
+++ b/packages/components/src/HeaderBar/HeaderBar.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import HeaderBarComponent from './HeaderBar.component';
describe('HeaderBar', () => {
diff --git a/packages/components/src/List/ListComposition/ColumnChooser/ColumnChooser.component.test.js b/packages/components/src/List/ListComposition/ColumnChooser/ColumnChooser.component.test.js
index c34c2a9e1b..3d315e084e 100644
--- a/packages/components/src/List/ListComposition/ColumnChooser/ColumnChooser.component.test.js
+++ b/packages/components/src/List/ListComposition/ColumnChooser/ColumnChooser.component.test.js
@@ -1,8 +1,9 @@
-import { screen, render, act } from '@testing-library/react';
+import { act, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import ColumnChooser from './ColumnChooser.component';
-import { ListContext } from '../context';
+
import getDefaultT from '../../../translate';
+import { ListContext } from '../context';
+import ColumnChooser from './ColumnChooser.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/ListComposition/DisplayMode/ListDisplayMode.component.test.js b/packages/components/src/List/ListComposition/DisplayMode/ListDisplayMode.component.test.js
index f8a0464c49..6941ad79ed 100644
--- a/packages/components/src/List/ListComposition/DisplayMode/ListDisplayMode.component.test.js
+++ b/packages/components/src/List/ListComposition/DisplayMode/ListDisplayMode.component.test.js
@@ -1,10 +1,10 @@
/* eslint-disable react/prop-types */
-import { screen, render, act } from '@testing-library/react';
+import { act, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import ListDisplayMode from './ListDisplayMode.component';
-import { ListContext } from '../context';
import getDefaultT from '../../../translate';
+import { ListContext } from '../context';
+import ListDisplayMode from './ListDisplayMode.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/ListComposition/Manager/ListManager.component.test.js b/packages/components/src/List/ListComposition/Manager/ListManager.component.test.js
index ef063113dc..3eb3e68e00 100644
--- a/packages/components/src/List/ListComposition/Manager/ListManager.component.test.js
+++ b/packages/components/src/List/ListComposition/Manager/ListManager.component.test.js
@@ -1,10 +1,11 @@
/* eslint-disable react/prop-types */
import { useContext } from 'react';
-import { screen, render } from '@testing-library/react';
+
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import ListManager from './ListManager.component';
import { ListContext } from '../context';
+import ListManager from './ListManager.component';
function TestConsumer(props) {
return (
diff --git a/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSelection.hook.test.js b/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSelection.hook.test.js
index 86cbeb844f..5e501ea459 100644
--- a/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSelection.hook.test.js
+++ b/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSelection.hook.test.js
@@ -1,6 +1,7 @@
/* eslint-disable react/prop-types */
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import useCollectionSelection from './useCollectionSelection.hook';
function SelectionComponent({ collection, initialSelectedIds, idKey, isSelected, ...props }) {
diff --git a/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSort.hook.test.js b/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSort.hook.test.js
index ff92d820c8..7071570cf3 100644
--- a/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSort.hook.test.js
+++ b/packages/components/src/List/ListComposition/Manager/hooks/useCollectionSort.hook.test.js
@@ -1,7 +1,8 @@
/* eslint-disable react/prop-types */
-import PropTypes from 'prop-types';
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import PropTypes from 'prop-types';
+
import { useCollectionSort } from './useCollectionSort.hook';
function SortComponent({ collection, initialSortParams, sortFunctions, ...props }) {
diff --git a/packages/components/src/List/ListComposition/SortBy/SortBy.component.test.js b/packages/components/src/List/ListComposition/SortBy/SortBy.component.test.js
index 9095af8934..c08c443abd 100644
--- a/packages/components/src/List/ListComposition/SortBy/SortBy.component.test.js
+++ b/packages/components/src/List/ListComposition/SortBy/SortBy.component.test.js
@@ -1,9 +1,9 @@
/* eslint-disable react/prop-types */
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import getDefaultT from '../../../translate';
import { ListContext } from '../context';
-
import SortBy from './SortBy.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/ListComposition/TextFilter/TextFilter.component.test.js b/packages/components/src/List/ListComposition/TextFilter/TextFilter.component.test.js
index 0a2a0b899d..462c3518d3 100644
--- a/packages/components/src/List/ListComposition/TextFilter/TextFilter.component.test.js
+++ b/packages/components/src/List/ListComposition/TextFilter/TextFilter.component.test.js
@@ -1,9 +1,10 @@
/* eslint-disable react/prop-types */
-import { screen, render, act } from '@testing-library/react';
+import { act, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import TextFilter from './TextFilter.component';
-import { ListContext } from '../context';
+
import getDefaultT from '../../../translate';
+import { ListContext } from '../context';
+import TextFilter from './TextFilter.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/ListToVirtualizedList/ListToVirtualizedList.test.js b/packages/components/src/List/ListToVirtualizedList/ListToVirtualizedList.test.js
index 0ed086f8e1..e3487cfc8f 100644
--- a/packages/components/src/List/ListToVirtualizedList/ListToVirtualizedList.test.js
+++ b/packages/components/src/List/ListToVirtualizedList/ListToVirtualizedList.test.js
@@ -1,11 +1,12 @@
/* eslint-disable react/display-name */
+
/* eslint-disable react/prop-types */
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import cloneDeep from 'lodash/cloneDeep';
import VirtualizedList from '../../VirtualizedList';
-import { ListToVirtualizedList, compareOrder } from './ListToVirtualizedList.component';
+import { compareOrder, ListToVirtualizedList } from './ListToVirtualizedList.component';
jest.unmock('@talend/design-system');
jest.mock('../../VirtualizedList', () => {
diff --git a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.component.test.js b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.component.test.js
index b82916a46f..af829b7555 100644
--- a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.component.test.js
+++ b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Component from './ColumnChooser.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserBody/ColumnChooserBody.component.test.js b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserBody/ColumnChooserBody.component.test.js
index a59e193227..a520924fc2 100644
--- a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserBody/ColumnChooserBody.component.test.js
+++ b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserBody/ColumnChooserBody.component.test.js
@@ -1,8 +1,8 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { ColumnChooserProvider } from '../columnChooser.context';
-import getDefaultT from '../../../../../translate';
+import getDefaultT from '../../../../../translate';
+import { ColumnChooserProvider } from '../columnChooser.context';
import Component from './ColumnChooserBody.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserRow/RowCheckbox/RowCheckbox.component.test.js b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserRow/RowCheckbox/RowCheckbox.component.test.js
index 9856e9e07d..164795a225 100644
--- a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserRow/RowCheckbox/RowCheckbox.component.test.js
+++ b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooserRow/RowCheckbox/RowCheckbox.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Component from './RowCheckbox.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/SelectAllColumnsCheckbox/SelectAllColumnsCheckbox.component.test.js b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/SelectAllColumnsCheckbox/SelectAllColumnsCheckbox.component.test.js
index efb53f2b58..6f97e07c2b 100644
--- a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/SelectAllColumnsCheckbox/SelectAllColumnsCheckbox.component.test.js
+++ b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/SelectAllColumnsCheckbox/SelectAllColumnsCheckbox.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import getDefaultT from '../../../../../translate';
import Component from './SelectAllColumnsCheckbox.component';
diff --git a/packages/components/src/List/Toolbar/DisplayModeToggle/DisplayModeToggle.test.js b/packages/components/src/List/Toolbar/DisplayModeToggle/DisplayModeToggle.test.js
index 088bc62342..461aefbba2 100644
--- a/packages/components/src/List/Toolbar/DisplayModeToggle/DisplayModeToggle.test.js
+++ b/packages/components/src/List/Toolbar/DisplayModeToggle/DisplayModeToggle.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import DisplayModeToggle from './DisplayModeToggle.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/List/Toolbar/Pagination/Pagination.test.js b/packages/components/src/List/Toolbar/Pagination/Pagination.test.js
index 4b68846979..ca90219d99 100644
--- a/packages/components/src/List/Toolbar/Pagination/Pagination.test.js
+++ b/packages/components/src/List/Toolbar/Pagination/Pagination.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Pagination from './Pagination.component';
const props = {
diff --git a/packages/components/src/List/Toolbar/SelectSortBy/SelectSortBy.test.js b/packages/components/src/List/Toolbar/SelectSortBy/SelectSortBy.test.js
index d403938c6d..f2636f7d92 100644
--- a/packages/components/src/List/Toolbar/SelectSortBy/SelectSortBy.test.js
+++ b/packages/components/src/List/Toolbar/SelectSortBy/SelectSortBy.test.js
@@ -1,6 +1,7 @@
// rewrite tests using react-testing-library
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import SelectSortBy from './SelectSortBy.component';
const id = 'toolbar-sort';
diff --git a/packages/components/src/ListView/Header/Header.test.js b/packages/components/src/ListView/Header/Header.test.js
index 1f872dafa5..840ae2bb9b 100644
--- a/packages/components/src/ListView/Header/Header.test.js
+++ b/packages/components/src/ListView/Header/Header.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Header from './Header.component';
describe('Header', () => {
diff --git a/packages/components/src/ListView/Header/headerInput.test.js b/packages/components/src/ListView/Header/headerInput.test.js
index c7c7203064..0c188868b8 100644
--- a/packages/components/src/ListView/Header/headerInput.test.js
+++ b/packages/components/src/ListView/Header/headerInput.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import HeaderInput from './HeaderInput.component';
describe('Header input', () => {
diff --git a/packages/components/src/MultiSelect/MultiSelect.container.js b/packages/components/src/MultiSelect/MultiSelect.container.js
index 02caabb582..c056988fa0 100644
--- a/packages/components/src/MultiSelect/MultiSelect.container.js
+++ b/packages/components/src/MultiSelect/MultiSelect.container.js
@@ -1,19 +1,21 @@
/* eslint-disable react/sort-comp */
import { Component } from 'react';
-import PropTypes from 'prop-types';
-import classnames from 'classnames';
import { withTranslation } from 'react-i18next';
+
+import classnames from 'classnames';
import memoizeOne from 'memoize-one';
+import PropTypes from 'prop-types';
-import theme from './MultiSelect.module.scss';
-import VirtualizedList from '../VirtualizedList';
+import { ActionButton } from '../Actions';
import I18N_DOMAIN_COMPONENTS from '../constants';
+import Icon from '../Icon';
+import VirtualizedList from '../VirtualizedList';
+import { CREATE_NEW_VALUE, SELECT_ALL_VALUE } from './constants';
+import Dropdown from './Dropdown.container';
import { ItemOption } from './ItemOption.component';
import { ItemView } from './ItemView.component';
-import Dropdown from './Dropdown.container';
-import { SELECT_ALL_VALUE, CREATE_NEW_VALUE } from './constants';
-import { ActionButton } from '../Actions';
-import Icon from '../Icon';
+
+import theme from './MultiSelect.module.scss';
function initSelectedMap(selected) {
return selected.reduce((acc, current) => {
diff --git a/packages/components/src/Notification/Notification.test.js b/packages/components/src/Notification/Notification.test.js
index 80f692f4bb..6a3e5d0c84 100644
--- a/packages/components/src/Notification/Notification.test.js
+++ b/packages/components/src/Notification/Notification.test.js
@@ -1,4 +1,4 @@
-import { render, screen, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Notification from './Notification.component';
diff --git a/packages/components/src/ObjectViewer/JSONLike/JSONLike.test.js b/packages/components/src/ObjectViewer/JSONLike/JSONLike.test.js
index aec3f7e8b1..5d3cff7167 100644
--- a/packages/components/src/ObjectViewer/JSONLike/JSONLike.test.js
+++ b/packages/components/src/ObjectViewer/JSONLike/JSONLike.test.js
@@ -2,13 +2,13 @@ import { render, screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Component, {
- ARRAY_ABSTRACT,
- OBJECT_ABSTRACT,
abstracter,
+ ARRAY_ABSTRACT,
+ ComplexItem,
getDataAbstract,
getDataInfo,
- ComplexItem,
getName,
+ OBJECT_ABSTRACT,
} from './JSONLike.component';
const callbacksProps = {
diff --git a/packages/components/src/OverlayTrigger/OverlayTrigger.test.js b/packages/components/src/OverlayTrigger/OverlayTrigger.test.js
index 7c70d62281..f55b2390d3 100644
--- a/packages/components/src/OverlayTrigger/OverlayTrigger.test.js
+++ b/packages/components/src/OverlayTrigger/OverlayTrigger.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import OverlayTrigger from './OverlayTrigger.component';
jest.mock('./overlay', () => ({
diff --git a/packages/components/src/PieChart/PieChartButton.test.js b/packages/components/src/PieChart/PieChartButton.test.js
index 3783fbd7f1..a7208b9cc6 100644
--- a/packages/components/src/PieChart/PieChartButton.test.js
+++ b/packages/components/src/PieChart/PieChartButton.test.js
@@ -1,9 +1,11 @@
/* eslint-disable react/display-name */
+
/* eslint-disable react/prop-types */
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { PIECHART_SIZES } from './PieChartIcon.component';
+
import PieChartButton, { decorateWithOverlay, wrapMouseEvent } from './PieChartButton.component';
+import { PIECHART_SIZES } from './PieChartIcon.component';
jest.mock('../OverlayTrigger/overlay', () => ({
getAdaptedPlacement: () => 'top',
diff --git a/packages/components/src/RadarChart/RadarChart.test.js b/packages/components/src/RadarChart/RadarChart.test.js
index e006db15ac..8d342ad93d 100644
--- a/packages/components/src/RadarChart/RadarChart.test.js
+++ b/packages/components/src/RadarChart/RadarChart.test.js
@@ -1,5 +1,6 @@
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import { RadarChart } from './RadarChart.component';
describe('RadarChart', () => {
diff --git a/packages/components/src/RatioBar/RatioBar.component.test.js b/packages/components/src/RatioBar/RatioBar.component.test.js
index 8cd70a7b34..fbf3a42b20 100644
--- a/packages/components/src/RatioBar/RatioBar.component.test.js
+++ b/packages/components/src/RatioBar/RatioBar.component.test.js
@@ -1,5 +1,6 @@
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import { RatioBar } from './RatioBar.component';
// as this is SVG we need to rely on custom selector
diff --git a/packages/components/src/RatioBar/RatioBarComposition.component.js b/packages/components/src/RatioBar/RatioBarComposition.component.js
index afee152b7e..9c4168f086 100644
--- a/packages/components/src/RatioBar/RatioBarComposition.component.js
+++ b/packages/components/src/RatioBar/RatioBarComposition.component.js
@@ -1,6 +1,9 @@
import PropTypes from 'prop-types';
+
import { Tooltip } from '@talend/design-system';
+
import { getTheme } from '../theme';
+
import ratioBarTheme from './RatioBar.module.scss';
const theme = getTheme(ratioBarTheme);
diff --git a/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.snap.test.js b/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.snap.test.js
index 3b06c2a728..1feac35faf 100644
--- a/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.snap.test.js
+++ b/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.snap.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import NameFilter from './NameFilter.component';
describe('NameFilter component snaps', () => {
diff --git a/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.test.js b/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.test.js
index f0e581d31e..173c304e47 100644
--- a/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.test.js
+++ b/packages/components/src/ResourceList/Toolbar/NameFilter/NameFilter.test.js
@@ -1,5 +1,6 @@
-import { screen, render, waitFor } from '@testing-library/react';
+import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import NameFilter from './NameFilter.component';
describe('NameFilter', () => {
diff --git a/packages/components/src/ResourceList/Toolbar/SortOptions/OrderChooser/OrderChooser.test.js b/packages/components/src/ResourceList/Toolbar/SortOptions/OrderChooser/OrderChooser.test.js
index 16a7bb2e27..dbca7f9311 100644
--- a/packages/components/src/ResourceList/Toolbar/SortOptions/OrderChooser/OrderChooser.test.js
+++ b/packages/components/src/ResourceList/Toolbar/SortOptions/OrderChooser/OrderChooser.test.js
@@ -1,4 +1,4 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import OrderChooser from './OrderChooser.component';
diff --git a/packages/components/src/ResourceList/Toolbar/SortOptions/SortOptions.test.js b/packages/components/src/ResourceList/Toolbar/SortOptions/SortOptions.test.js
index 4b9d312e58..fde906e6de 100644
--- a/packages/components/src/ResourceList/Toolbar/SortOptions/SortOptions.test.js
+++ b/packages/components/src/ResourceList/Toolbar/SortOptions/SortOptions.test.js
@@ -1,6 +1,7 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import SortOptions, { TYPES, ORDERS } from './SortOptions.component';
+
+import SortOptions, { ORDERS, TYPES } from './SortOptions.component';
describe('SortOptions', () => {
it('should render SortOptions in default mode', () => {
diff --git a/packages/components/src/ResourceList/Toolbar/StateFilter/StateFilter.test.js b/packages/components/src/ResourceList/Toolbar/StateFilter/StateFilter.test.js
index 5e9bbf5893..c4195e495b 100644
--- a/packages/components/src/ResourceList/Toolbar/StateFilter/StateFilter.test.js
+++ b/packages/components/src/ResourceList/Toolbar/StateFilter/StateFilter.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import StateFilter, { TYPES } from './StateFilter.component';
describe('StateFilter', () => {
diff --git a/packages/components/src/SidePanel/SidePanel.test.js b/packages/components/src/SidePanel/SidePanel.test.js
index f751c9a4d3..a25420338d 100644
--- a/packages/components/src/SidePanel/SidePanel.test.js
+++ b/packages/components/src/SidePanel/SidePanel.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import SidePanel from './SidePanel.component';
const onClick = jest.fn();
diff --git a/packages/components/src/TabBar/TabBar.component.js b/packages/components/src/TabBar/TabBar.component.js
index a3d1f6cfc6..a68765922a 100644
--- a/packages/components/src/TabBar/TabBar.component.js
+++ b/packages/components/src/TabBar/TabBar.component.js
@@ -1,19 +1,23 @@
/* eslint-disable react/jsx-no-bind */
+
/* eslint-disable react-hooks/exhaustive-deps */
+
/* eslint-disable react/no-find-dom-node */
-import { useState, useEffect, useRef } from 'react';
+import { useEffect, useRef, useState } from 'react';
import ReactDOM from 'react-dom';
-import PropTypes from 'prop-types';
-import get from 'lodash/get';
-import { Tab, Nav, NavItem } from '@talend/react-bootstrap';
-import debounce from 'lodash/debounce';
+
import classnames from 'classnames';
+import debounce from 'lodash/debounce';
+import get from 'lodash/get';
+import PropTypes from 'prop-types';
-import Tag from '../Tag';
+import { Nav, NavItem, Tab } from '@talend/react-bootstrap';
+
+import { ActionDropdown } from '../Actions';
import Icon from '../Icon';
-import TooltipTrigger from '../TooltipTrigger';
import OverlayTrigger from '../OverlayTrigger';
-import { ActionDropdown } from '../Actions';
+import Tag from '../Tag';
+import TooltipTrigger from '../TooltipTrigger';
import getTabBarBadgeLabel from '../utils/getTabBarBadgeLabel';
import theme from './TabBar.module.scss';
diff --git a/packages/components/src/TabBar/TabBar.test.js b/packages/components/src/TabBar/TabBar.test.js
index 1bddff3c46..2ad5574594 100644
--- a/packages/components/src/TabBar/TabBar.test.js
+++ b/packages/components/src/TabBar/TabBar.test.js
@@ -1,7 +1,8 @@
-import { render, screen, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import TabBar from './TabBar.component';
+
import { ActionButton } from '../Actions';
+import TabBar from './TabBar.component';
const tabProps = {
id: 'my-tabs',
diff --git a/packages/components/src/Toggle/LabelToggle/LabelToggleComponent.test.js b/packages/components/src/Toggle/LabelToggle/LabelToggleComponent.test.js
index ded5a6f5a4..b1cab946b2 100644
--- a/packages/components/src/Toggle/LabelToggle/LabelToggleComponent.test.js
+++ b/packages/components/src/Toggle/LabelToggle/LabelToggleComponent.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import LabelToggle from './LabelToggle.component';
describe('LabelToggle', () => {
diff --git a/packages/components/src/Toggle/Toggle.test.js b/packages/components/src/Toggle/Toggle.test.js
index 343b20d16e..e7388e48b5 100644
--- a/packages/components/src/Toggle/Toggle.test.js
+++ b/packages/components/src/Toggle/Toggle.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Toggle from './Toggle.component';
const defaultProps = {
diff --git a/packages/components/src/TooltipTrigger/TooltipTrigger.test.js b/packages/components/src/TooltipTrigger/TooltipTrigger.test.js
index 3f81e7419b..d6880f8dd1 100644
--- a/packages/components/src/TooltipTrigger/TooltipTrigger.test.js
+++ b/packages/components/src/TooltipTrigger/TooltipTrigger.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import TooltipTrigger from './TooltipTrigger.component';
describe('ActionTooltip', () => {
diff --git a/packages/components/src/TreeView/TreeViewItem/TreeViewItem.test.js b/packages/components/src/TreeView/TreeViewItem/TreeViewItem.test.js
index 2f336de248..5d07bbae18 100644
--- a/packages/components/src/TreeView/TreeViewItem/TreeViewItem.test.js
+++ b/packages/components/src/TreeView/TreeViewItem/TreeViewItem.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import TreeViewItem, { getItemIcon } from './TreeViewItem.component';
jest.unmock('@talend/design-system');
diff --git a/packages/components/src/Typeahead/Typeahead.component.js b/packages/components/src/Typeahead/Typeahead.component.js
index 1b11a179a5..1f14fa570b 100644
--- a/packages/components/src/Typeahead/Typeahead.component.js
+++ b/packages/components/src/Typeahead/Typeahead.component.js
@@ -1,20 +1,23 @@
-import PropTypes from 'prop-types';
import { useMemo, useState } from 'react';
-import classNames from 'classnames';
import Autowhatever from 'react-autowhatever';
import { useTranslation } from 'react-i18next';
import { usePopper } from 'react-popper';
+
+import classNames from 'classnames';
+import PropTypes from 'prop-types';
+
import { randomUUID } from '@talend/utils';
-import theme from './Typeahead.module.scss';
+import { Action } from '../Actions';
+import I18N_DOMAIN_COMPONENTS from '../constants';
import {
- renderItemsContainerFactory,
renderInputComponent,
- renderSectionTitle,
renderItem,
+ renderItemsContainerFactory,
+ renderSectionTitle,
} from './Typeahead.component.renderers';
-import { Action } from '../Actions';
-import I18N_DOMAIN_COMPONENTS from '../constants';
+
+import theme from './Typeahead.module.scss';
function getItems(items, dataFeature) {
if (!items) {
diff --git a/packages/components/src/Typeahead/Typeahead.test.js b/packages/components/src/Typeahead/Typeahead.test.js
index d793b9cbb3..a45c9e2d63 100644
--- a/packages/components/src/Typeahead/Typeahead.test.js
+++ b/packages/components/src/Typeahead/Typeahead.test.js
@@ -1,7 +1,8 @@
-import Typeahead from './Typeahead.component';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import Typeahead from './Typeahead.component';
+
function getHeaders() {
return document.querySelectorAll('.section-header');
}
diff --git a/packages/components/src/VirtualizedList/CellCheckbox/CellCheckbox.test.js b/packages/components/src/VirtualizedList/CellCheckbox/CellCheckbox.test.js
index 95a40fd1d6..ff57d360fd 100644
--- a/packages/components/src/VirtualizedList/CellCheckbox/CellCheckbox.test.js
+++ b/packages/components/src/VirtualizedList/CellCheckbox/CellCheckbox.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import CellCheckbox from './CellCheckbox.component';
const columnData = {
diff --git a/packages/components/src/VirtualizedList/CellTitle/CellTitleActions.test.js b/packages/components/src/VirtualizedList/CellTitle/CellTitleActions.test.js
index 81ebe6a5a9..d5e4e83990 100644
--- a/packages/components/src/VirtualizedList/CellTitle/CellTitleActions.test.js
+++ b/packages/components/src/VirtualizedList/CellTitle/CellTitleActions.test.js
@@ -1,8 +1,9 @@
/* eslint-disable @typescript-eslint/no-shadow */
-import { within, render, screen } from '@testing-library/react';
+import { render, screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { CellTitleActionsComponent } from './CellTitleActions.component';
+
import { cellTitleDisplayModes, listTypes } from '../utils/constants';
+import { CellTitleActionsComponent } from './CellTitleActions.component';
const { LARGE } = listTypes;
diff --git a/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.component.js b/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.component.js
index e7bef670a5..82889e7e03 100644
--- a/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.component.js
+++ b/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.component.js
@@ -1,5 +1,7 @@
-import PropTypes from 'prop-types';
import { Component } from 'react';
+
+import PropTypes from 'prop-types';
+
import theme from './CellTitle.module.scss';
/**
diff --git a/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.test.js b/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.test.js
index 292eb1e95e..89ecc2bb81 100644
--- a/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.test.js
+++ b/packages/components/src/VirtualizedList/CellTitle/CellTitleInput.test.js
@@ -1,5 +1,5 @@
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { screen, render } from '@testing-library/react';
import CellTitleInput from './CellTitleInput.component';
diff --git a/packages/components/src/VirtualizedList/CellTitle/CellTitleSelector.test.js b/packages/components/src/VirtualizedList/CellTitle/CellTitleSelector.test.js
index a8c6429632..d4513219d0 100644
--- a/packages/components/src/VirtualizedList/CellTitle/CellTitleSelector.test.js
+++ b/packages/components/src/VirtualizedList/CellTitle/CellTitleSelector.test.js
@@ -1,5 +1,5 @@
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { screen, render } from '@testing-library/react';
import { cellTitleDisplayModes } from '../utils/constants';
import CellTitleSelector from './CellTitleSelector.component';
diff --git a/packages/components/src/VirtualizedList/HeaderCheckbox/HeaderCheckbox.test.js b/packages/components/src/VirtualizedList/HeaderCheckbox/HeaderCheckbox.test.js
index f8c0d518d4..2e30298469 100644
--- a/packages/components/src/VirtualizedList/HeaderCheckbox/HeaderCheckbox.test.js
+++ b/packages/components/src/VirtualizedList/HeaderCheckbox/HeaderCheckbox.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import HeaderCheckbox from './HeaderCheckbox.component';
const items = [
diff --git a/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.js b/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.js
index d56220a659..917bf84c98 100644
--- a/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.js
+++ b/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.js
@@ -1,13 +1,16 @@
/* eslint-disable react/display-name */
import { Component } from 'react';
-import PropTypes from 'prop-types';
-import classNames from 'classnames';
import Draggable from 'react-draggable';
import { defaultTableHeaderRenderer } from 'react-virtualized';
-import { ConsumerVirtualizedList } from '../virtualizedListContext';
-import headerResizableCssModule from './HeaderResizable.module.scss';
+
+import classNames from 'classnames';
+import PropTypes from 'prop-types';
+
import { getTheme } from '../../theme';
import getDefaultT from '../../translate';
+import { ConsumerVirtualizedList } from '../virtualizedListContext';
+
+import headerResizableCssModule from './HeaderResizable.module.scss';
const theme = getTheme(headerResizableCssModule);
diff --git a/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.test.js b/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.test.js
index 22a103cae3..9c91c145a1 100644
--- a/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.test.js
+++ b/packages/components/src/VirtualizedList/HeaderResizable/HeaderResizable.component.test.js
@@ -1,7 +1,7 @@
-import { screen, render, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
-import { HeaderResizable } from './HeaderResizable.component';
import { virtualizedListContext } from '../virtualizedListContext';
+import { HeaderResizable } from './HeaderResizable.component';
describe('HeaderResizable', () => {
it('should render with no specific props', () => {
diff --git a/packages/components/src/VirtualizedList/event/rowclick.test.js b/packages/components/src/VirtualizedList/event/rowclick.test.js
index fa4de39cff..61cc1b7d81 100644
--- a/packages/components/src/VirtualizedList/event/rowclick.test.js
+++ b/packages/components/src/VirtualizedList/event/rowclick.test.js
@@ -1,4 +1,5 @@
import cases from 'jest-in-case';
+
import { decorateRowClick, decorateRowDoubleClick } from './rowclick';
describe('rowclick', () => {
diff --git a/packages/components/src/VirtualizedList/utils/gridrow.test.js b/packages/components/src/VirtualizedList/utils/gridrow.test.js
index 8ea78af4e1..29cf38a5c0 100644
--- a/packages/components/src/VirtualizedList/utils/gridrow.test.js
+++ b/packages/components/src/VirtualizedList/utils/gridrow.test.js
@@ -1,20 +1,21 @@
import { Children } from 'react';
-import CellTitle from '../CellTitle';
+
import VirtualizedList from '..';
+import CellTitle from '../CellTitle';
+import collection from '../collection';
+import { internalIds, listTypes } from './constants';
import {
+ extractSpecialFields,
+ getCellData,
getCellRenderer,
getCellType,
- getId,
getColumnData,
getDataKey,
+ getId,
getLabel,
getRowData,
- getCellData,
- extractSpecialFields,
renderCell,
} from './gridrow';
-import { internalIds, listTypes } from './constants';
-import collection from '../collection';
const { LARGE } = listTypes;
diff --git a/packages/components/src/wrap.test.tsx b/packages/components/src/wrap.test.tsx
index 0f3e1cfc69..2754f99d5c 100644
--- a/packages/components/src/wrap.test.tsx
+++ b/packages/components/src/wrap.test.tsx
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import wrap from './wrap';
describe('wrap', () => {
diff --git a/packages/containers/src/ActionButton/ActionButton.test.js b/packages/containers/src/ActionButton/ActionButton.test.js
index 89e4ea21bb..252647f3c6 100644
--- a/packages/containers/src/ActionButton/ActionButton.test.js
+++ b/packages/containers/src/ActionButton/ActionButton.test.js
@@ -1,11 +1,12 @@
-import { screen, render } from '@testing-library/react';
-import cmf, { mock } from '@talend/react-cmf';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import cmf, { mock } from '@talend/react-cmf';
+
import Connected, {
+ ContainerActionButton,
mapStateToProps,
mergeProps,
- ContainerActionButton,
} from './ActionButton.connect';
jest.unmock('@talend/design-system');
diff --git a/packages/containers/src/ActionIconToggle/ActionIconToggle.test.js b/packages/containers/src/ActionIconToggle/ActionIconToggle.test.js
index e8c0b473dc..234504df3f 100644
--- a/packages/containers/src/ActionIconToggle/ActionIconToggle.test.js
+++ b/packages/containers/src/ActionIconToggle/ActionIconToggle.test.js
@@ -1,5 +1,6 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import cmf, { mock } from '@talend/react-cmf';
import { ContainerActionIconToggle, mapStateToProps, mergeProps } from './ActionIconToggle.connect';
diff --git a/packages/containers/src/ComponentForm/ComponentForm.test.js b/packages/containers/src/ComponentForm/ComponentForm.test.js
index 244313f238..95b278c3b2 100644
--- a/packages/containers/src/ComponentForm/ComponentForm.test.js
+++ b/packages/containers/src/ComponentForm/ComponentForm.test.js
@@ -1,9 +1,10 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import { fromJS, Map } from 'immutable';
+
import cmf, { mock } from '@talend/react-cmf';
-import addSchemaMock from './ComponentForm.test.schema.json';
-import { toJS, resolveNameForTitleMap, TCompForm } from './ComponentForm.component';
+import { resolveNameForTitleMap, TCompForm, toJS } from './ComponentForm.component';
+import addSchemaMock from './ComponentForm.test.schema.json';
jest.unmock('@talend/design-system');
diff --git a/packages/containers/src/EditableText/EditableText.test.js b/packages/containers/src/EditableText/EditableText.test.js
index 31d6f6ccf4..464689f8da 100644
--- a/packages/containers/src/EditableText/EditableText.test.js
+++ b/packages/containers/src/EditableText/EditableText.test.js
@@ -1,9 +1,11 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import cmf, { mock } from '@talend/react-cmf';
import { Map } from 'immutable';
-import Container, { DISPLAY_NAME } from './EditableText.container';
+
+import cmf, { mock } from '@talend/react-cmf';
+
import Connect from './EditableText.connect';
+import Container, { DISPLAY_NAME } from './EditableText.container';
import { getEditMode } from './EditableText.selectors';
jest.unmock('@talend/design-system');
diff --git a/packages/containers/src/Form/Form.test.js b/packages/containers/src/Form/Form.test.js
index 68daabaa78..0718214dbf 100644
--- a/packages/containers/src/Form/Form.test.js
+++ b/packages/containers/src/Form/Form.test.js
@@ -1,8 +1,8 @@
import { render } from '@testing-library/react';
import { fromJS } from 'immutable';
-import Container from './Form.container';
import Connected from './Form.connect';
+import Container from './Form.container';
jest.unmock('@talend/design-system');
diff --git a/packages/containers/src/List/List.test.js b/packages/containers/src/List/List.test.js
index 0f105dcc8b..18c914feba 100644
--- a/packages/containers/src/List/List.test.js
+++ b/packages/containers/src/List/List.test.js
@@ -1,12 +1,15 @@
/* eslint-disable react/prop-types */
+
/* eslint-disable react/display-name */
-import { screen, render, fireEvent } from '@testing-library/react';
-import { Map, fromJS, List as ImmutableList } from 'immutable';
+import { fireEvent, render, screen } from '@testing-library/react';
+import { fromJS, List as ImmutableList, Map } from 'immutable';
import cloneDeep from 'lodash/cloneDeep';
+
// eslint-disable-next-line @talend/import-depth
import { prepareCMF } from '@talend/react-cmf/lib/mock/rtl';
-import Container, { DEFAULT_STATE } from './List.container';
+
import Connected, { mapStateToProps } from './List.connect';
+import Container, { DEFAULT_STATE } from './List.container';
const cmfModule = {
id: 'test',
diff --git a/packages/containers/src/ShortcutManager/ShortcutManager.container.js b/packages/containers/src/ShortcutManager/ShortcutManager.container.js
index ce2386d2e6..e23b3a80b1 100644
--- a/packages/containers/src/ShortcutManager/ShortcutManager.container.js
+++ b/packages/containers/src/ShortcutManager/ShortcutManager.container.js
@@ -1,5 +1,7 @@
import { Component } from 'react';
+
import keys from 'lodash/keys';
+
import { cmfConnect } from '@talend/react-cmf';
/**
diff --git a/packages/containers/src/ShortcutManager/ShortcutManager.test.js b/packages/containers/src/ShortcutManager/ShortcutManager.test.js
index 9f74c05c0a..2a9758541b 100644
--- a/packages/containers/src/ShortcutManager/ShortcutManager.test.js
+++ b/packages/containers/src/ShortcutManager/ShortcutManager.test.js
@@ -1,10 +1,11 @@
-import { Map } from 'immutable';
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import { Map } from 'immutable';
+
import { mock } from '@talend/react-cmf';
-import Container from './ShortcutManager.container';
import Connected from './ShortcutManager.connect';
+import Container from './ShortcutManager.container';
describe('Shortcut container', () => {
it('should render', () => {
diff --git a/packages/containers/src/Typeahead/Typeahead.container.js b/packages/containers/src/Typeahead/Typeahead.container.js
index 361e922b3e..a4428c5340 100644
--- a/packages/containers/src/Typeahead/Typeahead.container.js
+++ b/packages/containers/src/Typeahead/Typeahead.container.js
@@ -1,9 +1,11 @@
import { Component as RComponent } from 'react';
-import PropTypes from 'prop-types';
+
import Immutable from 'immutable';
+import omit from 'lodash/omit';
+import PropTypes from 'prop-types';
+
import { cmfConnect, componentState } from '@talend/react-cmf';
import Component from '@talend/react-components/lib/Typeahead';
-import omit from 'lodash/omit';
export const DISPLAY_NAME = 'Container(Typeahead)';
export const DEFAULT_STATE = new Immutable.Map({
diff --git a/packages/containers/src/Typeahead/Typeahead.test.js b/packages/containers/src/Typeahead/Typeahead.test.js
index 54581aa59b..1a73269b8e 100644
--- a/packages/containers/src/Typeahead/Typeahead.test.js
+++ b/packages/containers/src/Typeahead/Typeahead.test.js
@@ -1,7 +1,8 @@
-import { render, fireEvent } from '@testing-library/react';
+import { fireEvent, render } from '@testing-library/react';
import { Map } from 'immutable';
-import Container, { DEFAULT_STATE } from './Typeahead.container';
+
import Connect from './Typeahead.connect';
+import Container, { DEFAULT_STATE } from './Typeahead.container';
const defaultProps = {
id: 42,
diff --git a/packages/design-system/package.json b/packages/design-system/package.json
index 79eb42c01f..804bad4651 100644
--- a/packages/design-system/package.json
+++ b/packages/design-system/package.json
@@ -38,8 +38,9 @@
"@talend/utils": "^2.8.0",
"classnames": "^2.3.2",
"modern-css-reset": "^1.4.0",
- "react-use": "^17.4.0",
"react-transition-group": "^2.9.0",
+ "react-use": "^17.4.0",
+ "react-virtualized": "^9.22.5",
"typeface-inconsolata": "^1.1.13",
"typeface-source-sans-pro": "^1.1.13"
},
@@ -72,12 +73,14 @@
"@talend/scripts-config-typescript": "^11.2.0",
"@talend/storybook-docs": "^2.2.0",
"@testing-library/cypress": "^10.0.1",
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/classnames": "^2.3.1",
"@types/jest-axe": "^3.5.8",
"@types/react-is": "^18.2.4",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@types/react-transition-group": "^2.9.2",
+ "@types/react-virtualized": "^9.21.26",
"browser-sync": "^2.29.3",
"browser-sync-webpack-plugin": "^2.3.0",
"concurrently": "^7.6.0",
diff --git a/packages/design-system/src/components/Enumeration/Enumeration.component.tsx b/packages/design-system/src/components/Enumeration/Enumeration.component.tsx
new file mode 100644
index 0000000000..b575bfe704
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/Enumeration.component.tsx
@@ -0,0 +1,173 @@
+import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { AutoSizer, InfiniteLoader, List } from 'react-virtualized';
+
+import { I18N_DOMAIN_DESIGN_SYSTEM } from '../constants';
+import { EmptyState } from '../EmptyState';
+import { StackHorizontal } from '../Stack';
+import { EnumerationMode, EnumerationProps, UiEnumerationItem } from './Enumeration.types';
+import { EnumerationHeader } from './EnumerationHeader/EnumerationHeader.component';
+import { EnumerationItem } from './EnumerationItem/EnumerationItem.component';
+
+import styles from './Enumeration.module.scss';
+
+const ENUMERATION_ITEM_HEIGHT = 38;
+
+export const Enumeration = ({
+ id,
+ items,
+ loadMoreRows,
+ onCreate,
+ onChange,
+ onEdit,
+ onImport,
+ onRemove,
+ title,
+}: EnumerationProps) => {
+ const { t } = useTranslation(I18N_DOMAIN_DESIGN_SYSTEM);
+
+ const [mode, setMode] = useState(EnumerationMode.VIEW);
+ const [selectedItems, setSelectedItems] = useState
([]);
+ const [filteredItems, setFilteredItems] = useState(items);
+ const [scrollToIndex, setScrollToIndex] = useState();
+ const [uiItems, setUiItems] = useState(
+ filteredItems.map(item => ({
+ value: item,
+ isToAnimate: false,
+ })),
+ );
+
+ const setIsToAnimate = (itemsToAnimate: string[], isToAnimate: boolean) => {
+ const newItems = [...uiItems];
+
+ itemsToAnimate.forEach(itemToAnimate => {
+ const indextToUpdate = newItems.findIndex(item => item.value === itemToAnimate);
+
+ if (indextToUpdate < 0) {
+ newItems.unshift({
+ value: itemToAnimate,
+ isToAnimate,
+ });
+ } else {
+ newItems[indextToUpdate].isToAnimate = isToAnimate;
+ }
+ });
+
+ setUiItems(newItems);
+ };
+
+ const onAnimate = (newItems: string[]) => {
+ setScrollToIndex(0);
+ setIsToAnimate(newItems, true);
+ setTimeout(() => {
+ setIsToAnimate(newItems, false);
+ setScrollToIndex(undefined);
+ }, 2500);
+ };
+
+ const handleOnCreate = async (newItem: string) => {
+ try {
+ if (newItem) {
+ await onCreate?.(newItem);
+ onChange([newItem, ...items]);
+ onAnimate([newItem]);
+ }
+ } catch (e) {
+ //The parent component must do the error handling
+ }
+ };
+
+ const handleOnEdit = async (value: string, index: number) => {
+ try {
+ const indexToReplace = items.indexOf(filteredItems[index]);
+
+ if (indexToReplace !== -1) {
+ const newItems = [...items];
+ newItems[indexToReplace] = value;
+ onChange(newItems);
+ await onEdit?.(value);
+ }
+ } catch (e) {
+ //The parent component must do the error handling
+ }
+ };
+
+ const handleOnRemove = async (itemsToRemove: string[]) => {
+ try {
+ await onRemove?.(itemsToRemove);
+ onChange(items.filter(item => !itemsToRemove.includes(item)));
+ } catch (e) {
+ //The parent component must do the error handling
+ }
+ };
+
+ return (
+
+
{
+ const newItems = data.split('\n').filter(Boolean);
+ onImport?.(newItems);
+ onAnimate(newItems);
+ }}
+ onRemove={handleOnRemove}
+ selectedItems={selectedItems}
+ setFilteredItems={setFilteredItems}
+ setMode={setMode}
+ setSelectedItems={setSelectedItems}
+ title={title}
+ />
+
+ {loadMoreRows && filteredItems.length ? (
+ !!filteredItems[index]}
+ loadMoreRows={loadMoreRows}
+ rowCount={filteredItems.length}
+ >
+ {({ onRowsRendered, registerChild }) => (
+
+ {({ width }) => (
+ (
+
+ handleOnEdit(value, index)}
+ onRemove={handleOnRemove}
+ selectedItems={selectedItems}
+ setSelectedItems={setSelectedItems}
+ value={filteredItems[index]}
+ />
+
+ )}
+ width={width}
+ />
+ )}
+
+ )}
+
+ ) : (
+
+
+
+ )}
+
+ );
+};
diff --git a/packages/design-system/src/components/Enumeration/Enumeration.module.scss b/packages/design-system/src/components/Enumeration/Enumeration.module.scss
new file mode 100644
index 0000000000..831d7e3e44
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/Enumeration.module.scss
@@ -0,0 +1,25 @@
+@use '~@talend/design-tokens/lib/tokens';
+
+.enumeration {
+ border: tokens.$coral-border-s-solid tokens.$coral-color-neutral-border;
+ border-radius: tokens.$coral-radius-m;
+ min-width: 300px;
+ max-width: 100%;
+ overflow: hidden;
+ width: fit-content;
+
+ ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+
+ h4,
+ p,
+ label {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ padding-right: tokens.$coral-spacing-xxs;
+ }
+}
diff --git a/packages/design-system/src/components/Enumeration/Enumeration.types.tsx b/packages/design-system/src/components/Enumeration/Enumeration.types.tsx
new file mode 100644
index 0000000000..10e3e8338d
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/Enumeration.types.tsx
@@ -0,0 +1,22 @@
+export interface EnumerationProps {
+ id: string;
+ items: string[];
+ loadMoreRows?: (params: { startIndex: number; stopIndex: number }) => Promise;
+ onChange: (items: string[]) => void;
+ onCreate?: (value: string) => Promise;
+ onEdit?: (value: string) => Promise;
+ onImport?: (data: string[]) => void;
+ onRemove?: (entries: string[]) => Promise;
+ title: string;
+}
+
+export interface UiEnumerationItem {
+ value: string;
+ isToAnimate: boolean;
+}
+
+export enum EnumerationMode {
+ CREATE = 'create',
+ EDIT = 'edit',
+ VIEW = 'view',
+}
diff --git a/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationHeader.component.tsx b/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationHeader.component.tsx
new file mode 100644
index 0000000000..a7e7dd9813
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationHeader.component.tsx
@@ -0,0 +1,183 @@
+import { useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { ButtonDestructive } from '../../Button';
+import { ButtonIcon, ButtonIconToggle } from '../../ButtonIcon';
+import { I18N_DOMAIN_DESIGN_SYSTEM } from '../../constants';
+import { Form } from '../../Form';
+import { InlineEditing } from '../../InlineEditing';
+import { InlineMessageDestructive } from '../../InlineMessage';
+import { StackHorizontal, StackVertical } from '../../Stack';
+import { EnumerationMode } from '../Enumeration.types';
+import { EnumerationHeaderProps } from './EnumerationIHeader.types';
+
+import styles from './EnumerationHeader.module.scss';
+
+export const EnumerationHeader = ({
+ filteredItems,
+ id,
+ items,
+ mode,
+ onCreate,
+ onImport,
+ onRemove,
+ setFilteredItems,
+ setMode,
+ selectedItems,
+ setSelectedItems,
+ title,
+}: EnumerationHeaderProps) => {
+ const { t } = useTranslation(I18N_DOMAIN_DESIGN_SYSTEM);
+ const importRef = useRef(null);
+ const [searchValue, setSearchValue] = useState();
+ const [hasError, setHasError] = useState(false);
+
+ const isAllChecked = () => selectedItems.length > 0 || selectedItems.length === items.length;
+
+ const onToggleAll = (isChecked: boolean) => setSelectedItems(isChecked ? items : []);
+
+ useEffect(() => {
+ if (searchValue) {
+ setFilteredItems(items.filter(item => item.includes(searchValue)));
+ } else {
+ setFilteredItems(items);
+ }
+ }, [searchValue, items]);
+
+ return (
+
+
+
{title}
+
+ {selectedItems.length ? (
+ {
+ onRemove(selectedItems);
+ setSelectedItems([]);
+ setMode(EnumerationMode.VIEW);
+ }}
+ >
+ {t('ENUMERATION_REMOVE_BUTTON', {
+ count: selectedItems.length,
+ defaultValue: 'Remove ({{count}})',
+ })}
+
+ ) : (
+
+
+ {
+ setSearchValue(undefined);
+ setFilteredItems(items);
+ setMode(
+ mode === EnumerationMode.CREATE ? EnumerationMode.VIEW : EnumerationMode.CREATE,
+ );
+ }}
+ size="S"
+ >
+ {t('ENUMERATION_ADD_ACTION', 'Add item')}
+
+
+
+ {
+ setMode(
+ mode === EnumerationMode.EDIT ? EnumerationMode.VIEW : EnumerationMode.EDIT,
+ );
+ }}
+ size="S"
+ >
+ {t('ENUMERATION_EDIT_ACTION', 'Edit item')}
+
+
+ {onImport && (
+
+ {
+ const fr = new FileReader();
+ const file = e.target.files?.[0];
+
+ if (file) {
+ try {
+ fr.readAsText(file);
+ fr.onload = () => onImport(fr.result as string);
+ } catch (error) {
+ //The parent component must do the error handling
+ }
+ }
+ }}
+ />
+ importRef.current?.click()}
+ size="S"
+ disabled={![EnumerationMode.VIEW].includes(mode)}
+ >
+ {t('ENUMERATION_IMPORT_ACTION', 'Import items')}
+
+
+ )}
+
+ )}
+
+
+ {mode === EnumerationMode.CREATE ? (
+
+ {
+ if (value) {
+ onCreate(value);
+ setMode(EnumerationMode.VIEW);
+ }
+
+ setHasError(!value);
+ }}
+ onCancel={() => {
+ setMode(EnumerationMode.VIEW);
+ }}
+ hasError={hasError}
+ />
+
+ {hasError && (
+
+ )}
+
+ ) : (
+
setSearchValue(e.target.value)}
+ placeholder="Search"
+ />
+ )}
+
+ {mode === EnumerationMode.EDIT && (
+ onToggleAll(e.target.checked)}
+ checked={isAllChecked()}
+ indeterminate={selectedItems.length > 0}
+ />
+ )}
+
+ );
+};
diff --git a/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationHeader.module.scss b/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationHeader.module.scss
new file mode 100644
index 0000000000..da02bad011
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationHeader.module.scss
@@ -0,0 +1,28 @@
+@use '~@talend/design-tokens/lib/tokens';
+
+.enumeration {
+ &__header {
+ border-bottom: tokens.$coral-border-s-solid tokens.$coral-color-neutral-border;
+ display: flex;
+ flex-direction: column;
+ padding: tokens.$coral-spacing-s;
+ gap: tokens.$coral-spacing-s;
+
+ h4 {
+ font: tokens.$coral-heading-m;
+ }
+
+ [type='file'] {
+ display: none;
+ }
+ }
+
+ &__title {
+ align-items: center;
+ display: flex;
+
+ > button {
+ margin-left: auto;
+ }
+ }
+}
diff --git a/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationIHeader.types.tsx b/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationIHeader.types.tsx
new file mode 100644
index 0000000000..097bf729c2
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/EnumerationHeader/EnumerationIHeader.types.tsx
@@ -0,0 +1,16 @@
+import { EnumerationMode } from '../Enumeration.types';
+
+export interface EnumerationHeaderProps {
+ filteredItems: string[];
+ id: string;
+ items: string[];
+ mode: EnumerationMode;
+ onCreate: (value: string) => Promise;
+ onImport?: (data: string) => void;
+ onRemove: (entries: string[]) => Promise;
+ selectedItems: string[];
+ setFilteredItems: (filteredItems: string[]) => void;
+ setMode: (mode: EnumerationMode) => void;
+ setSelectedItems: (selectedItems: string[]) => void;
+ title: string;
+}
diff --git a/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.component.tsx b/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.component.tsx
new file mode 100644
index 0000000000..6b5ebf23ec
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.component.tsx
@@ -0,0 +1,104 @@
+import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import classNames from 'classnames';
+
+import { useId } from '../../../useId';
+import { ButtonIcon } from '../../ButtonIcon';
+import { I18N_DOMAIN_DESIGN_SYSTEM } from '../../constants';
+import { Dropdown } from '../../Dropdown';
+import { Form } from '../../Form';
+import { InlineEditing } from '../../InlineEditing';
+import { Skeleton } from '../../Skeleton';
+import { EnumerationMode } from '../Enumeration.types';
+import { EnumerationItemProps } from './EnumerationItem.types';
+
+import styles from './EnumerationItem.module.scss';
+
+export const EnumerationItem = ({
+ isToAnimate,
+ mode,
+ onEdit,
+ onRemove,
+ selectedItems,
+ setSelectedItems,
+ value,
+}: EnumerationItemProps) => {
+ const { t } = useTranslation(I18N_DOMAIN_DESIGN_SYSTEM);
+ const id = useId();
+ const [isEdit, setIsEdit] = useState(false);
+
+ const isChecked = (itemId: string) => selectedItems.includes(itemId);
+
+ const onToggleItem = (itemValue: string, isItemChecked: boolean) => {
+ setSelectedItems(
+ isItemChecked
+ ? [...selectedItems, itemValue]
+ : selectedItems.filter(item => item !== itemValue),
+ );
+ };
+
+ return (
+
+ {isEdit ? (
+
setIsEdit(false)}
+ onEdit={(_, newValue) => {
+ onEdit(newValue);
+ setIsEdit(false);
+ }}
+ placeholder={value}
+ />
+ ) : value ? (
+ <>
+ {mode === EnumerationMode.EDIT ? (
+ onToggleItem(value, e.target.checked)}
+ />
+ ) : (
+ {value}
+ )}
+ setIsEdit(true),
+ type: 'button',
+ },
+ {
+ label: t('ENUMERATION_DROPDOWN_REMOVE', 'Remove'),
+ icon: 'trash',
+ onClick: () => onRemove?.([value]),
+ type: 'button',
+ },
+ ]}
+ >
+ {}}
+ size="S"
+ disabled={[EnumerationMode.CREATE, EnumerationMode.EDIT].includes(mode)}
+ >
+ {t('ENUMERATION_DROPDOWN_OPTIONS', 'Dropdown options')}
+
+
+ >
+ ) : (
+
+ )}
+
+ );
+};
diff --git a/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.module.scss b/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.module.scss
new file mode 100644
index 0000000000..61b413d308
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.module.scss
@@ -0,0 +1,41 @@
+@use '~@talend/design-tokens/lib/tokens';
+
+.enumeration__item {
+ align-items: center;
+ background-color: tokens.$coral-color-neutral-background;
+ display: flex;
+ height: 38px;
+ justify-content: space-between;
+ padding: tokens.$coral-spacing-xxs tokens.$coral-spacing-xs tokens.$coral-spacing-xxs tokens.$coral-spacing-s;
+ transition: background-color tokens.$coral-transition-fast;
+
+ &:hover {
+ background-color: tokens.$coral-color-neutral-background-medium;
+ }
+
+ > :first-child {
+ width: 100%;
+
+ label {
+ flex: 1;
+ }
+ }
+
+ &--edit {
+ padding: 0 tokens.$coral-spacing-xxs;
+ }
+
+ &--animate {
+ animation: highlight 1500ms both 100ms;
+ }
+}
+
+@keyframes highlight {
+ 0% {
+ background-color: tokens.$coral-color-neutral-background;
+ }
+
+ 75% {
+ background-color: tokens.$coral-color-accent-background;
+ }
+}
diff --git a/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.types.tsx b/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.types.tsx
new file mode 100644
index 0000000000..c59a5c1b89
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/EnumerationItem/EnumerationItem.types.tsx
@@ -0,0 +1,11 @@
+import { EnumerationMode } from '../Enumeration.types';
+
+export interface EnumerationItemProps {
+ isToAnimate: boolean;
+ mode: EnumerationMode;
+ onEdit: (value: string) => void;
+ onRemove?: (values: string[]) => void;
+ selectedItems: string[];
+ setSelectedItems: (selectedItems: string[]) => void;
+ value: string;
+}
diff --git a/packages/design-system/src/components/Enumeration/index.ts b/packages/design-system/src/components/Enumeration/index.ts
new file mode 100644
index 0000000000..e2795afedc
--- /dev/null
+++ b/packages/design-system/src/components/Enumeration/index.ts
@@ -0,0 +1 @@
+export { Enumeration } from './Enumeration.component';
diff --git a/packages/design-system/src/components/InlineEditing/InlineEditing.test.tsx b/packages/design-system/src/components/InlineEditing/InlineEditing.test.tsx
index b89d2bff29..17258a4054 100644
--- a/packages/design-system/src/components/InlineEditing/InlineEditing.test.tsx
+++ b/packages/design-system/src/components/InlineEditing/InlineEditing.test.tsx
@@ -1,7 +1,8 @@
/* eslint-disable import/no-extraneous-dependencies */
-import { describe, it, expect } from '@jest/globals';
-import { axe } from 'jest-axe';
+import { describe, expect, it } from '@jest/globals';
import { fireEvent, render, screen } from '@testing-library/react';
+import { axe } from 'jest-axe';
+
import { InlineEditing } from './';
jest.mock('@talend/utils', () => {
diff --git a/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx b/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx
index fc7e688940..6f3c2ee0a0 100644
--- a/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx
+++ b/packages/design-system/src/components/InlineEditing/Primitives/InlineEditingPrimitive.tsx
@@ -1,23 +1,23 @@
import { cloneElement, forwardRef, useEffect, useState } from 'react';
import type {
- MouseEvent,
+ ChangeEvent,
+ ElementType,
FormEvent,
- KeyboardEvent as RKeyboardEvent,
+ HTMLAttributes,
+ MouseEvent,
ReactElement,
Ref,
- HTMLAttributes,
- ElementType,
- ChangeEvent,
+ KeyboardEvent as RKeyboardEvent,
} from 'react';
import { useTranslation } from 'react-i18next';
import classnames from 'classnames';
+import { useId } from '../../../useId';
import { ButtonIcon } from '../../ButtonIcon';
+import { I18N_DOMAIN_DESIGN_SYSTEM } from '../../constants';
import { Form } from '../../Form';
import { StackHorizontal } from '../../Stack';
-import { I18N_DOMAIN_DESIGN_SYSTEM } from '../../constants';
-import { useId } from '../../../useId';
import styles from './InlineEditingPrimitive.module.scss';
@@ -38,6 +38,7 @@ export type OnEditEvent =
| RKeyboardEvent;
export type InlineEditingPrimitiveProps = {
+ isEditMode?: boolean;
loading?: boolean;
onCancel?: () => void;
onToggle?: (isEditionMode: boolean) => void;
@@ -80,6 +81,7 @@ export type InlineEditingPrimitiveProps = {
const InlineEditingPrimitive = forwardRef(
(props: InlineEditingPrimitiveProps, ref: Ref) => {
const {
+ isEditMode = false,
loading,
ariaLabel,
mode,
@@ -101,7 +103,7 @@ const InlineEditingPrimitive = forwardRef(
const { t } = useTranslation(I18N_DOMAIN_DESIGN_SYSTEM);
- const [isEditing, setEditing] = useState(false);
+ const [isEditing, setEditing] = useState(isEditMode);
const [internalValue, setInternalValue] = useState(defaultValue);
const inlineEditingId = useId(rest.id, 'inline-edit-');
@@ -132,7 +134,9 @@ const InlineEditingPrimitive = forwardRef(
onEdit(event, getValue() || '');
}
- toggleEditionMode(false);
+ if (!hasError) {
+ toggleEditionMode(false);
+ }
};
const handleCancel = () => {
diff --git a/packages/design-system/src/index.ts b/packages/design-system/src/index.ts
index 4b2296ae14..2410b07df7 100644
--- a/packages/design-system/src/index.ts
+++ b/packages/design-system/src/index.ts
@@ -10,6 +10,7 @@ export * from './components/Combobox';
export * from './components/Divider';
export * from './components/Dropdown';
export * from './components/EmptyState';
+export * from './components/Enumeration';
export * from './components/ErrorState';
export * from './components/Form';
export * from './components/Form/Affix';
diff --git a/packages/design-system/src/stories/form/Enumeration/Enumeration.mdx b/packages/design-system/src/stories/form/Enumeration/Enumeration.mdx
new file mode 100644
index 0000000000..52cce77e2c
--- /dev/null
+++ b/packages/design-system/src/stories/form/Enumeration/Enumeration.mdx
@@ -0,0 +1,52 @@
+import { Canvas, Controls, Meta, Story } from '@storybook/blocks';
+
+import * as Stories from './Enumeration.stories';
+import { Status } from '../../Status.block';
+
+
+
+
+# Enumeration
+
+Lazy loading list that allows to create, edit and remove items from it.
+
+## Variations
+
+
+
+
+
+## Usage
+
+The component is split into two parts, the _header_ and the _body_.
+
+### Header
+
+The header has a `title` and the 3 different actions:
+
+1. Create: `onCreate` - optional parameter.
+2. Edit: Triggers edit mode on the body part of the component, which allows for items to be selected. When items are selected, a "Remove" button appears, which triggers the `onRemove` callback when clicked.
+3. Import: `onImport` - optional parameter. If not passed, the action will not appear.
+
+All actions (create, edit and remove) call the `onChange` callback.
+
+The search feature only filters the items already rendered. Since its a lazy loading list, if the items are not rendered they will not be included on the search.
+
+### Body
+
+The part of the component where the lazy loading list is present from the `items` parameter. To load more items, the `loadMoreRows` callback must be passed to the component, with _startIndex_ and _stopIndex_ parameters.
+
+```tsx
+ {
+ ...
+ }}
+/>
+```
+
+Each item can be editted or removed individually.
diff --git a/packages/design-system/src/stories/form/Enumeration/Enumeration.stories.tsx b/packages/design-system/src/stories/form/Enumeration/Enumeration.stories.tsx
new file mode 100644
index 0000000000..9bdd464078
--- /dev/null
+++ b/packages/design-system/src/stories/form/Enumeration/Enumeration.stories.tsx
@@ -0,0 +1,49 @@
+import { useState } from 'react';
+
+import { Enumeration } from '../../../components/Enumeration';
+
+export default {
+ component: Enumeration,
+ title: 'Form/Enumeration',
+};
+
+const getItems = (numItems: number, totalItems: number) => {
+ const itemsToAdd = [];
+
+ for (let i = 0; i < totalItems; i++) {
+ if (i <= numItems) {
+ itemsToAdd.push(`Item ${i + 1}`);
+ } else {
+ itemsToAdd.push('');
+ }
+ }
+
+ return itemsToAdd;
+};
+export const Default = () => {
+ const [items, setItems] = useState([...getItems(100, 500)]);
+
+ return (
+
+ new Promise(resolve => {
+ setItems([...getItems(stopIndex, 500)]);
+ resolve();
+ })
+ }
+ onChange={setItems}
+ onImport={(data: string[]) => {
+ setItems([...data, ...items]);
+ }}
+ title="This is a title"
+ />
+ );
+};
+
+export const Empty = () => {
+ const [items, setItems] = useState([]);
+
+ return ;
+};
diff --git a/packages/design-system/src/stories/form/InlineEditing.stories.tsx b/packages/design-system/src/stories/form/InlineEditing.stories.tsx
index a133e99b6b..ee093ceb11 100644
--- a/packages/design-system/src/stories/form/InlineEditing.stories.tsx
+++ b/packages/design-system/src/stories/form/InlineEditing.stories.tsx
@@ -142,6 +142,18 @@ export const LoadingMode = {
),
};
+export const EditionMode = {
+ render: (props: Story) => (
+
+ ),
+};
+
export const InUse = (props: Story) => {
const [data, setData] = useState('this is a default value');
const [error, setError] = useState(false);
diff --git a/packages/design-system/src/stories/status.json b/packages/design-system/src/stories/status.json
index f8ba19dbb5..ad18832d27 100644
--- a/packages/design-system/src/stories/status.json
+++ b/packages/design-system/src/stories/status.json
@@ -465,6 +465,15 @@
},
"i18n": { "status": "na" }
},
+ "formEnumeration": {
+ "figma": { "status": "ok" },
+ "storybook": { "status": "ok" },
+ "react": {
+ "status": "wip",
+ "link": "https://github.com/Talend/ui/blob/master/packages/design-system/src/components/Enumeration/Enumeration.component.tsx"
+ },
+ "i18n": { "status": "na" }
+ },
"formFieldset": {
"figma": {
"status": "ok",
diff --git a/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.js b/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.js
index 17b2aee22a..c1dac551b0 100644
--- a/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.js
+++ b/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.js
@@ -1,13 +1,15 @@
/* eslint-disable jsx-a11y/no-autofocus */
import { useState } from 'react';
+
import PropTypes from 'prop-types';
-import { FormControl } from '@talend/react-bootstrap';
import { ButtonIcon, Icon } from '@talend/design-system';
+import { FormControl } from '@talend/react-bootstrap';
import { getTheme } from '@talend/react-components/lib/theme';
-import { useFacetedSearchContext } from '../context/facetedSearch.context';
import { USAGE_TRACKING_TAGS } from '../../constants';
+import { useFacetedSearchContext } from '../context/facetedSearch.context';
+
import theme from './AdvancedSearch.module.scss';
const css = getTheme(theme);
diff --git a/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.test.js b/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.test.js
index 319e331c18..c8388a3e12 100644
--- a/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.test.js
+++ b/packages/faceted-search/src/components/AdvancedSearch/AdvancedSearch.component.test.js
@@ -1,4 +1,4 @@
-import { screen, render, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import { FacetedManager } from '../FacetedManager';
import { AdvancedSearch } from './AdvancedSearch.component';
diff --git a/packages/faceted-search/src/components/Badges/BadgeCheckboxes/BadgeCheckboxesForm.component.test.js b/packages/faceted-search/src/components/Badges/BadgeCheckboxes/BadgeCheckboxesForm.component.test.js
index 33da8e3eb0..4a3ef419bb 100644
--- a/packages/faceted-search/src/components/Badges/BadgeCheckboxes/BadgeCheckboxesForm.component.test.js
+++ b/packages/faceted-search/src/components/Badges/BadgeCheckboxes/BadgeCheckboxesForm.component.test.js
@@ -1,8 +1,8 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { BadgeCheckboxesForm } from './BadgeCheckboxesForm.component';
import getDefaultT from '../../../translate';
+import { BadgeCheckboxesForm } from './BadgeCheckboxesForm.component';
const checkboxValues = [
{
diff --git a/packages/faceted-search/src/components/Badges/BadgeMenu/BadgeMenuForm.component.test.js b/packages/faceted-search/src/components/Badges/BadgeMenu/BadgeMenuForm.component.test.js
index a45aaca6b4..9597262e9c 100644
--- a/packages/faceted-search/src/components/Badges/BadgeMenu/BadgeMenuForm.component.test.js
+++ b/packages/faceted-search/src/components/Badges/BadgeMenu/BadgeMenuForm.component.test.js
@@ -1,8 +1,8 @@
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { BadgeMenuForm } from './BadgeMenuForm.component';
import getDefaultT from '../../../translate';
+import { BadgeMenuForm } from './BadgeMenuForm.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/UIForm.container.test.js b/packages/forms/src/UIForm/UIForm.container.test.js
index b846c69e31..11e5392e9f 100644
--- a/packages/forms/src/UIForm/UIForm.container.test.js
+++ b/packages/forms/src/UIForm/UIForm.container.test.js
@@ -1,4 +1,4 @@
-import { render, screen, fireEvent, queryByAttribute, waitFor } from '@testing-library/react';
+import { fireEvent, queryByAttribute, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { actions, getMockData, getMockNestedData, initProps } from '../../__mocks__/data';
diff --git a/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js b/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js
index a8c0224d69..facd00ac91 100644
--- a/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js
+++ b/packages/forms/src/UIForm/fields/Datalist/Datalist.component.test.js
@@ -1,5 +1,5 @@
/* eslint-disable testing-library/no-unnecessary-act */
-import { render, screen, fireEvent, act } from '@testing-library/react';
+import { act, fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Datalist from './Datalist.component';
diff --git a/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js b/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js
index 5ad864f39e..e566ce9ff5 100644
--- a/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js
+++ b/packages/forms/src/UIForm/fields/Datalist/displayMode/TextMode.component.test.js
@@ -1,4 +1,5 @@
import { render, screen } from '@testing-library/react';
+
import DatalistTextMode from './TextMode.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/Date/Date.component.test.js b/packages/forms/src/UIForm/fields/Date/Date.component.test.js
index e40f1ba878..adc7d8131a 100644
--- a/packages/forms/src/UIForm/fields/Date/Date.component.test.js
+++ b/packages/forms/src/UIForm/fields/Date/Date.component.test.js
@@ -1,4 +1,5 @@
-import { act, render, screen, fireEvent } from '@testing-library/react';
+import { act, fireEvent, render, screen } from '@testing-library/react';
+
import DateWidget from './Date.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js b/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js
index f81eee3201..1d666e8cdf 100644
--- a/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js
+++ b/packages/forms/src/UIForm/fields/Date/DateTime.component.test.js
@@ -1,4 +1,5 @@
-import { act, render, screen, fireEvent } from '@testing-library/react';
+import { act, fireEvent, render, screen } from '@testing-library/react';
+
import DateTimeWidget from './DateTime.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/Date/Time.component.test.js b/packages/forms/src/UIForm/fields/Date/Time.component.test.js
index 17725e0487..7adb43ace4 100644
--- a/packages/forms/src/UIForm/fields/Date/Time.component.test.js
+++ b/packages/forms/src/UIForm/fields/Date/Time.component.test.js
@@ -1,4 +1,5 @@
-import { act, render, screen, fireEvent } from '@testing-library/react';
+import { act, fireEvent, render, screen } from '@testing-library/react';
+
import TimeWidget from './Time.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.js b/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.js
index 5fe53937e0..254207b7da 100644
--- a/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.js
+++ b/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.js
@@ -1,16 +1,18 @@
-import PropTypes from 'prop-types';
import { Component } from 'react';
+import { withTranslation } from 'react-i18next';
+
+import classNames from 'classnames';
import _isEmpty from 'lodash/isEmpty';
+import PropTypes from 'prop-types';
+
import Enumeration from '@talend/react-components/lib/Enumeration';
-import classNames from 'classnames';
-import { withTranslation } from 'react-i18next';
import FocusManager from '@talend/react-components/lib/FocusManager';
-import { manageCtrlKey, manageShiftKey, deleteSelectedItems, resetItems } from './utils/utils';
import { I18N_DOMAIN_FORMS } from '../../../constants';
import getDefaultT from '../../../translate';
-import FieldTemplate from '../FieldTemplate';
import { generateDescriptionId, generateErrorId } from '../../Message';
+import FieldTemplate from '../FieldTemplate';
+import { deleteSelectedItems, manageCtrlKey, manageShiftKey, resetItems } from './utils/utils';
export const enumerationStates = {
DISPLAY_MODE_DEFAULT: 'DISPLAY_MODE_DEFAULT',
diff --git a/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js b/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js
index 0942567478..c9b495ad28 100644
--- a/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js
+++ b/packages/forms/src/UIForm/fields/Enumeration/EnumerationWidget.test.js
@@ -1,5 +1,6 @@
-import { render, screen, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import EnumerationWidget from './EnumerationWidget';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/ListView/ListView.component.js b/packages/forms/src/UIForm/fields/ListView/ListView.component.js
index 9c660c55b9..0b44adb795 100644
--- a/packages/forms/src/UIForm/fields/ListView/ListView.component.js
+++ b/packages/forms/src/UIForm/fields/ListView/ListView.component.js
@@ -1,13 +1,15 @@
-import PropTypes from 'prop-types';
import { Component } from 'react';
-import ListView from '@talend/react-components/lib/ListView';
import { withTranslation } from 'react-i18next';
+import PropTypes from 'prop-types';
+
+import ListView from '@talend/react-components/lib/ListView';
+
import { I18N_DOMAIN_FORMS } from '../../../constants';
import getDefaultT from '../../../translate';
-import { getItemsProps, initItems, updateItems } from './ListView.utils';
-import FieldTemplate from '../FieldTemplate';
import { generateDescriptionId, generateErrorId } from '../../Message/generateId';
+import FieldTemplate from '../FieldTemplate';
+import { getItemsProps, initItems, updateItems } from './ListView.utils';
const DISPLAY_MODE_DEFAULT = 'DISPLAY_MODE_DEFAULT';
const DISPLAY_MODE_SEARCH = 'DISPLAY_MODE_SEARCH';
diff --git a/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js b/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js
index ec1137945e..e045195828 100644
--- a/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js
+++ b/packages/forms/src/UIForm/fields/ListView/ListView.component.test.js
@@ -1,4 +1,4 @@
-import { render, screen, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import ListView from './ListView.component';
diff --git a/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.js b/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.js
index 3b7c9aaf5b..026971c7b4 100644
--- a/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.js
+++ b/packages/forms/src/UIForm/fields/MultiSelectTag/MultiSelectTag.component.js
@@ -1,14 +1,17 @@
-import PropTypes from 'prop-types';
import { Component } from 'react';
+
import get from 'lodash/get';
-import Typeahead from '@talend/react-components/lib/Typeahead';
+import PropTypes from 'prop-types';
+
import Badge from '@talend/react-components/lib/Badge';
import FocusManager from '@talend/react-components/lib/FocusManager';
-import FieldTemplate from '../FieldTemplate';
+import Typeahead from '@talend/react-components/lib/Typeahead';
+
import { generateDescriptionId, generateErrorId } from '../../Message/generateId';
+import callTrigger from '../../trigger';
+import FieldTemplate from '../FieldTemplate';
import theme from './MultiSelectTag.module.scss';
-import callTrigger from '../../trigger';
function escapeRegexCharacters(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
diff --git a/packages/forms/src/UIForm/fields/NestedListView/NestedListView.component.js b/packages/forms/src/UIForm/fields/NestedListView/NestedListView.component.js
index de7aa55f01..92a44e40b0 100644
--- a/packages/forms/src/UIForm/fields/NestedListView/NestedListView.component.js
+++ b/packages/forms/src/UIForm/fields/NestedListView/NestedListView.component.js
@@ -1,15 +1,19 @@
-import ListView from '@talend/react-components/lib/ListView';
-import isEqual from 'lodash/isEqual';
-import PropTypes from 'prop-types';
import { Component } from 'react';
import { withTranslation } from 'react-i18next';
+
+import isEqual from 'lodash/isEqual';
+import PropTypes from 'prop-types';
+
+import ListView from '@talend/react-components/lib/ListView';
+
import { I18N_DOMAIN_FORMS } from '../../../constants';
import getDefaultT from '../../../translate';
import { generateDescriptionId, generateErrorId } from '../../Message/generateId';
import FieldTemplate from '../FieldTemplate';
-import theme from './NestedListView.module.scss';
import { getDisplayedItems, prepareItemsFromSchema } from './NestedListView.utils';
+import theme from './NestedListView.module.scss';
+
const DISPLAY_MODE_DEFAULT = 'DISPLAY_MODE_DEFAULT';
const DISPLAY_MODE_SEARCH = 'DISPLAY_MODE_SEARCH';
const DEFAULT_ITEM_HEIGHT = 33;
diff --git a/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js b/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js
index 79478258ee..49c31460fc 100644
--- a/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js
+++ b/packages/forms/src/UIForm/fields/Radios/Radios.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Radios from './Radios.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js b/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js
index a43ec18987..190dcb1d6c 100644
--- a/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js
+++ b/packages/forms/src/UIForm/fields/ResourcePicker/ResourcePicker.component.test.js
@@ -1,6 +1,7 @@
/* eslint-disable react/prop-types */
+
/* eslint-disable react/display-name */
-import { screen, render, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import ResourcePicker from './ResourcePicker.component';
diff --git a/packages/forms/src/UIForm/fields/Select/Select.component.test.js b/packages/forms/src/UIForm/fields/Select/Select.component.test.js
index 378cf62b42..96cdad89ee 100644
--- a/packages/forms/src/UIForm/fields/Select/Select.component.test.js
+++ b/packages/forms/src/UIForm/fields/Select/Select.component.test.js
@@ -1,4 +1,4 @@
-import { screen, render, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import omit from 'lodash/omit';
diff --git a/packages/forms/src/UIForm/fields/Text/Text.component.test.js b/packages/forms/src/UIForm/fields/Text/Text.component.test.js
index d7eb0967b9..684a7b96ae 100644
--- a/packages/forms/src/UIForm/fields/Text/Text.component.test.js
+++ b/packages/forms/src/UIForm/fields/Text/Text.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render, fireEvent } from '@testing-library/react';
+import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Text from './Text.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/TextArea/TextArea.component.test.js b/packages/forms/src/UIForm/fields/TextArea/TextArea.component.test.js
index 36fa576ce9..7ac87322fe 100644
--- a/packages/forms/src/UIForm/fields/TextArea/TextArea.component.test.js
+++ b/packages/forms/src/UIForm/fields/TextArea/TextArea.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import TextArea from './TextArea.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js b/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js
index 3c0d0b7ab6..9ec5cfff24 100644
--- a/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js
+++ b/packages/forms/src/UIForm/fields/Toggle/Toggle.component.test.js
@@ -1,5 +1,6 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+
import Toggle from './Toggle.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js b/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js
index 4aa3f262e1..c8fba2d8aa 100644
--- a/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js
+++ b/packages/forms/src/UIForm/fieldsets/Array/Array.component.test.js
@@ -1,11 +1,11 @@
/* eslint-disable @typescript-eslint/no-shadow */
-import ArrayWidget from './Array.component';
-import defaultWidgets from '../../utils/widgets';
-import { WidgetContext } from '../../context';
-
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
+import { WidgetContext } from '../../context';
+import defaultWidgets from '../../utils/widgets';
+import ArrayWidget from './Array.component';
+
jest.unmock('@talend/design-system');
function TestArray(props) {
diff --git a/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js b/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js
index 546e4dfd0e..b9200432ac 100644
--- a/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js
+++ b/packages/forms/src/UIForm/fieldsets/Array/ArrayItem.component.test.js
@@ -1,4 +1,4 @@
-import { screen, render } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import ArrayItem from './ArrayItem.component';
diff --git a/packages/forms/src/rhf/fields/Input/Input.test.js b/packages/forms/src/rhf/fields/Input/Input.test.js
index 55aa328b87..06ebda5695 100644
--- a/packages/forms/src/rhf/fields/Input/Input.test.js
+++ b/packages/forms/src/rhf/fields/Input/Input.test.js
@@ -1,7 +1,9 @@
/* eslint-disable testing-library/no-unnecessary-act */
-import { render, screen, act, fireEvent } from '@testing-library/react';
+import { FormProvider, useForm } from 'react-hook-form';
+
+import { act, fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { useForm, FormProvider } from 'react-hook-form';
+
import Input from './RHFInput.component';
jest.unmock('@talend/design-system');
diff --git a/packages/forms/src/rhf/fields/Select/Select.test.js b/packages/forms/src/rhf/fields/Select/Select.test.js
index 8244354ce4..d8d40e7f61 100644
--- a/packages/forms/src/rhf/fields/Select/Select.test.js
+++ b/packages/forms/src/rhf/fields/Select/Select.test.js
@@ -1,7 +1,9 @@
/* eslint-disable testing-library/no-unnecessary-act */
-import { render, screen, act, waitFor, fireEvent } from '@testing-library/react';
+import { FormProvider, useForm } from 'react-hook-form';
+
+import { act, fireEvent, render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { useForm, FormProvider } from 'react-hook-form';
+
import Select from './RHFSelect.component';
jest.unmock('@talend/design-system');
diff --git a/packages/jsfc/src/canonical-title-map.spec.js b/packages/jsfc/src/canonical-title-map.spec.js
index 6378a87a16..6c405ee5a6 100644
--- a/packages/jsfc/src/canonical-title-map.spec.js
+++ b/packages/jsfc/src/canonical-title-map.spec.js
@@ -1,5 +1,6 @@
import chai from 'chai';
import { describe, it } from 'mocha';
+
import canonicalTitleMap from './canonical-title-map';
chai.should();
diff --git a/packages/jsfc/src/merge.js b/packages/jsfc/src/merge.js
index f9d866fbb6..b3468f7dc9 100644
--- a/packages/jsfc/src/merge.js
+++ b/packages/jsfc/src/merge.js
@@ -1,6 +1,6 @@
-import { stringify, parse } from './sf-path';
-import { defaultForm, createDefaults } from './schema-defaults';
import canonicalTitleMap from './canonical-title-map';
+import { createDefaults, defaultForm } from './schema-defaults';
+import { parse, stringify } from './sf-path';
// export function merge(schema, form, schemaDefaultTypes, ignore, options, readonly, asyncTemplates) {
export function merge(
diff --git a/packages/jsfc/src/merge.spec.js b/packages/jsfc/src/merge.spec.js
index 7df44a583f..e8b114c638 100644
--- a/packages/jsfc/src/merge.spec.js
+++ b/packages/jsfc/src/merge.spec.js
@@ -1,7 +1,8 @@
import chai from 'chai';
import { describe, it } from 'mocha';
-import { defaultForm, createDefaults } from './schema-defaults';
+
import { merge } from './merge';
+import { createDefaults, defaultForm } from './schema-defaults';
chai.should();
diff --git a/packages/jsfc/src/resolve.spec.js b/packages/jsfc/src/resolve.spec.js
index b8ae8cabf4..9e36cb947c 100644
--- a/packages/jsfc/src/resolve.spec.js
+++ b/packages/jsfc/src/resolve.spec.js
@@ -1,5 +1,6 @@
import chai from 'chai';
import { describe, it } from 'mocha';
+
import { jsonref } from './resolve';
chai.should();
diff --git a/packages/jsfc/src/schema-defaults.ts b/packages/jsfc/src/schema-defaults.ts
index 461534320b..90adb2c293 100644
--- a/packages/jsfc/src/schema-defaults.ts
+++ b/packages/jsfc/src/schema-defaults.ts
@@ -1,5 +1,5 @@
-import { stringify } from './sf-path';
import canonicalTitleMap from './canonical-title-map';
+import { stringify } from './sf-path';
/* Utils */
const stripNullType = type => {
diff --git a/packages/jsfc/src/select.test.js b/packages/jsfc/src/select.test.js
index 798cf775eb..2cf317f9e4 100644
--- a/packages/jsfc/src/select.test.js
+++ b/packages/jsfc/src/select.test.js
@@ -1,4 +1,4 @@
-import { defaultForm, createDefaults } from './schema-defaults';
+import { createDefaults, defaultForm } from './schema-defaults';
describe('schema-defaults.js', () => {
it('should hold functions for generating a default form schema from defaults it creates', () => {
diff --git a/packages/jsfc/src/sf-path.test.js b/packages/jsfc/src/sf-path.test.js
index 41e2472997..66e0a73be4 100644
--- a/packages/jsfc/src/sf-path.test.js
+++ b/packages/jsfc/src/sf-path.test.js
@@ -1,4 +1,4 @@
-import { parse, stringify, normalize, name } from './sf-path';
+import { name, normalize, parse, stringify } from './sf-path';
describe('sf-path.js', () => {
it('should hold functions for working with object paths and keys', () => {
diff --git a/packages/jsfc/src/traverse.test.js b/packages/jsfc/src/traverse.test.js
index dc13f77fd3..49607ab421 100644
--- a/packages/jsfc/src/traverse.test.js
+++ b/packages/jsfc/src/traverse.test.js
@@ -1,4 +1,4 @@
-import { traverseSchema, traverseForm } from './traverse';
+import { traverseForm, traverseSchema } from './traverse';
describe('traverse.js', () => {
it('should hold functions for applying functions on branches of a json-schema or ui-schema', () => {
diff --git a/yarn.lock b/yarn.lock
index 9e434b8c6c..3001f4848a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -258,7 +258,7 @@
jsesc "^2.5.1"
source-map "^0.5.0"
-"@babel/generator@^7.12.11", "@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.22.9", "@babel/generator@^7.23.3", "@babel/generator@^7.23.4", "@babel/generator@^7.7.2":
+"@babel/generator@^7.12.11", "@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.22.9", "@babel/generator@^7.23.0", "@babel/generator@^7.23.3", "@babel/generator@^7.23.4", "@babel/generator@^7.7.2":
version "7.23.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.4.tgz#4a41377d8566ec18f807f42962a7f3551de83d1c"
integrity sha512-esuS49Cga3HcThFNebGhlgsrVLkvhqvYDTzgjfFFlHJcIfLe5jFmRRfCQ1KuBfc4Jrtn3ndLgKWAKjBE+IraYQ==
@@ -471,7 +471,7 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539"
integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==
-"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.22.7", "@babel/parser@^7.23.3", "@babel/parser@^7.23.4", "@babel/parser@^7.9.4":
+"@babel/parser@^7.1.0", "@babel/parser@^7.13.16", "@babel/parser@^7.14.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.22.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.3", "@babel/parser@^7.23.4", "@babel/parser@^7.9.4":
version "7.23.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.4.tgz#409fbe690c333bb70187e2de4021e1e47a026661"
integrity sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==
@@ -1336,6 +1336,22 @@
debug "^4.1.0"
globals "^11.1.0"
+"@babel/traverse@7.23.2":
+ version "7.23.2"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
+ integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
+ dependencies:
+ "@babel/code-frame" "^7.22.13"
+ "@babel/generator" "^7.23.0"
+ "@babel/helper-environment-visitor" "^7.22.20"
+ "@babel/helper-function-name" "^7.23.0"
+ "@babel/helper-hoist-variables" "^7.22.5"
+ "@babel/helper-split-export-declaration" "^7.22.6"
+ "@babel/parser" "^7.23.0"
+ "@babel/types" "^7.23.0"
+ debug "^4.1.0"
+ globals "^11.1.0"
+
"@babel/traverse@^7.1.6", "@babel/traverse@^7.17.3", "@babel/traverse@^7.22.8", "@babel/traverse@^7.23.3", "@babel/traverse@^7.23.4", "@babel/traverse@^7.4.5":
version "7.23.4"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.4.tgz#c2790f7edf106d059a0098770fe70801417f3f85"
@@ -4163,6 +4179,18 @@
javascript-natural-sort "0.7.1"
lodash "4.17.21"
+"@trivago/prettier-plugin-sort-imports@^4.3.0":
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz#725f411646b3942193a37041c84e0b2116339789"
+ integrity sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==
+ dependencies:
+ "@babel/generator" "7.17.7"
+ "@babel/parser" "^7.20.5"
+ "@babel/traverse" "7.23.2"
+ "@babel/types" "7.17.0"
+ javascript-natural-sort "0.7.1"
+ lodash "^4.17.21"
+
"@trysound/sax@0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad"
@@ -4929,6 +4957,14 @@
dependencies:
"@types/react" "*"
+"@types/react-virtualized@^9.21.26":
+ version "9.21.28"
+ resolved "https://registry.yarnpkg.com/@types/react-virtualized/-/react-virtualized-9.21.28.tgz#3713ac539ab795f7a94c0a6fb995f2ce83eefa37"
+ integrity sha512-GE9tPk6vinqh2cqVs5xyqF5g6HdHJMVY1msJRSY12MN8+GrI0f9KUmXbryek6Pyry5fM2wTX1VvZxQj3ZKgTRg==
+ dependencies:
+ "@types/prop-types" "*"
+ "@types/react" "*"
+
"@types/react@*", "@types/react@>=16", "@types/react@>=16.9.11", "@types/react@^18.2.38", "@types/react@^18.2.7":
version "18.2.38"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.38.tgz#3605ca41d3daff2c434e0b98d79a2469d4c2dd52"