@wger-project/react-components 25.11.17 → 25.12.5

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.
Files changed (38) hide show
  1. package/build/assets/index.css +1 -1
  2. package/build/locales/de/translation.json +13 -4
  3. package/build/locales/en/translation.json +9 -0
  4. package/build/locales/hi/translation.json +5 -0
  5. package/build/locales/nl/translation.json +242 -238
  6. package/build/locales/pt_BR/translation.json +340 -255
  7. package/build/main.js +154 -150
  8. package/build/main.js.map +1 -1
  9. package/package.json +6 -3
  10. package/src/components/Dashboard/ConfigurableDashboard.tsx +228 -0
  11. package/src/components/Dashboard/DashboardCard.tsx +121 -0
  12. package/src/components/Dashboard/EmptyCard.tsx +3 -3
  13. package/src/components/Dashboard/GoalCard.tsx +71 -0
  14. package/src/components/Dashboard/NutritionCard.tsx +88 -96
  15. package/src/components/Dashboard/RoutineCard.tsx +54 -69
  16. package/src/components/Dashboard/WeightCard.tsx +36 -42
  17. package/src/components/Exercises/Add/Step1Basics.test.tsx +4 -1
  18. package/src/components/Exercises/Detail/ExerciseDetailEdit.tsx +43 -27
  19. package/src/components/Exercises/Detail/ExerciseDetailView.tsx +57 -17
  20. package/src/components/Exercises/Detail/Head/ExerciseDeleteDialog.tsx +1 -1
  21. package/src/components/Exercises/Detail/OverviewCard.test.tsx +7 -11
  22. package/src/components/Exercises/ExerciseOverview.tsx +6 -6
  23. package/src/components/Exercises/Overview/ExerciseGrid.tsx +1 -2
  24. package/src/components/Exercises/forms/ExerciseAliases.tsx +78 -21
  25. package/src/components/Exercises/forms/yupValidators.ts +7 -4
  26. package/src/components/Exercises/models/exercise.ts +55 -43
  27. package/src/components/WorkoutRoutines/Detail/WorkoutStats.tsx +1 -1
  28. package/src/components/WorkoutRoutines/widgets/forms/DayTypeSelect.tsx +1 -2
  29. package/src/components/WorkoutRoutines/widgets/forms/SlotForm.tsx +0 -4
  30. package/src/index.tsx +0 -46
  31. package/src/routes.tsx +82 -79
  32. package/src/services/exerciseTranslation.ts +5 -6
  33. package/src/services/measurements.ts +15 -2
  34. package/src/services/video.test.ts +4 -4
  35. package/src/tests/exerciseTestdata.ts +61 -55
  36. package/src/tests/exercises/searchResponse.ts +31 -29
  37. package/src/tests/responseApi.ts +25 -14
  38. package/src/components/Dashboard/Dashboard.tsx +0 -22
@@ -41,20 +41,21 @@ const image = new ExerciseImage(
41
41
  true
42
42
  );
43
43
 
44
- export const testApiExercise1 = new Exercise(
45
- 345,
46
- "c788d643-150a-4ac7-97ef-84643c6419bf",
47
- category,
48
- [equipment1, equipment2],
49
- [muscle1],
50
- [muscle2],
51
- [image],
52
- 228,
53
- [
44
+ export const testApiExercise1 = new Exercise({
45
+ id: 345,
46
+ uuid: "c788d643-150a-4ac7-97ef-84643c6419bf",
47
+ lastUpdateGlobal: new Date("2025-11-22T19:32:02.590941+01:00"),
48
+ category: category,
49
+ equipment: [equipment1, equipment2],
50
+ muscles: [muscle1],
51
+ musclesSecondary: [muscle2],
52
+ images: [image],
53
+ variationId: 228,
54
+ translations: [
54
55
  testExerciseTranslation1,
55
56
  testExerciseTranslation2
56
57
  ],
57
- [
58
+ videos: [
58
59
  new ExerciseVideo(
59
60
  1,
60
61
  "b1c934fa-c4f8-4d84-8cb4-7802be0d284c",
@@ -62,12 +63,13 @@ export const testApiExercise1 = new Exercise(
62
63
  false
63
64
  )
64
65
  ],
65
- [
66
+ authors: [
66
67
  "wger.de",
67
68
  "author 1",
68
- "somebody else"
69
+ "somebody else",
70
+ "Mr. T"
69
71
  ]
70
- );
72
+ });
71
73
 
72
74
 
73
75
  export const responseApiExerciseInfo = {
@@ -77,6 +79,9 @@ export const responseApiExerciseInfo = {
77
79
  "results": [{
78
80
  "id": 345,
79
81
  "uuid": "c788d643-150a-4ac7-97ef-84643c6419bf",
82
+ "created": "2023-08-06T10:17:17.422900+02:00",
83
+ "last_update": "2025-11-22T14:17:20.119332+01:00",
84
+ "last_update_global": "2025-11-22T19:32:02.590941+01:00",
80
85
  "category": {
81
86
  "id": 10,
82
87
  "name": "Abs"
@@ -192,6 +197,12 @@ export const responseApiExerciseInfo = {
192
197
  "wger.de",
193
198
  "author 1",
194
199
  "somebody else"
200
+ ],
201
+ "total_authors_history": [
202
+ "wger.de",
203
+ "author 1",
204
+ "somebody else",
205
+ "Mr. T"
195
206
  ]
196
207
  }]
197
208
  };
@@ -1,22 +0,0 @@
1
- import Grid from '@mui/material/Grid';
2
- import { NutritionCard } from "components/Dashboard/NutritionCard";
3
- import { RoutineCard } from "components/Dashboard/RoutineCard";
4
- import { WeightCard } from "components/Dashboard/WeightCard";
5
- import React from 'react';
6
-
7
- export const Dashboard = () => {
8
-
9
- return (
10
- <Grid container spacing={2}>
11
- <Grid size={{ xs: 12, sm: 4 }}>
12
- <RoutineCard />
13
- </Grid>
14
- <Grid size={{ xs: 12, sm: 4 }}>
15
- <NutritionCard />
16
- </Grid>
17
- <Grid size={{ xs: 12, sm: 4 }}>
18
- <WeightCard />
19
- </Grid>
20
- </Grid>
21
- );
22
- };