PageSourceSearch

https://www.virtualpeople.ai/static/js/2.57ccffda.chunk.js

js virtualpeople.ai collected 2026-10-05 13:14:59 UTC 24,380 bytes, 2 lines download raw bytes

1(this["webpackJsonpadminui-service"]=this["webpackJsonpadminui-service"]||[]).push([[2],{7358:function(e,t,a){"use strict";a.d(t,"c",(function(){return o})),a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return d}));var i=a(391),l=a.n(i);const s=a(79),r=(e,t,a,i)=>{if(!0===a)return!0;if(a){let r=l()(a,e);const o=s.parse(a);return r=s.eval(o,{data:e,user:t}),i&&(r=s.eval(o,{data:e,user:t,...i.properties})),r}return!1},o=(e,t,a,i)=>{let l;return l=i?t.fieldProperties&&t.fieldProperties.showIn.create&&t.fieldProperties.showIn.create.isRestrictedWriteAccess:t.fieldProperties&&t.fieldProperties.showIn.detail&&t.fieldProperties.showIn.detail.isRestrictedWriteAccess,r(e,a,l)},n=(e,t,a,i,l)=>{let s,o;return i?(s=t.fieldProperties&&t.fieldProperties.showIn.create&&t.fieldProperties.showIn.create.isRestrictedReadAccess,o=c(l,t,i)):(s=t.fieldProperties&&t.fieldProperties.showIn.detail&&t.fieldProperties.showIn.detail.isRestrictedReadAccess,o=c(l,t,i)),r(e,a,s,o)},d=(e,t)=>{let a=!1,i=e.fieldProperties&&e.fieldProperties.showIn&&e.fieldProperties.showIn.result&&e.fieldProperties.showIn.result.listingAccess;if(i){const e=s.parse(i);a=s.eval(e,{user:t})}return a},c=(e,t,a)=>{if(!(e&&t.fieldProperties&&t.fieldProperties.showIn[""+(a?"create":"detail")]&&t.fieldProperties.showIn[""+(a?"create":"detail")].accessFieldName))return!1;{let i=e&&e.data&&e.data.length>0&&e.data.find(e=>"defaultSetting"==e.configType&&e.name==t.fieldProperties.showIn[""+(a?"create":"detail")].accessFieldName),l=i&&i.properties;if(e&&!e.loading&&l)return i}}},7374:function(e,t,a){"use strict";var i=a(68),l=a(35),s=a(927),r=a(25),o=a(1170),n=a(382),d=a(928),c=a(1093),p=a(468),m=a(1),u=a.n(m),h=a(12),f=a(92);const g={colorScheme:"teal",size:"sm"};t.a=Object(h.c)()(e=>{const{t:t}=e,[a,h]=Object(m.useState)(g),[N,b]=Object(m.useState)("LookUp"),[v,E]=Object(m.useState)([]),{isOpen:P,onOpen:S,onClose:k}=Object(l.e)({isOpen:e.isOpen}),[w,y]=Object(m.useState)(""),[C,O]=Object(m.useState)(20),[U,x]=Object(m.useState)(!1),L=Object(m.useRef)();Object(m.useEffect)(()=>{e.btnStyle&&h(e.btnStyle),e.title&&b(e.title),e.list&&E(e.list),e.limit&&e.limit!=C&&O(e.limit)},[e]);const R=Object(m.useCallback)(e=>{y(e.target.value)},[]),j=Object(m.useCallback)(()=>{E([]),y(""),x(!1),k(),e.updateParent&&e.updateParent({open:!P}),e.reset()},[w,v]),I=Object(m.useCallback)(e=>{"Enter"===e.key&&F()},[w]),F=Object(m.useCallback)(()=>{e.onSubmit(w,!1),setTimeout(()=>{x(!0)},500)},[w]),M=Object(m.useCallback)(t=>{if(L.current){const{scrollTop:t,scrollHeight:a,clientHeight:i}=L.current;t+i===a&&e.onSubmit(w,!0)}},[w]),A=Object(m.useMemo)(()=>e.loading,[e]),T=Object(m.useCallback)(t=>{e.onChange(t),setTimeout(()=>{j()},200)},[]);return u.a.createElement(u.a.Fragment,null,u.a.createElement(s.a,{colorScheme:a.colorScheme,size:a.size,fontSize:a.size,onClick:S},u.a.createElement(r.a,{as:f.i})),u.a.createElement(o.g,{isOpen:P,onClose:k},u.a.createElement(o.m,null),u.a.createElement(o.j,{style:{background:a.background}},u.a.createElement(o.l,null,N),u.a.createElement(o.i,{onClick:j}),u.a.createElement(o.h,null,u.a.createElement(n.a,{w:"100%",p:4,mb:4},u.a.createElement(d.b,{size:"md"},u.a.createElement(d.a,{p:2,type:"text",placeholder:t("Search"),onChange:R,onKeyDown:I}),u.a.createElement(d.c,null,u.a.createElement(s.a,{size:"sm",colorScheme:"blue",mr:1,onClick:F}," ",u.a.createElement(i.i,null))))),u.a.createElement(n.a,{w:"100%",overflow:"auto",maxH:350,onScroll:()=>M(),ref:L},U&&0==v.length&&u.a.createElement("span",null,t("No Record Found!")),v.length>0&&v.map((e,t)=>u.a.createElement(c.a,{w:"90%",size:"lg",m:1,p:2,key:t,variant:"outline",colorScheme:"blue",cursor:"pointer",onClick:T.bind(void 0,e),_hover:{background:"#eaeaea",color:"#333"}},u.a.createElement(c.c,null,!!e.label&&e.label," ",u.a.createElement("br",null)," ",!!e.subLabel&&e.subLabel)))),A&&u.a.createElement(p.a,{ml:"50%",speed:"0.65s",emptyColor:"gray.200",color:"blue.500",size:"md"})),u.a.createElement(o.k,{bg:"transparent"}))))})},7402:function(e,t,a){"use strict";var i=a(1),l=a.n(i),s=a(7455),r=a.n(s),o=(a(7454),a(12));
1class n extends l.a.Component{constructor(e){super(e),this.state={openModal:!1,usersList:{},options:[],selectedOptions:{},lookup:!1,lookupList:[],lookUpLimit:20,lookUpOffset:0,lookUpSearchText:"",loading:!1,maxUsersLimit:500}}handleDateSelect(e,t){t.value=e,this.props.handleChange(this.props.data.fieldName,t)}render(){const{data:e,formValues:t,t:a}=this.props;let i=t.data[e.fieldName];return"string"===typeof i&&(i=Date.parse(i)),l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"ts-main clearfix"},l.a.createElement("label",null,a(e.fieldProperties.label)),l.a.createElement("div",{className:"custom-calendar"},l.a.createElement(r.a,{selected:i,minDate:new Date,onSelect:this.handleDateSelect.bind(this),onChange:this.handleDateSelect.bind(this)}))))}}t.a=Object(o.c)()(n)},7415:function(e,t,a){"use strict";var i=a(1),l=a.n(i),s=a(12),r=a(515),o=a(7327);class n extends l.a.Component{constructor(e){super(e),this.state={filePreview:[],errorUpload:!1,setInputKey:""}}fileChange(e,t){this.setState({setInputKey:"upload"}),this.props.handleUploadChange(e,t)}componentWillReceiveProps(e){const{previewUpload:t}=e;this.filePreview(t)&&this.setState({errorUpload:!1})}filePreview(e){let t=0;if(e&&e.length>0&&e.forEach((e,a)=>{t=parseInt(t)+parseInt(e.fileSize),t>36e5&&(this.setState({errorUpload:"File size should not Exceeded the maximum limit(3.5MB)"}),setTimeout(()=>{this.removeFile(e.fileName)},5e3))}),t<36e5)return this.setState({errorUpload:!1,filePreview:e}),!0}removeFile(e){this.props.removeUploadFile(e),this.setState({setInputKey:""})}componentWillMount(){}render(){const{data:e,formValues:t,t:a}=this.props,{filePreview:i,errorUpload:s}=this.state;return l.a.createElement("div",{className:"custom-form-grp clearfix"},l.a.createElement(r.a,{for:e.fieldProperties&&e.fieldProperties.label,sm:3},e.fieldProperties&&a(e.fieldProperties.label)),l.a.createElement("div",{className:"grp-split"},(window.location.pathname.includes("approvals")&&window.location.pathname.includes("createRequest")||"approvals"!=window.location.pathname.split("/")[1])&&l.a.createElement(o.a,{multiple:!0,type:e.fieldProperties.type,id:e.fieldName,label:a("Choose file"),name:e.fieldName,disabled:!!e.disabled,key:this.state.setInputKey||"",onChange:this.fileChange.bind(this,e.fieldName)}),this.props.touched&&[1,!0].includes(e.fieldProperties.required)&&(!t.data[e.fieldName]||""===t.data[e.fieldName])&&l.a.createElement("div",{className:"error-message"},a(e.fieldProperties.errorMessage)),s&&l.a.createElement("div",{className:"error-message"},a(s))),l.a.createElement("p",null),l.a.createElement("div",{className:"row"},i&&i.length>0&&i.map((e,t)=>l.a.createElement("div",{key:t,className:"col-md-3"},l.a.createElement("button",{type:"button",onClick:this.removeFile.bind(this,e.fileName),className:"close","aria-label":"Close"},l.a.createElement("span",{"aria-hidden":"true"},"\xd7")),l.a.createElement("img",{className:"img img-thumbnail",onError:e=>{e.target.setAttribute("src","assets/img/atach-ic-o.png"),e.target.setAttribute("style","background:#333;padding:5px;margin:5px;max-width:80px")},src:e.fileUrl,alt:""}),l.a.createElement("i",{className:"text-muted"},e.fileName)))))}}t.a=Object(s.c)()(n)},7416:function(e,t,a){"use strict";var i=a(1),l=a.n(i),s=a(12),r=a(515),o=a(7282),n=a(7358);class d extends l.a.Component{constructor(e){super(e),this.autoExpand=e=>{document.addEventListener("input",(function(e){"textarea"===e.target.tagName.toLowerCase()&&(e.target.style.height="auto"),e.target.style.height=e.target.scrollHeight+10+"px"}))},this.state={}}render(){const{data:e,formValues:t,handleChange:a,errorMsg:i,t:s}=this.props;let d,c=!1;e.fieldProperties.displayLength&&(c=e.fieldProperties.displayLength),d=e.fieldProperties.value?e.fieldProperties.value:t.data[e.fieldName]?t.data[e.fieldName]:"";let p=this.props.location&&this.props.location.state&&this.props.location.state.isAdvanceSearchApplied,m=Object(n.b)(t,e),u=Object(n.c)(t,e);return p&&m?l.a.createElement(l.a.Fragment,null):l.a.createElement("div",{className:"custom-form-grp clearfix"},l.a.createElement(r.a,{for:e.fieldProperties&&e.fieldProperties.label,sm:3},e.fieldProperties&&s(e.fieldProperties.label)),l.a.createElement("div",{className:"grp-split"},l.a.createElement(o.a,{onKeyPress:this.autoExpand.bind(this),key:e.fieldProperties.label,className:"new-custom-input",type:e.fieldProperties.type,name:e.fieldName,value:d,id:e.fieldName,readOnly:!!e.fieldProperties.readOnly||!!u,placeholder:s(e.fieldProperties.placeholder),onChange:a(e.fieldName,c),maxLength:e.fieldProperties.displayLength||"",disabled:!!e.disabled||!(!p||!u),rows:"textarea"===e.fieldProperties.type?e.fieldProperties.rows||5:void 0,invalid:!(!this.props.touched||!e.fieldProperties.required||t.data[e.fieldName]&&""!==t.data[e.fieldName]),valid:!(this.props.touched&&e.fieldProperties.required&&(!t[e.fieldName]||""===t[e.fieldName]))}),this.props.touched&&[1,!0].includes(e.fieldProperties.required)&&(!t.data[e.fieldName]||""===t.data[e.fieldName])&&l.a.createElement("div",{className:"error-message"},s(e.fieldProperties.errorMessage)),i&&i[e.fieldName]&&l.a.createElement("div",{className:"error-message"},s(i[e.fieldName]))))}}t.a=Object(s.c)()(d)},7417:function(e,t,a){"use strict";var i=a(382),l=a(49),s=a.n(l),r=a(1),o=a.n(r),n=a(12),d=a(156),c=a(4),p=a(7374),m=a(7361),u=a(7358);class h extends o.a.Component{constructor(e){super(e),this.state={openModal:!1,usersList:{},options:[],selectedOptions:{},lookup:!1,lookupList:[],lookUpLimit:20,lookUpOffset:0,lookUpSearchText:"",loading:!1,maxUsersLimit:500}}componentDidMount(){const{data:e,formValues:t,identity:{profile:a}}=this.props;Object(u.c)(t,e,a);e&&e.fieldName}getUserInfo(e,t){const a={method:"GET",headers:{"Content-Type":"application/json"},url:`${this.props.apiUrl||this.props.tenant&&this.props.tenant.apiUrl}/role/users/${t}?tenantId=${e}`};return c.v.identityApi.request(a).then(e=>{200==e.status&&e.data&&this.props.handleReportChange(e.data)})}mapRequestedForLookup(e,t){const{lookupList:a}=this.state;e&&e.forEach((e,t)=>(e.username&&(e.key=e.username,e.label=`${e.firstName} ${e.lastName}`,e.subLabel=e.email||e.username,e.value=e.username),e)),t&&(e=[...a,...e]),this.setState({lookupList:e,loading:!1})}getRequestedFor(e,t){const{lookUpLimit:a,lookUpOffset:i,lookUpSearchText:l}=this.state;t=t?a+i:0,this.setState({lookUpOffset:t,loading:!0});let s=!1;e.length>0&&l.length>0&&e!=l?(this.setState({lookUpOffset:0,lookUpSearchText:e}),s=!1):s=0!=t;const r={method:"GET",headers:{"Content-Type":"application/json"},url:`${this.props.apiUrl||this.props.tenant&&this.props.tenant.apiUrl}/ticketing/User/getUsersByNotInRole/system_ticket_agent?search='${e}'&limit=${a}&offset=${t}`};c.v.identityApi.request(r).then(e=>{200==e.status&&e.data&&this.mapRequestedForLookup(e.data,s)})}componentWillReceiveProps(e){const{usersList:t,data:a,formValues:i}=e,{lookupList:l}=this.state;let s=[];t&&t.rows&&Array.isArray(t.rows)&&t.rows.length>0&&t.rows.forEach((e,t)=>{let a={label:`${e.firstName} ${e.lastName}`,value:e.username};s.push(a)});let r=t&&t.rows&&Array.isArray(t.rows)&&t.rows.length>0&&t.rows.find((e,t)=>e.username===this.getReportedValue()),o=r&&{label:`${r.firstName} ${r.lastName}`,value:r.username};if(t&&t.count>this.state.maxUsersLimit){let e=this.getReportedValue(!0);o={label:`${e.firstName} ${e.lastName}`,value:e.username}}this.setState({usersList:t,options:s,selectedOptions:o||{}})}getValue(){const{caseValueFields:e,data:t,formValues:a}=this.props;return e&&-1!==e.indexOf(t.fieldName)?"reporter"===t.fieldName?a.data[t.fieldName]?a.data[t.fieldName].firstName+" "+a.data[t.fieldName].lastName+" ("+a.data[t.fieldName].email+")":"":a.data[t.fieldName]?a.data[t.fieldName].firstName+" "+a.data[t.fieldName].lastName:"":a[t.fieldName]?a[t.fieldName]:a.data[t.fieldName]?a.data[t.fieldName]:""}getReportedValue(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{caseValueFields:t,data:a,formValues:i}=this.props;return e&&t&&-1!==t.indexOf(a.fieldName)?i.data[a.fieldName]?i.data[a.fieldName]:"":t&&-1!==t.indexOf(a.fieldName)?i.data[a.fieldName]?i.data[a.fieldName].username:"":i[a.fieldName]?i[a.fieldName]:i.data[a.fieldName]?i.data[a.fieldName]:""}handleCreateUser(){this.setState({openModal:!0})}newUser(e){this.setState({usersList:{rows:[e,...this.state.usersList.rows]},options:[{label:`${e.firstName} ${e.lastName}`,value:e.username},...this.state.options]},()=>{this.setState({openModal:!1}),this.props.updateUser(e)})}closeModal(){this.setState({openModal:!1})}onLookupSubmit(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.getRequestedFor(e,t)}onLookUpReset(){this.setState({lookUpSearchText:"",loading:!1,lookupList:[]})}renderReportedSelect(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{options:a,usersList:l,selectedOptions:s}=this.state,{formValues:r,data:n,identity:{profile:c},globalSetting:u}=this.props;let h="false";if(u){const{uiFeature:e}=u;let t=e;t&&t.tickets&&t.tickets.disableCreateUser&&(h=t.tickets.disableCreateUser)}let f=r&&r.data&&r.data.reportedFor&&r.data.reportedFor.firstName;return n&&"reportedFor"===n.fieldName&&e&&!f&&this.getUserInfo(c.tenantId,c.userId),t&&(e=t),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},o.a.createElement(i.a,{w:"82%",mr:1},o.a.createElement(d.a,{className:"dropdown-select",options:t?[]:a,onChange:this.onReportChange.bind(this),value:s,isDisabled:t})),o.a.createElement(i.a,null,o.a.createElement(p.a,{title:this.props.t("Search Requested For"),btnStyle:{colorScheme:"blue",size:"md",fontSize:"20px",background:"#fff"},onSubmit:this.onLookupSubmit.bind(this),list:this.state.lookupList,limit:this.state.lookUpLimit,loading:this.state.loading,reset:this.onLookUpReset.bind(this),onChange:this.onLookUpChange.bind(this)}))),o.a.createElement(i.a,null,"false"===h&&"approvals"!==window.location.pathname.split("/")[1]&&o.a.createElement("div",null,o.a.createElement("button",{className:"min-btn",disabled:"watcher"===r.UserRoleOnTicket,style:{margin:0,marginTop:2},onClick:this.handleCreateUser.bind(this)},"+ Add Requestor"),this.state.openModal&&o.a.createElement(m.a,{cancel:this.closeModal.bind(this),openModal:this.state.openModal,newUser:this.newUser.bind(this),customer:this.props.customer,tenant:this.props.tenant}))))}onReportChange(e){const{usersList:t}=this.state;let a=t&&t.rows&&Array.isArray(t.rows)&&t.rows.length>0&&t.rows.find((t,a)=>t.username===e.value);a&&this.props.handleReportChange(a,!1)}onLookUpChange(e){e&&this.props.handleReportChange(e,!0)}render(){const{usersList:e}=this.state,{data:t,formValues:a,t:i,identity:{profile:l}}=this.props;let r=this.props.location&&this.props.location.state&&this.props.location.state.isAdvanceSearchApplied,n=Object(u.b)(a,t,l,this.props.create),d=Object(u.c)(a,t,l,this.props.create);if(r&&n)return o.a.createElement(o.a.Fragment,null);return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"ts-main clearfix"},o.a.createElement("label",null,i(t.fieldProperties.label)),o.a.createElement("div",{className:"ts-drop"},(()=>{var l,r,n,c,p;return t.fieldName&&"status"===t.fieldName?o.a.createElement("p",null,(null===a||void 0===a?void 0:a.data[null===t||void 0===t?void 0:t.fieldName])&&(null===a||void 0===a||null===(l=a.data[null===t||void 0===t?void 0:t.fieldName])||void 0===l?void 0:l.transitionLabel)?i(null===a||void 0===a||null===(r=a.data[null===t||void 0===t?void 0:t.fieldName])||void 0===r?void 0:r.transitionLabel):(null===a||void 0===a||null===(n=a.data[null===t||void 0===t?void 0:t.fieldName])||void 0===n?void 0:n.toState)?null===a||void 0===a||null===(c=a.data[null===t||void 0===t?void 0:t.fieldName])||void 0===c?void 0:c.toState:null===a||void 0===a||null===(p=a.data[null===t||void 0===t?void 0:t.fieldName])||void 0===p?void 0:p.label):!t.fieldName||"createdAt"!==t.fieldName&&"updatedAt"!==t.fieldName?t.fieldName&&"reportedFor"===t.fieldName?this.renderReportedSelect(d,!!(e.count&&e.count>this.state.maxUsersLimit)):o.a.createElement("p",null,this.getValue()):o.a.createElement("p",null,i(a[t.fieldName])?i("{{date, date}}",{date:a[t.fieldName]&&""!=a[t.fieldName]?s()(a[t.fieldName]).local().format("MMM-DD-YYYY  hh:mm:ss A"):"--"}):a.data[t.fieldName]?i("{{date, date}}",{date:a.data[t.fieldName]&&""!=a.data[t.fieldName]?s()(a.data[t.fieldName]).local().format("MMM-DD-YYYY  hh:mm:ss A"):"--"}):"")})())))}}t.a=Object(n.c)()(h)},7418:function(e,t,a){"use strict";var i=a(97),l=a(355),s=a.n(l),r=a(469),o=a.n(r),n=a(264),d=a.n(n),c=a(1),p=a.n(c),m=a(305),u=(a(693),a(12)),h=a(515),f=a(1109);a(7362);class g extends c.Component{constructor(e){super(e),this.parseInput=e=>{if(e&&e.length>0){const t=d()(e,{renderer:this.render_content()}),a=o()(t),l=i.ContentState.createFromBlockArray(a.contentBlocks);this.setState({editorState:i.EditorState.createWithContent(l)})}},this.preTag=e=>p.a.createElement("pre",null,JSON.stringify(e,null,2)),this.onEditorStateChange=e=>{const{data:t}=this.props;let a=!1;t.fieldProperties.displayLength&&(a=t.fieldProperties.displayLength);let i=s()(e);this.setState({editorState:e}),this.setState({editorHtml:i});let l={value:i.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)+/gm,"").trim()};this.props.handleChange(t.fieldName,l,a)},this.checkData=()=>{const{editorState:e}=this.state;this.setState({editorHtml:s()(e)})},this.render_content=()=>
1{let e=new d.a.Renderer;return e.list=function(e,t,a){let i=e.replace(/(<p>)/gim,"").replace(/<\/p>/gim,"");return t?`<ol>${i}</ol>`:`<ul>${i}</ul>`},e.blockquote=function(e){return`<blockquote>${e.replace(/(<p>)/gim,"").replace(/<\/p>/gim,"")}</blockquote>`},e.code=function(e){return e},e.image=function(e,t,a){return`<img src="${e}" alt="Image" title="Image"><p></p>`},e},this.setEditorReference=e=>{this.editorReferece=e},this.state={editorState:i.EditorState.createEmpty(),editorHtml:this.props.formValues,edit:!1,fieldName:null}}componentWillMount(){}componentDidMount(){const{data:e,formValues:t}=this.props;t&&t.data&&t.data[e.fieldName]&&""!=t.data[e.fieldName]&&t.data[e.fieldName].length>0?(this.parseInput(t.data[e.fieldName]),this.setState({edit:!0})):this.setState({edit:!1})}componentWillReceiveProps(e){const{data:t,formValues:a}=e;let i;i=t.fieldProperties.value?t.fieldProperties.value:a.data[t.fieldName]?a.data[t.fieldName]:"",i&&""!=i&&i.length>0&&this.parseInput(i)}componentWillUnmount(){}UploadImages(e){}render(){const{editorState:e,edit:t,editorStatePlainValue:a}=this.state,{data:i,formValues:l,errorMsg:s,t:r}=this.props,o={options:["inline","list","link"],inline:{options:["bold","italic","underline"]},list:{options:["unordered","ordered"]},textAlign:{options:["left","center","right","justify"]},link:{inDropdown:!1,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"]}};let n=this.props.i18n.language;return n=n&&n.slice(0,2),p.a.createElement("div",{className:"custom-form-grp clearfix"},p.a.createElement(h.a,{for:i.fieldProperties&&i.fieldProperties.label,sm:3},i.fieldProperties&&r(i.fieldProperties.label)),p.a.createElement("div",{className:"grp-split"},t&&p.a.createElement(f.a,{errMsg:this.props.t("Something went wrong! email send to support team. Don't edit the ticket")},p.a.createElement(m.Editor,{localization:{locale:n},className:"txt-editor",toolbar:o,editorRef:this.setEditorReference,defaultEditorState:e,value:e,onChange:this.onEditorStateChange.bind(this)})),!t&&p.a.createElement(f.a,{errMsg:this.props.t("Something went wrong! email send to support team. Don't edit the ticket")},p.a.createElement(m.Editor,{localization:{locale:n},className:"txt-editor",toolbar:o,value:e,onChange:this.onEditorStateChange.bind(this)})),this.props.touched&&[1,!0].includes(i.fieldProperties.required)&&(!l.data[i.fieldName]||""===l.data[i.fieldName])&&p.a.createElement("div",{className:"error-message"},r(i.fieldProperties.errorMessage)),s&&s[i.fieldName]&&p.a.createElement("div",{className:"error-message"},r(s[i.fieldName]))))}}t.a=Object(u.c)()(g)},7419:function(e,t,a){"use strict";var i=a(1),l=a.n(i),s=a(12),r=a(159),o=a.n(r),n=a(515),d=a(7293),c=a(7328),p=a(7286),m=a(7330),u=a(329);var h=e=>{const t=(t,a)=>{e.modalChange(e.field,e.name,e.e,t)};return l.a.createElement("div",null,l.a.createElement(d.a,{isOpen:!0},l.a.createElement(c.a,null,e.t("Confirm")),l.a.createElement(p.a,null,e.t(e.body)),l.a.createElement(m.a,null,l.a.createElement(u.a,{color:"primary",onClick:t.bind(void 0,!0)},e.t("OK"))," ",l.a.createElement(u.a,{color:"secondary",onClick:t.bind(void 0,!1)},e.t("Cancel")))))},f=a(7358);class g extends l.a.Component{constructor(e){super(e),this.state={selectedOption:null,modal:!1,modalBody:null}}componentWillMount(){}componentWillReceiveProps(e){const{data:t,formValues:a,formEnums:i,caseValueFields:l}=e;if(t.fieldName&&a&&i){let e=[];
1if(l&&-1!==l.indexOf(t.fieldName)){let e="assignedTo"===t.fieldName&&a.data.assignTicketTo?a.data.assignTicketTo:a.data[t.fieldName]?a.data[t.fieldName].username:null;this.setState({selectedOption:i&&i[t.fieldName]&&i[t.fieldName].find(t=>t.value===e)||null})}else e=a[t.fieldName]?a[t.fieldName]:a.data[t.fieldName]?a.data[t.fieldName]:null,this.setState({selectedOption:i&&i[t.fieldName]&&i[t.fieldName].find(t=>t.value===e)||e&&{value:e,label:e}||null})}let s=JSON.parse(localStorage.getItem("refreshSelect"));s&&s[t.fieldName]&&this.setState({selectedOption:null})}modalChange(e,t,a,i){i&&this.onChange(null,t,a),this.setState({modal:!1})}onChange(e,t,a){var i,l;const s=e&&(null===e||void 0===e?void 0:e.fieldProperties)&&(null===e||void 0===e||null===(i=e.fieldProperties)||void 0===i?void 0:i.isValueObj);if(e&&e.fieldProperties&&e.fieldProperties.modal&&a&&(null===(l=this.state)||void 0===l?void 0:l.selectedOption)){let i={body:e.fieldProperties.modalBody||"",modalChange:this.modalChange.bind(this),field:e,name:t,e:a};this.setState({modal:!0,modalBody:i})}else this.setState({selectedOption:a,modal:!1,modalBody:null}),s?this.props.handleDropdownChange(t,a,s):this.props.handleDropdownChange(t,a)}render(){const{data:e,formValues:t,t:a,changeLoading:i,identity:s}=this.props;let r,d=this.props.location&&this.props.location.state&&this.props.location.state.isAdvanceSearchApplied,c=Object(f.b)(t,e,s.profile,this.props.create,this.props.tenantConfig),p=Object(f.c)(t,e,s.profile,this.props.create);if(this.props.create&&t&&t.fieldProperties&&t.fieldProperties.showIn&&t.fieldProperties.showIn.create&&!t.fieldProperties.showIn.create.isRestrictedReadAccess&&(c=!1,p=!1),!this.props.create&&e.fieldProperties.showIn.detail.readOnlyOnEdit&&(r=!0),this.props&&this.props.formEnums[e.fieldName]&&this.props.formEnums[e.fieldName].length&&this.props.formEnums[e.fieldName].forEach(e=>{e.label=a(e.label)}),c)return l.a.createElement(l.a.Fragment,null);let m={data:this.props.formEnums[e.fieldName],valueField:"value",textField:"label",containerClassName:"asc-multiselect-dropdownlist",onChange:this.onChange.bind(this,e,e.fieldName),required:!!e.fieldProperties.required&&e.fieldProperties.required,value:this.state.selectedOption&&Object.keys(this.state.selectedOption).length>0?this.state.selectedOption:e.fieldProperties.default,placeholder:e.fieldProperties.placeholder?a(e.fieldProperties.placeholder):null,readOnly:!!e.fieldProperties.readOnly,disabled:!(!e.fieldProperties.disabled&&!r)||!(!d&&!p),busy:!!i,messages:{moveBack:a("Navigate back"),moveForward:a("Navigate forward"),dateButton:a("Select date"),timeButton:a("Select time"),openCombobox:a("open combobox"),openDropdown:a("open dropdown"),emptyList:a("There are no items in this list"),emptyFilter:a("The filter returned no results")}};return l.a.createElement("div",{className:"custom-form-grp clearfix"},this.state.modal&&l.a.createElement(h,Object.assign({},this.props,{open:this.state.modal},this.state.modalBody)),l.a.createElement(n.a,{for:e.fieldName,sm:5},a(e.fieldProperties.label)),l.a.createElement("div",{className:"grp-split"},l.a.createElement(o.a,m),this.props.touched&&[1,!0].includes(e.fieldProperties.required)&&(!t.data[e.fieldName]||""===t.data[e.fieldName])&&l.a.createElement("div",{className:"error-message"},a(e.fieldProperties.errorMessage))))}}t.a=Object(s.c)()(g)}}]);
2//# sourceMappingURL=2.57ccffda.chunk.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.