@chatwoot/agent-react-components 4.2.0-dev.8f47496373 → 4.2.1-1749719612.f0e376c0d9

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.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -129,7 +129,7 @@ ${WNe(r)}`}function JE(t,e){const r=zg(e),a=jI(t,r);let o=t;a>-1&&(o=o.substring
129
129
  `,[Wt.RIGHT]:`
130
130
  "bubble avatar"
131
131
  "meta spacer"
132
- `})[c.value]),h=K(()=>e.status===dt.FAILED?!1:e.groupWithNext),m=K(()=>!(e.messageType===rr.ACTIVITY||c.value===Wt.LEFT)),f=K(()=>{var j;if(e.isEmailInbox&&!e.private&&[rr.INCOMING,rr.OUTGOING].includes(e.messageType))return X8;if(e.contentType===zo.INPUT_CSAT)return R9e;if([zo.INPUT_SELECT,zo.FORM].includes(e.contentType))return P9e;if(e.contentType===zo.INCOMING_EMAIL)return X8;if((j=e.contentAttributes)!=null&&j.isUnsupported)return s9e;if(e.contentAttributes.type==="dyte")return b9e;if(e.contentAttributes.imageType==="story_mention")return jAe;if(Array.isArray(e.attachments)&&e.attachments.length===1){const J=e.attachments[0].fileType;if(!e.content){if(J===jt.IMAGE)return kAe;if(J===jt.FILE)return OAe;if(J===jt.AUDIO)return LAe;if(J===jt.VIDEO||J===jt.IG_REEL)return q8;if(J===jt.LOCATION)return E9e}if(J===jt.CONTACT)return l9e}return hAe}),b=K(()=>{var j;return!((j=e.contentAttributes)!=null&&j.isUnsupported)}),k=K(()=>e.messageType!==rr.ACTIVITY),C=K(()=>{var j;return(j=e.contentAttributes)==null?void 0:j.deleted}),w=K(()=>({id:e.id,content_attributes:e.contentAttributes,content:e.content,conversation_id:e.conversationId})),v=K(()=>{const j=!!e.content,J=!!(e.attachments&&e.attachments.length>0),_=e.messageType===rr.OUTGOING,B=e.status===dt.FAILED||e.status===dt.PROGRESS;return{copy:j,delete:(j||J)&&!B&&!C.value,cannedResponse:_&&j&&!C.value,copyLink:!B,translate:!B&&!C.value&&j,replyTo:!e.private&&e.inboxSupportsReplyTo.outgoing&&!B}}),A=K(()=>{var T;const j=!!(e.attachments&&e.attachments.length>0),J=e.contentType===zo.INCOMING_EMAIL,_=(T=e.contentAttributes)==null?void 0:T.isUnsupported,B=e.contentType===zo.INTEGRATIONS;return j||e.content||J||_||B});function E(j){var _,B;(_=j.target)!=null&&_.classList.contains("skip-context-menu")||((B=j.target)==null?void 0:B.tagName.toLowerCase())==="a"||getSelection().toString()||(j.preventDefault(),j.type==="contextmenu"&&_1(s5.OPEN_MESSAGE_CONTEXT_MENU),r.value={x:j.pageX||j.clientX,y:j.pageY||j.clientY},o.value=!0)}function M(){o.value=!1,r.value={x:null,y:null}}function P(){const j=ac.MESSAGE_REPLY_TO,{conversationId:J,id:_}=e;rc.updateJsonStore(j,J,_),yr.emit(Ri.TOGGLE_REPLY_TO_MESSAGE,e)}const S=K(()=>{if(!e.sender)return{name:i("CONVERSATION.BOT"),src:""};const{sender:j}=e,{name:J,type:_,avatarUrl:B,thumbnail:T}=j||{};return[ol.AGENT_BOT,ol.CAPTAIN_ASSISTANT].includes(_)?{name:J??"",src:B??""}:{name:J??"",src:T??""}}),N=K(()=>S.value.name===""?"":`${i("CONVERSATION.SENT_BY")} ${S.value.name}`);return $t(()=>{var J;if(Number((J=n==null?void 0:n.query)==null?void 0:J.messageId)!==Number(e.id))return;a.value=!0,sV(()=>{a.value=!1},1e3)}),dB({...pf(e),isPrivate:K(()=>e.private),variant:s,orientation:c,isBotOrAgentMessage:l,shouldGroupWithNext:h}),(j,J)=>{const _=Kr("tooltip");return A.value?(W(),ie("div",{key:0,id:`message${e.id}`,class:Ne(["flex w-full message-bubble-container mb-2",[u.value,{"group-with-next":h.value,"bg-n-alpha-1":a.value}]]),"data-message-id":e.id},[s.value===ae(pt).ACTIVITY?(W(),ie("div",NDe,[pe(pAe,{content:t.content},null,8,["content"])])):(W(),ie("div",{key:1,class:Ne([[d.value,{"gap-y-2":t.contentAttributes.externalError,"w-full":s.value===ae(pt).EMAIL}],"gap-x-2"]),style:Nt({gridTemplateAreas:g.value})},[!h.value&&m.value?it((W(),ie("div",DDe,[pe(Yx,Zs(S.value,{size:24}),null,16)])),[[_,N.value,void 0,{"left-end":!0}]]):ce("",!0),oe("div",{class:Ne(["[grid-area:bubble] flex",{"ltr:ml-8 rtl:mr-8 justify-end":c.value===ae(Wt).RIGHT,"ltr:mr-8 rtl:ml-8":c.value===ae(Wt).LEFT,"min-w-0":s.value===ae(pt).EMAIL}]),onContextmenu:J[0]||(J[0]=B=>E(B))},[(W(),he(zd(f.value)))],34),t.contentAttributes.externalError?(W(),he(z9e,{key:1,class:Ne(["[grid-area:meta]",u.value]),error:t.contentAttributes.externalError},null,8,["class","error"])):ce("",!0)],6)),b.value?(W(),ie("div",VDe,[k.value?(W(),he(ODe,{key:0,"context-menu-position":r.value,"is-open":o.value,"enabled-options":v.value,message:w.value,"hide-button":"",onOpen:E,onClose:M,onReplyTo:P},null,8,["context-menu-position","is-open","enabled-options","message"])):ce("",!0)])):ce("",!0)],10,RDe)):ce("",!0)}}},PDe=Tt(BDe,[["styles",[LDe]]]),FDe={},UDe={class:"w-8 h-4",viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"};function jDe(t,e){return W(),ie("svg",UDe,e[0]||(e[0]=[Kf('<circle cx="15" cy="15" r="12"><animate attributeName="cy" from="15" to="5" begin="0s" dur="0.9s" values="15;5;15;15;15;15" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="55" cy="15" r="12"><animate attributeName="cy" from="15" to="5" begin="0.1s" dur="0.9s" values="15;5;15;15;15;15" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="95" cy="15" r="12"><animate attributeName="cy" from="15" to="5" begin="0.2s" dur="0.9s" values="15;5;15;15;15;15" calcMode="linear" repeatCount="indefinite"></animate></circle>',3)]))}const zDe=Tt(FDe,[["render",jDe]]),YE=[],qDe={mounted(){const t=this.getKeyboardEvents();if(t){const e=this.wrapEventsInKeybindingsHandler(t),r=Ny(e);this.addEventHandler(r)}},unmounted(){var t;if(this.$el&&((t=this.$el.dataset)!=null&&t.keydownHandlerIndex)){const e=YE[this.$el.dataset.keydownHandlerIndex];document.removeEventListener("keydown",e)}},methods:{addEventHandler(t){const e=YE.push(t)-1,r=this.getElementToBind();r&&r.dataset&&(document.addEventListener("keydown",t),r.dataset.keydownHandlerIndex=e)},getElementToBind(){return this.$el},getKeyboardEvents(){return null},wrapEventsInKeybindingsHandler(t){const e={};return Object.keys(t).forEach(r=>{e[r]=this.keydownWrapper(t[r])}),e},keydownWrapper(t){return e=>{const r=typeof t=="function"?t:t.action,a=typeof t=="function"?!1:t.allowOnFocusedInput;Oy(e)&&(Sy(e)&&e.target.blur(),!a)||r(e)}}}};var GI={exports:{}};const GDe=Cd(YD);/*!
132
+ `})[c.value]),h=K(()=>e.status===dt.FAILED?!1:e.groupWithNext),m=K(()=>!(e.messageType===rr.ACTIVITY||c.value===Wt.LEFT)),f=K(()=>{var j;if(e.isEmailInbox&&!e.private&&[rr.INCOMING,rr.OUTGOING].includes(e.messageType))return X8;if(e.contentType===zo.INPUT_CSAT)return R9e;if([zo.INPUT_SELECT,zo.FORM].includes(e.contentType))return P9e;if(e.contentType===zo.INCOMING_EMAIL)return X8;if((j=e.contentAttributes)!=null&&j.isUnsupported)return s9e;if(e.contentAttributes.type==="dyte")return b9e;if(e.contentAttributes.imageType==="story_mention")return jAe;if(Array.isArray(e.attachments)&&e.attachments.length===1){const J=e.attachments[0].fileType;if(!e.content){if(J===jt.IMAGE)return kAe;if(J===jt.FILE)return OAe;if(J===jt.AUDIO)return LAe;if(J===jt.VIDEO||J===jt.IG_REEL)return q8;if(J===jt.LOCATION)return E9e}if(J===jt.CONTACT)return l9e}return hAe}),b=K(()=>{var j;return window.__WOOT_ISOLATED_SHELL__?!1:!((j=e.contentAttributes)!=null&&j.isUnsupported)}),k=K(()=>e.messageType!==rr.ACTIVITY),C=K(()=>{var j;return(j=e.contentAttributes)==null?void 0:j.deleted}),w=K(()=>({id:e.id,content_attributes:e.contentAttributes,content:e.content,conversation_id:e.conversationId})),v=K(()=>{const j=!!e.content,J=!!(e.attachments&&e.attachments.length>0),_=e.messageType===rr.OUTGOING,B=e.status===dt.FAILED||e.status===dt.PROGRESS;return{copy:j,delete:(j||J)&&!B&&!C.value,cannedResponse:_&&j&&!C.value,copyLink:!B,translate:!B&&!C.value&&j,replyTo:!e.private&&e.inboxSupportsReplyTo.outgoing&&!B}}),A=K(()=>{var T;const j=!!(e.attachments&&e.attachments.length>0),J=e.contentType===zo.INCOMING_EMAIL,_=(T=e.contentAttributes)==null?void 0:T.isUnsupported,B=e.contentType===zo.INTEGRATIONS;return j||e.content||J||_||B});function E(j){var _,B;(_=j.target)!=null&&_.classList.contains("skip-context-menu")||((B=j.target)==null?void 0:B.tagName.toLowerCase())==="a"||getSelection().toString()||(j.preventDefault(),j.type==="contextmenu"&&_1(s5.OPEN_MESSAGE_CONTEXT_MENU),r.value={x:j.pageX||j.clientX,y:j.pageY||j.clientY},o.value=!0)}function M(){o.value=!1,r.value={x:null,y:null}}function P(){const j=ac.MESSAGE_REPLY_TO,{conversationId:J,id:_}=e;rc.updateJsonStore(j,J,_),yr.emit(Ri.TOGGLE_REPLY_TO_MESSAGE,e)}const S=K(()=>{if(!e.sender)return{name:i("CONVERSATION.BOT"),src:""};const{sender:j}=e,{name:J,type:_,avatarUrl:B,thumbnail:T}=j||{};return[ol.AGENT_BOT,ol.CAPTAIN_ASSISTANT].includes(_)?{name:J??"",src:B??""}:{name:J??"",src:T??""}}),N=K(()=>S.value.name===""?"":`${i("CONVERSATION.SENT_BY")} ${S.value.name}`);return $t(()=>{var J;if(Number((J=n==null?void 0:n.query)==null?void 0:J.messageId)!==Number(e.id))return;a.value=!0,sV(()=>{a.value=!1},1e3)}),dB({...pf(e),isPrivate:K(()=>e.private),variant:s,orientation:c,isBotOrAgentMessage:l,shouldGroupWithNext:h}),(j,J)=>{const _=Kr("tooltip");return A.value?(W(),ie("div",{key:0,id:`message${e.id}`,class:Ne(["flex w-full message-bubble-container mb-2",[u.value,{"group-with-next":h.value,"bg-n-alpha-1":a.value}]]),"data-message-id":e.id},[s.value===ae(pt).ACTIVITY?(W(),ie("div",NDe,[pe(pAe,{content:t.content},null,8,["content"])])):(W(),ie("div",{key:1,class:Ne([[d.value,{"gap-y-2":t.contentAttributes.externalError,"w-full":s.value===ae(pt).EMAIL}],"gap-x-2"]),style:Nt({gridTemplateAreas:g.value})},[!h.value&&m.value?it((W(),ie("div",DDe,[pe(Yx,Zs(S.value,{size:24}),null,16)])),[[_,N.value,void 0,{"left-end":!0}]]):ce("",!0),oe("div",{class:Ne(["[grid-area:bubble] flex",{"ltr:ml-8 rtl:mr-8 justify-end":c.value===ae(Wt).RIGHT,"ltr:mr-8 rtl:ml-8":c.value===ae(Wt).LEFT,"min-w-0":s.value===ae(pt).EMAIL}]),onContextmenu:J[0]||(J[0]=B=>E(B))},[(W(),he(zd(f.value)))],34),t.contentAttributes.externalError?(W(),he(z9e,{key:1,class:Ne(["[grid-area:meta]",u.value]),error:t.contentAttributes.externalError},null,8,["class","error"])):ce("",!0)],6)),b.value?(W(),ie("div",VDe,[k.value?(W(),he(ODe,{key:0,"context-menu-position":r.value,"is-open":o.value,"enabled-options":v.value,message:w.value,"hide-button":"",onOpen:E,onClose:M,onReplyTo:P},null,8,["context-menu-position","is-open","enabled-options","message"])):ce("",!0)])):ce("",!0)],10,RDe)):ce("",!0)}}},PDe=Tt(BDe,[["styles",[LDe]]]),FDe={},UDe={class:"w-8 h-4",viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"};function jDe(t,e){return W(),ie("svg",UDe,e[0]||(e[0]=[Kf('<circle cx="15" cy="15" r="12"><animate attributeName="cy" from="15" to="5" begin="0s" dur="0.9s" values="15;5;15;15;15;15" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="55" cy="15" r="12"><animate attributeName="cy" from="15" to="5" begin="0.1s" dur="0.9s" values="15;5;15;15;15;15" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="95" cy="15" r="12"><animate attributeName="cy" from="15" to="5" begin="0.2s" dur="0.9s" values="15;5;15;15;15;15" calcMode="linear" repeatCount="indefinite"></animate></circle>',3)]))}const zDe=Tt(FDe,[["render",jDe]]),YE=[],qDe={mounted(){const t=this.getKeyboardEvents();if(t){const e=this.wrapEventsInKeybindingsHandler(t),r=Ny(e);this.addEventHandler(r)}},unmounted(){var t;if(this.$el&&((t=this.$el.dataset)!=null&&t.keydownHandlerIndex)){const e=YE[this.$el.dataset.keydownHandlerIndex];document.removeEventListener("keydown",e)}},methods:{addEventHandler(t){const e=YE.push(t)-1,r=this.getElementToBind();r&&r.dataset&&(document.addEventListener("keydown",t),r.dataset.keydownHandlerIndex=e)},getElementToBind(){return this.$el},getKeyboardEvents(){return null},wrapEventsInKeybindingsHandler(t){const e={};return Object.keys(t).forEach(r=>{e[r]=this.keydownWrapper(t[r])}),e},keydownWrapper(t){return e=>{const r=typeof t=="function"?t:t.action,a=typeof t=="function"?!1:t.allowOnFocusedInput;Oy(e)&&(Sy(e)&&e.target.blur(),!a)||r(e)}}}};var GI={exports:{}};const GDe=Cd(YD);/*!
133
133
  Name: vue-upload-component
134
134
  Component URI: https://github.com/lian-yue/vue-upload-component#readme
135
135
  Version: 3.1.16
package/index.js CHANGED
@@ -56640,7 +56640,7 @@ const RDe = /* @__PURE__ */ Tt(SDe, [["render", LDe], ["styles", [TDe]], ["__sco
56640
56640
  return pAe;
56641
56641
  }), b = K(() => {
56642
56642
  var j;
56643
- return !((j = e.contentAttributes) != null && j.isUnsupported);
56643
+ return window.__WOOT_ISOLATED_SHELL__ ? !1 : !((j = e.contentAttributes) != null && j.isUnsupported);
56644
56644
  }), k = K(() => e.messageType !== rr.ACTIVITY), C = K(() => {
56645
56645
  var j;
56646
56646
  return (j = e.contentAttributes) == null ? void 0 : j.deleted;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatwoot/agent-react-components",
3
- "version": "4.2.0-dev.8f47496373",
3
+ "version": "4.2.1-1749719612.f0e376c0d9",
4
4
  "description": "React components for Chatwoot messaging interface with Vue Web Components",
5
5
  "main": "index.cjs",
6
6
  "module": "index.js",