@davra/ui-core 1.0.0-alpha.3 → 1.0.0-alpha.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/style.css +1 -1
- package/dist/types/components/index.d.ts +3 -3
- package/dist/types/components/labels/LabelInput.vue.d.ts +46 -0
- package/dist/types/components/labels/LabelsSelector.vue.d.ts +24 -0
- package/dist/types/components/labels/index.d.ts +3 -0
- package/dist/types/components/labels/labelInput.test.d.ts +1 -0
- package/dist/types/components/labels/labelsSelector.test.d.ts +1 -0
- package/dist/types/components/modals/ConfirmModal.vue.d.ts +21 -0
- package/dist/types/components/modals/DeleteModal.vue.d.ts +34 -0
- package/dist/types/components/modals/Modal.vue.d.ts +26 -0
- package/dist/types/components/modals/ViewObjectModal.vue.d.ts +44 -0
- package/dist/types/components/modals/index.d.ts +5 -0
- package/dist/types/components/utils/ColorInput.vue.d.ts +14 -0
- package/dist/types/components/utils/IconInput.vue.d.ts +14 -0
- package/dist/types/components/utils/ScrollText.vue.d.ts +9 -0
- package/dist/types/components/utils/colorInput.test.d.ts +1 -0
- package/dist/types/components/utils/index.d.ts +4 -0
- package/dist/types/components/utils/snackbar.test.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/services/davraApi.d.ts +1 -3
- package/dist/types/services/devicesCountersService.d.ts +1 -1
- package/dist/types/services/devicesService.d.ts +1 -1
- package/dist/types/services/index.d.ts +3 -2
- package/dist/types/services/metricsCountersService.d.ts +1 -1
- package/dist/types/services/metricsService.d.ts +1 -1
- package/dist/types/services/timeseriesService.d.ts +1 -1
- package/dist/types/services/twinTypesService.d.ts +1 -1
- package/dist/types/services/twinsCountersService.d.ts +1 -1
- package/dist/types/services/twinsService.d.ts +1 -1
- package/dist/types/services/userSessionService.d.ts +1 -1
- package/dist/types/stores/devices.d.ts +1 -1
- package/dist/types/stores/metrics.d.ts +1 -1
- package/dist/types/stores/twinTypes.d.ts +1 -1
- package/dist/types/stores/twins.d.ts +1 -1
- package/dist/types/stores/userSession.d.ts +1 -1
- package/dist/ui-core.es.js +1246 -1595
- package/package.json +8 -2
- package/dist/types/components/ComponentA.vue.d.ts +0 -12
- /package/dist/types/components/{ComponentB.vue.d.ts → utils/Snackbar.vue.d.ts} +0 -0
package/dist/ui-core.es.js
CHANGED
@@ -1,919 +1,1098 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
},
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
});
|
18
|
-
var S = {
|
19
|
-
innerWidth(e) {
|
20
|
-
if (e) {
|
21
|
-
let t = e.offsetWidth, n = getComputedStyle(e);
|
22
|
-
return t += parseFloat(n.paddingLeft) + parseFloat(n.paddingRight), t;
|
23
|
-
}
|
24
|
-
return 0;
|
25
|
-
},
|
26
|
-
width(e) {
|
27
|
-
if (e) {
|
28
|
-
let t = e.offsetWidth, n = getComputedStyle(e);
|
29
|
-
return t -= parseFloat(n.paddingLeft) + parseFloat(n.paddingRight), t;
|
30
|
-
}
|
31
|
-
return 0;
|
32
|
-
},
|
33
|
-
getWindowScrollTop() {
|
34
|
-
let e = document.documentElement;
|
35
|
-
return (window.pageYOffset || e.scrollTop) - (e.clientTop || 0);
|
36
|
-
},
|
37
|
-
getWindowScrollLeft() {
|
38
|
-
let e = document.documentElement;
|
39
|
-
return (window.pageXOffset || e.scrollLeft) - (e.clientLeft || 0);
|
40
|
-
},
|
41
|
-
getOuterWidth(e, t) {
|
42
|
-
if (e) {
|
43
|
-
let n = e.offsetWidth;
|
44
|
-
if (t) {
|
45
|
-
let s = getComputedStyle(e);
|
46
|
-
n += parseFloat(s.marginLeft) + parseFloat(s.marginRight);
|
1
|
+
import { getCurrentInstance as be, ref as h, watch as K, computed as S, defineComponent as B, onMounted as ue, resolveComponent as p, openBlock as g, createBlock as E, withCtx as i, createVNode as d, unref as u, isRef as U, readonly as z, createTextVNode as C, toDisplayString as x, createCommentVNode as P, mergeProps as N, withDirectives as he, vShow as ge, createElementVNode as de, createElementBlock as pe, Fragment as Ae, renderList as Ee, renderSlot as F, inject as Ce, normalizeProps as Ie, guardReactiveProps as Se, useCssVars as Te, normalizeClass as Ue } from "vue";
|
2
|
+
import De from "axios";
|
3
|
+
import { defineStore as q, storeToRefs as G } from "pinia";
|
4
|
+
const ee = {
|
5
|
+
baseURL: ""
|
6
|
+
}, w = (e = "") => De.create({
|
7
|
+
...ee,
|
8
|
+
baseURL: e || ee.baseURL
|
9
|
+
}), ke = async () => {
|
10
|
+
try {
|
11
|
+
const { data: e } = await w().get(
|
12
|
+
"/api/v1/tags/keys",
|
13
|
+
{
|
14
|
+
headers: {
|
15
|
+
Accept: "application/json"
|
16
|
+
}
|
47
17
|
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
18
|
+
);
|
19
|
+
return e || [];
|
20
|
+
} catch {
|
21
|
+
return [];
|
22
|
+
}
|
23
|
+
}, Ve = async (e) => {
|
24
|
+
try {
|
25
|
+
const { data: t } = await w().get(
|
26
|
+
`/api/v1/tags/values/${e}`,
|
27
|
+
{
|
28
|
+
headers: {
|
29
|
+
Accept: "application/json"
|
30
|
+
}
|
58
31
|
}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
32
|
+
);
|
33
|
+
return t || [];
|
34
|
+
} catch {
|
35
|
+
return [];
|
36
|
+
}
|
37
|
+
}, $e = async (e, t) => {
|
38
|
+
const s = { ...e };
|
39
|
+
Object.entries(s).forEach(([r, n]) => {
|
40
|
+
t && t.includes(r) && delete s[r], (!n || /[^a-zA-Z_0-9\-+]/g.test(n)) && delete s[r];
|
41
|
+
});
|
42
|
+
try {
|
43
|
+
return await w().post(
|
44
|
+
"/api/v1/tags",
|
45
|
+
s,
|
46
|
+
{
|
47
|
+
headers: {
|
48
|
+
Accept: "application/json"
|
49
|
+
}
|
69
50
|
}
|
70
|
-
|
71
|
-
|
72
|
-
return
|
73
|
-
}
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
left: "auto"
|
89
|
-
};
|
90
|
-
},
|
91
|
-
index(e) {
|
92
|
-
if (e) {
|
93
|
-
let t = e.parentNode.childNodes, n = 0;
|
94
|
-
for (let s = 0; s < t.length; s++) {
|
95
|
-
if (t[s] === e)
|
96
|
-
return n;
|
97
|
-
t[s].nodeType === 1 && n++;
|
51
|
+
), !0;
|
52
|
+
} catch {
|
53
|
+
return !1;
|
54
|
+
}
|
55
|
+
}, Z = {
|
56
|
+
getLabels: ke,
|
57
|
+
createLabel: $e,
|
58
|
+
getValuesByKey: Ve
|
59
|
+
}, Re = async (e = 0, t = 1e3, s, r) => {
|
60
|
+
const n = [];
|
61
|
+
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`), s && n.push(`sort=${s}`), r && n.push(r);
|
62
|
+
try {
|
63
|
+
const { data: l, headers: o } = await w().get(
|
64
|
+
`/api/v1/twins?${n.join("&")}`,
|
65
|
+
{
|
66
|
+
headers: {
|
67
|
+
Accept: "application/json"
|
68
|
+
}
|
98
69
|
}
|
99
|
-
|
100
|
-
return -
|
101
|
-
}
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
70
|
+
);
|
71
|
+
return { totalRecords: parseInt(o["com-davra-total-results"]), records: l };
|
72
|
+
} catch {
|
73
|
+
throw new Error("Twins API Error");
|
74
|
+
}
|
75
|
+
}, je = async (e) => {
|
76
|
+
try {
|
77
|
+
const { data: t, headers: s } = await w().post(
|
78
|
+
"/api/v1/twins/query",
|
79
|
+
e,
|
80
|
+
{
|
81
|
+
headers: {
|
82
|
+
Accept: "application/json"
|
83
|
+
}
|
112
84
|
}
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
},
|
126
|
-
findSingle(e, t) {
|
127
|
-
return this.isElement(e) ? e.querySelector(t) : null;
|
128
|
-
},
|
129
|
-
getHeight(e) {
|
130
|
-
if (e) {
|
131
|
-
let t = e.offsetHeight, n = getComputedStyle(e);
|
132
|
-
return t -= parseFloat(n.paddingTop) + parseFloat(n.paddingBottom) + parseFloat(n.borderTopWidth) + parseFloat(n.borderBottomWidth), t;
|
133
|
-
}
|
134
|
-
return 0;
|
135
|
-
},
|
136
|
-
getWidth(e) {
|
137
|
-
if (e) {
|
138
|
-
let t = e.offsetWidth, n = getComputedStyle(e);
|
139
|
-
return t -= parseFloat(n.paddingLeft) + parseFloat(n.paddingRight) + parseFloat(n.borderLeftWidth) + parseFloat(n.borderRightWidth), t;
|
140
|
-
}
|
141
|
-
return 0;
|
142
|
-
},
|
143
|
-
absolutePosition(e, t) {
|
144
|
-
if (e) {
|
145
|
-
let n = e.offsetParent ? { width: e.offsetWidth, height: e.offsetHeight } : this.getHiddenElementDimensions(e), s = n.height, o = n.width, r = t.offsetHeight, a = t.offsetWidth, i = t.getBoundingClientRect(), c = this.getWindowScrollTop(), d = this.getWindowScrollLeft(), y = this.getViewport(), h, m;
|
146
|
-
i.top + r + s > y.height ? (h = i.top + c - s, e.style.transformOrigin = "bottom", h < 0 && (h = c)) : (h = r + i.top + c, e.style.transformOrigin = "top"), i.left + o > y.width ? m = Math.max(0, i.left + d + a - o) : m = i.left + d, e.style.top = h + "px", e.style.left = m + "px";
|
147
|
-
}
|
148
|
-
},
|
149
|
-
relativePosition(e, t) {
|
150
|
-
if (e) {
|
151
|
-
let n = e.offsetParent ? { width: e.offsetWidth, height: e.offsetHeight } : this.getHiddenElementDimensions(e);
|
152
|
-
const s = t.offsetHeight, o = t.getBoundingClientRect(), r = this.getViewport();
|
153
|
-
let a, i;
|
154
|
-
o.top + s + n.height > r.height ? (a = -1 * n.height, e.style.transformOrigin = "bottom", o.top + a < 0 && (a = -1 * o.top)) : (a = s, e.style.transformOrigin = "top"), n.width > r.width ? i = o.left * -1 : o.left + n.width > r.width ? i = (o.left + n.width - r.width) * -1 : i = 0, e.style.top = a + "px", e.style.left = i + "px";
|
155
|
-
}
|
156
|
-
},
|
157
|
-
getParents(e, t = []) {
|
158
|
-
return e.parentNode === null ? t : this.getParents(e.parentNode, t.concat([e.parentNode]));
|
159
|
-
},
|
160
|
-
getScrollableParents(e) {
|
161
|
-
let t = [];
|
162
|
-
if (e) {
|
163
|
-
let n = this.getParents(e);
|
164
|
-
const s = /(auto|scroll)/, o = (r) => {
|
165
|
-
let a = window.getComputedStyle(r, null);
|
166
|
-
return s.test(a.getPropertyValue("overflow")) || s.test(a.getPropertyValue("overflowX")) || s.test(a.getPropertyValue("overflowY"));
|
167
|
-
};
|
168
|
-
for (let r of n) {
|
169
|
-
let a = r.nodeType === 1 && r.dataset.scrollselectors;
|
170
|
-
if (a) {
|
171
|
-
let i = a.split(",");
|
172
|
-
for (let c of i) {
|
173
|
-
let d = this.findSingle(r, c);
|
174
|
-
d && o(d) && t.push(d);
|
175
|
-
}
|
85
|
+
);
|
86
|
+
return { totalRecords: parseInt(s["com-davra-total-results"]), records: t };
|
87
|
+
} catch {
|
88
|
+
throw new Error("Twins API Error");
|
89
|
+
}
|
90
|
+
}, Oe = async (e) => {
|
91
|
+
try {
|
92
|
+
const { data: t, headers: s } = await w().get(
|
93
|
+
`/api/v1/twins?arrayUUIDs=${e.join(",")}`,
|
94
|
+
{
|
95
|
+
headers: {
|
96
|
+
Accept: "application/json"
|
176
97
|
}
|
177
|
-
r.nodeType !== 9 && o(r) && t.push(r);
|
178
98
|
}
|
179
|
-
|
180
|
-
return t;
|
181
|
-
}
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
return e.style.display = "none", e.style.visibility = "visible", t;
|
195
|
-
}
|
196
|
-
return 0;
|
197
|
-
},
|
198
|
-
getHiddenElementDimensions(e) {
|
199
|
-
if (e) {
|
200
|
-
let t = {};
|
201
|
-
return e.style.visibility = "hidden", e.style.display = "block", t.width = e.offsetWidth, t.height = e.offsetHeight, e.style.display = "none", e.style.visibility = "visible", t;
|
202
|
-
}
|
203
|
-
return 0;
|
204
|
-
},
|
205
|
-
fadeIn(e, t) {
|
206
|
-
if (e) {
|
207
|
-
e.style.opacity = 0;
|
208
|
-
let n = +/* @__PURE__ */ new Date(), s = 0, o = function() {
|
209
|
-
s = +e.style.opacity + ((/* @__PURE__ */ new Date()).getTime() - n) / t, e.style.opacity = s, n = +/* @__PURE__ */ new Date(), +s < 1 && (window.requestAnimationFrame && requestAnimationFrame(o) || setTimeout(o, 16));
|
210
|
-
};
|
211
|
-
o();
|
212
|
-
}
|
213
|
-
},
|
214
|
-
fadeOut(e, t) {
|
215
|
-
if (e) {
|
216
|
-
let n = 1, s = 50, o = t, r = s / o, a = setInterval(() => {
|
217
|
-
n -= r, n <= 0 && (n = 0, clearInterval(a)), e.style.opacity = n;
|
218
|
-
}, s);
|
219
|
-
}
|
220
|
-
},
|
221
|
-
getUserAgent() {
|
222
|
-
return navigator.userAgent;
|
223
|
-
},
|
224
|
-
appendChild(e, t) {
|
225
|
-
if (this.isElement(t))
|
226
|
-
t.appendChild(e);
|
227
|
-
else if (t.el && t.elElement)
|
228
|
-
t.elElement.appendChild(e);
|
229
|
-
else
|
230
|
-
throw new Error("Cannot append " + t + " to " + e);
|
231
|
-
},
|
232
|
-
isElement(e) {
|
233
|
-
return typeof HTMLElement == "object" ? e instanceof HTMLElement : e && typeof e == "object" && e !== null && e.nodeType === 1 && typeof e.nodeName == "string";
|
234
|
-
},
|
235
|
-
scrollInView(e, t) {
|
236
|
-
let n = getComputedStyle(e).getPropertyValue("borderTopWidth"), s = n ? parseFloat(n) : 0, o = getComputedStyle(e).getPropertyValue("paddingTop"), r = o ? parseFloat(o) : 0, a = e.getBoundingClientRect(), c = t.getBoundingClientRect().top + document.body.scrollTop - (a.top + document.body.scrollTop) - s - r, d = e.scrollTop, y = e.clientHeight, h = this.getOuterHeight(t);
|
237
|
-
c < 0 ? e.scrollTop = d + c : c + h > y && (e.scrollTop = d + c - y + h);
|
238
|
-
},
|
239
|
-
clearSelection() {
|
240
|
-
if (window.getSelection)
|
241
|
-
window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().rangeCount > 0 && window.getSelection().getRangeAt(0).getClientRects().length > 0 && window.getSelection().removeAllRanges();
|
242
|
-
else if (document.selection && document.selection.empty)
|
243
|
-
try {
|
244
|
-
document.selection.empty();
|
245
|
-
} catch {
|
99
|
+
);
|
100
|
+
return { totalRecords: parseInt(s["com-davra-total-results"]), records: t };
|
101
|
+
} catch {
|
102
|
+
throw new Error("Twins API Error");
|
103
|
+
}
|
104
|
+
}, Me = async (e, t = 0, s = 1e3, r, n) => {
|
105
|
+
const l = [`digitalTwinTypeName=${e}`, `limit=${s}`, `start=${t}`];
|
106
|
+
r && l.push(`sort=${r}`), n && l.push(`name=~${n}`);
|
107
|
+
try {
|
108
|
+
const { data: o, headers: a } = await w().get(
|
109
|
+
`/api/v1/twins/?${l.join("&")}`,
|
110
|
+
{
|
111
|
+
headers: {
|
112
|
+
Accept: "application/json"
|
113
|
+
}
|
246
114
|
}
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
calculateScrollbarWidth() {
|
252
|
-
if (this.calculatedScrollbarWidth != null)
|
253
|
-
return this.calculatedScrollbarWidth;
|
254
|
-
let e = document.createElement("div");
|
255
|
-
e.className = "p-scrollbar-measure", document.body.appendChild(e);
|
256
|
-
let t = e.offsetWidth - e.clientWidth;
|
257
|
-
return document.body.removeChild(e), this.calculatedScrollbarWidth = t, t;
|
258
|
-
},
|
259
|
-
getBrowser() {
|
260
|
-
if (!this.browser) {
|
261
|
-
let e = this.resolveUserAgent();
|
262
|
-
this.browser = {}, e.browser && (this.browser[e.browser] = !0, this.browser.version = e.version), this.browser.chrome ? this.browser.webkit = !0 : this.browser.webkit && (this.browser.safari = !0);
|
263
|
-
}
|
264
|
-
return this.browser;
|
265
|
-
},
|
266
|
-
resolveUserAgent() {
|
267
|
-
let e = navigator.userAgent.toLowerCase(), t = /(chrome)[ ]([\w.]+)/.exec(e) || /(webkit)[ ]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ ]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || e.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e) || [];
|
268
|
-
return {
|
269
|
-
browser: t[1] || "",
|
270
|
-
version: t[2] || "0"
|
271
|
-
};
|
272
|
-
},
|
273
|
-
isVisible(e) {
|
274
|
-
return e && e.offsetParent != null;
|
275
|
-
},
|
276
|
-
invokeElementMethod(e, t, n) {
|
277
|
-
e[t].apply(e, n);
|
278
|
-
},
|
279
|
-
isExist(e) {
|
280
|
-
return !!(e !== null && typeof e < "u" && e.nodeName && e.parentNode);
|
281
|
-
},
|
282
|
-
isClient() {
|
283
|
-
return !!(typeof window < "u" && window.document && window.document.createElement);
|
284
|
-
},
|
285
|
-
focus(e, t) {
|
286
|
-
e && document.activeElement !== e && e.focus(t);
|
287
|
-
},
|
288
|
-
isFocusableElement(e, t = "") {
|
289
|
-
return this.isElement(e) ? e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
290
|
-
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
291
|
-
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
292
|
-
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
293
|
-
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
294
|
-
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
295
|
-
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`) : !1;
|
296
|
-
},
|
297
|
-
getFocusableElements(e, t = "") {
|
298
|
-
let n = this.find(
|
299
|
-
e,
|
300
|
-
`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
301
|
-
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
302
|
-
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
303
|
-
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
304
|
-
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
305
|
-
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
306
|
-
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`
|
307
|
-
), s = [];
|
308
|
-
for (let o of n)
|
309
|
-
getComputedStyle(o).display != "none" && getComputedStyle(o).visibility != "hidden" && s.push(o);
|
310
|
-
return s;
|
311
|
-
},
|
312
|
-
getFirstFocusableElement(e, t) {
|
313
|
-
const n = this.getFocusableElements(e, t);
|
314
|
-
return n.length > 0 ? n[0] : null;
|
315
|
-
},
|
316
|
-
getLastFocusableElement(e, t) {
|
317
|
-
const n = this.getFocusableElements(e, t);
|
318
|
-
return n.length > 0 ? n[n.length - 1] : null;
|
319
|
-
},
|
320
|
-
getNextFocusableElement(e, t, n) {
|
321
|
-
const s = this.getFocusableElements(e, n), o = s.length > 0 ? s.findIndex((a) => a === t) : -1, r = o > -1 && s.length >= o + 1 ? o + 1 : -1;
|
322
|
-
return r > -1 ? s[r] : null;
|
323
|
-
},
|
324
|
-
isClickable(e) {
|
325
|
-
if (e) {
|
326
|
-
const t = e.nodeName, n = e.parentElement && e.parentElement.nodeName;
|
327
|
-
return t === "INPUT" || t === "TEXTAREA" || t === "BUTTON" || t === "A" || n === "INPUT" || n === "TEXTAREA" || n === "BUTTON" || n === "A" || !!e.closest(".p-button, .p-checkbox, .p-radiobutton");
|
328
|
-
}
|
329
|
-
return !1;
|
330
|
-
},
|
331
|
-
applyStyle(e, t) {
|
332
|
-
if (typeof t == "string")
|
333
|
-
e.style.cssText = t;
|
334
|
-
else
|
335
|
-
for (let n in t)
|
336
|
-
e.style[n] = t[n];
|
337
|
-
},
|
338
|
-
isIOS() {
|
339
|
-
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
340
|
-
},
|
341
|
-
isAndroid() {
|
342
|
-
return /(android)/i.test(navigator.userAgent);
|
343
|
-
},
|
344
|
-
isTouchDevice() {
|
345
|
-
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
346
|
-
},
|
347
|
-
exportCSV(e, t) {
|
348
|
-
let n = new Blob([e], {
|
349
|
-
type: "application/csv;charset=utf-8;"
|
350
|
-
});
|
351
|
-
if (window.navigator.msSaveOrOpenBlob)
|
352
|
-
navigator.msSaveOrOpenBlob(n, t + ".csv");
|
353
|
-
else {
|
354
|
-
let s = document.createElement("a");
|
355
|
-
s.download !== void 0 ? (s.setAttribute("href", URL.createObjectURL(n)), s.setAttribute("download", t + ".csv"), s.style.display = "none", document.body.appendChild(s), s.click(), document.body.removeChild(s)) : (e = "data:text/csv;charset=utf-8," + e, window.open(encodeURI(e)));
|
356
|
-
}
|
115
|
+
);
|
116
|
+
return { totalRecords: parseInt(a["com-davra-total-results"]), records: o };
|
117
|
+
} catch {
|
118
|
+
throw new Error("Twins API Error");
|
357
119
|
}
|
358
|
-
},
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
var n = Array.isArray(e), s = Array.isArray(t), o, r, a;
|
367
|
-
if (n && s) {
|
368
|
-
if (r = e.length, r != t.length)
|
369
|
-
return !1;
|
370
|
-
for (o = r; o-- !== 0; )
|
371
|
-
if (!this.deepEquals(e[o], t[o]))
|
372
|
-
return !1;
|
373
|
-
return !0;
|
120
|
+
}, Pe = async (e) => {
|
121
|
+
try {
|
122
|
+
const { data: t } = await w().get(
|
123
|
+
`/api/v1/twins/${e}`,
|
124
|
+
{
|
125
|
+
headers: {
|
126
|
+
Accept: "application/json"
|
127
|
+
}
|
374
128
|
}
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
return !1;
|
385
|
-
if (d && y)
|
386
|
-
return e.toString() == t.toString();
|
387
|
-
var h = Object.keys(e);
|
388
|
-
if (r = h.length, r !== Object.keys(t).length)
|
389
|
-
return !1;
|
390
|
-
for (o = r; o-- !== 0; )
|
391
|
-
if (!Object.prototype.hasOwnProperty.call(t, h[o]))
|
392
|
-
return !1;
|
393
|
-
for (o = r; o-- !== 0; )
|
394
|
-
if (a = h[o], !this.deepEquals(e[a], t[a]))
|
395
|
-
return !1;
|
396
|
-
return !0;
|
397
|
-
}
|
398
|
-
return e !== e && t !== t;
|
399
|
-
},
|
400
|
-
resolveFieldData(e, t) {
|
401
|
-
if (e && Object.keys(e).length && t) {
|
402
|
-
if (this.isFunction(t))
|
403
|
-
return t(e);
|
404
|
-
if (t.indexOf(".") === -1)
|
405
|
-
return e[t];
|
129
|
+
);
|
130
|
+
return t;
|
131
|
+
} catch {
|
132
|
+
throw new Error("Twins API Error");
|
133
|
+
}
|
134
|
+
}, xe = async (e) => {
|
135
|
+
try {
|
136
|
+
const { data: t } = await w().get(
|
137
|
+
`/api/v1/twins/${e}/attachments`,
|
406
138
|
{
|
407
|
-
|
408
|
-
|
409
|
-
if (r == null)
|
410
|
-
return null;
|
411
|
-
r = r[o[n]];
|
139
|
+
headers: {
|
140
|
+
Accept: "application/json"
|
412
141
|
}
|
413
|
-
return r;
|
414
142
|
}
|
415
|
-
|
416
|
-
|
417
|
-
}
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
143
|
+
);
|
144
|
+
return t;
|
145
|
+
} catch {
|
146
|
+
throw new Error("Twins API Error");
|
147
|
+
}
|
148
|
+
}, J = {
|
149
|
+
getTwins: Re,
|
150
|
+
getTwinsByTypeName: Me,
|
151
|
+
getTwinByUUID: Pe,
|
152
|
+
getTwinByUUIDs: Oe,
|
153
|
+
getTwinAttachements: xe,
|
154
|
+
queryTwins: je
|
155
|
+
};
|
156
|
+
var te;
|
157
|
+
const Be = typeof window < "u", Le = (e) => typeof e < "u", Ne = (e) => typeof e == "function";
|
158
|
+
Be && ((te = window == null ? void 0 : window.navigator) != null && te.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
159
|
+
function qe(e) {
|
160
|
+
return e;
|
161
|
+
}
|
162
|
+
function ze(e) {
|
163
|
+
return JSON.parse(JSON.stringify(e));
|
164
|
+
}
|
165
|
+
const ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ne = "__vueuse_ssr_handlers__";
|
166
|
+
ae[ne] = ae[ne] || {};
|
167
|
+
var oe;
|
168
|
+
(function(e) {
|
169
|
+
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
170
|
+
})(oe || (oe = {}));
|
171
|
+
var Fe = Object.defineProperty, se = Object.getOwnPropertySymbols, Qe = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable, re = (e, t, s) => t in e ? Fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, Je = (e, t) => {
|
172
|
+
for (var s in t || (t = {}))
|
173
|
+
Qe.call(t, s) && re(e, s, t[s]);
|
174
|
+
if (se)
|
175
|
+
for (var s of se(t))
|
176
|
+
We.call(t, s) && re(e, s, t[s]);
|
177
|
+
return e;
|
178
|
+
};
|
179
|
+
const Ke = {
|
180
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
181
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
182
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
183
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
184
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
185
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
186
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
187
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
188
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
189
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
190
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
191
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
192
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
193
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
194
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
195
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
196
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
197
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
198
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
199
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
200
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
201
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
202
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
203
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
204
|
+
};
|
205
|
+
Je({
|
206
|
+
linear: qe
|
207
|
+
}, Ke);
|
208
|
+
function W(e, t, s, r = {}) {
|
209
|
+
var n, l, o;
|
210
|
+
const {
|
211
|
+
clone: a = !1,
|
212
|
+
passive: c = !1,
|
213
|
+
eventName: v,
|
214
|
+
deep: y = !1,
|
215
|
+
defaultValue: _
|
216
|
+
} = r, b = be(), I = s || (b == null ? void 0 : b.emit) || ((n = b == null ? void 0 : b.$emit) == null ? void 0 : n.bind(b)) || ((o = (l = b == null ? void 0 : b.proxy) == null ? void 0 : l.$emit) == null ? void 0 : o.bind(b == null ? void 0 : b.proxy));
|
217
|
+
let T = v;
|
218
|
+
t || (t = "modelValue"), T = v || T || `update:${t.toString()}`;
|
219
|
+
const j = (k) => a ? Ne(a) ? a(k) : ze(k) : k, D = () => Le(e[t]) ? j(e[t]) : _;
|
220
|
+
if (c) {
|
221
|
+
const k = D(), O = h(k);
|
222
|
+
return K(() => e[t], (m) => O.value = j(m)), K(O, (m) => {
|
223
|
+
(m !== e[t] || y) && I(T, m);
|
224
|
+
}, { deep: y }), O;
|
225
|
+
} else
|
226
|
+
return S({
|
227
|
+
get() {
|
228
|
+
return D();
|
229
|
+
},
|
230
|
+
set(k) {
|
231
|
+
I(T, k);
|
232
|
+
}
|
233
|
+
});
|
234
|
+
}
|
235
|
+
function Ge(e, t, s = {}) {
|
236
|
+
const r = {};
|
237
|
+
for (const n in e)
|
238
|
+
r[n] = W(e, n, t, s);
|
239
|
+
return r;
|
240
|
+
}
|
241
|
+
const He = /* @__PURE__ */ de("span", null, null, -1), Ye = /* @__PURE__ */ de("span", null, null, -1), ve = /* @__PURE__ */ B({
|
242
|
+
__name: "LabelInput",
|
243
|
+
props: {
|
244
|
+
labels: {},
|
245
|
+
twintypes: {},
|
246
|
+
labelkey: {},
|
247
|
+
labelvalue: {},
|
248
|
+
readonly: { type: Boolean }
|
249
|
+
},
|
250
|
+
emits: ["update:labelkey", "update:labelvalue", "removelabel"],
|
251
|
+
setup(e, { emit: t }) {
|
252
|
+
const s = e, r = S(() => [
|
253
|
+
{ header: "Keys", color: "blue", icon: "mdi-label" },
|
254
|
+
...s.labels,
|
255
|
+
{ header: "Digital Twin Types", color: "purple", icon: "mdi-content-duplicate" },
|
256
|
+
...s.twintypes
|
257
|
+
]), { labelkey: n, labelvalue: l } = Ge(s, t), o = h(""), a = h(""), c = h([]), v = h([]), y = h(!1), _ = (m) => s.twintypes.find((A) => A === m) ? "twintypes" : "labels", b = S(() => _(n.value)), I = () => {
|
258
|
+
document.activeElement.blur();
|
259
|
+
}, T = (m) => {
|
260
|
+
m.key === "Enter" && I();
|
261
|
+
}, j = async (m) => {
|
262
|
+
const A = _(m);
|
263
|
+
if (y.value = !0, A === "twintypes")
|
264
|
+
try {
|
265
|
+
const V = await J.getTwinsByTypeName(m);
|
266
|
+
v.value = V.records.map((R) => ({ value: R.UUID, label: R.name }));
|
267
|
+
} catch {
|
446
268
|
}
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
269
|
+
else if (A === "labels")
|
270
|
+
try {
|
271
|
+
const V = await Z.getValuesByKey(m);
|
272
|
+
c.value = V;
|
273
|
+
} catch {
|
274
|
+
}
|
275
|
+
else
|
276
|
+
v.value = [], c.value = [];
|
277
|
+
y.value = !1;
|
278
|
+
};
|
279
|
+
K(n, async (m, A) => {
|
280
|
+
m !== A && (j(m), A !== "" && (l.value = ""));
|
281
|
+
});
|
282
|
+
const D = h(), k = S(() => {
|
283
|
+
var m;
|
284
|
+
return (m = D.value) == null ? void 0 : m.isFocused;
|
285
|
+
}), O = {
|
286
|
+
specialNames: (m) => ![
|
287
|
+
"deviceid",
|
288
|
+
"uuid",
|
289
|
+
"tags",
|
290
|
+
"serialnumber",
|
291
|
+
"tenantid",
|
292
|
+
"userid"
|
293
|
+
].includes(m.toLowerCase().trim()) || "cannot use this name",
|
294
|
+
alphanumericAndDash: (m) => !/[^a-zA-Z_0-9\-+]/g.test(m) || "No spaces and Only alphanumeric and dash or underscore",
|
295
|
+
notEmpty: (m) => !!m.trim() || "Required"
|
296
|
+
};
|
297
|
+
return ue(() => {
|
298
|
+
n.value && j(n.value);
|
299
|
+
}), (m, A) => {
|
300
|
+
const V = p("v-icon"), R = p("v-chip"), $ = p("v-list-item-title"), M = p("v-list-item"), X = p("v-combobox"), H = p("v-col"), _e = p("v-autocomplete"), fe = p("v-btn"), we = p("v-row");
|
301
|
+
return g(), E(we, { class: "py-2" }, {
|
302
|
+
default: i(() => [
|
303
|
+
d(H, { class: "py-0 flex-grow-1 flex-shrink-0" }, {
|
304
|
+
default: i(() => [
|
305
|
+
d(X, {
|
306
|
+
modelValue: u(n),
|
307
|
+
"onUpdate:modelValue": A[0] || (A[0] = (f) => U(n) ? n.value = f : null),
|
308
|
+
search: u(o),
|
309
|
+
"onUpdate:search": A[1] || (A[1] = (f) => U(o) ? o.value = f : null),
|
310
|
+
"item-value": "value",
|
311
|
+
"data-testid": "label-key-selector",
|
312
|
+
readonly: "readonly" in m ? m.readonly : u(z),
|
313
|
+
class: "label-combo-key",
|
314
|
+
variant: "outlined",
|
315
|
+
label: "Key",
|
316
|
+
items: u(r),
|
317
|
+
"hide-no-data": !1,
|
318
|
+
"no-data-text": "",
|
319
|
+
"hide-details": "auto",
|
320
|
+
density: "compact",
|
321
|
+
rules: [O.alphanumericAndDash, O.specialNames],
|
322
|
+
"menu-props": { maxHeight: "400px", zIndex: 9999999 },
|
323
|
+
onKeydown: T
|
324
|
+
}, {
|
325
|
+
"no-data": i(() => [
|
326
|
+
He
|
327
|
+
]),
|
328
|
+
"prepend-item": i(() => [
|
329
|
+
u(o) && !u(r).includes(u(o)) ? (g(), E(M, {
|
330
|
+
key: 0,
|
331
|
+
class: "bg-blue-lighten-5",
|
332
|
+
onClick: I
|
333
|
+
}, {
|
334
|
+
default: i(() => [
|
335
|
+
d($, null, {
|
336
|
+
default: i(() => [
|
337
|
+
C(" Create new key "),
|
338
|
+
d(R, {
|
339
|
+
class: "ma-2",
|
340
|
+
color: "blue",
|
341
|
+
label: ""
|
342
|
+
}, {
|
343
|
+
default: i(() => [
|
344
|
+
d(V, {
|
345
|
+
start: "",
|
346
|
+
icon: "mdi-label"
|
347
|
+
}),
|
348
|
+
C(" " + x(u(o)), 1)
|
349
|
+
]),
|
350
|
+
_: 1
|
351
|
+
})
|
352
|
+
]),
|
353
|
+
_: 1
|
354
|
+
})
|
355
|
+
]),
|
356
|
+
_: 1
|
357
|
+
})) : P("", !0)
|
358
|
+
]),
|
359
|
+
item: i(({ item: f, props: L }) => [
|
360
|
+
f.raw.header ? (g(), E(M, N({ key: 0 }, L, {
|
361
|
+
disabled: "",
|
362
|
+
class: ["opacityMax", `bg-${f.raw.color}-lighten-5`],
|
363
|
+
style: {},
|
364
|
+
title: !1,
|
365
|
+
subtitle: f.raw.header
|
366
|
+
}), {
|
367
|
+
prepend: i(() => [
|
368
|
+
he(d(V, {
|
369
|
+
icon: f.raw.icon,
|
370
|
+
color: f.raw.color,
|
371
|
+
size: "small"
|
372
|
+
}, null, 8, ["icon", "color"]), [
|
373
|
+
[ge, f.raw.icon]
|
374
|
+
])
|
375
|
+
]),
|
376
|
+
_: 2
|
377
|
+
}, 1040, ["class", "subtitle"])) : (g(), E(M, N({ key: 1 }, L, {
|
378
|
+
title: f.value
|
379
|
+
}), null, 16, ["title"]))
|
380
|
+
]),
|
381
|
+
chip: i(({ item: f, props: L }) => [
|
382
|
+
f.value ? (g(), E(R, N({
|
383
|
+
key: 0,
|
384
|
+
color: _(f.value) === "twintypes" ? "purple" : "blue",
|
385
|
+
label: ""
|
386
|
+
}, L), {
|
387
|
+
default: i(() => [
|
388
|
+
d(V, {
|
389
|
+
start: "",
|
390
|
+
icon: _(f.value) === "twintypes" ? "mdi-content-duplicate" : "mdi-label"
|
391
|
+
}, null, 8, ["icon"]),
|
392
|
+
C(" " + x(f.value), 1)
|
393
|
+
]),
|
394
|
+
_: 2
|
395
|
+
}, 1040, ["color"])) : P("", !0)
|
396
|
+
]),
|
397
|
+
_: 1
|
398
|
+
}, 8, ["modelValue", "search", "readonly", "items", "rules"])
|
399
|
+
]),
|
400
|
+
_: 1
|
401
|
+
}),
|
402
|
+
d(H, { class: "py-0 flex-grow-1 flex-shrink-0" }, {
|
403
|
+
default: i(() => [
|
404
|
+
u(b) === "twintypes" ? (g(), E(_e, {
|
405
|
+
key: 0,
|
406
|
+
ref_key: "autocomplete",
|
407
|
+
ref: D,
|
408
|
+
modelValue: u(l),
|
409
|
+
"onUpdate:modelValue": A[2] || (A[2] = (f) => U(l) ? l.value = f : null),
|
410
|
+
"data-testid": "label-twin-selector",
|
411
|
+
readonly: "readonly" in m ? m.readonly : u(z),
|
412
|
+
class: "label-auto-value",
|
413
|
+
variant: "outlined",
|
414
|
+
"hide-details": "auto",
|
415
|
+
label: "Twin",
|
416
|
+
loading: u(y),
|
417
|
+
density: "compact",
|
418
|
+
"item-title": "label",
|
419
|
+
"item-value": "value",
|
420
|
+
items: u(v),
|
421
|
+
disabled: u(n) === "",
|
422
|
+
"menu-props": { maxHeight: "400px" },
|
423
|
+
"hide-no-data": !1,
|
424
|
+
"no-data-text": "",
|
425
|
+
clearable: ""
|
426
|
+
}, {
|
427
|
+
chip: i(({ item: f, props: L }) => [
|
428
|
+
f.value && !u(k) ? (g(), E(R, N({
|
429
|
+
key: 0,
|
430
|
+
color: "purple",
|
431
|
+
label: ""
|
432
|
+
}, L), {
|
433
|
+
default: i(() => [
|
434
|
+
d(V, {
|
435
|
+
start: "",
|
436
|
+
icon: "mdi-shape"
|
437
|
+
}),
|
438
|
+
C(" " + x(f.title), 1)
|
439
|
+
]),
|
440
|
+
_: 2
|
441
|
+
}, 1040)) : P("", !0)
|
442
|
+
]),
|
443
|
+
_: 1
|
444
|
+
}, 8, ["modelValue", "readonly", "loading", "items", "disabled"])) : (g(), E(X, {
|
445
|
+
key: 1,
|
446
|
+
search: u(a),
|
447
|
+
"onUpdate:search": A[3] || (A[3] = (f) => U(a) ? a.value = f : null),
|
448
|
+
modelValue: u(l),
|
449
|
+
"onUpdate:modelValue": A[4] || (A[4] = (f) => U(l) ? l.value = f : null),
|
450
|
+
disabled: !u(n) || u(n) === "",
|
451
|
+
"data-testid": "label-value-selector",
|
452
|
+
class: "label-combo-value",
|
453
|
+
"menu-props": { maxHeight: "400px" },
|
454
|
+
loading: u(y),
|
455
|
+
"hide-details": "auto",
|
456
|
+
variant: "outlined",
|
457
|
+
label: "Value",
|
458
|
+
items: u(c),
|
459
|
+
density: "compact",
|
460
|
+
"item-title": "label",
|
461
|
+
"item-value": "value",
|
462
|
+
"hide-no-data": !1,
|
463
|
+
"no-data-text": "",
|
464
|
+
rules: [O.alphanumericAndDash],
|
465
|
+
readonly: "readonly" in m ? m.readonly : u(z)
|
466
|
+
}, {
|
467
|
+
"no-data": i(() => [
|
468
|
+
Ye
|
469
|
+
]),
|
470
|
+
"prepend-item": i(() => [
|
471
|
+
u(a) && !u(c).find((f) => f === u(a)) ? (g(), E(M, {
|
472
|
+
key: 0,
|
473
|
+
class: "bg-blue-lighten-5",
|
474
|
+
onClick: I
|
475
|
+
}, {
|
476
|
+
default: i(() => [
|
477
|
+
d($, null, {
|
478
|
+
default: i(() => [
|
479
|
+
C(" Create new value "),
|
480
|
+
d(R, {
|
481
|
+
class: "ma-2",
|
482
|
+
color: "blue",
|
483
|
+
label: ""
|
484
|
+
}, {
|
485
|
+
default: i(() => [
|
486
|
+
d(V, {
|
487
|
+
start: "",
|
488
|
+
icon: "mdi-label"
|
489
|
+
}),
|
490
|
+
C(" " + x(u(a)), 1)
|
491
|
+
]),
|
492
|
+
_: 1
|
493
|
+
})
|
494
|
+
]),
|
495
|
+
_: 1
|
496
|
+
})
|
497
|
+
]),
|
498
|
+
_: 1
|
499
|
+
})) : P("", !0)
|
500
|
+
]),
|
501
|
+
chip: i(({ item: f, props: L }) => [
|
502
|
+
f.value ? (g(), E(R, N({
|
503
|
+
key: 0,
|
504
|
+
color: "blue",
|
505
|
+
label: ""
|
506
|
+
}, L), {
|
507
|
+
default: i(() => [
|
508
|
+
d(V, {
|
509
|
+
start: "",
|
510
|
+
icon: "mdi-shape"
|
511
|
+
}),
|
512
|
+
C(" " + x(f.title), 1)
|
513
|
+
]),
|
514
|
+
_: 2
|
515
|
+
}, 1040)) : P("", !0)
|
516
|
+
]),
|
517
|
+
_: 1
|
518
|
+
}, 8, ["search", "modelValue", "disabled", "loading", "items", "rules", "readonly"]))
|
519
|
+
]),
|
520
|
+
_: 1
|
521
|
+
}),
|
522
|
+
d(H, {
|
523
|
+
cols: "1",
|
524
|
+
style: { "min-width": "40px" },
|
525
|
+
class: "pa-0 flex-grow-0 flex-shrink-1"
|
526
|
+
}, {
|
527
|
+
default: i(() => [
|
528
|
+
("readonly" in m ? m.readonly : u(z)) ? P("", !0) : (g(), E(fe, {
|
529
|
+
key: 0,
|
530
|
+
class: "label-delete-btn",
|
531
|
+
variant: "text",
|
532
|
+
icon: "mdi-delete",
|
533
|
+
color: "grey-darken-1",
|
534
|
+
flat: "",
|
535
|
+
size: "small",
|
536
|
+
onClick: A[5] || (A[5] = (f) => m.$emit("removelabel"))
|
537
|
+
}))
|
538
|
+
]),
|
539
|
+
_: 1
|
540
|
+
})
|
541
|
+
]),
|
542
|
+
_: 1
|
543
|
+
});
|
544
|
+
};
|
545
|
+
}
|
546
|
+
}), Ze = async () => {
|
547
|
+
try {
|
548
|
+
const { data: e } = await w().get(
|
549
|
+
"/api/v1/twintypes",
|
550
|
+
{
|
551
|
+
headers: {
|
552
|
+
Accept: "application/json"
|
465
553
|
}
|
466
|
-
o || n.push(e);
|
467
|
-
} else
|
468
|
-
n.push(e);
|
469
|
-
},
|
470
|
-
removeAccents(e) {
|
471
|
-
return e && e.search(/[\xC0-\xFF]/g) > -1 && (e = e.replace(/[\xC0-\xC5]/g, "A").replace(/[\xC6]/g, "AE").replace(/[\xC7]/g, "C").replace(/[\xC8-\xCB]/g, "E").replace(/[\xCC-\xCF]/g, "I").replace(/[\xD0]/g, "D").replace(/[\xD1]/g, "N").replace(/[\xD2-\xD6\xD8]/g, "O").replace(/[\xD9-\xDC]/g, "U").replace(/[\xDD]/g, "Y").replace(/[\xDE]/g, "P").replace(/[\xE0-\xE5]/g, "a").replace(/[\xE6]/g, "ae").replace(/[\xE7]/g, "c").replace(/[\xE8-\xEB]/g, "e").replace(/[\xEC-\xEF]/g, "i").replace(/[\xF1]/g, "n").replace(/[\xF2-\xF6\xF8]/g, "o").replace(/[\xF9-\xFC]/g, "u").replace(/[\xFE]/g, "p").replace(/[\xFD\xFF]/g, "y")), e;
|
472
|
-
},
|
473
|
-
getVNodeProp(e, t) {
|
474
|
-
let n = e.props;
|
475
|
-
if (n) {
|
476
|
-
let s = t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), o = Object.prototype.hasOwnProperty.call(n, s) ? s : t;
|
477
|
-
return e.type.props[t].type === Boolean && n[o] === "" ? !0 : n[o];
|
478
|
-
}
|
479
|
-
return null;
|
480
|
-
},
|
481
|
-
convertToFlatCase(e) {
|
482
|
-
return this.isNotEmpty(e) ? e.replace(/(-|_)/g, "").toLowerCase() : e;
|
483
|
-
},
|
484
|
-
isEmpty(e) {
|
485
|
-
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
|
486
|
-
},
|
487
|
-
isNotEmpty(e) {
|
488
|
-
return !this.isEmpty(e);
|
489
|
-
},
|
490
|
-
isPrintableCharacter(e = "") {
|
491
|
-
return this.isNotEmpty(e) && e.length === 1 && e.match(/\S| /);
|
492
|
-
},
|
493
|
-
/**
|
494
|
-
* Firefox-v103 does not currently support the "findLast" method. It is stated that this method will be supported with Firefox-v104.
|
495
|
-
* https://caniuse.com/mdn-javascript_builtins_array_findlast
|
496
|
-
*/
|
497
|
-
findLast(e, t) {
|
498
|
-
let n;
|
499
|
-
if (this.isNotEmpty(e))
|
500
|
-
try {
|
501
|
-
n = e.findLast(t);
|
502
|
-
} catch {
|
503
|
-
n = [...e].reverse().find(t);
|
504
|
-
}
|
505
|
-
return n;
|
506
|
-
},
|
507
|
-
/**
|
508
|
-
* Firefox-v103 does not currently support the "findLastIndex" method. It is stated that this method will be supported with Firefox-v104.
|
509
|
-
* https://caniuse.com/mdn-javascript_builtins_array_findlastindex
|
510
|
-
*/
|
511
|
-
findLastIndex(e, t) {
|
512
|
-
let n = -1;
|
513
|
-
if (this.isNotEmpty(e))
|
514
|
-
try {
|
515
|
-
n = e.findLastIndex(t);
|
516
|
-
} catch {
|
517
|
-
n = e.lastIndexOf([...e].reverse().find(t));
|
518
554
|
}
|
519
|
-
|
555
|
+
);
|
556
|
+
return Object.values(e) || [];
|
557
|
+
} catch {
|
558
|
+
return [];
|
520
559
|
}
|
521
|
-
},
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
560
|
+
}, Xe = {
|
561
|
+
getTwinTypes: Ze
|
562
|
+
}, me = q("twinTypes", () => {
|
563
|
+
const e = h([]), t = S(() => e.value.map((n) => n.name)), s = S(() => e.value.map((n) => ({ value: n.UUID, label: n.name }))), r = async () => {
|
564
|
+
try {
|
565
|
+
const n = await Xe.getTwinTypes();
|
566
|
+
e.value = n;
|
567
|
+
} catch {
|
527
568
|
}
|
528
|
-
}
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
}
|
541
|
-
ptmo(e = {}, t = "", n = {}) {
|
542
|
-
return this.getPTValue(e, t, n);
|
569
|
+
};
|
570
|
+
return r(), {
|
571
|
+
twinTypes: e,
|
572
|
+
pullTwinTypes: r,
|
573
|
+
twinTypeNames: t,
|
574
|
+
twinTypeSelectArray: s
|
575
|
+
};
|
576
|
+
}), et = q("labels", () => {
|
577
|
+
const e = h([]), t = async () => {
|
578
|
+
try {
|
579
|
+
const r = await Z.getLabels();
|
580
|
+
e.value = r;
|
581
|
+
} catch {
|
543
582
|
}
|
544
|
-
},
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
}
|
549
|
-
defaultsParams() {
|
550
|
-
return { instance: this.$ };
|
583
|
+
}, s = async (r) => {
|
584
|
+
const { twinTypeNames: n } = G(me());
|
585
|
+
try {
|
586
|
+
await Z.createLabel(r, n.value), await t();
|
587
|
+
} catch {
|
551
588
|
}
|
552
|
-
}
|
553
|
-
|
554
|
-
|
589
|
+
};
|
590
|
+
return t(), {
|
591
|
+
labels: e,
|
592
|
+
pullLabels: t,
|
593
|
+
updateLabels: s
|
594
|
+
};
|
595
|
+
}), tt = /* @__PURE__ */ B({
|
596
|
+
__name: "LabelsSelector",
|
555
597
|
props: {
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
}
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
const
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
"
|
577
|
-
"
|
578
|
-
|
579
|
-
|
598
|
+
modelValue: {},
|
599
|
+
readonly: { type: Boolean }
|
600
|
+
},
|
601
|
+
emits: ["update:modelValue"],
|
602
|
+
setup(e, { emit: t }) {
|
603
|
+
const s = e, { labels: r } = G(et()), { twinTypeNames: n } = G(me()), l = h([]), o = S(() => (y) => r.value.filter((_) => !n.value.includes(_) && (y.key === _ || !l.value.find(({ key: b }) => b === _)))), a = S(() => (y) => n.value.filter((_) => y.key === _ || !l.value.find(({ key: b }) => b === _))), c = () => {
|
604
|
+
l.value.push({ key: "", value: "" });
|
605
|
+
}, v = (y) => {
|
606
|
+
l.value.splice(y, 1);
|
607
|
+
};
|
608
|
+
return K(l, (y) => {
|
609
|
+
const _ = y.reduce((b, I) => (I.key && I.value && (b[I.key] = I.value), b), {});
|
610
|
+
t("update:modelValue", _);
|
611
|
+
}, { deep: !0 }), ue(() => {
|
612
|
+
s.modelValue && (l.value = Object.entries(s.modelValue).map(([y, _]) => ({ key: y, value: _ }))), console.log(n.value, r.value);
|
613
|
+
}), (y, _) => {
|
614
|
+
const b = p("v-spacer"), I = p("v-btn"), T = p("v-row"), j = p("v-card-title"), D = p("v-list-subheader"), k = p("v-col"), O = p("v-divider"), m = ve, A = p("v-card-text"), V = p("v-sheet");
|
615
|
+
return g(), E(V, {
|
616
|
+
class: "pa-3",
|
617
|
+
variant: "tonal",
|
618
|
+
border: "",
|
619
|
+
rounded: "",
|
620
|
+
color: "grey-lighten-4"
|
621
|
+
}, {
|
622
|
+
default: i(() => [
|
623
|
+
d(j, { class: "text-primary" }, {
|
624
|
+
default: i(() => [
|
625
|
+
d(T, { "no-gutters": "" }, {
|
626
|
+
default: i(() => [
|
627
|
+
C(" Labels "),
|
628
|
+
d(b),
|
629
|
+
("readonly" in y ? y.readonly : u(z)) ? P("", !0) : (g(), E(I, {
|
630
|
+
key: 0,
|
631
|
+
class: "label-add-btn",
|
632
|
+
size: "small",
|
633
|
+
"prepend-icon": "mdi-plus",
|
634
|
+
variant: "tonal",
|
635
|
+
color: "primary",
|
636
|
+
onClick: c
|
637
|
+
}, {
|
638
|
+
default: i(() => [
|
639
|
+
C(" add a label ")
|
640
|
+
]),
|
641
|
+
_: 1
|
642
|
+
}))
|
643
|
+
]),
|
644
|
+
_: 1
|
645
|
+
})
|
646
|
+
]),
|
647
|
+
_: 1
|
648
|
+
}),
|
649
|
+
u(l).length ? (g(), E(A, { key: 0 }, {
|
650
|
+
default: i(() => [
|
651
|
+
d(T, { "no-gutters": "" }, {
|
652
|
+
default: i(() => [
|
653
|
+
d(k, null, {
|
654
|
+
default: i(() => [
|
655
|
+
d(D, null, {
|
656
|
+
default: i(() => [
|
657
|
+
C("Key")
|
658
|
+
]),
|
659
|
+
_: 1
|
660
|
+
})
|
661
|
+
]),
|
662
|
+
_: 1
|
663
|
+
}),
|
664
|
+
d(k, null, {
|
665
|
+
default: i(() => [
|
666
|
+
d(D, null, {
|
667
|
+
default: i(() => [
|
668
|
+
C("Value")
|
669
|
+
]),
|
670
|
+
_: 1
|
671
|
+
})
|
672
|
+
]),
|
673
|
+
_: 1
|
674
|
+
})
|
675
|
+
]),
|
676
|
+
_: 1
|
677
|
+
}),
|
678
|
+
d(O, { class: "mb-3" }),
|
679
|
+
(g(!0), pe(Ae, null, Ee(u(l), (R, $) => (g(), E(m, {
|
680
|
+
key: $,
|
681
|
+
labelkey: u(l)[$].key,
|
682
|
+
"onUpdate:labelkey": (M) => u(l)[$].key = M,
|
683
|
+
labelvalue: u(l)[$].value,
|
684
|
+
"onUpdate:labelvalue": (M) => u(l)[$].value = M,
|
685
|
+
readonly: "readonly" in y ? y.readonly : u(z),
|
686
|
+
labels: u(o)(u(l)[$]),
|
687
|
+
twintypes: u(a)(u(l)[$]),
|
688
|
+
"data-lab-key": R.key,
|
689
|
+
onRemovelabel: (M) => v($)
|
690
|
+
}, null, 8, ["labelkey", "onUpdate:labelkey", "labelvalue", "onUpdate:labelvalue", "readonly", "labels", "twintypes", "data-lab-key", "onRemovelabel"]))), 128))
|
691
|
+
]),
|
692
|
+
_: 1
|
693
|
+
})) : P("", !0)
|
694
|
+
]),
|
695
|
+
_: 1
|
696
|
+
});
|
697
|
+
};
|
580
698
|
}
|
581
|
-
}
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
699
|
+
}), at = /* @__PURE__ */ B({
|
700
|
+
__name: "Modal",
|
701
|
+
props: {
|
702
|
+
modelValue: { type: Boolean },
|
703
|
+
parentActivator: { type: Boolean }
|
704
|
+
},
|
705
|
+
emits: ["confirm", "update:modelValue"],
|
706
|
+
setup(e, { emit: t }) {
|
707
|
+
const s = e, r = s.parentActivator ? h(!1) : W(s, "modelValue", t);
|
708
|
+
return (n, l) => {
|
709
|
+
const o = p("v-dialog");
|
710
|
+
return g(), E(o, {
|
711
|
+
modelValue: u(r),
|
712
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => U(r) ? r.value = a : null),
|
713
|
+
activator: n.parentActivator ? "parent" : void 0
|
714
|
+
}, {
|
715
|
+
default: i(() => [
|
716
|
+
F(n.$slots, "default")
|
717
|
+
]),
|
718
|
+
_: 3
|
719
|
+
}, 8, ["modelValue", "activator"]);
|
720
|
+
};
|
588
721
|
}
|
722
|
+
}), nt = Symbol.for("vuetify:display");
|
723
|
+
function ot() {
|
724
|
+
const e = Ce(nt);
|
725
|
+
if (!e)
|
726
|
+
throw new Error("Could not find Vuetify display injection");
|
727
|
+
return e;
|
589
728
|
}
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
}
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
}
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
}
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
]
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
729
|
+
const st = /* @__PURE__ */ B({
|
730
|
+
__name: "ViewObjectModal",
|
731
|
+
props: {
|
732
|
+
title: {},
|
733
|
+
modelValue: { type: Boolean },
|
734
|
+
parentActivator: { type: Boolean },
|
735
|
+
hideActions: { type: Boolean }
|
736
|
+
},
|
737
|
+
emits: ["confirm", "update:modelValue"],
|
738
|
+
setup(e, { emit: t }) {
|
739
|
+
const s = e, r = s.parentActivator ? h(!1) : W(s, "modelValue", t), n = () => {
|
740
|
+
t("confirm"), r.value = !1;
|
741
|
+
}, { mobile: l } = ot();
|
742
|
+
return (o, a) => {
|
743
|
+
const c = p("v-toolbar-title"), v = p("v-btn"), y = p("v-toolbar"), _ = p("v-card-text"), b = p("v-spacer"), I = p("v-card-actions"), T = p("v-card"), j = p("v-dialog");
|
744
|
+
return g(), E(j, {
|
745
|
+
modelValue: u(r),
|
746
|
+
"onUpdate:modelValue": a[2] || (a[2] = (D) => U(r) ? r.value = D : null),
|
747
|
+
activator: o.parentActivator ? "parent" : void 0,
|
748
|
+
"max-width": "800px",
|
749
|
+
fullscreen: u(l)
|
750
|
+
}, {
|
751
|
+
default: i(() => [
|
752
|
+
d(T, null, {
|
753
|
+
default: i(() => [
|
754
|
+
d(y, { color: "white" }, {
|
755
|
+
append: i(() => [
|
756
|
+
d(v, {
|
757
|
+
"data-testid": "close-kpi-modal",
|
758
|
+
size: "small",
|
759
|
+
icon: "mdi-close",
|
760
|
+
onClick: a[0] || (a[0] = (D) => r.value = !1)
|
761
|
+
})
|
762
|
+
]),
|
763
|
+
default: i(() => [
|
764
|
+
d(c, null, {
|
765
|
+
default: i(() => [
|
766
|
+
C(x(o.title), 1)
|
767
|
+
]),
|
768
|
+
_: 1
|
769
|
+
})
|
770
|
+
]),
|
771
|
+
_: 1
|
772
|
+
}),
|
773
|
+
d(_, null, {
|
774
|
+
default: i(() => [
|
775
|
+
F(o.$slots, "default")
|
776
|
+
]),
|
777
|
+
_: 3
|
778
|
+
}),
|
779
|
+
o.hideActions ? P("", !0) : (g(), E(I, { key: 0 }, {
|
780
|
+
default: i(() => [
|
781
|
+
F(o.$slots, "actions", Ie(Se({ confirm: n, dialog: u(r) })), () => [
|
782
|
+
d(b),
|
783
|
+
d(v, {
|
784
|
+
class: "delete-modal-dismiss",
|
785
|
+
color: "grey",
|
786
|
+
onClick: a[1] || (a[1] = (D) => r.value = !1)
|
787
|
+
}, {
|
788
|
+
default: i(() => [
|
789
|
+
C(" Dismiss ")
|
790
|
+
]),
|
791
|
+
_: 1
|
792
|
+
}),
|
793
|
+
d(v, {
|
794
|
+
class: "delete-modal-confirm",
|
795
|
+
color: "red",
|
796
|
+
variant: "elevated",
|
797
|
+
onClick: n
|
798
|
+
}, {
|
799
|
+
default: i(() => [
|
800
|
+
C(" Yes, I'm sure ")
|
801
|
+
]),
|
802
|
+
_: 1
|
803
|
+
})
|
804
|
+
])
|
805
|
+
]),
|
806
|
+
_: 3
|
807
|
+
}))
|
808
|
+
]),
|
809
|
+
_: 3
|
810
|
+
})
|
811
|
+
]),
|
812
|
+
_: 3
|
813
|
+
}, 8, ["modelValue", "activator", "fullscreen"]);
|
814
|
+
};
|
815
|
+
}
|
816
|
+
}), rt = /* @__PURE__ */ B({
|
817
|
+
__name: "DeleteModal",
|
818
|
+
props: {
|
819
|
+
title: {},
|
820
|
+
modelValue: { type: Boolean },
|
821
|
+
parentActivator: { type: Boolean }
|
822
|
+
},
|
823
|
+
emits: ["confirm", "update:modelValue"],
|
824
|
+
setup(e, { emit: t }) {
|
825
|
+
const s = e, r = s.parentActivator ? h(!1) : W(s, "modelValue", t), n = () => {
|
826
|
+
t("confirm"), r.value = !1;
|
827
|
+
};
|
828
|
+
return (l, o) => {
|
829
|
+
const a = p("v-card-title"), c = p("v-card-text"), v = p("v-spacer"), y = p("v-btn"), _ = p("v-card-actions"), b = p("v-card"), I = p("v-dialog");
|
830
|
+
return g(), E(I, {
|
831
|
+
modelValue: u(r),
|
832
|
+
"onUpdate:modelValue": o[1] || (o[1] = (T) => U(r) ? r.value = T : null),
|
833
|
+
activator: l.parentActivator ? "parent" : void 0,
|
834
|
+
"max-width": "400px"
|
835
|
+
}, {
|
836
|
+
default: i(() => [
|
837
|
+
d(b, null, {
|
838
|
+
default: i(() => [
|
839
|
+
d(a, null, {
|
840
|
+
default: i(() => [
|
841
|
+
C(x(l.title), 1)
|
842
|
+
]),
|
843
|
+
_: 1
|
844
|
+
}),
|
845
|
+
d(c, null, {
|
846
|
+
default: i(() => [
|
847
|
+
F(l.$slots, "default")
|
848
|
+
]),
|
849
|
+
_: 3
|
850
|
+
}),
|
851
|
+
d(_, null, {
|
852
|
+
default: i(() => [
|
853
|
+
d(v),
|
854
|
+
d(y, {
|
855
|
+
class: "delete-modal-dismiss",
|
856
|
+
color: "grey",
|
857
|
+
onClick: o[0] || (o[0] = (T) => r.value = !1)
|
858
|
+
}, {
|
859
|
+
default: i(() => [
|
860
|
+
C(" Dismiss ")
|
861
|
+
]),
|
862
|
+
_: 1
|
863
|
+
}),
|
864
|
+
d(y, {
|
865
|
+
class: "delete-modal-confirm",
|
866
|
+
color: "red",
|
867
|
+
variant: "elevated",
|
868
|
+
onClick: n
|
869
|
+
}, {
|
870
|
+
default: i(() => [
|
871
|
+
C(" Yes, I'm sure ")
|
872
|
+
]),
|
873
|
+
_: 1
|
874
|
+
})
|
875
|
+
]),
|
876
|
+
_: 1
|
877
|
+
})
|
878
|
+
]),
|
879
|
+
_: 3
|
880
|
+
})
|
881
|
+
]),
|
882
|
+
_: 3
|
883
|
+
}, 8, ["modelValue", "activator"]);
|
884
|
+
};
|
673
885
|
}
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
}
|
679
|
-
function Te(e) {
|
680
|
-
ee && clearTimeout(ee), S.removeClass(e.currentTarget, "p-ink-active");
|
681
|
-
}
|
682
|
-
function De(e) {
|
683
|
-
for (let t = 0; t < e.children.length; t++)
|
684
|
-
if (typeof e.children[t].className == "string" && e.children[t].className.indexOf("p-ink") !== -1)
|
685
|
-
return e.children[t];
|
686
|
-
return null;
|
687
|
-
}
|
688
|
-
const pt = {
|
689
|
-
mounted(e, t) {
|
690
|
-
t.instance.$primevue && t.instance.$primevue.config && t.instance.$primevue.config.ripple && (ut(e), ct(e));
|
886
|
+
}), lt = /* @__PURE__ */ B({
|
887
|
+
__name: "ConfirmModal",
|
888
|
+
props: {
|
889
|
+
title: {}
|
691
890
|
},
|
692
|
-
|
693
|
-
|
891
|
+
emits: ["confirm"],
|
892
|
+
setup(e, { emit: t }) {
|
893
|
+
const s = h(!1), r = () => {
|
894
|
+
s.value = !1, t("confirm");
|
895
|
+
};
|
896
|
+
return (n, l) => {
|
897
|
+
const o = p("v-card-title"), a = p("v-card-text"), c = p("v-spacer"), v = p("v-btn"), y = p("v-card-actions"), _ = p("v-card"), b = p("v-dialog");
|
898
|
+
return g(), E(b, {
|
899
|
+
modelValue: u(s),
|
900
|
+
"onUpdate:modelValue": l[1] || (l[1] = (I) => U(s) ? s.value = I : null),
|
901
|
+
activator: "parent",
|
902
|
+
"max-width": "400px"
|
903
|
+
}, {
|
904
|
+
default: i(() => [
|
905
|
+
d(_, null, {
|
906
|
+
default: i(() => [
|
907
|
+
d(o, null, {
|
908
|
+
default: i(() => [
|
909
|
+
C(x(n.title), 1)
|
910
|
+
]),
|
911
|
+
_: 1
|
912
|
+
}),
|
913
|
+
d(a, null, {
|
914
|
+
default: i(() => [
|
915
|
+
F(n.$slots, "default")
|
916
|
+
]),
|
917
|
+
_: 3
|
918
|
+
}),
|
919
|
+
d(y, null, {
|
920
|
+
default: i(() => [
|
921
|
+
d(c),
|
922
|
+
d(v, {
|
923
|
+
class: "confirm-modal-dismiss",
|
924
|
+
color: "grey",
|
925
|
+
onClick: l[0] || (l[0] = (I) => s.value = !1)
|
926
|
+
}, {
|
927
|
+
default: i(() => [
|
928
|
+
C(" Cancel ")
|
929
|
+
]),
|
930
|
+
_: 1
|
931
|
+
}),
|
932
|
+
d(v, {
|
933
|
+
class: "confirm-modal-confirm",
|
934
|
+
color: "primary",
|
935
|
+
variant: "elevated",
|
936
|
+
onClick: r
|
937
|
+
}, {
|
938
|
+
default: i(() => [
|
939
|
+
C(" Yes, I'm sure ")
|
940
|
+
]),
|
941
|
+
_: 1
|
942
|
+
})
|
943
|
+
]),
|
944
|
+
_: 1
|
945
|
+
})
|
946
|
+
]),
|
947
|
+
_: 3
|
948
|
+
})
|
949
|
+
]),
|
950
|
+
_: 3
|
951
|
+
}, 8, ["modelValue"]);
|
952
|
+
};
|
694
953
|
}
|
695
|
-
}
|
696
|
-
|
697
|
-
name: "Button",
|
698
|
-
extends: et,
|
954
|
+
}), ct = /* @__PURE__ */ B({
|
955
|
+
__name: "ColorInput",
|
699
956
|
props: {
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
type: Boolean,
|
742
|
-
default: !1
|
743
|
-
},
|
744
|
-
rounded: {
|
745
|
-
type: Boolean,
|
746
|
-
default: !1
|
747
|
-
},
|
748
|
-
text: {
|
749
|
-
type: Boolean,
|
750
|
-
default: !1
|
751
|
-
},
|
752
|
-
outlined: {
|
753
|
-
type: Boolean,
|
754
|
-
default: !1
|
755
|
-
},
|
756
|
-
size: {
|
757
|
-
type: String,
|
758
|
-
default: null
|
759
|
-
},
|
760
|
-
plain: {
|
761
|
-
type: Boolean,
|
762
|
-
default: !1
|
763
|
-
}
|
764
|
-
},
|
765
|
-
computed: {
|
766
|
-
buttonClass() {
|
767
|
-
return [
|
768
|
-
"p-button p-component",
|
769
|
-
{
|
770
|
-
"p-button-icon-only": this.hasIcon && !this.label,
|
771
|
-
"p-button-vertical": (this.iconPos === "top" || this.iconPos === "bottom") && this.label,
|
772
|
-
"p-disabled": this.$attrs.disabled || this.loading,
|
773
|
-
"p-button-loading": this.loading,
|
774
|
-
"p-button-loading-label-only": this.loading && !this.hasIcon && this.label,
|
775
|
-
"p-button-link": this.link,
|
776
|
-
[`p-button-${this.severity}`]: this.severity,
|
777
|
-
"p-button-raised": this.raised,
|
778
|
-
"p-button-rounded": this.rounded,
|
779
|
-
"p-button-text": this.text,
|
780
|
-
"p-button-outlined": this.outlined,
|
781
|
-
"p-button-sm": this.size === "small",
|
782
|
-
"p-button-lg": this.size === "large",
|
783
|
-
"p-button-plain": this.plain
|
784
|
-
}
|
785
|
-
];
|
786
|
-
},
|
787
|
-
iconStyleClass() {
|
788
|
-
return [
|
789
|
-
"p-button-icon",
|
790
|
-
this.iconClass,
|
791
|
-
{
|
792
|
-
"p-button-icon-left": this.iconPos === "left" && this.label,
|
793
|
-
"p-button-icon-right": this.iconPos === "right" && this.label,
|
794
|
-
"p-button-icon-top": this.iconPos === "top" && this.label,
|
795
|
-
"p-button-icon-bottom": this.iconPos === "bottom" && this.label
|
796
|
-
}
|
797
|
-
];
|
798
|
-
},
|
799
|
-
loadingIconStyleClass() {
|
800
|
-
return ["p-button-loading-icon pi-spin", this.iconStyleClass];
|
801
|
-
},
|
802
|
-
badgeStyleClass() {
|
803
|
-
return [
|
804
|
-
"p-badge p-component",
|
805
|
-
this.badgeClass,
|
806
|
-
{
|
807
|
-
"p-badge-no-gutter": this.badge && String(this.badge).length === 1
|
808
|
-
}
|
809
|
-
];
|
810
|
-
},
|
811
|
-
disabled() {
|
812
|
-
return this.$attrs.disabled || this.loading;
|
813
|
-
},
|
814
|
-
defaultAriaLabel() {
|
815
|
-
return this.label ? this.label + (this.badge ? " " + this.badge : "") : this.$attrs["aria-label"];
|
816
|
-
},
|
817
|
-
hasIcon() {
|
818
|
-
return this.icon || this.$slots.icon;
|
819
|
-
}
|
820
|
-
},
|
821
|
-
components: {
|
822
|
-
SpinnerIcon: _e
|
823
|
-
},
|
824
|
-
directives: {
|
825
|
-
ripple: pt
|
957
|
+
modelValue: {}
|
958
|
+
},
|
959
|
+
emits: ["update:modelValue"],
|
960
|
+
setup(e, { emit: t }) {
|
961
|
+
const r = W(e, "modelValue", t), n = h(!1);
|
962
|
+
return (l, o) => {
|
963
|
+
const a = p("v-btn"), c = p("v-text-field"), v = p("v-color-picker"), y = p("v-menu");
|
964
|
+
return g(), E(y, {
|
965
|
+
modelValue: u(n),
|
966
|
+
"onUpdate:modelValue": o[2] || (o[2] = (_) => U(n) ? n.value = _ : null),
|
967
|
+
"close-on-content-click": !1,
|
968
|
+
location: "end"
|
969
|
+
}, {
|
970
|
+
activator: i(({ props: _ }) => [
|
971
|
+
d(a, N({
|
972
|
+
icon: "",
|
973
|
+
size: "small",
|
974
|
+
color: u(r)
|
975
|
+
}, _, { class: "mr-2" }), null, 16, ["color"]),
|
976
|
+
d(c, N({
|
977
|
+
modelValue: u(r),
|
978
|
+
"onUpdate:modelValue": o[0] || (o[0] = (b) => U(r) ? r.value = b : null),
|
979
|
+
"data-testid": "color-input",
|
980
|
+
"hide-details": "",
|
981
|
+
variant: "outlined",
|
982
|
+
density: "compact"
|
983
|
+
}, _, { style: { "max-width": "200px" } }), null, 16, ["modelValue"])
|
984
|
+
]),
|
985
|
+
default: i(() => [
|
986
|
+
d(v, {
|
987
|
+
modelValue: u(r),
|
988
|
+
"onUpdate:modelValue": o[1] || (o[1] = (_) => U(r) ? r.value = _ : null),
|
989
|
+
"show-swatches": "",
|
990
|
+
mode: "hex",
|
991
|
+
modes: ["hex"],
|
992
|
+
"data-testid": "color-picker"
|
993
|
+
}, null, 8, ["modelValue"])
|
994
|
+
]),
|
995
|
+
_: 1
|
996
|
+
}, 8, ["modelValue"]);
|
997
|
+
};
|
826
998
|
}
|
827
|
-
}
|
828
|
-
|
829
|
-
function ht(e, t, n, s, o, r) {
|
830
|
-
const a = Le("SpinnerIcon"), i = ke("ripple");
|
831
|
-
return Fe((T(), x("button", I({
|
832
|
-
class: r.buttonClass,
|
833
|
-
type: "button",
|
834
|
-
"aria-label": r.defaultAriaLabel,
|
835
|
-
disabled: r.disabled
|
836
|
-
}, e.ptm("root")), [
|
837
|
-
X(e.$slots, "default", {}, () => [
|
838
|
-
n.loading ? X(e.$slots, "loadingicon", {
|
839
|
-
key: 0,
|
840
|
-
class: le(r.loadingIconStyleClass)
|
841
|
-
}, () => [
|
842
|
-
n.loadingIcon ? (T(), x("span", I({
|
843
|
-
key: 0,
|
844
|
-
class: [r.loadingIconStyleClass, n.loadingIcon]
|
845
|
-
}, e.ptm("loadingIcon")), null, 16)) : (T(), Ve(a, I({
|
846
|
-
key: 1,
|
847
|
-
class: r.loadingIconStyleClass,
|
848
|
-
spin: ""
|
849
|
-
}, e.ptm("loadingIcon")), null, 16, ["class"]))
|
850
|
-
]) : X(e.$slots, "icon", {
|
851
|
-
key: 1,
|
852
|
-
class: le(r.iconStyleClass)
|
853
|
-
}, () => [
|
854
|
-
n.icon ? (T(), x("span", I({
|
855
|
-
key: 0,
|
856
|
-
class: [r.iconStyleClass, n.icon]
|
857
|
-
}, e.ptm("icon")), null, 16)) : ue("", !0)
|
858
|
-
]),
|
859
|
-
A("span", I({ class: "p-button-label" }, e.ptm("label")), q(n.label || " "), 17),
|
860
|
-
n.badge ? (T(), x("span", I({
|
861
|
-
key: 2,
|
862
|
-
class: r.badgeStyleClass
|
863
|
-
}, e.ptm("badge")), q(n.badge), 17)) : ue("", !0)
|
864
|
-
])
|
865
|
-
], 16, ft)), [
|
866
|
-
[i]
|
867
|
-
]);
|
868
|
-
}
|
869
|
-
te.render = ht;
|
870
|
-
const gt = (e) => (Be("data-v-31c691d5"), e = e(), We(), e), yt = { class: "flex align-content-center flex-wrap counter" }, mt = /* @__PURE__ */ gt(() => /* @__PURE__ */ A("label", { class: "flex align-items-center justify-content-center" }, "Counter:", -1)), vt = { class: "flex align-items-center justify-content-center count" }, wt = /* @__PURE__ */ Se({
|
871
|
-
__name: "ComponentB",
|
999
|
+
}), it = /* @__PURE__ */ B({
|
1000
|
+
__name: "ScrollText",
|
872
1001
|
setup(e) {
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
1002
|
+
Te((o) => ({
|
1003
|
+
"2e2ac96b": u(n),
|
1004
|
+
e0628022: u(r)
|
1005
|
+
}));
|
1006
|
+
const t = h(null), s = S(() => {
|
1007
|
+
var o, a;
|
1008
|
+
return t.value ? ((o = t.value) == null ? void 0 : o.scrollWidth) - ((a = t.value) == null ? void 0 : a.offsetWidth) : 0;
|
1009
|
+
}), r = S(() => `${-s.value - 10}px`), n = S(() => `${s.value / 30}s`), l = S(() => {
|
1010
|
+
var o, a;
|
1011
|
+
return ((o = t.value) == null ? void 0 : o.scrollWidth) !== ((a = t.value) == null ? void 0 : a.offsetWidth);
|
1012
|
+
});
|
1013
|
+
return (o, a) => (g(), pe("div", {
|
1014
|
+
ref_key: "text",
|
1015
|
+
ref: t,
|
1016
|
+
class: Ue({ "scroll-text": u(l) })
|
1017
|
+
}, [
|
1018
|
+
F(o.$slots, "default", {}, void 0, !0)
|
1019
|
+
], 2));
|
888
1020
|
}
|
889
1021
|
});
|
890
|
-
const
|
891
|
-
const
|
892
|
-
for (const [
|
893
|
-
|
894
|
-
return
|
895
|
-
},
|
1022
|
+
const ut = (e, t) => {
|
1023
|
+
const s = e.__vccOpts || e;
|
1024
|
+
for (const [r, n] of t)
|
1025
|
+
s[r] = n;
|
1026
|
+
return s;
|
1027
|
+
}, dt = /* @__PURE__ */ ut(it, [["__scopeId", "data-v-4d66a865"]]), Q = q("alertMessages", () => {
|
1028
|
+
const e = h(!1), t = h(""), s = h(""), r = h(5e3);
|
1029
|
+
return {
|
1030
|
+
snackbar: e,
|
1031
|
+
snackbarText: t,
|
1032
|
+
snackbarSeverity: s,
|
1033
|
+
snackbarTimeout: r,
|
1034
|
+
setSnackbarMessage: (l = "", o = "", a = 5e3) => {
|
1035
|
+
t.value = l, s.value = o, r.value = a, e.value = !0;
|
1036
|
+
}
|
1037
|
+
};
|
1038
|
+
}), pt = /* @__PURE__ */ B({
|
1039
|
+
__name: "Snackbar",
|
1040
|
+
setup(e) {
|
1041
|
+
const { snackbar: t, snackbarText: s, snackbarTimeout: r, snackbarSeverity: n } = G(Q());
|
1042
|
+
return (l, o) => {
|
1043
|
+
const a = p("v-btn"), c = p("v-snackbar");
|
1044
|
+
return g(), E(c, {
|
1045
|
+
modelValue: u(t),
|
1046
|
+
"onUpdate:modelValue": o[1] || (o[1] = (v) => U(t) ? t.value = v : null),
|
1047
|
+
style: { "margin-bottom": "50px" },
|
1048
|
+
"data-testid": "snackbar",
|
1049
|
+
timeout: u(r),
|
1050
|
+
variant: "tonal",
|
1051
|
+
color: u(n)
|
1052
|
+
}, {
|
1053
|
+
actions: i(() => [
|
1054
|
+
d(a, {
|
1055
|
+
color: "snackbarSeverity",
|
1056
|
+
variant: "text",
|
1057
|
+
onClick: o[0] || (o[0] = (v) => t.value = !1)
|
1058
|
+
}, {
|
1059
|
+
default: i(() => [
|
1060
|
+
C(" Close ")
|
1061
|
+
]),
|
1062
|
+
_: 1
|
1063
|
+
})
|
1064
|
+
]),
|
1065
|
+
default: i(() => [
|
1066
|
+
C(x(u(s)) + " ", 1)
|
1067
|
+
]),
|
1068
|
+
_: 1
|
1069
|
+
}, 8, ["modelValue", "timeout", "color"]);
|
1070
|
+
};
|
1071
|
+
}
|
1072
|
+
}), le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
896
1073
|
__proto__: null,
|
897
|
-
|
898
|
-
|
1074
|
+
ColorInput: ct,
|
1075
|
+
ConfirmModal: lt,
|
1076
|
+
DeleteModal: rt,
|
1077
|
+
LabelInput: ve,
|
1078
|
+
LabelsSelector: tt,
|
1079
|
+
Modal: at,
|
1080
|
+
ScrollText: dt,
|
1081
|
+
Snackbar: pt,
|
1082
|
+
ViewObjectModal: st
|
899
1083
|
}, Symbol.toStringTag, { value: "Module" }));
|
900
|
-
const
|
1084
|
+
const vt = 100, xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
901
1085
|
__proto__: null,
|
902
|
-
MAGIC_NUM:
|
1086
|
+
MAGIC_NUM: vt
|
903
1087
|
}, Symbol.toStringTag, { value: "Module" }));
|
904
|
-
function
|
1088
|
+
function mt(e, t) {
|
905
1089
|
return e + t;
|
906
1090
|
}
|
907
|
-
const
|
908
|
-
add:
|
909
|
-
},
|
910
|
-
baseURL: ""
|
911
|
-
}, f = (e = "") => Ze.create({
|
912
|
-
...ye,
|
913
|
-
baseURL: e || ye.baseURL
|
914
|
-
}), At = async () => {
|
1091
|
+
const Bt = {
|
1092
|
+
add: mt
|
1093
|
+
}, yt = async () => {
|
915
1094
|
try {
|
916
|
-
const { data: e } = await
|
1095
|
+
const { data: e } = await w().get(
|
917
1096
|
"/user",
|
918
1097
|
{
|
919
1098
|
headers: {
|
@@ -925,7 +1104,7 @@ const fn = {
|
|
925
1104
|
} catch (e) {
|
926
1105
|
throw e;
|
927
1106
|
}
|
928
|
-
},
|
1107
|
+
}, ye = [
|
929
1108
|
{ Action: "devices.ACCESS" },
|
930
1109
|
{ Action: "devices.CREATE_DEVICE" },
|
931
1110
|
{ Action: "devicetypes.CREATE_DEVICE_TYPE" },
|
@@ -964,9 +1143,9 @@ const fn = {
|
|
964
1143
|
{ Action: "integrations.ACCESS" }
|
965
1144
|
], _t = async (e = []) => {
|
966
1145
|
try {
|
967
|
-
const { data: t } = await
|
1146
|
+
const { data: t } = await w().post(
|
968
1147
|
"/api/v1/authorization/policy/check",
|
969
|
-
e.length ? e :
|
1148
|
+
e.length ? e : ye,
|
970
1149
|
{
|
971
1150
|
headers: {
|
972
1151
|
Accept: "application/json"
|
@@ -977,15 +1156,15 @@ const fn = {
|
|
977
1156
|
} catch {
|
978
1157
|
return [];
|
979
1158
|
}
|
980
|
-
},
|
981
|
-
getUser:
|
1159
|
+
}, ce = {
|
1160
|
+
getUser: yt,
|
982
1161
|
getUserPermissions: _t,
|
983
|
-
permissionList:
|
984
|
-
},
|
1162
|
+
permissionList: ye
|
1163
|
+
}, ft = async (e) => {
|
985
1164
|
const t = [];
|
986
1165
|
e && t.push(e);
|
987
1166
|
try {
|
988
|
-
const { data:
|
1167
|
+
const { data: s } = await w().get(
|
989
1168
|
`/api/v1/iotdata/devices/counters/metrics?${t.join("&")}`,
|
990
1169
|
{
|
991
1170
|
headers: {
|
@@ -993,13 +1172,13 @@ const fn = {
|
|
993
1172
|
}
|
994
1173
|
}
|
995
1174
|
);
|
996
|
-
return
|
1175
|
+
return s;
|
997
1176
|
} catch {
|
998
1177
|
throw new Error("Devices Counters API Error");
|
999
1178
|
}
|
1000
|
-
},
|
1179
|
+
}, wt = async (e) => {
|
1001
1180
|
try {
|
1002
|
-
const { data: t } = await
|
1181
|
+
const { data: t } = await w().get(
|
1003
1182
|
`/api/v1/iotdata/devices/counters/metrics?arrayUUIDs=${e.join(",")}`,
|
1004
1183
|
{
|
1005
1184
|
headers: {
|
@@ -1011,9 +1190,9 @@ const fn = {
|
|
1011
1190
|
} catch {
|
1012
1191
|
throw new Error("Devices Counters API Error");
|
1013
1192
|
}
|
1014
|
-
},
|
1193
|
+
}, bt = async (e) => {
|
1015
1194
|
try {
|
1016
|
-
const { data: t } = await
|
1195
|
+
const { data: t } = await w().get(
|
1017
1196
|
`/api/v1/iotdata/devices/counters/metrics/${e}`,
|
1018
1197
|
{
|
1019
1198
|
headers: {
|
@@ -1025,9 +1204,9 @@ const fn = {
|
|
1025
1204
|
} catch {
|
1026
1205
|
throw new Error("Devices Counters API Error");
|
1027
1206
|
}
|
1028
|
-
},
|
1207
|
+
}, ht = async (e) => {
|
1029
1208
|
try {
|
1030
|
-
const { data: t } = await
|
1209
|
+
const { data: t } = await w().get(
|
1031
1210
|
`/api/v1/iotdata/devices/counters/${e}`,
|
1032
1211
|
{
|
1033
1212
|
headers: {
|
@@ -1039,9 +1218,9 @@ const fn = {
|
|
1039
1218
|
} catch {
|
1040
1219
|
throw new Error("Devices Counters API Error");
|
1041
1220
|
}
|
1042
|
-
},
|
1221
|
+
}, gt = async (e) => {
|
1043
1222
|
try {
|
1044
|
-
const { data: t } = await
|
1223
|
+
const { data: t } = await w().get(
|
1045
1224
|
`/api/v1/iotdata/devices/counters/latest/${e}`,
|
1046
1225
|
{
|
1047
1226
|
headers: {
|
@@ -1053,9 +1232,9 @@ const fn = {
|
|
1053
1232
|
} catch {
|
1054
1233
|
throw new Error("Devices Counters API Error");
|
1055
1234
|
}
|
1056
|
-
},
|
1235
|
+
}, At = async (e) => {
|
1057
1236
|
try {
|
1058
|
-
const { data: t } = await
|
1237
|
+
const { data: t } = await w().get(
|
1059
1238
|
`/api/v1/iotdata/devices/counters/latest?arrayUUIDs=${e.join(",")}`,
|
1060
1239
|
{
|
1061
1240
|
headers: {
|
@@ -1067,16 +1246,16 @@ const fn = {
|
|
1067
1246
|
} catch {
|
1068
1247
|
throw new Error("Devices Counters API Error");
|
1069
1248
|
}
|
1070
|
-
},
|
1071
|
-
getDevicesCountersMetric:
|
1072
|
-
getDevicesCountersMetricByUUID:
|
1073
|
-
getDevicesCountersMetricByUUIDs:
|
1074
|
-
getDevicesCountersByUUID:
|
1075
|
-
getDevicesCountersLatestByUUID:
|
1076
|
-
getDevicesCountersLatestByUUIDs:
|
1077
|
-
},
|
1249
|
+
}, Lt = {
|
1250
|
+
getDevicesCountersMetric: ft,
|
1251
|
+
getDevicesCountersMetricByUUID: bt,
|
1252
|
+
getDevicesCountersMetricByUUIDs: wt,
|
1253
|
+
getDevicesCountersByUUID: ht,
|
1254
|
+
getDevicesCountersLatestByUUID: gt,
|
1255
|
+
getDevicesCountersLatestByUUIDs: At
|
1256
|
+
}, Et = async (e) => {
|
1078
1257
|
try {
|
1079
|
-
const { data: t } = await
|
1258
|
+
const { data: t } = await w().get(
|
1080
1259
|
`/api/v1/iotdata/twins/counters/${e}`,
|
1081
1260
|
{
|
1082
1261
|
headers: {
|
@@ -1088,9 +1267,9 @@ const fn = {
|
|
1088
1267
|
} catch {
|
1089
1268
|
throw new Error("Twins Counters API Error");
|
1090
1269
|
}
|
1091
|
-
},
|
1270
|
+
}, Ct = async (e) => {
|
1092
1271
|
try {
|
1093
|
-
const { data: t } = await
|
1272
|
+
const { data: t } = await w().get(
|
1094
1273
|
`/api/v1/iotdata/twins/counters/latest/${e}`,
|
1095
1274
|
{
|
1096
1275
|
headers: {
|
@@ -1102,28 +1281,28 @@ const fn = {
|
|
1102
1281
|
} catch {
|
1103
1282
|
throw new Error("Twins Counters API Error");
|
1104
1283
|
}
|
1105
|
-
},
|
1106
|
-
getTwinsCountersLatestByUUID:
|
1107
|
-
getTwinsCountersByUUID:
|
1108
|
-
},
|
1109
|
-
const
|
1110
|
-
|
1284
|
+
}, Nt = {
|
1285
|
+
getTwinsCountersLatestByUUID: Ct,
|
1286
|
+
getTwinsCountersByUUID: Et
|
1287
|
+
}, It = async (e, t, s, r) => {
|
1288
|
+
const n = [];
|
1289
|
+
n.push(`start=${e || 0}`), t && n.push(`limit=${t}`), s && n.push(`sort=${s}`), r && n.push(r);
|
1111
1290
|
try {
|
1112
|
-
const { data:
|
1113
|
-
`/api/v1/devices?${
|
1291
|
+
const { data: l } = await w().get(
|
1292
|
+
`/api/v1/devices?${n.join("&")}`,
|
1114
1293
|
{
|
1115
1294
|
headers: {
|
1116
1295
|
Accept: "application/json"
|
1117
1296
|
}
|
1118
1297
|
}
|
1119
1298
|
);
|
1120
|
-
return
|
1299
|
+
return l;
|
1121
1300
|
} catch {
|
1122
1301
|
throw new Error("Devices API Error");
|
1123
1302
|
}
|
1124
|
-
},
|
1303
|
+
}, St = async (e) => {
|
1125
1304
|
try {
|
1126
|
-
const { data: t } = await
|
1305
|
+
const { data: t } = await w().post(
|
1127
1306
|
"/api/v1/devices/query",
|
1128
1307
|
e,
|
1129
1308
|
{
|
@@ -1136,9 +1315,9 @@ const fn = {
|
|
1136
1315
|
} catch {
|
1137
1316
|
throw new Error("Devices API Error");
|
1138
1317
|
}
|
1139
|
-
},
|
1318
|
+
}, Tt = async (e) => {
|
1140
1319
|
try {
|
1141
|
-
const { data: t } = await
|
1320
|
+
const { data: t } = await w().get(
|
1142
1321
|
`/api/v1/devices/${e}`,
|
1143
1322
|
{
|
1144
1323
|
headers: {
|
@@ -1150,9 +1329,9 @@ const fn = {
|
|
1150
1329
|
} catch {
|
1151
1330
|
throw new Error("Devices API Error");
|
1152
1331
|
}
|
1153
|
-
},
|
1332
|
+
}, Ut = async (e) => {
|
1154
1333
|
try {
|
1155
|
-
const { data: t } = await
|
1334
|
+
const { data: t } = await w().get(
|
1156
1335
|
`/api/v1/devices?arrayUUIDs=${e.join(",")}`,
|
1157
1336
|
{
|
1158
1337
|
headers: {
|
@@ -1164,9 +1343,9 @@ const fn = {
|
|
1164
1343
|
} catch {
|
1165
1344
|
throw new Error("Devices API Error");
|
1166
1345
|
}
|
1167
|
-
},
|
1346
|
+
}, Dt = async (e) => {
|
1168
1347
|
try {
|
1169
|
-
const { data: t } = await
|
1348
|
+
const { data: t } = await w().get(
|
1170
1349
|
`/api/v1/devices/attachments/${e}`,
|
1171
1350
|
{
|
1172
1351
|
headers: {
|
@@ -1178,111 +1357,15 @@ const fn = {
|
|
1178
1357
|
} catch {
|
1179
1358
|
throw new Error("Devices API Error");
|
1180
1359
|
}
|
1181
|
-
},
|
1182
|
-
getDevices:
|
1183
|
-
queryDevices:
|
1184
|
-
getDeviceByUUID:
|
1185
|
-
getDeviceByUUIDs:
|
1186
|
-
getDeviceAttachements:
|
1187
|
-
},
|
1188
|
-
const o = [];
|
1189
|
-
o.push(`start=${e || 0}`), t && o.push(`limit=${t}`), n && o.push(`sort=${n}`), s && o.push(s);
|
1190
|
-
try {
|
1191
|
-
const { data: r, headers: a } = await f().get(
|
1192
|
-
`/api/v1/twins?${o.join("&")}`,
|
1193
|
-
{
|
1194
|
-
headers: {
|
1195
|
-
Accept: "application/json"
|
1196
|
-
}
|
1197
|
-
}
|
1198
|
-
);
|
1199
|
-
return { totalRecords: parseInt(a["com-davra-total-results"]), records: r };
|
1200
|
-
} catch {
|
1201
|
-
throw new Error("Twins API Error");
|
1202
|
-
}
|
1203
|
-
}, Vt = async (e) => {
|
1204
|
-
try {
|
1205
|
-
const { data: t, headers: n } = await f().post(
|
1206
|
-
"/api/v1/twins/query",
|
1207
|
-
e,
|
1208
|
-
{
|
1209
|
-
headers: {
|
1210
|
-
Accept: "application/json"
|
1211
|
-
}
|
1212
|
-
}
|
1213
|
-
);
|
1214
|
-
return { totalRecords: parseInt(n["com-davra-total-results"]), records: t };
|
1215
|
-
} catch {
|
1216
|
-
throw new Error("Twins API Error");
|
1217
|
-
}
|
1218
|
-
}, Bt = async (e) => {
|
1219
|
-
try {
|
1220
|
-
const { data: t, headers: n } = await f().get(
|
1221
|
-
`/api/v1/twins?arrayUUIDs=${e.join(",")}`,
|
1222
|
-
{
|
1223
|
-
headers: {
|
1224
|
-
Accept: "application/json"
|
1225
|
-
}
|
1226
|
-
}
|
1227
|
-
);
|
1228
|
-
return { totalRecords: parseInt(n["com-davra-total-results"]), records: t };
|
1229
|
-
} catch {
|
1230
|
-
throw new Error("Twins API Error");
|
1231
|
-
}
|
1232
|
-
}, Wt = async (e, t = 0, n = 1e3, s, o) => {
|
1233
|
-
const r = [`digitalTwinTypeName=${e}`, `limit=${n}`, `start=${t}`];
|
1234
|
-
s && r.push(`sort=${s}`), o && r.push(`name=~${o}`);
|
1235
|
-
try {
|
1236
|
-
const { data: a, headers: i } = await f().get(
|
1237
|
-
`/api/v1/twins/?${r.join("&")}`,
|
1238
|
-
{
|
1239
|
-
headers: {
|
1240
|
-
Accept: "application/json"
|
1241
|
-
}
|
1242
|
-
}
|
1243
|
-
);
|
1244
|
-
return { totalRecords: parseInt(i["com-davra-total-results"]), records: a };
|
1245
|
-
} catch {
|
1246
|
-
throw new Error("Twins API Error");
|
1247
|
-
}
|
1248
|
-
}, Mt = async (e) => {
|
1249
|
-
try {
|
1250
|
-
const { data: t } = await f().get(
|
1251
|
-
`/api/v1/twins/${e}`,
|
1252
|
-
{
|
1253
|
-
headers: {
|
1254
|
-
Accept: "application/json"
|
1255
|
-
}
|
1256
|
-
}
|
1257
|
-
);
|
1258
|
-
return t;
|
1259
|
-
} catch {
|
1260
|
-
throw new Error("Twins API Error");
|
1261
|
-
}
|
1262
|
-
}, Ht = async (e) => {
|
1263
|
-
try {
|
1264
|
-
const { data: t } = await f().get(
|
1265
|
-
`/api/v1/twins/${e}/attachments`,
|
1266
|
-
{
|
1267
|
-
headers: {
|
1268
|
-
Accept: "application/json"
|
1269
|
-
}
|
1270
|
-
}
|
1271
|
-
);
|
1272
|
-
return t;
|
1273
|
-
} catch {
|
1274
|
-
throw new Error("Twins API Error");
|
1275
|
-
}
|
1276
|
-
}, Z = {
|
1277
|
-
getTwins: Ft,
|
1278
|
-
getTwinsByTypeName: Wt,
|
1279
|
-
getTwinByUUID: Mt,
|
1280
|
-
getTwinByUUIDs: Bt,
|
1281
|
-
getTwinAttachements: Ht,
|
1282
|
-
queryTwins: Vt
|
1283
|
-
}, qt = async (e) => {
|
1360
|
+
}, Y = {
|
1361
|
+
getDevices: It,
|
1362
|
+
queryDevices: St,
|
1363
|
+
getDeviceByUUID: Tt,
|
1364
|
+
getDeviceByUUIDs: Ut,
|
1365
|
+
getDeviceAttachements: Dt
|
1366
|
+
}, kt = async (e) => {
|
1284
1367
|
try {
|
1285
|
-
const { data: t } = await
|
1368
|
+
const { data: t } = await w().post(
|
1286
1369
|
"/api/v2/timeseriesdata",
|
1287
1370
|
e,
|
1288
1371
|
{
|
@@ -1295,62 +1378,12 @@ const fn = {
|
|
1295
1378
|
} catch {
|
1296
1379
|
throw new Error("Timeseries Error");
|
1297
1380
|
}
|
1298
|
-
},
|
1299
|
-
queryTimeseries:
|
1300
|
-
},
|
1381
|
+
}, qt = {
|
1382
|
+
queryTimeseries: kt
|
1383
|
+
}, Vt = async () => {
|
1384
|
+
var e, t, s, r, n, l, o;
|
1301
1385
|
try {
|
1302
|
-
const { data:
|
1303
|
-
"/api/v1/tags/keys",
|
1304
|
-
{
|
1305
|
-
headers: {
|
1306
|
-
Accept: "application/json"
|
1307
|
-
}
|
1308
|
-
}
|
1309
|
-
);
|
1310
|
-
return e || [];
|
1311
|
-
} catch {
|
1312
|
-
return [];
|
1313
|
-
}
|
1314
|
-
}, Yt = async (e) => {
|
1315
|
-
try {
|
1316
|
-
const { data: t } = await f().get(
|
1317
|
-
`/api/v1/tags/values/${e}`,
|
1318
|
-
{
|
1319
|
-
headers: {
|
1320
|
-
Accept: "application/json"
|
1321
|
-
}
|
1322
|
-
}
|
1323
|
-
);
|
1324
|
-
return t || [];
|
1325
|
-
} catch {
|
1326
|
-
return [];
|
1327
|
-
}
|
1328
|
-
}, Jt = async (e, t) => {
|
1329
|
-
const n = { ...e };
|
1330
|
-
Object.entries(n).forEach(([s, o]) => {
|
1331
|
-
t && t.includes(s) && delete n[s], (!o || /[^a-zA-Z_0-9\-+]/g.test(o)) && delete n[s];
|
1332
|
-
});
|
1333
|
-
try {
|
1334
|
-
return await f().post(
|
1335
|
-
"/api/v1/tags",
|
1336
|
-
n,
|
1337
|
-
{
|
1338
|
-
headers: {
|
1339
|
-
Accept: "application/json"
|
1340
|
-
}
|
1341
|
-
}
|
1342
|
-
), !0;
|
1343
|
-
} catch {
|
1344
|
-
return !1;
|
1345
|
-
}
|
1346
|
-
}, ve = {
|
1347
|
-
getLabels: zt,
|
1348
|
-
createLabel: Jt,
|
1349
|
-
getValuesByKey: Yt
|
1350
|
-
}, Xt = async () => {
|
1351
|
-
var e, t, n, s, o, r, a;
|
1352
|
-
try {
|
1353
|
-
const { data: i } = await f().get(
|
1386
|
+
const { data: a } = await w().get(
|
1354
1387
|
"/api/v1/iotdata/meta-data/metrics",
|
1355
1388
|
{
|
1356
1389
|
headers: {
|
@@ -1358,15 +1391,15 @@ const fn = {
|
|
1358
1391
|
}
|
1359
1392
|
}
|
1360
1393
|
);
|
1361
|
-
return
|
1362
|
-
} catch (
|
1363
|
-
const c = typeof ((t = (e =
|
1364
|
-
throw new Error(`API Error ${(
|
1394
|
+
return a.fields;
|
1395
|
+
} catch (a) {
|
1396
|
+
const c = typeof ((t = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : t.message) == "string" ? (r = (s = a == null ? void 0 : a.response) == null ? void 0 : s.data) == null ? void 0 : r.message : typeof ((n = a == null ? void 0 : a.response) == null ? void 0 : n.data) == "string" ? (l = a == null ? void 0 : a.response) == null ? void 0 : l.data : "";
|
1397
|
+
throw new Error(`API Error ${(o = a == null ? void 0 : a.response) == null ? void 0 : o.status} ${c}`);
|
1365
1398
|
}
|
1366
|
-
},
|
1367
|
-
var t,
|
1399
|
+
}, $t = async (e) => {
|
1400
|
+
var t, s, r, n, l, o, a;
|
1368
1401
|
try {
|
1369
|
-
const { data: c } = await
|
1402
|
+
const { data: c } = await w().post(
|
1370
1403
|
"/api/v1/iotdata/meta-data",
|
1371
1404
|
{
|
1372
1405
|
name: e.name,
|
@@ -1384,387 +1417,46 @@ const fn = {
|
|
1384
1417
|
);
|
1385
1418
|
return c;
|
1386
1419
|
} catch (c) {
|
1387
|
-
const
|
1388
|
-
throw new Error(`API Error ${(
|
1389
|
-
}
|
1390
|
-
}, we = {
|
1391
|
-
getMetrics: Xt,
|
1392
|
-
postMetric: Gt
|
1393
|
-
};
|
1394
|
-
var Zt = !1;
|
1395
|
-
function W(e, t, n) {
|
1396
|
-
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
|
1397
|
-
}
|
1398
|
-
function Q(e, t) {
|
1399
|
-
if (Array.isArray(e)) {
|
1400
|
-
e.splice(t, 1);
|
1401
|
-
return;
|
1402
|
-
}
|
1403
|
-
delete e[t];
|
1404
|
-
}
|
1405
|
-
/*!
|
1406
|
-
* pinia v2.1.7
|
1407
|
-
* (c) 2023 Eduardo San Martin Morote
|
1408
|
-
* @license MIT
|
1409
|
-
*/
|
1410
|
-
let F;
|
1411
|
-
const z = (e) => F = e, Qt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
1412
|
-
/* istanbul ignore next */
|
1413
|
-
Symbol()
|
1414
|
-
);
|
1415
|
-
function P(e) {
|
1416
|
-
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
1417
|
-
}
|
1418
|
-
var V;
|
1419
|
-
(function(e) {
|
1420
|
-
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
1421
|
-
})(V || (V = {}));
|
1422
|
-
const oe = typeof window < "u", K = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && oe;
|
1423
|
-
function Pe(e, t) {
|
1424
|
-
for (const n in t) {
|
1425
|
-
const s = t[n];
|
1426
|
-
if (!(n in e))
|
1427
|
-
continue;
|
1428
|
-
const o = e[n];
|
1429
|
-
P(o) && P(s) && !$(s) && !Y(s) ? e[n] = Pe(o, s) : e[n] = s;
|
1430
|
-
}
|
1431
|
-
return e;
|
1432
|
-
}
|
1433
|
-
const Oe = () => {
|
1434
|
-
};
|
1435
|
-
function be(e, t, n, s = Oe) {
|
1436
|
-
e.push(t);
|
1437
|
-
const o = () => {
|
1438
|
-
const r = e.indexOf(t);
|
1439
|
-
r > -1 && (e.splice(r, 1), s());
|
1440
|
-
};
|
1441
|
-
return !n && Xe() && Ge(o), o;
|
1442
|
-
}
|
1443
|
-
function U(e, ...t) {
|
1444
|
-
e.slice().forEach((n) => {
|
1445
|
-
n(...t);
|
1446
|
-
});
|
1447
|
-
}
|
1448
|
-
const Kt = (e) => e();
|
1449
|
-
function ne(e, t) {
|
1450
|
-
e instanceof Map && t instanceof Map && t.forEach((n, s) => e.set(s, n)), e instanceof Set && t instanceof Set && t.forEach(e.add, e);
|
1451
|
-
for (const n in t) {
|
1452
|
-
if (!t.hasOwnProperty(n))
|
1453
|
-
continue;
|
1454
|
-
const s = t[n], o = e[n];
|
1455
|
-
P(o) && P(s) && e.hasOwnProperty(n) && !$(s) && !Y(s) ? e[n] = ne(o, s) : e[n] = s;
|
1456
|
-
}
|
1457
|
-
return e;
|
1458
|
-
}
|
1459
|
-
const en = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
1460
|
-
/* istanbul ignore next */
|
1461
|
-
Symbol()
|
1462
|
-
);
|
1463
|
-
function tn(e) {
|
1464
|
-
return !P(e) || !e.hasOwnProperty(en);
|
1465
|
-
}
|
1466
|
-
const { assign: C } = Object;
|
1467
|
-
function Ee(e) {
|
1468
|
-
return !!($(e) && e.effect);
|
1469
|
-
}
|
1470
|
-
function Ce(e, t, n, s) {
|
1471
|
-
const { state: o, actions: r, getters: a } = t, i = n.state.value[e];
|
1472
|
-
let c;
|
1473
|
-
function d() {
|
1474
|
-
!i && (process.env.NODE_ENV === "production" || !s) && (n.state.value[e] = o ? o() : {});
|
1475
|
-
const y = process.env.NODE_ENV !== "production" && s ? (
|
1476
|
-
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
1477
|
-
he(v(o ? o() : {}).value)
|
1478
|
-
) : he(n.state.value[e]);
|
1479
|
-
return C(y, r, Object.keys(a || {}).reduce((h, m) => (process.env.NODE_ENV !== "production" && m in y && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${m}" in store "${e}".`), h[m] = k(D(() => {
|
1480
|
-
z(n);
|
1481
|
-
const b = n._s.get(e);
|
1482
|
-
return a[m].call(b, b);
|
1483
|
-
})), h), {}));
|
1484
|
-
}
|
1485
|
-
return c = se(e, d, t, n, s, !0), c;
|
1486
|
-
}
|
1487
|
-
function se(e, t, n = {}, s, o, r) {
|
1488
|
-
let a;
|
1489
|
-
const i = C({ actions: {} }, n);
|
1490
|
-
if (process.env.NODE_ENV !== "production" && !s._e.active)
|
1491
|
-
throw new Error("Pinia destroyed");
|
1492
|
-
const c = {
|
1493
|
-
deep: !0
|
1494
|
-
// flush: 'post',
|
1495
|
-
};
|
1496
|
-
process.env.NODE_ENV !== "production" && !Zt && (c.onTrigger = (u) => {
|
1497
|
-
d ? b = u : d == !1 && !p._hotUpdating && (Array.isArray(b) ? b.push(u) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
1498
|
-
});
|
1499
|
-
let d, y, h = [], m = [], b;
|
1500
|
-
const N = s.state.value[e];
|
1501
|
-
!r && !N && (process.env.NODE_ENV === "production" || !o) && (s.state.value[e] = {});
|
1502
|
-
const J = v({});
|
1503
|
-
let re;
|
1504
|
-
function ie(u) {
|
1505
|
-
let l;
|
1506
|
-
d = y = !1, process.env.NODE_ENV !== "production" && (b = []), typeof u == "function" ? (u(s.state.value[e]), l = {
|
1507
|
-
type: V.patchFunction,
|
1508
|
-
storeId: e,
|
1509
|
-
events: b
|
1510
|
-
}) : (ne(s.state.value[e], u), l = {
|
1511
|
-
type: V.patchObject,
|
1512
|
-
payload: u,
|
1513
|
-
storeId: e,
|
1514
|
-
events: b
|
1515
|
-
});
|
1516
|
-
const g = re = Symbol();
|
1517
|
-
fe().then(() => {
|
1518
|
-
re === g && (d = !0);
|
1519
|
-
}), y = !0, U(h, l, s.state.value[e]);
|
1520
|
-
}
|
1521
|
-
const Ne = r ? function() {
|
1522
|
-
const { state: l } = n, g = l ? l() : {};
|
1523
|
-
this.$patch((w) => {
|
1524
|
-
C(w, g);
|
1525
|
-
});
|
1526
|
-
} : (
|
1527
|
-
/* istanbul ignore next */
|
1528
|
-
process.env.NODE_ENV !== "production" ? () => {
|
1529
|
-
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
1530
|
-
} : Oe
|
1531
|
-
);
|
1532
|
-
function Ue() {
|
1533
|
-
a.stop(), h = [], m = [], s._s.delete(e);
|
1420
|
+
const v = typeof ((s = (t = c == null ? void 0 : c.response) == null ? void 0 : t.data) == null ? void 0 : s.message) == "string" ? (n = (r = c == null ? void 0 : c.response) == null ? void 0 : r.data) == null ? void 0 : n.message : typeof ((l = c == null ? void 0 : c.response) == null ? void 0 : l.data) == "string" ? (o = c == null ? void 0 : c.response) == null ? void 0 : o.data : "";
|
1421
|
+
throw new Error(`API Error ${(a = c == null ? void 0 : c.response) == null ? void 0 : a.status} ${v}`);
|
1534
1422
|
}
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
name: u,
|
1548
|
-
store: p,
|
1549
|
-
after: Re,
|
1550
|
-
onError: $e
|
1551
|
-
});
|
1552
|
-
let L;
|
1553
|
-
try {
|
1554
|
-
L = l.apply(this && this.$id === e ? this : p, g);
|
1555
|
-
} catch (E) {
|
1556
|
-
throw U(j, E), E;
|
1557
|
-
}
|
1558
|
-
return L instanceof Promise ? L.then((E) => (U(w, E), E)).catch((E) => (U(j, E), Promise.reject(E))) : (U(w, L), L);
|
1559
|
-
};
|
1560
|
-
}
|
1561
|
-
const B = /* @__PURE__ */ k({
|
1562
|
-
actions: {},
|
1563
|
-
getters: {},
|
1564
|
-
state: [],
|
1565
|
-
hotState: J
|
1566
|
-
}), ce = {
|
1567
|
-
_p: s,
|
1568
|
-
// _s: scope,
|
1569
|
-
$id: e,
|
1570
|
-
$onAction: be.bind(null, m),
|
1571
|
-
$patch: ie,
|
1572
|
-
$reset: Ne,
|
1573
|
-
$subscribe(u, l = {}) {
|
1574
|
-
const g = be(h, u, l.detached, () => w()), w = a.run(() => ze(() => s.state.value[e], (j) => {
|
1575
|
-
(l.flush === "sync" ? y : d) && u({
|
1576
|
-
storeId: e,
|
1577
|
-
type: V.direct,
|
1578
|
-
events: b
|
1579
|
-
}, j);
|
1580
|
-
}, C({}, c, l)));
|
1581
|
-
return g;
|
1582
|
-
},
|
1583
|
-
$dispose: Ue
|
1584
|
-
}, p = Ye(process.env.NODE_ENV !== "production" || K ? C(
|
1585
|
-
{
|
1586
|
-
_hmrPayload: B,
|
1587
|
-
_customProperties: k(/* @__PURE__ */ new Set())
|
1588
|
-
// devtools custom properties
|
1589
|
-
},
|
1590
|
-
ce
|
1591
|
-
// must be added later
|
1592
|
-
// setupStore
|
1593
|
-
) : ce);
|
1594
|
-
s._s.set(e, p);
|
1595
|
-
const _ = (s._a && s._a.runWithContext || Kt)(() => s._e.run(() => (a = Je()).run(t)));
|
1596
|
-
for (const u in _) {
|
1597
|
-
const l = _[u];
|
1598
|
-
if ($(l) && !Ee(l) || Y(l))
|
1599
|
-
process.env.NODE_ENV !== "production" && o ? W(J.value, u, H(_, u)) : r || (N && tn(l) && ($(l) ? l.value = N[u] : ne(l, N[u])), s.state.value[e][u] = l), process.env.NODE_ENV !== "production" && B.state.push(u);
|
1600
|
-
else if (typeof l == "function") {
|
1601
|
-
const g = process.env.NODE_ENV !== "production" && o ? l : ae(u, l);
|
1602
|
-
_[u] = g, process.env.NODE_ENV !== "production" && (B.actions[u] = l), i.actions[u] = l;
|
1603
|
-
} else
|
1604
|
-
process.env.NODE_ENV !== "production" && Ee(l) && (B.getters[u] = r ? (
|
1605
|
-
// @ts-expect-error
|
1606
|
-
n.getters[u]
|
1607
|
-
) : l, oe && (_._getters || // @ts-expect-error: same
|
1608
|
-
(_._getters = k([]))).push(u));
|
1609
|
-
}
|
1610
|
-
if (C(p, _), C(Ae(p), _), Object.defineProperty(p, "$state", {
|
1611
|
-
get: () => process.env.NODE_ENV !== "production" && o ? J.value : s.state.value[e],
|
1612
|
-
set: (u) => {
|
1613
|
-
if (process.env.NODE_ENV !== "production" && o)
|
1614
|
-
throw new Error("cannot set hotState");
|
1615
|
-
ie((l) => {
|
1616
|
-
C(l, u);
|
1617
|
-
});
|
1618
|
-
}
|
1619
|
-
}), process.env.NODE_ENV !== "production" && (p._hotUpdate = k((u) => {
|
1620
|
-
p._hotUpdating = !0, u._hmrPayload.state.forEach((l) => {
|
1621
|
-
if (l in p.$state) {
|
1622
|
-
const g = u.$state[l], w = p.$state[l];
|
1623
|
-
typeof g == "object" && P(g) && P(w) ? Pe(g, w) : u.$state[l] = w;
|
1624
|
-
}
|
1625
|
-
W(p, l, H(u.$state, l));
|
1626
|
-
}), Object.keys(p.$state).forEach((l) => {
|
1627
|
-
l in u.$state || Q(p, l);
|
1628
|
-
}), d = !1, y = !1, s.state.value[e] = H(u._hmrPayload, "hotState"), y = !0, fe().then(() => {
|
1629
|
-
d = !0;
|
1630
|
-
});
|
1631
|
-
for (const l in u._hmrPayload.actions) {
|
1632
|
-
const g = u[l];
|
1633
|
-
W(p, l, ae(l, g));
|
1634
|
-
}
|
1635
|
-
for (const l in u._hmrPayload.getters) {
|
1636
|
-
const g = u._hmrPayload.getters[l], w = r ? (
|
1637
|
-
// special handling of options api
|
1638
|
-
D(() => (z(s), g.call(p, p)))
|
1639
|
-
) : g;
|
1640
|
-
W(p, l, w);
|
1641
|
-
}
|
1642
|
-
Object.keys(p._hmrPayload.getters).forEach((l) => {
|
1643
|
-
l in u._hmrPayload.getters || Q(p, l);
|
1644
|
-
}), Object.keys(p._hmrPayload.actions).forEach((l) => {
|
1645
|
-
l in u._hmrPayload.actions || Q(p, l);
|
1646
|
-
}), p._hmrPayload = u._hmrPayload, p._getters = u._getters, p._hotUpdating = !1;
|
1647
|
-
})), K) {
|
1648
|
-
const u = {
|
1649
|
-
writable: !0,
|
1650
|
-
configurable: !0,
|
1651
|
-
// avoid warning on devtools trying to display this property
|
1652
|
-
enumerable: !1
|
1653
|
-
};
|
1654
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((l) => {
|
1655
|
-
Object.defineProperty(p, l, C({ value: p[l] }, u));
|
1656
|
-
});
|
1657
|
-
}
|
1658
|
-
return s._p.forEach((u) => {
|
1659
|
-
if (K) {
|
1660
|
-
const l = a.run(() => u({
|
1661
|
-
store: p,
|
1662
|
-
app: s._a,
|
1663
|
-
pinia: s,
|
1664
|
-
options: i
|
1665
|
-
}));
|
1666
|
-
Object.keys(l || {}).forEach((g) => p._customProperties.add(g)), C(p, l);
|
1667
|
-
} else
|
1668
|
-
C(p, a.run(() => u({
|
1669
|
-
store: p,
|
1670
|
-
app: s._a,
|
1671
|
-
pinia: s,
|
1672
|
-
options: i
|
1673
|
-
})));
|
1674
|
-
}), process.env.NODE_ENV !== "production" && p.$state && typeof p.$state == "object" && typeof p.$state.constructor == "function" && !p.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
1675
|
-
state: () => new MyClass()
|
1676
|
-
Found in store "${p.$id}".`), N && r && n.hydrate && n.hydrate(p.$state, N), d = !0, y = !0, p;
|
1677
|
-
}
|
1678
|
-
function O(e, t, n) {
|
1679
|
-
let s, o;
|
1680
|
-
const r = typeof t == "function";
|
1681
|
-
if (typeof e == "string")
|
1682
|
-
s = e, o = r ? n : t;
|
1683
|
-
else if (o = e, s = e.id, process.env.NODE_ENV !== "production" && typeof s != "string")
|
1684
|
-
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
1685
|
-
function a(i, c) {
|
1686
|
-
const d = Me();
|
1687
|
-
if (i = // in test mode, ignore the argument provided as we can always retrieve a
|
1688
|
-
// pinia instance with getActivePinia()
|
1689
|
-
(process.env.NODE_ENV === "test" && F && F._testing ? null : i) || (d ? He(Qt, null) : null), i && z(i), process.env.NODE_ENV !== "production" && !F)
|
1690
|
-
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
1691
|
-
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
1692
|
-
This will fail in production.`);
|
1693
|
-
i = F, i._s.has(s) || (r ? se(s, t, o, i) : Ce(s, o, i), process.env.NODE_ENV !== "production" && (a._pinia = i));
|
1694
|
-
const y = i._s.get(s);
|
1695
|
-
if (process.env.NODE_ENV !== "production" && c) {
|
1696
|
-
const h = "__hot:" + s, m = r ? se(h, t, o, i, !0) : Ce(h, C({}, o), i, !0);
|
1697
|
-
c._hotUpdate(m), delete i.state.value[h], i._s.delete(h);
|
1698
|
-
}
|
1699
|
-
if (process.env.NODE_ENV !== "production" && oe) {
|
1700
|
-
const h = qe();
|
1701
|
-
if (h && h.proxy && // avoid adding stores that are just built for hot module replacement
|
1702
|
-
!c) {
|
1703
|
-
const m = h.proxy, b = "_pStores" in m ? m._pStores : m._pStores = {};
|
1704
|
-
b[s] = y;
|
1705
|
-
}
|
1706
|
-
}
|
1707
|
-
return y;
|
1708
|
-
}
|
1709
|
-
return a.$id = s, a;
|
1710
|
-
}
|
1711
|
-
function nn(e) {
|
1712
|
-
{
|
1713
|
-
e = Ae(e);
|
1714
|
-
const t = {};
|
1715
|
-
for (const n in e) {
|
1716
|
-
const s = e[n];
|
1717
|
-
($(s) || Y(s)) && (t[n] = // ---
|
1718
|
-
H(e, n));
|
1719
|
-
}
|
1720
|
-
return t;
|
1721
|
-
}
|
1722
|
-
}
|
1723
|
-
const M = O("alertMessages", () => {
|
1724
|
-
const e = v(!1), t = v(""), n = v(""), s = v(5e3);
|
1725
|
-
return {
|
1726
|
-
snackbar: e,
|
1727
|
-
snackbarText: t,
|
1728
|
-
snackbarSeverity: n,
|
1729
|
-
snackbarTimeout: s,
|
1730
|
-
setSnackbarMessage: (r = "", a = "", i = 5e3) => {
|
1731
|
-
t.value = r, n.value = a, s.value = i, e.value = !0;
|
1732
|
-
}
|
1733
|
-
};
|
1734
|
-
}), mn = O("userSession", () => {
|
1735
|
-
const e = v(JSON.parse(localStorage.getItem("user") || "null")), t = v(JSON.parse(localStorage.getItem("user-permissions") || "[]")), n = D(() => {
|
1736
|
-
var a;
|
1737
|
-
return ((a = e.value) == null ? void 0 : a.name) || "no user";
|
1738
|
-
}), s = D(() => (a) => {
|
1739
|
-
var i, c;
|
1740
|
-
return a ? ((c = (i = t.value) == null ? void 0 : i.find((d) => d.Action === a)) == null ? void 0 : c.Allowed) || !1 : !0;
|
1741
|
-
}), o = async () => {
|
1742
|
-
var a, i;
|
1423
|
+
}, ie = {
|
1424
|
+
getMetrics: Vt,
|
1425
|
+
postMetric: $t
|
1426
|
+
}, zt = q("userSession", () => {
|
1427
|
+
const e = h(JSON.parse(localStorage.getItem("user") || "null")), t = h(JSON.parse(localStorage.getItem("user-permissions") || "[]")), s = S(() => {
|
1428
|
+
var o;
|
1429
|
+
return ((o = e.value) == null ? void 0 : o.name) || "no user";
|
1430
|
+
}), r = S(() => (o) => {
|
1431
|
+
var a, c;
|
1432
|
+
return o ? ((c = (a = t.value) == null ? void 0 : a.find((v) => v.Action === o)) == null ? void 0 : c.Allowed) || !1 : !0;
|
1433
|
+
}), n = async () => {
|
1434
|
+
var o, a;
|
1743
1435
|
try {
|
1744
|
-
const c = await
|
1745
|
-
if (e.value = c, (
|
1746
|
-
const
|
1747
|
-
t.value =
|
1436
|
+
const c = await ce.getUser();
|
1437
|
+
if (e.value = c, (o = e.value) != null && o.UUID) {
|
1438
|
+
const v = await ce.getUserPermissions();
|
1439
|
+
t.value = v, localStorage.setItem("user", JSON.stringify(e.value)), localStorage.setItem("user-permissions", JSON.stringify(t.value));
|
1748
1440
|
}
|
1749
1441
|
} catch (c) {
|
1750
|
-
((
|
1442
|
+
((a = c.response) == null ? void 0 : a.status) === 401 && (window.location.href = "/ui/login.html");
|
1751
1443
|
}
|
1752
|
-
},
|
1444
|
+
}, l = () => {
|
1753
1445
|
e.value = null, t.value = [], localStorage.removeItem("user"), localStorage.removeItem("user-permission"), window.location.href = "/ui/logout";
|
1754
1446
|
};
|
1755
|
-
return
|
1756
|
-
}),
|
1757
|
-
const e =
|
1447
|
+
return n(), { user: e, pullUser: n, userName: s, userPermissions: t, getPermission: r, logout: l };
|
1448
|
+
}), Ft = q("devices", () => {
|
1449
|
+
const e = h({});
|
1758
1450
|
return {
|
1759
|
-
pullDevicesByUUIDs: async (
|
1760
|
-
|
1761
|
-
delete e.value[
|
1451
|
+
pullDevicesByUUIDs: async (n, l = !1) => {
|
1452
|
+
l && n.forEach((o) => {
|
1453
|
+
delete e.value[o];
|
1762
1454
|
});
|
1763
1455
|
try {
|
1764
|
-
const
|
1765
|
-
return
|
1766
|
-
e.value[
|
1767
|
-
}),
|
1456
|
+
const o = await Y.getDeviceByUUIDs(n);
|
1457
|
+
return o.records.forEach((a) => {
|
1458
|
+
e.value[a.UUID] = a;
|
1459
|
+
}), o;
|
1768
1460
|
} catch {
|
1769
1461
|
return {
|
1770
1462
|
totalRecords: 0,
|
@@ -1772,11 +1464,11 @@ const M = O("alertMessages", () => {
|
|
1772
1464
|
};
|
1773
1465
|
}
|
1774
1466
|
},
|
1775
|
-
pullDevices: async (
|
1467
|
+
pullDevices: async (n, l, o, a) => {
|
1776
1468
|
try {
|
1777
|
-
const c = await
|
1778
|
-
return c.records.forEach((
|
1779
|
-
e.value[
|
1469
|
+
const c = await Y.getDevices(n, l, o, a);
|
1470
|
+
return c.records.forEach((v) => {
|
1471
|
+
e.value[v.UUID] = v;
|
1780
1472
|
}), c;
|
1781
1473
|
} catch {
|
1782
1474
|
return {
|
@@ -1786,33 +1478,33 @@ const M = O("alertMessages", () => {
|
|
1786
1478
|
}
|
1787
1479
|
},
|
1788
1480
|
devicesCollection: e,
|
1789
|
-
getDeviceFromUUID: async (
|
1790
|
-
const
|
1791
|
-
if (
|
1792
|
-
return
|
1793
|
-
if (
|
1481
|
+
getDeviceFromUUID: async (n, l) => {
|
1482
|
+
const o = e.value[n];
|
1483
|
+
if (o)
|
1484
|
+
return o;
|
1485
|
+
if (l)
|
1794
1486
|
return null;
|
1795
1487
|
try {
|
1796
|
-
const
|
1797
|
-
if (
|
1798
|
-
return e.value[
|
1488
|
+
const a = await Y.getDeviceByUUID(n);
|
1489
|
+
if (a)
|
1490
|
+
return e.value[a.UUID] = a, a;
|
1799
1491
|
} catch {
|
1800
1492
|
return null;
|
1801
1493
|
}
|
1802
1494
|
}
|
1803
1495
|
};
|
1804
|
-
}),
|
1805
|
-
const e =
|
1496
|
+
}), Qt = q("twins", () => {
|
1497
|
+
const e = h({});
|
1806
1498
|
return {
|
1807
|
-
pullTwinsByUUIDs: async (
|
1808
|
-
|
1809
|
-
delete e.value[
|
1499
|
+
pullTwinsByUUIDs: async (n, l = !1) => {
|
1500
|
+
l && n.forEach((o) => {
|
1501
|
+
delete e.value[o];
|
1810
1502
|
});
|
1811
1503
|
try {
|
1812
|
-
const
|
1813
|
-
return
|
1814
|
-
e.value[
|
1815
|
-
}),
|
1504
|
+
const o = await J.getTwinByUUIDs(n);
|
1505
|
+
return o.records.forEach((a) => {
|
1506
|
+
e.value[a.UUID] = a;
|
1507
|
+
}), o;
|
1816
1508
|
} catch {
|
1817
1509
|
return {
|
1818
1510
|
totalRecords: 0,
|
@@ -1820,11 +1512,11 @@ const M = O("alertMessages", () => {
|
|
1820
1512
|
};
|
1821
1513
|
}
|
1822
1514
|
},
|
1823
|
-
pullTwins: async (
|
1515
|
+
pullTwins: async (n, l, o, a) => {
|
1824
1516
|
try {
|
1825
|
-
const c = await
|
1826
|
-
return c.records.forEach((
|
1827
|
-
e.value[
|
1517
|
+
const c = await J.getTwins(n, l, o, a);
|
1518
|
+
return c.records.forEach((v) => {
|
1519
|
+
e.value[v.UUID] = v;
|
1828
1520
|
}), c;
|
1829
1521
|
} catch {
|
1830
1522
|
return {
|
@@ -1834,73 +1526,24 @@ const M = O("alertMessages", () => {
|
|
1834
1526
|
}
|
1835
1527
|
},
|
1836
1528
|
twinsCollection: e,
|
1837
|
-
getTwinFromUUID: async (
|
1838
|
-
const
|
1839
|
-
if (
|
1840
|
-
return
|
1841
|
-
if (
|
1529
|
+
getTwinFromUUID: async (n, l) => {
|
1530
|
+
const o = e.value[n];
|
1531
|
+
if (o)
|
1532
|
+
return o;
|
1533
|
+
if (l)
|
1842
1534
|
return null;
|
1843
1535
|
try {
|
1844
|
-
const
|
1845
|
-
if (
|
1846
|
-
return e.value[
|
1536
|
+
const a = await J.getTwinByUUID(n);
|
1537
|
+
if (a)
|
1538
|
+
return e.value[a.UUID] = a, a;
|
1847
1539
|
} catch {
|
1848
1540
|
return null;
|
1849
1541
|
}
|
1850
1542
|
}
|
1851
1543
|
};
|
1852
|
-
}),
|
1853
|
-
try {
|
1854
|
-
const { data: e } = await f().get(
|
1855
|
-
"/api/v1/twintypes",
|
1856
|
-
{
|
1857
|
-
headers: {
|
1858
|
-
Accept: "application/json"
|
1859
|
-
}
|
1860
|
-
}
|
1861
|
-
);
|
1862
|
-
return Object.values(e) || [];
|
1863
|
-
} catch {
|
1864
|
-
return [];
|
1865
|
-
}
|
1866
|
-
}, on = {
|
1867
|
-
getTwinTypes: sn
|
1868
|
-
}, rn = O("twinTypes", () => {
|
1869
|
-
const e = v([]), t = D(() => e.value.map((o) => o.name)), n = D(() => e.value.map((o) => ({ value: o.UUID, label: o.name }))), s = async () => {
|
1870
|
-
try {
|
1871
|
-
const o = await on.getTwinTypes();
|
1872
|
-
e.value = o;
|
1873
|
-
} catch {
|
1874
|
-
}
|
1875
|
-
};
|
1876
|
-
return s(), {
|
1877
|
-
twinTypes: e,
|
1878
|
-
pullTwinTypes: s,
|
1879
|
-
twinTypeNames: t,
|
1880
|
-
twinTypeSelectArray: n
|
1881
|
-
};
|
1882
|
-
}), bn = O("labels", () => {
|
1883
|
-
const e = v([]), t = async () => {
|
1884
|
-
try {
|
1885
|
-
const s = await ve.getLabels();
|
1886
|
-
e.value = s;
|
1887
|
-
} catch {
|
1888
|
-
}
|
1889
|
-
}, n = async (s) => {
|
1890
|
-
const { twinTypeNames: o } = nn(rn());
|
1891
|
-
try {
|
1892
|
-
await ve.createLabel(s, o.value), await t();
|
1893
|
-
} catch {
|
1894
|
-
}
|
1895
|
-
};
|
1896
|
-
return t(), {
|
1897
|
-
labels: e,
|
1898
|
-
pullLabels: t,
|
1899
|
-
updateLabels: n
|
1900
|
-
};
|
1901
|
-
}), an = async () => {
|
1544
|
+
}), Rt = async () => {
|
1902
1545
|
try {
|
1903
|
-
const { data: e } = await
|
1546
|
+
const { data: e } = await w().get(
|
1904
1547
|
"/api/v1/iotdata/metrics/counters",
|
1905
1548
|
{
|
1906
1549
|
headers: {
|
@@ -1912,71 +1555,79 @@ const M = O("alertMessages", () => {
|
|
1912
1555
|
} catch {
|
1913
1556
|
throw new Error("Metric Counter API Error");
|
1914
1557
|
}
|
1915
|
-
},
|
1916
|
-
getMetricsCounters:
|
1917
|
-
},
|
1918
|
-
const e =
|
1558
|
+
}, jt = {
|
1559
|
+
getMetricsCounters: Rt
|
1560
|
+
}, Wt = q("metrics", () => {
|
1561
|
+
const e = h([]), t = h([]), s = S(() => (a) => {
|
1919
1562
|
var c;
|
1920
|
-
return (c = t.value) == null ? void 0 : c.find((
|
1921
|
-
}),
|
1922
|
-
if (!(
|
1563
|
+
return (c = t.value) == null ? void 0 : c.find((v) => v.name === a);
|
1564
|
+
}), r = S(() => e.value.map((a) => ({ title: `${a.label} ${a.name}`, label: a.label, value: a.name }))), n = async (a) => {
|
1565
|
+
if (!(a && e.value.length))
|
1923
1566
|
try {
|
1924
|
-
const c = await
|
1567
|
+
const c = await ie.getMetrics();
|
1925
1568
|
e.value = c;
|
1926
1569
|
} catch (c) {
|
1927
|
-
|
1570
|
+
Q().setSnackbarMessage(c, "error");
|
1928
1571
|
}
|
1929
|
-
},
|
1572
|
+
}, l = async () => {
|
1930
1573
|
try {
|
1931
|
-
const
|
1932
|
-
t.value =
|
1933
|
-
} catch (
|
1934
|
-
|
1574
|
+
const a = await jt.getMetricsCounters();
|
1575
|
+
t.value = a;
|
1576
|
+
} catch (a) {
|
1577
|
+
Q().setSnackbarMessage(a, "error");
|
1935
1578
|
}
|
1936
|
-
},
|
1579
|
+
}, o = async (a) => {
|
1937
1580
|
let c = !1;
|
1938
1581
|
try {
|
1939
|
-
await
|
1940
|
-
} catch (
|
1941
|
-
|
1582
|
+
await ie.postMetric(a), c = !0, Q().setSnackbarMessage(`Metric ${a.name} successfully saved`, "success");
|
1583
|
+
} catch (v) {
|
1584
|
+
Q().setSnackbarMessage(v, "error");
|
1942
1585
|
}
|
1943
|
-
return await
|
1586
|
+
return await n(), await l(), c;
|
1944
1587
|
};
|
1945
|
-
return
|
1588
|
+
return n(), {
|
1946
1589
|
metrics: e,
|
1947
1590
|
metricsCounters: t,
|
1948
|
-
pullMetrics:
|
1949
|
-
pullMetricsCounters:
|
1950
|
-
getMetricCounter:
|
1951
|
-
saveMetric:
|
1952
|
-
metricsArr:
|
1591
|
+
pullMetrics: n,
|
1592
|
+
pullMetricsCounters: l,
|
1593
|
+
getMetricCounter: s,
|
1594
|
+
saveMetric: o,
|
1595
|
+
metricsArr: r
|
1953
1596
|
};
|
1954
1597
|
});
|
1955
|
-
function
|
1956
|
-
for (const t in
|
1957
|
-
e.component(t,
|
1598
|
+
function Jt(e) {
|
1599
|
+
for (const t in le)
|
1600
|
+
e.component(t, le[t]);
|
1958
1601
|
}
|
1959
1602
|
export {
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1603
|
+
ct as ColorInput,
|
1604
|
+
lt as ConfirmModal,
|
1605
|
+
w as DavraApiClient,
|
1606
|
+
ee as DavraApiConfig,
|
1607
|
+
rt as DeleteModal,
|
1608
|
+
Lt as DevicesCountersService,
|
1609
|
+
Y as DevicesService,
|
1610
|
+
ve as LabelInput,
|
1611
|
+
tt as LabelsSelector,
|
1612
|
+
Z as LabelsService,
|
1613
|
+
ie as MetricsService,
|
1614
|
+
at as Modal,
|
1615
|
+
xt as MyConstants,
|
1616
|
+
Bt as MyUtil,
|
1617
|
+
dt as ScrollText,
|
1618
|
+
pt as Snackbar,
|
1619
|
+
qt as TimeseriesService,
|
1620
|
+
Xe as TwinTypesService,
|
1621
|
+
Nt as TwinsCountersService,
|
1622
|
+
J as TwinsService,
|
1623
|
+
ce as UserSessionService,
|
1624
|
+
st as ViewObjectModal,
|
1625
|
+
Jt as installCoreComponents,
|
1626
|
+
Q as useAlertMessagesStore,
|
1627
|
+
Ft as useDevicesStore,
|
1628
|
+
et as useLabelsStore,
|
1629
|
+
Wt as useMetricsStore,
|
1630
|
+
me as useTwinTypesStore,
|
1631
|
+
Qt as useTwinsStore,
|
1632
|
+
zt as useUserSessionStore
|
1982
1633
|
};
|