@e-llm-studio/requirement-ai 0.0.189 → 0.0.190

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.
@@ -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"),s=require("lucide-react"),i=require("showdown"),l=require("@mui/material"),r=require("uuid"),o=require("./UserStoryCard.module.css.js"),a=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),d=require("../../shared/AtomicButton.js"),c=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),v=require("../RequirementAIWrapper/RequirementAIWrapper.js"),_=require("../story-screen/BigEnoughPanel.js"),g=require("./TitleEditor/TitleEditor.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=y(i);function m(n){for(var i,o=[],a=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(i=a.exec(n));){var c=i[1],f=i.index;f>u&&o.push(t.jsx("span",{children:n.slice(u,f)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(s.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(r.v4()))),u=a.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function p(t,n,s){var i;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return s&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[s])?e.__assign(e.__assign({},l),t.subFeatureOverrides[s]):l}var x=function(n){var i,l=n.displayName,r=v.useRequirementAI().customStyles,a=null===(i=null==r?void 0:r.userStoryCardStyles)||void 0===i?void 0:i.showDisplayName;return t.jsxs("div",e.__assign({className:o.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(s.Bookmark,{className:o.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},S=function(i){var y,C,I,j,w,b,N,B=i.isUserStoryCurrentlyUpdated,D=i.artifactId,U=i.artifactTitleId,k=i.parentUserStory,E=i.currentUserStory,M=i.onUserStoryChange,A=i.parentIndex,T=i.currentIndex,q=i.enableDownload,P=i.isDiffEditReviewMode,R=i.showUserStoryDiff,L=i.handleDownloadUserStory,H=i.handleOpenSendDialog,V=i.updateUserStoryArtifact,W=i.selectedArtifactId,z=i.isDisplayHighlightControl,O=i.elementDisplayConfig,F=i._resolvedConfig,G=i.showWrapper,Q=void 0!==G&&G,Z=i.actionItemsConfig,J=i.onDelete,K=i.contextVariant,X=v.useRequirementAI(),Y=X.searchQueryList,$=X.citations,ee=X.customStyles,te=null==ee?void 0:ee.userStoryCardStyles,ne=null===(y=null==ee?void 0:ee.userStoryCardStyles)||void 0===y?void 0:y.userStoryEditStyles,se=null===(C=null==ee?void 0:ee.userStoryScreenStyles)||void 0===C?void 0:C.userStoryContentStyles,ie=null==te?void 0:te.progressHeaderStyles,le=n.useState(e.__assign(e.__assign({},structuredClone(E)),{value:a.formatMarkdown(E.value)||""})),re=le[0],oe=le[1],ae=n.useState({userStory:!!E.isDefaultEdit}),ue=ae[0],de=ae[1],ce=n.useState(!1),fe=ce[0],ve=ce[1],_e=n.useState(null),ge=_e[0],ye=_e[1],he=v.useRequirementAI(),me=he.userStory,pe=he.customIcons,xe=n.useState(""===A||W===E.artifactId||!!E.isDefaultOpen),Se=xe[0],Ce=xe[1],Ie=n.useState(!1);Ie[0];var je=Ie[1],we=n.useState(null),be=we[0],Ne=we[1],Be=n.useState(null),De=Be[0],Ue=Be[1],ke=n.useState(!1),Ee=ke[0],Me=ke[1],Ae=n.useRef(null),Te=n.useState(!1);Te[0];var qe=Te[1],Pe=n.useRef(null);n.useEffect(function(){B&&Ce(B)},[B]),n.useEffect(function(){oe(e.__assign(e.__assign({},structuredClone(E)),{value:a.formatMarkdown(E.value)||""}))},[E]),n.useEffect(function(){Y.length>0?Ce(!0):W&&Ce(W===E.artifactId)},[Y,W,E.artifactId]);var Re=function(){Ne(null)},Le=function(){Ue(null)},He=function(){Ce(function(e){return!e})};var Ve=null!=(null==E?void 0:E.big_enough)&&!Number.isNaN(E.big_enough)&&!!(null==E?void 0:E.big_enough_decision_factors),We=""===A,ze=null!=F?F:p(O,We),Oe=!P&&!R;return n.useEffect(function(){if(ge){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(ge));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[ge]),n.useEffect(function(){E.isDefaultEdit&&de(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[E.isDefaultEdit]),t.jsxs("div",e.__assign({className:o.default.card,style:null==te?void 0:te.cardStyle,id:"story-card-".concat(E.title),"data-expanded":Se},{children:[t.jsxs("div",e.__assign({className:o.default.titleSection,style:null==te?void 0:te.titleSection},{children:[t.jsxs("div",e.__assign({className:o.default.titleRow,style:null==te?void 0:te.titleRow,onClick:He},{children:[t.jsxs("div",e.__assign({className:o.default.titleLeft,style:null==te?void 0:te.titleLeft,onMouseEnter:function(){return qe(!0)},onMouseLeave:function(){return qe(!1)}},{children:[t.jsx(x,{displayName:U}),fe&&Oe?t.jsx(g.InlineTitleEditor,{title:E.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var s,i;return e.__generator(this,function(l){try{s=e.__assign({},E),E.artifactId===n?s.title=t:s.sub_features=(null===(i=E.sub_features)||void 0===i?void 0:i.map(function(s){return s.artifactId===n?e.__assign(e.__assign({},s),{title:t}):s}))||[],oe(s),M(s),ve(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,E.artifactId)},onCancel:function(){ve(!1)},inputStyle:null==ne?void 0:ne.inlineTitleInput,confirmButtonStyle:null==ne?void 0:ne.inlineTitleConfirm,cancelButtonStyle:null==ne?void 0:ne.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:o.default.storyTitleWrapper},{children:[t.jsx("h2",e.__assign({title:E.title,className:o.default.storyTitle,style:null==te?void 0:te.storyTitle},{children:m(E.title)}),E.artifactId),t.jsx("button",e.__assign({type:"button",className:o.default.titleEditButton,style:null==ne?void 0:ne.titleEditButton,onClick:function(e){e.stopPropagation(),ve(!0),Se||Ce(!0)},"aria-label":"Edit title",title:"Edit title"},{children:t.jsx("svg",e.__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"})}))}))]}))]})),t.jsxs("div",e.__assign({className:o.default.titleActions,style:null==te?void 0:te.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(ze.showProgressPercentage||ze.showGapBox)&&Q&&t.jsxs("div",e.__assign({className:o.default.progressHeader,style:null==ie?void 0:ie.wrapper},{children:[ze.showProgressPercentage&&t.jsxs("div",e.__assign({className:o.default.progressPercentage,style:null==ie?void 0:ie.percentage},{children:[null!==(j=null!==(I=null==E?void 0:E.confidenceScore)&&void 0!==I?I:null==ze?void 0:ze.confidenceValue)&&void 0!==j?j:"0","%"]})),ze.showGapBox&&t.jsxs("div",e.__assign({className:o.default.gapBox,style:null==ie?void 0:ie.gapBox},{children:[null!==(b=null!==(w=null==E?void 0:E.gapValue)&&void 0!==w?w:null==ze?void 0:ze.gapBoxValue)&&void 0!==b?b:"2"," ","Gaps"]}))]})),Ve&&t.jsx(_.BigEnoughPanel,{customIcons:null==pe?void 0:pe.userStoryIcons,customStyles:null==te?void 0:te.aiReasoningCitaionStyles,currentUserStory:E,panelStyles:null==te?void 0:te.BigEnoughStyles}),!ue.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==ze?void 0:ze.showShareButton)&&t.jsx("button",e.__assign({className:o.default.iconButton,style:null==te?void 0:te.iconButton,onClick:function(e){Ne(e.currentTarget)}},{children:t.jsx(s.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:be,open:!!be,onClose:function(){return Ne(null)},style:null==te?void 0:te.userStoryShareMenu},{children:[q&&t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return je(!0),L?[4,Promise.all([L("pdf"),L("doc")])]:[2];case 1:return e.sent(),je(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Ae,className:o.default.menuItemContent,style:null==te?void 0:te.menuItemContent},{children:[t.jsx(s.Download,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=E,k&&(t=e.__assign(e.__assign({},E),{value:"".concat(u.replaceTitleSection(null==k?void 0:k.value,E.title)," \n").concat(E.value)})),null==H||H(!0,[t],E.artifactId),Re(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==te?void 0:te.menuItemContent,className:o.default.menuItemContentPadded},{children:[t.jsx(s.Share2,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,s,i,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new h.default.Converter,n=t.makeHtml(a.formatMarkdown(E.value)||E.value),s=function(e){var t=(new h.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(a.formatMarkdown(E.value)||E.value),i=new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return l=e.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return Re(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==te?void 0:te.menuItemContent,className:o.default.menuItemContentPadded},{children:[t.jsx(s.Copy,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Copy"}))]}))}))]}))]}),ue.userStory&&Se?t.jsx(d.default,{type:"outline",children:"Cancel",style:null==te?void 0:te.cancelButton,onClick:function(){var t;null===(t=Pe.current)||void 0===t||t.abort(),de(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),ue.userStory&&Se?t.jsx(d.default,{type:"fill",children:Ee?t.jsxs("span",e.__assign({className:o.default.savingSpinner,style:null==te?void 0:te.savingSpinner},{children:[t.jsx(s.LoaderCircle,{className:o.default.spinAnimation,style:null==te?void 0:te.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Ee,style:Ee?null==te?void 0:te.savingButton:null==te?void 0:te.saveButton,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){switch(n.label){case 0:return Me(!0),"userStory"==="userStory"&&(M(re),console.log("I am changing RTE editor values",re)),[4,V($,me,D,null===(t=Pe.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),M(e.__assign(e.__assign({},re),{isDefaultEdit:!1})),de(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Me(!1),[2]}})})}}):!P&&!R&&Se&&!1!==(null==ze?void 0:ze.showEditButton)&&t.jsx("button",e.__assign({className:o.default.iconButton,style:null==te?void 0:te.editButton,onClick:function(){return de(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(s.PencilIcon,{color:null==te?void 0:te.pencilIconColor,size:16})})),We&&Se&&!P&&!R&&!1!==(null==ze?void 0:ze.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:o.default.addSectionButton,style:null==ne?void 0:ne.addSectionButton,onClick:function(t){var n,s,i;t.stopPropagation();var l=(null!==(s=null===(n=E.sub_features)||void 0===n?void 0:n.length)&&void 0!==s?s:0)+1,o={artifactId:r.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},a=e.__assign(e.__assign({},E),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(i=E.sub_features)&&void 0!==i?i:[],!0),[o],!1)});oe(a),M(a),Ce(!0),ye(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(s.Plus,{size:14}),t.jsx("span",e.__assign({className:o.default.addSectionLabel},{children:"Add Section"}))]})),!We&&!P&&!R&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==J||J()},className:o.default.iconButton,style:null==ne?void 0:ne.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(s.Trash2,{size:16})})),(null==ze?void 0:ze.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:o.default.actionItemBtn,style:null==te?void 0:te.actionItemBtn,onClick:function(e){e.stopPropagation(),Ue(e.currentTarget)}},{children:t.jsx(s.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:De,open:!!De,onClose:Le,style:null==te?void 0:te.userStoryShareMenu},{children:null==Z?void 0:Z.items.map(function(n,s){return t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){n.onclick(),Le()}},{children:t.jsxs("div",e.__assign({className:o.default.menuItemContent,style:e.__assign(e.__assign({},null==te?void 0:te.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:o.default.menuItemIcon,style:null==te?void 0:te.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:n.name})),t.jsx("span",{className:o.default.menuItemRight,style:null==te?void 0:te.menuItemRight})]}))}),"action-item-".concat(s,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),He()},style:null==te?void 0:te.chevronButton,className:o.default.chevronButton},{children:Se?t.jsx(s.ChevronUp,{className:o.default.chevronIcon,color:null==te?void 0:te.chevronIconColor}):t.jsx(s.ChevronDown,{className:o.default.chevronIcon,color:null==te?void 0:te.chevronIconColor})}))]}))]})),t.jsx("div",{className:o.default.divider,style:null==te?void 0:te.dividerStyle})]})),Se&&t.jsx("div",e.__assign({className:o.default.cardContent,style:null==te?void 0:te.cardContentStyle},{children:t.jsxs("div",e.__assign({className:o.default.contentInner,style:null==te?void 0:te.contentInner},{children:[t.jsxs("div",e.__assign({className:o.default.descriptionSection,style:null==te?void 0:te.descriptionSection},{children:[t.jsx("div",{className:o.default.justifyBetween,style:null==te?void 0:te.justifyBetween}),ue.userStory?t.jsx(c.default,{minHeight:"100%",height:"100%",type:"string",value:a.formatMarkdown(E.value)||"",handleUpdateState:function(t,n){var s=a.indentMarkdown(n);oe(function(t){return e.__assign(e.__assign({},t),{value:s||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ue.userStory?"edit":"readOnly"}):t.jsx(f.default,{showUserStoryDiff:R,isParent:""===A,message:a.formatMarkdown(E.value)||"",artifactId:E.artifactId,customStyles:se,isDisplayHighlightControl:z,contextVariant:K})]})),null===(N=re.sub_features)||void 0===N?void 0:N.map(function(n,s){var i=p(O,!1,n.artifactId);return t.jsx(S,{artifactId:D,isUserStoryCurrentlyUpdated:B,artifactTitleId:"".concat(U,"-").concat(String.fromCharCode(65+s)),parentUserStory:E,parentIndex:"".concat(A).concat(A&&".").concat(T),currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var s=e.__spreadArray([],E.sub_features||[],!0);s[t]=n,M(e.__assign(e.__assign({},E),{sub_features:s}))}(s,t)},enableDownload:!0,isDiffEditReviewMode:P,showUserStoryDiff:R,updateUserStoryArtifact:V,handleDownloadUserStory:L,handleOpenSendDialog:H,isDisplayHighlightControl:z,elementDisplayConfig:O,_resolvedConfig:i,actionItemsConfig:Z,onDelete:function(){return function(t){var n=(E.sub_features||[]).filter(function(e,n){return n!==t}),s=e.__assign(e.__assign({},E),{sub_features:n});oe(s),M(s)}(s)}},n.artifactId)})]}))}))]}))};exports.StoryCard=S,exports.UserStoryCardWrapper=function(n){var i=n.artifactTitleIDs,l=n.isDiffEditReviewMode,r=n.showUserStoryDiff,a=n.updateUserStoryArtifact,u=n.isUserStoryCurrentlyUpdated,d=n.artifactId,c=n.handleOpenSendDialog,f=n.handleDownloadUserStory,_=n.selectedArtifactId,g=n.isDisplayHighlightControl,y=n.elementDisplayConfig,h=n.showWrapper,m=n.actionItemsConfig,x=n.contextVariant,C=v.useRequirementAI(),I=C.userStory,j=C.setUserStory,w=C.customStyles,b=C.searchQueryList,N=C.currentHighlightIndex,B=C.setCurrentHighlightIndex;C.segmentComponentConfig;var D=null==w?void 0:w.userStoryCardStyles,U=0===N,k=N===b.length-1;return t.jsxs("div",e.__assign({className:o.default.userStoryCardWrapper,style:g?e.__assign(e.__assign({},null==D?void 0:D.userStoryCardWrapper),{position:"relative"}):null==D?void 0:D.userStoryCardWrapper},{children:[g&&t.jsx(t.Fragment,{children:b.length>0&&t.jsx("div",e.__assign({className:o.default.wrapper},{children:t.jsx("div",e.__assign({className:o.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:o.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:o.default.navCounter},{children:[N+1," of ",b.length]})),t.jsxs("div",e.__assign({className:o.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){N>0&&B(function(e){return e-1})},className:o.default.navButton,disabled:U},{children:t.jsx(s.ChevronUpIcon,{size:20,className:o.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){N<b.length-1&&B(function(e){return e+1})},className:o.default.navButton,disabled:k},{children:t.jsx(s.ChevronDownIcon,{size:20,className:o.default.navIcon})}))]}))]}))}))}))}),I.map(function(n,s){var o=p(y,!0);return t.jsx(S,{isUserStoryCurrentlyUpdated:u,artifactId:d,artifactTitleId:i[s]||"",currentUserStory:n,onUserStoryChange:function(t){j(function(n){return n[s]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:l,showUserStoryDiff:r,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:f,selectedArtifactId:_,isDisplayHighlightControl:g,elementDisplayConfig:y,_resolvedConfig:o,showWrapper:h,actionItemsConfig:m,contextVariant:x},n.artifactId)})]}))},exports.default=S,exports.replaceLearnedTagsWithInfo=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),s=require("lucide-react"),i=require("showdown"),l=require("@mui/material"),r=require("uuid"),o=require("./UserStoryCard.module.css.js"),a=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),d=require("../../shared/AtomicButton.js"),c=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),v=require("../RequirementAIWrapper/RequirementAIWrapper.js"),_=require("../story-screen/BigEnoughPanel.js"),g=require("./TitleEditor/TitleEditor.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=y(i);function m(n){for(var i,o=[],a=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(i=a.exec(n));){var c=i[1],f=i.index;f>u&&o.push(t.jsx("span",{children:n.slice(u,f)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(s.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(r.v4()))),u=a.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function p(t,n,s){var i;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return s&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[s])?e.__assign(e.__assign({},l),t.subFeatureOverrides[s]):l}var x=function(n){var i,l=n.displayName,r=v.useRequirementAI().customStyles,a=null===(i=null==r?void 0:r.userStoryCardStyles)||void 0===i?void 0:i.showDisplayName;return t.jsxs("div",e.__assign({className:o.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(s.Bookmark,{className:o.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},S=function(i){var y,C,I,j,w,b,N,B=i.isUserStoryCurrentlyUpdated,D=i.artifactId,U=i.artifactTitleId,k=i.parentUserStory,E=i.currentUserStory,M=i.onUserStoryChange,A=i.parentIndex,T=i.currentIndex,q=i.enableDownload,P=i.isDiffEditReviewMode,R=i.showUserStoryDiff,L=i.handleDownloadUserStory,H=i.handleOpenSendDialog,V=i.updateUserStoryArtifact,W=i.selectedArtifactId,z=i.isDisplayHighlightControl,O=i.elementDisplayConfig,F=i._resolvedConfig,G=i.showWrapper,Q=void 0!==G&&G,Z=i.actionItemsConfig,J=i.onDelete,K=i.contextVariant,X=v.useRequirementAI(),Y=X.searchQueryList,$=X.citations,ee=X.customStyles,te=null==ee?void 0:ee.userStoryCardStyles,ne=null===(y=null==ee?void 0:ee.userStoryCardStyles)||void 0===y?void 0:y.userStoryEditStyles,se=null===(C=null==ee?void 0:ee.userStoryScreenStyles)||void 0===C?void 0:C.userStoryContentStyles,ie=null==te?void 0:te.progressHeaderStyles,le=n.useState(e.__assign(e.__assign({},structuredClone(E)),{value:a.formatMarkdown(E.value)||""})),re=le[0],oe=le[1],ae=n.useState({userStory:!!E.isDefaultEdit}),ue=ae[0],de=ae[1],ce=n.useState(!1),fe=ce[0],ve=ce[1],_e=n.useState(null),ge=_e[0],ye=_e[1],he=v.useRequirementAI(),me=he.userStory,pe=he.customIcons,xe=n.useState(""===A||W===E.artifactId||!!E.isDefaultOpen),Se=xe[0],Ce=xe[1],Ie=n.useState(!1);Ie[0];var je=Ie[1],we=n.useState(null),be=we[0],Ne=we[1],Be=n.useState(null),De=Be[0],Ue=Be[1],ke=n.useState(!1),Ee=ke[0],Me=ke[1],Ae=n.useRef(null),Te=n.useState(!1);Te[0];var qe=Te[1],Pe=n.useRef(null);n.useEffect(function(){B&&Ce(B)},[B]),n.useEffect(function(){oe(e.__assign(e.__assign({},structuredClone(E)),{value:a.formatMarkdown(E.value)||""}))},[E]),n.useEffect(function(){Y.length>0?Ce(!0):W&&Ce(W===E.artifactId)},[Y,W,E.artifactId]);var Re=function(){Ne(null)},Le=function(){Ue(null)},He=function(){Ce(function(e){return!e})};var Ve=null!=(null==E?void 0:E.big_enough)&&!Number.isNaN(E.big_enough)&&!!(null==E?void 0:E.big_enough_decision_factors),We=""===A,ze=null!=F?F:p(O,We),Oe=!P&&!R;return n.useEffect(function(){if(ge){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(ge));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[ge]),n.useEffect(function(){E.isDefaultEdit&&de(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[E.isDefaultEdit]),t.jsxs("div",e.__assign({className:o.default.card,style:null==te?void 0:te.cardStyle,id:"story-card-".concat(E.title),"data-expanded":Se},{children:[t.jsxs("div",e.__assign({className:o.default.titleSection,style:null==te?void 0:te.titleSection},{children:[t.jsxs("div",e.__assign({className:o.default.titleRow,style:null==te?void 0:te.titleRow,onClick:He},{children:[t.jsxs("div",e.__assign({className:o.default.titleLeft,style:null==te?void 0:te.titleLeft,onMouseEnter:function(){return qe(!0)},onMouseLeave:function(){return qe(!1)}},{children:[t.jsx(x,{displayName:U}),fe&&Oe?t.jsx(g.InlineTitleEditor,{title:E.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var s,i;return e.__generator(this,function(l){try{s=e.__assign({},E),E.artifactId===n?s.title=t:s.sub_features=(null===(i=E.sub_features)||void 0===i?void 0:i.map(function(s){return s.artifactId===n?e.__assign(e.__assign({},s),{title:t}):s}))||[],oe(s),M(s),ve(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,E.artifactId)},onCancel:function(){ve(!1)},inputStyle:null==ne?void 0:ne.inlineTitleInput,confirmButtonStyle:null==ne?void 0:ne.inlineTitleConfirm,cancelButtonStyle:null==ne?void 0:ne.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:o.default.storyTitleWrapper},{children:[t.jsx("h2",e.__assign({title:E.title,className:o.default.storyTitle,style:null==te?void 0:te.storyTitle},{children:m(E.title)}),E.artifactId),t.jsx("button",e.__assign({type:"button",className:o.default.titleEditButton,style:null==ne?void 0:ne.titleEditButton,onClick:function(e){e.stopPropagation(),ve(!0),Se||Ce(!0)},"aria-label":"Edit title",title:"Edit title"},{children:t.jsx("svg",e.__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"})}))}))]}))]})),t.jsxs("div",e.__assign({className:o.default.titleActions,style:null==te?void 0:te.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(ze.showProgressPercentage||ze.showGapBox)&&Q&&t.jsxs("div",e.__assign({className:o.default.progressHeader,style:null==ie?void 0:ie.wrapper},{children:[ze.showProgressPercentage&&t.jsxs("div",e.__assign({className:o.default.progressPercentage,style:null==ie?void 0:ie.percentage},{children:[null!==(j=null!==(I=null==E?void 0:E.confidenceScore)&&void 0!==I?I:null==ze?void 0:ze.confidenceValue)&&void 0!==j?j:"0","%"]})),ze.showGapBox&&t.jsxs("div",e.__assign({className:o.default.gapBox,style:null==ie?void 0:ie.gapBox},{children:[null!==(b=null!==(w=null==E?void 0:E.gapValue)&&void 0!==w?w:null==ze?void 0:ze.gapBoxValue)&&void 0!==b?b:"2"," ","Gaps"]}))]})),Ve&&t.jsx(_.BigEnoughPanel,{customIcons:null==pe?void 0:pe.userStoryIcons,customStyles:null==te?void 0:te.aiReasoningCitaionStyles,currentUserStory:E,panelStyles:null==te?void 0:te.BigEnoughStyles}),!ue.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==ze?void 0:ze.showShareButton)&&t.jsx("button",e.__assign({className:o.default.iconButton,style:null==te?void 0:te.iconButton,onClick:function(e){Ne(e.currentTarget)}},{children:t.jsx(s.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:be,open:!!be,onClose:function(){return Ne(null)},style:null==te?void 0:te.userStoryShareMenu},{children:[q&&t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return je(!0),L?[4,Promise.all([L("pdf"),L("doc")])]:[2];case 1:return e.sent(),je(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Ae,className:o.default.menuItemContent,style:null==te?void 0:te.menuItemContent},{children:[t.jsx(s.Download,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=E,k&&(t=e.__assign(e.__assign({},E),{value:"".concat(u.replaceTitleSection(null==k?void 0:k.value,E.title)," \n").concat(E.value)})),null==H||H(!0,[t],E.artifactId),Re(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==te?void 0:te.menuItemContent,className:o.default.menuItemContentPadded},{children:[t.jsx(s.Share2,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,s,i,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new h.default.Converter,n=t.makeHtml(a.formatMarkdown(E.value)||E.value),s=function(e){var t=(new h.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(a.formatMarkdown(E.value)||E.value),i=new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return l=e.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return Re(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==te?void 0:te.menuItemContent,className:o.default.menuItemContentPadded},{children:[t.jsx(s.Copy,{size:16,color:null==te?void 0:te.menuIconColor}),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:"Copy"}))]}))}))]}))]}),ue.userStory&&Se?t.jsx(d.default,{type:"outline",children:"Cancel",style:null==te?void 0:te.cancelButton,onClick:function(){var t;null===(t=Pe.current)||void 0===t||t.abort(),de(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),ue.userStory&&Se?t.jsx(d.default,{type:"fill",children:Ee?t.jsxs("span",e.__assign({className:o.default.savingSpinner,style:null==te?void 0:te.savingSpinner},{children:[t.jsx(s.LoaderCircle,{className:o.default.spinAnimation,style:null==te?void 0:te.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Ee,style:Ee?null==te?void 0:te.savingButton:null==te?void 0:te.saveButton,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){switch(n.label){case 0:return Me(!0),"userStory"==="userStory"&&(M(re),console.log("I am changing RTE editor values",re)),[4,V($,me,D,null===(t=Pe.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),M(e.__assign(e.__assign({},re),{isDefaultEdit:!1})),de(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Me(!1),[2]}})})}}):!P&&!R&&Se&&!1!==(null==ze?void 0:ze.showEditButton)&&t.jsx("button",e.__assign({className:o.default.iconButton,style:null==te?void 0:te.editButton,onClick:function(){return de(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(s.PencilIcon,{color:null==te?void 0:te.pencilIconColor,size:16})})),We&&Se&&!P&&!R&&!1!==(null==ze?void 0:ze.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:o.default.addSectionButton,style:null==ne?void 0:ne.addSectionButton,onClick:function(t){var n,s,i;t.stopPropagation();var l=(null!==(s=null===(n=E.sub_features)||void 0===n?void 0:n.length)&&void 0!==s?s:0)+1,o={artifactId:r.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},a=e.__assign(e.__assign({},E),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(i=E.sub_features)&&void 0!==i?i:[],!0),[o],!1)});oe(a),M(a),Ce(!0),ye(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(s.Plus,{size:14}),t.jsx("span",e.__assign({className:o.default.addSectionLabel},{children:"Add Section"}))]})),!We&&!P&&!R&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==J||J()},className:o.default.iconButton,style:null==ne?void 0:ne.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(s.Trash2,{size:16})})),(null==ze?void 0:ze.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:o.default.actionItemBtn,style:null==te?void 0:te.actionItemBtn,onClick:function(e){e.stopPropagation(),Ue(e.currentTarget)}},{children:t.jsx(s.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:De,open:!!De,onClose:Le,style:null==te?void 0:te.userStoryShareMenu},{children:null==Z?void 0:Z.items.map(function(n,s){return t.jsx(l.MenuItem,e.__assign({style:null==te?void 0:te.userStoryMenuItem,onClick:function(){n.onclick(E),Le()}},{children:t.jsxs("div",e.__assign({className:o.default.menuItemContent,style:e.__assign(e.__assign({},null==te?void 0:te.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:o.default.menuItemIcon,style:null==te?void 0:te.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==te?void 0:te.menuLabel},{children:n.name})),t.jsx("span",{className:o.default.menuItemRight,style:null==te?void 0:te.menuItemRight})]}))}),"action-item-".concat(s,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),He()},style:null==te?void 0:te.chevronButton,className:o.default.chevronButton},{children:Se?t.jsx(s.ChevronUp,{className:o.default.chevronIcon,color:null==te?void 0:te.chevronIconColor}):t.jsx(s.ChevronDown,{className:o.default.chevronIcon,color:null==te?void 0:te.chevronIconColor})}))]}))]})),t.jsx("div",{className:o.default.divider,style:null==te?void 0:te.dividerStyle})]})),Se&&t.jsx("div",e.__assign({className:o.default.cardContent,style:null==te?void 0:te.cardContentStyle},{children:t.jsxs("div",e.__assign({className:o.default.contentInner,style:null==te?void 0:te.contentInner},{children:[t.jsxs("div",e.__assign({className:o.default.descriptionSection,style:null==te?void 0:te.descriptionSection},{children:[t.jsx("div",{className:o.default.justifyBetween,style:null==te?void 0:te.justifyBetween}),ue.userStory?t.jsx(c.default,{minHeight:"100%",height:"100%",type:"string",value:a.formatMarkdown(E.value)||"",handleUpdateState:function(t,n){var s=a.indentMarkdown(n);oe(function(t){return e.__assign(e.__assign({},t),{value:s||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ue.userStory?"edit":"readOnly"}):t.jsx(f.default,{showUserStoryDiff:R,isParent:""===A,message:a.formatMarkdown(E.value)||"",artifactId:E.artifactId,customStyles:se,isDisplayHighlightControl:z,contextVariant:K})]})),null===(N=re.sub_features)||void 0===N?void 0:N.map(function(n,s){var i=p(O,!1,n.artifactId);return t.jsx(S,{artifactId:D,isUserStoryCurrentlyUpdated:B,artifactTitleId:"".concat(U,"-").concat(String.fromCharCode(65+s)),parentUserStory:E,parentIndex:"".concat(A).concat(A&&".").concat(T),currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var s=e.__spreadArray([],E.sub_features||[],!0);s[t]=n,M(e.__assign(e.__assign({},E),{sub_features:s}))}(s,t)},enableDownload:!0,isDiffEditReviewMode:P,showUserStoryDiff:R,updateUserStoryArtifact:V,handleDownloadUserStory:L,handleOpenSendDialog:H,isDisplayHighlightControl:z,elementDisplayConfig:O,_resolvedConfig:i,actionItemsConfig:Z,onDelete:function(){return function(t){var n=(E.sub_features||[]).filter(function(e,n){return n!==t}),s=e.__assign(e.__assign({},E),{sub_features:n});oe(s),M(s)}(s)}},n.artifactId)})]}))}))]}))};exports.StoryCard=S,exports.UserStoryCardWrapper=function(n){var i=n.artifactTitleIDs,l=n.isDiffEditReviewMode,r=n.showUserStoryDiff,a=n.updateUserStoryArtifact,u=n.isUserStoryCurrentlyUpdated,d=n.artifactId,c=n.handleOpenSendDialog,f=n.handleDownloadUserStory,_=n.selectedArtifactId,g=n.isDisplayHighlightControl,y=n.elementDisplayConfig,h=n.showWrapper,m=n.actionItemsConfig,x=n.contextVariant,C=v.useRequirementAI(),I=C.userStory,j=C.setUserStory,w=C.customStyles,b=C.searchQueryList,N=C.currentHighlightIndex,B=C.setCurrentHighlightIndex;C.segmentComponentConfig;var D=null==w?void 0:w.userStoryCardStyles,U=0===N,k=N===b.length-1;return t.jsxs("div",e.__assign({className:o.default.userStoryCardWrapper,style:g?e.__assign(e.__assign({},null==D?void 0:D.userStoryCardWrapper),{position:"relative"}):null==D?void 0:D.userStoryCardWrapper},{children:[g&&t.jsx(t.Fragment,{children:b.length>0&&t.jsx("div",e.__assign({className:o.default.wrapper},{children:t.jsx("div",e.__assign({className:o.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:o.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:o.default.navCounter},{children:[N+1," of ",b.length]})),t.jsxs("div",e.__assign({className:o.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){N>0&&B(function(e){return e-1})},className:o.default.navButton,disabled:U},{children:t.jsx(s.ChevronUpIcon,{size:20,className:o.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){N<b.length-1&&B(function(e){return e+1})},className:o.default.navButton,disabled:k},{children:t.jsx(s.ChevronDownIcon,{size:20,className:o.default.navIcon})}))]}))]}))}))}))}),I.map(function(n,s){var o=p(y,!0);return t.jsx(S,{isUserStoryCurrentlyUpdated:u,artifactId:d,artifactTitleId:i[s]||"",currentUserStory:n,onUserStoryChange:function(t){j(function(n){return n[s]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:l,showUserStoryDiff:r,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:f,selectedArtifactId:_,isDisplayHighlightControl:g,elementDisplayConfig:y,_resolvedConfig:o,showWrapper:h,actionItemsConfig:m,contextVariant:x},n.artifactId)})]}))},exports.default=S,exports.replaceLearnedTagsWithInfo=m;
2
2
  //# sourceMappingURL=UserStoryCard.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as i,jsx as l,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as u}from"react";import{ExternalLink as c,Download as d,Share2 as v,Copy as f,LoaderCircle as m,PencilIcon as y,Plus as h,Trash2 as p,Ellipsis as S,ChevronUp as g,ChevronDown as C,ChevronUpIcon as I,ChevronDownIcon as w,Info as b,Bookmark as N}from"lucide-react";import B from"showdown";import{Menu as D,MenuItem as x,Tooltip as U}from"@mui/material";import{v4 as E}from"uuid";import k from"./UserStoryCard.module.css.js";import{formatMarkdown as T,indentMarkdown as A}from"../../utils/helpers.js";import{replaceTitleSection as M}from"../../utils/user-story.utils.js";import _ from"../../shared/AtomicButton.js";import P from"../RichTextEditor/RichTextEditor.js";import H from"../userstory-with-citation/UserStoryWithCitation.js";import{useRequirementAI as R}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as j}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as L}from"./TitleEditor/TitleEditor.js";function V(t){for(var n,o=[],i=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=i.exec(t));){var s=n[1],u=n.index;u>r&&o.push(l("span",{children:t.slice(r,u)},"text-pre-".concat(a++))),o.push(l(U,e({title:s,placement:"top"},{children:l(b,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(E()))),r=i.lastIndex}return r<(null==t?void 0:t.length)&&o.push(l("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function z(t,n,o){var i;if(!t)return{};if(n)return e({},t.parentConfig);var l=e({},t.childConfig);return o&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[o])?e(e({},l),t.subFeatureOverrides[o]):l}var W=function(t){var n,o=t.displayName,r=R().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return i("div",e({className:k.displayName,style:null==a?void 0:a.wrapper},{children:[l(N,{className:k.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),i("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},O=function(I){var w,b,N,U,F,G,q,Q=I.isUserStoryCurrentlyUpdated,Z=I.artifactId,J=I.artifactTitleId,K=I.parentUserStory,X=I.currentUserStory,Y=I.onUserStoryChange,$=I.parentIndex,ee=I.currentIndex,te=I.enableDownload,ne=I.isDiffEditReviewMode,oe=I.showUserStoryDiff,ie=I.handleDownloadUserStory,le=I.handleOpenSendDialog,re=I.updateUserStoryArtifact,ae=I.selectedArtifactId,se=I.isDisplayHighlightControl,ue=I.elementDisplayConfig,ce=I._resolvedConfig,de=I.showWrapper,ve=void 0!==de&&de,fe=I.actionItemsConfig,me=I.onDelete,ye=I.contextVariant,he=R(),pe=he.searchQueryList,Se=he.citations,ge=he.customStyles,Ce=null==ge?void 0:ge.userStoryCardStyles,Ie=null===(w=null==ge?void 0:ge.userStoryCardStyles)||void 0===w?void 0:w.userStoryEditStyles,we=null===(b=null==ge?void 0:ge.userStoryScreenStyles)||void 0===b?void 0:b.userStoryContentStyles,be=null==Ce?void 0:Ce.progressHeaderStyles,Ne=a(e(e({},structuredClone(X)),{value:T(X.value)||""})),Be=Ne[0],De=Ne[1],xe=a({userStory:!!X.isDefaultEdit}),Ue=xe[0],Ee=xe[1],ke=a(!1),Te=ke[0],Ae=ke[1],Me=a(null),_e=Me[0],Pe=Me[1],He=R(),Re=He.userStory,je=He.customIcons,Le=a(""===$||ae===X.artifactId||!!X.isDefaultOpen),Ve=Le[0],ze=Le[1],We=a(!1);We[0];var Oe=We[1],Fe=a(null),Ge=Fe[0],qe=Fe[1],Qe=a(null),Ze=Qe[0],Je=Qe[1],Ke=a(!1),Xe=Ke[0],Ye=Ke[1],$e=s(null),et=a(!1);et[0];var tt=et[1],nt=s(null);u(function(){Q&&ze(Q)},[Q]),u(function(){De(e(e({},structuredClone(X)),{value:T(X.value)||""}))},[X]),u(function(){pe.length>0?ze(!0):ae&&ze(ae===X.artifactId)},[pe,ae,X.artifactId]);var ot=function(){qe(null)},it=function(){Je(null)},lt=function(){ze(function(e){return!e})};var rt=null!=(null==X?void 0:X.big_enough)&&!Number.isNaN(X.big_enough)&&!!(null==X?void 0:X.big_enough_decision_factors),at=""===$,st=null!=ce?ce:z(ue,at),ut=!ne&&!oe;return u(function(){if(_e){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(_e));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[_e]),u(function(){X.isDefaultEdit&&Ee(function(t){return e(e({},t),{userStory:!0})})},[X.isDefaultEdit]),i("div",e({className:k.card,style:null==Ce?void 0:Ce.cardStyle,id:"story-card-".concat(X.title),"data-expanded":Ve},{children:[i("div",e({className:k.titleSection,style:null==Ce?void 0:Ce.titleSection},{children:[i("div",e({className:k.titleRow,style:null==Ce?void 0:Ce.titleRow,onClick:lt},{children:[i("div",e({className:k.titleLeft,style:null==Ce?void 0:Ce.titleLeft,onMouseEnter:function(){return tt(!0)},onMouseLeave:function(){return tt(!1)}},{children:[l(W,{displayName:J}),Te&&ut?l(L,{title:X.title,onSave:function(o){return function(o,i){return t(void 0,void 0,void 0,function(){var t,l;return n(this,function(n){try{t=e({},X),X.artifactId===i?t.title=o:t.sub_features=(null===(l=X.sub_features)||void 0===l?void 0:l.map(function(t){return t.artifactId===i?e(e({},t),{title:o}):t}))||[],De(t),Y(t),Ae(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,X.artifactId)},onCancel:function(){Ae(!1)},inputStyle:null==Ie?void 0:Ie.inlineTitleInput,confirmButtonStyle:null==Ie?void 0:Ie.inlineTitleConfirm,cancelButtonStyle:null==Ie?void 0:Ie.inlineTitleCancel},"inline-title-editor"):i("div",e({className:k.storyTitleWrapper},{children:[l("h2",e({title:X.title,className:k.storyTitle,style:null==Ce?void 0:Ce.storyTitle},{children:V(X.title)}),X.artifactId),l("button",e({type:"button",className:k.titleEditButton,style:null==Ie?void 0:Ie.titleEditButton,onClick:function(e){e.stopPropagation(),Ae(!0),Ve||ze(!0)},"aria-label":"Edit title",title:"Edit title"},{children:l("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:l("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"})}))}))]}))]})),i("div",e({className:k.titleActions,style:null==Ce?void 0:Ce.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(st.showProgressPercentage||st.showGapBox)&&ve&&i("div",e({className:k.progressHeader,style:null==be?void 0:be.wrapper},{children:[st.showProgressPercentage&&i("div",e({className:k.progressPercentage,style:null==be?void 0:be.percentage},{children:[null!==(U=null!==(N=null==X?void 0:X.confidenceScore)&&void 0!==N?N:null==st?void 0:st.confidenceValue)&&void 0!==U?U:"0","%"]})),st.showGapBox&&i("div",e({className:k.gapBox,style:null==be?void 0:be.gapBox},{children:[null!==(G=null!==(F=null==X?void 0:X.gapValue)&&void 0!==F?F:null==st?void 0:st.gapBoxValue)&&void 0!==G?G:"2"," ","Gaps"]}))]})),rt&&l(j,{customIcons:null==je?void 0:je.userStoryIcons,customStyles:null==Ce?void 0:Ce.aiReasoningCitaionStyles,currentUserStory:X,panelStyles:null==Ce?void 0:Ce.BigEnoughStyles}),!Ue.userStory&&i(r,{children:[!1!==(null==st?void 0:st.showShareButton)&&l("button",e({className:k.iconButton,style:null==Ce?void 0:Ce.iconButton,onClick:function(e){qe(e.currentTarget)}},{children:l(c,{size:16})})),i(D,e({id:"user-story-share-menu",anchorEl:Ge,open:!!Ge,onClose:function(){return qe(null)},style:null==Ce?void 0:Ce.userStoryShareMenu},{children:[te&&l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return Oe(!0),ie?[4,Promise.all([ie("pdf"),ie("doc")])]:[2];case 1:return e.sent(),Oe(!1),[2]}})})}},{children:i("div",e({ref:$e,className:k.menuItemContent,style:null==Ce?void 0:Ce.menuItemContent},{children:[l(d,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Download"}))]}))})),l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=X,K&&(t=e(e({},X),{value:"".concat(M(null==K?void 0:K.value,X.title)," \n").concat(X.value)})),null==le||le(!0,[t],X.artifactId),ot(),[2]})})}},{children:i("div",e({style:null==Ce?void 0:Ce.menuItemContent,className:k.menuItemContentPadded},{children:[l(v,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Send"}))]}))})),l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,i,l;return n(this,function(n){switch(n.label){case 0:e=new B.Converter,t=e.makeHtml(T(X.value)||X.value),o=function(e){var t=(new B.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(T(X.value)||X.value),i=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return l=n.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return ot(),[7];case 5:return[2]}})})}},{children:i("div",e({style:null==Ce?void 0:Ce.menuItemContent,className:k.menuItemContentPadded},{children:[l(f,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Copy"}))]}))}))]}))]}),Ue.userStory&&Ve?l(_,{type:"outline",children:"Cancel",style:null==Ce?void 0:Ce.cancelButton,onClick:function(){var t;null===(t=nt.current)||void 0===t||t.abort(),Ee(function(t){return e(e({},t),{userStory:!1})})}}):l(r,{}),Ue.userStory&&Ve?l(_,{type:"fill",children:Xe?i("span",e({className:k.savingSpinner,style:null==Ce?void 0:Ce.savingSpinner},{children:[l(m,{className:k.spinAnimation,style:null==Ce?void 0:Ce.spinAnimation}),l("span",{children:"Saving..."})]})):"Save",isDisable:Xe,style:Xe?null==Ce?void 0:Ce.savingButton:null==Ce?void 0:Ce.saveButton,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return Ye(!0),"userStory"==="userStory"&&(Y(Be),console.log("I am changing RTE editor values",Be)),[4,re(Se,Re,Z,null===(t=nt.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Y(e(e({},Be),{isDefaultEdit:!1})),Ee(function(t){return e(e({},t),{userStory:!1})}),Ye(!1),[2]}})})}}):!ne&&!oe&&Ve&&!1!==(null==st?void 0:st.showEditButton)&&l("button",e({className:k.iconButton,style:null==Ce?void 0:Ce.editButton,onClick:function(){return Ee(function(t){return e(e({},t),{userStory:!0})})}},{children:l(y,{color:null==Ce?void 0:Ce.pencilIconColor,size:16})})),at&&Ve&&!ne&&!oe&&!1!==(null==st?void 0:st.showEditButton)&&i("button",e({type:"button",className:k.addSectionButton,style:null==Ie?void 0:Ie.addSectionButton,onClick:function(t){var n,i,l;t.stopPropagation();var r=(null!==(i=null===(n=X.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,a={artifactId:E(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},X),{sub_features:o(o([],null!==(l=X.sub_features)&&void 0!==l?l:[],!0),[a],!1)});De(s),Y(s),ze(!0),Pe(a.title)},"aria-label":"Add section",title:"Add section"},{children:[l(h,{size:14}),l("span",e({className:k.addSectionLabel},{children:"Add Section"}))]})),!at&&!ne&&!oe&&l("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==me||me()},className:k.iconButton,style:null==Ie?void 0:Ie.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:l(p,{size:16})})),(null==st?void 0:st.actionItemsButton)&&i(r,{children:[l("span",e({className:k.actionItemBtn,style:null==Ce?void 0:Ce.actionItemBtn,onClick:function(e){e.stopPropagation(),Je(e.currentTarget)}},{children:l(S,{})})),l(D,e({id:"user-story-action-menu",anchorEl:Ze,open:!!Ze,onClose:it,style:null==Ce?void 0:Ce.userStoryShareMenu},{children:null==fe?void 0:fe.items.map(function(t,n){return l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){t.onclick(),it()}},{children:i("div",e({className:k.menuItemContent,style:e(e({},null==Ce?void 0:Ce.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[l("span",e({className:k.menuItemIcon,style:null==Ce?void 0:Ce.menuItemIcon},{children:t.icon})),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:t.name})),l("span",{className:k.menuItemRight,style:null==Ce?void 0:Ce.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),l("button",e({type:"button",onClick:function(e){e.stopPropagation(),lt()},style:null==Ce?void 0:Ce.chevronButton,className:k.chevronButton},{children:l(Ve?g:C,{className:k.chevronIcon,color:null==Ce?void 0:Ce.chevronIconColor})}))]}))]})),l("div",{className:k.divider,style:null==Ce?void 0:Ce.dividerStyle})]})),Ve&&l("div",e({className:k.cardContent,style:null==Ce?void 0:Ce.cardContentStyle},{children:i("div",e({className:k.contentInner,style:null==Ce?void 0:Ce.contentInner},{children:[i("div",e({className:k.descriptionSection,style:null==Ce?void 0:Ce.descriptionSection},{children:[l("div",{className:k.justifyBetween,style:null==Ce?void 0:Ce.justifyBetween}),Ue.userStory?l(P,{minHeight:"100%",height:"100%",type:"string",value:T(X.value)||"",handleUpdateState:function(t,n){var o=A(n);De(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Ue.userStory?"edit":"readOnly"}):l(H,{showUserStoryDiff:oe,isParent:""===$,message:T(X.value)||"",artifactId:X.artifactId,customStyles:we,isDisplayHighlightControl:se,contextVariant:ye})]})),null===(q=Be.sub_features)||void 0===q?void 0:q.map(function(t,n){var i=z(ue,!1,t.artifactId);return l(O,{artifactId:Z,isUserStoryCurrentlyUpdated:Q,artifactTitleId:"".concat(J,"-").concat(String.fromCharCode(65+n)),parentUserStory:X,parentIndex:"".concat($).concat($&&".").concat(ee),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var i=o([],X.sub_features||[],!0);i[t]=n,Y(e(e({},X),{sub_features:i}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:ne,showUserStoryDiff:oe,updateUserStoryArtifact:re,handleDownloadUserStory:ie,handleOpenSendDialog:le,isDisplayHighlightControl:se,elementDisplayConfig:ue,_resolvedConfig:i,actionItemsConfig:fe,onDelete:function(){return function(t){var n=(X.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},X),{sub_features:n});De(o),Y(o)}(n)}},t.artifactId)})]}))}))]}))},F=function(t){var n=t.artifactTitleIDs,a=t.isDiffEditReviewMode,s=t.showUserStoryDiff,u=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,d=t.artifactId,v=t.handleOpenSendDialog,f=t.handleDownloadUserStory,m=t.selectedArtifactId,y=t.isDisplayHighlightControl,h=t.elementDisplayConfig,p=t.showWrapper,S=t.actionItemsConfig,g=t.contextVariant,C=R(),b=C.userStory,N=C.setUserStory,B=C.customStyles,D=C.searchQueryList,x=C.currentHighlightIndex,U=C.setCurrentHighlightIndex;C.segmentComponentConfig;var E=null==B?void 0:B.userStoryCardStyles,T=0===x,A=x===D.length-1;return i("div",e({className:k.userStoryCardWrapper,style:y?e(e({},null==E?void 0:E.userStoryCardWrapper),{position:"relative"}):null==E?void 0:E.userStoryCardWrapper},{children:[y&&l(r,{children:D.length>0&&l("div",e({className:k.wrapper},{children:l("div",e({className:k.highlightNavigation},{children:i("div",e({className:k.navigationContainer},{children:[i("span",e({className:k.navCounter},{children:[x+1," of ",D.length]})),i("div",e({className:k.navButtons},{children:[l("button",e({onClick:function(){x>0&&U(function(e){return e-1})},className:k.navButton,disabled:T},{children:l(I,{size:20,className:k.navIcon})})),l("button",e({onClick:function(){x<D.length-1&&U(function(e){return e+1})},className:k.navButton,disabled:A},{children:l(w,{size:20,className:k.navIcon})}))]}))]}))}))}))}),b.map(function(e,t){var i=z(h,!0);return l(O,{isUserStoryCurrentlyUpdated:c,artifactId:d,artifactTitleId:n[t]||"",currentUserStory:e,onUserStoryChange:function(e){N(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:a,showUserStoryDiff:s,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:m,isDisplayHighlightControl:y,elementDisplayConfig:h,_resolvedConfig:i,showWrapper:p,actionItemsConfig:S,contextVariant:g},e.artifactId)})]}))};export{O as StoryCard,F as UserStoryCardWrapper,O as default,V as replaceLearnedTagsWithInfo};
