PageSourceSearch

https://video.envysion.com/ui/assets/Details-56cf7547.js

js envysion.com collected 2026-10-02 14:59:58 UTC 8,163 bytes, 2 lines download raw bytes

1var F=Object.defineProperty;var G=(n,l,e)=>l in n?F(n,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[l]=e;var d=(n,l,e)=>(G(n,typeof l!="symbol"?l+"":l,e),e);import{a as s,q,r as h,hM as f,j as t,cm as j,hj as y,M as L,K as C,a8 as w,cf as v,ah as c,hL as P,cn as T,a1 as R,z as U,D as k,y as I,$ as O,w as B,b as $,hN as M,hO as u,hP as A,hQ as z,hR as V,hS as W,hT as _,J as H,hU as g,aN as x,hV as J}from"./index-06f33dcd.js";import{P as K}from"./index-288a9f01.js";import{E as Q}from"./index-c3bf2601.js";import{d as S}from"./Groups-a5860ee7.js";import{E as Y}from"./index-dc249075.js";import{N as E}from"./index-f0204097.js";import{o as X,n as Z,d as ee}from"./fields-dd10d0b9.js";import{D as se}from"./index-ddb02c7b.js";import"./_baseDifference-7fe88353.js";import"./intersection-f6a13b53.js";const te=n=>({root:{height:"100%"},header:{color:n.palette.primary.light},label:{flex:"auto"},value:{width:"70%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},valueSwitch:{overflow:"visible"},row:{display:"flex",alignItems:"center"},avatar:{backgroundColor:n.palette.primary.light},icon:{marginRight:n.spacing(1)},switch:{marginRight:n.spacing(-2)},actionButtons:{justifyContent:"flex-end"},memberList:{maxHeight:"50vh",overflow:"auto"},filterField:{margin:0,fontSize:n.typography.h2.fontSize,paddingRight:n.spacing(3),maxWidth:400,minWidth:200},button:{marginRight:n.spacing(1)}});class b extends h.PureComponent{constructor(){super(...arguments);d(this,"state",{expanded:!1,filteredUsers:this.props.users,add:[],remove:[],filterValue:""});d(this,"onCheck",e=>{this.setState(r=>{const a=r.remove.slice(),i=r.add.slice();return r.filteredUsers.forEach(p=>{const{id:o}=p;this.isMemberId(o)?e.includes(o)?a.includes(o)&&a.splice(a.indexOf(o),1):a.includes(o)||a.push(o):e.includes(o)&&!i.includes(o)?i.push(o):!e.includes(o)&&i.includes(o)&&i.splice(i.indexOf(o),1)}),{add:i,remove:a}})});d(this,"handleFilterChange",(e,r)=>{this.setState({filteredUsers:e,filterValue:r})});d(this,"handleFormSubmit",async()=>{const{add:e,remove:r}=this.state,{updateMembers:a}=this.props;await a(e,r),this.setState({add:[],remove:[]}),this.toggleExpand()});d(this,"isMember",e=>this.props.members.map(r=>r.id).includes(e.id));d(this,"isMemberId",e=>this.props.members.map(r=>r.id).includes(e));d(this,"sortUsers",e=>f(e,[r=>!this.isMember(r),r=>r.name.toLowerCase(),"username","id"]));d(this,"sortMembers",e=>f(e,[r=>r.name.toLowerCase(),"username","id"]));d(this,"toggleExpand",()=>{const{expanded:e}=this.state,{users:r}=this.props;this.setState({expanded:!e,filteredUsers:r,filterValue:""})});d(this,"renderForm",()=>{const{classes:e,members:r,error:a}=this.props,{expanded:i,filteredUsers:p,filterValue:o}=this.state;return t.jsxs(h.Fragment,{children:[t.jsx(j,{className:e.header,title:"Members",avatar:t.jsx(y,{"aria-label":"members-icon",className:e.avatar,children:t.jsx(S,{})}),action:i?t.jsx(L,{className:e.filterField,fields:["name","username"],onDataSetUpdate:this.handleFilterChange,dataSet:this.props.users,filterValue:o}):t.jsx(C,{className:e.button,onClick:this.toggleExpand,"aria-label":"EditMembership",id:"editMembership",size:"large",children:t.jsx(w,{})})}),t.jsxs(v,{children:[t.jsx("div",{className:e.memberList,children:o&&p.length===0?t.jsx(c,{children:"Your search returned no results."}):t.jsx(E,{button:!1,nodes:p,sort:this.sortUsers,selectable:!0,onCheck:this.onCheck,selected:r.map(m=>m.id)})}),a&&t.jsx("div",{className:e.errorContainer,children:t.jsx(c,{color:"error",children:a})})]}),t.jsx(P,{className:e.actionButtons,children:t.jsx(T,{action:this.handleFormSubmit,final:!0,children:m=>t.jsxs(h.Fragment,{children:[t.jsx(R,{variant:"text",onClick:this.toggleExpand,className:e.button,children:"Cancel"}),t.jsx(R,{variant:"contained",color:"primary",type:"submit",onClick:m,children:"Submit"})]})})})]})});d(this,"renderList",()=>{const{classes:e,members:r,editable:a}=this.props,{expanded:i}=this.state;return t.jsxs(h.Fragment,{children:[t.jsx(j,{className:e.header,title:"Members",avatar:t.jsx(y,{"aria-label":"members-icon",className:e.avatar,children:t.jsx(S,{})}),action:!i&&a&&t.jsx(C,{className:e.button,onClick:this.toggleExpand,"aria-label":"EditMembers",
1id:"edit",size:"large",children:t.jsx(w,{})})}),t.jsx(v,{children:r.length>0?t.jsx("div",{className:e.memberList,children:t.jsx(E,{button:!1,nodes:r,sort:this.sortMembers})}):t.jsx(c,{variant:"body2",children:"This group has no members. Click the pencil icon above to add users to the group."})})]})})}render(){const{id:e}=this.props,{expanded:r}=this.state;return t.jsx(Y,{expanded:r,content:this.renderList(),expandedContent:this.renderForm(),id:e,expandedContentInDialog:!0,onClose:this.toggleExpand})}}const N=s.shape({id:s.string.isRequired,name:s.string.isRequired,username:s.string});b.propTypes={classes:s.shape({actionButtons:s.string,avatar:s.string,button:s.string,errorContainer:s.string,filterField:s.string,header:s.string,memberList:s.string}).isRequired,editable:s.bool.isRequired,error:s.string,id:s.string,members:s.arrayOf(N).isRequired,updateMembers:s.func.isRequired,users:s.arrayOf(N).isRequired};b.defaultProps={error:void 0,id:void 0};const re=q(te)(b),ie=({onSubmit:n})=>t.jsx(se,{tooltip:"Delete Group",ButtonProps:{name:"delete-group-button",color:"inherit"},icon:t.jsx(U,{}),onSubmit:n,children:()=>t.jsxs(h.Fragment,{children:[t.jsx(k,{children:"Delete Group?"}),t.jsx(I,{children:t.jsx(O,{children:"Warning: If you delete this group, group members will lose access to shared clips and shared reports. Are you sure you want to delete this group?"})})]})}),ae=n=>({contentSpacing:{maxWidth:n.spacing(128),width:"100%"}});class D extends h.Component{constructor(){super(...arguments);d(this,"state",{editing:!1,group:M(this.props.group),members:u(this.props.members,this.props.group),users:u(this.props.users,this.props.group)});d(this,"toggleEdit",e=>()=>{this.setState({editing:e})});d(this,"updateInfo",async e=>{const{group:r}=this.state,a=await A(r.id,e);this.setState({group:M(a)})});d(this,"updateMembers",async(e,r)=>{const{group:a}=this.state;try{e.length>0&&await z(e,a.id),r.length>0&&await V(r,a.id);const i=u(await W(a.id),a);this.setState({members:i})}catch(i){this.setState({membersError:i==null?void 0:i.message})}});d(this,"handleDeleteGroup",async()=>{const{group:e}=this.state;await _(e.id),this.props.history.push("/admin/groups")})}render(){const{classes:e,currentUser:r}=this.props,{editing:a,group:i,users:p,members:o,membersError:m}=this.state;return t.jsx(H,{title:"Group Detail | Administration",PageHeaderProps:{title:`Edit Group: ${i.name}`,backLink:"/admin/groups"},actions:g(r,i)&&t.jsx(ie,{onSubmit:this.handleDeleteGroup}),children:t.jsx(K,{introTextProps:{helpText:"Only the group owner may edit Group Details and Group Members.",learnMorePath:"/administrative-user-setup/groups/",isContained:!0},children:t.jsx("div",{className:e.contentSpacing,children:t.jsxs(x,{container:!0,spacing:5,alignItems:"flex-start",justifyContent:"space-around",children:[t.jsx(x,{item:!0,md:6,xs:12,children:t.jsx(Q,{id:"details-card",fields:[X,Z,ee],values:i,title:"Details",editable:!a&&g(r,i),icon:t.jsx(J,{}),onSubmit:this.updateInfo,onExpand:this.toggleEdit(!0),onCollapse:this.toggleEdit(!1),expandedContentInDialog:!0})}),t.jsx(x,{item:!0,md:6,xs:12,children:t.jsx(re,{group:i,users:p,members:o,error:m,editable:g(r,i),updateMembers:this.updateMembers})})]})})})})}}D.propTypes={classes:s.shape({contentSpacing:s.string.isRequired}).isRequired,currentUser:s.shape({id:s.string,legacyId:s.number}).isRequired,group:s.shape({id:s.string.isRequired,name:s.string.isRequired,ownerId:s.string,ownerLegacyId:s.number,ownerFirstname:s.string,ownerLastname:s.string}).isRequired,members:s.arrayOf(s.shape({id:s.string.isRequired,firstName:s.string,lastName:s.string,username:s.string,disabled:s.bool})).isRequired,users:s.arrayOf(s.shape({id:s.string.isRequired,firstName:s.string,lastName:s.string,username:s.string,disabled:s.bool})).isRequired,history:s.shape({push:s.func.isRequired}).isRequired};const be=B(q(ae)($(D)));export{D as DetailsComponent,be as default};
2//# sourceMappingURL=Details-56cf7547.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.