smarteye-e-components 0.0.15 → 0.0.17
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 +1 -1
- package/dist/smarteye-e-components.js.map +1 -1
- package/dist/smarteye-e-components.mjs +93 -80
- package/dist/smarteye-e-components.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/lib/components/recursion-device-group/model/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue");exports.RecursionDeviceGroup=void 0;(e=>{(n=>{function s(l){const c=[];for(let a=0;a<l;a++)c.push({id:"testId",pid:"",name:`device-${a}`,online:a%2==0,channels:[]});return c}function t(l){const c=[];for(let a=0;a<l;a++)c.push({id:`groupid-${a}`,name:`group-${a}`,pid:"",onlineCount:0,totalCount:0,devices:s(10),items:t(l-a-1)});return c}function i(l){return{name:"hah",onlineCount:0,totalCount:0,items:t(l)}}n.RandomDeviceGroup=i})(e.Test||(e.Test={}));function r(n,s){for(let t=0;t<n.length;t++)s(n[t]),r(n[t].items,s)}(n=>{function s(t){const i={},l={};return r(t.items,c=>{i[c.id]=c;for(let a=0;a<c.devices.length;a++)l[c.devices[a].id]=c.devices[a]}),{getGroup(c){return i[c]},getDevice(c){return l[c]}}}n.AccessSession=s})(e.Utils||(e.Utils={}))})(exports.RecursionDeviceGroup||(exports.RecursionDeviceGroup={}));const A=o.defineComponent({props:{countInfo:Object},setup(e){function r(t,i){if(i){let l=0;return i.items.forEach(c=>{l+=r(t,c)}),t(i)+l}return 0}const n=o.computed(()=>r(t=>t.onlineCount,e.countInfo));return{totalCount:o.computed(()=>r(t=>t.totalCount,e.countInfo)),onlineCount:n}}});const b=(e,r)=>{const n=e.__vccOpts||e;for(const[s,t]of r)n[s]=t;return n},T={class:"root"},z={class:"count-show"};function H(e,r,n,s,t,i){return o.openBlock(),o.createElementBlock("div",T,[o.renderSlot(e.$slots,"default",{},void 0,!0),o.createElementVNode("span",z,o.toDisplayString(e.onlineCount)+"/"+o.toDisplayString(e.totalCount),1)])}const F=b(A,[["render",H],["__scopeId","data-v-702e833c"]]),V=Object.freeze({left:0,top:0,width:16,height:16}),O=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),y=Object.freeze({...V,...O});Object.freeze({...y,body:"",hidden:!1});({...V});const D=Object.freeze({width:null,height:null}),G=Object.freeze({...D,...O});function L(e,r){const n={...e};for(const s in r){const t=r[s],i=typeof t;s in D?(t===null||t&&(i==="string"||i==="number"))&&(n[s]=t):i===typeof n[s]&&(n[s]=s==="rotate"?t%4:t)}return n}const R=/[\s,]+/;function U(e,r){r.split(R).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function W(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function s(t){for(;t<0;)t+=4;return t%4}if(n===""){const t=parseInt(e);return isNaN(t)?0:s(t)}else if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/t,i%1===0?s(i):0)}}return r}const q=/(-?[0-9.]*[0-9]+[0-9.]*)/g,K=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const s=e.split(q);if(s===null||!s.length)return e;const t=[];let i=s.shift(),l=K.test(i);for(;;){if(l){const c=parseFloat(i);isNaN(c)?t.push(i):t.push(Math.ceil(c*r*n)/n)}else t.push(i);if(i=s.shift(),i===void 0)return t.join("");l=!l}}function J(e,r){const n={...y,...e},s={...G,...r},t={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(v=>{const g=[],p=v.hFlip,u=v.vFlip;let m=v.rotate;p?u?m+=2:(g.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),g.push("scale(-1 1)"),t.top=t.left=0):u&&(g.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),g.push("scale(1 -1)"),t.top=t.left=0);let _;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:_=t.height/2+t.top,g.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:g.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:_=t.width/2+t.left,g.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}m%2===1&&(t.left!==t.top&&(_=t.left,t.left=t.top,t.top=_),t.width!==t.height&&(_=t.width,t.width=t.height,t.height=_)),g.length&&(i='<g transform="'+g.join(" ")+'">'+i+"</g>")});const l=s.width,c=s.height,a=t.width,h=t.height;let f,d;return l===null?(d=c===null?"1em":c==="auto"?h:c,f=$(d,a/h)):(f=l==="auto"?a:l,d=c===null?$(f,h/a):c==="auto"?h:c),{attributes:{width:f.toString(),height:d.toString(),viewBox:t.left.toString()+" "+t.top.toString()+" "+a.toString()+" "+h.toString()},body:i}}const Q=/\sid="(\S+)"/g,X="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Y=0;function Z(e,r=X){const n=[];let s;for(;s=Q.exec(e);)n.push(s[1]);return n.length&&n.forEach(t=>{const i=typeof r=="function"?r(t):r+(Y++).toString(),l=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}function ee(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in r)n+=" "+s+'="'+r[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function te(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function oe(e){return'url("data:image/svg+xml,'+te(e)+'")'}const I={...G,inline:!1},ne={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},re={display:"inline-block"},C={backgroundColor:"currentColor"},x={backgroundColor:"transparent"},E={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},B={webkitMask:C,mask:C,background:x};for(const e in B){const r=B[e];for(const n in E)r[e+n]=E[n]}const S={};["horizontal","vertical"].forEach(e=>{const r=e.slice(0,1)+"Flip";S[e+"-flip"]=r,S[e.slice(0,1)+"-flip"]=r,S[e+"Flip"]=r});function N(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const se=(e,r)=>{const n=L(I,r),s={...ne},t=r.mode||"svg",i={},l=r.style,c=typeof l=="object"&&!(l instanceof Array)?l:{};for(let p in r){const u=r[p];if(u!==void 0)switch(p){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[p]=u===!0||u==="true"||u===1;break;case"flip":typeof u=="string"&&U(n,u);break;case"color":i.color=u;break;case"rotate":typeof u=="string"?n[p]=W(u):typeof u=="number"&&(n[p]=u);break;case"ariaHidden":case"aria-hidden":u!==!0&&u!=="true"&&delete s["aria-hidden"];break;default:{const m=S[p];m?(u===!0||u==="true"||u===1)&&(n[m]=!0):I[p]===void 0&&(s[p]=u)}}}const a=J(e,n),h=a.attributes;if(n.inline&&(i.verticalAlign="-0.125em"),t==="svg"){s.style={...i,...c},Object.assign(s,h);let p=0,u=r.id;return typeof u=="string"&&(u=u.replace(/-/g,"_")),s.innerHTML=Z(a.body,u?()=>u+"ID"+p++:"iconifyVue"),o.h("svg",s)}const{body:f,width:d,height:w}=e,v=t==="mask"||(t==="bg"?!1:f.indexOf("currentColor")!==-1),g=ee(f,{...h,width:d+"",height:w+""});return s.style={...i,"--svg":oe(g),width:N(h.width),height:N(h.height),...re,...v?C:x,...c},o.h("span",s)},j=Object.create(null);function k(e,r){j[e]=r}const ie=o.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,r=e.icon,n=typeof r=="string"?j[r]:typeof r=="object"?r:null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:se({...y,...n},e)}}),ce=o.defineComponent({components:{CountShow:F,Icon:ie},name:"group-show",props:{deviceGroup:Object,controlParams:Object},setup(e){function r(i){return i&&i.filter(l=>{var c;return!((c=e.controlParams)!=null&&c.onlyShowOnline)||l.online})||[]}const n=o.computed(()=>{var i,l;const c=e.controlParams.searchStr;return c.length==0||e.deviceGroup&&((i=e.deviceGroup)==null?void 0:i.name.indexOf(c))>0?!0:(l=e.deviceGroup)==null?void 0:l.devices.find(a=>a.name.indexOf(e.controlParams.searchStr)>0)});function s(i){return e.controlParams.searchStr.length==0?!0:i.name.indexOf(e.controlParams.searchStr)>0}const t=o.ref(!1);return{showGroup:n,showDevice:s,FilterDevice:r,bShow:t}}});const le={key:0,class:"group"},ae=["title"],ue={class:"group-slot"},de={key:0,style:{"margin-left":"26px"}},he=["title"],pe={class:"device-slot"};function fe(e,r,n,s,t,i){var l,c;const a=o.resolveComponent("Icon"),h=o.resolveComponent("CountShow"),f=o.resolveComponent("group-show");return e.showGroup?(o.openBlock(),o.createElementBlock("div",le,[o.createVNode(h,{countInfo:e.deviceGroup},{default:o.withCtx(()=>{var d,w;return[o.createVNode(a,{icon:"right",rotate:e.bShow&&"90deg",width:"20",onClick:r[0]||(r[0]=v=>e.bShow=!e.bShow),class:"handle-ls-svg"},null,8,["rotate"]),o.createVNode(a,{icon:"group",width:"24",class:"group-avatar"}),o.createElementVNode("span",{class:"group-name",title:(d=e.deviceGroup)==null?void 0:d.name},o.toDisplayString((w=e.deviceGroup)==null?void 0:w.name),9,ae),o.createElementVNode("div",ue,[o.renderSlot(e.$slots,"group",{group:e.deviceGroup},void 0,!0)])]}),_:3},8,["countInfo"]),e.bShow?(o.openBlock(),o.createElementBlock("div",de,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((l=e.deviceGroup)==null?void 0:l.items,(d,w)=>(o.openBlock(),o.createBlock(f,{key:w,deviceGroup:d,controlParams:e.controlParams},{group:o.withCtx(({group:v})=>[o.renderSlot(e.$slots,"group",{group:v},void 0,!0)]),device:o.withCtx(({device:v})=>[o.renderSlot(e.$slots,"device",{device:v},void 0,!0)]),_:2},1032,["deviceGroup","controlParams"]))),128)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.FilterDevice((c=e.deviceGroup)==null?void 0:c.devices),(d,w)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:w,class:o.normalizeClass(["device",d.online&&"online-device"])},[o.createVNode(a,{icon:"user",width:"16",class:"device-avatar"}),o.createElementVNode("span",{title:d.id,class:"device-name"},o.toDisplayString(d.name),9,he),o.createElementVNode("div",pe,[o.renderSlot(e.$slots,"device",{device:d},void 0,!0)])],2)),[[o.vShow,e.showDevice(d)]])),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}const ge=b(ce,[["render",fe],["__scopeId","data-v-10002f64"]]),me={width:1024,height:1024,body:'<path fill="currentColor" d="M384 192v640l384-320.064z"/>'},ve={width:1024,height:1024,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"/>'},_e={width:1024,height:1024,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"/>'};k("right",me);k("group",ve);k("user",_e);const we=o.defineComponent({components:{CountShow:F,GroupShow:ge},props:{deviceGroup:Object},methods:{onCheckBoxChange(){this.controlParams.onlyShowOnline=!this.controlParams.onlyShowOnline},onSearchChange(){var e;this.inputSearchRef&&(this.controlParams.searchStr=(e=this.inputSearchRef)==null?void 0:e.value,console.log(this.controlParams.searchStr))}},setup(){const e=o.ref({onlyShowOnline:!1,searchStr:""});return{inputSearchRef:o.ref(),controlParams:e}}});const M=e=>(o.pushScopeId("data-v-3b15399c"),e=e(),o.popScopeId(),e),Se={class:"device-group-list"},Ce={class:"search-panel"},be={style:{height:"32px","line-height":"32px"}},ye=M(()=>o.createElementVNode("img",{src:""},null,-1)),ke=M(()=>o.createElementVNode("label",{for:"onlineShow"},"\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907",-1)),$e={class:"device-panel"};function Ie(e,r,n,s,t,i){var l;const c=o.resolveComponent("CountShow"),a=o.resolveComponent("group-show");return o.openBlock(),o.createElementBlock("div",Se,[o.createElementVNode("div",Ce,[o.createElementVNode("div",be,[ye,o.createElementVNode("input",{type:"text",onChange:r[0]||(r[0]=(...h)=>e.onSearchChange&&e.onSearchChange(...h)),ref:"inputSearchRef"},null,544)]),o.createVNode(c,{countInfo:e.deviceGroup},{default:o.withCtx(()=>[o.createElementVNode("input",{type:"checkbox",id:"onlineShow",value:"onlineShow",onChange:r[1]||(r[1]=(...h)=>e.onCheckBoxChange&&e.onCheckBoxChange(...h))},null,32),ke]),_:1},8,["countInfo"])]),o.createElementVNode("div",$e,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((l=e.deviceGroup)==null?void 0:l.items,(h,f)=>(o.openBlock(),o.createBlock(a,{controlParams:e.controlParams,key:f,deviceGroup:h},{group:o.withCtx(({group:d})=>[o.renderSlot(e.$slots,"group",{group:d},void 0,!0)]),device:o.withCtx(({device:d})=>[o.renderSlot(e.$slots,"device",{device:d},void 0,!0)]),_:2},1032,["controlParams","deviceGroup"]))),128))])])}const Ee=b(we,[["render",Ie],["__scopeId","data-v-3b15399c"]]),P={RecursionDeviceGroup:Ee},Be={install(e){for(const r in P){const n=P[r];e.component(r,n)}}};exports.default=Be;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue");exports.RecursionDeviceGroup=void 0;(e=>{(n=>{function s(l){const c=[];for(let a=0;a<l;a++)c.push({id:"testId",pid:"",name:`device-${a}`,online:a%2==0,channels:[]});return c}function t(l){const c=[];for(let a=0;a<l;a++)c.push({id:`groupid-${a}`,name:`group-${a}`,pid:"",onlineCount:0,totalCount:0,devices:s(10),items:t(l-a-1)});return c}function i(l){return{name:"hah",onlineCount:0,totalCount:0,items:t(l)}}n.RandomDeviceGroup=i})(e.Test||(e.Test={}));function r(n,s){for(let t=0;t<n.length;t++)s(n[t]),r(n[t].items,s)}(n=>{function s(t){const i={},l={};return r(t.items,c=>{i[c.id]=c;for(let a=0;a<c.devices.length;a++)l[c.devices[a].id]=c.devices[a]}),{getGroup(c){return i[c]},getDevice(c){return l[c]},foreachGroup(c){for(let a in i)c(i[a])}}}n.AccessSession=s})(e.Utils||(e.Utils={}))})(exports.RecursionDeviceGroup||(exports.RecursionDeviceGroup={}));const A=o.defineComponent({props:{countInfo:Object},setup(e){function r(t,i){if(i){let l=0;return i.items.forEach(c=>{l+=r(t,c)}),t(i)+l}return 0}const n=o.computed(()=>r(t=>t.onlineCount,e.countInfo));return{totalCount:o.computed(()=>r(t=>t.totalCount,e.countInfo)),onlineCount:n}}});const C=(e,r)=>{const n=e.__vccOpts||e;for(const[s,t]of r)n[s]=t;return n},T={class:"root"},z={class:"count-show"};function H(e,r,n,s,t,i){return o.openBlock(),o.createElementBlock("div",T,[o.renderSlot(e.$slots,"default",{},void 0,!0),o.createElementVNode("span",z,o.toDisplayString(e.onlineCount)+"/"+o.toDisplayString(e.totalCount),1)])}const F=C(A,[["render",H],["__scopeId","data-v-702e833c"]]),V=Object.freeze({left:0,top:0,width:16,height:16}),G=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),y=Object.freeze({...V,...G});Object.freeze({...y,body:"",hidden:!1});({...V});const O=Object.freeze({width:null,height:null}),D=Object.freeze({...O,...G});function L(e,r){const n={...e};for(const s in r){const t=r[s],i=typeof t;s in O?(t===null||t&&(i==="string"||i==="number"))&&(n[s]=t):i===typeof n[s]&&(n[s]=s==="rotate"?t%4:t)}return n}const R=/[\s,]+/;function U(e,r){r.split(R).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function W(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function s(t){for(;t<0;)t+=4;return t%4}if(n===""){const t=parseInt(e);return isNaN(t)?0:s(t)}else if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/t,i%1===0?s(i):0)}}return r}const q=/(-?[0-9.]*[0-9]+[0-9.]*)/g,K=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const s=e.split(q);if(s===null||!s.length)return e;const t=[];let i=s.shift(),l=K.test(i);for(;;){if(l){const c=parseFloat(i);isNaN(c)?t.push(i):t.push(Math.ceil(c*r*n)/n)}else t.push(i);if(i=s.shift(),i===void 0)return t.join("");l=!l}}function J(e,r){const n={...y,...e},s={...D,...r},t={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(_=>{const p=[],f=_.hFlip,u=_.vFlip;let v=_.rotate;f?u?v+=2:(p.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),p.push("scale(-1 1)"),t.top=t.left=0):u&&(p.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),p.push("scale(1 -1)"),t.top=t.left=0);let w;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:w=t.height/2+t.top,p.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:p.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:w=t.width/2+t.left,p.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}v%2===1&&(t.left!==t.top&&(w=t.left,t.left=t.top,t.top=w),t.width!==t.height&&(w=t.width,t.width=t.height,t.height=w)),p.length&&(i='<g transform="'+p.join(" ")+'">'+i+"</g>")});const l=s.width,c=s.height,a=t.width,h=t.height;let g,d;return l===null?(d=c===null?"1em":c==="auto"?h:c,g=$(d,a/h)):(g=l==="auto"?a:l,d=c===null?$(g,h/a):c==="auto"?h:c),{attributes:{width:g.toString(),height:d.toString(),viewBox:t.left.toString()+" "+t.top.toString()+" "+a.toString()+" "+h.toString()},body:i}}const Q=/\sid="(\S+)"/g,X="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Y=0;function Z(e,r=X){const n=[];let s;for(;s=Q.exec(e);)n.push(s[1]);return n.length&&n.forEach(t=>{const i=typeof r=="function"?r(t):r+(Y++).toString(),l=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+i+"$3")}),e}function ee(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in r)n+=" "+s+'="'+r[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function te(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function oe(e){return'url("data:image/svg+xml,'+te(e)+'")'}const I={...D,inline:!1},ne={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},re={display:"inline-block"},b={backgroundColor:"currentColor"},x={backgroundColor:"transparent"},E={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},B={webkitMask:b,mask:b,background:x};for(const e in B){const r=B[e];for(const n in E)r[e+n]=E[n]}const S={};["horizontal","vertical"].forEach(e=>{const r=e.slice(0,1)+"Flip";S[e+"-flip"]=r,S[e.slice(0,1)+"-flip"]=r,S[e+"Flip"]=r});function N(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const se=(e,r)=>{const n=L(I,r),s={...ne},t=r.mode||"svg",i={},l=r.style,c=typeof l=="object"&&!(l instanceof Array)?l:{};for(let f in r){const u=r[f];if(u!==void 0)switch(f){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[f]=u===!0||u==="true"||u===1;break;case"flip":typeof u=="string"&&U(n,u);break;case"color":i.color=u;break;case"rotate":typeof u=="string"?n[f]=W(u):typeof u=="number"&&(n[f]=u);break;case"ariaHidden":case"aria-hidden":u!==!0&&u!=="true"&&delete s["aria-hidden"];break;default:{const v=S[f];v?(u===!0||u==="true"||u===1)&&(n[v]=!0):I[f]===void 0&&(s[f]=u)}}}const a=J(e,n),h=a.attributes;if(n.inline&&(i.verticalAlign="-0.125em"),t==="svg"){s.style={...i,...c},Object.assign(s,h);let f=0,u=r.id;return typeof u=="string"&&(u=u.replace(/-/g,"_")),s.innerHTML=Z(a.body,u?()=>u+"ID"+f++:"iconifyVue"),o.h("svg",s)}const{body:g,width:d,height:m}=e,_=t==="mask"||(t==="bg"?!1:g.indexOf("currentColor")!==-1),p=ee(g,{...h,width:d+"",height:m+""});return s.style={...i,"--svg":oe(p),width:N(h.width),height:N(h.height),...re,..._?b:x,...c},o.h("span",s)},j=Object.create(null);function k(e,r){j[e]=r}const ie=o.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,r=e.icon,n=typeof r=="string"?j[r]:typeof r=="object"?r:null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:se({...y,...n},e)}}),ce=o.defineComponent({components:{CountShow:F,Icon:ie},name:"group-show",props:{deviceGroup:Object,controlParams:Object},setup(e){function r(i){return i&&i.filter(l=>{var c;return!((c=e.controlParams)!=null&&c.onlyShowOnline)||l.online})||[]}const n=o.computed(()=>{var i,l;const c=e.controlParams.searchStr;return c.length==0||e.deviceGroup&&((i=e.deviceGroup)==null?void 0:i.name.indexOf(c))>0?!0:(l=e.deviceGroup)==null?void 0:l.devices.find(a=>a.name.indexOf(e.controlParams.searchStr)>0)});function s(i){return e.controlParams.searchStr.length==0?!0:i.name.indexOf(e.controlParams.searchStr)>0}const t=o.ref(!1);return{showGroup:n,showDevice:s,FilterDevice:r,bShow:t}}});const le={key:0,class:"group"},ae=["title"],ue={class:"group-slot"},de={key:0,style:{"margin-left":"26px"}},he=["title"],pe={class:"device-slot"};function fe(e,r,n,s,t,i){var l,c;const a=o.resolveComponent("Icon"),h=o.resolveComponent("CountShow"),g=o.resolveComponent("group-show");return e.showGroup?(o.openBlock(),o.createElementBlock("div",le,[o.createVNode(h,{countInfo:e.deviceGroup},{default:o.withCtx(()=>{var d,m;return[o.createVNode(a,{icon:"right",rotate:e.bShow&&"90deg",width:"20",onClick:r[0]||(r[0]=_=>e.bShow=!e.bShow),class:"handle-ls-svg"},null,8,["rotate"]),o.createVNode(a,{icon:"group",width:"24",class:"group-avatar"}),o.createElementVNode("span",{class:"group-name",title:(d=e.deviceGroup)==null?void 0:d.name},o.toDisplayString((m=e.deviceGroup)==null?void 0:m.name),9,ae),o.createElementVNode("div",ue,[o.renderSlot(e.$slots,"group",{group:e.deviceGroup},void 0,!0)])]}),_:3},8,["countInfo"]),e.bShow?(o.openBlock(),o.createElementBlock("div",de,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((l=e.deviceGroup)==null?void 0:l.items,(d,m)=>(o.openBlock(),o.createBlock(g,{key:m,deviceGroup:d,controlParams:e.controlParams},{group:o.withCtx(({group:_})=>[o.renderSlot(e.$slots,"group",{group:_},void 0,!0)]),device:o.withCtx(({device:_,group:p})=>[o.renderSlot(e.$slots,"device",{device:_,group:p},void 0,!0)]),_:2},1032,["deviceGroup","controlParams"]))),128)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.FilterDevice((c=e.deviceGroup)==null?void 0:c.devices),(d,m)=>o.withDirectives((o.openBlock(),o.createElementBlock("div",{key:m,class:o.normalizeClass(["device",d.online&&"online-device"])},[o.createVNode(a,{icon:"user",width:"16",class:"device-avatar"}),o.createElementVNode("span",{title:d.id,class:"device-name"},o.toDisplayString(d.name),9,he),o.createElementVNode("div",pe,[o.renderSlot(e.$slots,"device",{device:d,group:e.deviceGroup},void 0,!0)])],2)),[[o.vShow,e.showDevice(d)]])),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}const ge=C(ce,[["render",fe],["__scopeId","data-v-b34e0b4a"]]),me={width:1024,height:1024,body:'<path fill="currentColor" d="M384 192v640l384-320.064z"/>'},ve={width:1024,height:1024,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"/>'},_e={width:1024,height:1024,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"/>'};k("right",me);k("group",ve);k("user",_e);const we=o.defineComponent({components:{CountShow:F,GroupShow:ge},props:{deviceGroup:Object},methods:{onCheckBoxChange(){this.controlParams.onlyShowOnline=!this.controlParams.onlyShowOnline},onSearchChange(){var e;this.inputSearchRef&&(this.controlParams.searchStr=(e=this.inputSearchRef)==null?void 0:e.value,console.log(this.controlParams.searchStr))}},setup(){const e=o.ref({onlyShowOnline:!1,searchStr:""});return{inputSearchRef:o.ref(),controlParams:e}}});const M=e=>(o.pushScopeId("data-v-f4599228"),e=e(),o.popScopeId(),e),Se={class:"device-group-list"},be={class:"search-panel"},Ce={style:{height:"32px","line-height":"32px"}},ye=M(()=>o.createElementVNode("img",{src:""},null,-1)),ke=M(()=>o.createElementVNode("label",{for:"onlineShow"},"\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907",-1)),$e={class:"device-panel"};function Ie(e,r,n,s,t,i){var l;const c=o.resolveComponent("CountShow"),a=o.resolveComponent("group-show");return o.openBlock(),o.createElementBlock("div",Se,[o.createElementVNode("div",be,[o.createElementVNode("div",Ce,[ye,o.createElementVNode("input",{type:"text",onChange:r[0]||(r[0]=(...h)=>e.onSearchChange&&e.onSearchChange(...h)),ref:"inputSearchRef"},null,544)]),o.createVNode(c,{countInfo:e.deviceGroup},{default:o.withCtx(()=>[o.createElementVNode("input",{type:"checkbox",id:"onlineShow",value:"onlineShow",onChange:r[1]||(r[1]=(...h)=>e.onCheckBoxChange&&e.onCheckBoxChange(...h))},null,32),ke]),_:1},8,["countInfo"])]),o.createElementVNode("div",$e,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((l=e.deviceGroup)==null?void 0:l.items,(h,g)=>(o.openBlock(),o.createBlock(a,{controlParams:e.controlParams,key:g,deviceGroup:h},{group:o.withCtx(({group:d})=>[o.renderSlot(e.$slots,"group",{group:d},void 0,!0)]),device:o.withCtx(({device:d,group:m})=>[o.renderSlot(e.$slots,"device",{device:d,group:m},void 0,!0)]),_:2},1032,["controlParams","deviceGroup"]))),128))])])}const Ee=C(we,[["render",Ie],["__scopeId","data-v-f4599228"]]),P={RecursionDeviceGroup:Ee},Be={install(e){for(const r in P){const n=P[r];e.component(r,n)}}};exports.default=Be;
|
|
2
2
|
//# sourceMappingURL=smarteye-e-components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smarteye-e-components.js","sources":["../src/components/recursion-device-group/model/index.ts","../src/components-global/count-show/index.vue","../src/components-global/count-show/index.vue","../node_modules/.pnpm/@iconify+vue@4.0.0_vue@3.2.39/node_modules/@iconify/vue/dist/offline.mjs","../src/components-global/group-show/index.vue","../src/components-global/group-show/index.vue","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/caret-right.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/folder-opened.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/avatar.js","../src/components/recursion-device-group/index.vue","../src/components/recursion-device-group/index.vue","../src/index.ts"],"sourcesContent":["export namespace RecursionDeviceGroup {\r\n export interface IChannelInfo {\r\n index: number;\r\n name: string;\r\n }\r\n\r\n export interface DeviceInfo<T = any> {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n online: boolean;\r\n channels: Array<IChannelInfo>;\r\n tag?: T;\r\n }\r\n\r\n export interface DeviceGroup<T = any, DT = any> extends ICountInfo {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n devices: Array<DeviceInfo<DT>>;\r\n items: Array<DeviceGroup<T, DT>>;\r\n tag?: T;\r\n }\r\n\r\n export interface SessionDeviceGroup<\r\n GroupTag = any,\r\n DeviceTag = any,\r\n SessionTag = any\r\n > extends ICountInfo {\r\n name: string;\r\n items: Array<DeviceGroup>;\r\n tag?: SessionTag;\r\n }\r\n\r\n export interface ICountInfo {\r\n totalCount: number;\r\n onlineCount: number;\r\n items: Array<ICountInfo>;\r\n }\r\n\r\n export interface IControlParams {\r\n onlyShowOnline: boolean;\r\n searchStr: string;\r\n }\r\n\r\n export namespace Test {\r\n let startIndex = 0;\r\n function CreateDevice(count: number): Array<DeviceInfo> {\r\n const deviceList: Array<DeviceInfo> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: \"testId\",\r\n pid: \"\",\r\n name: `device-${i}`,\r\n online: i % 2 == 0,\r\n channels: [],\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n function CreateGroup(count: number) {\r\n const deviceList: Array<DeviceGroup> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: `groupid-${i}`,\r\n name: `group-${i}`,\r\n pid: \"\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n devices: CreateDevice(10),\r\n items: CreateGroup(count - i - 1),\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n export function RandomDeviceGroup(count: number): SessionDeviceGroup {\r\n return {\r\n name: \"hah\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n items: CreateGroup(count),\r\n };\r\n }\r\n }\r\n\r\n function ForeachDeviceGroup(\r\n deviceGroup: DeviceGroup[],\r\n handleDeviceGroup: (deviceGroup: DeviceGroup) => void\r\n ) {\r\n for (let i = 0; i < deviceGroup.length; i++) {\r\n handleDeviceGroup(deviceGroup[i]);\r\n ForeachDeviceGroup(deviceGroup[i].items, handleDeviceGroup);\r\n }\r\n }\r\n\r\n export namespace Utils {\r\n export function AccessSession(session: SessionDeviceGroup) {\r\n const groupMap: { [k in string]: DeviceGroup } = {};\r\n const deviceMap: { [k in string]: DeviceInfo } = {};\r\n\r\n ForeachDeviceGroup(session.items, (deviceGroup) => {\r\n groupMap[deviceGroup.id] = deviceGroup;\r\n for (let i = 0; i < deviceGroup.devices.length; i++) {\r\n deviceMap[deviceGroup.devices[i].id] = deviceGroup.devices[i];\r\n }\r\n });\r\n\r\n return {\r\n getGroup(id: string) {\r\n return groupMap[id];\r\n },\r\n getDevice(id: string) {\r\n return deviceMap[id];\r\n },\r\n };\r\n }\r\n }\r\n}\r\n","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","import { h, defineComponent } from 'vue';\n\nconst defaultIconDimensions = Object.freeze(\n {\n left: 0,\n top: 0,\n width: 16,\n height: 16\n }\n);\nconst defaultIconTransformations = Object.freeze({\n rotate: 0,\n vFlip: false,\n hFlip: false\n});\nconst defaultIconProps = Object.freeze({\n ...defaultIconDimensions,\n ...defaultIconTransformations\n});\nconst defaultExtendedIconProps = Object.freeze({\n ...defaultIconProps,\n body: \"\",\n hidden: false\n});\n\nfunction mergeIconTransformations(obj1, obj2) {\n const result = {};\n if (!obj1.hFlip !== !obj2.hFlip) {\n result.hFlip = true;\n }\n if (!obj1.vFlip !== !obj2.vFlip) {\n result.vFlip = true;\n }\n const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;\n if (rotate) {\n result.rotate = rotate;\n }\n return result;\n}\n\nfunction mergeIconData(parent, child) {\n const result = mergeIconTransformations(parent, child);\n for (const key in defaultExtendedIconProps) {\n if (key in defaultIconTransformations) {\n if (key in parent && !(key in result)) {\n result[key] = defaultIconTransformations[key];\n }\n } else if (key in child) {\n result[key] = child[key];\n } else if (key in parent) {\n result[key] = parent[key];\n }\n }\n return result;\n}\n\nfunction getIconsTree(data, names) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n const resolved = /* @__PURE__ */ Object.create(null);\n function resolve(name) {\n if (icons[name]) {\n return resolved[name] = [];\n }\n if (!(name in resolved)) {\n resolved[name] = null;\n const parent = aliases[name] && aliases[name].parent;\n const value = parent && resolve(parent);\n if (value) {\n resolved[name] = [parent].concat(value);\n }\n }\n return resolved[name];\n }\n (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);\n return resolved;\n}\n\nfunction internalGetIconData(data, name, tree) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n let currentProps = {};\n function parse(name2) {\n currentProps = mergeIconData(\n icons[name2] || aliases[name2],\n currentProps\n );\n }\n parse(name);\n tree.forEach(parse);\n return mergeIconData(data, currentProps);\n}\n\nfunction parseIconSet(data, callback) {\n const names = [];\n if (typeof data !== \"object\" || typeof data.icons !== \"object\") {\n return names;\n }\n if (data.not_found instanceof Array) {\n data.not_found.forEach((name) => {\n callback(name, null);\n names.push(name);\n });\n }\n const tree = getIconsTree(data);\n for (const name in tree) {\n const item = tree[name];\n if (item) {\n callback(name, internalGetIconData(data, name, item));\n names.push(name);\n }\n }\n return names;\n}\n\nconst matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\nconst optionalPropertyDefaults = {\n provider: \"\",\n aliases: {},\n not_found: {},\n ...defaultIconDimensions\n};\nfunction checkOptionalProps(item, defaults) {\n for (const prop in defaults) {\n if (prop in item && typeof item[prop] !== typeof defaults[prop]) {\n return false;\n }\n }\n return true;\n}\nfunction quicklyValidateIconSet(obj) {\n if (typeof obj !== \"object\" || obj === null) {\n return null;\n }\n const data = obj;\n if (typeof data.prefix !== \"string\" || !obj.icons || typeof obj.icons !== \"object\") {\n return null;\n }\n if (!checkOptionalProps(obj, optionalPropertyDefaults)) {\n return null;\n }\n const icons = data.icons;\n for (const name in icons) {\n const icon = icons[name];\n if (!name.match(matchIconName) || typeof icon.body !== \"string\" || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n const aliases = data.aliases || {};\n for (const name in aliases) {\n const icon = aliases[name];\n const parent = icon.parent;\n if (!name.match(matchIconName) || typeof parent !== \"string\" || !icons[parent] && !aliases[parent] || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n return data;\n}\n\nconst defaultIconSizeCustomisations = Object.freeze({\n width: null,\n height: null\n});\nconst defaultIconCustomisations = Object.freeze({\n ...defaultIconSizeCustomisations,\n ...defaultIconTransformations\n});\n\nfunction mergeCustomisations(defaults, item) {\n const result = {\n ...defaults\n };\n for (const key in item) {\n const value = item[key];\n const valueType = typeof value;\n if (key in defaultIconSizeCustomisations) {\n if (value === null || value && (valueType === \"string\" || valueType === \"number\")) {\n result[key] = value;\n }\n } else if (valueType === typeof result[key]) {\n result[key] = key === \"rotate\" ? value % 4 : value;\n }\n }\n return result;\n}\n\nconst separator = /[\\s,]+/;\nfunction flipFromString(custom, flip) {\n flip.split(separator).forEach((str) => {\n const value = str.trim();\n switch (value) {\n case \"horizontal\":\n custom.hFlip = true;\n break;\n case \"vertical\":\n custom.vFlip = true;\n break;\n }\n });\n}\n\nfunction rotateFromString(value, defaultValue = 0) {\n const units = value.replace(/^-?[0-9.]*/, \"\");\n function cleanup(value2) {\n while (value2 < 0) {\n value2 += 4;\n }\n return value2 % 4;\n }\n if (units === \"\") {\n const num = parseInt(value);\n return isNaN(num) ? 0 : cleanup(num);\n } else if (units !== value) {\n let split = 0;\n switch (units) {\n case \"%\":\n split = 25;\n break;\n case \"deg\":\n split = 90;\n }\n if (split) {\n let num = parseFloat(value.slice(0, value.length - units.length));\n if (isNaN(num)) {\n return 0;\n }\n num = num / split;\n return num % 1 === 0 ? cleanup(num) : 0;\n }\n }\n return defaultValue;\n}\n\nconst unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nconst unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\nfunction calculateSize(size, ratio, precision) {\n if (ratio === 1) {\n return size;\n }\n precision = precision || 100;\n if (typeof size === \"number\") {\n return Math.ceil(size * ratio * precision) / precision;\n }\n if (typeof size !== \"string\") {\n return size;\n }\n const oldParts = size.split(unitsSplit);\n if (oldParts === null || !oldParts.length) {\n return size;\n }\n const newParts = [];\n let code = oldParts.shift();\n let isNumber = unitsTest.test(code);\n while (true) {\n if (isNumber) {\n const num = parseFloat(code);\n if (isNaN(num)) {\n newParts.push(code);\n } else {\n newParts.push(Math.ceil(num * ratio * precision) / precision);\n }\n } else {\n newParts.push(code);\n }\n code = oldParts.shift();\n if (code === void 0) {\n return newParts.join(\"\");\n }\n isNumber = !isNumber;\n }\n}\n\nfunction iconToSVG(icon, customisations) {\n const fullIcon = {\n ...defaultIconProps,\n ...icon\n };\n const fullCustomisations = {\n ...defaultIconCustomisations,\n ...customisations\n };\n const box = {\n left: fullIcon.left,\n top: fullIcon.top,\n width: fullIcon.width,\n height: fullIcon.height\n };\n let body = fullIcon.body;\n [fullIcon, fullCustomisations].forEach((props) => {\n const transformations = [];\n const hFlip = props.hFlip;\n const vFlip = props.vFlip;\n let rotation = props.rotate;\n if (hFlip) {\n if (vFlip) {\n rotation += 2;\n } else {\n transformations.push(\n \"translate(\" + (box.width + box.left).toString() + \" \" + (0 - box.top).toString() + \")\"\n );\n transformations.push(\"scale(-1 1)\");\n box.top = box.left = 0;\n }\n } else if (vFlip) {\n transformations.push(\n \"translate(\" + (0 - box.left).toString() + \" \" + (box.height + box.top).toString() + \")\"\n );\n transformations.push(\"scale(1 -1)\");\n box.top = box.left = 0;\n }\n let tempValue;\n if (rotation < 0) {\n rotation -= Math.floor(rotation / 4) * 4;\n }\n rotation = rotation % 4;\n switch (rotation) {\n case 1:\n tempValue = box.height / 2 + box.top;\n transformations.unshift(\n \"rotate(90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n case 2:\n transformations.unshift(\n \"rotate(180 \" + (box.width / 2 + box.left).toString() + \" \" + (box.height / 2 + box.top).toString() + \")\"\n );\n break;\n case 3:\n tempValue = box.width / 2 + box.left;\n transformations.unshift(\n \"rotate(-90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n }\n if (rotation % 2 === 1) {\n if (box.left !== box.top) {\n tempValue = box.left;\n box.left = box.top;\n box.top = tempValue;\n }\n if (box.width !== box.height) {\n tempValue = box.width;\n box.width = box.height;\n box.height = tempValue;\n }\n }\n if (transformations.length) {\n body = '<g transform=\"' + transformations.join(\" \") + '\">' + body + \"</g>\";\n }\n });\n const customisationsWidth = fullCustomisations.width;\n const customisationsHeight = fullCustomisations.height;\n const boxWidth = box.width;\n const boxHeight = box.height;\n let width;\n let height;\n if (customisationsWidth === null) {\n height = customisationsHeight === null ? \"1em\" : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n width = calculateSize(height, boxWidth / boxHeight);\n } else {\n width = customisationsWidth === \"auto\" ? boxWidth : customisationsWidth;\n height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n }\n const result = {\n attributes: {\n width: width.toString(),\n height: height.toString(),\n viewBox: box.left.toString() + \" \" + box.top.toString() + \" \" + boxWidth.toString() + \" \" + boxHeight.toString()\n },\n body\n };\n return result;\n}\n\nconst regex = /\\sid=\"(\\S+)\"/g;\nconst randomPrefix = \"IconifyId\" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);\nlet counter = 0;\nfunction replaceIDs(body, prefix = randomPrefix) {\n const ids = [];\n let match;\n while (match = regex.exec(body)) {\n ids.push(match[1]);\n }\n if (!ids.length) {\n return body;\n }\n ids.forEach((id) => {\n const newID = typeof prefix === \"function\" ? prefix(id) : prefix + (counter++).toString();\n const escapedID = id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n body = body.replace(\n new RegExp('([#;\"])(' + escapedID + ')([\")]|\\\\.[a-z])', \"g\"),\n \"$1\" + newID + \"$3\"\n );\n });\n return body;\n}\n\nfunction iconToHTML(body, attributes) {\n let renderAttribsHTML = body.indexOf(\"xlink:\") === -1 ? \"\" : ' xmlns:xlink=\"http://www.w3.org/1999/xlink\"';\n for (const attr in attributes) {\n renderAttribsHTML += \" \" + attr + '=\"' + attributes[attr] + '\"';\n }\n return '<svg xmlns=\"http://www.w3.org/2000/svg\"' + renderAttribsHTML + \">\" + body + \"</svg>\";\n}\n\nfunction encodeSVGforURL(svg) {\n return svg.replace(/\"/g, \"'\").replace(/%/g, \"%25\").replace(/#/g, \"%23\").replace(/</g, \"%3C\").replace(/>/g, \"%3E\").replace(/\\s+/g, \" \");\n}\nfunction svgToURL(svg) {\n return 'url(\"data:image/svg+xml,' + encodeSVGforURL(svg) + '\")';\n}\n\nconst defaultExtendedIconCustomisations = {\n ...defaultIconCustomisations,\n inline: false,\n};\n\n/**\n * Default SVG attributes\n */\nconst svgDefaults = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n 'aria-hidden': true,\n 'role': 'img',\n};\n/**\n * Style modes\n */\nconst commonProps = {\n display: 'inline-block',\n};\nconst monotoneProps = {\n backgroundColor: 'currentColor',\n};\nconst coloredProps = {\n backgroundColor: 'transparent',\n};\n// Dynamically add common props to variables above\nconst propsToAdd = {\n Image: 'var(--svg)',\n Repeat: 'no-repeat',\n Size: '100% 100%',\n};\nconst propsToAddTo = {\n webkitMask: monotoneProps,\n mask: monotoneProps,\n background: coloredProps,\n};\nfor (const prefix in propsToAddTo) {\n const list = propsToAddTo[prefix];\n for (const prop in propsToAdd) {\n list[prefix + prop] = propsToAdd[prop];\n }\n}\n/**\n * Aliases for customisations.\n * In Vue 'v-' properties are reserved, so v-flip must be renamed\n */\nconst customisationAliases = {};\n['horizontal', 'vertical'].forEach((prefix) => {\n const attr = prefix.slice(0, 1) + 'Flip';\n // vertical-flip\n customisationAliases[prefix + '-flip'] = attr;\n // v-flip\n customisationAliases[prefix.slice(0, 1) + '-flip'] = attr;\n // verticalFlip\n customisationAliases[prefix + 'Flip'] = attr;\n});\n/**\n * Fix size: add 'px' to numbers\n */\nfunction fixSize(value) {\n return value + (value.match(/^[-0-9.]+$/) ? 'px' : '');\n}\n/**\n * Render icon\n */\nconst render = (\n// Icon must be validated before calling this function\nicon, \n// Partial properties\nprops) => {\n // Split properties\n const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);\n const componentProps = { ...svgDefaults };\n // Check mode\n const mode = props.mode || 'svg';\n // Copy style\n const style = {};\n const propsStyle = props.style;\n const customStyle = typeof propsStyle === 'object' && !(propsStyle instanceof Array)\n ? propsStyle\n : {};\n // Get element properties\n for (let key in props) {\n const value = props[key];\n if (value === void 0) {\n continue;\n }\n switch (key) {\n // Properties to ignore\n case 'icon':\n case 'style':\n case 'onLoad':\n case 'mode':\n break;\n // Boolean attributes\n case 'inline':\n case 'hFlip':\n case 'vFlip':\n customisations[key] =\n value === true || value === 'true' || value === 1;\n break;\n // Flip as string: 'horizontal,vertical'\n case 'flip':\n if (typeof value === 'string') {\n flipFromString(customisations, value);\n }\n break;\n // Color: override style\n case 'color':\n style.color = value;\n break;\n // Rotation as string\n case 'rotate':\n if (typeof value === 'string') {\n customisations[key] = rotateFromString(value);\n }\n else if (typeof value === 'number') {\n customisations[key] = value;\n }\n break;\n // Remove aria-hidden\n case 'ariaHidden':\n case 'aria-hidden':\n // Vue transforms 'aria-hidden' property to 'ariaHidden'\n if (value !== true && value !== 'true') {\n delete componentProps['aria-hidden'];\n }\n break;\n default: {\n const alias = customisationAliases[key];\n if (alias) {\n // Aliases for boolean customisations\n if (value === true || value === 'true' || value === 1) {\n customisations[alias] = true;\n }\n }\n else if (defaultExtendedIconCustomisations[key] === void 0) {\n // Copy missing property if it does not exist in customisations\n componentProps[key] = value;\n }\n }\n }\n }\n // Generate icon\n const item = iconToSVG(icon, customisations);\n const renderAttribs = item.attributes;\n // Inline display\n if (customisations.inline) {\n style.verticalAlign = '-0.125em';\n }\n if (mode === 'svg') {\n // Add style\n componentProps.style = {\n ...style,\n ...customStyle,\n };\n // Add icon stuff\n Object.assign(componentProps, renderAttribs);\n // Counter for ids based on \"id\" property to render icons consistently on server and client\n let localCounter = 0;\n let id = props.id;\n if (typeof id === 'string') {\n // Convert '-' to '_' to avoid errors in animations\n id = id.replace(/-/g, '_');\n }\n // Add innerHTML and style to props\n componentProps['innerHTML'] = replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyVue');\n // Render icon\n return h('svg', componentProps);\n }\n // Render <span> with style\n const { body, width, height } = icon;\n const useMask = mode === 'mask' ||\n (mode === 'bg' ? false : body.indexOf('currentColor') !== -1);\n // Generate SVG\n const html = iconToHTML(body, {\n ...renderAttribs,\n width: width + '',\n height: height + '',\n });\n // Generate style\n componentProps.style = {\n ...style,\n '--svg': svgToURL(html),\n 'width': fixSize(renderAttribs.width),\n 'height': fixSize(renderAttribs.height),\n ...commonProps,\n ...(useMask ? monotoneProps : coloredProps),\n ...customStyle,\n };\n return h('span', componentProps);\n};\n\n/**\n * Storage for icons referred by name\n */\nconst storage = Object.create(null);\n/**\n * Add icon to storage, allowing to call it by name\n *\n * @param name\n * @param data\n */\nfunction addIcon(name, data) {\n storage[name] = data;\n}\n/**\n * Add collection to storage, allowing to call icons by name\n *\n * @param data Icon set\n * @param prefix Optional prefix to add to icon names, true (default) if prefix from icon set should be used.\n */\nfunction addCollection(data, prefix) {\n const iconPrefix = typeof prefix === 'string'\n ? prefix\n : prefix !== false && typeof data.prefix === 'string'\n ? data.prefix + ':'\n : '';\n quicklyValidateIconSet(data) &&\n parseIconSet(data, (name, icon) => {\n if (icon) {\n storage[iconPrefix + name] = icon;\n }\n });\n}\n/**\n * Component\n */\nconst Icon = defineComponent({\n // Do not inherit other attributes: it is handled by render()\n inheritAttrs: false,\n // Render icon\n render() {\n const props = this.$attrs;\n // Check icon\n const propsIcon = props.icon;\n const icon = typeof propsIcon === 'string'\n ? storage[propsIcon]\n : typeof propsIcon === 'object'\n ? propsIcon\n : null;\n // Validate icon object\n if (icon === null ||\n typeof icon !== 'object' ||\n typeof icon.body !== 'string') {\n return this.$slots.default ? this.$slots.default() : null;\n }\n // Valid icon: render it\n return render({\n ...defaultIconProps,\n ...icon,\n }, props);\n },\n});\n\nexport { Icon, addCollection, addIcon };\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"body\": \"<path fill=\\\"currentColor\\\" d=\\\"M384 192v640l384-320.064z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","import { Plugin, App } from \"vue\";\r\n\r\nexport * from \"./comp.d\";\r\nexport * from \"./components\";\r\n\r\nimport RecursionDeviceGroup from \"/@/components/recursion-device-group/index.vue\";\r\n\r\nconst components = {\r\n RecursionDeviceGroup,\r\n};\r\n\r\nconst _default: Plugin = {\r\n install(app: App) {\r\n for (const itemKey in components) {\r\n const item = components[itemKey as keyof typeof components];\r\n app.component(itemKey, item);\r\n }\r\n },\r\n};\r\n\r\nexport default _default;\r\n"],"names":["RecursionDeviceGroup","Test","CreateDevice","count","deviceList","i","CreateGroup","RandomDeviceGroup","ForeachDeviceGroup","deviceGroup","handleDeviceGroup","Utils","AccessSession","session","groupMap","deviceMap","id","_sfc_main$2","defineComponent","props","ForeachICountInfo","handle","countInfo","countItem","item","onlineCount","computed","_openBlock","_createElementBlock","_hoisted_1","_renderSlot","_ctx","defaultIconDimensions","defaultIconTransformations","defaultIconProps","defaultIconSizeCustomisations","defaultIconCustomisations","mergeCustomisations","defaults","result","key","value","valueType","separator","flipFromString","custom","flip","str","rotateFromString","defaultValue","units","cleanup","value2","num","split","unitsSplit","unitsTest","calculateSize","size","ratio","precision","oldParts","newParts","code","isNumber","iconToSVG","icon","customisations","fullIcon","fullCustomisations","box","body","transformations","hFlip","vFlip","rotation","tempValue","customisationsWidth","customisationsHeight","boxWidth","boxHeight","width","height","regex","randomPrefix","counter","replaceIDs","prefix","ids","match","newID","escapedID","iconToHTML","attributes","renderAttribsHTML","attr","encodeSVGforURL","svg","svgToURL","defaultExtendedIconCustomisations","svgDefaults","commonProps","monotoneProps","coloredProps","propsToAdd","propsToAddTo","list","prop","customisationAliases","fixSize","render","componentProps","mode","style","propsStyle","customStyle","alias","renderAttribs","localCounter","h","useMask","html","storage","addIcon","name","data","Icon","propsIcon","_sfc_main$1","CountShow","FilterDevice","devices","_a","showGroup","strSearch","_b","showDevice","device","bShow","ref","_hoisted_4","_component_group_show","_resolveComponent","_createVNode","_component_CountShow","_withCtx","_component_Icon","_cache","$event","_a2","_toDisplayString","_b2","_hoisted_2","_createElementVNode","_hoisted_3","_Fragment","_renderList","group","index","_createBlock","group2","_withDirectives","_hoisted_5","_hoisted_6","right","avatar","_sfc_main","GroupShow","controlParams","_withScopeId","n","_pushScopeId","_popScopeId","args","itemGroup","components","_default","app","itemKey"],"mappings":"mIAAiBA,QAAA,qBAAA,QAAAA,GAAV,EA6CYC,GAAV,CAEL,SAASC,EAAaC,EAAkC,CACtD,MAAMC,EAAgC,CAAA,EACtC,QAASC,EAAI,EAAGA,EAAIF,EAAOE,IACzBD,EAAW,KAAK,CACd,GAAI,SACJ,IAAK,GACL,KAAM,UAAUC,IAChB,OAAQA,EAAI,GAAK,EACjB,SAAU,CAAC,CAAA,CACZ,EAEI,OAAAD,CACT,CAEA,SAASE,EAAYH,EAAe,CAClC,MAAMC,EAAiC,C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A,+CAMD6H,GAAA,CAAA,MAAA,CAAA,OAAA,OAAA,cAAA,MAAA,6VAHED,EAAA,mBAAA,MAAAD,GAAA,CAFYC,EAAA,mBAAA,MAAAC,GAAA,CACqDd,GAAzCa,EAAAA,mBAAA,QAAA,CAAA,KAAA,OAAsB,SAAAN,EAAA,KAAAA,EAAA,GAAA,IAAA0B,IAAA9I,EAAA,gBAAAA,EAAA,eAAA,GAAA8I,CAAA,kCAKxC,CAAA,6CAF+E,QAAA5B,EAAA,QAAA,IAAA,CAAjEQ,EAAAA,mBAAA,QAAA,CAAgB,KAAA,WAAM,GAAA,aAAe,MAAA,uFACpB,EAAA,KAAA,EAAA,4BAazC,CAAA,kCADW9H,EAAA,UAAA,EAAA,EAAAC,EAAA,mBAAA+H,EAAA,SAAA,KAAAC,EAAA,YAAAxB,EAAArG,EAAA,cAAA,KAAA,OAAAqG,EAAA,MAAA,CAAA0C,EAAAhB,oCARwF,cAAA/H,EAAA,cACnF,IAAA+H,eACE,EAAA,+BAGLhI,aAAAC,EAAA,OAAA,QAAA,CAAA,MAAA8H,GAAA,OAAA,EAAA,CAAe,CAAA,+MCXpCkB,EAAa,CACjB,qBAAA/K,EACF,EAEMgL,GAAmB,CACvB,QAAQC,EAAU,CAChB,UAAWC,KAAWH,EAAY,CAChC,MAAMvJ,EAAOuJ,EAAWG,GACpBD,EAAA,UAAUC,EAAS1J,CAAI,CAC7B,CACF,CACF"}
|
|
1
|
+
{"version":3,"file":"smarteye-e-components.js","sources":["../src/components/recursion-device-group/model/index.ts","../src/components-global/count-show/index.vue","../src/components-global/count-show/index.vue","../node_modules/.pnpm/@iconify+vue@4.0.0_vue@3.2.39/node_modules/@iconify/vue/dist/offline.mjs","../src/components-global/group-show/index.vue","../src/components-global/group-show/index.vue","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/caret-right.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/folder-opened.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/avatar.js","../src/components/recursion-device-group/index.vue","../src/components/recursion-device-group/index.vue","../src/index.ts"],"sourcesContent":["export namespace RecursionDeviceGroup {\r\n export interface IChannelInfo {\r\n index: number;\r\n name: string;\r\n }\r\n\r\n export interface DeviceInfo<T = any> {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n online: boolean;\r\n channels: Array<IChannelInfo>;\r\n tag?: T;\r\n }\r\n\r\n export interface DeviceGroup<T = any, DT = any> extends ICountInfo {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n devices: Array<DeviceInfo<DT>>;\r\n items: Array<DeviceGroup<T, DT>>;\r\n tag?: T;\r\n }\r\n\r\n export interface SessionDeviceGroup<\r\n GroupTag = any,\r\n DeviceTag = any,\r\n SessionTag = any\r\n > extends ICountInfo {\r\n name: string;\r\n items: Array<DeviceGroup>;\r\n tag?: SessionTag;\r\n }\r\n\r\n export interface ICountInfo {\r\n totalCount: number;\r\n onlineCount: number;\r\n items: Array<ICountInfo>;\r\n }\r\n\r\n export interface IControlParams {\r\n onlyShowOnline: boolean;\r\n searchStr: string;\r\n }\r\n\r\n export namespace Test {\r\n let startIndex = 0;\r\n function CreateDevice(count: number): Array<DeviceInfo> {\r\n const deviceList: Array<DeviceInfo> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: \"testId\",\r\n pid: \"\",\r\n name: `device-${i}`,\r\n online: i % 2 == 0,\r\n channels: [],\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n function CreateGroup(count: number) {\r\n const deviceList: Array<DeviceGroup> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: `groupid-${i}`,\r\n name: `group-${i}`,\r\n pid: \"\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n devices: CreateDevice(10),\r\n items: CreateGroup(count - i - 1),\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n export function RandomDeviceGroup(count: number): SessionDeviceGroup {\r\n return {\r\n name: \"hah\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n items: CreateGroup(count),\r\n };\r\n }\r\n }\r\n\r\n function ForeachDeviceGroup(\r\n deviceGroup: DeviceGroup[],\r\n handleDeviceGroup: (deviceGroup: DeviceGroup) => void\r\n ) {\r\n for (let i = 0; i < deviceGroup.length; i++) {\r\n handleDeviceGroup(deviceGroup[i]);\r\n ForeachDeviceGroup(deviceGroup[i].items, handleDeviceGroup);\r\n }\r\n }\r\n\r\n export namespace Utils {\r\n export function AccessSession(session: SessionDeviceGroup) {\r\n const groupMap: { [k in string]: DeviceGroup } = {};\r\n const deviceMap: { [k in string]: DeviceInfo } = {};\r\n\r\n ForeachDeviceGroup(session.items, (deviceGroup) => {\r\n groupMap[deviceGroup.id] = deviceGroup;\r\n for (let i = 0; i < deviceGroup.devices.length; i++) {\r\n deviceMap[deviceGroup.devices[i].id] = deviceGroup.devices[i];\r\n }\r\n });\r\n\r\n return {\r\n getGroup(id: string) {\r\n return groupMap[id];\r\n },\r\n getDevice(id: string) {\r\n return deviceMap[id];\r\n },\r\n foreachGroup(handle: (item: DeviceGroup) => void) {\r\n for (let i in groupMap) {\r\n handle(groupMap[i]);\r\n }\r\n },\r\n };\r\n }\r\n }\r\n}\r\n","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","import { h, defineComponent } from 'vue';\n\nconst defaultIconDimensions = Object.freeze(\n {\n left: 0,\n top: 0,\n width: 16,\n height: 16\n }\n);\nconst defaultIconTransformations = Object.freeze({\n rotate: 0,\n vFlip: false,\n hFlip: false\n});\nconst defaultIconProps = Object.freeze({\n ...defaultIconDimensions,\n ...defaultIconTransformations\n});\nconst defaultExtendedIconProps = Object.freeze({\n ...defaultIconProps,\n body: \"\",\n hidden: false\n});\n\nfunction mergeIconTransformations(obj1, obj2) {\n const result = {};\n if (!obj1.hFlip !== !obj2.hFlip) {\n result.hFlip = true;\n }\n if (!obj1.vFlip !== !obj2.vFlip) {\n result.vFlip = true;\n }\n const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;\n if (rotate) {\n result.rotate = rotate;\n }\n return result;\n}\n\nfunction mergeIconData(parent, child) {\n const result = mergeIconTransformations(parent, child);\n for (const key in defaultExtendedIconProps) {\n if (key in defaultIconTransformations) {\n if (key in parent && !(key in result)) {\n result[key] = defaultIconTransformations[key];\n }\n } else if (key in child) {\n result[key] = child[key];\n } else if (key in parent) {\n result[key] = parent[key];\n }\n }\n return result;\n}\n\nfunction getIconsTree(data, names) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n const resolved = /* @__PURE__ */ Object.create(null);\n function resolve(name) {\n if (icons[name]) {\n return resolved[name] = [];\n }\n if (!(name in resolved)) {\n resolved[name] = null;\n const parent = aliases[name] && aliases[name].parent;\n const value = parent && resolve(parent);\n if (value) {\n resolved[name] = [parent].concat(value);\n }\n }\n return resolved[name];\n }\n (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);\n return resolved;\n}\n\nfunction internalGetIconData(data, name, tree) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n let currentProps = {};\n function parse(name2) {\n currentProps = mergeIconData(\n icons[name2] || aliases[name2],\n currentProps\n );\n }\n parse(name);\n tree.forEach(parse);\n return mergeIconData(data, currentProps);\n}\n\nfunction parseIconSet(data, callback) {\n const names = [];\n if (typeof data !== \"object\" || typeof data.icons !== \"object\") {\n return names;\n }\n if (data.not_found instanceof Array) {\n data.not_found.forEach((name) => {\n callback(name, null);\n names.push(name);\n });\n }\n const tree = getIconsTree(data);\n for (const name in tree) {\n const item = tree[name];\n if (item) {\n callback(name, internalGetIconData(data, name, item));\n names.push(name);\n }\n }\n return names;\n}\n\nconst matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\nconst optionalPropertyDefaults = {\n provider: \"\",\n aliases: {},\n not_found: {},\n ...defaultIconDimensions\n};\nfunction checkOptionalProps(item, defaults) {\n for (const prop in defaults) {\n if (prop in item && typeof item[prop] !== typeof defaults[prop]) {\n return false;\n }\n }\n return true;\n}\nfunction quicklyValidateIconSet(obj) {\n if (typeof obj !== \"object\" || obj === null) {\n return null;\n }\n const data = obj;\n if (typeof data.prefix !== \"string\" || !obj.icons || typeof obj.icons !== \"object\") {\n return null;\n }\n if (!checkOptionalProps(obj, optionalPropertyDefaults)) {\n return null;\n }\n const icons = data.icons;\n for (const name in icons) {\n const icon = icons[name];\n if (!name.match(matchIconName) || typeof icon.body !== \"string\" || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n const aliases = data.aliases || {};\n for (const name in aliases) {\n const icon = aliases[name];\n const parent = icon.parent;\n if (!name.match(matchIconName) || typeof parent !== \"string\" || !icons[parent] && !aliases[parent] || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n return data;\n}\n\nconst defaultIconSizeCustomisations = Object.freeze({\n width: null,\n height: null\n});\nconst defaultIconCustomisations = Object.freeze({\n ...defaultIconSizeCustomisations,\n ...defaultIconTransformations\n});\n\nfunction mergeCustomisations(defaults, item) {\n const result = {\n ...defaults\n };\n for (const key in item) {\n const value = item[key];\n const valueType = typeof value;\n if (key in defaultIconSizeCustomisations) {\n if (value === null || value && (valueType === \"string\" || valueType === \"number\")) {\n result[key] = value;\n }\n } else if (valueType === typeof result[key]) {\n result[key] = key === \"rotate\" ? value % 4 : value;\n }\n }\n return result;\n}\n\nconst separator = /[\\s,]+/;\nfunction flipFromString(custom, flip) {\n flip.split(separator).forEach((str) => {\n const value = str.trim();\n switch (value) {\n case \"horizontal\":\n custom.hFlip = true;\n break;\n case \"vertical\":\n custom.vFlip = true;\n break;\n }\n });\n}\n\nfunction rotateFromString(value, defaultValue = 0) {\n const units = value.replace(/^-?[0-9.]*/, \"\");\n function cleanup(value2) {\n while (value2 < 0) {\n value2 += 4;\n }\n return value2 % 4;\n }\n if (units === \"\") {\n const num = parseInt(value);\n return isNaN(num) ? 0 : cleanup(num);\n } else if (units !== value) {\n let split = 0;\n switch (units) {\n case \"%\":\n split = 25;\n break;\n case \"deg\":\n split = 90;\n }\n if (split) {\n let num = parseFloat(value.slice(0, value.length - units.length));\n if (isNaN(num)) {\n return 0;\n }\n num = num / split;\n return num % 1 === 0 ? cleanup(num) : 0;\n }\n }\n return defaultValue;\n}\n\nconst unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nconst unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\nfunction calculateSize(size, ratio, precision) {\n if (ratio === 1) {\n return size;\n }\n precision = precision || 100;\n if (typeof size === \"number\") {\n return Math.ceil(size * ratio * precision) / precision;\n }\n if (typeof size !== \"string\") {\n return size;\n }\n const oldParts = size.split(unitsSplit);\n if (oldParts === null || !oldParts.length) {\n return size;\n }\n const newParts = [];\n let code = oldParts.shift();\n let isNumber = unitsTest.test(code);\n while (true) {\n if (isNumber) {\n const num = parseFloat(code);\n if (isNaN(num)) {\n newParts.push(code);\n } else {\n newParts.push(Math.ceil(num * ratio * precision) / precision);\n }\n } else {\n newParts.push(code);\n }\n code = oldParts.shift();\n if (code === void 0) {\n return newParts.join(\"\");\n }\n isNumber = !isNumber;\n }\n}\n\nfunction iconToSVG(icon, customisations) {\n const fullIcon = {\n ...defaultIconProps,\n ...icon\n };\n const fullCustomisations = {\n ...defaultIconCustomisations,\n ...customisations\n };\n const box = {\n left: fullIcon.left,\n top: fullIcon.top,\n width: fullIcon.width,\n height: fullIcon.height\n };\n let body = fullIcon.body;\n [fullIcon, fullCustomisations].forEach((props) => {\n const transformations = [];\n const hFlip = props.hFlip;\n const vFlip = props.vFlip;\n let rotation = props.rotate;\n if (hFlip) {\n if (vFlip) {\n rotation += 2;\n } else {\n transformations.push(\n \"translate(\" + (box.width + box.left).toString() + \" \" + (0 - box.top).toString() + \")\"\n );\n transformations.push(\"scale(-1 1)\");\n box.top = box.left = 0;\n }\n } else if (vFlip) {\n transformations.push(\n \"translate(\" + (0 - box.left).toString() + \" \" + (box.height + box.top).toString() + \")\"\n );\n transformations.push(\"scale(1 -1)\");\n box.top = box.left = 0;\n }\n let tempValue;\n if (rotation < 0) {\n rotation -= Math.floor(rotation / 4) * 4;\n }\n rotation = rotation % 4;\n switch (rotation) {\n case 1:\n tempValue = box.height / 2 + box.top;\n transformations.unshift(\n \"rotate(90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n case 2:\n transformations.unshift(\n \"rotate(180 \" + (box.width / 2 + box.left).toString() + \" \" + (box.height / 2 + box.top).toString() + \")\"\n );\n break;\n case 3:\n tempValue = box.width / 2 + box.left;\n transformations.unshift(\n \"rotate(-90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n }\n if (rotation % 2 === 1) {\n if (box.left !== box.top) {\n tempValue = box.left;\n box.left = box.top;\n box.top = tempValue;\n }\n if (box.width !== box.height) {\n tempValue = box.width;\n box.width = box.height;\n box.height = tempValue;\n }\n }\n if (transformations.length) {\n body = '<g transform=\"' + transformations.join(\" \") + '\">' + body + \"</g>\";\n }\n });\n const customisationsWidth = fullCustomisations.width;\n const customisationsHeight = fullCustomisations.height;\n const boxWidth = box.width;\n const boxHeight = box.height;\n let width;\n let height;\n if (customisationsWidth === null) {\n height = customisationsHeight === null ? \"1em\" : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n width = calculateSize(height, boxWidth / boxHeight);\n } else {\n width = customisationsWidth === \"auto\" ? boxWidth : customisationsWidth;\n height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n }\n const result = {\n attributes: {\n width: width.toString(),\n height: height.toString(),\n viewBox: box.left.toString() + \" \" + box.top.toString() + \" \" + boxWidth.toString() + \" \" + boxHeight.toString()\n },\n body\n };\n return result;\n}\n\nconst regex = /\\sid=\"(\\S+)\"/g;\nconst randomPrefix = \"IconifyId\" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);\nlet counter = 0;\nfunction replaceIDs(body, prefix = randomPrefix) {\n const ids = [];\n let match;\n while (match = regex.exec(body)) {\n ids.push(match[1]);\n }\n if (!ids.length) {\n return body;\n }\n ids.forEach((id) => {\n const newID = typeof prefix === \"function\" ? prefix(id) : prefix + (counter++).toString();\n const escapedID = id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n body = body.replace(\n new RegExp('([#;\"])(' + escapedID + ')([\")]|\\\\.[a-z])', \"g\"),\n \"$1\" + newID + \"$3\"\n );\n });\n return body;\n}\n\nfunction iconToHTML(body, attributes) {\n let renderAttribsHTML = body.indexOf(\"xlink:\") === -1 ? \"\" : ' xmlns:xlink=\"http://www.w3.org/1999/xlink\"';\n for (const attr in attributes) {\n renderAttribsHTML += \" \" + attr + '=\"' + attributes[attr] + '\"';\n }\n return '<svg xmlns=\"http://www.w3.org/2000/svg\"' + renderAttribsHTML + \">\" + body + \"</svg>\";\n}\n\nfunction encodeSVGforURL(svg) {\n return svg.replace(/\"/g, \"'\").replace(/%/g, \"%25\").replace(/#/g, \"%23\").replace(/</g, \"%3C\").replace(/>/g, \"%3E\").replace(/\\s+/g, \" \");\n}\nfunction svgToURL(svg) {\n return 'url(\"data:image/svg+xml,' + encodeSVGforURL(svg) + '\")';\n}\n\nconst defaultExtendedIconCustomisations = {\n ...defaultIconCustomisations,\n inline: false,\n};\n\n/**\n * Default SVG attributes\n */\nconst svgDefaults = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n 'aria-hidden': true,\n 'role': 'img',\n};\n/**\n * Style modes\n */\nconst commonProps = {\n display: 'inline-block',\n};\nconst monotoneProps = {\n backgroundColor: 'currentColor',\n};\nconst coloredProps = {\n backgroundColor: 'transparent',\n};\n// Dynamically add common props to variables above\nconst propsToAdd = {\n Image: 'var(--svg)',\n Repeat: 'no-repeat',\n Size: '100% 100%',\n};\nconst propsToAddTo = {\n webkitMask: monotoneProps,\n mask: monotoneProps,\n background: coloredProps,\n};\nfor (const prefix in propsToAddTo) {\n const list = propsToAddTo[prefix];\n for (const prop in propsToAdd) {\n list[prefix + prop] = propsToAdd[prop];\n }\n}\n/**\n * Aliases for customisations.\n * In Vue 'v-' properties are reserved, so v-flip must be renamed\n */\nconst customisationAliases = {};\n['horizontal', 'vertical'].forEach((prefix) => {\n const attr = prefix.slice(0, 1) + 'Flip';\n // vertical-flip\n customisationAliases[prefix + '-flip'] = attr;\n // v-flip\n customisationAliases[prefix.slice(0, 1) + '-flip'] = attr;\n // verticalFlip\n customisationAliases[prefix + 'Flip'] = attr;\n});\n/**\n * Fix size: add 'px' to numbers\n */\nfunction fixSize(value) {\n return value + (value.match(/^[-0-9.]+$/) ? 'px' : '');\n}\n/**\n * Render icon\n */\nconst render = (\n// Icon must be validated before calling this function\nicon, \n// Partial properties\nprops) => {\n // Split properties\n const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);\n const componentProps = { ...svgDefaults };\n // Check mode\n const mode = props.mode || 'svg';\n // Copy style\n const style = {};\n const propsStyle = props.style;\n const customStyle = typeof propsStyle === 'object' && !(propsStyle instanceof Array)\n ? propsStyle\n : {};\n // Get element properties\n for (let key in props) {\n const value = props[key];\n if (value === void 0) {\n continue;\n }\n switch (key) {\n // Properties to ignore\n case 'icon':\n case 'style':\n case 'onLoad':\n case 'mode':\n break;\n // Boolean attributes\n case 'inline':\n case 'hFlip':\n case 'vFlip':\n customisations[key] =\n value === true || value === 'true' || value === 1;\n break;\n // Flip as string: 'horizontal,vertical'\n case 'flip':\n if (typeof value === 'string') {\n flipFromString(customisations, value);\n }\n break;\n // Color: override style\n case 'color':\n style.color = value;\n break;\n // Rotation as string\n case 'rotate':\n if (typeof value === 'string') {\n customisations[key] = rotateFromString(value);\n }\n else if (typeof value === 'number') {\n customisations[key] = value;\n }\n break;\n // Remove aria-hidden\n case 'ariaHidden':\n case 'aria-hidden':\n // Vue transforms 'aria-hidden' property to 'ariaHidden'\n if (value !== true && value !== 'true') {\n delete componentProps['aria-hidden'];\n }\n break;\n default: {\n const alias = customisationAliases[key];\n if (alias) {\n // Aliases for boolean customisations\n if (value === true || value === 'true' || value === 1) {\n customisations[alias] = true;\n }\n }\n else if (defaultExtendedIconCustomisations[key] === void 0) {\n // Copy missing property if it does not exist in customisations\n componentProps[key] = value;\n }\n }\n }\n }\n // Generate icon\n const item = iconToSVG(icon, customisations);\n const renderAttribs = item.attributes;\n // Inline display\n if (customisations.inline) {\n style.verticalAlign = '-0.125em';\n }\n if (mode === 'svg') {\n // Add style\n componentProps.style = {\n ...style,\n ...customStyle,\n };\n // Add icon stuff\n Object.assign(componentProps, renderAttribs);\n // Counter for ids based on \"id\" property to render icons consistently on server and client\n let localCounter = 0;\n let id = props.id;\n if (typeof id === 'string') {\n // Convert '-' to '_' to avoid errors in animations\n id = id.replace(/-/g, '_');\n }\n // Add innerHTML and style to props\n componentProps['innerHTML'] = replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyVue');\n // Render icon\n return h('svg', componentProps);\n }\n // Render <span> with style\n const { body, width, height } = icon;\n const useMask = mode === 'mask' ||\n (mode === 'bg' ? false : body.indexOf('currentColor') !== -1);\n // Generate SVG\n const html = iconToHTML(body, {\n ...renderAttribs,\n width: width + '',\n height: height + '',\n });\n // Generate style\n componentProps.style = {\n ...style,\n '--svg': svgToURL(html),\n 'width': fixSize(renderAttribs.width),\n 'height': fixSize(renderAttribs.height),\n ...commonProps,\n ...(useMask ? monotoneProps : coloredProps),\n ...customStyle,\n };\n return h('span', componentProps);\n};\n\n/**\n * Storage for icons referred by name\n */\nconst storage = Object.create(null);\n/**\n * Add icon to storage, allowing to call it by name\n *\n * @param name\n * @param data\n */\nfunction addIcon(name, data) {\n storage[name] = data;\n}\n/**\n * Add collection to storage, allowing to call icons by name\n *\n * @param data Icon set\n * @param prefix Optional prefix to add to icon names, true (default) if prefix from icon set should be used.\n */\nfunction addCollection(data, prefix) {\n const iconPrefix = typeof prefix === 'string'\n ? prefix\n : prefix !== false && typeof data.prefix === 'string'\n ? data.prefix + ':'\n : '';\n quicklyValidateIconSet(data) &&\n parseIconSet(data, (name, icon) => {\n if (icon) {\n storage[iconPrefix + name] = icon;\n }\n });\n}\n/**\n * Component\n */\nconst Icon = defineComponent({\n // Do not inherit other attributes: it is handled by render()\n inheritAttrs: false,\n // Render icon\n render() {\n const props = this.$attrs;\n // Check icon\n const propsIcon = props.icon;\n const icon = typeof propsIcon === 'string'\n ? storage[propsIcon]\n : typeof propsIcon === 'object'\n ? propsIcon\n : null;\n // Validate icon object\n if (icon === null ||\n typeof icon !== 'object' ||\n typeof icon.body !== 'string') {\n return this.$slots.default ? this.$slots.default() : null;\n }\n // Valid icon: render it\n return render({\n ...defaultIconProps,\n ...icon,\n }, props);\n },\n});\n\nexport { Icon, addCollection, addIcon };\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"body\": \"<path fill=\\\"currentColor\\\" d=\\\"M384 192v640l384-320.064z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","import { Plugin, App } from \"vue\";\r\n\r\nexport * from \"./comp.d\";\r\nexport * from \"./components\";\r\n\r\nimport RecursionDeviceGroup from \"/@/components/recursion-device-group/index.vue\";\r\n\r\nconst components = {\r\n RecursionDeviceGroup,\r\n};\r\n\r\nconst _default: Plugin = {\r\n install(app: App) {\r\n for (const itemKey in components) {\r\n const item = components[itemKey as keyof typeof components];\r\n app.component(itemKey, item);\r\n }\r\n },\r\n};\r\n\r\nexport default _default;\r\n"],"names":["RecursionDeviceGroup","Test","CreateDevice","count","deviceList","i","CreateGroup","RandomDeviceGroup","ForeachDeviceGroup","deviceGroup","handleDeviceGroup","Utils","AccessSession","session","groupMap","deviceMap","id","handle","_sfc_main$2","defineComponent","props","ForeachICountInfo","countInfo","countItem","item","onlineCount","computed","_openBlock","_createElementBlock","_hoisted_1","_renderSlot","_ctx","defaultIconDimensions","defaultIconTransformations","defaultIconProps","defaultIconSizeCustomisations","defaultIconCustomisations","mergeCustomisations","defaults","result","key","value","valueType","separator","flipFromString","custom","flip","str","rotateFromString","defaultValue","units","cleanup","value2","num","split","unitsSplit","unitsTest","calculateSize","size","ratio","precision","oldParts","newParts","code","isNumber","iconToSVG","icon","customisations","fullIcon","fullCustomisations","box","body","transformations","hFlip","vFlip","rotation","tempValue","customisationsWidth","customisationsHeight","boxWidth","boxHeight","width","height","regex","randomPrefix","counter","replaceIDs","prefix","ids","match","newID","escapedID","iconToHTML","attributes","renderAttribsHTML","attr","encodeSVGforURL","svg","svgToURL","defaultExtendedIconCustomisations","svgDefaults","commonProps","monotoneProps","coloredProps","propsToAdd","propsToAddTo","list","prop","customisationAliases","fixSize","render","componentProps","mode","style","propsStyle","customStyle","alias","renderAttribs","localCounter","h","useMask","html","storage","addIcon","name","data","Icon","propsIcon","_sfc_main$1","CountShow","FilterDevice","devices","_a","showGroup","strSearch","_b","showDevice","device","bShow","ref","_hoisted_4","_component_group_show","_resolveComponent","_createVNode","_component_CountShow","_withCtx","_component_Icon","_cache","$event","_a2","_toDisplayString","_b2","_hoisted_2","_createElementVNode","_hoisted_3","_Fragment","_renderList","group","index","_createBlock","group2","_withDirectives","_hoisted_5","_hoisted_6","right","avatar","_sfc_main","GroupShow","controlParams","_withScopeId","n","_pushScopeId","_popScopeId","args","itemGroup","components","_default","app","itemKey"],"mappings":"mIAAiBA,QAAA,qBAAA,QAAAA,GAAV,EA6CYC,GAAV,CAEL,SAASC,EAAaC,EAAkC,CACtD,MAAMC,EAAgC,CAAA,EACtC,QAASC,EAAI,EAAGA,EAAIF,EAAOE,IACzBD,EAAW,KAAK,CACd,GAAI,SACJ,IAAK,GACL,KAAM,UAAUC,IAChB,OAAQA,EAAI,GAAK,EACjB,SAAU,CAAC,CAAA,CACZ,EAEI,OAAAD,CACT,CAEA,SAASE,EAAYH,EAAe,CAClC,MAAMC,EAAiC,CAAA,EACvC,QAASC,EAAI,EAAGA,EAAIF,EAAOE,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6B,CACA,CACJ,CAER,CAAA,ECrEa,MAAAC,EAAAC,IAAAC,EAAA,YAAA,iBAAA,EAAAD,EAAAA,IAAAE,EAAAA,aAAAF,GACI7I,GAAA,CAAA,MAAA,+CAMD6H,GAAA,CAAA,MAAA,CAAA,OAAA,OAAA,cAAA,MAAA,6VAHED,EAAA,mBAAA,MAAAD,GAAA,CAFYC,EAAA,mBAAA,MAAAC,GAAA,CACqDd,GAAzCa,EAAAA,mBAAA,QAAA,CAAA,KAAA,OAAsB,SAAAN,EAAA,KAAAA,EAAA,GAAA,IAAA0B,IAAA9I,EAAA,gBAAAA,EAAA,eAAA,GAAA8I,CAAA,kCAKxC,CAAA,6CAF+E,QAAA5B,EAAA,QAAA,IAAA,CAAjEQ,EAAAA,mBAAA,QAAA,CAAgB,KAAA,WAAM,GAAA,aAAe,MAAA,uFACpB,EAAA,KAAA,EAAA,4BAazC,CAAA,kCADW9H,EAAA,UAAA,EAAA,EAAAC,EAAA,mBAAA+H,EAAA,SAAA,KAAAC,EAAA,YAAAxB,EAAArG,EAAA,cAAA,KAAA,OAAAqG,EAAA,MAAA,CAAA0C,EAAAhB,oCARwF,cAAA/H,EAAA,cACnF,IAAA+H,eACE,EAAA,iFAGiB,CAAA,EACR,OAAAb,EAAAA,QAAA,CAAA,CAAA,OAAAR,EAAA,MAAAoB,CAAA,IAAA,CAAc/H,aAAAC,EAAA,OAAA,SAAA,CAAe,OAAA0G,8ICZhEsC,EAAa,CACjB,qBAAA/K,EACF,EAEMgL,GAAmB,CACvB,QAAQC,EAAU,CAChB,UAAWC,KAAWH,EAAY,CAChC,MAAMvJ,EAAOuJ,EAAWG,GACpBD,EAAA,UAAUC,EAAS1J,CAAI,CAC7B,CACF,CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, computed as
|
|
1
|
+
import { defineComponent as F, computed as G, openBlock as S, createElementBlock as b, renderSlot as y, createElementVNode as p, toDisplayString as P, h as E, ref as O, 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
2
|
var H;
|
|
3
3
|
((t) => {
|
|
4
4
|
((o) => {
|
|
@@ -55,6 +55,10 @@ var H;
|
|
|
55
55
|
},
|
|
56
56
|
getDevice(i) {
|
|
57
57
|
return c[i];
|
|
58
|
+
},
|
|
59
|
+
foreachGroup(i) {
|
|
60
|
+
for (let l in r)
|
|
61
|
+
i(r[l]);
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
64
|
}
|
|
@@ -75,26 +79,26 @@ const it = F({
|
|
|
75
79
|
}
|
|
76
80
|
return 0;
|
|
77
81
|
}
|
|
78
|
-
const o =
|
|
82
|
+
const o = G(() => n((e) => e.onlineCount, t.countInfo));
|
|
79
83
|
return {
|
|
80
|
-
totalCount:
|
|
84
|
+
totalCount: G(() => n((e) => e.totalCount, t.countInfo)),
|
|
81
85
|
onlineCount: o
|
|
82
86
|
};
|
|
83
87
|
}
|
|
84
88
|
});
|
|
85
|
-
const
|
|
89
|
+
const x = (t, n) => {
|
|
86
90
|
const o = t.__vccOpts || t;
|
|
87
91
|
for (const [s, e] of n)
|
|
88
92
|
o[s] = e;
|
|
89
93
|
return o;
|
|
90
94
|
}, ct = { class: "root" }, lt = { class: "count-show" };
|
|
91
95
|
function at(t, n, o, s, e, r) {
|
|
92
|
-
return
|
|
96
|
+
return S(), b("div", ct, [
|
|
93
97
|
y(t.$slots, "default", {}, void 0, !0),
|
|
94
|
-
|
|
98
|
+
p("span", lt, P(t.onlineCount) + "/" + P(t.totalCount), 1)
|
|
95
99
|
]);
|
|
96
100
|
}
|
|
97
|
-
const K = /* @__PURE__ */
|
|
101
|
+
const K = /* @__PURE__ */ x(it, [["render", at], ["__scopeId", "data-v-702e833c"]]), q = Object.freeze(
|
|
98
102
|
{
|
|
99
103
|
left: 0,
|
|
100
104
|
top: 0,
|
|
@@ -211,39 +215,39 @@ function vt(t, n) {
|
|
|
211
215
|
height: o.height
|
|
212
216
|
};
|
|
213
217
|
let r = o.body;
|
|
214
|
-
[o, s].forEach((
|
|
215
|
-
const
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
+
[o, s].forEach((_) => {
|
|
219
|
+
const d = [], f = _.hFlip, a = _.vFlip;
|
|
220
|
+
let m = _.rotate;
|
|
221
|
+
f ? a ? m += 2 : (d.push(
|
|
218
222
|
"translate(" + (e.width + e.left).toString() + " " + (0 - e.top).toString() + ")"
|
|
219
|
-
),
|
|
223
|
+
), d.push("scale(-1 1)"), e.top = e.left = 0) : a && (d.push(
|
|
220
224
|
"translate(" + (0 - e.left).toString() + " " + (e.height + e.top).toString() + ")"
|
|
221
|
-
),
|
|
222
|
-
let
|
|
223
|
-
switch (
|
|
225
|
+
), d.push("scale(1 -1)"), e.top = e.left = 0);
|
|
226
|
+
let w;
|
|
227
|
+
switch (m < 0 && (m -= Math.floor(m / 4) * 4), m = m % 4, m) {
|
|
224
228
|
case 1:
|
|
225
|
-
|
|
226
|
-
"rotate(90 " +
|
|
229
|
+
w = e.height / 2 + e.top, d.unshift(
|
|
230
|
+
"rotate(90 " + w.toString() + " " + w.toString() + ")"
|
|
227
231
|
);
|
|
228
232
|
break;
|
|
229
233
|
case 2:
|
|
230
|
-
|
|
234
|
+
d.unshift(
|
|
231
235
|
"rotate(180 " + (e.width / 2 + e.left).toString() + " " + (e.height / 2 + e.top).toString() + ")"
|
|
232
236
|
);
|
|
233
237
|
break;
|
|
234
238
|
case 3:
|
|
235
|
-
|
|
236
|
-
"rotate(-90 " +
|
|
239
|
+
w = e.width / 2 + e.left, d.unshift(
|
|
240
|
+
"rotate(-90 " + w.toString() + " " + w.toString() + ")"
|
|
237
241
|
);
|
|
238
242
|
break;
|
|
239
243
|
}
|
|
240
|
-
|
|
244
|
+
m % 2 === 1 && (e.left !== e.top && (w = e.left, e.left = e.top, e.top = w), e.width !== e.height && (w = e.width, e.width = e.height, e.height = w)), d.length && (r = '<g transform="' + d.join(" ") + '">' + r + "</g>");
|
|
241
245
|
});
|
|
242
246
|
const c = s.width, i = s.height, l = e.width, h = e.height;
|
|
243
|
-
let
|
|
244
|
-
return c === null ? (u = i === null ? "1em" : i === "auto" ? h : i,
|
|
247
|
+
let g, u;
|
|
248
|
+
return c === null ? (u = i === null ? "1em" : i === "auto" ? h : i, g = L(u, l / h)) : (g = c === "auto" ? l : c, u = i === null ? L(g, h / l) : i === "auto" ? h : i), {
|
|
245
249
|
attributes: {
|
|
246
|
-
width:
|
|
250
|
+
width: g.toString(),
|
|
247
251
|
height: u.toString(),
|
|
248
252
|
viewBox: e.left.toString() + " " + e.top.toString() + " " + l.toString() + " " + h.toString()
|
|
249
253
|
},
|
|
@@ -287,7 +291,7 @@ const R = {
|
|
|
287
291
|
role: "img"
|
|
288
292
|
}, kt = {
|
|
289
293
|
display: "inline-block"
|
|
290
|
-
},
|
|
294
|
+
}, M = {
|
|
291
295
|
backgroundColor: "currentColor"
|
|
292
296
|
}, Y = {
|
|
293
297
|
backgroundColor: "transparent"
|
|
@@ -296,8 +300,8 @@ const R = {
|
|
|
296
300
|
Repeat: "no-repeat",
|
|
297
301
|
Size: "100% 100%"
|
|
298
302
|
}, N = {
|
|
299
|
-
webkitMask:
|
|
300
|
-
mask:
|
|
303
|
+
webkitMask: M,
|
|
304
|
+
mask: M,
|
|
301
305
|
background: Y
|
|
302
306
|
};
|
|
303
307
|
for (const t in N) {
|
|
@@ -315,10 +319,10 @@ function V(t) {
|
|
|
315
319
|
}
|
|
316
320
|
const It = (t, n) => {
|
|
317
321
|
const o = ut(R, n), s = { ...$t }, e = n.mode || "svg", r = {}, c = n.style, i = typeof c == "object" && !(c instanceof Array) ? c : {};
|
|
318
|
-
for (let
|
|
319
|
-
const a = n[
|
|
322
|
+
for (let f in n) {
|
|
323
|
+
const a = n[f];
|
|
320
324
|
if (a !== void 0)
|
|
321
|
-
switch (
|
|
325
|
+
switch (f) {
|
|
322
326
|
case "icon":
|
|
323
327
|
case "style":
|
|
324
328
|
case "onLoad":
|
|
@@ -327,7 +331,7 @@ const It = (t, n) => {
|
|
|
327
331
|
case "inline":
|
|
328
332
|
case "hFlip":
|
|
329
333
|
case "vFlip":
|
|
330
|
-
o[
|
|
334
|
+
o[f] = a === !0 || a === "true" || a === 1;
|
|
331
335
|
break;
|
|
332
336
|
case "flip":
|
|
333
337
|
typeof a == "string" && dt(o, a);
|
|
@@ -336,15 +340,15 @@ const It = (t, n) => {
|
|
|
336
340
|
r.color = a;
|
|
337
341
|
break;
|
|
338
342
|
case "rotate":
|
|
339
|
-
typeof a == "string" ? o[
|
|
343
|
+
typeof a == "string" ? o[f] = ft(a) : typeof a == "number" && (o[f] = a);
|
|
340
344
|
break;
|
|
341
345
|
case "ariaHidden":
|
|
342
346
|
case "aria-hidden":
|
|
343
347
|
a !== !0 && a !== "true" && delete s["aria-hidden"];
|
|
344
348
|
break;
|
|
345
349
|
default: {
|
|
346
|
-
const
|
|
347
|
-
|
|
350
|
+
const m = I[f];
|
|
351
|
+
m ? (a === !0 || a === "true" || a === 1) && (o[m] = !0) : R[f] === void 0 && (s[f] = a);
|
|
348
352
|
}
|
|
349
353
|
}
|
|
350
354
|
}
|
|
@@ -354,21 +358,21 @@ const It = (t, n) => {
|
|
|
354
358
|
...r,
|
|
355
359
|
...i
|
|
356
360
|
}, Object.assign(s, h);
|
|
357
|
-
let
|
|
358
|
-
return typeof a == "string" && (a = a.replace(/-/g, "_")), s.innerHTML = St(l.body, a ? () => a + "ID" +
|
|
361
|
+
let f = 0, a = n.id;
|
|
362
|
+
return typeof a == "string" && (a = a.replace(/-/g, "_")), s.innerHTML = St(l.body, a ? () => a + "ID" + f++ : "iconifyVue"), E("svg", s);
|
|
359
363
|
}
|
|
360
|
-
const { body:
|
|
364
|
+
const { body: g, width: u, height: v } = t, _ = e === "mask" || (e === "bg" ? !1 : g.indexOf("currentColor") !== -1), d = bt(g, {
|
|
361
365
|
...h,
|
|
362
366
|
width: u + "",
|
|
363
|
-
height:
|
|
367
|
+
height: v + ""
|
|
364
368
|
});
|
|
365
369
|
return s.style = {
|
|
366
370
|
...r,
|
|
367
|
-
"--svg": Ct(
|
|
371
|
+
"--svg": Ct(d),
|
|
368
372
|
width: V(h.width),
|
|
369
373
|
height: V(h.height),
|
|
370
374
|
...kt,
|
|
371
|
-
...
|
|
375
|
+
..._ ? M : Y,
|
|
372
376
|
...i
|
|
373
377
|
}, E("span", s);
|
|
374
378
|
}, Z = /* @__PURE__ */ Object.create(null);
|
|
@@ -401,7 +405,7 @@ const Pt = F({
|
|
|
401
405
|
return !((i = t.controlParams) != null && i.onlyShowOnline) || c.online;
|
|
402
406
|
}) || [];
|
|
403
407
|
}
|
|
404
|
-
const o =
|
|
408
|
+
const o = G(() => {
|
|
405
409
|
var r, c;
|
|
406
410
|
const i = t.controlParams.searchStr;
|
|
407
411
|
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);
|
|
@@ -409,7 +413,7 @@ const Pt = F({
|
|
|
409
413
|
function s(r) {
|
|
410
414
|
return t.controlParams.searchStr.length == 0 ? !0 : r.name.indexOf(t.controlParams.searchStr) > 0;
|
|
411
415
|
}
|
|
412
|
-
const e =
|
|
416
|
+
const e = O(!1);
|
|
413
417
|
return {
|
|
414
418
|
showGroup: o,
|
|
415
419
|
showDevice: s,
|
|
@@ -418,26 +422,26 @@ const Pt = F({
|
|
|
418
422
|
};
|
|
419
423
|
}
|
|
420
424
|
});
|
|
421
|
-
const
|
|
425
|
+
const Gt = {
|
|
422
426
|
key: 0,
|
|
423
427
|
class: "group"
|
|
424
|
-
},
|
|
428
|
+
}, Ot = ["title"], jt = { class: "group-slot" }, Dt = {
|
|
425
429
|
key: 0,
|
|
426
430
|
style: { "margin-left": "26px" }
|
|
427
|
-
},
|
|
431
|
+
}, Mt = ["title"], xt = { class: "device-slot" };
|
|
428
432
|
function At(t, n, o, s, e, r) {
|
|
429
433
|
var c, i;
|
|
430
|
-
const l = k("Icon"), h = k("CountShow"),
|
|
431
|
-
return t.showGroup ? (
|
|
434
|
+
const l = k("Icon"), h = k("CountShow"), g = k("group-show");
|
|
435
|
+
return t.showGroup ? (S(), b("div", Gt, [
|
|
432
436
|
$(h, { countInfo: t.deviceGroup }, {
|
|
433
437
|
default: C(() => {
|
|
434
|
-
var u,
|
|
438
|
+
var u, v;
|
|
435
439
|
return [
|
|
436
440
|
$(l, {
|
|
437
441
|
icon: "right",
|
|
438
442
|
rotate: t.bShow && "90deg",
|
|
439
443
|
width: "20",
|
|
440
|
-
onClick: n[0] || (n[0] = (
|
|
444
|
+
onClick: n[0] || (n[0] = (_) => t.bShow = !t.bShow),
|
|
441
445
|
class: "handle-ls-svg"
|
|
442
446
|
}, null, 8, ["rotate"]),
|
|
443
447
|
$(l, {
|
|
@@ -445,33 +449,36 @@ function At(t, n, o, s, e, r) {
|
|
|
445
449
|
width: "24",
|
|
446
450
|
class: "group-avatar"
|
|
447
451
|
}),
|
|
448
|
-
|
|
452
|
+
p("span", {
|
|
449
453
|
class: "group-name",
|
|
450
454
|
title: (u = t.deviceGroup) == null ? void 0 : u.name
|
|
451
|
-
}, P((
|
|
452
|
-
|
|
455
|
+
}, P((v = t.deviceGroup) == null ? void 0 : v.name), 9, Ot),
|
|
456
|
+
p("div", jt, [
|
|
453
457
|
y(t.$slots, "group", { group: t.deviceGroup }, void 0, !0)
|
|
454
458
|
])
|
|
455
459
|
];
|
|
456
460
|
}),
|
|
457
461
|
_: 3
|
|
458
462
|
}, 8, ["countInfo"]),
|
|
459
|
-
t.bShow ? (
|
|
460
|
-
(
|
|
461
|
-
key:
|
|
463
|
+
t.bShow ? (S(), b("div", Dt, [
|
|
464
|
+
(S(!0), b(j, null, D((c = t.deviceGroup) == null ? void 0 : c.items, (u, v) => (S(), W(g, {
|
|
465
|
+
key: v,
|
|
462
466
|
deviceGroup: u,
|
|
463
467
|
controlParams: t.controlParams
|
|
464
468
|
}, {
|
|
465
|
-
group: C(({ group:
|
|
466
|
-
y(t.$slots, "group", { group:
|
|
469
|
+
group: C(({ group: _ }) => [
|
|
470
|
+
y(t.$slots, "group", { group: _ }, void 0, !0)
|
|
467
471
|
]),
|
|
468
|
-
device: C(({ device:
|
|
469
|
-
y(t.$slots, "device", {
|
|
472
|
+
device: C(({ device: _, group: d }) => [
|
|
473
|
+
y(t.$slots, "device", {
|
|
474
|
+
device: _,
|
|
475
|
+
group: d
|
|
476
|
+
}, void 0, !0)
|
|
470
477
|
]),
|
|
471
478
|
_: 2
|
|
472
479
|
}, 1032, ["deviceGroup", "controlParams"]))), 128)),
|
|
473
|
-
(
|
|
474
|
-
key:
|
|
480
|
+
(S(!0), b(j, null, D(t.FilterDevice((i = t.deviceGroup) == null ? void 0 : i.devices), (u, v) => et((S(), b("div", {
|
|
481
|
+
key: v,
|
|
475
482
|
class: ot(["device", u.online && "online-device"])
|
|
476
483
|
}, [
|
|
477
484
|
$(l, {
|
|
@@ -479,12 +486,15 @@ function At(t, n, o, s, e, r) {
|
|
|
479
486
|
width: "16",
|
|
480
487
|
class: "device-avatar"
|
|
481
488
|
}),
|
|
482
|
-
|
|
489
|
+
p("span", {
|
|
483
490
|
title: u.id,
|
|
484
491
|
class: "device-name"
|
|
485
|
-
}, P(u.name), 9,
|
|
486
|
-
|
|
487
|
-
y(t.$slots, "device", {
|
|
492
|
+
}, P(u.name), 9, Mt),
|
|
493
|
+
p("div", xt, [
|
|
494
|
+
y(t.$slots, "device", {
|
|
495
|
+
device: u,
|
|
496
|
+
group: t.deviceGroup
|
|
497
|
+
}, void 0, !0)
|
|
488
498
|
])
|
|
489
499
|
], 2)), [
|
|
490
500
|
[nt, t.showDevice(u)]
|
|
@@ -492,7 +502,7 @@ function At(t, n, o, s, e, r) {
|
|
|
492
502
|
])) : T("", !0)
|
|
493
503
|
])) : T("", !0);
|
|
494
504
|
}
|
|
495
|
-
const zt = /* @__PURE__ */
|
|
505
|
+
const zt = /* @__PURE__ */ x(Ft, [["render", At], ["__scopeId", "data-v-b34e0b4a"]]), Et = {
|
|
496
506
|
width: 1024,
|
|
497
507
|
height: 1024,
|
|
498
508
|
body: '<path fill="currentColor" d="M384 192v640l384-320.064z"/>'
|
|
@@ -526,25 +536,25 @@ const Lt = F({
|
|
|
526
536
|
}
|
|
527
537
|
},
|
|
528
538
|
setup() {
|
|
529
|
-
const t =
|
|
539
|
+
const t = O({
|
|
530
540
|
onlyShowOnline: !1,
|
|
531
541
|
searchStr: ""
|
|
532
542
|
});
|
|
533
543
|
return {
|
|
534
|
-
inputSearchRef:
|
|
544
|
+
inputSearchRef: O(),
|
|
535
545
|
controlParams: t
|
|
536
546
|
};
|
|
537
547
|
}
|
|
538
548
|
});
|
|
539
|
-
const tt = (t) => (st("data-v-
|
|
549
|
+
const tt = (t) => (st("data-v-f4599228"), t = t(), rt(), t), Rt = { class: "device-group-list" }, Bt = { class: "search-panel" }, Nt = { style: { height: "32px", "line-height": "32px" } }, Vt = /* @__PURE__ */ tt(() => /* @__PURE__ */ p("img", { src: "" }, null, -1)), Ut = /* @__PURE__ */ tt(() => /* @__PURE__ */ p("label", { for: "onlineShow" }, "\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907", -1)), Wt = { class: "device-panel" };
|
|
540
550
|
function Kt(t, n, o, s, e, r) {
|
|
541
551
|
var c;
|
|
542
552
|
const i = k("CountShow"), l = k("group-show");
|
|
543
|
-
return
|
|
544
|
-
|
|
545
|
-
|
|
553
|
+
return S(), b("div", Rt, [
|
|
554
|
+
p("div", Bt, [
|
|
555
|
+
p("div", Nt, [
|
|
546
556
|
Vt,
|
|
547
|
-
|
|
557
|
+
p("input", {
|
|
548
558
|
type: "text",
|
|
549
559
|
onChange: n[0] || (n[0] = (...h) => t.onSearchChange && t.onSearchChange(...h)),
|
|
550
560
|
ref: "inputSearchRef"
|
|
@@ -552,7 +562,7 @@ function Kt(t, n, o, s, e, r) {
|
|
|
552
562
|
]),
|
|
553
563
|
$(i, { countInfo: t.deviceGroup }, {
|
|
554
564
|
default: C(() => [
|
|
555
|
-
|
|
565
|
+
p("input", {
|
|
556
566
|
type: "checkbox",
|
|
557
567
|
id: "onlineShow",
|
|
558
568
|
value: "onlineShow",
|
|
@@ -563,24 +573,27 @@ function Kt(t, n, o, s, e, r) {
|
|
|
563
573
|
_: 1
|
|
564
574
|
}, 8, ["countInfo"])
|
|
565
575
|
]),
|
|
566
|
-
|
|
567
|
-
(
|
|
576
|
+
p("div", Wt, [
|
|
577
|
+
(S(!0), b(j, null, D((c = t.deviceGroup) == null ? void 0 : c.items, (h, g) => (S(), W(l, {
|
|
568
578
|
controlParams: t.controlParams,
|
|
569
|
-
key:
|
|
579
|
+
key: g,
|
|
570
580
|
deviceGroup: h
|
|
571
581
|
}, {
|
|
572
582
|
group: C(({ group: u }) => [
|
|
573
583
|
y(t.$slots, "group", { group: u }, void 0, !0)
|
|
574
584
|
]),
|
|
575
|
-
device: C(({ device: u }) => [
|
|
576
|
-
y(t.$slots, "device", {
|
|
585
|
+
device: C(({ device: u, group: v }) => [
|
|
586
|
+
y(t.$slots, "device", {
|
|
587
|
+
device: u,
|
|
588
|
+
group: v
|
|
589
|
+
}, void 0, !0)
|
|
577
590
|
]),
|
|
578
591
|
_: 2
|
|
579
592
|
}, 1032, ["controlParams", "deviceGroup"]))), 128))
|
|
580
593
|
])
|
|
581
594
|
]);
|
|
582
595
|
}
|
|
583
|
-
const qt = /* @__PURE__ */
|
|
596
|
+
const qt = /* @__PURE__ */ x(Lt, [["render", Kt], ["__scopeId", "data-v-f4599228"]]), U = {
|
|
584
597
|
RecursionDeviceGroup: qt
|
|
585
598
|
}, Qt = {
|
|
586
599
|
install(t) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smarteye-e-components.mjs","sources":["../src/components/recursion-device-group/model/index.ts","../src/components-global/count-show/index.vue","../src/components-global/count-show/index.vue","../node_modules/.pnpm/@iconify+vue@4.0.0_vue@3.2.39/node_modules/@iconify/vue/dist/offline.mjs","../src/components-global/group-show/index.vue","../src/components-global/group-show/index.vue","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/caret-right.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/folder-opened.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/avatar.js","../src/components/recursion-device-group/index.vue","../src/components/recursion-device-group/index.vue","../src/index.ts"],"sourcesContent":["export namespace RecursionDeviceGroup {\r\n export interface IChannelInfo {\r\n index: number;\r\n name: string;\r\n }\r\n\r\n export interface DeviceInfo<T = any> {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n online: boolean;\r\n channels: Array<IChannelInfo>;\r\n tag?: T;\r\n }\r\n\r\n export interface DeviceGroup<T = any, DT = any> extends ICountInfo {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n devices: Array<DeviceInfo<DT>>;\r\n items: Array<DeviceGroup<T, DT>>;\r\n tag?: T;\r\n }\r\n\r\n export interface SessionDeviceGroup<\r\n GroupTag = any,\r\n DeviceTag = any,\r\n SessionTag = any\r\n > extends ICountInfo {\r\n name: string;\r\n items: Array<DeviceGroup>;\r\n tag?: SessionTag;\r\n }\r\n\r\n export interface ICountInfo {\r\n totalCount: number;\r\n onlineCount: number;\r\n items: Array<ICountInfo>;\r\n }\r\n\r\n export interface IControlParams {\r\n onlyShowOnline: boolean;\r\n searchStr: string;\r\n }\r\n\r\n export namespace Test {\r\n let startIndex = 0;\r\n function CreateDevice(count: number): Array<DeviceInfo> {\r\n const deviceList: Array<DeviceInfo> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: \"testId\",\r\n pid: \"\",\r\n name: `device-${i}`,\r\n online: i % 2 == 0,\r\n channels: [],\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n function CreateGroup(count: number) {\r\n const deviceList: Array<DeviceGroup> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: `groupid-${i}`,\r\n name: `group-${i}`,\r\n pid: \"\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n devices: CreateDevice(10),\r\n items: CreateGroup(count - i - 1),\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n export function RandomDeviceGroup(count: number): SessionDeviceGroup {\r\n return {\r\n name: \"hah\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n items: CreateGroup(count),\r\n };\r\n }\r\n }\r\n\r\n function ForeachDeviceGroup(\r\n deviceGroup: DeviceGroup[],\r\n handleDeviceGroup: (deviceGroup: DeviceGroup) => void\r\n ) {\r\n for (let i = 0; i < deviceGroup.length; i++) {\r\n handleDeviceGroup(deviceGroup[i]);\r\n ForeachDeviceGroup(deviceGroup[i].items, handleDeviceGroup);\r\n }\r\n }\r\n\r\n export namespace Utils {\r\n export function AccessSession(session: SessionDeviceGroup) {\r\n const groupMap: { [k in string]: DeviceGroup } = {};\r\n const deviceMap: { [k in string]: DeviceInfo } = {};\r\n\r\n ForeachDeviceGroup(session.items, (deviceGroup) => {\r\n groupMap[deviceGroup.id] = deviceGroup;\r\n for (let i = 0; i < deviceGroup.devices.length; i++) {\r\n deviceMap[deviceGroup.devices[i].id] = deviceGroup.devices[i];\r\n }\r\n });\r\n\r\n return {\r\n getGroup(id: string) {\r\n return groupMap[id];\r\n },\r\n getDevice(id: string) {\r\n return deviceMap[id];\r\n },\r\n };\r\n }\r\n }\r\n}\r\n","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","import { h, defineComponent } from 'vue';\n\nconst defaultIconDimensions = Object.freeze(\n {\n left: 0,\n top: 0,\n width: 16,\n height: 16\n }\n);\nconst defaultIconTransformations = Object.freeze({\n rotate: 0,\n vFlip: false,\n hFlip: false\n});\nconst defaultIconProps = Object.freeze({\n ...defaultIconDimensions,\n ...defaultIconTransformations\n});\nconst defaultExtendedIconProps = Object.freeze({\n ...defaultIconProps,\n body: \"\",\n hidden: false\n});\n\nfunction mergeIconTransformations(obj1, obj2) {\n const result = {};\n if (!obj1.hFlip !== !obj2.hFlip) {\n result.hFlip = true;\n }\n if (!obj1.vFlip !== !obj2.vFlip) {\n result.vFlip = true;\n }\n const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;\n if (rotate) {\n result.rotate = rotate;\n }\n return result;\n}\n\nfunction mergeIconData(parent, child) {\n const result = mergeIconTransformations(parent, child);\n for (const key in defaultExtendedIconProps) {\n if (key in defaultIconTransformations) {\n if (key in parent && !(key in result)) {\n result[key] = defaultIconTransformations[key];\n }\n } else if (key in child) {\n result[key] = child[key];\n } else if (key in parent) {\n result[key] = parent[key];\n }\n }\n return result;\n}\n\nfunction getIconsTree(data, names) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n const resolved = /* @__PURE__ */ Object.create(null);\n function resolve(name) {\n if (icons[name]) {\n return resolved[name] = [];\n }\n if (!(name in resolved)) {\n resolved[name] = null;\n const parent = aliases[name] && aliases[name].parent;\n const value = parent && resolve(parent);\n if (value) {\n resolved[name] = [parent].concat(value);\n }\n }\n return resolved[name];\n }\n (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);\n return resolved;\n}\n\nfunction internalGetIconData(data, name, tree) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n let currentProps = {};\n function parse(name2) {\n currentProps = mergeIconData(\n icons[name2] || aliases[name2],\n currentProps\n );\n }\n parse(name);\n tree.forEach(parse);\n return mergeIconData(data, currentProps);\n}\n\nfunction parseIconSet(data, callback) {\n const names = [];\n if (typeof data !== \"object\" || typeof data.icons !== \"object\") {\n return names;\n }\n if (data.not_found instanceof Array) {\n data.not_found.forEach((name) => {\n callback(name, null);\n names.push(name);\n });\n }\n const tree = getIconsTree(data);\n for (const name in tree) {\n const item = tree[name];\n if (item) {\n callback(name, internalGetIconData(data, name, item));\n names.push(name);\n }\n }\n return names;\n}\n\nconst matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\nconst optionalPropertyDefaults = {\n provider: \"\",\n aliases: {},\n not_found: {},\n ...defaultIconDimensions\n};\nfunction checkOptionalProps(item, defaults) {\n for (const prop in defaults) {\n if (prop in item && typeof item[prop] !== typeof defaults[prop]) {\n return false;\n }\n }\n return true;\n}\nfunction quicklyValidateIconSet(obj) {\n if (typeof obj !== \"object\" || obj === null) {\n return null;\n }\n const data = obj;\n if (typeof data.prefix !== \"string\" || !obj.icons || typeof obj.icons !== \"object\") {\n return null;\n }\n if (!checkOptionalProps(obj, optionalPropertyDefaults)) {\n return null;\n }\n const icons = data.icons;\n for (const name in icons) {\n const icon = icons[name];\n if (!name.match(matchIconName) || typeof icon.body !== \"string\" || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n const aliases = data.aliases || {};\n for (const name in aliases) {\n const icon = aliases[name];\n const parent = icon.parent;\n if (!name.match(matchIconName) || typeof parent !== \"string\" || !icons[parent] && !aliases[parent] || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n return data;\n}\n\nconst defaultIconSizeCustomisations = Object.freeze({\n width: null,\n height: null\n});\nconst defaultIconCustomisations = Object.freeze({\n ...defaultIconSizeCustomisations,\n ...defaultIconTransformations\n});\n\nfunction mergeCustomisations(defaults, item) {\n const result = {\n ...defaults\n };\n for (const key in item) {\n const value = item[key];\n const valueType = typeof value;\n if (key in defaultIconSizeCustomisations) {\n if (value === null || value && (valueType === \"string\" || valueType === \"number\")) {\n result[key] = value;\n }\n } else if (valueType === typeof result[key]) {\n result[key] = key === \"rotate\" ? value % 4 : value;\n }\n }\n return result;\n}\n\nconst separator = /[\\s,]+/;\nfunction flipFromString(custom, flip) {\n flip.split(separator).forEach((str) => {\n const value = str.trim();\n switch (value) {\n case \"horizontal\":\n custom.hFlip = true;\n break;\n case \"vertical\":\n custom.vFlip = true;\n break;\n }\n });\n}\n\nfunction rotateFromString(value, defaultValue = 0) {\n const units = value.replace(/^-?[0-9.]*/, \"\");\n function cleanup(value2) {\n while (value2 < 0) {\n value2 += 4;\n }\n return value2 % 4;\n }\n if (units === \"\") {\n const num = parseInt(value);\n return isNaN(num) ? 0 : cleanup(num);\n } else if (units !== value) {\n let split = 0;\n switch (units) {\n case \"%\":\n split = 25;\n break;\n case \"deg\":\n split = 90;\n }\n if (split) {\n let num = parseFloat(value.slice(0, value.length - units.length));\n if (isNaN(num)) {\n return 0;\n }\n num = num / split;\n return num % 1 === 0 ? cleanup(num) : 0;\n }\n }\n return defaultValue;\n}\n\nconst unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nconst unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\nfunction calculateSize(size, ratio, precision) {\n if (ratio === 1) {\n return size;\n }\n precision = precision || 100;\n if (typeof size === \"number\") {\n return Math.ceil(size * ratio * precision) / precision;\n }\n if (typeof size !== \"string\") {\n return size;\n }\n const oldParts = size.split(unitsSplit);\n if (oldParts === null || !oldParts.length) {\n return size;\n }\n const newParts = [];\n let code = oldParts.shift();\n let isNumber = unitsTest.test(code);\n while (true) {\n if (isNumber) {\n const num = parseFloat(code);\n if (isNaN(num)) {\n newParts.push(code);\n } else {\n newParts.push(Math.ceil(num * ratio * precision) / precision);\n }\n } else {\n newParts.push(code);\n }\n code = oldParts.shift();\n if (code === void 0) {\n return newParts.join(\"\");\n }\n isNumber = !isNumber;\n }\n}\n\nfunction iconToSVG(icon, customisations) {\n const fullIcon = {\n ...defaultIconProps,\n ...icon\n };\n const fullCustomisations = {\n ...defaultIconCustomisations,\n ...customisations\n };\n const box = {\n left: fullIcon.left,\n top: fullIcon.top,\n width: fullIcon.width,\n height: fullIcon.height\n };\n let body = fullIcon.body;\n [fullIcon, fullCustomisations].forEach((props) => {\n const transformations = [];\n const hFlip = props.hFlip;\n const vFlip = props.vFlip;\n let rotation = props.rotate;\n if (hFlip) {\n if (vFlip) {\n rotation += 2;\n } else {\n transformations.push(\n \"translate(\" + (box.width + box.left).toString() + \" \" + (0 - box.top).toString() + \")\"\n );\n transformations.push(\"scale(-1 1)\");\n box.top = box.left = 0;\n }\n } else if (vFlip) {\n transformations.push(\n \"translate(\" + (0 - box.left).toString() + \" \" + (box.height + box.top).toString() + \")\"\n );\n transformations.push(\"scale(1 -1)\");\n box.top = box.left = 0;\n }\n let tempValue;\n if (rotation < 0) {\n rotation -= Math.floor(rotation / 4) * 4;\n }\n rotation = rotation % 4;\n switch (rotation) {\n case 1:\n tempValue = box.height / 2 + box.top;\n transformations.unshift(\n \"rotate(90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n case 2:\n transformations.unshift(\n \"rotate(180 \" + (box.width / 2 + box.left).toString() + \" \" + (box.height / 2 + box.top).toString() + \")\"\n );\n break;\n case 3:\n tempValue = box.width / 2 + box.left;\n transformations.unshift(\n \"rotate(-90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n }\n if (rotation % 2 === 1) {\n if (box.left !== box.top) {\n tempValue = box.left;\n box.left = box.top;\n box.top = tempValue;\n }\n if (box.width !== box.height) {\n tempValue = box.width;\n box.width = box.height;\n box.height = tempValue;\n }\n }\n if (transformations.length) {\n body = '<g transform=\"' + transformations.join(\" \") + '\">' + body + \"</g>\";\n }\n });\n const customisationsWidth = fullCustomisations.width;\n const customisationsHeight = fullCustomisations.height;\n const boxWidth = box.width;\n const boxHeight = box.height;\n let width;\n let height;\n if (customisationsWidth === null) {\n height = customisationsHeight === null ? \"1em\" : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n width = calculateSize(height, boxWidth / boxHeight);\n } else {\n width = customisationsWidth === \"auto\" ? boxWidth : customisationsWidth;\n height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n }\n const result = {\n attributes: {\n width: width.toString(),\n height: height.toString(),\n viewBox: box.left.toString() + \" \" + box.top.toString() + \" \" + boxWidth.toString() + \" \" + boxHeight.toString()\n },\n body\n };\n return result;\n}\n\nconst regex = /\\sid=\"(\\S+)\"/g;\nconst randomPrefix = \"IconifyId\" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);\nlet counter = 0;\nfunction replaceIDs(body, prefix = randomPrefix) {\n const ids = [];\n let match;\n while (match = regex.exec(body)) {\n ids.push(match[1]);\n }\n if (!ids.length) {\n return body;\n }\n ids.forEach((id) => {\n const newID = typeof prefix === \"function\" ? prefix(id) : prefix + (counter++).toString();\n const escapedID = id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n body = body.replace(\n new RegExp('([#;\"])(' + escapedID + ')([\")]|\\\\.[a-z])', \"g\"),\n \"$1\" + newID + \"$3\"\n );\n });\n return body;\n}\n\nfunction iconToHTML(body, attributes) {\n let renderAttribsHTML = body.indexOf(\"xlink:\") === -1 ? \"\" : ' xmlns:xlink=\"http://www.w3.org/1999/xlink\"';\n for (const attr in attributes) {\n renderAttribsHTML += \" \" + attr + '=\"' + attributes[attr] + '\"';\n }\n return '<svg xmlns=\"http://www.w3.org/2000/svg\"' + renderAttribsHTML + \">\" + body + \"</svg>\";\n}\n\nfunction encodeSVGforURL(svg) {\n return svg.replace(/\"/g, \"'\").replace(/%/g, \"%25\").replace(/#/g, \"%23\").replace(/</g, \"%3C\").replace(/>/g, \"%3E\").replace(/\\s+/g, \" \");\n}\nfunction svgToURL(svg) {\n return 'url(\"data:image/svg+xml,' + encodeSVGforURL(svg) + '\")';\n}\n\nconst defaultExtendedIconCustomisations = {\n ...defaultIconCustomisations,\n inline: false,\n};\n\n/**\n * Default SVG attributes\n */\nconst svgDefaults = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n 'aria-hidden': true,\n 'role': 'img',\n};\n/**\n * Style modes\n */\nconst commonProps = {\n display: 'inline-block',\n};\nconst monotoneProps = {\n backgroundColor: 'currentColor',\n};\nconst coloredProps = {\n backgroundColor: 'transparent',\n};\n// Dynamically add common props to variables above\nconst propsToAdd = {\n Image: 'var(--svg)',\n Repeat: 'no-repeat',\n Size: '100% 100%',\n};\nconst propsToAddTo = {\n webkitMask: monotoneProps,\n mask: monotoneProps,\n background: coloredProps,\n};\nfor (const prefix in propsToAddTo) {\n const list = propsToAddTo[prefix];\n for (const prop in propsToAdd) {\n list[prefix + prop] = propsToAdd[prop];\n }\n}\n/**\n * Aliases for customisations.\n * In Vue 'v-' properties are reserved, so v-flip must be renamed\n */\nconst customisationAliases = {};\n['horizontal', 'vertical'].forEach((prefix) => {\n const attr = prefix.slice(0, 1) + 'Flip';\n // vertical-flip\n customisationAliases[prefix + '-flip'] = attr;\n // v-flip\n customisationAliases[prefix.slice(0, 1) + '-flip'] = attr;\n // verticalFlip\n customisationAliases[prefix + 'Flip'] = attr;\n});\n/**\n * Fix size: add 'px' to numbers\n */\nfunction fixSize(value) {\n return value + (value.match(/^[-0-9.]+$/) ? 'px' : '');\n}\n/**\n * Render icon\n */\nconst render = (\n// Icon must be validated before calling this function\nicon, \n// Partial properties\nprops) => {\n // Split properties\n const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);\n const componentProps = { ...svgDefaults };\n // Check mode\n const mode = props.mode || 'svg';\n // Copy style\n const style = {};\n const propsStyle = props.style;\n const customStyle = typeof propsStyle === 'object' && !(propsStyle instanceof Array)\n ? propsStyle\n : {};\n // Get element properties\n for (let key in props) {\n const value = props[key];\n if (value === void 0) {\n continue;\n }\n switch (key) {\n // Properties to ignore\n case 'icon':\n case 'style':\n case 'onLoad':\n case 'mode':\n break;\n // Boolean attributes\n case 'inline':\n case 'hFlip':\n case 'vFlip':\n customisations[key] =\n value === true || value === 'true' || value === 1;\n break;\n // Flip as string: 'horizontal,vertical'\n case 'flip':\n if (typeof value === 'string') {\n flipFromString(customisations, value);\n }\n break;\n // Color: override style\n case 'color':\n style.color = value;\n break;\n // Rotation as string\n case 'rotate':\n if (typeof value === 'string') {\n customisations[key] = rotateFromString(value);\n }\n else if (typeof value === 'number') {\n customisations[key] = value;\n }\n break;\n // Remove aria-hidden\n case 'ariaHidden':\n case 'aria-hidden':\n // Vue transforms 'aria-hidden' property to 'ariaHidden'\n if (value !== true && value !== 'true') {\n delete componentProps['aria-hidden'];\n }\n break;\n default: {\n const alias = customisationAliases[key];\n if (alias) {\n // Aliases for boolean customisations\n if (value === true || value === 'true' || value === 1) {\n customisations[alias] = true;\n }\n }\n else if (defaultExtendedIconCustomisations[key] === void 0) {\n // Copy missing property if it does not exist in customisations\n componentProps[key] = value;\n }\n }\n }\n }\n // Generate icon\n const item = iconToSVG(icon, customisations);\n const renderAttribs = item.attributes;\n // Inline display\n if (customisations.inline) {\n style.verticalAlign = '-0.125em';\n }\n if (mode === 'svg') {\n // Add style\n componentProps.style = {\n ...style,\n ...customStyle,\n };\n // Add icon stuff\n Object.assign(componentProps, renderAttribs);\n // Counter for ids based on \"id\" property to render icons consistently on server and client\n let localCounter = 0;\n let id = props.id;\n if (typeof id === 'string') {\n // Convert '-' to '_' to avoid errors in animations\n id = id.replace(/-/g, '_');\n }\n // Add innerHTML and style to props\n componentProps['innerHTML'] = replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyVue');\n // Render icon\n return h('svg', componentProps);\n }\n // Render <span> with style\n const { body, width, height } = icon;\n const useMask = mode === 'mask' ||\n (mode === 'bg' ? false : body.indexOf('currentColor') !== -1);\n // Generate SVG\n const html = iconToHTML(body, {\n ...renderAttribs,\n width: width + '',\n height: height + '',\n });\n // Generate style\n componentProps.style = {\n ...style,\n '--svg': svgToURL(html),\n 'width': fixSize(renderAttribs.width),\n 'height': fixSize(renderAttribs.height),\n ...commonProps,\n ...(useMask ? monotoneProps : coloredProps),\n ...customStyle,\n };\n return h('span', componentProps);\n};\n\n/**\n * Storage for icons referred by name\n */\nconst storage = Object.create(null);\n/**\n * Add icon to storage, allowing to call it by name\n *\n * @param name\n * @param data\n */\nfunction addIcon(name, data) {\n storage[name] = data;\n}\n/**\n * Add collection to storage, allowing to call icons by name\n *\n * @param data Icon set\n * @param prefix Optional prefix to add to icon names, true (default) if prefix from icon set should be used.\n */\nfunction addCollection(data, prefix) {\n const iconPrefix = typeof prefix === 'string'\n ? prefix\n : prefix !== false && typeof data.prefix === 'string'\n ? data.prefix + ':'\n : '';\n quicklyValidateIconSet(data) &&\n parseIconSet(data, (name, icon) => {\n if (icon) {\n storage[iconPrefix + name] = icon;\n }\n });\n}\n/**\n * Component\n */\nconst Icon = defineComponent({\n // Do not inherit other attributes: it is handled by render()\n inheritAttrs: false,\n // Render icon\n render() {\n const props = this.$attrs;\n // Check icon\n const propsIcon = props.icon;\n const icon = typeof propsIcon === 'string'\n ? storage[propsIcon]\n : typeof propsIcon === 'object'\n ? propsIcon\n : null;\n // Validate icon object\n if (icon === null ||\n typeof icon !== 'object' ||\n typeof icon.body !== 'string') {\n return this.$slots.default ? this.$slots.default() : null;\n }\n // Valid icon: render it\n return render({\n ...defaultIconProps,\n ...icon,\n }, props);\n },\n});\n\nexport { Icon, addCollection, addIcon };\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"body\": \"<path fill=\\\"currentColor\\\" d=\\\"M384 192v640l384-320.064z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device}\">\r\n <slot name=\"device\" :device=\"device\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","import { Plugin, App } from \"vue\";\r\n\r\nexport * from \"./comp.d\";\r\nexport * from \"./components\";\r\n\r\nimport RecursionDeviceGroup from \"/@/components/recursion-device-group/index.vue\";\r\n\r\nconst components = {\r\n RecursionDeviceGroup,\r\n};\r\n\r\nconst _default: Plugin = {\r\n install(app: App) {\r\n for (const itemKey in components) {\r\n const item = components[itemKey as keyof typeof components];\r\n app.component(itemKey, item);\r\n }\r\n },\r\n};\r\n\r\nexport default _default;\r\n"],"names":["RecursionDeviceGroup","Test","CreateDevice","count","deviceList","i","CreateGroup","RandomDeviceGroup","ForeachDeviceGroup","deviceGroup","handleDeviceGroup","Utils","AccessSession","session","groupMap","deviceMap","id","_sfc_main$2","defineComponent","props","ForeachICountInfo","handle","countInfo","countItem","item","onlineCount","computed","_openBlock","_createElementBlock","_hoisted_1","_renderSlot","_ctx","defaultIconDimensions","defaultIconTransformations","defaultIconProps","defaultIconSizeCustomisations","defaultIconCustomisations","mergeCustomisations","defaults","result","key","value","valueType","separator","flipFromString","custom","flip","str","rotateFromString","defaultValue","units","cleanup","value2","num","split","unitsSplit","unitsTest","calculateSize","size","ratio","precision","oldParts","newParts","code","isNumber","iconToSVG","icon","customisations","fullIcon","fullCustomisations","box","body","transformations","hFlip","vFlip","rotation","tempValue","customisationsWidth","customisationsHeight","boxWidth","boxHeight","width","height","regex","randomPrefix","counter","replaceIDs","prefix","ids","match","newID","escapedID","iconToHTML","attributes","renderAttribsHTML","attr","encodeSVGforURL","svg","svgToURL","defaultExtendedIconCustomisations","svgDefaults","commonProps","monotoneProps","coloredProps","propsToAdd","propsToAddTo","list","prop","customisationAliases","fixSize","render","componentProps","mode","style","propsStyle","customStyle","alias","renderAttribs","localCounter","h","useMask","html","storage","addIcon","name","data","Icon","propsIcon","_sfc_main$1","CountShow","FilterDevice","devices","_a","showGroup","strSearch","_b","showDevice","device","bShow","ref","_hoisted_4","_component_group_show","_resolveComponent","_createVNode","_component_CountShow","_withCtx","_component_Icon","_cache","$event","_a2","_toDisplayString","_b2","_hoisted_2","_createElementVNode","_hoisted_3","_Fragment","_renderList","group","index","_createBlock","group2","_withDirectives","_hoisted_5","_hoisted_6","right","avatar","_sfc_main","GroupShow","controlParams","_withScopeId","n","_pushScopeId","_popScopeId","args","itemGroup","components","_default","app","itemKey"],"mappings":";AAAiB,IAAAA;AAAAA,CAAV,CAAUA,MAAV;AA6CE,GAAA,CAAUC,MAAV;AAEL,aAASC,EAAaC,GAAkC;AACtD,YAAMC,IAAgC,CAAA;AACtC,eAASC,IAAI,GAAGA,IAAIF,GAAOE;AACzB,QAAAD,EAAW,KAAK;AAAA,UACd,IAAI;AAAA,UACJ,KAAK;AAAA,UACL,MAAM,UAAUC;AAAA,UAChB,QAAQA,IAAI,KAA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,EAAAC,EAAA,QAAA,SAAA,EAAA,OAAA8H,KAAA,QAAA,EAAA;AAAA,QAAe,CAAA;AAAA;;;;;;;;sFCXpCkB,IAAa;AAAA,EACjB,sBAAA/K;AACF,GAEMgL,KAAmB;AAAA,EACvB,QAAQC,GAAU;AAChB,eAAWC,KAAWH,GAAY;AAChC,YAAMvJ,IAAOuJ,EAAWG;AACpB,MAAAD,EAAA,UAAUC,GAAS1J,CAAI;AAAA,IAC7B;AAAA,EACF;AACF;"}
|
|
1
|
+
{"version":3,"file":"smarteye-e-components.mjs","sources":["../src/components/recursion-device-group/model/index.ts","../src/components-global/count-show/index.vue","../src/components-global/count-show/index.vue","../node_modules/.pnpm/@iconify+vue@4.0.0_vue@3.2.39/node_modules/@iconify/vue/dist/offline.mjs","../src/components-global/group-show/index.vue","../src/components-global/group-show/index.vue","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/caret-right.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/folder-opened.js","../node_modules/.pnpm/@iconify-icons+ep@1.2.8/node_modules/@iconify-icons/ep/avatar.js","../src/components/recursion-device-group/index.vue","../src/components/recursion-device-group/index.vue","../src/index.ts"],"sourcesContent":["export namespace RecursionDeviceGroup {\r\n export interface IChannelInfo {\r\n index: number;\r\n name: string;\r\n }\r\n\r\n export interface DeviceInfo<T = any> {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n online: boolean;\r\n channels: Array<IChannelInfo>;\r\n tag?: T;\r\n }\r\n\r\n export interface DeviceGroup<T = any, DT = any> extends ICountInfo {\r\n id: string;\r\n name: string;\r\n pid: string;\r\n devices: Array<DeviceInfo<DT>>;\r\n items: Array<DeviceGroup<T, DT>>;\r\n tag?: T;\r\n }\r\n\r\n export interface SessionDeviceGroup<\r\n GroupTag = any,\r\n DeviceTag = any,\r\n SessionTag = any\r\n > extends ICountInfo {\r\n name: string;\r\n items: Array<DeviceGroup>;\r\n tag?: SessionTag;\r\n }\r\n\r\n export interface ICountInfo {\r\n totalCount: number;\r\n onlineCount: number;\r\n items: Array<ICountInfo>;\r\n }\r\n\r\n export interface IControlParams {\r\n onlyShowOnline: boolean;\r\n searchStr: string;\r\n }\r\n\r\n export namespace Test {\r\n let startIndex = 0;\r\n function CreateDevice(count: number): Array<DeviceInfo> {\r\n const deviceList: Array<DeviceInfo> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: \"testId\",\r\n pid: \"\",\r\n name: `device-${i}`,\r\n online: i % 2 == 0,\r\n channels: [],\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n function CreateGroup(count: number) {\r\n const deviceList: Array<DeviceGroup> = [];\r\n for (let i = 0; i < count; i++) {\r\n deviceList.push({\r\n id: `groupid-${i}`,\r\n name: `group-${i}`,\r\n pid: \"\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n devices: CreateDevice(10),\r\n items: CreateGroup(count - i - 1),\r\n });\r\n }\r\n return deviceList;\r\n }\r\n\r\n export function RandomDeviceGroup(count: number): SessionDeviceGroup {\r\n return {\r\n name: \"hah\",\r\n onlineCount: 0,\r\n totalCount: 0,\r\n items: CreateGroup(count),\r\n };\r\n }\r\n }\r\n\r\n function ForeachDeviceGroup(\r\n deviceGroup: DeviceGroup[],\r\n handleDeviceGroup: (deviceGroup: DeviceGroup) => void\r\n ) {\r\n for (let i = 0; i < deviceGroup.length; i++) {\r\n handleDeviceGroup(deviceGroup[i]);\r\n ForeachDeviceGroup(deviceGroup[i].items, handleDeviceGroup);\r\n }\r\n }\r\n\r\n export namespace Utils {\r\n export function AccessSession(session: SessionDeviceGroup) {\r\n const groupMap: { [k in string]: DeviceGroup } = {};\r\n const deviceMap: { [k in string]: DeviceInfo } = {};\r\n\r\n ForeachDeviceGroup(session.items, (deviceGroup) => {\r\n groupMap[deviceGroup.id] = deviceGroup;\r\n for (let i = 0; i < deviceGroup.devices.length; i++) {\r\n deviceMap[deviceGroup.devices[i].id] = deviceGroup.devices[i];\r\n }\r\n });\r\n\r\n return {\r\n getGroup(id: string) {\r\n return groupMap[id];\r\n },\r\n getDevice(id: string) {\r\n return deviceMap[id];\r\n },\r\n foreachGroup(handle: (item: DeviceGroup) => void) {\r\n for (let i in groupMap) {\r\n handle(groupMap[i]);\r\n }\r\n },\r\n };\r\n }\r\n }\r\n}\r\n","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","<template>\r\n <div class=\"root\">\r\n <slot></slot>\r\n <!-- <button @click=\"countInfo&&countInfo.onlineCount++\">add</button> -->\r\n <span class=\"count-show\">\r\n {{onlineCount}}/{{totalCount}}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType } from 'vue'\r\nimport { RecursionDeviceGroup } from '../../components/recursion-device-group/model'\r\n\r\nexport default defineComponent({\r\n props: {\r\n countInfo: Object as PropType<RecursionDeviceGroup.ICountInfo>\r\n },\r\n setup(props) {\r\n function ForeachICountInfo(handle: (countInfo: RecursionDeviceGroup.ICountInfo) => number, countInfo?: RecursionDeviceGroup.ICountInfo) {\r\n if (countInfo) {\r\n let countItem = 0;\r\n countInfo.items.forEach(item => {\r\n countItem += ForeachICountInfo(handle, item);\r\n })\r\n return handle(countInfo) + countItem;\r\n }\r\n return 0;\r\n }\r\n\r\n const onlineCount = computed(() => {\r\n return ForeachICountInfo((item) => item.onlineCount, props.countInfo)\r\n })\r\n\r\n const totalCount = computed(() => {\r\n return ForeachICountInfo((item) => item.totalCount, props.countInfo)\r\n })\r\n\r\n return {\r\n totalCount,\r\n onlineCount\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style scoped>\r\n.root {\r\n position: relative;\r\n}\r\n\r\n.count-show {\r\n position: absolute;\r\n right: 0px;\r\n color: rgb(183, 183, 183)\r\n}\r\n</style>","import { h, defineComponent } from 'vue';\n\nconst defaultIconDimensions = Object.freeze(\n {\n left: 0,\n top: 0,\n width: 16,\n height: 16\n }\n);\nconst defaultIconTransformations = Object.freeze({\n rotate: 0,\n vFlip: false,\n hFlip: false\n});\nconst defaultIconProps = Object.freeze({\n ...defaultIconDimensions,\n ...defaultIconTransformations\n});\nconst defaultExtendedIconProps = Object.freeze({\n ...defaultIconProps,\n body: \"\",\n hidden: false\n});\n\nfunction mergeIconTransformations(obj1, obj2) {\n const result = {};\n if (!obj1.hFlip !== !obj2.hFlip) {\n result.hFlip = true;\n }\n if (!obj1.vFlip !== !obj2.vFlip) {\n result.vFlip = true;\n }\n const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;\n if (rotate) {\n result.rotate = rotate;\n }\n return result;\n}\n\nfunction mergeIconData(parent, child) {\n const result = mergeIconTransformations(parent, child);\n for (const key in defaultExtendedIconProps) {\n if (key in defaultIconTransformations) {\n if (key in parent && !(key in result)) {\n result[key] = defaultIconTransformations[key];\n }\n } else if (key in child) {\n result[key] = child[key];\n } else if (key in parent) {\n result[key] = parent[key];\n }\n }\n return result;\n}\n\nfunction getIconsTree(data, names) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n const resolved = /* @__PURE__ */ Object.create(null);\n function resolve(name) {\n if (icons[name]) {\n return resolved[name] = [];\n }\n if (!(name in resolved)) {\n resolved[name] = null;\n const parent = aliases[name] && aliases[name].parent;\n const value = parent && resolve(parent);\n if (value) {\n resolved[name] = [parent].concat(value);\n }\n }\n return resolved[name];\n }\n (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);\n return resolved;\n}\n\nfunction internalGetIconData(data, name, tree) {\n const icons = data.icons;\n const aliases = data.aliases || {};\n let currentProps = {};\n function parse(name2) {\n currentProps = mergeIconData(\n icons[name2] || aliases[name2],\n currentProps\n );\n }\n parse(name);\n tree.forEach(parse);\n return mergeIconData(data, currentProps);\n}\n\nfunction parseIconSet(data, callback) {\n const names = [];\n if (typeof data !== \"object\" || typeof data.icons !== \"object\") {\n return names;\n }\n if (data.not_found instanceof Array) {\n data.not_found.forEach((name) => {\n callback(name, null);\n names.push(name);\n });\n }\n const tree = getIconsTree(data);\n for (const name in tree) {\n const item = tree[name];\n if (item) {\n callback(name, internalGetIconData(data, name, item));\n names.push(name);\n }\n }\n return names;\n}\n\nconst matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\nconst optionalPropertyDefaults = {\n provider: \"\",\n aliases: {},\n not_found: {},\n ...defaultIconDimensions\n};\nfunction checkOptionalProps(item, defaults) {\n for (const prop in defaults) {\n if (prop in item && typeof item[prop] !== typeof defaults[prop]) {\n return false;\n }\n }\n return true;\n}\nfunction quicklyValidateIconSet(obj) {\n if (typeof obj !== \"object\" || obj === null) {\n return null;\n }\n const data = obj;\n if (typeof data.prefix !== \"string\" || !obj.icons || typeof obj.icons !== \"object\") {\n return null;\n }\n if (!checkOptionalProps(obj, optionalPropertyDefaults)) {\n return null;\n }\n const icons = data.icons;\n for (const name in icons) {\n const icon = icons[name];\n if (!name.match(matchIconName) || typeof icon.body !== \"string\" || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n const aliases = data.aliases || {};\n for (const name in aliases) {\n const icon = aliases[name];\n const parent = icon.parent;\n if (!name.match(matchIconName) || typeof parent !== \"string\" || !icons[parent] && !aliases[parent] || !checkOptionalProps(\n icon,\n defaultExtendedIconProps\n )) {\n return null;\n }\n }\n return data;\n}\n\nconst defaultIconSizeCustomisations = Object.freeze({\n width: null,\n height: null\n});\nconst defaultIconCustomisations = Object.freeze({\n ...defaultIconSizeCustomisations,\n ...defaultIconTransformations\n});\n\nfunction mergeCustomisations(defaults, item) {\n const result = {\n ...defaults\n };\n for (const key in item) {\n const value = item[key];\n const valueType = typeof value;\n if (key in defaultIconSizeCustomisations) {\n if (value === null || value && (valueType === \"string\" || valueType === \"number\")) {\n result[key] = value;\n }\n } else if (valueType === typeof result[key]) {\n result[key] = key === \"rotate\" ? value % 4 : value;\n }\n }\n return result;\n}\n\nconst separator = /[\\s,]+/;\nfunction flipFromString(custom, flip) {\n flip.split(separator).forEach((str) => {\n const value = str.trim();\n switch (value) {\n case \"horizontal\":\n custom.hFlip = true;\n break;\n case \"vertical\":\n custom.vFlip = true;\n break;\n }\n });\n}\n\nfunction rotateFromString(value, defaultValue = 0) {\n const units = value.replace(/^-?[0-9.]*/, \"\");\n function cleanup(value2) {\n while (value2 < 0) {\n value2 += 4;\n }\n return value2 % 4;\n }\n if (units === \"\") {\n const num = parseInt(value);\n return isNaN(num) ? 0 : cleanup(num);\n } else if (units !== value) {\n let split = 0;\n switch (units) {\n case \"%\":\n split = 25;\n break;\n case \"deg\":\n split = 90;\n }\n if (split) {\n let num = parseFloat(value.slice(0, value.length - units.length));\n if (isNaN(num)) {\n return 0;\n }\n num = num / split;\n return num % 1 === 0 ? cleanup(num) : 0;\n }\n }\n return defaultValue;\n}\n\nconst unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;\nconst unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;\nfunction calculateSize(size, ratio, precision) {\n if (ratio === 1) {\n return size;\n }\n precision = precision || 100;\n if (typeof size === \"number\") {\n return Math.ceil(size * ratio * precision) / precision;\n }\n if (typeof size !== \"string\") {\n return size;\n }\n const oldParts = size.split(unitsSplit);\n if (oldParts === null || !oldParts.length) {\n return size;\n }\n const newParts = [];\n let code = oldParts.shift();\n let isNumber = unitsTest.test(code);\n while (true) {\n if (isNumber) {\n const num = parseFloat(code);\n if (isNaN(num)) {\n newParts.push(code);\n } else {\n newParts.push(Math.ceil(num * ratio * precision) / precision);\n }\n } else {\n newParts.push(code);\n }\n code = oldParts.shift();\n if (code === void 0) {\n return newParts.join(\"\");\n }\n isNumber = !isNumber;\n }\n}\n\nfunction iconToSVG(icon, customisations) {\n const fullIcon = {\n ...defaultIconProps,\n ...icon\n };\n const fullCustomisations = {\n ...defaultIconCustomisations,\n ...customisations\n };\n const box = {\n left: fullIcon.left,\n top: fullIcon.top,\n width: fullIcon.width,\n height: fullIcon.height\n };\n let body = fullIcon.body;\n [fullIcon, fullCustomisations].forEach((props) => {\n const transformations = [];\n const hFlip = props.hFlip;\n const vFlip = props.vFlip;\n let rotation = props.rotate;\n if (hFlip) {\n if (vFlip) {\n rotation += 2;\n } else {\n transformations.push(\n \"translate(\" + (box.width + box.left).toString() + \" \" + (0 - box.top).toString() + \")\"\n );\n transformations.push(\"scale(-1 1)\");\n box.top = box.left = 0;\n }\n } else if (vFlip) {\n transformations.push(\n \"translate(\" + (0 - box.left).toString() + \" \" + (box.height + box.top).toString() + \")\"\n );\n transformations.push(\"scale(1 -1)\");\n box.top = box.left = 0;\n }\n let tempValue;\n if (rotation < 0) {\n rotation -= Math.floor(rotation / 4) * 4;\n }\n rotation = rotation % 4;\n switch (rotation) {\n case 1:\n tempValue = box.height / 2 + box.top;\n transformations.unshift(\n \"rotate(90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n case 2:\n transformations.unshift(\n \"rotate(180 \" + (box.width / 2 + box.left).toString() + \" \" + (box.height / 2 + box.top).toString() + \")\"\n );\n break;\n case 3:\n tempValue = box.width / 2 + box.left;\n transformations.unshift(\n \"rotate(-90 \" + tempValue.toString() + \" \" + tempValue.toString() + \")\"\n );\n break;\n }\n if (rotation % 2 === 1) {\n if (box.left !== box.top) {\n tempValue = box.left;\n box.left = box.top;\n box.top = tempValue;\n }\n if (box.width !== box.height) {\n tempValue = box.width;\n box.width = box.height;\n box.height = tempValue;\n }\n }\n if (transformations.length) {\n body = '<g transform=\"' + transformations.join(\" \") + '\">' + body + \"</g>\";\n }\n });\n const customisationsWidth = fullCustomisations.width;\n const customisationsHeight = fullCustomisations.height;\n const boxWidth = box.width;\n const boxHeight = box.height;\n let width;\n let height;\n if (customisationsWidth === null) {\n height = customisationsHeight === null ? \"1em\" : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n width = calculateSize(height, boxWidth / boxHeight);\n } else {\n width = customisationsWidth === \"auto\" ? boxWidth : customisationsWidth;\n height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === \"auto\" ? boxHeight : customisationsHeight;\n }\n const result = {\n attributes: {\n width: width.toString(),\n height: height.toString(),\n viewBox: box.left.toString() + \" \" + box.top.toString() + \" \" + boxWidth.toString() + \" \" + boxHeight.toString()\n },\n body\n };\n return result;\n}\n\nconst regex = /\\sid=\"(\\S+)\"/g;\nconst randomPrefix = \"IconifyId\" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);\nlet counter = 0;\nfunction replaceIDs(body, prefix = randomPrefix) {\n const ids = [];\n let match;\n while (match = regex.exec(body)) {\n ids.push(match[1]);\n }\n if (!ids.length) {\n return body;\n }\n ids.forEach((id) => {\n const newID = typeof prefix === \"function\" ? prefix(id) : prefix + (counter++).toString();\n const escapedID = id.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n body = body.replace(\n new RegExp('([#;\"])(' + escapedID + ')([\")]|\\\\.[a-z])', \"g\"),\n \"$1\" + newID + \"$3\"\n );\n });\n return body;\n}\n\nfunction iconToHTML(body, attributes) {\n let renderAttribsHTML = body.indexOf(\"xlink:\") === -1 ? \"\" : ' xmlns:xlink=\"http://www.w3.org/1999/xlink\"';\n for (const attr in attributes) {\n renderAttribsHTML += \" \" + attr + '=\"' + attributes[attr] + '\"';\n }\n return '<svg xmlns=\"http://www.w3.org/2000/svg\"' + renderAttribsHTML + \">\" + body + \"</svg>\";\n}\n\nfunction encodeSVGforURL(svg) {\n return svg.replace(/\"/g, \"'\").replace(/%/g, \"%25\").replace(/#/g, \"%23\").replace(/</g, \"%3C\").replace(/>/g, \"%3E\").replace(/\\s+/g, \" \");\n}\nfunction svgToURL(svg) {\n return 'url(\"data:image/svg+xml,' + encodeSVGforURL(svg) + '\")';\n}\n\nconst defaultExtendedIconCustomisations = {\n ...defaultIconCustomisations,\n inline: false,\n};\n\n/**\n * Default SVG attributes\n */\nconst svgDefaults = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n 'aria-hidden': true,\n 'role': 'img',\n};\n/**\n * Style modes\n */\nconst commonProps = {\n display: 'inline-block',\n};\nconst monotoneProps = {\n backgroundColor: 'currentColor',\n};\nconst coloredProps = {\n backgroundColor: 'transparent',\n};\n// Dynamically add common props to variables above\nconst propsToAdd = {\n Image: 'var(--svg)',\n Repeat: 'no-repeat',\n Size: '100% 100%',\n};\nconst propsToAddTo = {\n webkitMask: monotoneProps,\n mask: monotoneProps,\n background: coloredProps,\n};\nfor (const prefix in propsToAddTo) {\n const list = propsToAddTo[prefix];\n for (const prop in propsToAdd) {\n list[prefix + prop] = propsToAdd[prop];\n }\n}\n/**\n * Aliases for customisations.\n * In Vue 'v-' properties are reserved, so v-flip must be renamed\n */\nconst customisationAliases = {};\n['horizontal', 'vertical'].forEach((prefix) => {\n const attr = prefix.slice(0, 1) + 'Flip';\n // vertical-flip\n customisationAliases[prefix + '-flip'] = attr;\n // v-flip\n customisationAliases[prefix.slice(0, 1) + '-flip'] = attr;\n // verticalFlip\n customisationAliases[prefix + 'Flip'] = attr;\n});\n/**\n * Fix size: add 'px' to numbers\n */\nfunction fixSize(value) {\n return value + (value.match(/^[-0-9.]+$/) ? 'px' : '');\n}\n/**\n * Render icon\n */\nconst render = (\n// Icon must be validated before calling this function\nicon, \n// Partial properties\nprops) => {\n // Split properties\n const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);\n const componentProps = { ...svgDefaults };\n // Check mode\n const mode = props.mode || 'svg';\n // Copy style\n const style = {};\n const propsStyle = props.style;\n const customStyle = typeof propsStyle === 'object' && !(propsStyle instanceof Array)\n ? propsStyle\n : {};\n // Get element properties\n for (let key in props) {\n const value = props[key];\n if (value === void 0) {\n continue;\n }\n switch (key) {\n // Properties to ignore\n case 'icon':\n case 'style':\n case 'onLoad':\n case 'mode':\n break;\n // Boolean attributes\n case 'inline':\n case 'hFlip':\n case 'vFlip':\n customisations[key] =\n value === true || value === 'true' || value === 1;\n break;\n // Flip as string: 'horizontal,vertical'\n case 'flip':\n if (typeof value === 'string') {\n flipFromString(customisations, value);\n }\n break;\n // Color: override style\n case 'color':\n style.color = value;\n break;\n // Rotation as string\n case 'rotate':\n if (typeof value === 'string') {\n customisations[key] = rotateFromString(value);\n }\n else if (typeof value === 'number') {\n customisations[key] = value;\n }\n break;\n // Remove aria-hidden\n case 'ariaHidden':\n case 'aria-hidden':\n // Vue transforms 'aria-hidden' property to 'ariaHidden'\n if (value !== true && value !== 'true') {\n delete componentProps['aria-hidden'];\n }\n break;\n default: {\n const alias = customisationAliases[key];\n if (alias) {\n // Aliases for boolean customisations\n if (value === true || value === 'true' || value === 1) {\n customisations[alias] = true;\n }\n }\n else if (defaultExtendedIconCustomisations[key] === void 0) {\n // Copy missing property if it does not exist in customisations\n componentProps[key] = value;\n }\n }\n }\n }\n // Generate icon\n const item = iconToSVG(icon, customisations);\n const renderAttribs = item.attributes;\n // Inline display\n if (customisations.inline) {\n style.verticalAlign = '-0.125em';\n }\n if (mode === 'svg') {\n // Add style\n componentProps.style = {\n ...style,\n ...customStyle,\n };\n // Add icon stuff\n Object.assign(componentProps, renderAttribs);\n // Counter for ids based on \"id\" property to render icons consistently on server and client\n let localCounter = 0;\n let id = props.id;\n if (typeof id === 'string') {\n // Convert '-' to '_' to avoid errors in animations\n id = id.replace(/-/g, '_');\n }\n // Add innerHTML and style to props\n componentProps['innerHTML'] = replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyVue');\n // Render icon\n return h('svg', componentProps);\n }\n // Render <span> with style\n const { body, width, height } = icon;\n const useMask = mode === 'mask' ||\n (mode === 'bg' ? false : body.indexOf('currentColor') !== -1);\n // Generate SVG\n const html = iconToHTML(body, {\n ...renderAttribs,\n width: width + '',\n height: height + '',\n });\n // Generate style\n componentProps.style = {\n ...style,\n '--svg': svgToURL(html),\n 'width': fixSize(renderAttribs.width),\n 'height': fixSize(renderAttribs.height),\n ...commonProps,\n ...(useMask ? monotoneProps : coloredProps),\n ...customStyle,\n };\n return h('span', componentProps);\n};\n\n/**\n * Storage for icons referred by name\n */\nconst storage = Object.create(null);\n/**\n * Add icon to storage, allowing to call it by name\n *\n * @param name\n * @param data\n */\nfunction addIcon(name, data) {\n storage[name] = data;\n}\n/**\n * Add collection to storage, allowing to call icons by name\n *\n * @param data Icon set\n * @param prefix Optional prefix to add to icon names, true (default) if prefix from icon set should be used.\n */\nfunction addCollection(data, prefix) {\n const iconPrefix = typeof prefix === 'string'\n ? prefix\n : prefix !== false && typeof data.prefix === 'string'\n ? data.prefix + ':'\n : '';\n quicklyValidateIconSet(data) &&\n parseIconSet(data, (name, icon) => {\n if (icon) {\n storage[iconPrefix + name] = icon;\n }\n });\n}\n/**\n * Component\n */\nconst Icon = defineComponent({\n // Do not inherit other attributes: it is handled by render()\n inheritAttrs: false,\n // Render icon\n render() {\n const props = this.$attrs;\n // Check icon\n const propsIcon = props.icon;\n const icon = typeof propsIcon === 'string'\n ? storage[propsIcon]\n : typeof propsIcon === 'object'\n ? propsIcon\n : null;\n // Validate icon object\n if (icon === null ||\n typeof icon !== 'object' ||\n typeof icon.body !== 'string') {\n return this.$slots.default ? this.$slots.default() : null;\n }\n // Valid icon: render it\n return render({\n ...defaultIconProps,\n ...icon,\n }, props);\n },\n});\n\nexport { Icon, addCollection, addIcon };\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","<template>\r\n <div class=\"group\" v-if=\"showGroup\">\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <Icon icon=\"right\" :rotate=\"bShow&&'90deg'\" width=\"20\" @click=\"bShow = !bShow\" class=\"handle-ls-svg\" />\r\n <Icon icon=\"group\" width=\"24\" class=\"group-avatar\" />\r\n <span class=\"group-name\" :title=\"deviceGroup?.name\">\r\n {{deviceGroup?.name}}\r\n </span>\r\n <div class=\"group-slot\">\r\n <slot name=\"group\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </CountShow>\r\n\r\n <div style=\"margin-left: 26px\" v-if=\"bShow\">\r\n <group-show v-for=\"group, index in (deviceGroup?.items)\" :key=\"index\" :deviceGroup=\"group\"\r\n :controlParams=\"controlParams\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n <div v-for=\"(item, index) in FilterDevice(deviceGroup?.devices)\" :key=\"index\" class=\"device\"\r\n v-show=\"showDevice(item)\" :class=\"item.online&&'online-device'\">\r\n <Icon icon=\"user\" width=\"16\" class=\"device-avatar\" />\r\n <span :title=\"item.id\" class=\"device-name\">{{item.name}}</span>\r\n <div class=\"device-slot\">\r\n <slot name=\"device\" :device=\"item\" :group=\"deviceGroup\"></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from '/@/components/recursion-device-group/model'\r\nimport CountShow from \"../count-show/index.vue\"\r\nimport { Icon } from '@iconify/vue/offline';\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n Icon\r\n },\r\n name: \"group-show\",\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.DeviceGroup>,\r\n controlParams: Object as PropType<RecursionDeviceGroup.IControlParams>\r\n },\r\n setup(props) {\r\n function FilterDevice(devices?: RecursionDeviceGroup.DeviceInfo[]) {\r\n return (devices && devices.filter(item => !props.controlParams?.onlyShowOnline || item.online)) || []\r\n }\r\n\r\n const showGroup = computed(() => {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n\r\n if (props.deviceGroup && props.deviceGroup?.name.indexOf(strSearch) > 0) {\r\n return true;\r\n }\r\n\r\n return props.deviceGroup?.devices.find(item => item.name.indexOf((props.controlParams as any).searchStr) > 0)\r\n })\r\n\r\n function showDevice(device: RecursionDeviceGroup.DeviceInfo) {\r\n const strSearch = (props.controlParams as any).searchStr as string;\r\n if (strSearch.length == 0) {\r\n return true;\r\n }\r\n return device.name.indexOf((props.controlParams as any).searchStr) > 0\r\n }\r\n\r\n const bShow = ref(false);\r\n return {\r\n showGroup,\r\n showDevice,\r\n FilterDevice,\r\n bShow\r\n }\r\n },\r\n})\r\n</script>\r\n\r\n<style>\r\n:root {\r\n --device-offline-color: rgb(168, 168, 168);\r\n --device-online-color: rgb(1, 172, 1);\r\n --group-name-width: 160px\r\n}\r\n</style>\r\n\r\n<style scoped>\r\n.handle-ls-svg {\r\n vertical-align: -5px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n color: rgb(56, 56, 56)\r\n}\r\n\r\n.group-avatar {\r\n vertical-align: -6px;\r\n color: gray;\r\n}\r\n\r\n.device,\r\n.group {\r\n margin: 5px 0px;\r\n}\r\n\r\n.group-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n line-height: 24px;\r\n padding-left: 5px;\r\n}\r\n\r\n.group-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 100px);\r\n}\r\n\r\n.device-slot {\r\n display: inline-block;\r\n width: calc(100% - var(--group-name-width) - 42px);\r\n}\r\n\r\n.device-avatar {\r\n vertical-align: -2px;\r\n margin-right: 4px;\r\n margin-left: 2px;\r\n color: var(--device-offline-color);\r\n}\r\n\r\n.device-name {\r\n display: inline-block;\r\n width: var(--group-name-width);\r\n cursor: default;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n vertical-align: bottom;\r\n color: var(--device-offline-color);\r\n padding-left: 5px;\r\n}\r\n\r\n.online-device .device-avatar,\r\n.online-device .device-name {\r\n color: var(--device-online-color)\r\n}\r\n</style>\r\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"body\": \"<path fill=\\\"currentColor\\\" d=\\\"M384 192v640l384-320.064z\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","const data = {\n\t\"width\": 1024,\n\t\"height\": 1024,\n\t\"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\\\"/>\"\n};\nexport default data;\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","<template>\r\n <div class=\"device-group-list\">\r\n <div class=\"search-panel\">\r\n <div style=\"height: 32px; line-height: 32px;\">\r\n <img src=\"\" />\r\n <input type=\"text\" @change=\"onSearchChange\" ref=\"inputSearchRef\" />\r\n </div>\r\n <CountShow :countInfo=\"deviceGroup\">\r\n <input type=\"checkbox\" id=\"onlineShow\" value=\"onlineShow\" @change=\"onCheckBoxChange\" />\r\n <label for=\"onlineShow\">只显示在线设备</label>\r\n </CountShow>\r\n </div>\r\n <div class=\"device-panel\">\r\n <group-show :controlParams=\"controlParams\" v-for=\"itemGroup, index in deviceGroup?.items\" :key=\"index\"\r\n :deviceGroup=\"itemGroup\">\r\n <template #group=\"{group}\">\r\n <slot name=\"group\" :group=\"group\"></slot>\r\n </template>\r\n <template #device=\"{device, group}\">\r\n <slot name=\"device\" :device=\"device\" :group=\"group\"></slot>\r\n </template>\r\n </group-show>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, PropType, ref } from 'vue'\r\nimport { RecursionDeviceGroup } from \"./model\"\r\nimport GroupShow from \"/@/components-global/group-show/index.vue\"\r\nimport CountShow from \"/@/components-global/count-show/index.vue\"\r\n\r\nimport { addIcon } from \"@iconify/vue/offline\"\r\nimport right from \"@iconify-icons/ep/caret-right\"\r\nimport group from \"@iconify-icons/ep/folder-opened\"\r\nimport avatar from \"@iconify-icons/ep/avatar\"\r\n\r\naddIcon('right', right);\r\naddIcon('group', group);\r\naddIcon('user', avatar);\r\n\r\nexport default defineComponent({\r\n components: {\r\n CountShow,\r\n GroupShow\r\n },\r\n props: {\r\n deviceGroup: Object as PropType<RecursionDeviceGroup.SessionDeviceGroup>\r\n },\r\n methods: {\r\n onCheckBoxChange() {\r\n this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;\r\n },\r\n onSearchChange() {\r\n if (this.inputSearchRef) {\r\n this.controlParams.searchStr = this.inputSearchRef?.value\r\n console.log(this.controlParams.searchStr)\r\n }\r\n }\r\n },\r\n setup() {\r\n const controlParams = ref<RecursionDeviceGroup.IControlParams>({\r\n onlyShowOnline: false,\r\n searchStr: \"\"\r\n });\r\n const inputSearchRef = ref<HTMLInputElement>()\r\n return {\r\n inputSearchRef,\r\n controlParams\r\n }\r\n },\r\n})\r\n\r\n</script>\r\n\r\n\r\n<style>\r\n:root {\r\n --sec-main-search-height: 64px\r\n}\r\n</style>\r\n\r\n\r\n<style scoped>\r\n.device-group-list {\r\n height: 100%;\r\n}\r\n\r\n.device-group-list .search-panel {\r\n height: var(--sec-main-search-height);\r\n}\r\n\r\n.device-group-list .device-panel {\r\n height: calc(100% - var(--sec-main-search-height));\r\n overflow-y: auto;\r\n}\r\n</style>\r\n\r\n","import { Plugin, App } from \"vue\";\r\n\r\nexport * from \"./comp.d\";\r\nexport * from \"./components\";\r\n\r\nimport RecursionDeviceGroup from \"/@/components/recursion-device-group/index.vue\";\r\n\r\nconst components = {\r\n RecursionDeviceGroup,\r\n};\r\n\r\nconst _default: Plugin = {\r\n install(app: App) {\r\n for (const itemKey in components) {\r\n const item = components[itemKey as keyof typeof components];\r\n app.component(itemKey, item);\r\n }\r\n },\r\n};\r\n\r\nexport default _default;\r\n"],"names":["RecursionDeviceGroup","Test","CreateDevice","count","deviceList","i","CreateGroup","RandomDeviceGroup","ForeachDeviceGroup","deviceGroup","handleDeviceGroup","Utils","AccessSession","session","groupMap","deviceMap","id","handle","_sfc_main$2","defineComponent","props","ForeachICountInfo","countInfo","countItem","item","onlineCount","computed","_openBlock","_createElementBlock","_hoisted_1","_renderSlot","_ctx","defaultIconDimensions","defaultIconTransformations","defaultIconProps","defaultIconSizeCustomisations","defaultIconCustomisations","mergeCustomisations","defaults","result","key","value","valueType","separator","flipFromString","custom","flip","str","rotateFromString","defaultValue","units","cleanup","value2","num","split","unitsSplit","unitsTest","calculateSize","size","ratio","precision","oldParts","newParts","code","isNumber","iconToSVG","icon","customisations","fullIcon","fullCustomisations","box","body","transformations","hFlip","vFlip","rotation","tempValue","customisationsWidth","customisationsHeight","boxWidth","boxHeight","width","height","regex","randomPrefix","counter","replaceIDs","prefix","ids","match","newID","escapedID","iconToHTML","attributes","renderAttribsHTML","attr","encodeSVGforURL","svg","svgToURL","defaultExtendedIconCustomisations","svgDefaults","commonProps","monotoneProps","coloredProps","propsToAdd","propsToAddTo","list","prop","customisationAliases","fixSize","render","componentProps","mode","style","propsStyle","customStyle","alias","renderAttribs","localCounter","h","useMask","html","storage","addIcon","name","data","Icon","propsIcon","_sfc_main$1","CountShow","FilterDevice","devices","_a","showGroup","strSearch","_b","showDevice","device","bShow","ref","_hoisted_4","_component_group_show","_resolveComponent","_createVNode","_component_CountShow","_withCtx","_component_Icon","_cache","$event","_a2","_toDisplayString","_b2","_hoisted_2","_createElementVNode","_hoisted_3","_Fragment","_renderList","group","index","_createBlock","group2","_withDirectives","_hoisted_5","_hoisted_6","right","avatar","_sfc_main","GroupShow","controlParams","_withScopeId","n","_pushScopeId","_popScopeId","args","itemGroup","components","_default","app","itemKey"],"mappings":";AAAiB,IAAAA;AAAAA,CAAV,CAAUA,MAAV;AA6CE,GAAA,CAAUC,MAAV;AAEL,aAASC,EAAaC,GAAkC;AACtD,YAAMC,IAAgC,CAAA;AACtC,eAASC,IAAI,GAAGA,IAAIF,GAAOE;AACzB,QAAAD,EAAW,KAAK;AAAA,UACd,IAAI;AAAA,UACJ,KAAK;AAAA,UACL,MAAM,UAAUC;AAAA,UAChB,QAAQA,IAAI,KAAK;AAAA,UACjB,UAAU,CAAC;AAAA,QAAA,CACZ;AAEI,aAAAD;AAAA,IACT;AAEA,aAASE,EAAYH,GAAe;AAClC,YAAMC,IAAiC,CAAA;AACvC,eAASC,IAAI,GAAGA,IAAIF,GAAOE;AACzB,QAAAD,EAAW,KAAK;AAAA,UACd,IAAI,WAAWC;AAAA,UACf,MAAM,SAASA;AAAA,UACf,KAAK;AAAA,UACL,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,SAASH,EAAa,EAAE;AAAA,UACxB,OAAOI,EAAYH,IAAQE,IAAI,CAAC;AAAA,QAAA,CACjC;AAEI,aAAAD;AAAA,IACT;AAEO,aAASG,EAAkBJ,GAAmC;AAC5D,aAAA;AAAA,QACL,MAAM;AAAA,QACN,aAAa;AAAA,QACb,YAAY;AAAA,QACZ,OAAOG,EAAYH,CAAK;AAAA,MAAA;AAAA,IAE5B;AAPOF,IAAAA,EAAS,oBAAAM;AAAA,EAAA,GAhCDP,EAAA,SAAAA,EAAA,OAAA,CAAA,EAAA;AA0CR,WAAAQ,EACPC,GACAC,GACA;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702e833c]{position:absolute;right:0px;color:#b7b7b7}:root{--device-offline-color: rgb(168, 168, 168);--device-online-color: rgb(1, 172, 1);--group-name-width: 160px }.handle-ls-svg[data-v-
|
|
1
|
+
.root[data-v-702e833c]{position:relative}.count-show[data-v-702e833c]{position:absolute;right:0px;color:#b7b7b7}:root{--device-offline-color: rgb(168, 168, 168);--device-online-color: rgb(1, 172, 1);--group-name-width: 160px }.handle-ls-svg[data-v-b34e0b4a]{vertical-align:-5px;cursor:pointer;margin-right:5px;color:#383838}.group-avatar[data-v-b34e0b4a]{vertical-align:-6px;color:gray}.device[data-v-b34e0b4a],.group[data-v-b34e0b4a]{margin:5px 0}.group-name[data-v-b34e0b4a]{display:inline-block;width:var(--group-name-width);cursor:default;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;vertical-align:middle;line-height:24px;padding-left:5px}.group-slot[data-v-b34e0b4a]{display:inline-block;width:calc(100% - var(--group-name-width) - 100px)}.device-slot[data-v-b34e0b4a]{display:inline-block;width:calc(100% - var(--group-name-width) - 42px)}.device-avatar[data-v-b34e0b4a]{vertical-align:-2px;margin-right:4px;margin-left:2px;color:var(--device-offline-color)}.device-name[data-v-b34e0b4a]{display:inline-block;width:var(--group-name-width);cursor:default;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;vertical-align:bottom;color:var(--device-offline-color);padding-left:5px}.online-device .device-avatar[data-v-b34e0b4a],.online-device .device-name[data-v-b34e0b4a]{color:var(--device-online-color)}:root{--sec-main-search-height: 64px }.device-group-list[data-v-f4599228]{height:100%}.device-group-list .search-panel[data-v-f4599228]{height:var(--sec-main-search-height)}.device-group-list .device-panel[data-v-f4599228]{height:calc(100% - var(--sec-main-search-height));overflow-y:auto}
|
|
@@ -40,6 +40,7 @@ export declare namespace RecursionDeviceGroup {
|
|
|
40
40
|
function AccessSession(session: SessionDeviceGroup): {
|
|
41
41
|
getGroup(id: string): DeviceGroup<any, any>;
|
|
42
42
|
getDevice(id: string): DeviceInfo<any>;
|
|
43
|
+
foreachGroup(handle: (item: DeviceGroup) => void): void;
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
}
|