@davra/ui-core 1.0.3 → 1.0.4
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/ui-core.es.js +154 -152
- package/package.json +23 -23
package/dist/ui-core.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance as be, ref as b, watch as J, computed as
|
|
1
|
+
import { getCurrentInstance as be, ref as b, watch as J, computed as S, defineComponent as L, onMounted as ue, resolveComponent as p, openBlock as A, createBlock as C, withCtx as i, createVNode as d, unref as u, isRef as R, readonly as q, createTextVNode as E, toDisplayString as B, createCommentVNode as P, mergeProps as F, withDirectives as he, vShow as ge, createElementVNode as de, createElementBlock as pe, Fragment as Ae, renderList as Ee, renderSlot as z, inject as Ce, normalizeProps as Ie, guardReactiveProps as Se, useCssVars as Te, normalizeClass as Ue } from "vue";
|
|
2
2
|
import De from "axios";
|
|
3
3
|
import { defineStore as N, storeToRefs as K } from "pinia";
|
|
4
4
|
const ee = {
|
|
@@ -35,14 +35,14 @@ const ee = {
|
|
|
35
35
|
return [];
|
|
36
36
|
}
|
|
37
37
|
}, $e = async (e, t) => {
|
|
38
|
-
const
|
|
39
|
-
Object.entries(
|
|
40
|
-
t && t.includes(l) && delete
|
|
38
|
+
const o = { ...e };
|
|
39
|
+
Object.entries(o).forEach(([l, n]) => {
|
|
40
|
+
t && t.includes(l) && delete o[l], (!n || /[^a-zA-Z_0-9\-+]/g.test(n)) && delete o[l];
|
|
41
41
|
});
|
|
42
42
|
try {
|
|
43
43
|
return await f().post(
|
|
44
44
|
"/api/v1/tags",
|
|
45
|
-
|
|
45
|
+
o,
|
|
46
46
|
{
|
|
47
47
|
headers: {
|
|
48
48
|
Accept: "application/json"
|
|
@@ -56,11 +56,11 @@ const ee = {
|
|
|
56
56
|
getLabels: ke,
|
|
57
57
|
createLabel: $e,
|
|
58
58
|
getValuesByKey: Ve
|
|
59
|
-
}, Re = async (e = 0, t = 1e3,
|
|
59
|
+
}, Re = async (e = 0, t = 1e3, o, l) => {
|
|
60
60
|
const n = [];
|
|
61
|
-
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`),
|
|
61
|
+
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`), o && n.push(`sort=${o}`), l && n.push(l);
|
|
62
62
|
try {
|
|
63
|
-
const { data: r, headers:
|
|
63
|
+
const { data: r, headers: s } = await f().get(
|
|
64
64
|
`/api/v1/twins?${n.join("&")}`,
|
|
65
65
|
{
|
|
66
66
|
headers: {
|
|
@@ -68,13 +68,13 @@ const ee = {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
return { totalRecords: parseInt(
|
|
71
|
+
return { totalRecords: parseInt(s["com-davra-total-results"]), records: r };
|
|
72
72
|
} catch {
|
|
73
73
|
throw new Error("Twins API Error");
|
|
74
74
|
}
|
|
75
75
|
}, Oe = async (e) => {
|
|
76
76
|
try {
|
|
77
|
-
const { data: t, headers:
|
|
77
|
+
const { data: t, headers: o } = await f().post(
|
|
78
78
|
"/api/v1/twins/query",
|
|
79
79
|
e,
|
|
80
80
|
{
|
|
@@ -83,13 +83,13 @@ const ee = {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
return { totalRecords: parseInt(
|
|
86
|
+
return { totalRecords: parseInt(o["com-davra-total-results"]), records: t };
|
|
87
87
|
} catch {
|
|
88
88
|
throw new Error("Twins API Error");
|
|
89
89
|
}
|
|
90
90
|
}, je = async (e) => {
|
|
91
91
|
try {
|
|
92
|
-
const { data: t, headers:
|
|
92
|
+
const { data: t, headers: o } = await f().get(
|
|
93
93
|
`/api/v1/twins?arrayUUIDs=${e.join(",")}`,
|
|
94
94
|
{
|
|
95
95
|
headers: {
|
|
@@ -97,15 +97,15 @@ const ee = {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
|
-
return { totalRecords: parseInt(
|
|
100
|
+
return { totalRecords: parseInt(o["com-davra-total-results"]), records: t };
|
|
101
101
|
} catch {
|
|
102
102
|
throw new Error("Twins API Error");
|
|
103
103
|
}
|
|
104
|
-
}, Me = async (e, t = 0,
|
|
105
|
-
const r = [`digitalTwinTypeName=${e}`, `limit=${
|
|
104
|
+
}, Me = async (e, t = 0, o = 1e3, l, n) => {
|
|
105
|
+
const r = [`digitalTwinTypeName=${e}`, `limit=${o}`, `start=${t}`];
|
|
106
106
|
l && r.push(`sort=${l}`), n && r.push(`name=~${n}`);
|
|
107
107
|
try {
|
|
108
|
-
const { data:
|
|
108
|
+
const { data: s, headers: a } = await f().get(
|
|
109
109
|
`/api/v1/twins/?${r.join("&")}`,
|
|
110
110
|
{
|
|
111
111
|
headers: {
|
|
@@ -113,7 +113,7 @@ const ee = {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
|
-
return { totalRecords: parseInt(a["com-davra-total-results"]), records:
|
|
116
|
+
return { totalRecords: parseInt(a["com-davra-total-results"]), records: s };
|
|
117
117
|
} catch {
|
|
118
118
|
throw new Error("Twins API Error");
|
|
119
119
|
}
|
|
@@ -164,16 +164,16 @@ function ze(e) {
|
|
|
164
164
|
}
|
|
165
165
|
const ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ne = "__vueuse_ssr_handlers__";
|
|
166
166
|
ae[ne] = ae[ne] || {};
|
|
167
|
-
var
|
|
167
|
+
var se;
|
|
168
168
|
(function(e) {
|
|
169
169
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
170
|
-
})(
|
|
171
|
-
var Fe = Object.defineProperty,
|
|
172
|
-
for (var
|
|
173
|
-
Qe.call(t,
|
|
174
|
-
if (
|
|
175
|
-
for (var
|
|
176
|
-
We.call(t,
|
|
170
|
+
})(se || (se = {}));
|
|
171
|
+
var Fe = Object.defineProperty, oe = Object.getOwnPropertySymbols, Qe = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, re = (e, t, o) => t in e ? Fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, Je = (e, t) => {
|
|
172
|
+
for (var o in t || (t = {}))
|
|
173
|
+
Qe.call(t, o) && re(e, o, t[o]);
|
|
174
|
+
if (oe)
|
|
175
|
+
for (var o of oe(t))
|
|
176
|
+
We.call(t, o) && re(e, o, t[o]);
|
|
177
177
|
return e;
|
|
178
178
|
};
|
|
179
179
|
const Ke = {
|
|
@@ -205,37 +205,37 @@ const Ke = {
|
|
|
205
205
|
Je({
|
|
206
206
|
linear: qe
|
|
207
207
|
}, Ke);
|
|
208
|
-
function H(e, t,
|
|
209
|
-
var n, r,
|
|
208
|
+
function H(e, t, o, l = {}) {
|
|
209
|
+
var n, r, s;
|
|
210
210
|
const {
|
|
211
211
|
clone: a = !1,
|
|
212
212
|
passive: c = !1,
|
|
213
213
|
eventName: v,
|
|
214
214
|
deep: _ = !1,
|
|
215
215
|
defaultValue: h
|
|
216
|
-
} = l, w = be(), I =
|
|
217
|
-
let
|
|
218
|
-
t || (t = "modelValue"),
|
|
216
|
+
} = l, w = be(), I = o || (w == null ? void 0 : w.emit) || ((n = w == null ? void 0 : w.$emit) == null ? void 0 : n.bind(w)) || ((s = (r = w == null ? void 0 : w.proxy) == null ? void 0 : r.$emit) == null ? void 0 : s.bind(w == null ? void 0 : w.proxy));
|
|
217
|
+
let T = v;
|
|
218
|
+
t || (t = "modelValue"), T = v || T || `update:${t.toString()}`;
|
|
219
219
|
const O = (D) => a ? Ne(a) ? a(D) : ze(D) : D, U = () => Le(e[t]) ? O(e[t]) : h;
|
|
220
220
|
if (c) {
|
|
221
221
|
const D = U(), j = b(D);
|
|
222
222
|
return J(() => e[t], (m) => j.value = O(m)), J(j, (m) => {
|
|
223
|
-
(m !== e[t] || _) && I(
|
|
223
|
+
(m !== e[t] || _) && I(T, m);
|
|
224
224
|
}, { deep: _ }), j;
|
|
225
225
|
} else
|
|
226
|
-
return
|
|
226
|
+
return S({
|
|
227
227
|
get() {
|
|
228
228
|
return U();
|
|
229
229
|
},
|
|
230
230
|
set(D) {
|
|
231
|
-
I(
|
|
231
|
+
I(T, D);
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function He(e, t,
|
|
235
|
+
function He(e, t, o = {}) {
|
|
236
236
|
const l = {};
|
|
237
237
|
for (const n in e)
|
|
238
|
-
l[n] = H(e, n, t,
|
|
238
|
+
l[n] = H(e, n, t, o);
|
|
239
239
|
return l;
|
|
240
240
|
}
|
|
241
241
|
const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("span", null, null, -1), ve = /* @__PURE__ */ L({
|
|
@@ -249,14 +249,14 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
249
249
|
},
|
|
250
250
|
emits: ["update:labelkey", "update:labelvalue", "removelabel"],
|
|
251
251
|
setup(e, { emit: t }) {
|
|
252
|
-
const
|
|
252
|
+
const o = e, l = S(() => [
|
|
253
253
|
{ header: "Keys", color: "blue", icon: "mdi-label" },
|
|
254
|
-
...
|
|
254
|
+
...o.labels,
|
|
255
255
|
{ header: "Digital Twin Types", color: "purple", icon: "mdi-content-duplicate" },
|
|
256
|
-
...
|
|
257
|
-
]), { labelkey: n, labelvalue: r } = He(
|
|
256
|
+
...o.twintypes
|
|
257
|
+
]), { labelkey: n, labelvalue: r } = He(o, t), s = b(""), a = b(""), c = b([]), v = b([]), _ = b(!1), h = (m) => o.twintypes.find((g) => g === m) ? "twintypes" : "labels", w = S(() => h(n.value)), I = () => {
|
|
258
258
|
document.activeElement.blur();
|
|
259
|
-
},
|
|
259
|
+
}, T = (m) => {
|
|
260
260
|
m.key === "Enter" && I();
|
|
261
261
|
}, O = async (m) => {
|
|
262
262
|
const g = h(m);
|
|
@@ -279,7 +279,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
279
279
|
J(n, async (m, g) => {
|
|
280
280
|
m !== g && (O(m), g !== "" && (r.value = ""));
|
|
281
281
|
});
|
|
282
|
-
const U = b(), D =
|
|
282
|
+
const U = b(), D = S(() => {
|
|
283
283
|
var m;
|
|
284
284
|
return (m = U.value) == null ? void 0 : m.isFocused;
|
|
285
285
|
}), j = {
|
|
@@ -305,8 +305,8 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
305
305
|
d(X, {
|
|
306
306
|
modelValue: u(n),
|
|
307
307
|
"onUpdate:modelValue": g[0] || (g[0] = (y) => R(n) ? n.value = y : null),
|
|
308
|
-
search: u(
|
|
309
|
-
"onUpdate:search": g[1] || (g[1] = (y) => R(
|
|
308
|
+
search: u(s),
|
|
309
|
+
"onUpdate:search": g[1] || (g[1] = (y) => R(s) ? s.value = y : null),
|
|
310
310
|
"item-value": "value",
|
|
311
311
|
"data-testid": "label-key-selector",
|
|
312
312
|
readonly: "readonly" in m ? m.readonly : u(q),
|
|
@@ -320,13 +320,13 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
320
320
|
density: "compact",
|
|
321
321
|
rules: [j.alphanumericAndDash, j.specialNames],
|
|
322
322
|
"menu-props": { maxHeight: "400px", zIndex: 9999999 },
|
|
323
|
-
onKeydown:
|
|
323
|
+
onKeydown: T
|
|
324
324
|
}, {
|
|
325
325
|
"no-data": i(() => [
|
|
326
326
|
Ye
|
|
327
327
|
]),
|
|
328
328
|
"prepend-item": i(() => [
|
|
329
|
-
u(
|
|
329
|
+
u(s) && !u(l).includes(u(s)) ? (A(), C(M, {
|
|
330
330
|
key: 0,
|
|
331
331
|
class: "bg-blue-lighten-5",
|
|
332
332
|
onClick: I
|
|
@@ -345,7 +345,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
345
345
|
start: "",
|
|
346
346
|
icon: "mdi-label"
|
|
347
347
|
}),
|
|
348
|
-
E(" " + B(u(
|
|
348
|
+
E(" " + B(u(s)), 1)
|
|
349
349
|
]),
|
|
350
350
|
_: 1
|
|
351
351
|
})
|
|
@@ -560,7 +560,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
560
560
|
}, Xe = {
|
|
561
561
|
getTwinTypes: Ze
|
|
562
562
|
}, me = N("twinTypes", () => {
|
|
563
|
-
const e = b([]), t =
|
|
563
|
+
const e = b([]), t = S(() => e.value.map((n) => n.name)), o = S(() => e.value.map((n) => ({ value: n.UUID, label: n.name }))), l = async () => {
|
|
564
564
|
try {
|
|
565
565
|
const n = await Xe.getTwinTypes();
|
|
566
566
|
e.value = n;
|
|
@@ -571,7 +571,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
571
571
|
twinTypes: e,
|
|
572
572
|
pullTwinTypes: l,
|
|
573
573
|
twinTypeNames: t,
|
|
574
|
-
twinTypeSelectArray:
|
|
574
|
+
twinTypeSelectArray: o
|
|
575
575
|
};
|
|
576
576
|
}), et = N("labels", () => {
|
|
577
577
|
const e = b([]), t = async () => {
|
|
@@ -580,7 +580,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
580
580
|
e.value = l;
|
|
581
581
|
} catch {
|
|
582
582
|
}
|
|
583
|
-
},
|
|
583
|
+
}, o = async (l) => {
|
|
584
584
|
const { twinTypeNames: n } = K(me());
|
|
585
585
|
try {
|
|
586
586
|
await Z.createLabel(l, n.value), await t();
|
|
@@ -590,7 +590,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
590
590
|
return t(), {
|
|
591
591
|
labels: e,
|
|
592
592
|
pullLabels: t,
|
|
593
|
-
updateLabels:
|
|
593
|
+
updateLabels: o
|
|
594
594
|
};
|
|
595
595
|
}), tt = /* @__PURE__ */ L({
|
|
596
596
|
__name: "LabelsSelector",
|
|
@@ -600,7 +600,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
600
600
|
},
|
|
601
601
|
emits: ["update:modelValue"],
|
|
602
602
|
setup(e, { emit: t }) {
|
|
603
|
-
const
|
|
603
|
+
const o = e, { labels: l } = K(et()), { twinTypeNames: n } = K(me()), r = b([]), s = S(() => (_) => l.value.filter((h) => !n.value.includes(h) && (_.key === h || !r.value.find(({ key: w }) => w === h)))), a = S(() => (_) => n.value.filter((h) => _.key === h || !r.value.find(({ key: w }) => w === h))), c = () => {
|
|
604
604
|
r.value.push({ key: "", value: "" });
|
|
605
605
|
}, v = (_) => {
|
|
606
606
|
r.value.splice(_, 1);
|
|
@@ -609,9 +609,9 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
609
609
|
const h = _.reduce((w, I) => (I.key && I.value && (w[I.key] = I.value), w), {});
|
|
610
610
|
t("update:modelValue", h);
|
|
611
611
|
}, { deep: !0 }), ue(() => {
|
|
612
|
-
|
|
612
|
+
o.modelValue && (r.value = Object.entries(o.modelValue).map(([_, h]) => ({ key: _, value: h })));
|
|
613
613
|
}), (_, h) => {
|
|
614
|
-
const w = p("v-spacer"), I = p("v-btn"),
|
|
614
|
+
const w = p("v-spacer"), I = p("v-btn"), T = p("v-row"), O = p("v-card-title"), U = p("v-list-subheader"), D = p("v-col"), j = p("v-divider"), m = ve, g = p("v-card-text"), k = p("v-sheet");
|
|
615
615
|
return A(), C(k, {
|
|
616
616
|
class: "pa-3",
|
|
617
617
|
variant: "tonal",
|
|
@@ -622,7 +622,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
622
622
|
default: i(() => [
|
|
623
623
|
d(O, { class: "text-primary" }, {
|
|
624
624
|
default: i(() => [
|
|
625
|
-
d(
|
|
625
|
+
d(T, { "no-gutters": "" }, {
|
|
626
626
|
default: i(() => [
|
|
627
627
|
E(" Labels "),
|
|
628
628
|
d(w),
|
|
@@ -648,7 +648,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
648
648
|
}),
|
|
649
649
|
u(r).length ? (A(), C(g, { key: 0 }, {
|
|
650
650
|
default: i(() => [
|
|
651
|
-
d(
|
|
651
|
+
d(T, { "no-gutters": "" }, {
|
|
652
652
|
default: i(() => [
|
|
653
653
|
d(D, null, {
|
|
654
654
|
default: i(() => [
|
|
@@ -683,7 +683,7 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
683
683
|
labelvalue: u(r)[V].value,
|
|
684
684
|
"onUpdate:labelvalue": (M) => u(r)[V].value = M,
|
|
685
685
|
readonly: "readonly" in _ ? _.readonly : u(q),
|
|
686
|
-
labels: u(
|
|
686
|
+
labels: u(s)(u(r)[V]),
|
|
687
687
|
twintypes: u(a)(u(r)[V]),
|
|
688
688
|
"data-lab-key": $.key,
|
|
689
689
|
onRemovelabel: (M) => v(V)
|
|
@@ -704,10 +704,10 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
704
704
|
},
|
|
705
705
|
emits: ["confirm", "update:modelValue"],
|
|
706
706
|
setup(e, { emit: t }) {
|
|
707
|
-
const
|
|
707
|
+
const o = e, l = o.parentActivator ? b(!1) : H(o, "modelValue", t);
|
|
708
708
|
return (n, r) => {
|
|
709
|
-
const
|
|
710
|
-
return A(), C(
|
|
709
|
+
const s = p("v-dialog");
|
|
710
|
+
return A(), C(s, {
|
|
711
711
|
modelValue: u(l),
|
|
712
712
|
"onUpdate:modelValue": r[0] || (r[0] = (a) => R(l) ? l.value = a : null),
|
|
713
713
|
activator: n.parentActivator ? "parent" : void 0
|
|
@@ -720,13 +720,13 @@ const Ye = /* @__PURE__ */ de("span", null, null, -1), Ge = /* @__PURE__ */ de("
|
|
|
720
720
|
};
|
|
721
721
|
}
|
|
722
722
|
}), nt = Symbol.for("vuetify:display");
|
|
723
|
-
function
|
|
723
|
+
function st() {
|
|
724
724
|
const e = Ce(nt);
|
|
725
725
|
if (!e)
|
|
726
726
|
throw new Error("Could not find Vuetify display injection");
|
|
727
727
|
return e;
|
|
728
728
|
}
|
|
729
|
-
const
|
|
729
|
+
const ot = /* @__PURE__ */ L({
|
|
730
730
|
__name: "ViewObjectModal",
|
|
731
731
|
props: {
|
|
732
732
|
title: {},
|
|
@@ -736,20 +736,20 @@ const st = /* @__PURE__ */ L({
|
|
|
736
736
|
},
|
|
737
737
|
emits: ["confirm", "update:modelValue"],
|
|
738
738
|
setup(e, { emit: t }) {
|
|
739
|
-
const
|
|
739
|
+
const o = e, l = o.parentActivator ? b(!1) : H(o, "modelValue", t), n = () => {
|
|
740
740
|
t("confirm"), l.value = !1;
|
|
741
|
-
}, { mobile: r } =
|
|
742
|
-
return (
|
|
743
|
-
const c = p("v-toolbar-title"), v = p("v-btn"), _ = p("v-toolbar"), h = p("v-card-text"), w = p("v-spacer"), I = p("v-card-actions"),
|
|
741
|
+
}, { mobile: r } = st();
|
|
742
|
+
return (s, a) => {
|
|
743
|
+
const c = p("v-toolbar-title"), v = p("v-btn"), _ = p("v-toolbar"), h = p("v-card-text"), w = p("v-spacer"), I = p("v-card-actions"), T = p("v-card"), O = p("v-dialog");
|
|
744
744
|
return A(), C(O, {
|
|
745
745
|
modelValue: u(l),
|
|
746
746
|
"onUpdate:modelValue": a[2] || (a[2] = (U) => R(l) ? l.value = U : null),
|
|
747
|
-
activator:
|
|
747
|
+
activator: s.parentActivator ? "parent" : void 0,
|
|
748
748
|
"max-width": "800px",
|
|
749
749
|
fullscreen: u(r)
|
|
750
750
|
}, {
|
|
751
751
|
default: i(() => [
|
|
752
|
-
d(
|
|
752
|
+
d(T, null, {
|
|
753
753
|
default: i(() => [
|
|
754
754
|
d(_, { color: "white" }, {
|
|
755
755
|
append: i(() => [
|
|
@@ -763,7 +763,7 @@ const st = /* @__PURE__ */ L({
|
|
|
763
763
|
default: i(() => [
|
|
764
764
|
d(c, null, {
|
|
765
765
|
default: i(() => [
|
|
766
|
-
E(B(
|
|
766
|
+
E(B(s.title), 1)
|
|
767
767
|
]),
|
|
768
768
|
_: 1
|
|
769
769
|
})
|
|
@@ -772,13 +772,13 @@ const st = /* @__PURE__ */ L({
|
|
|
772
772
|
}),
|
|
773
773
|
d(h, null, {
|
|
774
774
|
default: i(() => [
|
|
775
|
-
z(
|
|
775
|
+
z(s.$slots, "default")
|
|
776
776
|
]),
|
|
777
777
|
_: 3
|
|
778
778
|
}),
|
|
779
|
-
|
|
779
|
+
s.hideActions ? P("", !0) : (A(), C(I, { key: 0 }, {
|
|
780
780
|
default: i(() => [
|
|
781
|
-
z(
|
|
781
|
+
z(s.$slots, "actions", Ie(Se({ confirm: n, dialog: u(l) })), () => [
|
|
782
782
|
d(w),
|
|
783
783
|
d(v, {
|
|
784
784
|
class: "delete-modal-dismiss",
|
|
@@ -822,14 +822,14 @@ const st = /* @__PURE__ */ L({
|
|
|
822
822
|
},
|
|
823
823
|
emits: ["confirm", "update:modelValue"],
|
|
824
824
|
setup(e, { emit: t }) {
|
|
825
|
-
const
|
|
825
|
+
const o = e, l = o.parentActivator ? b(!1) : H(o, "modelValue", t), n = () => {
|
|
826
826
|
t("confirm"), l.value = !1;
|
|
827
827
|
};
|
|
828
|
-
return (r,
|
|
828
|
+
return (r, s) => {
|
|
829
829
|
const a = p("v-card-title"), c = p("v-card-text"), v = p("v-spacer"), _ = p("v-btn"), h = p("v-card-actions"), w = p("v-card"), I = p("v-dialog");
|
|
830
830
|
return A(), C(I, {
|
|
831
831
|
modelValue: u(l),
|
|
832
|
-
"onUpdate:modelValue":
|
|
832
|
+
"onUpdate:modelValue": s[1] || (s[1] = (T) => R(l) ? l.value = T : null),
|
|
833
833
|
activator: r.parentActivator ? "parent" : void 0,
|
|
834
834
|
"max-width": "400px"
|
|
835
835
|
}, {
|
|
@@ -854,7 +854,7 @@ const st = /* @__PURE__ */ L({
|
|
|
854
854
|
d(_, {
|
|
855
855
|
class: "delete-modal-dismiss",
|
|
856
856
|
color: "grey",
|
|
857
|
-
onClick:
|
|
857
|
+
onClick: s[0] || (s[0] = (T) => l.value = !1)
|
|
858
858
|
}, {
|
|
859
859
|
default: i(() => [
|
|
860
860
|
E(" Dismiss ")
|
|
@@ -890,21 +890,21 @@ const st = /* @__PURE__ */ L({
|
|
|
890
890
|
},
|
|
891
891
|
emits: ["confirm"],
|
|
892
892
|
setup(e, { emit: t }) {
|
|
893
|
-
const
|
|
894
|
-
|
|
893
|
+
const o = b(!1), l = () => {
|
|
894
|
+
o.value = !1, t("confirm");
|
|
895
895
|
};
|
|
896
896
|
return (n, r) => {
|
|
897
|
-
const
|
|
897
|
+
const s = p("v-card-title"), a = p("v-card-text"), c = p("v-spacer"), v = p("v-btn"), _ = p("v-card-actions"), h = p("v-card"), w = p("v-dialog");
|
|
898
898
|
return A(), C(w, {
|
|
899
|
-
modelValue: u(
|
|
900
|
-
"onUpdate:modelValue": r[1] || (r[1] = (I) => R(
|
|
899
|
+
modelValue: u(o),
|
|
900
|
+
"onUpdate:modelValue": r[1] || (r[1] = (I) => R(o) ? o.value = I : null),
|
|
901
901
|
activator: "parent",
|
|
902
902
|
"max-width": "400px"
|
|
903
903
|
}, {
|
|
904
904
|
default: i(() => [
|
|
905
905
|
d(h, null, {
|
|
906
906
|
default: i(() => [
|
|
907
|
-
d(
|
|
907
|
+
d(s, null, {
|
|
908
908
|
default: i(() => [
|
|
909
909
|
E(B(n.title), 1)
|
|
910
910
|
]),
|
|
@@ -922,7 +922,7 @@ const st = /* @__PURE__ */ L({
|
|
|
922
922
|
d(v, {
|
|
923
923
|
class: "confirm-modal-dismiss",
|
|
924
924
|
color: "grey",
|
|
925
|
-
onClick: r[0] || (r[0] = (I) =>
|
|
925
|
+
onClick: r[0] || (r[0] = (I) => o.value = !1)
|
|
926
926
|
}, {
|
|
927
927
|
default: i(() => [
|
|
928
928
|
E(" Cancel ")
|
|
@@ -954,51 +954,51 @@ const st = /* @__PURE__ */ L({
|
|
|
954
954
|
}), ct = /* @__PURE__ */ L({
|
|
955
955
|
__name: "ScrollText",
|
|
956
956
|
setup(e) {
|
|
957
|
-
|
|
957
|
+
Te((s) => ({
|
|
958
958
|
"2e2ac96b": u(n),
|
|
959
959
|
e0628022: u(l)
|
|
960
960
|
}));
|
|
961
|
-
const t = b(null),
|
|
962
|
-
var
|
|
963
|
-
return t.value ? ((
|
|
964
|
-
}), l =
|
|
965
|
-
var
|
|
966
|
-
return ((
|
|
961
|
+
const t = b(null), o = S(() => {
|
|
962
|
+
var s, a;
|
|
963
|
+
return t.value ? ((s = t.value) == null ? void 0 : s.scrollWidth) - ((a = t.value) == null ? void 0 : a.offsetWidth) : 0;
|
|
964
|
+
}), l = S(() => `${-o.value - 10}px`), n = S(() => `${o.value / 30}s`), r = S(() => {
|
|
965
|
+
var s, a;
|
|
966
|
+
return ((s = t.value) == null ? void 0 : s.scrollWidth) !== ((a = t.value) == null ? void 0 : a.offsetWidth);
|
|
967
967
|
});
|
|
968
|
-
return (
|
|
968
|
+
return (s, a) => (A(), pe("div", {
|
|
969
969
|
ref_key: "text",
|
|
970
970
|
ref: t,
|
|
971
971
|
class: Ue({ "scroll-text": u(r) })
|
|
972
972
|
}, [
|
|
973
|
-
z(
|
|
973
|
+
z(s.$slots, "default", {}, void 0, !0)
|
|
974
974
|
], 2));
|
|
975
975
|
}
|
|
976
976
|
});
|
|
977
977
|
const it = (e, t) => {
|
|
978
|
-
const
|
|
978
|
+
const o = e.__vccOpts || e;
|
|
979
979
|
for (const [l, n] of t)
|
|
980
|
-
|
|
981
|
-
return
|
|
980
|
+
o[l] = n;
|
|
981
|
+
return o;
|
|
982
982
|
}, ut = /* @__PURE__ */ it(ct, [["__scopeId", "data-v-4d66a865"]]), Q = N("alertMessages", () => {
|
|
983
|
-
const e = b(!1), t = b(""),
|
|
983
|
+
const e = b(!1), t = b(""), o = b(""), l = b(5e3);
|
|
984
984
|
return {
|
|
985
985
|
snackbar: e,
|
|
986
986
|
snackbarText: t,
|
|
987
|
-
snackbarSeverity:
|
|
987
|
+
snackbarSeverity: o,
|
|
988
988
|
snackbarTimeout: l,
|
|
989
|
-
setSnackbarMessage: (r = "",
|
|
990
|
-
t.value = r,
|
|
989
|
+
setSnackbarMessage: (r = "", s = "", a = 5e3) => {
|
|
990
|
+
t.value = r, o.value = s, l.value = a, e.value = !0;
|
|
991
991
|
}
|
|
992
992
|
};
|
|
993
993
|
}), dt = /* @__PURE__ */ L({
|
|
994
994
|
__name: "Snackbar",
|
|
995
995
|
setup(e) {
|
|
996
|
-
const { snackbar: t, snackbarText:
|
|
997
|
-
return (r,
|
|
996
|
+
const { snackbar: t, snackbarText: o, snackbarTimeout: l, snackbarSeverity: n } = K(Q());
|
|
997
|
+
return (r, s) => {
|
|
998
998
|
const a = p("v-btn"), c = p("v-snackbar");
|
|
999
999
|
return A(), C(c, {
|
|
1000
1000
|
modelValue: u(t),
|
|
1001
|
-
"onUpdate:modelValue":
|
|
1001
|
+
"onUpdate:modelValue": s[1] || (s[1] = (v) => R(t) ? t.value = v : null),
|
|
1002
1002
|
style: { "margin-bottom": "50px" },
|
|
1003
1003
|
"data-testid": "snackbar",
|
|
1004
1004
|
timeout: u(l),
|
|
@@ -1009,7 +1009,7 @@ const it = (e, t) => {
|
|
|
1009
1009
|
d(a, {
|
|
1010
1010
|
color: "snackbarSeverity",
|
|
1011
1011
|
variant: "text",
|
|
1012
|
-
onClick:
|
|
1012
|
+
onClick: s[0] || (s[0] = (v) => t.value = !1)
|
|
1013
1013
|
}, {
|
|
1014
1014
|
default: i(() => [
|
|
1015
1015
|
E(" Close ")
|
|
@@ -1018,7 +1018,7 @@ const it = (e, t) => {
|
|
|
1018
1018
|
})
|
|
1019
1019
|
]),
|
|
1020
1020
|
default: i(() => [
|
|
1021
|
-
E(B(u(
|
|
1021
|
+
E(B(u(o)) + " ", 1)
|
|
1022
1022
|
]),
|
|
1023
1023
|
_: 1
|
|
1024
1024
|
}, 8, ["modelValue", "timeout", "color"]);
|
|
@@ -1033,7 +1033,7 @@ const it = (e, t) => {
|
|
|
1033
1033
|
Modal: at,
|
|
1034
1034
|
ScrollText: ut,
|
|
1035
1035
|
Snackbar: dt,
|
|
1036
|
-
ViewObjectModal:
|
|
1036
|
+
ViewObjectModal: ot
|
|
1037
1037
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1038
1038
|
const pt = 100, Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1039
1039
|
__proto__: null,
|
|
@@ -1094,7 +1094,9 @@ const Bt = {
|
|
|
1094
1094
|
{ Action: "anomalyDetection.CREATE_ANOMALY_DETECTOR" },
|
|
1095
1095
|
{ Action: "dashboards.ACCESS" },
|
|
1096
1096
|
{ Action: "dashboards.CREATE_DASHBOARD" },
|
|
1097
|
-
{ Action: "integrations.ACCESS" }
|
|
1097
|
+
{ Action: "integrations.ACCESS" },
|
|
1098
|
+
{ Action: "trustedcertificates.ACCESS" },
|
|
1099
|
+
{ Action: "trustedcertificates.CREATE" }
|
|
1098
1100
|
], yt = async (e = []) => {
|
|
1099
1101
|
try {
|
|
1100
1102
|
const { data: t } = await f().post(
|
|
@@ -1118,7 +1120,7 @@ const Bt = {
|
|
|
1118
1120
|
const t = [];
|
|
1119
1121
|
e && t.push(e);
|
|
1120
1122
|
try {
|
|
1121
|
-
const { data:
|
|
1123
|
+
const { data: o } = await f().get(
|
|
1122
1124
|
`/api/v1/iotdata/devices/counters/metrics?${t.join("&")}`,
|
|
1123
1125
|
{
|
|
1124
1126
|
headers: {
|
|
@@ -1126,7 +1128,7 @@ const Bt = {
|
|
|
1126
1128
|
}
|
|
1127
1129
|
}
|
|
1128
1130
|
);
|
|
1129
|
-
return
|
|
1131
|
+
return o;
|
|
1130
1132
|
} catch {
|
|
1131
1133
|
throw new Error("Devices Counters API Error");
|
|
1132
1134
|
}
|
|
@@ -1238,9 +1240,9 @@ const Bt = {
|
|
|
1238
1240
|
}, Lt = {
|
|
1239
1241
|
getTwinsCountersLatestByUUID: Et,
|
|
1240
1242
|
getTwinsCountersByUUID: At
|
|
1241
|
-
}, Ct = async (e, t,
|
|
1243
|
+
}, Ct = async (e, t, o, l) => {
|
|
1242
1244
|
const n = [];
|
|
1243
|
-
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`),
|
|
1245
|
+
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`), o && n.push(`sort=${o}`), l && n.push(l);
|
|
1244
1246
|
try {
|
|
1245
1247
|
const { data: r } = await f().get(
|
|
1246
1248
|
`/api/v1/devices?${n.join("&")}`,
|
|
@@ -1269,7 +1271,7 @@ const Bt = {
|
|
|
1269
1271
|
} catch {
|
|
1270
1272
|
throw new Error("Devices API Error");
|
|
1271
1273
|
}
|
|
1272
|
-
},
|
|
1274
|
+
}, St = async (e) => {
|
|
1273
1275
|
try {
|
|
1274
1276
|
const { data: t } = await f().get(
|
|
1275
1277
|
`/api/v1/devices/${e}`,
|
|
@@ -1283,7 +1285,7 @@ const Bt = {
|
|
|
1283
1285
|
} catch {
|
|
1284
1286
|
throw new Error("Devices API Error");
|
|
1285
1287
|
}
|
|
1286
|
-
},
|
|
1288
|
+
}, Tt = async (e) => {
|
|
1287
1289
|
try {
|
|
1288
1290
|
const { data: t } = await f().get(
|
|
1289
1291
|
`/api/v1/devices?arrayUUIDs=${e.join(",")}`,
|
|
@@ -1314,8 +1316,8 @@ const Bt = {
|
|
|
1314
1316
|
}, G = {
|
|
1315
1317
|
getDevices: Ct,
|
|
1316
1318
|
queryDevices: It,
|
|
1317
|
-
getDeviceByUUID:
|
|
1318
|
-
getDeviceByUUIDs:
|
|
1319
|
+
getDeviceByUUID: St,
|
|
1320
|
+
getDeviceByUUIDs: Tt,
|
|
1319
1321
|
getDeviceAttachements: Ut
|
|
1320
1322
|
}, Dt = async (e) => {
|
|
1321
1323
|
try {
|
|
@@ -1335,7 +1337,7 @@ const Bt = {
|
|
|
1335
1337
|
}, Nt = {
|
|
1336
1338
|
queryTimeseries: Dt
|
|
1337
1339
|
}, kt = async () => {
|
|
1338
|
-
var e, t,
|
|
1340
|
+
var e, t, o, l, n, r, s;
|
|
1339
1341
|
try {
|
|
1340
1342
|
const { data: a } = await f().get(
|
|
1341
1343
|
"/api/v1/iotdata/meta-data/metrics",
|
|
@@ -1347,11 +1349,11 @@ const Bt = {
|
|
|
1347
1349
|
);
|
|
1348
1350
|
return a.fields;
|
|
1349
1351
|
} catch (a) {
|
|
1350
|
-
const c = typeof ((t = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : t.message) == "string" ? (l = (
|
|
1351
|
-
throw new Error(`API Error ${(
|
|
1352
|
+
const c = typeof ((t = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : t.message) == "string" ? (l = (o = a == null ? void 0 : a.response) == null ? void 0 : o.data) == null ? void 0 : l.message : typeof ((n = a == null ? void 0 : a.response) == null ? void 0 : n.data) == "string" ? (r = a == null ? void 0 : a.response) == null ? void 0 : r.data : "";
|
|
1353
|
+
throw new Error(`API Error ${(s = a == null ? void 0 : a.response) == null ? void 0 : s.status} ${c}`);
|
|
1352
1354
|
}
|
|
1353
1355
|
}, Vt = async (e) => {
|
|
1354
|
-
var t,
|
|
1356
|
+
var t, o, l, n, r, s, a;
|
|
1355
1357
|
try {
|
|
1356
1358
|
const { data: c } = await f().post(
|
|
1357
1359
|
"/api/v1/iotdata/meta-data",
|
|
@@ -1371,24 +1373,24 @@ const Bt = {
|
|
|
1371
1373
|
);
|
|
1372
1374
|
return c;
|
|
1373
1375
|
} catch (c) {
|
|
1374
|
-
const v = typeof ((
|
|
1376
|
+
const v = typeof ((o = (t = c == null ? void 0 : c.response) == null ? void 0 : t.data) == null ? void 0 : o.message) == "string" ? (n = (l = c == null ? void 0 : c.response) == null ? void 0 : l.data) == null ? void 0 : n.message : typeof ((r = c == null ? void 0 : c.response) == null ? void 0 : r.data) == "string" ? (s = c == null ? void 0 : c.response) == null ? void 0 : s.data : "";
|
|
1375
1377
|
throw new Error(`API Error ${(a = c == null ? void 0 : c.response) == null ? void 0 : a.status} ${v}`);
|
|
1376
1378
|
}
|
|
1377
1379
|
}, ie = {
|
|
1378
1380
|
getMetrics: kt,
|
|
1379
1381
|
postMetric: Vt
|
|
1380
1382
|
}, qt = N("userSession", () => {
|
|
1381
|
-
const e = b(JSON.parse(localStorage.getItem("user") || "null")), t = b(JSON.parse(localStorage.getItem("user-permissions") || "[]")),
|
|
1382
|
-
var
|
|
1383
|
-
return ((
|
|
1384
|
-
}), l =
|
|
1383
|
+
const e = b(JSON.parse(localStorage.getItem("user") || "null")), t = b(JSON.parse(localStorage.getItem("user-permissions") || "[]")), o = S(() => {
|
|
1384
|
+
var s;
|
|
1385
|
+
return ((s = e.value) == null ? void 0 : s.name) || "no user";
|
|
1386
|
+
}), l = S(() => (s) => {
|
|
1385
1387
|
var a, c;
|
|
1386
|
-
return
|
|
1388
|
+
return s ? ((c = (a = t.value) == null ? void 0 : a.find((v) => v.Action === s)) == null ? void 0 : c.Allowed) || !1 : !0;
|
|
1387
1389
|
}), n = async () => {
|
|
1388
|
-
var
|
|
1390
|
+
var s, a;
|
|
1389
1391
|
try {
|
|
1390
1392
|
const c = await ce.getUser();
|
|
1391
|
-
if (e.value = c, (
|
|
1393
|
+
if (e.value = c, (s = e.value) != null && s.UUID) {
|
|
1392
1394
|
const v = await ce.getUserPermissions();
|
|
1393
1395
|
t.value = v, localStorage.setItem("user", JSON.stringify(e.value)), localStorage.setItem("user-permissions", JSON.stringify(t.value));
|
|
1394
1396
|
}
|
|
@@ -1398,19 +1400,19 @@ const Bt = {
|
|
|
1398
1400
|
}, r = () => {
|
|
1399
1401
|
e.value = null, t.value = [], localStorage.removeItem("user"), localStorage.removeItem("user-permission"), window.location.href = "/ui/logout";
|
|
1400
1402
|
};
|
|
1401
|
-
return n(), { user: e, pullUser: n, userName:
|
|
1403
|
+
return n(), { user: e, pullUser: n, userName: o, userPermissions: t, getPermission: l, logout: r };
|
|
1402
1404
|
}), zt = N("devices", () => {
|
|
1403
1405
|
const e = b({});
|
|
1404
1406
|
return {
|
|
1405
1407
|
pullDevicesByUUIDs: async (n, r = !1) => {
|
|
1406
|
-
r && n.forEach((
|
|
1407
|
-
delete e.value[
|
|
1408
|
+
r && n.forEach((s) => {
|
|
1409
|
+
delete e.value[s];
|
|
1408
1410
|
});
|
|
1409
1411
|
try {
|
|
1410
|
-
const
|
|
1411
|
-
return
|
|
1412
|
+
const s = await G.getDeviceByUUIDs(n);
|
|
1413
|
+
return s.records.forEach((a) => {
|
|
1412
1414
|
e.value[a.UUID] = a;
|
|
1413
|
-
}),
|
|
1415
|
+
}), s;
|
|
1414
1416
|
} catch {
|
|
1415
1417
|
return {
|
|
1416
1418
|
totalRecords: 0,
|
|
@@ -1418,9 +1420,9 @@ const Bt = {
|
|
|
1418
1420
|
};
|
|
1419
1421
|
}
|
|
1420
1422
|
},
|
|
1421
|
-
pullDevices: async (n, r,
|
|
1423
|
+
pullDevices: async (n, r, s, a) => {
|
|
1422
1424
|
try {
|
|
1423
|
-
const c = await G.getDevices(n, r,
|
|
1425
|
+
const c = await G.getDevices(n, r, s, a);
|
|
1424
1426
|
return c.records.forEach((v) => {
|
|
1425
1427
|
e.value[v.UUID] = v;
|
|
1426
1428
|
}), c;
|
|
@@ -1433,9 +1435,9 @@ const Bt = {
|
|
|
1433
1435
|
},
|
|
1434
1436
|
devicesCollection: e,
|
|
1435
1437
|
getDeviceFromUUID: async (n, r) => {
|
|
1436
|
-
const
|
|
1437
|
-
if (
|
|
1438
|
-
return
|
|
1438
|
+
const s = e.value[n];
|
|
1439
|
+
if (s)
|
|
1440
|
+
return s;
|
|
1439
1441
|
if (r)
|
|
1440
1442
|
return null;
|
|
1441
1443
|
try {
|
|
@@ -1451,14 +1453,14 @@ const Bt = {
|
|
|
1451
1453
|
const e = b({});
|
|
1452
1454
|
return {
|
|
1453
1455
|
pullTwinsByUUIDs: async (n, r = !1) => {
|
|
1454
|
-
r && n.forEach((
|
|
1455
|
-
delete e.value[
|
|
1456
|
+
r && n.forEach((s) => {
|
|
1457
|
+
delete e.value[s];
|
|
1456
1458
|
});
|
|
1457
1459
|
try {
|
|
1458
|
-
const
|
|
1459
|
-
return
|
|
1460
|
+
const s = await W.getTwinByUUIDs(n);
|
|
1461
|
+
return s.records.forEach((a) => {
|
|
1460
1462
|
e.value[a.UUID] = a;
|
|
1461
|
-
}),
|
|
1463
|
+
}), s;
|
|
1462
1464
|
} catch {
|
|
1463
1465
|
return {
|
|
1464
1466
|
totalRecords: 0,
|
|
@@ -1466,9 +1468,9 @@ const Bt = {
|
|
|
1466
1468
|
};
|
|
1467
1469
|
}
|
|
1468
1470
|
},
|
|
1469
|
-
pullTwins: async (n, r,
|
|
1471
|
+
pullTwins: async (n, r, s, a) => {
|
|
1470
1472
|
try {
|
|
1471
|
-
const c = await W.getTwins(n, r,
|
|
1473
|
+
const c = await W.getTwins(n, r, s, a);
|
|
1472
1474
|
return c.records.forEach((v) => {
|
|
1473
1475
|
e.value[v.UUID] = v;
|
|
1474
1476
|
}), c;
|
|
@@ -1481,9 +1483,9 @@ const Bt = {
|
|
|
1481
1483
|
},
|
|
1482
1484
|
twinsCollection: e,
|
|
1483
1485
|
getTwinFromUUID: async (n, r) => {
|
|
1484
|
-
const
|
|
1485
|
-
if (
|
|
1486
|
-
return
|
|
1486
|
+
const s = e.value[n];
|
|
1487
|
+
if (s)
|
|
1488
|
+
return s;
|
|
1487
1489
|
if (r)
|
|
1488
1490
|
return null;
|
|
1489
1491
|
try {
|
|
@@ -1512,10 +1514,10 @@ const Bt = {
|
|
|
1512
1514
|
}, Rt = {
|
|
1513
1515
|
getMetricsCounters: $t
|
|
1514
1516
|
}, Qt = N("metrics", () => {
|
|
1515
|
-
const e = b([]), t = b([]),
|
|
1517
|
+
const e = b([]), t = b([]), o = S(() => (a) => {
|
|
1516
1518
|
var c;
|
|
1517
1519
|
return (c = t.value) == null ? void 0 : c.find((v) => v.name === a);
|
|
1518
|
-
}), l =
|
|
1520
|
+
}), l = S(() => e.value.map((a) => ({ title: `${a.label} ${a.name}`, label: a.label, value: a.name }))), n = async (a) => {
|
|
1519
1521
|
if (!(a && e.value.length))
|
|
1520
1522
|
try {
|
|
1521
1523
|
const c = await ie.getMetrics();
|
|
@@ -1530,7 +1532,7 @@ const Bt = {
|
|
|
1530
1532
|
} catch (a) {
|
|
1531
1533
|
Q().setSnackbarMessage(a, "error");
|
|
1532
1534
|
}
|
|
1533
|
-
},
|
|
1535
|
+
}, s = async (a) => {
|
|
1534
1536
|
let c = !1;
|
|
1535
1537
|
try {
|
|
1536
1538
|
await ie.postMetric(a), c = !0, Q().setSnackbarMessage(`Metric ${a.name} successfully saved`, "success");
|
|
@@ -1544,8 +1546,8 @@ const Bt = {
|
|
|
1544
1546
|
metricsCounters: t,
|
|
1545
1547
|
pullMetrics: n,
|
|
1546
1548
|
pullMetricsCounters: r,
|
|
1547
|
-
getMetricCounter:
|
|
1548
|
-
saveMetric:
|
|
1549
|
+
getMetricCounter: o,
|
|
1550
|
+
saveMetric: s,
|
|
1549
1551
|
metricsArr: l
|
|
1550
1552
|
};
|
|
1551
1553
|
});
|
|
@@ -1574,7 +1576,7 @@ export {
|
|
|
1574
1576
|
Lt as TwinsCountersService,
|
|
1575
1577
|
W as TwinsService,
|
|
1576
1578
|
ce as UserSessionService,
|
|
1577
|
-
|
|
1579
|
+
ot as ViewObjectModal,
|
|
1578
1580
|
Wt as installCoreComponents,
|
|
1579
1581
|
Q as useAlertMessagesStore,
|
|
1580
1582
|
zt as useDevicesStore,
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davra/ui-core",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"docs:serve": "vitepress serve docs",
|
|
11
|
-
"test": "LC_ALL=en_US.UTF-8 TZ=UTC vitest",
|
|
12
|
-
"test:ci": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run",
|
|
13
|
-
"coverage": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run --coverage"
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"exports": {
|
|
5
|
+
".": {
|
|
6
|
+
"import": "./dist/ui-core.es.js",
|
|
7
|
+
"types": "./dist/types/index.d.ts"
|
|
8
|
+
},
|
|
9
|
+
"./dist/style.css": "./dist/style.css"
|
|
14
10
|
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"module": "./dist/ui-core.es.js",
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@vueuse/core": "^9.1.0",
|
|
17
17
|
"@vueuse/head": "^0.7.9",
|
|
@@ -23,6 +23,17 @@
|
|
|
23
23
|
"vue": "^3.3.4",
|
|
24
24
|
"vuetify": "^3.3.16"
|
|
25
25
|
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "rimraf dist && vue-tsc && vite build",
|
|
28
|
+
"build:watch": "rimraf dist && vue-tsc && vite build --watch",
|
|
29
|
+
"coverage": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run --coverage",
|
|
30
|
+
"docs:build": "vitepress build docs",
|
|
31
|
+
"docs:dev": "vitepress dev docs",
|
|
32
|
+
"docs:serve": "vitepress serve docs",
|
|
33
|
+
"test": "LC_ALL=en_US.UTF-8 TZ=UTC vitest",
|
|
34
|
+
"test:ci": "LC_ALL=en_US.UTF-8 TZ=UTC vitest run"
|
|
35
|
+
},
|
|
36
|
+
"types": "./dist/types/index.d.ts",
|
|
26
37
|
"devDependencies": {
|
|
27
38
|
"@pinia/testing": "^0.0.14",
|
|
28
39
|
"@types/node": "^20.3.3",
|
|
@@ -39,16 +50,5 @@
|
|
|
39
50
|
"vitepress": "^0.22.4",
|
|
40
51
|
"vitest": "^0.34.6",
|
|
41
52
|
"vue-tsc": "^1.8.3"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"dist"
|
|
45
|
-
],
|
|
46
|
-
"module": "./dist/ui-core.es.js",
|
|
47
|
-
"exports": {
|
|
48
|
-
".": {
|
|
49
|
-
"types": "./dist/types/index.d.ts",
|
|
50
|
-
"import": "./dist/ui-core.es.js"
|
|
51
|
-
},
|
|
52
|
-
"./dist/style.css": "./dist/style.css"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|