ed-widget 1.56.2 → 1.56.3-alpha.2
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/ed-widget.js +1 -1
- package/npm/ed-widget.js +1 -1
- package/package.json +1 -1
package/dist/ed-widget.js
CHANGED
|
@@ -1748,7 +1748,7 @@ If anything else comes up, I'm just one message away. 👋`,channelConnecting:"P
|
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function xS(t,e){if(t.kind==="FragmentSpread")e.add(t.name.value);else if(t.kind==="VariableDefinition"){var n=t.type;n.kind==="NamedType"&&e.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(r){xS(r,e)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(r){xS(r,e)}),t.definitions&&t.definitions.forEach(function(r){xS(r,e)})}var y4={};(function(){g4.definitions.forEach(function(e){if(e.name){var n=new Set;xS(e,n),y4[e.name.value]=n}})})();function nV(t,e){for(var n=0;n<t.definitions.length;n++){var r=t.definitions[n];if(r.name&&r.name.value==e)return r}}function lue(t,e){var n={kind:t.kind,definitions:[nV(t,e)]};t.hasOwnProperty("loc")&&(n.loc=t.loc);var r=y4[e]||new Set,i=new Set,s=new Set;for(r.forEach(function(u){s.add(u)});s.size>0;){var l=s;s=new Set,l.forEach(function(u){if(!i.has(u)){i.add(u);var d=y4[u]||new Set;d.forEach(function(h){s.add(h)})}})}return i.forEach(function(u){var d=nV(t,u);d&&n.definitions.push(d)}),n}const uue=lue(g4,"CREATE_OR_UPDATE_A_CONVERSATION_ACTIVITY_REALTIME_STATUS"),cue=()=>{const[t]=ic(uue);return{handleCreateOrUpdateRealtimeStatus:async(n,r=()=>{})=>{try{const{data:i}=await t({variables:{inputData:n}});r(i==null?void 0:i.createOrUpdateAConversationActivityRealtimeStatus)}catch(i){console.error(i)}}}},fue=["image/jpeg","image/png","application/pdf"],due=({conversationId:t,handleCreateMessage:e,useAITemplate:n=!0,onAIThinkingChange:r,isAIThinking:i})=>{const s=L.useRef(null),l=L.useRef(null),u=L.useRef(null),[d,h]=L.useState(""),[m,g]=L.useState([]),[y,b]=L.useState(!1),{sendMessage:E}=E_(),{handleCreateOrUpdateRealtimeStatus:w}=cue(),x=async H=>{var G;const W=H==null?void 0:H.name,Q=(G=W==null?void 0:W.split)==null?void 0:G.call(W,"."),J=Rt.last(Q),X=`${C5()}.${J}`,Y=await D5({name:X,sub_type:t,type:"conversation_activity_attachment"});return Y!=null&&Y.url?{name:X,file:H,title:W,policy:Y}:(Xr("error",`${W} cannot be uploaded`,"top-left"),null)},R=async H=>{H.preventDefault();const W=5*1024*1024,Q=Array.from(H.target.files);let J="";if(Rt.forEach(Q,X=>{if(!fue.includes(X.type)){J=`${X.name} is not supported. `;return}if(X.size>W){J="Each file must be under 5MB";return}}),J){Xr("error",J,"top-left");return}try{const X=[];for(let G=0;G<Q.length;G+=1)X.push(x(Q[G]));const Y=await Promise.all(X);g(G=>[...G,...Y.filter(K=>K!==null)])}catch(X){console.error("Error occurred while fetching policies:",X)}u.current.value=null},N=H=>{g(W=>W.filter((Q,J)=>J!==H)),u.current&&(u.current.value="")},D=m.slice(0,5),O=m.length-5;L.useEffect(()=>{const H=s.current,W=l.current;if(H&&W){H.style.height="auto";const J=W.offsetWidth*.5,X=Math.min(H.scrollHeight,J);H.style.height=`${X}px`,W.style.height=`${X+16}px`,H.style.overflowY=H.scrollHeight>J?"auto":"hidden"}},[d,m]);const A=async H=>{if(H&&H.preventDefault(),!(!d&&!m.length)){b(!0);try{const W=Rt.size(m)&&await tue(m,t);n?(await sue({message:d,conversationId:t,sendMessage:E,files:W}),setTimeout(()=>{r&&r(!0)},100)):await e({message:d,is_customer_reply:!0,current_stage:"agent_chat",...W&&{files:W}}),h(""),g([]),setTimeout(()=>{s.current&&s.current.focus()},150)}catch(W){console.error("Error sending message:",W),n&&r&&r(!1)}finally{b(!1)}}},P=L.useMemo(()=>!MG(d)&&!Rt.size(m)||y||i,[d,m,y]),F=async H=>{H?await w({conversation_id:t,is_writing_reply:!0}):await w({conversation_id:t,is_writing_reply:!1})},z=H=>{H.key==="Enter"&&!H.shiftKey&&!y&&!P&&(H.preventDefault(),A(H))};return T.jsxs(T.Fragment,{children:[m.length>0&&T.jsxs("div",{className:"ed-flex ed-flex-wrap ed-items-center ed-gap-2 ed-mb-2",children:[D.map((H,W)=>T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-text-12 ed-font-medium ed-text-border-regular ed-bg-white-light ed-p-1.5 ed-rounded-full",children:[T.jsx("span",{className:"ed-truncate ed-max-w-[100px]",children:H.name}),T.jsx("button",{type:"button",onClick:()=>N(W),className:"ed-text-border hover:ed-text-border-dark ed-flex-shrink-0",children:T.jsx(us,{size:14})})]},H)),O>0&&T.jsxs("span",{className:"ed-text-12 ed-text-border-regular",children:["+",O," ",O===1?"item":"items"]})]}),T.jsxs("div",{ref:l,className:"ed-border ed-border-border-light ed-rounded-3xl ed-flex ed-justify-between ed-transition-all ed-duration-200",style:{padding:"8px 16px",border:"1px solid #D8E0ED",borderRadius:"24px"},children:[T.jsx("div",{className:"ed-flex-1 ed-flex ed-flex-col ed-min-w-0",children:T.jsx("textarea",{ref:s,value:d,onBlur:()=>F(!1),onChange:H=>h(H.target.value),onFocus:()=>F(!0),onKeyDown:H=>z(H),rows:1,className:"ed-w-full ed-text-14 ed-min-h-[24px] ed-resize-none ed-overflow-x-auto ed-outline-none ed-bg-transparent ed-no-scrollbar",placeholder:"Enter your message",disabled:y,style:{border:"none",outline:"none",fontSize:"14px",fontFamily:"inherit",color:"inherit",lineHeight:"1.5",padding:0,margin:0}})}),T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2.5 ed-ml-2 ed-flex-shrink-0",children:[T.jsx("input",{type:"file",ref:u,onChange:R,className:"ed-hidden",accept:".pdf, .png, .jpeg, .jpg",multiple:!0,disabled:y}),!n&&T.jsx(mS,{content:T.jsx("p",{className:"ed-text-12 ed-text-center ed-font-medium ed-text-regular",children:"Supported file types: jpg, png, pdf (max 5MB)"}),children:T.jsx("button",{type:"button",onClick:()=>{var H;return(H=u.current)==null?void 0:H.click()},className:"ed-text-border hover:ed-text-border-dark",children:T.jsx(Y_,{className:"ed-size-5 ed-cursor-pointer ed-mt-2"})})}),T.jsx("button",{onClick:A,type:"button",disabled:P,children:y?T.jsx(qf,{className:"ed-size-5"}):T.jsx(e5,{className:`${P?"ed-text-border":"ed-text-brand"} ed-size-5`})})]})]})]})},rV=t=>`<p>${t}</p>
|
|
1751
|
-
`,iV=({type:t="no_results",showChatButton:e=!0,onCreateTicket:n,sendMessage:r,conversationId:i,setIsAIThinking:s,onChannelSelection:l})=>{const{setActiveTab:u,orgBrandSetting:d}=du(),[h,m]=L.useState(!1),[g,y]=L.useState(!1),{is_knowledge_base_enabled:b,is_off_hour:E}=d||{},w=t==="no_results",x=Nr.quickActions.searchKnowledgeBase,R=Nr.quickActions.tryAnotherQuestion,N=w?Nr.quickActions.chatWithAgent:Nr.quickActions.chatWithAgentShort,D=w?Nr.quickActions.createTicket:Nr.quickActions.createTicketShort,{loading:O,data:A}=kh(N1,{errorPolicy:"all",fetchPolicy:"no-cache",skip:!i,variables:{queryData:{is_live_chat_enabled:!0}}});L.useEffect(()=>{var z;!O&&(A!=null&&A.getChannelsForPortal)&&y(Rt.size((z=A==null?void 0:A.getChannelsForPortal)==null?void 0:z.data)>0)},[A,O]);const P=()=>{var z;return((z=A==null?void 0:A.getChannelsForPortal)==null?void 0:z.data)||[]},F=async(z,H,W=!1,Q=!1)=>{if(!h){m(!0),W&&s&&s(!0);try{if(r&&i){const J=rV(z),X={conversation_id:i,message:J,is_customer_reply:!0};if(W){const Y=P();if(Rt.size(Y)===1&&l){const K=Y[0];await l({message:J,is_customer_reply:!0,channel_id:K.id});return}X.auto_response_trigger_type="recommend_channel",X.message_template=ES.recommend_channel,X.current_stage="recommend_channel",X.next_stage="select_channel"}else Q?X.current_stage="try_another_question":(X.auto_response_trigger_type="summarize_issue",X.message_template=ES.summarize_issue,X.current_stage="req_for_support_ticket",X.next_stage="create_a_support_ticket");await r(X)}H&&H()}catch{W&&s&&s(!1)}finally{setTimeout(()=>m(!1),500)}}};return T.jsxs("div",{className:"ed-pl-16 ed-space-y-2 ed-px-5 ed-flex ed-flex-col",children:[(w||e||g)&&!E&&T.jsxs("button",{type:"button",onClick:()=>F(N,()=>{},!0),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["💬 ",N]}),T.jsxs("button",{type:"button",onClick:()=>F(D,n,!1),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["📝 ",D]}),b&&T.jsx("button",{type:"button",onClick:()=>u("knowledge_base"),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:x}),T.jsx("button",{type:"button",onClick:()=>F(R,n,!1,!0),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:R})]})},_S=({type:t="initial",onYes:e=()=>{},onNo:n=()=>{},sendMessage:r,conversationId:i})=>{const[s,l]=L.useState(!1),u=t==="initial",d=Nr.quickActions.tryAnotherQuestion,h=u?Nr.quickActions.yes:Nr.quickActions.yesMore,m=u?Nr.quickActions.no:Nr.quickActions.noThanks,g=async(y,b,E,w=!1)=>{if(!s){l(!0);try{if(r&&i){const x=rV(y,b),R={conversation_id:i,message:x,is_customer_reply:!0};w&&(R.current_stage="try_another_question"),await r(R)}E&&E()}finally{setTimeout(()=>l(!1),500)}}};return T.jsxs("div",{className:`ed-max-w-[65%] ed-w-max ed-ml-16 ed-p-2.5 ed-flex ${t!=="followup"?"ed-flex-col ed-space-y-2 ed-bg-white-light":"ed-gap-2"} ed-rounded-lg ed-mt-2 ed-text-[13px]`,children:[t!=="followup"&&T.jsx("p",{children:"Was this helpful, or would you like to explore more?"}),T.jsx("button",{type:"button",onClick:()=>g(h,!0,e),disabled:s,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:h}),T.jsx("button",{type:"button",onClick:()=>g(m,!1,n),disabled:s,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:m}),u&&T.jsx("button",{type:"button",onClick:()=>g(d,!1,()=>{},!0),disabled:s,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:d})]})},hue=({onSubmit:t})=>{var s,l;const[e,n]=L.useState(!1),{data:r,loading:i}=kh(N1,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{is_live_chat_enabled:!0}}});return i?null:(l=(s=r==null?void 0:r.getChannelsForPortal)==null?void 0:s.data)==null?void 0:l.map(u=>T.jsx("div",{className:"ed-max-w-[87%] ed-ml-auto ed-mb-2 ed-px-5",children:T.jsx("button",{type:"button",disabled:e,className:`ed-border ed-border-brand ed-text-12 ed-text-brand ed-p-1 ed-rounded ${e?"ed-opacity-50 ed-cursor-not-allowed":""}`,onClick:()=>{n(!0),t({is_customer_reply:!0,message:`<span style="font-size:12px; padding:4px; color:#172554; font-weight:600;" className="selected-channel">
|
|
1751
|
+
`,iV=({type:t="no_results",showChatButton:e=!0,onCreateTicket:n,sendMessage:r,conversationId:i,setIsAIThinking:s,onChannelSelection:l})=>{const{setActiveTab:u,orgBrandSetting:d}=du(),[h,m]=L.useState(!1),[g,y]=L.useState(!1),{is_knowledge_base_enabled:b,is_off_hour:E}=d||{},w=t==="no_results",x=Nr.quickActions.searchKnowledgeBase,R=Nr.quickActions.tryAnotherQuestion,N=w?Nr.quickActions.chatWithAgent:Nr.quickActions.chatWithAgentShort,D=w?Nr.quickActions.createTicket:Nr.quickActions.createTicketShort,{loading:O,data:A}=kh(N1,{errorPolicy:"all",fetchPolicy:"no-cache",skip:!i,variables:{queryData:{is_live_chat_enabled:!0}}});L.useEffect(()=>{var z;!O&&(A!=null&&A.getChannelsForPortal)&&y(Rt.size((z=A==null?void 0:A.getChannelsForPortal)==null?void 0:z.data)>0)},[A,O]);const P=()=>{var z;return((z=A==null?void 0:A.getChannelsForPortal)==null?void 0:z.data)||[]},F=async(z,H,W=!1,Q=!1)=>{if(!h){m(!0),W&&s&&s(!0);try{if(r&&i){const J=rV(z),X={conversation_id:i,message:J,is_customer_reply:!0};if(W){const Y=P();if(Rt.size(Y)===1&&l){const K=Y[0];await l({message:J,is_customer_reply:!0,channel_id:K.id});return}X.auto_response_trigger_type="recommend_channel",X.message_template=ES.recommend_channel,X.fallback_message_template="<p>I couldn't find the right channel to recommend based on what you've shared so far.</p><br/><p>Please tell me more about your issue, or choose a channel below:</p>",X.current_stage="recommend_channel",X.next_stage="select_channel"}else Q?X.current_stage="try_another_question":(X.auto_response_trigger_type="summarize_issue",X.message_template=ES.summarize_issue,X.fallback_message_template="<p>It looks like this chat is too short to summarize right now.</p><br/><p>Please provide more details about your issue, or choose to create a support ticket:</p>",X.current_stage="req_for_support_ticket",X.next_stage="create_a_support_ticket");await r(X)}H&&H()}catch{W&&s&&s(!1)}finally{setTimeout(()=>m(!1),500)}}};return T.jsxs("div",{className:"ed-pl-16 ed-space-y-2 ed-px-5 ed-flex ed-flex-col",children:[(w||e||g)&&!E&&T.jsxs("button",{type:"button",onClick:()=>F(N,()=>{},!0),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["💬 ",N]}),T.jsxs("button",{type:"button",onClick:()=>F(D,n,!1),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["📝 ",D]}),b&&T.jsx("button",{type:"button",onClick:()=>u("knowledge_base"),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:x}),T.jsx("button",{type:"button",onClick:()=>F(R,n,!1,!0),disabled:h,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:R})]})},_S=({type:t="initial",onYes:e=()=>{},onNo:n=()=>{},sendMessage:r,conversationId:i})=>{const[s,l]=L.useState(!1),u=t==="initial",d=Nr.quickActions.tryAnotherQuestion,h=u?Nr.quickActions.yes:Nr.quickActions.yesMore,m=u?Nr.quickActions.no:Nr.quickActions.noThanks,g=async(y,b,E,w=!1)=>{if(!s){l(!0);try{if(r&&i){const x=rV(y,b),R={conversation_id:i,message:x,is_customer_reply:!0};w&&(R.current_stage="try_another_question"),await r(R)}E&&E()}finally{setTimeout(()=>l(!1),500)}}};return T.jsxs("div",{className:`ed-max-w-[65%] ed-w-max ed-ml-16 ed-p-2.5 ed-flex ${t!=="followup"?"ed-flex-col ed-space-y-2 ed-bg-white-light":"ed-gap-2"} ed-rounded-lg ed-mt-2 ed-text-[13px]`,children:[t!=="followup"&&T.jsx("p",{children:"Was this helpful, or would you like to explore more?"}),T.jsx("button",{type:"button",onClick:()=>g(h,!0,e),disabled:s,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:h}),T.jsx("button",{type:"button",onClick:()=>g(m,!1,n),disabled:s,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:m}),u&&T.jsx("button",{type:"button",onClick:()=>g(d,!1,()=>{},!0),disabled:s,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:d})]})},hue=({onSubmit:t})=>{var s,l;const[e,n]=L.useState(!1),{data:r,loading:i}=kh(N1,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{is_live_chat_enabled:!0}}});return i?null:(l=(s=r==null?void 0:r.getChannelsForPortal)==null?void 0:s.data)==null?void 0:l.map(u=>T.jsx("div",{className:"ed-max-w-[87%] ed-ml-auto ed-mb-2 ed-px-5",children:T.jsx("button",{type:"button",disabled:e,className:`ed-border ed-border-brand ed-text-12 ed-text-brand ed-p-1 ed-rounded ${e?"ed-opacity-50 ed-cursor-not-allowed":""}`,onClick:()=>{n(!0),t({is_customer_reply:!0,message:`<span style="font-size:12px; padding:4px; color:#172554; font-weight:600;" className="selected-channel">
|
|
1752
1752
|
${u==null?void 0:u.name}
|
|
1753
1753
|
</span>`,channel_id:u==null?void 0:u.id,channel_name:u==null?void 0:u.name})},children:u==null?void 0:u.name})},u==null?void 0:u.id))};var b4={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CREATE_A_SATISFACTION_RATING"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inputData"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SatisfactionRatingCreateInputType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createASatisfactionRating"},arguments:[{kind:"Argument",name:{kind:"Name",value:"inputData"},value:{kind:"Variable",name:{kind:"Name",value:"inputData"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"satisfaction_rating_type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"optional_question_responses"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"open_ended_question_response"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"created_at"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:326}};b4.loc.source={body:`mutation CREATE_A_SATISFACTION_RATING($inputData: SatisfactionRatingCreateInputType!) {
|
|
1754
1754
|
createASatisfactionRating(inputData: $inputData) {
|
package/npm/ed-widget.js
CHANGED
|
@@ -1547,7 +1547,7 @@ If anything else comes up, I'm just one message away. 👋`,channelConnecting:"P
|
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
1549
|
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function qf(t,e){if(t.kind==="FragmentSpread")e.add(t.name.value);else if(t.kind==="VariableDefinition"){var n=t.type;n.kind==="NamedType"&&e.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(r){qf(r,e)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(r){qf(r,e)}),t.definitions&&t.definitions.forEach(function(r){qf(r,e)})}var by={};(function(){yy.definitions.forEach(function(e){if(e.name){var n=new Set;qf(e,n),by[e.name.value]=n}})})();function S_(t,e){for(var n=0;n<t.definitions.length;n++){var r=t.definitions[n];if(r.name&&r.name.value==e)return r}}function AG(t,e){var n={kind:t.kind,definitions:[S_(t,e)]};t.hasOwnProperty("loc")&&(n.loc=t.loc);var r=by[e]||new Set,i=new Set,o=new Set;for(r.forEach(function(s){o.add(s)});o.size>0;){var a=o;o=new Set,a.forEach(function(s){if(!i.has(s)){i.add(s);var c=by[s]||new Set;c.forEach(function(u){o.add(u)})}})}return i.forEach(function(s){var c=S_(t,s);c&&n.definitions.push(c)}),n}const kG=AG(yy,"CREATE_OR_UPDATE_A_CONVERSATION_ACTIVITY_REALTIME_STATUS"),TG=()=>{const[t]=_o(kG);return{handleCreateOrUpdateRealtimeStatus:async(n,r=()=>{})=>{try{const{data:i}=await t({variables:{inputData:n}});r(i==null?void 0:i.createOrUpdateAConversationActivityRealtimeStatus)}catch(i){console.error(i)}}}},OG=["image/jpeg","image/png","application/pdf"],NG=({conversationId:t,handleCreateMessage:e,useAITemplate:n=!0,onAIThinkingChange:r,isAIThinking:i})=>{const o=O.useRef(null),a=O.useRef(null),s=O.useRef(null),[c,u]=O.useState(""),[d,h]=O.useState([]),[p,m]=O.useState(!1),{sendMessage:y}=wm(),{handleCreateOrUpdateRealtimeStatus:b}=TG(),v=async P=>{var j;const F=P==null?void 0:P.name,U=(j=F==null?void 0:F.split)==null?void 0:j.call(F,"."),B=Me.last(U),G=`${Sg()}.${B}`,D=await Mg({name:G,sub_type:t,type:"conversation_activity_attachment"});return D!=null&&D.url?{name:G,file:P,title:F,policy:D}:(Kt("error",`${F} cannot be uploaded`,"top-left"),null)},E=async P=>{P.preventDefault();const F=5*1024*1024,U=Array.from(P.target.files);let B="";if(Me.forEach(U,G=>{if(!OG.includes(G.type)){B=`${G.name} is not supported. `;return}if(G.size>F){B="Each file must be under 5MB";return}}),B){Kt("error",B,"top-left");return}try{const G=[];for(let j=0;j<U.length;j+=1)G.push(v(U[j]));const D=await Promise.all(G);h(j=>[...j,...D.filter(V=>V!==null)])}catch(G){console.error("Error occurred while fetching policies:",G)}s.current.value=null},x=P=>{h(F=>F.filter((U,B)=>B!==P)),s.current&&(s.current.value="")},A=d.slice(0,5),w=d.length-5;O.useEffect(()=>{const P=o.current,F=a.current;if(P&&F){P.style.height="auto";const B=F.offsetWidth*.5,G=Math.min(P.scrollHeight,B);P.style.height=`${G}px`,F.style.height=`${G+16}px`,P.style.overflowY=P.scrollHeight>B?"auto":"hidden"}},[c,d]);const S=async P=>{if(P&&P.preventDefault(),!(!c&&!d.length)){m(!0);try{const F=Me.size(d)&&await bG(d,t);n?(await _G({message:c,conversationId:t,sendMessage:y,files:F}),setTimeout(()=>{r&&r(!0)},100)):await e({message:c,is_customer_reply:!0,current_stage:"agent_chat",...F&&{files:F}}),u(""),h([]),setTimeout(()=>{o.current&&o.current.focus()},150)}catch(F){console.error("Error sending message:",F),n&&r&&r(!1)}finally{m(!1)}}},k=O.useMemo(()=>!JO(c)&&!Me.size(d)||p||i,[c,d,p]),T=async P=>{P?await b({conversation_id:t,is_writing_reply:!0}):await b({conversation_id:t,is_writing_reply:!1})},R=P=>{P.key==="Enter"&&!P.shiftKey&&!p&&!k&&(P.preventDefault(),S(P))};return C.jsxs(C.Fragment,{children:[d.length>0&&C.jsxs("div",{className:"ed-flex ed-flex-wrap ed-items-center ed-gap-2 ed-mb-2",children:[A.map((P,F)=>C.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-text-12 ed-font-medium ed-text-border-regular ed-bg-white-light ed-p-1.5 ed-rounded-full",children:[C.jsx("span",{className:"ed-truncate ed-max-w-[100px]",children:P.name}),C.jsx("button",{type:"button",onClick:()=>x(F),className:"ed-text-border hover:ed-text-border-dark ed-flex-shrink-0",children:C.jsx(qr,{size:14})})]},P)),w>0&&C.jsxs("span",{className:"ed-text-12 ed-text-border-regular",children:["+",w," ",w===1?"item":"items"]})]}),C.jsxs("div",{ref:a,className:"ed-border ed-border-border-light ed-rounded-3xl ed-flex ed-justify-between ed-transition-all ed-duration-200",style:{padding:"8px 16px",border:"1px solid #D8E0ED",borderRadius:"24px"},children:[C.jsx("div",{className:"ed-flex-1 ed-flex ed-flex-col ed-min-w-0",children:C.jsx("textarea",{ref:o,value:c,onBlur:()=>T(!1),onChange:P=>u(P.target.value),onFocus:()=>T(!0),onKeyDown:P=>R(P),rows:1,className:"ed-w-full ed-text-14 ed-min-h-[24px] ed-resize-none ed-overflow-x-auto ed-outline-none ed-bg-transparent ed-no-scrollbar",placeholder:"Enter your message",disabled:p,style:{border:"none",outline:"none",fontSize:"14px",fontFamily:"inherit",color:"inherit",lineHeight:"1.5",padding:0,margin:0}})}),C.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2.5 ed-ml-2 ed-flex-shrink-0",children:[C.jsx("input",{type:"file",ref:s,onChange:E,className:"ed-hidden",accept:".pdf, .png, .jpeg, .jpg",multiple:!0,disabled:p}),!n&&C.jsx(Wf,{content:C.jsx("p",{className:"ed-text-12 ed-text-center ed-font-medium ed-text-regular",children:"Supported file types: jpg, png, pdf (max 5MB)"}),children:C.jsx("button",{type:"button",onClick:()=>{var P;return(P=s.current)==null?void 0:P.click()},className:"ed-text-border hover:ed-text-border-dark",children:C.jsx(Qm,{className:"ed-size-5 ed-cursor-pointer ed-mt-2"})})}),C.jsx("button",{onClick:S,type:"button",disabled:k,children:p?C.jsx(ga,{className:"ed-size-5"}):C.jsx(tg,{className:`${k?"ed-text-border":"ed-text-brand"} ed-size-5`})})]})]})]})},w_=t=>`<p>${t}</p>
|
|
1550
|
-
`,x_=({type:t="no_results",showChatButton:e=!0,onCreateTicket:n,sendMessage:r,conversationId:i,setIsAIThinking:o,onChannelSelection:a})=>{const{setActiveTab:s,orgBrandSetting:c}=io(),[u,d]=O.useState(!1),[h,p]=O.useState(!1),{is_knowledge_base_enabled:m,is_off_hour:y}=c||{},b=t==="no_results",v=Ft.quickActions.searchKnowledgeBase,E=Ft.quickActions.tryAnotherQuestion,x=b?Ft.quickActions.chatWithAgent:Ft.quickActions.chatWithAgentShort,A=b?Ft.quickActions.createTicket:Ft.quickActions.createTicketShort,{loading:w,data:S}=as(Wc,{errorPolicy:"all",fetchPolicy:"no-cache",skip:!i,variables:{queryData:{is_live_chat_enabled:!0}}});O.useEffect(()=>{var R;!w&&(S!=null&&S.getChannelsForPortal)&&p(Me.size((R=S==null?void 0:S.getChannelsForPortal)==null?void 0:R.data)>0)},[S,w]);const k=()=>{var R;return((R=S==null?void 0:S.getChannelsForPortal)==null?void 0:R.data)||[]},T=async(R,P,F=!1,U=!1)=>{if(!u){d(!0),F&&o&&o(!0);try{if(r&&i){const B=w_(R),G={conversation_id:i,message:B,is_customer_reply:!0};if(F){const D=k();if(Me.size(D)===1&&a){const V=D[0];await a({message:B,is_customer_reply:!0,channel_id:V.id});return}G.auto_response_trigger_type="recommend_channel",G.message_template=Xf.recommend_channel,G.current_stage="recommend_channel",G.next_stage="select_channel"}else U?G.current_stage="try_another_question":(G.auto_response_trigger_type="summarize_issue",G.message_template=Xf.summarize_issue,G.current_stage="req_for_support_ticket",G.next_stage="create_a_support_ticket");await r(G)}P&&P()}catch{F&&o&&o(!1)}finally{setTimeout(()=>d(!1),500)}}};return C.jsxs("div",{className:"ed-pl-16 ed-space-y-2 ed-px-5 ed-flex ed-flex-col",children:[(b||e||h)&&!y&&C.jsxs("button",{type:"button",onClick:()=>T(x,()=>{},!0),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["💬 ",x]}),C.jsxs("button",{type:"button",onClick:()=>T(A,n,!1),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["📝 ",A]}),m&&C.jsx("button",{type:"button",onClick:()=>s("knowledge_base"),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:v}),C.jsx("button",{type:"button",onClick:()=>T(E,n,!1,!0),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:E})]})},$f=({type:t="initial",onYes:e=()=>{},onNo:n=()=>{},sendMessage:r,conversationId:i})=>{const[o,a]=O.useState(!1),s=t==="initial",c=Ft.quickActions.tryAnotherQuestion,u=s?Ft.quickActions.yes:Ft.quickActions.yesMore,d=s?Ft.quickActions.no:Ft.quickActions.noThanks,h=async(p,m,y,b=!1)=>{if(!o){a(!0);try{if(r&&i){const v=w_(p,m),E={conversation_id:i,message:v,is_customer_reply:!0};b&&(E.current_stage="try_another_question"),await r(E)}y&&y()}finally{setTimeout(()=>a(!1),500)}}};return C.jsxs("div",{className:`ed-max-w-[65%] ed-w-max ed-ml-16 ed-p-2.5 ed-flex ${t!=="followup"?"ed-flex-col ed-space-y-2 ed-bg-white-light":"ed-gap-2"} ed-rounded-lg ed-mt-2 ed-text-[13px]`,children:[t!=="followup"&&C.jsx("p",{children:"Was this helpful, or would you like to explore more?"}),C.jsx("button",{type:"button",onClick:()=>h(u,!0,e),disabled:o,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:u}),C.jsx("button",{type:"button",onClick:()=>h(d,!1,n),disabled:o,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:d}),s&&C.jsx("button",{type:"button",onClick:()=>h(c,!1,()=>{},!0),disabled:o,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:c})]})},RG=({onSubmit:t})=>{var o,a;const[e,n]=O.useState(!1),{data:r,loading:i}=as(Wc,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{is_live_chat_enabled:!0}}});return i?null:(a=(o=r==null?void 0:r.getChannelsForPortal)==null?void 0:o.data)==null?void 0:a.map(s=>C.jsx("div",{className:"ed-max-w-[87%] ed-ml-auto ed-mb-2 ed-px-5",children:C.jsx("button",{type:"button",disabled:e,className:`ed-border ed-border-brand ed-text-12 ed-text-brand ed-p-1 ed-rounded ${e?"ed-opacity-50 ed-cursor-not-allowed":""}`,onClick:()=>{n(!0),t({is_customer_reply:!0,message:`<span style="font-size:12px; padding:4px; color:#172554; font-weight:600;" className="selected-channel">
|
|
1550
|
+
`,x_=({type:t="no_results",showChatButton:e=!0,onCreateTicket:n,sendMessage:r,conversationId:i,setIsAIThinking:o,onChannelSelection:a})=>{const{setActiveTab:s,orgBrandSetting:c}=io(),[u,d]=O.useState(!1),[h,p]=O.useState(!1),{is_knowledge_base_enabled:m,is_off_hour:y}=c||{},b=t==="no_results",v=Ft.quickActions.searchKnowledgeBase,E=Ft.quickActions.tryAnotherQuestion,x=b?Ft.quickActions.chatWithAgent:Ft.quickActions.chatWithAgentShort,A=b?Ft.quickActions.createTicket:Ft.quickActions.createTicketShort,{loading:w,data:S}=as(Wc,{errorPolicy:"all",fetchPolicy:"no-cache",skip:!i,variables:{queryData:{is_live_chat_enabled:!0}}});O.useEffect(()=>{var R;!w&&(S!=null&&S.getChannelsForPortal)&&p(Me.size((R=S==null?void 0:S.getChannelsForPortal)==null?void 0:R.data)>0)},[S,w]);const k=()=>{var R;return((R=S==null?void 0:S.getChannelsForPortal)==null?void 0:R.data)||[]},T=async(R,P,F=!1,U=!1)=>{if(!u){d(!0),F&&o&&o(!0);try{if(r&&i){const B=w_(R),G={conversation_id:i,message:B,is_customer_reply:!0};if(F){const D=k();if(Me.size(D)===1&&a){const V=D[0];await a({message:B,is_customer_reply:!0,channel_id:V.id});return}G.auto_response_trigger_type="recommend_channel",G.message_template=Xf.recommend_channel,G.fallback_message_template="<p>I couldn't find the right channel to recommend based on what you've shared so far.</p><br/><p>Please tell me more about your issue, or choose a channel below:</p>",G.current_stage="recommend_channel",G.next_stage="select_channel"}else U?G.current_stage="try_another_question":(G.auto_response_trigger_type="summarize_issue",G.message_template=Xf.summarize_issue,G.fallback_message_template="<p>It looks like this chat is too short to summarize right now.</p><br/><p>Please provide more details about your issue, or choose to create a support ticket:</p>",G.current_stage="req_for_support_ticket",G.next_stage="create_a_support_ticket");await r(G)}P&&P()}catch{F&&o&&o(!1)}finally{setTimeout(()=>d(!1),500)}}};return C.jsxs("div",{className:"ed-pl-16 ed-space-y-2 ed-px-5 ed-flex ed-flex-col",children:[(b||e||h)&&!y&&C.jsxs("button",{type:"button",onClick:()=>T(x,()=>{},!0),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["💬 ",x]}),C.jsxs("button",{type:"button",onClick:()=>T(A,n,!1),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:["📝 ",A]}),m&&C.jsx("button",{type:"button",onClick:()=>s("knowledge_base"),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:v}),C.jsx("button",{type:"button",onClick:()=>T(E,n,!1,!0),disabled:u,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:E})]})},$f=({type:t="initial",onYes:e=()=>{},onNo:n=()=>{},sendMessage:r,conversationId:i})=>{const[o,a]=O.useState(!1),s=t==="initial",c=Ft.quickActions.tryAnotherQuestion,u=s?Ft.quickActions.yes:Ft.quickActions.yesMore,d=s?Ft.quickActions.no:Ft.quickActions.noThanks,h=async(p,m,y,b=!1)=>{if(!o){a(!0);try{if(r&&i){const v=w_(p,m),E={conversation_id:i,message:v,is_customer_reply:!0};b&&(E.current_stage="try_another_question"),await r(E)}y&&y()}finally{setTimeout(()=>a(!1),500)}}};return C.jsxs("div",{className:`ed-max-w-[65%] ed-w-max ed-ml-16 ed-p-2.5 ed-flex ${t!=="followup"?"ed-flex-col ed-space-y-2 ed-bg-white-light":"ed-gap-2"} ed-rounded-lg ed-mt-2 ed-text-[13px]`,children:[t!=="followup"&&C.jsx("p",{children:"Was this helpful, or would you like to explore more?"}),C.jsx("button",{type:"button",onClick:()=>h(u,!0,e),disabled:o,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:u}),C.jsx("button",{type:"button",onClick:()=>h(d,!1,n),disabled:o,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:d}),s&&C.jsx("button",{type:"button",onClick:()=>h(c,!1,()=>{},!0),disabled:o,className:"ed-w-min ed-whitespace-nowrap ed-px-2.5 ed-py-1 ed-text-left ed-bg-white ed-border ed-border-brand ed-rounded-lg hover:ed-bg-gray-50 ed-transition-colors ed-text-12 ed-font-medium ed-text-brand disabled:ed-opacity-50 disabled:ed-cursor-not-allowed",children:c})]})},RG=({onSubmit:t})=>{var o,a;const[e,n]=O.useState(!1),{data:r,loading:i}=as(Wc,{errorPolicy:"all",fetchPolicy:"no-cache",variables:{queryData:{is_live_chat_enabled:!0}}});return i?null:(a=(o=r==null?void 0:r.getChannelsForPortal)==null?void 0:o.data)==null?void 0:a.map(s=>C.jsx("div",{className:"ed-max-w-[87%] ed-ml-auto ed-mb-2 ed-px-5",children:C.jsx("button",{type:"button",disabled:e,className:`ed-border ed-border-brand ed-text-12 ed-text-brand ed-p-1 ed-rounded ${e?"ed-opacity-50 ed-cursor-not-allowed":""}`,onClick:()=>{n(!0),t({is_customer_reply:!0,message:`<span style="font-size:12px; padding:4px; color:#172554; font-weight:600;" className="selected-channel">
|
|
1551
1551
|
${s==null?void 0:s.name}
|
|
1552
1552
|
</span>`,channel_id:s==null?void 0:s.id,channel_name:s==null?void 0:s.name})},children:s==null?void 0:s.name})},s==null?void 0:s.id))};var Cy={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CREATE_A_SATISFACTION_RATING"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inputData"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SatisfactionRatingCreateInputType"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createASatisfactionRating"},arguments:[{kind:"Argument",name:{kind:"Name",value:"inputData"},value:{kind:"Variable",name:{kind:"Name",value:"inputData"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conversation"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"satisfaction_rating_type"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"optional_question_responses"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"open_ended_question_response"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"created_at"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:326}};Cy.loc.source={body:`mutation CREATE_A_SATISFACTION_RATING($inputData: SatisfactionRatingCreateInputType!) {
|
|
1553
1553
|
createASatisfactionRating(inputData: $inputData) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ed-widget",
|
|
3
3
|
"description": "A flexible and lightweight EasyDesk chat widget for React apps and websites. Supports both React integration and CDN-based embedding for fast, real-time customer support.",
|
|
4
|
-
"version": "1.56.2",
|
|
4
|
+
"version": "1.56.3-alpha.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Gain Solutions AS",
|
|
7
7
|
"license": "MIT",
|