myio-js-library 0.1.147 → 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 CHANGED
@@ -4760,7 +4760,7 @@ var ICON_MAP = {
4760
4760
  // src/thingsboard/main-dashboard-shopping/v-4.0.0/head-office/card-head-office.types.ts
4761
4761
  var DEFAULT_I18N = {
4762
4762
  // Status labels with icons
4763
- in_operation: "\u26A1 Em funcionamento",
4763
+ in_operation: "\u26A1 Normal",
4764
4764
  standby: "\u{1F4A4} Em standby",
4765
4765
  alert: "\u26A0\uFE0F Alerta",
4766
4766
  failure: "\u{1F6A8} Falha",
@@ -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
- updated: "Atualizado",
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 updatedMetric = document.createElement("div");
5037
- updatedMetric.className = "metric";
5038
- const updatedIcon = document.createElement("i");
5039
- updatedIcon.className = "ico ico-sync";
5040
- updatedIcon.innerHTML = Icons.dot;
5041
- updatedMetric.appendChild(updatedIcon);
5042
- const updatedLabel = document.createElement("div");
5043
- updatedLabel.className = "label";
5044
- updatedLabel.textContent = i18n.updated;
5045
- updatedMetric.appendChild(updatedLabel);
5046
- const updatedVal = document.createElement("div");
5047
- updatedVal.className = "val";
5048
- updatedMetric.appendChild(updatedVal);
5049
- footer.appendChild(updatedMetric);
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 updatedVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
5102
- updatedVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
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
@@ -4652,7 +4652,7 @@ var ICON_MAP = {
4652
4652
  // src/thingsboard/main-dashboard-shopping/v-4.0.0/head-office/card-head-office.types.ts
4653
4653
  var DEFAULT_I18N = {
4654
4654
  // Status labels with icons
4655
- in_operation: "\u26A1 Em funcionamento",
4655
+ in_operation: "\u26A1 Normal",
4656
4656
  standby: "\u{1F4A4} Em standby",
4657
4657
  alert: "\u26A0\uFE0F Alerta",
4658
4658
  failure: "\u{1F6A8} Falha",
@@ -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
- updated: "Atualizado",
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 updatedMetric = document.createElement("div");
4929
- updatedMetric.className = "metric";
4930
- const updatedIcon = document.createElement("i");
4931
- updatedIcon.className = "ico ico-sync";
4932
- updatedIcon.innerHTML = Icons.dot;
4933
- updatedMetric.appendChild(updatedIcon);
4934
- const updatedLabel = document.createElement("div");
4935
- updatedLabel.className = "label";
4936
- updatedLabel.textContent = i18n.updated;
4937
- updatedMetric.appendChild(updatedLabel);
4938
- const updatedVal = document.createElement("div");
4939
- updatedVal.className = "val";
4940
- updatedMetric.appendChild(updatedVal);
4941
- footer.appendChild(updatedMetric);
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 updatedVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
4994
- updatedVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
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;
@@ -4650,7 +4650,7 @@
4650
4650
  // src/thingsboard/main-dashboard-shopping/v-4.0.0/head-office/card-head-office.types.ts
4651
4651
  var DEFAULT_I18N = {
4652
4652
  // Status labels with icons
4653
- in_operation: "\u26A1 Em funcionamento",
4653
+ in_operation: "\u26A1 Normal",
4654
4654
  standby: "\u{1F4A4} Em standby",
4655
4655
  alert: "\u26A0\uFE0F Alerta",
4656
4656
  failure: "\u{1F6A8} Falha",
@@ -4661,7 +4661,8 @@
4661
4661
  efficiency: "Efici\xEAncia",
4662
4662
  temperature: "Temperatura",
4663
4663
  operation_time: "Tempo em opera\xE7\xE3o",
4664
- updated: "Atualizado",
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 updatedMetric = document.createElement("div");
4927
- updatedMetric.className = "metric";
4928
- const updatedIcon = document.createElement("i");
4929
- updatedIcon.className = "ico ico-sync";
4930
- updatedIcon.innerHTML = Icons.dot;
4931
- updatedMetric.appendChild(updatedIcon);
4932
- const updatedLabel = document.createElement("div");
4933
- updatedLabel.className = "label";
4934
- updatedLabel.textContent = i18n.updated;
4935
- updatedMetric.appendChild(updatedLabel);
4936
- const updatedVal = document.createElement("div");
4937
- updatedVal.className = "val";
4938
- updatedMetric.appendChild(updatedVal);
4939
- footer.appendChild(updatedMetric);
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 updatedVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
4992
- updatedVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
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;