myio-js-library 0.1.532 → 0.1.533
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 +12 -2
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -2
- package/dist/myio-js-library.umd.js +12 -2
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -861,7 +861,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
861
861
|
// package.json
|
|
862
862
|
var package_default = {
|
|
863
863
|
name: "myio-js-library",
|
|
864
|
-
version: "0.1.
|
|
864
|
+
version: "0.1.533",
|
|
865
865
|
description: "A clean, standalone JS SDK for MYIO projects",
|
|
866
866
|
license: "MIT",
|
|
867
867
|
repository: "github:gh-myio/myio-js-library",
|
|
@@ -67350,6 +67350,15 @@ var SettingsModalView = class {
|
|
|
67350
67350
|
const email = userEmail.toLowerCase().trim();
|
|
67351
67351
|
return email.endsWith(ALLOWED_EMAIL_DOMAIN.toLowerCase());
|
|
67352
67352
|
}
|
|
67353
|
+
/**
|
|
67354
|
+
* Check if the user may edit the "Identificador" field.
|
|
67355
|
+
* True when isSuperAdmin() OR the caller already resolved the user as a
|
|
67356
|
+
* holding admin (USER SERVER_SCOPE attrs isHolding=true AND isUserAdmin=true
|
|
67357
|
+
* — see detectHoldingUserAdmin in utils/superAdminUtils.ts).
|
|
67358
|
+
*/
|
|
67359
|
+
canEditIdentifier() {
|
|
67360
|
+
return this.isSuperAdmin() || this.config.holdingAdmin === true;
|
|
67361
|
+
}
|
|
67353
67362
|
render(initialData) {
|
|
67354
67363
|
this.originalActiveElement = document.activeElement;
|
|
67355
67364
|
document.body.appendChild(this.container);
|
|
@@ -67897,7 +67906,7 @@ var SettingsModalView = class {
|
|
|
67897
67906
|
<!-- Col 2, row 5: "Identificador" label -->
|
|
67898
67907
|
<div class="identity-field-label">Identificador / LUC / SUC</div>
|
|
67899
67908
|
<!-- Col 2, row 6: input identificador -->
|
|
67900
|
-
<input type="text" id="identifier" name="identifier" class="identity-input" maxlength="20" ${this.
|
|
67909
|
+
<input type="text" id="identifier" name="identifier" class="identity-input" maxlength="20" ${this.canEditIdentifier() ? "" : "readonly"}>
|
|
67901
67910
|
|
|
67902
67911
|
<!-- Col 3, rows 1-6: date info block -->
|
|
67903
67912
|
<div class="identity-dates-block">
|
|
@@ -70861,6 +70870,7 @@ var SettingsController = class {
|
|
|
70861
70870
|
// Fallback to window.MyIOUtils.currentUserEmail if not provided (set by MAIN controller)
|
|
70862
70871
|
superadmin: params.superadmin,
|
|
70863
70872
|
userEmail: params.userEmail || window.MyIOUtils?.currentUserEmail || null,
|
|
70873
|
+
holdingAdmin: params.holdingAdmin ?? window.MyIOUtils?.HoldingAdmin ?? false,
|
|
70864
70874
|
// RFC-0144: Pass enableAnnotationsOnboarding flag for onboarding control
|
|
70865
70875
|
enableAnnotationsOnboarding: params.enableAnnotationsOnboarding ?? false,
|
|
70866
70876
|
// RFC-0180: Raw device name + GCDR identifiers for Alarms tab
|
package/dist/index.d.cts
CHANGED
|
@@ -7764,6 +7764,7 @@ interface OpenDashboardPopupSettingsParams {
|
|
|
7764
7764
|
deviceMapInstaneousPower?: object;
|
|
7765
7765
|
superadmin?: boolean;
|
|
7766
7766
|
userEmail?: string;
|
|
7767
|
+
holdingAdmin?: boolean;
|
|
7767
7768
|
connectionData?: {
|
|
7768
7769
|
centralName?: string;
|
|
7769
7770
|
connectionStatusTime?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -7764,6 +7764,7 @@ interface OpenDashboardPopupSettingsParams {
|
|
|
7764
7764
|
deviceMapInstaneousPower?: object;
|
|
7765
7765
|
superadmin?: boolean;
|
|
7766
7766
|
userEmail?: string;
|
|
7767
|
+
holdingAdmin?: boolean;
|
|
7767
7768
|
connectionData?: {
|
|
7768
7769
|
centralName?: string;
|
|
7769
7770
|
connectionStatusTime?: string;
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
// package.json
|
|
11
11
|
var package_default = {
|
|
12
12
|
name: "myio-js-library",
|
|
13
|
-
version: "0.1.
|
|
13
|
+
version: "0.1.533",
|
|
14
14
|
description: "A clean, standalone JS SDK for MYIO projects",
|
|
15
15
|
license: "MIT",
|
|
16
16
|
repository: "github:gh-myio/myio-js-library",
|
|
@@ -65774,6 +65774,15 @@ var SettingsModalView = class {
|
|
|
65774
65774
|
const email = userEmail.toLowerCase().trim();
|
|
65775
65775
|
return email.endsWith(ALLOWED_EMAIL_DOMAIN.toLowerCase());
|
|
65776
65776
|
}
|
|
65777
|
+
/**
|
|
65778
|
+
* Check if the user may edit the "Identificador" field.
|
|
65779
|
+
* True when isSuperAdmin() OR the caller already resolved the user as a
|
|
65780
|
+
* holding admin (USER SERVER_SCOPE attrs isHolding=true AND isUserAdmin=true
|
|
65781
|
+
* — see detectHoldingUserAdmin in utils/superAdminUtils.ts).
|
|
65782
|
+
*/
|
|
65783
|
+
canEditIdentifier() {
|
|
65784
|
+
return this.isSuperAdmin() || this.config.holdingAdmin === true;
|
|
65785
|
+
}
|
|
65777
65786
|
render(initialData) {
|
|
65778
65787
|
this.originalActiveElement = document.activeElement;
|
|
65779
65788
|
document.body.appendChild(this.container);
|
|
@@ -66321,7 +66330,7 @@ var SettingsModalView = class {
|
|
|
66321
66330
|
<!-- Col 2, row 5: "Identificador" label -->
|
|
66322
66331
|
<div class="identity-field-label">Identificador / LUC / SUC</div>
|
|
66323
66332
|
<!-- Col 2, row 6: input identificador -->
|
|
66324
|
-
<input type="text" id="identifier" name="identifier" class="identity-input" maxlength="20" ${this.
|
|
66333
|
+
<input type="text" id="identifier" name="identifier" class="identity-input" maxlength="20" ${this.canEditIdentifier() ? "" : "readonly"}>
|
|
66325
66334
|
|
|
66326
66335
|
<!-- Col 3, rows 1-6: date info block -->
|
|
66327
66336
|
<div class="identity-dates-block">
|
|
@@ -69285,6 +69294,7 @@ var SettingsController = class {
|
|
|
69285
69294
|
// Fallback to window.MyIOUtils.currentUserEmail if not provided (set by MAIN controller)
|
|
69286
69295
|
superadmin: params.superadmin,
|
|
69287
69296
|
userEmail: params.userEmail || window.MyIOUtils?.currentUserEmail || null,
|
|
69297
|
+
holdingAdmin: params.holdingAdmin ?? window.MyIOUtils?.HoldingAdmin ?? false,
|
|
69288
69298
|
// RFC-0144: Pass enableAnnotationsOnboarding flag for onboarding control
|
|
69289
69299
|
enableAnnotationsOnboarding: params.enableAnnotationsOnboarding ?? false,
|
|
69290
69300
|
// RFC-0180: Raw device name + GCDR identifiers for Alarms tab
|
|
@@ -5455,7 +5455,7 @@
|
|
|
5455
5455
|
|
|
5456
5456
|
// package.json
|
|
5457
5457
|
var package_default = {
|
|
5458
|
-
version: "0.1.
|
|
5458
|
+
version: "0.1.533"};
|
|
5459
5459
|
|
|
5460
5460
|
// src/utils/format/energy.ts
|
|
5461
5461
|
function formatPower(value, decimals = 2) {
|
|
@@ -70903,6 +70903,15 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
|
|
|
70903
70903
|
const email = userEmail.toLowerCase().trim();
|
|
70904
70904
|
return email.endsWith(ALLOWED_EMAIL_DOMAIN.toLowerCase());
|
|
70905
70905
|
}
|
|
70906
|
+
/**
|
|
70907
|
+
* Check if the user may edit the "Identificador" field.
|
|
70908
|
+
* True when isSuperAdmin() OR the caller already resolved the user as a
|
|
70909
|
+
* holding admin (USER SERVER_SCOPE attrs isHolding=true AND isUserAdmin=true
|
|
70910
|
+
* — see detectHoldingUserAdmin in utils/superAdminUtils.ts).
|
|
70911
|
+
*/
|
|
70912
|
+
canEditIdentifier() {
|
|
70913
|
+
return this.isSuperAdmin() || this.config.holdingAdmin === true;
|
|
70914
|
+
}
|
|
70906
70915
|
render(initialData) {
|
|
70907
70916
|
this.originalActiveElement = document.activeElement;
|
|
70908
70917
|
document.body.appendChild(this.container);
|
|
@@ -71450,7 +71459,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
|
|
|
71450
71459
|
<!-- Col 2, row 5: "Identificador" label -->
|
|
71451
71460
|
<div class="identity-field-label">Identificador / LUC / SUC</div>
|
|
71452
71461
|
<!-- Col 2, row 6: input identificador -->
|
|
71453
|
-
<input type="text" id="identifier" name="identifier" class="identity-input" maxlength="20" ${this.
|
|
71462
|
+
<input type="text" id="identifier" name="identifier" class="identity-input" maxlength="20" ${this.canEditIdentifier() ? "" : "readonly"}>
|
|
71454
71463
|
|
|
71455
71464
|
<!-- Col 3, rows 1-6: date info block -->
|
|
71456
71465
|
<div class="identity-dates-block">
|
|
@@ -74414,6 +74423,7 @@ ${this._formatFileSize(f.size)} \xB7 ${f.type || "arquivo"}`;
|
|
|
74414
74423
|
// Fallback to window.MyIOUtils.currentUserEmail if not provided (set by MAIN controller)
|
|
74415
74424
|
superadmin: params.superadmin,
|
|
74416
74425
|
userEmail: params.userEmail || window.MyIOUtils?.currentUserEmail || null,
|
|
74426
|
+
holdingAdmin: params.holdingAdmin ?? window.MyIOUtils?.HoldingAdmin ?? false,
|
|
74417
74427
|
// RFC-0144: Pass enableAnnotationsOnboarding flag for onboarding control
|
|
74418
74428
|
enableAnnotationsOnboarding: params.enableAnnotationsOnboarding ?? false,
|
|
74419
74429
|
// RFC-0180: Raw device name + GCDR identifiers for Alarms tab
|