@e-llm-studio/requirement-ai 0.0.229 → 0.0.231
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/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),a=require("../../store/ref.context.js"),i=require("@lexical/html"),s=require("turndown"),l=require("turndown-plugin-gfm"),u=require("../UnsavedChangesPopup/UnsavedChangesPopup.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=new(c(s).default)({headingStyle:"atx",codeBlockStyle:"fenced"});d.keep(["ins","del","mark"]),d.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),a=require("../../store/ref.context.js"),i=require("@lexical/html"),s=require("turndown"),l=require("turndown-plugin-gfm"),u=require("../UnsavedChangesPopup/UnsavedChangesPopup.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=new(c(s).default)({headingStyle:"atx",codeBlockStyle:"fenced"}),h=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");d.keep(["ins","del","mark"]),d.addRule("ai-reasoning-link-passthrough",{filter:e=>{var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r},replacement:(e,t)=>{const r=t,n=r.getAttribute("href")||"",o=r.textContent||"";return`<a href="${a=n,h(a).replace(/"/g,""")}">${h(o)}</a>`;var a}}),d.keep(e=>"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")),d.addRule("md-table-passthrough",{filter:e=>"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table"),replacement:(e,t)=>t.textContent||""}),d.use(l.tables);const g=e=>(e||"").replace(/\r\n/g,"\n").trim(),p=r.forwardRef(({type:s,value:l,handleUpdateState:c,onBlur:h,placeholder:p,minHeight:f,height:m,mode:v,doNotShowBorderInViewMode:E,onSaveUnsavedChanges:b,onDiscardUnsavedChanges:w,isSavingUnsavedChanges:y=!1},A)=>{const S=r.useRef(null),[x,C]=r.useState({type:s,value:l}),[$,q]=r.useState(0),[N,T]=r.useState(!1),R=r.useRef(l),_=r.useRef(l),j=r.useRef(Boolean(l)),{contentRef:L,setContentRef:H}=a.useRefStore();r.useEffect(()=>{C(e=>Object.assign(Object.assign({},e),{value:l})),R.current=l,_.current=l,j.current=Boolean(l),T(!1)},[l]),r.useImperativeHandle(A,()=>({requestClose:()=>!("edit"===v&&g(R.current)!==g(_.current))||(T(!0),!1)}),[v]);return r.useEffect(()=>{const e=()=>{L&&L.current&&q(L.current.clientHeight-60)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[L]),t.jsxs("div",Object.assign({style:{position:"relative",width:"100%",height:m,minHeight:f}},{children:[N&&t.jsx(u.UnsavedChangesPopup,{isSaving:y,onSave:()=>e.__awaiter(void 0,void 0,void 0,function*(){yield null==b?void 0:b(),R.current=_.current,T(!1)}),onDiscard:()=>{_.current=R.current,null==w||w(),T(!1)}}),t.jsx(o.default,{minHeight:f,height:m,placeholder:p||"Enter some text...",onChange:(e,t)=>{e.read(()=>{const e=i.$generateHtmlFromNodes(t,null),r=(new DOMParser).parseFromString(e,"text/html");function n(e){return Array.from(e.childNodes).map(e=>{if(e.nodeType===Node.TEXT_NODE)return e.textContent||"";if(e.nodeType===Node.ELEMENT_NODE){const t=e,r=t.tagName.toLowerCase(),o=n(t);if("strong"===r||"b"===r)return o.startsWith("<strong>")&&o.endsWith("</strong>")?o:`<strong>${o}</strong>`;if("em"===r||"i"===r)return o.startsWith("<em>")&&o.endsWith("</em>")?o:`<em>${o}</em>`;if("code"===r)return`<code>${o}</code>`;if("u"===r)return`<u>${o}</u>`;if("s"===r)return`<s>${o}</s>`;if("a"===r){return`<a href="${t.getAttribute("href")||""}">${o}</a>`}return o}return""}).join("")}r.querySelectorAll("span").forEach(e=>{const t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,"")),e.removeAttribute("class"),e.textContent=e.textContent||""})(e)}),r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(e=>{e.innerHTML=n(e)});const o=[];r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach((e,t)=>{o.push(e.outerHTML);const n=r.createElement("span");n.textContent=`%%REVIEW_${t}%%`,e.replaceWith(n)});const a=[];r.querySelectorAll("table").forEach((e,t)=>{a.push(e.outerHTML);const n=r.createElement("p");n.textContent=`%%TABLE_${t}%%`,e.replaceWith(n)});let s=d.turndown(r.body.innerHTML);o.forEach((e,t)=>{s=s.replace(`%%REVIEW\\_${t}%%`,e)}),a.forEach((e,t)=>{s=s.replace(`%%TABLE\\_${t}%%`,`\n\n${e}\n\n`)}),s=s.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),s=s.replace(/\s+class="PlaygroundEditorTheme__[^"]*"/g,""),s=s.replace(/<span\s+style="white-space:\s*pre-wrap;?">([\s\S]*?)<\/span>/g,"$1"),s=s.replace(/\s+style="white-space:\s*pre-wrap;?"/g,""),s=s.replace(/<b>\s*<strong>([\s\S]*?)<\/strong>\s*<\/b>/g,"<strong>$1</strong>"),j.current&&(R.current=s,j.current=!1),_.current=s,((e,t)=>{c(e,t)})("prompt",s)})},toolbarConfig:n.DEFAULT_TOOLBAR_CONFIG,editorRef:S,mode:v,initialString:{type:x.type,value:x.value},dynamicHeight:$,onBlur:h,doNotShowBorderInViewMode:E||!1})]}))});p.displayName="RichTextEditor",exports.default=p;
|
|
2
2
|
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),l=require("lucide-react"),s=require("showdown"),i=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),d=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),g=require("../userstory-with-citation/UserStoryWithCitation.js"),p=require("../RequirementAIWrapper/RequirementAIWrapper.js"),j=require("../story-screen/BigEnoughPanel.js"),y=require("./TitleEditor/TitleEditor.js"),f=require("./ClinicalTrialSection.js"),h=require("../story-screen/CompletionPanel.js"),m=require("../../icons/CDIcon.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var S=b(s);const x={[p.SectionStatus.WAITING]:"WAITING TO GENERATE",[p.SectionStatus.IN_PROGRESS]:"IN PROGRESS",[p.SectionStatus.GENERATED]:"GENERATED",[p.SectionStatus.FAILED]:"FAILED",[p.SectionStatus.GENERATE]:"GENERATE",[p.SectionStatus.APPROVED]:"APPROVED"};function C(e){const n=[],s=/<learned>(.*?)<\/learned>/g;let o,r=0,d=0;for(;null!==(o=s.exec(e));){const[,u]=o,c=o.index;c>r&&n.push(t.jsx("span",{children:e.slice(r,c)},"text-pre-"+d++)),n.push(t.jsx(i.Tooltip,Object.assign({title:u,placement:"top"},{children:t.jsx(l.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),`tooltip-${a.v4()}`)),r=s.lastIndex}return r<(null==e?void 0:e.length)&&n.push(t.jsx("span",{children:e.slice(r)},"text-post-"+d++)),n}function O(e,t,n){var l;if(!e)return{};if(t)return Object.assign({},e.parentConfig);const s=Object.assign({},e.childConfig);return n&&(null===(l=e.subFeatureOverrides)||void 0===l?void 0:l[n])?Object.assign(Object.assign({},s),e.subFeatureOverrides[n]):s}const I=({displayName:e})=>{var n;const{customStyles:s}=p.useRequirementAI(),i=null===(n=null==s?void 0:s.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return t.jsxs("div",Object.assign({className:r.default.displayName,style:null==i?void 0:i.wrapper},{children:[t.jsx(l.Bookmark,{className:r.default.displayNameIcon,style:null==i?void 0:i.displayNameIcon}),t.jsxs("span",Object.assign({style:null==i?void 0:i.label},{children:[e,":"]}))]}))},w=({isUserStoryCurrentlyUpdated:s,artifactId:b,artifactTitleId:N,parentUserStory:E,currentUserStory:D,onUserStoryChange:B,parentIndex:T,currentIndex:k,enableDownload:P,isDiffEditReviewMode:A,showUserStoryDiff:U,handleDownloadUserStory:_,handleOpenSendDialog:M,updateUserStoryArtifact:R,selectedArtifactId:q,isDisplayHighlightControl:L,elementDisplayConfig:F,_resolvedConfig:z,showWrapper:W=!1,defaultExpanded:V,actionItemsConfig:G,onDelete:H,contextVariant:$,expandedSubFeatures:Q,showDisplayName:X=!0,allowTitleEdit:Z=!0,showConfidenceScore:J=!0,showBorderTop:K=!0,sectionStatusConfig:Y,showCompletionPanel:ee=!1,completionPanelConfig:te,showAddSectionButton:ne=!1,disableEditPlan:le=!1,useMuiTooltip:se=!1,approveButtonConfig:ie,editButtonConfig:oe,CDNeededInChip:ae,blockNumber:re})=>{var de,ue,ce,ve,ge,pe,je,ye,fe,he,me,be,Se,xe,Ce,Oe,Ie,we,Ne,Ee,De,Be,Te,ke;const{isLoadingSectionData:Pe=!1,onLoadSectionData:Ae,status:Ue,onStatusClick:_e,completedCount:Me,totalCount:Re,isNoDataAvailable:qe=!1}=null!=Y?Y:{},{searchQueryList:Le,citations:Fe,customStyles:ze,customSectionConfig:We}=p.useRequirementAI(),Ve=null==ze?void 0:ze.userStoryCardStyles,Ge=null==Ve?void 0:Ve.customSectionEditButton,He=null==Ve?void 0:Ve.statusStyles,$e=null===(de=null==ze?void 0:ze.userStoryCardStyles)||void 0===de?void 0:de.userStoryEditStyles,Qe=null===(ue=null==ze?void 0:ze.userStoryScreenStyles)||void 0===ue?void 0:ue.userStoryContentStyles,Xe=null==Ve?void 0:Ve.progressHeaderStyles,Ze=null==Ve?void 0:Ve.clinicalTrialSectionStyles,Je=null==Ve?void 0:Ve.CompletionStyles,Ke=null==Ve?void 0:Ve.noDataStyles,Ye=null==Ve?void 0:Ve.approveButtonStyles,et=null!==(ve=null===(ce=null==We?void 0:We.shouldRender)||void 0===ce?void 0:ce.call(We,D))&&void 0!==ve&&ve,tt=null===(ge=null==We?void 0:We.getValue)||void 0===ge?void 0:ge.call(We,D),nt=null!==(je=null===(pe=null==We?void 0:We.getFields)||void 0===pe?void 0:pe.call(We,D))&&void 0!==je?je:[],lt=null!==(ye=null==We?void 0:We.isEditDisabled)&&void 0!==ye&&ye,st=null!==(he=null===(fe=null==We?void 0:We.isSaving)||void 0===fe?void 0:fe.call(We,D))&&void 0!==he&&he,it=(ot=null!==(me=D.completion_percentage)&&void 0!==me?me:0,at=Je,ot>=80?null==at?void 0:at.highCompletion:ot>=50?null==at?void 0:at.mediumCompletion:null==at?void 0:at.lowCompletion);var ot,at;const rt={[p.SectionStatus.WAITING]:null==He?void 0:He.waiting,[p.SectionStatus.IN_PROGRESS]:null==He?void 0:He.inProgress,[p.SectionStatus.GENERATED]:null==He?void 0:He.generated,[p.SectionStatus.FAILED]:null==He?void 0:He.failed,[p.SectionStatus.GENERATE]:null==He?void 0:He.generate,[p.SectionStatus.APPROVED]:null==He?void 0:He.approved},[dt,ut]=n.useState(Object.assign(Object.assign({},structuredClone(D)),{value:d.formatMarkdown(D.value)||""})),[ct,vt]=n.useState({userStory:!!D.isDefaultEdit}),[gt,pt]=n.useState(!1),[jt,yt]=n.useState(!1),[ft,ht]=n.useState(null),[mt,bt]=n.useState(null),{userStory:St,customIcons:xt}=p.useRequirementAI(),[Ct,Ot]=n.useState(null!=V?V:""===T||q===D.artifactId||!!D.isDefaultOpen),[It,wt]=n.useState(!1),[Nt,Et]=n.useState(null),[Dt,Bt]=n.useState(null),[Tt,kt]=n.useState(!1),Pt=n.useRef(null),At=n.useRef(null),[Ut,_t]=n.useState(!1),[Mt,Rt]=n.useState(!1),qt=n.useRef(null),[Lt,Ft]=n.useState(!1);n.useEffect(()=>{s&&Ot(s)},[s]),n.useEffect(()=>{ut(Object.assign(Object.assign({},structuredClone(D)),{value:d.formatMarkdown(D.value)||""}))},[D]),n.useEffect(()=>{Le.length>0?Ot(!0):void 0===V&&q&&Ot(q===D.artifactId)},[Le,q,D.artifactId]),n.useEffect(()=>{Q&&Q.length>0&&Ot(Q.includes(D.artifactId)||""===T||q===D.artifactId||!!D.isDefaultOpen)},[Q]);const zt=()=>{Et(null)},Wt=()=>{Bt(null)},Vt=()=>{Ct&&ct.userStory&&At.current&&!At.current.requestClose()||Ot(e=>!e)},Gt=()=>e.__awaiter(void 0,void 0,void 0,function*(){var e,t;kt(!0);try{"userStory"==="userStory"&&(B(dt),console.log("I am changing RTE editor values",dt)),yield null===(e=null==oe?void 0:oe.onSaveEditedSection)||void 0===e?void 0:e.call(oe,dt),yield R(Fe,St,b,null===(t=qt.current)||void 0===t?void 0:t.signal),B(Object.assign(Object.assign({},dt),{isDefaultEdit:!1})),vt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}finally{kt(!1)}});const Ht=null!=(null==D?void 0:D.big_enough)&&!Number.isNaN(D.big_enough)&&!!(null==D?void 0:D.big_enough_decision_factors),$t=null!==(be=null==D?void 0:D.completion_percentage)&&void 0!==be?be:0,Qt=!!(null==D?void 0:D.completion_decision_factors),Xt=""===T,Zt=null!=z?z:O(F,Xt),Jt=!A&&!U;return n.useEffect(()=>{if(!mt)return;const e=setTimeout(()=>{const e=document.getElementById(`story-card-${mt}`);null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>clearTimeout(e)},[mt]),n.useEffect(()=>{D.isDefaultEdit&&vt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},[D.isDefaultEdit]),console.log("block number in userstory card ",re),t.jsxs("div",Object.assign({className:r.default.card,"data-block-id":"user-story-card-wrapper-"+re,style:null==Ve?void 0:Ve.cardStyle,id:`story-card-${D.title}`,"data-expanded":Ct},{children:[t.jsxs("div",Object.assign({className:r.default.titleSection,style:null==Ve?void 0:Ve.titleSection},{children:[t.jsxs("div",Object.assign({className:r.default.titleRow,style:null==Ve?void 0:Ve.titleRow,onClick:Vt},{children:[t.jsxs("div",Object.assign({className:r.default.titleLeft,style:null==Ve?void 0:Ve.titleLeft,onMouseEnter:()=>_t(!0),onMouseLeave:()=>_t(!1)},{children:[X&&t.jsx(I,{displayName:N}),gt&&Jt?t.jsx(y.InlineTitleEditor,{title:D.title,onSave:t=>((t,n)=>e.__awaiter(void 0,void 0,void 0,function*(){var e;try{let l=Object.assign({},D);D.artifactId===n?l.title=t:l.sub_features=(null===(e=D.sub_features)||void 0===e?void 0:e.map(e=>e.artifactId===n?Object.assign(Object.assign({},e),{title:t}):e))||[],ut(l),B(l),pt(!1)}catch(e){console.error("Failed to save title",e)}}))(t,D.artifactId),onCancel:()=>{pt(!1)},inputStyle:null==$e?void 0:$e.inlineTitleInput,confirmButtonStyle:null==$e?void 0:$e.inlineTitleConfirm,cancelButtonStyle:null==$e?void 0:$e.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",Object.assign({className:r.default.storyTitleWrapper},{children:[t.jsx(i.Tooltip,Object.assign({title:C(D.title),arrow:!0},{children:t.jsx("h2",Object.assign({title:se?void 0:D.title,className:r.default.storyTitle,style:null==Ve?void 0:Ve.storyTitle},{children:C(D.title)}),D.artifactId)})),ee&&(Qt?t.jsx(h.CompletionPanel,Object.assign({customIcons:null==xt?void 0:xt.userStoryIcons,customStyles:null==Ve?void 0:Ve.aiReasoningCitaionStyles,currentUserStory:D,panelStyles:null==Ve?void 0:Ve.CompletionStyles,onToggleStateChange:Rt,completionPanelConfig:te},{children:t.jsxs("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Je?void 0:Je.badge),it)},{children:[t.jsxs("span",{children:[$t,"% Completed"]}),t.jsx("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:t.jsx(m.default,{color:"currentColor"})})),Mt?t.jsx(l.ChevronUp,{size:14,style:null==Je?void 0:Je.chevronStyle}):t.jsx(l.ChevronDown,{size:14,style:null==Je?void 0:Je.chevronStyle})]}))})):t.jsx("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Je?void 0:Je.badge),it)},{children:t.jsxs("span",{children:[$t,"% Completed"]})}))),Z&&t.jsx("button",Object.assign({type:"button",className:r.default.titleEditButton,style:null==$e?void 0:$e.titleEditButton,onClick:e=>{e.stopPropagation(),pt(!0),Ct||Ot(!0)},"aria-label":"Edit title",title:"Edit title"},{children:t.jsx("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(Ue||void 0!==Me&&void 0!==Re)&&t.jsxs("div",Object.assign({className:r.default.statusContainer},{children:[void 0!==Me&&void 0!==Re&&t.jsxs("div",Object.assign({className:r.default.completedBadge},{children:["Completed: ",Me,"/",Re]})),Ue&&t.jsx("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==_e||_e()},onMouseEnter:()=>Ft(!0),onMouseLeave:()=>Ft(!1),className:r.default.statusButton,style:Object.assign(Object.assign({},null===(Se=rt[Ue])||void 0===Se?void 0:Se.default),Lt&&(null===(xe=rt[Ue])||void 0===xe?void 0:xe.hover))},{children:x[Ue]}))]})),t.jsxs("div",Object.assign({className:r.default.titleActions,style:null==Ve?void 0:Ve.titleActions,onClick:e=>e.stopPropagation()},{children:[(Zt.showProgressPercentage||Zt.showGapBox)&&W&&t.jsxs("div",Object.assign({className:r.default.progressHeader,style:null==Xe?void 0:Xe.wrapper},{children:[Zt.showProgressPercentage&&t.jsxs("div",Object.assign({className:r.default.progressPercentage,style:null==Xe?void 0:Xe.percentage},{children:[null!==(Oe=null!==(Ce=null==D?void 0:D.confidenceScore)&&void 0!==Ce?Ce:null==Zt?void 0:Zt.confidenceValue)&&void 0!==Oe?Oe:"0","%"]})),Zt.showGapBox&&t.jsxs("div",Object.assign({className:r.default.gapBox,style:null==Xe?void 0:Xe.gapBox},{children:[null!==(we=null!==(Ie=null==D?void 0:D.gapValue)&&void 0!==Ie?Ie:null==Zt?void 0:Zt.gapBoxValue)&&void 0!==we?we:"2"," ","Gaps"]}))]})),Ht&&t.jsx(j.BigEnoughPanel,{customIcons:null==xt?void 0:xt.userStoryIcons,customStyles:null==Ve?void 0:Ve.aiReasoningCitaionStyles,currentUserStory:D,panelStyles:null==Ve?void 0:Ve.BigEnoughStyles}),!ct.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==Zt?void 0:Zt.showShareButton)&&t.jsx("button",Object.assign({className:r.default.iconButton,style:null==Ve?void 0:Ve.iconButton,onClick:e=>{Et(e.currentTarget)}},{children:t.jsx(l.ExternalLink,{size:16})})),t.jsxs(i.Menu,Object.assign({id:"user-story-share-menu",anchorEl:Nt,open:!!Nt,onClose:()=>Et(null),style:null==Ve?void 0:Ve.userStoryShareMenu},{children:[P&&t.jsx(i.MenuItem,Object.assign({style:null==Ve?void 0:Ve.userStoryMenuItem,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){wt(!0),_&&(yield Promise.all([_("pdf"),_("doc")]),wt(!1))})},{children:t.jsxs("div",Object.assign({ref:Pt,className:r.default.menuItemContent,style:null==Ve?void 0:Ve.menuItemContent},{children:[t.jsx(l.Download,{size:16,color:null==Ve?void 0:Ve.menuIconColor}),t.jsx("p",Object.assign({style:null==Ve?void 0:Ve.menuLabel},{children:"Download"}))]}))})),t.jsx(i.MenuItem,Object.assign({style:null==Ve?void 0:Ve.userStoryMenuItem,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){let e=D;E&&(e=Object.assign(Object.assign({},D),{value:`${u.replaceTitleSection(null==E?void 0:E.value,D.title)} \n${D.value}`})),null==M||M(!0,[e],D.artifactId),zt()})},{children:t.jsxs("div",Object.assign({style:null==Ve?void 0:Ve.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(l.Share2,{size:16,color:null==Ve?void 0:Ve.menuIconColor}),t.jsx("p",Object.assign({style:null==Ve?void 0:Ve.menuLabel},{children:"Send"}))]}))})),t.jsx(i.MenuItem,Object.assign({style:null==Ve?void 0:Ve.userStoryMenuItem,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=(new S.default.Converter).makeHtml(d.formatMarkdown(D.value)||D.value),t=function(e){const t=(new S.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(d.formatMarkdown(D.value)||D.value),n=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{yield navigator.clipboard.write([n]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{zt()}})},{children:t.jsxs("div",Object.assign({style:null==Ve?void 0:Ve.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(l.Copy,{size:16,color:null==Ve?void 0:Ve.menuIconColor}),t.jsx("p",Object.assign({style:null==Ve?void 0:Ve.menuLabel},{children:"Copy"}))]}))}))]}))]}),ct.userStory&&Ct?t.jsx(c.default,{type:"outline",children:"Cancel",style:null==Ve?void 0:Ve.cancelButton,onClick:()=>{var e;null===(e=qt.current)||void 0===e||e.abort(),vt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}}):t.jsx(t.Fragment,{}),ct.userStory&&Ct?t.jsx(c.default,{type:"fill",children:Tt?t.jsxs("span",Object.assign({className:r.default.savingSpinner,style:null==Ve?void 0:Ve.savingSpinner},{children:[t.jsx(l.LoaderCircle,{className:r.default.spinAnimation,style:null==Ve?void 0:Ve.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Tt,style:Tt?null==Ve?void 0:Ve.savingButton:null==Ve?void 0:Ve.saveButton,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){yield Gt()})}):!A&&!U&&!le&&Ct&&!1!==(null==Zt?void 0:Zt.showEditButton)&&t.jsx("button",Object.assign({className:r.default.iconButton,style:null==Ve?void 0:Ve.editButton,onClick:()=>vt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},{children:t.jsx(l.PencilIcon,{color:null==Ve?void 0:Ve.pencilIconColor,size:16})})),ne&&Xt&&Ct&&!A&&!U&&!1!==(null==Zt?void 0:Zt.showEditButton)&&t.jsxs("button",Object.assign({type:"button",className:r.default.addSectionButton,style:null==$e?void 0:$e.addSectionButton,onClick:e=>{var t,n,l;e.stopPropagation();const s=(null!==(n=null===(t=D.sub_features)||void 0===t?void 0:t.length)&&void 0!==n?n:0)+1,i={artifactId:a.v4(),title:`New Section ${s}`,value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},o=Object.assign(Object.assign({},D),{sub_features:[...null!==(l=D.sub_features)&&void 0!==l?l:[],i]});ut(o),B(o),Ot(!0),bt(i.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(l.Plus,{size:14}),t.jsx("span",Object.assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!Xt&&!A&&!le&&!U&&t.jsx("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==H||H()},className:r.default.iconButton,style:null==$e?void 0:$e.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(l.Trash2,{size:16})})),et&&t.jsx("button",Object.assign({type:"button",className:r.default.iconButton,style:null==Ge?void 0:Ge.button,disabled:lt,onClick:e=>{if(e.stopPropagation(),jt)return ht(null),void yt(!1);ht(structuredClone(null!=tt?tt:{})),Ot(!0),yt(!0)}},{children:jt?t.jsx(l.X,{size:16,color:null==Ve?void 0:Ve.pencilIconColor,style:null==Ge?void 0:Ge.cancelIcon}):t.jsx(l.PencilIcon,{size:16,color:null==Ve?void 0:Ve.pencilIconColor,style:null==Ge?void 0:Ge.editIcon})})),(null==Zt?void 0:Zt.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",Object.assign({className:r.default.actionItemBtn,style:null==Ve?void 0:Ve.actionItemBtn,onClick:e=>{e.stopPropagation(),Bt(e.currentTarget)}},{children:t.jsx(l.Ellipsis,{})})),t.jsx(i.Menu,Object.assign({id:"user-story-action-menu",anchorEl:Dt,open:!!Dt,onClose:Wt,style:null==Ve?void 0:Ve.userStoryShareMenu},{children:null==G?void 0:G.items.map((e,n)=>t.jsx(i.MenuItem,Object.assign({style:null==Ve?void 0:Ve.userStoryMenuItem,onClick:()=>{e.onclick(D),Wt()}},{children:t.jsxs("div",Object.assign({className:r.default.menuItemContent,style:Object.assign(Object.assign({},null==Ve?void 0:Ve.menuItemContent),!e.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",Object.assign({className:r.default.menuItemIcon,style:null==Ve?void 0:Ve.menuItemIcon},{children:e.icon})),t.jsx("p",Object.assign({style:null==Ve?void 0:Ve.menuLabel},{children:e.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==Ve?void 0:Ve.menuItemRight})]}))}),`action-item-${n}-${e.name}`))}))]}),t.jsx("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),Vt()},style:null==Ve?void 0:Ve.chevronButton,className:r.default.chevronButton},{children:Ct?t.jsx(l.ChevronUp,{className:r.default.chevronIcon,color:null==Ve?void 0:Ve.chevronIconColor}):t.jsx(l.ChevronDown,{className:r.default.chevronIcon,color:null==Ve?void 0:Ve.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==Ve?void 0:Ve.dividerStyle})]})),Ct&&t.jsx("div",Object.assign({className:r.default.cardContent,style:Object.assign(Object.assign({},null==Ve?void 0:Ve.cardContentStyle),{borderTop:K?"1px solid #E5E5E5":"none"})},{children:Pe?t.jsxs("div",Object.assign({className:r.default.loadingContainer},{children:[t.jsx("div",Object.assign({className:r.default.loadingIconWrapper},{children:t.jsx(l.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),t.jsxs("div",{children:[t.jsx("h3",Object.assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),t.jsx("p",Object.assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),t.jsx("button",Object.assign({type:"button",onClick:()=>null==Ae?void 0:Ae(),className:r.default.viewStatusButton},{children:"View Status"}))]})):qe?t.jsxs("div",Object.assign({className:r.default.noDataContainer,style:null==Ke?void 0:Ke.container},{children:[t.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration,style:null==Ke?void 0:Ke.illustration}),t.jsx("h3",Object.assign({className:r.default.noDataTitle,style:null==Ke?void 0:Ke.title},{children:"No Data Available for This Section"})),t.jsx("p",Object.assign({className:r.default.noDataSubtitle,style:null==Ke?void 0:Ke.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]})):t.jsxs("div",Object.assign({className:r.default.contentInner,style:null==Ve?void 0:Ve.contentInner},{children:[t.jsxs("div",Object.assign({className:r.default.descriptionSection,style:null==Ve?void 0:Ve.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==Ve?void 0:Ve.justifyBetween}),ct.userStory?t.jsx(v.default,{ref:At,minHeight:"100%",height:"100%",type:"string",value:d.formatMarkdown(D.value)||"",handleUpdateState:(e,t)=>{const n=d.indentMarkdown(t);ut(e=>Object.assign(Object.assign({},e),{value:n||""}))},doNotShowBorderInViewMode:!1,onBlur:()=>{},mode:ct.userStory?"edit":"readOnly",onSaveUnsavedChanges:()=>e.__awaiter(void 0,void 0,void 0,function*(){yield Gt(),Ot(!1)}),onDiscardUnsavedChanges:()=>{ut(Object.assign(Object.assign({},structuredClone(D)),{value:d.formatMarkdown(D.value)||""})),vt(e=>Object.assign(Object.assign({},e),{userStory:!1})),Ot(!1)},isSavingUnsavedChanges:Tt}):et?t.jsx(f.default,{styles:Ze,fields:nt,readonly:!jt,isSaving:st,value:null!==(Ne=null!=ft?ft:tt)&&void 0!==Ne?Ne:{},onChange:ht,onSave:()=>e.__awaiter(void 0,void 0,void 0,function*(){var e;ft&&(yield null===(e=null==We?void 0:We.onSave)||void 0===e?void 0:e.call(We,D,ft),ht(null),yt(!1))}),onCancel:()=>{ht(null),yt(!1)}}):t.jsxs(t.Fragment,{children:[t.jsx(g.default,{showUserStoryDiff:U,isParent:""===T,message:d.formatMarkdown(D.value)||"",artifactId:D.artifactId,customStyles:Qe,isDisplayHighlightControl:L,contextVariant:$,showConfidenceScore:J,CDNeededInChip:ae,blockId:re}),(ie||oe)&&t.jsxs("div",Object.assign({className:r.default.actionButtonsContainer,style:null==Ye?void 0:Ye.container},{children:[oe&&!ct.userStory&&t.jsxs(t.Fragment,{children:[t.jsx("button",Object.assign({type:"button",className:r.default.actionButton,style:null==Ye?void 0:Ye.button,disabled:oe.disabled||oe.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=oe.onClick)||void 0===t||t.call(oe),vt(e=>Object.assign(Object.assign({},e),{userStory:!0})),Ot(!0)}},{children:oe.isLoading?t.jsxs(t.Fragment,{children:[t.jsx(l.LoaderCircle,{size:16,className:r.default.actionButtonSpinner,style:null==Ye?void 0:Ye.icon}),t.jsx("span",Object.assign({style:null==Ye?void 0:Ye.text},{children:null!==(Ee=oe.label)&&void 0!==Ee?Ee:"Edit"}))]}):t.jsxs(t.Fragment,{children:[t.jsx(l.PencilIcon,{size:16,style:null==Ye?void 0:Ye.icon}),t.jsx("span",Object.assign({style:null==Ye?void 0:Ye.text},{children:null!==(De=oe.label)&&void 0!==De?De:"Edit"}))]})})),ie&&t.jsx("span",{className:r.default.actionButtonDivider})]}),ie&&t.jsx("button",Object.assign({type:"button",className:r.default.actionButton,style:null==Ye?void 0:Ye.button,disabled:ie.disabled||ie.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=ie.onClick)||void 0===t||t.call(ie)}},{children:ie.isLoading?t.jsxs(t.Fragment,{children:[t.jsx(l.LoaderCircle,{size:16,className:r.default.actionButtonSpinner,style:null==Ye?void 0:Ye.icon}),t.jsx("span",Object.assign({style:null==Ye?void 0:Ye.text},{children:null!==(Be=ie.label)&&void 0!==Be?Be:"Approve"}))]}):t.jsxs(t.Fragment,{children:[t.jsx(l.Check,{size:16,style:null==Ye?void 0:Ye.icon}),t.jsx("span",Object.assign({style:null==Ye?void 0:Ye.text},{children:null!==(Te=ie.label)&&void 0!==Te?Te:"Approve"}))]})}))]}))]})]})),null===(ke=dt.sub_features)||void 0===ke?void 0:ke.map((e,n)=>{console.log("UserStoryCardWrapper: sub",e);const l=O(F,!1,e.artifactId);return t.jsx(w,{artifactId:b,isUserStoryCurrentlyUpdated:s,artifactTitleId:`${N}-${String.fromCharCode(65+n)}`,parentUserStory:D,parentIndex:`${T}${T&&"."}${k}`,currentIndex:`${n+1}`,doNotShowBorderInViewMode:!1,currentUserStory:e,onUserStoryChange:e=>((e,t)=>{const n=[...D.sub_features||[]];n[e]=t,B(Object.assign(Object.assign({},D),{sub_features:n}))})(n,e),enableDownload:!0,isDiffEditReviewMode:A,showUserStoryDiff:U,updateUserStoryArtifact:R,handleDownloadUserStory:_,handleOpenSendDialog:M,isDisplayHighlightControl:L,elementDisplayConfig:F,_resolvedConfig:l,actionItemsConfig:G,onDelete:()=>(e=>{const t=(D.sub_features||[]).filter((t,n)=>n!==e),n=Object.assign(Object.assign({},D),{sub_features:t});ut(n),B(n)})(n),expandedSubFeatures:Q,disableEditPlan:le,useMuiTooltip:se,blockNumber:e.blockNumber},e.artifactId)})]}))}))]}))};exports.StoryCard=w,exports.UserStoryCardWrapper=({artifactTitleIDs:e,expandedSubFeatures:n,isDiffEditReviewMode:s,showUserStoryDiff:i,updateUserStoryArtifact:o,isUserStoryCurrentlyUpdated:a,artifactId:d,handleOpenSendDialog:u,handleDownloadUserStory:c,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:j,showWrapper:y,actionItemsConfig:f,contextVariant:h,showDisplayName:m,allowTitleEdit:b,showConfidenceScore:S,showBorderTop:x,defaultExpanded:C,showCompletionPanel:I=!1,completionPanelConfig:N,showAddSectionButton:E=!1,disableEditPlan:D=!1,useMuiTooltip:B=!1,approveButtonConfig:T,editButtonConfig:k,CDNeededInChip:P})=>{const{userStory:A,setUserStory:U,customStyles:_,searchQueryList:M,currentHighlightIndex:R,setCurrentHighlightIndex:q,segmentComponentConfig:L,sectionStatusConfig:F}=p.useRequirementAI(),z=null==_?void 0:_.userStoryCardStyles,W=0===R,V=R===M.length-1;return t.jsxs("div",Object.assign({className:r.default.userStoryCardWrapper,style:g?Object.assign(Object.assign({},null==z?void 0:z.userStoryCardWrapper),{position:"relative"}):null==z?void 0:z.userStoryCardWrapper},{children:[g&&t.jsx(t.Fragment,{children:M.length>0&&t.jsx("div",Object.assign({className:r.default.wrapper},{children:t.jsx("div",Object.assign({className:r.default.highlightNavigation},{children:t.jsxs("div",Object.assign({className:r.default.navigationContainer},{children:[t.jsxs("span",Object.assign({className:r.default.navCounter},{children:[R+1," of ",M.length]})),t.jsxs("div",Object.assign({className:r.default.navButtons},{children:[t.jsx("button",Object.assign({onClick:()=>{R>0&&q(e=>e-1)},className:r.default.navButton,disabled:W},{children:t.jsx(l.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",Object.assign({onClick:()=>{R<M.length-1&&q(e=>e+1)},className:r.default.navButton,disabled:V},{children:t.jsx(l.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),A.map((l,r)=>{console.log("UserStoryCardWrapper: userstory",l);const p=O(j,!0);return t.jsx(w,{isUserStoryCurrentlyUpdated:a,artifactId:d,artifactTitleId:e[r]||"",expandedSubFeatures:n,currentUserStory:l,onUserStoryChange:e=>{U(t=>(t[r]=e,[...t]))},parentIndex:"",currentIndex:`${r+1}`,doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:i,updateUserStoryArtifact:o,handleOpenSendDialog:u,handleDownloadUserStory:c,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:j,_resolvedConfig:p,showWrapper:y,defaultExpanded:C,actionItemsConfig:f,contextVariant:h,showDisplayName:m,allowTitleEdit:b,showConfidenceScore:S,showBorderTop:x,sectionStatusConfig:F,showCompletionPanel:I,completionPanelConfig:N,showAddSectionButton:E,disableEditPlan:D,useMuiTooltip:B,approveButtonConfig:T,CDNeededInChip:P,editButtonConfig:k},l.artifactId)})]}))},exports.default=w,exports.replaceLearnedTagsWithInfo=C;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),l=require("lucide-react"),s=require("showdown"),i=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),d=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),g=require("../userstory-with-citation/UserStoryWithCitation.js"),p=require("../RequirementAIWrapper/RequirementAIWrapper.js"),j=require("../story-screen/BigEnoughPanel.js"),y=require("./TitleEditor/TitleEditor.js"),f=require("./ClinicalTrialSection.js"),h=require("../story-screen/CompletionPanel.js"),m=require("../../icons/CDIcon.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var S=b(s);const x={[p.SectionStatus.WAITING]:"WAITING TO GENERATE",[p.SectionStatus.IN_PROGRESS]:"IN PROGRESS",[p.SectionStatus.GENERATED]:"GENERATED",[p.SectionStatus.FAILED]:"FAILED",[p.SectionStatus.GENERATE]:"GENERATE",[p.SectionStatus.APPROVED]:"APPROVED"};function C(e){const n=[],s=/<learned>(.*?)<\/learned>/g;let o,r=0,d=0;for(;null!==(o=s.exec(e));){const[,u]=o,c=o.index;c>r&&n.push(t.jsx("span",{children:e.slice(r,c)},"text-pre-"+d++)),n.push(t.jsx(i.Tooltip,Object.assign({title:u,placement:"top"},{children:t.jsx(l.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),`tooltip-${a.v4()}`)),r=s.lastIndex}return r<(null==e?void 0:e.length)&&n.push(t.jsx("span",{children:e.slice(r)},"text-post-"+d++)),n}function O(e,t,n){var l;if(!e)return{};if(t)return Object.assign({},e.parentConfig);const s=Object.assign({},e.childConfig);return n&&(null===(l=e.subFeatureOverrides)||void 0===l?void 0:l[n])?Object.assign(Object.assign({},s),e.subFeatureOverrides[n]):s}const I=({displayName:e})=>{var n;const{customStyles:s}=p.useRequirementAI(),i=null===(n=null==s?void 0:s.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return t.jsxs("div",Object.assign({className:r.default.displayName,style:null==i?void 0:i.wrapper},{children:[t.jsx(l.Bookmark,{className:r.default.displayNameIcon,style:null==i?void 0:i.displayNameIcon}),t.jsxs("span",Object.assign({style:null==i?void 0:i.label},{children:[e,":"]}))]}))},N=({isUserStoryCurrentlyUpdated:s,artifactId:b,artifactTitleId:w,parentUserStory:E,currentUserStory:D,onUserStoryChange:B,parentIndex:T,currentIndex:k,enableDownload:U,isDiffEditReviewMode:P,showUserStoryDiff:A,handleDownloadUserStory:R,handleOpenSendDialog:_,updateUserStoryArtifact:M,selectedArtifactId:q,isDisplayHighlightControl:L,elementDisplayConfig:F,_resolvedConfig:z,showWrapper:W=!1,defaultExpanded:G,actionItemsConfig:V,onDelete:H,contextVariant:$,expandedSubFeatures:Q,showDisplayName:Y=!0,allowTitleEdit:X=!0,showConfidenceScore:Z=!0,showBorderTop:J=!0,sectionStatusConfig:K,showCompletionPanel:ee=!1,completionPanelConfig:te,showAddSectionButton:ne=!1,disableEditPlan:le=!1,useMuiTooltip:se=!1,approveButtonConfig:ie,editButtonConfig:oe,CDNeededInChip:ae,blockNumber:re})=>{var de,ue,ce,ve,ge,pe,je,ye,fe,he,me,be,Se,xe,Ce,Oe,Ie,Ne,we,Ee,De,Be,Te,ke;const{isLoadingSectionData:Ue=!1,onLoadSectionData:Pe,status:Ae,onStatusClick:Re,completedCount:_e,totalCount:Me,isNoDataAvailable:qe=!1}=null!=K?K:{},{searchQueryList:Le,citations:Fe,customStyles:ze,customSectionConfig:We}=p.useRequirementAI(),Ge=null==ze?void 0:ze.userStoryCardStyles,Ve=null==Ge?void 0:Ge.customSectionEditButton,He=null==Ge?void 0:Ge.statusStyles,$e=null===(de=null==ze?void 0:ze.userStoryCardStyles)||void 0===de?void 0:de.userStoryEditStyles,Qe=null===(ue=null==ze?void 0:ze.userStoryScreenStyles)||void 0===ue?void 0:ue.userStoryContentStyles,Ye=null==Ge?void 0:Ge.progressHeaderStyles,Xe=null==Ge?void 0:Ge.clinicalTrialSectionStyles,Ze=null==Ge?void 0:Ge.CompletionStyles,Je=null==Ge?void 0:Ge.noDataStyles,Ke=null==Ge?void 0:Ge.approveButtonStyles,et=null!==(ve=null===(ce=null==We?void 0:We.shouldRender)||void 0===ce?void 0:ce.call(We,D))&&void 0!==ve&&ve,tt=null===(ge=null==We?void 0:We.getValue)||void 0===ge?void 0:ge.call(We,D),nt=null!==(je=null===(pe=null==We?void 0:We.getFields)||void 0===pe?void 0:pe.call(We,D))&&void 0!==je?je:[],lt=null!==(ye=null==We?void 0:We.isEditDisabled)&&void 0!==ye&&ye,st=null!==(he=null===(fe=null==We?void 0:We.isSaving)||void 0===fe?void 0:fe.call(We,D))&&void 0!==he&&he,it=(ot=null!==(me=D.completion_percentage)&&void 0!==me?me:0,at=Ze,ot>=80?null==at?void 0:at.highCompletion:ot>=50?null==at?void 0:at.mediumCompletion:null==at?void 0:at.lowCompletion);var ot,at;const rt={[p.SectionStatus.WAITING]:null==He?void 0:He.waiting,[p.SectionStatus.IN_PROGRESS]:null==He?void 0:He.inProgress,[p.SectionStatus.GENERATED]:null==He?void 0:He.generated,[p.SectionStatus.FAILED]:null==He?void 0:He.failed,[p.SectionStatus.GENERATE]:null==He?void 0:He.generate,[p.SectionStatus.APPROVED]:null==He?void 0:He.approved},[dt,ut]=n.useState(Object.assign(Object.assign({},structuredClone(D)),{value:d.formatMarkdown(D.value)||""})),[ct,vt]=n.useState({userStory:!!D.isDefaultEdit}),[gt,pt]=n.useState(!1),[jt,yt]=n.useState(!1),[ft,ht]=n.useState(null),[mt,bt]=n.useState(null),{userStory:St,customIcons:xt}=p.useRequirementAI(),[Ct,Ot]=n.useState(null!=G?G:""===T||q===D.artifactId||!!D.isDefaultOpen),[It,Nt]=n.useState(!1),[wt,Et]=n.useState(null),[Dt,Bt]=n.useState(null),[Tt,kt]=n.useState(!1),Ut=n.useRef(null),Pt=n.useRef(null),[At,Rt]=n.useState(!1),[_t,Mt]=n.useState(!1),qt=n.useRef(null),[Lt,Ft]=n.useState(!1);n.useEffect(()=>{s&&Ot(s)},[s]),n.useEffect(()=>{ut(Object.assign(Object.assign({},structuredClone(D)),{value:d.formatMarkdown(D.value)||""}))},[D]),n.useEffect(()=>{Le.length>0?Ot(!0):void 0===G&&q&&Ot(q===D.artifactId)},[Le,q,D.artifactId]),n.useEffect(()=>{Q&&Q.length>0&&Ot(Q.includes(D.artifactId)||""===T||q===D.artifactId||!!D.isDefaultOpen)},[Q]);const zt=()=>{Et(null)},Wt=()=>{Bt(null)},Gt=()=>{Ct&&ct.userStory&&Pt.current&&!Pt.current.requestClose()||Ot(e=>!e)},Vt=()=>e.__awaiter(void 0,void 0,void 0,function*(){var e,t;kt(!0);try{"userStory"==="userStory"&&(B(dt),console.log("I am changing RTE editor values",dt)),yield null===(e=null==oe?void 0:oe.onSaveEditedSection)||void 0===e?void 0:e.call(oe,dt),yield M(Fe,St,b,null===(t=qt.current)||void 0===t?void 0:t.signal),B(Object.assign(Object.assign({},dt),{isDefaultEdit:!1})),vt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}finally{kt(!1)}});const Ht=null!=(null==D?void 0:D.big_enough)&&!Number.isNaN(D.big_enough)&&!!(null==D?void 0:D.big_enough_decision_factors),$t=null!==(be=null==D?void 0:D.completion_percentage)&&void 0!==be?be:0,Qt=!!(null==D?void 0:D.completion_decision_factors),Yt=""===T,Xt=null!=z?z:O(F,Yt),Zt=!P&&!A;return n.useEffect(()=>{if(!mt)return;const e=setTimeout(()=>{const e=document.getElementById(`story-card-${mt}`);null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>clearTimeout(e)},[mt]),n.useEffect(()=>{D.isDefaultEdit&&vt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},[D.isDefaultEdit]),console.log("block number in userstory card ",re),console.log("[TESTING-CURRENT-USER-STORY] \n",D,"\n[TESTING-USER-STORY] \n",St),t.jsxs("div",Object.assign({className:r.default.card,"data-block-id":"user-story-card-wrapper-"+re,style:null==Ge?void 0:Ge.cardStyle,id:`story-card-${D.title}`,"data-expanded":Ct},{children:[t.jsxs("div",Object.assign({className:r.default.titleSection,style:null==Ge?void 0:Ge.titleSection},{children:[t.jsxs("div",Object.assign({className:r.default.titleRow,style:null==Ge?void 0:Ge.titleRow,onClick:Gt},{children:[t.jsxs("div",Object.assign({className:r.default.titleLeft,style:null==Ge?void 0:Ge.titleLeft,onMouseEnter:()=>Rt(!0),onMouseLeave:()=>Rt(!1)},{children:[Y&&t.jsx(I,{displayName:w}),gt&&Zt?t.jsx(y.InlineTitleEditor,{title:D.title,onSave:t=>((t,n)=>e.__awaiter(void 0,void 0,void 0,function*(){var e;try{let l=Object.assign({},D);D.artifactId===n?l.title=t:l.sub_features=(null===(e=D.sub_features)||void 0===e?void 0:e.map(e=>e.artifactId===n?Object.assign(Object.assign({},e),{title:t}):e))||[],ut(l),B(l),pt(!1)}catch(e){console.error("Failed to save title",e)}}))(t,D.artifactId),onCancel:()=>{pt(!1)},inputStyle:null==$e?void 0:$e.inlineTitleInput,confirmButtonStyle:null==$e?void 0:$e.inlineTitleConfirm,cancelButtonStyle:null==$e?void 0:$e.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",Object.assign({className:r.default.storyTitleWrapper},{children:[t.jsx(i.Tooltip,Object.assign({title:C(D.title),arrow:!0},{children:t.jsx("h2",Object.assign({title:se?void 0:D.title,className:r.default.storyTitle,style:null==Ge?void 0:Ge.storyTitle},{children:C(D.title)}),D.artifactId)})),ee&&(Qt?t.jsx(h.CompletionPanel,Object.assign({customIcons:null==xt?void 0:xt.userStoryIcons,customStyles:null==Ge?void 0:Ge.aiReasoningCitaionStyles,currentUserStory:D,panelStyles:null==Ge?void 0:Ge.CompletionStyles,onToggleStateChange:Mt,completionPanelConfig:te},{children:t.jsxs("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ze?void 0:Ze.badge),it)},{children:[t.jsxs("span",{children:[$t,"% Completed"]}),t.jsx("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:t.jsx(m.default,{color:"currentColor"})})),_t?t.jsx(l.ChevronUp,{size:14,style:null==Ze?void 0:Ze.chevronStyle}):t.jsx(l.ChevronDown,{size:14,style:null==Ze?void 0:Ze.chevronStyle})]}))})):t.jsx("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ze?void 0:Ze.badge),it)},{children:t.jsxs("span",{children:[$t,"% Completed"]})}))),X&&t.jsx("button",Object.assign({type:"button",className:r.default.titleEditButton,style:null==$e?void 0:$e.titleEditButton,onClick:e=>{e.stopPropagation(),pt(!0),Ct||Ot(!0)},"aria-label":"Edit title",title:"Edit title"},{children:t.jsx("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(Ae||void 0!==_e&&void 0!==Me)&&t.jsxs("div",Object.assign({className:r.default.statusContainer},{children:[void 0!==_e&&void 0!==Me&&t.jsxs("div",Object.assign({className:r.default.completedBadge},{children:["Completed: ",_e,"/",Me]})),Ae&&t.jsx("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==Re||Re()},onMouseEnter:()=>Ft(!0),onMouseLeave:()=>Ft(!1),className:r.default.statusButton,style:Object.assign(Object.assign({},null===(Se=rt[Ae])||void 0===Se?void 0:Se.default),Lt&&(null===(xe=rt[Ae])||void 0===xe?void 0:xe.hover))},{children:x[Ae]}))]})),t.jsxs("div",Object.assign({className:r.default.titleActions,style:null==Ge?void 0:Ge.titleActions,onClick:e=>e.stopPropagation()},{children:[(Xt.showProgressPercentage||Xt.showGapBox)&&W&&t.jsxs("div",Object.assign({className:r.default.progressHeader,style:null==Ye?void 0:Ye.wrapper},{children:[Xt.showProgressPercentage&&t.jsxs("div",Object.assign({className:r.default.progressPercentage,style:null==Ye?void 0:Ye.percentage},{children:[null!==(Oe=null!==(Ce=null==D?void 0:D.confidenceScore)&&void 0!==Ce?Ce:null==Xt?void 0:Xt.confidenceValue)&&void 0!==Oe?Oe:"0","%"]})),Xt.showGapBox&&t.jsxs("div",Object.assign({className:r.default.gapBox,style:null==Ye?void 0:Ye.gapBox},{children:[null!==(Ne=null!==(Ie=null==D?void 0:D.gapValue)&&void 0!==Ie?Ie:null==Xt?void 0:Xt.gapBoxValue)&&void 0!==Ne?Ne:"2"," ","Gaps"]}))]})),Ht&&t.jsx(j.BigEnoughPanel,{customIcons:null==xt?void 0:xt.userStoryIcons,customStyles:null==Ge?void 0:Ge.aiReasoningCitaionStyles,currentUserStory:D,panelStyles:null==Ge?void 0:Ge.BigEnoughStyles}),!ct.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==Xt?void 0:Xt.showShareButton)&&t.jsx("button",Object.assign({className:r.default.iconButton,style:null==Ge?void 0:Ge.iconButton,onClick:e=>{Et(e.currentTarget)}},{children:t.jsx(l.ExternalLink,{size:16})})),t.jsxs(i.Menu,Object.assign({id:"user-story-share-menu",anchorEl:wt,open:!!wt,onClose:()=>Et(null),style:null==Ge?void 0:Ge.userStoryShareMenu},{children:[U&&t.jsx(i.MenuItem,Object.assign({style:null==Ge?void 0:Ge.userStoryMenuItem,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){Nt(!0),R&&(yield Promise.all([R("pdf"),R("doc")]),Nt(!1))})},{children:t.jsxs("div",Object.assign({ref:Ut,className:r.default.menuItemContent,style:null==Ge?void 0:Ge.menuItemContent},{children:[t.jsx(l.Download,{size:16,color:null==Ge?void 0:Ge.menuIconColor}),t.jsx("p",Object.assign({style:null==Ge?void 0:Ge.menuLabel},{children:"Download"}))]}))})),t.jsx(i.MenuItem,Object.assign({style:null==Ge?void 0:Ge.userStoryMenuItem,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){let e=D;E&&(e=Object.assign(Object.assign({},D),{value:`${u.replaceTitleSection(null==E?void 0:E.value,D.title)} \n${D.value}`})),null==_||_(!0,[e],D.artifactId),zt()})},{children:t.jsxs("div",Object.assign({style:null==Ge?void 0:Ge.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(l.Share2,{size:16,color:null==Ge?void 0:Ge.menuIconColor}),t.jsx("p",Object.assign({style:null==Ge?void 0:Ge.menuLabel},{children:"Send"}))]}))})),t.jsx(i.MenuItem,Object.assign({style:null==Ge?void 0:Ge.userStoryMenuItem,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=(new S.default.Converter).makeHtml(d.formatMarkdown(D.value)||D.value),t=function(e){const t=(new S.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(d.formatMarkdown(D.value)||D.value),n=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{yield navigator.clipboard.write([n]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{zt()}})},{children:t.jsxs("div",Object.assign({style:null==Ge?void 0:Ge.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(l.Copy,{size:16,color:null==Ge?void 0:Ge.menuIconColor}),t.jsx("p",Object.assign({style:null==Ge?void 0:Ge.menuLabel},{children:"Copy"}))]}))}))]}))]}),ct.userStory&&Ct?t.jsx(c.default,{type:"outline",children:"Cancel",style:null==Ge?void 0:Ge.cancelButton,onClick:()=>{var e;null===(e=qt.current)||void 0===e||e.abort(),vt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}}):t.jsx(t.Fragment,{}),ct.userStory&&Ct?t.jsx(c.default,{type:"fill",children:Tt?t.jsxs("span",Object.assign({className:r.default.savingSpinner,style:null==Ge?void 0:Ge.savingSpinner},{children:[t.jsx(l.LoaderCircle,{className:r.default.spinAnimation,style:null==Ge?void 0:Ge.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Tt,style:Tt?null==Ge?void 0:Ge.savingButton:null==Ge?void 0:Ge.saveButton,onClick:()=>e.__awaiter(void 0,void 0,void 0,function*(){yield Vt()})}):!P&&!A&&!le&&Ct&&!1!==(null==Xt?void 0:Xt.showEditButton)&&t.jsx("button",Object.assign({className:r.default.iconButton,style:null==Ge?void 0:Ge.editButton,onClick:()=>vt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},{children:t.jsx(l.PencilIcon,{color:null==Ge?void 0:Ge.pencilIconColor,size:16})})),ne&&Yt&&Ct&&!P&&!A&&!1!==(null==Xt?void 0:Xt.showEditButton)&&t.jsxs("button",Object.assign({type:"button",className:r.default.addSectionButton,style:null==$e?void 0:$e.addSectionButton,onClick:e=>{var t,n,l;e.stopPropagation();const s=(null!==(n=null===(t=D.sub_features)||void 0===t?void 0:t.length)&&void 0!==n?n:0)+1,i={artifactId:a.v4(),title:`New Section ${s}`,value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},o=Object.assign(Object.assign({},D),{sub_features:[...null!==(l=D.sub_features)&&void 0!==l?l:[],i]});ut(o),B(o),Ot(!0),bt(i.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(l.Plus,{size:14}),t.jsx("span",Object.assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!Yt&&!P&&!le&&!A&&t.jsx("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==H||H()},className:r.default.iconButton,style:null==$e?void 0:$e.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(l.Trash2,{size:16})})),et&&t.jsx("button",Object.assign({type:"button",className:r.default.iconButton,style:null==Ve?void 0:Ve.button,disabled:lt,onClick:e=>{if(e.stopPropagation(),jt)return ht(null),void yt(!1);ht(structuredClone(null!=tt?tt:{})),Ot(!0),yt(!0)}},{children:jt?t.jsx(l.X,{size:16,color:null==Ge?void 0:Ge.pencilIconColor,style:null==Ve?void 0:Ve.cancelIcon}):t.jsx(l.PencilIcon,{size:16,color:null==Ge?void 0:Ge.pencilIconColor,style:null==Ve?void 0:Ve.editIcon})})),(null==Xt?void 0:Xt.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",Object.assign({className:r.default.actionItemBtn,style:null==Ge?void 0:Ge.actionItemBtn,onClick:e=>{e.stopPropagation(),Bt(e.currentTarget)}},{children:t.jsx(l.Ellipsis,{})})),t.jsx(i.Menu,Object.assign({id:"user-story-action-menu",anchorEl:Dt,open:!!Dt,onClose:Wt,style:null==Ge?void 0:Ge.userStoryShareMenu},{children:null==V?void 0:V.items.map((e,n)=>t.jsx(i.MenuItem,Object.assign({style:null==Ge?void 0:Ge.userStoryMenuItem,onClick:()=>{e.onclick(D),Wt()}},{children:t.jsxs("div",Object.assign({className:r.default.menuItemContent,style:Object.assign(Object.assign({},null==Ge?void 0:Ge.menuItemContent),!e.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",Object.assign({className:r.default.menuItemIcon,style:null==Ge?void 0:Ge.menuItemIcon},{children:e.icon})),t.jsx("p",Object.assign({style:null==Ge?void 0:Ge.menuLabel},{children:e.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==Ge?void 0:Ge.menuItemRight})]}))}),`action-item-${n}-${e.name}`))}))]}),t.jsx("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),Gt()},style:null==Ge?void 0:Ge.chevronButton,className:r.default.chevronButton},{children:Ct?t.jsx(l.ChevronUp,{className:r.default.chevronIcon,color:null==Ge?void 0:Ge.chevronIconColor}):t.jsx(l.ChevronDown,{className:r.default.chevronIcon,color:null==Ge?void 0:Ge.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==Ge?void 0:Ge.dividerStyle})]})),Ct&&t.jsx("div",Object.assign({className:r.default.cardContent,style:Object.assign(Object.assign({},null==Ge?void 0:Ge.cardContentStyle),{borderTop:J?"1px solid #E5E5E5":"none"})},{children:Ue?t.jsxs("div",Object.assign({className:r.default.loadingContainer},{children:[t.jsx("div",Object.assign({className:r.default.loadingIconWrapper},{children:t.jsx(l.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),t.jsxs("div",{children:[t.jsx("h3",Object.assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),t.jsx("p",Object.assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),t.jsx("button",Object.assign({type:"button",onClick:()=>null==Pe?void 0:Pe(),className:r.default.viewStatusButton},{children:"View Status"}))]})):qe?t.jsxs("div",Object.assign({className:r.default.noDataContainer,style:null==Je?void 0:Je.container},{children:[t.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration,style:null==Je?void 0:Je.illustration}),t.jsx("h3",Object.assign({className:r.default.noDataTitle,style:null==Je?void 0:Je.title},{children:"No Data Available for This Section"})),t.jsx("p",Object.assign({className:r.default.noDataSubtitle,style:null==Je?void 0:Je.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]})):t.jsxs("div",Object.assign({className:r.default.contentInner,style:null==Ge?void 0:Ge.contentInner},{children:[t.jsxs("div",Object.assign({className:r.default.descriptionSection,style:null==Ge?void 0:Ge.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==Ge?void 0:Ge.justifyBetween}),ct.userStory?t.jsx(v.default,{ref:Pt,minHeight:"100%",height:"100%",type:"string",value:u.preprocessUserStoryForEdit(d.formatMarkdown(D.value)||""),handleUpdateState:(e,t)=>{const n=u.postprocessUserStoryAfterEdit(d.indentMarkdown(t));ut(e=>Object.assign(Object.assign({},e),{value:n||""}))},doNotShowBorderInViewMode:!1,onBlur:()=>{},mode:ct.userStory?"edit":"readOnly",onSaveUnsavedChanges:()=>e.__awaiter(void 0,void 0,void 0,function*(){yield Vt(),Ot(!1)}),onDiscardUnsavedChanges:()=>{ut(Object.assign(Object.assign({},structuredClone(D)),{value:d.formatMarkdown(D.value)||""})),vt(e=>Object.assign(Object.assign({},e),{userStory:!1})),Ot(!1)},isSavingUnsavedChanges:Tt}):et?t.jsx(f.default,{styles:Xe,fields:nt,readonly:!jt,isSaving:st,value:null!==(we=null!=ft?ft:tt)&&void 0!==we?we:{},onChange:ht,onSave:()=>e.__awaiter(void 0,void 0,void 0,function*(){var e;ft&&(yield null===(e=null==We?void 0:We.onSave)||void 0===e?void 0:e.call(We,D,ft),ht(null),yt(!1))}),onCancel:()=>{ht(null),yt(!1)}}):t.jsxs(t.Fragment,{children:[t.jsx(g.default,{showUserStoryDiff:A,isParent:""===T,message:d.formatMarkdown(D.value)||"",artifactId:D.artifactId,customStyles:Qe,isDisplayHighlightControl:L,contextVariant:$,showConfidenceScore:Z,CDNeededInChip:ae,blockId:re}),(ie||oe)&&t.jsxs("div",Object.assign({className:r.default.actionButtonsContainer,style:null==Ke?void 0:Ke.container},{children:[oe&&!ct.userStory&&t.jsxs(t.Fragment,{children:[t.jsx("button",Object.assign({type:"button",className:r.default.actionButton,style:null==Ke?void 0:Ke.button,disabled:oe.disabled||oe.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=oe.onClick)||void 0===t||t.call(oe),vt(e=>Object.assign(Object.assign({},e),{userStory:!0})),Ot(!0)}},{children:oe.isLoading?t.jsxs(t.Fragment,{children:[t.jsx(l.LoaderCircle,{size:16,className:r.default.actionButtonSpinner,style:null==Ke?void 0:Ke.icon}),t.jsx("span",Object.assign({style:null==Ke?void 0:Ke.text},{children:null!==(Ee=oe.label)&&void 0!==Ee?Ee:"Edit"}))]}):t.jsxs(t.Fragment,{children:[t.jsx(l.PencilIcon,{size:16,style:null==Ke?void 0:Ke.icon}),t.jsx("span",Object.assign({style:null==Ke?void 0:Ke.text},{children:null!==(De=oe.label)&&void 0!==De?De:"Edit"}))]})})),ie&&t.jsx("span",{className:r.default.actionButtonDivider})]}),ie&&t.jsx("button",Object.assign({type:"button",className:r.default.actionButton,style:null==Ke?void 0:Ke.button,disabled:ie.disabled||ie.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=ie.onClick)||void 0===t||t.call(ie)}},{children:ie.isLoading?t.jsxs(t.Fragment,{children:[t.jsx(l.LoaderCircle,{size:16,className:r.default.actionButtonSpinner,style:null==Ke?void 0:Ke.icon}),t.jsx("span",Object.assign({style:null==Ke?void 0:Ke.text},{children:null!==(Be=ie.label)&&void 0!==Be?Be:"Approve"}))]}):t.jsxs(t.Fragment,{children:[t.jsx(l.Check,{size:16,style:null==Ke?void 0:Ke.icon}),t.jsx("span",Object.assign({style:null==Ke?void 0:Ke.text},{children:null!==(Te=ie.label)&&void 0!==Te?Te:"Approve"}))]})}))]}))]})]})),null===(ke=dt.sub_features)||void 0===ke?void 0:ke.map((e,n)=>{console.log("UserStoryCardWrapper: sub",e);const l=O(F,!1,e.artifactId);return t.jsx(N,{artifactId:b,isUserStoryCurrentlyUpdated:s,artifactTitleId:`${w}-${String.fromCharCode(65+n)}`,parentUserStory:D,parentIndex:`${T}${T&&"."}${k}`,currentIndex:`${n+1}`,doNotShowBorderInViewMode:!1,currentUserStory:e,onUserStoryChange:e=>((e,t)=>{const n=[...D.sub_features||[]];n[e]=t,B(Object.assign(Object.assign({},D),{sub_features:n}))})(n,e),enableDownload:!0,isDiffEditReviewMode:P,showUserStoryDiff:A,updateUserStoryArtifact:M,handleDownloadUserStory:R,handleOpenSendDialog:_,isDisplayHighlightControl:L,elementDisplayConfig:F,_resolvedConfig:l,actionItemsConfig:V,onDelete:()=>(e=>{const t=(D.sub_features||[]).filter((t,n)=>n!==e),n=Object.assign(Object.assign({},D),{sub_features:t});ut(n),B(n)})(n),expandedSubFeatures:Q,disableEditPlan:le,useMuiTooltip:se,blockNumber:e.blockNumber},e.artifactId)})]}))}))]}))};exports.StoryCard=N,exports.UserStoryCardWrapper=({artifactTitleIDs:e,expandedSubFeatures:n,isDiffEditReviewMode:s,showUserStoryDiff:i,updateUserStoryArtifact:o,isUserStoryCurrentlyUpdated:a,artifactId:d,handleOpenSendDialog:u,handleDownloadUserStory:c,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:j,showWrapper:y,actionItemsConfig:f,contextVariant:h,showDisplayName:m,allowTitleEdit:b,showConfidenceScore:S,showBorderTop:x,defaultExpanded:C,showCompletionPanel:I=!1,completionPanelConfig:w,showAddSectionButton:E=!1,disableEditPlan:D=!1,useMuiTooltip:B=!1,approveButtonConfig:T,editButtonConfig:k,CDNeededInChip:U})=>{const{userStory:P,setUserStory:A,customStyles:R,searchQueryList:_,currentHighlightIndex:M,setCurrentHighlightIndex:q,segmentComponentConfig:L,sectionStatusConfig:F}=p.useRequirementAI(),z=null==R?void 0:R.userStoryCardStyles,W=0===M,G=M===_.length-1;return t.jsxs("div",Object.assign({className:r.default.userStoryCardWrapper,style:g?Object.assign(Object.assign({},null==z?void 0:z.userStoryCardWrapper),{position:"relative"}):null==z?void 0:z.userStoryCardWrapper},{children:[g&&t.jsx(t.Fragment,{children:_.length>0&&t.jsx("div",Object.assign({className:r.default.wrapper},{children:t.jsx("div",Object.assign({className:r.default.highlightNavigation},{children:t.jsxs("div",Object.assign({className:r.default.navigationContainer},{children:[t.jsxs("span",Object.assign({className:r.default.navCounter},{children:[M+1," of ",_.length]})),t.jsxs("div",Object.assign({className:r.default.navButtons},{children:[t.jsx("button",Object.assign({onClick:()=>{M>0&&q(e=>e-1)},className:r.default.navButton,disabled:W},{children:t.jsx(l.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",Object.assign({onClick:()=>{M<_.length-1&&q(e=>e+1)},className:r.default.navButton,disabled:G},{children:t.jsx(l.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),P.map((l,r)=>{console.log("UserStoryCardWrapper: userstory",l);const p=O(j,!0);return t.jsx(N,{isUserStoryCurrentlyUpdated:a,artifactId:d,artifactTitleId:e[r]||"",expandedSubFeatures:n,currentUserStory:l,onUserStoryChange:e=>{A(t=>(t[r]=e,[...t]))},parentIndex:"",currentIndex:`${r+1}`,doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:i,updateUserStoryArtifact:o,handleOpenSendDialog:u,handleDownloadUserStory:c,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:j,_resolvedConfig:p,showWrapper:y,defaultExpanded:C,actionItemsConfig:f,contextVariant:h,showDisplayName:m,allowTitleEdit:b,showConfidenceScore:S,showBorderTop:x,sectionStatusConfig:F,showCompletionPanel:I,completionPanelConfig:w,showAddSectionButton:E,disableEditPlan:D,useMuiTooltip:B,approveButtonConfig:T,CDNeededInChip:U,editButtonConfig:k},l.artifactId)})]}))},exports.default=N,exports.replaceLearnedTagsWithInfo=C;
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),t=require("../ai-reasoning/AiReasoningCitationContent.js"),n=require("./CompletionPanel.module.css.js"),s=require("../../icons/CDIcon.js"),l=require("lucide-react");const a=({customIcons:a,customStyles:i,currentUserStory:r,panelStyles:c,showPanel:d=!1,children:u,onToggleStateChange:p,completionPanelConfig:m})=>{var g,f,j,v,C;const[h,k]=o.useState(!!d),x=null!==(g=null==r?void 0:r.completion_percentage)&&void 0!==g?g:0,y=o.useRef(null),b=o.useRef(null),{isMarkingComplete:_=!1,markedComplete:w=!1,onMarkAsComplete:P}=null!=m?m:{},S=()=>{k(!1),null==p||p(!1)},O=e=>{e.stopPropagation(),k(e=>{const o=!e;return null==p||p(o),o})};return o.useEffect(()=>{if(!h)return;const e=e=>{b.current&&!b.current.contains(e.target)&&S()},o=e=>{"Escape"===e.key&&(k(!1),null==p||p(!1))};return document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",o)}},[h,p]),e.jsxs("div",Object.assign({ref:b,className:n.default.triggerWrapper,style:null==c?void 0:c.triggerWrapperStyle},{children:[!d&&e.jsx(e.Fragment,{children:u?e.jsx("div",Object.assign({className:n.default.completionButton,style:null==c?void 0:c.completionButtonStyle,onClick:O},{children:u})):e.jsx("button",Object.assign({ref:y,className:n.default.completionIconButton,style:null==c?void 0:c.completionIconButtonStyle,onClick:O},{children:e.jsx(s.default,{})}))}),h&&e.jsx("div",Object.assign({className:`${n.default.dropdown} ${d?n.default.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==c?void 0:c.dropdownStyle),d?null==c?void 0:c.showPanelDropdownStyle:{}),onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()},{children:e.jsx(t.default,{aiReason:{explanation:(null===(f=r.completion_decision_factors)||void 0===f?void 0:f.explanation)||"",relevance_score:(null===(j=r.completion_decision_factors)||void 0===j?void 0:j.relevance_score)||0,reason:(null===(v=r.completion_decision_factors)||void 0===v?void 0:v.score_reason)||"",gap:(null===(C=r.completion_decision_factors)||void 0===C?void 0:C.gap)||"",id:"completion-cd"},customIcons:a,customStyles:i,footer:e.jsxs("div",Object.assign({className:n.default.markCompleteContainer},{children:[e.jsx("h4",Object.assign({className:n.default.markCompleteTitle},{children:"Mark this section as complete?"})),e.jsxs("p",Object.assign({className:n.default.markCompleteDescription},{children:["AI estimates this section is"," ",x,"% complete. If you're satisfied with the content, you can mark it as complete."]})),e.jsxs("button",Object.assign({className:n.default.markCompleteButton,disabled:_||w,onClick:e=>{e.stopPropagation(),null==P||P(),S()}},{children:[_?e.jsx(l.Loader2,{size:18,className:n.default.markCompleteSpinner}):e.jsx(l.Check,{size:18,strokeWidth:3,className:n.default.markCompleteIcon}),e.jsx("span",{children:w?"Marked Complete":"Mark as Complete"})]}))]}))})}))]}))};exports.CompletionPanel=a,exports.default=a;
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e}from"tslib";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{forwardRef as n,useRef as o,useState as i,useEffect as a,useImperativeHandle as s}from"react";import{DEFAULT_TOOLBAR_CONFIG as l}from"./Editor/constants/editorConfig.js";import c from"./Editor/Editor.js";import{useRefStore as d}from"../../store/ref.context.js";import{$generateHtmlFromNodes as u}from"@lexical/html";import
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{forwardRef as n,useRef as o,useState as i,useEffect as a,useImperativeHandle as s}from"react";import{DEFAULT_TOOLBAR_CONFIG as l}from"./Editor/constants/editorConfig.js";import c from"./Editor/Editor.js";import{useRefStore as d}from"../../store/ref.context.js";import{$generateHtmlFromNodes as u}from"@lexical/html";import p from"turndown";import{tables as h}from"turndown-plugin-gfm";import{UnsavedChangesPopup as g}from"../UnsavedChangesPopup/UnsavedChangesPopup.js";const m=new p({headingStyle:"atx",codeBlockStyle:"fenced"}),f=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");m.keep(["ins","del","mark"]),m.addRule("ai-reasoning-link-passthrough",{filter:e=>{var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r},replacement:(e,t)=>{const r=t,n=r.getAttribute("href")||"",o=r.textContent||"";return`<a href="${i=n,f(i).replace(/"/g,""")}">${f(o)}</a>`;var i}}),m.keep(e=>"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")),m.addRule("md-table-passthrough",{filter:e=>"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table"),replacement:(e,t)=>t.textContent||""}),m.use(h);const v=e=>(e||"").replace(/\r\n/g,"\n").trim(),E=n(({type:n,value:p,handleUpdateState:h,onBlur:f,placeholder:E,minHeight:b,height:w,mode:y,doNotShowBorderInViewMode:A,onSaveUnsavedChanges:C,onDiscardUnsavedChanges:S,isSavingUnsavedChanges:x=!1},$)=>{const N=o(null),[T,L]=i({type:n,value:p}),[_,j]=i(0),[q,B]=i(!1),H=o(p),R=o(p),M=o(Boolean(p)),{contentRef:W,setContentRef:k}=d();a(()=>{L(e=>Object.assign(Object.assign({},e),{value:p})),H.current=p,R.current=p,M.current=Boolean(p),B(!1)},[p]),s($,()=>({requestClose:()=>!("edit"===y&&v(H.current)!==v(R.current))||(B(!0),!1)}),[y]);return a(()=>{const e=()=>{W&&W.current&&j(W.current.clientHeight-60)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[W]),t("div",Object.assign({style:{position:"relative",width:"100%",height:w,minHeight:b}},{children:[q&&r(g,{isSaving:x,onSave:()=>e(void 0,void 0,void 0,function*(){yield null==C?void 0:C(),H.current=R.current,B(!1)}),onDiscard:()=>{R.current=H.current,null==S||S(),B(!1)}}),r(c,{minHeight:b,height:w,placeholder:E||"Enter some text...",onChange:(e,t)=>{e.read(()=>{const e=u(t,null),r=(new DOMParser).parseFromString(e,"text/html");function n(e){return Array.from(e.childNodes).map(e=>{if(e.nodeType===Node.TEXT_NODE)return e.textContent||"";if(e.nodeType===Node.ELEMENT_NODE){const t=e,r=t.tagName.toLowerCase(),o=n(t);if("strong"===r||"b"===r)return o.startsWith("<strong>")&&o.endsWith("</strong>")?o:`<strong>${o}</strong>`;if("em"===r||"i"===r)return o.startsWith("<em>")&&o.endsWith("</em>")?o:`<em>${o}</em>`;if("code"===r)return`<code>${o}</code>`;if("u"===r)return`<u>${o}</u>`;if("s"===r)return`<s>${o}</s>`;if("a"===r){return`<a href="${t.getAttribute("href")||""}">${o}</a>`}return o}return""}).join("")}r.querySelectorAll("span").forEach(e=>{const t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(e=>{const t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(e=>{(e=>{const t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,"")),e.removeAttribute("class"),e.textContent=e.textContent||""})(e)}),r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(e=>{e.innerHTML=n(e)});const o=[];r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach((e,t)=>{o.push(e.outerHTML);const n=r.createElement("span");n.textContent=`%%REVIEW_${t}%%`,e.replaceWith(n)});const i=[];r.querySelectorAll("table").forEach((e,t)=>{i.push(e.outerHTML);const n=r.createElement("p");n.textContent=`%%TABLE_${t}%%`,e.replaceWith(n)});let a=m.turndown(r.body.innerHTML);o.forEach((e,t)=>{a=a.replace(`%%REVIEW\\_${t}%%`,e)}),i.forEach((e,t)=>{a=a.replace(`%%TABLE\\_${t}%%`,`\n\n${e}\n\n`)}),a=a.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),a=a.replace(/\s+class="PlaygroundEditorTheme__[^"]*"/g,""),a=a.replace(/<span\s+style="white-space:\s*pre-wrap;?">([\s\S]*?)<\/span>/g,"$1"),a=a.replace(/\s+style="white-space:\s*pre-wrap;?"/g,""),a=a.replace(/<b>\s*<strong>([\s\S]*?)<\/strong>\s*<\/b>/g,"<strong>$1</strong>"),M.current&&(H.current=a,M.current=!1),R.current=a,((e,t)=>{h(e,t)})("prompt",a)})},toolbarConfig:l,editorRef:N,mode:y,initialString:{type:T.type,value:T.value},dynamicHeight:_,onBlur:f,doNotShowBorderInViewMode:A||!1})]}))});E.displayName="RichTextEditor";export{E as default};
|
|
2
2
|
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e}from"tslib";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";import{useState as l,useRef as o,useEffect as s}from"react";import{ChevronUp as a,ChevronDown as r,ExternalLink as d,Download as c,Share2 as u,Copy as v,LoaderCircle as g,PencilIcon as p,Plus as m,Trash2 as y,X as h,Ellipsis as b,Hourglass as S,Check as f,ChevronUpIcon as C,ChevronDownIcon as j,Info as O,Bookmark as I}from"lucide-react";import N from"showdown";import{Tooltip as w,Menu as E,MenuItem as D}from"@mui/material";import B from"../../icons/Illustration.svg.js";import{v4 as x}from"uuid";import T from"./UserStoryCard.module.css.js";import{formatMarkdown as A,indentMarkdown as P}from"../../utils/helpers.js";import{replaceTitleSection as U}from"../../utils/user-story.utils.js";import k from"../../shared/AtomicButton.js";import R from"../RichTextEditor/RichTextEditor.js";import M from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as _,useRequirementAI as L}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as z}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as V}from"./TitleEditor/TitleEditor.js";import W from"./ClinicalTrialSection.js";import{CompletionPanel as G}from"../story-screen/CompletionPanel.js";import H from"../../icons/CDIcon.js";const $={[_.WAITING]:"WAITING TO GENERATE",[_.IN_PROGRESS]:"IN PROGRESS",[_.GENERATED]:"GENERATED",[_.FAILED]:"FAILED",[_.GENERATE]:"GENERATE",[_.APPROVED]:"APPROVED"};function F(e){const t=[],i=/<learned>(.*?)<\/learned>/g;let l,o=0,s=0;for(;null!==(l=i.exec(e));){const[,a]=l,r=l.index;r>o&&t.push(n("span",{children:e.slice(o,r)},"text-pre-"+s++)),t.push(n(w,Object.assign({title:a,placement:"top"},{children:n(O,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),`tooltip-${x()}`)),o=i.lastIndex}return o<(null==e?void 0:e.length)&&t.push(n("span",{children:e.slice(o)},"text-post-"+s++)),t}function q(e,t,n){var i;if(!e)return{};if(t)return Object.assign({},e.parentConfig);const l=Object.assign({},e.childConfig);return n&&(null===(i=e.subFeatureOverrides)||void 0===i?void 0:i[n])?Object.assign(Object.assign({},l),e.subFeatureOverrides[n]):l}const Q=({displayName:e})=>{var i;const{customStyles:l}=L(),o=null===(i=null==l?void 0:l.userStoryCardStyles)||void 0===i?void 0:i.showDisplayName;return t("div",Object.assign({className:T.displayName,style:null==o?void 0:o.wrapper},{children:[n(I,{className:T.displayNameIcon,style:null==o?void 0:o.displayNameIcon}),t("span",Object.assign({style:null==o?void 0:o.label},{children:[e,":"]}))]}))},Z=({isUserStoryCurrentlyUpdated:C,artifactId:j,artifactTitleId:O,parentUserStory:I,currentUserStory:J,onUserStoryChange:K,parentIndex:X,currentIndex:Y,enableDownload:ee,isDiffEditReviewMode:te,showUserStoryDiff:ne,handleDownloadUserStory:ie,handleOpenSendDialog:le,updateUserStoryArtifact:oe,selectedArtifactId:se,isDisplayHighlightControl:ae,elementDisplayConfig:re,_resolvedConfig:de,showWrapper:ce=!1,defaultExpanded:ue,actionItemsConfig:ve,onDelete:ge,contextVariant:pe,expandedSubFeatures:me,showDisplayName:ye=!0,allowTitleEdit:he=!0,showConfidenceScore:be=!0,showBorderTop:Se=!0,sectionStatusConfig:fe,showCompletionPanel:Ce=!1,completionPanelConfig:je,showAddSectionButton:Oe=!1,disableEditPlan:Ie=!1,useMuiTooltip:Ne=!1,approveButtonConfig:we,editButtonConfig:Ee,CDNeededInChip:De,blockNumber:Be})=>{var xe,Te,Ae,Pe,Ue,ke,Re,Me,_e,Le,ze,Ve,We,Ge,He,$e,Fe,qe,Qe,Ze,Je,Ke,Xe,Ye;const{isLoadingSectionData:et=!1,onLoadSectionData:tt,status:nt,onStatusClick:it,completedCount:lt,totalCount:ot,isNoDataAvailable:st=!1}=null!=fe?fe:{},{searchQueryList:at,citations:rt,customStyles:dt,customSectionConfig:ct}=L(),ut=null==dt?void 0:dt.userStoryCardStyles,vt=null==ut?void 0:ut.customSectionEditButton,gt=null==ut?void 0:ut.statusStyles,pt=null===(xe=null==dt?void 0:dt.userStoryCardStyles)||void 0===xe?void 0:xe.userStoryEditStyles,mt=null===(Te=null==dt?void 0:dt.userStoryScreenStyles)||void 0===Te?void 0:Te.userStoryContentStyles,yt=null==ut?void 0:ut.progressHeaderStyles,ht=null==ut?void 0:ut.clinicalTrialSectionStyles,bt=null==ut?void 0:ut.CompletionStyles,St=null==ut?void 0:ut.noDataStyles,ft=null==ut?void 0:ut.approveButtonStyles,Ct=null!==(Pe=null===(Ae=null==ct?void 0:ct.shouldRender)||void 0===Ae?void 0:Ae.call(ct,J))&&void 0!==Pe&&Pe,jt=null===(Ue=null==ct?void 0:ct.getValue)||void 0===Ue?void 0:Ue.call(ct,J),Ot=null!==(Re=null===(ke=null==ct?void 0:ct.getFields)||void 0===ke?void 0:ke.call(ct,J))&&void 0!==Re?Re:[],It=null!==(Me=null==ct?void 0:ct.isEditDisabled)&&void 0!==Me&&Me,Nt=null!==(Le=null===(_e=null==ct?void 0:ct.isSaving)||void 0===_e?void 0:_e.call(ct,J))&&void 0!==Le&&Le,wt=((e,t)=>e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion)(null!==(ze=J.completion_percentage)&&void 0!==ze?ze:0,bt),Et={[_.WAITING]:null==gt?void 0:gt.waiting,[_.IN_PROGRESS]:null==gt?void 0:gt.inProgress,[_.GENERATED]:null==gt?void 0:gt.generated,[_.FAILED]:null==gt?void 0:gt.failed,[_.GENERATE]:null==gt?void 0:gt.generate,[_.APPROVED]:null==gt?void 0:gt.approved},[Dt,Bt]=l(Object.assign(Object.assign({},structuredClone(J)),{value:A(J.value)||""})),[xt,Tt]=l({userStory:!!J.isDefaultEdit}),[At,Pt]=l(!1),[Ut,kt]=l(!1),[Rt,Mt]=l(null),[_t,Lt]=l(null),{userStory:zt,customIcons:Vt}=L(),[Wt,Gt]=l(null!=ue?ue:""===X||se===J.artifactId||!!J.isDefaultOpen),[Ht,$t]=l(!1),[Ft,qt]=l(null),[Qt,Zt]=l(null),[Jt,Kt]=l(!1),Xt=o(null),Yt=o(null),[en,tn]=l(!1),[nn,ln]=l(!1),on=o(null),[sn,an]=l(!1);s(()=>{C&&Gt(C)},[C]),s(()=>{Bt(Object.assign(Object.assign({},structuredClone(J)),{value:A(J.value)||""}))},[J]),s(()=>{at.length>0?Gt(!0):void 0===ue&&se&&Gt(se===J.artifactId)},[at,se,J.artifactId]),s(()=>{me&&me.length>0&&Gt(me.includes(J.artifactId)||""===X||se===J.artifactId||!!J.isDefaultOpen)},[me]);const rn=()=>{qt(null)},dn=()=>{Zt(null)},cn=()=>{Wt&&xt.userStory&&Yt.current&&!Yt.current.requestClose()||Gt(e=>!e)},un=()=>e(void 0,void 0,void 0,function*(){var e,t;Kt(!0);try{"userStory"==="userStory"&&(K(Dt),console.log("I am changing RTE editor values",Dt)),yield null===(e=null==Ee?void 0:Ee.onSaveEditedSection)||void 0===e?void 0:e.call(Ee,Dt),yield oe(rt,zt,j,null===(t=on.current)||void 0===t?void 0:t.signal),K(Object.assign(Object.assign({},Dt),{isDefaultEdit:!1})),Tt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}finally{Kt(!1)}});const vn=null!=(null==J?void 0:J.big_enough)&&!Number.isNaN(J.big_enough)&&!!(null==J?void 0:J.big_enough_decision_factors),gn=null!==(Ve=null==J?void 0:J.completion_percentage)&&void 0!==Ve?Ve:0,pn=!!(null==J?void 0:J.completion_decision_factors),mn=""===X,yn=null!=de?de:q(re,mn),hn=!te&&!ne;return s(()=>{if(!_t)return;const e=setTimeout(()=>{const e=document.getElementById(`story-card-${_t}`);null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>clearTimeout(e)},[_t]),s(()=>{J.isDefaultEdit&&Tt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},[J.isDefaultEdit]),console.log("block number in userstory card ",Be),t("div",Object.assign({className:T.card,"data-block-id":"user-story-card-wrapper-"+Be,style:null==ut?void 0:ut.cardStyle,id:`story-card-${J.title}`,"data-expanded":Wt},{children:[t("div",Object.assign({className:T.titleSection,style:null==ut?void 0:ut.titleSection},{children:[t("div",Object.assign({className:T.titleRow,style:null==ut?void 0:ut.titleRow,onClick:cn},{children:[t("div",Object.assign({className:T.titleLeft,style:null==ut?void 0:ut.titleLeft,onMouseEnter:()=>tn(!0),onMouseLeave:()=>tn(!1)},{children:[ye&&n(Q,{displayName:O}),At&&hn?n(V,{title:J.title,onSave:t=>((t,n)=>e(void 0,void 0,void 0,function*(){var e;try{let i=Object.assign({},J);J.artifactId===n?i.title=t:i.sub_features=(null===(e=J.sub_features)||void 0===e?void 0:e.map(e=>e.artifactId===n?Object.assign(Object.assign({},e),{title:t}):e))||[],Bt(i),K(i),Pt(!1)}catch(e){console.error("Failed to save title",e)}}))(t,J.artifactId),onCancel:()=>{Pt(!1)},inputStyle:null==pt?void 0:pt.inlineTitleInput,confirmButtonStyle:null==pt?void 0:pt.inlineTitleConfirm,cancelButtonStyle:null==pt?void 0:pt.inlineTitleCancel},"inline-title-editor"):t("div",Object.assign({className:T.storyTitleWrapper},{children:[n(w,Object.assign({title:F(J.title),arrow:!0},{children:n("h2",Object.assign({title:Ne?void 0:J.title,className:T.storyTitle,style:null==ut?void 0:ut.storyTitle},{children:F(J.title)}),J.artifactId)})),Ce&&(pn?n(G,Object.assign({customIcons:null==Vt?void 0:Vt.userStoryIcons,customStyles:null==ut?void 0:ut.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==ut?void 0:ut.CompletionStyles,onToggleStateChange:ln,completionPanelConfig:je},{children:t("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==bt?void 0:bt.badge),wt)},{children:[t("span",{children:[gn,"% Completed"]}),n("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:n(H,{color:"currentColor"})})),n(nn?a:r,{size:14,style:null==bt?void 0:bt.chevronStyle})]}))})):n("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==bt?void 0:bt.badge),wt)},{children:t("span",{children:[gn,"% Completed"]})}))),he&&n("button",Object.assign({type:"button",className:T.titleEditButton,style:null==pt?void 0:pt.titleEditButton,onClick:e=>{e.stopPropagation(),Pt(!0),Wt||Gt(!0)},"aria-label":"Edit title",title:"Edit title"},{children:n("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(nt||void 0!==lt&&void 0!==ot)&&t("div",Object.assign({className:T.statusContainer},{children:[void 0!==lt&&void 0!==ot&&t("div",Object.assign({className:T.completedBadge},{children:["Completed: ",lt,"/",ot]})),nt&&n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==it||it()},onMouseEnter:()=>an(!0),onMouseLeave:()=>an(!1),className:T.statusButton,style:Object.assign(Object.assign({},null===(We=Et[nt])||void 0===We?void 0:We.default),sn&&(null===(Ge=Et[nt])||void 0===Ge?void 0:Ge.hover))},{children:$[nt]}))]})),t("div",Object.assign({className:T.titleActions,style:null==ut?void 0:ut.titleActions,onClick:e=>e.stopPropagation()},{children:[(yn.showProgressPercentage||yn.showGapBox)&&ce&&t("div",Object.assign({className:T.progressHeader,style:null==yt?void 0:yt.wrapper},{children:[yn.showProgressPercentage&&t("div",Object.assign({className:T.progressPercentage,style:null==yt?void 0:yt.percentage},{children:[null!==($e=null!==(He=null==J?void 0:J.confidenceScore)&&void 0!==He?He:null==yn?void 0:yn.confidenceValue)&&void 0!==$e?$e:"0","%"]})),yn.showGapBox&&t("div",Object.assign({className:T.gapBox,style:null==yt?void 0:yt.gapBox},{children:[null!==(qe=null!==(Fe=null==J?void 0:J.gapValue)&&void 0!==Fe?Fe:null==yn?void 0:yn.gapBoxValue)&&void 0!==qe?qe:"2"," ","Gaps"]}))]})),vn&&n(z,{customIcons:null==Vt?void 0:Vt.userStoryIcons,customStyles:null==ut?void 0:ut.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==ut?void 0:ut.BigEnoughStyles}),!xt.userStory&&t(i,{children:[!1!==(null==yn?void 0:yn.showShareButton)&&n("button",Object.assign({className:T.iconButton,style:null==ut?void 0:ut.iconButton,onClick:e=>{qt(e.currentTarget)}},{children:n(d,{size:16})})),t(E,Object.assign({id:"user-story-share-menu",anchorEl:Ft,open:!!Ft,onClose:()=>qt(null),style:null==ut?void 0:ut.userStoryShareMenu},{children:[ee&&n(D,Object.assign({style:null==ut?void 0:ut.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){$t(!0),ie&&(yield Promise.all([ie("pdf"),ie("doc")]),$t(!1))})},{children:t("div",Object.assign({ref:Xt,className:T.menuItemContent,style:null==ut?void 0:ut.menuItemContent},{children:[n(c,{size:16,color:null==ut?void 0:ut.menuIconColor}),n("p",Object.assign({style:null==ut?void 0:ut.menuLabel},{children:"Download"}))]}))})),n(D,Object.assign({style:null==ut?void 0:ut.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){let e=J;I&&(e=Object.assign(Object.assign({},J),{value:`${U(null==I?void 0:I.value,J.title)} \n${J.value}`})),null==le||le(!0,[e],J.artifactId),rn()})},{children:t("div",Object.assign({style:null==ut?void 0:ut.menuItemContent,className:T.menuItemContentPadded},{children:[n(u,{size:16,color:null==ut?void 0:ut.menuIconColor}),n("p",Object.assign({style:null==ut?void 0:ut.menuLabel},{children:"Send"}))]}))})),n(D,Object.assign({style:null==ut?void 0:ut.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){const e=(new N.Converter).makeHtml(A(J.value)||J.value),t=function(e){const t=(new N.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(A(J.value)||J.value),n=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{yield navigator.clipboard.write([n]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{rn()}})},{children:t("div",Object.assign({style:null==ut?void 0:ut.menuItemContent,className:T.menuItemContentPadded},{children:[n(v,{size:16,color:null==ut?void 0:ut.menuIconColor}),n("p",Object.assign({style:null==ut?void 0:ut.menuLabel},{children:"Copy"}))]}))}))]}))]}),xt.userStory&&Wt?n(k,{type:"outline",children:"Cancel",style:null==ut?void 0:ut.cancelButton,onClick:()=>{var e;null===(e=on.current)||void 0===e||e.abort(),Tt(e=>Object.assign(Object.assign({},e),{userStory:!1}))}}):n(i,{}),xt.userStory&&Wt?n(k,{type:"fill",children:Jt?t("span",Object.assign({className:T.savingSpinner,style:null==ut?void 0:ut.savingSpinner},{children:[n(g,{className:T.spinAnimation,style:null==ut?void 0:ut.spinAnimation}),n("span",{children:"Saving..."})]})):"Save",isDisable:Jt,style:Jt?null==ut?void 0:ut.savingButton:null==ut?void 0:ut.saveButton,onClick:()=>e(void 0,void 0,void 0,function*(){yield un()})}):!te&&!ne&&!Ie&&Wt&&!1!==(null==yn?void 0:yn.showEditButton)&&n("button",Object.assign({className:T.iconButton,style:null==ut?void 0:ut.editButton,onClick:()=>Tt(e=>Object.assign(Object.assign({},e),{userStory:!0}))},{children:n(p,{color:null==ut?void 0:ut.pencilIconColor,size:16})})),Oe&&mn&&Wt&&!te&&!ne&&!1!==(null==yn?void 0:yn.showEditButton)&&t("button",Object.assign({type:"button",className:T.addSectionButton,style:null==pt?void 0:pt.addSectionButton,onClick:e=>{var t,n,i;e.stopPropagation();const l=(null!==(n=null===(t=J.sub_features)||void 0===t?void 0:t.length)&&void 0!==n?n:0)+1,o={artifactId:x(),title:`New Section ${l}`,value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=Object.assign(Object.assign({},J),{sub_features:[...null!==(i=J.sub_features)&&void 0!==i?i:[],o]});Bt(s),K(s),Gt(!0),Lt(o.title)},"aria-label":"Add section",title:"Add section"},{children:[n(m,{size:14}),n("span",Object.assign({className:T.addSectionLabel},{children:"Add Section"}))]})),!mn&&!te&&!Ie&&!ne&&n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==ge||ge()},className:T.iconButton,style:null==pt?void 0:pt.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:n(y,{size:16})})),Ct&&n("button",Object.assign({type:"button",className:T.iconButton,style:null==vt?void 0:vt.button,disabled:It,onClick:e=>{if(e.stopPropagation(),Ut)return Mt(null),void kt(!1);Mt(structuredClone(null!=jt?jt:{})),Gt(!0),kt(!0)}},{children:Ut?n(h,{size:16,color:null==ut?void 0:ut.pencilIconColor,style:null==vt?void 0:vt.cancelIcon}):n(p,{size:16,color:null==ut?void 0:ut.pencilIconColor,style:null==vt?void 0:vt.editIcon})})),(null==yn?void 0:yn.actionItemsButton)&&t(i,{children:[n("span",Object.assign({className:T.actionItemBtn,style:null==ut?void 0:ut.actionItemBtn,onClick:e=>{e.stopPropagation(),Zt(e.currentTarget)}},{children:n(b,{})})),n(E,Object.assign({id:"user-story-action-menu",anchorEl:Qt,open:!!Qt,onClose:dn,style:null==ut?void 0:ut.userStoryShareMenu},{children:null==ve?void 0:ve.items.map((e,i)=>n(D,Object.assign({style:null==ut?void 0:ut.userStoryMenuItem,onClick:()=>{e.onclick(J),dn()}},{children:t("div",Object.assign({className:T.menuItemContent,style:Object.assign(Object.assign({},null==ut?void 0:ut.menuItemContent),!e.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[n("span",Object.assign({className:T.menuItemIcon,style:null==ut?void 0:ut.menuItemIcon},{children:e.icon})),n("p",Object.assign({style:null==ut?void 0:ut.menuLabel},{children:e.name})),n("span",{className:T.menuItemRight,style:null==ut?void 0:ut.menuItemRight})]}))}),`action-item-${i}-${e.name}`))}))]}),n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),cn()},style:null==ut?void 0:ut.chevronButton,className:T.chevronButton},{children:n(Wt?a:r,{className:T.chevronIcon,color:null==ut?void 0:ut.chevronIconColor})}))]}))]})),n("div",{className:T.divider,style:null==ut?void 0:ut.dividerStyle})]})),Wt&&n("div",Object.assign({className:T.cardContent,style:Object.assign(Object.assign({},null==ut?void 0:ut.cardContentStyle),{borderTop:Se?"1px solid #E5E5E5":"none"})},{children:t("div",et?Object.assign({className:T.loadingContainer},{children:[n("div",Object.assign({className:T.loadingIconWrapper},{children:n(S,{size:28,color:"#5B3DF5",className:T.spinAnimation})})),t("div",{children:[n("h3",Object.assign({className:T.loadingTitle},{children:"Section generation in progress.."})),n("p",Object.assign({className:T.loadingSubtitle},{children:"This may take a few minutes"}))]}),n("button",Object.assign({type:"button",onClick:()=>null==tt?void 0:tt(),className:T.viewStatusButton},{children:"View Status"}))]}):st?Object.assign({className:T.noDataContainer,style:null==St?void 0:St.container},{children:[n("img",{src:B,alt:"No data available",className:T.noDataIllustration,style:null==St?void 0:St.illustration}),n("h3",Object.assign({className:T.noDataTitle,style:null==St?void 0:St.title},{children:"No Data Available for This Section"})),n("p",Object.assign({className:T.noDataSubtitle,style:null==St?void 0:St.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]}):Object.assign({className:T.contentInner,style:null==ut?void 0:ut.contentInner},{children:[t("div",Object.assign({className:T.descriptionSection,style:null==ut?void 0:ut.descriptionSection},{children:[n("div",{className:T.justifyBetween,style:null==ut?void 0:ut.justifyBetween}),xt.userStory?n(R,{ref:Yt,minHeight:"100%",height:"100%",type:"string",value:A(J.value)||"",handleUpdateState:(e,t)=>{const n=P(t);Bt(e=>Object.assign(Object.assign({},e),{value:n||""}))},doNotShowBorderInViewMode:!1,onBlur:()=>{},mode:xt.userStory?"edit":"readOnly",onSaveUnsavedChanges:()=>e(void 0,void 0,void 0,function*(){yield un(),Gt(!1)}),onDiscardUnsavedChanges:()=>{Bt(Object.assign(Object.assign({},structuredClone(J)),{value:A(J.value)||""})),Tt(e=>Object.assign(Object.assign({},e),{userStory:!1})),Gt(!1)},isSavingUnsavedChanges:Jt}):Ct?n(W,{styles:ht,fields:Ot,readonly:!Ut,isSaving:Nt,value:null!==(Qe=null!=Rt?Rt:jt)&&void 0!==Qe?Qe:{},onChange:Mt,onSave:()=>e(void 0,void 0,void 0,function*(){var e;Rt&&(yield null===(e=null==ct?void 0:ct.onSave)||void 0===e?void 0:e.call(ct,J,Rt),Mt(null),kt(!1))}),onCancel:()=>{Mt(null),kt(!1)}}):t(i,{children:[n(M,{showUserStoryDiff:ne,isParent:""===X,message:A(J.value)||"",artifactId:J.artifactId,customStyles:mt,isDisplayHighlightControl:ae,contextVariant:pe,showConfidenceScore:be,CDNeededInChip:De,blockId:Be}),(we||Ee)&&t("div",Object.assign({className:T.actionButtonsContainer,style:null==ft?void 0:ft.container},{children:[Ee&&!xt.userStory&&t(i,{children:[n("button",Object.assign({type:"button",className:T.actionButton,style:null==ft?void 0:ft.button,disabled:Ee.disabled||Ee.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=Ee.onClick)||void 0===t||t.call(Ee),Tt(e=>Object.assign(Object.assign({},e),{userStory:!0})),Gt(!0)}},{children:Ee.isLoading?t(i,{children:[n(g,{size:16,className:T.actionButtonSpinner,style:null==ft?void 0:ft.icon}),n("span",Object.assign({style:null==ft?void 0:ft.text},{children:null!==(Ze=Ee.label)&&void 0!==Ze?Ze:"Edit"}))]}):t(i,{children:[n(p,{size:16,style:null==ft?void 0:ft.icon}),n("span",Object.assign({style:null==ft?void 0:ft.text},{children:null!==(Je=Ee.label)&&void 0!==Je?Je:"Edit"}))]})})),we&&n("span",{className:T.actionButtonDivider})]}),we&&n("button",Object.assign({type:"button",className:T.actionButton,style:null==ft?void 0:ft.button,disabled:we.disabled||we.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=we.onClick)||void 0===t||t.call(we)}},{children:we.isLoading?t(i,{children:[n(g,{size:16,className:T.actionButtonSpinner,style:null==ft?void 0:ft.icon}),n("span",Object.assign({style:null==ft?void 0:ft.text},{children:null!==(Ke=we.label)&&void 0!==Ke?Ke:"Approve"}))]}):t(i,{children:[n(f,{size:16,style:null==ft?void 0:ft.icon}),n("span",Object.assign({style:null==ft?void 0:ft.text},{children:null!==(Xe=we.label)&&void 0!==Xe?Xe:"Approve"}))]})}))]}))]})]})),null===(Ye=Dt.sub_features)||void 0===Ye?void 0:Ye.map((e,t)=>{console.log("UserStoryCardWrapper: sub",e);const i=q(re,!1,e.artifactId);return n(Z,{artifactId:j,isUserStoryCurrentlyUpdated:C,artifactTitleId:`${O}-${String.fromCharCode(65+t)}`,parentUserStory:J,parentIndex:`${X}${X&&"."}${Y}`,currentIndex:`${t+1}`,doNotShowBorderInViewMode:!1,currentUserStory:e,onUserStoryChange:e=>((e,t)=>{const n=[...J.sub_features||[]];n[e]=t,K(Object.assign(Object.assign({},J),{sub_features:n}))})(t,e),enableDownload:!0,isDiffEditReviewMode:te,showUserStoryDiff:ne,updateUserStoryArtifact:oe,handleDownloadUserStory:ie,handleOpenSendDialog:le,isDisplayHighlightControl:ae,elementDisplayConfig:re,_resolvedConfig:i,actionItemsConfig:ve,onDelete:()=>(e=>{const t=(J.sub_features||[]).filter((t,n)=>n!==e),n=Object.assign(Object.assign({},J),{sub_features:t});Bt(n),K(n)})(t),expandedSubFeatures:me,disableEditPlan:Ie,useMuiTooltip:Ne,blockNumber:e.blockNumber},e.artifactId)})]}))}))]}))},J=({artifactTitleIDs:e,expandedSubFeatures:l,isDiffEditReviewMode:o,showUserStoryDiff:s,updateUserStoryArtifact:a,isUserStoryCurrentlyUpdated:r,artifactId:d,handleOpenSendDialog:c,handleDownloadUserStory:u,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:p,showWrapper:m,actionItemsConfig:y,contextVariant:h,showDisplayName:b,allowTitleEdit:S,showConfidenceScore:f,showBorderTop:O,defaultExpanded:I,showCompletionPanel:N=!1,completionPanelConfig:w,showAddSectionButton:E=!1,disableEditPlan:D=!1,useMuiTooltip:B=!1,approveButtonConfig:x,editButtonConfig:A,CDNeededInChip:P})=>{const{userStory:U,setUserStory:k,customStyles:R,searchQueryList:M,currentHighlightIndex:_,setCurrentHighlightIndex:z,segmentComponentConfig:V,sectionStatusConfig:W}=L(),G=null==R?void 0:R.userStoryCardStyles,H=0===_,$=_===M.length-1;return t("div",Object.assign({className:T.userStoryCardWrapper,style:g?Object.assign(Object.assign({},null==G?void 0:G.userStoryCardWrapper),{position:"relative"}):null==G?void 0:G.userStoryCardWrapper},{children:[g&&n(i,{children:M.length>0&&n("div",Object.assign({className:T.wrapper},{children:n("div",Object.assign({className:T.highlightNavigation},{children:t("div",Object.assign({className:T.navigationContainer},{children:[t("span",Object.assign({className:T.navCounter},{children:[_+1," of ",M.length]})),t("div",Object.assign({className:T.navButtons},{children:[n("button",Object.assign({onClick:()=>{_>0&&z(e=>e-1)},className:T.navButton,disabled:H},{children:n(C,{size:20,className:T.navIcon})})),n("button",Object.assign({onClick:()=>{_<M.length-1&&z(e=>e+1)},className:T.navButton,disabled:$},{children:n(j,{size:20,className:T.navIcon})}))]}))]}))}))}))}),U.map((t,i)=>{console.log("UserStoryCardWrapper: userstory",t);const C=q(p,!0);return n(Z,{isUserStoryCurrentlyUpdated:r,artifactId:d,artifactTitleId:e[i]||"",expandedSubFeatures:l,currentUserStory:t,onUserStoryChange:e=>{k(t=>(t[i]=e,[...t]))},parentIndex:"",currentIndex:`${i+1}`,doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:s,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:u,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:p,_resolvedConfig:C,showWrapper:m,defaultExpanded:I,actionItemsConfig:y,contextVariant:h,showDisplayName:b,allowTitleEdit:S,showConfidenceScore:f,showBorderTop:O,sectionStatusConfig:W,showCompletionPanel:N,completionPanelConfig:w,showAddSectionButton:E,disableEditPlan:D,useMuiTooltip:B,approveButtonConfig:x,CDNeededInChip:P,editButtonConfig:A},t.artifactId)})]}))};export{Z as StoryCard,J as UserStoryCardWrapper,Z as default,F as replaceLearnedTagsWithInfo};
|
|
1
|
+
import{__awaiter as e}from"tslib";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";import{useState as l,useRef as o,useEffect as s}from"react";import{ChevronUp as a,ChevronDown as r,ExternalLink as d,Download as c,Share2 as u,Copy as v,LoaderCircle as g,PencilIcon as p,Plus as m,Trash2 as y,X as h,Ellipsis as b,Hourglass as S,Check as f,ChevronUpIcon as C,ChevronDownIcon as O,Info as j,Bookmark as I}from"lucide-react";import N from"showdown";import{Tooltip as w,Menu as E,MenuItem as D}from"@mui/material";import B from"../../icons/Illustration.svg.js";import{v4 as T}from"uuid";import x from"./UserStoryCard.module.css.js";import{formatMarkdown as U,indentMarkdown as A}from"../../utils/helpers.js";import{preprocessUserStoryForEdit as P,replaceTitleSection as k,postprocessUserStoryAfterEdit as R}from"../../utils/user-story.utils.js";import M from"../../shared/AtomicButton.js";import _ from"../RichTextEditor/RichTextEditor.js";import L from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as z,useRequirementAI as G}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as V}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as W}from"./TitleEditor/TitleEditor.js";import H from"./ClinicalTrialSection.js";import{CompletionPanel as $}from"../story-screen/CompletionPanel.js";import F from"../../icons/CDIcon.js";const q={[z.WAITING]:"WAITING TO GENERATE",[z.IN_PROGRESS]:"IN PROGRESS",[z.GENERATED]:"GENERATED",[z.FAILED]:"FAILED",[z.GENERATE]:"GENERATE",[z.APPROVED]:"APPROVED"};function Q(e){const t=[],i=/<learned>(.*?)<\/learned>/g;let l,o=0,s=0;for(;null!==(l=i.exec(e));){const[,a]=l,r=l.index;r>o&&t.push(n("span",{children:e.slice(o,r)},"text-pre-"+s++)),t.push(n(w,Object.assign({title:a,placement:"top"},{children:n(j,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),`tooltip-${T()}`)),o=i.lastIndex}return o<(null==e?void 0:e.length)&&t.push(n("span",{children:e.slice(o)},"text-post-"+s++)),t}function Y(e,t,n){var i;if(!e)return{};if(t)return Object.assign({},e.parentConfig);const l=Object.assign({},e.childConfig);return n&&(null===(i=e.subFeatureOverrides)||void 0===i?void 0:i[n])?Object.assign(Object.assign({},l),e.subFeatureOverrides[n]):l}const Z=({displayName:e})=>{var i;const{customStyles:l}=G(),o=null===(i=null==l?void 0:l.userStoryCardStyles)||void 0===i?void 0:i.showDisplayName;return t("div",Object.assign({className:x.displayName,style:null==o?void 0:o.wrapper},{children:[n(I,{className:x.displayNameIcon,style:null==o?void 0:o.displayNameIcon}),t("span",Object.assign({style:null==o?void 0:o.label},{children:[e,":"]}))]}))},J=({isUserStoryCurrentlyUpdated:C,artifactId:O,artifactTitleId:j,parentUserStory:I,currentUserStory:K,onUserStoryChange:X,parentIndex:ee,currentIndex:te,enableDownload:ne,isDiffEditReviewMode:ie,showUserStoryDiff:le,handleDownloadUserStory:oe,handleOpenSendDialog:se,updateUserStoryArtifact:ae,selectedArtifactId:re,isDisplayHighlightControl:de,elementDisplayConfig:ce,_resolvedConfig:ue,showWrapper:ve=!1,defaultExpanded:ge,actionItemsConfig:pe,onDelete:me,contextVariant:ye,expandedSubFeatures:he,showDisplayName:be=!0,allowTitleEdit:Se=!0,showConfidenceScore:fe=!0,showBorderTop:Ce=!0,sectionStatusConfig:Oe,showCompletionPanel:je=!1,completionPanelConfig:Ie,showAddSectionButton:Ne=!1,disableEditPlan:we=!1,useMuiTooltip:Ee=!1,approveButtonConfig:De,editButtonConfig:Be,CDNeededInChip:Te,blockNumber:xe})=>{var Ue,Ae,Pe,ke,Re,Me,_e,Le,ze,Ge,Ve,We,He,$e,Fe,qe,Qe,Ye,Ze,Je,Ke,Xe,et,tt;const{isLoadingSectionData:nt=!1,onLoadSectionData:it,status:lt,onStatusClick:ot,completedCount:st,totalCount:at,isNoDataAvailable:rt=!1}=null!=Oe?Oe:{},{searchQueryList:dt,citations:ct,customStyles:ut,customSectionConfig:vt}=G(),gt=null==ut?void 0:ut.userStoryCardStyles,pt=null==gt?void 0:gt.customSectionEditButton,mt=null==gt?void 0:gt.statusStyles,yt=null===(Ue=null==ut?void 0:ut.userStoryCardStyles)||void 0===Ue?void 0:Ue.userStoryEditStyles,ht=null===(Ae=null==ut?void 0:ut.userStoryScreenStyles)||void 0===Ae?void 0:Ae.userStoryContentStyles,bt=null==gt?void 0:gt.progressHeaderStyles,St=null==gt?void 0:gt.clinicalTrialSectionStyles,ft=null==gt?void 0:gt.CompletionStyles,Ct=null==gt?void 0:gt.noDataStyles,Ot=null==gt?void 0:gt.approveButtonStyles,jt=null!==(ke=null===(Pe=null==vt?void 0:vt.shouldRender)||void 0===Pe?void 0:Pe.call(vt,K))&&void 0!==ke&&ke,It=null===(Re=null==vt?void 0:vt.getValue)||void 0===Re?void 0:Re.call(vt,K),Nt=null!==(_e=null===(Me=null==vt?void 0:vt.getFields)||void 0===Me?void 0:Me.call(vt,K))&&void 0!==_e?_e:[],wt=null!==(Le=null==vt?void 0:vt.isEditDisabled)&&void 0!==Le&&Le,Et=null!==(Ge=null===(ze=null==vt?void 0:vt.isSaving)||void 0===ze?void 0:ze.call(vt,K))&&void 0!==Ge&&Ge,Dt=((e,t)=>e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion)(null!==(Ve=K.completion_percentage)&&void 0!==Ve?Ve:0,ft),Bt={[z.WAITING]:null==mt?void 0:mt.waiting,[z.IN_PROGRESS]:null==mt?void 0:mt.inProgress,[z.GENERATED]:null==mt?void 0:mt.generated,[z.FAILED]:null==mt?void 0:mt.failed,[z.GENERATE]:null==mt?void 0:mt.generate,[z.APPROVED]:null==mt?void 0:mt.approved},[Tt,xt]=l(Object.assign(Object.assign({},structuredClone(K)),{value:U(K.value)||""})),[Ut,At]=l({userStory:!!K.isDefaultEdit}),[Pt,kt]=l(!1),[Rt,Mt]=l(!1),[_t,Lt]=l(null),[zt,Gt]=l(null),{userStory:Vt,customIcons:Wt}=G(),[Ht,$t]=l(null!=ge?ge:""===ee||re===K.artifactId||!!K.isDefaultOpen),[Ft,qt]=l(!1),[Qt,Yt]=l(null),[Zt,Jt]=l(null),[Kt,Xt]=l(!1),en=o(null),tn=o(null),[nn,ln]=l(!1),[on,sn]=l(!1),an=o(null),[rn,dn]=l(!1);s(()=>{C&&$t(C)},[C]),s(()=>{xt(Object.assign(Object.assign({},structuredClone(K)),{value:U(K.value)||""}))},[K]),s(()=>{dt.length>0?$t(!0):void 0===ge&&re&&$t(re===K.artifactId)},[dt,re,K.artifactId]),s(()=>{he&&he.length>0&&$t(he.includes(K.artifactId)||""===ee||re===K.artifactId||!!K.isDefaultOpen)},[he]);const cn=()=>{Yt(null)},un=()=>{Jt(null)},vn=()=>{Ht&&Ut.userStory&&tn.current&&!tn.current.requestClose()||$t(e=>!e)},gn=()=>e(void 0,void 0,void 0,function*(){var e,t;Xt(!0);try{"userStory"==="userStory"&&(X(Tt),console.log("I am changing RTE editor values",Tt)),yield null===(e=null==Be?void 0:Be.onSaveEditedSection)||void 0===e?void 0:e.call(Be,Tt),yield ae(ct,Vt,O,null===(t=an.current)||void 0===t?void 0:t.signal),X(Object.assign(Object.assign({},Tt),{isDefaultEdit:!1})),At(e=>Object.assign(Object.assign({},e),{userStory:!1}))}finally{Xt(!1)}});const pn=null!=(null==K?void 0:K.big_enough)&&!Number.isNaN(K.big_enough)&&!!(null==K?void 0:K.big_enough_decision_factors),mn=null!==(We=null==K?void 0:K.completion_percentage)&&void 0!==We?We:0,yn=!!(null==K?void 0:K.completion_decision_factors),hn=""===ee,bn=null!=ue?ue:Y(ce,hn),Sn=!ie&&!le;return s(()=>{if(!zt)return;const e=setTimeout(()=>{const e=document.getElementById(`story-card-${zt}`);null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return()=>clearTimeout(e)},[zt]),s(()=>{K.isDefaultEdit&&At(e=>Object.assign(Object.assign({},e),{userStory:!0}))},[K.isDefaultEdit]),console.log("block number in userstory card ",xe),console.log("[TESTING-CURRENT-USER-STORY] \n",K,"\n[TESTING-USER-STORY] \n",Vt),t("div",Object.assign({className:x.card,"data-block-id":"user-story-card-wrapper-"+xe,style:null==gt?void 0:gt.cardStyle,id:`story-card-${K.title}`,"data-expanded":Ht},{children:[t("div",Object.assign({className:x.titleSection,style:null==gt?void 0:gt.titleSection},{children:[t("div",Object.assign({className:x.titleRow,style:null==gt?void 0:gt.titleRow,onClick:vn},{children:[t("div",Object.assign({className:x.titleLeft,style:null==gt?void 0:gt.titleLeft,onMouseEnter:()=>ln(!0),onMouseLeave:()=>ln(!1)},{children:[be&&n(Z,{displayName:j}),Pt&&Sn?n(W,{title:K.title,onSave:t=>((t,n)=>e(void 0,void 0,void 0,function*(){var e;try{let i=Object.assign({},K);K.artifactId===n?i.title=t:i.sub_features=(null===(e=K.sub_features)||void 0===e?void 0:e.map(e=>e.artifactId===n?Object.assign(Object.assign({},e),{title:t}):e))||[],xt(i),X(i),kt(!1)}catch(e){console.error("Failed to save title",e)}}))(t,K.artifactId),onCancel:()=>{kt(!1)},inputStyle:null==yt?void 0:yt.inlineTitleInput,confirmButtonStyle:null==yt?void 0:yt.inlineTitleConfirm,cancelButtonStyle:null==yt?void 0:yt.inlineTitleCancel},"inline-title-editor"):t("div",Object.assign({className:x.storyTitleWrapper},{children:[n(w,Object.assign({title:Q(K.title),arrow:!0},{children:n("h2",Object.assign({title:Ee?void 0:K.title,className:x.storyTitle,style:null==gt?void 0:gt.storyTitle},{children:Q(K.title)}),K.artifactId)})),je&&(yn?n($,Object.assign({customIcons:null==Wt?void 0:Wt.userStoryIcons,customStyles:null==gt?void 0:gt.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==gt?void 0:gt.CompletionStyles,onToggleStateChange:sn,completionPanelConfig:Ie},{children:t("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==ft?void 0:ft.badge),Dt)},{children:[t("span",{children:[mn,"% Completed"]}),n("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:n(F,{color:"currentColor"})})),n(on?a:r,{size:14,style:null==ft?void 0:ft.chevronStyle})]}))})):n("div",Object.assign({style:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==ft?void 0:ft.badge),Dt)},{children:t("span",{children:[mn,"% Completed"]})}))),Se&&n("button",Object.assign({type:"button",className:x.titleEditButton,style:null==yt?void 0:yt.titleEditButton,onClick:e=>{e.stopPropagation(),kt(!0),Ht||$t(!0)},"aria-label":"Edit title",title:"Edit title"},{children:n("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(lt||void 0!==st&&void 0!==at)&&t("div",Object.assign({className:x.statusContainer},{children:[void 0!==st&&void 0!==at&&t("div",Object.assign({className:x.completedBadge},{children:["Completed: ",st,"/",at]})),lt&&n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==ot||ot()},onMouseEnter:()=>dn(!0),onMouseLeave:()=>dn(!1),className:x.statusButton,style:Object.assign(Object.assign({},null===(He=Bt[lt])||void 0===He?void 0:He.default),rn&&(null===($e=Bt[lt])||void 0===$e?void 0:$e.hover))},{children:q[lt]}))]})),t("div",Object.assign({className:x.titleActions,style:null==gt?void 0:gt.titleActions,onClick:e=>e.stopPropagation()},{children:[(bn.showProgressPercentage||bn.showGapBox)&&ve&&t("div",Object.assign({className:x.progressHeader,style:null==bt?void 0:bt.wrapper},{children:[bn.showProgressPercentage&&t("div",Object.assign({className:x.progressPercentage,style:null==bt?void 0:bt.percentage},{children:[null!==(qe=null!==(Fe=null==K?void 0:K.confidenceScore)&&void 0!==Fe?Fe:null==bn?void 0:bn.confidenceValue)&&void 0!==qe?qe:"0","%"]})),bn.showGapBox&&t("div",Object.assign({className:x.gapBox,style:null==bt?void 0:bt.gapBox},{children:[null!==(Ye=null!==(Qe=null==K?void 0:K.gapValue)&&void 0!==Qe?Qe:null==bn?void 0:bn.gapBoxValue)&&void 0!==Ye?Ye:"2"," ","Gaps"]}))]})),pn&&n(V,{customIcons:null==Wt?void 0:Wt.userStoryIcons,customStyles:null==gt?void 0:gt.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==gt?void 0:gt.BigEnoughStyles}),!Ut.userStory&&t(i,{children:[!1!==(null==bn?void 0:bn.showShareButton)&&n("button",Object.assign({className:x.iconButton,style:null==gt?void 0:gt.iconButton,onClick:e=>{Yt(e.currentTarget)}},{children:n(d,{size:16})})),t(E,Object.assign({id:"user-story-share-menu",anchorEl:Qt,open:!!Qt,onClose:()=>Yt(null),style:null==gt?void 0:gt.userStoryShareMenu},{children:[ne&&n(D,Object.assign({style:null==gt?void 0:gt.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){qt(!0),oe&&(yield Promise.all([oe("pdf"),oe("doc")]),qt(!1))})},{children:t("div",Object.assign({ref:en,className:x.menuItemContent,style:null==gt?void 0:gt.menuItemContent},{children:[n(c,{size:16,color:null==gt?void 0:gt.menuIconColor}),n("p",Object.assign({style:null==gt?void 0:gt.menuLabel},{children:"Download"}))]}))})),n(D,Object.assign({style:null==gt?void 0:gt.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){let e=K;I&&(e=Object.assign(Object.assign({},K),{value:`${k(null==I?void 0:I.value,K.title)} \n${K.value}`})),null==se||se(!0,[e],K.artifactId),cn()})},{children:t("div",Object.assign({style:null==gt?void 0:gt.menuItemContent,className:x.menuItemContentPadded},{children:[n(u,{size:16,color:null==gt?void 0:gt.menuIconColor}),n("p",Object.assign({style:null==gt?void 0:gt.menuLabel},{children:"Send"}))]}))})),n(D,Object.assign({style:null==gt?void 0:gt.userStoryMenuItem,onClick:()=>e(void 0,void 0,void 0,function*(){const e=(new N.Converter).makeHtml(U(K.value)||K.value),t=function(e){const t=(new N.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(U(K.value)||K.value),n=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})});try{yield navigator.clipboard.write([n]),console.log("Copied User Story")}catch(e){console.error("Failed to copy user story:",e)}finally{cn()}})},{children:t("div",Object.assign({style:null==gt?void 0:gt.menuItemContent,className:x.menuItemContentPadded},{children:[n(v,{size:16,color:null==gt?void 0:gt.menuIconColor}),n("p",Object.assign({style:null==gt?void 0:gt.menuLabel},{children:"Copy"}))]}))}))]}))]}),Ut.userStory&&Ht?n(M,{type:"outline",children:"Cancel",style:null==gt?void 0:gt.cancelButton,onClick:()=>{var e;null===(e=an.current)||void 0===e||e.abort(),At(e=>Object.assign(Object.assign({},e),{userStory:!1}))}}):n(i,{}),Ut.userStory&&Ht?n(M,{type:"fill",children:Kt?t("span",Object.assign({className:x.savingSpinner,style:null==gt?void 0:gt.savingSpinner},{children:[n(g,{className:x.spinAnimation,style:null==gt?void 0:gt.spinAnimation}),n("span",{children:"Saving..."})]})):"Save",isDisable:Kt,style:Kt?null==gt?void 0:gt.savingButton:null==gt?void 0:gt.saveButton,onClick:()=>e(void 0,void 0,void 0,function*(){yield gn()})}):!ie&&!le&&!we&&Ht&&!1!==(null==bn?void 0:bn.showEditButton)&&n("button",Object.assign({className:x.iconButton,style:null==gt?void 0:gt.editButton,onClick:()=>At(e=>Object.assign(Object.assign({},e),{userStory:!0}))},{children:n(p,{color:null==gt?void 0:gt.pencilIconColor,size:16})})),Ne&&hn&&Ht&&!ie&&!le&&!1!==(null==bn?void 0:bn.showEditButton)&&t("button",Object.assign({type:"button",className:x.addSectionButton,style:null==yt?void 0:yt.addSectionButton,onClick:e=>{var t,n,i;e.stopPropagation();const l=(null!==(n=null===(t=K.sub_features)||void 0===t?void 0:t.length)&&void 0!==n?n:0)+1,o={artifactId:T(),title:`New Section ${l}`,value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=Object.assign(Object.assign({},K),{sub_features:[...null!==(i=K.sub_features)&&void 0!==i?i:[],o]});xt(s),X(s),$t(!0),Gt(o.title)},"aria-label":"Add section",title:"Add section"},{children:[n(m,{size:14}),n("span",Object.assign({className:x.addSectionLabel},{children:"Add Section"}))]})),!hn&&!ie&&!we&&!le&&n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),null==me||me()},className:x.iconButton,style:null==yt?void 0:yt.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:n(y,{size:16})})),jt&&n("button",Object.assign({type:"button",className:x.iconButton,style:null==pt?void 0:pt.button,disabled:wt,onClick:e=>{if(e.stopPropagation(),Rt)return Lt(null),void Mt(!1);Lt(structuredClone(null!=It?It:{})),$t(!0),Mt(!0)}},{children:Rt?n(h,{size:16,color:null==gt?void 0:gt.pencilIconColor,style:null==pt?void 0:pt.cancelIcon}):n(p,{size:16,color:null==gt?void 0:gt.pencilIconColor,style:null==pt?void 0:pt.editIcon})})),(null==bn?void 0:bn.actionItemsButton)&&t(i,{children:[n("span",Object.assign({className:x.actionItemBtn,style:null==gt?void 0:gt.actionItemBtn,onClick:e=>{e.stopPropagation(),Jt(e.currentTarget)}},{children:n(b,{})})),n(E,Object.assign({id:"user-story-action-menu",anchorEl:Zt,open:!!Zt,onClose:un,style:null==gt?void 0:gt.userStoryShareMenu},{children:null==pe?void 0:pe.items.map((e,i)=>n(D,Object.assign({style:null==gt?void 0:gt.userStoryMenuItem,onClick:()=>{e.onclick(K),un()}},{children:t("div",Object.assign({className:x.menuItemContent,style:Object.assign(Object.assign({},null==gt?void 0:gt.menuItemContent),!e.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[n("span",Object.assign({className:x.menuItemIcon,style:null==gt?void 0:gt.menuItemIcon},{children:e.icon})),n("p",Object.assign({style:null==gt?void 0:gt.menuLabel},{children:e.name})),n("span",{className:x.menuItemRight,style:null==gt?void 0:gt.menuItemRight})]}))}),`action-item-${i}-${e.name}`))}))]}),n("button",Object.assign({type:"button",onClick:e=>{e.stopPropagation(),vn()},style:null==gt?void 0:gt.chevronButton,className:x.chevronButton},{children:n(Ht?a:r,{className:x.chevronIcon,color:null==gt?void 0:gt.chevronIconColor})}))]}))]})),n("div",{className:x.divider,style:null==gt?void 0:gt.dividerStyle})]})),Ht&&n("div",Object.assign({className:x.cardContent,style:Object.assign(Object.assign({},null==gt?void 0:gt.cardContentStyle),{borderTop:Ce?"1px solid #E5E5E5":"none"})},{children:t("div",nt?Object.assign({className:x.loadingContainer},{children:[n("div",Object.assign({className:x.loadingIconWrapper},{children:n(S,{size:28,color:"#5B3DF5",className:x.spinAnimation})})),t("div",{children:[n("h3",Object.assign({className:x.loadingTitle},{children:"Section generation in progress.."})),n("p",Object.assign({className:x.loadingSubtitle},{children:"This may take a few minutes"}))]}),n("button",Object.assign({type:"button",onClick:()=>null==it?void 0:it(),className:x.viewStatusButton},{children:"View Status"}))]}):rt?Object.assign({className:x.noDataContainer,style:null==Ct?void 0:Ct.container},{children:[n("img",{src:B,alt:"No data available",className:x.noDataIllustration,style:null==Ct?void 0:Ct.illustration}),n("h3",Object.assign({className:x.noDataTitle,style:null==Ct?void 0:Ct.title},{children:"No Data Available for This Section"})),n("p",Object.assign({className:x.noDataSubtitle,style:null==Ct?void 0:Ct.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]}):Object.assign({className:x.contentInner,style:null==gt?void 0:gt.contentInner},{children:[t("div",Object.assign({className:x.descriptionSection,style:null==gt?void 0:gt.descriptionSection},{children:[n("div",{className:x.justifyBetween,style:null==gt?void 0:gt.justifyBetween}),Ut.userStory?n(_,{ref:tn,minHeight:"100%",height:"100%",type:"string",value:P(U(K.value)||""),handleUpdateState:(e,t)=>{const n=R(A(t));xt(e=>Object.assign(Object.assign({},e),{value:n||""}))},doNotShowBorderInViewMode:!1,onBlur:()=>{},mode:Ut.userStory?"edit":"readOnly",onSaveUnsavedChanges:()=>e(void 0,void 0,void 0,function*(){yield gn(),$t(!1)}),onDiscardUnsavedChanges:()=>{xt(Object.assign(Object.assign({},structuredClone(K)),{value:U(K.value)||""})),At(e=>Object.assign(Object.assign({},e),{userStory:!1})),$t(!1)},isSavingUnsavedChanges:Kt}):jt?n(H,{styles:St,fields:Nt,readonly:!Rt,isSaving:Et,value:null!==(Ze=null!=_t?_t:It)&&void 0!==Ze?Ze:{},onChange:Lt,onSave:()=>e(void 0,void 0,void 0,function*(){var e;_t&&(yield null===(e=null==vt?void 0:vt.onSave)||void 0===e?void 0:e.call(vt,K,_t),Lt(null),Mt(!1))}),onCancel:()=>{Lt(null),Mt(!1)}}):t(i,{children:[n(L,{showUserStoryDiff:le,isParent:""===ee,message:U(K.value)||"",artifactId:K.artifactId,customStyles:ht,isDisplayHighlightControl:de,contextVariant:ye,showConfidenceScore:fe,CDNeededInChip:Te,blockId:xe}),(De||Be)&&t("div",Object.assign({className:x.actionButtonsContainer,style:null==Ot?void 0:Ot.container},{children:[Be&&!Ut.userStory&&t(i,{children:[n("button",Object.assign({type:"button",className:x.actionButton,style:null==Ot?void 0:Ot.button,disabled:Be.disabled||Be.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=Be.onClick)||void 0===t||t.call(Be),At(e=>Object.assign(Object.assign({},e),{userStory:!0})),$t(!0)}},{children:Be.isLoading?t(i,{children:[n(g,{size:16,className:x.actionButtonSpinner,style:null==Ot?void 0:Ot.icon}),n("span",Object.assign({style:null==Ot?void 0:Ot.text},{children:null!==(Je=Be.label)&&void 0!==Je?Je:"Edit"}))]}):t(i,{children:[n(p,{size:16,style:null==Ot?void 0:Ot.icon}),n("span",Object.assign({style:null==Ot?void 0:Ot.text},{children:null!==(Ke=Be.label)&&void 0!==Ke?Ke:"Edit"}))]})})),De&&n("span",{className:x.actionButtonDivider})]}),De&&n("button",Object.assign({type:"button",className:x.actionButton,style:null==Ot?void 0:Ot.button,disabled:De.disabled||De.isLoading,onClick:e=>{var t;e.stopPropagation(),null===(t=De.onClick)||void 0===t||t.call(De)}},{children:De.isLoading?t(i,{children:[n(g,{size:16,className:x.actionButtonSpinner,style:null==Ot?void 0:Ot.icon}),n("span",Object.assign({style:null==Ot?void 0:Ot.text},{children:null!==(Xe=De.label)&&void 0!==Xe?Xe:"Approve"}))]}):t(i,{children:[n(f,{size:16,style:null==Ot?void 0:Ot.icon}),n("span",Object.assign({style:null==Ot?void 0:Ot.text},{children:null!==(et=De.label)&&void 0!==et?et:"Approve"}))]})}))]}))]})]})),null===(tt=Tt.sub_features)||void 0===tt?void 0:tt.map((e,t)=>{console.log("UserStoryCardWrapper: sub",e);const i=Y(ce,!1,e.artifactId);return n(J,{artifactId:O,isUserStoryCurrentlyUpdated:C,artifactTitleId:`${j}-${String.fromCharCode(65+t)}`,parentUserStory:K,parentIndex:`${ee}${ee&&"."}${te}`,currentIndex:`${t+1}`,doNotShowBorderInViewMode:!1,currentUserStory:e,onUserStoryChange:e=>((e,t)=>{const n=[...K.sub_features||[]];n[e]=t,X(Object.assign(Object.assign({},K),{sub_features:n}))})(t,e),enableDownload:!0,isDiffEditReviewMode:ie,showUserStoryDiff:le,updateUserStoryArtifact:ae,handleDownloadUserStory:oe,handleOpenSendDialog:se,isDisplayHighlightControl:de,elementDisplayConfig:ce,_resolvedConfig:i,actionItemsConfig:pe,onDelete:()=>(e=>{const t=(K.sub_features||[]).filter((t,n)=>n!==e),n=Object.assign(Object.assign({},K),{sub_features:t});xt(n),X(n)})(t),expandedSubFeatures:he,disableEditPlan:we,useMuiTooltip:Ee,blockNumber:e.blockNumber},e.artifactId)})]}))}))]}))},K=({artifactTitleIDs:e,expandedSubFeatures:l,isDiffEditReviewMode:o,showUserStoryDiff:s,updateUserStoryArtifact:a,isUserStoryCurrentlyUpdated:r,artifactId:d,handleOpenSendDialog:c,handleDownloadUserStory:u,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:p,showWrapper:m,actionItemsConfig:y,contextVariant:h,showDisplayName:b,allowTitleEdit:S,showConfidenceScore:f,showBorderTop:j,defaultExpanded:I,showCompletionPanel:N=!1,completionPanelConfig:w,showAddSectionButton:E=!1,disableEditPlan:D=!1,useMuiTooltip:B=!1,approveButtonConfig:T,editButtonConfig:U,CDNeededInChip:A})=>{const{userStory:P,setUserStory:k,customStyles:R,searchQueryList:M,currentHighlightIndex:_,setCurrentHighlightIndex:L,segmentComponentConfig:z,sectionStatusConfig:V}=G(),W=null==R?void 0:R.userStoryCardStyles,H=0===_,$=_===M.length-1;return t("div",Object.assign({className:x.userStoryCardWrapper,style:g?Object.assign(Object.assign({},null==W?void 0:W.userStoryCardWrapper),{position:"relative"}):null==W?void 0:W.userStoryCardWrapper},{children:[g&&n(i,{children:M.length>0&&n("div",Object.assign({className:x.wrapper},{children:n("div",Object.assign({className:x.highlightNavigation},{children:t("div",Object.assign({className:x.navigationContainer},{children:[t("span",Object.assign({className:x.navCounter},{children:[_+1," of ",M.length]})),t("div",Object.assign({className:x.navButtons},{children:[n("button",Object.assign({onClick:()=>{_>0&&L(e=>e-1)},className:x.navButton,disabled:H},{children:n(C,{size:20,className:x.navIcon})})),n("button",Object.assign({onClick:()=>{_<M.length-1&&L(e=>e+1)},className:x.navButton,disabled:$},{children:n(O,{size:20,className:x.navIcon})}))]}))]}))}))}))}),P.map((t,i)=>{console.log("UserStoryCardWrapper: userstory",t);const C=Y(p,!0);return n(J,{isUserStoryCurrentlyUpdated:r,artifactId:d,artifactTitleId:e[i]||"",expandedSubFeatures:l,currentUserStory:t,onUserStoryChange:e=>{k(t=>(t[i]=e,[...t]))},parentIndex:"",currentIndex:`${i+1}`,doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:s,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:u,selectedArtifactId:v,isDisplayHighlightControl:g,elementDisplayConfig:p,_resolvedConfig:C,showWrapper:m,defaultExpanded:I,actionItemsConfig:y,contextVariant:h,showDisplayName:b,allowTitleEdit:S,showConfidenceScore:f,showBorderTop:j,sectionStatusConfig:V,showCompletionPanel:N,completionPanelConfig:w,showAddSectionButton:E,disableEditPlan:D,useMuiTooltip:B,approveButtonConfig:T,CDNeededInChip:A,editButtonConfig:U},t.artifactId)})]}))};export{J as StoryCard,K as UserStoryCardWrapper,J as default,Q as replaceLearnedTagsWithInfo};
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import{useState as t,useRef as i,useEffect as s}from"react";import l from"../ai-reasoning/AiReasoningCitationContent.js";import a from"./CompletionPanel.module.css.js";import r from"../../icons/CDIcon.js";import{Loader2 as c,Check as m}from"lucide-react";const p=({customIcons:p,customStyles:d,currentUserStory:u,panelStyles:g,showPanel:v=!1,children:C,onToggleStateChange:h,completionPanelConfig:k})=>{var f,y,j,b,w;const[_,P]=t(!!v),S=null!==(f=null==u?void 0:u.completion_percentage)&&void 0!==f?f:0,N=i(null),O=i(null),{isMarkingComplete:I=!1,markedComplete:D=!1,onMarkAsComplete:M}=null!=k?k:{},B=()=>{P(!1),null==h||h(!1)},x=e=>{e.stopPropagation(),P(e=>{const o=!e;return null==h||h(o),o})};return s(()=>{if(!_)return;const e=e=>{O.current&&!O.current.contains(e.target)&&B()},o=e=>{"Escape"===e.key&&(P(!1),null==h||h(!1))};return document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",e,!0),document.removeEventListener("keydown",o)}},[_,h]),e("div",Object.assign({ref:O,className:a.triggerWrapper,style:null==g?void 0:g.triggerWrapperStyle},{children:[!v&&o(n,{children:C?o("div",Object.assign({className:a.completionButton,style:null==g?void 0:g.completionButtonStyle,onClick:x},{children:C})):o("button",Object.assign({ref:N,className:a.completionIconButton,style:null==g?void 0:g.completionIconButtonStyle,onClick:x},{children:o(r,{})}))}),_&&o("div",Object.assign({className:`${a.dropdown} ${v?a.showPanelDropdown:""}`,style:Object.assign(Object.assign({},null==g?void 0:g.dropdownStyle),v?null==g?void 0:g.showPanelDropdownStyle:{}),onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()},{children:o(l,{aiReason:{explanation:(null===(y=u.completion_decision_factors)||void 0===y?void 0:y.explanation)||"",relevance_score:(null===(j=u.completion_decision_factors)||void 0===j?void 0:j.relevance_score)||0,reason:(null===(b=u.completion_decision_factors)||void 0===b?void 0:b.score_reason)||"",gap:(null===(w=u.completion_decision_factors)||void 0===w?void 0:w.gap)||"",id:"completion-cd"},customIcons:p,customStyles:d,footer:e("div",Object.assign({className:a.markCompleteContainer},{children:[o("h4",Object.assign({className:a.markCompleteTitle},{children:"Mark this section as complete?"})),e("p",Object.assign({className:a.markCompleteDescription},{children:["AI estimates this section is"," ",S,"% complete. If you're satisfied with the content, you can mark it as complete."]})),e("button",Object.assign({className:a.markCompleteButton,disabled:I||D,onClick:e=>{e.stopPropagation(),null==M||M(),B()}},{children:[I?o(c,{size:18,className:a.markCompleteSpinner}):o(m,{size:18,strokeWidth:3,className:a.markCompleteIcon}),o("span",{children:D?"Marked Complete":"Mark as Complete"})]}))]}))})}))]}))};export{p as CompletionPanel,p as default};
|
|
2
2
|
//# sourceMappingURL=CompletionPanel.js.map
|
package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";AA6DA,UAAU,eAAe;IACvB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC,oBAAoB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,MAAM,CAAA;AAEvC,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,OAAO,CAAC;CAC7B;AAKD,QAAA,MAAM,cAAc,kHAiRlB,CAAC;AAIH,eAAe,cAAc,CAAC"}
|
package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserStoryCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/UserStoryCard/UserStoryCard.tsx"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"UserStoryCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/UserStoryCard/UserStoryCard.tsx"],"names":[],"mappings":"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"}
|
package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompletionPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/CompletionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CompletionPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/story-screen/CompletionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAC/D,OAAO,EACH,UAAU,EACV,qBAAqB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACH,uBAAuB,EACvB,cAAc,EACjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACH,2BAA2B,EAC9B,MAAM,8CAA8C,CAAC;AAItD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,eAAO,MAAM,eAAe;iBAUX,cAAc;kBACb,uBAAuB;sBACnB,qBAAqB,GAAG,UAAU;;;eAGzC,SAAS;oCACW,OAAO,KAAK,IAAI;;6CA6LlD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|