smarteye-e-components 0.0.8 → 0.0.10

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.
@@ -1,116 +1,140 @@
1
- import { defineComponent as I, computed as T, openBlock as v, createElementBlock as w, renderSlot as tt, createElementVNode as m, toDisplayString as $, h as E, ref as et, resolveComponent as C, createVNode as S, withCtx as B, createTextVNode as R, Fragment as F, renderList as G, createBlock as U, normalizeClass as ot, createCommentVNode as nt, pushScopeId as st, popScopeId as it } from "vue";
2
- var A;
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
- function n(e) {
5
- const i = [];
6
- for (let r = 0; r < e; r++)
7
- i.push({
8
- id: "testId",
9
- name: `device-${r}`,
10
- online: r % 2 == 0,
11
- channels: []
12
- });
13
- return i;
14
- }
15
- function o(e) {
16
- const i = [];
17
- for (let r = 0; r < e; r++)
18
- i.push({
19
- id: `group=${r}`,
20
- name: `group-${r}`,
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
- devices: n(10),
24
- items: o(e - r - 1)
25
- });
26
- return i;
27
- }
28
- function s(e) {
29
- return {
30
- name: "hah",
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
- t.RandomDeviceGroup = s;
37
- })(A || (A = {}));
38
- const rt = I({
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, i) {
44
- if (i) {
45
- let r = 0;
46
- return i.items.forEach((l) => {
47
- r += n(e, l);
48
- }), e(i) + r;
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 = T(() => n((e) => e.onlineCount, t.countInfo));
76
+ const o = O(() => n((e) => e.onlineCount, t.countInfo));
53
77
  return {
54
- totalCount: T(() => n((e) => e.totalCount, t.countInfo)),
78
+ totalCount: O(() => n((e) => e.totalCount, t.countInfo)),
55
79
  onlineCount: o
56
80
  };
57
81
  }
58
82
  });
