myio-js-library 0.1.160 → 0.1.161
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 +252 -149
- package/dist/index.js +252 -149
- package/dist/myio-js-library.umd.js +252 -149
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2053,8 +2053,9 @@ var MyIOSelectionStoreClass = class _MyIOSelectionStoreClass {
|
|
|
2053
2053
|
lastValue: Number(entity.lastValue) || 0,
|
|
2054
2054
|
unit: entity.unit || "",
|
|
2055
2055
|
status: entity.status || "unknown",
|
|
2056
|
-
ingestionId: entity.ingestionId || entity.id
|
|
2056
|
+
ingestionId: entity.ingestionId || entity.id,
|
|
2057
2057
|
// ⭐ ADD: Store ingestionId for API calls
|
|
2058
|
+
customerName: entity.customerName || ""
|
|
2058
2059
|
};
|
|
2059
2060
|
this.entities.set(entity.id, normalizedEntity);
|
|
2060
2061
|
}
|
|
@@ -4682,6 +4683,13 @@ var Icons = {
|
|
|
4682
4683
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
|
|
4683
4684
|
viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false">
|
|
4684
4685
|
<circle cx="12" cy="12" r="5"/>
|
|
4686
|
+
</svg>`,
|
|
4687
|
+
waterDrop: `
|
|
4688
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
4689
|
+
<g id="water" transform="translate(-4 -2)">
|
|
4690
|
+
<path id="secondary" fill="#2ca9bc" d="M19,14A7,7,0,1,1,5,14C5,8,12,3,12,3S19,8,19,14Z"/>
|
|
4691
|
+
<path id="primary" d="M19,14A7,7,0,1,1,5,14C5,8,12,3,12,3S19,8,19,14Z" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
|
4692
|
+
</g>
|
|
4685
4693
|
</svg>`,
|
|
4686
4694
|
// ⋮ Kebab (for actions menu)
|
|
4687
4695
|
kebab: `
|
|
@@ -4710,6 +4718,7 @@ var ICON_MAP = {
|
|
|
4710
4718
|
var DEFAULT_I18N = {
|
|
4711
4719
|
// Status labels with icons
|
|
4712
4720
|
in_operation: "\u26A1 Normal",
|
|
4721
|
+
in_operation_water: "\u{1F4A7} Normal",
|
|
4713
4722
|
standby: "\u{1F4A4} Em standby",
|
|
4714
4723
|
alert: "\u26A0\uFE0F Alerta",
|
|
4715
4724
|
failure: "\u{1F6A8} Falha",
|
|
@@ -4766,7 +4775,13 @@ function normalizeParams(params) {
|
|
|
4766
4775
|
}
|
|
4767
4776
|
};
|
|
4768
4777
|
}
|
|
4769
|
-
function getIconSvg(deviceType) {
|
|
4778
|
+
function getIconSvg(deviceType, domain) {
|
|
4779
|
+
if (domain === "water") {
|
|
4780
|
+
return Icons.waterDrop;
|
|
4781
|
+
}
|
|
4782
|
+
if (domain === "temperature") {
|
|
4783
|
+
return Icons.thermometer;
|
|
4784
|
+
}
|
|
4770
4785
|
return ICON_MAP[deviceType] || ICON_MAP.DEFAULT;
|
|
4771
4786
|
}
|
|
4772
4787
|
function formatPower(valueInWatts) {
|
|
@@ -4806,9 +4821,23 @@ function calculateConsumptionPercentage(target, consumption) {
|
|
|
4806
4821
|
const percentage = numericConsumption / numericTarget * 100;
|
|
4807
4822
|
return percentage;
|
|
4808
4823
|
}
|
|
4809
|
-
function getStatusInfo(deviceStatus, i18n) {
|
|
4824
|
+
function getStatusInfo(deviceStatus, i18n, domain) {
|
|
4810
4825
|
switch (deviceStatus) {
|
|
4826
|
+
// --- Novos Status de Temperatura ---
|
|
4827
|
+
case "normal":
|
|
4828
|
+
return { chipClass: "chip--ok", label: "Normal" };
|
|
4829
|
+
// Verde/Azul
|
|
4830
|
+
case "cold":
|
|
4831
|
+
return { chipClass: "chip--standby", label: "Frio" };
|
|
4832
|
+
// Azul claro/Ciano
|
|
4833
|
+
case "hot":
|
|
4834
|
+
return { chipClass: "chip--alert", label: "Quente" };
|
|
4835
|
+
// Laranja/Amarelo
|
|
4836
|
+
// --- Status Existentes ---
|
|
4811
4837
|
case DeviceStatusType.POWER_ON:
|
|
4838
|
+
if (domain === "water") {
|
|
4839
|
+
return { chipClass: "chip--ok", label: i18n.in_operation_water };
|
|
4840
|
+
}
|
|
4812
4841
|
return { chipClass: "chip--ok", label: i18n.in_operation };
|
|
4813
4842
|
case DeviceStatusType.STANDBY:
|
|
4814
4843
|
return { chipClass: "chip--standby", label: i18n.standby };
|
|
@@ -4821,6 +4850,7 @@ function getStatusInfo(deviceStatus, i18n) {
|
|
|
4821
4850
|
return { chipClass: "chip--alert", label: i18n.maintenance };
|
|
4822
4851
|
case DeviceStatusType.NOT_INSTALLED:
|
|
4823
4852
|
return { chipClass: "chip--offline", label: i18n.not_installed };
|
|
4853
|
+
// Default (Cai aqui se não achar 'normal', 'hot' etc)
|
|
4824
4854
|
case DeviceStatusType.NO_INFO:
|
|
4825
4855
|
default:
|
|
4826
4856
|
return { chipClass: "chip--offline", label: i18n.offline };
|
|
@@ -4852,6 +4882,14 @@ function getCardStateClass(deviceStatus) {
|
|
|
4852
4882
|
}
|
|
4853
4883
|
function getStatusDotClass(deviceStatus) {
|
|
4854
4884
|
switch (deviceStatus) {
|
|
4885
|
+
// --- Novos Status de Temperatura ---
|
|
4886
|
+
case "normal":
|
|
4887
|
+
return "dot--ok";
|
|
4888
|
+
case "cold":
|
|
4889
|
+
return "dot--standby";
|
|
4890
|
+
case "hot":
|
|
4891
|
+
return "dot--alert";
|
|
4892
|
+
// --- Status Existentes ---
|
|
4855
4893
|
case DeviceStatusType.POWER_ON:
|
|
4856
4894
|
return "dot--ok";
|
|
4857
4895
|
case DeviceStatusType.STANDBY:
|
|
@@ -4879,7 +4917,7 @@ function buildDOM(state) {
|
|
|
4879
4917
|
header.className = "myio-ho-card__header";
|
|
4880
4918
|
const iconContainer = document.createElement("div");
|
|
4881
4919
|
iconContainer.className = "myio-ho-card__icon";
|
|
4882
|
-
iconContainer.innerHTML = getIconSvg(entityObject.deviceType);
|
|
4920
|
+
iconContainer.innerHTML = getIconSvg(entityObject.deviceType, entityObject.domain);
|
|
4883
4921
|
header.appendChild(iconContainer);
|
|
4884
4922
|
const titleSection = document.createElement("div");
|
|
4885
4923
|
titleSection.className = "myio-ho-card__title";
|
|
@@ -5001,7 +5039,11 @@ function buildDOM(state) {
|
|
|
5001
5039
|
powerMetric.appendChild(statusDot);
|
|
5002
5040
|
const powerLabel = document.createElement("div");
|
|
5003
5041
|
powerLabel.className = "label";
|
|
5004
|
-
|
|
5042
|
+
if (entityObject.domain === "water") {
|
|
5043
|
+
powerLabel.textContent = "Leitura";
|
|
5044
|
+
} else {
|
|
5045
|
+
powerLabel.textContent = i18n.instantaneous_power || "Pot\xEAncia";
|
|
5046
|
+
}
|
|
5005
5047
|
powerMetric.appendChild(powerLabel);
|
|
5006
5048
|
const powerVal = document.createElement("div");
|
|
5007
5049
|
powerVal.className = "val";
|
|
@@ -5025,7 +5067,7 @@ function verifyOfflineStatus(entityObject, delayTimeInMins = 15) {
|
|
|
5025
5067
|
return true;
|
|
5026
5068
|
}
|
|
5027
5069
|
function paint(root, state) {
|
|
5028
|
-
const { entityObject, i18n, delayTimeConnectionInMins } = state;
|
|
5070
|
+
const { entityObject, i18n, delayTimeConnectionInMins, isSelected } = state;
|
|
5029
5071
|
if (entityObject.connectionStatus) {
|
|
5030
5072
|
if (entityObject.connectionStatus === "offline") {
|
|
5031
5073
|
entityObject.deviceStatus = DeviceStatusType.NO_INFO;
|
|
@@ -5037,16 +5079,23 @@ function paint(root, state) {
|
|
|
5037
5079
|
}
|
|
5038
5080
|
const stateClass = getCardStateClass(entityObject.deviceStatus);
|
|
5039
5081
|
root.className = `myio-ho-card ${stateClass}`;
|
|
5040
|
-
const statusInfo = getStatusInfo(entityObject.deviceStatus, i18n);
|
|
5082
|
+
const statusInfo = getStatusInfo(entityObject.deviceStatus, i18n, entityObject.domain);
|
|
5041
5083
|
const chip = root.querySelector(".chip");
|
|
5042
5084
|
chip.className = `chip ${statusInfo.chipClass}`;
|
|
5043
|
-
chip.
|
|
5085
|
+
chip.innerHTML = statusInfo.label;
|
|
5044
5086
|
const primaryValue = formatValueByDomain(entityObject.val, entityObject.domain);
|
|
5045
5087
|
const numSpan = root.querySelector(".myio-ho-card__value .num");
|
|
5046
5088
|
const unitSpan = root.querySelector(".myio-ho-card__value .unit");
|
|
5047
5089
|
numSpan.textContent = primaryValue;
|
|
5048
5090
|
const barContainer = root.querySelector(".bar");
|
|
5049
5091
|
const effContainer = root.querySelector(".myio-ho-card__eff");
|
|
5092
|
+
if (state.enableSelection) {
|
|
5093
|
+
const checkbox = root.querySelector('.myio-ho-card__select input[type="checkbox"]');
|
|
5094
|
+
if (checkbox) {
|
|
5095
|
+
checkbox.checked = !!isSelected;
|
|
5096
|
+
}
|
|
5097
|
+
root.classList.toggle("is-selected", !!isSelected);
|
|
5098
|
+
}
|
|
5050
5099
|
const targetValue = entityObject.consumptionTargetValue;
|
|
5051
5100
|
if (targetValue) {
|
|
5052
5101
|
barContainer.style.display = "";
|
|
@@ -5068,9 +5117,14 @@ function paint(root, state) {
|
|
|
5068
5117
|
}
|
|
5069
5118
|
const powerVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
|
|
5070
5119
|
if (powerVal) {
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5120
|
+
if (entityObject.domain === "water") {
|
|
5121
|
+
const pulses = entityObject.pulses ?? 0;
|
|
5122
|
+
powerVal.textContent = `${pulses} L`;
|
|
5123
|
+
} else {
|
|
5124
|
+
const instantPower = entityObject.instantaneousPower ?? entityObject.consumption_power ?? null;
|
|
5125
|
+
const powerFormatted = formatPower(instantPower);
|
|
5126
|
+
powerVal.textContent = instantPower !== null ? `${powerFormatted.num} ${powerFormatted.unit}` : "-";
|
|
5127
|
+
}
|
|
5074
5128
|
}
|
|
5075
5129
|
const statusDot = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .status-dot");
|
|
5076
5130
|
if (statusDot) {
|
|
@@ -5130,6 +5184,26 @@ function bindEvents(root, state, callbacks) {
|
|
|
5130
5184
|
callbacks.handleActionSettings(e, entityObject);
|
|
5131
5185
|
});
|
|
5132
5186
|
}
|
|
5187
|
+
const MyIOSelectionStore2 = window.MyIOLibrary?.MyIOSelectionStore || window.MyIOSelectionStore;
|
|
5188
|
+
if (MyIOSelectionStore2) {
|
|
5189
|
+
const onSelectionChange = () => {
|
|
5190
|
+
const selectedIds = MyIOSelectionStore2.getSelectedIds();
|
|
5191
|
+
const isSelected = selectedIds.includes(entityObject.entityId);
|
|
5192
|
+
if (state.isSelected !== isSelected) {
|
|
5193
|
+
state.isSelected = isSelected;
|
|
5194
|
+
paint(root, state);
|
|
5195
|
+
}
|
|
5196
|
+
};
|
|
5197
|
+
MyIOSelectionStore2.on("selection:change", onSelectionChange);
|
|
5198
|
+
root._selectionListener = onSelectionChange;
|
|
5199
|
+
}
|
|
5200
|
+
root._cleanup = () => {
|
|
5201
|
+
document.removeEventListener("click", closeMenu);
|
|
5202
|
+
document.removeEventListener("keydown", closeMenu);
|
|
5203
|
+
if (MyIOSelectionStore2 && root._selectionListener) {
|
|
5204
|
+
MyIOSelectionStore2.off("selection:change", root._selectionListener);
|
|
5205
|
+
}
|
|
5206
|
+
};
|
|
5133
5207
|
const checkbox = root.querySelector('.myio-ho-card__select input[type="checkbox"]');
|
|
5134
5208
|
if (checkbox && callbacks.handleSelect) {
|
|
5135
5209
|
checkbox.addEventListener("change", (e) => {
|
|
@@ -5197,6 +5271,7 @@ function renderCardComponentHeadOffice(containerEl, params) {
|
|
|
5197
5271
|
ensureCss();
|
|
5198
5272
|
const state = normalizeParams(params);
|
|
5199
5273
|
const root = buildDOM(state);
|
|
5274
|
+
state.isSelected = params.isSelected || false;
|
|
5200
5275
|
containerEl.appendChild(root);
|
|
5201
5276
|
bindEvents(root, state, state.callbacks);
|
|
5202
5277
|
paint(root, state);
|
|
@@ -10940,11 +11015,13 @@ var EnergyModalView = class {
|
|
|
10940
11015
|
console.log("[EnergyModalView] Bar mode toggled to:", this.currentBarMode);
|
|
10941
11016
|
}
|
|
10942
11017
|
/**
|
|
10943
|
-
|
|
10944
|
-
|
|
11018
|
+
* Applies the current theme to the modal and charts (Updated with #root override)
|
|
11019
|
+
*/
|
|
10945
11020
|
applyTheme() {
|
|
10946
11021
|
const themeToggleBtn = document.getElementById("theme-toggle-btn");
|
|
10947
|
-
const modalContent =
|
|
11022
|
+
const modalContent = this.container;
|
|
11023
|
+
const externalBody = this.container?.closest(".myio-modal-body") || document.querySelector(".myio-modal-body");
|
|
11024
|
+
const rootDiv = document.querySelector("#root > div");
|
|
10948
11025
|
if (themeToggleBtn) {
|
|
10949
11026
|
const sunIcon = themeToggleBtn.querySelector(".myio-theme-icon-sun");
|
|
10950
11027
|
const moonIcon = themeToggleBtn.querySelector(".myio-theme-icon-moon");
|
|
@@ -10957,6 +11034,14 @@ var EnergyModalView = class {
|
|
|
10957
11034
|
moonIcon.style.opacity = "0";
|
|
10958
11035
|
moonIcon.style.transform = "translate(-50%, -50%) rotate(90deg) scale(0)";
|
|
10959
11036
|
}
|
|
11037
|
+
if (externalBody) {
|
|
11038
|
+
externalBody.style.backgroundColor = "#ffffff";
|
|
11039
|
+
externalBody.style.color = "#1f2937";
|
|
11040
|
+
}
|
|
11041
|
+
if (rootDiv) {
|
|
11042
|
+
rootDiv.style.backgroundColor = "#ffffff";
|
|
11043
|
+
rootDiv.style.color = "#1f2937";
|
|
11044
|
+
}
|
|
10960
11045
|
} else {
|
|
10961
11046
|
if (sunIcon) {
|
|
10962
11047
|
sunIcon.style.opacity = "0";
|
|
@@ -10966,6 +11051,14 @@ var EnergyModalView = class {
|
|
|
10966
11051
|
moonIcon.style.opacity = "1";
|
|
10967
11052
|
moonIcon.style.transform = "translate(-50%, -50%) rotate(0deg) scale(1)";
|
|
10968
11053
|
}
|
|
11054
|
+
if (externalBody) {
|
|
11055
|
+
externalBody.style.backgroundColor = "#1f1f1f";
|
|
11056
|
+
externalBody.style.color = "#f3f4f6";
|
|
11057
|
+
}
|
|
11058
|
+
if (rootDiv) {
|
|
11059
|
+
rootDiv.style.backgroundColor = "#1f1f1f";
|
|
11060
|
+
rootDiv.style.color = "#f3f4f6";
|
|
11061
|
+
}
|
|
10969
11062
|
}
|
|
10970
11063
|
}
|
|
10971
11064
|
if (modalContent) {
|
|
@@ -11194,7 +11287,7 @@ var EnergyModalView = class {
|
|
|
11194
11287
|
${this.config.params.mode === "comparison" ? `
|
|
11195
11288
|
<!-- RFC-0097: Granularity Selector (only 1h and 1d supported) -->
|
|
11196
11289
|
<div class="myio-granularity-selector" style="display: flex; align-items: center; gap: 4px; margin-left: 8px; padding: 4px 8px; background: rgba(0,0,0,0.05); border-radius: 8px;">
|
|
11197
|
-
<span style="font-size: 11px;
|
|
11290
|
+
<span class="myio-label-secondary" style="font-size: 11px; margin-right: 4px; white-space: nowrap;">Granularidade:</span>
|
|
11198
11291
|
<button class="myio-btn myio-btn-granularity ${this.currentGranularity === "1h" ? "active" : ""}" data-granularity="1h" title="Hora">1h</button>
|
|
11199
11292
|
<button class="myio-btn myio-btn-granularity ${this.currentGranularity === "1d" ? "active" : ""}" data-granularity="1d" title="Dia">1d</button>
|
|
11200
11293
|
</div>
|
|
@@ -11876,93 +11969,159 @@ var EnergyModalView = class {
|
|
|
11876
11969
|
return i18n[key] || DEFAULT_I18N2[key];
|
|
11877
11970
|
}
|
|
11878
11971
|
/**
|
|
11879
|
-
|
|
11880
|
-
|
|
11972
|
+
* Gets modal styles with fixed Dark/Light contrast
|
|
11973
|
+
*/
|
|
11974
|
+
/**
|
|
11975
|
+
* Gets modal styles with fixed Chart Border for Light Mode
|
|
11976
|
+
*/
|
|
11881
11977
|
getModalStyles() {
|
|
11882
11978
|
const styles = this.config.params.styles || {};
|
|
11979
|
+
const defaultPrimary = styles.primaryColor || "#4A148C";
|
|
11980
|
+
const defaultFont = styles.fontFamily || '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
|
|
11883
11981
|
return `
|
|
11982
|
+
/* --- VARI\xC1VEIS DE TEMA (LIGHT MODE - PADR\xC3O) --- */
|
|
11884
11983
|
.myio-energy-modal-scope {
|
|
11885
|
-
--myio-energy-primary: ${
|
|
11886
|
-
--myio-energy-
|
|
11887
|
-
--myio-energy-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
--myio-energy-
|
|
11984
|
+
--myio-energy-primary: ${defaultPrimary};
|
|
11985
|
+
--myio-energy-font: ${defaultFont};
|
|
11986
|
+
--myio-energy-radius: 8px;
|
|
11987
|
+
|
|
11988
|
+
/* Cores Gerais (Light Mode) */
|
|
11989
|
+
--myio-energy-bg: #ffffff;
|
|
11990
|
+
--myio-energy-text: #1f2937;
|
|
11991
|
+
--myio-energy-text-secondary: #6b7280;
|
|
11992
|
+
|
|
11993
|
+
/* Borda GERAL (para bot\xF5es e inputs) - Cinza suave */
|
|
11994
|
+
--myio-energy-border: #e5e7eb;
|
|
11995
|
+
|
|
11996
|
+
/* Borda ESPEC\xCDFICA DO GR\xC1FICO (Aqui est\xE1 a corre\xE7\xE3o) */
|
|
11997
|
+
/* No Light Mode, definimos como transparente ou branco para "sumir" */
|
|
11998
|
+
--myio-chart-border: transparent;
|
|
11999
|
+
|
|
12000
|
+
--myio-energy-btn-bg: #f3f4f6;
|
|
12001
|
+
--myio-energy-btn-hover: #e5e7eb;
|
|
12002
|
+
--myio-energy-input-bg: #ffffff;
|
|
12003
|
+
--myio-granularity-bg: #f9fafb;
|
|
11891
12004
|
|
|
11892
12005
|
font-family: var(--myio-energy-font);
|
|
12006
|
+
background-color: var(--myio-energy-bg);
|
|
11893
12007
|
color: var(--myio-energy-text);
|
|
11894
12008
|
height: -webkit-fill-available;
|
|
12009
|
+
transition: background-color 0.3s ease, color 0.3s ease;
|
|
11895
12010
|
}
|
|
11896
12011
|
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
}
|
|
12012
|
+
/* --- DARK MODE OVERRIDES --- */
|
|
12013
|
+
.myio-energy-modal-scope[data-theme="dark"] {
|
|
12014
|
+
--myio-energy-bg: #1f1f1f;
|
|
12015
|
+
--myio-energy-text: #f3f4f6;
|
|
12016
|
+
--myio-energy-text-secondary: #9ca3af;
|
|
12017
|
+
|
|
12018
|
+
/* No Dark Mode, as bordas precisam aparecer */
|
|
12019
|
+
--myio-energy-border: #374151;
|
|
12020
|
+
--myio-chart-border: #374151; /* Borda vis\xEDvel no escuro */
|
|
11907
12021
|
|
|
11908
|
-
|
|
11909
|
-
|
|
12022
|
+
--myio-energy-btn-bg: #374151;
|
|
12023
|
+
--myio-energy-btn-hover: #4b5563;
|
|
12024
|
+
--myio-energy-input-bg: #111827;
|
|
12025
|
+
--myio-granularity-bg: #111827;
|
|
11910
12026
|
}
|
|
11911
12027
|
|
|
11912
|
-
|
|
11913
|
-
opacity: 0.5;
|
|
11914
|
-
cursor: not-allowed;
|
|
11915
|
-
}
|
|
12028
|
+
/* --- COMPONENTES --- */
|
|
11916
12029
|
|
|
11917
|
-
.myio-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
12030
|
+
.myio-energy-chart-container {
|
|
12031
|
+
flex: 1 !important;
|
|
12032
|
+
min-height: 353px !important;
|
|
12033
|
+
height: 353px !important;
|
|
12034
|
+
background: var(--myio-energy-bg);
|
|
12035
|
+
border-radius: var(--myio-energy-radius);
|
|
12036
|
+
|
|
12037
|
+
/* USO DA VARI\xC1VEL ESPEC\xCDFICA AQUI */
|
|
12038
|
+
border: 1px solid var(--myio-chart-border);
|
|
12039
|
+
|
|
12040
|
+
padding: 10px !important;
|
|
12041
|
+
display: block !important;
|
|
12042
|
+
overflow: hidden !important;
|
|
11921
12043
|
}
|
|
11922
12044
|
|
|
11923
|
-
.myio-
|
|
11924
|
-
|
|
12045
|
+
.myio-chart-container {
|
|
12046
|
+
/* Aplica a mesma l\xF3gica para o gr\xE1fico de fallback */
|
|
12047
|
+
border: 1px solid var(--myio-chart-border);
|
|
12048
|
+
border-radius: var(--myio-energy-radius);
|
|
12049
|
+
overflow: hidden;
|
|
11925
12050
|
}
|
|
11926
12051
|
|
|
11927
|
-
.
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
12052
|
+
/* --- Resto dos estilos (Bot\xF5es, Labels, etc.) --- */
|
|
12053
|
+
|
|
12054
|
+
.myio-label-secondary {
|
|
12055
|
+
color: var(--myio-energy-text-secondary);
|
|
12056
|
+
font-weight: 500;
|
|
11931
12057
|
}
|
|
11932
12058
|
|
|
11933
|
-
.myio-
|
|
11934
|
-
|
|
12059
|
+
.myio-granularity-selector {
|
|
12060
|
+
display: flex;
|
|
12061
|
+
align-items: center;
|
|
12062
|
+
gap: 4px;
|
|
12063
|
+
margin-left: 8px;
|
|
12064
|
+
padding: 4px 8px;
|
|
12065
|
+
border-radius: 8px;
|
|
12066
|
+
background: var(--myio-granularity-bg);
|
|
12067
|
+
border: 1px solid var(--myio-energy-border); /* Granularidade mant\xE9m borda suave */
|
|
11935
12068
|
}
|
|
11936
12069
|
|
|
11937
|
-
/* RFC-0097: Granularity selector buttons */
|
|
11938
12070
|
.myio-btn-granularity {
|
|
11939
12071
|
padding: 4px 10px;
|
|
11940
12072
|
font-size: 12px;
|
|
11941
12073
|
font-weight: 600;
|
|
11942
12074
|
border-radius: 6px;
|
|
11943
|
-
border: 1px solid var(--myio-energy-border);
|
|
11944
|
-
background: var(--myio-energy-bg);
|
|
11945
|
-
color: var(--myio-energy-text);
|
|
11946
12075
|
cursor: pointer;
|
|
11947
12076
|
transition: all 0.2s ease;
|
|
11948
12077
|
min-width: 36px;
|
|
12078
|
+
background: transparent;
|
|
12079
|
+
border: 1px solid transparent;
|
|
12080
|
+
color: var(--myio-energy-text-secondary);
|
|
11949
12081
|
}
|
|
11950
12082
|
|
|
11951
12083
|
.myio-btn-granularity:hover:not(.active) {
|
|
11952
|
-
background:
|
|
11953
|
-
|
|
11954
|
-
color: var(--myio-energy-primary);
|
|
12084
|
+
background: var(--myio-energy-btn-hover);
|
|
12085
|
+
color: var(--myio-energy-text);
|
|
11955
12086
|
}
|
|
11956
12087
|
|
|
11957
12088
|
.myio-btn-granularity.active {
|
|
11958
12089
|
background: var(--myio-energy-primary);
|
|
11959
12090
|
color: white;
|
|
11960
12091
|
border-color: var(--myio-energy-primary);
|
|
11961
|
-
box-shadow: 0 2px
|
|
12092
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
11962
12093
|
}
|
|
11963
12094
|
|
|
11964
|
-
.myio-
|
|
12095
|
+
.myio-btn {
|
|
12096
|
+
padding: 8px 16px;
|
|
12097
|
+
border-radius: var(--myio-energy-radius);
|
|
11965
12098
|
border: 1px solid var(--myio-energy-border);
|
|
12099
|
+
background: var(--myio-energy-btn-bg);
|
|
12100
|
+
color: var(--myio-energy-text);
|
|
12101
|
+
cursor: pointer;
|
|
12102
|
+
font-size: 14px;
|
|
12103
|
+
transition: all 0.2s;
|
|
12104
|
+
}
|
|
12105
|
+
|
|
12106
|
+
.myio-btn:hover:not(:disabled) {
|
|
12107
|
+
background: var(--myio-energy-btn-hover);
|
|
12108
|
+
border-color: var(--myio-energy-border);
|
|
12109
|
+
}
|
|
12110
|
+
|
|
12111
|
+
.myio-btn-primary {
|
|
12112
|
+
background: var(--myio-energy-primary);
|
|
12113
|
+
color: white;
|
|
12114
|
+
border-color: var(--myio-energy-primary);
|
|
12115
|
+
}
|
|
12116
|
+
|
|
12117
|
+
.myio-btn-primary:hover:not(:disabled) {
|
|
12118
|
+
opacity: 0.9;
|
|
12119
|
+
}
|
|
12120
|
+
|
|
12121
|
+
.myio-btn-secondary {
|
|
12122
|
+
background: var(--myio-energy-btn-bg);
|
|
12123
|
+
color: var(--myio-energy-text);
|
|
12124
|
+
border-color: var(--myio-energy-border);
|
|
11966
12125
|
}
|
|
11967
12126
|
|
|
11968
12127
|
.myio-modal-scope {
|
|
@@ -11971,42 +12130,30 @@ var EnergyModalView = class {
|
|
|
11971
12130
|
flex-direction: column !important;
|
|
11972
12131
|
}
|
|
11973
12132
|
|
|
11974
|
-
.myio-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
height: 353px !important;
|
|
11978
|
-
background: var(--myio-energy-bg);
|
|
11979
|
-
border-radius: var(--myio-energy-radius);
|
|
11980
|
-
border: 1px solid var(--myio-energy-border);
|
|
11981
|
-
padding: 10px !important;
|
|
11982
|
-
display: block !important;
|
|
11983
|
-
overflow: hidden !important;
|
|
11984
|
-
}
|
|
11985
|
-
|
|
11986
|
-
.myio-energy-chart-container > iframe {
|
|
11987
|
-
width: 100% !important;
|
|
11988
|
-
height: 100% !important;
|
|
11989
|
-
min-height: 408px !important;
|
|
11990
|
-
border: none !important;
|
|
12133
|
+
.myio-form-group {
|
|
12134
|
+
display: flex;
|
|
12135
|
+
flex-direction: column;
|
|
11991
12136
|
}
|
|
11992
12137
|
|
|
11993
|
-
.myio-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
min-height: 408px !important;
|
|
12138
|
+
.myio-label {
|
|
12139
|
+
font-weight: 500;
|
|
12140
|
+
margin-bottom: 5px;
|
|
12141
|
+
color: var(--myio-energy-text);
|
|
11998
12142
|
}
|
|
11999
12143
|
|
|
12000
|
-
.myio-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12144
|
+
.myio-input {
|
|
12145
|
+
padding: 8px 12px;
|
|
12146
|
+
border: 1px solid var(--myio-energy-border);
|
|
12147
|
+
border-radius: var(--myio-energy-radius);
|
|
12148
|
+
font-size: 14px;
|
|
12149
|
+
background: var(--myio-energy-input-bg);
|
|
12150
|
+
color: var(--myio-energy-text);
|
|
12006
12151
|
}
|
|
12007
12152
|
|
|
12008
|
-
.myio-
|
|
12009
|
-
|
|
12153
|
+
.myio-input:focus {
|
|
12154
|
+
outline: none;
|
|
12155
|
+
border-color: var(--myio-energy-primary);
|
|
12156
|
+
box-shadow: 0 0 0 1px var(--myio-energy-primary);
|
|
12010
12157
|
}
|
|
12011
12158
|
|
|
12012
12159
|
.myio-spinner {
|
|
@@ -12018,78 +12165,40 @@ var EnergyModalView = class {
|
|
|
12018
12165
|
animation: spin 1s linear infinite;
|
|
12019
12166
|
margin: 0 auto 16px;
|
|
12020
12167
|
}
|
|
12021
|
-
|
|
12168
|
+
|
|
12022
12169
|
@keyframes spin {
|
|
12023
12170
|
0% { transform: rotate(0deg); }
|
|
12024
12171
|
100% { transform: rotate(360deg); }
|
|
12025
12172
|
}
|
|
12026
12173
|
|
|
12174
|
+
.myio-loading-state p {
|
|
12175
|
+
color: var(--myio-energy-text);
|
|
12176
|
+
}
|
|
12177
|
+
|
|
12027
12178
|
.myio-energy-error {
|
|
12028
|
-
background:
|
|
12029
|
-
border: 1px solid
|
|
12179
|
+
background: rgba(254, 202, 202, 0.15);
|
|
12180
|
+
border: 1px solid rgba(248, 113, 113, 0.5);
|
|
12030
12181
|
border-radius: var(--myio-energy-radius);
|
|
12031
12182
|
padding: 16px;
|
|
12032
12183
|
}
|
|
12033
|
-
|
|
12034
|
-
.myio-error-content {
|
|
12035
|
-
display: flex;
|
|
12036
|
-
align-items: center;
|
|
12037
|
-
gap: 12px;
|
|
12038
|
-
}
|
|
12039
|
-
|
|
12040
|
-
.myio-error-icon {
|
|
12041
|
-
font-size: 24px;
|
|
12042
|
-
}
|
|
12043
|
-
|
|
12184
|
+
|
|
12044
12185
|
.myio-error-message {
|
|
12045
|
-
color: #
|
|
12186
|
+
color: #ef4444;
|
|
12046
12187
|
font-weight: 500;
|
|
12047
12188
|
}
|
|
12048
12189
|
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
.myio-fallback-chart h4 {
|
|
12052
|
-
margin: 0 0 16px 0;
|
|
12053
|
-
text-align: center;
|
|
12054
|
-
}
|
|
12055
|
-
|
|
12056
|
-
.myio-chart-container {
|
|
12057
|
-
border: 1px solid var(--myio-energy-border);
|
|
12058
|
-
border-radius: var(--myio-energy-radius);
|
|
12059
|
-
overflow: hidden;
|
|
12060
|
-
}
|
|
12061
|
-
|
|
12062
12190
|
.myio-chart-note {
|
|
12063
12191
|
margin: 12px 0 0 0;
|
|
12064
12192
|
font-size: 12px;
|
|
12065
|
-
color: #666;
|
|
12066
|
-
text-align: center;
|
|
12067
|
-
}
|
|
12068
|
-
|
|
12069
|
-
.myio-form-group {
|
|
12070
|
-
display: flex;
|
|
12071
|
-
flex-direction: column;
|
|
12072
|
-
}
|
|
12073
|
-
|
|
12074
|
-
.myio-label {
|
|
12075
|
-
font-weight: 500;
|
|
12076
|
-
margin-bottom: 5px;
|
|
12077
|
-
color: var(--myio-energy-text);
|
|
12078
|
-
}
|
|
12079
|
-
|
|
12080
|
-
.myio-input {
|
|
12081
|
-
padding: 8px 12px;
|
|
12082
|
-
border: 1px solid var(--myio-energy-border);
|
|
12083
|
-
border-radius: var(--myio-energy-radius);
|
|
12084
|
-
font-size: 14px;
|
|
12085
|
-
background: var(--myio-energy-bg);
|
|
12086
12193
|
color: var(--myio-energy-text);
|
|
12194
|
+
opacity: 0.7;
|
|
12195
|
+
text-align: center;
|
|
12087
12196
|
}
|
|
12088
12197
|
|
|
12089
|
-
.myio-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12198
|
+
.myio-energy-chart-container > iframe {
|
|
12199
|
+
width: 100% !important;
|
|
12200
|
+
height: 100% !important;
|
|
12201
|
+
border: none !important;
|
|
12093
12202
|
}
|
|
12094
12203
|
|
|
12095
12204
|
@media (max-width: 768px) {
|
|
@@ -12097,12 +12206,6 @@ var EnergyModalView = class {
|
|
|
12097
12206
|
grid-template-columns: 1fr;
|
|
12098
12207
|
grid-template-rows: auto 1fr;
|
|
12099
12208
|
}
|
|
12100
|
-
|
|
12101
|
-
.myio-energy-header {
|
|
12102
|
-
flex-direction: column;
|
|
12103
|
-
gap: 12px;
|
|
12104
|
-
align-items: stretch;
|
|
12105
|
-
}
|
|
12106
12209
|
}
|
|
12107
12210
|
`;
|
|
12108
12211
|
}
|