@tsiky/components-r19 8.2.6 → 8.2.7
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/index.cjs.js
CHANGED
|
@@ -8421,7 +8421,7 @@
|
|
|
8421
8421
|
padding: 0 15px 15px 15px;
|
|
8422
8422
|
display: flex;
|
|
8423
8423
|
justify-content: flex-end;
|
|
8424
|
-
`,FA={green:"#35994e",orange:"#ff9800",red:"#f44336"},Yxe=e=>typeof e=="number"?`${e}px`:e,Uj=()=>o.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M3.5 6L8 10.5L12.5 6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}),Jxe=({title:e="LITS DISPONIBLES",criteriaLabel:t="CRITÈRES / HÔPITAUX",summary:n,categories:c,levelColors:i=FA,defaultExpandedCategoryId:r,expandedCategoryId:s,onExpandedCategoryChange:d,onItemClick:l,summaryIcon:h,onSummaryIconClick:u,criteriaIcon:p,onCriteriaIconClick:y,criteriaIconLabel:f,width:g="20rem",className:m,backgroundColor:x="#ffffff",textColor:M="#1a1a1a",activeBackgroundColor:v="#cce7f2",hoverBackgroundColor:L="#f5f8fa"})=>{const[b,C]=k.useState(r??""),N=s??b,_=k.useRef(null),I=k.useRef({}),j=w=>{const S=N===w?"":w;C(S),d?.(S)};return k.useEffect(()=>{const w=_.current,S=N?I.current[N]:null;if(!w||!S)return;const $=w.getBoundingClientRect(),A=S.getBoundingClientRect();A.bottom>$.bottom&&w.scrollBy({top:Math.min(A.bottom-$.bottom,A.top-$.top),behavior:"smooth"})},[N]),o.jsxs(Qxe,{ref:_,$width:g,$backgroundColor:x,className:m,children:[o.jsxs(eMe,{children:[o.jsx(tMe,{children:e}),o.jsxs(aMe,{children:[n&&o.jsxs(o.Fragment,{children:[o.jsx(ki,{$bg:i.green,children:n.green}),o.jsx(ki,{$bg:i.orange,children:n.orange}),o.jsx(ki,{$bg:i.red,children:n.red})]}),o.jsx(Wj,{type:"button",onClick:u,children:h??o.jsx(Uj,{})})]})]}),o.jsxs(nMe,{children:[o.jsx(oMe,{children:t}),o.jsx(Wj,{type:"button",onClick:y,"aria-label":f,title:f,children:p??o.jsx(Uj,{})})]}),o.jsx(cMe,{children:c.map(w=>{const S=N===w.id;return o.jsxs("div",{ref:$=>{I.current[w.id]=$},children:[o.jsx(rMe,{type:"button",$active:S,$textColor:M,$activeBackgroundColor:v,onClick:()=>j(w.id),$isLastItem:c[c.length-1].id===w.id,children:w.label}),S&&w.items.length>0&&o.jsx(iMe,{children:w.items.map($=>o.jsxs(sMe,{type:"button",$textColor:M,$hoverBackgroundColor:L,onClick:()=>l?.($.id),children:[o.jsx(dMe,{title:$.title??$.name,children:$.name}),!w.hideItemBadge&&o.jsx(ki,{$bg:$.color??i[$.level],children:$.available})]},$.id))})]},w.id)})})]})},Qxe=F.aside`
|
|
8424
|
+
`,FA={green:"#35994e",orange:"#ff9800",red:"#f44336"},Yxe=e=>typeof e=="number"?`${e}px`:e,Uj=()=>o.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M3.5 6L8 10.5L12.5 6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}),Jxe=({title:e="LITS DISPONIBLES",criteriaLabel:t="CRITÈRES / HÔPITAUX",summary:n,categories:c,levelColors:i=FA,defaultExpandedCategoryId:r,expandedCategoryId:s,onExpandedCategoryChange:d,onItemClick:l,summaryIcon:h,onSummaryIconClick:u,criteriaIcon:p,onCriteriaIconClick:y,criteriaIconLabel:f,width:g="20rem",className:m,backgroundColor:x="#ffffff",textColor:M="#1a1a1a",activeBackgroundColor:v="#cce7f2",hoverBackgroundColor:L="#f5f8fa"})=>{const[b,C]=k.useState(r??""),N=s??b,_=k.useRef(null),I=k.useRef({}),j=w=>{const S=N===w?"":w;C(S),d?.(S)};return k.useEffect(()=>{const w=_.current,S=N?I.current[N]:null;if(!w||!S)return;const $=w.getBoundingClientRect(),A=S.getBoundingClientRect();A.bottom>$.bottom&&w.scrollBy({top:Math.min(A.bottom-$.bottom,A.top-$.top),behavior:"smooth"})},[N]),o.jsxs(Qxe,{ref:_,$width:g,$backgroundColor:x,className:m,children:[o.jsxs(eMe,{children:[o.jsx(tMe,{children:e}),o.jsxs(aMe,{children:[n&&o.jsxs(o.Fragment,{children:[o.jsx(ki,{$bg:i.green,children:n.green}),o.jsx(ki,{$bg:i.orange,children:n.orange}),o.jsx(ki,{$bg:i.red,children:n.red})]}),o.jsx(Wj,{type:"button",onClick:u,children:h??o.jsx(Uj,{})})]})]}),o.jsxs(nMe,{children:[o.jsx(oMe,{children:t}),o.jsx(Wj,{type:"button",onClick:y,"aria-label":f,title:f,children:p??o.jsx(Uj,{})})]}),o.jsx(cMe,{children:c.map(w=>{const S=N===w.id;return o.jsxs("div",{ref:$=>{I.current[w.id]=$},children:[o.jsx(rMe,{type:"button",$active:S,$textColor:M,$activeBackgroundColor:v,onClick:()=>j(w.id),$isLastItem:c[c.length-1].id===w.id,children:w.label}),S&&w.items.length>0&&o.jsx(iMe,{children:w.items.map($=>o.jsxs(sMe,{type:"button",$textColor:M,$hoverBackgroundColor:L,onClick:()=>l?.($.id),children:[o.jsx(dMe,{title:$.title??$.name,children:$.name}),$.distanceLabel&&o.jsx(lMe,{children:$.distanceLabel}),!w.hideItemBadge&&o.jsx(ki,{$bg:$.color??i[$.level],children:$.available})]},$.id))})]},w.id)})})]})},Qxe=F.aside`
|
|
8425
8425
|
width: ${e=>Yxe(e.$width)};
|
|
8426
8426
|
flex-shrink: 0;
|
|
8427
8427
|
align-self: flex-start;
|
|
@@ -8542,17 +8542,24 @@
|
|
|
8542
8542
|
overflow: hidden;
|
|
8543
8543
|
text-overflow: ellipsis;
|
|
8544
8544
|
white-space: nowrap;
|
|
8545
|
-
`,lMe=
|
|
8545
|
+
`,lMe=F.span`
|
|
8546
|
+
flex-shrink: 0;
|
|
8547
|
+
font-size: var(--p);
|
|
8548
|
+
color: var(--color-text-secondary);
|
|
8549
|
+
white-space: nowrap;
|
|
8550
|
+
padding: 0 0.3rem;
|
|
8551
|
+
line-height: 1.625rem;
|
|
8552
|
+
`,hMe=({value:e,min:t=0,max:n=100,step:c=1,onChange:i,label:r,className:s="",disabled:d=!1,fullWidth:l=!0,trackHeight:h="6px",trackColor:u="#f0f2f5",trackFillColor:p="#00A6D9",thumbColor:y="#ffffff",thumbBorderColor:f="#00A6D9",thumbSize:g="20px",thumbBorderWidth:m="2px",ariaLabel:x,ariaLabelledBy:M,a11yConfig:v})=>{const L=n!==t?(e-t)/(n-t)*100:0,b=N=>{i(Number(N.target.value))},C=J(v,r);return o.jsxs(uMe,{className:s,title:C,$fullWidth:l,children:[r&&o.jsx(pMe,{id:M?void 0:`${r}-label`,children:r}),o.jsx(yMe,{type:"range",min:t,max:n,step:c,value:e,onChange:b,disabled:d,"aria-label":x,"aria-labelledby":M||(r?`${r}-label`:void 0),"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e,$percentage:L,$trackHeight:h,$trackColor:u,$trackFillColor:p,$thumbSize:g,$thumbColor:y,$thumbBorderColor:f,$thumbBorderWidth:m})]})},uMe=F.div`
|
|
8546
8553
|
display: flex;
|
|
8547
8554
|
flex-direction: column;
|
|
8548
8555
|
gap: 0.5rem;
|
|
8549
8556
|
font-family: inherit;
|
|
8550
8557
|
width: ${({$fullWidth:e})=>e?"100%":"auto"};
|
|
8551
|
-
`,
|
|
8558
|
+
`,pMe=F.label`
|
|
8552
8559
|
font-size: 0.875rem;
|
|
8553
8560
|
font-weight: 500;
|
|
8554
8561
|
color: var(--color-text, #212529);
|
|
8555
|
-
`,
|
|
8562
|
+
`,yMe=F.input`
|
|
8556
8563
|
-webkit-appearance: none;
|
|
8557
8564
|
appearance: none;
|
|
8558
8565
|
width: 100%;
|
|
@@ -8653,18 +8660,18 @@
|
|
|
8653
8660
|
&:focus::-webkit-slider-runnable-track {
|
|
8654
8661
|
outline: none;
|
|
8655
8662
|
}
|
|
8656
|
-
`,
|
|
8663
|
+
`,kMe=e=>Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",...e},Z.createElement("mask",{id:"a",width:20,height:20,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},Z.createElement("path",{fill:"#D9D9D9",d:"M0 0h20v20H0z"})),Z.createElement("g",{mask:"url(#a)"},Z.createElement("path",{fill:"#1C1B1F",d:"M10.75 10.375V7.748a.73.73 0 0 0-.214-.53.7.7 0 0 0-.531-.218.74.74 0 0 0-.536.214.7.7 0 0 0-.218.53v2.954q0 .149.062.288.063.139.174.25l2.076 2.076q.23.23.531.22a.77.77 0 0 0 .532-.24.73.73 0 0 0 0-1.063zM10 18a6.8 6.8 0 0 1-2.731-.554 7.1 7.1 0 0 1-2.217-1.498 7.1 7.1 0 0 1-1.497-2.216A6.8 6.8 0 0 1 3 11q0-1.458.554-2.732t1.497-2.217A7.1 7.1 0 0 1 7.27 4.554 6.8 6.8 0 0 1 10 4q1.458 0 2.732.554 1.274.555 2.216 1.497a7.1 7.1 0 0 1 1.498 2.217Q17 9.542 17 11t-.555 2.732a7.1 7.1 0 0 1-1.497 2.217 7.1 7.1 0 0 1-2.216 1.497A6.8 6.8 0 0 1 10 18M1.939 6.458a.73.73 0 0 1 0-1.062l2.48-2.48a.73.73 0 0 1 1.062 0 .73.73 0 0 1 0 1.063l-2.5 2.5a.68.68 0 0 1-.521.219.76.76 0 0 1-.52-.24m16.146 0a.73.73 0 0 1-1.062 0l-2.48-2.479a.73.73 0 0 1 0-1.062.73.73 0 0 1 1.063 0l2.479 2.5q.23.228.23.52a.72.72 0 0 1-.23.521M9.996 16.5q2.296 0 3.9-1.6t1.605-3.895-1.6-3.9T10.005 5.5t-3.9 1.6T4.5 10.995t1.6 3.9T9.995 16.5"}))),mMe=k.memo(kMe),fMe=({value:e,onChange:t,label:n,placeholder:c="00:00",disabled:i=!1,fullWidth:r=!0,cancelText:s,applyText:d,hoursLabel:l,minutesLabel:h,dropdownAlignment:u="left",maxHours:p=23,ariaLabel:y,ariaLabelledBy:f,a11yConfig:g})=>{const[m,x]=k.useState(!1),M=k.useRef(null),v=w=>{if(w instanceof Date)return{h:w.getHours().toString().padStart(2,"0"),m:w.getMinutes().toString().padStart(2,"0")};if(typeof w=="string"&&w.includes(":")){const S=w.split(":");return{h:S[0].padStart(2,"0"),m:S[1].padStart(2,"0")}}return{h:"00",m:"00"}},[L,b]=k.useState("00"),[C,N]=k.useState("00");k.useEffect(()=>{const w=v(e);b(w.h),N(w.m)},[e,m]),k.useEffect(()=>{const w=S=>{M.current&&!M.current.contains(S.target)&&x(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]);const _=()=>{const w=parseInt(L)||0,S=parseInt(C)||0,$=Math.min(p,Math.max(0,w)).toString().padStart(2,"0"),A=Math.min(59,Math.max(0,S)).toString().padStart(2,"0");t(`${$}:${A}`),x(!1)},I=e?typeof e=="string"?e:`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`:"",j=J(g,n);return o.jsxs(gMe,{ref:M,$fullWidth:r,title:j,children:[n&&o.jsx(vMe,{id:f?void 0:`${n}-label`,children:n}),o.jsx(xMe,{type:"button",$isOpen:m,$disabled:i,onClick:()=>!i&&x(!m),disabled:i,"aria-label":y,"aria-labelledby":f||(n?`${n}-label`:void 0),"aria-expanded":m,"aria-haspopup":"listbox",children:o.jsxs(MMe,{children:[o.jsx(_Me,{$isPlaceholder:!I,children:I||c}),o.jsx(LMe,{})]})}),m&&o.jsxs(IMe,{$alignment:u,children:[o.jsxs(bMe,{children:[o.jsxs(Gj,{children:[o.jsx(Kj,{children:l}),o.jsx(Zj,{children:o.jsx(Xj,{type:"number",min:"0",max:p.toString(),$wide:p>99,value:L,onChange:w=>{const S=w.target.value;if(S===""){b("");return}const $=parseInt(S);!isNaN($)&&$>=0&&$<=p&&b(S)},autoFocus:!0})})]}),o.jsx(wMe,{children:":"}),o.jsxs(Gj,{children:[o.jsx(Kj,{children:h}),o.jsx(Zj,{children:o.jsx(Xj,{type:"number",min:"0",max:"59",value:C,onChange:w=>{const S=w.target.value;if(S===""){N("");return}const $=parseInt(S);!isNaN($)&&$>=0&&$<=59&&N(S.slice(-2))}})})]})]}),o.jsxs(CMe,{children:[o.jsx(Yj,{className:"cancel",onClick:()=>x(!1),children:s}),o.jsx(Yj,{className:"apply",onClick:_,children:d})]})]})]})},gMe=F.div`
|
|
8657
8664
|
position: relative;
|
|
8658
8665
|
display: inline-block;
|
|
8659
8666
|
max-width: 100%;
|
|
8660
8667
|
${({$fullWidth:e})=>e&&"width: 100%; display: block;"}
|
|
8661
|
-
`,
|
|
8668
|
+
`,vMe=F.label`
|
|
8662
8669
|
display: block;
|
|
8663
8670
|
font-size: 0.875rem;
|
|
8664
8671
|
font-weight: 500;
|
|
8665
8672
|
margin-bottom: 0.5rem;
|
|
8666
8673
|
color: var(--color-text, #212529);
|
|
8667
|
-
`,
|
|
8674
|
+
`,xMe=F.button`
|
|
8668
8675
|
width: 100%;
|
|
8669
8676
|
display: flex;
|
|
8670
8677
|
align-items: center;
|
|
@@ -8686,18 +8693,18 @@
|
|
|
8686
8693
|
&:hover {
|
|
8687
8694
|
${({$disabled:e})=>!e&&"border-color: var(--color-primary, #86b7fe);"}
|
|
8688
8695
|
}
|
|
8689
|
-
`,
|
|
8696
|
+
`,MMe=F.div`
|
|
8690
8697
|
display: flex;
|
|
8691
8698
|
align-items: center;
|
|
8692
8699
|
justify-content: space-between;
|
|
8693
8700
|
width: 100%;
|
|
8694
8701
|
gap: 0.5rem;
|
|
8695
|
-
`,
|
|
8702
|
+
`,_Me=F.span`
|
|
8696
8703
|
color: ${({$isPlaceholder:e})=>e?"var(--color-text-secondary, #adb5bd)":"inherit"};
|
|
8697
|
-
`,
|
|
8704
|
+
`,LMe=F(mMe)`
|
|
8698
8705
|
color: var(--color-text-secondary, #6c757d);
|
|
8699
8706
|
flex-shrink: 0;
|
|
8700
|
-
`,
|
|
8707
|
+
`,IMe=F.div`
|
|
8701
8708
|
position: absolute;
|
|
8702
8709
|
top: 100%;
|
|
8703
8710
|
${({$alignment:e})=>e==="right"?"right: 0;":"left: 0;"}
|
|
@@ -8712,7 +8719,7 @@
|
|
|
8712
8719
|
flex-direction: column;
|
|
8713
8720
|
gap: 1rem;
|
|
8714
8721
|
min-width: 160px;
|
|
8715
|
-
`,
|
|
8722
|
+
`,bMe=F.div`
|
|
8716
8723
|
display: flex;
|
|
8717
8724
|
align-items: center;
|
|
8718
8725
|
justify-content: center;
|
|
@@ -8756,12 +8763,12 @@
|
|
|
8756
8763
|
-webkit-appearance: none;
|
|
8757
8764
|
margin: 0;
|
|
8758
8765
|
}
|
|
8759
|
-
`,
|
|
8766
|
+
`,wMe=F.span`
|
|
8760
8767
|
font-size: 1.25rem;
|
|
8761
8768
|
font-weight: 600;
|
|
8762
8769
|
color: var(--color-text-secondary, #adb5bd);
|
|
8763
8770
|
margin-top: 1rem;
|
|
8764
|
-
`,
|
|
8771
|
+
`,CMe=F.div`
|
|
8765
8772
|
display: flex;
|
|
8766
8773
|
gap: 0.5rem;
|
|
8767
8774
|
margin-top: 0.5rem;
|
|
@@ -8788,7 +8795,7 @@
|
|
|
8788
8795
|
background-color: var(--color-primary, #00a6d9);
|
|
8789
8796
|
color: #ffffff;
|
|
8790
8797
|
}
|
|
8791
|
-
`,
|
|
8798
|
+
`,NMe=({title:e="Liste d'attente",onClose:t,onBack:n,content:c,footer:i,className:r,a11yConfig:s,ariaLabel:d})=>{const l=J(s,e);return o.jsxs(SMe,{className:r,title:l,role:"region","aria-label":d||e,children:[o.jsxs("div",{className:"header",children:[o.jsxs("div",{className:"header-left",children:[n&&o.jsx("span",{className:"back-btn",onClick:n,role:"button","aria-label":"Retour",tabIndex:0,onKeyDown:h=>h.key==="Enter"&&n(),children:o.jsx(w1,{size:24})}),o.jsx("p",{children:e})]}),t&&o.jsx("span",{className:"close-btn",onClick:t,role:"button","aria-label":"Fermer",tabIndex:0,onKeyDown:h=>h.key==="Enter"&&t(),children:o.jsx(at,{size:24})})]}),o.jsx("div",{className:"content",children:c}),i&&o.jsx("div",{className:"footer",children:i})]})},SMe=F.div`
|
|
8792
8799
|
width: 100%;
|
|
8793
8800
|
height: 100%;
|
|
8794
8801
|
display: flex;
|
|
@@ -8837,12 +8844,12 @@
|
|
|
8837
8844
|
border-bottom-left-radius: 0.5rem;
|
|
8838
8845
|
border-bottom-right-radius: 0.5rem;
|
|
8839
8846
|
}
|
|
8840
|
-
`,
|
|
8847
|
+
`,jMe=({items:e,title:t,backgroundColor:n,textColor:c,columns:i=1,vertical:r=!1,onEdit:s,onClick:d,alertIcon:l,className:h,a11yConfig:u,ariaLabel:p})=>{const y=J(u,!u?.titleKey&&typeof t=="string"?t:void 0);return o.jsxs(qMe,{$bgColor:n,$textColor:c,$isClickable:!!d,className:h,onClick:d,title:y,role:d?"button":"region","aria-label":p||(typeof t=="string"?t:"Information patient"),tabIndex:d?0:void 0,onKeyDown:f=>d&&f.key==="Enter"&&d(),children:[o.jsxs(AMe,{className:"patient-info-content",children:[t&&o.jsx($Me,{className:"patient-info-title",children:t}),o.jsx(PMe,{$columns:i,$vertical:r,className:"patient-info-grid",children:e.map((f,g)=>o.jsxs(TMe,{$columns:i,$vertical:r,className:"patient-info-item",children:[f.label&&o.jsx(HMe,{className:"patient-info-label",title:J(f.a11yConfig),children:f.label}),o.jsx(DMe,{className:"patient-info-value",$spanFull:!f.label,children:f.value})]},g))})]}),(s||l)&&o.jsxs(zMe,{children:[s&&o.jsx(BMe,{onClick:f=>{f.stopPropagation(),s()},"aria-label":"Modifier les informations",children:o.jsx(o1,{size:20})}),l&&o.jsx(VMe,{children:l})]})]})},$Me=F.div`
|
|
8841
8848
|
font-size: 1rem;
|
|
8842
8849
|
font-weight: 600;
|
|
8843
8850
|
border-bottom: 1px solid #d2d6d8;
|
|
8844
8851
|
padding-bottom: 0.5rem;
|
|
8845
|
-
|
|
8852
|
+
`,qMe=F.div`
|
|
8846
8853
|
background-color: ${e=>e.$bgColor||"#ffffff"};
|
|
8847
8854
|
color: ${e=>e.$textColor||"#1c1b1f"};
|
|
8848
8855
|
border-radius: 0.5rem;
|
|
@@ -8852,28 +8859,28 @@
|
|
|
8852
8859
|
width: 100%;
|
|
8853
8860
|
box-sizing: border-box;
|
|
8854
8861
|
cursor: ${e=>e.$isClickable?"pointer":"default"};
|
|
8855
|
-
`,
|
|
8862
|
+
`,AMe=F.div`
|
|
8856
8863
|
flex: 1;
|
|
8857
8864
|
display: flex;
|
|
8858
8865
|
flex-direction: column;
|
|
8859
8866
|
gap: 0.75rem;
|
|
8860
|
-
`,
|
|
8867
|
+
`,zMe=F.div`
|
|
8861
8868
|
display: flex;
|
|
8862
8869
|
flex-direction: column;
|
|
8863
8870
|
justify-content: space-between;
|
|
8864
8871
|
align-items: flex-end;
|
|
8865
8872
|
flex-shrink: 0;
|
|
8866
8873
|
align-self: stretch;
|
|
8867
|
-
`,
|
|
8874
|
+
`,VMe=F.div`
|
|
8868
8875
|
display: flex;
|
|
8869
8876
|
align-items: center;
|
|
8870
8877
|
justify-content: center;
|
|
8871
8878
|
flex-shrink: 0;
|
|
8872
|
-
`,
|
|
8879
|
+
`,PMe=F.div`
|
|
8873
8880
|
display: grid;
|
|
8874
8881
|
grid-template-columns: ${e=>e.$columns===3?"repeat(3, 1fr)":e.$columns===2?"repeat(2, 1fr)":e.$vertical?"1fr":"minmax(max-content, 35%) minmax(min-content, 1fr)"};
|
|
8875
8882
|
gap: ${e=>e.$columns===3?"var(--space-2) var(--space-3)":e.$columns===2?"0.5rem 1rem":e.$vertical?"0.5rem":"0.5rem 0.75rem"};
|
|
8876
|
-
`,
|
|
8883
|
+
`,TMe=F.div`
|
|
8877
8884
|
font-size: 0.75rem;
|
|
8878
8885
|
line-height: 1.3;
|
|
8879
8886
|
min-width: 0;
|
|
@@ -8884,19 +8891,19 @@
|
|
|
8884
8891
|
`:F.css`
|
|
8885
8892
|
display: contents;
|
|
8886
8893
|
`}
|
|
8887
|
-
`,
|
|
8894
|
+
`,HMe=F.div`
|
|
8888
8895
|
text-align: left;
|
|
8889
8896
|
color: inherit;
|
|
8890
8897
|
font-weight: 600;
|
|
8891
8898
|
min-width: 0;
|
|
8892
8899
|
overflow-wrap: break-word;
|
|
8893
|
-
`,
|
|
8900
|
+
`,DMe=F.div`
|
|
8894
8901
|
font-weight: 400;
|
|
8895
8902
|
white-space: pre-wrap;
|
|
8896
8903
|
overflow-wrap: break-word;
|
|
8897
8904
|
min-width: 0;
|
|
8898
8905
|
${e=>e.$spanFull&&"grid-column: 1 / -1;"}
|
|
8899
|
-
`,
|
|
8906
|
+
`,BMe=F.button`
|
|
8900
8907
|
flex-shrink: 0;
|
|
8901
8908
|
background: none;
|
|
8902
8909
|
border: none;
|
|
@@ -8913,12 +8920,12 @@
|
|
|
8913
8920
|
&:hover {
|
|
8914
8921
|
opacity: 1;
|
|
8915
8922
|
}
|
|
8916
|
-
`,
|
|
8923
|
+
`,RMe="_patientCard_r0eh1_1",FMe="_notAllowedCursor_r0eh1_18",EMe="_innerPadding_r0eh1_28",OMe="_noFooterMargin_r0eh1_35",UMe="_topArea_r0eh1_39",WMe="_small_r0eh1_49",GMe="_header_r0eh1_62",KMe="_headerLeft_r0eh1_69",ZMe="_headerRight_r0eh1_75",XMe="_uf_r0eh1_80",YMe="_rmBadge_r0eh1_88",JMe="_roomBed_r0eh1_103",QMe="_content_r0eh1_110",e_e="_body_r0eh1_122",t_e="_upperBodyContent_r0eh1_140",a_e="_patientInfo_r0eh1_150",n_e="_iep_r0eh1_155",o_e="_name_r0eh1_160",c_e="_birthName_r0eh1_167",i_e="_firstNames_r0eh1_172",r_e="_dobAge_r0eh1_177",s_e="_duration_r0eh1_182",d_e="_comment_r0eh1_188",l_e="_timeline_r0eh1_195",h_e="_destination_r0eh1_199",u_e="_todayReservation_r0eh1_209",p_e="_arrow_r0eh1_230",y_e="_progressBar_r0eh1_235",k_e="_progressFill_r0eh1_245",m_e="_progressDate_r0eh1_255",f_e="_footer_r0eh1_266",g_e="_iconWrap_r0eh1_275",v_e="_centerLabelHuge_r0eh1_294",x_e="_labelYellow_r0eh1_301",M_e="_expectedBottom_r0eh1_320",__e="_expectedPrefix_r0eh1_328",L_e="_expectedDate_r0eh1_334",I_e="_notesView_r0eh1_355",b_e="_notesHeader_r0eh1_363",w_e="_notesTitle_r0eh1_369",C_e="_notesList_r0eh1_376",N_e="_noteItem_r0eh1_382",S_e="_reservationView_r0eh1_387",j_e="_reservationNote_r0eh1_399",$_e="_bottomArea_r0eh1_404",q_e="_bottomLeftSymbol_r0eh1_412",G={patientCard:RMe,notAllowedCursor:FMe,innerPadding:EMe,noFooterMargin:OMe,topArea:UMe,small:WMe,header:GMe,headerLeft:KMe,headerRight:ZMe,uf:XMe,rmBadge:YMe,roomBed:JMe,content:QMe,body:e_e,upperBodyContent:t_e,patientInfo:a_e,iep:n_e,name:o_e,birthName:c_e,firstNames:i_e,dobAge:r_e,duration:s_e,comment:d_e,timeline:l_e,destination:h_e,todayReservation:u_e,arrow:p_e,progressBar:y_e,progressFill:k_e,progressDate:m_e,footer:f_e,iconWrap:g_e,centerLabelHuge:v_e,labelYellow:x_e,expectedBottom:M_e,expectedPrefix:__e,expectedDate:L_e,notesView:I_e,notesHeader:b_e,notesTitle:w_e,notesList:C_e,noteItem:N_e,reservationView:S_e,reservationNote:j_e,bottomArea:$_e,bottomLeftSymbol:q_e},A_e=({size:e="large",className:t="",customStyle:n,topAreaStyle:c,headerLeft:i,headerRight:r,centerHugeLabel:s,iep:d,nameLine:l,birthName:h,birthNamePrefix:u,firstNamesLine:p,dobAgeLine:y,stayDuration:f,comment:g,expectedDate:m,expectedDatePrefix:x,showTimeline:M=!1,destination:v,progress:L=0,progressTrackColor:b,progressFillColor:C,progressLabel:N,progressTitle:_,showFooter:I=!1,leftIcons:j=[],rightIcons:w=[],activeView:S="default",notesHeaderTitle:$,notesHeaderIcon:A,notesList:H=[],notesTitles:P,reservationNote:V,isYellowLabel:q=!1,bottomLeftSymbol:z,cursorNotAllowed:R=!1,rmBadge:T,isReservationToday:O=!1})=>{const Q=e==="small",E=`
|
|
8917
8924
|
${G.patientCard}
|
|
8918
8925
|
${Q?G.small:""}
|
|
8919
8926
|
${R?G.notAllowedCursor:""}
|
|
8920
8927
|
${t}
|
|
8921
|
-
`.trim();return o.jsx("div",{className:E,style:n,children:o.jsxs("div",{className:G.innerPadding,children:[o.jsxs("div",{className:`${G.topArea} ${I?"":G.noFooterMargin}`,style:c,children:[o.jsx("div",{className:G.header,children:T?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:G.headerLeft,children:o.jsxs("div",{className:G.uf,children:[i,r&&` - ${r}`]})}),o.jsx("div",{className:G.headerRight,children:o.jsx("div",{className:G.rmBadge,children:T})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:G.headerLeft,children:i&&o.jsx("div",{className:G.uf,children:i})}),o.jsx("div",{className:G.headerRight,children:r&&o.jsx("span",{className:G.roomBed,children:r})})]})}),o.jsxs("div",{className:G.content,children:[o.jsxs("div",{className:G.body,children:[S==="default"&&o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{className:`${G.centerLabelHuge} ${q?G.labelYellow:""}`,children:s}),o.jsxs("div",{className:G.upperBodyContent,children:[o.jsxs("div",{className:G.patientInfo,children:[d&&o.jsx("div",{className:G.iep,children:d}),l&&o.jsx("div",{className:G.name,children:l}),h&&o.jsxs("div",{className:G.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:G.firstNames,children:p}),y&&o.jsx("div",{className:G.dobAge,children:y})]}),f&&o.jsx("div",{className:G.duration,children:f}),g&&o.jsx("div",{className:G.comment,children:g})]}),m&&o.jsxs("div",{className:G.expectedBottom,children:[x&&o.jsx("div",{className:G.expectedPrefix,children:x}),o.jsx("div",{className:G.expectedDate,children:m})]})]}),S==="notes"&&o.jsxs("div",{className:G.notesView,children:[o.jsxs("div",{className:G.notesHeader,children:[A,o.jsx("span",{className:G.notesTitle,children:$})]}),o.jsx("div",{className:G.notesList,children:H.map((U,ie)=>o.jsx("div",{className:G.noteItem,title:P?.[ie],children:U},ie))})]}),S==="reservation"&&o.jsxs("div",{className:G.reservationView,children:[s&&o.jsx("div",{className:`${G.centerLabelHuge} ${q?G.labelYellow:""}`,children:s}),o.jsx("div",{className:G.upperBodyContent,children:o.jsxs("div",{className:G.patientInfo,children:[d&&o.jsx("div",{className:G.iep,children:d}),l&&o.jsx("div",{className:G.name,children:l}),h&&o.jsxs("div",{className:G.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:G.firstNames,children:p}),y&&o.jsx("div",{className:G.dobAge,children:y})]})}),V&&o.jsx("div",{className:G.reservationNote,children:V})]})]}),(z||M||v)&&o.jsxs("div",{className:G.bottomArea,children:[z&&o.jsx("div",{className:G.bottomLeftSymbol,children:z}),v&&o.jsxs("div",{className:`${G.destination} ${O?G.todayReservation:""}`,children:[o.jsx("span",{className:G.arrow,children:"→"}),v.prefix&&o.jsx("span",{children:v.prefix}),o.jsx("strong",{children:v.name}),v.suffix&&o.jsx("span",{children:v.suffix})]}),M&&o.jsx("div",{className:G.timeline,children:b&&b!=="transparent"&&o.jsxs("div",{className:G.progressBar,style:{backgroundColor:b},title:_,children:[o.jsx("div",{className:G.progressFill,style:{width:`${L}%`,backgroundColor:C}}),N&&o.jsx("span",{className:G.progressDate,children:N})]})})]})]})]}),I&&o.jsxs("div",{className:G.footer,children:[j.map((U,ie)=>o.jsx("div",{className:G.iconWrap,children:U},`left-${ie}`)),w.map((U,ie)=>o.jsx("div",{className:G.iconWrap,children:U},`right-${ie}`))]})]})})},A_e="_panel_1viix_1",z_e="_header_1viix_13",V_e="_headerLeft_1viix_23",P_e="_title_1viix_30",T_e="_closeButton_1viix_40",H_e="_paginationLoader_1viix_63",D_e="_messageList_1viix_71",B_e="_listLoading_1viix_86",R_e="_empty_1viix_94",F_e="_daySeparator_1viix_105",E_e="_messageRow_1viix_118",O_e="_fadeIn_1viix_1",U_e="_incoming_1viix_138",W_e="_outgoing_1viix_146",G_e="_avatar_1viix_154",K_e="_messageMeta_1viix_170",Z_e="_senderName_1viix_180",X_e="_bubble_1viix_185",Y_e="_unread_1viix_209",J_e="_scrollToBottomButton_1viix_243",Q_e="_scrollBtnVisible_1viix_263",eLe="_scrollBtnIn_1viix_1",tLe="_scrollBtnHiding_1viix_267",aLe="_scrollBtnOut_1viix_1",nLe="_composer_1viix_272",oLe="_messageInput_1viix_281",cLe="_sendButton_1viix_315",iLe="_messageListWrapper_1viix_340",fe={panel:A_e,header:z_e,headerLeft:V_e,title:P_e,closeButton:T_e,paginationLoader:H_e,messageList:D_e,listLoading:B_e,empty:R_e,daySeparator:F_e,messageRow:E_e,fadeIn:O_e,incoming:U_e,outgoing:W_e,avatar:G_e,messageMeta:K_e,senderName:Z_e,bubble:X_e,unread:Y_e,scrollToBottomButton:J_e,scrollBtnVisible:Q_e,scrollBtnIn:eLe,scrollBtnHiding:tLe,scrollBtnOut:aLe,composer:nLe,messageInput:oLe,sendButton:cLe,messageListWrapper:iLe};function EA(e,t="fr"){return[...e].sort((n,c)=>new Date(n.sentAt).getTime()-new Date(c.sentAt).getTime()).reduce((n,c)=>{const i=new Date(c.sentAt),r=i.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"}),s=n[n.length-1];return s?.dayKey===r?[...n.slice(0,-1),{...s,messages:[...s.messages,c]}]:[...n,{dayKey:r,date:i,messages:[c]}]},[])}function OA(e,t="fr"){return new Intl.DateTimeFormat(t,{weekday:"short",day:"2-digit",month:"2-digit",year:"numeric"}).format(e)}function UA(e,t="fr"){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(e))}function WA(e,t){return e.sender.id===t?"outgoing":e.isRead===!1?"unread":"incoming"}const rLe=300,sLe=220,dLe=60;function GA({messages:e,currentSenderId:t,onSend:n,hasMore:c=!1,onLoadMore:i,locale:r="fr"}){const s=k.useRef(null),d=k.useRef(null),l=k.useRef(null),[h,u]=k.useState(""),[p,y]=k.useState(!1),f=h.trim().length>0&&!p;k.useEffect(()=>{const z=l.current;z&&((typeof CSS>"u"||!CSS.supports||!CSS.supports("field-sizing","content"))&&(z.style.height="auto",z.style.height=`${Math.min(Math.max(z.scrollHeight,60),140)}px`),z.scrollTop=z.scrollHeight)},[h]);const[g,m]=k.useState(!1),x=k.useRef(!1),[M,v]=k.useState("hidden"),L=k.useRef("hidden"),b=k.useRef(null),C=k.useRef(!1),N=k.useCallback(z=>{L.current=z,v(z)},[]),_=k.useCallback(()=>{b.current&&clearTimeout(b.current),N("hiding"),b.current=setTimeout(()=>N("hidden"),sLe)},[N]);k.useEffect(()=>{d.current?.scrollIntoView({behavior:"instant"})},[]),k.useEffect(()=>{!C.current&&!x.current&&d.current?.scrollIntoView({behavior:"smooth"})},[e.length]);const I=k.useCallback(async()=>{const z=h.trim();if(!(!z||p)){y(!0);try{await n(z),u(""),C.current=!1,L.current!=="hidden"&&_(),requestAnimationFrame(()=>{d.current?.scrollIntoView({behavior:"smooth"})})}finally{y(!1)}}},[h,p,n,_]),j=k.useCallback(z=>{z.preventDefault(),I().catch(()=>{})},[I]),w=k.useCallback(z=>{z.key==="Enter"&&!z.shiftKey&&!z.nativeEvent.isComposing&&(z.preventDefault(),I().catch(()=>{}))},[I]),S=k.useCallback(()=>{d.current?.scrollIntoView({behavior:"smooth"})},[]),$=k.useCallback(async()=>{if(!i||x.current)return;const z=s.current,R=z?.scrollHeight??0;x.current=!0,m(!0);try{await i(),await new Promise(T=>requestAnimationFrame(()=>T())),z&&(z.scrollTop+=z.scrollHeight-R)}finally{x.current=!1,m(!1)}},[i]),A=k.useCallback(()=>{const z=s.current;if(!z)return;const T=z.scrollHeight-z.scrollTop-z.clientHeight>rLe;C.current=T;const O=L.current;T?(O==="hidden"||O==="hiding")&&(b.current&&clearTimeout(b.current),N("visible")):O==="visible"&&_(),z.scrollTop<dLe&&c&&!x.current&&$().catch(()=>{})},[c,$,N,_]),H=EA(e,r),P=k.useCallback((z,R)=>WA(z,R??t),[t]),V=k.useCallback((z,R)=>OA(z,R??r),[r]),q=k.useCallback((z,R)=>UA(z,R??r),[r]);return{listRef:s,bottomAnchorRef:d,textareaRef:l,draft:h,setDraft:u,canSend:f,sending:p,handleFormSubmit:j,handleKeyDown:w,scrollBtnState:M,handleScrollBtnClick:S,loadingMoreState:g,handleScrollCombined:A,dayGroups:H,getBubbleVariant:P,formatDayLabel:V,formatHour:q}}const Jj=()=>o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",style:{animation:"spin 0.8s linear infinite"},children:[o.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),o.jsx("path",{d:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"})]}),KA=({messages:e,currentSenderId:t,onSend:n,onClose:c,hasMore:i=!1,onLoadMore:r,title:s="Messages",showClose:d=!0,loading:l=!1,loadingMore:h=!1,placeholder:u="Votre message…",sendLabel:p="Envoyer",emptyLabel:y="Aucun message",locale:f="fr",loadingNode:g,className:m="",headerIcon:x,closeIcon:M})=>{const{listRef:v,bottomAnchorRef:L,textareaRef:b,draft:C,setDraft:N,canSend:_,sending:I,handleFormSubmit:j,handleKeyDown:w,scrollBtnState:S,handleScrollBtnClick:$,loadingMoreState:A,handleScrollCombined:H,dayGroups:P,getBubbleVariant:V,formatDayLabel:q,formatHour:z}=GA({messages:e,currentSenderId:t,onSend:n,hasMore:i,onLoadMore:r,locale:f});return o.jsxs("div",{className:`${fe.panel} ${m}`,children:[o.jsxs("div",{className:fe.header,children:[o.jsxs("div",{className:fe.headerLeft,children:[x,o.jsx("h3",{className:fe.title,children:s})]}),d&&c&&o.jsx("button",{type:"button",className:fe.closeButton,onClick:c,"aria-label":"Fermer",children:M??o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[o.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),o.jsxs("div",{className:fe.messageListWrapper,children:[o.jsxs("div",{ref:v,className:fe.messageList,role:"log","aria-live":"polite","aria-label":s,onScroll:H,children:[!l&&(h||A)&&o.jsx("div",{className:fe.paginationLoader,children:o.jsx(Jj,{})}),l&&o.jsx("div",{className:fe.listLoading,children:g??o.jsx(Jj,{})}),!l&&P.length===0&&o.jsx("div",{className:fe.empty,children:y}),!l&&P.map(R=>o.jsxs(k.Fragment,{children:[o.jsx("div",{className:fe.daySeparator,role:"separator",children:q(R.date)}),R.messages.map(T=>{const O=V(T),Q=O==="outgoing",E=z(T.sentAt);return o.jsxs("div",{className:`${fe.messageRow} ${Q?fe.outgoing:fe.incoming}`,children:[!Q&&o.jsx("span",{className:fe.avatar,"aria-hidden":"true",children:T.sender.shortName}),o.jsxs("span",{className:fe.messageMeta,children:[!Q&&o.jsx("span",{className:fe.senderName,children:T.sender.name}),o.jsx("span",{children:E})]}),o.jsx("div",{className:`${fe.bubble} ${fe[O]}`,children:T.content})]},T.id)})]},R.dayKey)),o.jsx("div",{ref:L,"aria-hidden":"true"})]}),S!=="hidden"&&o.jsx("button",{type:"button",className:`${fe.scrollToBottomButton} ${S==="hiding"?fe.scrollBtnHiding:fe.scrollBtnVisible}`,onClick:$,"aria-label":"Aller au dernier message",children:"↓"})]}),o.jsxs("form",{className:fe.composer,onSubmit:j,children:[o.jsx("textarea",{ref:b,className:fe.messageInput,value:C,onChange:R=>N(R.target.value),onKeyDown:w,placeholder:u,"aria-label":u,rows:1,disabled:I}),o.jsx("button",{type:"submit",className:fe.sendButton,disabled:!_,children:p})]})]})},lLe=({title:e,titleBold:t,titleKey:n,items:c,className:i="",width:r,style:s,labelStyle:d,valueStyle:l,headerStyle:h,a11yConfig:u,onItemClick:p,onDeleteItem:y})=>{const f={width:r||"100%",...s};return o.jsxs("div",{className:`data-list-v2-container ${i}`,style:f,children:[(e||t)&&o.jsx("div",{className:"data-list-v2-header",style:h,children:o.jsxs("h2",{className:"header-title",title:J(u,n),children:[e&&o.jsx("span",{className:"title-regular",children:e}),t&&o.jsx("span",{className:"title-bold",children:t})]})}),o.jsx("div",{className:"data-list-v2-content",children:c.map(g=>o.jsxs("div",{className:`data-list-v2-item ${p?"interactive":""} ${g.showValueLine?"with-value-line":""}`,onClick:()=>p?.(g),children:[o.jsx("div",{className:"item-label-col",style:d,children:o.jsx("div",{className:"item-label",title:J(g.a11yConfig,g.labelKey),children:g.label})}),o.jsxs("div",{className:"item-value-col",style:l,children:[o.jsx("div",{className:"item-value",title:J(g.a11yConfig,g.valueKey),children:g.value}),y&&o.jsx("div",{className:"item-delete-action",onClick:m=>{m.stopPropagation(),y(g)},children:o.jsx(kt,{size:16})})]})]},g.id))})]})},hLe=({id:e,data:t,children:n,className:c,onDragStart:i,onDragEnd:r})=>{const s=l=>{l.dataTransfer.setData("text/plain",e),t&&l.dataTransfer.setData("application/json",JSON.stringify(t)),l.dataTransfer.effectAllowed="move",i&&i(l,t)},d=l=>{r&&r(l)};return o.jsx("div",{draggable:!0,onDragStart:s,onDragEnd:d,style:{cursor:"grab"},className:c,children:n})},uLe=({id:e,onDrop:t,children:n,className:c="",activeClassName:i="is-drag-over"})=>{const[r,s]=k.useState(!1),d=k.useRef(0),l=f=>{f.preventDefault(),d.current+=1,d.current>0&&s(!0)},h=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},u=f=>{f.preventDefault(),d.current-=1,d.current===0&&s(!1)},p=f=>{f.preventDefault(),s(!1),d.current=0;const g=f.dataTransfer.getData("text/plain");let m;try{const x=f.dataTransfer.getData("application/json");x&&(m=JSON.parse(x))}catch(x){console.error("Failed to parse drag data",x)}g&&t(g,m)},y=`${c} ${r?i:""}`.trim();return o.jsx("div",{onDragEnter:l,onDragOver:h,onDragLeave:u,onDrop:p,className:y,"data-droppable-id":e,children:n})},pLe=e=>o.jsx(yLe,{...e}),yLe=F.textarea`
|
|
8928
|
+
`.trim();return o.jsx("div",{className:E,style:n,children:o.jsxs("div",{className:G.innerPadding,children:[o.jsxs("div",{className:`${G.topArea} ${I?"":G.noFooterMargin}`,style:c,children:[o.jsx("div",{className:G.header,children:T?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:G.headerLeft,children:o.jsxs("div",{className:G.uf,children:[i,r&&` - ${r}`]})}),o.jsx("div",{className:G.headerRight,children:o.jsx("div",{className:G.rmBadge,children:T})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:G.headerLeft,children:i&&o.jsx("div",{className:G.uf,children:i})}),o.jsx("div",{className:G.headerRight,children:r&&o.jsx("span",{className:G.roomBed,children:r})})]})}),o.jsxs("div",{className:G.content,children:[o.jsxs("div",{className:G.body,children:[S==="default"&&o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{className:`${G.centerLabelHuge} ${q?G.labelYellow:""}`,children:s}),o.jsxs("div",{className:G.upperBodyContent,children:[o.jsxs("div",{className:G.patientInfo,children:[d&&o.jsx("div",{className:G.iep,children:d}),l&&o.jsx("div",{className:G.name,children:l}),h&&o.jsxs("div",{className:G.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:G.firstNames,children:p}),y&&o.jsx("div",{className:G.dobAge,children:y})]}),f&&o.jsx("div",{className:G.duration,children:f}),g&&o.jsx("div",{className:G.comment,children:g})]}),m&&o.jsxs("div",{className:G.expectedBottom,children:[x&&o.jsx("div",{className:G.expectedPrefix,children:x}),o.jsx("div",{className:G.expectedDate,children:m})]})]}),S==="notes"&&o.jsxs("div",{className:G.notesView,children:[o.jsxs("div",{className:G.notesHeader,children:[A,o.jsx("span",{className:G.notesTitle,children:$})]}),o.jsx("div",{className:G.notesList,children:H.map((U,ie)=>o.jsx("div",{className:G.noteItem,title:P?.[ie],children:U},ie))})]}),S==="reservation"&&o.jsxs("div",{className:G.reservationView,children:[s&&o.jsx("div",{className:`${G.centerLabelHuge} ${q?G.labelYellow:""}`,children:s}),o.jsx("div",{className:G.upperBodyContent,children:o.jsxs("div",{className:G.patientInfo,children:[d&&o.jsx("div",{className:G.iep,children:d}),l&&o.jsx("div",{className:G.name,children:l}),h&&o.jsxs("div",{className:G.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:G.firstNames,children:p}),y&&o.jsx("div",{className:G.dobAge,children:y})]})}),V&&o.jsx("div",{className:G.reservationNote,children:V})]})]}),(z||M||v)&&o.jsxs("div",{className:G.bottomArea,children:[z&&o.jsx("div",{className:G.bottomLeftSymbol,children:z}),v&&o.jsxs("div",{className:`${G.destination} ${O?G.todayReservation:""}`,children:[o.jsx("span",{className:G.arrow,children:"→"}),v.prefix&&o.jsx("span",{children:v.prefix}),o.jsx("strong",{children:v.name}),v.suffix&&o.jsx("span",{children:v.suffix})]}),M&&o.jsx("div",{className:G.timeline,children:b&&b!=="transparent"&&o.jsxs("div",{className:G.progressBar,style:{backgroundColor:b},title:_,children:[o.jsx("div",{className:G.progressFill,style:{width:`${L}%`,backgroundColor:C}}),N&&o.jsx("span",{className:G.progressDate,children:N})]})})]})]})]}),I&&o.jsxs("div",{className:G.footer,children:[j.map((U,ie)=>o.jsx("div",{className:G.iconWrap,children:U},`left-${ie}`)),w.map((U,ie)=>o.jsx("div",{className:G.iconWrap,children:U},`right-${ie}`))]})]})})},z_e="_panel_1viix_1",V_e="_header_1viix_13",P_e="_headerLeft_1viix_23",T_e="_title_1viix_30",H_e="_closeButton_1viix_40",D_e="_paginationLoader_1viix_63",B_e="_messageList_1viix_71",R_e="_listLoading_1viix_86",F_e="_empty_1viix_94",E_e="_daySeparator_1viix_105",O_e="_messageRow_1viix_118",U_e="_fadeIn_1viix_1",W_e="_incoming_1viix_138",G_e="_outgoing_1viix_146",K_e="_avatar_1viix_154",Z_e="_messageMeta_1viix_170",X_e="_senderName_1viix_180",Y_e="_bubble_1viix_185",J_e="_unread_1viix_209",Q_e="_scrollToBottomButton_1viix_243",eLe="_scrollBtnVisible_1viix_263",tLe="_scrollBtnIn_1viix_1",aLe="_scrollBtnHiding_1viix_267",nLe="_scrollBtnOut_1viix_1",oLe="_composer_1viix_272",cLe="_messageInput_1viix_281",iLe="_sendButton_1viix_315",rLe="_messageListWrapper_1viix_340",fe={panel:z_e,header:V_e,headerLeft:P_e,title:T_e,closeButton:H_e,paginationLoader:D_e,messageList:B_e,listLoading:R_e,empty:F_e,daySeparator:E_e,messageRow:O_e,fadeIn:U_e,incoming:W_e,outgoing:G_e,avatar:K_e,messageMeta:Z_e,senderName:X_e,bubble:Y_e,unread:J_e,scrollToBottomButton:Q_e,scrollBtnVisible:eLe,scrollBtnIn:tLe,scrollBtnHiding:aLe,scrollBtnOut:nLe,composer:oLe,messageInput:cLe,sendButton:iLe,messageListWrapper:rLe};function EA(e,t="fr"){return[...e].sort((n,c)=>new Date(n.sentAt).getTime()-new Date(c.sentAt).getTime()).reduce((n,c)=>{const i=new Date(c.sentAt),r=i.toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"}),s=n[n.length-1];return s?.dayKey===r?[...n.slice(0,-1),{...s,messages:[...s.messages,c]}]:[...n,{dayKey:r,date:i,messages:[c]}]},[])}function OA(e,t="fr"){return new Intl.DateTimeFormat(t,{weekday:"short",day:"2-digit",month:"2-digit",year:"numeric"}).format(e)}function UA(e,t="fr"){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(e))}function WA(e,t){return e.sender.id===t?"outgoing":e.isRead===!1?"unread":"incoming"}const sLe=300,dLe=220,lLe=60;function GA({messages:e,currentSenderId:t,onSend:n,hasMore:c=!1,onLoadMore:i,locale:r="fr"}){const s=k.useRef(null),d=k.useRef(null),l=k.useRef(null),[h,u]=k.useState(""),[p,y]=k.useState(!1),f=h.trim().length>0&&!p;k.useEffect(()=>{const z=l.current;z&&((typeof CSS>"u"||!CSS.supports||!CSS.supports("field-sizing","content"))&&(z.style.height="auto",z.style.height=`${Math.min(Math.max(z.scrollHeight,60),140)}px`),z.scrollTop=z.scrollHeight)},[h]);const[g,m]=k.useState(!1),x=k.useRef(!1),[M,v]=k.useState("hidden"),L=k.useRef("hidden"),b=k.useRef(null),C=k.useRef(!1),N=k.useCallback(z=>{L.current=z,v(z)},[]),_=k.useCallback(()=>{b.current&&clearTimeout(b.current),N("hiding"),b.current=setTimeout(()=>N("hidden"),dLe)},[N]);k.useEffect(()=>{d.current?.scrollIntoView({behavior:"instant"})},[]),k.useEffect(()=>{!C.current&&!x.current&&d.current?.scrollIntoView({behavior:"smooth"})},[e.length]);const I=k.useCallback(async()=>{const z=h.trim();if(!(!z||p)){y(!0);try{await n(z),u(""),C.current=!1,L.current!=="hidden"&&_(),requestAnimationFrame(()=>{d.current?.scrollIntoView({behavior:"smooth"})})}finally{y(!1)}}},[h,p,n,_]),j=k.useCallback(z=>{z.preventDefault(),I().catch(()=>{})},[I]),w=k.useCallback(z=>{z.key==="Enter"&&!z.shiftKey&&!z.nativeEvent.isComposing&&(z.preventDefault(),I().catch(()=>{}))},[I]),S=k.useCallback(()=>{d.current?.scrollIntoView({behavior:"smooth"})},[]),$=k.useCallback(async()=>{if(!i||x.current)return;const z=s.current,R=z?.scrollHeight??0;x.current=!0,m(!0);try{await i(),await new Promise(T=>requestAnimationFrame(()=>T())),z&&(z.scrollTop+=z.scrollHeight-R)}finally{x.current=!1,m(!1)}},[i]),A=k.useCallback(()=>{const z=s.current;if(!z)return;const T=z.scrollHeight-z.scrollTop-z.clientHeight>sLe;C.current=T;const O=L.current;T?(O==="hidden"||O==="hiding")&&(b.current&&clearTimeout(b.current),N("visible")):O==="visible"&&_(),z.scrollTop<lLe&&c&&!x.current&&$().catch(()=>{})},[c,$,N,_]),H=EA(e,r),P=k.useCallback((z,R)=>WA(z,R??t),[t]),V=k.useCallback((z,R)=>OA(z,R??r),[r]),q=k.useCallback((z,R)=>UA(z,R??r),[r]);return{listRef:s,bottomAnchorRef:d,textareaRef:l,draft:h,setDraft:u,canSend:f,sending:p,handleFormSubmit:j,handleKeyDown:w,scrollBtnState:M,handleScrollBtnClick:S,loadingMoreState:g,handleScrollCombined:A,dayGroups:H,getBubbleVariant:P,formatDayLabel:V,formatHour:q}}const Jj=()=>o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round","aria-hidden":"true",style:{animation:"spin 0.8s linear infinite"},children:[o.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),o.jsx("path",{d:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"})]}),KA=({messages:e,currentSenderId:t,onSend:n,onClose:c,hasMore:i=!1,onLoadMore:r,title:s="Messages",showClose:d=!0,loading:l=!1,loadingMore:h=!1,placeholder:u="Votre message…",sendLabel:p="Envoyer",emptyLabel:y="Aucun message",locale:f="fr",loadingNode:g,className:m="",headerIcon:x,closeIcon:M})=>{const{listRef:v,bottomAnchorRef:L,textareaRef:b,draft:C,setDraft:N,canSend:_,sending:I,handleFormSubmit:j,handleKeyDown:w,scrollBtnState:S,handleScrollBtnClick:$,loadingMoreState:A,handleScrollCombined:H,dayGroups:P,getBubbleVariant:V,formatDayLabel:q,formatHour:z}=GA({messages:e,currentSenderId:t,onSend:n,hasMore:i,onLoadMore:r,locale:f});return o.jsxs("div",{className:`${fe.panel} ${m}`,children:[o.jsxs("div",{className:fe.header,children:[o.jsxs("div",{className:fe.headerLeft,children:[x,o.jsx("h3",{className:fe.title,children:s})]}),d&&c&&o.jsx("button",{type:"button",className:fe.closeButton,onClick:c,"aria-label":"Fermer",children:M??o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[o.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),o.jsxs("div",{className:fe.messageListWrapper,children:[o.jsxs("div",{ref:v,className:fe.messageList,role:"log","aria-live":"polite","aria-label":s,onScroll:H,children:[!l&&(h||A)&&o.jsx("div",{className:fe.paginationLoader,children:o.jsx(Jj,{})}),l&&o.jsx("div",{className:fe.listLoading,children:g??o.jsx(Jj,{})}),!l&&P.length===0&&o.jsx("div",{className:fe.empty,children:y}),!l&&P.map(R=>o.jsxs(k.Fragment,{children:[o.jsx("div",{className:fe.daySeparator,role:"separator",children:q(R.date)}),R.messages.map(T=>{const O=V(T),Q=O==="outgoing",E=z(T.sentAt);return o.jsxs("div",{className:`${fe.messageRow} ${Q?fe.outgoing:fe.incoming}`,children:[!Q&&o.jsx("span",{className:fe.avatar,"aria-hidden":"true",children:T.sender.shortName}),o.jsxs("span",{className:fe.messageMeta,children:[!Q&&o.jsx("span",{className:fe.senderName,children:T.sender.name}),o.jsx("span",{children:E})]}),o.jsx("div",{className:`${fe.bubble} ${fe[O]}`,children:T.content})]},T.id)})]},R.dayKey)),o.jsx("div",{ref:L,"aria-hidden":"true"})]}),S!=="hidden"&&o.jsx("button",{type:"button",className:`${fe.scrollToBottomButton} ${S==="hiding"?fe.scrollBtnHiding:fe.scrollBtnVisible}`,onClick:$,"aria-label":"Aller au dernier message",children:"↓"})]}),o.jsxs("form",{className:fe.composer,onSubmit:j,children:[o.jsx("textarea",{ref:b,className:fe.messageInput,value:C,onChange:R=>N(R.target.value),onKeyDown:w,placeholder:u,"aria-label":u,rows:1,disabled:I}),o.jsx("button",{type:"submit",className:fe.sendButton,disabled:!_,children:p})]})]})},hLe=({title:e,titleBold:t,titleKey:n,items:c,className:i="",width:r,style:s,labelStyle:d,valueStyle:l,headerStyle:h,a11yConfig:u,onItemClick:p,onDeleteItem:y})=>{const f={width:r||"100%",...s};return o.jsxs("div",{className:`data-list-v2-container ${i}`,style:f,children:[(e||t)&&o.jsx("div",{className:"data-list-v2-header",style:h,children:o.jsxs("h2",{className:"header-title",title:J(u,n),children:[e&&o.jsx("span",{className:"title-regular",children:e}),t&&o.jsx("span",{className:"title-bold",children:t})]})}),o.jsx("div",{className:"data-list-v2-content",children:c.map(g=>o.jsxs("div",{className:`data-list-v2-item ${p?"interactive":""} ${g.showValueLine?"with-value-line":""}`,onClick:()=>p?.(g),children:[o.jsx("div",{className:"item-label-col",style:d,children:o.jsx("div",{className:"item-label",title:J(g.a11yConfig,g.labelKey),children:g.label})}),o.jsxs("div",{className:"item-value-col",style:l,children:[o.jsx("div",{className:"item-value",title:J(g.a11yConfig,g.valueKey),children:g.value}),y&&o.jsx("div",{className:"item-delete-action",onClick:m=>{m.stopPropagation(),y(g)},children:o.jsx(kt,{size:16})})]})]},g.id))})]})},uLe=({id:e,data:t,children:n,className:c,onDragStart:i,onDragEnd:r})=>{const s=l=>{l.dataTransfer.setData("text/plain",e),t&&l.dataTransfer.setData("application/json",JSON.stringify(t)),l.dataTransfer.effectAllowed="move",i&&i(l,t)},d=l=>{r&&r(l)};return o.jsx("div",{draggable:!0,onDragStart:s,onDragEnd:d,style:{cursor:"grab"},className:c,children:n})},pLe=({id:e,onDrop:t,children:n,className:c="",activeClassName:i="is-drag-over"})=>{const[r,s]=k.useState(!1),d=k.useRef(0),l=f=>{f.preventDefault(),d.current+=1,d.current>0&&s(!0)},h=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},u=f=>{f.preventDefault(),d.current-=1,d.current===0&&s(!1)},p=f=>{f.preventDefault(),s(!1),d.current=0;const g=f.dataTransfer.getData("text/plain");let m;try{const x=f.dataTransfer.getData("application/json");x&&(m=JSON.parse(x))}catch(x){console.error("Failed to parse drag data",x)}g&&t(g,m)},y=`${c} ${r?i:""}`.trim();return o.jsx("div",{onDragEnter:l,onDragOver:h,onDragLeave:u,onDrop:p,className:y,"data-droppable-id":e,children:n})},yLe=e=>o.jsx(kLe,{...e}),kLe=F.textarea`
|
|
8922
8929
|
padding: 0.5rem 0.875rem;
|
|
8923
8930
|
border: 0.0625rem solid var(--color-border, #dee2e6);
|
|
8924
8931
|
border-radius: var(--radius-content, 0.5rem);
|
|
@@ -8931,4 +8938,4 @@
|
|
|
8931
8938
|
opacity: 0.65;
|
|
8932
8939
|
cursor: not-allowed;
|
|
8933
8940
|
}
|
|
8934
|
-
`;exports.LineChart=a.LineChart;exports.PeriodRange=a.PeriodRange;exports.SimpleBarChart=a.SimpleBarChart;exports.ActionCard=V9e;exports.AddItemModal=Dc;exports.Alert=dC;exports.AlertsProvider=h3e;exports.AvailabilitySummaryPanel=Jxe;exports.BadgeList=Qj;exports.BadgeRenderer=_A;exports.Button=yL;exports.ChartContainer=d3e;exports.CheckboxInput=eA;exports.CircularProgress=Zb;exports.ColorInput=cA;exports.ComponentVisibilityManager=Jb;exports.ComponentVisibilityToggle=C6e;exports.ConfirmationModal=S9e;exports.ConfirmationPopup=kfe;exports.CounterListBox=Q3e;exports.CurrencyRenderer=bA;exports.DEFAULT_BED_LEVEL_COLORS=FA;exports.DashboardSummary=i6e;exports.DataBoard=Mt;exports.DataFourBoards=AA;exports.DataListV2=
|
|
8941
|
+
`;exports.LineChart=a.LineChart;exports.PeriodRange=a.PeriodRange;exports.SimpleBarChart=a.SimpleBarChart;exports.ActionCard=V9e;exports.AddItemModal=Dc;exports.Alert=dC;exports.AlertsProvider=h3e;exports.AvailabilitySummaryPanel=Jxe;exports.BadgeList=Qj;exports.BadgeRenderer=_A;exports.Button=yL;exports.ChartContainer=d3e;exports.CheckboxInput=eA;exports.CircularProgress=Zb;exports.ColorInput=cA;exports.ComponentVisibilityManager=Jb;exports.ComponentVisibilityToggle=C6e;exports.ConfirmationModal=S9e;exports.ConfirmationPopup=kfe;exports.CounterListBox=Q3e;exports.CurrencyRenderer=bA;exports.DEFAULT_BED_LEVEL_COLORS=FA;exports.DashboardSummary=i6e;exports.DataBoard=Mt;exports.DataFourBoards=AA;exports.DataListV2=hLe;exports.DateInput=nA;exports.DatePicker=Lw;exports.DateRenderer=LA;exports.DayStatCard=ude;exports.DayStatCardV2=L8e;exports.DonutChartRatio=Cxe;exports.Draggable=uLe;exports.DraggableProvider=mde;exports.DraggableSwitcherButton=kL;exports.Droppable=pLe;exports.DynamicForm=_5e;exports.DynamicIcon=Mw;exports.DynamicInput=iA;exports.EmailRenderer=xA;exports.Encours=v6e;exports.EntryControl=Y3e;exports.FileInput=aA;exports.FilterBar=R7e;exports.FiltreEtiquette=lxe;exports.FlexRowContainer=tfe;exports.Grid=a$;exports.Header=_de;exports.HierarchicalTableLayout=Nge;exports.HorizontalBarChart=b8e;exports.IconText=p$;exports.ImageRenderer=wA;exports.IndicatorItemV2=wve;exports.InfoBanner=Wve;exports.InputWrapper=AL;exports.LegendFilterProvider=gde;exports.LegendFilterSwitcherButton=mL;exports.LinkRenderer=MA;exports.ListContentContainer=afe;exports.Logo=wL;exports.MessageThread=KA;exports.MessageThreadComponent=KA;exports.MetricsPanel=SA;exports.MobileMenuHeader=Hxe;exports.MobileNavMenu=PA;exports.MobileTopBar=zxe;exports.ModuleHeader=z3e;exports.ModuleSideBar=V3e;exports.ModuleSideBarV2=g9e;exports.MovementCard=Lde;exports.NavBar=n$;exports.NavBarV2=G8e;exports.NavItem=Xb;exports.NavItemV2=lC;exports.NavProvider=pde;exports.NumberRenderer=IA;exports.PaginationBar=lme;exports.PatientCard=A_e;exports.PatientDetailsPanel=NMe;exports.PatientInfoCard=jMe;exports.PeriodSelect=f3e;exports.PopUp=p9e;exports.RadioInput=tA;exports.RangeInput=oA;exports.ScrollableHorizontale=y$;exports.SearchBar=$A;exports.SearchableModuleSideBar=x9e;exports.Select=HA;exports.SelectFilter=Jfe;exports.SelectInput=cC;exports.SettingNavBar=f9e;exports.ShowDataProvider=vde;exports.ShowDataSwitcherButton=fL;exports.SideComponent=v3e;exports.SimpleListBox=J3e;exports.Slider=hMe;exports.StatusTile=Ade;exports.SubHeaderContent=gge;exports.SubHeaderNavItem=VA;exports.SubHeaderTitle=Q8e;exports.SubNavBar=Dde;exports.SummaryAvailable=uxe;exports.SummaryCard=NA;exports.Switcher=Z1;exports.TableLayout=hC;exports.TableauDynamique=CA;exports.TableauDynamiqueSafePagination=dme;exports.TableauxComponent=hC;exports.TextInput=Jq;exports.TextRenderer=vA;exports.Textarea=yLe;exports.TextareaInput=Qq;exports.ThemeProvider=yde;exports.ThemeSwitcher=vge;exports.ThemeSwitcherButton=Yb;exports.TimePicker=fMe;exports.Title=L3e;exports.TranslationKey=P3e;exports.TranslationKeyV2=M9e;exports.TrendItem=k$;exports.TrendList=zpe;exports.TrendListBox=efe;exports.UnitGrid=Dxe;exports.UserInfo=zA;exports.alertModels=p3e;exports.formatDayLabel=OA;exports.formatHour=UA;exports.getA11yTooltip=J;exports.getBubbleVariant=WA;exports.getFormSchema=L5e;exports.groupByDay=EA;exports.hexToRgba=Tt;exports.registerRenderer=Qke;exports.tableConfig=_w;exports.useAlerts=u3e;exports.useBodyScrollLock=x3e;exports.useConfirmationPopup=mfe;exports.useDraggableSwitcher=r$;exports.useFilters=fA;exports.useLegendFilterSwitcher=d$;exports.useMessageThread=GA;exports.useNavigation=ft;exports.useShowDataSwitcher=h$;exports.useTableData=gA;exports.useThemeContext=c$;exports.useThemeSwitcher=CL;exports.validateField=bL;exports.validateForm=Yq;
|