Update version or some package.

This commit is contained in:
Paulo Gustavo Veiga 2024-02-11 12:01:49 -08:00
parent 91c2c600e4
commit 88e3e37f2e
4 changed files with 801 additions and 323 deletions

View File

@ -22,32 +22,33 @@
"test:integration": "npx start-server-and-test start http-get://localhost:3000 cy:run" "test:integration": "npx start-server-and-test start http-get://localhost:3000 cy:run"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0", "@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.9.3", "@mui/icons-material": "^5.15.9",
"@mui/lab": "^5.0.0-alpha.137", "@mui/lab": "^5.0.0-alpha.165",
"@mui/material": "^5.14.2", "@mui/material": "^5.15.9",
"@reduxjs/toolkit": "^1.5.0", "@reduxjs/toolkit": "^2.1.0",
"@wisemapping/editor": "workspace:*", "@wisemapping/editor": "workspace:^",
"axios": "^0.27.2", "axios": "^1.6.7",
"dayjs": "^1.10.7", "dayjs": "^1.11.10",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-ga4": "^1.4.1", "react-ga4": "^2.1.0",
"react-google-recaptcha": "^2.1.0", "react-google-recaptcha": "^3.1.0",
"react-intl": "^6.2.1", "react-intl": "^6.6.2",
"react-query": "^3.39.1", "react-query": "^3.39.3",
"react-redux": "^7.2.2", "react-redux": "^9.1.0",
"react-router-dom": "^6.4.3", "react-router-dom": "^6.22.0",
"styled-components": "^5.3.6", "styled-components": "^6.1.8",
"universal-cookie": "^7.0.2" "universal-cookie": "^7.0.2",
"update-browserslist-db": "latest"
}, },
"devDependencies": { "devDependencies": {
"@formatjs/cli": "^6.0.4", "@formatjs/cli": "^6.2.7",
"@testing-library/cypress": "^8.0.3", "@testing-library/cypress": "^10.0.1",
"@types/testing-library__cypress": "^5.0.8", "@types/testing-library__cypress": "^5.0.13",
"@welldone-software/why-did-you-render": "^7.0.1", "@welldone-software/why-did-you-render": "^8.0.1",
"cypress": "^12.3.0", "cypress": "^13.6.4",
"cypress-image-snapshot": "^4.0.1" "cypress-image-snapshot": "^4.0.1"
}, },
"publishConfig": { "publishConfig": {

View File

@ -32,7 +32,7 @@ import Client, {
MapMetadata, MapMetadata,
} from '..'; } from '..';
import { getCsrfToken } from '../../../utils'; import { getCsrfToken } from '../../../utils';
import { LocaleCode, localeFromStr } from '../../app-i18n'; import AppI18n, { Locale, LocaleCode, localeFromStr } from '../../app-i18n';
import Cookies from 'universal-cookie'; import Cookies from 'universal-cookie';
export default class RestClient implements Client { export default class RestClient implements Client {
@ -62,6 +62,10 @@ export default class RestClient implements Client {
config.headers['Authorization'] = jwtToken; config.headers['Authorization'] = jwtToken;
} }
// Send browser locale ...
const locale = this.getDefaultLocale();
config.headers['Accept-Language'] = locale.code;
// Add Csrf token ... // Add Csrf token ...
const csrfToken = getCsrfToken(); const csrfToken = getCsrfToken();
if (csrfToken) { if (csrfToken) {
@ -453,6 +457,10 @@ export default class RestClient implements Client {
return new Promise(handler); return new Promise(handler);
} }
protected getDefaultLocale(): Locale {
return AppI18n.getDefaultLocale();
}
renameMap(id: number, basicInfo: BasicMapInfo): Promise<void> { renameMap(id: number, basicInfo: BasicMapInfo): Promise<void> {
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => { const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
this.axios this.axios

View File

@ -1,14 +1,9 @@
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit'; import { configureStore } from '@reduxjs/toolkit';
import rootReducer from './rootReducer'; import rootReducer from './rootReducer';
// Create Service object... // Create Service object...
const store = configureStore({ const store = configureStore({
reducer: rootReducer, reducer: rootReducer,
middleware: [ middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }),
...getDefaultMiddleware({
serializableCheck: false,
}),
],
}); });
export default store; export default store;

1062
yarn.lock

File diff suppressed because it is too large Load Diff