@beinformed/ui 1.46.0 → 1.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/esm/redux/store/configureStore.js +5 -0
- package/esm/redux/store/configureStore.js.map +1 -1
- package/lib/redux/store/configureStore.js +5 -0
- package/lib/redux/store/configureStore.js.flow +8 -0
- package/lib/redux/store/configureStore.js.map +1 -1
- package/package.json +7 -7
- package/src/redux/store/configureStore.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.46.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.46.0...v1.46.1) (2024-04-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **locale:** locale cookie must be set on init of client ([f3cd8db](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/f3cd8db3b402797bad733d90d5919de28ff80f70))
|
|
11
|
+
|
|
5
12
|
## [1.46.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.45.3...v1.46.0) (2024-04-15)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -4,6 +4,7 @@ import { routerMiddleware } from "../_router/RouterMiddleware";
|
|
|
4
4
|
import { modularUIMiddleware } from "../_modularui/ModularUIMiddleware";
|
|
5
5
|
import { createReducer } from "../reducers/createReducer";
|
|
6
6
|
import { locationChange } from "../_router/RouterActions";
|
|
7
|
+
import { updateLocale } from "../_i18n/I18nActions";
|
|
7
8
|
/**
|
|
8
9
|
*/
|
|
9
10
|
const configureStore = (routerHistory, customReducers, initialState) => {
|
|
@@ -21,6 +22,10 @@ const configureStore = (routerHistory, customReducers, initialState) => {
|
|
|
21
22
|
if (!initialState?.router) {
|
|
22
23
|
store.dispatch(locationChange(routerHistory.location, "PUSH"));
|
|
23
24
|
}
|
|
25
|
+
const locale = initialState?.i18n.locale;
|
|
26
|
+
if (locale) {
|
|
27
|
+
store.dispatch(updateLocale(locale));
|
|
28
|
+
}
|
|
24
29
|
return {
|
|
25
30
|
routerHistory,
|
|
26
31
|
store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureStore.js","names":["applyMiddleware","compose","combineReducers","createStore","createReduxStore","thunk","routerMiddleware","modularUIMiddleware","createReducer","locationChange","configureStore","routerHistory","customReducers","initialState","composeEnhancers","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","middleware","enhancers","store","router","dispatch","location"],"sources":["../../../src/redux/store/configureStore.js"],"sourcesContent":["// @flow\nimport {\n applyMiddleware,\n compose,\n combineReducers,\n createStore as createReduxStore,\n} from \"redux\";\nimport thunk from \"redux-thunk\";\n\nimport { routerMiddleware } from \"../_router/RouterMiddleware\";\nimport { modularUIMiddleware } from \"../_modularui/ModularUIMiddleware\";\n\nimport { createReducer } from \"../reducers/createReducer\";\nimport { locationChange } from \"../_router/RouterActions\";\n\nimport type { RouterHistory } from \"react-router\";\nimport type { ReduxAction, ReduxState, ReduxStore } from \"../types\";\nimport type { Reducer } from \"redux\";\n\n/**\n */\nconst configureStore = (\n routerHistory: RouterHistory,\n customReducers?: Object,\n initialState?: $Shape<ReduxState>,\n): { routerHistory: RouterHistory, store: ReduxStore } => {\n let composeEnhancers = compose;\n\n if (process.env.NODE_ENV !== \"production\" && typeof window !== \"undefined\") {\n composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n }\n\n const combinedReducers: Reducer<ReduxState, ReduxAction> = combineReducers({\n ...customReducers,\n ...createReducer(),\n });\n\n const middleware = applyMiddleware(\n modularUIMiddleware,\n routerMiddleware(routerHistory),\n thunk,\n );\n\n const enhancers = composeEnhancers(middleware);\n\n const store: ReduxStore = createReduxStore(\n combinedReducers,\n initialState,\n enhancers,\n );\n\n if (!initialState?.router) {\n store.dispatch(locationChange(routerHistory.location, \"PUSH\"));\n }\n return { routerHistory, store };\n};\n\nexport default configureStore;\n"],"mappings":"AACA,SACEA,eAAe,EACfC,OAAO,EACPC,eAAe,EACfC,WAAW,IAAIC,gBAAgB,QAC1B,OAAO;AACd,OAAOC,KAAK,MAAM,aAAa;AAE/B,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,mBAAmB,QAAQ,mCAAmC;AAEvE,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,cAAc,QAAQ,0BAA0B;
|
|
1
|
+
{"version":3,"file":"configureStore.js","names":["applyMiddleware","compose","combineReducers","createStore","createReduxStore","thunk","routerMiddleware","modularUIMiddleware","createReducer","locationChange","updateLocale","configureStore","routerHistory","customReducers","initialState","composeEnhancers","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","middleware","enhancers","store","router","dispatch","location","locale","i18n"],"sources":["../../../src/redux/store/configureStore.js"],"sourcesContent":["// @flow\nimport {\n applyMiddleware,\n compose,\n combineReducers,\n createStore as createReduxStore,\n} from \"redux\";\nimport thunk from \"redux-thunk\";\n\nimport { routerMiddleware } from \"../_router/RouterMiddleware\";\nimport { modularUIMiddleware } from \"../_modularui/ModularUIMiddleware\";\n\nimport { createReducer } from \"../reducers/createReducer\";\nimport { locationChange } from \"../_router/RouterActions\";\n\nimport { updateLocale } from \"../_i18n/I18nActions\";\n\nimport type { RouterHistory } from \"react-router\";\nimport type { ReduxAction, ReduxState, ReduxStore } from \"../types\";\nimport type { Reducer } from \"redux\";\n\n/**\n */\nconst configureStore = (\n routerHistory: RouterHistory,\n customReducers?: Object,\n initialState?: $Shape<ReduxState>,\n): { routerHistory: RouterHistory, store: ReduxStore } => {\n let composeEnhancers = compose;\n\n if (process.env.NODE_ENV !== \"production\" && typeof window !== \"undefined\") {\n composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n }\n\n const combinedReducers: Reducer<ReduxState, ReduxAction> = combineReducers({\n ...customReducers,\n ...createReducer(),\n });\n\n const middleware = applyMiddleware(\n modularUIMiddleware,\n routerMiddleware(routerHistory),\n thunk,\n );\n\n const enhancers = composeEnhancers(middleware);\n\n const store: ReduxStore = createReduxStore(\n combinedReducers,\n initialState,\n enhancers,\n );\n\n if (!initialState?.router) {\n store.dispatch(locationChange(routerHistory.location, \"PUSH\"));\n }\n\n const locale = initialState?.i18n.locale;\n if (locale) {\n store.dispatch(updateLocale(locale));\n }\n\n return { routerHistory, store };\n};\n\nexport default configureStore;\n"],"mappings":"AACA,SACEA,eAAe,EACfC,OAAO,EACPC,eAAe,EACfC,WAAW,IAAIC,gBAAgB,QAC1B,OAAO;AACd,OAAOC,KAAK,MAAM,aAAa;AAE/B,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,mBAAmB,QAAQ,mCAAmC;AAEvE,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,SAASC,YAAY,QAAQ,sBAAsB;AAMnD;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,aAA4B,EAC5BC,cAAuB,EACvBC,YAAiC,KACuB;EACxD,IAAIC,gBAAgB,GAAGd,OAAO;EAE9B,IAAIe,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IAC1EJ,gBAAgB,GAAGI,MAAM,CAACC,oCAAoC,IAAInB,OAAO;EAC3E;EAEA,MAAMoB,gBAAkD,GAAGnB,eAAe,CAAC;IACzE,GAAGW,cAAc;IACjB,GAAGL,aAAa,CAAC;EACnB,CAAC,CAAC;EAEF,MAAMc,UAAU,GAAGtB,eAAe,CAChCO,mBAAmB,EACnBD,gBAAgB,CAACM,aAAa,CAAC,EAC/BP,KACF,CAAC;EAED,MAAMkB,SAAS,GAAGR,gBAAgB,CAACO,UAAU,CAAC;EAE9C,MAAME,KAAiB,GAAGpB,gBAAgB,CACxCiB,gBAAgB,EAChBP,YAAY,EACZS,SACF,CAAC;EAED,IAAI,CAACT,YAAY,EAAEW,MAAM,EAAE;IACzBD,KAAK,CAACE,QAAQ,CAACjB,cAAc,CAACG,aAAa,CAACe,QAAQ,EAAE,MAAM,CAAC,CAAC;EAChE;EAEA,MAAMC,MAAM,GAAGd,YAAY,EAAEe,IAAI,CAACD,MAAM;EACxC,IAAIA,MAAM,EAAE;IACVJ,KAAK,CAACE,QAAQ,CAAChB,YAAY,CAACkB,MAAM,CAAC,CAAC;EACtC;EAEA,OAAO;IAAEhB,aAAa;IAAEY;EAAM,CAAC;AACjC,CAAC;AAED,eAAeb,cAAc","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ var _RouterMiddleware = require("../_router/RouterMiddleware");
|
|
|
11
11
|
var _ModularUIMiddleware = require("../_modularui/ModularUIMiddleware");
|
|
12
12
|
var _createReducer = require("../reducers/createReducer");
|
|
13
13
|
var _RouterActions = require("../_router/RouterActions");
|
|
14
|
+
var _I18nActions = require("../_i18n/I18nActions");
|
|
14
15
|
/**
|
|
15
16
|
*/
|
|
16
17
|
const configureStore = (routerHistory, customReducers, initialState) => {
|
|
@@ -28,6 +29,10 @@ const configureStore = (routerHistory, customReducers, initialState) => {
|
|
|
28
29
|
if (!initialState?.router) {
|
|
29
30
|
store.dispatch((0, _RouterActions.locationChange)(routerHistory.location, "PUSH"));
|
|
30
31
|
}
|
|
32
|
+
const locale = initialState?.i18n.locale;
|
|
33
|
+
if (locale) {
|
|
34
|
+
store.dispatch((0, _I18nActions.updateLocale)(locale));
|
|
35
|
+
}
|
|
31
36
|
return {
|
|
32
37
|
routerHistory,
|
|
33
38
|
store
|
|
@@ -13,6 +13,8 @@ import { modularUIMiddleware } from "../_modularui/ModularUIMiddleware";
|
|
|
13
13
|
import { createReducer } from "../reducers/createReducer";
|
|
14
14
|
import { locationChange } from "../_router/RouterActions";
|
|
15
15
|
|
|
16
|
+
import { updateLocale } from "../_i18n/I18nActions";
|
|
17
|
+
|
|
16
18
|
import type { RouterHistory } from "react-router";
|
|
17
19
|
import type { ReduxAction, ReduxState, ReduxStore } from "../types";
|
|
18
20
|
import type { Reducer } from "redux";
|
|
@@ -52,6 +54,12 @@ const configureStore = (
|
|
|
52
54
|
if (!initialState?.router) {
|
|
53
55
|
store.dispatch(locationChange(routerHistory.location, "PUSH"));
|
|
54
56
|
}
|
|
57
|
+
|
|
58
|
+
const locale = initialState?.i18n.locale;
|
|
59
|
+
if (locale) {
|
|
60
|
+
store.dispatch(updateLocale(locale));
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
return { routerHistory, store };
|
|
56
64
|
};
|
|
57
65
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureStore.js","names":["_redux","require","_reduxThunk","_interopRequireDefault","_RouterMiddleware","_ModularUIMiddleware","_createReducer","_RouterActions","configureStore","routerHistory","customReducers","initialState","composeEnhancers","compose","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","combineReducers","createReducer","middleware","applyMiddleware","modularUIMiddleware","routerMiddleware","thunk","enhancers","store","createReduxStore","router","dispatch","locationChange","location","_default","exports","default"],"sources":["../../../src/redux/store/configureStore.js"],"sourcesContent":["// @flow\nimport {\n applyMiddleware,\n compose,\n combineReducers,\n createStore as createReduxStore,\n} from \"redux\";\nimport thunk from \"redux-thunk\";\n\nimport { routerMiddleware } from \"../_router/RouterMiddleware\";\nimport { modularUIMiddleware } from \"../_modularui/ModularUIMiddleware\";\n\nimport { createReducer } from \"../reducers/createReducer\";\nimport { locationChange } from \"../_router/RouterActions\";\n\nimport type { RouterHistory } from \"react-router\";\nimport type { ReduxAction, ReduxState, ReduxStore } from \"../types\";\nimport type { Reducer } from \"redux\";\n\n/**\n */\nconst configureStore = (\n routerHistory: RouterHistory,\n customReducers?: Object,\n initialState?: $Shape<ReduxState>,\n): { routerHistory: RouterHistory, store: ReduxStore } => {\n let composeEnhancers = compose;\n\n if (process.env.NODE_ENV !== \"production\" && typeof window !== \"undefined\") {\n composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n }\n\n const combinedReducers: Reducer<ReduxState, ReduxAction> = combineReducers({\n ...customReducers,\n ...createReducer(),\n });\n\n const middleware = applyMiddleware(\n modularUIMiddleware,\n routerMiddleware(routerHistory),\n thunk,\n );\n\n const enhancers = composeEnhancers(middleware);\n\n const store: ReduxStore = createReduxStore(\n combinedReducers,\n initialState,\n enhancers,\n );\n\n if (!initialState?.router) {\n store.dispatch(locationChange(routerHistory.location, \"PUSH\"));\n }\n return { routerHistory, store };\n};\n\nexport default configureStore;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAMA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"configureStore.js","names":["_redux","require","_reduxThunk","_interopRequireDefault","_RouterMiddleware","_ModularUIMiddleware","_createReducer","_RouterActions","_I18nActions","configureStore","routerHistory","customReducers","initialState","composeEnhancers","compose","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","combineReducers","createReducer","middleware","applyMiddleware","modularUIMiddleware","routerMiddleware","thunk","enhancers","store","createReduxStore","router","dispatch","locationChange","location","locale","i18n","updateLocale","_default","exports","default"],"sources":["../../../src/redux/store/configureStore.js"],"sourcesContent":["// @flow\nimport {\n applyMiddleware,\n compose,\n combineReducers,\n createStore as createReduxStore,\n} from \"redux\";\nimport thunk from \"redux-thunk\";\n\nimport { routerMiddleware } from \"../_router/RouterMiddleware\";\nimport { modularUIMiddleware } from \"../_modularui/ModularUIMiddleware\";\n\nimport { createReducer } from \"../reducers/createReducer\";\nimport { locationChange } from \"../_router/RouterActions\";\n\nimport { updateLocale } from \"../_i18n/I18nActions\";\n\nimport type { RouterHistory } from \"react-router\";\nimport type { ReduxAction, ReduxState, ReduxStore } from \"../types\";\nimport type { Reducer } from \"redux\";\n\n/**\n */\nconst configureStore = (\n routerHistory: RouterHistory,\n customReducers?: Object,\n initialState?: $Shape<ReduxState>,\n): { routerHistory: RouterHistory, store: ReduxStore } => {\n let composeEnhancers = compose;\n\n if (process.env.NODE_ENV !== \"production\" && typeof window !== \"undefined\") {\n composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n }\n\n const combinedReducers: Reducer<ReduxState, ReduxAction> = combineReducers({\n ...customReducers,\n ...createReducer(),\n });\n\n const middleware = applyMiddleware(\n modularUIMiddleware,\n routerMiddleware(routerHistory),\n thunk,\n );\n\n const enhancers = composeEnhancers(middleware);\n\n const store: ReduxStore = createReduxStore(\n combinedReducers,\n initialState,\n enhancers,\n );\n\n if (!initialState?.router) {\n store.dispatch(locationChange(routerHistory.location, \"PUSH\"));\n }\n\n const locale = initialState?.i18n.locale;\n if (locale) {\n store.dispatch(updateLocale(locale));\n }\n\n return { routerHistory, store };\n};\n\nexport default configureStore;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAEA,IAAAO,YAAA,GAAAP,OAAA;AAMA;AACA;AACA,MAAMQ,cAAc,GAAGA,CACrBC,aAA4B,EAC5BC,cAAuB,EACvBC,YAAiC,KACuB;EACxD,IAAIC,gBAAgB,GAAGC,cAAO;EAE9B,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IAC1EL,gBAAgB,GAAGK,MAAM,CAACC,oCAAoC,IAAIL,cAAO;EAC3E;EAEA,MAAMM,gBAAkD,GAAG,IAAAC,sBAAe,EAAC;IACzE,GAAGV,cAAc;IACjB,GAAG,IAAAW,4BAAa,EAAC;EACnB,CAAC,CAAC;EAEF,MAAMC,UAAU,GAAG,IAAAC,sBAAe,EAChCC,wCAAmB,EACnB,IAAAC,kCAAgB,EAAChB,aAAa,CAAC,EAC/BiB,mBACF,CAAC;EAED,MAAMC,SAAS,GAAGf,gBAAgB,CAACU,UAAU,CAAC;EAE9C,MAAMM,KAAiB,GAAG,IAAAC,kBAAgB,EACxCV,gBAAgB,EAChBR,YAAY,EACZgB,SACF,CAAC;EAED,IAAI,CAAChB,YAAY,EAAEmB,MAAM,EAAE;IACzBF,KAAK,CAACG,QAAQ,CAAC,IAAAC,6BAAc,EAACvB,aAAa,CAACwB,QAAQ,EAAE,MAAM,CAAC,CAAC;EAChE;EAEA,MAAMC,MAAM,GAAGvB,YAAY,EAAEwB,IAAI,CAACD,MAAM;EACxC,IAAIA,MAAM,EAAE;IACVN,KAAK,CAACG,QAAQ,CAAC,IAAAK,yBAAY,EAACF,MAAM,CAAC,CAAC;EACtC;EAEA,OAAO;IAAEzB,aAAa;IAAEmB;EAAM,CAAC;AACjC,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa/B,cAAc","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beinformed/ui",
|
|
3
|
-
"version": "1.46.
|
|
3
|
+
"version": "1.46.1",
|
|
4
4
|
"description": "Toolbox for be informed javascript layouts",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"bugs": "http://support.beinformed.com",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"styled-components": "^5.0.0"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@babel/runtime-corejs3": "^7.24.
|
|
85
|
+
"@babel/runtime-corejs3": "^7.24.4",
|
|
86
86
|
"big.js": "^6.2.1",
|
|
87
87
|
"date-fns": "^3.6.0",
|
|
88
88
|
"deepmerge": "^4.3.1",
|
|
@@ -99,13 +99,13 @@
|
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@babel/cli": "^7.24.1",
|
|
102
|
-
"@babel/core": "^7.24.
|
|
102
|
+
"@babel/core": "^7.24.4",
|
|
103
103
|
"@babel/eslint-parser": "^7.24.1",
|
|
104
104
|
"@babel/eslint-plugin": "^7.23.5",
|
|
105
105
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
106
106
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
107
107
|
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
108
|
-
"@babel/preset-env": "^7.24.
|
|
108
|
+
"@babel/preset-env": "^7.24.4",
|
|
109
109
|
"@babel/preset-flow": "^7.24.1",
|
|
110
110
|
"@babel/preset-react": "^7.24.1",
|
|
111
111
|
"@commitlint/cli": "^18.5.0",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"babel-jest": "^29.7.0",
|
|
116
116
|
"babel-plugin-styled-components": "^2.1.4",
|
|
117
117
|
"cherry-pick": "^0.5.0",
|
|
118
|
-
"commit-and-tag-version": "^12.
|
|
118
|
+
"commit-and-tag-version": "^12.3.0",
|
|
119
119
|
"cross-env": "^7.0.3",
|
|
120
120
|
"documentation": "^14.0.2",
|
|
121
121
|
"eslint": "^8.57.0",
|
|
@@ -124,10 +124,10 @@
|
|
|
124
124
|
"eslint-plugin-ft-flow": "^3.0.7",
|
|
125
125
|
"eslint-plugin-import": "^2.29.1",
|
|
126
126
|
"eslint-plugin-jest": "^27.9.0",
|
|
127
|
-
"eslint-plugin-jsdoc": "^48.2.
|
|
127
|
+
"eslint-plugin-jsdoc": "^48.2.3",
|
|
128
128
|
"eslint-plugin-react": "^7.34.1",
|
|
129
129
|
"eslint-plugin-react-hooks": "^4.5.0",
|
|
130
|
-
"eslint-plugin-you-dont-need-lodash-underscore": "^6.
|
|
130
|
+
"eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0",
|
|
131
131
|
"flow-bin": "^0.200.1",
|
|
132
132
|
"flow-copy-source": "^2.0.9",
|
|
133
133
|
"flow-typed": "^3.9.0",
|
|
@@ -13,6 +13,8 @@ import { modularUIMiddleware } from "../_modularui/ModularUIMiddleware";
|
|
|
13
13
|
import { createReducer } from "../reducers/createReducer";
|
|
14
14
|
import { locationChange } from "../_router/RouterActions";
|
|
15
15
|
|
|
16
|
+
import { updateLocale } from "../_i18n/I18nActions";
|
|
17
|
+
|
|
16
18
|
import type { RouterHistory } from "react-router";
|
|
17
19
|
import type { ReduxAction, ReduxState, ReduxStore } from "../types";
|
|
18
20
|
import type { Reducer } from "redux";
|
|
@@ -52,6 +54,12 @@ const configureStore = (
|
|
|
52
54
|
if (!initialState?.router) {
|
|
53
55
|
store.dispatch(locationChange(routerHistory.location, "PUSH"));
|
|
54
56
|
}
|
|
57
|
+
|
|
58
|
+
const locale = initialState?.i18n.locale;
|
|
59
|
+
if (locale) {
|
|
60
|
+
store.dispatch(updateLocale(locale));
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
return { routerHistory, store };
|
|
56
64
|
};
|
|
57
65
|
|