Skip to content
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from 'redux-toolkit-v1';
import type { PayloadAction } from 'redux-toolkit-v1';

import { getInitialState } from '../stream_state';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from 'redux-toolkit-v1';
import type { PayloadAction } from 'redux-toolkit-v1';

const getInitialState = () => ({
simulateErrors: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import type { TypedUseSelectorHook } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux';
import type { TypedUseSelectorHook } from 'react-redux-v7';
import { useDispatch, useSelector } from 'react-redux-v7';
import type { AppDispatch, RootState } from './store';

// Use throughout your app instead of plain `useDispatch` and `useSelector`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/

import React, { type FC, type PropsWithChildren } from 'react';
import { configureStore } from '@reduxjs/toolkit';
import { Provider } from 'react-redux';
import { configureStore } from 'redux-toolkit-v1';
import { Provider } from 'react-redux-v7';

import { streamSlice } from '@kbn/ml-response-stream/client';

Expand Down
22 changes: 16 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@
"@aws-sdk/client-bedrock-runtime": "^3.744.0",
"@aws-sdk/client-kendra": "3.744.0",
"@aws-sdk/credential-provider-node": "3.744.0",
"@elastic/charts/@reduxjs/toolkit": "npm:@reduxjs/toolkit@1.9.7",
"@elastic/charts/immer": "npm:immer@^9.0.21",
"@elastic/charts/react-redux": "npm:react-redux@^7.2.8",
"@elastic/charts/redux": "npm:redux@^4.2.1",
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0",
"@types/react": "~18.2.0",
"@types/react-dom": "~18.2.0",
Expand Down Expand Up @@ -1101,7 +1105,7 @@
"@opentelemetry/sdk-trace-node": "^2.0.0",
"@opentelemetry/semantic-conventions": "^1.32.0",
"@paralleldrive/cuid2": "^2.2.2",
"@reduxjs/toolkit": "1.9.7",
"@reduxjs/toolkit": "2.7.0",
"@slack/webhook": "^7.0.1",
"@smithy/eventstream-codec": "^4.0.1",
"@smithy/eventstream-serde-node": "^4.0.1",
Expand Down Expand Up @@ -1202,7 +1206,8 @@
"https-proxy-agent": "^5.0.1",
"i18n-iso-countries": "^7.14.0",
"icalendar": "0.7.1",
"immer": "^9.0.21",
"immer": "^10.0.3",
"immer-v9": "npm:immer@^9.0.21",
"inquirer": "^7.3.3",
"io-ts": "^2.2.22",
"ipaddr.js": "2.0.0",
Expand Down Expand Up @@ -1281,7 +1286,8 @@
"react-markdown": "^6.0.3",
"react-popper-tooltip": "^4.4.2",
"react-recompose": "^0.33.0",
"react-redux": "^7.2.8",
"react-redux": "^9.2.0",
"react-redux-v7": "npm:react-redux@^7.2.8",
"react-reverse-portal": "^2.3.0",
"react-router": "^5.3.4",
"react-router-config": "^5.1.1",
Expand All @@ -1293,19 +1299,23 @@
"react-window": "^1.8.10",
"react-window-infinite-loader": "^1.0.9",
"reduce-reducers": "^1.0.4",
"redux": "^4.2.1",
"redux": "^5.0.1",
"redux-actions": "^2.6.5",
"redux-devtools-extension": "^2.13.8",
"redux-saga": "^1.3.0",
"redux-saga-testing": "^2.0.2",
"redux-thunk": "^2.4.2",
"redux-thunk": "^3.1.0",
"redux-thunk-v2": "npm:redux-thunk@^2.4.2",
"redux-thunks": "^1.0.0",
"redux-toolkit-v1": "npm:@reduxjs/toolkit@1.9.7",
"redux-v4": "npm:redux@^4.2.1",
"reflect-metadata": "^0.2.2",
"remark-gfm": "1.0.0",
"remark-parse-no-trim": "^8.0.4",
"remark-stringify": "^8.0.3",
"require-in-the-middle": "^7.5.2",
"reselect": "^4.1.8",
"reselect": "^5.1.0",
"reselect-v4": "npm:reselect@^4.1.8",
"resize-observer-polyfill": "1.5.1",
"rison-node": "1.0.2",
"rxjs": "^7.8.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/

import React from 'react';
import { Provider } from 'react-redux';
import { type EnhancedStore, configureStore } from '@reduxjs/toolkit';
import { Provider } from 'react-redux-v7';
import { type EnhancedStore, configureStore } from 'redux-toolkit-v1';
import { isEqual } from 'lodash';
import { KbnPalettes } from '@kbn/palettes';
import { IFieldFormat } from '@kbn/field-formats-plugin/common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React from 'react';
import { useDispatch } from 'react-redux';
import { useDispatch } from 'react-redux-v7';
import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { css } from '@emotion/react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { useDispatch } from 'react-redux';
import { useDispatch } from 'react-redux-v7';
import React from 'react';
import { IKbnPalette, KbnPalettes } from '@kbn/palettes';
import { ColorSwatch } from '../color_picker/color_swatch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
useEuiTheme,
} from '@elastic/eui';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux-v7';
import { i18n } from '@kbn/i18n';
import { css } from '@emotion/react';
import { IKbnPalette, KbnPalettes } from '@kbn/palettes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { css } from '@emotion/react';
import React, { useCallback, useMemo, useState } from 'react';
import { euiThemeVars } from '@kbn/ui-theme';
import { i18n } from '@kbn/i18n';
import { useDispatch, useSelector } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux-v7';
import { findLast } from 'lodash';
import { KbnPalettes } from '@kbn/palettes';
import { IFieldFormat } from '@kbn/field-formats-plugin/common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { useSelector, useDispatch } from 'react-redux-v7';
import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiButtonIcon, EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { css } from '@emotion/react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
EuiFormRow,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { useDispatch, useSelector } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux-v7';
import { css } from '@emotion/react';
import { KbnPalette, KbnPalettes } from '@kbn/palettes';
import { updateSpecialAssignmentColor } from '../../state/color_mapping';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import React from 'react';
import { euiThemeVars } from '@kbn/ui-theme';
import { css } from '@emotion/react';
import { useDispatch } from 'react-redux';
import { useDispatch } from 'react-redux-v7';
import { KbnPalettes } from '@kbn/palettes';
import { changeAlpha } from '../../color/color_math';
import { ColorMapping } from '../../config';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
EuiToolTip,
useEuiTheme,
} from '@elastic/eui';
import { useDispatch } from 'react-redux';
import { useDispatch } from 'react-redux-v7';
import { i18n } from '@kbn/i18n';
import { css } from '@emotion/react';
import { IKbnPalette } from '@kbn/palettes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React, { useCallback, useState, useMemo } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { useSelector, useDispatch } from 'react-redux-v7';
import { EuiColorPalettePicker, EuiConfirmModal, EuiFormRow } from '@elastic/eui';
import { i18n } from '@kbn/i18n';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React, { useCallback, useState } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { useSelector, useDispatch } from 'react-redux-v7';
import { EuiButtonGroup, EuiConfirmModal, EuiFormRow } from '@elastic/eui';
import { i18n } from '@kbn/i18n';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from 'redux-toolkit-v1';
import type { PayloadAction } from 'redux-toolkit-v1';
import type { ColorMapping } from '../config';
import { DEFAULT_OTHER_ASSIGNMENT_INDEX } from '../config/default_color_mapping';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { type PayloadAction, createSlice } from '@reduxjs/toolkit';
import { type PayloadAction, createSlice } from 'redux-toolkit-v1';
import { RootState } from './color_mapping';

