{"version":3,"sources":["webpack:///./src/views/components/ThermostatPreferencesComponents/PreferenceTemperatureRange/PreferenceTemperatureRange.vue?e14e","webpack:///./src/views/components/ThermostatPreferencesComponents/PreferenceTemperatureRange/PreferenceTemperatureRange.ts","webpack:///./src/views/components/ThermostatPreferencesComponents/PreferenceTemperatureRange/PreferenceTemperatureRange.vue","webpack:///./src/views/components/ThermostatPreferencesComponents/ThermoPreferenceComponent.ts"],"names":["_hoisted_1","key","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","for","render","_ctx","_cache","$props","$setup","$data","$options","_component_Slider","_component_Checkbox","preferenceLabel","$t","modelValue","heatingTempRange","$event","min","chosenTempParams","max","step","range","disabled","readOnly","tempLabel","roomObject","heatingAntifreeze","coolingTempRange","coolingThermalProtection","id","name","isApplyAllTemperatureRange","binary","TemperatureType","dataCelsius","dataFahrenheit","this","temperatureType","Fahrenheit","heatingSetpointLow","heatingSetpointHigh","coolingSetpointLow","coolingSetpointHigh","ThermoPreferenceComponent","watch","values","oldValues","__exports__","props","type","Object","required","String","Boolean","default"],"mappings":"wIAEMA,EAAa,CACjBC,IAAK,EACLC,MAAO,QAEHC,EAAa,CAAED,MAAO,QACtBE,EAAa,CAAEF,MAAO,QACtBG,EAAa,CAAEH,MAAO,4CACtBI,EAAa,CAAEJ,MAAO,QACtBK,EAAa,CAAEL,MAAO,QACtBM,EAAa,CAAEN,MAAO,wCACtBO,EAAa,CAAEP,MAAO,QACtBQ,EAAa,CAAER,MAAO,aACtBS,EAAc,CAAET,MAAO,QACvBU,EAAc,CAAEV,MAAO,4CACvBW,EAAc,CAAEX,MAAO,QACvBY,EAAc,CAAEZ,MAAO,QACvBa,EAAc,CAAEb,MAAO,wCACvBc,EAAc,CAAEd,MAAO,QACvBe,EAAc,CAAEf,MAAO,mD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iB,GAAKS,KAAKX,WAAWgB,mBACvCL,KAAKX,WAAWgB,mBAChBL,KAAKlB,iBAAiBD,IAC1BmB,KAAKT,iBAAiB,GAAKS,KAAKX,WAAWiB,oBACvCN,KAAKX,WAAWiB,oBAChBN,KAAKlB,iBAAiBC,IAErBiB,KAAKX,WAAWC,oBACnBU,KAAKX,WAAWC,kBAAoBU,KAAKlB,iBAAiBD,KAGvDmB,KAAKX,WAAWG,2BACnBQ,KAAKX,WAAWG,yBAA2BQ,KAAKlB,iBAAiBD,SA3CvE,GAAwD0B,EAAA,MAAnC,EAA0B,gBAf9C,eAAQ,CACPb,KAAM,6BACNc,MAAO,CACL7B,iBAAkB,SAAU8B,EAA0BC,GAC/CA,IACLV,KAAKX,WAAWc,mBAAqBM,EAAO,GAC5CT,KAAKX,WAAWe,oBAAsBK,EAAO,KAE/ClB,iBAAkB,SAAUkB,EAA0BC,GAC/CA,IACLV,KAAKX,WAAWgB,mBAAqBI,EAAO,GAC5CT,KAAKX,WAAWiB,oBAAsBG,EAAO,SAI9B,W,qBCdrB,MAAME,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS5C,KAErD,gB,kGCaMwC,EAArB,qIAAuD,QAAlCA,EAAyB,gBAhB7C,eAAQ,CACPK,MAAO,CACLvB,WAAY,CACVwB,KAAMC,OACNC,UAAU,GAEZvC,gBAAiB,CACfqC,KAAMG,OACND,UAAU,GAEZ5B,SAAU,CACR0B,KAAMI,QACNC,SAAS,OAIMX,GAAA","file":"js/chunk-3aa1ad77.a7384faf.js","sourcesContent":["import { toDisplayString as _toDisplayString, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"mb-4\"\n}\nconst _hoisted_2 = { class: \"mb-2\" }\nconst _hoisted_3 = { class: \"px-3\" }\nconst _hoisted_4 = { class: \"d-flex justify-content-between mt-3 px-2\" }\nconst _hoisted_5 = { class: \"mt-4\" }\nconst _hoisted_6 = { class: \"px-3\" }\nconst _hoisted_7 = { class: \"d-flex justify-content-end mt-3 px-2\" }\nconst _hoisted_8 = { class: \"mr-2\" }\nconst _hoisted_9 = { class: \"mt-4 mb-2\" }\nconst _hoisted_10 = { class: \"px-3\" }\nconst _hoisted_11 = { class: \"d-flex justify-content-between mt-3 px-2\" }\nconst _hoisted_12 = { class: \"mt-4\" }\nconst _hoisted_13 = { class: \"px-3\" }\nconst _hoisted_14 = { class: \"d-flex justify-content-end mt-3 px-2\" }\nconst _hoisted_15 = { class: \"mr-2\" }\nconst _hoisted_16 = { class: \"p-field-checkbox d-flex align-items-center mt-3\" }\nconst _hoisted_17 = { for: \"ApplyAllThermostats\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_Slider = _resolveComponent(\"Slider\")\n const _component_Checkbox = _resolveComponent(\"Checkbox\")\n\n return (_openBlock(), _createBlock(\"div\", null, [\n (_ctx.preferenceLabel)\n ? (_openBlock(), _createBlock(\"h1\", _hoisted_1, _toDisplayString(_ctx.preferenceLabel), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"h5\", _hoisted_2, _toDisplayString(_ctx.$t(\"AppResource.HeatingUpper\")), 1),\n _createVNode(\"p\", null, _toDisplayString(_ctx.$t(\"AppResource.TemperatureRangeHeatingSetpoint\")), 1),\n _createVNode(\"div\", _hoisted_3, [\n _createVNode(_component_Slider, {\n modelValue: _ctx.heatingTempRange,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_ctx.heatingTempRange = $event)),\n min: _ctx.chosenTempParams.min,\n max: _ctx.chosenTempParams.max,\n step: _ctx.chosenTempParams.step,\n range: true,\n disabled: _ctx.readOnly\n }, null, 8, [\"modelValue\", \"min\", \"max\", \"step\", \"disabled\"])\n ]),\n _createVNode(\"div\", _hoisted_4, [\n _createVNode(\"span\", null, _toDisplayString(_ctx.heatingTempRange[0]), 1),\n _createVNode(\"span\", null, _toDisplayString(_ctx.tempLabel), 1),\n _createVNode(\"span\", null, _toDisplayString(_ctx.heatingTempRange[1]), 1)\n ]),\n _createVNode(\"p\", _hoisted_5, _toDisplayString(_ctx.$t(\"AppResource.Antifreeze\")), 1),\n _createVNode(\"div\", _hoisted_6, [\n _createVNode(_component_Slider, {\n modelValue: _ctx.roomObject.heatingAntifreeze,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_ctx.roomObject.heatingAntifreeze = $event)),\n min: _ctx.chosenTempParams.min,\n max: _ctx.chosenTempParams.max,\n step: _ctx.chosenTempParams.step,\n disabled: _ctx.readOnly\n }, null, 8, [\"modelValue\", \"min\", \"max\", \"step\", \"disabled\"])\n ]),\n _createVNode(\"div\", _hoisted_7, [\n _createVNode(\"span\", _hoisted_8, _toDisplayString(_ctx.tempLabel) + \": \", 1),\n _createVNode(\"span\", null, _toDisplayString(_ctx.roomObject.heatingAntifreeze), 1)\n ]),\n _createVNode(\"h5\", _hoisted_9, _toDisplayString(_ctx.$t(\"AppResource.CoolingUpper\")), 1),\n _createVNode(\"p\", null, _toDisplayString(_ctx.$t(\"AppResource.TemperatureRangeCoolingSetpoint\")), 1),\n _createVNode(\"div\", _hoisted_10, [\n _createVNode(_component_Slider, {\n modelValue: _ctx.coolingTempRange,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => (_ctx.coolingTempRange = $event)),\n min: _ctx.chosenTempParams.min,\n max: _ctx.chosenTempParams.max,\n step: _ctx.chosenTempParams.step,\n range: true,\n disabled: _ctx.readOnly\n }, null, 8, [\"modelValue\", \"min\", \"max\", \"step\", \"disabled\"])\n ]),\n _createVNode(\"div\", _hoisted_11, [\n _createVNode(\"span\", null, _toDisplayString(_ctx.coolingTempRange[0]), 1),\n _createVNode(\"span\", null, _toDisplayString(_ctx.tempLabel), 1),\n _createVNode(\"span\", null, _toDisplayString(_ctx.coolingTempRange[1]), 1)\n ]),\n _createVNode(\"p\", _hoisted_12, _toDisplayString(_ctx.$t(\"AppResource.ThermalProtection\")), 1),\n _createVNode(\"div\", _hoisted_13, [\n _createVNode(_component_Slider, {\n modelValue: _ctx.roomObject.coolingThermalProtection,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_ctx.roomObject.coolingThermalProtection = $event)),\n min: _ctx.chosenTempParams.min,\n max: _ctx.chosenTempParams.max,\n step: _ctx.chosenTempParams.step,\n disabled: _ctx.readOnly\n }, null, 8, [\"modelValue\", \"min\", \"max\", \"step\", \"disabled\"])\n ]),\n _createVNode(\"div\", _hoisted_14, [\n _createVNode(\"span\", _hoisted_15, _toDisplayString(_ctx.tempLabel) + \": \", 1),\n _createVNode(\"span\", null, _toDisplayString(_ctx.roomObject.coolingThermalProtection), 1)\n ]),\n _createVNode(\"div\", _hoisted_16, [\n _createVNode(_component_Checkbox, {\n id: \"ApplyAllThermostats\",\n name: \"ApplyAllThermostats\",\n modelValue: _ctx.roomObject.isApplyAllTemperatureRange,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => (_ctx.roomObject.isApplyAllTemperatureRange = $event)),\n binary: true,\n disabled: _ctx.readOnly\n }, null, 8, [\"modelValue\", \"disabled\"]),\n _createVNode(\"label\", _hoisted_17, _toDisplayString(_ctx.$t(\"AppResource.ApplyAllThermostats\")), 1)\n ])\n ]))\n}","import { Options } from 'vue-class-component';\nimport ThermoPreferenceComponent from '../ThermoPreferenceComponent';\nimport { TemperatureType } from '@/../client-generator/generated-clients/device-settings';\n\n@Options({\n name: 'PreferenceTemperatureRange',\n watch: {\n heatingTempRange: function (values: [number, number], oldValues) {\n if (!oldValues) return;\n this.roomObject.heatingSetpointLow = values[0];\n this.roomObject.heatingSetpointHigh = values[1];\n },\n coolingTempRange: function (values: [number, number], oldValues) {\n if (!oldValues) return;\n this.roomObject.coolingSetpointLow = values[0];\n this.roomObject.coolingSetpointHigh = values[1];\n },\n },\n})\nexport default class PreferenceTemperatureRange extends ThermoPreferenceComponent {\n TemperatureType = TemperatureType;\n\n dataCelsius = { min: 3, max: 40, step: 0.5 };\n dataFahrenheit = { min: 37.4, max: 104, step: 0.9 };\n\n heatingTempRange = [0, 0];\n coolingTempRange = [0, 0];\n\n get chosenTempParams() {\n if (this.roomObject.temperatureType === TemperatureType.Fahrenheit) {\n return this.dataFahrenheit;\n }\n return this.dataCelsius;\n }\n\n get tempLabel() {\n if (this.roomObject.temperatureType === TemperatureType.Fahrenheit) {\n return this.$t('AppResource.FahrenheitDegrees');\n }\n return this.$t('AppResource.CelsiusDegrees');\n }\n\n mounted() {\n this.heatingTempRange[0] = this.roomObject.heatingSetpointLow\n ? this.roomObject.heatingSetpointLow\n : this.chosenTempParams.min;\n this.heatingTempRange[1] = this.roomObject.heatingSetpointHigh\n ? this.roomObject.heatingSetpointHigh\n : this.chosenTempParams.max;\n\n this.coolingTempRange[0] = this.roomObject.coolingSetpointLow\n ? this.roomObject.coolingSetpointLow\n : this.chosenTempParams.min;\n this.coolingTempRange[1] = this.roomObject.coolingSetpointHigh\n ? this.roomObject.coolingSetpointHigh\n : this.chosenTempParams.max;\n\n if (!this.roomObject.heatingAntifreeze) {\n this.roomObject.heatingAntifreeze = this.chosenTempParams.min;\n }\n\n if (!this.roomObject.coolingThermalProtection) {\n this.roomObject.coolingThermalProtection = this.chosenTempParams.min;\n }\n }\n}\n","import { render } from \"./PreferenceTemperatureRange.vue?vue&type=template&id=3cf15cfe&ts=true\"\nimport script from \"./PreferenceTemperatureRange.ts?vue&type=script&lang=ts\"\nexport * from \"./PreferenceTemperatureRange.ts?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/home/vsts/work/1/s/Frontend/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { PropType } from 'vue';\nimport { Vue, Options } from 'vue-class-component';\nimport { IThermoRoomObjectDTO } from '@/../client-generator/generated-clients/plants';\n\n@Options({\n props: {\n roomObject: {\n type: Object as PropType,\n required: true,\n },\n preferenceLabel: {\n type: String,\n required: true,\n },\n readOnly: {\n type: Boolean,\n default: false,\n },\n },\n})\nexport default class ThermoPreferenceComponent extends Vue {\n roomObject!: IThermoRoomObjectDTO;\n}\n"],"sourceRoot":""}