@zeniai/web-cockpit-ui 2.3.21-qa → 2.3.22-dev

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 (60) hide show
  1. package/dist/assets/{CreditAgentRoutes-Y6_EImKO.js → CreditAgentRoutes-BSCovuK7.js} +2 -2
  2. package/dist/assets/{Editor-CbBxvSmp-D-O2iOCT.js → Editor-BJM3mxbk-BU69M__x.js} +10 -10
  3. package/dist/assets/{Preview-Bi907R7d.js → Preview-DCMYHdXQ.js} +1 -1
  4. package/dist/assets/{ScreenRoutes-Blm_HJmE.js → ScreenRoutes-DmPLNUiN.js} +33 -33
  5. package/dist/assets/SignInScreen-C_mQUaNg.js +1 -0
  6. package/dist/assets/{TaskDescriptionEditor-DyTyMxvk-CIMoSZU-.js → TaskDescriptionEditor-CfKh5nux-CYkybSv3.js} +3 -3
  7. package/dist/assets/{analytics-D6rU2phb.js → analytics-BQp5eAef.js} +36 -36
  8. package/dist/assets/{analyticsHelper-C8XmSWiq.js → analyticsHelper-BmbVDhM3.js} +1 -1
  9. package/dist/assets/{apple-wallet-DMr790ZM-DUQOY6Dc.js → apple-wallet-DMr790ZM-hJUMgrL7.js} +1 -1
  10. package/dist/assets/{bank-verification-HpVi21UA-BeKlMSCu.js → bank-verification-HpVi21UA-DKO2vlVi.js} +1 -1
  11. package/dist/assets/{core-B3-F7eBr.js → core-Tp-f995F.js} +1 -1
  12. package/dist/assets/{dash.all.min-DcSmBiNR.js → dash.all.min-B--TWXqN.js} +1 -1
  13. package/dist/assets/{empty-BvT6gWa7.js → empty-8w7lnNDy.js} +1 -1
  14. package/dist/assets/{empty-CQ_4F6AL.js → empty-C8aelB8k.js} +1 -1
  15. package/dist/assets/{epic-DGxFS5aI.js → epic-B57YvH__.js} +2 -2
  16. package/dist/assets/{index-BbtpQSrw.js → index-BG2KSZUN.js} +1 -1
  17. package/dist/assets/{index-Cp8L6GMZ.js → index-BGcLWwYU.js} +4847 -4810
  18. package/dist/assets/{index-DZRDjwaC.js → index-BYZPrbCg.js} +1 -1
  19. package/dist/assets/{index-D9Ex1U6B.js → index-BpRINGji.js} +1 -1
  20. package/dist/assets/{index-Bsjk-vms.js → index-BzUwg4A1.js} +2 -2
  21. package/dist/assets/{index-B_T8blia.js → index-D414nesG.js} +1 -1
  22. package/dist/assets/{index-DpXUK-2V.js → index-WQvcJj05.js} +3 -3
  23. package/dist/assets/{index-TjJI1T_l.js → index-zdSvBS0s.js} +1 -1
  24. package/dist/assets/{lexical-C9tRwoBl.js → lexical-Q_iSNeyd.js} +1 -1
  25. package/dist/assets/{liveblocks-CyhgjAmM.js → liveblocks-C_j2EWYR.js} +1 -1
  26. package/dist/assets/{lottie-CaZsq4ox.js → lottie-jwG43yRg.js} +1 -1
  27. package/dist/assets/{mcdonalds-logo-BTFuGR4i-BcsmRWp0.js → mcdonalds-logo-BTFuGR4i-CTNbDGA4.js} +1 -1
  28. package/dist/assets/{mercury-logo-Xd1WsXHh-CcGfsdFc.js → mercury-logo-Xd1WsXHh-Cf80nNAe.js} +1 -1
  29. package/dist/assets/{mercury-logo-dark-WebeUx9w-DDvE2mnq.js → mercury-logo-dark-WebeUx9w-BwS0mI_e.js} +1 -1
  30. package/dist/assets/{more-providers-avatars-Dt7HPmCt-D7fl3oXk.js → more-providers-avatars-Dt7HPmCt-C7TIBQMk.js} +1 -1
  31. package/dist/assets/{mui-DF3cXn7x.js → mui-B8_UdfTU.js} +1 -1
  32. package/dist/assets/{netsuite-logo-Dp53a_wk-DHhfSa5A.js → netsuite-logo-Dp53a_wk-BXIQRuSU.js} +1 -1
  33. package/dist/assets/{netsuite-logo-dark-C53BYo7C-slTYfQG6.js → netsuite-logo-dark-C53BYo7C-YFaW3rm9.js} +1 -1
  34. package/dist/assets/{paypal-logo-RhbjaD58-BEMjEPiS.js → paypal-logo-RhbjaD58-D_dwib76.js} +1 -1
  35. package/dist/assets/{paypal-logo-dark-_jTZA_FH-Cc9Dr3f1.js → paypal-logo-dark-_jTZA_FH-BTTOnj80.js} +1 -1
  36. package/dist/assets/{phone-otp-DI7iHM2C-DaB1jXjs.js → phone-otp-DI7iHM2C-D9pJ_Zhf.js} +1 -1
  37. package/dist/assets/{react-BL5QuQiL.js → react-13t95lOq.js} +1 -1
  38. package/dist/assets/{react-BFTgt5Nr.js → react-B1uOCHuc.js} +1 -1
  39. package/dist/assets/{react-B_2gErNA.js → react-BXXll-B8.js} +2 -2
  40. package/dist/assets/{react-DgoxEFcu.js → react-Bcj2vUCr.js} +1 -1
  41. package/dist/assets/{react-CSvt5NVX.js → react-BvNaFZi7.js} +1 -1
  42. package/dist/assets/{react-TFqk2ULt.js → react-C-_fkWly.js} +1 -1
  43. package/dist/assets/{react-CEc9o3j_.js → react-CPuPLrAm.js} +1 -1
  44. package/dist/assets/{react-XUzH62MA.js → react-NI50CDSW.js} +1 -1
  45. package/dist/assets/{recharts-mBO0sQiJ.js → recharts-BmU4Su4y.js} +1 -1
  46. package/dist/assets/{sentry-CMq56eOF.js → sentry-CsmEj6N0.js} +1 -1
  47. package/dist/assets/{subway-logo-B-Kc0fke-tO7AD_Vb.js → subway-logo-B-Kc0fke-Bfnr4OA4.js} +1 -1
  48. package/dist/assets/{underline-BNKkE4Fr-R39G6wC_.js → underline-BZ7JVlVm-C0t97YDn.js} +1 -1
  49. package/dist/assets/url-44QIqvix.js +6 -0
  50. package/dist/assets/{url-YDIkIjen.js → url-DI-fObeY.js} +1 -1
  51. package/dist/assets/utils-C03h8lYk.js +36 -0
  52. package/dist/assets/{vendor-react-lottie-player-Qhg4gMF8-19pF3K_u.js → vendor-react-lottie-player-Qhg4gMF8-DXPhrNgs.js} +1 -1
  53. package/dist/assets/{zeni-card-trust-BpxZYDve-QOGaaPs2.js → zeni-card-trust-BpxZYDve-Duf5vkpY.js} +1 -1
  54. package/dist/assets/{zeni-epic-state-XxVgcdSL.js → zeni-epic-state-Djpn9hBU.js} +5 -5
  55. package/dist/assets/{zeni-thanksgiving-logo-full-BLmLHEXd-D9EXpClk.js → zeni-thanksgiving-logo-full-BLmLHEXd-ChwuYBTE.js} +1 -1
  56. package/dist/index.html +1 -1
  57. package/package.json +4 -4
  58. package/dist/assets/SignInScreen-C5eb7kMo.js +0 -1
  59. package/dist/assets/url-BGsWubiD.js +0 -6
  60. package/dist/assets/utils-DegUrf4b.js +0 -36
