smarteye-e-components 0.0.8 → 0.0.9
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/smarteye-e-components.js +2 -0
- package/dist/smarteye-e-components.js.map +1 -0
- package/dist/smarteye-e-components.mjs +326 -239
- package/dist/smarteye-e-components.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/lib/components/recursion-device-group/index.vue.d.ts +13 -4
- package/lib/components/recursion-device-group/model/index.d.ts +39 -27
- package/package.json +2 -2
|
@@ -1,116 +1,140 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
var
|
|
1
|
+
import { defineComponent as F, computed as O, openBlock as w, createElementBlock as b, renderSlot as y, createElementVNode as f, toDisplayString as P, h as E, ref as G, resolveComponent as k, createVNode as $, withCtx as C, Fragment as j, renderList as D, createBlock as W, withDirectives as et, normalizeClass as ot, vShow as nt, createCommentVNode as T, pushScopeId as st, popScopeId as rt } from "vue";
|
|
2
|
+
var H;
|
|
3
3
|
((t) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
((o) => {
|
|
5
|
+
function s(c) {
|
|
6
|
+
const i = [];
|
|
7
|
+
for (let l = 0; l < c; l++)
|
|
8
|
+
i.push({
|
|
9
|
+
id: "testId",
|
|
10
|
+
name: `device-${l}`,
|
|
11
|
+
online: l % 2 == 0,
|
|
12
|
+
channels: []
|
|
13
|
+
});
|
|
14
|
+
return i;
|
|
15
|
+
}
|
|
16
|
+
function e(c) {
|
|
17
|
+
const i = [];
|
|
18
|
+
for (let l = 0; l < c; l++)
|
|
19
|
+
i.push({
|
|
20
|
+
id: `groupid-${l}`,
|
|
21
|
+
name: `group-${l}`,
|
|
22
|
+
onlineCount: 0,
|
|
23
|
+
totalCount: 0,
|
|
24
|
+
devices: s(10),
|
|
25
|
+
items: e(c - l - 1)
|
|
26
|
+
});
|
|
27
|
+
return i;
|
|
28
|
+
}
|
|
29
|
+
function r(c) {
|
|
30
|
+
return {
|
|
31
|
+
name: "hah",
|
|
21
32
|
onlineCount: 0,
|
|
22
33
|
totalCount: 0,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
function s
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
onlineCount: 0,
|
|
32
|
-
totalCount: 0,
|
|
33
|
-
items: o(3)
|
|
34
|
-
};
|
|
34
|
+
items: e(c)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
o.RandomDeviceGroup = r;
|
|
38
|
+
})(t.Test || (t.Test = {}));
|
|
39
|
+
function n(o, s) {
|
|
40
|
+
for (let e = 0; e < o.length; e++)
|
|
41
|
+
s(o[e]), n(o[e].items, s);
|
|
35
42
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
43
|
+
((o) => {
|
|
44
|
+
function s(e) {
|
|
45
|
+
const r = {}, c = {};
|
|
46
|
+
return n(e.items, (i) => {
|
|
47
|
+
r[i.id] = i;
|
|
48
|
+
for (let l = 0; l < i.devices.length; l++)
|
|
49
|
+
c[i.devices[l].id] = i.devices[l];
|
|
50
|
+
}), {
|
|
51
|
+
getGroup(i) {
|
|
52
|
+
return r[i];
|
|
53
|
+
},
|
|
54
|
+
getDevice(i) {
|
|
55
|
+
return c[i];
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
o.AccessSession = s;
|
|
60
|
+
})(t.Utils || (t.Utils = {}));
|
|
61
|
+
})(H || (H = {}));
|
|
62
|
+
const it = F({
|
|
39
63
|
props: {
|
|
40
64
|
countInfo: Object
|
|
41
65
|
},
|
|
42
66
|
setup(t) {
|
|
43
|
-
function n(e,
|
|
44
|
-
if (
|
|
45
|
-
let
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
}), e(
|
|
67
|
+
function n(e, r) {
|
|
68
|
+
if (r) {
|
|
69
|
+
let c = 0;
|
|
70
|
+
return r.items.forEach((i) => {
|
|
71
|
+
c += n(e, i);
|
|
72
|
+
}), e(r) + c;
|
|
49
73
|
}
|
|
50
74
|
return 0;
|
|
51
75
|
}
|
|
52
|
-
const o =
|
|
76
|
+
const o = O(() => n((e) => e.onlineCount, t.countInfo));
|
|
53
77
|
return {
|
|
54
|
-
totalCount:
|
|
78
|
+
totalCount: O(() => n((e) => e.totalCount, t.countInfo)),
|
|
55
79
|
onlineCount: o
|
|
56
80
|
};
|
|
57
81
|
}
|
|
58
82
|
});
|
|
59
|
-
const
|
|
83
|
+
const M = (t, n) => {
|
|
60
84
|
const o = t.__vccOpts || t;
|
|
61
85
|
for (const [s, e] of n)
|
|
62
86
|
o[s] = e;
|
|
63
87
|
return o;
|
|
64
88
|
}, ct = { class: "root" }, lt = { class: "count-show" };
|
|
65
|
-
function at(t, n, o, s, e,
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
function at(t, n, o, s, e, r) {
|
|
90
|
+
return w(), b("div", ct, [
|
|
91
|
+
y(t.$slots, "default", {}, void 0, !0),
|
|
92
|
+
f("span", lt, P(t.onlineCount) + "/" + P(t.totalCount), 1)
|
|
69
93
|
]);
|
|
70
94
|
}
|
|
71
|
-
const
|
|
95
|
+
const K = /* @__PURE__ */ M(it, [["render", at], ["__scopeId", "data-v-702e833c"]]), q = Object.freeze(
|
|
72
96
|
{
|
|
73
97
|
left: 0,
|
|
74
98
|
top: 0,
|
|
75
99
|
width: 16,
|
|
76
100
|
height: 16
|
|
77
101
|
}
|
|
78
|
-
),
|
|
102
|
+
), J = Object.freeze({
|
|
79
103
|
rotate: 0,
|
|
80
104
|
vFlip: !1,
|
|
81
105
|
hFlip: !1
|
|
82
|
-
}),
|
|
83
|
-
...
|
|
84
|
-
...
|
|
106
|
+
}), A = Object.freeze({
|
|
107
|
+
...q,
|
|
108
|
+
...J
|
|
85
109
|
});
|
|
86
110
|
Object.freeze({
|
|
87
|
-
...
|
|
111
|
+
...A,
|
|
88
112
|
body: "",
|
|
89
113
|
hidden: !1
|
|
90
114
|
});
|
|
91
115
|
({
|
|
92
|
-
...
|
|
116
|
+
...q
|
|
93
117
|
});
|
|
94
|
-
const
|
|
118
|
+
const Q = Object.freeze({
|
|
95
119
|
width: null,
|
|
96
120
|
height: null
|
|
97
|
-
}),
|
|
98
|
-
...
|
|
99
|
-
...
|
|
121
|
+
}), X = Object.freeze({
|
|
122
|
+
...Q,
|
|
123
|
+
...J
|
|
100
124
|
});
|
|
101
125
|
function ut(t, n) {
|
|
102
126
|
const o = {
|
|
103
127
|
...t
|
|
104
128
|
};
|
|
105
129
|
for (const s in n) {
|
|
106
|
-
const e = n[s],
|
|
107
|
-
s in
|
|
130
|
+
const e = n[s], r = typeof e;
|
|
131
|
+
s in Q ? (e === null || e && (r === "string" || r === "number")) && (o[s] = e) : r === typeof o[s] && (o[s] = s === "rotate" ? e % 4 : e);
|
|
108
132
|
}
|
|
109
133
|
return o;
|
|
110
134
|
}
|
|
111
|
-
const
|
|
112
|
-
function
|
|
113
|
-
n.split(
|
|
135
|
+
const ht = /[\s,]+/;
|
|
136
|
+
function dt(t, n) {
|
|
137
|
+
n.split(ht).forEach((o) => {
|
|
114
138
|
switch (o.trim()) {
|
|
115
139
|
case "horizontal":
|
|
116
140
|
t.hFlip = !0;
|
|
@@ -121,7 +145,7 @@ function ht(t, n) {
|
|
|
121
145
|
}
|
|
122
146
|
});
|
|
123
147
|
}
|
|
124
|
-
function
|
|
148
|
+
function ft(t, n = 0) {
|
|
125
149
|
const o = t.replace(/^-?[0-9.]*/, "");
|
|
126
150
|
function s(e) {
|
|
127
151
|
for (; e < 0; )
|
|
@@ -141,42 +165,42 @@ function pt(t, n = 0) {
|
|
|
141
165
|
e = 90;
|
|
142
166
|
}
|
|
143
167
|
if (e) {
|
|
144
|
-
let
|
|
145
|
-
return isNaN(
|
|
168
|
+
let r = parseFloat(t.slice(0, t.length - o.length));
|
|
169
|
+
return isNaN(r) ? 0 : (r = r / e, r % 1 === 0 ? s(r) : 0);
|
|
146
170
|
}
|
|
147
171
|
}
|
|
148
172
|
return n;
|
|
149
173
|
}
|
|
150
|
-
const
|
|
151
|
-
function
|
|
174
|
+
const pt = /(-?[0-9.]*[0-9]+[0-9.]*)/g, gt = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
175
|
+
function L(t, n, o) {
|
|
152
176
|
if (n === 1)
|
|
153
177
|
return t;
|
|
154
178
|
if (o = o || 100, typeof t == "number")
|
|
155
179
|
return Math.ceil(t * n * o) / o;
|
|
156
180
|
if (typeof t != "string")
|
|
157
181
|
return t;
|
|
158
|
-
const s = t.split(
|
|
182
|
+
const s = t.split(pt);
|
|
159
183
|
if (s === null || !s.length)
|
|
160
184
|
return t;
|
|
161
185
|
const e = [];
|
|
162
|
-
let
|
|
186
|
+
let r = s.shift(), c = gt.test(r);
|
|
163
187
|
for (; ; ) {
|
|
164
|
-
if (
|
|
165
|
-
const
|
|
166
|
-
isNaN(
|
|
188
|
+
if (c) {
|
|
189
|
+
const i = parseFloat(r);
|
|
190
|
+
isNaN(i) ? e.push(r) : e.push(Math.ceil(i * n * o) / o);
|
|
167
191
|
} else
|
|
168
|
-
e.push(
|
|
169
|
-
if (
|
|
192
|
+
e.push(r);
|
|
193
|
+
if (r = s.shift(), r === void 0)
|
|
170
194
|
return e.join("");
|
|
171
|
-
|
|
195
|
+
c = !c;
|
|
172
196
|
}
|
|
173
197
|
}
|
|
174
|
-
function
|
|
198
|
+
function vt(t, n) {
|
|
175
199
|
const o = {
|
|
176
|
-
...
|
|
200
|
+
...A,
|
|
177
201
|
...t
|
|
178
202
|
}, s = {
|
|
179
|
-
...
|
|
203
|
+
...X,
|
|
180
204
|
...n
|
|
181
205
|
}, e = {
|
|
182
206
|
left: o.left,
|
|
@@ -184,115 +208,115 @@ function _t(t, n) {
|
|
|
184
208
|
width: o.width,
|
|
185
209
|
height: o.height
|
|
186
210
|
};
|
|
187
|
-
let
|
|
188
|
-
[o, s].forEach((
|
|
189
|
-
const
|
|
190
|
-
let
|
|
191
|
-
|
|
211
|
+
let r = o.body;
|
|
212
|
+
[o, s].forEach((m) => {
|
|
213
|
+
const g = [], d = m.hFlip, a = m.vFlip;
|
|
214
|
+
let v = m.rotate;
|
|
215
|
+
d ? a ? v += 2 : (g.push(
|
|
192
216
|
"translate(" + (e.width + e.left).toString() + " " + (0 - e.top).toString() + ")"
|
|
193
|
-
),
|
|
217
|
+
), g.push("scale(-1 1)"), e.top = e.left = 0) : a && (g.push(
|
|
194
218
|
"translate(" + (0 - e.left).toString() + " " + (e.height + e.top).toString() + ")"
|
|
195
|
-
),
|
|
219
|
+
), g.push("scale(1 -1)"), e.top = e.left = 0);
|
|
196
220
|
let _;
|
|
197
|
-
switch (
|
|
221
|
+
switch (v < 0 && (v -= Math.floor(v / 4) * 4), v = v % 4, v) {
|
|
198
222
|
case 1:
|
|
199
|
-
_ = e.height / 2 + e.top,
|
|
223
|
+
_ = e.height / 2 + e.top, g.unshift(
|
|
200
224
|
"rotate(90 " + _.toString() + " " + _.toString() + ")"
|
|
201
225
|
);
|
|
202
226
|
break;
|
|
203
227
|
case 2:
|
|
204
|
-
|
|
228
|
+
g.unshift(
|
|
205
229
|
"rotate(180 " + (e.width / 2 + e.left).toString() + " " + (e.height / 2 + e.top).toString() + ")"
|
|
206
230
|
);
|
|
207
231
|
break;
|
|
208
232
|
case 3:
|
|
209
|
-
_ = e.width / 2 + e.left,
|
|
233
|
+
_ = e.width / 2 + e.left, g.unshift(
|
|
210
234
|
"rotate(-90 " + _.toString() + " " + _.toString() + ")"
|
|
211
235
|
);
|
|
212
236
|
break;
|
|
213
237
|
}
|
|
214
|
-
|
|
238
|
+
v % 2 === 1 && (e.left !== e.top && (_ = e.left, e.left = e.top, e.top = _), e.width !== e.height && (_ = e.width, e.width = e.height, e.height = _)), g.length && (r = '<g transform="' + g.join(" ") + '">' + r + "</g>");
|
|
215
239
|
});
|
|
216
|
-
const
|
|
217
|
-
let p,
|
|
218
|
-
return
|
|
240
|
+
const c = s.width, i = s.height, l = e.width, h = e.height;
|
|
241
|
+
let p, u;
|
|
242
|
+
return c === null ? (u = i === null ? "1em" : i === "auto" ? h : i, p = L(u, l / h)) : (p = c === "auto" ? l : c, u = i === null ? L(p, h / l) : i === "auto" ? h : i), {
|
|
219
243
|
attributes: {
|
|
220
244
|
width: p.toString(),
|
|
221
|
-
height:
|
|
222
|
-
viewBox: e.left.toString() + " " + e.top.toString() + " " +
|
|
245
|
+
height: u.toString(),
|
|
246
|
+
viewBox: e.left.toString() + " " + e.top.toString() + " " + l.toString() + " " + h.toString()
|
|
223
247
|
},
|
|
224
|
-
body:
|
|
248
|
+
body: r
|
|
225
249
|
};
|
|
226
250
|
}
|
|
227
|
-
const
|
|
251
|
+
const mt = /\sid="(\S+)"/g, _t = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
228
252
|
let wt = 0;
|
|
229
|
-
function
|
|
253
|
+
function St(t, n = _t) {
|
|
230
254
|
const o = [];
|
|
231
255
|
let s;
|
|
232
|
-
for (; s =
|
|
256
|
+
for (; s = mt.exec(t); )
|
|
233
257
|
o.push(s[1]);
|
|
234
258
|
return o.length && o.forEach((e) => {
|
|
235
|
-
const
|
|
259
|
+
const r = typeof n == "function" ? n(e) : n + (wt++).toString(), c = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
236
260
|
t = t.replace(
|
|
237
|
-
new RegExp('([#;"])(' +
|
|
238
|
-
"$1" +
|
|
261
|
+
new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"),
|
|
262
|
+
"$1" + r + "$3"
|
|
239
263
|
);
|
|
240
264
|
}), t;
|
|
241
265
|
}
|
|
242
|
-
function
|
|
266
|
+
function bt(t, n) {
|
|
243
267
|
let o = t.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
244
268
|
for (const s in n)
|
|
245
269
|
o += " " + s + '="' + n[s] + '"';
|
|
246
270
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + o + ">" + t + "</svg>";
|
|
247
271
|
}
|
|
248
|
-
function
|
|
272
|
+
function yt(t) {
|
|
249
273
|
return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
250
274
|
}
|
|
251
275
|
function Ct(t) {
|
|
252
|
-
return 'url("data:image/svg+xml,' +
|
|
276
|
+
return 'url("data:image/svg+xml,' + yt(t) + '")';
|
|
253
277
|
}
|
|
254
|
-
const
|
|
255
|
-
...
|
|
278
|
+
const R = {
|
|
279
|
+
...X,
|
|
256
280
|
inline: !1
|
|
257
|
-
},
|
|
281
|
+
}, $t = {
|
|
258
282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
259
283
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
260
284
|
"aria-hidden": !0,
|
|
261
285
|
role: "img"
|
|
262
|
-
},
|
|
286
|
+
}, kt = {
|
|
263
287
|
display: "inline-block"
|
|
264
|
-
},
|
|
288
|
+
}, x = {
|
|
265
289
|
backgroundColor: "currentColor"
|
|
266
|
-
},
|
|
290
|
+
}, Y = {
|
|
267
291
|
backgroundColor: "transparent"
|
|
268
|
-
},
|
|
292
|
+
}, B = {
|
|
269
293
|
Image: "var(--svg)",
|
|
270
294
|
Repeat: "no-repeat",
|
|
271
295
|
Size: "100% 100%"
|
|
272
296
|
}, N = {
|
|
273
|
-
webkitMask:
|
|
274
|
-
mask:
|
|
275
|
-
background:
|
|
297
|
+
webkitMask: x,
|
|
298
|
+
mask: x,
|
|
299
|
+
background: Y
|
|
276
300
|
};
|
|
277
301
|
for (const t in N) {
|
|
278
302
|
const n = N[t];
|
|
279
|
-
for (const o in
|
|
280
|
-
n[t + o] =
|
|
303
|
+
for (const o in B)
|
|
304
|
+
n[t + o] = B[o];
|
|
281
305
|
}
|
|
282
|
-
const
|
|
306
|
+
const I = {};
|
|
283
307
|
["horizontal", "vertical"].forEach((t) => {
|
|
284
308
|
const n = t.slice(0, 1) + "Flip";
|
|
285
|
-
|
|
309
|
+
I[t + "-flip"] = n, I[t.slice(0, 1) + "-flip"] = n, I[t + "Flip"] = n;
|
|
286
310
|
});
|
|
287
|
-
function
|
|
311
|
+
function V(t) {
|
|
288
312
|
return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
|
|
289
313
|
}
|
|
290
314
|
const It = (t, n) => {
|
|
291
|
-
const o = ut(
|
|
292
|
-
for (let
|
|
293
|
-
const
|
|
294
|
-
if (
|
|
295
|
-
switch (
|
|
315
|
+
const o = ut(R, n), s = { ...$t }, e = n.mode || "svg", r = {}, c = n.style, i = typeof c == "object" && !(c instanceof Array) ? c : {};
|
|
316
|
+
for (let d in n) {
|
|
317
|
+
const a = n[d];
|
|
318
|
+
if (a !== void 0)
|
|
319
|
+
switch (d) {
|
|
296
320
|
case "icon":
|
|
297
321
|
case "style":
|
|
298
322
|
case "onLoad":
|
|
@@ -301,208 +325,271 @@ const It = (t, n) => {
|
|
|
301
325
|
case "inline":
|
|
302
326
|
case "hFlip":
|
|
303
327
|
case "vFlip":
|
|
304
|
-
o[
|
|
328
|
+
o[d] = a === !0 || a === "true" || a === 1;
|
|
305
329
|
break;
|
|
306
330
|
case "flip":
|
|
307
|
-
typeof
|
|
331
|
+
typeof a == "string" && dt(o, a);
|
|
308
332
|
break;
|
|
309
333
|
case "color":
|
|
310
|
-
|
|
334
|
+
r.color = a;
|
|
311
335
|
break;
|
|
312
336
|
case "rotate":
|
|
313
|
-
typeof
|
|
337
|
+
typeof a == "string" ? o[d] = ft(a) : typeof a == "number" && (o[d] = a);
|
|
314
338
|
break;
|
|
315
339
|
case "ariaHidden":
|
|
316
340
|
case "aria-hidden":
|
|
317
|
-
|
|
341
|
+
a !== !0 && a !== "true" && delete s["aria-hidden"];
|
|
318
342
|
break;
|
|
319
343
|
default: {
|
|
320
|
-
const
|
|
321
|
-
|
|
344
|
+
const v = I[d];
|
|
345
|
+
v ? (a === !0 || a === "true" || a === 1) && (o[v] = !0) : R[d] === void 0 && (s[d] = a);
|
|
322
346
|
}
|
|
323
347
|
}
|
|
324
348
|
}
|
|
325
|
-
const
|
|
326
|
-
if (o.inline && (
|
|
349
|
+
const l = vt(t, o), h = l.attributes;
|
|
350
|
+
if (o.inline && (r.verticalAlign = "-0.125em"), e === "svg") {
|
|
327
351
|
s.style = {
|
|
328
|
-
...
|
|
329
|
-
...
|
|
330
|
-
}, Object.assign(s,
|
|
331
|
-
let
|
|
332
|
-
return typeof
|
|
352
|
+
...r,
|
|
353
|
+
...i
|
|
354
|
+
}, Object.assign(s, h);
|
|
355
|
+
let d = 0, a = n.id;
|
|
356
|
+
return typeof a == "string" && (a = a.replace(/-/g, "_")), s.innerHTML = St(l.body, a ? () => a + "ID" + d++ : "iconifyVue"), E("svg", s);
|
|
333
357
|
}
|
|
334
|
-
const { body: p, width:
|
|
335
|
-
...
|
|
336
|
-
width:
|
|
337
|
-
height:
|
|
358
|
+
const { body: p, width: u, height: S } = t, m = e === "mask" || (e === "bg" ? !1 : p.indexOf("currentColor") !== -1), g = bt(p, {
|
|
359
|
+
...h,
|
|
360
|
+
width: u + "",
|
|
361
|
+
height: S + ""
|
|
338
362
|
});
|
|
339
363
|
return s.style = {
|
|
340
|
-
...
|
|
341
|
-
"--svg": Ct(
|
|
342
|
-
width:
|
|
343
|
-
height:
|
|
344
|
-
|
|
345
|
-
...
|
|
346
|
-
...
|
|
364
|
+
...r,
|
|
365
|
+
"--svg": Ct(g),
|
|
366
|
+
width: V(h.width),
|
|
367
|
+
height: V(h.height),
|
|
368
|
+
...kt,
|
|
369
|
+
...m ? x : Y,
|
|
370
|
+
...i
|
|
347
371
|
}, E("span", s);
|
|
348
|
-
},
|
|
349
|
-
function
|
|
350
|
-
|
|
372
|
+
}, Z = /* @__PURE__ */ Object.create(null);
|
|
373
|
+
function z(t, n) {
|
|
374
|
+
Z[t] = n;
|
|
351
375
|
}
|
|
352
|
-
const
|
|
376
|
+
const Pt = F({
|
|
353
377
|
inheritAttrs: !1,
|
|
354
378
|
render() {
|
|
355
|
-
const t = this.$attrs, n = t.icon, o = typeof n == "string" ?
|
|
379
|
+
const t = this.$attrs, n = t.icon, o = typeof n == "string" ? Z[n] : typeof n == "object" ? n : null;
|
|
356
380
|
return o === null || typeof o != "object" || typeof o.body != "string" ? this.$slots.default ? this.$slots.default() : null : It({
|
|
357
|
-
...
|
|
381
|
+
...A,
|
|
358
382
|
...o
|
|
359
383
|
}, t);
|
|
360
384
|
}
|
|
361
|
-
}), Ft =
|
|
385
|
+
}), Ft = F({
|
|
362
386
|
components: {
|
|
363
|
-
CountShow:
|
|
364
|
-
Icon:
|
|
387
|
+
CountShow: K,
|
|
388
|
+
Icon: Pt
|
|
365
389
|
},
|
|
366
390
|
name: "group-show",
|
|
367
391
|
props: {
|
|
368
|
-
deviceGroup: Object
|
|
392
|
+
deviceGroup: Object,
|
|
393
|
+
controlParams: Object
|
|
369
394
|
},
|
|
370
|
-
setup() {
|
|
395
|
+
setup(t) {
|
|
396
|
+
function n(r) {
|
|
397
|
+
return r && r.filter((c) => {
|
|
398
|
+
var i;
|
|
399
|
+
return !((i = t.controlParams) != null && i.onlyShowOnline) || c.online;
|
|
400
|
+
}) || [];
|
|
401
|
+
}
|
|
402
|
+
const o = O(() => {
|
|
403
|
+
var r, c;
|
|
404
|
+
const i = t.controlParams.searchStr;
|
|
405
|
+
return i.length == 0 || t.deviceGroup && ((r = t.deviceGroup) == null ? void 0 : r.name.indexOf(i)) > 0 ? !0 : (c = t.deviceGroup) == null ? void 0 : c.devices.find((l) => l.name.indexOf(t.controlParams.searchStr) > 0);
|
|
406
|
+
});
|
|
407
|
+
function s(r) {
|
|
408
|
+
return t.controlParams.searchStr.length == 0 ? !0 : r.name.indexOf(t.controlParams.searchStr) > 0;
|
|
409
|
+
}
|
|
410
|
+
const e = G(!1);
|
|
371
411
|
return {
|
|
372
|
-
|
|
412
|
+
showGroup: o,
|
|
413
|
+
showDevice: s,
|
|
414
|
+
FilterDevice: n,
|
|
415
|
+
bShow: e
|
|
373
416
|
};
|
|
374
417
|
}
|
|
375
418
|
});
|
|
376
|
-
const
|
|
419
|
+
const Ot = {
|
|
420
|
+
key: 0,
|
|
421
|
+
class: "group"
|
|
422
|
+
}, Gt = ["title"], jt = { class: "group-slot" }, Dt = {
|
|
377
423
|
key: 0,
|
|
378
424
|
style: { "margin-left": "26px" }
|
|
379
|
-
},
|
|
380
|
-
function
|
|
381
|
-
var
|
|
382
|
-
const
|
|
383
|
-
return
|
|
384
|
-
|
|
385
|
-
default:
|
|
386
|
-
var
|
|
425
|
+
}, xt = ["title"], Mt = { class: "device-slot" };
|
|
426
|
+
function At(t, n, o, s, e, r) {
|
|
427
|
+
var c, i;
|
|
428
|
+
const l = k("Icon"), h = k("CountShow"), p = k("group-show");
|
|
429
|
+
return t.showGroup ? (w(), b("div", Ot, [
|
|
430
|
+
$(h, { countInfo: t.deviceGroup }, {
|
|
431
|
+
default: C(() => {
|
|
432
|
+
var u, S;
|
|
387
433
|
return [
|
|
388
|
-
|
|
434
|
+
$(l, {
|
|
389
435
|
icon: "right",
|
|
390
436
|
rotate: t.bShow && "90deg",
|
|
391
437
|
width: "20",
|
|
392
|
-
onClick: n[0] || (n[0] = (
|
|
438
|
+
onClick: n[0] || (n[0] = (m) => t.bShow = !t.bShow),
|
|
393
439
|
class: "handle-ls-svg"
|
|
394
440
|
}, null, 8, ["rotate"]),
|
|
395
|
-
|
|
441
|
+
$(l, {
|
|
396
442
|
icon: "group",
|
|
397
443
|
width: "24",
|
|
398
444
|
class: "group-avatar"
|
|
399
445
|
}),
|
|
400
|
-
|
|
446
|
+
f("span", {
|
|
447
|
+
class: "group-name",
|
|
448
|
+
title: (u = t.deviceGroup) == null ? void 0 : u.name
|
|
449
|
+
}, P((S = t.deviceGroup) == null ? void 0 : S.name), 9, Gt),
|
|
450
|
+
f("div", jt, [
|
|
451
|
+
y(t.$slots, "group", { group: t.deviceGroup }, void 0, !0)
|
|
452
|
+
])
|
|
401
453
|
];
|
|
402
454
|
}),
|
|
403
|
-
_:
|
|
455
|
+
_: 3
|
|
404
456
|
}, 8, ["countInfo"]),
|
|
405
|
-
t.bShow ? (
|
|
406
|
-
(
|
|
407
|
-
key:
|
|
408
|
-
deviceGroup:
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
457
|
+
t.bShow ? (w(), b("div", Dt, [
|
|
458
|
+
(w(!0), b(j, null, D((c = t.deviceGroup) == null ? void 0 : c.items, (u, S) => (w(), W(p, {
|
|
459
|
+
key: S,
|
|
460
|
+
deviceGroup: u,
|
|
461
|
+
controlParams: t.controlParams
|
|
462
|
+
}, {
|
|
463
|
+
group: C(({ group: m }) => [
|
|
464
|
+
y(t.$slots, "group", { group: m }, void 0, !0)
|
|
465
|
+
]),
|
|
466
|
+
device: C(({ device: m }) => [
|
|
467
|
+
y(t.$slots, "device", { device: m }, void 0, !0)
|
|
468
|
+
]),
|
|
469
|
+
_: 2
|
|
470
|
+
}, 1032, ["deviceGroup", "controlParams"]))), 128)),
|
|
471
|
+
(w(!0), b(j, null, D(t.FilterDevice((i = t.deviceGroup) == null ? void 0 : i.devices), (u, S) => et((w(), b("div", {
|
|
472
|
+
key: S,
|
|
473
|
+
class: ot(["device", u.online && "online-device"])
|
|
413
474
|
}, [
|
|
414
|
-
|
|
475
|
+
$(l, {
|
|
415
476
|
icon: "user",
|
|
416
477
|
width: "16",
|
|
417
478
|
class: "device-avatar"
|
|
418
479
|
}),
|
|
419
|
-
|
|
420
|
-
title:
|
|
480
|
+
f("span", {
|
|
481
|
+
title: u.id,
|
|
421
482
|
class: "device-name"
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
483
|
+
}, P(u.name), 9, xt),
|
|
484
|
+
f("div", Mt, [
|
|
485
|
+
y(t.$slots, "device", { device: u }, void 0, !0)
|
|
486
|
+
])
|
|
487
|
+
], 2)), [
|
|
488
|
+
[nt, t.showDevice(u)]
|
|
489
|
+
])), 128))
|
|
490
|
+
])) : T("", !0)
|
|
491
|
+
])) : T("", !0);
|
|
426
492
|
}
|
|
427
|
-
const
|
|
493
|
+
const zt = /* @__PURE__ */ M(Ft, [["render", At], ["__scopeId", "data-v-82150d7a"]]), Et = {
|
|
428
494
|
width: 1024,
|
|
429
495
|
height: 1024,
|
|
430
496
|
body: '<path fill="currentColor" d="M384 192v640l384-320.064z"/>'
|
|
431
|
-
},
|
|
497
|
+
}, Tt = {
|
|
432
498
|
width: 1024,
|
|
433
499
|
height: 1024,
|
|
434
500
|
body: '<path fill="currentColor" d="M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384H832zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896z"/>'
|
|
435
|
-
},
|
|
436
|
-
__proto__: null,
|
|
437
|
-
default: Z
|
|
438
|
-
}, Symbol.toStringTag, { value: "Module" })), At = {
|
|
501
|
+
}, Ht = {
|
|
439
502
|
width: 1024,
|
|
440
503
|
height: 1024,
|
|
441
504
|
body: '<path fill="currentColor" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0a208 208 0 0 1 416 0z"/>'
|
|
442
505
|
};
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
x("group", t);
|
|
448
|
-
});
|
|
449
|
-
const Ht = I({
|
|
506
|
+
z("right", Et);
|
|
507
|
+
z("group", Tt);
|
|
508
|
+
z("user", Ht);
|
|
509
|
+
const Lt = F({
|
|
450
510
|
components: {
|
|
451
|
-
CountShow:
|
|
452
|
-
GroupShow:
|
|
511
|
+
CountShow: K,
|
|
512
|
+
GroupShow: zt
|
|
453
513
|
},
|
|
454
514
|
props: {
|
|
455
515
|
deviceGroup: Object
|
|
456
516
|
},
|
|
457
|
-
|
|
517
|
+
methods: {
|
|
518
|
+
onCheckBoxChange() {
|
|
519
|
+
this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;
|
|
520
|
+
},
|
|
521
|
+
onSearchChange() {
|
|
522
|
+
var t;
|
|
523
|
+
this.inputSearchRef && (this.controlParams.searchStr = (t = this.inputSearchRef) == null ? void 0 : t.value, console.log(this.controlParams.searchStr));
|
|
524
|
+
}
|
|
458
525
|
},
|
|
459
526
|
setup() {
|
|
460
|
-
|
|
527
|
+
const t = G({
|
|
528
|
+
onlyShowOnline: !1,
|
|
529
|
+
searchStr: ""
|
|
530
|
+
});
|
|
531
|
+
return {
|
|
532
|
+
inputSearchRef: G(),
|
|
533
|
+
controlParams: t
|
|
534
|
+
};
|
|
461
535
|
}
|
|
462
536
|
});
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
537
|
+
const tt = (t) => (st("data-v-3b15399c"), t = t(), rt(), t), Rt = { class: "device-group-list" }, Bt = { class: "search-panel" }, Nt = { style: { height: "32px", "line-height": "32px" } }, Vt = /* @__PURE__ */ tt(() => /* @__PURE__ */ f("img", { src: "" }, null, -1)), Ut = /* @__PURE__ */ tt(() => /* @__PURE__ */ f("label", { for: "onlineShow" }, "\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907", -1)), Wt = { class: "device-panel" };
|
|
538
|
+
function Kt(t, n, o, s, e, r) {
|
|
539
|
+
var c;
|
|
540
|
+
const i = k("CountShow"), l = k("group-show");
|
|
541
|
+
return w(), b("div", Rt, [
|
|
542
|
+
f("div", Bt, [
|
|
543
|
+
f("div", Nt, [
|
|
544
|
+
Vt,
|
|
545
|
+
f("input", {
|
|
546
|
+
type: "text",
|
|
547
|
+
onChange: n[0] || (n[0] = (...h) => t.onSearchChange && t.onSearchChange(...h)),
|
|
548
|
+
ref: "inputSearchRef"
|
|
549
|
+
}, null, 544)
|
|
550
|
+
]),
|
|
551
|
+
$(i, { countInfo: t.deviceGroup }, {
|
|
552
|
+
default: C(() => [
|
|
553
|
+
f("input", {
|
|
554
|
+
type: "checkbox",
|
|
555
|
+
id: "onlineShow",
|
|
556
|
+
value: "onlineShow",
|
|
557
|
+
onChange: n[1] || (n[1] = (...h) => t.onCheckBoxChange && t.onCheckBoxChange(...h))
|
|
558
|
+
}, null, 32),
|
|
559
|
+
Ut
|
|
482
560
|
]),
|
|
483
561
|
_: 1
|
|
484
562
|
}, 8, ["countInfo"])
|
|
485
563
|
]),
|
|
486
|
-
|
|
487
|
-
(
|
|
564
|
+
f("div", Wt, [
|
|
565
|
+
(w(!0), b(j, null, D((c = t.deviceGroup) == null ? void 0 : c.items, (h, p) => (w(), W(l, {
|
|
566
|
+
controlParams: t.controlParams,
|
|
488
567
|
key: p,
|
|
489
|
-
deviceGroup:
|
|
490
|
-
},
|
|
568
|
+
deviceGroup: h
|
|
569
|
+
}, {
|
|
570
|
+
group: C(({ group: u }) => [
|
|
571
|
+
y(t.$slots, "group", { group: u }, void 0, !0)
|
|
572
|
+
]),
|
|
573
|
+
device: C(({ device: u }) => [
|
|
574
|
+
y(t.$slots, "device", { device: u }, void 0, !0)
|
|
575
|
+
]),
|
|
576
|
+
_: 2
|
|
577
|
+
}, 1032, ["controlParams", "deviceGroup"]))), 128))
|
|
491
578
|
])
|
|
492
579
|
]);
|
|
493
580
|
}
|
|
494
|
-
const
|
|
495
|
-
RecursionDeviceGroup:
|
|
496
|
-
},
|
|
581
|
+
const qt = /* @__PURE__ */ M(Lt, [["render", Kt], ["__scopeId", "data-v-3b15399c"]]), U = {
|
|
582
|
+
RecursionDeviceGroup: qt
|
|
583
|
+
}, Qt = {
|
|
497
584
|
install(t) {
|
|
498
|
-
for (const n in
|
|
499
|
-
const o =
|
|
585
|
+
for (const n in U) {
|
|
586
|
+
const o = U[n];
|
|
500
587
|
t.component(n, o);
|
|
501
588
|
}
|
|
502
589
|
}
|
|
503
590
|
};
|
|
504
591
|
export {
|
|
505
|
-
|
|
506
|
-
|
|
592
|
+
H as RecursionDeviceGroup,
|
|
593
|
+
Qt as default
|
|
507
594
|
};
|
|
508
595
|
//# sourceMappingURL=smarteye-e-components.mjs.map
|