@mypatientspace/chatbot-widget 1.0.68 → 1.0.69
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.
|
@@ -14865,7 +14865,7 @@ const Ba = () => {
|
|
|
14865
14865
|
/* @__PURE__ */ S.jsxs(g1, { fontFamily: s.fontFamily, children: [
|
|
14866
14866
|
A,
|
|
14867
14867
|
" v",
|
|
14868
|
-
"1.0.
|
|
14868
|
+
"1.0.69"
|
|
14869
14869
|
] })
|
|
14870
14870
|
] })
|
|
14871
14871
|
] }),
|
|
@@ -16604,7 +16604,7 @@ const jp = U.div`
|
|
|
16604
16604
|
k(Lt.target.value);
|
|
16605
16605
|
}, []), Nt = C.useCallback(() => {
|
|
16606
16606
|
P();
|
|
16607
|
-
}, [P]), Xt =
|
|
16607
|
+
}, [P]), Xt = !1, L = u || !z.trim(), vt = s.disclaimerText ?? d?.chatUiConfig?.cautionaryMessageOnCompletions ?? "AI can make mistakes. Verify important information.";
|
|
16608
16608
|
C.useEffect(() => {
|
|
16609
16609
|
!A && !u && X.current && X.current.focus();
|
|
16610
16610
|
}, [A, u]);
|
|
@@ -806,7 +806,7 @@ Error generating stack: `+a.message+`
|
|
|
806
806
|
display: flex;
|
|
807
807
|
align-items: center;
|
|
808
808
|
gap: 6px;
|
|
809
|
-
`,$0=()=>{const{close:l,config:u,theme:s,assistant:r,isExpanded:d,toggleExpanded:h,startNewChat:y}=pa(),T=u.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",S=u.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",g=u.headerSubtitle||r?.chatUiConfig?.headerSubtitle,A=u.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return x.jsxs(C0,{theme:s,children:[x.jsxs(T0,{children:[x.jsx(E0,{theme:s,hasCustomIcon:!0,children:x.jsx(z0,{src:S,alt:""})}),x.jsxs(A0,{children:[x.jsx(M0,{fontFamily:s.fontFamily,children:T}),g&&x.jsx(_0,{fontFamily:s.fontFamily,children:g}),x.jsxs(w0,{fontFamily:s.fontFamily,children:[A," v","1.0.
|
|
809
|
+
`,$0=()=>{const{close:l,config:u,theme:s,assistant:r,isExpanded:d,toggleExpanded:h,startNewChat:y}=pa(),T=u.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",S=u.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",g=u.headerSubtitle||r?.chatUiConfig?.headerSubtitle,A=u.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return x.jsxs(C0,{theme:s,children:[x.jsxs(T0,{children:[x.jsx(E0,{theme:s,hasCustomIcon:!0,children:x.jsx(z0,{src:S,alt:""})}),x.jsxs(A0,{children:[x.jsx(M0,{fontFamily:s.fontFamily,children:T}),g&&x.jsx(_0,{fontFamily:s.fontFamily,children:g}),x.jsxs(w0,{fontFamily:s.fontFamily,children:[A," v","1.0.69"]})]})]}),x.jsxs(O0,{children:[x.jsx(qu,{theme:s,onClick:y,"aria-label":"Start new chat",children:x.jsx($m,{size:16})}),x.jsx(qu,{theme:s,onClick:h,"aria-label":d?"Collapse chat":"Expand chat",children:d?x.jsx(Xs,{size:16}):x.jsx(Gs,{size:16})}),u.floatingMode&&x.jsx(qu,{theme:s,onClick:l,"aria-label":"Minimize chat",children:x.jsx(Ys,{size:16})})]})]})},D0=H.div`
|
|
810
810
|
position: relative;
|
|
811
811
|
background-color: ${({theme:l})=>l.colors.background};
|
|
812
812
|
border-bottom: 1px solid ${({theme:l})=>l.colors.borderLight};
|
|
@@ -1777,7 +1777,7 @@ Error generating stack: `+a.message+`
|
|
|
1777
1777
|
&:active {
|
|
1778
1778
|
transform: scale(0.95);
|
|
1779
1779
|
}
|
|
1780
|
-
`,hb=()=>{const{sendMessage:l,isTyping:u,config:s,theme:r,assistant:d,currentQuestion:h,surveyProgress:y,submitSurveyAnswer:T,skipSurveyQuestion:S,cancelSurvey:g}=pa(),A=h!==null,[z,k]=C.useState(""),X=C.useRef(null),Q=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:Y,isSupported:R,transcript:Z,toggleRecording:P,clearTranscript:V}=of({onError:Lt=>{console.error("Voice recording error:",Lt)}});C.useEffect(()=>{Z&&k(Z)},[Z]);const ut=C.useCallback(()=>{const Lt=X.current;Lt&&(Lt.style.height="auto",Lt.style.height=`${Math.min(Lt.scrollHeight,150)}px`)},[]);C.useEffect(()=>{ut()},[z,ut]);const j=C.useCallback(()=>{z.trim()&&!u&&(l(z),k(""),V(),X.current&&(X.current.style.height="auto",X.current.focus()))},[z,u,l,V]),ot=C.useCallback(Lt=>{Lt.key==="Enter"&&!Lt.shiftKey&&(Lt.preventDefault(),j())},[j]),J=C.useCallback(Lt=>{k(Lt.target.value)},[]),jt=C.useCallback(()=>{P()},[P]),Xt
|
|
1780
|
+
`,hb=()=>{const{sendMessage:l,isTyping:u,config:s,theme:r,assistant:d,currentQuestion:h,surveyProgress:y,submitSurveyAnswer:T,skipSurveyQuestion:S,cancelSurvey:g}=pa(),A=h!==null,[z,k]=C.useState(""),X=C.useRef(null),Q=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:Y,isSupported:R,transcript:Z,toggleRecording:P,clearTranscript:V}=of({onError:Lt=>{console.error("Voice recording error:",Lt)}});C.useEffect(()=>{Z&&k(Z)},[Z]);const ut=C.useCallback(()=>{const Lt=X.current;Lt&&(Lt.style.height="auto",Lt.style.height=`${Math.min(Lt.scrollHeight,150)}px`)},[]);C.useEffect(()=>{ut()},[z,ut]);const j=C.useCallback(()=>{z.trim()&&!u&&(l(z),k(""),V(),X.current&&(X.current.style.height="auto",X.current.focus()))},[z,u,l,V]),ot=C.useCallback(Lt=>{Lt.key==="Enter"&&!Lt.shiftKey&&(Lt.preventDefault(),j())},[j]),J=C.useCallback(Lt=>{k(Lt.target.value)},[]),jt=C.useCallback(()=>{P()},[P]),Xt=!1,L=u||!z.trim(),vt=s.disclaimerText??d?.chatUiConfig?.cautionaryMessageOnCompletions??"AI can make mistakes. Verify important information.";C.useEffect(()=>{!A&&!u&&X.current&&X.current.focus()},[A,u]);const Yt=()=>Y?"Listening...":Q;return A&&h?x.jsxs(gf,{theme:r,children:[x.jsx(pf,{questionInfo:h,progress:y,onAnswer:T,onSkip:S,onCancel:g,theme:r}),vt&&x.jsx(mf,{theme:r,children:vt})]}):x.jsxs(gf,{theme:r,children:[x.jsxs(ub,{theme:r,disabled:Xt,children:[x.jsx(rb,{ref:X,theme:r,value:z,onChange:J,onKeyDown:ot,placeholder:Yt(),disabled:Xt,"aria-label":"Message input",rows:1}),x.jsxs(cb,{children:[R&&x.jsx(db,{theme:r,onClick:jt,isRecording:Y,"aria-label":Y?"Stop recording":"Start voice recording",title:Y?"Stop recording":"Start voice recording",children:x.jsx(Qs,{size:18})}),x.jsx(sb,{theme:r,onClick:j,disabled:L,"aria-label":"Send message",children:x.jsx(Ha,{size:18})})]})]}),vt&&x.jsx(mf,{theme:r,children:vt})]})},pb=fn`
|
|
1781
1781
|
from { opacity: 0; }
|
|
1782
1782
|
to { opacity: 1; }
|
|
1783
1783
|
`,gb=fn`
|
|
@@ -12758,7 +12758,7 @@ const Xp = [
|
|
|
12758
12758
|
/* @__PURE__ */ v.jsxs(Ip, { fontFamily: s.fontFamily, children: [
|
|
12759
12759
|
O,
|
|
12760
12760
|
" v",
|
|
12761
|
-
"1.0.
|
|
12761
|
+
"1.0.69"
|
|
12762
12762
|
] })
|
|
12763
12763
|
] })
|
|
12764
12764
|
] }),
|
|
@@ -14497,7 +14497,7 @@ const K0 = H.div`
|
|
|
14497
14497
|
w(Gt.target.value);
|
|
14498
14498
|
}, []), Nt = M.useCallback(() => {
|
|
14499
14499
|
F();
|
|
14500
|
-
}, [F]), $t =
|
|
14500
|
+
}, [F]), $t = !1, Vt = c || !A.trim(), Rt = s.disclaimerText ?? d?.chatUiConfig?.cautionaryMessageOnCompletions ?? "AI can make mistakes. Verify important information.";
|
|
14501
14501
|
M.useEffect(() => {
|
|
14502
14502
|
!O && !c && Q.current && Q.current.focus();
|
|
14503
14503
|
}, [O, c]);
|
|
@@ -82,7 +82,7 @@ Error generating stack: `+a.message+`
|
|
|
82
82
|
display: flex;
|
|
83
83
|
align-items: center;
|
|
84
84
|
gap: 6px;
|
|
85
|
-
`,xm=()=>{const{close:n,config:c,theme:s,assistant:r,isExpanded:d,toggleExpanded:y,startNewChat:S}=Wl(),C=c.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",x=c.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",m=c.headerSubtitle||r?.chatUiConfig?.headerSubtitle,_=c.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return v.jsxs(fm,{theme:s,children:[v.jsxs(dm,{children:[v.jsx(hm,{theme:s,hasCustomIcon:!0,children:v.jsx(ym,{src:x,alt:""})}),v.jsxs(mm,{children:[v.jsx(gm,{fontFamily:s.fontFamily,children:C}),m&&v.jsx(pm,{fontFamily:s.fontFamily,children:m}),v.jsxs(vm,{fontFamily:s.fontFamily,children:[_," v","1.0.
|
|
85
|
+
`,xm=()=>{const{close:n,config:c,theme:s,assistant:r,isExpanded:d,toggleExpanded:y,startNewChat:S}=Wl(),C=c.headerTitle||r?.chatUiConfig?.avatarTitle||"AI Doctor",x=c.headerIcon||r?.chatUiConfig?.avatarImage?.iconURL||r?.chatUiConfig?.avatarImage?.thumbnailURL||"https://web.mypatientspace.com/img/logo-symbol.png",m=c.headerSubtitle||r?.chatUiConfig?.headerSubtitle,_=c.brandingText||r?.chatUiConfig?.brandingText||"Developed by myPatientSpace";return v.jsxs(fm,{theme:s,children:[v.jsxs(dm,{children:[v.jsx(hm,{theme:s,hasCustomIcon:!0,children:v.jsx(ym,{src:x,alt:""})}),v.jsxs(mm,{children:[v.jsx(gm,{fontFamily:s.fontFamily,children:C}),m&&v.jsx(pm,{fontFamily:s.fontFamily,children:m}),v.jsxs(vm,{fontFamily:s.fontFamily,children:[_," v","1.0.69"]})]})]}),v.jsxs(bm,{children:[v.jsx(nc,{theme:s,onClick:S,"aria-label":"Start new chat",children:v.jsx(om,{size:16})}),v.jsx(nc,{theme:s,onClick:y,"aria-label":d?"Collapse chat":"Expand chat",children:d?v.jsx(gs,{size:16}):v.jsx(ys,{size:16})}),c.floatingMode&&v.jsx(nc,{theme:s,onClick:n,"aria-label":"Minimize chat",children:v.jsx(nm,{size:16})})]})]})},Sm=N.div`
|
|
86
86
|
position: relative;
|
|
87
87
|
background-color: ${({theme:n})=>n.colors.background};
|
|
88
88
|
border-bottom: 1px solid ${({theme:n})=>n.colors.borderLight};
|
|
@@ -1053,7 +1053,7 @@ Error generating stack: `+a.message+`
|
|
|
1053
1053
|
&:active {
|
|
1054
1054
|
transform: scale(0.95);
|
|
1055
1055
|
}
|
|
1056
|
-
`,lp=()=>{const{sendMessage:n,isTyping:c,config:s,theme:r,assistant:d,currentQuestion:y,surveyProgress:S,submitSurveyAnswer:C,skipSurveyQuestion:x,cancelSurvey:m}=Wl(),_=y!==null,[A,w]=M.useState(""),Q=M.useRef(null),Y=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:q,isSupported:L,transcript:k,toggleRecording:F,clearTranscript:V}=ps({onError:Gt=>{console.error("Voice recording error:",Gt)}});M.useEffect(()=>{k&&w(k)},[k]);const st=M.useCallback(()=>{const Gt=Q.current;Gt&&(Gt.style.height="auto",Gt.style.height=`${Math.min(Gt.scrollHeight,150)}px`)},[]);M.useEffect(()=>{st()},[A,st]);const B=M.useCallback(()=>{A.trim()&&!c&&(n(A),w(""),V(),Q.current&&(Q.current.style.height="auto",Q.current.focus()))},[A,c,n,V]),tt=M.useCallback(Gt=>{Gt.key==="Enter"&&!Gt.shiftKey&&(Gt.preventDefault(),B())},[B]),X=M.useCallback(Gt=>{w(Gt.target.value)},[]),Nt=M.useCallback(()=>{F()},[F]),$t
|
|
1056
|
+
`,lp=()=>{const{sendMessage:n,isTyping:c,config:s,theme:r,assistant:d,currentQuestion:y,surveyProgress:S,submitSurveyAnswer:C,skipSurveyQuestion:x,cancelSurvey:m}=Wl(),_=y!==null,[A,w]=M.useState(""),Q=M.useRef(null),Y=s.placeholder||d?.chatUiConfig?.placeholder||"Type a message...",{isRecording:q,isSupported:L,transcript:k,toggleRecording:F,clearTranscript:V}=ps({onError:Gt=>{console.error("Voice recording error:",Gt)}});M.useEffect(()=>{k&&w(k)},[k]);const st=M.useCallback(()=>{const Gt=Q.current;Gt&&(Gt.style.height="auto",Gt.style.height=`${Math.min(Gt.scrollHeight,150)}px`)},[]);M.useEffect(()=>{st()},[A,st]);const B=M.useCallback(()=>{A.trim()&&!c&&(n(A),w(""),V(),Q.current&&(Q.current.style.height="auto",Q.current.focus()))},[A,c,n,V]),tt=M.useCallback(Gt=>{Gt.key==="Enter"&&!Gt.shiftKey&&(Gt.preventDefault(),B())},[B]),X=M.useCallback(Gt=>{w(Gt.target.value)},[]),Nt=M.useCallback(()=>{F()},[F]),$t=!1,Kt=c||!A.trim(),Rt=s.disclaimerText??d?.chatUiConfig?.cautionaryMessageOnCompletions??"AI can make mistakes. Verify important information.";M.useEffect(()=>{!_&&!c&&Q.current&&Q.current.focus()},[_,c]);const Yt=()=>q?"Listening...":Y;return _&&y?v.jsxs(Cs,{theme:r,children:[v.jsx(As,{questionInfo:y,progress:S,onAnswer:C,onSkip:x,onCancel:m,theme:r}),Rt&&v.jsx(_s,{theme:r,children:Rt})]}):v.jsxs(Cs,{theme:r,children:[v.jsxs(Wg,{theme:r,disabled:$t,children:[v.jsx(Fg,{ref:Q,theme:r,value:A,onChange:X,onKeyDown:tt,placeholder:Yt(),disabled:$t,"aria-label":"Message input",rows:1}),v.jsxs(Ig,{children:[L&&v.jsx(ep,{theme:r,onClick:Nt,isRecording:q,"aria-label":q?"Stop recording":"Start voice recording",title:q?"Stop recording":"Start voice recording",children:v.jsx(ms,{size:18})}),v.jsx(Pg,{theme:r,onClick:B,disabled:Kt,"aria-label":"Send message",children:v.jsx(ba,{size:18})})]})]}),Rt&&v.jsx(_s,{theme:r,children:Rt})]})},ap=tl`
|
|
1057
1057
|
from { opacity: 0; }
|
|
1058
1058
|
to { opacity: 1; }
|
|
1059
1059
|
`,np=tl`
|
package/package.json
CHANGED