1 line
21 KiB
Plaintext
1 line
21 KiB
Plaintext
{"version":3,"sources":["webpack:///./src/views/StatisticsView.vue?a121","webpack:///./src/components/Statistics/StatsMenu.vue?141b","webpack:///./src/components/Statistics/index.vue?7aae","webpack:///./src/components/Statistics/StatsSportsMenu.vue?554c","webpack:///./src/components/Statistics/StatsMenu.vue","webpack:///./src/components/Statistics/StatsMenu.vue?f571","webpack:///./src/components/Statistics/StatsSportsMenu.vue","webpack:///./src/components/Statistics/StatsSportsMenu.vue?6357","webpack:///./src/components/Statistics/index.vue","webpack:///./src/components/Statistics/index.vue?3e91","webpack:///./src/views/StatisticsView.vue","webpack:///./src/views/StatisticsView.vue?4316"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","emits","setup","__props","emit","selectedTimeFrame","timeFrames","onUpdateTimeFrame","timeFrame","value","_ctx","_cache","onClick","$event","frame","key","type","id","name","checked","onInput","$t","__exports__","props","userSports","selectedSportIds","default","t","sportColors","translatedSports","updateSelectedSportIds","sportId","_component_SportImage","sport","style","color","label","includes","translatedLabel","sports","user","chartParams","getChartParams","getSports","updateTimeFrame","Date","weekm","handleOnClickArrows","backward","map","filter","push","newSports","StatsMenu","onTimeFrameUpdate","onArrowClick","fullStats","onSelectedSportIdsUpdate","store","useStore","authUser","getters","GETTERS","AUTH_USER_PROFILE","SPORTS","sports_list","_component_Card","username","title","content","Statistics","nb_workouts","_","NoWorkouts"],"mappings":"uIAAA,W,kCCAA,W,yDCAA,W,2DCAA,W,4JCIMA,EAAa,CAAEC,MAAO,cACtBC,EAAa,CAAED,MAAO,eACtBE,EAAa,CAAEF,MAAO,uCACtBG,EAAa,CAAEH,MAAO,4CACtBI,EAAa,CAAC,KAAM,OAAQ,UAAW,WACvCC,EAAa,CAAEL,MAAO,eAKA,+BAAiB,CAC3CM,MAAO,CAAC,aAAc,mBACtBC,MAF2C,SAErCC,EAFqC,GAEpB,IAANC,EAAM,EAANA,KAIbC,EAAoB,i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AAK,EACLpB,MAAO,aAamB,+BAAiB,CAC3CO,MAD2C,SACrCC,GAEN,IAAMuD,EAAQ,OAAAC,EAAA,QAERC,EAAsC,uBAC1C,kBAAMF,EAAMG,QAAQ,OAAgBC,QAAQC,sBAExCxB,EAAgC,uBAAS,kBAC7CmB,EAAMG,QAAQ,OAAaC,QAAQE,QAAQd,QAAO,SAACjB,GAAD,OAChD2B,EAASnD,MAAMwD,YAAY5B,SAASJ,EAAMhB,UAIhD,OAAO,SAACP,EAAUC,GAChB,IAAMuD,EAAkB,8BAAkB,QAE1C,OAAQ,yBAAc,gCAAoB,MAAO,EAAY,CAC1D,mBAAON,GAAUO,UACb,yBAAc,gCAAoB,MAAO,EAAY,CACpD,yBAAaD,EAAiB,KAAM,CAClCE,MAAO,sBAAS,iBAAM,CACpB,6BAAiB,6BAAiB1D,EAAKW,GAAG,0BAA2B,OAEvEgD,QAAS,sBAAS,iBAAM,CACtB,yBAAaC,EAAY,CACvB3E,MAAO,4BAAgB,CAAE,iBAAmD,IAAjC,mBAAOiE,GAAUW,cAC5D/B,KAAM,mBAAOoB,GACbrB,OAAQ,mBAAOA,IACd,KAAM,EAAG,CAAC,QAAS,OAAQ,eAEhCiC,EAAG,IAE6B,IAAjC,mBAAOZ,GAAUW,aACb,yBAAc,yBAAaE,EAAA,KAAY,CAAE1D,IAAK,KAC/C,gCAAoB,IAAI,MAE9B,gCAAoB,IAAI,S,UCtDhC,MAAM,EAA2B,IAAgB,EAAQ,CAAC,CAAC,YAAY,qBAExD","file":"static/js/statistics.d03ca304.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./StatisticsView.vue?vue&type=style&index=0&id=0d93da6e&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./StatsMenu.vue?vue&type=style&index=0&id=af15954c&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./index.vue?vue&type=style&index=0&id=7d54529b&lang=scss&scoped=true\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./StatsSportsMenu.vue?vue&type=style&index=0&id=31a8ca60&lang=scss\"","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, unref as _unref, toDisplayString as _toDisplayString, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-af15954c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"chart-menu\" }\nconst _hoisted_2 = { class: \"chart-arrow\" }\nconst _hoisted_3 = { class: \"time-frames custom-checkboxes-group\" }\nconst _hoisted_4 = { class: \"time-frames-checkboxes custom-checkboxes\" }\nconst _hoisted_5 = [\"id\", \"name\", \"checked\", \"onInput\"]\nconst _hoisted_6 = { class: \"chart-arrow\" }\n\nimport { ref } from 'vue'\n\n \nexport default /*#__PURE__*/_defineComponent({\n emits: ['arrowClick', 'timeFrameUpdate'],\n setup(__props, { emit }) {\n\n \n\n let 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\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"i\", {\n class: \"fa fa-chevron-left\",\n \"aria-hidden\": \"true\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (emit('arrowClick', true)))\n })\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\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: _unref(selectedTimeFrame) === frame,\n onInput: ($event: any) => (onUpdateTimeFrame(frame))\n }, null, 40, _hoisted_5),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t(`statistics.TIME_FRAMES.${frame}`)), 1)\n ])\n ])\n }), 64))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"i\", {\n class: \"fa fa-chevron-right\",\n \"aria-hidden\": \"true\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (emit('arrowClick', false)))\n })\n ])\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=af15954c&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-af15954c\"]])\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 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-7d54529b\"),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 { IUserProfile } 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: IUserProfile\n }\n \nexport default /*#__PURE__*/_defineComponent({\n props: {\n sports: null,\n user: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n sports: ISport[]\n user: IUserProfile\n }\n\n \n\n const { t } = useI18n()\n\n const { sports, user } = toRefs(props)\n let 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 }),\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 }, null, 8, [\"sports\", \"user\", \"chartParams\", \"displayed-sport-ids\"]),\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=7d54529b&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-7d54529b\"]])\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-0d93da6e\"),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 { IUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\n const store = useStore()\n\n const authUser: ComputedRef<IUserProfile> = 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\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(authUser).nb_workouts === 0 }),\n user: _unref(authUser),\n sports: _unref(sports)\n }, null, 8, [\"class\", \"user\", \"sports\"])\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=0d93da6e&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0d93da6e\"]])\n\nexport default __exports__"],"sourceRoot":""} |