FitTrackee/fittrackee/dist/static/js/statistics.192c20b1.js.map
2023-07-22 11:36:58 +02:00

1 line
23 KiB
Plaintext

{"version":3,"file":"static/js/statistics.192c20b1.js","mappings":"uPAGA,MAAMA,EAAeC,KAAMC,EAAAA,EAAAA,IAAa,mBAAmBD,EAAEA,KAAIE,EAAAA,EAAAA,MAAcF,GACzEG,EAAa,CAAEC,MAAO,cACtBC,EAAa,CAAC,YACdC,EAA2BP,GAAa,KAAmBQ,EAAAA,EAAAA,GAAoB,IAAK,CACxFH,MAAO,qBACP,cAAe,QACd,MAAO,KACJI,EAAa,CACjBF,GAEIG,EAAa,CAAEL,MAAO,uCACtBM,EAAa,CAAEN,MAAO,4CACtBO,EAAa,CAAC,KAAM,OAAQ,UAAW,UAAW,YAClDC,EAAa,CAAC,KAAM,WAAY,aAChCC,EAAa,CAAC,YACdC,EAA4Bf,GAAa,KAAmBQ,EAAAA,EAAAA,GAAoB,IAAK,CACzFH,MAAO,sBACP,cAAe,QACd,MAAO,KACJW,EAAc,CAClBD,GAQF,OAA4BE,EAAAA,EAAAA,IAAiB,CAC3CC,OAAQ,YACRC,MAAO,CACLC,WAAY,CAAEC,KAAMC,UAEtBC,MAAO,CAAC,aAAc,mBACtBC,MAAMC,GAAc,KAAEC,IAExB,MAAMP,EAAQM,GAKN,WAAEL,IAAeO,EAAAA,EAAAA,IAAOR,GAIxBS,GAAoBC,EAAAA,EAAAA,IAAI,SACxBC,EAAa,CAAC,OAAQ,QAAS,QAErC,SAASC,EAAkBC,GACzBJ,EAAkBK,MAAQD,EAC1BN,EAAK,kBAAmBM,EAC1B,CAWF,OATEE,EAAAA,EAAAA,KAAU,KACR,IAAKd,EAAWa,MAAO,CACrB,MAAME,EAAQC,SAASC,eAAe,eAClCF,GACFA,EAAMG,O,KAKP,CAACC,EAAUC,MACRC,EAAAA,EAAAA,OAAcC,EAAAA,EAAAA,IAAoB,MAAOtC,EAAY,EAC3DI,EAAAA,EAAAA,GAAoB,SAAU,CAC5BH,M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IAAoB,IAAI,OAE9BA,EAAAA,EAAAA,IAAoB,IAAI,IAC5B,CAEJ,IC9DA,MAAM,GAA2B,OAAgB,EAAQ,CAAC,CAAC,YAAY,qBAEvE,O","sources":["webpack://fittrackee_client/./src/components/Statistics/StatsMenu.vue?b88a","webpack://fittrackee_client/./src/components/Statistics/StatsMenu.vue","webpack://fittrackee_client/./src/components/Statistics/StatsSportsMenu.vue?57e4","webpack://fittrackee_client/./src/components/Statistics/StatsSportsMenu.vue","webpack://fittrackee_client/./src/components/Statistics/index.vue?2efa","webpack://fittrackee_client/./src/components/Statistics/index.vue","webpack://fittrackee_client/./src/views/StatisticsView.vue?9d34","webpack://fittrackee_client/./src/views/StatisticsView.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, withKeys as _withKeys, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-361ef577\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"chart-menu\" }\nconst _hoisted_2 = [\"disabled\"]\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-left\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_4 = [\n _hoisted_3\n]\nconst _hoisted_5 = { class: \"time-frames custom-checkboxes-group\" }\nconst _hoisted_6 = { class: \"time-frames-checkboxes custom-checkboxes\" }\nconst _hoisted_7 = [\"id\", \"name\", \"checked\", \"onInput\", \"disabled\"]\nconst _hoisted_8 = [\"id\", \"tabindex\", \"onKeydown\"]\nconst _hoisted_9 = [\"disabled\"]\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-right\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_11 = [\n _hoisted_10\n]\n\nimport { onMounted, ref, toRefs } from 'vue'\n interface Props {\n isDisabled: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'StatsMenu',\n props: {\n isDisabled: { type: Boolean }\n },\n emits: ['arrowClick', 'timeFrameUpdate'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n isDisabled: boolean\n };\n\n \n const { isDisabled } = toRefs(props)\n\n \n\n const selectedTimeFrame = ref('month')\n const timeFrames = ['week', 'month', 'year']\n\n function onUpdateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n emit('timeFrameUpdate', timeFrame)\n }\n\n onMounted(() => {\n if (!isDisabled.value) {\n const input = document.getElementById('frame-month')\n if (input) {\n input.focus()\n }\n }\n })\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"button\", {\n class: \"chart-arrow transparent\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('arrowClick', true))),\n onKeydown: _cache[1] || (_cache[1] = _withKeys(($event: any) => (emit('arrowClick', true)), [\"enter\"])),\n disabled: _unref(isDisabled)\n }, _hoisted_4, 40, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n (_openBlock(), _createElementBlock(_Fragment, null, _renderList(timeFrames, (frame) => {\n return _createElementVNode(\"div\", {\n class: \"time-frame custom-checkbox\",\n key: frame\n }, [\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"radio\",\n id: frame,\n name: frame,\n checked: selectedTimeFrame.value === frame,\n onInput: ($event: any) => (onUpdateTimeFrame(frame)),\n disabled: _unref(isDisabled)\n }, null, 40, _hoisted_7),\n _createElementVNode(\"span\", {\n id: `frame-${frame}`,\n tabindex: _unref(isDisabled) ? -1 : 0,\n role: \"button\",\n onKeydown: _withKeys(($event: any) => (onUpdateTimeFrame(frame)), [\"enter\"])\n }, _toDisplayString(_ctx.$t(`statistics.TIME_FRAMES.${frame}`)), 41, _hoisted_8)\n ])\n ])\n }), 64))\n ])\n ]),\n _createElementVNode(\"button\", {\n class: \"chart-arrow transparent\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (emit('arrowClick', false))),\n onKeydown: _cache[3] || (_cache[3] = _withKeys(($event: any) => (emit('arrowClick', false)), [\"enter\"])),\n disabled: _unref(isDisabled)\n }, _hoisted_11, 40, _hoisted_9)\n ]))\n}\n}\n\n})","import script from \"./StatsMenu.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./StatsMenu.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./StatsMenu.vue?vue&type=style&index=0&id=361ef577&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-361ef577\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle } from \"vue\"\n\nconst _hoisted_1 = { class: \"sports-menu\" }\nconst _hoisted_2 = [\"id\", \"name\", \"checked\", \"onInput\"]\nconst _hoisted_3 = { class: \"sport-label\" }\n\nimport { ComputedRef, computed, inject, withDefaults, toRefs } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { translateSports } from '@/utils/sports'\n\n interface Props {\n userSports: ISport[]\n selectedSportIds?: number[]\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'StatsSportsMenu',\n props: {\n userSports: null,\n selectedSportIds: { default: () => [] }\n },\n emits: ['selectedSportIdsUpdate'],\n setup(__props: any, { emit }) {\n\nconst props = __props as { userSports: ISport[], selectedSportIds: number[] };\n\n \n\n \n\n const { t } = useI18n()\n\n const sportColors = inject('sportColors')\n const { selectedSportIds } = toRefs(props)\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.userSports, t)\n )\n\n function updateSelectedSportIds(sportId: number) {\n emit('selectedSportIdsUpdate', sportId)\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_SportImage = _resolveComponent(\"SportImage\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(translatedSports), (sport) => {\n return (_openBlock(), _createElementBlock(\"label\", {\n type: \"checkbox\",\n key: sport.id,\n style: _normalizeStyle({ color: sport.color ? sport.color : _unref(sportColors)[sport.label] })\n }, [\n _createElementVNode(\"input\", {\n type: \"checkbox\",\n id: sport.id,\n name: sport.label,\n checked: _unref(selectedSportIds).includes(sport.id),\n onInput: ($event: any) => (updateSelectedSportIds(sport.id))\n }, null, 40, _hoisted_2),\n _createVNode(_component_SportImage, {\n \"sport-label\": sport.label,\n color: sport.color\n }, null, 8, [\"sport-label\", \"color\"]),\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(sport.translatedLabel), 1)\n ], 4))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./StatsSportsMenu.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./StatsSportsMenu.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./StatsSportsMenu.vue?vue&type=style&index=0&id=31a8ca60&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-47c262da\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n id: \"user-statistics\"\n}\n\nimport { ComputedRef, Ref, computed, ref, toRefs, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import StatChart from '@/components/Common/StatsChart/index.vue'\n import StatsMenu from '@/components/Statistics/StatsMenu.vue'\n import SportsMenu from '@/components/Statistics/StatsSportsMenu.vue'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IStatisticsDateParams } from '@/types/statistics'\n import { IAuthUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { getStatsDateParams, updateChartParams } from '@/utils/statistics'\n\n interface Props {\n sports: ISport[]\n user: IAuthUserProfile\n isDisabled: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n sports: null,\n user: null,\n isDisabled: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n sports: ISport[]\n user: IAuthUserProfile\n isDisabled: boolean\n };\n\n \n\n const { t } = useI18n()\n\n const { sports, user } = toRefs(props)\n const selectedTimeFrame = ref('month')\n const chartParams: Ref<IStatisticsDateParams> = ref(\n getChartParams(selectedTimeFrame.value)\n )\n const translatedSports: ComputedRef<ITranslatedSport[]> = computed(() =>\n translateSports(props.sports, t)\n )\n const selectedSportIds: Ref<number[]> = ref(getSports(props.sports))\n\n function updateTimeFrame(timeFrame: string) {\n selectedTimeFrame.value = timeFrame\n chartParams.value = getChartParams(selectedTimeFrame.value)\n }\n function getChartParams(timeFrame: string): IStatisticsDateParams {\n return getStatsDateParams(new Date(), timeFrame, props.user.weekm)\n }\n function handleOnClickArrows(backward: boolean) {\n chartParams.value = updateChartParams(\n chartParams.value,\n backward,\n props.user.weekm\n )\n }\n function getSports(sports: ISport[]) {\n return sports.map((sport) => sport.id)\n }\n function updateSelectedSportIds(sportId: number) {\n if (selectedSportIds.value.includes(sportId)) {\n selectedSportIds.value = selectedSportIds.value.filter(\n (id) => id !== sportId\n )\n } else {\n selectedSportIds.value.push(sportId)\n }\n }\n\n watch(\n () => props.sports,\n (newSports) => {\n selectedSportIds.value = getSports(newSports)\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(translatedSports))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(StatsMenu, {\n onTimeFrameUpdate: updateTimeFrame,\n onArrowClick: handleOnClickArrows,\n isDisabled: __props.isDisabled\n }, null, 8, [\"isDisabled\"]),\n _createVNode(StatChart, {\n sports: _unref(sports),\n user: _unref(user),\n chartParams: chartParams.value,\n \"displayed-sport-ids\": selectedSportIds.value,\n fullStats: true,\n isDisabled: __props.isDisabled\n }, null, 8, [\"sports\", \"user\", \"chartParams\", \"displayed-sport-ids\", \"isDisabled\"]),\n _createVNode(SportsMenu, {\n \"selected-sport-ids\": selectedSportIds.value,\n \"user-sports\": _unref(sports),\n onSelectedSportIdsUpdate: updateSelectedSportIds\n }, null, 8, [\"selected-sport-ids\", \"user-sports\"])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=47c262da&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-47c262da\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-19ce09a2\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n id: \"statistics\",\n class: \"view\"\n}\nconst _hoisted_2 = {\n key: 0,\n class: \"container\"\n}\n\nimport { ComputedRef, computed } from 'vue'\n\n import Statistics from '@/components/Statistics/index.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'StatisticsView',\n setup(__props) {\n\n const store = useStore()\n\n const authUser: ComputedRef<IAuthUserProfile> = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef<ISport[]> = computed(() =>\n store.getters[SPORTS_STORE.GETTERS.SPORTS].filter((sport) =>\n authUser.value.sports_list.includes(sport.id)\n )\n )\n const isDisabled: ComputedRef<boolean> = computed(\n () => authUser.value.nb_workouts === 0\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(authUser).username)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('statistics.STATISTICS')), 1)\n ]),\n content: _withCtx(() => [\n _createVNode(Statistics, {\n class: _normalizeClass({ 'stats-disabled': _unref(isDisabled) }),\n user: _unref(authUser),\n sports: _unref(sports),\n isDisabled: _unref(isDisabled)\n }, null, 8, [\"class\", \"user\", \"sports\", \"isDisabled\"])\n ]),\n _: 1\n }),\n (_unref(authUser).nb_workouts === 0)\n ? (_openBlock(), _createBlock(NoWorkouts, { key: 0 }))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n}\n}\n\n})","import script from \"./StatisticsView.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./StatisticsView.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./StatisticsView.vue?vue&type=style&index=0&id=19ce09a2&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-19ce09a2\"]])\n\nexport default __exports__"],"names":["_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","class","_hoisted_2","_hoisted_3","_createElementVNode","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_defineComponent","__name","props","isDisabled","type","Boolean","emits","setup","__props","emit","toRefs","selectedTimeFrame","ref","timeFrames","onUpdateTimeFrame","timeFrame","value","onMounted","input","document","getElementById","focus","_ctx","_cache","_openBlock","_createElementBlock","onClick","$event","onKeydown","_withKeys","disabled","_unref","_Fragment","_renderList","frame","key","id","name","checked","onInput","tabindex","role","_toDisplayString","$t","__exports__","userSports","selectedSportIds","default","t","useI18n","sportColors","inject","translatedSports","computed","translateSports","updateSelectedSportIds","sportId","_component_SportImage","_resolveComponent","sport","style","_normalizeStyle","color","label","includes","_createVNode","translatedLabel","sports","user","chartParams","getChartParams","getSports","updateTimeFrame","getStatsDateParams","Date","weekm","handleOnClickArrows","backward","updateChartParams","map","filter","push","watch","newSports","StatsMenu","onTimeFrameUpdate","onArrowClick","StatChart","fullStats","SportsMenu","onSelectedSportIdsUpdate","_createCommentVNode","store","useStore","authUser","getters","AUTH_USER_STORE","SPORTS_STORE","sports_list","nb_workouts","_component_Card","username","title","_withCtx","_createTextVNode","content","Statistics","_normalizeClass","_","_createBlock","NoWorkouts"],"sourceRoot":""}