myio-js-library 0.1.148 → 0.1.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +35 -17
- package/dist/index.js +35 -17
- package/dist/myio-js-library.umd.js +35 -17
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4771,7 +4771,8 @@ var DEFAULT_I18N = {
|
|
|
4771
4771
|
efficiency: "Efici\xEAncia",
|
|
4772
4772
|
temperature: "Temperatura",
|
|
4773
4773
|
operation_time: "Tempo em opera\xE7\xE3o",
|
|
4774
|
-
|
|
4774
|
+
last_telemetry: "\xDAlt. Telemetria",
|
|
4775
|
+
instantaneous_power: "Pot\xEAncia",
|
|
4775
4776
|
current_suffix: "Atual",
|
|
4776
4777
|
// Menu labels
|
|
4777
4778
|
menu_dashboard: "Dashboard",
|
|
@@ -5033,20 +5034,34 @@ function buildDOM(state) {
|
|
|
5033
5034
|
opTimeVal.className = "val";
|
|
5034
5035
|
opTimeMetric.appendChild(opTimeVal);
|
|
5035
5036
|
footer.appendChild(opTimeMetric);
|
|
5036
|
-
const
|
|
5037
|
-
|
|
5038
|
-
const
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
const
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
const
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
footer.appendChild(
|
|
5037
|
+
const powerMetric = document.createElement("div");
|
|
5038
|
+
powerMetric.className = "metric";
|
|
5039
|
+
const powerIcon = document.createElement("i");
|
|
5040
|
+
powerIcon.className = "ico ico-power";
|
|
5041
|
+
powerIcon.innerHTML = Icons.dot;
|
|
5042
|
+
powerMetric.appendChild(powerIcon);
|
|
5043
|
+
const powerLabel = document.createElement("div");
|
|
5044
|
+
powerLabel.className = "label";
|
|
5045
|
+
powerLabel.textContent = i18n.instantaneous_power || "Pot\xEAncia";
|
|
5046
|
+
powerMetric.appendChild(powerLabel);
|
|
5047
|
+
const powerVal = document.createElement("div");
|
|
5048
|
+
powerVal.className = "val";
|
|
5049
|
+
powerMetric.appendChild(powerVal);
|
|
5050
|
+
footer.appendChild(powerMetric);
|
|
5051
|
+
const telemetryMetric = document.createElement("div");
|
|
5052
|
+
telemetryMetric.className = "metric";
|
|
5053
|
+
const telemetryIcon = document.createElement("i");
|
|
5054
|
+
telemetryIcon.className = "ico ico-sync";
|
|
5055
|
+
telemetryIcon.innerHTML = Icons.dot;
|
|
5056
|
+
telemetryMetric.appendChild(telemetryIcon);
|
|
5057
|
+
const telemetryLabel = document.createElement("div");
|
|
5058
|
+
telemetryLabel.className = "label";
|
|
5059
|
+
telemetryLabel.textContent = i18n.last_telemetry || "\xDAlt. Telemetria";
|
|
5060
|
+
telemetryMetric.appendChild(telemetryLabel);
|
|
5061
|
+
const telemetryVal = document.createElement("div");
|
|
5062
|
+
telemetryVal.className = "val";
|
|
5063
|
+
telemetryMetric.appendChild(telemetryVal);
|
|
5064
|
+
footer.appendChild(telemetryMetric);
|
|
5050
5065
|
root.appendChild(footer);
|
|
5051
5066
|
return root;
|
|
5052
5067
|
}
|
|
@@ -5098,8 +5113,11 @@ function paint(root, state) {
|
|
|
5098
5113
|
}
|
|
5099
5114
|
const opTimeVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(1) .val");
|
|
5100
5115
|
opTimeVal.textContent = entityObject.operationHours;
|
|
5101
|
-
const
|
|
5102
|
-
|
|
5116
|
+
const powerVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
|
|
5117
|
+
const instantPower = entityObject.instantaneousPower ?? entityObject.consumption_power ?? null;
|
|
5118
|
+
powerVal.textContent = instantPower !== null ? `${Number(instantPower).toFixed(2)} kW` : "-";
|
|
5119
|
+
const telemetryVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(3) .val");
|
|
5120
|
+
telemetryVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
|
|
5103
5121
|
}
|
|
5104
5122
|
function bindEvents(root, state, callbacks) {
|
|
5105
5123
|
const { entityObject } = state;
|
package/dist/index.js
CHANGED
|
@@ -4663,7 +4663,8 @@ var DEFAULT_I18N = {
|
|
|
4663
4663
|
efficiency: "Efici\xEAncia",
|
|
4664
4664
|
temperature: "Temperatura",
|
|
4665
4665
|
operation_time: "Tempo em opera\xE7\xE3o",
|
|
4666
|
-
|
|
4666
|
+
last_telemetry: "\xDAlt. Telemetria",
|
|
4667
|
+
instantaneous_power: "Pot\xEAncia",
|
|
4667
4668
|
current_suffix: "Atual",
|
|
4668
4669
|
// Menu labels
|
|
4669
4670
|
menu_dashboard: "Dashboard",
|
|
@@ -4925,20 +4926,34 @@ function buildDOM(state) {
|
|
|
4925
4926
|
opTimeVal.className = "val";
|
|
4926
4927
|
opTimeMetric.appendChild(opTimeVal);
|
|
4927
4928
|
footer.appendChild(opTimeMetric);
|
|
4928
|
-
const
|
|
4929
|
-
|
|
4930
|
-
const
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
const
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
const
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
footer.appendChild(
|
|
4929
|
+
const powerMetric = document.createElement("div");
|
|
4930
|
+
powerMetric.className = "metric";
|
|
4931
|
+
const powerIcon = document.createElement("i");
|
|
4932
|
+
powerIcon.className = "ico ico-power";
|
|
4933
|
+
powerIcon.innerHTML = Icons.dot;
|
|
4934
|
+
powerMetric.appendChild(powerIcon);
|
|
4935
|
+
const powerLabel = document.createElement("div");
|
|
4936
|
+
powerLabel.className = "label";
|
|
4937
|
+
powerLabel.textContent = i18n.instantaneous_power || "Pot\xEAncia";
|
|
4938
|
+
powerMetric.appendChild(powerLabel);
|
|
4939
|
+
const powerVal = document.createElement("div");
|
|
4940
|
+
powerVal.className = "val";
|
|
4941
|
+
powerMetric.appendChild(powerVal);
|
|
4942
|
+
footer.appendChild(powerMetric);
|
|
4943
|
+
const telemetryMetric = document.createElement("div");
|
|
4944
|
+
telemetryMetric.className = "metric";
|
|
4945
|
+
const telemetryIcon = document.createElement("i");
|
|
4946
|
+
telemetryIcon.className = "ico ico-sync";
|
|
4947
|
+
telemetryIcon.innerHTML = Icons.dot;
|
|
4948
|
+
telemetryMetric.appendChild(telemetryIcon);
|
|
4949
|
+
const telemetryLabel = document.createElement("div");
|
|
4950
|
+
telemetryLabel.className = "label";
|
|
4951
|
+
telemetryLabel.textContent = i18n.last_telemetry || "\xDAlt. Telemetria";
|
|
4952
|
+
telemetryMetric.appendChild(telemetryLabel);
|
|
4953
|
+
const telemetryVal = document.createElement("div");
|
|
4954
|
+
telemetryVal.className = "val";
|
|
4955
|
+
telemetryMetric.appendChild(telemetryVal);
|
|
4956
|
+
footer.appendChild(telemetryMetric);
|
|
4942
4957
|
root.appendChild(footer);
|
|
4943
4958
|
return root;
|
|
4944
4959
|
}
|
|
@@ -4990,8 +5005,11 @@ function paint(root, state) {
|
|
|
4990
5005
|
}
|
|
4991
5006
|
const opTimeVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(1) .val");
|
|
4992
5007
|
opTimeVal.textContent = entityObject.operationHours;
|
|
4993
|
-
const
|
|
4994
|
-
|
|
5008
|
+
const powerVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
|
|
5009
|
+
const instantPower = entityObject.instantaneousPower ?? entityObject.consumption_power ?? null;
|
|
5010
|
+
powerVal.textContent = instantPower !== null ? `${Number(instantPower).toFixed(2)} kW` : "-";
|
|
5011
|
+
const telemetryVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(3) .val");
|
|
5012
|
+
telemetryVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
|
|
4995
5013
|
}
|
|
4996
5014
|
function bindEvents(root, state, callbacks) {
|
|
4997
5015
|
const { entityObject } = state;
|
|
@@ -4661,7 +4661,8 @@
|
|
|
4661
4661
|
efficiency: "Efici\xEAncia",
|
|
4662
4662
|
temperature: "Temperatura",
|
|
4663
4663
|
operation_time: "Tempo em opera\xE7\xE3o",
|
|
4664
|
-
|
|
4664
|
+
last_telemetry: "\xDAlt. Telemetria",
|
|
4665
|
+
instantaneous_power: "Pot\xEAncia",
|
|
4665
4666
|
current_suffix: "Atual",
|
|
4666
4667
|
// Menu labels
|
|
4667
4668
|
menu_dashboard: "Dashboard",
|
|
@@ -4923,20 +4924,34 @@
|
|
|
4923
4924
|
opTimeVal.className = "val";
|
|
4924
4925
|
opTimeMetric.appendChild(opTimeVal);
|
|
4925
4926
|
footer.appendChild(opTimeMetric);
|
|
4926
|
-
const
|
|
4927
|
-
|
|
4928
|
-
const
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
const
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
const
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
footer.appendChild(
|
|
4927
|
+
const powerMetric = document.createElement("div");
|
|
4928
|
+
powerMetric.className = "metric";
|
|
4929
|
+
const powerIcon = document.createElement("i");
|
|
4930
|
+
powerIcon.className = "ico ico-power";
|
|
4931
|
+
powerIcon.innerHTML = Icons.dot;
|
|
4932
|
+
powerMetric.appendChild(powerIcon);
|
|
4933
|
+
const powerLabel = document.createElement("div");
|
|
4934
|
+
powerLabel.className = "label";
|
|
4935
|
+
powerLabel.textContent = i18n.instantaneous_power || "Pot\xEAncia";
|
|
4936
|
+
powerMetric.appendChild(powerLabel);
|
|
4937
|
+
const powerVal = document.createElement("div");
|
|
4938
|
+
powerVal.className = "val";
|
|
4939
|
+
powerMetric.appendChild(powerVal);
|
|
4940
|
+
footer.appendChild(powerMetric);
|
|
4941
|
+
const telemetryMetric = document.createElement("div");
|
|
4942
|
+
telemetryMetric.className = "metric";
|
|
4943
|
+
const telemetryIcon = document.createElement("i");
|
|
4944
|
+
telemetryIcon.className = "ico ico-sync";
|
|
4945
|
+
telemetryIcon.innerHTML = Icons.dot;
|
|
4946
|
+
telemetryMetric.appendChild(telemetryIcon);
|
|
4947
|
+
const telemetryLabel = document.createElement("div");
|
|
4948
|
+
telemetryLabel.className = "label";
|
|
4949
|
+
telemetryLabel.textContent = i18n.last_telemetry || "\xDAlt. Telemetria";
|
|
4950
|
+
telemetryMetric.appendChild(telemetryLabel);
|
|
4951
|
+
const telemetryVal = document.createElement("div");
|
|
4952
|
+
telemetryVal.className = "val";
|
|
4953
|
+
telemetryMetric.appendChild(telemetryVal);
|
|
4954
|
+
footer.appendChild(telemetryMetric);
|
|
4940
4955
|
root.appendChild(footer);
|
|
4941
4956
|
return root;
|
|
4942
4957
|
}
|
|
@@ -4988,8 +5003,11 @@
|
|
|
4988
5003
|
}
|
|
4989
5004
|
const opTimeVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(1) .val");
|
|
4990
5005
|
opTimeVal.textContent = entityObject.operationHours;
|
|
4991
|
-
const
|
|
4992
|
-
|
|
5006
|
+
const powerVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
|
|
5007
|
+
const instantPower = entityObject.instantaneousPower ?? entityObject.consumption_power ?? null;
|
|
5008
|
+
powerVal.textContent = instantPower !== null ? `${Number(instantPower).toFixed(2)} kW` : "-";
|
|
5009
|
+
const telemetryVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(3) .val");
|
|
5010
|
+
telemetryVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
|
|
4993
5011
|
}
|
|
4994
5012
|
function bindEvents(root, state, callbacks) {
|
|
4995
5013
|
const { entityObject } = state;
|