myio-js-library 0.1.464 → 0.1.465
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 +10 -4
- package/dist/index.d.cts +2 -0
- package/dist/index.js +10 -4
- package/dist/myio-js-library.umd.js +10 -4
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1139,7 +1139,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
1139
1139
|
// package.json
|
|
1140
1140
|
var package_default = {
|
|
1141
1141
|
name: "myio-js-library",
|
|
1142
|
-
version: "0.1.
|
|
1142
|
+
version: "0.1.465",
|
|
1143
1143
|
description: "A clean, standalone JS SDK for MYIO projects",
|
|
1144
1144
|
license: "MIT",
|
|
1145
1145
|
repository: "github:gh-myio/myio-js-library",
|
|
@@ -27485,6 +27485,12 @@ var EnergyModalView = class {
|
|
|
27485
27485
|
/**
|
|
27486
27486
|
* Gets modal title based on mode
|
|
27487
27487
|
*/
|
|
27488
|
+
canShowDemandButtons() {
|
|
27489
|
+
const { readingType, mode, deviceProfile, canShowDemandButtons } = this.config.params;
|
|
27490
|
+
if (readingType !== "energy" || mode === "comparison") return false;
|
|
27491
|
+
if (canShowDemandButtons !== void 0 && canShowDemandButtons !== null) return canShowDemandButtons;
|
|
27492
|
+
return deviceProfile !== "3F_MEDIDOR";
|
|
27493
|
+
}
|
|
27488
27494
|
getModalTitle() {
|
|
27489
27495
|
const mode = this.config.params.mode || "single";
|
|
27490
27496
|
if (mode === "comparison") {
|
|
@@ -27534,7 +27540,7 @@ var EnergyModalView = class {
|
|
|
27534
27540
|
<button id="export-csv-btn" class="myio-btn myio-btn-secondary" disabled>
|
|
27535
27541
|
Exportar CSV
|
|
27536
27542
|
</button>
|
|
27537
|
-
${this.
|
|
27543
|
+
${this.canShowDemandButtons() ? `
|
|
27538
27544
|
<button id="view-demand-btn" class="myio-btn myio-btn-secondary" style="
|
|
27539
27545
|
background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
|
|
27540
27546
|
color: white;
|
|
@@ -85105,7 +85111,7 @@ var GroupManagementTab = class {
|
|
|
85105
85111
|
}
|
|
85106
85112
|
gcdrBase() {
|
|
85107
85113
|
const orch = window.MyIOOrchestrator;
|
|
85108
|
-
return (orch?.alarmsApiBaseUrl || "https://
|
|
85114
|
+
return (orch?.alarmsApiBaseUrl || "https://gcdr-api.a.myio-bas.com").replace(/\/$/, "");
|
|
85109
85115
|
}
|
|
85110
85116
|
gcdrCid() {
|
|
85111
85117
|
return window.MyIOOrchestrator?.gcdrCustomerId || "";
|
|
@@ -87575,7 +87581,7 @@ var UserManagementModalView = class {
|
|
|
87575
87581
|
.um-badge--admin { background: var(--um-badge-admin-bg); color: var(--um-badge-admin-text); }
|
|
87576
87582
|
.um-badge--user { background: var(--um-badge-user-bg); color: var(--um-badge-user-text); }
|
|
87577
87583
|
|
|
87578
|
-
.um-form { display: flex; flex-direction: column; gap: 14px;
|
|
87584
|
+
.um-form { display: flex; flex-direction: column; gap: 14px;}
|
|
87579
87585
|
.um-form-row { display: flex; gap: 12px; }
|
|
87580
87586
|
.um-form-row .um-form-group { flex: 1; }
|
|
87581
87587
|
.um-form-group { display: flex; flex-direction: column; gap: 5px; }
|
package/dist/index.d.cts
CHANGED
|
@@ -3725,6 +3725,8 @@ interface OpenDashboardPopupEnergyOptions {
|
|
|
3725
3725
|
granularity?: '1d' | '1h' | '15m';
|
|
3726
3726
|
deviceLabel?: string;
|
|
3727
3727
|
deviceProfile?: string;
|
|
3728
|
+
/** Customer SERVER_SCOPE attribute. When true, shows Pico de Demanda and Telemetrias Instantâneas buttons. Default: false. */
|
|
3729
|
+
canShowDemandButtons?: boolean;
|
|
3728
3730
|
closeOnEsc?: boolean;
|
|
3729
3731
|
zIndex?: number;
|
|
3730
3732
|
deep?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -546,7 +546,7 @@ var init_template_card = __esm({
|
|
|
546
546
|
// package.json
|
|
547
547
|
var package_default = {
|
|
548
548
|
name: "myio-js-library",
|
|
549
|
-
version: "0.1.
|
|
549
|
+
version: "0.1.465",
|
|
550
550
|
description: "A clean, standalone JS SDK for MYIO projects",
|
|
551
551
|
license: "MIT",
|
|
552
552
|
repository: "github:gh-myio/myio-js-library",
|
|
@@ -26892,6 +26892,12 @@ var EnergyModalView = class {
|
|
|
26892
26892
|
/**
|
|
26893
26893
|
* Gets modal title based on mode
|
|
26894
26894
|
*/
|
|
26895
|
+
canShowDemandButtons() {
|
|
26896
|
+
const { readingType, mode, deviceProfile, canShowDemandButtons } = this.config.params;
|
|
26897
|
+
if (readingType !== "energy" || mode === "comparison") return false;
|
|
26898
|
+
if (canShowDemandButtons !== void 0 && canShowDemandButtons !== null) return canShowDemandButtons;
|
|
26899
|
+
return deviceProfile !== "3F_MEDIDOR";
|
|
26900
|
+
}
|
|
26895
26901
|
getModalTitle() {
|
|
26896
26902
|
const mode = this.config.params.mode || "single";
|
|
26897
26903
|
if (mode === "comparison") {
|
|
@@ -26941,7 +26947,7 @@ var EnergyModalView = class {
|
|
|
26941
26947
|
<button id="export-csv-btn" class="myio-btn myio-btn-secondary" disabled>
|
|
26942
26948
|
Exportar CSV
|
|
26943
26949
|
</button>
|
|
26944
|
-
${this.
|
|
26950
|
+
${this.canShowDemandButtons() ? `
|
|
26945
26951
|
<button id="view-demand-btn" class="myio-btn myio-btn-secondary" style="
|
|
26946
26952
|
background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
|
|
26947
26953
|
color: white;
|
|
@@ -84512,7 +84518,7 @@ var GroupManagementTab = class {
|
|
|
84512
84518
|
}
|
|
84513
84519
|
gcdrBase() {
|
|
84514
84520
|
const orch = window.MyIOOrchestrator;
|
|
84515
|
-
return (orch?.alarmsApiBaseUrl || "https://
|
|
84521
|
+
return (orch?.alarmsApiBaseUrl || "https://gcdr-api.a.myio-bas.com").replace(/\/$/, "");
|
|
84516
84522
|
}
|
|
84517
84523
|
gcdrCid() {
|
|
84518
84524
|
return window.MyIOOrchestrator?.gcdrCustomerId || "";
|
|
@@ -86982,7 +86988,7 @@ var UserManagementModalView = class {
|
|
|
86982
86988
|
.um-badge--admin { background: var(--um-badge-admin-bg); color: var(--um-badge-admin-text); }
|
|
86983
86989
|
.um-badge--user { background: var(--um-badge-user-bg); color: var(--um-badge-user-text); }
|
|
86984
86990
|
|
|
86985
|
-
.um-form { display: flex; flex-direction: column; gap: 14px;
|
|
86991
|
+
.um-form { display: flex; flex-direction: column; gap: 14px;}
|
|
86986
86992
|
.um-form-row { display: flex; gap: 12px; }
|
|
86987
86993
|
.um-form-row .um-form-group { flex: 1; }
|
|
86988
86994
|
.um-form-group { display: flex; flex-direction: column; gap: 5px; }
|
|
@@ -4070,7 +4070,7 @@
|
|
|
4070
4070
|
|
|
4071
4071
|
// package.json
|
|
4072
4072
|
var package_default = {
|
|
4073
|
-
version: "0.1.
|
|
4073
|
+
version: "0.1.465"};
|
|
4074
4074
|
|
|
4075
4075
|
// src/format/energy.ts
|
|
4076
4076
|
function formatPower(value, decimals = 2) {
|
|
@@ -30189,6 +30189,12 @@
|
|
|
30189
30189
|
/**
|
|
30190
30190
|
* Gets modal title based on mode
|
|
30191
30191
|
*/
|
|
30192
|
+
canShowDemandButtons() {
|
|
30193
|
+
const { readingType, mode, deviceProfile, canShowDemandButtons } = this.config.params;
|
|
30194
|
+
if (readingType !== "energy" || mode === "comparison") return false;
|
|
30195
|
+
if (canShowDemandButtons !== void 0 && canShowDemandButtons !== null) return canShowDemandButtons;
|
|
30196
|
+
return deviceProfile !== "3F_MEDIDOR";
|
|
30197
|
+
}
|
|
30192
30198
|
getModalTitle() {
|
|
30193
30199
|
const mode = this.config.params.mode || "single";
|
|
30194
30200
|
if (mode === "comparison") {
|
|
@@ -30238,7 +30244,7 @@
|
|
|
30238
30244
|
<button id="export-csv-btn" class="myio-btn myio-btn-secondary" disabled>
|
|
30239
30245
|
Exportar CSV
|
|
30240
30246
|
</button>
|
|
30241
|
-
${this.
|
|
30247
|
+
${this.canShowDemandButtons() ? `
|
|
30242
30248
|
<button id="view-demand-btn" class="myio-btn myio-btn-secondary" style="
|
|
30243
30249
|
background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
|
|
30244
30250
|
color: white;
|
|
@@ -87759,7 +87765,7 @@ ${errors.slice(0, 5).join("\n")}` + (errors.length > 5 ? `
|
|
|
87759
87765
|
}
|
|
87760
87766
|
gcdrBase() {
|
|
87761
87767
|
const orch = window.MyIOOrchestrator;
|
|
87762
|
-
return (orch?.alarmsApiBaseUrl || "https://
|
|
87768
|
+
return (orch?.alarmsApiBaseUrl || "https://gcdr-api.a.myio-bas.com").replace(/\/$/, "");
|
|
87763
87769
|
}
|
|
87764
87770
|
gcdrCid() {
|
|
87765
87771
|
return window.MyIOOrchestrator?.gcdrCustomerId || "";
|
|
@@ -90229,7 +90235,7 @@ Esta a\xE7\xE3o afeta todos os grupos que utilizam este canal.`
|
|
|
90229
90235
|
.um-badge--admin { background: var(--um-badge-admin-bg); color: var(--um-badge-admin-text); }
|
|
90230
90236
|
.um-badge--user { background: var(--um-badge-user-bg); color: var(--um-badge-user-text); }
|
|
90231
90237
|
|
|
90232
|
-
.um-form { display: flex; flex-direction: column; gap: 14px;
|
|
90238
|
+
.um-form { display: flex; flex-direction: column; gap: 14px;}
|
|
90233
90239
|
.um-form-row { display: flex; gap: 12px; }
|
|
90234
90240
|
.um-form-row .um-form-group { flex: 1; }
|
|
90235
90241
|
.um-form-group { display: flex; flex-direction: column; gap: 5px; }
|