@nsshunt/stsvueutils 1.2.19 → 1.2.20
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/stsvueutils.mjs +72 -38
- package/dist/stsvueutils.mjs.map +1 -1
- package/dist/stsvueutils.umd.js +72 -38
- package/dist/stsvueutils.umd.js.map +1 -1
- package/dist/style.css +29 -29
- package/package.json +1 -1
- package/types/components/UXModelInstrumentServiceCommon.vue.d.ts +2 -0
- package/types/components/UXModelInstrumentServiceCommon.vue.d.ts.map +1 -1
- package/types/components/UXModelInstrumentServiceSmall.vue.d.ts +2 -0
- package/types/components/UXModelInstrumentServiceSmall.vue.d.ts.map +1 -1
- package/types/components/UXModelNode.vue.d.ts +2 -0
- package/types/components/UXModelNode.vue.d.ts.map +1 -1
- package/types/stores/modelStore.d.ts +8 -4
- package/types/stores/modelStore.d.ts.map +1 -1
package/dist/stsvueutils.umd.js
CHANGED
|
@@ -8305,13 +8305,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
8305
8305
|
// https://pinia.vuejs.org/core-concepts/state.html
|
|
8306
8306
|
state: () => {
|
|
8307
8307
|
return {
|
|
8308
|
-
|
|
8309
|
-
agentModel: {},
|
|
8310
|
-
modelMeta: {},
|
|
8311
|
-
serviceModelSubscriptionKey: null,
|
|
8312
|
-
agentModelSubscriptionKey: null,
|
|
8313
|
-
friendlyName: {},
|
|
8314
|
-
friendNameIndex: 1
|
|
8308
|
+
_models: {}
|
|
8315
8309
|
};
|
|
8316
8310
|
},
|
|
8317
8311
|
// Getters
|
|
@@ -8374,25 +8368,48 @@ var __privateMethod = (obj, member, method) => {
|
|
|
8374
8368
|
}
|
|
8375
8369
|
},
|
|
8376
8370
|
*/
|
|
8377
|
-
|
|
8378
|
-
this.
|
|
8379
|
-
|
|
8371
|
+
SetupNewModelId(modelId) {
|
|
8372
|
+
this._models[modelId] = {
|
|
8373
|
+
serviceModel: {},
|
|
8374
|
+
agentModel: {},
|
|
8375
|
+
modelMeta: {},
|
|
8376
|
+
serviceModelSubscriptionKey: null,
|
|
8377
|
+
agentModelSubscriptionKey: null,
|
|
8378
|
+
friendlyName: {},
|
|
8379
|
+
friendNameIndex: 1
|
|
8380
|
+
};
|
|
8380
8381
|
},
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8382
|
+
UpdateServiceModel(modelId, model, subscriptionKey) {
|
|
8383
|
+
try {
|
|
8384
|
+
if (!this._models[modelId]) {
|
|
8385
|
+
this.SetupNewModelId(modelId);
|
|
8386
|
+
}
|
|
8387
|
+
this._models[modelId].serviceModel = _cloneDeep(model);
|
|
8388
|
+
this._models[modelId].serviceModelSubscriptionKey = subscriptionKey;
|
|
8389
|
+
} catch (error) {
|
|
8390
|
+
console.error(error);
|
|
8391
|
+
}
|
|
8384
8392
|
},
|
|
8385
|
-
|
|
8386
|
-
if (!this.
|
|
8387
|
-
this.
|
|
8393
|
+
UpdateAgentModel(modelId, model, subscriptionKey) {
|
|
8394
|
+
if (!this._models[modelId]) {
|
|
8395
|
+
this.SetupNewModelId(modelId);
|
|
8396
|
+
}
|
|
8397
|
+
this._models[modelId].agentModel = _cloneDeep(model);
|
|
8398
|
+
this._models[modelId].agentModelSubscriptionKey = subscriptionKey;
|
|
8399
|
+
},
|
|
8400
|
+
GetFriendName(modelId, id) {
|
|
8401
|
+
try {
|
|
8402
|
+
if (!this._models[modelId]) {
|
|
8403
|
+
this.SetupNewModelId(modelId);
|
|
8404
|
+
}
|
|
8405
|
+
if (!this._models[modelId].friendlyName[id]) {
|
|
8406
|
+
this._models[modelId].friendlyName[id] = `FN${this._models[modelId].friendNameIndex++}@${id.split("@")[1]}`;
|
|
8407
|
+
}
|
|
8408
|
+
return this._models[modelId].friendlyName[id];
|
|
8409
|
+
} catch (error) {
|
|
8410
|
+
return `Error: ${error}`;
|
|
8388
8411
|
}
|
|
8389
|
-
return this.friendlyName[id];
|
|
8390
|
-
}
|
|
8391
|
-
/*
|
|
8392
|
-
UpdateSubscriptions(subscriptions: ISubscriptions): void {
|
|
8393
|
-
this.currentsubscriptions = subscriptions;
|
|
8394
8412
|
}
|
|
8395
|
-
*/
|
|
8396
8413
|
}
|
|
8397
8414
|
});
|
|
8398
8415
|
/*! @license DOMPurify 3.0.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.11/LICENSE */
|
|
@@ -9403,6 +9420,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
9403
9420
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
9404
9421
|
__name: "UXModelInstrumentServiceCommon",
|
|
9405
9422
|
props: {
|
|
9423
|
+
modelId: {},
|
|
9406
9424
|
instrumentdata: {},
|
|
9407
9425
|
contextdata: {},
|
|
9408
9426
|
isleafnode: { type: Boolean },
|
|
@@ -9414,7 +9432,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
9414
9432
|
chalk$1.level = 3;
|
|
9415
9433
|
const friendlyTitle = (id) => {
|
|
9416
9434
|
if (id.length > 30) {
|
|
9417
|
-
return store.GetFriendName(id);
|
|
9435
|
+
return store.GetFriendName(props.modelId, id);
|
|
9418
9436
|
} else {
|
|
9419
9437
|
return id;
|
|
9420
9438
|
}
|
|
@@ -9499,18 +9517,22 @@ var __privateMethod = (obj, member, method) => {
|
|
|
9499
9517
|
};
|
|
9500
9518
|
vue.computed({
|
|
9501
9519
|
get: () => {
|
|
9502
|
-
if (store.
|
|
9503
|
-
|
|
9520
|
+
if (store._models[props.modelId]) {
|
|
9521
|
+
if (store._models[props.modelId].modelMeta[props.nodeid] && store._models[props.modelId].modelMeta[props.nodeid].detailView) {
|
|
9522
|
+
return store._models[props.modelId].modelMeta[props.nodeid].detailView;
|
|
9523
|
+
}
|
|
9504
9524
|
}
|
|
9505
9525
|
return false;
|
|
9506
9526
|
},
|
|
9507
9527
|
set: (val) => {
|
|
9508
|
-
if (store.
|
|
9509
|
-
store.modelMeta[props.nodeid]
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9528
|
+
if (store._models[props.modelId]) {
|
|
9529
|
+
if (store._models[props.modelId].modelMeta[props.nodeid]) {
|
|
9530
|
+
store._models[props.modelId].modelMeta[props.nodeid].detailView = val;
|
|
9531
|
+
} else {
|
|
9532
|
+
store._models[props.modelId].modelMeta[props.nodeid] = {
|
|
9533
|
+
detailView: val
|
|
9534
|
+
};
|
|
9535
|
+
}
|
|
9514
9536
|
}
|
|
9515
9537
|
}
|
|
9516
9538
|
});
|
|
@@ -9998,8 +10020,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
9998
10020
|
}
|
|
9999
10021
|
return target2;
|
|
10000
10022
|
};
|
|
10001
|
-
const UXModelInstrumentServiceCommon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
10002
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
10023
|
+
const UXModelInstrumentServiceCommon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-02af10f2"]]);
|
|
10024
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-3eab32be"), n = n(), vue.popScopeId(), n);
|
|
10003
10025
|
const _hoisted_1$1 = { class: "ststitle" };
|
|
10004
10026
|
const _hoisted_2$1 = {
|
|
10005
10027
|
key: 0,
|
|
@@ -10061,6 +10083,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
10061
10083
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10062
10084
|
__name: "UXModelInstrumentServiceSmall",
|
|
10063
10085
|
props: {
|
|
10086
|
+
modelId: {},
|
|
10064
10087
|
instrumentdata: {},
|
|
10065
10088
|
contextdata: {},
|
|
10066
10089
|
isleafnode: { type: Boolean },
|
|
@@ -10087,7 +10110,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
10087
10110
|
let barUpdate = 0;
|
|
10088
10111
|
const friendlyTitle = (id) => {
|
|
10089
10112
|
if (id.length > 30) {
|
|
10090
|
-
return store.GetFriendName(id);
|
|
10113
|
+
return store.GetFriendName(props.modelId, id);
|
|
10091
10114
|
} else {
|
|
10092
10115
|
return id;
|
|
10093
10116
|
}
|
|
@@ -10570,12 +10593,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
10570
10593
|
};
|
|
10571
10594
|
}
|
|
10572
10595
|
});
|
|
10573
|
-
const UXModelInstrumentServiceSmall = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
10596
|
+
const UXModelInstrumentServiceSmall = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-3eab32be"]]);
|
|
10574
10597
|
const _hoisted_1 = ["value"];
|
|
10575
10598
|
const _hoisted_2 = { key: 0 };
|
|
10576
10599
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10577
10600
|
__name: "UXModelNode",
|
|
10578
10601
|
props: {
|
|
10602
|
+
modelId: {},
|
|
10579
10603
|
nodeid: {},
|
|
10580
10604
|
smallMode: { type: Boolean }
|
|
10581
10605
|
},
|
|
@@ -10583,12 +10607,21 @@ var __privateMethod = (obj, member, method) => {
|
|
|
10583
10607
|
setup(__props, { emit: __emit }) {
|
|
10584
10608
|
chalk$1.level = 3;
|
|
10585
10609
|
const store = ModelStore();
|
|
10610
|
+
const props = __props;
|
|
10586
10611
|
const emit = __emit;
|
|
10587
10612
|
vue.computed(() => {
|
|
10588
|
-
|
|
10613
|
+
if (store._models[props.modelId]) {
|
|
10614
|
+
return store._models[props.modelId].agentModel;
|
|
10615
|
+
} else {
|
|
10616
|
+
return {};
|
|
10617
|
+
}
|
|
10589
10618
|
});
|
|
10590
10619
|
const serviceModel = vue.computed(() => {
|
|
10591
|
-
|
|
10620
|
+
if (store._models[props.modelId]) {
|
|
10621
|
+
return store._models[props.modelId].serviceModel;
|
|
10622
|
+
} else {
|
|
10623
|
+
return {};
|
|
10624
|
+
}
|
|
10592
10625
|
});
|
|
10593
10626
|
const cpu = (model) => {
|
|
10594
10627
|
try {
|
|
@@ -10611,12 +10644,13 @@ var __privateMethod = (obj, member, method) => {
|
|
|
10611
10644
|
cpu(svc) > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
10612
10645
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.smallMode ? UXModelInstrumentServiceSmall : UXModelInstrumentServiceCommon), {
|
|
10613
10646
|
isleafnode: false,
|
|
10647
|
+
"model-id": props.modelId,
|
|
10614
10648
|
nodeid: svc.id,
|
|
10615
10649
|
contextdata: svc.context,
|
|
10616
10650
|
instrumentdata: svc.instruments,
|
|
10617
10651
|
title: svc.id,
|
|
10618
10652
|
onMyclick: navigate
|
|
10619
|
-
}, null, 40, ["nodeid", "contextdata", "instrumentdata", "title"]))
|
|
10653
|
+
}, null, 40, ["model-id", "nodeid", "contextdata", "instrumentdata", "title"]))
|
|
10620
10654
|
])) : vue.createCommentVNode("", true)
|
|
10621
10655
|
], 8, _hoisted_1);
|
|
10622
10656
|
}), 128);
|