{"version":3,"sources":["webpack:///./src/components/bend/BendProductionOutputWidget.vue","webpack:///./src/components/bend/BendProductionOutputWidget.vue?d428","webpack:///./src/components/bend/BendProductionOutputWidget.vue?045f","webpack:///./src/components/bend/BendProductionOutputWidget.vue?b384"],"names":["render","_vm","this","_c","_self","_setup","_setupProxy","KpiWidget","staticClass","attrs","trendData","unitConvertedData","generator","unit","widgetDefinition","loading","isFetchingForTheFirstTime","scopedSlots","_u","key","fn","_v","_s","$t","proxy","staticRenderFns","__default__","_defineComponent","_objectSpread","__name","props","data","type","Boolean","setup","__props","computed","_props$data$map","_props$data","map","dataItem","currentValue","kilogramsToCustomerUnit","previousValue","getTrendDataFromPieWidgetData","timeFilterEnumValue","weightUnit","__sfc","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAGE,EAAOJ,EAAIG,MAAME,YAAY,OAAOH,EAAGE,EAAOE,UAAU,CAACC,YAAY,gCAAgCC,MAAM,CAAC,UAAYJ,EAAOK,UAAU,UAAYL,EAAOM,kBAAkB,UAAYV,EAAIW,UAAU,KAAOP,EAAOQ,KAAK,iBAAmBZ,EAAIa,iBAAiB,QAAUb,EAAIc,QAAQ,0BAA4Bd,EAAIe,2BAA2BC,YAAYhB,EAAIiB,GAAG,CAAC,CAACC,IAAI,QAAQC,GAAG,WAAW,MAAO,CAACnB,EAAIoB,GAAG,IAAIpB,EAAIqB,GAAGrB,EAAIsB,GAAG,wCAAwC,OAAOC,OAAM,GAAM,CAACL,IAAI,WAAWC,GAAG,WAAW,MAAO,CAACnB,EAAIoB,GAAG,IAAIpB,EAAIqB,GAAGrB,EAAIsB,GAAG,2CAA2C,OAAOC,OAAM,QAE9oBC,EAAkB,G,wECwBhBC,EAAc,GAEQC,+BAAgBC,8BAAC,GACxCF,GAAW,IACdG,OAAQ,6BACRC,MAAO,CACLC,KAAM,KACNnB,UAAW,KACXE,iBAAkB,KAClBC,QAAS,CAAEiB,KAAMC,SACjBjB,0BAA2B,CAAEgB,KAAMC,UAErCC,MAAK,SAACC,GAER,IAAML,EAAQK,EAURxB,EAAoByB,uBACxB,eAAAC,EAAAC,EAAA,OAKK,QALLD,EACY,QADZC,EACER,EAAMC,YAAI,IAAAO,OAAA,EAAVA,EAAYC,KAAI,SAACC,GAAQ,OAAAZ,8BAAA,GACpBY,GAAQ,IACXC,aAAcC,eAAwBF,EAASC,cAC/CE,cAAeD,eAAwBF,EAASG,2BAC/C,IAAAN,IAAI,QAGL3B,EAAY0B,uBAA2B,kBAC3CQ,eACEd,EAAMC,KACND,EAAMhB,iBAAiB+B,wBAIrBhC,EAAOuB,uBAAS,kBAAMU,oBAE5B,MAAO,CAAEC,OAAO,EAAKjB,QAAOnB,oBAAmBD,YAAWG,OAAMN,sBCpEiX,I,YCO7ayC,EAAY,eACd,EACAhD,EACAyB,GACA,EACA,KACA,KACA,MAIa,aAAAuB,E","file":"js/chunk-2d23012e.965e11f9.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c(_setup.KpiWidget,{staticClass:\"bend-production-output-widget\",attrs:{\"trendData\":_setup.trendData,\"chartData\":_setup.unitConvertedData,\"generator\":_vm.generator,\"unit\":_setup.unit,\"widgetDefinition\":_vm.widgetDefinition,\"loading\":_vm.loading,\"isFetchingForTheFirstTime\":_vm.isFetchingForTheFirstTime},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.$t('bend_production_output_widget.title'))+\" \")]},proxy:true},{key:\"subtitle\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.$t('bend_production_output_widget.subtitle'))+\" \")]},proxy:true}])})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { defineComponent as _defineComponent } from 'vue'\nimport { ChartGenerator } from '@/models/Charts/abstract/chartGenerator';\nimport WidgetDefinition from '@/models/Charts/widgetDefinition';\nimport KpiWidget from '../common/KpiWidget.vue';\nimport { KpiWidgetData } from '@/models/Charts/chartsData';\nimport { kilogramsToCustomerUnit, weightUnit } from '@/utils/measurement';\nimport { computed } from 'vue';\nimport {\n TrendData,\n getTrendDataFromPieWidgetData,\n} from '@/components/bend/kpiWidgetUtils';\n\n\n/**\n * Shows the total weight produced and a pie chart with produced weight per\n * device.\n *\n * The total weight is shown with the trend as a percentage difference in\n * respect to the weight produced in the previous period\n * (widgetDefinition.timeFilter).\n *\n * On the pie chart is the weight percentage for the device for the current\n * period.\n *\n * The weights are shown in the unit configured by the customer.\n */\nconst __default__ = {};\n\nexport default /*#__PURE__*/_defineComponent({\n ...__default__,\n __name: 'BendProductionOutputWidget',\n props: {\n data: null,\n generator: null,\n widgetDefinition: null,\n loading: { type: Boolean },\n isFetchingForTheFirstTime: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n data: KpiWidgetData[] | null;\n generator: ChartGenerator;\n widgetDefinition: WidgetDefinition;\n loading: boolean;\n isFetchingForTheFirstTime: boolean;\n};\n\n\n\nconst unitConvertedData = computed(\n () =>\n props.data?.map((dataItem) => ({\n ...dataItem,\n currentValue: kilogramsToCustomerUnit(dataItem.currentValue),\n previousValue: kilogramsToCustomerUnit(dataItem.previousValue),\n })) ?? null,\n);\n\nconst trendData = computed(() =>\n getTrendDataFromPieWidgetData(\n props.data,\n props.widgetDefinition.timeFilterEnumValue!,\n ),\n);\n\nconst unit = computed(() => weightUnit());\n\nreturn { __sfc: true,props, unitConvertedData, trendData, unit, KpiWidget }\n}\n\n})","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BendProductionOutputWidget.vue?vue&type=script&setup=true&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BendProductionOutputWidget.vue?vue&type=script&setup=true&lang=ts\"","import { render, staticRenderFns } from \"./BendProductionOutputWidget.vue?vue&type=template&id=07dd1531\"\nimport script from \"./BendProductionOutputWidget.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./BendProductionOutputWidget.vue?vue&type=script&setup=true&lang=ts\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}