const initialState: RootState['ui'] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React, { ComponentType } from 'react';
import { Provider } from 'react-redux';
import { Provider } from 'react-redux-v7';

export function WithStore<T extends object = Record<string, any>>(store: any) {
return (WrappedComponent: ComponentType<T>) => (props: any) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React, { ComponentType } from 'react';
import { Store } from 'redux';
import { Store } from 'redux-v4';
import { ReactWrapper } from 'enzyme';
import { act } from 'react-dom/test-utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { Store } from 'redux';
import { Store } from 'redux-v4';
import { ReactWrapper as GenericReactWrapper } from 'enzyme';
import { LocationDescriptor } from 'history';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { Reducer } from 'react';
import { produce } from 'immer';
import { produce } from 'immer-v9';
import { identity } from 'fp-ts/function';
import { DevToolsSettings, DEFAULT_SETTINGS } from '../../services';
import { TextObject } from '../../../common/text_object';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { Reducer } from 'react';
import { produce } from 'immer';
import { produce } from 'immer-v9';
import { identity } from 'fp-ts/function';

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { Reducer } from 'react';
import { produce } from 'immer';
import { produce } from 'immer-v9';
import { identity } from 'fp-ts/function';
import { BaseResponseType } from '../../types/common';
import { RequestResult } from '../hooks/use_send_current_request/send_request';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React, { Component } from 'react';
import { createSelector } from 'reselect';
import { createSelector } from 'reselect-v4';
import { OverlayStart } from '@kbn/core/public';
import { DataViewField, DataView, RuntimeField } from '@kbn/data-views-plugin/public';
import { Table } from './components/table';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import React, { Component } from 'react';
import { createSelector } from 'reselect';
import { createSelector } from 'reselect-v4';

import { EuiSpacer } from '@elastic/eui';
import { DataView, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Provider as ReduxProvider,
createDispatchHook,
createSelectorHook,
} from 'react-redux';
} from 'react-redux-v7';
import type { PropsWithChildren } from 'react';
import React, { useMemo, createContext } from 'react';
import { useAdHocDataViews } from './runtime_state';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
createSlice,
type ThunkAction,
type ThunkDispatch,
} from '@reduxjs/toolkit';
} from 'redux-toolkit-v1';
import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public';
import type { TabItem } from '@kbn/unified-tabs';
import type { DiscoverCustomizationContext } from '../../../../customizations';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { v4 as uuid } from 'uuid';
import { i18n } from '@kbn/i18n';
import type { TabItem } from '@kbn/unified-tabs';
import { createAsyncThunk } from '@reduxjs/toolkit';
import { createAsyncThunk } from 'redux-toolkit-v1';
import type { DiscoverInternalState, TabState } from './types';
import type {
InternalStateDispatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// <reference path="./shallow_equal.d.ts" />

import { useRef } from 'react';
import shallowEqual from 'react-redux/lib/utils/shallowEqual';
import shallowEqual from 'react-redux-v7/lib/utils/shallowEqual';

export function useShallowMemo<T>(value: T): T {
const previousRef = useRef(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* 2.0.
*/

import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from 'redux-toolkit-v1';
import { createSlice } from 'redux-toolkit-v1';

import type {
SignificantItem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* 2.0.
*/

import type { TypedUseSelectorHook } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux';
import type { TypedUseSelectorHook } from 'react-redux-v7';
import { useDispatch, useSelector } from 'react-redux-v7';
import type { AppDispatch, RootState } from './store';

// Improves TypeScript support compared to plain `useDispatch` and `useSelector`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* 2.0.
*/

import type { PayloadAction } from '@reduxjs/toolkit';
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from 'redux-toolkit-v1';
import { createAsyncThunk, createSlice } from 'redux-toolkit-v1';

import { i18n } from '@kbn/i18n';
import type { HttpSetup, HttpFetchOptions } from '@kbn/core/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* 2.0.
*/

import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
import type { PayloadAction } from 'redux-toolkit-v1';
import { createSlice } from 'redux-toolkit-v1';

import type { WindowParameters } from '../window_parameters';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { configureStore } from '@reduxjs/toolkit';
import { configureStore } from 'redux-toolkit-v1';
import {
logRateAnalysisTableSlice,
localStorageListenerMiddleware,
Expand Down
Loading
Loading