59
- const O = (t, n) => {
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, i) {
66
- return v(), w("div", ct, [
67
- tt(t.$slots, "default", {}, void 0, !0),
68
- m("span", lt, $(t.onlineCount) + "/" + $(t.totalCount), 1)
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 W = /* @__PURE__ */ O(rt, [["render", at], ["__scopeId", "data-v-645fa4e7"]]), K = Object.freeze(
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
- ), q = Object.freeze({
102
+ ), J = Object.freeze({
79
103
  rotate: 0,
80
104
  vFlip: !1,
81
105
  hFlip: !1
82
- }), z = Object.freeze({
83
- ...K,
84
- ...q
106
+ }), A = Object.freeze({
107
+ ...q,
108
+ ...J
85
109
  });
86
110
  Object.freeze({
87
- ...z,
111
+ ...A,
88
112
  body: "",
89
113
  hidden: !1
90
114
  });
91
115
  ({
92
- ...K
116
+ ...q
93
117
  });
94
- const J = Object.freeze({
118
+ const Q = Object.freeze({
95
119
  width: null,
96
120
  height: null
97
- }), Q = Object.freeze({
98
- ...J,
99
- ...q
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], i = typeof e;
107
- s in J ? (e === null || e && (i === "string" || i === "number")) && (o[s] = e) : i === typeof o[s] && (o[s] = s === "rotate" ? e % 4 : e);
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 dt = /[\s,]+/;
112
- function ht(t, n) {
113
- n.split(dt).forEach((o) => {
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 pt(t, n = 0) {
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 i = parseFloat(t.slice(0, t.length - o.length));
145
- return isNaN(i) ? 0 : (i = i / e, i % 1 === 0 ? s(i) : 0);
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 ft = /(-?[0-9.]*[0-9]+[0-9.]*)/g, gt = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
151
- function H(t, n, o) {
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(ft);
182
+ const s = t.split(pt);
159
183
  if (s === null || !s.length)
160
184
  return t;
161
185
  const e = [];
162
- let i = s.shift(), r = gt.test(i);
186
+ let r = s.shift(), c = gt.test(r);
163
187
  for (; ; ) {
164
- if (r) {
165
- const l = parseFloat(i);
166
- isNaN(l) ? e.push(i) : e.push(Math.ceil(l * n * o) / o);
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(i);
169
- if (i = s.shift(), i === void 0)
192
+ e.push(r);
193
+ if (r = s.shift(), r === void 0)
170
194
  return e.join("");
171
- r = !r;
195
+ c = !c;
172
196
  }
173
197
  }
174
- function _t(t, n) {
198
+ function vt(t, n) {
175
199
  const o = {
176
- ...z,
200
+ ...A,
177
201
  ...t
178
202
  }, s = {
179
- ...Q,
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 i = o.body;
188
- [o, s].forEach((y) => {
189
- const f = [], h = y.hFlip, c = y.vFlip;
190
- let g = y.rotate;
191
- h ? c ? g += 2 : (f.push(
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
- ), f.push("scale(-1 1)"), e.top = e.left = 0) : c && (f.push(
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
- ), f.push("scale(1 -1)"), e.top = e.left = 0);
219
+ ), g.push("scale(1 -1)"), e.top = e.left = 0);
196
220
  let _;
197
- switch (g < 0 && (g -= Math.floor(g / 4) * 4), g = g % 4, g) {
221
+ switch (v < 0 && (v -= Math.floor(v / 4) * 4), v = v % 4, v) {
198
222
  case 1:
199
- _ = e.height / 2 + e.top, f.unshift(
223
+ _ = e.height / 2 + e.top, g.unshift(
200
224
  "rotate(90 " + _.toString() + " " + _.toString() + ")"
201
225
  );
202
226
  break;
203
227
  case 2:
204
- f.unshift(
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, f.unshift(
233
+ _ = e.width / 2 + e.left, g.unshift(
210
234
  "rotate(-90 " + _.toString() + " " + _.toString() + ")"
211
235
  );
212
236
  break;
213
237
  }
214
- g % 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 = _)), f.length && (i = '<g transform="' + f.join(" ") + '">' + i + "</g>");
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 r = s.width, l = s.height, d = e.width, u = e.height;
217
- let p, a;
218
- return r === null ? (a = l === null ? "1em" : l === "auto" ? u : l, p = H(a, d / u)) : (p = r === "auto" ? d : r, a = l === null ? H(p, u / d) : l === "auto" ? u : l), {
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: a.toString(),
222
- viewBox: e.left.toString() + " " + e.top.toString() + " " + d.toString() + " " + u.toString()
245
+ height: u.toString(),
246
+ viewBox: e.left.toString() + " " + e.top.toString() + " " + l.toString() + " " + h.toString()
223
247
  },
224
- body: i
248
+ body: r
225
249
  };
226
250
  }
227
- const vt = /\sid="(\S+)"/g, mt = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
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 bt(t, n = mt) {
253
+ function St(t, n = _t) {
230
254
  const o = [];
231
255
  let s;
232
- for (; s = vt.exec(t); )
256
+ for (; s = mt.exec(t); )
233
257
  o.push(s[1]);
234
258
  return o.length && o.forEach((e) => {
235
- const i = typeof n == "function" ? n(e) : n + (wt++).toString(), r = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
259
+ const r = typeof n == "function" ? n(e) : n + (wt++).toString(), c = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
236
260
  t = t.replace(
237
- new RegExp('([#;"])(' + r + ')([")]|\\.[a-z])', "g"),
238
- "$1" + i + "$3"
261
+ new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"),
262
+ "$1" + r + "$3"
239
263
  );
240
264
  }), t;
241
265
  }
242
- function yt(t, n) {
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 St(t) {
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,' + St(t) + '")';
276
+ return 'url("data:image/svg+xml,' + yt(t) + '")';
253
277
  }
254
- const D = {
255
- ...Q,
278
+ const R = {
279
+ ...X,
256
280
  inline: !1
257
- }, kt = {
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
- }, $t = {
286
+ }, kt = {
263
287
  display: "inline-block"
264
- }, j = {
288
+ }, x = {
265
289
  backgroundColor: "currentColor"
266
- }, X = {
290
+ }, Y = {
267
291
  backgroundColor: "transparent"
268
- }, L = {
292
+ }, B = {
269
293
  Image: "var(--svg)",
270
294
  Repeat: "no-repeat",
271
295
  Size: "100% 100%"
272
296
  }, N = {
273
- webkitMask: j,
274
- mask: j,
275
- background: X
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 L)
280
- n[t + o] = L[o];
303
+ for (const o in B)
304
+ n[t + o] = B[o];
281
305
  }
282
- const k = {};
306
+ const I = {};
283
307
  ["horizontal", "vertical"].forEach((t) => {
284
308
  const n = t.slice(0, 1) + "Flip";
285
- k[t + "-flip"] = n, k[t.slice(0, 1) + "-flip"] = n, k[t + "Flip"] = n;
309
+ I[t + "-flip"] = n, I[t.slice(0, 1) + "-flip"] = n, I[t + "Flip"] = n;
286
310
  });
287
- function P(t) {
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(D, n), s = { ...kt }, e = n.mode || "svg", i = {}, r = n.style, l = typeof r == "object" && !(r instanceof Array) ? r : {};
292
- for (let h in n) {
293
- const c = n[h];
294
- if (c !== void 0)
295
- switch (h) {
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[h] = c === !0 || c === "true" || c === 1;
328
+ o[d] = a === !0 || a === "true" || a === 1;
305
329
  break;
306
330
  case "flip":
307
- typeof c == "string" && ht(o, c);
331
+ typeof a == "string" && dt(o, a);
308
332
  break;
309
333
  case "color":
310
- i.color = c;
334
+ r.color = a;
311
335
  break;
312
336
  case "rotate":
313
- typeof c == "string" ? o[h] = pt(c) : typeof c == "number" && (o[h] = c);
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
- c !== !0 && c !== "true" && delete s["aria-hidden"];
341
+ a !== !0 && a !== "true" && delete s["aria-hidden"];
318
342
  break;
319
343
  default: {
320
- const g = k[h];
321
- g ? (c === !0 || c === "true" || c === 1) && (o[g] = !0) : D[h] === void 0 && (s[h] = c);
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 d = _t(t, o), u = d.attributes;
326
- if (o.inline && (i.verticalAlign = "-0.125em"), e === "svg") {
349
+ const l = vt(t, o), h = l.attributes;
350
+ if (o.inline && (r.verticalAlign = "-0.125em"), e === "svg") {
327
351
  s.style = {
328
- ...i,
329
- ...l
330
- }, Object.assign(s, u);
331
- let h = 0, c = n.id;
332
- return typeof c == "string" && (c = c.replace(/-/g, "_")), s.innerHTML = bt(d.body, c ? () => c + "ID" + h++ : "iconifyVue"), E("svg", s);
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: a, height: b } = t, y = e === "mask" || (e === "bg" ? !1 : p.indexOf("currentColor") !== -1), f = yt(p, {
335
- ...u,
336
- width: a + "",
337
- height: b + ""
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
- ...i,
341
- "--svg": Ct(f),
342
- width: P(u.width),
343
- height: P(u.height),
344
- ...$t,
345
- ...y ? j : X,
346
- ...l
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
- }, Y = /* @__PURE__ */ Object.create(null);
349
- function x(t, n) {
350
- Y[t] = n;
372
+ }, Z = /* @__PURE__ */ Object.create(null);
373
+ function z(t, n) {
374
+ Z[t] = n;
351
375
  }
352
- const xt = I({
376
+ const Pt = F({
353
377
  inheritAttrs: !1,
354
378
  render() {
355
- const t = this.$attrs, n = t.icon, o = typeof n == "string" ? Y[n] : typeof n == "object" ? n : null;
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
- ...z,
381
+ ...A,
358
382
  ...o
359
383
  }, t);
360
384
  }
361
- }), Ft = I({
385
+ }), Ft = F({
362
386
  components: {
363
- CountShow: W,
364
- Icon: xt
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
- bShow: et(!1)
412
+ showGroup: o,
413
+ showDevice: s,
414
+ FilterDevice: n,
415
+ bShow: e
373
416
  };
374
417
  }
375
418
  });
376
- const Gt = { class: "group" }, jt = {
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
- }, Ot = ["title"];
380
- function zt(t, n, o, s, e, i) {
381
- var r, l;
382
- const d = C("Icon"), u = C("CountShow"), p = C("group-show");
383
- return v(), w("div", Gt, [
384
- S(u, { countInfo: t.deviceGroup }, {
385
- default: B(() => {
386
- var a;
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
- S(d, {
434
+ $(l, {
389
435
  icon: "right",
390
436
  rotate: t.bShow && "90deg",
391
437
  width: "20",
392
- onClick: n[0] || (n[0] = (b) => t.bShow = !t.bShow),
438
+ onClick: n[0] || (n[0] = (m) => t.bShow = !t.bShow),
393
439
  class: "handle-ls-svg"
394
440
  }, null, 8, ["rotate"]),
395
- S(d, {
441
+ $(l, {
396
442
  icon: "group",
397
443
  width: "24",
398
444
  class: "group-avatar"
399
445
  }),
400
- R(" " + $((a = t.deviceGroup) == null ? void 0 : a.name), 1)
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
- _: 1
455
+ _: 3
404
456
  }, 8, ["countInfo"]),
405
- t.bShow ? (v(), w("div", jt, [
406
- (v(!0), w(F, null, G((r = t.deviceGroup) == null ? void 0 : r.items, (a, b) => (v(), U(p, {
407
- key: b,
408
- deviceGroup: a
409
- }, null, 8, ["deviceGroup"]))), 128)),
410
- (v(!0), w(F, null, G((l = t.deviceGroup) == null ? void 0 : l.devices, (a, b) => (v(), w("div", {
411
- key: b,
412
- class: ot(["device", a.online && " online-device"])
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
- S(d, {
475
+ $(l, {
415
476
  icon: "user",
416
477
  width: "16",
417
478
  class: "device-avatar"
418
479
  }),
419
- m("span", {
420
- title: a.id,
480
+ f("span", {
481
+ title: u.id,
421
482
  class: "device-name"
422
- }, $(a.name), 9, Ot)
423
- ], 2))), 128))
424
- ])) : nt("", !0)
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 Mt = /* @__PURE__ */ O(Ft, [["render", zt], ["__scopeId", "data-v-babbb531"]]), Tt = {
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
- }, Z = {
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
- }, Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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
- x("right", Tt);
444
- x("group", Z);
445
- x("user", At);
446
- Promise.resolve().then(() => Et).then(({ default: t }) => {
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: W,
452
- GroupShow: Mt
511
+ CountShow: K,
512
+ GroupShow: zt
453
513
  },
454
514
  props: {
455
515
  deviceGroup: Object
456
516
  },
457
- mounted() {
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
- return {};
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 M = (t) => (st("data-v-a6956337"), t = t(), it(), t), Dt = { class: "device-group-list" }, Lt = { class: "search-panel" }, Nt = /* @__PURE__ */ M(() => /* @__PURE__ */ m("div", { style: { height: "32px", "line-height": "32px" } }, [
464
- /* @__PURE__ */ m("img", { src: "" }),
465
- /* @__PURE__ */ R(),
466
- /* @__PURE__ */ m("input", { type: "text" })
467
- ], -1)), Pt = /* @__PURE__ */ M(() => /* @__PURE__ */ m("input", {
468
- type: "checkbox",
469
- id: "onlineShow",
470
- value: "onlineShow"
471
- }, null, -1)), Vt = /* @__PURE__ */ M(() => /* @__PURE__ */ m("label", { for: "onlineShow" }, "\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907", -1)), Bt = { class: "device-panel" };
472
- function Rt(t, n, o, s, e, i) {
473
- var r;
474
- const l = C("CountShow"), d = C("group-show");
475
- return v(), w("div", Dt, [
476
- m("div", Lt, [
477
- Nt,
478
- S(l, { countInfo: t.deviceGroup }, {
479
- default: B(() => [
480
- Pt,
481
- Vt
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
- m("div", Bt, [
487
- (v(!0), w(F, null, G((r = t.deviceGroup) == null ? void 0 : r.items, (u, p) => (v(), U(d, {
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: u
490
- }, null, 8, ["deviceGroup"]))), 128))
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 Ut = /* @__PURE__ */ O(Ht, [["render", Rt], ["__scopeId", "data-v-a6956337"]]), V = {
495
- RecursionDeviceGroup: Ut
496
- }, Kt = {
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 V) {
499
- const o = V[n];
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
- A as Test,
506
- Kt as default
592
+ H as RecursionDeviceGroup,
593
+ Qt as default
507
594
  };
508
595
  //# sourceMappingURL=smarteye-e-components.mjs.map