1
+ import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as i,jsx as l,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as u}from"react";import{ExternalLink as c,Download as d,Share2 as v,Copy as f,LoaderCircle as m,PencilIcon as y,Plus as h,Trash2 as p,Ellipsis as S,ChevronUp as g,ChevronDown as C,ChevronUpIcon as I,ChevronDownIcon as w,Info as b,Bookmark as N}from"lucide-react";import B from"showdown";import{Menu as D,MenuItem as x,Tooltip as U}from"@mui/material";import{v4 as E}from"uuid";import k from"./UserStoryCard.module.css.js";import{formatMarkdown as T,indentMarkdown as A}from"../../utils/helpers.js";import{replaceTitleSection as M}from"../../utils/user-story.utils.js";import _ from"../../shared/AtomicButton.js";import P from"../RichTextEditor/RichTextEditor.js";import H from"../userstory-with-citation/UserStoryWithCitation.js";import{useRequirementAI as R}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as j}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as L}from"./TitleEditor/TitleEditor.js";function V(t){for(var n,o=[],i=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=i.exec(t));){var s=n[1],u=n.index;u>r&&o.push(l("span",{children:t.slice(r,u)},"text-pre-".concat(a++))),o.push(l(U,e({title:s,placement:"top"},{children:l(b,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(E()))),r=i.lastIndex}return r<(null==t?void 0:t.length)&&o.push(l("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function z(t,n,o){var i;if(!t)return{};if(n)return e({},t.parentConfig);var l=e({},t.childConfig);return o&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[o])?e(e({},l),t.subFeatureOverrides[o]):l}var W=function(t){var n,o=t.displayName,r=R().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return i("div",e({className:k.displayName,style:null==a?void 0:a.wrapper},{children:[l(N,{className:k.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),i("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},O=function(I){var w,b,N,U,F,G,q,Q=I.isUserStoryCurrentlyUpdated,Z=I.artifactId,J=I.artifactTitleId,K=I.parentUserStory,X=I.currentUserStory,Y=I.onUserStoryChange,$=I.parentIndex,ee=I.currentIndex,te=I.enableDownload,ne=I.isDiffEditReviewMode,oe=I.showUserStoryDiff,ie=I.handleDownloadUserStory,le=I.handleOpenSendDialog,re=I.updateUserStoryArtifact,ae=I.selectedArtifactId,se=I.isDisplayHighlightControl,ue=I.elementDisplayConfig,ce=I._resolvedConfig,de=I.showWrapper,ve=void 0!==de&&de,fe=I.actionItemsConfig,me=I.onDelete,ye=I.contextVariant,he=R(),pe=he.searchQueryList,Se=he.citations,ge=he.customStyles,Ce=null==ge?void 0:ge.userStoryCardStyles,Ie=null===(w=null==ge?void 0:ge.userStoryCardStyles)||void 0===w?void 0:w.userStoryEditStyles,we=null===(b=null==ge?void 0:ge.userStoryScreenStyles)||void 0===b?void 0:b.userStoryContentStyles,be=null==Ce?void 0:Ce.progressHeaderStyles,Ne=a(e(e({},structuredClone(X)),{value:T(X.value)||""})),Be=Ne[0],De=Ne[1],xe=a({userStory:!!X.isDefaultEdit}),Ue=xe[0],Ee=xe[1],ke=a(!1),Te=ke[0],Ae=ke[1],Me=a(null),_e=Me[0],Pe=Me[1],He=R(),Re=He.userStory,je=He.customIcons,Le=a(""===$||ae===X.artifactId||!!X.isDefaultOpen),Ve=Le[0],ze=Le[1],We=a(!1);We[0];var Oe=We[1],Fe=a(null),Ge=Fe[0],qe=Fe[1],Qe=a(null),Ze=Qe[0],Je=Qe[1],Ke=a(!1),Xe=Ke[0],Ye=Ke[1],$e=s(null),et=a(!1);et[0];var tt=et[1],nt=s(null);u(function(){Q&&ze(Q)},[Q]),u(function(){De(e(e({},structuredClone(X)),{value:T(X.value)||""}))},[X]),u(function(){pe.length>0?ze(!0):ae&&ze(ae===X.artifactId)},[pe,ae,X.artifactId]);var ot=function(){qe(null)},it=function(){Je(null)},lt=function(){ze(function(e){return!e})};var rt=null!=(null==X?void 0:X.big_enough)&&!Number.isNaN(X.big_enough)&&!!(null==X?void 0:X.big_enough_decision_factors),at=""===$,st=null!=ce?ce:z(ue,at),ut=!ne&&!oe;return u(function(){if(_e){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(_e));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[_e]),u(function(){X.isDefaultEdit&&Ee(function(t){return e(e({},t),{userStory:!0})})},[X.isDefaultEdit]),i("div",e({className:k.card,style:null==Ce?void 0:Ce.cardStyle,id:"story-card-".concat(X.title),"data-expanded":Ve},{children:[i("div",e({className:k.titleSection,style:null==Ce?void 0:Ce.titleSection},{children:[i("div",e({className:k.titleRow,style:null==Ce?void 0:Ce.titleRow,onClick:lt},{children:[i("div",e({className:k.titleLeft,style:null==Ce?void 0:Ce.titleLeft,onMouseEnter:function(){return tt(!0)},onMouseLeave:function(){return tt(!1)}},{children:[l(W,{displayName:J}),Te&&ut?l(L,{title:X.title,onSave:function(o){return function(o,i){return t(void 0,void 0,void 0,function(){var t,l;return n(this,function(n){try{t=e({},X),X.artifactId===i?t.title=o:t.sub_features=(null===(l=X.sub_features)||void 0===l?void 0:l.map(function(t){return t.artifactId===i?e(e({},t),{title:o}):t}))||[],De(t),Y(t),Ae(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,X.artifactId)},onCancel:function(){Ae(!1)},inputStyle:null==Ie?void 0:Ie.inlineTitleInput,confirmButtonStyle:null==Ie?void 0:Ie.inlineTitleConfirm,cancelButtonStyle:null==Ie?void 0:Ie.inlineTitleCancel},"inline-title-editor"):i("div",e({className:k.storyTitleWrapper},{children:[l("h2",e({title:X.title,className:k.storyTitle,style:null==Ce?void 0:Ce.storyTitle},{children:V(X.title)}),X.artifactId),l("button",e({type:"button",className:k.titleEditButton,style:null==Ie?void 0:Ie.titleEditButton,onClick:function(e){e.stopPropagation(),Ae(!0),Ve||ze(!0)},"aria-label":"Edit title",title:"Edit title"},{children:l("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:l("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"})}))}))]}))]})),i("div",e({className:k.titleActions,style:null==Ce?void 0:Ce.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(st.showProgressPercentage||st.showGapBox)&&ve&&i("div",e({className:k.progressHeader,style:null==be?void 0:be.wrapper},{children:[st.showProgressPercentage&&i("div",e({className:k.progressPercentage,style:null==be?void 0:be.percentage},{children:[null!==(U=null!==(N=null==X?void 0:X.confidenceScore)&&void 0!==N?N:null==st?void 0:st.confidenceValue)&&void 0!==U?U:"0","%"]})),st.showGapBox&&i("div",e({className:k.gapBox,style:null==be?void 0:be.gapBox},{children:[null!==(G=null!==(F=null==X?void 0:X.gapValue)&&void 0!==F?F:null==st?void 0:st.gapBoxValue)&&void 0!==G?G:"2"," ","Gaps"]}))]})),rt&&l(j,{customIcons:null==je?void 0:je.userStoryIcons,customStyles:null==Ce?void 0:Ce.aiReasoningCitaionStyles,currentUserStory:X,panelStyles:null==Ce?void 0:Ce.BigEnoughStyles}),!Ue.userStory&&i(r,{children:[!1!==(null==st?void 0:st.showShareButton)&&l("button",e({className:k.iconButton,style:null==Ce?void 0:Ce.iconButton,onClick:function(e){qe(e.currentTarget)}},{children:l(c,{size:16})})),i(D,e({id:"user-story-share-menu",anchorEl:Ge,open:!!Ge,onClose:function(){return qe(null)},style:null==Ce?void 0:Ce.userStoryShareMenu},{children:[te&&l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return Oe(!0),ie?[4,Promise.all([ie("pdf"),ie("doc")])]:[2];case 1:return e.sent(),Oe(!1),[2]}})})}},{children:i("div",e({ref:$e,className:k.menuItemContent,style:null==Ce?void 0:Ce.menuItemContent},{children:[l(d,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Download"}))]}))})),l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=X,K&&(t=e(e({},X),{value:"".concat(M(null==K?void 0:K.value,X.title)," \n").concat(X.value)})),null==le||le(!0,[t],X.artifactId),ot(),[2]})})}},{children:i("div",e({style:null==Ce?void 0:Ce.menuItemContent,className:k.menuItemContentPadded},{children:[l(v,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Send"}))]}))})),l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,i,l;return n(this,function(n){switch(n.label){case 0:e=new B.Converter,t=e.makeHtml(T(X.value)||X.value),o=function(e){var t=(new B.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(T(X.value)||X.value),i=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return l=n.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return ot(),[7];case 5:return[2]}})})}},{children:i("div",e({style:null==Ce?void 0:Ce.menuItemContent,className:k.menuItemContentPadded},{children:[l(f,{size:16,color:null==Ce?void 0:Ce.menuIconColor}),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:"Copy"}))]}))}))]}))]}),Ue.userStory&&Ve?l(_,{type:"outline",children:"Cancel",style:null==Ce?void 0:Ce.cancelButton,onClick:function(){var t;null===(t=nt.current)||void 0===t||t.abort(),Ee(function(t){return e(e({},t),{userStory:!1})})}}):l(r,{}),Ue.userStory&&Ve?l(_,{type:"fill",children:Xe?i("span",e({className:k.savingSpinner,style:null==Ce?void 0:Ce.savingSpinner},{children:[l(m,{className:k.spinAnimation,style:null==Ce?void 0:Ce.spinAnimation}),l("span",{children:"Saving..."})]})):"Save",isDisable:Xe,style:Xe?null==Ce?void 0:Ce.savingButton:null==Ce?void 0:Ce.saveButton,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return Ye(!0),"userStory"==="userStory"&&(Y(Be),console.log("I am changing RTE editor values",Be)),[4,re(Se,Re,Z,null===(t=nt.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Y(e(e({},Be),{isDefaultEdit:!1})),Ee(function(t){return e(e({},t),{userStory:!1})}),Ye(!1),[2]}})})}}):!ne&&!oe&&Ve&&!1!==(null==st?void 0:st.showEditButton)&&l("button",e({className:k.iconButton,style:null==Ce?void 0:Ce.editButton,onClick:function(){return Ee(function(t){return e(e({},t),{userStory:!0})})}},{children:l(y,{color:null==Ce?void 0:Ce.pencilIconColor,size:16})})),at&&Ve&&!ne&&!oe&&!1!==(null==st?void 0:st.showEditButton)&&i("button",e({type:"button",className:k.addSectionButton,style:null==Ie?void 0:Ie.addSectionButton,onClick:function(t){var n,i,l;t.stopPropagation();var r=(null!==(i=null===(n=X.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,a={artifactId:E(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},X),{sub_features:o(o([],null!==(l=X.sub_features)&&void 0!==l?l:[],!0),[a],!1)});De(s),Y(s),ze(!0),Pe(a.title)},"aria-label":"Add section",title:"Add section"},{children:[l(h,{size:14}),l("span",e({className:k.addSectionLabel},{children:"Add Section"}))]})),!at&&!ne&&!oe&&l("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==me||me()},className:k.iconButton,style:null==Ie?void 0:Ie.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:l(p,{size:16})})),(null==st?void 0:st.actionItemsButton)&&i(r,{children:[l("span",e({className:k.actionItemBtn,style:null==Ce?void 0:Ce.actionItemBtn,onClick:function(e){e.stopPropagation(),Je(e.currentTarget)}},{children:l(S,{})})),l(D,e({id:"user-story-action-menu",anchorEl:Ze,open:!!Ze,onClose:it,style:null==Ce?void 0:Ce.userStoryShareMenu},{children:null==fe?void 0:fe.items.map(function(t,n){return l(x,e({style:null==Ce?void 0:Ce.userStoryMenuItem,onClick:function(){t.onclick(X),it()}},{children:i("div",e({className:k.menuItemContent,style:e(e({},null==Ce?void 0:Ce.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[l("span",e({className:k.menuItemIcon,style:null==Ce?void 0:Ce.menuItemIcon},{children:t.icon})),l("p",e({style:null==Ce?void 0:Ce.menuLabel},{children:t.name})),l("span",{className:k.menuItemRight,style:null==Ce?void 0:Ce.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),l("button",e({type:"button",onClick:function(e){e.stopPropagation(),lt()},style:null==Ce?void 0:Ce.chevronButton,className:k.chevronButton},{children:l(Ve?g:C,{className:k.chevronIcon,color:null==Ce?void 0:Ce.chevronIconColor})}))]}))]})),l("div",{className:k.divider,style:null==Ce?void 0:Ce.dividerStyle})]})),Ve&&l("div",e({className:k.cardContent,style:null==Ce?void 0:Ce.cardContentStyle},{children:i("div",e({className:k.contentInner,style:null==Ce?void 0:Ce.contentInner},{children:[i("div",e({className:k.descriptionSection,style:null==Ce?void 0:Ce.descriptionSection},{children:[l("div",{className:k.justifyBetween,style:null==Ce?void 0:Ce.justifyBetween}),Ue.userStory?l(P,{minHeight:"100%",height:"100%",type:"string",value:T(X.value)||"",handleUpdateState:function(t,n){var o=A(n);De(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Ue.userStory?"edit":"readOnly"}):l(H,{showUserStoryDiff:oe,isParent:""===$,message:T(X.value)||"",artifactId:X.artifactId,customStyles:we,isDisplayHighlightControl:se,contextVariant:ye})]})),null===(q=Be.sub_features)||void 0===q?void 0:q.map(function(t,n){var i=z(ue,!1,t.artifactId);return l(O,{artifactId:Z,isUserStoryCurrentlyUpdated:Q,artifactTitleId:"".concat(J,"-").concat(String.fromCharCode(65+n)),parentUserStory:X,parentIndex:"".concat($).concat($&&".").concat(ee),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var i=o([],X.sub_features||[],!0);i[t]=n,Y(e(e({},X),{sub_features:i}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:ne,showUserStoryDiff:oe,updateUserStoryArtifact:re,handleDownloadUserStory:ie,handleOpenSendDialog:le,isDisplayHighlightControl:se,elementDisplayConfig:ue,_resolvedConfig:i,actionItemsConfig:fe,onDelete:function(){return function(t){var n=(X.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},X),{sub_features:n});De(o),Y(o)}(n)}},t.artifactId)})]}))}))]}))},F=function(t){var n=t.artifactTitleIDs,a=t.isDiffEditReviewMode,s=t.showUserStoryDiff,u=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,d=t.artifactId,v=t.handleOpenSendDialog,f=t.handleDownloadUserStory,m=t.selectedArtifactId,y=t.isDisplayHighlightControl,h=t.elementDisplayConfig,p=t.showWrapper,S=t.actionItemsConfig,g=t.contextVariant,C=R(),b=C.userStory,N=C.setUserStory,B=C.customStyles,D=C.searchQueryList,x=C.currentHighlightIndex,U=C.setCurrentHighlightIndex;C.segmentComponentConfig;var E=null==B?void 0:B.userStoryCardStyles,T=0===x,A=x===D.length-1;return i("div",e({className:k.userStoryCardWrapper,style:y?e(e({},null==E?void 0:E.userStoryCardWrapper),{position:"relative"}):null==E?void 0:E.userStoryCardWrapper},{children:[y&&l(r,{children:D.length>0&&l("div",e({className:k.wrapper},{children:l("div",e({className:k.highlightNavigation},{children:i("div",e({className:k.navigationContainer},{children:[i("span",e({className:k.navCounter},{children:[x+1," of ",D.length]})),i("div",e({className:k.navButtons},{children:[l("button",e({onClick:function(){x>0&&U(function(e){return e-1})},className:k.navButton,disabled:T},{children:l(I,{size:20,className:k.navIcon})})),l("button",e({onClick:function(){x<D.length-1&&U(function(e){return e+1})},className:k.navButton,disabled:A},{children:l(w,{size:20,className:k.navIcon})}))]}))]}))}))}))}),b.map(function(e,t){var i=z(h,!0);return l(O,{isUserStoryCurrentlyUpdated:c,artifactId:d,artifactTitleId:n[t]||"",currentUserStory:e,onUserStoryChange:function(e){N(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:a,showUserStoryDiff:s,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:m,isDisplayHighlightControl:y,elementDisplayConfig:h,_resolvedConfig:i,showWrapper:p,actionItemsConfig:S,contextVariant:g},e.artifactId)})]}))};export{O as StoryCard,F as UserStoryCardWrapper,O as default,V as replaceLearnedTagsWithInfo};
2
2
  //# sourceMappingURL=UserStoryCard.js.map
@@ -17,7 +17,7 @@ export interface ElementDisplayConfig {
17
17
  }
18
18
  export interface ActionItem {
19
19
  name: string;
20
- onclick: () => void;
20
+ onclick: (currentUserStory: IUserStory) => void;
21
21
  icon: ReactNode;
22
22
  isActive: boolean;
23
23
  }
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.189",
3
+ "version": "0.0.190",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",