@wger-project/react-components 25.10.16
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/LICENSE +661 -0
- package/README.md +58 -0
- package/build/OpenSans-Bold.woff +0 -0
- package/build/OpenSans-Light.woff +0 -0
- package/build/assets/index.css +1 -0
- package/build/chunks/browser-ponyfill-DL_vVusK.js +3 -0
- package/build/chunks/browser-ponyfill-DL_vVusK.js.map +1 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +60 -0
- package/build/locales/README.md +10 -0
- package/build/locales/ar/translation.json +240 -0
- package/build/locales/ca/translation.json +35 -0
- package/build/locales/cs/translation.json +257 -0
- package/build/locales/de/translation.json +338 -0
- package/build/locales/el/translation.json +97 -0
- package/build/locales/en/translation.json +332 -0
- package/build/locales/es/translation.json +335 -0
- package/build/locales/fa/translation.json +127 -0
- package/build/locales/fr/translation.json +341 -0
- package/build/locales/he/translation.json +146 -0
- package/build/locales/hr/translation.json +249 -0
- package/build/locales/it/translation.json +338 -0
- package/build/locales/ko/translation.json +331 -0
- package/build/locales/nb_NO/translation.json +50 -0
- package/build/locales/nl/translation.json +242 -0
- package/build/locales/pl/translation.json +261 -0
- package/build/locales/pt/translation.json +342 -0
- package/build/locales/pt_BR/translation.json +259 -0
- package/build/locales/pt_PT/translation.json +334 -0
- package/build/locales/ru/translation.json +116 -0
- package/build/locales/sk/translation.json +10 -0
- package/build/locales/sl/translation.json +326 -0
- package/build/locales/sr/translation.json +240 -0
- package/build/locales/sv/translation.json +165 -0
- package/build/locales/ta/translation.json +331 -0
- package/build/locales/th/translation.json +27 -0
- package/build/locales/tr/translation.json +238 -0
- package/build/locales/uk/translation.json +339 -0
- package/build/locales/uz/translation.json +56 -0
- package/build/locales/vi/translation.json +70 -0
- package/build/locales/zh_Hans/translation.json +336 -0
- package/build/locales/zh_Hant/translation.json +246 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/main.js +542 -0
- package/build/main.js.map +1 -0
- package/build/manifest.json +25 -0
- package/build/muscles/SOURCES +2 -0
- package/build/muscles/main/muscle-1.svg +72 -0
- package/build/muscles/main/muscle-10.svg +73 -0
- package/build/muscles/main/muscle-11.svg +72 -0
- package/build/muscles/main/muscle-12.svg +72 -0
- package/build/muscles/main/muscle-13.svg +92 -0
- package/build/muscles/main/muscle-14.svg +73 -0
- package/build/muscles/main/muscle-15.svg +72 -0
- package/build/muscles/main/muscle-16.svg +73 -0
- package/build/muscles/main/muscle-2.svg +72 -0
- package/build/muscles/main/muscle-3.svg +72 -0
- package/build/muscles/main/muscle-4.svg +72 -0
- package/build/muscles/main/muscle-5.svg +72 -0
- package/build/muscles/main/muscle-6.svg +73 -0
- package/build/muscles/main/muscle-7.svg +72 -0
- package/build/muscles/main/muscle-8.svg +72 -0
- package/build/muscles/main/muscle-9.svg +72 -0
- package/build/muscles/muscular_system_back.svg +118 -0
- package/build/muscles/muscular_system_front.svg +99 -0
- package/build/muscles/secondary/muscle-1.svg +72 -0
- package/build/muscles/secondary/muscle-10.svg +73 -0
- package/build/muscles/secondary/muscle-11.svg +72 -0
- package/build/muscles/secondary/muscle-12.svg +72 -0
- package/build/muscles/secondary/muscle-13.svg +92 -0
- package/build/muscles/secondary/muscle-14.svg +73 -0
- package/build/muscles/secondary/muscle-15.svg +72 -0
- package/build/muscles/secondary/muscle-16.svg +73 -0
- package/build/muscles/secondary/muscle-2.svg +72 -0
- package/build/muscles/secondary/muscle-3.svg +72 -0
- package/build/muscles/secondary/muscle-4.svg +72 -0
- package/build/muscles/secondary/muscle-5.svg +72 -0
- package/build/muscles/secondary/muscle-6.svg +73 -0
- package/build/muscles/secondary/muscle-7.svg +72 -0
- package/build/muscles/secondary/muscle-8.svg +72 -0
- package/build/muscles/secondary/muscle-9.svg +72 -0
- package/build/robots.txt +3 -0
- package/index.html +59 -0
- package/package.json +125 -0
- package/src/.sass-cache/166f82406a0edab65b7f8fd8256819ee2f34bebf/App.module.scssc +0 -0
- package/src/@types/i18next.d.ts +13 -0
- package/src/App.tsx +25 -0
- package/src/assets/images/discord-logo.svg +1 -0
- package/src/assets/images/get-it-on-google-play.svg +1 -0
- package/src/assets/images/logo.png +0 -0
- package/src/assets/images/twitter-logo-50.png +0 -0
- package/src/assets/images/twitter.svg +5 -0
- package/src/components/BodyWeight/Form/WeightForm.test.tsx +100 -0
- package/src/components/BodyWeight/Form/WeightForm.tsx +102 -0
- package/src/components/BodyWeight/Table/ActionButton/ActionButton.test.tsx +65 -0
- package/src/components/BodyWeight/Table/ActionButton/ActionButton.tsx +67 -0
- package/src/components/BodyWeight/Table/Fab/Fab.tsx +35 -0
- package/src/components/BodyWeight/Table/index.test.tsx +33 -0
- package/src/components/BodyWeight/Table/index.tsx +98 -0
- package/src/components/BodyWeight/Table/table.module.css +5 -0
- package/src/components/BodyWeight/Table/table.module.css.map +1 -0
- package/src/components/BodyWeight/Table/table.module.scss +0 -0
- package/src/components/BodyWeight/Table/table.mosule.css +2 -0
- package/src/components/BodyWeight/Table/table.mosule.css.map +1 -0
- package/src/components/BodyWeight/TableDashboard/TableDashboard.test.tsx +24 -0
- package/src/components/BodyWeight/TableDashboard/TableDashboard.tsx +62 -0
- package/src/components/BodyWeight/WeightChart/index.test.tsx +66 -0
- package/src/components/BodyWeight/WeightChart/index.tsx +105 -0
- package/src/components/BodyWeight/body_weight.module.css +8 -0
- package/src/components/BodyWeight/body_weight.module.css.map +1 -0
- package/src/components/BodyWeight/body_weight.module.scss +8 -0
- package/src/components/BodyWeight/index.test.tsx +92 -0
- package/src/components/BodyWeight/index.tsx +40 -0
- package/src/components/BodyWeight/model.ts +40 -0
- package/src/components/BodyWeight/queries/index.ts +49 -0
- package/src/components/BodyWeight/utils.test.ts +44 -0
- package/src/components/BodyWeight/utils.ts +22 -0
- package/src/components/BodyWeight/widgets/FilterButtons.test.tsx +57 -0
- package/src/components/BodyWeight/widgets/FilterButtons.tsx +69 -0
- package/src/components/BodyWeight/widgets/fab.tsx +33 -0
- package/src/components/Calendar/Components/CalendarComponent.test.tsx +141 -0
- package/src/components/Calendar/Components/CalendarComponent.tsx +250 -0
- package/src/components/Calendar/Components/CalendarDay.tsx +105 -0
- package/src/components/Calendar/Components/CalendarDayGrid.tsx +53 -0
- package/src/components/Calendar/Components/CalendarHeader.tsx +39 -0
- package/src/components/Calendar/Components/Entries.test.tsx +81 -0
- package/src/components/Calendar/Components/Entries.tsx +163 -0
- package/src/components/Calendar/Helpers/CalendarMeasurement.tsx +10 -0
- package/src/components/Carousel/carousel.module.css +43 -0
- package/src/components/Carousel/carousel.module.css.map +1 -0
- package/src/components/Carousel/carousel.module.scss +46 -0
- package/src/components/Carousel/index.tsx +66 -0
- package/src/components/Common/forms/LicenseAuthor.tsx +19 -0
- package/src/components/Common/forms/LicenseAuthorUrl.tsx +20 -0
- package/src/components/Common/forms/LicenseDerivativeSourceUrl.tsx +20 -0
- package/src/components/Common/forms/LicenseObjectUrl.tsx +20 -0
- package/src/components/Common/forms/LicenseTitle.tsx +19 -0
- package/src/components/Common/forms/WgerTextField.tsx +27 -0
- package/src/components/Core/LoadingWidget/LoadingWidget.tsx +22 -0
- package/src/components/Core/Modals/DeleteConfirmationModal.test.tsx +57 -0
- package/src/components/Core/Modals/DeleteConfirmationModal.tsx +74 -0
- package/src/components/Core/Modals/WgerModal.test.tsx +45 -0
- package/src/components/Core/Modals/WgerModal.tsx +46 -0
- package/src/components/Core/Notifications/index.tsx +57 -0
- package/src/components/Core/Notifications/notifications.module.css +8 -0
- package/src/components/Core/Notifications/notifications.module.css.map +1 -0
- package/src/components/Core/Notifications/notifications.module.scss +6 -0
- package/src/components/Core/Tooltips/LightToolTip.tsx +14 -0
- package/src/components/Core/Widgets/Container.tsx +98 -0
- package/src/components/Core/Widgets/FormError.tsx +64 -0
- package/src/components/Core/Widgets/OverviewEmpty.tsx +26 -0
- package/src/components/Core/Widgets/RenderLoadingQuery.tsx +28 -0
- package/src/components/Core/queries/index.ts +2 -0
- package/src/components/Core/queries/languageCheck.ts +31 -0
- package/src/components/Dashboard/Dashboard.tsx +22 -0
- package/src/components/Dashboard/EmptyCard.tsx +56 -0
- package/src/components/Dashboard/NutritionCard.test.tsx +89 -0
- package/src/components/Dashboard/NutritionCard.tsx +178 -0
- package/src/components/Dashboard/RoutineCard.test.tsx +66 -0
- package/src/components/Dashboard/RoutineCard.tsx +107 -0
- package/src/components/Dashboard/WeightCard.test.tsx +81 -0
- package/src/components/Dashboard/WeightCard.tsx +72 -0
- package/src/components/Exercises/Add/AddExerciseStepper.test.tsx +26 -0
- package/src/components/Exercises/Add/AddExerciseStepper.tsx +97 -0
- package/src/components/Exercises/Add/NotEnoughRights.tsx +37 -0
- package/src/components/Exercises/Add/Step1Basics.test.tsx +133 -0
- package/src/components/Exercises/Add/Step1Basics.tsx +179 -0
- package/src/components/Exercises/Add/Step2Variations.test.tsx +149 -0
- package/src/components/Exercises/Add/Step2Variations.tsx +237 -0
- package/src/components/Exercises/Add/Step3Description.test.tsx +66 -0
- package/src/components/Exercises/Add/Step3Description.tsx +96 -0
- package/src/components/Exercises/Add/Step4Translation.test.tsx +119 -0
- package/src/components/Exercises/Add/Step4Translations.tsx +183 -0
- package/src/components/Exercises/Add/Step5Images.test.tsx +28 -0
- package/src/components/Exercises/Add/Step5Images.tsx +269 -0
- package/src/components/Exercises/Add/Step6Overview.test.tsx +128 -0
- package/src/components/Exercises/Add/Step6Overview.tsx +262 -0
- package/src/components/Exercises/Detail/ExerciseDetailEdit.test.tsx +248 -0
- package/src/components/Exercises/Detail/ExerciseDetailEdit.tsx +340 -0
- package/src/components/Exercises/Detail/ExerciseDetailView.test.tsx +96 -0
- package/src/components/Exercises/Detail/ExerciseDetailView.tsx +242 -0
- package/src/components/Exercises/Detail/ExerciseDetails.test.tsx +88 -0
- package/src/components/Exercises/Detail/ExerciseDetails.tsx +119 -0
- package/src/components/Exercises/Detail/ExerciseImageAvatar.tsx +20 -0
- package/src/components/Exercises/Detail/ExerciseImagePlaceholder.tsx +21 -0
- package/src/components/Exercises/Detail/Head/ExerciseDeleteDialog.test.tsx +125 -0
- package/src/components/Exercises/Detail/Head/ExerciseDeleteDialog.tsx +185 -0
- package/src/components/Exercises/Detail/Head/head.module.css +73 -0
- package/src/components/Exercises/Detail/Head/head.module.css.map +7 -0
- package/src/components/Exercises/Detail/Head/head.module.scss +111 -0
- package/src/components/Exercises/Detail/Head/index.tsx +175 -0
- package/src/components/Exercises/Detail/OverviewCard.test.tsx +98 -0
- package/src/components/Exercises/Detail/OverviewCard.tsx +68 -0
- package/src/components/Exercises/Detail/SideGallery/index.tsx +65 -0
- package/src/components/Exercises/Detail/SideGallery/side_gallery.module.css +26 -0
- package/src/components/Exercises/Detail/SideGallery/side_gallery.module.css.map +7 -0
- package/src/components/Exercises/Detail/SideGallery/side_gallery.module.scss +34 -0
- package/src/components/Exercises/ExerciseOverview.test.tsx +183 -0
- package/src/components/Exercises/ExerciseOverview.tsx +293 -0
- package/src/components/Exercises/Filter/CategoryFilter.test.tsx +57 -0
- package/src/components/Exercises/Filter/CategoryFilter.tsx +105 -0
- package/src/components/Exercises/Filter/EquipmentFilter.test.tsx +55 -0
- package/src/components/Exercises/Filter/EquipmentFilter.tsx +105 -0
- package/src/components/Exercises/Filter/ExerciseFiltersContext.tsx +16 -0
- package/src/components/Exercises/Filter/FilterDrawer.tsx +38 -0
- package/src/components/Exercises/Filter/MuscleFilter.test.tsx +50 -0
- package/src/components/Exercises/Filter/MuscleFilter.tsx +130 -0
- package/src/components/Exercises/Filter/NameAutcompleter.tsx +146 -0
- package/src/components/Exercises/Filter/NameAutocompleter.test.tsx +76 -0
- package/src/components/Exercises/Overview/ExerciseGrid.tsx +44 -0
- package/src/components/Exercises/Overview/ExerciseGridLoadingSkeleton.test.tsx +10 -0
- package/src/components/Exercises/Overview/ExerciseGridLoadingSkeleton.tsx +26 -0
- package/src/components/Exercises/forms/Category.test.tsx +49 -0
- package/src/components/Exercises/forms/Category.tsx +41 -0
- package/src/components/Exercises/forms/Equipment.test.tsx +84 -0
- package/src/components/Exercises/forms/Equipment.tsx +38 -0
- package/src/components/Exercises/forms/ExerciseAliases.tsx +37 -0
- package/src/components/Exercises/forms/ExerciseDescription.tsx +57 -0
- package/src/components/Exercises/forms/ExerciseEquipmentSelect.tsx +29 -0
- package/src/components/Exercises/forms/ExerciseName.tsx +19 -0
- package/src/components/Exercises/forms/ExerciseNotes.tsx +72 -0
- package/src/components/Exercises/forms/ExerciseSelect.tsx +28 -0
- package/src/components/Exercises/forms/ImageCard.tsx +101 -0
- package/src/components/Exercises/forms/ImageStyle.tsx +74 -0
- package/src/components/Exercises/forms/Muscle.test.tsx +74 -0
- package/src/components/Exercises/forms/Muscle.tsx +41 -0
- package/src/components/Exercises/forms/VideoCard.tsx +109 -0
- package/src/components/Exercises/forms/yupValidators.ts +46 -0
- package/src/components/Exercises/models/alias.ts +29 -0
- package/src/components/Exercises/models/category.ts +35 -0
- package/src/components/Exercises/models/equipment.ts +33 -0
- package/src/components/Exercises/models/exercise.test.ts +74 -0
- package/src/components/Exercises/models/exercise.ts +159 -0
- package/src/components/Exercises/models/image.ts +41 -0
- package/src/components/Exercises/models/language.ts +23 -0
- package/src/components/Exercises/models/muscle.test.ts +17 -0
- package/src/components/Exercises/models/muscle.ts +39 -0
- package/src/components/Exercises/models/note.ts +29 -0
- package/src/components/Exercises/models/translation.test.ts +68 -0
- package/src/components/Exercises/models/translation.ts +83 -0
- package/src/components/Exercises/models/video.ts +30 -0
- package/src/components/Exercises/queries/exercises.ts +29 -0
- package/src/components/Exercises/queries/index.ts +133 -0
- package/src/components/Exercises/queries/variations.ts +15 -0
- package/src/components/Header/SubMenus/BodyWeightSubMenu.tsx +27 -0
- package/src/components/Header/SubMenus/MeasurementsSubMenu.tsx +28 -0
- package/src/components/Header/SubMenus/NutritionSubMenu.tsx +28 -0
- package/src/components/Header/SubMenus/TrainingSubMenu.tsx +43 -0
- package/src/components/Header/SubMenus/WorkoutSubMenu.tsx +28 -0
- package/src/components/Header/index.tsx +27 -0
- package/src/components/Measurements/Screens/MeasurementCategoryDetail.test.tsx +67 -0
- package/src/components/Measurements/Screens/MeasurementCategoryDetail.tsx +37 -0
- package/src/components/Measurements/Screens/MeasurementCategoryOverview.test.tsx +59 -0
- package/src/components/Measurements/Screens/MeasurementCategoryOverview.tsx +64 -0
- package/src/components/Measurements/models/Category.ts +38 -0
- package/src/components/Measurements/models/Entry.ts +37 -0
- package/src/components/Measurements/queries/index.ts +121 -0
- package/src/components/Measurements/widgets/CategoryDetailDataGrid.tsx +209 -0
- package/src/components/Measurements/widgets/CategoryDetailDropdown.tsx +83 -0
- package/src/components/Measurements/widgets/CategoryForm.test.tsx +96 -0
- package/src/components/Measurements/widgets/CategoryForm.tsx +88 -0
- package/src/components/Measurements/widgets/EntryForm.test.tsx +120 -0
- package/src/components/Measurements/widgets/EntryForm.tsx +139 -0
- package/src/components/Measurements/widgets/MeasurementChart.tsx +52 -0
- package/src/components/Measurements/widgets/fab.tsx +65 -0
- package/src/components/Muscles/MuscleOverview.tsx +37 -0
- package/src/components/Nutrition/components/BmiCalculator.test.tsx +55 -0
- package/src/components/Nutrition/components/BmiCalculator.tsx +203 -0
- package/src/components/Nutrition/components/IngredientSearch.tsx +24 -0
- package/src/components/Nutrition/components/NutritionDiaryOverview.test.tsx +51 -0
- package/src/components/Nutrition/components/NutritionDiaryOverview.tsx +47 -0
- package/src/components/Nutrition/components/PlanDetail.test.tsx +58 -0
- package/src/components/Nutrition/components/PlanDetail.tsx +100 -0
- package/src/components/Nutrition/components/PlanOverview.test.tsx +37 -0
- package/src/components/Nutrition/components/PlansOverview.tsx +62 -0
- package/src/components/Nutrition/helpers/nutritionalValues.test.ts +108 -0
- package/src/components/Nutrition/helpers/nutritionalValues.ts +128 -0
- package/src/components/Nutrition/models/Ingredient.ts +84 -0
- package/src/components/Nutrition/models/IngredientImage.ts +57 -0
- package/src/components/Nutrition/models/IngredientImageThumbnails.ts +59 -0
- package/src/components/Nutrition/models/diaryEntry.ts +129 -0
- package/src/components/Nutrition/models/ingredient.test.ts +37 -0
- package/src/components/Nutrition/models/meal.test.ts +54 -0
- package/src/components/Nutrition/models/meal.ts +128 -0
- package/src/components/Nutrition/models/mealItem.test.ts +23 -0
- package/src/components/Nutrition/models/mealItem.ts +134 -0
- package/src/components/Nutrition/models/nutritionalPlan.test.ts +169 -0
- package/src/components/Nutrition/models/nutritionalPlan.ts +268 -0
- package/src/components/Nutrition/models/weightUnit.ts +24 -0
- package/src/components/Nutrition/queries/diary.ts +59 -0
- package/src/components/Nutrition/queries/index.ts +20 -0
- package/src/components/Nutrition/queries/ingredient.ts +12 -0
- package/src/components/Nutrition/queries/meal.ts +41 -0
- package/src/components/Nutrition/queries/mealItem.ts +43 -0
- package/src/components/Nutrition/queries/plan.ts +93 -0
- package/src/components/Nutrition/widgets/DiaryDetail.tsx +39 -0
- package/src/components/Nutrition/widgets/DiaryOverview.tsx +51 -0
- package/src/components/Nutrition/widgets/Fab.tsx +65 -0
- package/src/components/Nutrition/widgets/IngredientAutcompleter.tsx +140 -0
- package/src/components/Nutrition/widgets/IngredientAutocompleter.test.tsx +60 -0
- package/src/components/Nutrition/widgets/IngredientDetailTable.tsx +91 -0
- package/src/components/Nutrition/widgets/LoggedPlannedNutritionalValuesTable.tsx +138 -0
- package/src/components/Nutrition/widgets/MealDetail.tsx +170 -0
- package/src/components/Nutrition/widgets/MealDetailDropdown.tsx +117 -0
- package/src/components/Nutrition/widgets/NutritionalValuesTable.tsx +103 -0
- package/src/components/Nutrition/widgets/PlanDetailDropdown.tsx +82 -0
- package/src/components/Nutrition/widgets/PlanSidebar.tsx +44 -0
- package/src/components/Nutrition/widgets/charts/LinearPlannedLoggedChart.tsx +27 -0
- package/src/components/Nutrition/widgets/charts/MacrosPieChart.tsx +66 -0
- package/src/components/Nutrition/widgets/charts/NutritionDiaryChart.tsx +95 -0
- package/src/components/Nutrition/widgets/charts/NutritionalValuesDashboardChart.tsx +84 -0
- package/src/components/Nutrition/widgets/charts/NutritionalValuesPlannedLoggedChart.tsx +54 -0
- package/src/components/Nutrition/widgets/forms/MealForm.test.tsx +85 -0
- package/src/components/Nutrition/widgets/forms/MealForm.tsx +105 -0
- package/src/components/Nutrition/widgets/forms/MealItemForm.test.tsx +106 -0
- package/src/components/Nutrition/widgets/forms/MealItemForm.tsx +118 -0
- package/src/components/Nutrition/widgets/forms/NutritionDiaryEntryForm.test.tsx +165 -0
- package/src/components/Nutrition/widgets/forms/NutritionDiaryEntryForm.tsx +161 -0
- package/src/components/Nutrition/widgets/forms/PlanForm.test.tsx +101 -0
- package/src/components/Nutrition/widgets/forms/PlanForm.tsx +361 -0
- package/src/components/User/models/profile.ts +81 -0
- package/src/components/User/queries/contribute.test.ts +132 -0
- package/src/components/User/queries/contribute.ts +33 -0
- package/src/components/User/queries/permission.ts +11 -0
- package/src/components/User/queries/profile.ts +22 -0
- package/src/components/WorkoutRoutines/Detail/RoutineAdd.tsx +12 -0
- package/src/components/WorkoutRoutines/Detail/RoutineDetail.test.tsx +71 -0
- package/src/components/WorkoutRoutines/Detail/RoutineDetail.tsx +87 -0
- package/src/components/WorkoutRoutines/Detail/RoutineDetailsTable.test.tsx +83 -0
- package/src/components/WorkoutRoutines/Detail/RoutineDetailsTable.tsx +371 -0
- package/src/components/WorkoutRoutines/Detail/RoutineEdit.test.tsx +51 -0
- package/src/components/WorkoutRoutines/Detail/RoutineEdit.tsx +95 -0
- package/src/components/WorkoutRoutines/Detail/SessionAdd.test.tsx +43 -0
- package/src/components/WorkoutRoutines/Detail/SessionAdd.tsx +50 -0
- package/src/components/WorkoutRoutines/Detail/SlotProgressionEdit.test.tsx +41 -0
- package/src/components/WorkoutRoutines/Detail/SlotProgressionEdit.tsx +145 -0
- package/src/components/WorkoutRoutines/Detail/TemplateDetail.test.tsx +44 -0
- package/src/components/WorkoutRoutines/Detail/TemplateDetail.tsx +84 -0
- package/src/components/WorkoutRoutines/Detail/WorkoutLogs.test.tsx +64 -0
- package/src/components/WorkoutRoutines/Detail/WorkoutLogs.tsx +98 -0
- package/src/components/WorkoutRoutines/Detail/WorkoutStats.test.tsx +65 -0
- package/src/components/WorkoutRoutines/Detail/WorkoutStats.tsx +244 -0
- package/src/components/WorkoutRoutines/Overview/Fab.tsx +91 -0
- package/src/components/WorkoutRoutines/Overview/PrivateTemplateOverview.test.tsx +36 -0
- package/src/components/WorkoutRoutines/Overview/PrivateTemplateOverview.tsx +41 -0
- package/src/components/WorkoutRoutines/Overview/PublicTemplateOverview.test.tsx +36 -0
- package/src/components/WorkoutRoutines/Overview/PublicTemplateOverview.tsx +40 -0
- package/src/components/WorkoutRoutines/Overview/RoutineOverview.test.tsx +38 -0
- package/src/components/WorkoutRoutines/Overview/RoutineOverview.tsx +76 -0
- package/src/components/WorkoutRoutines/models/BaseConfig.ts +118 -0
- package/src/components/WorkoutRoutines/models/Day.test.ts +15 -0
- package/src/components/WorkoutRoutines/models/Day.ts +117 -0
- package/src/components/WorkoutRoutines/models/LogStats.test.ts +44 -0
- package/src/components/WorkoutRoutines/models/LogStats.ts +110 -0
- package/src/components/WorkoutRoutines/models/RepetitionUnit.ts +22 -0
- package/src/components/WorkoutRoutines/models/Routine.test.ts +113 -0
- package/src/components/WorkoutRoutines/models/Routine.ts +218 -0
- package/src/components/WorkoutRoutines/models/RoutineDayData.ts +38 -0
- package/src/components/WorkoutRoutines/models/RoutineLogData.ts +22 -0
- package/src/components/WorkoutRoutines/models/SetConfigData.ts +121 -0
- package/src/components/WorkoutRoutines/models/Slot.test.ts +19 -0
- package/src/components/WorkoutRoutines/models/Slot.ts +83 -0
- package/src/components/WorkoutRoutines/models/SlotData.ts +30 -0
- package/src/components/WorkoutRoutines/models/SlotEntry.test.ts +31 -0
- package/src/components/WorkoutRoutines/models/SlotEntry.ts +245 -0
- package/src/components/WorkoutRoutines/models/WeightUnit.ts +22 -0
- package/src/components/WorkoutRoutines/models/WorkoutLog.ts +159 -0
- package/src/components/WorkoutRoutines/models/WorkoutSession.ts +124 -0
- package/src/components/WorkoutRoutines/queries/configs.ts +393 -0
- package/src/components/WorkoutRoutines/queries/days.ts +42 -0
- package/src/components/WorkoutRoutines/queries/index.ts +64 -0
- package/src/components/WorkoutRoutines/queries/logs.ts +49 -0
- package/src/components/WorkoutRoutines/queries/routines.ts +121 -0
- package/src/components/WorkoutRoutines/queries/sessions.ts +41 -0
- package/src/components/WorkoutRoutines/queries/slot_entries.ts +33 -0
- package/src/components/WorkoutRoutines/queries/slots.ts +40 -0
- package/src/components/WorkoutRoutines/queries/units.ts +15 -0
- package/src/components/WorkoutRoutines/widgets/DayDetails.test.tsx +69 -0
- package/src/components/WorkoutRoutines/widgets/DayDetails.tsx +441 -0
- package/src/components/WorkoutRoutines/widgets/LogWidgets.test.tsx +91 -0
- package/src/components/WorkoutRoutines/widgets/LogWidgets.tsx +334 -0
- package/src/components/WorkoutRoutines/widgets/RoutineDetailDropdown.test.tsx +36 -0
- package/src/components/WorkoutRoutines/widgets/RoutineDetailDropdown.tsx +184 -0
- package/src/components/WorkoutRoutines/widgets/RoutineDetailsCard.test.tsx +42 -0
- package/src/components/WorkoutRoutines/widgets/RoutineDetailsCard.tsx +202 -0
- package/src/components/WorkoutRoutines/widgets/RoutineStatistics.test.tsx +364 -0
- package/src/components/WorkoutRoutines/widgets/RoutineStatistics.tsx +249 -0
- package/src/components/WorkoutRoutines/widgets/SlotDetails.test.tsx +72 -0
- package/src/components/WorkoutRoutines/widgets/SlotDetails.tsx +233 -0
- package/src/components/WorkoutRoutines/widgets/forms/BaseConfigForm.test.tsx +161 -0
- package/src/components/WorkoutRoutines/widgets/forms/BaseConfigForm.tsx +508 -0
- package/src/components/WorkoutRoutines/widgets/forms/DayForm.test.tsx +86 -0
- package/src/components/WorkoutRoutines/widgets/forms/DayForm.tsx +202 -0
- package/src/components/WorkoutRoutines/widgets/forms/ProgressionForm.test.tsx +176 -0
- package/src/components/WorkoutRoutines/widgets/forms/ProgressionForm.tsx +494 -0
- package/src/components/WorkoutRoutines/widgets/forms/RoutineForm.test.tsx +94 -0
- package/src/components/WorkoutRoutines/widgets/forms/RoutineForm.tsx +309 -0
- package/src/components/WorkoutRoutines/widgets/forms/RoutineTemplateForm.test.tsx +70 -0
- package/src/components/WorkoutRoutines/widgets/forms/RoutineTemplateForm.tsx +68 -0
- package/src/components/WorkoutRoutines/widgets/forms/SessionForm.test.tsx +164 -0
- package/src/components/WorkoutRoutines/widgets/forms/SessionForm.tsx +263 -0
- package/src/components/WorkoutRoutines/widgets/forms/SessionLogsForm.test.tsx +126 -0
- package/src/components/WorkoutRoutines/widgets/forms/SessionLogsForm.tsx +330 -0
- package/src/components/WorkoutRoutines/widgets/forms/SlotEntryForm.test.tsx +227 -0
- package/src/components/WorkoutRoutines/widgets/forms/SlotEntryForm.tsx +206 -0
- package/src/components/WorkoutRoutines/widgets/forms/SlotForm.test.tsx +44 -0
- package/src/components/WorkoutRoutines/widgets/forms/SlotForm.tsx +36 -0
- package/src/components/index.ts +3 -0
- package/src/config.ts +12 -0
- package/src/i18n.ts +63 -0
- package/src/i18n.tsx +52 -0
- package/src/index.css +13 -0
- package/src/index.tsx +184 -0
- package/src/locales/README.md +7 -0
- package/src/pages/About/index.tsx +9 -0
- package/src/pages/AddExercise/index.tsx +15 -0
- package/src/pages/AddWeight/index.tsx +9 -0
- package/src/pages/ApiPage/index.tsx +9 -0
- package/src/pages/Calendar/index.tsx +10 -0
- package/src/pages/CaloriesCalculator/index.tsx +9 -0
- package/src/pages/Equipments/index.tsx +9 -0
- package/src/pages/ExerciseDetails/index.tsx +6 -0
- package/src/pages/Ingrdedients/index.tsx +9 -0
- package/src/pages/Login/index.tsx +9 -0
- package/src/pages/Preferences/index.tsx +9 -0
- package/src/pages/PublicTemplate/index.tsx +9 -0
- package/src/pages/TemplatePage/index.tsx +9 -0
- package/src/pages/WeightOverview/index.tsx +6 -0
- package/src/pages/index.ts +14 -0
- package/src/permissions/index.ts +13 -0
- package/src/reportWebVitals.ts +15 -0
- package/src/routes.tsx +137 -0
- package/src/services/alias.test.ts +47 -0
- package/src/services/alias.ts +34 -0
- package/src/services/base_config.test.ts +48 -0
- package/src/services/base_config.ts +86 -0
- package/src/services/category.test.ts +44 -0
- package/src/services/category.ts +21 -0
- package/src/services/config.test.ts +213 -0
- package/src/services/config.ts +50 -0
- package/src/services/day.test.ts +118 -0
- package/src/services/day.ts +44 -0
- package/src/services/equipment.test.ts +46 -0
- package/src/services/equipment.ts +20 -0
- package/src/services/exercise.test.ts +98 -0
- package/src/services/exercise.ts +182 -0
- package/src/services/exerciseTranslation.test.ts +98 -0
- package/src/services/exerciseTranslation.ts +112 -0
- package/src/services/image.test.ts +77 -0
- package/src/services/image.ts +54 -0
- package/src/services/index.ts +104 -0
- package/src/services/ingredient.test.ts +81 -0
- package/src/services/ingredient.ts +70 -0
- package/src/services/ingredientweightunit.ts +29 -0
- package/src/services/language.test.ts +86 -0
- package/src/services/language.ts +35 -0
- package/src/services/languageCheck.ts +33 -0
- package/src/services/meal.ts +67 -0
- package/src/services/mealItem.ts +32 -0
- package/src/services/measurements.test.ts +106 -0
- package/src/services/measurements.ts +173 -0
- package/src/services/muscles.test.ts +46 -0
- package/src/services/muscles.ts +20 -0
- package/src/services/note.ts +39 -0
- package/src/services/nutritionalDiary.test.ts +35 -0
- package/src/services/nutritionalDiary.ts +70 -0
- package/src/services/nutritionalPlan.test.ts +74 -0
- package/src/services/nutritionalPlan.ts +104 -0
- package/src/services/permission.ts +26 -0
- package/src/services/permissions.test.ts +34 -0
- package/src/services/profile.test.ts +40 -0
- package/src/services/profile.ts +49 -0
- package/src/services/responseType.ts +35 -0
- package/src/services/routine.test.ts +195 -0
- package/src/services/routine.ts +250 -0
- package/src/services/session.test.ts +157 -0
- package/src/services/session.ts +99 -0
- package/src/services/slot.test.ts +68 -0
- package/src/services/slot.ts +43 -0
- package/src/services/slot_entry.ts +43 -0
- package/src/services/variation.test.ts +24 -0
- package/src/services/variation.ts +18 -0
- package/src/services/video.test.ts +65 -0
- package/src/services/video.ts +47 -0
- package/src/services/weight.test.ts +75 -0
- package/src/services/weight.ts +58 -0
- package/src/services/workoutLogs.test.ts +148 -0
- package/src/services/workoutLogs.ts +89 -0
- package/src/services/workoutUnits.ts +29 -0
- package/src/setupTests.ts +40 -0
- package/src/state/exerciseSubmissionReducer.ts +170 -0
- package/src/state/exerciseSubmissionState.tsx +75 -0
- package/src/state/index.ts +15 -0
- package/src/state/notificationReducer.ts +29 -0
- package/src/state/notificationState.tsx +32 -0
- package/src/state/stateTypes.ts +24 -0
- package/src/tests/api/ingredientInfoEndpoint.ts +72 -0
- package/src/tests/exerciseTestdata.ts +159 -0
- package/src/tests/exercises/searchResponse.ts +23 -0
- package/src/tests/ingredientTestdata.ts +76 -0
- package/src/tests/measurementsTestData.ts +40 -0
- package/src/tests/nutritionDiaryTestdata.ts +167 -0
- package/src/tests/nutritionTestdata.ts +200 -0
- package/src/tests/queryClient/index.ts +7 -0
- package/src/tests/responseApi.ts +197 -0
- package/src/tests/setup.ts +10 -0
- package/src/tests/slotEntryApiResponse.ts +144 -0
- package/src/tests/userTestdata.ts +43 -0
- package/src/tests/weight/testData.ts +7 -0
- package/src/tests/workoutLogsRoutinesTestData.ts +90 -0
- package/src/tests/workoutRoutinesTestData.ts +451 -0
- package/src/tests/workoutStatisticsTestData.ts +219 -0
- package/src/theme.ts +73 -0
- package/src/types.ts +144 -0
- package/src/utils/Adapter.ts +10 -0
- package/src/utils/colors.test.ts +38 -0
- package/src/utils/colors.ts +17 -0
- package/src/utils/consts.ts +160 -0
- package/src/utils/date.test.ts +56 -0
- package/src/utils/date.ts +145 -0
- package/src/utils/forms.test.ts +41 -0
- package/src/utils/forms.ts +54 -0
- package/src/utils/numbers.test.ts +55 -0
- package/src/utils/numbers.ts +42 -0
- package/src/utils/requests.test.ts +61 -0
- package/src/utils/requests.ts +22 -0
- package/src/utils/strings.test.ts +62 -0
- package/src/utils/strings.ts +28 -0
- package/src/utils/url.test.ts +127 -0
- package/src/utils/url.ts +237 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { Alias } from "components/Exercises/models/alias";
|
|
2
|
+
import { Category } from "components/Exercises/models/category";
|
|
3
|
+
import { Equipment } from "components/Exercises/models/equipment";
|
|
4
|
+
import { Exercise } from "components/Exercises/models/exercise";
|
|
5
|
+
import { Language } from "components/Exercises/models/language";
|
|
6
|
+
import { Muscle } from "components/Exercises/models/muscle";
|
|
7
|
+
import { Translation } from "components/Exercises/models/translation";
|
|
8
|
+
|
|
9
|
+
export const testCategoryArms = new Category(1, 'Arms');
|
|
10
|
+
export const testCategoryLegs = new Category(2, 'Legs');
|
|
11
|
+
export const testCategoryChest = new Category(3, 'Chest');
|
|
12
|
+
export const testCategories = [
|
|
13
|
+
testCategoryArms,
|
|
14
|
+
testCategoryLegs,
|
|
15
|
+
testCategoryChest
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
export const testLanguageGerman = new Language(1, 'de', 'Deutsch');
|
|
19
|
+
export const testLanguageEnglish = new Language(2, 'en', 'English');
|
|
20
|
+
export const testLanguageFrench = new Language(3, 'fr', 'French');
|
|
21
|
+
export const testLanguages = [
|
|
22
|
+
testLanguageGerman,
|
|
23
|
+
testLanguageEnglish,
|
|
24
|
+
testLanguageFrench
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
export const testMuscleBiggus = new Muscle(1, 'Biggus musculus', 'Big muscle', true);
|
|
28
|
+
export const testMuscleDacttilaris = new Muscle(2, 'Musculus dacttilaris', 'Finger muscle', true);
|
|
29
|
+
export const testMuscleDeltoid = new Muscle(3, 'Deltoid', 'Shoulders', false);
|
|
30
|
+
export const testMuscleRectusAbdominis = new Muscle(4, 'Rectus abdominis', 'Abs', true);
|
|
31
|
+
export const testMuscles = [
|
|
32
|
+
testMuscleBiggus,
|
|
33
|
+
testMuscleDacttilaris,
|
|
34
|
+
testMuscleDeltoid,
|
|
35
|
+
testMuscleRectusAbdominis
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
export const testEquipmentBarbell = new Equipment(1, 'Barbell');
|
|
39
|
+
export const testEquipmentDumbbell = new Equipment(2, 'Dumbbell');
|
|
40
|
+
export const testEquipmentKettlebell = new Equipment(10, "Kettlebell");
|
|
41
|
+
export const testEquipmentRocks = new Equipment(42, "Rocks");
|
|
42
|
+
export const testEquipment = [
|
|
43
|
+
testEquipmentBarbell,
|
|
44
|
+
testEquipmentDumbbell,
|
|
45
|
+
testEquipmentKettlebell,
|
|
46
|
+
testEquipmentRocks,
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export const testExerciseSquats = new Exercise(
|
|
50
|
+
345,
|
|
51
|
+
"c788d643-150a-4ac7-97ef-84643c6419bf",
|
|
52
|
+
testCategoryLegs,
|
|
53
|
+
[testEquipmentBarbell, testEquipmentRocks],
|
|
54
|
+
[testMuscleBiggus, testMuscleRectusAbdominis],
|
|
55
|
+
[],
|
|
56
|
+
[],
|
|
57
|
+
null,
|
|
58
|
+
[
|
|
59
|
+
new Translation(111,
|
|
60
|
+
'583281c7-2362-48e7-95d5-8fd6c455e0fb',
|
|
61
|
+
'Squats',
|
|
62
|
+
'Do a squat',
|
|
63
|
+
2
|
|
64
|
+
),
|
|
65
|
+
new Translation(9,
|
|
66
|
+
'dae6f6ed-9408-4e62-a59a-1a33f4e8ab36',
|
|
67
|
+
'Kniebeuge',
|
|
68
|
+
'Die Kniebeuge ist eine Übung zur Kräftigung der Oberschenkelmuskulatur',
|
|
69
|
+
1,
|
|
70
|
+
[],
|
|
71
|
+
[
|
|
72
|
+
new Alias(1, 'e30eab18-7adf-4361-ad63-192c76103cf0', 'Königsübung'),
|
|
73
|
+
new Alias(2, 'f4f616f8-224e-4aba-a4e1-11ec0b59af33', 'Beinverdicker'),
|
|
74
|
+
]
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
export const testExerciseBenchPress = new Exercise(
|
|
80
|
+
2,
|
|
81
|
+
"abcdef-150a-4ac7-97ef-84643c6419bf",
|
|
82
|
+
testCategoryLegs,
|
|
83
|
+
[testEquipmentBarbell, testEquipmentRocks],
|
|
84
|
+
[testMuscleDacttilaris, testMuscleDeltoid],
|
|
85
|
+
[],
|
|
86
|
+
[],
|
|
87
|
+
1,
|
|
88
|
+
[
|
|
89
|
+
new Translation(111,
|
|
90
|
+
'583281c7-2362-48e7-95d5-8fd6c455e0fb',
|
|
91
|
+
'Benchpress',
|
|
92
|
+
'Do a benchpress',
|
|
93
|
+
2
|
|
94
|
+
),
|
|
95
|
+
]
|
|
96
|
+
);
|
|
97
|
+
export const testExerciseCurls = new Exercise(
|
|
98
|
+
3,
|
|
99
|
+
"abcdef-150a-4ac7-97ef-84643c6419bf",
|
|
100
|
+
testCategoryArms,
|
|
101
|
+
[testEquipmentDumbbell],
|
|
102
|
+
[testMuscleBiggus, testMuscleDacttilaris],
|
|
103
|
+
[],
|
|
104
|
+
[],
|
|
105
|
+
1,
|
|
106
|
+
[
|
|
107
|
+
new Translation(111,
|
|
108
|
+
'583281c7-2362-48e7-95d5-8fd6c455e0fb',
|
|
109
|
+
'Curls',
|
|
110
|
+
'curls! yeah!',
|
|
111
|
+
2
|
|
112
|
+
),
|
|
113
|
+
]
|
|
114
|
+
);
|
|
115
|
+
export const testExerciseCrunches = new Exercise(
|
|
116
|
+
4,
|
|
117
|
+
"abcdef-150a-4ac7-97ef-84643c6419bf",
|
|
118
|
+
testCategoryChest,
|
|
119
|
+
[testEquipmentRocks],
|
|
120
|
+
[testMuscleDeltoid],
|
|
121
|
+
[],
|
|
122
|
+
[],
|
|
123
|
+
null,
|
|
124
|
+
[
|
|
125
|
+
new Translation(111,
|
|
126
|
+
'583281c7-2362-48e7-95d5-8fd6c455e0fb',
|
|
127
|
+
'Crunches',
|
|
128
|
+
'Do some crunches',
|
|
129
|
+
2
|
|
130
|
+
),
|
|
131
|
+
]
|
|
132
|
+
);
|
|
133
|
+
export const testExerciseSkullCrusher = new Exercise(
|
|
134
|
+
5,
|
|
135
|
+
"abcdef-150a-4ac7-97ef-84643c6419bf",
|
|
136
|
+
testCategoryArms,
|
|
137
|
+
[testEquipmentBarbell],
|
|
138
|
+
[testMuscleRectusAbdominis],
|
|
139
|
+
[],
|
|
140
|
+
[],
|
|
141
|
+
2,
|
|
142
|
+
[
|
|
143
|
+
new Translation(111,
|
|
144
|
+
'583281c7-2362-48e7-95d5-8fd6c455e0fb',
|
|
145
|
+
'Skull crusher',
|
|
146
|
+
'get some sick triceps pump',
|
|
147
|
+
2
|
|
148
|
+
),
|
|
149
|
+
]
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
export const testExercises = [
|
|
153
|
+
testExerciseSquats,
|
|
154
|
+
testExerciseBenchPress,
|
|
155
|
+
testExerciseCurls,
|
|
156
|
+
testExerciseCrunches,
|
|
157
|
+
testExerciseSkullCrusher
|
|
158
|
+
];
|
|
159
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const searchResponse = [
|
|
2
|
+
{
|
|
3
|
+
"value": "Crunches an Negativbank",
|
|
4
|
+
"data": {
|
|
5
|
+
"id": 1149,
|
|
6
|
+
"base_id": 998,
|
|
7
|
+
"name": "Crunches an Negativbank",
|
|
8
|
+
"category": "Bauch",
|
|
9
|
+
"image": null,
|
|
10
|
+
"image_thumbnail": null
|
|
11
|
+
}
|
|
12
|
+
}, {
|
|
13
|
+
"value": "Crunches am Seil",
|
|
14
|
+
"data": {
|
|
15
|
+
"id": 1213,
|
|
16
|
+
"base_id": 979,
|
|
17
|
+
"name": "Crunches am Seil",
|
|
18
|
+
"category": "Brust",
|
|
19
|
+
"image": null,
|
|
20
|
+
"image_thumbnail": null
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Ingredient } from "components/Nutrition/models/Ingredient";
|
|
2
|
+
|
|
3
|
+
export const TEST_INGREDIENT_1 = new Ingredient({
|
|
4
|
+
id: 101,
|
|
5
|
+
uuid: "3af59658-7d83-4b0a-82f9-9f0edc0f00d5",
|
|
6
|
+
code: "00975957",
|
|
7
|
+
name: "0% fat Greek style yogurt",
|
|
8
|
+
energy: 1,
|
|
9
|
+
protein: 5.700,
|
|
10
|
+
carbohydrates: 18.600,
|
|
11
|
+
carbohydratesSugar: 10.200,
|
|
12
|
+
fat: 3.300,
|
|
13
|
+
fatSaturated: 0.900,
|
|
14
|
+
fiber: 0.500,
|
|
15
|
+
sodium: 0.040,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const TEST_INGREDIENT_2 = new Ingredient({
|
|
19
|
+
id: 102,
|
|
20
|
+
uuid: "18985fac-a519-4ebe-9017-b2fc3be91357",
|
|
21
|
+
code: "4005967511077",
|
|
22
|
+
name: "1001 Nacht Haferbrei",
|
|
23
|
+
energy: 351,
|
|
24
|
+
protein: 10.400,
|
|
25
|
+
carbohydrates: 61.100,
|
|
26
|
+
carbohydratesSugar: 17.100,
|
|
27
|
+
fat: 5.100,
|
|
28
|
+
fatSaturated: 1.000,
|
|
29
|
+
fiber: 9.300,
|
|
30
|
+
sodium: 0.008,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const TEST_INGREDIENT_3 = new Ingredient({
|
|
34
|
+
id: 103,
|
|
35
|
+
uuid: "ef7b50e0-5a2f-4060-8f9d-dd6b181d393c",
|
|
36
|
+
code: "0082592720153",
|
|
37
|
+
name: "100% boosted juice smoothie",
|
|
38
|
+
energy: 60,
|
|
39
|
+
protein: 0.890,
|
|
40
|
+
carbohydrates: 14.000,
|
|
41
|
+
carbohydratesSugar: 11.780,
|
|
42
|
+
fat: 0.000,
|
|
43
|
+
fatSaturated: 0.000,
|
|
44
|
+
fiber: 0.000,
|
|
45
|
+
sodium: 0.006,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const TEST_INGREDIENT_4 = new Ingredient({
|
|
49
|
+
id: 104,
|
|
50
|
+
uuid: "20a2ed05-f216-414a-a4a5-515d5bb9cb85",
|
|
51
|
+
code: "3596710427192",
|
|
52
|
+
name: "100% Cacao Boissons et Pâtisseries",
|
|
53
|
+
energy: 385,
|
|
54
|
+
protein: 22.000,
|
|
55
|
+
carbohydrates: 12.000,
|
|
56
|
+
carbohydratesSugar: 1.900,
|
|
57
|
+
fat: 21.000,
|
|
58
|
+
fatSaturated: 13.000,
|
|
59
|
+
fiber: 30.000,
|
|
60
|
+
sodium: 0.020,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export const TEST_INGREDIENT_5 = new Ingredient({
|
|
64
|
+
id: 105,
|
|
65
|
+
uuid: "12512223-5df8-457b-9f1f-9ff409e828fb",
|
|
66
|
+
code: "3036850776410",
|
|
67
|
+
name: "100% cacao non sucré",
|
|
68
|
+
energy: 367,
|
|
69
|
+
protein: 19.000,
|
|
70
|
+
carbohydrates: 12.000,
|
|
71
|
+
carbohydratesSugar: 1.900,
|
|
72
|
+
fat: 21.000,
|
|
73
|
+
fatSaturated: 13.000,
|
|
74
|
+
fiber: 27.000,
|
|
75
|
+
sodium: 0.020,
|
|
76
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { MeasurementCategory } from "components/Measurements/models/Category";
|
|
2
|
+
import { MeasurementEntry } from "components/Measurements/models/Entry";
|
|
3
|
+
|
|
4
|
+
export const TEST_MEASUREMENT_ENTRIES_1 = [
|
|
5
|
+
new MeasurementEntry(1, 1, new Date(2023, 1, 1), 10, "test note"),
|
|
6
|
+
new MeasurementEntry(2, 1, new Date(2023, 1, 2), 20, ""),
|
|
7
|
+
new MeasurementEntry(3, 1, new Date(2023, 1, 3), 30, "important note"),
|
|
8
|
+
new MeasurementEntry(4, 1, new Date(2023, 1, 4), 40, "this day was good"),
|
|
9
|
+
new MeasurementEntry(5, 1, new Date(2023, 1, 5), 50, ""),
|
|
10
|
+
new MeasurementEntry(6, 1, new Date(2023, 1, 6), 60, ""),
|
|
11
|
+
new MeasurementEntry(7, 1, new Date(2023, 1, 7), 70, ""),
|
|
12
|
+
new MeasurementEntry(8, 1, new Date(2023, 1, 8), 80, ""),
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export const TEST_MEASUREMENT_ENTRIES_2 = [
|
|
16
|
+
new MeasurementEntry(1, 2, new Date(2023, 3, 1), 11, ""),
|
|
17
|
+
new MeasurementEntry(2, 2, new Date(2023, 3, 2), 22, ""),
|
|
18
|
+
new MeasurementEntry(3, 2, new Date(2023, 3, 3), 33, ""),
|
|
19
|
+
new MeasurementEntry(4, 2, new Date(2023, 3, 4), 44, ""),
|
|
20
|
+
new MeasurementEntry(5, 2, new Date(2023, 3, 5), 55, ""),
|
|
21
|
+
new MeasurementEntry(6, 2, new Date(2023, 3, 6), 66, ""),
|
|
22
|
+
new MeasurementEntry(7, 2, new Date(2023, 3, 7), 77, ""),
|
|
23
|
+
new MeasurementEntry(8, 2, new Date(2023, 3, 8), 88, ""),
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export const TEST_MEASUREMENT_CATEGORY_1 = new MeasurementCategory(
|
|
28
|
+
1,
|
|
29
|
+
"Biceps",
|
|
30
|
+
"cm",
|
|
31
|
+
TEST_MEASUREMENT_ENTRIES_1,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export const TEST_MEASUREMENT_CATEGORY_2 = new MeasurementCategory(
|
|
36
|
+
2,
|
|
37
|
+
"Body fat",
|
|
38
|
+
"%",
|
|
39
|
+
TEST_MEASUREMENT_ENTRIES_2
|
|
40
|
+
);
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { DiaryEntry } from "components/Nutrition/models/diaryEntry";
|
|
2
|
+
import { TEST_INGREDIENT_1, TEST_INGREDIENT_2, TEST_INGREDIENT_3, TEST_INGREDIENT_4 } from "tests/ingredientTestdata";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export const TEST_DIARY_ENTRY_1 = new DiaryEntry({
|
|
6
|
+
id: 42,
|
|
7
|
+
planId: 1,
|
|
8
|
+
mealId: 78,
|
|
9
|
+
ingredientId: 101,
|
|
10
|
+
weightUnitId: null,
|
|
11
|
+
amount: 120,
|
|
12
|
+
datetime: new Date("2023-07-01"),
|
|
13
|
+
ingredient: TEST_INGREDIENT_1
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const TEST_DIARY_ENTRY_2 = new DiaryEntry({
|
|
17
|
+
id: 44,
|
|
18
|
+
planId: 1,
|
|
19
|
+
mealId: 78,
|
|
20
|
+
ingredientId: 102,
|
|
21
|
+
weightUnitId: null,
|
|
22
|
+
amount: 50,
|
|
23
|
+
datetime: new Date("2023-07-01"),
|
|
24
|
+
ingredient: TEST_INGREDIENT_2
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const TEST_DIARY_ENTRY_3 = new DiaryEntry({
|
|
28
|
+
id: 45,
|
|
29
|
+
planId: 1,
|
|
30
|
+
mealId: 78,
|
|
31
|
+
ingredientId: 103,
|
|
32
|
+
weightUnitId: null,
|
|
33
|
+
amount: 200,
|
|
34
|
+
datetime: new Date("2023-07-01"),
|
|
35
|
+
ingredient: TEST_INGREDIENT_3
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const TEST_DIARY_ENTRY_4 = new DiaryEntry({
|
|
39
|
+
id: 46,
|
|
40
|
+
planId: 1,
|
|
41
|
+
mealId: 78,
|
|
42
|
+
ingredientId: 103,
|
|
43
|
+
weightUnitId: null,
|
|
44
|
+
amount: 20,
|
|
45
|
+
datetime: new Date("2023-07-02"),
|
|
46
|
+
ingredient: TEST_INGREDIENT_3
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const TEST_DIARY_ENTRY_5 = new DiaryEntry({
|
|
50
|
+
id: 47,
|
|
51
|
+
planId: 1,
|
|
52
|
+
mealId: 78,
|
|
53
|
+
ingredientId: 103,
|
|
54
|
+
weightUnitId: null,
|
|
55
|
+
amount: 20,
|
|
56
|
+
datetime: new Date("2023-07-03"),
|
|
57
|
+
ingredient: TEST_INGREDIENT_3
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const TEST_DIARY_ENTRY_6 = new DiaryEntry({
|
|
61
|
+
id: 48,
|
|
62
|
+
planId: 1,
|
|
63
|
+
mealId: 78,
|
|
64
|
+
ingredientId: 103,
|
|
65
|
+
weightUnitId: null,
|
|
66
|
+
amount: 50,
|
|
67
|
+
datetime: new Date("2023-07-04"),
|
|
68
|
+
ingredient: TEST_INGREDIENT_3
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export const TEST_DIARY_ENTRY_7 = new DiaryEntry({
|
|
72
|
+
id: 49,
|
|
73
|
+
planId: 1,
|
|
74
|
+
mealId: 78,
|
|
75
|
+
ingredientId: 103,
|
|
76
|
+
weightUnitId: null,
|
|
77
|
+
amount: 50,
|
|
78
|
+
datetime: new Date("2023-07-05"),
|
|
79
|
+
ingredient: TEST_INGREDIENT_3
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const TEST_DIARY_ENTRY_8 = new DiaryEntry({
|
|
83
|
+
id: 50,
|
|
84
|
+
planId: 1,
|
|
85
|
+
mealId: 78,
|
|
86
|
+
ingredientId: 103,
|
|
87
|
+
weightUnitId: null,
|
|
88
|
+
amount: 100,
|
|
89
|
+
datetime: new Date("2023-07-06"),
|
|
90
|
+
ingredient: TEST_INGREDIENT_3
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export const TEST_DIARY_ENTRY_9 = new DiaryEntry({
|
|
94
|
+
id: 51,
|
|
95
|
+
planId: 1,
|
|
96
|
+
mealId: 999,
|
|
97
|
+
ingredientId: 103,
|
|
98
|
+
weightUnitId: null,
|
|
99
|
+
amount: 80,
|
|
100
|
+
datetime: new Date("2023-07-07"),
|
|
101
|
+
ingredient: TEST_INGREDIENT_3
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export const TEST_DIARY_ENTRY_10 = new DiaryEntry({
|
|
105
|
+
id: 51,
|
|
106
|
+
planId: 1,
|
|
107
|
+
mealId: 78,
|
|
108
|
+
ingredientId: 103,
|
|
109
|
+
weightUnitId: null,
|
|
110
|
+
amount: 80,
|
|
111
|
+
datetime: new Date("2023-07-08"),
|
|
112
|
+
ingredient: TEST_INGREDIENT_3
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const TEST_DIARY_ENTRY_11 = new DiaryEntry({
|
|
116
|
+
id: 52,
|
|
117
|
+
planId: 1,
|
|
118
|
+
mealId: 999,
|
|
119
|
+
ingredientId: 103,
|
|
120
|
+
weightUnitId: null,
|
|
121
|
+
amount: 500,
|
|
122
|
+
datetime: new Date("2023-06-01"),
|
|
123
|
+
ingredient: TEST_INGREDIENT_3
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export const TEST_DIARY_ENTRY_12 = new DiaryEntry({
|
|
127
|
+
id: 52,
|
|
128
|
+
planId: 1,
|
|
129
|
+
mealId: 999,
|
|
130
|
+
ingredientId: 104,
|
|
131
|
+
weightUnitId: null,
|
|
132
|
+
amount: 500,
|
|
133
|
+
datetime: new Date("2023-06-15"),
|
|
134
|
+
ingredient: TEST_INGREDIENT_4
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export const TEST_DIARY_ENTRY_13 = new DiaryEntry({
|
|
138
|
+
id: 53,
|
|
139
|
+
planId: 1,
|
|
140
|
+
mealId: 78,
|
|
141
|
+
ingredientId: 104,
|
|
142
|
+
weightUnitId: null,
|
|
143
|
+
amount: 500,
|
|
144
|
+
datetime: new Date("2023-06-20"),
|
|
145
|
+
ingredient: TEST_INGREDIENT_4
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
export const TEST_DIARY_ENTRY_14 = new DiaryEntry({
|
|
149
|
+
id: 54,
|
|
150
|
+
planId: 1,
|
|
151
|
+
mealId: null,
|
|
152
|
+
ingredientId: 104,
|
|
153
|
+
weightUnitId: null,
|
|
154
|
+
amount: 20,
|
|
155
|
+
datetime: new Date("2023-08-20"),
|
|
156
|
+
ingredient: TEST_INGREDIENT_4
|
|
157
|
+
});
|
|
158
|
+
export const TEST_DIARY_ENTRY_15 = new DiaryEntry({
|
|
159
|
+
id: 54,
|
|
160
|
+
planId: 1,
|
|
161
|
+
mealId: null,
|
|
162
|
+
ingredientId: 103,
|
|
163
|
+
weightUnitId: null,
|
|
164
|
+
amount: 50,
|
|
165
|
+
datetime: new Date("2023-08-20"),
|
|
166
|
+
ingredient: TEST_INGREDIENT_4
|
|
167
|
+
});
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { Meal } from "components/Nutrition/models/meal";
|
|
2
|
+
import { MealItem } from "components/Nutrition/models/mealItem";
|
|
3
|
+
import { NutritionalPlan } from "components/Nutrition/models/nutritionalPlan";
|
|
4
|
+
import { NutritionWeightUnit } from "components/Nutrition/models/weightUnit";
|
|
5
|
+
import {
|
|
6
|
+
TEST_INGREDIENT_1,
|
|
7
|
+
TEST_INGREDIENT_2,
|
|
8
|
+
TEST_INGREDIENT_3,
|
|
9
|
+
TEST_INGREDIENT_4,
|
|
10
|
+
TEST_INGREDIENT_5
|
|
11
|
+
} from "tests/ingredientTestdata";
|
|
12
|
+
import {
|
|
13
|
+
TEST_DIARY_ENTRY_1,
|
|
14
|
+
TEST_DIARY_ENTRY_10,
|
|
15
|
+
TEST_DIARY_ENTRY_11,
|
|
16
|
+
TEST_DIARY_ENTRY_12,
|
|
17
|
+
TEST_DIARY_ENTRY_13,
|
|
18
|
+
TEST_DIARY_ENTRY_14,
|
|
19
|
+
TEST_DIARY_ENTRY_15,
|
|
20
|
+
TEST_DIARY_ENTRY_2,
|
|
21
|
+
TEST_DIARY_ENTRY_3,
|
|
22
|
+
TEST_DIARY_ENTRY_4,
|
|
23
|
+
TEST_DIARY_ENTRY_5,
|
|
24
|
+
TEST_DIARY_ENTRY_6,
|
|
25
|
+
TEST_DIARY_ENTRY_7,
|
|
26
|
+
TEST_DIARY_ENTRY_8,
|
|
27
|
+
TEST_DIARY_ENTRY_9
|
|
28
|
+
} from "tests/nutritionDiaryTestdata";
|
|
29
|
+
import { HHMMToDateTime } from "utils/date";
|
|
30
|
+
|
|
31
|
+
export const TEST_WEIGHT_UNIT_SLICE = new NutritionWeightUnit(
|
|
32
|
+
5432,
|
|
33
|
+
1,
|
|
34
|
+
50,
|
|
35
|
+
'slice',
|
|
36
|
+
);
|
|
37
|
+
export const TEST_WEIGHT_UNIT_CUP = new NutritionWeightUnit(
|
|
38
|
+
5544,
|
|
39
|
+
1,
|
|
40
|
+
300,
|
|
41
|
+
'Cup',
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export const TEST_MEAL_ITEM_1 = new MealItem({
|
|
46
|
+
id: 42,
|
|
47
|
+
mealId: 1001,
|
|
48
|
+
amount: 120,
|
|
49
|
+
order: 3,
|
|
50
|
+
ingredient: TEST_INGREDIENT_1,
|
|
51
|
+
ingredientId: 101,
|
|
52
|
+
weightUnitId: null,
|
|
53
|
+
});
|
|
54
|
+
export const TEST_MEAL_ITEM_2 = new MealItem({
|
|
55
|
+
id: 43,
|
|
56
|
+
mealId: 1001,
|
|
57
|
+
amount: 220,
|
|
58
|
+
order: 1,
|
|
59
|
+
ingredientId: 102,
|
|
60
|
+
weightUnitId: null,
|
|
61
|
+
ingredient: TEST_INGREDIENT_2
|
|
62
|
+
});
|
|
63
|
+
export const TEST_MEAL_ITEM_3 = new MealItem({
|
|
64
|
+
id: 45,
|
|
65
|
+
mealId: 1001,
|
|
66
|
+
amount: 320,
|
|
67
|
+
order: 2,
|
|
68
|
+
ingredientId: 104,
|
|
69
|
+
weightUnitId: null,
|
|
70
|
+
ingredient: TEST_INGREDIENT_4
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export const TEST_MEAL_ITEM_4 = new MealItem({
|
|
74
|
+
id: 46,
|
|
75
|
+
mealId: 999,
|
|
76
|
+
amount: 320,
|
|
77
|
+
order: 1,
|
|
78
|
+
ingredientId: 105,
|
|
79
|
+
weightUnitId: null,
|
|
80
|
+
ingredient: TEST_INGREDIENT_5
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const TEST_MEAL_ITEM_5 = new MealItem({
|
|
84
|
+
id: 47,
|
|
85
|
+
mealId: 1,
|
|
86
|
+
amount: 320,
|
|
87
|
+
order: 1,
|
|
88
|
+
ingredientId: 101,
|
|
89
|
+
weightUnitId: null,
|
|
90
|
+
ingredient: TEST_INGREDIENT_1
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export const TEST_MEAL_ITEM_6 = new MealItem({
|
|
94
|
+
id: 48,
|
|
95
|
+
mealId: 123,
|
|
96
|
+
amount: 100,
|
|
97
|
+
order: 2,
|
|
98
|
+
ingredientId: 102,
|
|
99
|
+
weightUnitId: null,
|
|
100
|
+
ingredient: TEST_INGREDIENT_2
|
|
101
|
+
});
|
|
102
|
+
export const TEST_MEAL_ITEM_7 = new MealItem({
|
|
103
|
+
id: 103,
|
|
104
|
+
mealId: 2345,
|
|
105
|
+
amount: 100,
|
|
106
|
+
order: 1,
|
|
107
|
+
ingredientId: 109,
|
|
108
|
+
weightUnitId: null,
|
|
109
|
+
ingredient: TEST_INGREDIENT_3
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export const TEST_MEAL_ITEM_8 = new MealItem({
|
|
113
|
+
id: 104,
|
|
114
|
+
mealId: 2222,
|
|
115
|
+
amount: 120,
|
|
116
|
+
order: 1,
|
|
117
|
+
ingredientId: 110,
|
|
118
|
+
weightUnitId: null,
|
|
119
|
+
ingredient: TEST_INGREDIENT_4
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
export const TEST_MEAL_1 = new Meal({
|
|
124
|
+
id: 78,
|
|
125
|
+
planId: 123,
|
|
126
|
+
order: 2,
|
|
127
|
+
time: HHMMToDateTime('12:30'),
|
|
128
|
+
name: 'Second breakfast',
|
|
129
|
+
});
|
|
130
|
+
TEST_MEAL_1.items = [TEST_MEAL_ITEM_1, TEST_MEAL_ITEM_2, TEST_MEAL_ITEM_3];
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
export const TEST_MEAL_2 = new Meal({
|
|
134
|
+
id: 999,
|
|
135
|
+
order: 3,
|
|
136
|
+
time: HHMMToDateTime('22:30'),
|
|
137
|
+
name: 'evening snack',
|
|
138
|
+
});
|
|
139
|
+
TEST_MEAL_2.items = [TEST_MEAL_ITEM_4];
|
|
140
|
+
|
|
141
|
+
export const TEST_MEAL_3 = new Meal({
|
|
142
|
+
id: 1,
|
|
143
|
+
order: 1,
|
|
144
|
+
time: HHMMToDateTime('6:30'),
|
|
145
|
+
name: 'breakfast',
|
|
146
|
+
});
|
|
147
|
+
TEST_MEAL_3.items = [TEST_MEAL_ITEM_5, TEST_MEAL_ITEM_6];
|
|
148
|
+
|
|
149
|
+
export const TEST_MEAL_4 = new Meal({
|
|
150
|
+
id: 2,
|
|
151
|
+
order: 1,
|
|
152
|
+
time: HHMMToDateTime('7:45'),
|
|
153
|
+
name: 'Cake time',
|
|
154
|
+
});
|
|
155
|
+
TEST_MEAL_4.items = [TEST_MEAL_ITEM_7];
|
|
156
|
+
|
|
157
|
+
export const TEST_MEAL_5 = new Meal({
|
|
158
|
+
id: 22,
|
|
159
|
+
order: 2,
|
|
160
|
+
time: HHMMToDateTime('12:00'),
|
|
161
|
+
name: 'Time to visit McDonalds',
|
|
162
|
+
});
|
|
163
|
+
TEST_MEAL_5.items = [TEST_MEAL_ITEM_8];
|
|
164
|
+
|
|
165
|
+
export const TEST_NUTRITIONAL_PLAN_1 = new NutritionalPlan({
|
|
166
|
+
id: 101,
|
|
167
|
+
creationDate: new Date('2023-01-01'),
|
|
168
|
+
description: 'Summer body!!!',
|
|
169
|
+
});
|
|
170
|
+
TEST_NUTRITIONAL_PLAN_1.meals = [
|
|
171
|
+
TEST_MEAL_1,
|
|
172
|
+
TEST_MEAL_2,
|
|
173
|
+
TEST_MEAL_3,
|
|
174
|
+
];
|
|
175
|
+
|
|
176
|
+
TEST_NUTRITIONAL_PLAN_1.diaryEntries = [
|
|
177
|
+
TEST_DIARY_ENTRY_1,
|
|
178
|
+
TEST_DIARY_ENTRY_2,
|
|
179
|
+
TEST_DIARY_ENTRY_3,
|
|
180
|
+
TEST_DIARY_ENTRY_4,
|
|
181
|
+
TEST_DIARY_ENTRY_5,
|
|
182
|
+
TEST_DIARY_ENTRY_6,
|
|
183
|
+
TEST_DIARY_ENTRY_7,
|
|
184
|
+
TEST_DIARY_ENTRY_8,
|
|
185
|
+
TEST_DIARY_ENTRY_9,
|
|
186
|
+
TEST_DIARY_ENTRY_10,
|
|
187
|
+
TEST_DIARY_ENTRY_11,
|
|
188
|
+
TEST_DIARY_ENTRY_12,
|
|
189
|
+
TEST_DIARY_ENTRY_13,
|
|
190
|
+
TEST_DIARY_ENTRY_14,
|
|
191
|
+
TEST_DIARY_ENTRY_15,
|
|
192
|
+
];
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
export const TEST_NUTRITIONAL_PLAN_2 = new NutritionalPlan({
|
|
196
|
+
id: 222,
|
|
197
|
+
creationDate: new Date('2023-08-01'),
|
|
198
|
+
description: 'Bulking till we puke',
|
|
199
|
+
});
|
|
200
|
+
TEST_NUTRITIONAL_PLAN_2.meals = [TEST_MEAL_4, TEST_MEAL_5];
|