myio-js-library 0.1.524 → 0.1.526
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 +1019 -329
- package/dist/index.d.cts +126 -10
- package/dist/index.d.ts +126 -10
- package/dist/index.js +1015 -326
- package/dist/myio-js-library.umd.js +1015 -326
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -402,6 +402,7 @@ __export(src_exports, {
|
|
|
402
402
|
createFilterModalComponent: () => createFilterModalComponent,
|
|
403
403
|
createFooterComponent: () => createFooterComponent,
|
|
404
404
|
createFreshdeskTicket: () => createTicket,
|
|
405
|
+
createGoalsBarTooltip: () => createGoalsBarTooltip,
|
|
405
406
|
createGranularitySelector: () => createGranularitySelector,
|
|
406
407
|
createGroupScheduleCard: () => createGroupScheduleCard,
|
|
407
408
|
createHeaderComponent: () => createHeaderComponent,
|
|
@@ -591,7 +592,7 @@ __export(src_exports, {
|
|
|
591
592
|
injectBASDashboardStyles: () => injectBASDashboardStyles,
|
|
592
593
|
injectCustomerCardV1Styles: () => injectCustomerCardV1Styles,
|
|
593
594
|
injectCustomerCardV2Styles: () => injectCustomerCardV2Styles,
|
|
594
|
-
injectDeviceGridV6Styles: () =>
|
|
595
|
+
injectDeviceGridV6Styles: () => injectStyles17,
|
|
595
596
|
injectDeviceOperationalCardGridStyles: () => injectDeviceOperationalCardGridStyles,
|
|
596
597
|
injectDeviceOperationalCardStyles: () => injectDeviceOperationalCardStyles,
|
|
597
598
|
injectExportButtonStyles: () => injectExportButtonStyles,
|
|
@@ -767,7 +768,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
767
768
|
// package.json
|
|
768
769
|
var package_default = {
|
|
769
770
|
name: "myio-js-library",
|
|
770
|
-
version: "0.1.
|
|
771
|
+
version: "0.1.526",
|
|
771
772
|
description: "A clean, standalone JS SDK for MYIO projects",
|
|
772
773
|
license: "MIT",
|
|
773
774
|
repository: "github:gh-myio/myio-js-library",
|
|
@@ -3550,7 +3551,7 @@ var CSS_TOKENS = `
|
|
|
3550
3551
|
--myio-spacing-lg: 24px;
|
|
3551
3552
|
|
|
3552
3553
|
/* Typography */
|
|
3553
|
-
--myio-font: '
|
|
3554
|
+
--myio-font: 'Nunito', system-ui, sans-serif;
|
|
3554
3555
|
--myio-font-size: 14px;
|
|
3555
3556
|
--myio-font-size-sm: 12px;
|
|
3556
3557
|
--myio-font-size-lg: 16px;
|
|
@@ -3876,7 +3877,7 @@ var DATERANGEPICKER_STYLES = `
|
|
|
3876
3877
|
========================================== */
|
|
3877
3878
|
|
|
3878
3879
|
.daterangepicker {
|
|
3879
|
-
font-family: '
|
|
3880
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
3880
3881
|
border: 1px solid #e0e0e0;
|
|
3881
3882
|
border-radius: 10px;
|
|
3882
3883
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
@@ -5986,7 +5987,7 @@ function injectStyles() {
|
|
|
5986
5987
|
const s = document.createElement("style");
|
|
5987
5988
|
s.id = STYLE_ID;
|
|
5988
5989
|
s.textContent = `
|
|
5989
|
-
.myio-divcard { box-sizing: border-box; font-family: 'Nunito', sans-serif; border: 1px solid #e2e8f0;
|
|
5990
|
+
.myio-divcard { box-sizing: border-box; font-family: 'Nunito', system-ui, sans-serif; border: 1px solid #e2e8f0;
|
|
5990
5991
|
border-radius: 10px; overflow: hidden; margin-bottom: 10px; background: #fff; }
|
|
5991
5992
|
.myio-divcard * { box-sizing: border-box; }
|
|
5992
5993
|
.myio-divcard__head { display: flex; align-items: center; gap: 8px; padding: 8px 12px;
|
|
@@ -6588,7 +6589,7 @@ function injectStyles2() {
|
|
|
6588
6589
|
const s = document.createElement("style");
|
|
6589
6590
|
s.id = STYLE_ID2;
|
|
6590
6591
|
s.textContent = `
|
|
6591
|
-
.mdp-root, .mdp-root * { box-sizing: border-box; font-family: 'Nunito', sans-serif; }
|
|
6592
|
+
.mdp-root, .mdp-root * { box-sizing: border-box; font-family: 'Nunito', system-ui, sans-serif; }
|
|
6592
6593
|
.mdp-tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid #eee; }
|
|
6593
6594
|
.mdp-tab { border: 1px solid transparent; border-bottom: none; background: none; cursor: pointer;
|
|
6594
6595
|
font-size: 13px; font-weight: 700; color: #64748b; padding: 8px 14px; border-radius: 8px 8px 0 0; }
|
|
@@ -9319,7 +9320,7 @@ var CSS_STRING = `
|
|
|
9319
9320
|
border-radius: var(--myio-card-radius);
|
|
9320
9321
|
box-shadow: var(--myio-card-shadow);
|
|
9321
9322
|
padding: 14px;
|
|
9322
|
-
font-family:
|
|
9323
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
9323
9324
|
font-size: 14px;
|
|
9324
9325
|
line-height: 1.4;
|
|
9325
9326
|
color: var(--myio-text-1);
|
|
@@ -9566,7 +9567,7 @@ var CSS_STRING = `
|
|
|
9566
9567
|
position: relative;
|
|
9567
9568
|
min-width: 300px;
|
|
9568
9569
|
text-align: left;
|
|
9569
|
-
font-family: sans-serif; /* Use a fonte que preferir */
|
|
9570
|
+
font-family: 'Nunito', system-ui, sans-serif; /* Use a fonte que preferir */
|
|
9570
9571
|
line-height: 1.6;
|
|
9571
9572
|
}
|
|
9572
9573
|
|
|
@@ -10180,7 +10181,7 @@ var CSS_STRING = `
|
|
|
10180
10181
|
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
10181
10182
|
min-width: 340px;
|
|
10182
10183
|
max-width: 420px;
|
|
10183
|
-
font-family:
|
|
10184
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
10184
10185
|
font-size: 12px;
|
|
10185
10186
|
color: #e2e8f0;
|
|
10186
10187
|
overflow: hidden;
|
|
@@ -10372,7 +10373,7 @@ var CSS_STRING = `
|
|
|
10372
10373
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
|
|
10373
10374
|
min-width: 280px;
|
|
10374
10375
|
max-width: 320px;
|
|
10375
|
-
font-family:
|
|
10376
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
10376
10377
|
font-size: 12px;
|
|
10377
10378
|
color: #1e293b;
|
|
10378
10379
|
overflow: hidden;
|
|
@@ -10606,7 +10607,7 @@ var CSS_STRING = `
|
|
|
10606
10607
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
|
|
10607
10608
|
min-width: 300px;
|
|
10608
10609
|
max-width: 360px;
|
|
10609
|
-
font-family:
|
|
10610
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
10610
10611
|
font-size: 12px;
|
|
10611
10612
|
color: #1e293b;
|
|
10612
10613
|
overflow: hidden;
|
|
@@ -17230,7 +17231,7 @@ function renderCardComponentV5({
|
|
|
17230
17231
|
width: 320px;
|
|
17231
17232
|
padding: 16px;
|
|
17232
17233
|
border-radius: 8px;
|
|
17233
|
-
font-family: 'Nunito', -
|
|
17234
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
17234
17235
|
font-size: 15px;
|
|
17235
17236
|
color: #fff;
|
|
17236
17237
|
transform: translateX(120%);
|
|
@@ -18923,7 +18924,7 @@ function injectCardActionSelectorStyles() {
|
|
|
18923
18924
|
position: relative; width: 90%; max-width: 380px;
|
|
18924
18925
|
background: #fff; border-radius: 16px; overflow: hidden;
|
|
18925
18926
|
box-shadow: 0 20px 60px rgba(0,0,0,.3);
|
|
18926
|
-
font-family: 'Nunito', -
|
|
18927
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
18927
18928
|
transform: translateY(16px) scale(.98); transition: transform .2s ease;
|
|
18928
18929
|
}
|
|
18929
18930
|
.myio-card-action-picker.show .myio-card-action-picker__content { transform: translateY(0) scale(1); }
|
|
@@ -19072,7 +19073,7 @@ function renderCardComponentV6({
|
|
|
19072
19073
|
width: 320px;
|
|
19073
19074
|
padding: 16px;
|
|
19074
19075
|
border-radius: 8px;
|
|
19075
|
-
font-family: 'Nunito', -
|
|
19076
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
19076
19077
|
font-size: 15px;
|
|
19077
19078
|
color: #fff;
|
|
19078
19079
|
transform: translateX(120%);
|
|
@@ -21216,7 +21217,7 @@ var HEADER_CSS = `
|
|
|
21216
21217
|
flex-direction: column;
|
|
21217
21218
|
flex-shrink: 0;
|
|
21218
21219
|
box-sizing: border-box;
|
|
21219
|
-
font-family:
|
|
21220
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
21220
21221
|
}
|
|
21221
21222
|
|
|
21222
21223
|
.myio-hp--top-border {
|
|
@@ -21752,7 +21753,7 @@ var PANEL_CSS = `
|
|
|
21752
21753
|
background: #faf8f1;
|
|
21753
21754
|
border: 1px solid #e8e4d9;
|
|
21754
21755
|
overflow: hidden;
|
|
21755
|
-
font-family:
|
|
21756
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
21756
21757
|
position: relative;
|
|
21757
21758
|
height: 100%;
|
|
21758
21759
|
min-width: 180px;
|
|
@@ -22283,7 +22284,7 @@ var PANEL_CSS2 = `
|
|
|
22283
22284
|
background: #faf8f1;
|
|
22284
22285
|
border: 1px solid #e8e4d9;
|
|
22285
22286
|
overflow: hidden;
|
|
22286
|
-
font-family:
|
|
22287
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
22287
22288
|
height: 100%;
|
|
22288
22289
|
min-width: 0;
|
|
22289
22290
|
}
|
|
@@ -23184,7 +23185,7 @@ var MyIOChartModalClass = class {
|
|
|
23184
23185
|
max-width: 900px;
|
|
23185
23186
|
margin: auto;
|
|
23186
23187
|
color: #fff;
|
|
23187
|
-
font-family:
|
|
23188
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
23188
23189
|
box-shadow: 0 8px 30px rgba(0,0,0,0.5);
|
|
23189
23190
|
">
|
|
23190
23191
|
|
|
@@ -23656,7 +23657,7 @@ var MyIOToast = (function() {
|
|
|
23656
23657
|
padding: 16px 20px;
|
|
23657
23658
|
background-color: #323232;
|
|
23658
23659
|
color: white;
|
|
23659
|
-
font-family: 'Nunito', -
|
|
23660
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
23660
23661
|
font-size: 14px;
|
|
23661
23662
|
border-radius: 8px;
|
|
23662
23663
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
|
@@ -23851,7 +23852,8 @@ var DEFAULT_LOADING_CONFIG = {
|
|
|
23851
23852
|
message: "Carregando dados...",
|
|
23852
23853
|
spinnerType: "double",
|
|
23853
23854
|
theme: "dark",
|
|
23854
|
-
showTimer: false
|
|
23855
|
+
showTimer: false,
|
|
23856
|
+
showProgress: false
|
|
23855
23857
|
};
|
|
23856
23858
|
|
|
23857
23859
|
// src/components/loading-spinner/LoadingSpinner.ts
|
|
@@ -23866,11 +23868,15 @@ var LoadingSpinner = class {
|
|
|
23866
23868
|
minDisplayTimeoutId = null;
|
|
23867
23869
|
hidePending = false;
|
|
23868
23870
|
theme;
|
|
23871
|
+
progressElement = null;
|
|
23872
|
+
progressFillElement = null;
|
|
23873
|
+
progressLabelElement = null;
|
|
23869
23874
|
styleElement = null;
|
|
23870
23875
|
constructor(config2 = {}) {
|
|
23871
23876
|
this.config = { ...DEFAULT_LOADING_CONFIG, ...config2 };
|
|
23872
23877
|
this.theme = this.config.theme || "dark";
|
|
23873
23878
|
this.container = this.ensureDOM();
|
|
23879
|
+
this.applyAccent();
|
|
23874
23880
|
this.updateTheme(this.theme);
|
|
23875
23881
|
this.injectStyles();
|
|
23876
23882
|
if (this.config.showTimer) {
|
|
@@ -23879,6 +23885,9 @@ var LoadingSpinner = class {
|
|
|
23879
23885
|
if (this.config.message) {
|
|
23880
23886
|
this.updateMessage(this.config.message);
|
|
23881
23887
|
}
|
|
23888
|
+
if (this.config.showProgress || this.config.progress != null) {
|
|
23889
|
+
this.setProgress(this.config.progress ?? null);
|
|
23890
|
+
}
|
|
23882
23891
|
}
|
|
23883
23892
|
/**
|
|
23884
23893
|
* Ensures the main DOM element for the spinner exists in the body.
|
|
@@ -23886,27 +23895,57 @@ var LoadingSpinner = class {
|
|
|
23886
23895
|
ensureDOM() {
|
|
23887
23896
|
const BUSY_OVERLAY_ID = "myio-loading-spinner-overlay";
|
|
23888
23897
|
let el2 = document.getElementById(BUSY_OVERLAY_ID);
|
|
23889
|
-
if (el2) {
|
|
23890
|
-
|
|
23898
|
+
if (!el2) {
|
|
23899
|
+
el2 = document.createElement("div");
|
|
23900
|
+
el2.id = BUSY_OVERLAY_ID;
|
|
23901
|
+
el2.className = "myio-loading-spinner-overlay";
|
|
23902
|
+
el2.style.display = "none";
|
|
23903
|
+
const contentContainer = document.createElement("div");
|
|
23904
|
+
contentContainer.className = "myio-loading-spinner-content";
|
|
23905
|
+
contentContainer.innerHTML = `
|
|
23906
|
+
<div class="myio-spinner-box">
|
|
23907
|
+
<div class="myio-spinner-outer"></div>
|
|
23908
|
+
<div class="myio-spinner-inner"></div>
|
|
23909
|
+
</div>
|
|
23910
|
+
<div class="myio-spinner-message">${this.config.message}</div>
|
|
23911
|
+
<div class="myio-spinner-progress" style="display:none;">
|
|
23912
|
+
<div class="myio-spinner-progress-track"><div class="myio-spinner-progress-fill"></div></div>
|
|
23913
|
+
<div class="myio-spinner-progress-label"></div>
|
|
23914
|
+
</div>
|
|
23915
|
+
`;
|
|
23916
|
+
el2.appendChild(contentContainer);
|
|
23917
|
+
document.body.appendChild(el2);
|
|
23891
23918
|
}
|
|
23892
|
-
el2 = document.createElement("div");
|
|
23893
|
-
el2.id = BUSY_OVERLAY_ID;
|
|
23894
|
-
el2.className = "myio-loading-spinner-overlay";
|
|
23895
|
-
el2.style.display = "none";
|
|
23896
|
-
const contentContainer = document.createElement("div");
|
|
23897
|
-
contentContainer.className = "myio-loading-spinner-content";
|
|
23898
|
-
contentContainer.innerHTML = `
|
|
23899
|
-
<div class="myio-spinner-box">
|
|
23900
|
-
<div class="myio-spinner-outer"></div>
|
|
23901
|
-
<div class="myio-spinner-inner"></div>
|
|
23902
|
-
</div>
|
|
23903
|
-
<div class="myio-spinner-message">${this.config.message}</div>
|
|
23904
|
-
`;
|
|
23905
|
-
el2.appendChild(contentContainer);
|
|
23906
|
-
document.body.appendChild(el2);
|
|
23907
23919
|
this.messageElement = el2.querySelector(".myio-spinner-message");
|
|
23920
|
+
let progress = el2.querySelector(".myio-spinner-progress");
|
|
23921
|
+
if (!progress) {
|
|
23922
|
+
const content = el2.querySelector(".myio-loading-spinner-content");
|
|
23923
|
+
if (content) {
|
|
23924
|
+
progress = document.createElement("div");
|
|
23925
|
+
progress.className = "myio-spinner-progress";
|
|
23926
|
+
progress.style.display = "none";
|
|
23927
|
+
progress.innerHTML = '<div class="myio-spinner-progress-track"><div class="myio-spinner-progress-fill"></div></div><div class="myio-spinner-progress-label"></div>';
|
|
23928
|
+
content.appendChild(progress);
|
|
23929
|
+
}
|
|
23930
|
+
}
|
|
23931
|
+
this.progressElement = progress;
|
|
23932
|
+
this.progressFillElement = el2.querySelector(".myio-spinner-progress-fill");
|
|
23933
|
+
this.progressLabelElement = el2.querySelector(".myio-spinner-progress-label");
|
|
23908
23934
|
return el2;
|
|
23909
23935
|
}
|
|
23936
|
+
/**
|
|
23937
|
+
* Resolves the accent color (config.accentColor → inherited `--myio-brand-700`
|
|
23938
|
+
* → default purple) and stashes it on the overlay as `--myio-ls-accent`, which
|
|
23939
|
+
* the spinner ring, progress fill and dark panel tint read from.
|
|
23940
|
+
*/
|
|
23941
|
+
applyAccent() {
|
|
23942
|
+
let accent = (this.config.accentColor || "").trim();
|
|
23943
|
+
if (!accent && typeof document !== "undefined") {
|
|
23944
|
+
accent = getComputedStyle(document.documentElement).getPropertyValue("--myio-brand-700").trim();
|
|
23945
|
+
}
|
|
23946
|
+
if (!accent) accent = "#7a2ff7";
|
|
23947
|
+
this.container.style.setProperty("--myio-ls-accent", accent);
|
|
23948
|
+
}
|
|
23910
23949
|
/**
|
|
23911
23950
|
* Inject necessary CSS styles for the spinner and overlay.
|
|
23912
23951
|
*/
|
|
@@ -23934,7 +23973,7 @@ var LoadingSpinner = class {
|
|
|
23934
23973
|
.myio-spinner-inner {
|
|
23935
23974
|
width: 32px; height: 32px; border-width: 3px;
|
|
23936
23975
|
border-style: solid; border-radius: 50%;
|
|
23937
|
-
border-color:
|
|
23976
|
+
border-color: var(--myio-ls-accent, #7a2ff7) transparent var(--myio-ls-accent, #7a2ff7) transparent;
|
|
23938
23977
|
position: absolute; top: 8px; left: 8px; /* Position inside outer */
|
|
23939
23978
|
animation: myio-spin-reverse 1.8s linear infinite;
|
|
23940
23979
|
}
|
|
@@ -23995,7 +24034,7 @@ var LoadingSpinner = class {
|
|
|
23995
24034
|
align-items: center;
|
|
23996
24035
|
text-align: center;
|
|
23997
24036
|
color: #ffffff;
|
|
23998
|
-
font-family:
|
|
24037
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
23999
24038
|
font-size: 14px;
|
|
24000
24039
|
line-height: 1.5;
|
|
24001
24040
|
padding: 24px 32px;
|
|
@@ -24032,7 +24071,7 @@ var LoadingSpinner = class {
|
|
|
24032
24071
|
border-color: rgba(45, 20, 88, 0.2) transparent rgba(45, 20, 88, 0.2) transparent;
|
|
24033
24072
|
}
|
|
24034
24073
|
.myio-loading-spinner-overlay.light .myio-spinner-inner {
|
|
24035
|
-
border-color:
|
|
24074
|
+
border-color: var(--myio-ls-accent, #7a2ff7) transparent var(--myio-ls-accent, #7a2ff7) transparent;
|
|
24036
24075
|
}
|
|
24037
24076
|
|
|
24038
24077
|
/* Timer element styling */
|
|
@@ -24043,6 +24082,29 @@ var LoadingSpinner = class {
|
|
|
24043
24082
|
text-align: center;
|
|
24044
24083
|
}
|
|
24045
24084
|
.myio-loading-spinner-overlay.light .myio-spinner-timer { color: #6b7280; }
|
|
24085
|
+
|
|
24086
|
+
/* Progress bar (determinate via setProgress(pct) / indeterminate when null) */
|
|
24087
|
+
.myio-spinner-progress { width: 100%; min-width: 200px; margin-top: 16px; }
|
|
24088
|
+
.myio-spinner-progress-track {
|
|
24089
|
+
width: 100%; height: 6px; border-radius: 999px;
|
|
24090
|
+
background: rgba(255, 255, 255, 0.18); overflow: hidden;
|
|
24091
|
+
}
|
|
24092
|
+
.myio-loading-spinner-overlay.light .myio-spinner-progress-track { background: rgba(0, 0, 0, 0.10); }
|
|
24093
|
+
.myio-spinner-progress-fill {
|
|
24094
|
+
height: 100%; width: 0%; border-radius: 999px;
|
|
24095
|
+
background: var(--myio-ls-accent, #7a2ff7);
|
|
24096
|
+
transition: width 0.3s ease;
|
|
24097
|
+
}
|
|
24098
|
+
.myio-spinner-progress.indeterminate .myio-spinner-progress-fill {
|
|
24099
|
+
width: 40% !important; animation: myio-ls-indeterminate 1.2s ease-in-out infinite;
|
|
24100
|
+
}
|
|
24101
|
+
@keyframes myio-ls-indeterminate {
|
|
24102
|
+
0% { margin-left: -40%; }
|
|
24103
|
+
100% { margin-left: 100%; }
|
|
24104
|
+
}
|
|
24105
|
+
.myio-spinner-progress-label {
|
|
24106
|
+
margin-top: 6px; font-size: 11px; font-weight: 600; opacity: 0.85; text-align: center;
|
|
24107
|
+
}
|
|
24046
24108
|
`;
|
|
24047
24109
|
}
|
|
24048
24110
|
/**
|
|
@@ -24116,7 +24178,7 @@ var LoadingSpinner = class {
|
|
|
24116
24178
|
this.container.classList.add(theme);
|
|
24117
24179
|
const content = this.container.querySelector(".myio-loading-spinner-content");
|
|
24118
24180
|
if (content) {
|
|
24119
|
-
content.style.background = theme === "dark" ? "#
|
|
24181
|
+
content.style.background = theme === "dark" ? "color-mix(in srgb, var(--myio-ls-accent, #7a2ff7) 22%, #14121c)" : "#ffffff";
|
|
24120
24182
|
content.style.color = theme === "dark" ? "#ffffff" : "#1a1a2e";
|
|
24121
24183
|
}
|
|
24122
24184
|
}
|
|
@@ -24152,6 +24214,7 @@ var LoadingSpinner = class {
|
|
|
24152
24214
|
this.isCurrentlyShowing = true;
|
|
24153
24215
|
this.hidePending = false;
|
|
24154
24216
|
this.startTime = Date.now();
|
|
24217
|
+
this.applyAccent();
|
|
24155
24218
|
this.container.style.display = "flex";
|
|
24156
24219
|
requestAnimationFrame(() => {
|
|
24157
24220
|
this.container.classList.add("show");
|
|
@@ -24219,6 +24282,26 @@ var LoadingSpinner = class {
|
|
|
24219
24282
|
this.messageElement.textContent = message;
|
|
24220
24283
|
}
|
|
24221
24284
|
}
|
|
24285
|
+
/**
|
|
24286
|
+
* Updates the progress bar. `pct` 0–100 → determinate fill; `null` →
|
|
24287
|
+
* indeterminate (animated) bar. `label` overrides the percentage text.
|
|
24288
|
+
*/
|
|
24289
|
+
setProgress(pct, label) {
|
|
24290
|
+
if (!this.progressElement || !this.progressFillElement) return;
|
|
24291
|
+
this.progressElement.style.display = "block";
|
|
24292
|
+
if (pct == null || Number.isNaN(Number(pct))) {
|
|
24293
|
+
this.progressElement.classList.add("indeterminate");
|
|
24294
|
+
this.progressFillElement.style.width = "";
|
|
24295
|
+
if (this.progressLabelElement) this.progressLabelElement.textContent = label || "";
|
|
24296
|
+
} else {
|
|
24297
|
+
const clamped = Math.max(0, Math.min(100, Number(pct)));
|
|
24298
|
+
this.progressElement.classList.remove("indeterminate");
|
|
24299
|
+
this.progressFillElement.style.width = `${clamped}%`;
|
|
24300
|
+
if (this.progressLabelElement) {
|
|
24301
|
+
this.progressLabelElement.textContent = label != null ? label : `${Math.round(clamped)}%`;
|
|
24302
|
+
}
|
|
24303
|
+
}
|
|
24304
|
+
}
|
|
24222
24305
|
/**
|
|
24223
24306
|
* Checks if spinner is currently visible
|
|
24224
24307
|
* @returns true if spinner is showing
|
|
@@ -24236,6 +24319,11 @@ var LoadingSpinner = class {
|
|
|
24236
24319
|
this.isCurrentlyShowing = false;
|
|
24237
24320
|
this.hidePending = false;
|
|
24238
24321
|
this.startTime = 0;
|
|
24322
|
+
if (this.progressElement) {
|
|
24323
|
+
this.progressElement.style.display = "none";
|
|
24324
|
+
this.progressElement.classList.remove("indeterminate");
|
|
24325
|
+
}
|
|
24326
|
+
if (this.progressFillElement) this.progressFillElement.style.width = "0%";
|
|
24239
24327
|
console.log("[LoadingSpinner] Instance destroyed (DOM kept for re-use)");
|
|
24240
24328
|
}
|
|
24241
24329
|
};
|
|
@@ -24260,7 +24348,7 @@ function injectStyles8(doc) {
|
|
|
24260
24348
|
justify-content: center;
|
|
24261
24349
|
align-items: center;
|
|
24262
24350
|
gap: 6px;
|
|
24263
|
-
font-family:
|
|
24351
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
24264
24352
|
}
|
|
24265
24353
|
|
|
24266
24354
|
/* Dark theme (default) */
|
|
@@ -24357,7 +24445,7 @@ function injectTooltipStyles(doc) {
|
|
|
24357
24445
|
.myio-ver-tooltip-container {
|
|
24358
24446
|
position: fixed;
|
|
24359
24447
|
z-index: 999999;
|
|
24360
|
-
font-family:
|
|
24448
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
24361
24449
|
}
|
|
24362
24450
|
|
|
24363
24451
|
/* Light theme tooltip (default) */
|
|
@@ -26727,7 +26815,7 @@ async function openRealTimeTelemetryModal(params) {
|
|
|
26727
26815
|
border:1px solid #e2e8f0;
|
|
26728
26816
|
box-shadow:0 10px 40px rgba(0,0,0,0.15),0 2px 10px rgba(0,0,0,0.08);
|
|
26729
26817
|
min-width:240px;max-width:320px;overflow:hidden;
|
|
26730
|
-
font-family
|
|
26818
|
+
font-family:Nunito, system-ui, sans-serif;
|
|
26731
26819
|
font-size:12px;color:#1e293b;
|
|
26732
26820
|
user-select:none;
|
|
26733
26821
|
}
|
|
@@ -26755,7 +26843,7 @@ async function openRealTimeTelemetryModal(params) {
|
|
|
26755
26843
|
padding:4px 14px;font-size:12px;border-bottom:1px solid #f5f5f5;}
|
|
26756
26844
|
.rtt-tt-history-row{display:flex;align-items:center;gap:6px;
|
|
26757
26845
|
padding:5px 14px;font-size:12px;color:#374151;border-bottom:1px solid #f8fafc;
|
|
26758
|
-
font-family
|
|
26846
|
+
font-family:Nunito, system-ui, sans-serif;}
|
|
26759
26847
|
.rtt-tt-history-row:last-child{border-bottom:none;}
|
|
26760
26848
|
.rtt-tt-row-ts{color:#bbb;}
|
|
26761
26849
|
.rtt-tt-row-val{font-weight:600;}
|
|
@@ -28410,8 +28498,8 @@ var EnergyDataFetcher = class {
|
|
|
28410
28498
|
// src/components/premium-modals/internal/engines/CsvExporter.ts
|
|
28411
28499
|
var toCsv = (rows, locale = "pt-BR", sep = ";") => {
|
|
28412
28500
|
const fmt2 = new Intl.NumberFormat(locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
28413
|
-
const
|
|
28414
|
-
return rows.map((r) => r.map((c) => `"${
|
|
28501
|
+
const esc6 = (v) => (typeof v === "number" ? fmt2.format(v) : String(v)).replace(/"/g, '""');
|
|
28502
|
+
return rows.map((r) => r.map((c) => `"${esc6(c)}"`).join(sep)).join("\r\n");
|
|
28415
28503
|
};
|
|
28416
28504
|
|
|
28417
28505
|
// src/utils/telemetryUtils.ts
|
|
@@ -28516,7 +28604,7 @@ var DEFAULT_STYLES = {
|
|
|
28516
28604
|
spacingMd: "16px",
|
|
28517
28605
|
spacingLg: "24px",
|
|
28518
28606
|
spacingXl: "32px",
|
|
28519
|
-
fontFamily:
|
|
28607
|
+
fontFamily: "Nunito, system-ui, sans-serif",
|
|
28520
28608
|
fontSizeXs: "12px",
|
|
28521
28609
|
fontSizeSm: "14px",
|
|
28522
28610
|
fontSizeMd: "16px",
|
|
@@ -30067,7 +30155,7 @@ var DEFAULT_STYLES2 = {
|
|
|
30067
30155
|
textColor: "#1f2937",
|
|
30068
30156
|
borderColor: "#e5e7eb",
|
|
30069
30157
|
borderRadius: "8px",
|
|
30070
|
-
fontFamily:
|
|
30158
|
+
fontFamily: "Nunito, system-ui, sans-serif",
|
|
30071
30159
|
modalWidth: "90vw",
|
|
30072
30160
|
modalHeight: "90vh"
|
|
30073
30161
|
};
|
|
@@ -32187,7 +32275,7 @@ var EnergyModalView = class {
|
|
|
32187
32275
|
getModalStyles() {
|
|
32188
32276
|
const styles = this.config.params.styles || {};
|
|
32189
32277
|
const defaultPrimary = styles.primaryColor || "#4A148C";
|
|
32190
|
-
const defaultFont = styles.fontFamily ||
|
|
32278
|
+
const defaultFont = styles.fontFamily || "Nunito, system-ui, sans-serif";
|
|
32191
32279
|
return `
|
|
32192
32280
|
/* --- VARI\xC1VEIS DE TEMA (LIGHT MODE - PADR\xC3O) --- */
|
|
32193
32281
|
.myio-energy-modal-scope {
|
|
@@ -33377,7 +33465,7 @@ function injectParticipationChartStyles() {
|
|
|
33377
33465
|
border-radius: 10px;
|
|
33378
33466
|
background: var(--mpc-bg, var(--mpc-bg-default));
|
|
33379
33467
|
color: var(--mpc-text, var(--mpc-text-default));
|
|
33380
|
-
font-family:
|
|
33468
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
33381
33469
|
font-size: 13px;
|
|
33382
33470
|
}
|
|
33383
33471
|
.${P2} * { box-sizing: border-box; }
|
|
@@ -33877,7 +33965,7 @@ function createParticipationChart(container, params) {
|
|
|
33877
33965
|
text2.setAttribute("fill", "#ffffff");
|
|
33878
33966
|
text2.setAttribute("font-size", "12");
|
|
33879
33967
|
text2.setAttribute("font-weight", "700");
|
|
33880
|
-
text2.setAttribute("font-family", "
|
|
33968
|
+
text2.setAttribute("font-family", "'Nunito', system-ui, sans-serif");
|
|
33881
33969
|
text2.setAttribute("pointer-events", "none");
|
|
33882
33970
|
text2.textContent = fmtPct(pct);
|
|
33883
33971
|
svg.appendChild(text2);
|
|
@@ -33909,7 +33997,7 @@ function createParticipationChart(container, params) {
|
|
|
33909
33997
|
label.setAttribute("text-anchor", "end");
|
|
33910
33998
|
label.setAttribute("fill", textColor);
|
|
33911
33999
|
label.setAttribute("font-size", "11");
|
|
33912
|
-
label.setAttribute("font-family", "
|
|
34000
|
+
label.setAttribute("font-family", "'Nunito', system-ui, sans-serif");
|
|
33913
34001
|
const raw = item.label || "";
|
|
33914
34002
|
label.textContent = raw.length > 18 ? `${raw.slice(0, 17)}\u2026` : raw;
|
|
33915
34003
|
svg.appendChild(label);
|
|
@@ -33930,7 +34018,7 @@ function createParticipationChart(container, params) {
|
|
|
33930
34018
|
value.setAttribute("text-anchor", "start");
|
|
33931
34019
|
value.setAttribute("fill", mutedColor);
|
|
33932
34020
|
value.setAttribute("font-size", "10.5");
|
|
33933
|
-
value.setAttribute("font-family", "
|
|
34021
|
+
value.setAttribute("font-family", "'Nunito', system-ui, sans-serif");
|
|
33934
34022
|
value.textContent = `${settings.formatValue(item.value)}${settings.unit ? ` ${settings.unit}` : ""} \xB7 ${fmtPct(pct)}`;
|
|
33935
34023
|
svg.appendChild(value);
|
|
33936
34024
|
});
|
|
@@ -37597,10 +37685,10 @@ var WaterTankModalView = class {
|
|
|
37597
37685
|
*/
|
|
37598
37686
|
render() {
|
|
37599
37687
|
const { params } = this.config;
|
|
37600
|
-
const
|
|
37601
|
-
if (!document.getElementById(
|
|
37688
|
+
const STYLE_ID14 = "myio-water-tank-modal-styles";
|
|
37689
|
+
if (!document.getElementById(STYLE_ID14)) {
|
|
37602
37690
|
const style = document.createElement("style");
|
|
37603
|
-
style.id =
|
|
37691
|
+
style.id = STYLE_ID14;
|
|
37604
37692
|
style.textContent = `
|
|
37605
37693
|
@media (max-width: 640px) {
|
|
37606
37694
|
.myio-water-tank-modal { width: 100vw !important; max-width: 100vw !important; max-height: 100vh !important; border-radius: 0 !important; }
|
|
@@ -39767,7 +39855,7 @@ var PowerLimitsModalView = class {
|
|
|
39767
39855
|
opacity: 0;
|
|
39768
39856
|
visibility: hidden;
|
|
39769
39857
|
transition: all 0.3s ease;
|
|
39770
|
-
font-family: ${styles.fontFamily || "'
|
|
39858
|
+
font-family: ${styles.fontFamily || "'Nunito', system-ui, sans-serif"};
|
|
39771
39859
|
}
|
|
39772
39860
|
|
|
39773
39861
|
.myio-power-limits-overlay.active {
|
|
@@ -41326,7 +41414,7 @@ var WelcomeModalView = class _WelcomeModalView {
|
|
|
41326
41414
|
RFC-0112: Welcome Modal Head Office
|
|
41327
41415
|
========================================== */
|
|
41328
41416
|
|
|
41329
|
-
@import url('https://fonts.googleapis.com/css2?family=
|
|
41417
|
+
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');
|
|
41330
41418
|
|
|
41331
41419
|
/* CSS Reset to isolate modal from parent styles */
|
|
41332
41420
|
.myio-welcome-modal,
|
|
@@ -41361,7 +41449,7 @@ var WelcomeModalView = class _WelcomeModalView {
|
|
|
41361
41449
|
display: flex;
|
|
41362
41450
|
align-items: center;
|
|
41363
41451
|
justify-content: center;
|
|
41364
|
-
font-family: '
|
|
41452
|
+
font-family: 'Nunito', system-ui, sans-serif !important;
|
|
41365
41453
|
font-size: 16px !important;
|
|
41366
41454
|
line-height: 1.5 !important;
|
|
41367
41455
|
font-weight: 400 !important;
|
|
@@ -43242,12 +43330,12 @@ var WelcomeModalView = class _WelcomeModalView {
|
|
|
43242
43330
|
if (this.metaTipEl) this.metaTipEl.style.display = "none";
|
|
43243
43331
|
}
|
|
43244
43332
|
buildMetaTipHtml(type, card) {
|
|
43245
|
-
const
|
|
43333
|
+
const esc6 = _WelcomeModalView.escapeMetaHtml;
|
|
43246
43334
|
const chip = _WelcomeModalView.metaChip;
|
|
43247
43335
|
const meta = card.metaCounts || {};
|
|
43248
43336
|
const details = card.metaDetails || {};
|
|
43249
43337
|
const loadingBody = '<div style="opacity:.7;padding:6px 0">Carregando\u2026</div>';
|
|
43250
|
-
const header = (icon, label, count) => `<div style="font-weight:800;font-size:13px;margin-bottom:8px">${icon} ${label}${count === null || count === void 0 ? "" : ` (${count})`} \u2014 ${
|
|
43338
|
+
const header = (icon, label, count) => `<div style="font-weight:800;font-size:13px;margin-bottom:8px">${icon} ${label}${count === null || count === void 0 ? "" : ` (${count})`} \u2014 ${esc6(card.title)}</div>`;
|
|
43251
43339
|
const row = (titleHtml, subHtml) => `<div style="padding:6px 0;border-top:1px solid #334155">
|
|
43252
43340
|
<div style="font-weight:600">${titleHtml}</div>
|
|
43253
43341
|
${subHtml ? `<div style="opacity:.7">${subHtml}</div>` : ""}
|
|
@@ -43263,8 +43351,8 @@ var WelcomeModalView = class _WelcomeModalView {
|
|
|
43263
43351
|
const chips = Object.entries(byState).map(([s, n]) => chip(`${s}: ${n}`)).join("") || '<span style="opacity:.7">Sem alarmes ativos</span>';
|
|
43264
43352
|
const rows = alarms.slice(0, 10).map(
|
|
43265
43353
|
(a) => row(
|
|
43266
|
-
|
|
43267
|
-
`${
|
|
43354
|
+
esc6(a.deviceName ? `${a.deviceName} \u2014 ${a.title || "Alarme"}` : a.title || "Alarme"),
|
|
43355
|
+
`${esc6(a.severity || "")} \xB7 ${esc6(a.state || "")}`
|
|
43268
43356
|
)
|
|
43269
43357
|
).join("");
|
|
43270
43358
|
return `${header("\u{1F6A8}", "Alarmes", meta.alarms ?? alarms.length)}<div style="margin-bottom:6px">${chips}</div>${rows}`;
|
|
@@ -43284,14 +43372,14 @@ var WelcomeModalView = class _WelcomeModalView {
|
|
|
43284
43372
|
const rows = annotations.slice(0, 10).map((a) => {
|
|
43285
43373
|
const when = a.createdAt ? new Date(a.createdAt).toLocaleDateString("pt-BR") : "";
|
|
43286
43374
|
const text2 = a.text.length > 90 ? `${a.text.slice(0, 90)}\u2026` : a.text;
|
|
43287
|
-
return row(
|
|
43375
|
+
return row(esc6(a.deviceLabel || "Dispositivo"), `${esc6(text2)}${when ? ` \xB7 ${esc6(when)}` : ""}`);
|
|
43288
43376
|
}).join("");
|
|
43289
43377
|
return `${header("\u{1F4CB}", "Anota\xE7\xF5es", meta.annotations ?? annotations.length)}<div style="margin-bottom:6px">${chips}</div>${rows}`;
|
|
43290
43378
|
}
|
|
43291
43379
|
if (type === "users") {
|
|
43292
43380
|
if (meta.users === null) return header("\u{1F465}", "Usu\xE1rios") + loadingBody;
|
|
43293
43381
|
const users = details.users || [];
|
|
43294
|
-
const rows = users.slice(0, 10).map((u) => row(
|
|
43382
|
+
const rows = users.slice(0, 10).map((u) => row(esc6(u.name), esc6(u.email || ""))).join("") || '<div style="opacity:.7;padding:6px 0">Sem usu\xE1rios</div>';
|
|
43295
43383
|
const more = users.length > 10 ? `<div style="opacity:.7;padding:6px 0 0">\u2026 e mais ${users.length - 10}</div>` : "";
|
|
43296
43384
|
return `${header("\u{1F465}", "Usu\xE1rios", meta.users ?? users.length)}${rows}${more}`;
|
|
43297
43385
|
}
|
|
@@ -44398,7 +44486,7 @@ var HeaderView = class {
|
|
|
44398
44486
|
height: 100%;
|
|
44399
44487
|
padding: 8px 12px 4px 12px;
|
|
44400
44488
|
box-sizing: border-box;
|
|
44401
|
-
font-family:
|
|
44489
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
44402
44490
|
color: var(--hdr-ink-1);
|
|
44403
44491
|
background: transparent;
|
|
44404
44492
|
}
|
|
@@ -45199,7 +45287,7 @@ var HeaderFilterModal = class {
|
|
|
45199
45287
|
justify-content: center;
|
|
45200
45288
|
align-items: center;
|
|
45201
45289
|
z-index: 10000;
|
|
45202
|
-
font-family:
|
|
45290
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
45203
45291
|
}
|
|
45204
45292
|
|
|
45205
45293
|
.${HEADER_CSS_PREFIX}-filter-backdrop {
|
|
@@ -46171,7 +46259,7 @@ function getStyles() {
|
|
|
46171
46259
|
--fc-empty-border: rgba(184, 165, 214, 0.4);
|
|
46172
46260
|
|
|
46173
46261
|
/* Static tokens */
|
|
46174
|
-
--fc-font-family: 'Nunito',
|
|
46262
|
+
--fc-font-family: 'Nunito', system-ui, sans-serif;
|
|
46175
46263
|
--fc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
46176
46264
|
--fc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
|
|
46177
46265
|
--fc-radius-sm: 6px;
|
|
@@ -47300,7 +47388,7 @@ function render(container, modalId, state6) {
|
|
|
47300
47388
|
max-height: ${state6.isMaximized ? "100%" : "92vh"};
|
|
47301
47389
|
display: flex; flex-direction: column; overflow: hidden;
|
|
47302
47390
|
border: 1px solid ${colors2.border};
|
|
47303
|
-
font-family: '
|
|
47391
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
47304
47392
|
}
|
|
47305
47393
|
#${modalId} .myio-alarm-compare-header {
|
|
47306
47394
|
background: #3e1a7d; color: white;
|
|
@@ -47716,7 +47804,7 @@ function render2(container, modalId, state6) {
|
|
|
47716
47804
|
display: flex; flex-direction: column; overflow: hidden;
|
|
47717
47805
|
border: 1px solid ${colors2.border};
|
|
47718
47806
|
border-radius: 12px;
|
|
47719
|
-
font-family: '
|
|
47807
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
47720
47808
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
47721
47809
|
}
|
|
47722
47810
|
#${modalId} .myio-op-compare-content.maximized {
|
|
@@ -48868,7 +48956,7 @@ var MODAL_CSS = `
|
|
|
48868
48956
|
display: flex;
|
|
48869
48957
|
align-items: center;
|
|
48870
48958
|
justify-content: center;
|
|
48871
|
-
font-family: '
|
|
48959
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
48872
48960
|
}
|
|
48873
48961
|
|
|
48874
48962
|
.myio-integrations-modal {
|
|
@@ -49346,7 +49434,7 @@ var ANNOTATIONS_STYLES = `
|
|
|
49346
49434
|
display: flex;
|
|
49347
49435
|
flex-direction: column;
|
|
49348
49436
|
height: 100%;
|
|
49349
|
-
font-family: '
|
|
49437
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
49350
49438
|
color: #1a1a2e;
|
|
49351
49439
|
padding: 4px;
|
|
49352
49440
|
}
|
|
@@ -51803,7 +51891,7 @@ var ANNOTATIONS_STYLES = `
|
|
|
51803
51891
|
max-width: 340px;
|
|
51804
51892
|
min-width: 280px;
|
|
51805
51893
|
animation: annotationTourSlideIn 0.3s ease;
|
|
51806
|
-
font-family: '
|
|
51894
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
51807
51895
|
}
|
|
51808
51896
|
|
|
51809
51897
|
@keyframes annotationTourSlideIn {
|
|
@@ -57527,7 +57615,7 @@ function openAlarmDetailsModal(alarm, themeMode = "light", groupMode, onAction)
|
|
|
57527
57615
|
const sumTbl = grid.querySelector(".adm-rpt-table-wrap--summary")?.outerHTML ?? "";
|
|
57528
57616
|
win.document.write(`<!DOCTYPE html><html><head><title>Relat\xF3rio \u2014 ${escHtml2(alarm.title)}</title>
|
|
57529
57617
|
<style>
|
|
57530
|
-
body{font-family:
|
|
57618
|
+
body{font-family:Nunito, system-ui, sans-serif;padding:24px;font-size:12px;color:#111;}
|
|
57531
57619
|
h2{font-size:15px;margin:0 0 4px;}p{color:#6b7280;font-size:11px;margin:0 0 16px;}
|
|
57532
57620
|
h3{font-size:12px;font-weight:700;margin:20px 0 8px;text-transform:uppercase;letter-spacing:.5px;color:#7c3aed;}
|
|
57533
57621
|
table{border-collapse:collapse;width:100%;margin-bottom:16px;}
|
|
@@ -57800,7 +57888,7 @@ var ALARMS_NOTIFICATIONS_PANEL_STYLES = `
|
|
|
57800
57888
|
Container
|
|
57801
57889
|
===================================================================== */
|
|
57802
57890
|
.myio-alarms-panel {
|
|
57803
|
-
font-family:
|
|
57891
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
57804
57892
|
font-size: 12px;
|
|
57805
57893
|
line-height: 1.4;
|
|
57806
57894
|
color: var(--alarms-text);
|
|
@@ -59388,7 +59476,7 @@ var ALARMS_NOTIFICATIONS_PANEL_STYLES = `
|
|
|
59388
59476
|
.alarms-trend-chart .chart-label {
|
|
59389
59477
|
font-size: 10px;
|
|
59390
59478
|
fill: var(--alarms-text-muted);
|
|
59391
|
-
font-family:
|
|
59479
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
59392
59480
|
}
|
|
59393
59481
|
|
|
59394
59482
|
.alarms-trend-legend {
|
|
@@ -59942,7 +60030,7 @@ var ALARMS_NOTIFICATIONS_PANEL_STYLES = `
|
|
|
59942
60030
|
display: block;
|
|
59943
60031
|
margin: 0;
|
|
59944
60032
|
padding: 0;
|
|
59945
|
-
font-family:
|
|
60033
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
59946
60034
|
font-size: 15px;
|
|
59947
60035
|
font-weight: 700;
|
|
59948
60036
|
color: #111827;
|
|
@@ -63301,7 +63389,7 @@ var AlarmsTab = class {
|
|
|
63301
63389
|
}
|
|
63302
63390
|
showToast(msg) {
|
|
63303
63391
|
const el2 = document.createElement("div");
|
|
63304
|
-
el2.style.cssText = "position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#dc2626;color:#fff;font-size:13px;font-weight:600;padding:10px 20px;border-radius:8px;z-index:99999;box-shadow:0 4px 12px rgba(0,0,0,0.25);pointer-events:none;font-family:
|
|
63392
|
+
el2.style.cssText = "position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#dc2626;color:#fff;font-size:13px;font-weight:600;padding:10px 20px;border-radius:8px;z-index:99999;box-shadow:0 4px 12px rgba(0,0,0,0.25);pointer-events:none;font-family:Nunito, system-ui, sans-serif;white-space:nowrap;";
|
|
63305
63393
|
el2.textContent = `\u26A0\uFE0F ${msg}`;
|
|
63306
63394
|
document.body.appendChild(el2);
|
|
63307
63395
|
setTimeout(() => el2.remove(), 4e3);
|
|
@@ -63342,7 +63430,7 @@ var AlarmsTab = class {
|
|
|
63342
63430
|
flex-direction: column;
|
|
63343
63431
|
gap: 20px;
|
|
63344
63432
|
padding: 4px;
|
|
63345
|
-
font-family:
|
|
63433
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
63346
63434
|
}
|
|
63347
63435
|
.at-section {
|
|
63348
63436
|
background: #fff;
|
|
@@ -63613,7 +63701,7 @@ var AlarmsTab = class {
|
|
|
63613
63701
|
max-width: 440px;
|
|
63614
63702
|
width: calc(100% - 32px);
|
|
63615
63703
|
overflow: hidden;
|
|
63616
|
-
font-family:
|
|
63704
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
63617
63705
|
}
|
|
63618
63706
|
.at-confirm-warning-bar {
|
|
63619
63707
|
height: 4px;
|
|
@@ -65187,10 +65275,10 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
|
|
|
65187
65275
|
// Styles
|
|
65188
65276
|
// ==========================================================================
|
|
65189
65277
|
injectStyles() {
|
|
65190
|
-
const
|
|
65191
|
-
if (document.getElementById(
|
|
65278
|
+
const STYLE_ID14 = "myio-tickets-tab-styles";
|
|
65279
|
+
if (document.getElementById(STYLE_ID14)) return;
|
|
65192
65280
|
const style = document.createElement("style");
|
|
65193
|
-
style.id =
|
|
65281
|
+
style.id = STYLE_ID14;
|
|
65194
65282
|
style.textContent = `
|
|
65195
65283
|
/* ===== TicketsTab layout ===== */
|
|
65196
65284
|
.ct-tab {
|
|
@@ -65198,7 +65286,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
|
|
|
65198
65286
|
flex-direction: column;
|
|
65199
65287
|
gap: 20px;
|
|
65200
65288
|
padding: 4px;
|
|
65201
|
-
font-family:
|
|
65289
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
65202
65290
|
}
|
|
65203
65291
|
.ct-section {
|
|
65204
65292
|
background: #fff;
|
|
@@ -66781,7 +66869,7 @@ var SettingsModalView = class {
|
|
|
66781
66869
|
align-items: center;
|
|
66782
66870
|
justify-content: center;
|
|
66783
66871
|
z-index: 9999999;
|
|
66784
|
-
font-family:
|
|
66872
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
66785
66873
|
}
|
|
66786
66874
|
|
|
66787
66875
|
.myio-device-settings-modal {
|
|
@@ -69507,7 +69595,7 @@ async function openDashboardPopupSettings(params) {
|
|
|
69507
69595
|
// src/components/createInputDateRangePickerInsideDIV.ts
|
|
69508
69596
|
var PREMIUM_STYLES = `
|
|
69509
69597
|
.myio-daterange-wrapper {
|
|
69510
|
-
font-family: '
|
|
69598
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
69511
69599
|
background: #f9f9f9;
|
|
69512
69600
|
padding: 20px;
|
|
69513
69601
|
border-radius: 8px;
|
|
@@ -69638,7 +69726,7 @@ async function createInputDateRangePickerInsideDIV(params) {
|
|
|
69638
69726
|
placeholder = "Clique para selecionar per\xEDodo",
|
|
69639
69727
|
pickerOptions = {},
|
|
69640
69728
|
classNames = {},
|
|
69641
|
-
injectStyles:
|
|
69729
|
+
injectStyles: injectStyles21 = true,
|
|
69642
69730
|
showHelper = true
|
|
69643
69731
|
} = params;
|
|
69644
69732
|
validateId(containerId, "containerId");
|
|
@@ -69647,7 +69735,7 @@ async function createInputDateRangePickerInsideDIV(params) {
|
|
|
69647
69735
|
if (!container) {
|
|
69648
69736
|
throw new Error(`[createInputDateRangePickerInsideDIV] Container '#${containerId}' not found`);
|
|
69649
69737
|
}
|
|
69650
|
-
if (
|
|
69738
|
+
if (injectStyles21) {
|
|
69651
69739
|
injectPremiumStyles();
|
|
69652
69740
|
}
|
|
69653
69741
|
let inputEl = document.getElementById(inputId);
|
|
@@ -69843,7 +69931,7 @@ function openGoalsPanel(params) {
|
|
|
69843
69931
|
danger: styles.errorColor || "#dc2626",
|
|
69844
69932
|
amber: styles.warningColor || "#d97706",
|
|
69845
69933
|
borderRadius: styles.borderRadius || "10px",
|
|
69846
|
-
fontFamily: styles.fontFamily || "'Nunito',
|
|
69934
|
+
fontFamily: styles.fontFamily || "'Nunito', system-ui, sans-serif",
|
|
69847
69935
|
zIndex: styles.zIndex || 1e4
|
|
69848
69936
|
};
|
|
69849
69937
|
const MODAL_ID6 = "goals-gcdr-modal";
|
|
@@ -70366,7 +70454,7 @@ function openGoalsPanel(params) {
|
|
|
70366
70454
|
rootEl.setAttribute("role", "dialog");
|
|
70367
70455
|
rootEl.setAttribute("aria-modal", "true");
|
|
70368
70456
|
container.appendChild(rootEl);
|
|
70369
|
-
|
|
70457
|
+
injectStyles21();
|
|
70370
70458
|
rootEl.addEventListener("click", onClick);
|
|
70371
70459
|
rootEl.addEventListener("change", onChange);
|
|
70372
70460
|
rootEl.addEventListener("input", onInput);
|
|
@@ -71021,7 +71109,7 @@ ${state6.year}-03-15T08,15`)}">${esc3(state6.csv)}</textarea>
|
|
|
71021
71109
|
return "";
|
|
71022
71110
|
}
|
|
71023
71111
|
}
|
|
71024
|
-
function
|
|
71112
|
+
function injectStyles21() {
|
|
71025
71113
|
const id = "myio-goals-gcdr-styles";
|
|
71026
71114
|
const prev = document.getElementById(id);
|
|
71027
71115
|
if (prev) prev.remove();
|
|
@@ -71541,7 +71629,7 @@ function renderModal(container, state6, modalId, error) {
|
|
|
71541
71629
|
max-height: ${contentMaxHeight}; height: ${isMaximized ? "100%" : "auto"};
|
|
71542
71630
|
overflow: hidden; display: flex; flex-direction: column;
|
|
71543
71631
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
71544
|
-
font-family: '
|
|
71632
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
71545
71633
|
">
|
|
71546
71634
|
<!-- Header - MyIO Premium Style (via ModalHeader component) -->
|
|
71547
71635
|
${ModalHeader.generateInlineHTML({
|
|
@@ -71648,7 +71736,7 @@ function renderModal(container, state6, modalId, error) {
|
|
|
71648
71736
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
71649
71737
|
font-size: 14px; font-weight: 500; height: 38px;
|
|
71650
71738
|
display: flex; align-items: center; gap: 8px;
|
|
71651
|
-
font-family: '
|
|
71739
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
71652
71740
|
" ${state6.isLoading ? "disabled" : ""}>
|
|
71653
71741
|
${state6.isLoading ? '<span style="animation: spin 1s linear infinite; display: inline-block;">\u21BB</span> Carregando...' : "Carregar"}
|
|
71654
71742
|
</button>
|
|
@@ -71735,7 +71823,7 @@ function renderModal(container, state6, modalId, error) {
|
|
|
71735
71823
|
color: ${colors2.text}; border: 1px solid ${colors2.border};
|
|
71736
71824
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
71737
71825
|
font-size: 14px; display: flex; align-items: center; gap: 8px;
|
|
71738
|
-
font-family: '
|
|
71826
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
71739
71827
|
" ${state6.data.length === 0 ? "disabled" : ""}>
|
|
71740
71828
|
\u{1F4E5} Exportar CSV
|
|
71741
71829
|
</button>
|
|
@@ -71743,7 +71831,7 @@ function renderModal(container, state6, modalId, error) {
|
|
|
71743
71831
|
background: #3e1a7d; color: white; border: none;
|
|
71744
71832
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
71745
71833
|
font-size: 14px; font-weight: 500;
|
|
71746
|
-
font-family: '
|
|
71834
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
71747
71835
|
">
|
|
71748
71836
|
Fechar
|
|
71749
71837
|
</button>
|
|
@@ -72319,7 +72407,7 @@ function renderModal2(container, state6, modalId) {
|
|
|
72319
72407
|
max-height: ${contentMaxHeight}; height: ${isMaximized ? "100%" : "auto"};
|
|
72320
72408
|
overflow: hidden; display: flex; flex-direction: column;
|
|
72321
72409
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
72322
|
-
font-family: '
|
|
72410
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
72323
72411
|
">
|
|
72324
72412
|
<!-- Header - MyIO Premium Style -->
|
|
72325
72413
|
<div style="
|
|
@@ -72443,7 +72531,7 @@ function renderModal2(container, state6, modalId) {
|
|
|
72443
72531
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
72444
72532
|
font-size: 14px; font-weight: 500; height: 38px;
|
|
72445
72533
|
display: flex; align-items: center; gap: 8px;
|
|
72446
|
-
font-family: '
|
|
72534
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
72447
72535
|
" ${state6.isLoading ? "disabled" : ""}>
|
|
72448
72536
|
${state6.isLoading ? '<span style="animation: spin 1s linear infinite; display: inline-block;">\u21BB</span> Carregando...' : "Carregar"}
|
|
72449
72537
|
</button>
|
|
@@ -72490,7 +72578,7 @@ function renderModal2(container, state6, modalId) {
|
|
|
72490
72578
|
color: ${colors2.text}; border: 1px solid ${colors2.border};
|
|
72491
72579
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
72492
72580
|
font-size: 14px; display: flex; align-items: center; gap: 8px;
|
|
72493
|
-
font-family: '
|
|
72581
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
72494
72582
|
" ${state6.deviceData.every((dd) => dd.data.length === 0) ? "disabled" : ""}>
|
|
72495
72583
|
\u{1F4E5} Exportar CSV
|
|
72496
72584
|
</button>
|
|
@@ -72498,7 +72586,7 @@ function renderModal2(container, state6, modalId) {
|
|
|
72498
72586
|
background: #3e1a7d; color: white; border: none;
|
|
72499
72587
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
72500
72588
|
font-size: 14px; font-weight: 500;
|
|
72501
|
-
font-family: '
|
|
72589
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
72502
72590
|
">
|
|
72503
72591
|
Fechar
|
|
72504
72592
|
</button>
|
|
@@ -73183,7 +73271,7 @@ function renderModal3(container, state6, modalId, onClose, onSave) {
|
|
|
73183
73271
|
font-size: 14px;
|
|
73184
73272
|
font-weight: 600;
|
|
73185
73273
|
color: #fff;
|
|
73186
|
-
font-family: '
|
|
73274
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
73187
73275
|
display: flex;
|
|
73188
73276
|
align-items: center;
|
|
73189
73277
|
gap: 8px;
|
|
@@ -77757,13 +77845,13 @@ var COLUMN_SUMMARY_CSS = `
|
|
|
77757
77845
|
var _cssInjected2 = false;
|
|
77758
77846
|
function injectCSS10() {
|
|
77759
77847
|
if (_cssInjected2 || typeof document === "undefined") return;
|
|
77760
|
-
const
|
|
77761
|
-
if (document.getElementById(
|
|
77848
|
+
const STYLE_ID14 = "myio-column-summary-tooltip-css";
|
|
77849
|
+
if (document.getElementById(STYLE_ID14)) {
|
|
77762
77850
|
_cssInjected2 = true;
|
|
77763
77851
|
return;
|
|
77764
77852
|
}
|
|
77765
77853
|
const style = document.createElement("style");
|
|
77766
|
-
style.id =
|
|
77854
|
+
style.id = STYLE_ID14;
|
|
77767
77855
|
style.textContent = COLUMN_SUMMARY_CSS;
|
|
77768
77856
|
document.head.appendChild(style);
|
|
77769
77857
|
_cssInjected2 = true;
|
|
@@ -82767,7 +82855,7 @@ function createModalHeader(config2) {
|
|
|
82767
82855
|
color: ${textColor};
|
|
82768
82856
|
border-radius: ${borderRadius};
|
|
82769
82857
|
min-height: 20px;
|
|
82770
|
-
font-family: '
|
|
82858
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
82771
82859
|
">
|
|
82772
82860
|
<h2 id="${config2.id}-header-title" style="
|
|
82773
82861
|
margin: 6px;
|
|
@@ -84032,7 +84120,7 @@ function getWidgetStyles(theme, primaryColor, headerStyles) {
|
|
|
84032
84120
|
};
|
|
84033
84121
|
return `
|
|
84034
84122
|
.myio-chart-widget {
|
|
84035
|
-
font-family:
|
|
84123
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
84036
84124
|
background: ${colors2.chartBackground};
|
|
84037
84125
|
border: 1px solid ${colors2.border};
|
|
84038
84126
|
border-radius: 16px;
|
|
@@ -84857,7 +84945,7 @@ function createConsumptionChartWidget(config2) {
|
|
|
84857
84945
|
</div>
|
|
84858
84946
|
`;
|
|
84859
84947
|
}
|
|
84860
|
-
function
|
|
84948
|
+
function injectStyles21() {
|
|
84861
84949
|
if (styleElement) return;
|
|
84862
84950
|
styleElement = document.createElement("style");
|
|
84863
84951
|
styleElement.id = `${widgetId}-styles`;
|
|
@@ -85371,7 +85459,7 @@ function createConsumptionChartWidget(config2) {
|
|
|
85371
85459
|
console.error(`[ConsumptionWidget] Container #${config2.containerId} not found`);
|
|
85372
85460
|
return;
|
|
85373
85461
|
}
|
|
85374
|
-
|
|
85462
|
+
injectStyles21();
|
|
85375
85463
|
containerElement.innerHTML = renderHTML();
|
|
85376
85464
|
setupListeners();
|
|
85377
85465
|
applyCollapseState();
|
|
@@ -85504,6 +85592,368 @@ function createConsumptionChartWidget(config2) {
|
|
|
85504
85592
|
return instance;
|
|
85505
85593
|
}
|
|
85506
85594
|
|
|
85595
|
+
// src/components/tooltips/goals-bar-tooltip/createGoalsBarTooltip.ts
|
|
85596
|
+
var STYLE_ID5 = "myio-goals-bar-tooltip-styles";
|
|
85597
|
+
var DEFAULT_ACCENT = "#6c5ce7";
|
|
85598
|
+
function injectStyles11(doc) {
|
|
85599
|
+
if (doc.getElementById(STYLE_ID5)) return;
|
|
85600
|
+
const s = doc.createElement("style");
|
|
85601
|
+
s.id = STYLE_ID5;
|
|
85602
|
+
s.textContent = `
|
|
85603
|
+
.myio-gbt {
|
|
85604
|
+
position: fixed;
|
|
85605
|
+
z-index: 100000;
|
|
85606
|
+
top: 0;
|
|
85607
|
+
left: 0;
|
|
85608
|
+
opacity: 0;
|
|
85609
|
+
pointer-events: none; /* unpinned: never blocks the chart hover */
|
|
85610
|
+
transition: opacity .15s ease;
|
|
85611
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
85612
|
+
}
|
|
85613
|
+
.myio-gbt.myio-gbt--visible { opacity: 1; }
|
|
85614
|
+
/* Header stays clickable even while unpinned, so the \u{1F4CC} pin is reachable as the
|
|
85615
|
+
cursor travels off the chart onto the tooltip (a short grace hide covers the gap). */
|
|
85616
|
+
.myio-gbt .myio-gbt__header { pointer-events: auto; }
|
|
85617
|
+
.myio-gbt.myio-gbt--pinned { pointer-events: auto; } /* fully interactive when pinned */
|
|
85618
|
+
|
|
85619
|
+
.myio-gbt__card {
|
|
85620
|
+
background: #ffffff;
|
|
85621
|
+
border: 1px solid #e6e8ef;
|
|
85622
|
+
border-radius: 12px;
|
|
85623
|
+
box-shadow: 0 12px 40px rgba(2,6,23,.18), 0 2px 8px rgba(2,6,23,.08);
|
|
85624
|
+
min-width: 250px;
|
|
85625
|
+
max-width: 360px;
|
|
85626
|
+
overflow: hidden;
|
|
85627
|
+
color: #1e293b;
|
|
85628
|
+
font-size: 12px;
|
|
85629
|
+
}
|
|
85630
|
+
|
|
85631
|
+
.myio-gbt__header {
|
|
85632
|
+
display: flex;
|
|
85633
|
+
align-items: center;
|
|
85634
|
+
gap: 8px;
|
|
85635
|
+
padding: 9px 12px;
|
|
85636
|
+
background: linear-gradient(90deg,
|
|
85637
|
+
color-mix(in srgb, var(--myio-gbt-accent) 14%, #fff) 0%,
|
|
85638
|
+
color-mix(in srgb, var(--myio-gbt-accent) 6%, #fff) 100%);
|
|
85639
|
+
border-bottom: 1px solid color-mix(in srgb, var(--myio-gbt-accent) 30%, #fff);
|
|
85640
|
+
}
|
|
85641
|
+
.myio-gbt__title-wrap { flex: 1; min-width: 0; }
|
|
85642
|
+
.myio-gbt__title {
|
|
85643
|
+
font-weight: 800;
|
|
85644
|
+
font-size: 13px;
|
|
85645
|
+
color: var(--myio-gbt-accent);
|
|
85646
|
+
white-space: nowrap;
|
|
85647
|
+
overflow: hidden;
|
|
85648
|
+
text-overflow: ellipsis;
|
|
85649
|
+
}
|
|
85650
|
+
.myio-gbt__subtitle {
|
|
85651
|
+
font-size: 10.5px;
|
|
85652
|
+
color: #64748b;
|
|
85653
|
+
margin-top: 1px;
|
|
85654
|
+
white-space: nowrap;
|
|
85655
|
+
overflow: hidden;
|
|
85656
|
+
text-overflow: ellipsis;
|
|
85657
|
+
}
|
|
85658
|
+
.myio-gbt__btn {
|
|
85659
|
+
width: 22px;
|
|
85660
|
+
height: 22px;
|
|
85661
|
+
border: none;
|
|
85662
|
+
background: rgba(255,255,255,.55);
|
|
85663
|
+
border-radius: 6px;
|
|
85664
|
+
cursor: pointer;
|
|
85665
|
+
display: flex;
|
|
85666
|
+
align-items: center;
|
|
85667
|
+
justify-content: center;
|
|
85668
|
+
font-size: 13px;
|
|
85669
|
+
line-height: 1;
|
|
85670
|
+
color: #64748b;
|
|
85671
|
+
transition: background .12s ease, color .12s ease, transform .12s ease;
|
|
85672
|
+
flex-shrink: 0;
|
|
85673
|
+
}
|
|
85674
|
+
.myio-gbt__btn:hover { background: rgba(255,255,255,.95); color: #1e293b; }
|
|
85675
|
+
.myio-gbt__btn--pin.is-pinned {
|
|
85676
|
+
background: var(--myio-gbt-accent);
|
|
85677
|
+
color: #fff;
|
|
85678
|
+
transform: rotate(-8deg);
|
|
85679
|
+
}
|
|
85680
|
+
.myio-gbt__btn--close { display: none; }
|
|
85681
|
+
.myio-gbt.myio-gbt--pinned .myio-gbt__btn--close { display: flex; }
|
|
85682
|
+
|
|
85683
|
+
.myio-gbt__body {
|
|
85684
|
+
padding: 6px 8px 8px;
|
|
85685
|
+
max-height: 60vh;
|
|
85686
|
+
overflow-y: auto;
|
|
85687
|
+
}
|
|
85688
|
+
|
|
85689
|
+
.myio-gbt__row {
|
|
85690
|
+
display: flex;
|
|
85691
|
+
align-items: center;
|
|
85692
|
+
gap: 6px;
|
|
85693
|
+
padding: 5px 6px;
|
|
85694
|
+
border-radius: 7px;
|
|
85695
|
+
}
|
|
85696
|
+
.myio-gbt__row:hover { background: #f5f6fb; }
|
|
85697
|
+
.myio-gbt__row--child { padding-top: 4px; padding-bottom: 4px; }
|
|
85698
|
+
.myio-gbt__row--child .myio-gbt__label { font-weight: 500; color: #475569; }
|
|
85699
|
+
.myio-gbt__row--child .myio-gbt__value { font-weight: 600; }
|
|
85700
|
+
|
|
85701
|
+
.myio-gbt__caret {
|
|
85702
|
+
width: 16px;
|
|
85703
|
+
height: 16px;
|
|
85704
|
+
border: none;
|
|
85705
|
+
background: transparent;
|
|
85706
|
+
color: var(--myio-gbt-accent);
|
|
85707
|
+
cursor: pointer;
|
|
85708
|
+
font-size: 11px;
|
|
85709
|
+
line-height: 1;
|
|
85710
|
+
display: flex;
|
|
85711
|
+
align-items: center;
|
|
85712
|
+
justify-content: center;
|
|
85713
|
+
padding: 0;
|
|
85714
|
+
flex-shrink: 0;
|
|
85715
|
+
transition: transform .12s ease;
|
|
85716
|
+
user-select: none;
|
|
85717
|
+
}
|
|
85718
|
+
.myio-gbt__caret.is-open { transform: rotate(90deg); }
|
|
85719
|
+
.myio-gbt__caret-spacer { width: 16px; flex-shrink: 0; }
|
|
85720
|
+
|
|
85721
|
+
.myio-gbt__swatch {
|
|
85722
|
+
width: 9px;
|
|
85723
|
+
height: 9px;
|
|
85724
|
+
border-radius: 3px;
|
|
85725
|
+
flex-shrink: 0;
|
|
85726
|
+
}
|
|
85727
|
+
.myio-gbt__icon { font-size: 12px; flex-shrink: 0; }
|
|
85728
|
+
.myio-gbt__label {
|
|
85729
|
+
flex: 1;
|
|
85730
|
+
min-width: 0;
|
|
85731
|
+
font-weight: 700;
|
|
85732
|
+
white-space: nowrap;
|
|
85733
|
+
overflow: hidden;
|
|
85734
|
+
text-overflow: ellipsis;
|
|
85735
|
+
}
|
|
85736
|
+
.myio-gbt__value {
|
|
85737
|
+
font-weight: 800;
|
|
85738
|
+
color: #0f172a;
|
|
85739
|
+
white-space: nowrap;
|
|
85740
|
+
font-variant-numeric: tabular-nums;
|
|
85741
|
+
}
|
|
85742
|
+
.myio-gbt__pct {
|
|
85743
|
+
min-width: 46px;
|
|
85744
|
+
text-align: right;
|
|
85745
|
+
font-size: 11px;
|
|
85746
|
+
font-weight: 700;
|
|
85747
|
+
color: var(--myio-gbt-accent);
|
|
85748
|
+
font-variant-numeric: tabular-nums;
|
|
85749
|
+
flex-shrink: 0;
|
|
85750
|
+
}
|
|
85751
|
+
/* Deviation chip (pill) \u2014 good/bad/neutral. Right-aligned, roughly fixed width so
|
|
85752
|
+
the value column above lines up cleanly. */
|
|
85753
|
+
.myio-gbt__chip {
|
|
85754
|
+
display: inline-flex;
|
|
85755
|
+
align-items: center;
|
|
85756
|
+
gap: 3px;
|
|
85757
|
+
justify-content: flex-end;
|
|
85758
|
+
min-width: 66px;
|
|
85759
|
+
padding: 1px 8px;
|
|
85760
|
+
border-radius: 999px;
|
|
85761
|
+
font-size: 10.5px;
|
|
85762
|
+
font-weight: 800;
|
|
85763
|
+
line-height: 1.5;
|
|
85764
|
+
white-space: nowrap;
|
|
85765
|
+
font-variant-numeric: tabular-nums;
|
|
85766
|
+
flex-shrink: 0;
|
|
85767
|
+
}
|
|
85768
|
+
.myio-gbt__chip--good { background: rgba(22,163,74,.12); color: #16a34a; }
|
|
85769
|
+
.myio-gbt__chip--bad { background: rgba(239,68,68,.12); color: #ef4444; }
|
|
85770
|
+
.myio-gbt__chip--neutral { background: rgba(100,116,139,.12); color: #64748b; }
|
|
85771
|
+
.myio-gbt__children {
|
|
85772
|
+
display: none;
|
|
85773
|
+
margin-left: 10px;
|
|
85774
|
+
padding-left: 6px;
|
|
85775
|
+
border-left: 2px solid color-mix(in srgb, var(--myio-gbt-accent) 22%, #fff);
|
|
85776
|
+
}
|
|
85777
|
+
.myio-gbt__children.is-open { display: block; }
|
|
85778
|
+
|
|
85779
|
+
.myio-gbt__empty {
|
|
85780
|
+
padding: 10px;
|
|
85781
|
+
text-align: center;
|
|
85782
|
+
color: #94a3b8;
|
|
85783
|
+
font-style: italic;
|
|
85784
|
+
}
|
|
85785
|
+
`;
|
|
85786
|
+
(doc.head || doc.documentElement).appendChild(s);
|
|
85787
|
+
}
|
|
85788
|
+
function esc5(v) {
|
|
85789
|
+
return String(v ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
85790
|
+
}
|
|
85791
|
+
function fmtPct3(pct) {
|
|
85792
|
+
if (pct == null || !isFinite(pct)) return "";
|
|
85793
|
+
return `${pct.toLocaleString("pt-BR", { minimumFractionDigits: 1, maximumFractionDigits: 1 })}%`;
|
|
85794
|
+
}
|
|
85795
|
+
function resolveAccent(explicit, doc) {
|
|
85796
|
+
if (explicit) return explicit;
|
|
85797
|
+
try {
|
|
85798
|
+
const v = getComputedStyle(doc.documentElement).getPropertyValue("--myio-brand-700").trim();
|
|
85799
|
+
if (v) return v;
|
|
85800
|
+
} catch {
|
|
85801
|
+
}
|
|
85802
|
+
return DEFAULT_ACCENT;
|
|
85803
|
+
}
|
|
85804
|
+
var _rowSeq = 0;
|
|
85805
|
+
function renderDeltaChip(delta) {
|
|
85806
|
+
const tone = delta.tone === "good" ? "good" : delta.tone === "bad" ? "bad" : "neutral";
|
|
85807
|
+
const arrow = delta.arrow === "up" ? "\u2191" : delta.arrow === "down" ? "\u2193" : "\u2248";
|
|
85808
|
+
const pctTxt = fmtPct3(Math.abs(Number(delta.pct)));
|
|
85809
|
+
const txt = delta.text ? ` ${esc5(delta.text)}` : "";
|
|
85810
|
+
return `<span class="myio-gbt__chip myio-gbt__chip--${tone}">${arrow} ${esc5(pctTxt)}${txt}</span>`;
|
|
85811
|
+
}
|
|
85812
|
+
function renderRow(row, level) {
|
|
85813
|
+
const hasChildren = Array.isArray(row.children) && row.children.length > 0;
|
|
85814
|
+
const open = !!row.defaultExpanded;
|
|
85815
|
+
const id = `gbtr-${++_rowSeq}`;
|
|
85816
|
+
const pct = row.pct;
|
|
85817
|
+
const caret = hasChildren ? `<button class="myio-gbt__caret${open ? " is-open" : ""}" data-caret="${id}" title="Expandir/recolher">\u25B8</button>` : `<span class="myio-gbt__caret-spacer"></span>`;
|
|
85818
|
+
const swatch = row.color ? `<span class="myio-gbt__swatch" style="background:${esc5(row.color)}"></span>` : "";
|
|
85819
|
+
const icon = row.icon ? `<span class="myio-gbt__icon">${esc5(row.icon)}</span>` : "";
|
|
85820
|
+
const chipHtml = row.delta ? renderDeltaChip(row.delta) : "";
|
|
85821
|
+
const pctHtml = !row.delta && pct != null && isFinite(pct) ? `<span class="myio-gbt__pct">${esc5(fmtPct3(pct))}</span>` : "";
|
|
85822
|
+
const rowClass = level > 0 ? "myio-gbt__row myio-gbt__row--child" : "myio-gbt__row";
|
|
85823
|
+
let html = `<div class="${rowClass}">` + caret + swatch + icon + `<span class="myio-gbt__label">${esc5(row.label)}</span><span class="myio-gbt__value">${esc5(row.valueText)}</span>` + chipHtml + pctHtml + `</div>`;
|
|
85824
|
+
if (hasChildren) {
|
|
85825
|
+
const childHtml = row.children.map((c) => renderRow(c, level + 1)).join("");
|
|
85826
|
+
html += `<div class="myio-gbt__children${open ? " is-open" : ""}" data-children="${id}">${childHtml}</div>`;
|
|
85827
|
+
}
|
|
85828
|
+
return html;
|
|
85829
|
+
}
|
|
85830
|
+
function createGoalsBarTooltip(opts) {
|
|
85831
|
+
const doc = (() => {
|
|
85832
|
+
try {
|
|
85833
|
+
return (window.top || window).document;
|
|
85834
|
+
} catch {
|
|
85835
|
+
return document;
|
|
85836
|
+
}
|
|
85837
|
+
})();
|
|
85838
|
+
injectStyles11(doc);
|
|
85839
|
+
const el2 = doc.createElement("div");
|
|
85840
|
+
el2.className = "myio-gbt";
|
|
85841
|
+
el2.style.setProperty("--myio-gbt-accent", resolveAccent(opts?.accentColor, doc));
|
|
85842
|
+
doc.body.appendChild(el2);
|
|
85843
|
+
let pinned = false;
|
|
85844
|
+
let hideTimer = null;
|
|
85845
|
+
const clearHideTimer = () => {
|
|
85846
|
+
if (hideTimer) {
|
|
85847
|
+
clearTimeout(hideTimer);
|
|
85848
|
+
hideTimer = null;
|
|
85849
|
+
}
|
|
85850
|
+
};
|
|
85851
|
+
el2.addEventListener("mouseenter", clearHideTimer);
|
|
85852
|
+
el2.addEventListener("mouseleave", () => {
|
|
85853
|
+
if (!pinned) hide();
|
|
85854
|
+
});
|
|
85855
|
+
function positionAt(clientX, clientY) {
|
|
85856
|
+
const rect = el2.getBoundingClientRect();
|
|
85857
|
+
const w = rect.width || 280;
|
|
85858
|
+
const h2 = rect.height || 200;
|
|
85859
|
+
const pad = 12;
|
|
85860
|
+
const gap = 16;
|
|
85861
|
+
let left = clientX + gap;
|
|
85862
|
+
let top = clientY + gap;
|
|
85863
|
+
if (left + w > window.innerWidth - pad) left = clientX - w - gap;
|
|
85864
|
+
if (left < pad) left = Math.max(pad, (window.innerWidth - w) / 2);
|
|
85865
|
+
if (top + h2 > window.innerHeight - pad) top = clientY - h2 - gap;
|
|
85866
|
+
if (top < pad) top = pad;
|
|
85867
|
+
if (top + h2 > window.innerHeight - pad) top = Math.max(pad, window.innerHeight - h2 - pad);
|
|
85868
|
+
el2.style.left = `${Math.round(left)}px`;
|
|
85869
|
+
el2.style.top = `${Math.round(top)}px`;
|
|
85870
|
+
}
|
|
85871
|
+
function wireInteractions() {
|
|
85872
|
+
const pinBtn = el2.querySelector('[data-action="pin"]');
|
|
85873
|
+
pinBtn?.addEventListener("click", (e) => {
|
|
85874
|
+
e.stopPropagation();
|
|
85875
|
+
pinned = !pinned;
|
|
85876
|
+
el2.classList.toggle("myio-gbt--pinned", pinned);
|
|
85877
|
+
pinBtn.classList.toggle("is-pinned", pinned);
|
|
85878
|
+
pinBtn.title = pinned ? "Desafixar" : "Fixar na tela";
|
|
85879
|
+
});
|
|
85880
|
+
const closeBtn = el2.querySelector('[data-action="close"]');
|
|
85881
|
+
closeBtn?.addEventListener("click", (e) => {
|
|
85882
|
+
e.stopPropagation();
|
|
85883
|
+
pinned = false;
|
|
85884
|
+
el2.classList.remove("myio-gbt--pinned");
|
|
85885
|
+
hide(true);
|
|
85886
|
+
});
|
|
85887
|
+
el2.querySelectorAll("[data-caret]").forEach((btn) => {
|
|
85888
|
+
btn.addEventListener("click", (e) => {
|
|
85889
|
+
e.stopPropagation();
|
|
85890
|
+
const id = btn.dataset.caret;
|
|
85891
|
+
const kids = el2.querySelector(`[data-children="${id}"]`);
|
|
85892
|
+
if (!kids) return;
|
|
85893
|
+
const isOpen = kids.classList.toggle("is-open");
|
|
85894
|
+
btn.classList.toggle("is-open", isOpen);
|
|
85895
|
+
});
|
|
85896
|
+
});
|
|
85897
|
+
}
|
|
85898
|
+
function render3(data) {
|
|
85899
|
+
const accent = resolveAccent(data.accentColor ?? opts?.accentColor, doc);
|
|
85900
|
+
el2.style.setProperty("--myio-gbt-accent", accent);
|
|
85901
|
+
const rowsHtml = data.rows && data.rows.length > 0 ? data.rows.map((r) => renderRow(r, 0)).join("") : `<div class="myio-gbt__empty">Sem dados para este per\xEDodo</div>`;
|
|
85902
|
+
el2.innerHTML = `
|
|
85903
|
+
<div class="myio-gbt__card">
|
|
85904
|
+
<div class="myio-gbt__header">
|
|
85905
|
+
<div class="myio-gbt__title-wrap">
|
|
85906
|
+
<div class="myio-gbt__title">${esc5(data.title)}</div>
|
|
85907
|
+
${data.subtitle ? `<div class="myio-gbt__subtitle">${esc5(data.subtitle)}</div>` : ""}
|
|
85908
|
+
</div>
|
|
85909
|
+
<button class="myio-gbt__btn myio-gbt__btn--pin${pinned ? " is-pinned" : ""}" data-action="pin" title="${pinned ? "Desafixar" : "Fixar na tela"}">\u{1F4CC}</button>
|
|
85910
|
+
<button class="myio-gbt__btn myio-gbt__btn--close" data-action="close" title="Fechar">\u2715</button>
|
|
85911
|
+
</div>
|
|
85912
|
+
<div class="myio-gbt__body">${rowsHtml}</div>
|
|
85913
|
+
</div>`;
|
|
85914
|
+
if (pinned) el2.classList.add("myio-gbt--pinned");
|
|
85915
|
+
wireInteractions();
|
|
85916
|
+
}
|
|
85917
|
+
function show(data, evt) {
|
|
85918
|
+
clearHideTimer();
|
|
85919
|
+
if (pinned) return;
|
|
85920
|
+
render3(data);
|
|
85921
|
+
el2.classList.add("myio-gbt--visible");
|
|
85922
|
+
const x = evt && typeof evt.clientX === "number" ? evt.clientX : window.innerWidth / 2;
|
|
85923
|
+
const y = evt && typeof evt.clientY === "number" ? evt.clientY : window.innerHeight / 2;
|
|
85924
|
+
positionAt(x, y);
|
|
85925
|
+
requestAnimationFrame(() => {
|
|
85926
|
+
if (!pinned) positionAt(x, y);
|
|
85927
|
+
});
|
|
85928
|
+
}
|
|
85929
|
+
function hide(force) {
|
|
85930
|
+
if (pinned && !force) return;
|
|
85931
|
+
if (force) {
|
|
85932
|
+
clearHideTimer();
|
|
85933
|
+
el2.classList.remove("myio-gbt--visible");
|
|
85934
|
+
return;
|
|
85935
|
+
}
|
|
85936
|
+
clearHideTimer();
|
|
85937
|
+
hideTimer = setTimeout(() => {
|
|
85938
|
+
if (!pinned) el2.classList.remove("myio-gbt--visible");
|
|
85939
|
+
hideTimer = null;
|
|
85940
|
+
}, 450);
|
|
85941
|
+
}
|
|
85942
|
+
function destroy() {
|
|
85943
|
+
clearHideTimer();
|
|
85944
|
+
try {
|
|
85945
|
+
el2.remove();
|
|
85946
|
+
} catch {
|
|
85947
|
+
}
|
|
85948
|
+
}
|
|
85949
|
+
return {
|
|
85950
|
+
show,
|
|
85951
|
+
hide,
|
|
85952
|
+
isPinned: () => pinned,
|
|
85953
|
+
destroy
|
|
85954
|
+
};
|
|
85955
|
+
}
|
|
85956
|
+
|
|
85507
85957
|
// src/components/goals-modal/GoalsModal.ts
|
|
85508
85958
|
var DOMAIN_CFG = {
|
|
85509
85959
|
energy: {
|
|
@@ -85513,20 +85963,22 @@ var DOMAIN_CFG = {
|
|
|
85513
85963
|
unitLarge: "MWh",
|
|
85514
85964
|
threshold: 1e3,
|
|
85515
85965
|
primaryColor: "#3e1a7d",
|
|
85516
|
-
|
|
85517
|
-
|
|
85518
|
-
|
|
85519
|
-
|
|
85966
|
+
// Esquema padrão das Metas: Realizado AZUL fixo #2563eb, Meta ROXO #7c3aed.
|
|
85967
|
+
barColor: "#2563eb",
|
|
85968
|
+
barColorAlpha: "rgba(37,99,235,0.15)",
|
|
85969
|
+
goalColor: "#7c3aed",
|
|
85970
|
+
goalColorAlpha: "rgba(124,58,237,0.12)"
|
|
85520
85971
|
},
|
|
85521
85972
|
water: {
|
|
85522
85973
|
label: "\xC1gua",
|
|
85523
85974
|
icon: "\u{1F4A7}",
|
|
85524
85975
|
unit: "m\xB3",
|
|
85525
85976
|
primaryColor: "#0288d1",
|
|
85526
|
-
|
|
85527
|
-
|
|
85528
|
-
|
|
85529
|
-
|
|
85977
|
+
// Esquema padrão das Metas: Realizado AZUL fixo #2563eb, Meta ROXO #7c3aed.
|
|
85978
|
+
barColor: "#2563eb",
|
|
85979
|
+
barColorAlpha: "rgba(37,99,235,0.15)",
|
|
85980
|
+
goalColor: "#7c3aed",
|
|
85981
|
+
goalColorAlpha: "rgba(124,58,237,0.12)"
|
|
85530
85982
|
},
|
|
85531
85983
|
temperature: {
|
|
85532
85984
|
label: "Temperatura",
|
|
@@ -85547,12 +85999,27 @@ var _currentDomain = "energy";
|
|
|
85547
85999
|
var _currentGran = "1d";
|
|
85548
86000
|
var _selectedDate = _todayISO();
|
|
85549
86001
|
var _selectedYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
85550
|
-
var _periodStart =
|
|
86002
|
+
var _periodStart = _firstOfMonthISO();
|
|
85551
86003
|
var _periodEnd = _todayISO();
|
|
85552
86004
|
var _chartType = "bar";
|
|
85553
86005
|
var _lastRender = null;
|
|
85554
86006
|
var _renderSeq = 0;
|
|
85555
86007
|
var _datePickerControl = null;
|
|
86008
|
+
var _barTip = null;
|
|
86009
|
+
var _periodDeviceBreakdown = null;
|
|
86010
|
+
function _neutralDelta(a, b) {
|
|
86011
|
+
if (a == null || b == null || !(b > 0) || !isFinite(a)) return void 0;
|
|
86012
|
+
const d = (a - b) / b * 100;
|
|
86013
|
+
return { pct: Math.abs(d), tone: "neutral", arrow: d > 0.05 ? "up" : d < -0.05 ? "down" : "flat" };
|
|
86014
|
+
}
|
|
86015
|
+
function _bandDelta(real, ref, midText) {
|
|
86016
|
+
if (real == null || ref == null || !(ref > 0) || !isFinite(real)) return void 0;
|
|
86017
|
+
const d = (real - ref) / ref * 100;
|
|
86018
|
+
const abs = Math.abs(d);
|
|
86019
|
+
if (d < -3) return { pct: abs, tone: "good", arrow: "down", text: "abaixo" };
|
|
86020
|
+
if (d > 3) return { pct: abs, tone: "bad", arrow: "up", text: "ultrapassou" };
|
|
86021
|
+
return { pct: abs, tone: "neutral", arrow: "flat", text: midText };
|
|
86022
|
+
}
|
|
85556
86023
|
function _todayISO() {
|
|
85557
86024
|
const d = /* @__PURE__ */ new Date();
|
|
85558
86025
|
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
|
@@ -85566,6 +86033,11 @@ function _isoNDaysAgo(n) {
|
|
|
85566
86033
|
const dd = String(d.getDate()).padStart(2, "0");
|
|
85567
86034
|
return `${d.getFullYear()}-${mm}-${dd}`;
|
|
85568
86035
|
}
|
|
86036
|
+
function _firstOfMonthISO() {
|
|
86037
|
+
const d = /* @__PURE__ */ new Date();
|
|
86038
|
+
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
|
86039
|
+
return `${d.getFullYear()}-${mm}-01`;
|
|
86040
|
+
}
|
|
85569
86041
|
function _getTopDoc() {
|
|
85570
86042
|
try {
|
|
85571
86043
|
return (window.top || window).document;
|
|
@@ -85589,10 +86061,12 @@ function _applyTheme(root) {
|
|
|
85589
86061
|
}
|
|
85590
86062
|
function _formatValue(value, domain) {
|
|
85591
86063
|
const cfg = DOMAIN_CFG[domain] || DOMAIN_CFG.energy;
|
|
86064
|
+
const dec = domain === "temperature" ? 1 : 2;
|
|
86065
|
+
const ptBR = (v, d) => v.toLocaleString("pt-BR", { minimumFractionDigits: d, maximumFractionDigits: d });
|
|
85592
86066
|
if (cfg.threshold && cfg.unitLarge && Math.abs(value) >= cfg.threshold) {
|
|
85593
|
-
return `${(value / cfg.threshold
|
|
86067
|
+
return `${ptBR(value / cfg.threshold, 2)} ${cfg.unitLarge}`;
|
|
85594
86068
|
}
|
|
85595
|
-
return `${value
|
|
86069
|
+
return `${ptBR(value, dec)} ${cfg.unit}`;
|
|
85596
86070
|
}
|
|
85597
86071
|
function _getGoalsData(domain) {
|
|
85598
86072
|
const cached = window.MyIOUtils?.goalsData?.[domain] ?? null;
|
|
@@ -85699,8 +86173,10 @@ function _seriesToTotals(series, boundaries, viewGran) {
|
|
|
85699
86173
|
const byKey = /* @__PURE__ */ new Map();
|
|
85700
86174
|
for (const pt of series) {
|
|
85701
86175
|
if (!pt) continue;
|
|
85702
|
-
const
|
|
85703
|
-
const
|
|
86176
|
+
const dt = new Date(pt.timestamp);
|
|
86177
|
+
const mm = String(dt.getMonth() + 1).padStart(2, "0");
|
|
86178
|
+
const dd = String(dt.getDate()).padStart(2, "0");
|
|
86179
|
+
const key = viewGran === "1M" ? mm : `${mm}-${dd}`;
|
|
85704
86180
|
byKey.set(key, (byKey.get(key) || 0) + (Number(pt.value) || 0));
|
|
85705
86181
|
}
|
|
85706
86182
|
return boundaries.map(
|
|
@@ -85738,6 +86214,26 @@ async function _fetchMonthData(domain, year) {
|
|
|
85738
86214
|
const totals = await _fetchSeriesTotals(domain, boundaries, "1M", "1d") ?? await _fetchTotalsThrottled(domain, boundaries, "1M");
|
|
85739
86215
|
return { labels, totals };
|
|
85740
86216
|
}
|
|
86217
|
+
async function _fetchPeriodDeviceBreakdown(domain, boundaries, gran) {
|
|
86218
|
+
try {
|
|
86219
|
+
const fn = _options?.fetchConsumption;
|
|
86220
|
+
if (!fn || !boundaries.length) return null;
|
|
86221
|
+
const start = boundaries[0].startTs;
|
|
86222
|
+
const end = boundaries[boundaries.length - 1].endTs;
|
|
86223
|
+
const devices = await fn(domain, start, end, gran);
|
|
86224
|
+
if (!Array.isArray(devices) || devices.length === 0) return null;
|
|
86225
|
+
const list = devices.map((d) => ({
|
|
86226
|
+
label: String(d.name || d.label || d.deviceName || "Medidor"),
|
|
86227
|
+
value: Number(d.total_value) || Number(d.value) || 0
|
|
86228
|
+
})).filter((d) => d.value > 0);
|
|
86229
|
+
if (list.length === 0) return null;
|
|
86230
|
+
const sum = list.reduce((a, d) => a + d.value, 0);
|
|
86231
|
+
if (!(sum > 0)) return null;
|
|
86232
|
+
return { list, sum };
|
|
86233
|
+
} catch {
|
|
86234
|
+
return null;
|
|
86235
|
+
}
|
|
86236
|
+
}
|
|
85741
86237
|
function _buildBoundaries(gran, dateISO) {
|
|
85742
86238
|
if (gran === "1M") return _buildMonthBoundaries(_selectedYear);
|
|
85743
86239
|
if (gran === "1h") return _buildHourBoundaries(dateISO);
|
|
@@ -85865,12 +86361,14 @@ function _renderChart(canvas, labels, totals, goalLine, domain, prevTotals) {
|
|
|
85865
86361
|
fill: false,
|
|
85866
86362
|
tension: 0.4,
|
|
85867
86363
|
pointRadius: isLine ? 2 : 0,
|
|
86364
|
+
// Legenda: barra → quadradinho (usePointStyle + 'rect').
|
|
86365
|
+
pointStyle: "rect",
|
|
85868
86366
|
order: 4
|
|
85869
86367
|
});
|
|
85870
86368
|
}
|
|
85871
86369
|
datasets.push({
|
|
85872
86370
|
type: _chartType,
|
|
85873
|
-
label: `
|
|
86371
|
+
label: `Realizado (${cfg.unit})`,
|
|
85874
86372
|
data: totals,
|
|
85875
86373
|
borderColor: cfg.barColor,
|
|
85876
86374
|
backgroundColor: isLine ? cfg.barColorAlpha : cfg.barColor,
|
|
@@ -85880,6 +86378,8 @@ function _renderChart(canvas, labels, totals, goalLine, domain, prevTotals) {
|
|
|
85880
86378
|
tension: 0.4,
|
|
85881
86379
|
pointRadius: isLine ? 3 : 0,
|
|
85882
86380
|
pointHoverRadius: 4,
|
|
86381
|
+
// Legenda: barra → quadradinho (usePointStyle + 'rect').
|
|
86382
|
+
pointStyle: "rect",
|
|
85883
86383
|
order: 5
|
|
85884
86384
|
});
|
|
85885
86385
|
if (hasGoals) {
|
|
@@ -85895,6 +86395,8 @@ function _renderChart(canvas, labels, totals, goalLine, domain, prevTotals) {
|
|
|
85895
86395
|
fill: false,
|
|
85896
86396
|
spanGaps: true,
|
|
85897
86397
|
tension: 0.4,
|
|
86398
|
+
// Meta é LINHA — legenda deve mostrar um traço, não um quadradinho.
|
|
86399
|
+
pointStyle: "line",
|
|
85898
86400
|
order: 0
|
|
85899
86401
|
});
|
|
85900
86402
|
}
|
|
@@ -85908,6 +86410,114 @@ function _renderChart(canvas, labels, totals, goalLine, domain, prevTotals) {
|
|
|
85908
86410
|
const useLarge = !!(cfg.unitLarge && cfg.threshold && yMax && yMax >= cfg.threshold);
|
|
85909
86411
|
const axisDivisor = useLarge ? cfg.threshold : 1;
|
|
85910
86412
|
const axisUnit = useLarge ? cfg.unitLarge : cfg.unit;
|
|
86413
|
+
let accent = cfg.primaryColor;
|
|
86414
|
+
try {
|
|
86415
|
+
const root = _overlay || _getTopDoc().documentElement;
|
|
86416
|
+
const v = getComputedStyle(root).getPropertyValue("--myio-brand-700").trim();
|
|
86417
|
+
if (v) accent = v;
|
|
86418
|
+
} catch {
|
|
86419
|
+
}
|
|
86420
|
+
const buildBarTipData = (idx) => {
|
|
86421
|
+
const realizado = totals[idx];
|
|
86422
|
+
const meta = goalLine[idx];
|
|
86423
|
+
const prev = prevTotals ? prevTotals[idx] : null;
|
|
86424
|
+
const rows = [];
|
|
86425
|
+
if (prev != null && prev > 0) {
|
|
86426
|
+
rows.push({
|
|
86427
|
+
icon: "\u{1F553}",
|
|
86428
|
+
label: "A-1 (ano anterior)",
|
|
86429
|
+
color: "#94a3b8",
|
|
86430
|
+
valueText: _formatValue(prev, domain),
|
|
86431
|
+
delta: meta != null && meta > 0 ? _neutralDelta(prev, meta) : void 0
|
|
86432
|
+
});
|
|
86433
|
+
}
|
|
86434
|
+
const realizadoRow = {
|
|
86435
|
+
icon: "\u{1F4CA}",
|
|
86436
|
+
label: "Realizado",
|
|
86437
|
+
color: cfg.barColor,
|
|
86438
|
+
valueText: _formatValue(realizado, domain),
|
|
86439
|
+
delta: prev != null && prev > 0 ? _neutralDelta(realizado, prev) : void 0
|
|
86440
|
+
};
|
|
86441
|
+
try {
|
|
86442
|
+
const bd = _periodDeviceBreakdown;
|
|
86443
|
+
if (bd && bd.sum > 0 && realizado > 0 && bd.list.length > 0) {
|
|
86444
|
+
realizadoRow.children = bd.list.map((d) => {
|
|
86445
|
+
const w = d.value / bd.sum;
|
|
86446
|
+
return {
|
|
86447
|
+
icon: cfg.icon,
|
|
86448
|
+
label: d.label,
|
|
86449
|
+
valueText: _formatValue(realizado * w, domain),
|
|
86450
|
+
pct: w * 100
|
|
86451
|
+
};
|
|
86452
|
+
});
|
|
86453
|
+
realizadoRow.defaultExpanded = false;
|
|
86454
|
+
}
|
|
86455
|
+
} catch {
|
|
86456
|
+
}
|
|
86457
|
+
rows.push(realizadoRow);
|
|
86458
|
+
if (meta != null) {
|
|
86459
|
+
const metaRow = {
|
|
86460
|
+
icon: "\u{1F3AF}",
|
|
86461
|
+
label: "Meta",
|
|
86462
|
+
color: cfg.goalColor,
|
|
86463
|
+
valueText: _formatValue(meta, domain),
|
|
86464
|
+
delta: _bandDelta(realizado, meta, "na meta")
|
|
86465
|
+
};
|
|
86466
|
+
const gdata = _getGoalsData(domain);
|
|
86467
|
+
if (gdata?.granularity === "DEVICE" && Array.isArray(gdata.devices) && gdata.devices.length && meta > 0) {
|
|
86468
|
+
const devs = gdata.devices.map((d) => ({
|
|
86469
|
+
label: d.label || d.code || "Medidor",
|
|
86470
|
+
annual: Number(d.annualAdjusted ?? d.annual ?? 0) || 0
|
|
86471
|
+
}));
|
|
86472
|
+
const totalAnnual = devs.reduce((s, d) => s + d.annual, 0);
|
|
86473
|
+
if (totalAnnual > 0) {
|
|
86474
|
+
metaRow.children = devs.map((d) => {
|
|
86475
|
+
const w = d.annual / totalAnnual;
|
|
86476
|
+
return {
|
|
86477
|
+
icon: cfg.icon,
|
|
86478
|
+
label: d.label,
|
|
86479
|
+
valueText: _formatValue(meta * w, domain),
|
|
86480
|
+
pct: w * 100
|
|
86481
|
+
};
|
|
86482
|
+
});
|
|
86483
|
+
metaRow.defaultExpanded = false;
|
|
86484
|
+
}
|
|
86485
|
+
}
|
|
86486
|
+
rows.push(metaRow);
|
|
86487
|
+
}
|
|
86488
|
+
let subtitle;
|
|
86489
|
+
if (meta != null && meta > 0) {
|
|
86490
|
+
const dev = (realizado - meta) / meta * 100;
|
|
86491
|
+
subtitle = Math.abs(dev) < 0.05 ? "Na Meta (0,0%)" : `${Math.abs(dev).toLocaleString("pt-BR", { minimumFractionDigits: 1, maximumFractionDigits: 1 })}% ${dev < 0 ? "abaixo" : "acima"} da Meta`;
|
|
86492
|
+
}
|
|
86493
|
+
return { title: labels[idx] ?? "", subtitle, rows, accentColor: accent };
|
|
86494
|
+
};
|
|
86495
|
+
let _lastMouse = null;
|
|
86496
|
+
try {
|
|
86497
|
+
canvas.addEventListener("mousemove", (e) => {
|
|
86498
|
+
_lastMouse = { x: e.clientX, y: e.clientY };
|
|
86499
|
+
});
|
|
86500
|
+
} catch {
|
|
86501
|
+
}
|
|
86502
|
+
const externalTip = _barTip ? (context) => {
|
|
86503
|
+
try {
|
|
86504
|
+
const tt = context?.tooltip;
|
|
86505
|
+
if (!tt || tt.opacity === 0) {
|
|
86506
|
+
_barTip.hide();
|
|
86507
|
+
return;
|
|
86508
|
+
}
|
|
86509
|
+
const dp = tt.dataPoints && tt.dataPoints[0];
|
|
86510
|
+
if (!dp) return;
|
|
86511
|
+
const idx = dp.dataIndex;
|
|
86512
|
+
const rect = context.chart.canvas.getBoundingClientRect();
|
|
86513
|
+
const pos = _lastMouse ?? {
|
|
86514
|
+
x: rect.left + tt.caretX,
|
|
86515
|
+
y: rect.top + tt.caretY
|
|
86516
|
+
};
|
|
86517
|
+
_barTip.show(buildBarTipData(idx), { clientX: pos.x, clientY: pos.y });
|
|
86518
|
+
} catch {
|
|
86519
|
+
}
|
|
86520
|
+
} : void 0;
|
|
85911
86521
|
_chartInstance = new Chart(canvas, {
|
|
85912
86522
|
type: "bar",
|
|
85913
86523
|
data: { labels, datasets },
|
|
@@ -85921,9 +86531,14 @@ function _renderChart(canvas, labels, totals, goalLine, domain, prevTotals) {
|
|
|
85921
86531
|
legend: {
|
|
85922
86532
|
display: hasGoals || hasPrev,
|
|
85923
86533
|
position: "bottom",
|
|
85924
|
-
|
|
86534
|
+
// usePointStyle + pointStyle por dataset: barras (Realizado/Ano anterior)
|
|
86535
|
+
// ficam quadradinhos ('rect'), Meta fica um traço ('line').
|
|
86536
|
+
labels: { color: "#374151", font: { size: 11 }, usePointStyle: true }
|
|
85925
86537
|
},
|
|
85926
86538
|
tooltip: {
|
|
86539
|
+
// Premium tooltip via external handler; se indisponível, cai no built-in.
|
|
86540
|
+
enabled: !externalTip,
|
|
86541
|
+
external: externalTip,
|
|
85927
86542
|
callbacks: {
|
|
85928
86543
|
label(ctx) {
|
|
85929
86544
|
const v = ctx.parsed.y;
|
|
@@ -86029,6 +86644,15 @@ async function _loadAndRender(domain, gran, dateISO) {
|
|
|
86029
86644
|
if (!canvas) return;
|
|
86030
86645
|
_renderChart(canvas, labels, totals, goalLine, domain, prevTotals);
|
|
86031
86646
|
_lastRender = { labels, totals, goalLine, prevTotals, domain };
|
|
86647
|
+
_periodDeviceBreakdown = null;
|
|
86648
|
+
if (domain !== "temperature") {
|
|
86649
|
+
const mySeq = seq;
|
|
86650
|
+
const bnds = _buildBoundaries(gran, dateISO);
|
|
86651
|
+
_fetchPeriodDeviceBreakdown(domain, bnds, gran).then((bd) => {
|
|
86652
|
+
if (mySeq === _renderSeq) _periodDeviceBreakdown = bd;
|
|
86653
|
+
}).catch(() => {
|
|
86654
|
+
});
|
|
86655
|
+
}
|
|
86032
86656
|
if (statsEl) {
|
|
86033
86657
|
const total = totals.reduce((a, b) => a + b, 0);
|
|
86034
86658
|
const avg = totals.length ? total / totals.length : 0;
|
|
@@ -86074,13 +86698,13 @@ function _rerenderFromCache() {
|
|
|
86074
86698
|
const { labels, totals, goalLine, prevTotals, domain } = _lastRender;
|
|
86075
86699
|
_renderChart(canvas, labels, totals, goalLine, domain, prevTotals);
|
|
86076
86700
|
}
|
|
86077
|
-
var
|
|
86701
|
+
var STYLE_ID6 = "myio-goals-modal-v2-styles";
|
|
86078
86702
|
function _injectStyles(topDoc) {
|
|
86079
|
-
if (topDoc.getElementById(
|
|
86703
|
+
if (topDoc.getElementById(STYLE_ID6)) return;
|
|
86080
86704
|
const s = topDoc.createElement("style");
|
|
86081
|
-
s.id =
|
|
86705
|
+
s.id = STYLE_ID6;
|
|
86082
86706
|
s.textContent = `
|
|
86083
|
-
.gm-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);backdrop-filter:blur(4px);opacity:0;transition:opacity .2s ease;font-family:
|
|
86707
|
+
.gm-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);backdrop-filter:blur(4px);opacity:0;transition:opacity .2s ease;font-family:'Nunito', system-ui, sans-serif;}
|
|
86084
86708
|
.gm-overlay.show{opacity:1;}
|
|
86085
86709
|
.gm-modal{position:relative;background:#fff;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.25);width:min(1000px,95vw);height:min(660px,90vh);overflow:hidden;display:flex;flex-direction:column;transform:translateY(12px) scale(.98);transition:transform .2s ease;}
|
|
86086
86710
|
.gm-overlay.show .gm-modal{transform:translateY(0) scale(1);}
|
|
@@ -86137,6 +86761,10 @@ function _buildModalHTML() {
|
|
|
86137
86761
|
<button class="gm-gran-btn${_currentGran === "1d" ? " active" : ""}" data-gran="1d">1d</button>
|
|
86138
86762
|
<button class="gm-gran-btn${_currentGran === "1h" ? " active" : ""}" data-gran="1h">1h</button>
|
|
86139
86763
|
</div>
|
|
86764
|
+
<div class="gm-gran-wrap" title="Atalhos de per\xEDodo">
|
|
86765
|
+
<button class="gm-gran-btn" data-preset="prevYear">Ano ${(/* @__PURE__ */ new Date()).getFullYear() - 1}</button>
|
|
86766
|
+
<button class="gm-gran-btn" data-preset="curYear">Ano ${(/* @__PURE__ */ new Date()).getFullYear()}</button>
|
|
86767
|
+
</div>
|
|
86140
86768
|
<div class="gm-date-picker-wrap" id="gm-date-picker-wrap">
|
|
86141
86769
|
<input type="text" id="gm-date-range-input" class="gm-date-input" readonly placeholder="Selecione o per\xEDodo\u2026" />
|
|
86142
86770
|
</div>
|
|
@@ -86222,6 +86850,20 @@ function _wireEvents(overlay, topDoc) {
|
|
|
86222
86850
|
_loadAndRender(_currentDomain, _currentGran, _selectedDate);
|
|
86223
86851
|
});
|
|
86224
86852
|
});
|
|
86853
|
+
overlay.querySelectorAll(".gm-gran-btn[data-preset]").forEach((btn) => {
|
|
86854
|
+
btn.addEventListener("click", () => {
|
|
86855
|
+
const which = btn.dataset.preset;
|
|
86856
|
+
const Y = (/* @__PURE__ */ new Date()).getFullYear();
|
|
86857
|
+
const year = which === "prevYear" ? Y - 1 : Y;
|
|
86858
|
+
_selectedYear = year;
|
|
86859
|
+
_currentGran = "1M";
|
|
86860
|
+
_periodStart = `${year}-01-01`;
|
|
86861
|
+
_periodEnd = which === "prevYear" ? `${year}-12-31` : _todayISO();
|
|
86862
|
+
overlay.querySelectorAll(".gm-gran-btn[data-gran]").forEach((b) => b.classList.toggle("active", b.dataset.gran === "1M"));
|
|
86863
|
+
_initDatePicker(topDoc).catch(console.error);
|
|
86864
|
+
_loadAndRender(_currentDomain, _currentGran, _selectedDate);
|
|
86865
|
+
});
|
|
86866
|
+
});
|
|
86225
86867
|
}
|
|
86226
86868
|
function _updateGoalsHint(topDoc) {
|
|
86227
86869
|
const existing = topDoc.getElementById("gm-no-goals-hint-el");
|
|
@@ -86262,19 +86904,19 @@ function _updateCoverageHint(topDoc) {
|
|
|
86262
86904
|
const deviceCount = data.granularity === "DEVICE" ? data.devices?.length ?? 0 : 0;
|
|
86263
86905
|
hint.textContent = `\u26A0 Meta incompleta para este dom\xEDnio/ano` + (deviceCount > 0 ? ` \xB7 Por medidor (${deviceCount})` : "") + ` \u2014 passe o mouse para detalhes`;
|
|
86264
86906
|
tabs.insertAdjacentElement("afterend", hint);
|
|
86265
|
-
const
|
|
86907
|
+
const esc6 = (s) => String(s ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
86266
86908
|
try {
|
|
86267
86909
|
_coverageDetach = InfoTooltip.attach(hint, () => {
|
|
86268
86910
|
const d = _getGoalsData(_currentDomain);
|
|
86269
86911
|
const parts = [];
|
|
86270
86912
|
if (hasCoverageGaps(d?.coverageGaps)) {
|
|
86271
|
-
parts.push(`<p style="margin:0 0 8px;">${
|
|
86913
|
+
parts.push(`<p style="margin:0 0 8px;">${esc6(buildCoverageWarningTextPtBR(d?.coverageGaps, "GERAL"))}</p>`);
|
|
86272
86914
|
}
|
|
86273
86915
|
(d?.devices || []).forEach((dev) => {
|
|
86274
86916
|
if (!hasCoverageGaps(dev?.coverageGaps)) return;
|
|
86275
86917
|
const label = dev.label || dev.code || "medidor";
|
|
86276
86918
|
parts.push(
|
|
86277
|
-
`<p style="margin:0 0 8px;">${
|
|
86919
|
+
`<p style="margin:0 0 8px;">${esc6(buildCoverageWarningTextPtBR(dev.coverageGaps, `do medidor ${label}`))}</p>`
|
|
86278
86920
|
);
|
|
86279
86921
|
});
|
|
86280
86922
|
return {
|
|
@@ -86291,7 +86933,7 @@ var GoalsModal = {
|
|
|
86291
86933
|
_options = options;
|
|
86292
86934
|
_currentDomain = options.initialDomain ?? "energy";
|
|
86293
86935
|
_periodEnd = _todayISO();
|
|
86294
|
-
_periodStart = _isoNDaysAgo(
|
|
86936
|
+
_periodStart = options.defaultPeriodDays != null ? _isoNDaysAgo(options.defaultPeriodDays - 1) : _firstOfMonthISO();
|
|
86295
86937
|
_selectedDate = _todayISO();
|
|
86296
86938
|
_selectedYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
86297
86939
|
_currentGran = "1d";
|
|
@@ -86313,6 +86955,16 @@ var GoalsModal = {
|
|
|
86313
86955
|
overlay.appendChild(modal);
|
|
86314
86956
|
topDoc.body.appendChild(overlay);
|
|
86315
86957
|
_overlay = overlay;
|
|
86958
|
+
try {
|
|
86959
|
+
_barTip?.destroy();
|
|
86960
|
+
} catch {
|
|
86961
|
+
}
|
|
86962
|
+
_barTip = null;
|
|
86963
|
+
try {
|
|
86964
|
+
_barTip = createGoalsBarTooltip();
|
|
86965
|
+
} catch {
|
|
86966
|
+
_barTip = null;
|
|
86967
|
+
}
|
|
86316
86968
|
_applyTheme(overlay);
|
|
86317
86969
|
requestAnimationFrame(() => overlay.classList.add("show"));
|
|
86318
86970
|
_wireEvents(overlay, topDoc);
|
|
@@ -86326,6 +86978,11 @@ var GoalsModal = {
|
|
|
86326
86978
|
if (!_overlay) return;
|
|
86327
86979
|
_overlay.classList.remove("show");
|
|
86328
86980
|
_destroyChart();
|
|
86981
|
+
try {
|
|
86982
|
+
_barTip?.destroy();
|
|
86983
|
+
} catch {
|
|
86984
|
+
}
|
|
86985
|
+
_barTip = null;
|
|
86329
86986
|
_datePickerControl?.destroy();
|
|
86330
86987
|
_datePickerControl = null;
|
|
86331
86988
|
if (_coverageDetach) {
|
|
@@ -86623,7 +87280,7 @@ function generatePDFContent(data, config2) {
|
|
|
86623
87280
|
<title>${deviceLabel} - ${domainLabel} Report</title>
|
|
86624
87281
|
<style>
|
|
86625
87282
|
body {
|
|
86626
|
-
font-family: '
|
|
87283
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
86627
87284
|
margin: 0;
|
|
86628
87285
|
padding: 24px;
|
|
86629
87286
|
color: ${colors2.text};
|
|
@@ -87058,7 +87715,7 @@ function createDistributionChartWidget(config2) {
|
|
|
87058
87715
|
return `
|
|
87059
87716
|
<style>
|
|
87060
87717
|
#${widgetId} {
|
|
87061
|
-
font-family:
|
|
87718
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
87062
87719
|
}
|
|
87063
87720
|
#${widgetId} .myio-dist-header {
|
|
87064
87721
|
display: flex;
|
|
@@ -87746,7 +88403,7 @@ var ContractDevicesModalView = class {
|
|
|
87746
88403
|
align-items: center;
|
|
87747
88404
|
justify-content: center;
|
|
87748
88405
|
z-index: 10000;
|
|
87749
|
-
font-family:
|
|
88406
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
87750
88407
|
}
|
|
87751
88408
|
|
|
87752
88409
|
.myio-contract-devices-modal {
|
|
@@ -88883,7 +89540,7 @@ function createMyIOTheme(settings, mode) {
|
|
|
88883
89540
|
// src/components/settings-hub/openSettingsHubModal.ts
|
|
88884
89541
|
var ROUTE_DELAY_MS = 250;
|
|
88885
89542
|
var MODAL_ID = "myio-conf-picker";
|
|
88886
|
-
var
|
|
89543
|
+
var STYLE_ID7 = "myio-conf-picker-styles";
|
|
88887
89544
|
var HUB_OPTIONS = [
|
|
88888
89545
|
{
|
|
88889
89546
|
action: "temperature",
|
|
@@ -88953,7 +89610,7 @@ var HUB_CSS = `
|
|
|
88953
89610
|
opacity: 0;
|
|
88954
89611
|
pointer-events: none;
|
|
88955
89612
|
transition: opacity 0.2s ease;
|
|
88956
|
-
font-family: Nunito,
|
|
89613
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
88957
89614
|
}
|
|
88958
89615
|
.myio-conf-picker.show {
|
|
88959
89616
|
opacity: 1;
|
|
@@ -89094,9 +89751,9 @@ function resolveHubThemeVars(explicit) {
|
|
|
89094
89751
|
function openSettingsHubModal(options) {
|
|
89095
89752
|
const { customerName = "", isSuperAdmin: isSuperAdmin2 = false, handlers } = options;
|
|
89096
89753
|
const doc = options.targetDocument || resolveTopDocument();
|
|
89097
|
-
if (!doc.getElementById(
|
|
89754
|
+
if (!doc.getElementById(STYLE_ID7)) {
|
|
89098
89755
|
const style = doc.createElement("style");
|
|
89099
|
-
style.id =
|
|
89756
|
+
style.id = STYLE_ID7;
|
|
89100
89757
|
style.textContent = HUB_CSS;
|
|
89101
89758
|
doc.head.appendChild(style);
|
|
89102
89759
|
}
|
|
@@ -89370,7 +90027,7 @@ var PRICING_PANEL_CSS = `
|
|
|
89370
90027
|
opacity: 0;
|
|
89371
90028
|
pointer-events: none;
|
|
89372
90029
|
transition: opacity 0.2s ease;
|
|
89373
|
-
font-family: Nunito,
|
|
90030
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
89374
90031
|
}
|
|
89375
90032
|
.myio-pricing.show {
|
|
89376
90033
|
opacity: 1;
|
|
@@ -90725,7 +91382,7 @@ var MeasurementSetupView = class {
|
|
|
90725
91382
|
opacity: 0;
|
|
90726
91383
|
visibility: hidden;
|
|
90727
91384
|
transition: all 0.3s ease;
|
|
90728
|
-
font-family: ${styles.fontFamily || "'
|
|
91385
|
+
font-family: ${styles.fontFamily || "'Nunito', system-ui, sans-serif"};
|
|
90729
91386
|
}
|
|
90730
91387
|
|
|
90731
91388
|
.myio-measurement-setup-overlay.active {
|
|
@@ -91556,7 +92213,7 @@ function ensureBusyModalDOM() {
|
|
|
91556
92213
|
z-index: 99999;
|
|
91557
92214
|
align-items: center;
|
|
91558
92215
|
justify-content: center;
|
|
91559
|
-
font-family: '
|
|
92216
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
91560
92217
|
">
|
|
91561
92218
|
<div style="
|
|
91562
92219
|
background: ${MYIO_PURPLE_DARK};
|
|
@@ -92036,7 +92693,7 @@ function renderModal4(container, state6, modalId, t, error) {
|
|
|
92036
92693
|
max-height: ${contentMaxHeight}; height: ${state6.isMaximized ? "100%" : "auto"};
|
|
92037
92694
|
overflow: hidden; display: flex; flex-direction: column;
|
|
92038
92695
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
92039
|
-
font-family: '
|
|
92696
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
92040
92697
|
">
|
|
92041
92698
|
<!-- Header - MyIO Premium Style -->
|
|
92042
92699
|
<div style="
|
|
@@ -92095,7 +92752,7 @@ function renderModal4(container, state6, modalId, t, error) {
|
|
|
92095
92752
|
background: ${state6.theme === "dark" ? "rgba(255,255,255,0.1)" : "#f3f4f6"};
|
|
92096
92753
|
color: ${colors2.text}; border: 1px solid ${colors2.border};
|
|
92097
92754
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92098
|
-
font-size: 14px; font-family: '
|
|
92755
|
+
font-size: 14px; font-family: 'Nunito', system-ui, sans-serif;
|
|
92099
92756
|
">${t.back}</button>
|
|
92100
92757
|
` : ""}
|
|
92101
92758
|
</div>
|
|
@@ -92104,49 +92761,49 @@ function renderModal4(container, state6, modalId, t, error) {
|
|
|
92104
92761
|
<button id="${modalId}-bulk-attr" style="
|
|
92105
92762
|
background: #f59e0b; color: white; border: none;
|
|
92106
92763
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92107
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92764
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92108
92765
|
display: flex; align-items: center; gap: 6px;
|
|
92109
92766
|
">\u26A1 For\xE7ar Atributo (${state6.selectedDevices.length})</button>
|
|
92110
92767
|
<button id="${modalId}-bulk-profile" style="
|
|
92111
92768
|
background: #8b5cf6; color: white; border: none;
|
|
92112
92769
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92113
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92770
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92114
92771
|
display: flex; align-items: center; gap: 6px;
|
|
92115
92772
|
">\u{1F3F7}\uFE0F For\xE7ar Profile (${state6.selectedDevices.length})</button>
|
|
92116
92773
|
<button id="${modalId}-bulk-owner" style="
|
|
92117
92774
|
background: #10b981; color: white; border: none;
|
|
92118
92775
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92119
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92776
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92120
92777
|
display: flex; align-items: center; gap: 6px;
|
|
92121
92778
|
" ${!state6.selectedCustomer ? 'disabled title="Selecione um Customer primeiro"' : ""}>\u{1F464} Atribuir Owner (${state6.selectedDevices.length})</button>
|
|
92122
92779
|
<button id="${modalId}-bulk-relation" style="
|
|
92123
92780
|
background: #0a6d5e; color: white; border: none;
|
|
92124
92781
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92125
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92782
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92126
92783
|
display: flex; align-items: center; gap: 6px;
|
|
92127
92784
|
" ${!state6.selectedCustomer ? 'disabled title="Selecione um Customer primeiro"' : ""}>\u{1F517} For\xE7ar Rela\xE7\xE3o (${state6.selectedDevices.length})</button>
|
|
92128
92785
|
<button id="${modalId}-clear-gcdr-ids" style="
|
|
92129
92786
|
background: #dc2626; color: white; border: none;
|
|
92130
92787
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92131
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92788
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92132
92789
|
display: flex; align-items: center; gap: 6px;
|
|
92133
92790
|
" ${!state6.selectedCustomer ? 'disabled title="Selecione um Customer primeiro"' : ""}>\u{1F9F9} Clear GCDR IDs</button>
|
|
92134
92791
|
<button id="${modalId}-custom-shortcut" style="
|
|
92135
92792
|
background: #ef4444; color: white; border: none;
|
|
92136
92793
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92137
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92794
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92138
92795
|
display: flex; align-items: center; gap: 6px;
|
|
92139
92796
|
">\u{1F39B}\uFE0F CUSTOM (${state6.selectedDevices.length})</button>
|
|
92140
92797
|
<button id="${modalId}-bulk-sync-ingestion" style="
|
|
92141
92798
|
background: #0284c7; color: white; border: none;
|
|
92142
92799
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92143
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92800
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92144
92801
|
display: flex; align-items: center; gap: 6px;
|
|
92145
92802
|
" ${!state6.selectedCustomer ? 'disabled title="Selecione um Customer primeiro"' : ""}>\u{1F504} Sync Ingestion ID (${state6.selectedDevices.length})</button>
|
|
92146
92803
|
<button id="${modalId}-bulk-delete" style="
|
|
92147
92804
|
background: #b91c1c; color: white; border: 1px solid #7f1d1d;
|
|
92148
92805
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92149
|
-
font-size: 14px; font-weight: 600; font-family: '
|
|
92806
|
+
font-size: 14px; font-weight: 600; font-family: 'Nunito', system-ui, sans-serif;
|
|
92150
92807
|
display: flex; align-items: center; gap: 6px;
|
|
92151
92808
|
" title="Deletar permanentemente os dispositivos selecionados (irrevers\xEDvel)">\u{1F5D1}\uFE0F Deletar (${state6.selectedDevices.length})</button>
|
|
92152
92809
|
` : ""}
|
|
@@ -92154,13 +92811,13 @@ function renderModal4(container, state6, modalId, t, error) {
|
|
|
92154
92811
|
<button id="${modalId}-lojas-sync" style="
|
|
92155
92812
|
background: #3b82f6; color: white; border: none;
|
|
92156
92813
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92157
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92814
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92158
92815
|
display: flex; align-items: center; gap: 6px;
|
|
92159
92816
|
" ${state6.lojasDataLoading ? "disabled" : ""}>\u{1F504} Sync Ingestion</button>
|
|
92160
92817
|
<button id="${modalId}-lojas-apply" style="
|
|
92161
92818
|
background: #ef4444; color: white; border: none;
|
|
92162
92819
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92163
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92820
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92164
92821
|
display: flex; align-items: center; gap: 6px;
|
|
92165
92822
|
" ${state6.lojasDataLoading ? "disabled" : ""}>\u{1F3EC} Aplicar ${state6.lojasConfig?.label ?? "LOJAS"} (${state6.lojasDeviceData.length})</button>
|
|
92166
92823
|
` : ""}
|
|
@@ -92168,19 +92825,19 @@ function renderModal4(container, state6, modalId, t, error) {
|
|
|
92168
92825
|
background: ${state6.theme === "dark" ? "rgba(255,255,255,0.1)" : "#f3f4f6"};
|
|
92169
92826
|
color: ${colors2.text}; border: 1px solid ${colors2.border};
|
|
92170
92827
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92171
|
-
font-size: 14px; font-family: '
|
|
92828
|
+
font-size: 14px; font-family: 'Nunito', system-ui, sans-serif;
|
|
92172
92829
|
">${t.cancel}</button>
|
|
92173
92830
|
${state6.currentStep < 3 ? `
|
|
92174
92831
|
<button id="${modalId}-next" style="
|
|
92175
92832
|
background: ${MYIO_PURPLE}; color: white; border: none;
|
|
92176
92833
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92177
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92834
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92178
92835
|
" ${state6.deviceSelectionMode === "multi" ? 'disabled title="Desabilitado no modo multi"' : ""}>${t.next}</button>
|
|
92179
92836
|
` : state6.lojasMode ? "" : `
|
|
92180
92837
|
<button id="${modalId}-save" style="
|
|
92181
92838
|
background: ${colors2.success}; color: white; border: none;
|
|
92182
92839
|
padding: 8px 16px; border-radius: 6px; cursor: pointer;
|
|
92183
|
-
font-size: 14px; font-weight: 500; font-family: '
|
|
92840
|
+
font-size: 14px; font-weight: 500; font-family: 'Nunito', system-ui, sans-serif;
|
|
92184
92841
|
">${t.save}</button>
|
|
92185
92842
|
`}
|
|
92186
92843
|
</div>
|
|
@@ -94269,7 +94926,7 @@ function openRelationsDetailPanel(deviceId, deviceName, direction, rels, state6,
|
|
|
94269
94926
|
z-index:99999; background:${colors2.bg}; border:1px solid ${colors2.border};
|
|
94270
94927
|
border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,.35);
|
|
94271
94928
|
min-width:380px; max-width:500px; width:90vw; max-height:70vh;
|
|
94272
|
-
display:flex; flex-direction:column; font-family:system-ui,sans-serif;
|
|
94929
|
+
display:flex; flex-direction:column; font-family:Nunito, system-ui, sans-serif;
|
|
94273
94930
|
`;
|
|
94274
94931
|
const rows = currentRels.map((rel, idx) => {
|
|
94275
94932
|
const [tcBg, tcColor] = typeColor(rel.entityType);
|
|
@@ -94440,7 +95097,7 @@ async function openClearGcdrIdsModal(state6) {
|
|
|
94440
95097
|
position:fixed; inset:0; z-index:99999;
|
|
94441
95098
|
background:rgba(0,0,0,0.55); backdrop-filter:blur(4px);
|
|
94442
95099
|
display:flex; align-items:center; justify-content:center;
|
|
94443
|
-
font-family:'
|
|
95100
|
+
font-family:'Nunito', system-ui, sans-serif;
|
|
94444
95101
|
`;
|
|
94445
95102
|
overlay.addEventListener("click", (e) => {
|
|
94446
95103
|
if (e.target === overlay) close();
|
|
@@ -95708,7 +96365,7 @@ function showMiniTooltip(trigger, content, colors2) {
|
|
|
95708
96365
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
95709
96366
|
white-space: pre-line;
|
|
95710
96367
|
max-width: 280px;
|
|
95711
|
-
font-family: '
|
|
96368
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
95712
96369
|
`;
|
|
95713
96370
|
miniTooltipEl.textContent = content;
|
|
95714
96371
|
document.body.appendChild(miniTooltipEl);
|
|
@@ -96745,7 +97402,7 @@ function openCheckFixScopeDialog(state6, onConfirm) {
|
|
|
96745
97402
|
}
|
|
96746
97403
|
const overlay = document.createElement("div");
|
|
96747
97404
|
overlay.id = DIALOG_ID;
|
|
96748
|
-
overlay.style.cssText = "position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;font-family:
|
|
97405
|
+
overlay.style.cssText = "position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;font-family:Nunito, system-ui, sans-serif;";
|
|
96749
97406
|
overlay.innerHTML = `
|
|
96750
97407
|
<div style="background:${c.surface};border-radius:12px;width:480px;max-width:92vw;max-height:88vh;
|
|
96751
97408
|
overflow:hidden;display:flex;flex-direction:column;box-shadow:0 12px 40px rgba(0,0,0,0.4);">
|
|
@@ -97329,7 +97986,7 @@ function refreshTicketBadges(opts) {
|
|
|
97329
97986
|
|
|
97330
97987
|
// src/components/premium-modals/dialog/styles.ts
|
|
97331
97988
|
var FONT_LINK_ID = "myio-dialog-font-nunito";
|
|
97332
|
-
var
|
|
97989
|
+
var STYLE_ID8 = "myio-dialog-styles";
|
|
97333
97990
|
function injectDialogStyles() {
|
|
97334
97991
|
if (!document.getElementById(FONT_LINK_ID)) {
|
|
97335
97992
|
const link = document.createElement("link");
|
|
@@ -97338,9 +97995,9 @@ function injectDialogStyles() {
|
|
|
97338
97995
|
link.href = "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap";
|
|
97339
97996
|
document.head.appendChild(link);
|
|
97340
97997
|
}
|
|
97341
|
-
if (document.getElementById(
|
|
97998
|
+
if (document.getElementById(STYLE_ID8)) return;
|
|
97342
97999
|
const style = document.createElement("style");
|
|
97343
|
-
style.id =
|
|
98000
|
+
style.id = STYLE_ID8;
|
|
97344
98001
|
style.textContent = `
|
|
97345
98002
|
.myio-dialog-overlay {
|
|
97346
98003
|
position: fixed;
|
|
@@ -97349,7 +98006,7 @@ function injectDialogStyles() {
|
|
|
97349
98006
|
align-items: center;
|
|
97350
98007
|
justify-content: center;
|
|
97351
98008
|
background: rgba(17, 24, 39, 0.55);
|
|
97352
|
-
font-family: 'Nunito', -
|
|
98009
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
97353
98010
|
}
|
|
97354
98011
|
.myio-dialog {
|
|
97355
98012
|
background: #ffffff;
|
|
@@ -97610,7 +98267,7 @@ function openMessageDialog(params) {
|
|
|
97610
98267
|
}
|
|
97611
98268
|
|
|
97612
98269
|
// src/components/premium-modals/dialog/openGenericModal.ts
|
|
97613
|
-
var
|
|
98270
|
+
var STYLE_ID9 = "myio-genmodal-styles";
|
|
97614
98271
|
var FONT_LINK_ID2 = "myio-dialog-font-nunito";
|
|
97615
98272
|
var BASE_Z_INDEX2 = 10600;
|
|
97616
98273
|
var openCount2 = 0;
|
|
@@ -97629,9 +98286,9 @@ function injectGenericModalStyles() {
|
|
|
97629
98286
|
link.href = "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap";
|
|
97630
98287
|
document.head.appendChild(link);
|
|
97631
98288
|
}
|
|
97632
|
-
if (document.getElementById(
|
|
98289
|
+
if (document.getElementById(STYLE_ID9)) return;
|
|
97633
98290
|
const style = document.createElement("style");
|
|
97634
|
-
style.id =
|
|
98291
|
+
style.id = STYLE_ID9;
|
|
97635
98292
|
style.textContent = `
|
|
97636
98293
|
.myio-genmodal-overlay {
|
|
97637
98294
|
position: fixed;
|
|
@@ -97640,7 +98297,7 @@ function injectGenericModalStyles() {
|
|
|
97640
98297
|
align-items: center;
|
|
97641
98298
|
justify-content: center;
|
|
97642
98299
|
background: rgba(17, 24, 39, 0.55);
|
|
97643
|
-
font-family: 'Nunito', -
|
|
98300
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
97644
98301
|
}
|
|
97645
98302
|
.myio-genmodal {
|
|
97646
98303
|
background: #ffffff;
|
|
@@ -97858,12 +98515,12 @@ function openGenericModal(params) {
|
|
|
97858
98515
|
}
|
|
97859
98516
|
|
|
97860
98517
|
// src/components/img-gallery/ScrollableTabs.ts
|
|
97861
|
-
var
|
|
98518
|
+
var STYLE_ID10 = "myio-tabs-styles";
|
|
97862
98519
|
var FONT_LINK_ID3 = "myio-dialog-font-nunito";
|
|
97863
98520
|
function escapeHtml11(value) {
|
|
97864
98521
|
return String(value).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
97865
98522
|
}
|
|
97866
|
-
function
|
|
98523
|
+
function injectStyles12() {
|
|
97867
98524
|
if (!document.getElementById(FONT_LINK_ID3)) {
|
|
97868
98525
|
const link = document.createElement("link");
|
|
97869
98526
|
link.id = FONT_LINK_ID3;
|
|
@@ -97871,15 +98528,15 @@ function injectStyles11() {
|
|
|
97871
98528
|
link.href = "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap";
|
|
97872
98529
|
document.head.appendChild(link);
|
|
97873
98530
|
}
|
|
97874
|
-
if (document.getElementById(
|
|
98531
|
+
if (document.getElementById(STYLE_ID10)) return;
|
|
97875
98532
|
const style = document.createElement("style");
|
|
97876
|
-
style.id =
|
|
98533
|
+
style.id = STYLE_ID10;
|
|
97877
98534
|
style.textContent = `
|
|
97878
98535
|
.myio-tabs {
|
|
97879
98536
|
display: flex;
|
|
97880
98537
|
align-items: center;
|
|
97881
98538
|
gap: 6px;
|
|
97882
|
-
font-family: 'Nunito', -
|
|
98539
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
97883
98540
|
max-width: 100%;
|
|
97884
98541
|
}
|
|
97885
98542
|
.myio-tabs__arrow {
|
|
@@ -97948,7 +98605,7 @@ function createScrollableTabs(options) {
|
|
|
97948
98605
|
if (typeof document === "undefined") {
|
|
97949
98606
|
throw new Error("[createScrollableTabs] requires a browser environment");
|
|
97950
98607
|
}
|
|
97951
|
-
|
|
98608
|
+
injectStyles12();
|
|
97952
98609
|
const theme = options.theme ?? "light";
|
|
97953
98610
|
const accent = options.accent ?? "#7C3AED";
|
|
97954
98611
|
const showArrows = options.showArrows ?? "auto";
|
|
@@ -98081,13 +98738,13 @@ function createScrollableTabs(options) {
|
|
|
98081
98738
|
}
|
|
98082
98739
|
|
|
98083
98740
|
// src/components/img-gallery/ImgGallery.ts
|
|
98084
|
-
var
|
|
98741
|
+
var STYLE_ID11 = "myio-gallery-styles";
|
|
98085
98742
|
var FONT_LINK_ID4 = "myio-dialog-font-nunito";
|
|
98086
98743
|
function escapeHtml12(value) {
|
|
98087
98744
|
return String(value == null ? "" : value).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
98088
98745
|
}
|
|
98089
98746
|
var PRM = () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
98090
|
-
function
|
|
98747
|
+
function injectStyles13() {
|
|
98091
98748
|
if (!document.getElementById(FONT_LINK_ID4)) {
|
|
98092
98749
|
const link = document.createElement("link");
|
|
98093
98750
|
link.id = FONT_LINK_ID4;
|
|
@@ -98095,12 +98752,12 @@ function injectStyles12() {
|
|
|
98095
98752
|
link.href = "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap";
|
|
98096
98753
|
document.head.appendChild(link);
|
|
98097
98754
|
}
|
|
98098
|
-
if (document.getElementById(
|
|
98755
|
+
if (document.getElementById(STYLE_ID11)) return;
|
|
98099
98756
|
const style = document.createElement("style");
|
|
98100
|
-
style.id =
|
|
98757
|
+
style.id = STYLE_ID11;
|
|
98101
98758
|
style.textContent = `
|
|
98102
98759
|
.myio-gallery {
|
|
98103
|
-
font-family: 'Nunito', -
|
|
98760
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
98104
98761
|
display: flex;
|
|
98105
98762
|
flex-direction: column;
|
|
98106
98763
|
gap: 14px;
|
|
@@ -98200,7 +98857,7 @@ function injectStyles12() {
|
|
|
98200
98857
|
position: fixed; inset: 0; z-index: 10800;
|
|
98201
98858
|
display: flex; align-items: center; justify-content: center;
|
|
98202
98859
|
background: rgba(0,0,0,.82);
|
|
98203
|
-
font-family: 'Nunito', -
|
|
98860
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
98204
98861
|
}
|
|
98205
98862
|
.myio-gallery-lb__img { max-width: 88vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
|
|
98206
98863
|
.myio-gallery-lb__cap {
|
|
@@ -98256,7 +98913,7 @@ function createImgGallery(options) {
|
|
|
98256
98913
|
if (typeof document === "undefined") {
|
|
98257
98914
|
throw new Error("[createImgGallery] requires a browser environment");
|
|
98258
98915
|
}
|
|
98259
|
-
|
|
98916
|
+
injectStyles13();
|
|
98260
98917
|
const locale = options.locale === "en-US" ? "en-US" : "pt-BR";
|
|
98261
98918
|
const theme = options.theme ?? "light";
|
|
98262
98919
|
const accent = options.accent ?? "#7C3AED";
|
|
@@ -102071,7 +102728,7 @@ var UserManagementModalView = class {
|
|
|
102071
102728
|
/* \u2500\u2500 Component styles (theme-agnostic via variables) \u2500\u2500 */
|
|
102072
102729
|
.um-modal {
|
|
102073
102730
|
background: var(--um-modal-bg);
|
|
102074
|
-
font-family: 'Nunito', -
|
|
102731
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
102075
102732
|
border-radius: 14px; width: 96vw; max-width: 1200px;
|
|
102076
102733
|
--modal-header-radius: 14px 14px 0 0;
|
|
102077
102734
|
height: 84vh; display: flex; flex-direction: column;
|
|
@@ -102215,7 +102872,7 @@ var UserManagementModalView = class {
|
|
|
102215
102872
|
background: var(--um-modal-bg); border: 1px solid var(--um-border);
|
|
102216
102873
|
border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
|
|
102217
102874
|
width: 260px; pointer-events: none;
|
|
102218
|
-
font-family: 'Nunito', -
|
|
102875
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
102219
102876
|
}
|
|
102220
102877
|
.um-sync-tooltip-header {
|
|
102221
102878
|
display: flex; align-items: center; gap: 7px;
|
|
@@ -102241,7 +102898,7 @@ var UserManagementModalView = class {
|
|
|
102241
102898
|
background: var(--um-modal-bg); border: 1px solid var(--um-border);
|
|
102242
102899
|
border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.18);
|
|
102243
102900
|
width: 320px; max-height: 340px; overflow-y: auto;
|
|
102244
|
-
font-family: 'Nunito', -
|
|
102901
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
102245
102902
|
}
|
|
102246
102903
|
.um-assign-popup-header {
|
|
102247
102904
|
display: flex; align-items: center; justify-content: space-between;
|
|
@@ -103189,7 +103846,7 @@ var MenuView = class {
|
|
|
103189
103846
|
========================================== */
|
|
103190
103847
|
|
|
103191
103848
|
.myio-menu-root {
|
|
103192
|
-
font-family: '
|
|
103849
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
103193
103850
|
width: 100%;
|
|
103194
103851
|
box-sizing: border-box;
|
|
103195
103852
|
}
|
|
@@ -110304,7 +110961,7 @@ var MODAL_CSS2 = `
|
|
|
110304
110961
|
overflow: hidden;
|
|
110305
110962
|
transform: scale(0.95) translateY(10px);
|
|
110306
110963
|
transition: transform 0.2s ease;
|
|
110307
|
-
font-family:
|
|
110964
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
110308
110965
|
}
|
|
110309
110966
|
|
|
110310
110967
|
/* Two-column layout when device grid is shown */
|
|
@@ -110972,7 +111629,7 @@ var MODAL_CSS2 = `
|
|
|
110972
111629
|
background: rgba(255, 255, 255, 0.2);
|
|
110973
111630
|
}
|
|
110974
111631
|
`;
|
|
110975
|
-
function
|
|
111632
|
+
function injectStyles14() {
|
|
110976
111633
|
if (document.getElementById(CSS_ID5)) return;
|
|
110977
111634
|
const style = document.createElement("style");
|
|
110978
111635
|
style.id = CSS_ID5;
|
|
@@ -110989,7 +111646,7 @@ var FilterModalComponent = class {
|
|
|
110989
111646
|
showDeviceGrid;
|
|
110990
111647
|
deviceSearchQuery = "";
|
|
110991
111648
|
constructor(options) {
|
|
110992
|
-
|
|
111649
|
+
injectStyles14();
|
|
110993
111650
|
this.options = options;
|
|
110994
111651
|
this.themeMode = options.themeMode || "light";
|
|
110995
111652
|
this.selectedCategories = new Set(
|
|
@@ -111893,7 +112550,7 @@ function createCustomerCardV1(params) {
|
|
|
111893
112550
|
}
|
|
111894
112551
|
|
|
111895
112552
|
// src/components/cards/customer-goals/v1.0.0/styles.ts
|
|
111896
|
-
var
|
|
112553
|
+
var STYLE_ID12 = "myio-customer-goals-card-css";
|
|
111897
112554
|
var CSS3 = `
|
|
111898
112555
|
.myio-cgc{
|
|
111899
112556
|
--cgc-surface:#ffffff;
|
|
@@ -111901,9 +112558,10 @@ var CSS3 = `
|
|
|
111901
112558
|
--cgc-text:#1e293b;
|
|
111902
112559
|
--cgc-muted:#64748b;
|
|
111903
112560
|
--cgc-grid:rgba(100,116,139,.18);
|
|
111904
|
-
--cgc-realized:#
|
|
112561
|
+
--cgc-realized:#2563eb;
|
|
111905
112562
|
--cgc-prev:#94a3b8;
|
|
111906
|
-
--cgc-budget:#
|
|
112563
|
+
--cgc-budget:#7c3aed;
|
|
112564
|
+
--cgc-orcado:#f59e0b;
|
|
111907
112565
|
--cgc-good:#16a34a;
|
|
111908
112566
|
--cgc-bad:#ef4444;
|
|
111909
112567
|
display:flex;flex-direction:column;
|
|
@@ -111911,7 +112569,7 @@ var CSS3 = `
|
|
|
111911
112569
|
border:1px solid var(--cgc-border);
|
|
111912
112570
|
border-radius:12px;
|
|
111913
112571
|
overflow:hidden;
|
|
111914
|
-
font-family:'Nunito',sans-serif;
|
|
112572
|
+
font-family:'Nunito', system-ui, sans-serif;
|
|
111915
112573
|
transition:transform .15s ease, box-shadow .15s ease;
|
|
111916
112574
|
}
|
|
111917
112575
|
.myio-cgc[data-theme="dark"]{
|
|
@@ -111933,7 +112591,7 @@ var CSS3 = `
|
|
|
111933
112591
|
.myio-cgc__expand{
|
|
111934
112592
|
position:absolute;top:6px;right:8px;z-index:2;
|
|
111935
112593
|
border:none;background:transparent;cursor:pointer;
|
|
111936
|
-
color:var(--cgc-muted);font:700 13px 'Nunito',sans-serif;line-height:1;
|
|
112594
|
+
color:var(--cgc-muted);font:700 13px 'Nunito', system-ui, sans-serif;line-height:1;
|
|
111937
112595
|
padding:3px 5px;border-radius:6px;opacity:.55;transition:opacity .15s, background .15s;
|
|
111938
112596
|
}
|
|
111939
112597
|
.myio-cgc__expand:hover{opacity:1;background:rgba(124,58,237,.12);color:#7C3AED;}
|
|
@@ -111941,7 +112599,7 @@ var CSS3 = `
|
|
|
111941
112599
|
font-size/margin grandes em h4, cortando o t\xEDtulo dentro do card). */
|
|
111942
112600
|
.myio-cgc h4.myio-cgc__title{
|
|
111943
112601
|
margin:0!important;padding:10px 26px 4px;
|
|
111944
|
-
font:800 14px/1.4 'Nunito',sans-serif!important;color:var(--cgc-text);
|
|
112602
|
+
font:800 14px/1.4 'Nunito', system-ui, sans-serif!important;color:var(--cgc-text);
|
|
111945
112603
|
text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
|
|
111946
112604
|
}
|
|
111947
112605
|
.myio-cgc__title--clickable{cursor:pointer;}
|
|
@@ -111950,56 +112608,64 @@ var CSS3 = `
|
|
|
111950
112608
|
.myio-cgc__chart canvas{width:100%!important;height:100%!important;}
|
|
111951
112609
|
.myio-cgc__chart-empty{
|
|
111952
112610
|
display:flex;align-items:center;justify-content:center;height:100%;
|
|
111953
|
-
font:600 11px 'Nunito',sans-serif;color:var(--cgc-muted);
|
|
112611
|
+
font:600 11px 'Nunito', system-ui, sans-serif;color:var(--cgc-muted);
|
|
111954
112612
|
}
|
|
111955
112613
|
.myio-cgc__totals{
|
|
111956
|
-
display:grid;grid-template-columns:repeat(
|
|
112614
|
+
display:grid;grid-template-columns:repeat(4,1fr);
|
|
111957
112615
|
border-top:1px solid var(--cgc-border);margin-top:6px;
|
|
111958
112616
|
}
|
|
111959
|
-
.myio-
|
|
111960
|
-
.myio-cgc__totals--one{grid-template-columns:1fr;}
|
|
111961
|
-
.myio-cgc__total{padding:6px 4px;text-align:center;border-right:1px solid var(--cgc-border);min-width:0;}
|
|
112617
|
+
.myio-cgc__total{padding:6px 3px;text-align:center;border-right:1px solid var(--cgc-border);min-width:0;}
|
|
111962
112618
|
.myio-cgc__total:last-child{border-right:none;}
|
|
111963
|
-
.myio-cgc__total-label{display:block;font:700
|
|
112619
|
+
.myio-cgc__total-label{display:block;font:700 9.5px 'Nunito', system-ui, sans-serif;line-height:1.35;white-space:nowrap;}
|
|
111964
112620
|
.myio-cgc__total-label--realized{color:var(--cgc-realized);}
|
|
111965
112621
|
.myio-cgc__total-label--prev{color:var(--cgc-prev);}
|
|
111966
112622
|
.myio-cgc__total-label--budget{color:var(--cgc-budget);}
|
|
111967
112623
|
.myio-cgc__total-label--orcado{color:var(--cgc-orcado);}
|
|
111968
112624
|
.myio-cgc__total-value{
|
|
111969
|
-
display:block;font:700
|
|
112625
|
+
display:block;font:700 11px 'Nunito', system-ui, sans-serif;color:var(--cgc-text);
|
|
111970
112626
|
white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
|
|
111971
112627
|
}
|
|
111972
112628
|
.myio-cgc__deltas{
|
|
111973
|
-
display:grid;grid-template-columns:repeat(
|
|
112629
|
+
display:grid;grid-template-columns:repeat(4,1fr);
|
|
111974
112630
|
border-top:1px solid var(--cgc-border);
|
|
111975
112631
|
}
|
|
111976
|
-
.myio-
|
|
111977
|
-
.myio-cgc__deltas--three{grid-template-columns:repeat(3,1fr);}
|
|
111978
|
-
.myio-cgc__delta{padding:6px 4px 8px;text-align:center;border-right:1px solid var(--cgc-border);}
|
|
112632
|
+
.myio-cgc__delta{padding:5px 3px 8px;text-align:center;border-right:1px solid var(--cgc-border);min-width:0;}
|
|
111979
112633
|
.myio-cgc__delta:last-child{border-right:none;}
|
|
111980
|
-
.myio-cgc__delta-label{display:block;font:600
|
|
111981
|
-
|
|
111982
|
-
|
|
111983
|
-
.myio-cgc__delta-
|
|
112634
|
+
.myio-cgc__delta-label{display:block;font:600 9px 'Nunito', system-ui, sans-serif;color:var(--cgc-muted);line-height:1.4;margin-bottom:2px;}
|
|
112635
|
+
.myio-cgc__delta-value{display:block;font:800 11.5px 'Nunito', system-ui, sans-serif;}
|
|
112636
|
+
/* Coluna A-1: dois chips pequenos empilhados (Or\xE7ado vs A-1, Meta vs A-1). */
|
|
112637
|
+
.myio-cgc__delta-dual{display:flex;flex-direction:column;gap:2px;align-items:center;}
|
|
112638
|
+
.myio-cgc__delta-mini{display:inline-flex;align-items:center;gap:3px;line-height:1.2;}
|
|
112639
|
+
.myio-cgc__delta-mini-label{font:700 8px 'Nunito', system-ui, sans-serif;color:var(--cgc-muted);}
|
|
112640
|
+
.myio-cgc__delta-mini .myio-cgc__delta-value{display:inline;font-size:9.5px;}
|
|
111984
112641
|
.myio-cgc__delta-value--good{color:var(--cgc-good);}
|
|
111985
112642
|
.myio-cgc__delta-value--bad{color:var(--cgc-bad);}
|
|
111986
112643
|
.myio-cgc__delta-value--neutral{color:var(--cgc-muted);}
|
|
112644
|
+
/* Linhas "vs <ref>" (col2/3/4): "vs" na cor da coluna, ref na sua cor, + chip.
|
|
112645
|
+
col1 mostra "<ref> SEM DADOS". */
|
|
112646
|
+
.myio-cgc__delta-lines{display:flex;flex-direction:column;gap:2px;align-items:center;}
|
|
112647
|
+
.myio-cgc__vsline{display:inline-flex;align-items:center;gap:3px;line-height:1.25;font:800 8.5px 'Nunito',sans-serif;white-space:nowrap;}
|
|
112648
|
+
.myio-cgc__vs,.myio-cgc__vsref{font-weight:800;}
|
|
112649
|
+
.myio-cgc__vsline .myio-cgc__delta-value{font-size:9.5px;}
|
|
112650
|
+
.myio-cgc__nodata{color:var(--cgc-muted);font-weight:600;font-size:8px;letter-spacing:.3px;}
|
|
111987
112651
|
`;
|
|
111988
112652
|
function injectCustomerGoalsCardStyles() {
|
|
111989
112653
|
if (typeof document === "undefined") return;
|
|
111990
|
-
if (document.getElementById(
|
|
112654
|
+
if (document.getElementById(STYLE_ID12)) return;
|
|
111991
112655
|
const tag = document.createElement("style");
|
|
111992
|
-
tag.id =
|
|
112656
|
+
tag.id = STYLE_ID12;
|
|
111993
112657
|
tag.textContent = CSS3;
|
|
111994
112658
|
document.head.appendChild(tag);
|
|
111995
112659
|
}
|
|
111996
112660
|
|
|
111997
112661
|
// src/components/cards/customer-goals/v1.0.0/CustomerGoalsCard.ts
|
|
111998
112662
|
var COLORS = {
|
|
111999
|
-
realized: "#
|
|
112663
|
+
realized: "#2563eb",
|
|
112664
|
+
// Realizado (ano corrente) — AZUL fixo (não segue mais o accent do host)
|
|
112000
112665
|
prev: "#94a3b8",
|
|
112001
|
-
|
|
112002
|
-
|
|
112666
|
+
// A-1 (ano anterior) — CINZA
|
|
112667
|
+
budget: "#7c3aed",
|
|
112668
|
+
// Meta (adjustedValue) — ROXO tracejado
|
|
112003
112669
|
orcado: "#f59e0b"
|
|
112004
112670
|
// Orçado (value cru) — LARANJA tracejado (também a linha "Orçado" legada)
|
|
112005
112671
|
};
|
|
@@ -112171,7 +112837,7 @@ var CustomerGoalsCard = class {
|
|
|
112171
112837
|
u = "MWh";
|
|
112172
112838
|
}
|
|
112173
112839
|
}
|
|
112174
|
-
const txt = n.toLocaleString(this.locale, {
|
|
112840
|
+
const txt = n.toLocaleString(this.locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
112175
112841
|
return `${txt} ${u}`;
|
|
112176
112842
|
}
|
|
112177
112843
|
/** Compact axis ticks like the reference ("1M", "2M", "500k") */
|
|
@@ -112183,16 +112849,22 @@ var CustomerGoalsCard = class {
|
|
|
112183
112849
|
if (abs >= 1e3) return `${num(v / 1e3)}k`;
|
|
112184
112850
|
return num(v);
|
|
112185
112851
|
}
|
|
112186
|
-
|
|
112852
|
+
fmtPct(pct) {
|
|
112853
|
+
return `${Math.abs(pct).toLocaleString(this.locale, {
|
|
112854
|
+
minimumFractionDigits: 1,
|
|
112855
|
+
maximumFractionDigits: 1
|
|
112856
|
+
})}%`;
|
|
112857
|
+
}
|
|
112858
|
+
/**
|
|
112859
|
+
* Variance vs TARGET (Orçado/Meta): consumption BELOW the reference is GOOD
|
|
112860
|
+
* (↓ green — under budget); ABOVE is bad (↑ red — over budget).
|
|
112861
|
+
*/
|
|
112187
112862
|
deltaBadge(realized, reference) {
|
|
112188
112863
|
if (realized == null || reference == null || reference === 0) {
|
|
112189
112864
|
return '<span class="myio-cgc__delta-value myio-cgc__delta-value--neutral">\u2014</span>';
|
|
112190
112865
|
}
|
|
112191
112866
|
const pct = (realized - reference) / reference * 100;
|
|
112192
|
-
const txt =
|
|
112193
|
-
minimumFractionDigits: 2,
|
|
112194
|
-
maximumFractionDigits: 2
|
|
112195
|
-
})}%`;
|
|
112867
|
+
const txt = this.fmtPct(pct);
|
|
112196
112868
|
if (pct > 0) {
|
|
112197
112869
|
return `<span class="myio-cgc__delta-value myio-cgc__delta-value--bad">↑ ${txt}</span>`;
|
|
112198
112870
|
}
|
|
@@ -112201,6 +112873,25 @@ var CustomerGoalsCard = class {
|
|
|
112201
112873
|
}
|
|
112202
112874
|
return `<span class="myio-cgc__delta-value myio-cgc__delta-value--neutral">${txt}</span>`;
|
|
112203
112875
|
}
|
|
112876
|
+
/**
|
|
112877
|
+
* Growth vs LAST YEAR (A-1): a value ABOVE the reference GREW (↑ green — bom);
|
|
112878
|
+
* below SHRANK (↓ red). Inverted semantics of deltaBadge — used pelas colunas
|
|
112879
|
+
* A-1/Realizado onde "subir vs ano anterior" é positivo.
|
|
112880
|
+
*/
|
|
112881
|
+
growthBadge(current, reference) {
|
|
112882
|
+
if (current == null || reference == null || reference === 0) {
|
|
112883
|
+
return '<span class="myio-cgc__delta-value myio-cgc__delta-value--neutral">\u2014</span>';
|
|
112884
|
+
}
|
|
112885
|
+
const pct = (current - reference) / reference * 100;
|
|
112886
|
+
const txt = this.fmtPct(pct);
|
|
112887
|
+
if (pct > 0) {
|
|
112888
|
+
return `<span class="myio-cgc__delta-value myio-cgc__delta-value--good">↑ ${txt}</span>`;
|
|
112889
|
+
}
|
|
112890
|
+
if (pct < 0) {
|
|
112891
|
+
return `<span class="myio-cgc__delta-value myio-cgc__delta-value--bad">↓ ${txt}</span>`;
|
|
112892
|
+
}
|
|
112893
|
+
return `<span class="myio-cgc__delta-value myio-cgc__delta-value--neutral">${txt}</span>`;
|
|
112894
|
+
}
|
|
112204
112895
|
// ── Rendering ─────────────────────────────────────────────────────────────
|
|
112205
112896
|
esc(s) {
|
|
112206
112897
|
return String(s ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
@@ -112211,62 +112902,62 @@ var CustomerGoalsCard = class {
|
|
|
112211
112902
|
const hasPrev = !!s.previousYear;
|
|
112212
112903
|
const hasBudget = !!s.budget || !!(s.budgetBreakdown && s.budgetBreakdown.length);
|
|
112213
112904
|
const hasOrcado = this.hasRawOrcado();
|
|
112214
|
-
const
|
|
112215
|
-
|
|
112216
|
-
|
|
112217
|
-
|
|
112218
|
-
|
|
112219
|
-
|
|
112905
|
+
const t = totals;
|
|
112906
|
+
const orcadoVal = hasOrcado ? t.orcado : hasBudget ? t.budget : null;
|
|
112907
|
+
const hasMetaCol = hasOrcado && hasBudget;
|
|
112908
|
+
const valueCell = (cls, label, total, val) => `<div class="myio-cgc__total"><span class="myio-cgc__total-label myio-cgc__total-label--${cls}">${label}</span><span class="myio-cgc__total-value" data-total="${total}">${this.fmtQty(val)}</span></div>`;
|
|
112909
|
+
const vsLine = (vsVar, refLabel, refVar, badge) => `<span class="myio-cgc__vsline"><span class="myio-cgc__vs" style="color:var(${vsVar})">vs</span> <span class="myio-cgc__vsref" style="color:var(${refVar})">${refLabel}</span>${badge}</span>`;
|
|
112910
|
+
const noDataLine = (refVar, refLabel) => `<span class="myio-cgc__vsline"><span class="myio-cgc__vsref" style="color:var(${refVar})">${refLabel}</span> <span class="myio-cgc__nodata">SEM DADOS</span></span>`;
|
|
112911
|
+
const deltaLines = (lines) => `<div class="myio-cgc__delta"><div class="myio-cgc__delta-lines">${lines.join("")}</div></div>`;
|
|
112912
|
+
const valueCells = [];
|
|
112913
|
+
const deltaCells = [];
|
|
112914
|
+
let anyDelta = false;
|
|
112220
112915
|
if (hasPrev) {
|
|
112221
|
-
|
|
112222
|
-
|
|
112223
|
-
|
|
112224
|
-
|
|
112225
|
-
|
|
112226
|
-
|
|
112227
|
-
|
|
112228
|
-
|
|
112229
|
-
|
|
112230
|
-
|
|
112231
|
-
|
|
112232
|
-
|
|
112233
|
-
<span class="myio-cgc__total-label myio-cgc__total-label--budget">Orçado</span>
|
|
112234
|
-
<span class="myio-cgc__total-value" data-total="budget">${this.fmtQty(totals.budget)}</span>
|
|
112235
|
-
</div>`);
|
|
112236
|
-
}
|
|
112237
|
-
const totalsMod = totalCells.length === 1 ? " myio-cgc__totals--one" : totalCells.length === 2 ? " myio-cgc__totals--two" : "";
|
|
112238
|
-
let deltasHtml = "";
|
|
112239
|
-
const dcell = (labelHtml, badgeHtml2) => `<div class="myio-cgc__delta"><span class="myio-cgc__delta-label">${labelHtml}</span>${badgeHtml2}</div>`;
|
|
112240
|
-
if (hasOrcado) {
|
|
112241
|
-
const cells = [];
|
|
112242
|
-
if (hasPrev) {
|
|
112243
|
-
cells.push(dcell("vs A-1", this.deltaBadge(totals.realized, totals.previousYear)));
|
|
112244
|
-
cells.push(dcell("vs Orçado", this.deltaBadge(totals.realized, totals.orcado)));
|
|
112245
|
-
} else {
|
|
112246
|
-
cells.push(dcell("vs Orçado", this.deltaBadge(totals.realized, totals.orcado)));
|
|
112247
|
-
}
|
|
112248
|
-
cells.push(
|
|
112249
|
-
`<div class="myio-cgc__delta"><span class="myio-cgc__delta-label" data-total="budget">${hasBudget ? `Meta ${this.fmtQty(totals.budget)}` : "Meta"}</span>${hasBudget ? this.deltaBadge(totals.realized, totals.budget) : ""}</div>`
|
|
112916
|
+
valueCells.push(valueCell("prev", "A-1", "prev", t.previousYear));
|
|
112917
|
+
const lines = [];
|
|
112918
|
+
if (hasOrcado || hasBudget) lines.push(noDataLine("--cgc-orcado", "Orç."));
|
|
112919
|
+
if (hasMetaCol) lines.push(noDataLine("--cgc-budget", "Meta"));
|
|
112920
|
+
if (lines.length) anyDelta = true;
|
|
112921
|
+
deltaCells.push(deltaLines(lines));
|
|
112922
|
+
}
|
|
112923
|
+
valueCells.push(valueCell("realized", "Realizado", "realized", t.realized));
|
|
112924
|
+
if (hasPrev) {
|
|
112925
|
+
anyDelta = true;
|
|
112926
|
+
deltaCells.push(
|
|
112927
|
+
deltaLines([vsLine("--cgc-realized", "A-1", "--cgc-prev", this.growthBadge(t.realized, t.previousYear))])
|
|
112250
112928
|
);
|
|
112251
|
-
const mod = cells.length === 3 ? " myio-cgc__deltas--three" : cells.length === 1 ? " myio-cgc__deltas--one" : "";
|
|
112252
|
-
deltasHtml = `<div class="myio-cgc__deltas${mod}">${cells.join("")}</div>`;
|
|
112253
112929
|
} else {
|
|
112254
|
-
|
|
112255
|
-
|
|
112256
|
-
|
|
112257
|
-
|
|
112258
|
-
|
|
112259
|
-
|
|
112260
|
-
|
|
112261
|
-
|
|
112930
|
+
deltaCells.push(deltaLines([]));
|
|
112931
|
+
}
|
|
112932
|
+
if (hasOrcado || hasBudget) {
|
|
112933
|
+
anyDelta = true;
|
|
112934
|
+
valueCells.push(valueCell("orcado", "Orçado", hasOrcado ? "orcado" : "budget", orcadoVal));
|
|
112935
|
+
const lines = [
|
|
112936
|
+
vsLine("--cgc-orcado", "Realizado", "--cgc-realized", this.deltaBadge(t.realized, orcadoVal))
|
|
112937
|
+
];
|
|
112938
|
+
if (hasPrev) lines.push(vsLine("--cgc-orcado", "A-1", "--cgc-prev", this.growthBadge(orcadoVal, t.previousYear)));
|
|
112939
|
+
deltaCells.push(deltaLines(lines));
|
|
112940
|
+
}
|
|
112941
|
+
if (hasMetaCol) {
|
|
112942
|
+
anyDelta = true;
|
|
112943
|
+
valueCells.push(valueCell("budget", "Meta", "budget", t.budget));
|
|
112944
|
+
const lines = [
|
|
112945
|
+
vsLine("--cgc-budget", "Realizado", "--cgc-realized", this.deltaBadge(t.realized, t.budget))
|
|
112946
|
+
];
|
|
112947
|
+
if (hasPrev) lines.push(vsLine("--cgc-budget", "A-1", "--cgc-prev", this.growthBadge(t.budget, t.previousYear)));
|
|
112948
|
+
deltaCells.push(deltaLines(lines));
|
|
112262
112949
|
}
|
|
112950
|
+
const nCols = valueCells.length;
|
|
112951
|
+
const gridStyle = `grid-template-columns:repeat(${nCols},1fr);`;
|
|
112952
|
+
const totalsHtml = `<div class="myio-cgc__totals" style="${gridStyle}">${valueCells.join("")}</div>`;
|
|
112953
|
+
const deltasHtml = anyDelta ? `<div class="myio-cgc__deltas" style="${gridStyle}">${deltaCells.join("")}</div>` : "";
|
|
112263
112954
|
const clickable = typeof this.params.onClick === "function";
|
|
112264
112955
|
const expandable = this.params.expandable !== false;
|
|
112265
112956
|
this.el.innerHTML = `
|
|
112266
112957
|
${expandable ? `<button type="button" class="myio-cgc__expand" title="${this.expanded ? "Recolher" : "Expandir"}">${this.expanded ? "\u2715" : "\u26F6"}</button>` : ""}
|
|
112267
112958
|
<h4 class="myio-cgc__title${clickable ? " myio-cgc__title--clickable" : ""}" title="${this.esc(this.params.title)}">${this.esc(this.params.title)}</h4>
|
|
112268
112959
|
<div class="myio-cgc__chart"><canvas></canvas></div>
|
|
112269
|
-
|
|
112960
|
+
${totalsHtml}
|
|
112270
112961
|
${deltasHtml}
|
|
112271
112962
|
`;
|
|
112272
112963
|
if (clickable) {
|
|
@@ -112599,7 +113290,7 @@ var EnergyPanelController = class {
|
|
|
112599
113290
|
// src/components/energy-panel/styles.ts
|
|
112600
113291
|
var ENERGY_PANEL_STYLES = `
|
|
112601
113292
|
.energy-panel-wrap {
|
|
112602
|
-
font-family: '
|
|
113293
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
112603
113294
|
color: #1e293b;
|
|
112604
113295
|
background-color: #f8fafc;
|
|
112605
113296
|
padding: 16px;
|
|
@@ -113569,7 +114260,7 @@ var WaterPanelController = class {
|
|
|
113569
114260
|
// src/components/water-panel/styles.ts
|
|
113570
114261
|
var WATER_PANEL_STYLES = `
|
|
113571
114262
|
.water-panel-wrap {
|
|
113572
|
-
font-family: '
|
|
114263
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
113573
114264
|
color: #1e293b;
|
|
113574
114265
|
background-color: #f8fafc;
|
|
113575
114266
|
padding: 16px;
|
|
@@ -114751,7 +115442,7 @@ var HEADER_SHOPPING_STYLES = `
|
|
|
114751
115442
|
|
|
114752
115443
|
/* ===== Base ===== */
|
|
114753
115444
|
.tbx-toolbar {
|
|
114754
|
-
font-family: 'Nunito',
|
|
115445
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
114755
115446
|
color: var(--tbx-text);
|
|
114756
115447
|
background: var(--tbx-bg);
|
|
114757
115448
|
width: 100%;
|
|
@@ -116146,7 +116837,7 @@ var MENU_SHOPPING_STYLES = `
|
|
|
116146
116837
|
height: 100%;
|
|
116147
116838
|
padding: 16px 0;
|
|
116148
116839
|
box-sizing: border-box;
|
|
116149
|
-
font-family: 'Nunito',
|
|
116840
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
116150
116841
|
position: relative;
|
|
116151
116842
|
background: var(--bg);
|
|
116152
116843
|
color: var(--text);
|
|
@@ -117427,8 +118118,7 @@ var TELEMETRY_GRID_SHOPPING_STYLES = `
|
|
|
117427
118118
|
--brand: #5B2EBC;
|
|
117428
118119
|
--brand-ghost: rgba(91, 46, 188, 0.08);
|
|
117429
118120
|
--bg-soft: #f7fbff;
|
|
117430
|
-
--font-ui: 'Nunito',
|
|
117431
|
-
Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
118121
|
+
--font-ui: 'Nunito', system-ui, sans-serif;
|
|
117432
118122
|
}
|
|
117433
118123
|
|
|
117434
118124
|
/* Light mode explicit */
|
|
@@ -117782,8 +118472,7 @@ var TELEMETRY_GRID_SHOPPING_STYLES = `
|
|
|
117782
118472
|
--brand: #5B2EBC;
|
|
117783
118473
|
--brand-ghost: rgba(91, 46, 188, 0.08);
|
|
117784
118474
|
--bg-soft: #f7fbff;
|
|
117785
|
-
--font-ui: 'Nunito',
|
|
117786
|
-
Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
118475
|
+
--font-ui: 'Nunito', system-ui, sans-serif;
|
|
117787
118476
|
|
|
117788
118477
|
position: fixed;
|
|
117789
118478
|
inset: 0;
|
|
@@ -118365,7 +119054,7 @@ var TELEMETRY_GRID_SHOPPING_STYLES = `
|
|
|
118365
119054
|
text-overflow: ellipsis;
|
|
118366
119055
|
}
|
|
118367
119056
|
`;
|
|
118368
|
-
function
|
|
119057
|
+
function injectStyles15(_container) {
|
|
118369
119058
|
const styleId = "telemetry-grid-shopping-styles";
|
|
118370
119059
|
if (document.getElementById(styleId)) {
|
|
118371
119060
|
return;
|
|
@@ -118413,7 +119102,7 @@ var TelemetryGridShoppingView = class {
|
|
|
118413
119102
|
// Render
|
|
118414
119103
|
// =========================================================================
|
|
118415
119104
|
render() {
|
|
118416
|
-
|
|
119105
|
+
injectStyles15(this.root);
|
|
118417
119106
|
this.root.innerHTML = this.buildHTML();
|
|
118418
119107
|
this.cacheElements();
|
|
118419
119108
|
this.bindEvents();
|
|
@@ -119466,7 +120155,7 @@ var TELEMETRY_INFO_SHOPPING_STYLES = `
|
|
|
119466
120155
|
padding: 12px !important;
|
|
119467
120156
|
background: var(--tis-bg) !important;
|
|
119468
120157
|
color: var(--tis-text) !important;
|
|
119469
|
-
font-family: 'Nunito',
|
|
120158
|
+
font-family: 'Nunito', system-ui, sans-serif !important;
|
|
119470
120159
|
box-sizing: border-box !important;
|
|
119471
120160
|
border-radius: 12px !important;
|
|
119472
120161
|
overflow: auto !important;
|
|
@@ -120084,7 +120773,7 @@ var TELEMETRY_INFO_SHOPPING_STYLES = `
|
|
|
120084
120773
|
}
|
|
120085
120774
|
}
|
|
120086
120775
|
`;
|
|
120087
|
-
function
|
|
120776
|
+
function injectStyles16(_container) {
|
|
120088
120777
|
const styleId = "telemetry-info-shopping-styles-v2";
|
|
120089
120778
|
if (document.getElementById(styleId)) {
|
|
120090
120779
|
return;
|
|
@@ -120144,7 +120833,7 @@ var TelemetryInfoShoppingView = class _TelemetryInfoShoppingView {
|
|
|
120144
120833
|
// Render
|
|
120145
120834
|
// =========================================================================
|
|
120146
120835
|
render() {
|
|
120147
|
-
|
|
120836
|
+
injectStyles16(this.root);
|
|
120148
120837
|
this.root.innerHTML = this.buildHTML();
|
|
120149
120838
|
this.cacheElements();
|
|
120150
120839
|
this.bindEvents();
|
|
@@ -121461,7 +122150,7 @@ var OPERATIONAL_GENERAL_LIST_STYLES = `
|
|
|
121461
122150
|
display: flex;
|
|
121462
122151
|
flex-direction: column;
|
|
121463
122152
|
background: transparent;
|
|
121464
|
-
font-family:
|
|
122153
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
121465
122154
|
}
|
|
121466
122155
|
|
|
121467
122156
|
/* ====== LIGHT/DARK THEME MODE ====== */
|
|
@@ -123896,7 +124585,7 @@ var DEVICE_OPERATIONAL_CARD_STYLES = `
|
|
|
123896
124585
|
--myio-chip-not-installed-bg: #e9d5ff;
|
|
123897
124586
|
--myio-chip-not-installed-fg: #7c3aed;
|
|
123898
124587
|
|
|
123899
|
-
font-family: '
|
|
124588
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
123900
124589
|
background: var(--alarms-bg-primary);
|
|
123901
124590
|
color: var(--alarms-text-primary);
|
|
123902
124591
|
height: 100%;
|
|
@@ -125548,7 +126237,7 @@ var DEVICE_OPERATIONAL_CARD_GRID_STYLES = `
|
|
|
125548
126237
|
--grid-accent: #8b5cf6;
|
|
125549
126238
|
--grid-accent-light: rgba(139, 92, 246, 0.1);
|
|
125550
126239
|
|
|
125551
|
-
font-family: '
|
|
126240
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
125552
126241
|
background: var(--grid-bg-primary);
|
|
125553
126242
|
color: var(--grid-text-primary);
|
|
125554
126243
|
height: 100%;
|
|
@@ -128891,10 +129580,10 @@ var AlarmsNotificationsPanelView = class {
|
|
|
128891
129580
|
const renderListPanel = (group, items, sel) => {
|
|
128892
129581
|
if (items.length === 0) return '<div class="afm-empty">Nenhum item encontrado</div>';
|
|
128893
129582
|
return items.map((item) => {
|
|
128894
|
-
const
|
|
129583
|
+
const esc6 = this.esc(item);
|
|
128895
129584
|
return `<label class="afm-check-item">
|
|
128896
|
-
<input type="checkbox" class="afm-checkbox" data-group="${group}" data-value="${
|
|
128897
|
-
<span class="afm-check-label">${
|
|
129585
|
+
<input type="checkbox" class="afm-checkbox" data-group="${group}" data-value="${esc6}"${sel.has(item) ? " checked" : ""}>
|
|
129586
|
+
<span class="afm-check-label">${esc6}</span>
|
|
128898
129587
|
</label>`;
|
|
128899
129588
|
}).join("");
|
|
128900
129589
|
};
|
|
@@ -130378,7 +131067,7 @@ var OPERATIONAL_DASHBOARD_STYLES = `
|
|
|
130378
131067
|
width: 100%;
|
|
130379
131068
|
background: transparent;
|
|
130380
131069
|
color: var(--ink-1, #f1f5f9);
|
|
130381
|
-
font-family:
|
|
131070
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
130382
131071
|
overflow: auto;
|
|
130383
131072
|
padding: 0;
|
|
130384
131073
|
box-sizing: border-box;
|
|
@@ -133931,7 +134620,7 @@ var BAS_DASHBOARD_STYLES = `
|
|
|
133931
134620
|
flex-direction: column;
|
|
133932
134621
|
width: 100%;
|
|
133933
134622
|
height: 100%;
|
|
133934
|
-
font-family: '
|
|
134623
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
133935
134624
|
overflow: hidden;
|
|
133936
134625
|
background: var(--bas-bg-main);
|
|
133937
134626
|
color: var(--bas-text-primary);
|
|
@@ -134719,7 +135408,7 @@ function injectFancoilRemoteStyles() {
|
|
|
134719
135408
|
background: #BBB8A6;
|
|
134720
135409
|
border-radius: 18px;
|
|
134721
135410
|
padding: 12px;
|
|
134722
|
-
font-family: '
|
|
135411
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
134723
135412
|
color: #18446C;
|
|
134724
135413
|
display: flex;
|
|
134725
135414
|
flex-direction: column;
|
|
@@ -135009,7 +135698,7 @@ function injectFancoilRemoteStyles() {
|
|
|
135009
135698
|
text-align: center;
|
|
135010
135699
|
max-width: 360px;
|
|
135011
135700
|
width: 90%;
|
|
135012
|
-
font-family: '
|
|
135701
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
135013
135702
|
color: #222;
|
|
135014
135703
|
}
|
|
135015
135704
|
|
|
@@ -135539,7 +136228,7 @@ function injectSolenoidControlStyles() {
|
|
|
135539
136228
|
justify-content: center;
|
|
135540
136229
|
gap: 5%;
|
|
135541
136230
|
margin: 0;
|
|
135542
|
-
font-family: '
|
|
136231
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
135543
136232
|
color: #18446C;
|
|
135544
136233
|
box-sizing: border-box;
|
|
135545
136234
|
overflow: hidden;
|
|
@@ -135660,7 +136349,7 @@ function injectSolenoidControlStyles() {
|
|
|
135660
136349
|
text-align: center;
|
|
135661
136350
|
max-width: 90%;
|
|
135662
136351
|
width: 300px;
|
|
135663
|
-
font-family: '
|
|
136352
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
135664
136353
|
z-index: 2147483647;
|
|
135665
136354
|
color: #222;
|
|
135666
136355
|
}
|
|
@@ -136053,7 +136742,7 @@ function injectSwitchControlStyles() {
|
|
|
136053
136742
|
border-radius: 12px;
|
|
136054
136743
|
background: #ffffff;
|
|
136055
136744
|
border: 1px solid #e0e0e0;
|
|
136056
|
-
font-family:
|
|
136745
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
136057
136746
|
transition: all 0.2s ease;
|
|
136058
136747
|
cursor: pointer;
|
|
136059
136748
|
user-select: none;
|
|
@@ -136616,7 +137305,7 @@ function injectActionButtonStyles() {
|
|
|
136616
137305
|
gap: 8px;
|
|
136617
137306
|
border: none;
|
|
136618
137307
|
cursor: pointer;
|
|
136619
|
-
font-family: '
|
|
137308
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
136620
137309
|
font-weight: 600;
|
|
136621
137310
|
white-space: nowrap;
|
|
136622
137311
|
transition: all 0.2s ease;
|
|
@@ -136942,7 +137631,7 @@ var SCHEDULING_SHARED_STYLES = `
|
|
|
136942
137631
|
display: flex;
|
|
136943
137632
|
flex-direction: column;
|
|
136944
137633
|
overflow-y: auto;
|
|
136945
|
-
font-family:
|
|
137634
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
136946
137635
|
color: #e0e0e0;
|
|
136947
137636
|
box-sizing: border-box;
|
|
136948
137637
|
}
|
|
@@ -137464,7 +138153,7 @@ var SCHEDULING_SHARED_STYLES = `
|
|
|
137464
138153
|
text-align: center;
|
|
137465
138154
|
max-width: 360px;
|
|
137466
138155
|
width: 100%;
|
|
137467
|
-
font-family: sans-serif;
|
|
138156
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
137468
138157
|
color: #222 !important;
|
|
137469
138158
|
}
|
|
137470
138159
|
|
|
@@ -139122,7 +139811,7 @@ var STYLES = `
|
|
|
139122
139811
|
--dgv6-card: #0f1d30;
|
|
139123
139812
|
--dgv6-bg: rgba(11, 18, 32, 0.65);
|
|
139124
139813
|
--dgv6-accent: #38bdf8;
|
|
139125
|
-
--dgv6-font:
|
|
139814
|
+
--dgv6-font: 'Nunito', system-ui, sans-serif;
|
|
139126
139815
|
|
|
139127
139816
|
display: flex;
|
|
139128
139817
|
flex-direction: column;
|
|
@@ -139320,7 +140009,7 @@ var STYLES = `
|
|
|
139320
140009
|
color: var(--dgv6-ink-2);
|
|
139321
140010
|
}
|
|
139322
140011
|
`;
|
|
139323
|
-
function
|
|
140012
|
+
function injectStyles17() {
|
|
139324
140013
|
if (document.getElementById(CSS_ID6)) return;
|
|
139325
140014
|
const style = document.createElement("style");
|
|
139326
140015
|
style.id = CSS_ID6;
|
|
@@ -139359,7 +140048,7 @@ var DeviceGridV6View = class {
|
|
|
139359
140048
|
// Render
|
|
139360
140049
|
// =========================================================================
|
|
139361
140050
|
render() {
|
|
139362
|
-
|
|
140051
|
+
injectStyles17();
|
|
139363
140052
|
this.root.innerHTML = this.buildHTML();
|
|
139364
140053
|
this.cacheElements();
|
|
139365
140054
|
this.bindEvents();
|
|
@@ -139837,7 +140526,7 @@ function injectOnOffDeviceModalStyles() {
|
|
|
139837
140526
|
flex-direction: row;
|
|
139838
140527
|
width: 100%;
|
|
139839
140528
|
max-width: 100%;
|
|
139840
|
-
font-family: '
|
|
140529
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
139841
140530
|
box-sizing: border-box;
|
|
139842
140531
|
overflow: hidden;
|
|
139843
140532
|
}
|
|
@@ -140736,7 +141425,7 @@ function injectOnOffTimelineStyles() {
|
|
|
140736
141425
|
|
|
140737
141426
|
.${ONOFF_TIMELINE_CSS_PREFIX} {
|
|
140738
141427
|
width: 100%;
|
|
140739
|
-
font-family: '
|
|
141428
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
140740
141429
|
box-sizing: border-box;
|
|
140741
141430
|
}
|
|
140742
141431
|
|
|
@@ -141729,7 +142418,7 @@ function exportTimelineToPDF(data, labels = {}, locale = "pt-BR", opts = {}) {
|
|
|
141729
142418
|
const docTitle = buildActivationReportTitle(deviceName, opts.customerName);
|
|
141730
142419
|
const issuedAt = formatIssuedAt(/* @__PURE__ */ new Date(), locale);
|
|
141731
142420
|
const utilization = data.totalHours > 0 ? (data.totalOnMinutes / (data.totalHours * 60) * 100).toFixed(1) : "0.0";
|
|
141732
|
-
const
|
|
142421
|
+
const esc6 = (s) => String(s).replace(/[&<>"]/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[c]);
|
|
141733
142422
|
const htmlContent = `
|
|
141734
142423
|
<!DOCTYPE html>
|
|
141735
142424
|
<html lang="pt-BR">
|
|
@@ -141739,7 +142428,7 @@ function exportTimelineToPDF(data, labels = {}, locale = "pt-BR", opts = {}) {
|
|
|
141739
142428
|
<style>
|
|
141740
142429
|
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');
|
|
141741
142430
|
* { box-sizing: border-box; }
|
|
141742
|
-
body { font-family: 'Nunito',
|
|
142431
|
+
body { font-family: 'Nunito', system-ui, sans-serif; margin: 0; padding: 32px 40px; color: #1f2937; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
|
|
141743
142432
|
|
|
141744
142433
|
.report-header { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); color: #fff; border-radius: 14px; padding: 24px 28px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
|
|
141745
142434
|
.report-header .brand { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; opacity: .85; }
|
|
@@ -141781,14 +142470,14 @@ function exportTimelineToPDF(data, labels = {}, locale = "pt-BR", opts = {}) {
|
|
|
141781
142470
|
<div class="brand">MyIO BAS</div>
|
|
141782
142471
|
<h1>Relat\xF3rio de Acionamentos</h1>
|
|
141783
142472
|
<div class="meta">
|
|
141784
|
-
<div><b>Dispositivo:</b> ${
|
|
142473
|
+
<div><b>Dispositivo:</b> ${esc6(deviceName)}</div>
|
|
141785
142474
|
<div><b>Per\xEDodo:</b> ${periodStart} \u2014 ${periodEnd}</div>
|
|
141786
142475
|
</div>
|
|
141787
142476
|
</div>
|
|
141788
142477
|
${customerName ? `
|
|
141789
142478
|
<div class="customer-badge">
|
|
141790
142479
|
<div class="label">Cliente</div>
|
|
141791
|
-
<div class="value">${
|
|
142480
|
+
<div class="value">${esc6(customerName)}</div>
|
|
141792
142481
|
</div>` : ""}
|
|
141793
142482
|
</div>
|
|
141794
142483
|
|
|
@@ -141799,7 +142488,7 @@ function exportTimelineToPDF(data, labels = {}, locale = "pt-BR", opts = {}) {
|
|
|
141799
142488
|
</div>
|
|
141800
142489
|
<div class="summary-card accent-green">
|
|
141801
142490
|
<div class="summary-value">${formatDurationMinutes(data.totalOnMinutes)}</div>
|
|
141802
|
-
<div class="summary-label">Tempo ${
|
|
142491
|
+
<div class="summary-label">Tempo ${esc6(labelOn)}</div>
|
|
141803
142492
|
</div>
|
|
141804
142493
|
<div class="summary-card accent-amber">
|
|
141805
142494
|
<div class="summary-value">${utilization}%</div>
|
|
@@ -141827,7 +142516,7 @@ function exportTimelineToPDF(data, labels = {}, locale = "pt-BR", opts = {}) {
|
|
|
141827
142516
|
<tr>
|
|
141828
142517
|
<td>${formatDateForExport(seg.startTime, locale)}</td>
|
|
141829
142518
|
<td>${formatDateForExport(seg.endTime, locale)}</td>
|
|
141830
|
-
<td><span class="pill ${seg.state === "on" ? "pill-on" : "pill-off"}">${seg.state === "on" ?
|
|
142519
|
+
<td><span class="pill ${seg.state === "on" ? "pill-on" : "pill-off"}">${seg.state === "on" ? esc6(labelOn) : esc6(labelOff)}</span></td>
|
|
141831
142520
|
<td>${formatDurationMinutes(seg.durationMinutes)}</td>
|
|
141832
142521
|
<td>${seg.source === "manual" ? "Manual" : seg.source === "schedule" ? "Agendamento" : seg.source === "automation" ? "Automa\xE7\xE3o" : "Desconhecido"}</td>
|
|
141833
142522
|
</tr>
|
|
@@ -141836,7 +142525,7 @@ function exportTimelineToPDF(data, labels = {}, locale = "pt-BR", opts = {}) {
|
|
|
141836
142525
|
</table>
|
|
141837
142526
|
|
|
141838
142527
|
<div class="footer">
|
|
141839
|
-
<span class="issued">Emitido em ${issuedAt}</span>${customerName ? ` · ${
|
|
142528
|
+
<span class="issued">Emitido em ${issuedAt}</span>${customerName ? ` · ${esc6(customerName)}` : ""} · <span class="brand">MyIO BAS</span>
|
|
141840
142529
|
</div>
|
|
141841
142530
|
</body>
|
|
141842
142531
|
</html>
|
|
@@ -141872,7 +142561,7 @@ function exportSchedulesToPDF(schedules, deviceName, locale = "pt-BR") {
|
|
|
141872
142561
|
<meta charset="UTF-8">
|
|
141873
142562
|
<title>Agendamentos - ${deviceName}</title>
|
|
141874
142563
|
<style>
|
|
141875
|
-
body { font-family: '
|
|
142564
|
+
body { font-family: 'Nunito', system-ui, sans-serif; margin: 40px; color: #1f2937; }
|
|
141876
142565
|
h1 { color: #3b82f6; font-size: 24px; margin-bottom: 8px; }
|
|
141877
142566
|
.subtitle { color: #6b7280; font-size: 14px; margin-bottom: 24px; }
|
|
141878
142567
|
.schedule-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin-bottom: 12px; }
|
|
@@ -142623,7 +143312,7 @@ var OnOffDeviceModalView = class {
|
|
|
142623
143312
|
position: relative; background: #1f2937; color: #f9fafb;
|
|
142624
143313
|
border-radius: 12px; padding: 24px 28px; min-width: 280px; max-width: 380px;
|
|
142625
143314
|
box-shadow: 0 20px 60px rgba(0,0,0,0.5); text-align: center;
|
|
142626
|
-
font-family: sans-serif;
|
|
143315
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
142627
143316
|
`;
|
|
142628
143317
|
const msg = document.createElement("p");
|
|
142629
143318
|
msg.style.cssText = "margin: 0 0 20px; font-size: 15px; line-height: 1.5;";
|
|
@@ -143067,7 +143756,7 @@ var OnOffDeviceModalController = class {
|
|
|
143067
143756
|
display: flex;
|
|
143068
143757
|
flex-direction: column;
|
|
143069
143758
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
143070
|
-
font-family: '
|
|
143759
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
143071
143760
|
}
|
|
143072
143761
|
|
|
143073
143762
|
.${ON_OFF_MODAL_CSS_PREFIX}-content.maximized {
|
|
@@ -143419,7 +144108,7 @@ function injectAmbienteModalStyles() {
|
|
|
143419
144108
|
align-items: center;
|
|
143420
144109
|
justify-content: center;
|
|
143421
144110
|
z-index: 10000;
|
|
143422
|
-
font-family:
|
|
144111
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
143423
144112
|
opacity: 0;
|
|
143424
144113
|
visibility: hidden;
|
|
143425
144114
|
transition: opacity 0.2s ease, visibility 0.2s ease;
|
|
@@ -144377,7 +145066,7 @@ function injectAmbienteGroupModalStyles() {
|
|
|
144377
145066
|
align-items: center;
|
|
144378
145067
|
justify-content: center;
|
|
144379
145068
|
z-index: 10000;
|
|
144380
|
-
font-family:
|
|
145069
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
144381
145070
|
opacity: 0;
|
|
144382
145071
|
visibility: hidden;
|
|
144383
145072
|
transition: opacity 0.2s ease, visibility 0.2s ease;
|
|
@@ -145284,7 +145973,7 @@ function injectSidebarMenuStyles() {
|
|
|
145284
145973
|
background: #ffffff;
|
|
145285
145974
|
border-right: 1px solid #e5e7eb;
|
|
145286
145975
|
border-radius: 0 16px 16px 0;
|
|
145287
|
-
font-family:
|
|
145976
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
145288
145977
|
transition: width var(--sidebar-transition);
|
|
145289
145978
|
overflow: hidden;
|
|
145290
145979
|
z-index: 100;
|
|
@@ -147554,7 +148243,7 @@ var STYLES2 = `
|
|
|
147554
148243
|
display: flex;
|
|
147555
148244
|
align-items: center;
|
|
147556
148245
|
justify-content: center;
|
|
147557
|
-
font-family: '
|
|
148246
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
147558
148247
|
}
|
|
147559
148248
|
#${MODAL_ID4} .gcdr-card {
|
|
147560
148249
|
background: #fff;
|
|
@@ -147826,7 +148515,7 @@ var STYLES2 = `
|
|
|
147826
148515
|
}
|
|
147827
148516
|
#${MODAL_ID4} .gcdr-fail-item:last-child { border-bottom: none; }
|
|
147828
148517
|
`;
|
|
147829
|
-
function
|
|
148518
|
+
function injectStyles18() {
|
|
147830
148519
|
if (document.getElementById(`${MODAL_ID4}-styles`)) return;
|
|
147831
148520
|
const style = document.createElement("style");
|
|
147832
148521
|
style.id = `${MODAL_ID4}-styles`;
|
|
@@ -147935,7 +148624,7 @@ function escHtml3(str) {
|
|
|
147935
148624
|
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
147936
148625
|
}
|
|
147937
148626
|
async function openGCDRSyncModal(params) {
|
|
147938
|
-
|
|
148627
|
+
injectStyles18();
|
|
147939
148628
|
removeExistingModal();
|
|
147940
148629
|
if (!params.thingsboardToken) {
|
|
147941
148630
|
alert("Token ThingsBoard n\xE3o encontrado. Fa\xE7a login novamente.");
|
|
@@ -148192,7 +148881,7 @@ var STYLES3 = `
|
|
|
148192
148881
|
display: flex;
|
|
148193
148882
|
align-items: center;
|
|
148194
148883
|
justify-content: center;
|
|
148195
|
-
font-family: '
|
|
148884
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
148196
148885
|
}
|
|
148197
148886
|
#${MODAL_ID5} .abm-card {
|
|
148198
148887
|
background: #fff;
|
|
@@ -148473,7 +149162,7 @@ var STYLES3 = `
|
|
|
148473
149162
|
position: fixed; inset: 0;
|
|
148474
149163
|
background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
|
|
148475
149164
|
z-index: 99999; display: flex; align-items: center; justify-content: center;
|
|
148476
|
-
font-family: '
|
|
149165
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
148477
149166
|
}
|
|
148478
149167
|
.abm-confirm-modal {
|
|
148479
149168
|
background: #fff; border-radius: 10px; width: min(420px, 94vw);
|
|
@@ -148503,7 +149192,7 @@ var STYLES3 = `
|
|
|
148503
149192
|
.abm-confirm-btn--confirm { background: #e67e22; color: #fff; }
|
|
148504
149193
|
.abm-confirm-btn--confirm:hover { background: #cf6d17; }
|
|
148505
149194
|
`;
|
|
148506
|
-
function
|
|
149195
|
+
function injectStyles19() {
|
|
148507
149196
|
if (document.getElementById(`${MODAL_ID5}-styles`)) return;
|
|
148508
149197
|
const style = document.createElement("style");
|
|
148509
149198
|
style.id = `${MODAL_ID5}-styles`;
|
|
@@ -149181,7 +149870,7 @@ async function fetchBundle(customerTB_ID, gcdrTenantId, baseUrl) {
|
|
|
149181
149870
|
return json.data;
|
|
149182
149871
|
}
|
|
149183
149872
|
async function openAlarmBundleMapModal(params) {
|
|
149184
|
-
|
|
149873
|
+
injectStyles19();
|
|
149185
149874
|
removeExistingModal2();
|
|
149186
149875
|
if (!params.customerTB_ID) {
|
|
149187
149876
|
alert("Customer TB ID n\xE3o informado. N\xE3o \xE9 poss\xEDvel carregar o mapa de alarmes.");
|
|
@@ -149937,7 +150626,7 @@ var DEFAULT_INGESTION_API = "https://management.myio-bas.com";
|
|
|
149937
150626
|
var DEFAULT_INGESTION_AUTH = "https://api.myio-bas.com/auth/token";
|
|
149938
150627
|
var DEFAULT_PROVISIONING_API = "https://provisioning.apps.myio-bas.com";
|
|
149939
150628
|
var S = {
|
|
149940
|
-
root: "font-family:system-ui,sans-serif;font-size:14px;color:#111;background:#fff;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden;",
|
|
150629
|
+
root: "font-family:Nunito, system-ui, sans-serif;font-size:14px;color:#111;background:#fff;border:1px solid #e0e0e0;border-radius:8px;overflow:hidden;",
|
|
149941
150630
|
header: "padding:12px 16px;background:#f5f6fa;border-bottom:1px solid #e0e0e0;display:flex;align-items:center;gap:12px;",
|
|
149942
150631
|
badge: (bg, fg) => `font-size:12px;padding:2px 8px;border-radius:9999px;background:${bg};color:${fg};`,
|
|
149943
150632
|
tableWrap: "overflow-x:auto;border-bottom:1px solid #e0e0e0;",
|
|
@@ -150329,11 +151018,11 @@ function _esc(s) {
|
|
|
150329
151018
|
const str = s == null ? "" : String(s);
|
|
150330
151019
|
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
150331
151020
|
}
|
|
150332
|
-
var
|
|
151021
|
+
var STYLE_ID13 = "ntw-styles";
|
|
150333
151022
|
function _injectStyles2() {
|
|
150334
|
-
if (document.getElementById(
|
|
151023
|
+
if (document.getElementById(STYLE_ID13)) return;
|
|
150335
151024
|
const s = document.createElement("style");
|
|
150336
|
-
s.id =
|
|
151025
|
+
s.id = STYLE_ID13;
|
|
150337
151026
|
s.textContent = NTW_CSS;
|
|
150338
151027
|
document.head.appendChild(s);
|
|
150339
151028
|
}
|
|
@@ -151601,7 +152290,7 @@ var TicketDetailModal = class {
|
|
|
151601
152290
|
width: 100%; max-width: 580px;
|
|
151602
152291
|
max-height: 86vh; min-height: 0;
|
|
151603
152292
|
display: flex; flex-direction: column;
|
|
151604
|
-
font-family:
|
|
152293
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
151605
152294
|
font-size: 13px; color: #1a1a2e;
|
|
151606
152295
|
animation: tdm-slide-up 0.2s ease;
|
|
151607
152296
|
}
|
|
@@ -152353,7 +153042,7 @@ var HEADER_ANNOTATIONS_STYLES = `
|
|
|
152353
153042
|
box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
|
|
152354
153043
|
display: flex;
|
|
152355
153044
|
flex-direction: column;
|
|
152356
|
-
font-family: 'Nunito', -
|
|
153045
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
152357
153046
|
color: #1e293b;
|
|
152358
153047
|
overflow: hidden;
|
|
152359
153048
|
animation: myio-anno-pop 0.16s ease-out;
|
|
@@ -153238,7 +153927,7 @@ var STYLES4 = `
|
|
|
153238
153927
|
border-radius: 12px;
|
|
153239
153928
|
box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
|
|
153240
153929
|
padding: 18px 20px;
|
|
153241
|
-
font-family: 'Nunito', -
|
|
153930
|
+
font-family: 'Nunito', system-ui, sans-serif;
|
|
153242
153931
|
color: #1e293b;
|
|
153243
153932
|
}
|
|
153244
153933
|
.${MODAL_DOM_ID} .${MODAL_DOM_ID}__title {
|
|
@@ -153296,7 +153985,7 @@ var STYLES4 = `
|
|
|
153296
153985
|
background: #cbd5e1; border-color: #cbd5e1; cursor: not-allowed;
|
|
153297
153986
|
}
|
|
153298
153987
|
`;
|
|
153299
|
-
function
|
|
153988
|
+
function injectStyles20() {
|
|
153300
153989
|
if (typeof document === "undefined") return;
|
|
153301
153990
|
if (document.getElementById(STYLES_ID3)) return;
|
|
153302
153991
|
const el2 = document.createElement("style");
|
|
@@ -153306,7 +153995,7 @@ function injectStyles19() {
|
|
|
153306
153995
|
}
|
|
153307
153996
|
var _activeBackdrop = null;
|
|
153308
153997
|
function openExportModal(options) {
|
|
153309
|
-
|
|
153998
|
+
injectStyles20();
|
|
153310
153999
|
closeExportModal();
|
|
153311
154000
|
const backdrop = document.createElement("div");
|
|
153312
154001
|
backdrop.className = `${MODAL_DOM_ID}-backdrop`;
|
|
@@ -155075,6 +155764,7 @@ var version = package_default.version || "0.0.0";
|
|
|
155075
155764
|
createFilterModalComponent,
|
|
155076
155765
|
createFooterComponent,
|
|
155077
155766
|
createFreshdeskTicket,
|
|
155767
|
+
createGoalsBarTooltip,
|
|
155078
155768
|
createGranularitySelector,
|
|
155079
155769
|
createGroupScheduleCard,
|
|
155080
155770
|
createHeaderComponent,
|