@burdenoff/microfe-mybodyshield 2026.525.1 → 2026.705.2
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/dist/_virtual/_rolldown/runtime.js +20 -0
- package/dist/index.js +6 -4
- package/dist/mybodyshield/MyBodyShieldRoot.js +101 -350
- package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
- package/dist/mybodyshield/MyBodyShieldRoutes.js +66 -193
- package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
- package/dist/mybodyshield/components/DataTable.js +75 -0
- package/dist/mybodyshield/components/DataTable.js.map +1 -0
- package/dist/mybodyshield/components/EmptyState.js +35 -0
- package/dist/mybodyshield/components/EmptyState.js.map +1 -0
- package/dist/mybodyshield/components/EvidenceUpload.js +93 -0
- package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -0
- package/dist/mybodyshield/components/FileLink.js +36 -0
- package/dist/mybodyshield/components/FileLink.js.map +1 -0
- package/dist/mybodyshield/components/FilterTabs.js +27 -0
- package/dist/mybodyshield/components/FilterTabs.js.map +1 -0
- package/dist/mybodyshield/components/MetricsCard.js +64 -0
- package/dist/mybodyshield/components/MetricsCard.js.map +1 -0
- package/dist/mybodyshield/components/MiniBar.js +22 -0
- package/dist/mybodyshield/components/MiniBar.js.map +1 -0
- package/dist/mybodyshield/components/MybDiscussion.js +109 -0
- package/dist/mybodyshield/components/MybDiscussion.js.map +1 -0
- package/dist/mybodyshield/components/MybTags.js +149 -0
- package/dist/mybodyshield/components/MybTags.js.map +1 -0
- package/dist/mybodyshield/components/PageLayout.js +38 -0
- package/dist/mybodyshield/components/PageLayout.js.map +1 -0
- package/dist/mybodyshield/components/Pagination.js +50 -0
- package/dist/mybodyshield/components/Pagination.js.map +1 -0
- package/dist/mybodyshield/components/StateViews.js +49 -0
- package/dist/mybodyshield/components/StateViews.js.map +1 -0
- package/dist/mybodyshield/components/StatusBadge.js +62 -0
- package/dist/mybodyshield/components/StatusBadge.js.map +1 -0
- package/dist/mybodyshield/components/Tabs.js +31 -0
- package/dist/mybodyshield/components/Tabs.js.map +1 -0
- package/dist/mybodyshield/components/UserSearchSelect.js +148 -0
- package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -0
- package/dist/mybodyshield/components/index.js +15 -0
- package/dist/mybodyshield/context/MyBodyShieldContext.js +85 -0
- package/dist/mybodyshield/context/MyBodyShieldContext.js.map +1 -0
- package/dist/mybodyshield/context/index.js +1 -0
- package/dist/mybodyshield/hooks/index.js +6 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js +398 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.js.map +1 -0
- package/dist/mybodyshield/hooks/useMybComments.js +45 -0
- package/dist/mybodyshield/hooks/useMybComments.js.map +1 -0
- package/dist/mybodyshield/hooks/useMybFiles.js +81 -0
- package/dist/mybodyshield/hooks/useMybFiles.js.map +1 -0
- package/dist/mybodyshield/hooks/useMybTags.js +89 -0
- package/dist/mybodyshield/hooks/useMybTags.js.map +1 -0
- package/dist/mybodyshield/hooks/useMybUsers.js +36 -0
- package/dist/mybodyshield/hooks/useMybUsers.js.map +1 -0
- package/dist/mybodyshield/hooks/usePager.js +27 -0
- package/dist/mybodyshield/hooks/usePager.js.map +1 -0
- package/dist/mybodyshield/index.js +5 -2
- package/dist/mybodyshield/pages/DashboardPage.js +432 -0
- package/dist/mybodyshield/pages/DashboardPage.js.map +1 -0
- package/dist/mybodyshield/pages/_shared/visuals.js +261 -0
- package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -0
- package/dist/mybodyshield/pages/coaching/CoachingPage.js +446 -0
- package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -0
- package/dist/mybodyshield/pages/goals/GoalsPage.js +510 -0
- package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -0
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js +1012 -0
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -0
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +932 -0
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -0
- package/dist/mybodyshield/pages/programs/ProgramsPage.js +450 -0
- package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -0
- package/dist/mybodyshield/pages/progress/ProgressPage.js +484 -0
- package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -0
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js +484 -0
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -0
- package/dist/mybodyshield/pages/train/SessionDetailPage.js +579 -0
- package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -0
- package/dist/mybodyshield/pages/train/SessionsPage.js +294 -0
- package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -0
- package/dist/mybodyshield/utils/cn.js +10 -0
- package/dist/mybodyshield/utils/cn.js.map +1 -0
- package/dist/mybodyshield/utils/formatters.js +76 -0
- package/dist/mybodyshield/utils/formatters.js.map +1 -0
- package/dist/mybodyshield/utils/navigation.js +2 -1
- package/dist/mybodyshield/utils/navigation.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/d3-array/src/ascending.js +8 -0
- package/dist/node_modules/d3-array/src/ascending.js.map +1 -0
- package/dist/node_modules/d3-array/src/bisect.js +10 -0
- package/dist/node_modules/d3-array/src/bisect.js.map +1 -0
- package/dist/node_modules/d3-array/src/bisector.js +43 -0
- package/dist/node_modules/d3-array/src/bisector.js.map +1 -0
- package/dist/node_modules/d3-array/src/descending.js +8 -0
- package/dist/node_modules/d3-array/src/descending.js.map +1 -0
- package/dist/node_modules/d3-array/src/max.js +14 -0
- package/dist/node_modules/d3-array/src/max.js.map +1 -0
- package/dist/node_modules/d3-array/src/min.js +14 -0
- package/dist/node_modules/d3-array/src/min.js.map +1 -0
- package/dist/node_modules/d3-array/src/number.js +15 -0
- package/dist/node_modules/d3-array/src/number.js.map +1 -0
- package/dist/node_modules/d3-array/src/quantile.js +25 -0
- package/dist/node_modules/d3-array/src/quantile.js.map +1 -0
- package/dist/node_modules/d3-array/src/quickselect.js +26 -0
- package/dist/node_modules/d3-array/src/quickselect.js.map +1 -0
- package/dist/node_modules/d3-array/src/range.js +10 -0
- package/dist/node_modules/d3-array/src/range.js.map +1 -0
- package/dist/node_modules/d3-array/src/sort.js +17 -0
- package/dist/node_modules/d3-array/src/sort.js.map +1 -0
- package/dist/node_modules/d3-array/src/ticks.js +34 -0
- package/dist/node_modules/d3-array/src/ticks.js.map +1 -0
- package/dist/node_modules/d3-color/src/color.js +291 -0
- package/dist/node_modules/d3-color/src/color.js.map +1 -0
- package/dist/node_modules/d3-color/src/define.js +13 -0
- package/dist/node_modules/d3-color/src/define.js.map +1 -0
- package/dist/node_modules/d3-format/src/defaultLocale.js +15 -0
- package/dist/node_modules/d3-format/src/defaultLocale.js.map +1 -0
- package/dist/node_modules/d3-format/src/exponent.js +9 -0
- package/dist/node_modules/d3-format/src/exponent.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatDecimal.js +13 -0
- package/dist/node_modules/d3-format/src/formatDecimal.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatGroup.js +11 -0
- package/dist/node_modules/d3-format/src/formatGroup.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatNumerals.js +12 -0
- package/dist/node_modules/d3-format/src/formatNumerals.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js +13 -0
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatRounded.js +12 -0
- package/dist/node_modules/d3-format/src/formatRounded.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatSpecifier.js +29 -0
- package/dist/node_modules/d3-format/src/formatSpecifier.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatTrim.js +20 -0
- package/dist/node_modules/d3-format/src/formatTrim.js.map +1 -0
- package/dist/node_modules/d3-format/src/formatTypes.js +23 -0
- package/dist/node_modules/d3-format/src/formatTypes.js.map +1 -0
- package/dist/node_modules/d3-format/src/identity.js +8 -0
- package/dist/node_modules/d3-format/src/identity.js.map +1 -0
- package/dist/node_modules/d3-format/src/locale.js +86 -0
- package/dist/node_modules/d3-format/src/locale.js.map +1 -0
- package/dist/node_modules/d3-format/src/precisionFixed.js +9 -0
- package/dist/node_modules/d3-format/src/precisionFixed.js.map +1 -0
- package/dist/node_modules/d3-format/src/precisionPrefix.js +9 -0
- package/dist/node_modules/d3-format/src/precisionPrefix.js.map +1 -0
- package/dist/node_modules/d3-format/src/precisionRound.js +9 -0
- package/dist/node_modules/d3-format/src/precisionRound.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/array.js +15 -0
- package/dist/node_modules/d3-interpolate/src/array.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/basis.js +16 -0
- package/dist/node_modules/d3-interpolate/src/basis.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/basisClosed.js +13 -0
- package/dist/node_modules/d3-interpolate/src/basisClosed.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/color.js +25 -0
- package/dist/node_modules/d3-interpolate/src/color.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/constant.js +6 -0
- package/dist/node_modules/d3-interpolate/src/constant.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/date.js +11 -0
- package/dist/node_modules/d3-interpolate/src/date.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/number.js +10 -0
- package/dist/node_modules/d3-interpolate/src/number.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/numberArray.js +16 -0
- package/dist/node_modules/d3-interpolate/src/numberArray.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/object.js +14 -0
- package/dist/node_modules/d3-interpolate/src/object.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/piecewise.js +14 -0
- package/dist/node_modules/d3-interpolate/src/piecewise.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/rgb.js +19 -0
- package/dist/node_modules/d3-interpolate/src/rgb.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/round.js +10 -0
- package/dist/node_modules/d3-interpolate/src/round.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/string.js +28 -0
- package/dist/node_modules/d3-interpolate/src/string.js.map +1 -0
- package/dist/node_modules/d3-interpolate/src/value.js +18 -0
- package/dist/node_modules/d3-interpolate/src/value.js.map +1 -0
- package/dist/node_modules/d3-path/src/path.js +65 -0
- package/dist/node_modules/d3-path/src/path.js.map +1 -0
- package/dist/node_modules/d3-scale/src/band.js +52 -0
- package/dist/node_modules/d3-scale/src/band.js.map +1 -0
- package/dist/node_modules/d3-scale/src/constant.js +10 -0
- package/dist/node_modules/d3-scale/src/constant.js.map +1 -0
- package/dist/node_modules/d3-scale/src/continuous.js +73 -0
- package/dist/node_modules/d3-scale/src/continuous.js.map +1 -0
- package/dist/node_modules/d3-scale/src/diverging.js +82 -0
- package/dist/node_modules/d3-scale/src/diverging.js.map +1 -0
- package/dist/node_modules/d3-scale/src/identity.js +20 -0
- package/dist/node_modules/d3-scale/src/identity.js.map +1 -0
- package/dist/node_modules/d3-scale/src/init.js +29 -0
- package/dist/node_modules/d3-scale/src/init.js.map +1 -0
- package/dist/node_modules/d3-scale/src/linear.js +36 -0
- package/dist/node_modules/d3-scale/src/linear.js.map +1 -0
- package/dist/node_modules/d3-scale/src/log.js +77 -0
- package/dist/node_modules/d3-scale/src/log.js.map +1 -0
- package/dist/node_modules/d3-scale/src/nice.js +10 -0
- package/dist/node_modules/d3-scale/src/nice.js.map +1 -0
- package/dist/node_modules/d3-scale/src/number.js +8 -0
- package/dist/node_modules/d3-scale/src/number.js.map +1 -0
- package/dist/node_modules/d3-scale/src/ordinal.js +31 -0
- package/dist/node_modules/d3-scale/src/ordinal.js.map +1 -0
- package/dist/node_modules/d3-scale/src/pow.js +37 -0
- package/dist/node_modules/d3-scale/src/pow.js.map +1 -0
- package/dist/node_modules/d3-scale/src/quantile.js +37 -0
- package/dist/node_modules/d3-scale/src/quantile.js.map +1 -0
- package/dist/node_modules/d3-scale/src/quantize.js +33 -0
- package/dist/node_modules/d3-scale/src/quantize.js.map +1 -0
- package/dist/node_modules/d3-scale/src/radial.js +39 -0
- package/dist/node_modules/d3-scale/src/radial.js.map +1 -0
- package/dist/node_modules/d3-scale/src/sequential.js +67 -0
- package/dist/node_modules/d3-scale/src/sequential.js.map +1 -0
- package/dist/node_modules/d3-scale/src/sequentialQuantile.js +30 -0
- package/dist/node_modules/d3-scale/src/sequentialQuantile.js.map +1 -0
- package/dist/node_modules/d3-scale/src/symlog.js +30 -0
- package/dist/node_modules/d3-scale/src/symlog.js.map +1 -0
- package/dist/node_modules/d3-scale/src/threshold.js +25 -0
- package/dist/node_modules/d3-scale/src/threshold.js.map +1 -0
- package/dist/node_modules/d3-scale/src/tickFormat.js +31 -0
- package/dist/node_modules/d3-scale/src/tickFormat.js.map +1 -0
- package/dist/node_modules/d3-scale/src/time.js +47 -0
- package/dist/node_modules/d3-scale/src/time.js.map +1 -0
- package/dist/node_modules/d3-scale/src/utcTime.js +19 -0
- package/dist/node_modules/d3-scale/src/utcTime.js.map +1 -0
- package/dist/node_modules/d3-shape/src/area.js +55 -0
- package/dist/node_modules/d3-shape/src/area.js.map +1 -0
- package/dist/node_modules/d3-shape/src/array.js +8 -0
- package/dist/node_modules/d3-shape/src/array.js.map +1 -0
- package/dist/node_modules/d3-shape/src/constant.js +10 -0
- package/dist/node_modules/d3-shape/src/constant.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/basis.js +49 -0
- package/dist/node_modules/d3-shape/src/curve/basis.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js +50 -0
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js +46 -0
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/bump.js +40 -0
- package/dist/node_modules/d3-shape/src/curve/bump.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/linear.js +36 -0
- package/dist/node_modules/d3-shape/src/curve/linear.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js +25 -0
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/monotone.js +94 -0
- package/dist/node_modules/d3-shape/src/curve/monotone.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/natural.js +39 -0
- package/dist/node_modules/d3-shape/src/curve/natural.js.map +1 -0
- package/dist/node_modules/d3-shape/src/curve/step.js +47 -0
- package/dist/node_modules/d3-shape/src/curve/step.js.map +1 -0
- package/dist/node_modules/d3-shape/src/line.js +30 -0
- package/dist/node_modules/d3-shape/src/line.js.map +1 -0
- package/dist/node_modules/d3-shape/src/math.js +8 -0
- package/dist/node_modules/d3-shape/src/math.js.map +1 -0
- package/dist/node_modules/d3-shape/src/noop.js +6 -0
- package/dist/node_modules/d3-shape/src/noop.js.map +1 -0
- package/dist/node_modules/d3-shape/src/offset/expand.js +15 -0
- package/dist/node_modules/d3-shape/src/offset/expand.js.map +1 -0
- package/dist/node_modules/d3-shape/src/offset/none.js +8 -0
- package/dist/node_modules/d3-shape/src/offset/none.js.map +1 -0
- package/dist/node_modules/d3-shape/src/offset/silhouette.js +15 -0
- package/dist/node_modules/d3-shape/src/offset/silhouette.js.map +1 -0
- package/dist/node_modules/d3-shape/src/offset/wiggle.js +21 -0
- package/dist/node_modules/d3-shape/src/offset/wiggle.js.map +1 -0
- package/dist/node_modules/d3-shape/src/order/none.js +9 -0
- package/dist/node_modules/d3-shape/src/order/none.js.map +1 -0
- package/dist/node_modules/d3-shape/src/path.js +19 -0
- package/dist/node_modules/d3-shape/src/path.js.map +1 -0
- package/dist/node_modules/d3-shape/src/point.js +11 -0
- package/dist/node_modules/d3-shape/src/point.js.map +1 -0
- package/dist/node_modules/d3-shape/src/stack.js +34 -0
- package/dist/node_modules/d3-shape/src/stack.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol/circle.js +10 -0
- package/dist/node_modules/d3-shape/src/symbol/circle.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol/cross.js +10 -0
- package/dist/node_modules/d3-shape/src/symbol/cross.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol/diamond.js +10 -0
- package/dist/node_modules/d3-shape/src/symbol/diamond.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol/square.js +10 -0
- package/dist/node_modules/d3-shape/src/symbol/square.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol/star.js +15 -0
- package/dist/node_modules/d3-shape/src/symbol/star.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol/triangle.js +10 -0
- package/dist/node_modules/d3-shape/src/symbol/triangle.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol/wye.js +10 -0
- package/dist/node_modules/d3-shape/src/symbol/wye.js.map +1 -0
- package/dist/node_modules/d3-shape/src/symbol.js +23 -0
- package/dist/node_modules/d3-shape/src/symbol.js.map +1 -0
- package/dist/node_modules/d3-time/src/day.js +21 -0
- package/dist/node_modules/d3-time/src/day.js.map +1 -0
- package/dist/node_modules/d3-time/src/duration.js +6 -0
- package/dist/node_modules/d3-time/src/duration.js.map +1 -0
- package/dist/node_modules/d3-time/src/hour.js +19 -0
- package/dist/node_modules/d3-time/src/hour.js.map +1 -0
- package/dist/node_modules/d3-time/src/interval.js +28 -0
- package/dist/node_modules/d3-time/src/interval.js.map +1 -0
- package/dist/node_modules/d3-time/src/millisecond.js +14 -0
- package/dist/node_modules/d3-time/src/millisecond.js.map +1 -0
- package/dist/node_modules/d3-time/src/minute.js +19 -0
- package/dist/node_modules/d3-time/src/minute.js.map +1 -0
- package/dist/node_modules/d3-time/src/month.js +18 -0
- package/dist/node_modules/d3-time/src/month.js.map +1 -0
- package/dist/node_modules/d3-time/src/second.js +13 -0
- package/dist/node_modules/d3-time/src/second.js.map +1 -0
- package/dist/node_modules/d3-time/src/ticks.js +125 -0
- package/dist/node_modules/d3-time/src/ticks.js.map +1 -0
- package/dist/node_modules/d3-time/src/week.js +25 -0
- package/dist/node_modules/d3-time/src/week.js.map +1 -0
- package/dist/node_modules/d3-time/src/year.js +26 -0
- package/dist/node_modules/d3-time/src/year.js.map +1 -0
- package/dist/node_modules/d3-time-format/src/defaultLocale.js +62 -0
- package/dist/node_modules/d3-time-format/src/defaultLocale.js.map +1 -0
- package/dist/node_modules/d3-time-format/src/locale.js +490 -0
- package/dist/node_modules/d3-time-format/src/locale.js.map +1 -0
- package/dist/node_modules/decimal.js-light/decimal.js +378 -0
- package/dist/node_modules/decimal.js-light/decimal.js.map +1 -0
- package/dist/node_modules/eventemitter3/index.js +95 -0
- package/dist/node_modules/eventemitter3/index.js.map +1 -0
- package/dist/node_modules/fast-equals/dist/es/index.js +267 -0
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -0
- package/dist/node_modules/internmap/src/index.js +40 -0
- package/dist/node_modules/internmap/src/index.js.map +1 -0
- package/dist/node_modules/lodash/_DataView.js +12 -0
- package/dist/node_modules/lodash/_DataView.js.map +1 -0
- package/dist/node_modules/lodash/_Hash.js +23 -0
- package/dist/node_modules/lodash/_Hash.js.map +1 -0
- package/dist/node_modules/lodash/_ListCache.js +23 -0
- package/dist/node_modules/lodash/_ListCache.js.map +1 -0
- package/dist/node_modules/lodash/_Map.js +12 -0
- package/dist/node_modules/lodash/_Map.js.map +1 -0
- package/dist/node_modules/lodash/_MapCache.js +23 -0
- package/dist/node_modules/lodash/_MapCache.js.map +1 -0
- package/dist/node_modules/lodash/_Promise.js +12 -0
- package/dist/node_modules/lodash/_Promise.js.map +1 -0
- package/dist/node_modules/lodash/_Set.js +12 -0
- package/dist/node_modules/lodash/_Set.js.map +1 -0
- package/dist/node_modules/lodash/_SetCache.js +18 -0
- package/dist/node_modules/lodash/_SetCache.js.map +1 -0
- package/dist/node_modules/lodash/_Stack.js +20 -0
- package/dist/node_modules/lodash/_Stack.js.map +1 -0
- package/dist/node_modules/lodash/_Symbol.js +11 -0
- package/dist/node_modules/lodash/_Symbol.js.map +1 -0
- package/dist/node_modules/lodash/_Uint8Array.js +11 -0
- package/dist/node_modules/lodash/_Uint8Array.js.map +1 -0
- package/dist/node_modules/lodash/_WeakMap.js +12 -0
- package/dist/node_modules/lodash/_WeakMap.js.map +1 -0
- package/dist/node_modules/lodash/_apply.js +19 -0
- package/dist/node_modules/lodash/_apply.js.map +1 -0
- package/dist/node_modules/lodash/_arrayEvery.js +14 -0
- package/dist/node_modules/lodash/_arrayEvery.js.map +1 -0
- package/dist/node_modules/lodash/_arrayFilter.js +17 -0
- package/dist/node_modules/lodash/_arrayFilter.js.map +1 -0
- package/dist/node_modules/lodash/_arrayIncludes.js +15 -0
- package/dist/node_modules/lodash/_arrayIncludes.js.map +1 -0
- package/dist/node_modules/lodash/_arrayIncludesWith.js +14 -0
- package/dist/node_modules/lodash/_arrayIncludesWith.js.map +1 -0
- package/dist/node_modules/lodash/_arrayLikeKeys.js +22 -0
- package/dist/node_modules/lodash/_arrayLikeKeys.js.map +1 -0
- package/dist/node_modules/lodash/_arrayMap.js +14 -0
- package/dist/node_modules/lodash/_arrayMap.js.map +1 -0
- package/dist/node_modules/lodash/_arrayPush.js +14 -0
- package/dist/node_modules/lodash/_arrayPush.js.map +1 -0
- package/dist/node_modules/lodash/_arraySome.js +14 -0
- package/dist/node_modules/lodash/_arraySome.js.map +1 -0
- package/dist/node_modules/lodash/_asciiToArray.js +13 -0
- package/dist/node_modules/lodash/_asciiToArray.js.map +1 -0
- package/dist/node_modules/lodash/_assocIndexOf.js +16 -0
- package/dist/node_modules/lodash/_assocIndexOf.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignValue.js +20 -0
- package/dist/node_modules/lodash/_baseAssignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseEach.js +13 -0
- package/dist/node_modules/lodash/_baseEach.js.map +1 -0
- package/dist/node_modules/lodash/_baseEvery.js +18 -0
- package/dist/node_modules/lodash/_baseEvery.js.map +1 -0
- package/dist/node_modules/lodash/_baseExtremum.js +19 -0
- package/dist/node_modules/lodash/_baseExtremum.js.map +1 -0
- package/dist/node_modules/lodash/_baseFindIndex.js +14 -0
- package/dist/node_modules/lodash/_baseFindIndex.js.map +1 -0
- package/dist/node_modules/lodash/_baseFlatten.js +21 -0
- package/dist/node_modules/lodash/_baseFlatten.js.map +1 -0
- package/dist/node_modules/lodash/_baseFor.js +11 -0
- package/dist/node_modules/lodash/_baseFor.js.map +1 -0
- package/dist/node_modules/lodash/_baseForOwn.js +16 -0
- package/dist/node_modules/lodash/_baseForOwn.js.map +1 -0
- package/dist/node_modules/lodash/_baseGet.js +18 -0
- package/dist/node_modules/lodash/_baseGet.js.map +1 -0
- package/dist/node_modules/lodash/_baseGetAllKeys.js +17 -0
- package/dist/node_modules/lodash/_baseGetAllKeys.js.map +1 -0
- package/dist/node_modules/lodash/_baseGetTag.js +17 -0
- package/dist/node_modules/lodash/_baseGetTag.js.map +1 -0
- package/dist/node_modules/lodash/_baseGt.js +13 -0
- package/dist/node_modules/lodash/_baseGt.js.map +1 -0
- package/dist/node_modules/lodash/_baseHasIn.js +13 -0
- package/dist/node_modules/lodash/_baseHasIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseIndexOf.js +17 -0
- package/dist/node_modules/lodash/_baseIndexOf.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsArguments.js +16 -0
- package/dist/node_modules/lodash/_baseIsArguments.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsEqual.js +16 -0
- package/dist/node_modules/lodash/_baseIsEqual.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsEqualDeep.js +37 -0
- package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMatch.js +33 -0
- package/dist/node_modules/lodash/_baseIsMatch.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsNaN.js +13 -0
- package/dist/node_modules/lodash/_baseIsNaN.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsNative.js +18 -0
- package/dist/node_modules/lodash/_baseIsNative.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsTypedArray.js +18 -0
- package/dist/node_modules/lodash/_baseIsTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_baseIteratee.js +19 -0
- package/dist/node_modules/lodash/_baseIteratee.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeys.js +19 -0
- package/dist/node_modules/lodash/_baseKeys.js.map +1 -0
- package/dist/node_modules/lodash/_baseLt.js +13 -0
- package/dist/node_modules/lodash/_baseLt.js.map +1 -0
- package/dist/node_modules/lodash/_baseMap.js +19 -0
- package/dist/node_modules/lodash/_baseMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseMatches.js +20 -0
- package/dist/node_modules/lodash/_baseMatches.js.map +1 -0
- package/dist/node_modules/lodash/_baseMatchesProperty.js +24 -0
- package/dist/node_modules/lodash/_baseMatchesProperty.js.map +1 -0
- package/dist/node_modules/lodash/_baseOrderBy.js +39 -0
- package/dist/node_modules/lodash/_baseOrderBy.js.map +1 -0
- package/dist/node_modules/lodash/_baseProperty.js +15 -0
- package/dist/node_modules/lodash/_baseProperty.js.map +1 -0
- package/dist/node_modules/lodash/_basePropertyDeep.js +17 -0
- package/dist/node_modules/lodash/_basePropertyDeep.js.map +1 -0
- package/dist/node_modules/lodash/_baseRange.js +15 -0
- package/dist/node_modules/lodash/_baseRange.js.map +1 -0
- package/dist/node_modules/lodash/_baseRest.js +17 -0
- package/dist/node_modules/lodash/_baseRest.js.map +1 -0
- package/dist/node_modules/lodash/_baseSetToString.js +21 -0
- package/dist/node_modules/lodash/_baseSetToString.js.map +1 -0
- package/dist/node_modules/lodash/_baseSlice.js +16 -0
- package/dist/node_modules/lodash/_baseSlice.js.map +1 -0
- package/dist/node_modules/lodash/_baseSome.js +18 -0
- package/dist/node_modules/lodash/_baseSome.js.map +1 -0
- package/dist/node_modules/lodash/_baseSortBy.js +15 -0
- package/dist/node_modules/lodash/_baseSortBy.js.map +1 -0
- package/dist/node_modules/lodash/_baseTimes.js +14 -0
- package/dist/node_modules/lodash/_baseTimes.js.map +1 -0
- package/dist/node_modules/lodash/_baseToString.js +22 -0
- package/dist/node_modules/lodash/_baseToString.js.map +1 -0
- package/dist/node_modules/lodash/_baseTrim.js +15 -0
- package/dist/node_modules/lodash/_baseTrim.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnary.js +15 -0
- package/dist/node_modules/lodash/_baseUnary.js.map +1 -0
- package/dist/node_modules/lodash/_baseUniq.js +34 -0
- package/dist/node_modules/lodash/_baseUniq.js.map +1 -0
- package/dist/node_modules/lodash/_cacheHas.js +13 -0
- package/dist/node_modules/lodash/_cacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_castPath.js +18 -0
- package/dist/node_modules/lodash/_castPath.js.map +1 -0
- package/dist/node_modules/lodash/_castSlice.js +16 -0
- package/dist/node_modules/lodash/_castSlice.js.map +1 -0
- package/dist/node_modules/lodash/_compareAscending.js +20 -0
- package/dist/node_modules/lodash/_compareAscending.js.map +1 -0
- package/dist/node_modules/lodash/_compareMultiple.js +19 -0
- package/dist/node_modules/lodash/_compareMultiple.js.map +1 -0
- package/dist/node_modules/lodash/_coreJsData.js +11 -0
- package/dist/node_modules/lodash/_coreJsData.js.map +1 -0
- package/dist/node_modules/lodash/_createBaseEach.js +20 -0
- package/dist/node_modules/lodash/_createBaseEach.js.map +1 -0
- package/dist/node_modules/lodash/_createBaseFor.js +19 -0
- package/dist/node_modules/lodash/_createBaseFor.js.map +1 -0
- package/dist/node_modules/lodash/_createCaseFirst.js +22 -0
- package/dist/node_modules/lodash/_createCaseFirst.js.map +1 -0
- package/dist/node_modules/lodash/_createFind.js +27 -0
- package/dist/node_modules/lodash/_createFind.js.map +1 -0
- package/dist/node_modules/lodash/_createRange.js +19 -0
- package/dist/node_modules/lodash/_createRange.js.map +1 -0
- package/dist/node_modules/lodash/_createSet.js +16 -0
- package/dist/node_modules/lodash/_createSet.js.map +1 -0
- package/dist/node_modules/lodash/_defineProperty.js +17 -0
- package/dist/node_modules/lodash/_defineProperty.js.map +1 -0
- package/dist/node_modules/lodash/_equalArrays.js +42 -0
- package/dist/node_modules/lodash/_equalArrays.js.map +1 -0
- package/dist/node_modules/lodash/_equalByTag.js +42 -0
- package/dist/node_modules/lodash/_equalByTag.js.map +1 -0
- package/dist/node_modules/lodash/_equalObjects.js +39 -0
- package/dist/node_modules/lodash/_equalObjects.js.map +1 -0
- package/dist/node_modules/lodash/_freeGlobal.js +10 -0
- package/dist/node_modules/lodash/_freeGlobal.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeys.js +17 -0
- package/dist/node_modules/lodash/_getAllKeys.js.map +1 -0
- package/dist/node_modules/lodash/_getMapData.js +16 -0
- package/dist/node_modules/lodash/_getMapData.js.map +1 -0
- package/dist/node_modules/lodash/_getMatchData.js +24 -0
- package/dist/node_modules/lodash/_getMatchData.js.map +1 -0
- package/dist/node_modules/lodash/_getNative.js +17 -0
- package/dist/node_modules/lodash/_getNative.js.map +1 -0
- package/dist/node_modules/lodash/_getPrototype.js +11 -0
- package/dist/node_modules/lodash/_getPrototype.js.map +1 -0
- package/dist/node_modules/lodash/_getRawTag.js +21 -0
- package/dist/node_modules/lodash/_getRawTag.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbols.js +17 -0
- package/dist/node_modules/lodash/_getSymbols.js.map +1 -0
- package/dist/node_modules/lodash/_getTag.js +28 -0
- package/dist/node_modules/lodash/_getTag.js.map +1 -0
- package/dist/node_modules/lodash/_getValue.js +13 -0
- package/dist/node_modules/lodash/_getValue.js.map +1 -0
- package/dist/node_modules/lodash/_hasPath.js +26 -0
- package/dist/node_modules/lodash/_hasPath.js.map +1 -0
- package/dist/node_modules/lodash/_hasUnicode.js +14 -0
- package/dist/node_modules/lodash/_hasUnicode.js.map +1 -0
- package/dist/node_modules/lodash/_hashClear.js +15 -0
- package/dist/node_modules/lodash/_hashClear.js.map +1 -0
- package/dist/node_modules/lodash/_hashDelete.js +14 -0
- package/dist/node_modules/lodash/_hashDelete.js.map +1 -0
- package/dist/node_modules/lodash/_hashGet.js +20 -0
- package/dist/node_modules/lodash/_hashGet.js.map +1 -0
- package/dist/node_modules/lodash/_hashHas.js +16 -0
- package/dist/node_modules/lodash/_hashHas.js.map +1 -0
- package/dist/node_modules/lodash/_hashSet.js +16 -0
- package/dist/node_modules/lodash/_hashSet.js.map +1 -0
- package/dist/node_modules/lodash/_isFlattenable.js +17 -0
- package/dist/node_modules/lodash/_isFlattenable.js.map +1 -0
- package/dist/node_modules/lodash/_isIndex.js +15 -0
- package/dist/node_modules/lodash/_isIndex.js.map +1 -0
- package/dist/node_modules/lodash/_isIterateeCall.js +20 -0
- package/dist/node_modules/lodash/_isIterateeCall.js.map +1 -0
- package/dist/node_modules/lodash/_isKey.js +18 -0
- package/dist/node_modules/lodash/_isKey.js.map +1 -0
- package/dist/node_modules/lodash/_isKeyable.js +14 -0
- package/dist/node_modules/lodash/_isKeyable.js.map +1 -0
- package/dist/node_modules/lodash/_isMasked.js +18 -0
- package/dist/node_modules/lodash/_isMasked.js.map +1 -0
- package/dist/node_modules/lodash/_isPrototype.js +15 -0
- package/dist/node_modules/lodash/_isPrototype.js.map +1 -0
- package/dist/node_modules/lodash/_isStrictComparable.js +15 -0
- package/dist/node_modules/lodash/_isStrictComparable.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheClear.js +13 -0
- package/dist/node_modules/lodash/_listCacheClear.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheDelete.js +16 -0
- package/dist/node_modules/lodash/_listCacheDelete.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheGet.js +16 -0
- package/dist/node_modules/lodash/_listCacheGet.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheHas.js +15 -0
- package/dist/node_modules/lodash/_listCacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_listCacheSet.js +16 -0
- package/dist/node_modules/lodash/_listCacheSet.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheClear.js +21 -0
- package/dist/node_modules/lodash/_mapCacheClear.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheDelete.js +16 -0
- package/dist/node_modules/lodash/_mapCacheDelete.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheGet.js +15 -0
- package/dist/node_modules/lodash/_mapCacheGet.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheHas.js +15 -0
- package/dist/node_modules/lodash/_mapCacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_mapCacheSet.js +16 -0
- package/dist/node_modules/lodash/_mapCacheSet.js.map +1 -0
- package/dist/node_modules/lodash/_mapToArray.js +16 -0
- package/dist/node_modules/lodash/_mapToArray.js.map +1 -0
- package/dist/node_modules/lodash/_matchesStrictComparable.js +15 -0
- package/dist/node_modules/lodash/_matchesStrictComparable.js.map +1 -0
- package/dist/node_modules/lodash/_memoizeCapped.js +18 -0
- package/dist/node_modules/lodash/_memoizeCapped.js.map +1 -0
- package/dist/node_modules/lodash/_nativeCreate.js +11 -0
- package/dist/node_modules/lodash/_nativeCreate.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeys.js +11 -0
- package/dist/node_modules/lodash/_nativeKeys.js.map +1 -0
- package/dist/node_modules/lodash/_nodeUtil.js +16 -0
- package/dist/node_modules/lodash/_nodeUtil.js.map +1 -0
- package/dist/node_modules/lodash/_objectToString.js +14 -0
- package/dist/node_modules/lodash/_objectToString.js.map +1 -0
- package/dist/node_modules/lodash/_overArg.js +15 -0
- package/dist/node_modules/lodash/_overArg.js.map +1 -0
- package/dist/node_modules/lodash/_overRest.js +20 -0
- package/dist/node_modules/lodash/_overRest.js.map +1 -0
- package/dist/node_modules/lodash/_root.js +12 -0
- package/dist/node_modules/lodash/_root.js.map +1 -0
- package/dist/node_modules/lodash/_setCacheAdd.js +14 -0
- package/dist/node_modules/lodash/_setCacheAdd.js.map +1 -0
- package/dist/node_modules/lodash/_setCacheHas.js +13 -0
- package/dist/node_modules/lodash/_setCacheHas.js.map +1 -0
- package/dist/node_modules/lodash/_setToArray.js +16 -0
- package/dist/node_modules/lodash/_setToArray.js.map +1 -0
- package/dist/node_modules/lodash/_setToString.js +13 -0
- package/dist/node_modules/lodash/_setToString.js.map +1 -0
- package/dist/node_modules/lodash/_shortOut.js +21 -0
- package/dist/node_modules/lodash/_shortOut.js.map +1 -0
- package/dist/node_modules/lodash/_stackClear.js +15 -0
- package/dist/node_modules/lodash/_stackClear.js.map +1 -0
- package/dist/node_modules/lodash/_stackDelete.js +14 -0
- package/dist/node_modules/lodash/_stackDelete.js.map +1 -0
- package/dist/node_modules/lodash/_stackGet.js +13 -0
- package/dist/node_modules/lodash/_stackGet.js.map +1 -0
- package/dist/node_modules/lodash/_stackHas.js +13 -0
- package/dist/node_modules/lodash/_stackHas.js.map +1 -0
- package/dist/node_modules/lodash/_stackSet.js +23 -0
- package/dist/node_modules/lodash/_stackSet.js.map +1 -0
- package/dist/node_modules/lodash/_strictIndexOf.js +14 -0
- package/dist/node_modules/lodash/_strictIndexOf.js.map +1 -0
- package/dist/node_modules/lodash/_stringToArray.js +17 -0
- package/dist/node_modules/lodash/_stringToArray.js.map +1 -0
- package/dist/node_modules/lodash/_stringToPath.js +17 -0
- package/dist/node_modules/lodash/_stringToPath.js.map +1 -0
- package/dist/node_modules/lodash/_toKey.js +17 -0
- package/dist/node_modules/lodash/_toKey.js.map +1 -0
- package/dist/node_modules/lodash/_toSource.js +22 -0
- package/dist/node_modules/lodash/_toSource.js.map +1 -0
- package/dist/node_modules/lodash/_trimmedEndIndex.js +15 -0
- package/dist/node_modules/lodash/_trimmedEndIndex.js.map +1 -0
- package/dist/node_modules/lodash/_unicodeToArray.js +24 -0
- package/dist/node_modules/lodash/_unicodeToArray.js.map +1 -0
- package/dist/node_modules/lodash/constant.js +15 -0
- package/dist/node_modules/lodash/constant.js.map +1 -0
- package/dist/node_modules/lodash/debounce.js +57 -0
- package/dist/node_modules/lodash/debounce.js.map +1 -0
- package/dist/node_modules/lodash/eq.js +13 -0
- package/dist/node_modules/lodash/eq.js.map +1 -0
- package/dist/node_modules/lodash/every.js +20 -0
- package/dist/node_modules/lodash/every.js.map +1 -0
- package/dist/node_modules/lodash/find.js +12 -0
- package/dist/node_modules/lodash/find.js.map +1 -0
- package/dist/node_modules/lodash/findIndex.js +20 -0
- package/dist/node_modules/lodash/findIndex.js.map +1 -0
- package/dist/node_modules/lodash/flatMap.js +16 -0
- package/dist/node_modules/lodash/flatMap.js.map +1 -0
- package/dist/node_modules/lodash/get.js +16 -0
- package/dist/node_modules/lodash/get.js.map +1 -0
- package/dist/node_modules/lodash/hasIn.js +16 -0
- package/dist/node_modules/lodash/hasIn.js.map +1 -0
- package/dist/node_modules/lodash/identity.js +13 -0
- package/dist/node_modules/lodash/identity.js.map +1 -0
- package/dist/node_modules/lodash/isArguments.js +17 -0
- package/dist/node_modules/lodash/isArguments.js.map +1 -0
- package/dist/node_modules/lodash/isArray.js +10 -0
- package/dist/node_modules/lodash/isArray.js.map +1 -0
- package/dist/node_modules/lodash/isArrayLike.js +16 -0
- package/dist/node_modules/lodash/isArrayLike.js.map +1 -0
- package/dist/node_modules/lodash/isBoolean.js +16 -0
- package/dist/node_modules/lodash/isBoolean.js.map +1 -0
- package/dist/node_modules/lodash/isBuffer.js +13 -0
- package/dist/node_modules/lodash/isBuffer.js.map +1 -0
- package/dist/node_modules/lodash/isEqual.js +15 -0
- package/dist/node_modules/lodash/isEqual.js.map +1 -0
- package/dist/node_modules/lodash/isFunction.js +18 -0
- package/dist/node_modules/lodash/isFunction.js.map +1 -0
- package/dist/node_modules/lodash/isLength.js +14 -0
- package/dist/node_modules/lodash/isLength.js.map +1 -0
- package/dist/node_modules/lodash/isNaN.js +15 -0
- package/dist/node_modules/lodash/isNaN.js.map +1 -0
- package/dist/node_modules/lodash/isNil.js +13 -0
- package/dist/node_modules/lodash/isNil.js.map +1 -0
- package/dist/node_modules/lodash/isNumber.js +16 -0
- package/dist/node_modules/lodash/isNumber.js.map +1 -0
- package/dist/node_modules/lodash/isObject.js +14 -0
- package/dist/node_modules/lodash/isObject.js.map +1 -0
- package/dist/node_modules/lodash/isObjectLike.js +13 -0
- package/dist/node_modules/lodash/isObjectLike.js.map +1 -0
- package/dist/node_modules/lodash/isPlainObject.js +21 -0
- package/dist/node_modules/lodash/isPlainObject.js.map +1 -0
- package/dist/node_modules/lodash/isString.js +17 -0
- package/dist/node_modules/lodash/isString.js.map +1 -0
- package/dist/node_modules/lodash/isSymbol.js +16 -0
- package/dist/node_modules/lodash/isSymbol.js.map +1 -0
- package/dist/node_modules/lodash/isTypedArray.js +14 -0
- package/dist/node_modules/lodash/isTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/keys.js +17 -0
- package/dist/node_modules/lodash/keys.js.map +1 -0
- package/dist/node_modules/lodash/last.js +14 -0
- package/dist/node_modules/lodash/last.js.map +1 -0
- package/dist/node_modules/lodash/map.js +18 -0
- package/dist/node_modules/lodash/map.js.map +1 -0
- package/dist/node_modules/lodash/mapValues.js +20 -0
- package/dist/node_modules/lodash/mapValues.js.map +1 -0
- package/dist/node_modules/lodash/max.js +17 -0
- package/dist/node_modules/lodash/max.js.map +1 -0
- package/dist/node_modules/lodash/memoize.js +22 -0
- package/dist/node_modules/lodash/memoize.js.map +1 -0
- package/dist/node_modules/lodash/min.js +17 -0
- package/dist/node_modules/lodash/min.js.map +1 -0
- package/dist/node_modules/lodash/noop.js +11 -0
- package/dist/node_modules/lodash/noop.js.map +1 -0
- package/dist/node_modules/lodash/now.js +14 -0
- package/dist/node_modules/lodash/now.js.map +1 -0
- package/dist/node_modules/lodash/property.js +18 -0
- package/dist/node_modules/lodash/property.js.map +1 -0
- package/dist/node_modules/lodash/range.js +11 -0
- package/dist/node_modules/lodash/range.js.map +1 -0
- package/dist/node_modules/lodash/some.js +20 -0
- package/dist/node_modules/lodash/some.js.map +1 -0
- package/dist/node_modules/lodash/sortBy.js +19 -0
- package/dist/node_modules/lodash/sortBy.js.map +1 -0
- package/dist/node_modules/lodash/stubArray.js +13 -0
- package/dist/node_modules/lodash/stubArray.js.map +1 -0
- package/dist/node_modules/lodash/stubFalse.js +13 -0
- package/dist/node_modules/lodash/stubFalse.js.map +1 -0
- package/dist/node_modules/lodash/throttle.js +22 -0
- package/dist/node_modules/lodash/throttle.js.map +1 -0
- package/dist/node_modules/lodash/toFinite.js +15 -0
- package/dist/node_modules/lodash/toFinite.js.map +1 -0
- package/dist/node_modules/lodash/toInteger.js +16 -0
- package/dist/node_modules/lodash/toInteger.js.map +1 -0
- package/dist/node_modules/lodash/toNumber.js +26 -0
- package/dist/node_modules/lodash/toNumber.js.map +1 -0
- package/dist/node_modules/lodash/toString.js +15 -0
- package/dist/node_modules/lodash/toString.js.map +1 -0
- package/dist/node_modules/lodash/uniqBy.js +16 -0
- package/dist/node_modules/lodash/uniqBy.js.map +1 -0
- package/dist/node_modules/lodash/upperFirst.js +11 -0
- package/dist/node_modules/lodash/upperFirst.js.map +1 -0
- package/dist/node_modules/object-assign/index.js +41 -0
- package/dist/node_modules/object-assign/index.js.map +1 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +46 -0
- package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +49 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +272 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
- package/dist/node_modules/prop-types/index.js +16 -0
- package/dist/node_modules/prop-types/index.js.map +1 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
- package/dist/node_modules/prop-types/lib/has.js +10 -0
- package/dist/node_modules/prop-types/lib/has.js.map +1 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +84 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +64 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +12 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +1 -0
- package/dist/node_modules/react-is/cjs/react-is.development.js +87 -0
- package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -0
- package/dist/node_modules/react-is/cjs/react-is.production.min.js +65 -0
- package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
- package/dist/node_modules/react-is/index.js +12 -0
- package/dist/node_modules/react-is/index.js.map +1 -0
- package/dist/node_modules/react-smooth/es6/Animate.js +374 -0
- package/dist/node_modules/react-smooth/es6/Animate.js.map +1 -0
- package/dist/node_modules/react-smooth/es6/AnimateManager.js +73 -0
- package/dist/node_modules/react-smooth/es6/AnimateManager.js.map +1 -0
- package/dist/node_modules/react-smooth/es6/configUpdate.js +173 -0
- package/dist/node_modules/react-smooth/es6/configUpdate.js.map +1 -0
- package/dist/node_modules/react-smooth/es6/easing.js +152 -0
- package/dist/node_modules/react-smooth/es6/easing.js.map +1 -0
- package/dist/node_modules/react-smooth/es6/index.js +9 -0
- package/dist/node_modules/react-smooth/es6/index.js.map +1 -0
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js +14 -0
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js.map +1 -0
- package/dist/node_modules/react-smooth/es6/util.js +92 -0
- package/dist/node_modules/react-smooth/es6/util.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/Bar.js +387 -0
- package/dist/node_modules/recharts/es6/cartesian/Bar.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/Brush.js +499 -0
- package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +338 -0
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +305 -0
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +243 -0
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/Line.js +473 -0
- package/dist/node_modules/recharts/es6/cartesian/Line.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +173 -0
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +178 -0
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +254 -0
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js +144 -0
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js +143 -0
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js +18 -0
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js +121 -0
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +101 -0
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/LineChart.js +22 -0
- package/dist/node_modules/recharts/es6/chart/LineChart.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +1245 -0
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/Cell.js +9 -0
- package/dist/node_modules/recharts/es6/component/Cell.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/Cursor.js +93 -0
- package/dist/node_modules/recharts/es6/component/Cursor.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +237 -0
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +171 -0
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/Label.js +353 -0
- package/dist/node_modules/recharts/es6/component/Label.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/LabelList.js +166 -0
- package/dist/node_modules/recharts/es6/component/LabelList.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/Legend.js +234 -0
- package/dist/node_modules/recharts/es6/component/Legend.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +187 -0
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/Text.js +225 -0
- package/dist/node_modules/recharts/es6/component/Text.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/Tooltip.js +182 -0
- package/dist/node_modules/recharts/es6/component/Tooltip.js.map +1 -0
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +198 -0
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js.map +1 -0
- package/dist/node_modules/recharts/es6/container/Layer.js +40 -0
- package/dist/node_modules/recharts/es6/container/Layer.js.map +1 -0
- package/dist/node_modules/recharts/es6/container/Surface.js +60 -0
- package/dist/node_modules/recharts/es6/container/Surface.js.map +1 -0
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +57 -0
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Cross.js +112 -0
- package/dist/node_modules/recharts/es6/shape/Cross.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Curve.js +136 -0
- package/dist/node_modules/recharts/es6/shape/Curve.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Dot.js +27 -0
- package/dist/node_modules/recharts/es6/shape/Dot.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +205 -0
- package/dist/node_modules/recharts/es6/shape/Rectangle.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Sector.js +192 -0
- package/dist/node_modules/recharts/es6/shape/Sector.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Symbols.js +143 -0
- package/dist/node_modules/recharts/es6/shape/Symbols.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js +175 -0
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +181 -0
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/BarUtils.js +112 -0
- package/dist/node_modules/recharts/es6/util/BarUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js +234 -0
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +562 -0
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js +70 -0
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/DOMUtils.js +108 -0
- package/dist/node_modules/recharts/es6/util/DOMUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/DataUtils.js +57 -0
- package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js +58 -0
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/Events.js +7 -0
- package/dist/node_modules/recharts/es6/util/Events.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/Global.js +21 -0
- package/dist/node_modules/recharts/es6/util/Global.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js +9 -0
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/LogUtils.js +15 -0
- package/dist/node_modules/recharts/es6/util/LogUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/PolarUtils.js +116 -0
- package/dist/node_modules/recharts/es6/util/PolarUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +137 -0
- package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +181 -0
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js +10 -0
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/TickUtils.js +31 -0
- package/dist/node_modules/recharts/es6/util/TickUtils.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js +25 -0
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js +23 -0
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js +16 -0
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js +17 -0
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js +12 -0
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/getLegendProps.js +88 -0
- package/dist/node_modules/recharts/es6/util/getLegendProps.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js +13 -0
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js +12 -0
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js +87 -0
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/types.js +43 -0
- package/dist/node_modules/recharts/es6/util/types.js.map +1 -0
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +132 -0
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js.map +1 -0
- package/dist/node_modules/recharts-scale/es6/index.js +1 -0
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js +32 -0
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js.map +1 -0
- package/dist/node_modules/recharts-scale/es6/util/utils.js +79 -0
- package/dist/node_modules/recharts-scale/es6/util/utils.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1716 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +13 -0
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +1 -0
- package/dist/node_modules/victory-vendor/es/d3-scale.js +53 -0
- package/dist/node_modules/victory-vendor/es/d3-scale.js.map +1 -0
- package/package.json +3 -3
- package/dist/mybodyshield/pages/AdminAiinsightsPage.js +0 -161
- package/dist/mybodyshield/pages/AdminAiinsightsPage.js.map +0 -1
- package/dist/mybodyshield/pages/AdminAnalyticsPage.js +0 -193
- package/dist/mybodyshield/pages/AdminAnalyticsPage.js.map +0 -1
- package/dist/mybodyshield/pages/AdminComplianceReportsPage.js +0 -214
- package/dist/mybodyshield/pages/AdminComplianceReportsPage.js.map +0 -1
- package/dist/mybodyshield/pages/AdminDashboardPage.js +0 -186
- package/dist/mybodyshield/pages/AdminDashboardPage.js.map +0 -1
- package/dist/mybodyshield/pages/AdminOrganizationManagementPage.js +0 -252
- package/dist/mybodyshield/pages/AdminOrganizationManagementPage.js.map +0 -1
- package/dist/mybodyshield/pages/AdminSystemSettingsPage.js +0 -159
- package/dist/mybodyshield/pages/AdminSystemSettingsPage.js.map +0 -1
- package/dist/mybodyshield/pages/AdminUserManagementPage.js +0 -208
- package/dist/mybodyshield/pages/AdminUserManagementPage.js.map +0 -1
- package/dist/mybodyshield/pages/FitnessAssessmentsPage.js +0 -194
- package/dist/mybodyshield/pages/FitnessAssessmentsPage.js.map +0 -1
- package/dist/mybodyshield/pages/FitnessClientDetailsPage.js +0 -192
- package/dist/mybodyshield/pages/FitnessClientDetailsPage.js.map +0 -1
- package/dist/mybodyshield/pages/FitnessClientManagementPage.js +0 -128
- package/dist/mybodyshield/pages/FitnessClientManagementPage.js.map +0 -1
- package/dist/mybodyshield/pages/FitnessDashboardPage.js +0 -156
- package/dist/mybodyshield/pages/FitnessDashboardPage.js.map +0 -1
- package/dist/mybodyshield/pages/FitnessReportsPage.js +0 -138
- package/dist/mybodyshield/pages/FitnessReportsPage.js.map +0 -1
- package/dist/mybodyshield/pages/FitnessWorkoutPlansPage.js +0 -176
- package/dist/mybodyshield/pages/FitnessWorkoutPlansPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientAppointmentsPage.js +0 -132
- package/dist/mybodyshield/pages/PatientAppointmentsPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientDashboardPage.js +0 -190
- package/dist/mybodyshield/pages/PatientDashboardPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientFitnessTrackingPage.js +0 -137
- package/dist/mybodyshield/pages/PatientFitnessTrackingPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientHealthGoalsPage.js +0 -131
- package/dist/mybodyshield/pages/PatientHealthGoalsPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientHealthOverviewPage.js +0 -273
- package/dist/mybodyshield/pages/PatientHealthOverviewPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientLabResultsPage.js +0 -133
- package/dist/mybodyshield/pages/PatientLabResultsPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientMedicationsPage.js +0 -158
- package/dist/mybodyshield/pages/PatientMedicationsPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientMentalHealthPage.js +0 -152
- package/dist/mybodyshield/pages/PatientMentalHealthPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientNutritionTrackingPage.js +0 -141
- package/dist/mybodyshield/pages/PatientNutritionTrackingPage.js.map +0 -1
- package/dist/mybodyshield/pages/PatientVitalSignsPage.js +0 -160
- package/dist/mybodyshield/pages/PatientVitalSignsPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderCalendarPage.js +0 -127
- package/dist/mybodyshield/pages/ProviderCalendarPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderCarePlansPage.js +0 -153
- package/dist/mybodyshield/pages/ProviderCarePlansPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderClinicalToolsPage.js +0 -174
- package/dist/mybodyshield/pages/ProviderClinicalToolsPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderDashboardPage.js +0 -154
- package/dist/mybodyshield/pages/ProviderDashboardPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderPatientDetailsPage.js +0 -295
- package/dist/mybodyshield/pages/ProviderPatientDetailsPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderPatientManagementPage.js +0 -133
- package/dist/mybodyshield/pages/ProviderPatientManagementPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderPrescriptionsPage.js +0 -138
- package/dist/mybodyshield/pages/ProviderPrescriptionsPage.js.map +0 -1
- package/dist/mybodyshield/pages/ProviderReportsPage.js +0 -149
- package/dist/mybodyshield/pages/ProviderReportsPage.js.map +0 -1
- package/dist/mybodyshield/pages/SharedAppointmentsPage.js +0 -129
- package/dist/mybodyshield/pages/SharedAppointmentsPage.js.map +0 -1
- package/dist/mybodyshield/pages/SharedCommunityPage.js +0 -152
- package/dist/mybodyshield/pages/SharedCommunityPage.js.map +0 -1
- package/dist/mybodyshield/pages/SharedEmergencyAlertsPage.js +0 -165
- package/dist/mybodyshield/pages/SharedEmergencyAlertsPage.js.map +0 -1
- package/dist/mybodyshield/pages/SharedEmergencyPage.js +0 -183
- package/dist/mybodyshield/pages/SharedEmergencyPage.js.map +0 -1
- package/dist/mybodyshield/pages/SharedHealthAnalyticsPage.js +0 -159
- package/dist/mybodyshield/pages/SharedHealthAnalyticsPage.js.map +0 -1
- package/dist/mybodyshield/pages/SharedMarketplacePage.js +0 -193
- package/dist/mybodyshield/pages/SharedMarketplacePage.js.map +0 -1
- package/dist/mybodyshield/pages/SharedMessagesPage.js +0 -156
- package/dist/mybodyshield/pages/SharedMessagesPage.js.map +0 -1
- package/dist/mybodyshield/pages/WellnessAssessmentsPage.js +0 -147
- package/dist/mybodyshield/pages/WellnessAssessmentsPage.js.map +0 -1
- package/dist/mybodyshield/pages/WellnessClientsPage.js +0 -182
- package/dist/mybodyshield/pages/WellnessClientsPage.js.map +0 -1
- package/dist/mybodyshield/pages/WellnessDashboardPage.js +0 -136
- package/dist/mybodyshield/pages/WellnessDashboardPage.js.map +0 -1
- package/dist/mybodyshield/pages/WellnessProgramsPage.js +0 -140
- package/dist/mybodyshield/pages/WellnessProgramsPage.js.map +0 -1
- package/dist/mybodyshield/providers/MyBodyShieldProvider.js +0 -27
- package/dist/mybodyshield/providers/MyBodyShieldProvider.js.map +0 -1
- package/dist/mybodyshield/store/mybodyshieldStore.js +0 -710
- package/dist/mybodyshield/store/mybodyshieldStore.js.map +0 -1
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import { useMyBodyShield as e } from "../context/MyBodyShieldContext.js";
|
|
2
|
+
import "../context/index.js";
|
|
3
|
+
import { useMutation as t, useQuery as n, useQueryClient as r } from "@tanstack/react-query";
|
|
4
|
+
import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
5
|
+
//#region src/mybodyshield/hooks/useMyBodyShieldApi.ts
|
|
6
|
+
var a = () => {
|
|
7
|
+
let e = globalThis;
|
|
8
|
+
e.__graphqlFetchResponseCache?.clear(), e.__graphqlFetchPendingResponses?.clear(), e.__boffGraphQLResponseCache?.clear();
|
|
9
|
+
}, o = async (e, t, n) => {
|
|
10
|
+
let r = await i({
|
|
11
|
+
gateway: "workspace",
|
|
12
|
+
baseUrl: n,
|
|
13
|
+
query: e,
|
|
14
|
+
variables: t,
|
|
15
|
+
workspaceToken: !0
|
|
16
|
+
});
|
|
17
|
+
if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
|
|
18
|
+
if (!r.data) throw Error("GraphQL response did not include data");
|
|
19
|
+
return /^\s*mutation\b/.test(e) && a(), r.data;
|
|
20
|
+
}, s = {
|
|
21
|
+
programs: ["mybodyshield", "programs"],
|
|
22
|
+
program: (e) => [
|
|
23
|
+
"mybodyshield",
|
|
24
|
+
"program",
|
|
25
|
+
e
|
|
26
|
+
],
|
|
27
|
+
programWorkouts: (e) => [
|
|
28
|
+
"mybodyshield",
|
|
29
|
+
"program-workouts",
|
|
30
|
+
e
|
|
31
|
+
],
|
|
32
|
+
sessions: ["mybodyshield", "sessions"],
|
|
33
|
+
session: (e) => [
|
|
34
|
+
"mybodyshield",
|
|
35
|
+
"session",
|
|
36
|
+
e
|
|
37
|
+
],
|
|
38
|
+
goals: ["mybodyshield", "goals"],
|
|
39
|
+
goal: (e) => [
|
|
40
|
+
"mybodyshield",
|
|
41
|
+
"goal",
|
|
42
|
+
e
|
|
43
|
+
],
|
|
44
|
+
meals: ["mybodyshield", "meals"],
|
|
45
|
+
nutritionPlan: (e) => [
|
|
46
|
+
"mybodyshield",
|
|
47
|
+
"nutrition-plan",
|
|
48
|
+
e
|
|
49
|
+
],
|
|
50
|
+
activePlan: ["mybodyshield", "active-plan"],
|
|
51
|
+
dailyMacros: ["mybodyshield", "daily-macros"],
|
|
52
|
+
bodyMetrics: ["mybodyshield", "body-metrics"],
|
|
53
|
+
recovery: ["mybodyshield", "recovery"],
|
|
54
|
+
coaching: ["mybodyshield", "coaching"]
|
|
55
|
+
}, c = { limit: 50 }, l = "\n id workspaceId memberId coachId name description goalType level phase status\n weeks daysPerWeek startDate endDate tags createdAt updatedAt\n", u = "\n id workspaceId workoutId name instructions muscleGroup sets reps targetWeight\n restSeconds orderIndex demo { id } createdAt updatedAt\n", d = "\n id workspaceId programId name description type dayOfWeek weekNumber orderIndex\n durationMin createdAt updatedAt\n", f = "\n id workspaceId sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt\n", p = "\n id workspaceId memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt\n", m = "\n id workspaceId memberId title description type status targetValue currentValue\n baselineValue unit targetDate achievedAt createdAt updatedAt\n", h = "\n id workspaceId memberId planId name mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt createdAt updatedAt\n", g = "\n id workspaceId memberId coachId name goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt\n", _ = "\n id workspaceId memberId type value unit measuredAt notes photo { id } createdAt updatedAt\n", v = "\n id workspaceId memberId metric score sleepHours notes loggedAt createdAt updatedAt\n", y = "\n id workspaceId coachId memberId status specialty shareWorkouts shareNutrition\n shareMetrics startedAt endedAt notes createdAt updatedAt\n", b = "\n date calories proteinG carbsG fatG calorieTarget proteinTarget carbsTarget fatTarget\n", x = (t = {}) => {
|
|
56
|
+
let { apiGatewayUrl: r } = e();
|
|
57
|
+
return n({
|
|
58
|
+
queryKey: [...s.programs, t],
|
|
59
|
+
queryFn: async () => (await o(`query MybListPrograms($status: MybProgramStatus, $memberId: ID, $pagination: PaginationInput) {
|
|
60
|
+
mybListPrograms(status: $status, memberId: $memberId, pagination: $pagination) {
|
|
61
|
+
items { ${l} }
|
|
62
|
+
pageInfo { cursor hasMore }
|
|
63
|
+
}
|
|
64
|
+
}`, {
|
|
65
|
+
status: t.status,
|
|
66
|
+
memberId: t.memberId,
|
|
67
|
+
pagination: t.pagination ?? c
|
|
68
|
+
}, r)).mybListPrograms
|
|
69
|
+
});
|
|
70
|
+
}, S = (t) => {
|
|
71
|
+
let { apiGatewayUrl: r } = e();
|
|
72
|
+
return n({
|
|
73
|
+
queryKey: s.program(t ?? ""),
|
|
74
|
+
enabled: !!t,
|
|
75
|
+
queryFn: async () => (await o(`query MybProgram($id: ID!) {
|
|
76
|
+
mybProgram(id: $id) {
|
|
77
|
+
${l}
|
|
78
|
+
workouts {
|
|
79
|
+
${d}
|
|
80
|
+
exercises { ${u} }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}`, { id: t }, r)).mybProgram
|
|
84
|
+
});
|
|
85
|
+
}, C = () => {
|
|
86
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
87
|
+
return t({
|
|
88
|
+
mutationFn: async (e) => (await o(`mutation MybCreateProgram($input: MybCreateProgramInput!) {
|
|
89
|
+
mybCreateProgram(input: $input) { ${l} }
|
|
90
|
+
}`, { input: e }, n)).mybCreateProgram,
|
|
91
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
|
|
92
|
+
});
|
|
93
|
+
}, w = () => {
|
|
94
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
95
|
+
return t({
|
|
96
|
+
mutationFn: async (e) => (await o(`mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {
|
|
97
|
+
mybUpdateProgram(id: $id, input: $input) { ${l} }
|
|
98
|
+
}`, e, n)).mybUpdateProgram,
|
|
99
|
+
onSuccess: (e) => {
|
|
100
|
+
i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}, T = () => {
|
|
104
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
105
|
+
return t({
|
|
106
|
+
mutationFn: async (e) => (await o(`mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {
|
|
107
|
+
mybTransitionProgram(id: $id, status: $status) { ${l} }
|
|
108
|
+
}`, e, n)).mybTransitionProgram,
|
|
109
|
+
onSuccess: (e) => {
|
|
110
|
+
i.invalidateQueries({ queryKey: s.programs }), i.invalidateQueries({ queryKey: s.program(e.id) });
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}, E = () => {
|
|
114
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
115
|
+
return t({
|
|
116
|
+
mutationFn: async (e) => (await o("mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }", { id: e }, n)).mybArchiveProgram,
|
|
117
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.programs })
|
|
118
|
+
});
|
|
119
|
+
}, D = () => {
|
|
120
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
121
|
+
return t({
|
|
122
|
+
mutationFn: async (e) => (await o(`mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
|
|
123
|
+
mybAddWorkout(input: $input) { ${d} }
|
|
124
|
+
}`, { input: e }, n)).mybAddWorkout,
|
|
125
|
+
onSuccess: (e) => {
|
|
126
|
+
i.invalidateQueries({ queryKey: s.program(e.programId) }), i.invalidateQueries({ queryKey: s.programWorkouts(e.programId) });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}, O = () => {
|
|
130
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
131
|
+
return t({
|
|
132
|
+
mutationFn: async (e) => (await o("mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }", { input: e }, n)).mybAddExercise,
|
|
133
|
+
onSuccess: () => {
|
|
134
|
+
i.invalidateQueries({ queryKey: ["mybodyshield", "program"] }), i.invalidateQueries({ queryKey: ["mybodyshield", "program-workouts"] });
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}, k = (t = {}) => {
|
|
138
|
+
let { apiGatewayUrl: r } = e();
|
|
139
|
+
return n({
|
|
140
|
+
queryKey: [...s.sessions, t],
|
|
141
|
+
queryFn: async () => (await o(`query MybListSessions($status: MybSessionStatus, $programId: ID, $pagination: PaginationInput) {
|
|
142
|
+
mybListSessions(status: $status, programId: $programId, pagination: $pagination) {
|
|
143
|
+
items { ${p} }
|
|
144
|
+
pageInfo { cursor hasMore }
|
|
145
|
+
}
|
|
146
|
+
}`, {
|
|
147
|
+
status: t.status,
|
|
148
|
+
programId: t.programId,
|
|
149
|
+
pagination: t.pagination ?? c
|
|
150
|
+
}, r)).mybListSessions
|
|
151
|
+
});
|
|
152
|
+
}, A = (t) => {
|
|
153
|
+
let { apiGatewayUrl: r } = e();
|
|
154
|
+
return n({
|
|
155
|
+
queryKey: s.session(t ?? ""),
|
|
156
|
+
enabled: !!t,
|
|
157
|
+
queryFn: async () => (await o(`query MybSession($id: ID!) {
|
|
158
|
+
mybSession(id: $id) {
|
|
159
|
+
${p}
|
|
160
|
+
sets { ${f} }
|
|
161
|
+
}
|
|
162
|
+
}`, { id: t }, r)).mybSession
|
|
163
|
+
});
|
|
164
|
+
}, j = () => {
|
|
165
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
166
|
+
return t({
|
|
167
|
+
mutationFn: async (e) => (await o(`mutation MybStartSession($input: MybStartSessionInput!) {
|
|
168
|
+
mybStartSession(input: $input) { ${p} }
|
|
169
|
+
}`, { input: e }, n)).mybStartSession,
|
|
170
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.sessions })
|
|
171
|
+
});
|
|
172
|
+
}, M = () => {
|
|
173
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
174
|
+
return t({
|
|
175
|
+
mutationFn: async (e) => (await o(`mutation MybLogSet($input: MybLogSetInput!) {
|
|
176
|
+
mybLogSet(input: $input) { ${f} }
|
|
177
|
+
}`, { input: e }, n)).mybLogSet,
|
|
178
|
+
onSuccess: (e) => {
|
|
179
|
+
i.invalidateQueries({ queryKey: s.session(e.sessionId) }), i.invalidateQueries({ queryKey: s.sessions });
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}, N = () => {
|
|
183
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
184
|
+
return t({
|
|
185
|
+
mutationFn: async (e) => (await o(`mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
|
|
186
|
+
mybCompleteSession(id: $id, input: $input) { ${p} }
|
|
187
|
+
}`, e, n)).mybCompleteSession,
|
|
188
|
+
onSuccess: (e) => {
|
|
189
|
+
i.invalidateQueries({ queryKey: s.session(e.id) }), i.invalidateQueries({ queryKey: s.sessions });
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}, P = (t = {}) => {
|
|
193
|
+
let { apiGatewayUrl: r } = e();
|
|
194
|
+
return n({
|
|
195
|
+
queryKey: [...s.goals, t],
|
|
196
|
+
queryFn: async () => (await o(`query MybListGoals($status: MybGoalStatus, $memberId: ID, $pagination: PaginationInput) {
|
|
197
|
+
mybListGoals(status: $status, memberId: $memberId, pagination: $pagination) {
|
|
198
|
+
items { ${m} }
|
|
199
|
+
pageInfo { cursor hasMore }
|
|
200
|
+
}
|
|
201
|
+
}`, {
|
|
202
|
+
status: t.status,
|
|
203
|
+
memberId: t.memberId,
|
|
204
|
+
pagination: t.pagination ?? c
|
|
205
|
+
}, r)).mybListGoals
|
|
206
|
+
});
|
|
207
|
+
}, F = () => {
|
|
208
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
209
|
+
return t({
|
|
210
|
+
mutationFn: async (e) => (await o(`mutation MybCreateGoal($input: MybCreateGoalInput!) {
|
|
211
|
+
mybCreateGoal(input: $input) { ${m} }
|
|
212
|
+
}`, { input: e }, n)).mybCreateGoal,
|
|
213
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
214
|
+
});
|
|
215
|
+
}, I = () => {
|
|
216
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
217
|
+
return t({
|
|
218
|
+
mutationFn: async (e) => (await o(`mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {
|
|
219
|
+
mybUpdateGoal(id: $id, input: $input) { ${m} }
|
|
220
|
+
}`, e, n)).mybUpdateGoal,
|
|
221
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
222
|
+
});
|
|
223
|
+
}, L = () => {
|
|
224
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
225
|
+
return t({
|
|
226
|
+
mutationFn: async (e) => (await o(`mutation MybAchieveGoal($id: ID!) {
|
|
227
|
+
mybAchieveGoal(id: $id) { ${m} }
|
|
228
|
+
}`, { id: e }, n)).mybAchieveGoal,
|
|
229
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.goals })
|
|
230
|
+
});
|
|
231
|
+
}, R = (t) => {
|
|
232
|
+
let { apiGatewayUrl: r } = e();
|
|
233
|
+
return n({
|
|
234
|
+
queryKey: [...s.activePlan, t ?? "me"],
|
|
235
|
+
queryFn: async () => (await o(`query MybActiveNutritionPlan($memberId: ID) {
|
|
236
|
+
mybActiveNutritionPlan(memberId: $memberId) { ${g} }
|
|
237
|
+
}`, { memberId: t }, r)).mybActiveNutritionPlan
|
|
238
|
+
});
|
|
239
|
+
}, z = (t = {}) => {
|
|
240
|
+
let { apiGatewayUrl: r } = e();
|
|
241
|
+
return n({
|
|
242
|
+
queryKey: [...s.meals, t],
|
|
243
|
+
queryFn: async () => (await o(`query MybListMeals($mealType: MybMealType, $planId: ID, $pagination: PaginationInput) {
|
|
244
|
+
mybListMeals(mealType: $mealType, planId: $planId, pagination: $pagination) {
|
|
245
|
+
items { ${h} }
|
|
246
|
+
pageInfo { cursor hasMore }
|
|
247
|
+
}
|
|
248
|
+
}`, {
|
|
249
|
+
mealType: t.mealType,
|
|
250
|
+
planId: t.planId,
|
|
251
|
+
pagination: t.pagination ?? c
|
|
252
|
+
}, r)).mybListMeals
|
|
253
|
+
});
|
|
254
|
+
}, B = (t, r) => {
|
|
255
|
+
let { apiGatewayUrl: i } = e();
|
|
256
|
+
return n({
|
|
257
|
+
queryKey: [
|
|
258
|
+
...s.dailyMacros,
|
|
259
|
+
t ?? "today",
|
|
260
|
+
r ?? "me"
|
|
261
|
+
],
|
|
262
|
+
queryFn: async () => (await o(`query MybDailyMacros($date: DateTime, $memberId: ID) {
|
|
263
|
+
mybDailyMacros(date: $date, memberId: $memberId) { ${b} }
|
|
264
|
+
}`, {
|
|
265
|
+
date: t,
|
|
266
|
+
memberId: r
|
|
267
|
+
}, i)).mybDailyMacros
|
|
268
|
+
});
|
|
269
|
+
}, V = () => {
|
|
270
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
271
|
+
return t({
|
|
272
|
+
mutationFn: async (e) => (await o(`mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {
|
|
273
|
+
mybCreateNutritionPlan(input: $input) { ${g} }
|
|
274
|
+
}`, { input: e }, n)).mybCreateNutritionPlan,
|
|
275
|
+
onSuccess: () => {
|
|
276
|
+
i.invalidateQueries({ queryKey: s.activePlan });
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
}, H = () => {
|
|
280
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
281
|
+
return t({
|
|
282
|
+
mutationFn: async (e) => (await o(`mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {
|
|
283
|
+
mybUpdateNutritionPlan(id: $id, input: $input) { ${g} }
|
|
284
|
+
}`, e, n)).mybUpdateNutritionPlan,
|
|
285
|
+
onSuccess: (e) => {
|
|
286
|
+
i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}, U = () => {
|
|
290
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
291
|
+
return t({
|
|
292
|
+
mutationFn: async (e) => (await o(`mutation MybActivateNutritionPlan($id: ID!) {
|
|
293
|
+
mybActivateNutritionPlan(id: $id) { ${g} }
|
|
294
|
+
}`, { id: e }, n)).mybActivateNutritionPlan,
|
|
295
|
+
onSuccess: (e) => {
|
|
296
|
+
i.invalidateQueries({ queryKey: s.activePlan }), i.invalidateQueries({ queryKey: s.nutritionPlan(e.id) });
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}, W = () => {
|
|
300
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
301
|
+
return t({
|
|
302
|
+
mutationFn: async (e) => (await o(`mutation MybLogMeal($input: MybLogMealInput!) {
|
|
303
|
+
mybLogMeal(input: $input) { ${h} }
|
|
304
|
+
}`, { input: e }, n)).mybLogMeal,
|
|
305
|
+
onSuccess: (e) => {
|
|
306
|
+
i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros }), e.planId && i.invalidateQueries({ queryKey: s.nutritionPlan(e.planId) });
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}, G = () => {
|
|
310
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
311
|
+
return t({
|
|
312
|
+
mutationFn: async (e) => (await o("mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }", { id: e }, n)).mybDeleteMeal,
|
|
313
|
+
onSuccess: () => {
|
|
314
|
+
i.invalidateQueries({ queryKey: s.meals }), i.invalidateQueries({ queryKey: s.dailyMacros });
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}, K = (t = {}) => {
|
|
318
|
+
let { apiGatewayUrl: r } = e();
|
|
319
|
+
return n({
|
|
320
|
+
queryKey: [...s.bodyMetrics, t],
|
|
321
|
+
queryFn: async () => (await o(`query MybListBodyMetrics($type: MybBodyMetricType, $memberId: ID, $pagination: PaginationInput) {
|
|
322
|
+
mybListBodyMetrics(type: $type, memberId: $memberId, pagination: $pagination) {
|
|
323
|
+
items { ${_} }
|
|
324
|
+
pageInfo { cursor hasMore }
|
|
325
|
+
}
|
|
326
|
+
}`, {
|
|
327
|
+
type: t.type,
|
|
328
|
+
memberId: t.memberId,
|
|
329
|
+
pagination: t.pagination ?? c
|
|
330
|
+
}, r)).mybListBodyMetrics
|
|
331
|
+
});
|
|
332
|
+
}, q = () => {
|
|
333
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
334
|
+
return t({
|
|
335
|
+
mutationFn: async (e) => (await o(`mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {
|
|
336
|
+
mybRecordBodyMetric(input: $input) { ${_} }
|
|
337
|
+
}`, { input: e }, n)).mybRecordBodyMetric,
|
|
338
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.bodyMetrics })
|
|
339
|
+
});
|
|
340
|
+
}, J = (t, r) => {
|
|
341
|
+
let { apiGatewayUrl: i } = e();
|
|
342
|
+
return n({
|
|
343
|
+
queryKey: [
|
|
344
|
+
...s.recovery,
|
|
345
|
+
t ?? "all",
|
|
346
|
+
r ?? "me"
|
|
347
|
+
],
|
|
348
|
+
queryFn: async () => (await o(`query MybListRecoveryLogs($metric: MybRecoveryMetric, $memberId: ID) {
|
|
349
|
+
mybListRecoveryLogs(metric: $metric, memberId: $memberId) { ${v} }
|
|
350
|
+
}`, {
|
|
351
|
+
metric: t,
|
|
352
|
+
memberId: r
|
|
353
|
+
}, i)).mybListRecoveryLogs
|
|
354
|
+
});
|
|
355
|
+
}, Y = () => {
|
|
356
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
357
|
+
return t({
|
|
358
|
+
mutationFn: async (e) => (await o(`mutation MybLogRecovery($input: MybLogRecoveryInput!) {
|
|
359
|
+
mybLogRecovery(input: $input) { ${v} }
|
|
360
|
+
}`, { input: e }, n)).mybLogRecovery,
|
|
361
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.recovery })
|
|
362
|
+
});
|
|
363
|
+
}, X = (t, r) => {
|
|
364
|
+
let { apiGatewayUrl: i } = e();
|
|
365
|
+
return n({
|
|
366
|
+
queryKey: [
|
|
367
|
+
...s.coaching,
|
|
368
|
+
t ?? "all",
|
|
369
|
+
r ?? "me"
|
|
370
|
+
],
|
|
371
|
+
queryFn: async () => (await o(`query MybListCoaching($status: MybCoachingStatus, $memberId: ID) {
|
|
372
|
+
mybListCoaching(status: $status, memberId: $memberId) { ${y} }
|
|
373
|
+
}`, {
|
|
374
|
+
status: t,
|
|
375
|
+
memberId: r
|
|
376
|
+
}, i)).mybListCoaching
|
|
377
|
+
});
|
|
378
|
+
}, Z = () => {
|
|
379
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
380
|
+
return t({
|
|
381
|
+
mutationFn: async (e) => (await o(`mutation MybCreateCoaching($input: MybCreateCoachingInput!) {
|
|
382
|
+
mybCreateCoaching(input: $input) { ${y} }
|
|
383
|
+
}`, { input: e }, n)).mybCreateCoaching,
|
|
384
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.coaching })
|
|
385
|
+
});
|
|
386
|
+
}, Q = () => {
|
|
387
|
+
let { apiGatewayUrl: n } = e(), i = r();
|
|
388
|
+
return t({
|
|
389
|
+
mutationFn: async (e) => (await o(`mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
|
|
390
|
+
mybTransitionCoaching(id: $id, status: $status) { ${y} }
|
|
391
|
+
}`, e, n)).mybTransitionCoaching,
|
|
392
|
+
onSuccess: () => i.invalidateQueries({ queryKey: s.coaching })
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
//#endregion
|
|
396
|
+
export { L as useMybAchieveGoal, U as useMybActivateNutritionPlan, R as useMybActiveNutritionPlan, O as useMybAddExercise, D as useMybAddWorkout, E as useMybArchiveProgram, K as useMybBodyMetrics, X as useMybCoaching, N as useMybCompleteSession, Z as useMybCreateCoaching, F as useMybCreateGoal, V as useMybCreateNutritionPlan, C as useMybCreateProgram, B as useMybDailyMacros, G as useMybDeleteMeal, P as useMybGoals, W as useMybLogMeal, Y as useMybLogRecovery, M as useMybLogSet, z as useMybMeals, S as useMybProgram, x as useMybPrograms, q as useMybRecordBodyMetric, J as useMybRecoveryLogs, A as useMybSession, k as useMybSessions, j as useMybStartSession, Q as useMybTransitionCoaching, T as useMybTransitionProgram, I as useMybUpdateGoal, H as useMybUpdateNutritionPlan, w as useMybUpdateProgram };
|
|
397
|
+
|
|
398
|
+
//# sourceMappingURL=useMyBodyShieldApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMyBodyShieldApi.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMyBodyShieldApi.ts"],"sourcesContent":["/**\n * MyBodyShield API hooks\n * @module mybodyshield/hooks\n *\n * React-Query hooks wired DIRECTLY to the real `wspace-mybodyshield-svc`\n * federated GraphQL contract (the `myb*` operations). Every query/mutation\n * below uses an inline gql string whose fields match the svc\n * `.hive-schema.graphql` exactly. No mock data.\n *\n * Transport: `graphqlFetch({ gateway: 'workspace', workspaceToken: true })` —\n * the host shell supplies the gateway base URL + a workspace-scoped token.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\nimport type {\n MybConnection,\n MybProgram,\n MybProgramStatus,\n MybWorkout,\n MybWorkoutSession,\n MybSessionStatus,\n MybSessionSet,\n MybGoal,\n MybGoalStatus,\n MybMealLog,\n MybMealType,\n MybNutritionPlan,\n MybDailyMacros,\n MybBodyMetric,\n MybBodyMetricType,\n MybRecoveryLog,\n MybRecoveryMetric,\n MybCoachingRelationship,\n MybCoachingStatus,\n MybCreateProgramInput,\n MybUpdateProgramInput,\n MybCreateWorkoutInput,\n MybCreateExerciseInput,\n MybStartSessionInput,\n MybLogSetInput,\n MybCompleteSessionInput,\n MybCreateGoalInput,\n MybUpdateGoalInput,\n MybCreateNutritionPlanInput,\n MybUpdateNutritionPlanInput,\n MybLogMealInput,\n MybRecordMetricInput,\n MybLogRecoveryInput,\n MybCreateCoachingInput,\n PaginationInput,\n} from '../types';\n\n// ============================================================================\n// Transport\n// ============================================================================\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in an in-memory cache keyed\n * by operationName+variables for ~15s (mutations are never cached). A read\n * issued right after a write (e.g. React-Query refetch triggered by our\n * `invalidateQueries`) would otherwise return the PRE-mutation response until the\n * TTL expires — making just-created/updated rows invisible until a full reload.\n * fe-libs' documented remedy is that write-performing callers clear those caches;\n * we do exactly that after every myb mutation so every follow-up read is fresh.\n */\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\nconst mybQuery = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// React-Query key roots (one namespace per domain entity).\nconst KEY = {\n programs: ['mybodyshield', 'programs'] as const,\n program: (id: string) => ['mybodyshield', 'program', id] as const,\n programWorkouts: (id: string) => ['mybodyshield', 'program-workouts', id] as const,\n sessions: ['mybodyshield', 'sessions'] as const,\n session: (id: string) => ['mybodyshield', 'session', id] as const,\n goals: ['mybodyshield', 'goals'] as const,\n goal: (id: string) => ['mybodyshield', 'goal', id] as const,\n meals: ['mybodyshield', 'meals'] as const,\n nutritionPlan: (id: string) => ['mybodyshield', 'nutrition-plan', id] as const,\n activePlan: ['mybodyshield', 'active-plan'] as const,\n dailyMacros: ['mybodyshield', 'daily-macros'] as const,\n bodyMetrics: ['mybodyshield', 'body-metrics'] as const,\n recovery: ['mybodyshield', 'recovery'] as const,\n coaching: ['mybodyshield', 'coaching'] as const,\n};\n\nconst DEFAULT_PAGE: PaginationInput = { limit: 50 };\n\n// ============================================================================\n// Reusable gql field selections (codegen-free strictness)\n// ============================================================================\n\nconst PROGRAM_FIELDS = `\n id workspaceId memberId coachId name description goalType level phase status\n weeks daysPerWeek startDate endDate tags createdAt updatedAt\n`;\n\nconst EXERCISE_FIELDS = `\n id workspaceId workoutId name instructions muscleGroup sets reps targetWeight\n restSeconds orderIndex demo { id } createdAt updatedAt\n`;\n\nconst WORKOUT_FIELDS = `\n id workspaceId programId name description type dayOfWeek weekNumber orderIndex\n durationMin createdAt updatedAt\n`;\n\nconst SET_FIELDS = `\n id workspaceId sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt\n`;\n\nconst SESSION_FIELDS = `\n id workspaceId memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt\n`;\n\nconst GOAL_FIELDS = `\n id workspaceId memberId title description type status targetValue currentValue\n baselineValue unit targetDate achievedAt createdAt updatedAt\n`;\n\nconst MEAL_FIELDS = `\n id workspaceId memberId planId name mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt createdAt updatedAt\n`;\n\nconst PLAN_FIELDS = `\n id workspaceId memberId coachId name goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt\n`;\n\nconst METRIC_FIELDS = `\n id workspaceId memberId type value unit measuredAt notes photo { id } createdAt updatedAt\n`;\n\nconst RECOVERY_FIELDS = `\n id workspaceId memberId metric score sleepHours notes loggedAt createdAt updatedAt\n`;\n\nconst COACHING_FIELDS = `\n id workspaceId coachId memberId status specialty shareWorkouts shareNutrition\n shareMetrics startedAt endedAt notes createdAt updatedAt\n`;\n\nconst MACROS_FIELDS = `\n date calories proteinG carbsG fatG calorieTarget proteinTarget carbsTarget fatTarget\n`;\n\n// ============================================================================\n// Programs (Training)\n// ============================================================================\n\nexport interface ProgramFilters {\n status?: MybProgramStatus;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybPrograms = (filters: ProgramFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.programs, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListPrograms: MybConnection<MybProgram> }>(\n `query MybListPrograms($status: MybProgramStatus, $memberId: ID, $pagination: PaginationInput) {\n mybListPrograms(status: $status, memberId: $memberId, pagination: $pagination) {\n items { ${PROGRAM_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListPrograms;\n },\n });\n};\n\nexport const useMybProgram = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.program(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{ mybProgram: MybProgram | null }>(\n `query MybProgram($id: ID!) {\n mybProgram(id: $id) {\n ${PROGRAM_FIELDS}\n workouts {\n ${WORKOUT_FIELDS}\n exercises { ${EXERCISE_FIELDS} }\n }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybProgram;\n },\n });\n};\n\nexport const useMybProgramWorkouts = (programId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.programWorkouts(programId ?? ''),\n enabled: Boolean(programId),\n queryFn: async () => {\n const result = await mybQuery<{ mybProgramWorkouts: MybWorkout[] }>(\n `query MybProgramWorkouts($programId: ID!) {\n mybProgramWorkouts(programId: $programId) {\n ${WORKOUT_FIELDS}\n exercises { ${EXERCISE_FIELDS} }\n }\n }`,\n { programId },\n apiGatewayUrl\n );\n return result.mybProgramWorkouts;\n },\n });\n};\n\nexport const useMybCreateProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateProgramInput) => {\n const result = await mybQuery<{ mybCreateProgram: MybProgram }>(\n `mutation MybCreateProgram($input: MybCreateProgramInput!) {\n mybCreateProgram(input: $input) { ${PROGRAM_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateProgram;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.programs }),\n });\n};\n\nexport const useMybUpdateProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateProgramInput }) => {\n const result = await mybQuery<{ mybUpdateProgram: MybProgram }>(\n `mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {\n mybUpdateProgram(id: $id, input: $input) { ${PROGRAM_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateProgram;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.programs });\n qc.invalidateQueries({ queryKey: KEY.program(data.id) });\n },\n });\n};\n\nexport const useMybTransitionProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; status: MybProgramStatus }) => {\n const result = await mybQuery<{ mybTransitionProgram: MybProgram }>(\n `mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {\n mybTransitionProgram(id: $id, status: $status) { ${PROGRAM_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybTransitionProgram;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.programs });\n qc.invalidateQueries({ queryKey: KEY.program(data.id) });\n },\n });\n};\n\nexport const useMybArchiveProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybArchiveProgram: boolean }>(\n `mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybArchiveProgram;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.programs }),\n });\n};\n\nexport const useMybAddWorkout = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateWorkoutInput) => {\n const result = await mybQuery<{ mybAddWorkout: MybWorkout }>(\n `mutation MybAddWorkout($input: MybCreateWorkoutInput!) {\n mybAddWorkout(input: $input) { ${WORKOUT_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybAddWorkout;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.program(data.programId) });\n qc.invalidateQueries({ queryKey: KEY.programWorkouts(data.programId) });\n },\n });\n};\n\nexport const useMybAddExercise = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateExerciseInput) => {\n const result = await mybQuery<{ mybAddExercise: { id: string; workoutId: string } }>(\n `mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybAddExercise;\n },\n onSuccess: () => {\n // Exercises live under a program's workouts; invalidate program + workout\n // caches so the newly-added exercise appears on the program detail tree.\n qc.invalidateQueries({ queryKey: ['mybodyshield', 'program'] });\n qc.invalidateQueries({ queryKey: ['mybodyshield', 'program-workouts'] });\n },\n });\n};\n\n// ============================================================================\n// Sessions / Sets (Training — live logging)\n// ============================================================================\n\nexport interface SessionFilters {\n status?: MybSessionStatus;\n programId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybSessions = (filters: SessionFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.sessions, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListSessions: MybConnection<MybWorkoutSession> }>(\n `query MybListSessions($status: MybSessionStatus, $programId: ID, $pagination: PaginationInput) {\n mybListSessions(status: $status, programId: $programId, pagination: $pagination) {\n items { ${SESSION_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n programId: filters.programId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListSessions;\n },\n });\n};\n\nexport const useMybSession = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.session(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{ mybSession: MybWorkoutSession | null }>(\n `query MybSession($id: ID!) {\n mybSession(id: $id) {\n ${SESSION_FIELDS}\n sets { ${SET_FIELDS} }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybSession;\n },\n });\n};\n\nexport const useMybStartSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybStartSessionInput) => {\n const result = await mybQuery<{ mybStartSession: MybWorkoutSession }>(\n `mutation MybStartSession($input: MybStartSessionInput!) {\n mybStartSession(input: $input) { ${SESSION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybStartSession;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.sessions }),\n });\n};\n\nexport const useMybLogSet = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogSetInput) => {\n const result = await mybQuery<{ mybLogSet: MybSessionSet }>(\n `mutation MybLogSet($input: MybLogSetInput!) {\n mybLogSet(input: $input) { ${SET_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogSet;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.session(data.sessionId) });\n qc.invalidateQueries({ queryKey: KEY.sessions });\n },\n });\n};\n\nexport const useMybCompleteSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybCompleteSessionInput }) => {\n const result = await mybQuery<{ mybCompleteSession: MybWorkoutSession }>(\n `mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {\n mybCompleteSession(id: $id, input: $input) { ${SESSION_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybCompleteSession;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.session(data.id) });\n qc.invalidateQueries({ queryKey: KEY.sessions });\n },\n });\n};\n\n// ============================================================================\n// Goals (Progress)\n// ============================================================================\n\nexport interface GoalFilters {\n status?: MybGoalStatus;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybGoals = (filters: GoalFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.goals, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListGoals: MybConnection<MybGoal> }>(\n `query MybListGoals($status: MybGoalStatus, $memberId: ID, $pagination: PaginationInput) {\n mybListGoals(status: $status, memberId: $memberId, pagination: $pagination) {\n items { ${GOAL_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListGoals;\n },\n });\n};\n\nexport const useMybCreateGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateGoalInput) => {\n const result = await mybQuery<{ mybCreateGoal: MybGoal }>(\n `mutation MybCreateGoal($input: MybCreateGoalInput!) {\n mybCreateGoal(input: $input) { ${GOAL_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\nexport const useMybUpdateGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateGoalInput }) => {\n const result = await mybQuery<{ mybUpdateGoal: MybGoal }>(\n `mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {\n mybUpdateGoal(id: $id, input: $input) { ${GOAL_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\nexport const useMybAchieveGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybAchieveGoal: MybGoal }>(\n `mutation MybAchieveGoal($id: ID!) {\n mybAchieveGoal(id: $id) { ${GOAL_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybAchieveGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\n// ============================================================================\n// Nutrition (plans, meals, macros)\n// ============================================================================\n\nexport const useMybActiveNutritionPlan = (memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.activePlan, memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybActiveNutritionPlan: MybNutritionPlan | null }>(\n `query MybActiveNutritionPlan($memberId: ID) {\n mybActiveNutritionPlan(memberId: $memberId) { ${PLAN_FIELDS} }\n }`,\n { memberId },\n apiGatewayUrl\n );\n return result.mybActiveNutritionPlan;\n },\n });\n};\n\nexport const useMybNutritionPlan = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.nutritionPlan(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{ mybNutritionPlan: MybNutritionPlan | null }>(\n `query MybNutritionPlan($id: ID!) {\n mybNutritionPlan(id: $id) {\n ${PLAN_FIELDS}\n meals { ${MEAL_FIELDS} }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybNutritionPlan;\n },\n });\n};\n\nexport interface MealFilters {\n mealType?: MybMealType;\n planId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybMeals = (filters: MealFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.meals, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListMeals: MybConnection<MybMealLog> }>(\n `query MybListMeals($mealType: MybMealType, $planId: ID, $pagination: PaginationInput) {\n mybListMeals(mealType: $mealType, planId: $planId, pagination: $pagination) {\n items { ${MEAL_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n mealType: filters.mealType,\n planId: filters.planId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListMeals;\n },\n });\n};\n\nexport const useMybDailyMacros = (date?: string, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.dailyMacros, date ?? 'today', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybDailyMacros: MybDailyMacros }>(\n `query MybDailyMacros($date: DateTime, $memberId: ID) {\n mybDailyMacros(date: $date, memberId: $memberId) { ${MACROS_FIELDS} }\n }`,\n { date, memberId },\n apiGatewayUrl\n );\n return result.mybDailyMacros;\n },\n });\n};\n\nexport const useMybCreateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateNutritionPlanInput) => {\n const result = await mybQuery<{ mybCreateNutritionPlan: MybNutritionPlan }>(\n `mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {\n mybCreateNutritionPlan(input: $input) { ${PLAN_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateNutritionPlan;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n },\n });\n};\n\nexport const useMybUpdateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateNutritionPlanInput }) => {\n const result = await mybQuery<{ mybUpdateNutritionPlan: MybNutritionPlan }>(\n `mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {\n mybUpdateNutritionPlan(id: $id, input: $input) { ${PLAN_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateNutritionPlan;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.id) });\n },\n });\n};\n\nexport const useMybActivateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybActivateNutritionPlan: MybNutritionPlan }>(\n `mutation MybActivateNutritionPlan($id: ID!) {\n mybActivateNutritionPlan(id: $id) { ${PLAN_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybActivateNutritionPlan;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.id) });\n },\n });\n};\n\nexport const useMybLogMeal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogMealInput) => {\n const result = await mybQuery<{ mybLogMeal: MybMealLog }>(\n `mutation MybLogMeal($input: MybLogMealInput!) {\n mybLogMeal(input: $input) { ${MEAL_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogMeal;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.meals });\n qc.invalidateQueries({ queryKey: KEY.dailyMacros });\n if (data.planId) qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.planId) });\n },\n });\n};\n\nexport const useMybDeleteMeal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybDeleteMeal: boolean }>(\n `mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybDeleteMeal;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.meals });\n qc.invalidateQueries({ queryKey: KEY.dailyMacros });\n },\n });\n};\n\n// ============================================================================\n// Body metrics (Progress)\n// ============================================================================\n\nexport interface BodyMetricFilters {\n type?: MybBodyMetricType;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybBodyMetrics = (filters: BodyMetricFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.bodyMetrics, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListBodyMetrics: MybConnection<MybBodyMetric> }>(\n `query MybListBodyMetrics($type: MybBodyMetricType, $memberId: ID, $pagination: PaginationInput) {\n mybListBodyMetrics(type: $type, memberId: $memberId, pagination: $pagination) {\n items { ${METRIC_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n type: filters.type,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListBodyMetrics;\n },\n });\n};\n\nexport const useMybRecordBodyMetric = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybRecordMetricInput) => {\n const result = await mybQuery<{ mybRecordBodyMetric: MybBodyMetric }>(\n `mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {\n mybRecordBodyMetric(input: $input) { ${METRIC_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybRecordBodyMetric;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.bodyMetrics }),\n });\n};\n\n// ============================================================================\n// Recovery (Wellbeing)\n// ============================================================================\n\nexport const useMybRecoveryLogs = (metric?: MybRecoveryMetric, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.recovery, metric ?? 'all', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListRecoveryLogs: MybRecoveryLog[] }>(\n `query MybListRecoveryLogs($metric: MybRecoveryMetric, $memberId: ID) {\n mybListRecoveryLogs(metric: $metric, memberId: $memberId) { ${RECOVERY_FIELDS} }\n }`,\n { metric, memberId },\n apiGatewayUrl\n );\n return result.mybListRecoveryLogs;\n },\n });\n};\n\nexport const useMybLogRecovery = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogRecoveryInput) => {\n const result = await mybQuery<{ mybLogRecovery: MybRecoveryLog }>(\n `mutation MybLogRecovery($input: MybLogRecoveryInput!) {\n mybLogRecovery(input: $input) { ${RECOVERY_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogRecovery;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.recovery }),\n });\n};\n\n// ============================================================================\n// Coaching (Wellbeing)\n// ============================================================================\n\nexport const useMybCoaching = (status?: MybCoachingStatus, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.coaching, status ?? 'all', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListCoaching: MybCoachingRelationship[] }>(\n `query MybListCoaching($status: MybCoachingStatus, $memberId: ID) {\n mybListCoaching(status: $status, memberId: $memberId) { ${COACHING_FIELDS} }\n }`,\n { status, memberId },\n apiGatewayUrl\n );\n return result.mybListCoaching;\n },\n });\n};\n\nexport const useMybCreateCoaching = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateCoachingInput) => {\n const result = await mybQuery<{ mybCreateCoaching: MybCoachingRelationship }>(\n `mutation MybCreateCoaching($input: MybCreateCoachingInput!) {\n mybCreateCoaching(input: $input) { ${COACHING_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateCoaching;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.coaching }),\n });\n};\n\nexport const useMybTransitionCoaching = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; status: MybCoachingStatus }) => {\n const result = await mybQuery<{ mybTransitionCoaching: MybCoachingRelationship }>(\n `mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {\n mybTransitionCoaching(id: $id, status: $status) { ${COACHING_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybTransitionCoaching;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.coaching }),\n });\n};\n"],"mappings":";;;;;AA0EA,IAAM,UAAqC;CACzC,IAAM,IAAI;AAGV,CAFA,EAAE,6BAA6B,OAAO,EACtC,EAAE,gCAAgC,OAAO,EACzC,EAAE,4BAA4B,OAAO;GAGjC,IAAW,OACf,GACA,GACA,MACmB;CACnB,IAAM,IAAW,MAAM,EAAoB;EACzC,SAAS;EACT;EACA;EACA;EACA,gBAAgB;EACjB,CAAC;AAEF,KAAI,EAAS,QAAQ,OACnB,OAAU,MAAM,EAAS,OAAO,IAAI,WAAW,yBAAyB;AAE1E,KAAI,CAAC,EAAS,KACZ,OAAU,MAAM,wCAAwC;AAK1D,QAHI,iBAAiB,KAAK,EAAM,IAC9B,GAAwB,EAEnB,EAAS;GAIZ,IAAM;CACV,UAAU,CAAC,gBAAgB,WAAW;CACtC,UAAU,MAAe;EAAC;EAAgB;EAAW;EAAG;CACxD,kBAAkB,MAAe;EAAC;EAAgB;EAAoB;EAAG;CACzE,UAAU,CAAC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,EAAE,qBAAkB,GAAiB;AAC3C,QAAO,EAAS;EACd,UAAU;GAAC,GAAG,EAAI;GAAU,KAAU;GAAO,KAAY;GAAK;EAC9D,SAAS,aACQ,MAAM,EACnB;oEAC4D,EAAgB;YAE5E;GAAE;GAAQ;GAAU,EACpB,EACD,EACa;EAEjB,CAAC;GAGS,UAA6B;CACxC,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAK,GAAgB;AAC3B,QAAO,EAAY;EACjB,YAAY,OAAO,OACF,MAAM,EACnB;+CACuC,EAAgB;YAEvD,EAAE,UAAO,EACT,EACD,EACa;EAEhB,iBAAiB,EAAG,kBAAkB,EAAE,UAAU,EAAI,UAAU,CAAC;EAClE,CAAC;GAGS,UAAiC;CAC5C,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAK,GAAgB;AAC3B,QAAO,EAAY;EACjB,YAAY,OAAO,OACF,MAAM,EACnB;8DACsD,EAAgB;YAEtE,GACA,EACD,EACa;EAEhB,iBAAiB,EAAG,kBAAkB,EAAE,UAAU,EAAI,UAAU,CAAC;EAClE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useMyBodyShield as e } from "../context/MyBodyShieldContext.js";
|
|
2
|
+
import "../context/index.js";
|
|
3
|
+
import { wspaceFetch as t } from "./useMybFiles.js";
|
|
4
|
+
import { useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
|
|
5
|
+
//#region src/mybodyshield/hooks/useMybComments.ts
|
|
6
|
+
var a = (e, t) => [
|
|
7
|
+
"mybodyshield",
|
|
8
|
+
"comments",
|
|
9
|
+
e,
|
|
10
|
+
t
|
|
11
|
+
], o = (n, i) => {
|
|
12
|
+
let { apiGatewayUrl: o } = e();
|
|
13
|
+
return r({
|
|
14
|
+
queryKey: a(n, i ?? ""),
|
|
15
|
+
enabled: !!i,
|
|
16
|
+
queryFn: async () => {
|
|
17
|
+
let e = await t("query MybGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n total\n items {\n id\n authorId\n authorType\n content { text markdown }\n createdAt\n edited\n parentCommentId\n replyCount\n }\n }\n }", { input: {
|
|
18
|
+
entityType: n,
|
|
19
|
+
entityId: i,
|
|
20
|
+
take: 100,
|
|
21
|
+
parentCommentId: null
|
|
22
|
+
} }, o), r = e.getEntityComments.items.filter((e) => !e.parentCommentId);
|
|
23
|
+
return r.sort((e, t) => new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime()), {
|
|
24
|
+
items: r,
|
|
25
|
+
total: e.getEntityComments.total
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}, s = (r, o) => {
|
|
30
|
+
let { apiGatewayUrl: s } = e(), c = i();
|
|
31
|
+
return n({
|
|
32
|
+
mutationFn: async (e) => (await t("mutation MybCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }", { input: {
|
|
33
|
+
entityType: r,
|
|
34
|
+
entityId: o,
|
|
35
|
+
content: { text: e }
|
|
36
|
+
} }, s)).createEntityComment,
|
|
37
|
+
onSuccess: () => {
|
|
38
|
+
c.invalidateQueries({ queryKey: a(r, o) });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { o as useMybComments, s as useMybCreateComment };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=useMybComments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMybComments.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMybComments.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-conversations-svc EntityComment REUSE hooks (Integration B).\n * @module mybodyshield/hooks/useMybComments\n *\n * Adds a discussion surface to mybodyshield entities WITHOUT any mybodyshield-svc change by\n * reusing the generic EntityComment API composed into the WORKSPACE supergraph.\n * Comments attach to any entity by `(entityType, entityId)`:\n * - `getEntityComments(input): EntityCommentConnection!`\n * - `createEntityComment(input): EntityComment!`\n *\n * Transport reuses `wspaceFetch` from `useMybFiles` (workspace gateway +\n * workspace token). Lives in a separate file; `useMyBodyShieldApi.ts` is\n * untouched.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useMyBodyShield } from '../context';\nimport { wspaceFetch } from './useMybFiles';\n\nexport interface MybComment {\n id: string;\n authorId: string;\n authorType: string;\n content: {\n text: string | null;\n markdown: string | null;\n };\n createdAt: string;\n edited: boolean;\n parentCommentId: string | null;\n replyCount: number;\n}\n\nconst commentsKey = (entityType: string, entityId: string) =>\n ['mybodyshield', 'comments', entityType, entityId] as const;\n\n/** Top-level (root) comments for an mybodyshield entity, oldest first. */\nexport const useMybComments = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: commentsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{\n getEntityComments: { items: MybComment[]; total: number };\n }>(\n `query MybGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n total\n items {\n id\n authorId\n authorType\n content { text markdown }\n createdAt\n edited\n parentCommentId\n replyCount\n }\n }\n }`,\n {\n input: {\n entityType,\n entityId,\n take: 100,\n parentCommentId: null,\n },\n },\n apiGatewayUrl\n );\n // Render root comments oldest-first (server order is not guaranteed).\n const roots = data.getEntityComments.items.filter((c) => !c.parentCommentId);\n roots.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());\n return { items: roots, total: data.getEntityComments.total };\n },\n });\n};\n\nexport const useMybCreateComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (text: string) => {\n const data = await wspaceFetch<{ createEntityComment: { id: string } }>(\n `mutation MybCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }`,\n {\n input: {\n entityType,\n entityId,\n content: { text },\n },\n },\n apiGatewayUrl\n );\n return data.createEntityComment;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) });\n },\n });\n};\n"],"mappings":";;;;;AAkCA,IAAM,KAAe,GAAoB,MACvC;CAAC;CAAgB;CAAY;CAAY;CAAS,EAGvC,KAAkB,GAAoB,MAAiC;CAClF,IAAM,EAAE,qBAAkB,GAAiB;AAC3C,QAAO,EAAS;EACd,UAAU,EAAY,GAAY,KAAY,GAAG;EACjD,SAAS,EAAQ;EACjB,SAAS,YAAY;GACnB,IAAM,IAAO,MAAM,EAGjB,6YAeA,EACE,OAAO;IACL;IACA;IACA,MAAM;IACN,iBAAiB;IAClB,EACF,EACD,EACD,EAEK,IAAQ,EAAK,kBAAkB,MAAM,QAAQ,MAAM,CAAC,EAAE,gBAAgB;AAE5E,UADA,EAAM,MAAM,GAAG,MAAM,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS,GAAG,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,EAChF;IAAE,OAAO;IAAO,OAAO,EAAK,kBAAkB;IAAO;;EAE/D,CAAC;GAGS,KAAuB,GAAoB,MAAqB;CAC3E,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAK,GAAgB;AAC3B,QAAO,EAAY;EACjB,YAAY,OAAO,OACJ,MAAM,EACjB,wIAGA,EACE,OAAO;GACL;GACA;GACA,SAAS,EAAE,SAAM;GAClB,EACF,EACD,EACD,EACW;EAEd,iBAAiB;AACf,KAAG,kBAAkB,EAAE,UAAU,EAAY,GAAY,EAAS,EAAE,CAAC;;EAExE,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { useMyBodyShield as e } from "../context/MyBodyShieldContext.js";
|
|
2
|
+
import "../context/index.js";
|
|
3
|
+
import { useCallback as t, useState as n } from "react";
|
|
4
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
5
|
+
import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
6
|
+
//#region src/mybodyshield/hooks/useMybFiles.ts
|
|
7
|
+
var a = () => {
|
|
8
|
+
let e = globalThis;
|
|
9
|
+
e.__graphqlFetchResponseCache?.clear(), e.__graphqlFetchPendingResponses?.clear(), e.__boffGraphQLResponseCache?.clear();
|
|
10
|
+
}, o = async (e, t, n) => {
|
|
11
|
+
let r = await i({
|
|
12
|
+
gateway: "workspace",
|
|
13
|
+
baseUrl: n,
|
|
14
|
+
query: e,
|
|
15
|
+
variables: t,
|
|
16
|
+
workspaceToken: !0
|
|
17
|
+
});
|
|
18
|
+
if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL request failed");
|
|
19
|
+
if (!r.data) throw Error("GraphQL response did not include data");
|
|
20
|
+
return /^\s*mutation\b/.test(e) && a(), r.data;
|
|
21
|
+
};
|
|
22
|
+
function s(e, t, n, r) {
|
|
23
|
+
return new Promise((i, a) => {
|
|
24
|
+
let o = new XMLHttpRequest();
|
|
25
|
+
o.open("PUT", e), o.setRequestHeader("Content-Type", n), o.upload.onprogress = (e) => {
|
|
26
|
+
e.lengthComputable && r(Math.round(e.loaded / e.total * 100));
|
|
27
|
+
}, o.onload = () => {
|
|
28
|
+
o.status >= 200 && o.status < 300 ? i() : a(/* @__PURE__ */ Error(`File storage rejected the upload (HTTP ${o.status}).`));
|
|
29
|
+
}, o.onerror = () => a(/* @__PURE__ */ Error("Network error while uploading the file.")), o.onabort = () => a(/* @__PURE__ */ Error("The upload was cancelled.")), o.send(t);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
var c = () => {
|
|
33
|
+
let { apiGatewayUrl: r } = e(), [i, a] = n(!1), [c, l] = n(0), [u, d] = n(null), f = t(() => {
|
|
34
|
+
a(!1), l(0), d(null);
|
|
35
|
+
}, []);
|
|
36
|
+
return {
|
|
37
|
+
upload: t(async (e) => {
|
|
38
|
+
a(!0), l(0), d(null);
|
|
39
|
+
try {
|
|
40
|
+
let t = e.name.lastIndexOf("."), n = t > -1 ? e.name.slice(t + 1) : "", i = e.type || "application/octet-stream", a = await o("mutation MybInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }", { input: {
|
|
41
|
+
fileName: e.name,
|
|
42
|
+
extension: n,
|
|
43
|
+
mimeType: i,
|
|
44
|
+
fileSize: String(e.size),
|
|
45
|
+
visibility: "WORKSPACE"
|
|
46
|
+
} }, r), { uploadUrl: c } = a.initiateUpload, u = a.initiateUpload.session.id;
|
|
47
|
+
if (!c) throw Error("The file service did not return an upload URL.");
|
|
48
|
+
await s(c, e, i, l);
|
|
49
|
+
let d = await o("mutation MybCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }", { input: { sessionId: u } }, r);
|
|
50
|
+
return l(100), {
|
|
51
|
+
fileId: d.completeUpload.fileId,
|
|
52
|
+
fileName: d.completeUpload.file?.name ?? e.name
|
|
53
|
+
};
|
|
54
|
+
} catch (e) {
|
|
55
|
+
let t = e instanceof Error ? e.message : "The file could not be uploaded.";
|
|
56
|
+
throw d(t), e instanceof Error ? e : Error(t);
|
|
57
|
+
} finally {
|
|
58
|
+
a(!1);
|
|
59
|
+
}
|
|
60
|
+
}, [r]),
|
|
61
|
+
isUploading: i,
|
|
62
|
+
progress: c,
|
|
63
|
+
error: u,
|
|
64
|
+
reset: f
|
|
65
|
+
};
|
|
66
|
+
}, l = (t) => {
|
|
67
|
+
let { apiGatewayUrl: n } = e();
|
|
68
|
+
return r({
|
|
69
|
+
queryKey: [
|
|
70
|
+
"mybodyshield",
|
|
71
|
+
"file",
|
|
72
|
+
t ?? ""
|
|
73
|
+
],
|
|
74
|
+
enabled: !!t,
|
|
75
|
+
queryFn: async () => (await o("query MybGetFile($id: ID!) {\n getFile(id: $id) {\n id\n name\n downloadUrl\n mimeType\n size\n }\n }", { id: t }, n)).getFile
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { l as useMybFile, c as useMybFileUpload, o as wspaceFetch };
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=useMybFiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMybFiles.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMybFiles.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-files-svc REUSE hooks (Integration A).\n * @module mybodyshield/hooks/useMybFiles\n *\n * Reuses the platform file store (`wspace-files-svc`) WITHOUT any mybodyshield-svc\n * change: the eco schema already exposes `MybObservation.evidenceFileId` /\n * `MybReport.fileId`; this module lets the UI actually produce a `fileId` via\n * the canonical 3-step upload flow composed into the WORKSPACE supergraph:\n * 1. `initiateUpload(input)` → `{ uploadUrl, session { id } }`\n * 2. HTTP `PUT` the bytes to the returned signed `uploadUrl`\n * 3. `completeUpload(input: { sessionId })` → `{ fileId }`\n * plus `getFile(id)` to resolve an existing evidence/report file's name + URL.\n *\n * Transport mirrors `useMyBodyShieldApi` exactly — `graphqlFetch({ gateway:\n * 'workspace', workspaceToken: true })` — so no ApolloProvider is required.\n * These hooks live in a SEPARATE file by design; `useMyBodyShieldApi.ts` is\n * left untouched.\n */\n\nimport { useCallback, useState } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\n\n// ============================================================================\n// Shared workspace-gateway transport (reused by the comments + tags hooks too)\n// ============================================================================\n\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache. After a write we drop those caches so the invalidation refetch that\n * follows reads fresh data (same remedy `useMyBodyShieldApi` applies).\n */\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\n/** Execute a workspace-gateway GraphQL operation with the workspace token. */\nexport const wspaceFetch = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// ============================================================================\n// File upload (initiate → PUT → complete)\n// ============================================================================\n\nexport interface UploadedMybFile {\n fileId: string;\n fileName: string;\n}\n\n/** `PUT` the blob to the signed URL, reporting byte-progress via `onProgress`. */\nfunction putWithProgress(\n url: string,\n file: File,\n contentType: string,\n onProgress: (percent: number) => void\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('PUT', url);\n xhr.setRequestHeader('Content-Type', contentType);\n xhr.upload.onprogress = (event) => {\n if (event.lengthComputable) {\n onProgress(Math.round((event.loaded / event.total) * 100));\n }\n };\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve();\n } else {\n reject(new Error(`File storage rejected the upload (HTTP ${xhr.status}).`));\n }\n };\n xhr.onerror = () => reject(new Error('Network error while uploading the file.'));\n xhr.onabort = () => reject(new Error('The upload was cancelled.'));\n xhr.send(file);\n });\n}\n\nexport interface UseMybFileUploadResult {\n upload: (file: File) => Promise<UploadedMybFile>;\n isUploading: boolean;\n /** 0–100 byte-progress of the signed-URL PUT. */\n progress: number;\n error: string | null;\n reset: () => void;\n}\n\n/**\n * Imperative upload hook: `await upload(file)` runs the platform 3-step flow and\n * resolves to `{ fileId, fileName }`. `fileId` is what the eco mutations accept\n * (`MybRecordMetricInput.photoFileId`, `MybCreateExerciseInput.demoFileId`).\n */\nexport const useMybFileUpload = (): UseMybFileUploadResult => {\n const { apiGatewayUrl } = useMyBodyShield();\n const [isUploading, setIsUploading] = useState(false);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState<string | null>(null);\n\n const reset = useCallback(() => {\n setIsUploading(false);\n setProgress(0);\n setError(null);\n }, []);\n\n const upload = useCallback(\n async (file: File): Promise<UploadedMybFile> => {\n setIsUploading(true);\n setProgress(0);\n setError(null);\n try {\n const dotIndex = file.name.lastIndexOf('.');\n const extension = dotIndex > -1 ? file.name.slice(dotIndex + 1) : '';\n const mimeType = file.type || 'application/octet-stream';\n\n // 1. initiate\n const initiated = await wspaceFetch<{\n initiateUpload: { uploadUrl: string | null; session: { id: string } };\n }>(\n `mutation MybInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }`,\n {\n input: {\n fileName: file.name,\n extension,\n mimeType,\n fileSize: String(file.size),\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n\n const { uploadUrl } = initiated.initiateUpload;\n const sessionId = initiated.initiateUpload.session.id;\n if (!uploadUrl) {\n throw new Error('The file service did not return an upload URL.');\n }\n\n // 2. PUT the bytes\n await putWithProgress(uploadUrl, file, mimeType, setProgress);\n\n // 3. complete\n const completed = await wspaceFetch<{\n completeUpload: { fileId: string; file: { id: string; name: string } | null };\n }>(\n `mutation MybCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }`,\n { input: { sessionId } },\n apiGatewayUrl\n );\n\n setProgress(100);\n return {\n fileId: completed.completeUpload.fileId,\n fileName: completed.completeUpload.file?.name ?? file.name,\n };\n } catch (err) {\n const message = err instanceof Error ? err.message : 'The file could not be uploaded.';\n setError(message);\n throw err instanceof Error ? err : new Error(message);\n } finally {\n setIsUploading(false);\n }\n },\n [apiGatewayUrl]\n );\n\n return { upload, isUploading, progress, error, reset };\n};\n\n// ============================================================================\n// Resolve an existing file (name + download URL) for rendering evidence links\n// ============================================================================\n\nexport interface MybFileMeta {\n id: string;\n name: string;\n downloadUrl: string | null;\n mimeType: string;\n size: string;\n}\n\nexport const useMybFile = (id: string | null | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: ['mybodyshield', 'file', id ?? ''],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFile: MybFileMeta | null }>(\n `query MybGetFile($id: ID!) {\n getFile(id: $id) {\n id\n name\n downloadUrl\n mimeType\n size\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.getFile;\n },\n });\n};\n"],"mappings":";;;;;;AAwCA,IAAM,UAAqC;CACzC,IAAM,IAAI;AAGV,CAFA,EAAE,6BAA6B,OAAO,EACtC,EAAE,gCAAgC,OAAO,EACzC,EAAE,4BAA4B,OAAO;GAI1B,IAAc,OACzB,GACA,GACA,MACmB;CACnB,IAAM,IAAW,MAAM,EAAoB;EACzC,SAAS;EACT;EACA;EACA;EACA,gBAAgB;EACjB,CAAC;AAEF,KAAI,EAAS,QAAQ,OACnB,OAAU,MAAM,EAAS,OAAO,IAAI,WAAW,yBAAyB;AAE1E,KAAI,CAAC,EAAS,KACZ,OAAU,MAAM,wCAAwC;AAK1D,QAHI,iBAAiB,KAAK,EAAM,IAC9B,GAAwB,EAEnB,EAAS;;AAalB,SAAS,EACP,GACA,GACA,GACA,GACe;AACf,QAAO,IAAI,SAAe,GAAS,MAAW;EAC5C,IAAM,IAAM,IAAI,gBAAgB;AAiBhC,EAhBA,EAAI,KAAK,OAAO,EAAI,EACpB,EAAI,iBAAiB,gBAAgB,EAAY,EACjD,EAAI,OAAO,cAAc,MAAU;AACjC,GAAI,EAAM,oBACR,EAAW,KAAK,MAAO,EAAM,SAAS,EAAM,QAAS,IAAI,CAAC;KAG9D,EAAI,eAAe;AACjB,GAAI,EAAI,UAAU,OAAO,EAAI,SAAS,MACpC,GAAS,GAET,EAAO,gBAAI,MAAM,0CAA0C,EAAI,OAAO,IA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