corpushub-design-system 0.0.19 → 0.0.21

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.
@@ -1,4 +1,5 @@
1
1
  import axios from 'axios';
2
+ import { attachBearerFromSession, installAuthRefreshInterceptor, } from './installAuthRefreshInterceptor';
2
3
  import { clearSession, setAccessToken, setRefreshAccessTokenImpl, } from './session';
3
4
  const authApi = axios.create({
4
5
  withCredentials: true,
@@ -14,6 +15,11 @@ const authApiBase = import.meta.env.VITE_APP_AUTH_API ?? '';
14
15
  if (authApiBase) {
15
16
  configureAuthApiBaseUrl(authApiBase);
16
17
  }
18
+ installAuthRefreshInterceptor(authApi);
19
+ authApi.interceptors.request.use((config) => {
20
+ attachBearerFromSession(config);
21
+ return config;
22
+ });
17
23
  /** Gateway: `/api/auth/refresh` → auth service `/auth/refresh` (StripPrefix=1 drops `/api` only). */
18
24
  setRefreshAccessTokenImpl(async () => {
19
25
  try {
@@ -6,7 +6,7 @@ export const HeaderTexts = {
6
6
  'label.my.settings': 'My Settings',
7
7
  'label.choose': 'Choose a corpus',
8
8
  'tooltip.keyboard': 'Open Virtual Keyboard',
9
- 'tooltip.tutorials': 'Views Tutorials',
9
+ 'tooltip.tutorials': 'Help Center',
10
10
  'replace.all.tooltip': 'Replace All',
11
11
  'replace.find.placeholder': 'Find',
12
12
  'replace.placeholder': 'Replace',
@@ -28,7 +28,7 @@ export const HeaderTexts = {
28
28
  'label.my.settings': 'Minhas Configurações',
29
29
  'label.choose': 'Escolha um corpus',
30
30
  'tooltip.keyboard': 'Abrir Teclado Virtual',
31
- 'tooltip.tutorials': 'Ver tutoriais',
31
+ 'tooltip.tutorials': 'Central de Ajuda',
32
32
  'replace.all.tooltip': 'Substituir Todos',
33
33
  'replace.find.placeholder': 'Procurar',
34
34
  'replace.placeholder': 'Substituir',
@@ -50,7 +50,7 @@ export const HeaderTexts = {
50
50
  'label.my.settings': 'Le mie impostazioni',
51
51
  'label.choose': 'Scegli un corpus',
52
52
  'tooltip.keyboard': 'Apri tastiera virtuale',
53
- 'tooltip.tutorials': 'Visualizza i tutorial',
53
+ 'tooltip.tutorials': 'Centro assistenza',
54
54
  'replace.all.tooltip': 'Sostituisci tutto',
55
55
  'replace.find.placeholder': 'Trova',
56
56
  'replace.placeholder': 'Sostituisci',
@@ -1,9 +1,9 @@
1
- import api from '../api';
1
+ import authApi from '../auth/authApi';
2
2
  function updateLiveTour(liveTour) {
3
- return api.patch(`${import.meta.env.VITE_APP_AUTH_API}/profile/live-tour`, { liveTour });
3
+ return authApi.patch('/profile/live-tour', { liveTour });
4
4
  }
5
5
  function updateSettings(settings) {
6
- return api.patch(`${import.meta.env.VITE_APP_AUTH_API}/profile/settings`, { settings });
6
+ return authApi.patch('/profile/settings', { settings });
7
7
  }
8
8
  const ProfileService = {
9
9
  updateLiveTour,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corpushub-design-system",
3
3
  "private": false,
4
- "version": "0.0.19",
4
+ "version": "0.0.21",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {