platypush/platypush/backend/http/webapp/dist/static/js/chunk-b6886800.dc96fe16.js.map

1 line
12 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/components/widgets/DateTimeWeather/Index.vue","webpack:///./src/components/Sensor.vue","webpack:///./src/components/Sensor.vue?7ceb","webpack:///./src/components/widgets/DateTimeWeather/Index.vue?ea69","webpack:///./src/components/widgets/DateTimeWeather/Index.vue?3b96","webpack:///./src/components/Sensor.vue?7b11"],"names":["class","_showDate","_showTime","show-date","show-time","show-seconds","_showSeconds","animate","showWeather","show-summary","_showSummary","_animate","icon-size","iconSize","refresh-seconds","weatherRefreshSeconds","_showSensors","Object","keys","sensors","length","temperature","icon-class","value","unit","humidity","iconClass","name","props","type","String","required","decimals","Number","default","isBoolean","Boolean","computed","_value","this","parseBoolean","parseFloat","toFixed","render","__scopeId","mixins","Utils","components","Sensor","DateTime","Weather","showDate","showTime","showSummary","showSensors","showSeconds","sensorTemperatureAttr","sensorHumidityAttr","_showWeather","data","methods","onSensorData","event","mounted","subscribe"],"mappings":"8NACOA,MAAM,qB,GACJA,MAAM,2B,GAKNA,MAAM,yB,GAKNA,MAAM,yB,SACJA,MAAM,O,GACJA,MAAM,S,EAKX,eAA+B,OAA1BA,MAAM,SAAQ,KAAM,G,GAEpBA,MAAM,S,gKApBjB,eA0BM,MA1BN,EA0BM,CAzBJ,eAGM,MAHN,EAGM,CADY,EAAAC,WAAa,EAAAC,W,iBAD7B,eAC0C,G,MAD/BC,YAAW,EAAAF,UAAYG,YAAW,EAAAF,UAAYG,eAAc,EAAAC,aAAeC,QAAS,EAAAA,S,oFAIjG,eAGM,MAHN,EAGM,CADoD,EAAAC,a,iBADxD,eACsE,G,MAD5DC,eAAc,EAAAC,aAAeH,QAAS,EAAAI,SAAWC,YAAW,EAAAC,SAC5DC,kBAAiB,EAAAC,uB,0FAG7B,eAcM,MAdN,EAcM,CAbmB,EAAAC,cAAgBC,OAAOC,KAAK,EAAAC,SAASC,Q,iBAA5D,eAYM,MAZN,EA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C,QA7Ha,WA8HXxB,KAAKyB,UAAUzB,KAAKsB,aAAc,KAAM,0D,UG9J5C,EAAOlB,OAAS,EAChB,EAAOC,UAAY,kBAEJ,gB,kFCRf,W,kCCAA","file":"static/js/chunk-b6886800.dc96fe16.js","sourcesContent":["<template>\n <div class=\"date-time-weather\">\n <div class=\"row date-time-container\">\n <DateTime :show-date=\"_showDate\" :show-time=\"_showTime\" :show-seconds=\"_showSeconds\" :animate=\"animate\"\n v-if=\"_showDate || _showTime\" />\n </div>\n\n <div class=\"row weather-container\">\n <Weather :show-summary=\"_showSummary\" :animate=\"_animate\" :icon-size=\"iconSize\"\n :refresh-seconds=\"weatherRefreshSeconds\" v-if=\"showWeather\"/>\n </div>\n\n <div class=\"row sensors-container\">\n <div class=\"row\" v-if=\"_showSensors && Object.keys(sensors).length\">\n <div class=\"col-3\">\n <Sensor icon-class=\"fas fa-thermometer-half\" :value=\"sensors.temperature\" unit=\"°\"\n v-if=\"sensors.temperature != null\" />\n </div>\n\n <div class=\"col-6\">&nbsp;</div>\n\n <div class=\"col-3\">\n <Sensor icon-class=\"fas fa-tint\" :value=\"sensors.humidity\" unit=\"%\"\n v-if=\"sensors.humidity != null\" />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport Utils from \"@/Utils\";\nimport DateTime from \"@/components/widgets/DateTime/Index\";\nimport Weather from \"@/components/widgets/Weather/Index\";\nimport Sensor from \"@/components/Sensor\";\n\n// Widget to show date, time, weather and temperature information\nexport default {\n name: 'DateTimeWeather',\n mixins: [Utils],\n components: {Sensor, DateTime, Weather},\n props: {\n // If false then the weather icon will be animated.\n // Otherwise, it will be a static image.\n animate: {\n required: false,\n default: true,\n },\n\n // Size of the weather icon in pixels.\n iconSize: {\n type: Number,\n required: false,\n default: 50,\n },\n\n // If false then don't display the date.\n showDate: {\n required: false,\n default: true,\n },\n\n // If false then don't display the time.\n showTime: {\n required: false,\n default: true,\n },\n\n // If false then don't display the weather.\n showWeather: {\n required: false,\n default: true,\n },\n\n // If false then the weather summary won't be displayed.\n showSummary: {\n required: false,\n default: true,\n },\n\n // If false then temperature/humidity sensor data won't be shown.\n showSensors: {\n required: false,\n default: true,\n },\n\n // If false then don't display the seconds.\n showSeconds: {\n required: false,\n default: true,\n },\n\n // Name of the attribute on a received SensorDataChangeEvent that\n // represents the temperature value to be rendered.\n sensorTemperatureAttr: {\n type: String,\n required: false,\n default: 'temperature',\n },\n\n // Name of the attribute on a received SensorDataChangeEvent that\n // represents the humidity value to be rendered.\n sensorHumidityAttr: {\n type: String,\n required: false,\n default: 'humidity',\n },\n\n // Weather refresh interval in seconds.\n weatherRefreshSeconds: {\n type: Number,\n required: false,\n default: 900,\n },\n },\n\n computed: {\n _showDate() {\n return this.parseBoolean(this.showDate)\n },\n\n _showTime() {\n return this.parseBoolean(this.showTime)\n },\n\n _showSeconds() {\n return this.parseBoolean(this.showSeconds)\n },\n\n _showWeather() {\n return this.parseBoolean(this.showWeather)\n },\n\n _showSummary() {\n return this.parseBoolean(this.showSummary)\n },\n\n _showSensors() {\n return this.parseBoolean(this.showSensors)\n },\n\n _animate() {\n return this.parseBoolean(this.animate)\n },\n },\n\n data: function() {\n return {\n sensors: {},\n };\n },\n\n methods: {\n onSensorData(event) {\n if (this.sensorTemperatureAttr in event.data)\n this.sensors.temperature = event.data.temperature\n\n if (this.sensorHumidityAttr in event.data)\n this.sensors.humidity = event.data.humidity\n },\n },\n\n mounted() {\n this.subscribe(this.onSensorData, null, 'platypush.message.event.sensor.SensorDataChangeEvent');\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.date-time-weather {\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-top: 0.1em;\n\n .row {\n text-align: center;\n }\n\n .date-time-container {\n height: 35%;\n }\n\n .weather-container {\n height: 45%;\n }\n\n .sensors-container {\n width: 100%;\n height: 20%;\n position: relative;\n\n .row {\n width: 100%;\n position: absolute;\n bottom: 0;\n }\n }\n}\n</style>\n","<template>\n <div class=\"sensor\">\n <div class=\"label-container col-4\" v-if=\"iconClass || name\">\n <i :class=\"iconClass\" v-if=\"iconClass\" />\n <span v-text=\"name\" v-else-if=\"name\" />\n </div>\n\n <div class=\"value-container col-8\">\n <span class=\"value\" v-text=\"_value\" />\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"Sensor\",\n props: {\n // The FontAwesome icon class to be used.\n iconClass: {\n type: String,\n required: false,\n },\n\n // The name of the sensor metric.\n name: {\n type: String,\n required: false,\n },\n\n // Sensor value.\n value: {\n required: false,\n },\n\n // Sensor unit.\n unit: {\n type: String,\n required: false,\n },\n\n // Number of decimal units.\n decimals: {\n type: Number,\n required: false,\n default: 1,\n },\n\n // Set to true if the sensor holds a binary value.\n isBoolean: {\n type: Boolean,\n required: false,\n default: false,\n },\n },\n\n computed: {\n _value() {\n if (this.value == null)\n return 'N/A'\n\n if (this.isBoolean)\n return this.parseBoolean(this.value)\n\n let value = parseFloat(this.value)\n if (this.decimals != null)\n value = value.toFixed(this.decimals)\n if (this.unit)\n value = `${value}${this.unit}`\n\n return value\n },\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.label-container {\n text-align: left;\n}\n\n.value-container {\n text-align: right;\n}\n</style>\n","import { render } from \"./Sensor.vue?vue&type=template&id=04cf169d&scoped=true\"\nimport script from \"./Sensor.vue?vue&type=script&lang=js\"\nexport * from \"./Sensor.vue?vue&type=script&lang=js\"\n\nimport \"./Sensor.vue?vue&type=style&index=0&id=04cf169d&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-04cf169d\"\n\nexport default script","import { render } from \"./Index.vue?vue&type=template&id=c215843c&scoped=true\"\nimport script from \"./Index.vue?vue&type=script&lang=js\"\nexport * from \"./Index.vue?vue&type=script&lang=js\"\n\nimport \"./Index.vue?vue&type=style&index=0&id=c215843c&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-c215843c\"\n\nexport default script","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Index.vue?vue&type=style&index=0&id=c215843c&lang=scss&scoped=true\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Sensor.vue?vue&type=style&index=0&id=04cf169d&lang=scss&scoped=true\""],"sourceRoot":""}