@@ -0,0 +1 @@
1
+ import{j as d}from"./liveblocks-C_j2EWYR.js";import{a as p,R as S,n as m}from"./sentry-CsmEj6N0.js";import{n as I,i as w,g,u as h,N as b,h as y}from"./core-Tp-f995F.js";import{z as l,q as T,g as C,E,a9 as v,r as f}from"./index-BGcLWwYU.js";import{T9 as U,Ta as x,Tb as L,Tc as z,bm as u}from"./zeni-epic-state-Djpn9hBU.js";import{f as D}from"./analyticsHelper-BmbVDhM3.js";import{u as A}from"./mui-B8_UdfTU.js";import"./recharts-BmU4Su4y.js";import"./analytics-BQp5eAef.js";import"./utils-C03h8lYk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="ef86b6f3-3eb2-4345-a461-7a85d5953f37",e._sentryDebugIdIdentifier="sentry-dbid-ef86b6f3-3eb2-4345-a461-7a85d5953f37")}catch{}})();function N(e){const o=e.tenantState.fetchState,i=e.tenantState.sendEmailMagicLinkFetchState;return{googleClientId:f.googleClientId,microsoftClientId:f.microsoftClientId,signInError:e.tenantState.error?.error,fetchState:o,sendMagicLinkStatus:i,showEmailLogin:!1}}function k(e,o){const{location:i,navigate:r}=o;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,t)=>{m({message:`OAuth error from provider ${t} with error ${n}`,level:"error",tags:{authProvider:t,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,t)=>{const s=t==="google"?window.location.origin:window.location.origin+window.location.pathname;e(z({authCode:n,oauthProvider:t,appType:"web",redirectUri:u(s),sourceUri:u(i.state!=null?i.state.origin:"")}))},getSignedInUser:()=>l.getSignedInUser(),onSignedInCallback:()=>{const n=i.state?.origin;n&&n!=="/"?r(n,{replace:!0}):window.open(window.location.origin,"_self")},clearSignInError:()=>{e(L())}}}const P=y(N,k)(v),_=S.memo(P);function K(){const e=I(),o=w(),i=l.getSignedInUser(),r=g(a=>a.tenantState.fetchState),n=g(a=>a.tenantState.signInState),t=g(a=>a.tenantState.loggedInUser),s=A().mode,c=h();if(p.useEffect(()=>{n==="In-Progress"&&r==="Completed"&&t?.zeniSessionId!=null&&(l.saveSignedInUserWithSession(t,t.zeniSessionId),U(t.userId,t.zeniSessionId),e(x("Completed")),T.updateAppLocaleID("en"),D(t,s),setTimeout(()=>{C.trackLogin(E.Event.loginSuccess,t.authProvider??"google")},2e3))},[]),n==="In-Progress"&&r==="Completed"&&t?.zeniSessionId!=null||i!=null){const a=c.state?.origin??"/";return d.jsx(b,{to:a,state:{...c.state,origin:""}})}else return d.jsx(_,{navigate:o,location:c})}export{K as default};
@@ -1,7 +1,7 @@
1
- import{y as t,n,a as U,W as re,N as b,b as le,i as ne,q as de,e as ce,ab as pe,ac as me,ad as ue,ae as be,k as xe}from"./index-Cp8L6GMZ.js";import{a as i}from"./sentry-CMq56eOF.js";import{n as N,u as ge}from"./mui-DF3cXn7x.js";import{L as he,Z as fe,e as H,f as D,g as C,F as Ne,h as Ee,J as Ce,i as ye,j as ke,X as je,k as $e,l as Le,m as Te,K as ve,q as Oe,o as ee,n as l,s as F,t as P,p as te,z as De,u as Me,v as Ae,w as _e,x as Re,y as we,Q as Se,A as Ie,B as He,C as Fe,D as Pe,E as Ue}from"./underline-BNKkE4Fr-R39G6wC_.js";import{r as ze}from"./core-B3-F7eBr.js";import"./liveblocks-CyhgjAmM.js";import"./recharts-mBO0sQiJ.js";import"./zeni-epic-state-XxVgcdSL.js";import"./analytics-D6rU2phb.js";import"./utils-DegUrf4b.js";import"./lexical-C9tRwoBl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5702a701-f751-421e-b8f3-3cbe4fde8f6a",e._sentryDebugIdIdentifier="sentry-dbid-5702a701-f751-421e-b8f3-3cbe4fde8f6a")}catch{}})();const Ge=e=>e.replace(pe,"&amp;").replace(me,"&lt;").replace(ue,"&gt;"),We=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DD","DIV","DL","DT","FIGURE","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),S=e=>e!=null&&e.nodeType===Node.ELEMENT_NODE&&We.has(e.tagName),Be=e=>{const{previousSibling:o,nextSibling:a}=e,r=o==null||S(o),s=a==null||S(a);return r&&s&&(S(o)||S(a))},Ke=e=>{const o=e.createTreeWalker(e.body,NodeFilter.SHOW_TEXT),a=[];let r=o.nextNode();for(;r!=null;)a.push(r),r=o.nextNode();a.forEach(s=>{if(s.parentNode==null||s.textContent==null)return;const c=s.textContent.replace(be,`
1
+ import{y as t,n,H as U,a as re,N as b,$ as le,o as ne,q as de,d as ce,ab as pe,ac as me,ad as ue,ae as be,k as xe}from"./index-BGcLWwYU.js";import{a as i}from"./sentry-CsmEj6N0.js";import{n as N,u as ge}from"./mui-B8_UdfTU.js";import{L as he,Z as fe,e as H,f as D,g as C,F as Ne,h as Ee,J as Ce,i as ye,j as ke,X as je,k as $e,l as Le,m as Te,K as ve,q as Oe,o as ee,n as l,s as F,t as P,p as te,z as De,u as Me,v as Ae,w as _e,x as Re,y as we,Q as Se,A as Ie,B as He,C as Fe,D as Pe,E as Ue}from"./underline-BZ7JVlVm-C0t97YDn.js";import{r as ze}from"./core-Tp-f995F.js";import"./liveblocks-C_j2EWYR.js";import"./recharts-BmU4Su4y.js";import"./zeni-epic-state-Djpn9hBU.js";import"./analytics-BQp5eAef.js";import"./utils-C03h8lYk.js";import"./lexical-Q_iSNeyd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="52d7dd61-eb09-45ed-8cc7-6bb7a84e28a0",e._sentryDebugIdIdentifier="sentry-dbid-52d7dd61-eb09-45ed-8cc7-6bb7a84e28a0")}catch{}})();const Ge=e=>e.replace(pe,"&amp;").replace(me,"&lt;").replace(ue,"&gt;"),Be=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DD","DIV","DL","DT","FIGURE","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),S=e=>e!=null&&e.nodeType===Node.ELEMENT_NODE&&Be.has(e.tagName),Ke=e=>{const{previousSibling:o,nextSibling:a}=e,r=o==null||S(o),s=a==null||S(a);return r&&s&&(S(o)||S(a))},We=e=>{const o=e.createTreeWalker(e.body,NodeFilter.SHOW_TEXT),a=[];let r=o.nextNode();for(;r!=null;)a.push(r),r=o.nextNode();a.forEach(s=>{if(s.parentNode==null||s.textContent==null)return;const c=s.textContent.replace(be,`
2
2
  `);if(!c.includes(`
3
- `)||c.trim()===""&&Be(s))return;const p=e.createDocumentFragment();c.split(`
4
- `).forEach((m,g)=>{g>0&&p.appendChild(e.createElement("br")),m!==""&&p.appendChild(e.createTextNode(m))}),s.parentNode.replaceChild(p,s)})},Xe=200,Ve=(e,o)=>{if(e.delete(o),e.add(o),e.size>Xe){const a=e.values().next().value;a!=null&&e.delete(a)}},qe=(e,o,a)=>e!==o&&!a.has(e),I=1,{taskManagement:{taskDetail:{descriptionEditorTooltip:k}},common:{texts:{bold:z,italic:G,underline:W,link:B,bulletList:K,indent:X,outdent:V,undo:q,redo:Q}}}=de.getLocalizedStrings();function J(e,o){o===null?(e.style.opacity="0",e.style.top="-1000px",e.style.left="-1000px"):(e.style.opacity="1",e.style.top=`${o.top+o.height+window.pageYOffset+10}px`,e.style.left=`${o.left+window.pageXOffset-e.offsetWidth/2+o.width/2}px`)}function oe(e){const o=e.anchor,a=e.focus,r=e.anchor.getNode(),s=e.focus.getNode();return r===s?r:e?.isBackward()?P.$isAtNodeEnd(a)?r:s:P.$isAtNodeEnd(o)?s:r}function Qe({editor:e}){const o=ge(),a=i.useRef(null),r=i.useRef(null),s=i.useRef(!1),[c,p]=i.useState(""),[m,g]=i.useState(!1),[L,E]=i.useState(null),h=i.useCallback(()=>{const d=l.$getSelection();if(l.$isRangeSelection(d)){const $=oe(d),f=$.getParent();C.$isLinkNode(f)?p(f.getURL()):C.$isLinkNode($)?p($.getURL()):p("")}const M=a.current,j=window.getSelection(),A=document.activeElement;if(M===null)return;const T=e.getRootElement();if(d!==null&&j!=null&&!j.isCollapsed&&T!==null&&T.contains(j.anchorNode)){const $=j.getRangeAt(0);let f;if(j.anchorNode===T){let v=T;for(;v.firstElementChild!=null;)v=v.firstElementChild;f=v.getBoundingClientRect()}else f=$.getBoundingClientRect();s.current||J(M,f),E(d)}else(!A||A.className!=="link-input")&&(J(M,null),E(null),g(!1),p(""));return!0},[e]);return i.useEffect(()=>F.mergeRegister(e.registerUpdateListener(({editorState:d})=>{d.read(()=>{h()})}),e.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(h(),!0),I)),[e,h]),i.useEffect(()=>{e.getEditorState().read(()=>{h()})},[e,h]),i.useEffect(()=>{m&&r.current!=null&&r.current?.focus()},[m]),t.jsx(it,{ref:a,children:m?t.jsx("input",{ref:r,className:"link-input",value:c,onChange:d=>{p(d.target.value)},onKeyDown:d=>{d.key==="Enter"?(d.preventDefault(),L!==null&&(c!==""&&e.dispatchCommand(C.TOGGLE_LINK_COMMAND,c),g(!1))):d.key==="Escape"&&(d.preventDefault(),g(!1))}}):t.jsxs(st,{className:"link-input",children:[t.jsx(rt,{href:c,target:"_blank",rel:"noopener noreferrer",children:c}),t.jsx(lt,{className:"link-edit",type:"button",tabIndex:0,onMouseDown:d=>d.preventDefault(),onClick:()=>{g(!0)},children:t.jsx(ce,{style:{width:n.sp3,height:n.sp3,color:o.colors.primary}})})]})})}function Je({onChange:e}){const[o]=ee.useLexicalComposerContext(),a=i.useRef(null),[r,s]=i.useState(!1),[c,p]=i.useState(!1),[m,g]=i.useState("paragraph"),[,L]=i.useState(!1),[E,h]=i.useState(!1),[d,M]=i.useState(!1),[j,A]=i.useState(!1),[T,$]=i.useState(!1),f=i.useCallback(()=>{const u=l.$getSelection();if(l.$isRangeSelection(u)){const O=u.anchor.getNode(),y=O.getKey()==="root"?O:O.getTopLevelElementOrThrow(),_=y.getKey();if(o.getElementByKey(_)!==null)if(D.$isListNode(y)){const w=F.$getNearestNodeOfType(O,D.ListNode),se=w?w.getTag():y.getTag();g(se)}else{const w=H.$isHeadingNode(y)?y.getTag():y.getType();g(w)}$(u.hasFormat("bold")),M(u.hasFormat("italic")),A(u.hasFormat("underline")),L(P.$isParentElementRTL(u));const R=oe(u),ie=R.getParent();C.$isLinkNode(ie)||C.$isLinkNode(R)?h(!0):h(!1)}},[o]);i.useEffect(()=>F.mergeRegister(o.registerUpdateListener(({editorState:u})=>{u.read(()=>{f()})}),o.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(f(),!1),I),o.registerCommand(l.CAN_UNDO_COMMAND,u=>(s(u),!1),I),o.registerCommand(l.CAN_REDO_COMMAND,u=>(p(u),!1),I)),[o,f]),i.useEffect(()=>o.registerUpdateListener(({dirtyElements:u,dirtyLeaves:O,editorState:y,tags:_})=>{_.has("history-merge")||_.has("initial-content")||u.size===0&&O.size===0||y.read(()=>{const R=te.$generateHtmlFromNodes(o,null);e(R)})}),[o,e]);const v=i.useCallback(()=>{E?o.dispatchCommand(C.TOGGLE_LINK_COMMAND,null):o.dispatchCommand(C.TOGGLE_LINK_COMMAND,"https://")},[o,E]),ae=()=>{m!=="ul"?o.dispatchCommand(D.INSERT_UNORDERED_LIST_COMMAND,void 0):o.dispatchCommand(D.REMOVE_LIST_COMMAND,void 0)};return t.jsxs(at,{className:"toolbar",ref:a,children:[t.jsxs(Y,{children:[t.jsx(b,{placement:"bottom",title:z,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"bold"),className:"toolbar-item spaced "+(T?"active":""),"data-testid":"task-description-editor-toolbar-bold","aria-label":z,children:t.jsx(De,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:G,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"italic"),className:"toolbar-item spaced "+(d?"active":""),"data-testid":"task-description-editor-toolbar-italic","aria-label":G,children:t.jsx(Me,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:W,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"underline"),className:"toolbar-item spaced "+(j?"active":""),"data-testid":"task-description-editor-toolbar-underline","aria-label":W,children:t.jsx(Ae,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:B,children:t.jsx(x,{type:"button",onClick:v,className:"toolbar-item spaced "+(E?"active":""),"data-testid":"task-description-editor-toolbar-link","aria-label":B,children:t.jsx(_e,{className:"format"})})}),E&&ze.createPortal(t.jsx(Qe,{editor:o}),document.body),t.jsx(Z,{}),t.jsx(b,{placement:"bottom",title:K,children:t.jsx(x,{type:"button",onClick:ae,className:"toolbar-item spaced "+(m==="ul"?"active":""),"data-testid":"task-description-editor-toolbar-bulletList","aria-label":K,children:t.jsx(Re,{className:"format"})})}),t.jsx(Z,{}),t.jsx(b,{placement:"bottom",title:k.leftAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"left"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-leftAlign","aria-label":k.leftAlign,children:t.jsx(we,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.centerAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"center"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-centerAlign","aria-label":k.centerAlign,children:t.jsx(Se,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.rightAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"right"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-rightAlign","aria-label":k.rightAlign,children:t.jsx(Ie,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.justifyAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"justify"),className:"toolbar-item","data-testid":"task-description-editor-toolbar-justifyAlign","aria-label":k.justifyAlign,children:t.jsx(He,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:X,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.INDENT_CONTENT_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-indent","aria-label":X,children:t.jsx(Fe,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:V,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.OUTDENT_CONTENT_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-outdent","aria-label":V,children:t.jsx(Pe,{className:"format"})})})]}),t.jsxs(Y,{children:[t.jsx(b,{placement:"bottom",title:q,children:t.jsx(x,{type:"button",disabled:!r,onClick:()=>o.dispatchCommand(l.UNDO_COMMAND,void 0),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-undo","aria-label":q,children:t.jsx(le,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:Q,children:t.jsx(x,{type:"button",disabled:!c,onClick:()=>o.dispatchCommand(l.REDO_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-redo","aria-label":Q,children:t.jsx(Ue,{className:"format"})})})]})]})}function Ye({emittedHtml:e,initialValue:o}){const[a]=ee.useLexicalComposerContext(),r=i.useRef(void 0);return i.useEffect(()=>{const s=o??"";if(!qe(s,r.current,e)){r.current=s;return}const c=r.current==null;if(r.current=s,s.trim()===""){c||a.update(()=>{const p=l.$getRoot();p.clear(),p.append(l.$createParagraphNode())},{tag:"initial-content"});return}a.update(()=>{const p=new DOMParser,m=s.trim(),g=m.startsWith("<p")||m.startsWith("<div")||m.startsWith("<ul")||m.startsWith("<ol")||m.startsWith("<h")?s:`<p>${Ge(s)}</p>`,L=p.parseFromString(g,"text/html");Ke(L);const E=te.$generateNodesFromDOM(a,L),h=l.$getRoot();h.clear(),h.append(...E)},{tag:"initial-content"})},[a,o,e]),null}const Ze={namespace:"TaskDescriptionEditor",onError(e){throw e},nodes:[H.HeadingNode,D.ListNode,D.ListItemNode,H.QuoteNode,C.AutoLinkNode,C.LinkNode],theme:fe};function Nt({initialValue:e,placeholder:o,onChange:a}){const r=i.useRef(new Set).current,s=i.useCallback(c=>{Ve(r,c),a(c)},[r,a]);return t.jsxs(he.LexicalComposer,{initialConfig:Ze,children:[t.jsx(Ne,{}),t.jsxs(et,{children:[t.jsx(Je,{onChange:s}),t.jsxs(tt,{children:[t.jsx(Ee.RichTextPlugin,{contentEditable:t.jsx(ye.ContentEditable,{className:"task-editor-input"}),placeholder:o!=null&&o!==""?t.jsx(ot,{children:o}):null,ErrorBoundary:Ce}),t.jsx(Ye,{emittedHtml:r,initialValue:e}),t.jsx(ke,{}),t.jsx(je,{}),t.jsx($e.HistoryPlugin,{}),t.jsx(Le.ListPlugin,{}),t.jsx(Te.LinkPlugin,{}),t.jsx(ve,{}),t.jsx(Oe,{maxDepth:7})]})]})]})}const et=N(re)`
3
+ `)||c.trim()===""&&Ke(s))return;const p=e.createDocumentFragment();c.split(`
4
+ `).forEach((m,g)=>{g>0&&p.appendChild(e.createElement("br")),m!==""&&p.appendChild(e.createTextNode(m))}),s.parentNode.replaceChild(p,s)})},Xe=200,Ve=(e,o)=>{if(e.delete(o),e.add(o),e.size>Xe){const a=e.values().next().value;a!=null&&e.delete(a)}},qe=(e,o,a)=>e!==o&&!a.has(e),I=1,{taskManagement:{taskDetail:{descriptionEditorTooltip:k}},common:{texts:{bold:z,italic:G,underline:B,link:K,bulletList:W,indent:X,outdent:V,undo:q,redo:Q}}}=de.getLocalizedStrings();function J(e,o){o===null?(e.style.opacity="0",e.style.top="-1000px",e.style.left="-1000px"):(e.style.opacity="1",e.style.top=`${o.top+o.height+window.pageYOffset+10}px`,e.style.left=`${o.left+window.pageXOffset-e.offsetWidth/2+o.width/2}px`)}function oe(e){const o=e.anchor,a=e.focus,r=e.anchor.getNode(),s=e.focus.getNode();return r===s?r:e?.isBackward()?P.$isAtNodeEnd(a)?r:s:P.$isAtNodeEnd(o)?s:r}function Qe({editor:e}){const o=ge(),a=i.useRef(null),r=i.useRef(null),s=i.useRef(!1),[c,p]=i.useState(""),[m,g]=i.useState(!1),[L,E]=i.useState(null),h=i.useCallback(()=>{const d=l.$getSelection();if(l.$isRangeSelection(d)){const $=oe(d),f=$.getParent();C.$isLinkNode(f)?p(f.getURL()):C.$isLinkNode($)?p($.getURL()):p("")}const M=a.current,j=window.getSelection(),A=document.activeElement;if(M===null)return;const T=e.getRootElement();if(d!==null&&j!=null&&!j.isCollapsed&&T!==null&&T.contains(j.anchorNode)){const $=j.getRangeAt(0);let f;if(j.anchorNode===T){let v=T;for(;v.firstElementChild!=null;)v=v.firstElementChild;f=v.getBoundingClientRect()}else f=$.getBoundingClientRect();s.current||J(M,f),E(d)}else(!A||A.className!=="link-input")&&(J(M,null),E(null),g(!1),p(""));return!0},[e]);return i.useEffect(()=>F.mergeRegister(e.registerUpdateListener(({editorState:d})=>{d.read(()=>{h()})}),e.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(h(),!0),I)),[e,h]),i.useEffect(()=>{e.getEditorState().read(()=>{h()})},[e,h]),i.useEffect(()=>{m&&r.current!=null&&r.current?.focus()},[m]),t.jsx(it,{ref:a,children:m?t.jsx("input",{ref:r,className:"link-input",value:c,onChange:d=>{p(d.target.value)},onKeyDown:d=>{d.key==="Enter"?(d.preventDefault(),L!==null&&(c!==""&&e.dispatchCommand(C.TOGGLE_LINK_COMMAND,c),g(!1))):d.key==="Escape"&&(d.preventDefault(),g(!1))}}):t.jsxs(st,{className:"link-input",children:[t.jsx(rt,{href:c,target:"_blank",rel:"noopener noreferrer",children:c}),t.jsx(lt,{className:"link-edit",type:"button",tabIndex:0,onMouseDown:d=>d.preventDefault(),onClick:()=>{g(!0)},children:t.jsx(ce,{style:{width:n.sp3,height:n.sp3,color:o.colors.primary}})})]})})}function Je({onChange:e}){const[o]=ee.useLexicalComposerContext(),a=i.useRef(null),[r,s]=i.useState(!1),[c,p]=i.useState(!1),[m,g]=i.useState("paragraph"),[,L]=i.useState(!1),[E,h]=i.useState(!1),[d,M]=i.useState(!1),[j,A]=i.useState(!1),[T,$]=i.useState(!1),f=i.useCallback(()=>{const u=l.$getSelection();if(l.$isRangeSelection(u)){const O=u.anchor.getNode(),y=O.getKey()==="root"?O:O.getTopLevelElementOrThrow(),_=y.getKey();if(o.getElementByKey(_)!==null)if(D.$isListNode(y)){const w=F.$getNearestNodeOfType(O,D.ListNode),se=w?w.getTag():y.getTag();g(se)}else{const w=H.$isHeadingNode(y)?y.getTag():y.getType();g(w)}$(u.hasFormat("bold")),M(u.hasFormat("italic")),A(u.hasFormat("underline")),L(P.$isParentElementRTL(u));const R=oe(u),ie=R.getParent();C.$isLinkNode(ie)||C.$isLinkNode(R)?h(!0):h(!1)}},[o]);i.useEffect(()=>F.mergeRegister(o.registerUpdateListener(({editorState:u})=>{u.read(()=>{f()})}),o.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(f(),!1),I),o.registerCommand(l.CAN_UNDO_COMMAND,u=>(s(u),!1),I),o.registerCommand(l.CAN_REDO_COMMAND,u=>(p(u),!1),I)),[o,f]),i.useEffect(()=>o.registerUpdateListener(({dirtyElements:u,dirtyLeaves:O,editorState:y,tags:_})=>{_.has("history-merge")||_.has("initial-content")||u.size===0&&O.size===0||y.read(()=>{const R=te.$generateHtmlFromNodes(o,null);e(R)})}),[o,e]);const v=i.useCallback(()=>{E?o.dispatchCommand(C.TOGGLE_LINK_COMMAND,null):o.dispatchCommand(C.TOGGLE_LINK_COMMAND,"https://")},[o,E]),ae=()=>{m!=="ul"?o.dispatchCommand(D.INSERT_UNORDERED_LIST_COMMAND,void 0):o.dispatchCommand(D.REMOVE_LIST_COMMAND,void 0)};return t.jsxs(at,{className:"toolbar",ref:a,children:[t.jsxs(Y,{children:[t.jsx(b,{placement:"bottom",title:z,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"bold"),className:"toolbar-item spaced "+(T?"active":""),"data-testid":"task-description-editor-toolbar-bold","aria-label":z,children:t.jsx(De,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:G,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"italic"),className:"toolbar-item spaced "+(d?"active":""),"data-testid":"task-description-editor-toolbar-italic","aria-label":G,children:t.jsx(Me,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:B,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"underline"),className:"toolbar-item spaced "+(j?"active":""),"data-testid":"task-description-editor-toolbar-underline","aria-label":B,children:t.jsx(Ae,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:K,children:t.jsx(x,{type:"button",onClick:v,className:"toolbar-item spaced "+(E?"active":""),"data-testid":"task-description-editor-toolbar-link","aria-label":K,children:t.jsx(_e,{className:"format"})})}),E&&ze.createPortal(t.jsx(Qe,{editor:o}),document.body),t.jsx(Z,{}),t.jsx(b,{placement:"bottom",title:W,children:t.jsx(x,{type:"button",onClick:ae,className:"toolbar-item spaced "+(m==="ul"?"active":""),"data-testid":"task-description-editor-toolbar-bulletList","aria-label":W,children:t.jsx(Re,{className:"format"})})}),t.jsx(Z,{}),t.jsx(b,{placement:"bottom",title:k.leftAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"left"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-leftAlign","aria-label":k.leftAlign,children:t.jsx(we,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.centerAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"center"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-centerAlign","aria-label":k.centerAlign,children:t.jsx(Se,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.rightAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"right"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-rightAlign","aria-label":k.rightAlign,children:t.jsx(Ie,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.justifyAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"justify"),className:"toolbar-item","data-testid":"task-description-editor-toolbar-justifyAlign","aria-label":k.justifyAlign,children:t.jsx(He,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:X,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.INDENT_CONTENT_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-indent","aria-label":X,children:t.jsx(Fe,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:V,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.OUTDENT_CONTENT_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-outdent","aria-label":V,children:t.jsx(Pe,{className:"format"})})})]}),t.jsxs(Y,{children:[t.jsx(b,{placement:"bottom",title:q,children:t.jsx(x,{type:"button",disabled:!r,onClick:()=>o.dispatchCommand(l.UNDO_COMMAND,void 0),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-undo","aria-label":q,children:t.jsx(le,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:Q,children:t.jsx(x,{type:"button",disabled:!c,onClick:()=>o.dispatchCommand(l.REDO_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-redo","aria-label":Q,children:t.jsx(Ue,{className:"format"})})})]})]})}function Ye({emittedHtml:e,initialValue:o}){const[a]=ee.useLexicalComposerContext(),r=i.useRef(void 0);return i.useEffect(()=>{const s=o??"";if(!qe(s,r.current,e)){r.current=s;return}const c=r.current==null;if(r.current=s,s.trim()===""){c||a.update(()=>{const p=l.$getRoot();p.clear(),p.append(l.$createParagraphNode())},{tag:"initial-content"});return}a.update(()=>{const p=new DOMParser,m=s.trim(),g=m.startsWith("<p")||m.startsWith("<div")||m.startsWith("<ul")||m.startsWith("<ol")||m.startsWith("<h")?s:`<p>${Ge(s)}</p>`,L=p.parseFromString(g,"text/html");We(L);const E=te.$generateNodesFromDOM(a,L),h=l.$getRoot();h.clear(),h.append(...E)},{tag:"initial-content"})},[a,o,e]),null}const Ze={namespace:"TaskDescriptionEditor",onError(e){throw e},nodes:[H.HeadingNode,D.ListNode,D.ListItemNode,H.QuoteNode,C.AutoLinkNode,C.LinkNode],theme:fe};function Nt({initialValue:e,placeholder:o,onChange:a}){const r=i.useRef(new Set).current,s=i.useCallback(c=>{Ve(r,c),a(c)},[r,a]);return t.jsxs(he.LexicalComposer,{initialConfig:Ze,children:[t.jsx(Ne,{}),t.jsxs(et,{children:[t.jsx(Je,{onChange:s}),t.jsxs(tt,{children:[t.jsx(Ee.RichTextPlugin,{contentEditable:t.jsx(ye.ContentEditable,{className:"task-editor-input"}),placeholder:o!=null&&o!==""?t.jsx(ot,{children:o}):null,ErrorBoundary:Ce}),t.jsx(Ye,{emittedHtml:r,initialValue:e}),t.jsx(ke,{}),t.jsx(je,{}),t.jsx($e.HistoryPlugin,{}),t.jsx(Le.ListPlugin,{}),t.jsx(Te.LinkPlugin,{}),t.jsx(ve,{}),t.jsx(Oe,{maxDepth:7})]})]})]})}const et=N(re)`
5
5
  position: relative;
6
6
  margin: ${n.sp0};
7
7
  border-radius: ${n.sp2};