@e-llm-studio/requirement-ai 0.0.206 → 0.0.208

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  2. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  3. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  4. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  5. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  6. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
  7. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  8. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
  9. package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  10. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  11. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  12. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  13. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  14. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
  15. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  16. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
  17. package/dist/types/src/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.d.ts.map +1 -1
  18. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +10 -1
  19. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
  20. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +14 -2
  21. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  22. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +7 -1
  23. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
  24. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts +4 -1
  25. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts.map +1 -1
  26. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),n=require("react"),l=require("lucide-react"),o=require("@mui/material"),s=require("uuid"),t=require("../RiskSidebarCategorySection/RiskSidebarCategorySection.js"),a=require("../RiskCategorySection/RiskCategorySection.js"),d=require("./StoryNode.module.css.js"),r=function(i){var e,n,l,o,s,t,a,d=(null===(n=null===(e=i.display_items)||void 0===e?void 0:e.critical)||void 0===n?void 0:n.length)||0,c=(null===(o=null===(l=i.display_items)||void 0===l?void 0:l.warning)||void 0===o?void 0:o.length)||0,u=(null===(t=null===(s=i.display_items)||void 0===s?void 0:s.recommendation)||void 0===t?void 0:t.length)||0;if((null===(a=i.sub_feature)||void 0===a?void 0:a.length)>0)for(var v=0,g=i.sub_feature;v<g.length;v++){var m=g[v],h=r(m);d+=h.critical,c+=h.warning,u+=h.recommendation}return{critical:d,warning:c,recommendation:u}};function c(n,t,a,r){for(var c,u=[],v=/<learned>(.*?)<\/learned>/g,g=0,m=0,h=t||l.Info;null!==(c=v.exec(n));){c[0];var p=c[1],_=c.index;_>g&&u.push(e.jsx("span",{children:n.slice(g,_)},"text-pre-".concat(m++))),u.push(e.jsx(o.Tooltip,i.__assign({title:p,placement:"top"},{children:e.jsx(h,{size:r||16,className:d.default.infoIcon,style:{color:a,width:r,height:r}})}),"tooltip-".concat(s.v4()))),g=v.lastIndex}return g<(null==n?void 0:n.length)&&u.push(e.jsx("span",{children:n.slice(g)},"text-post-".concat(m++))),u}var u=function(s){var v,g,m,h,p,_,y,f,C,x,I,S,j,k,b,w,R,N,G,q,z,W,A,F,P=s.story,H=s.depth,M=void 0===H?0:H,T=s.onClickStoryNodeCallback,L=s.type,O=s.isProcessingGapItems,B=s.onClickAiReasoning,D=s.handleFixRisk,E=s.handleHighlightGapContent,J=s.customStyles,K=s.customIcons,Q=s.onSelectStory,U=s.rootArtifactId,V=void 0===U?P.id:U,X=n.useState(0===M),Y=X[0],Z=X[1],$=n.useState(!1),ii=$[0],ei=$[1],ni=null==J?void 0:J.storyNode,li=(null===(v=null==K?void 0:K.icons)||void 0===v?void 0:v.bookmarkIcon)||l.Bookmark,oi=(null===(g=null==K?void 0:K.icons)||void 0===g?void 0:g.chevronDownIcon)||l.ChevronDown,si=(null===(m=null==K?void 0:K.icons)||void 0===m?void 0:m.chevronRightIcon)||l.ChevronRight,ti=n.useMemo(function(){return P.display_items.critical.length>0?"Critical":P.display_items.warning.length>0?"Warning":P.display_items.recommendation.length>0?"Suggestion":null},[P.display_items,L]),ai=n.useMemo(function(){return r(P)},[P]),di=0===((null===(p=null===(h=P.display_items)||void 0===h?void 0:h.critical)||void 0===p?void 0:p.length)||0)+((null===(y=null===(_=P.display_items)||void 0===_?void 0:_.warning)||void 0===y?void 0:y.length)||0)+((null===(C=null===(f=P.display_items)||void 0===f?void 0:f.recommendation)||void 0===C?void 0:C.length)||0);return e.jsxs("div",i.__assign({className:"".concat(d.default.container," ").concat(M>0?d.default.nestedContainer:""),style:i.__assign(i.__assign({},null==ni?void 0:ni.container),M>0?null==ni?void 0:ni.nestedContainer:{})},{children:[e.jsxs("div",i.__assign({onClick:function(){Z(!Y),null==T||T(),null==Q||Q(V)},className:d.default.headerRow,style:i.__assign(i.__assign({},null==ni?void 0:ni.headerRow),ii?null==ni?void 0:ni.headerRowHover:{}),onMouseEnter:function(){return ei(!0)},onMouseLeave:function(){return ei(!1)}},{children:[e.jsx("div",i.__assign({className:d.default.chevronWrapper,style:null==ni?void 0:ni.chevronWrapper},{children:Y?e.jsx(oi,{className:d.default.chevronIcon,style:{color:null===(x=null==K?void 0:K.iconColors)||void 0===x?void 0:x.chevronIcon,width:null===(I=null==K?void 0:K.iconSizes)||void 0===I?void 0:I.chevronIcon,height:null===(S=null==K?void 0:K.iconSizes)||void 0===S?void 0:S.chevronIcon}}):e.jsx(si,{className:d.default.chevronIcon,style:{color:null===(j=null==K?void 0:K.iconColors)||void 0===j?void 0:j.chevronIcon,width:null===(k=null==K?void 0:K.iconSizes)||void 0===k?void 0:k.chevronIcon,height:null===(b=null==K?void 0:K.iconSizes)||void 0===b?void 0:b.chevronIcon}})})),e.jsxs("div",i.__assign({className:d.default.headerContent,style:null==ni?void 0:ni.headerContent},{children:[e.jsxs("div",i.__assign({className:d.default.artifactIdRow,style:null==ni?void 0:ni.artifactIdRow},{children:[e.jsx(li,{className:d.default.bookmarkIcon,style:{color:null===(w=null==K?void 0:K.iconColors)||void 0===w?void 0:w.bookmarkIcon,width:null===(R=null==K?void 0:K.iconSizes)||void 0===R?void 0:R.bookmarkIcon,height:null===(N=null==K?void 0:K.iconSizes)||void 0===N?void 0:N.bookmarkIcon}}),e.jsx("span",i.__assign({style:null==ni?void 0:ni.artifactIdText},{children:P.artifactTitleID}))]})),e.jsx(o.Tooltip,i.__assign({title:c(P.title,null===(G=null==K?void 0:K.icons)||void 0===G?void 0:G.infoIcon,null===(q=null==K?void 0:K.iconColors)||void 0===q?void 0:q.infoIcon,null===(z=null==K?void 0:K.iconSizes)||void 0===z?void 0:z.infoIcon),arrow:!0},{children:e.jsx("h3",i.__assign({className:d.default.title,style:i.__assign(i.__assign({},null==ni?void 0:ni.title),ii?null==ni?void 0:ni.titleHover:{})},{children:c(P.title,null===(W=null==K?void 0:K.icons)||void 0===W?void 0:W.infoIcon,null===(A=null==K?void 0:K.iconColors)||void 0===A?void 0:A.infoIcon,null===(F=null==K?void 0:K.iconSizes)||void 0===F?void 0:F.infoIcon)}))})),!Y&&e.jsx("div",i.__assign({className:d.default.collapsedSummary,style:null==ni?void 0:ni.collapsedSummary},{children:(0===M||ai.critical+ai.warning+ai.recommendation>0)&&e.jsxs(e.Fragment,{children:[e.jsx("span",i.__assign({className:d.default.summaryLabel,style:null==ni?void 0:ni.summaryLabel},{children:"Gap"===L?"Gaps : ":"Risks : "})),e.jsxs("div",i.__assign({className:d.default.summaryBadgesContainer,style:null==ni?void 0:ni.summaryBadgesContainer},{children:[ai.critical>0&&e.jsx(t.default,{title:"Critical",length:ai.critical,badgeColorClass:"critical",customStyles:J}),ai.warning>0&&e.jsx(t.default,{title:"Warning",length:ai.warning,badgeColorClass:"warning",customStyles:J}),ai.recommendation>0&&e.jsx(t.default,{title:"JAS",length:ai.recommendation,badgeColorClass:"suggestion",customStyles:J})]}))]})}))]}))]})),Y&&e.jsxs("div",i.__assign({className:d.default.expandedContent,style:null==ni?void 0:ni.expandedContent},{children:[e.jsx("div",i.__assign({className:d.default.expandedInnerPadding,style:null==ni?void 0:ni.expandedInnerPadding},{children:!di&&e.jsxs("div",i.__assign({className:d.default.itemsContainer,style:null==ni?void 0:ni.itemsContainer},{children:[e.jsx(a.default,{title:"Critical",items:P.display_items.critical,badgeColorClass:"critical",defaultOpen:"Critical"===ti,type:L,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K}),e.jsx(a.default,{title:"Warning",items:P.display_items.warning,badgeColorClass:"warning",defaultOpen:"Warning"===ti,type:L,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K}),e.jsx(a.default,{title:"Suggestion",items:P.display_items.recommendation,badgeColorClass:"suggestion",defaultOpen:"Suggestion"===ti,type:L,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K})]}))})),P.sub_feature&&P.sub_feature.length>0&&e.jsx("div",i.__assign({className:d.default.subFeaturesWrapper,style:null==ni?void 0:ni.subFeaturesWrapper},{children:P.sub_feature.map(function(i,n){return e.jsx(u,{story:i,depth:M+1,onClickStoryNodeCallback:T,type:L,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K,onSelectStory:Q,rootArtifactId:V},n)})}))]}))]}))};exports.default=u,exports.replaceLearnedTagsWithInfo=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),n=require("react"),l=require("lucide-react"),o=require("@mui/material"),s=require("uuid"),t=require("../RiskSidebarCategorySection/RiskSidebarCategorySection.js"),a=require("../RiskCategorySection/RiskCategorySection.js"),d=require("./StoryNode.module.css.js"),r=function(i){var e,n,l,o,s,t,a,d=(null===(n=null===(e=i.display_items)||void 0===e?void 0:e.critical)||void 0===n?void 0:n.length)||0,c=(null===(o=null===(l=i.display_items)||void 0===l?void 0:l.warning)||void 0===o?void 0:o.length)||0,u=(null===(t=null===(s=i.display_items)||void 0===s?void 0:s.recommendation)||void 0===t?void 0:t.length)||0;if((null===(a=i.sub_feature)||void 0===a?void 0:a.length)>0)for(var v=0,g=i.sub_feature;v<g.length;v++){var m=g[v],h=r(m);d+=h.critical,c+=h.warning,u+=h.recommendation}return{critical:d,warning:c,recommendation:u}};function c(n,t,a,r){for(var c,u=[],v=/<learned>(.*?)<\/learned>/g,g=0,m=0,h=t||l.Info;null!==(c=v.exec(n));){c[0];var p=c[1],y=c.index;y>g&&u.push(e.jsx("span",{children:n.slice(g,y)},"text-pre-".concat(m++))),u.push(e.jsx(o.Tooltip,i.__assign({title:p,placement:"top"},{children:e.jsx(h,{size:r||16,className:d.default.infoIcon,style:{color:a,width:r,height:r}})}),"tooltip-".concat(s.v4()))),g=v.lastIndex}return g<(null==n?void 0:n.length)&&u.push(e.jsx("span",{children:n.slice(g)},"text-post-".concat(m++))),u}var u=function(s){var v,g,m,h,p,y,_,f,C,x,I,S,j,k,b,w,N,R,G,q,z,F,W,A,P=s.story,H=s.depth,L=void 0===H?0:H,M=s.onClickStoryNodeCallback,T=s.type,O=s.isProcessingGapItems,B=s.onClickAiReasoning,D=s.handleFixRisk,E=s.handleHighlightGapContent,J=s.customStyles,K=s.customIcons,Q=s.onSelectStory,U=s.rootArtifactId,V=void 0===U?P.id:U,X=n.useState(0===L),Y=X[0],Z=X[1],$=n.useState(!1),ii=$[0],ei=$[1],ni=null==J?void 0:J.storyNode,li=(null===(v=null==K?void 0:K.icons)||void 0===v?void 0:v.bookmarkIcon)||l.Bookmark,oi=(null===(g=null==K?void 0:K.icons)||void 0===g?void 0:g.chevronDownIcon)||l.ChevronDown,si=(null===(m=null==K?void 0:K.icons)||void 0===m?void 0:m.chevronRightIcon)||l.ChevronRight,ti=n.useMemo(function(){return P.display_items.critical.length>0?"Critical":P.display_items.warning.length>0?"Warning":P.display_items.recommendation.length>0?"Suggestion":null},[P.display_items,T]),ai=n.useMemo(function(){return r(P)},[P]),di=0===((null===(p=null===(h=P.display_items)||void 0===h?void 0:h.critical)||void 0===p?void 0:p.length)||0)+((null===(_=null===(y=P.display_items)||void 0===y?void 0:y.warning)||void 0===_?void 0:_.length)||0)+((null===(C=null===(f=P.display_items)||void 0===f?void 0:f.recommendation)||void 0===C?void 0:C.length)||0);return e.jsxs("div",i.__assign({className:"".concat(d.default.container," ").concat(L>0?d.default.nestedContainer:""),style:i.__assign(i.__assign({},null==ni?void 0:ni.container),L>0?null==ni?void 0:ni.nestedContainer:{})},{children:[e.jsxs("div",i.__assign({onClick:function(){Z(!Y),null==M||M(),null==Q||Q(V)},className:d.default.headerRow,style:i.__assign(i.__assign({},null==ni?void 0:ni.headerRow),ii?null==ni?void 0:ni.headerRowHover:{}),onMouseEnter:function(){return ei(!0)},onMouseLeave:function(){return ei(!1)}},{children:[e.jsx("div",i.__assign({className:d.default.chevronWrapper,style:null==ni?void 0:ni.chevronWrapper},{children:Y?e.jsx(oi,{className:d.default.chevronIcon,style:{color:null===(x=null==K?void 0:K.iconColors)||void 0===x?void 0:x.chevronIcon,width:null===(I=null==K?void 0:K.iconSizes)||void 0===I?void 0:I.chevronIcon,height:null===(S=null==K?void 0:K.iconSizes)||void 0===S?void 0:S.chevronIcon}}):e.jsx(si,{className:d.default.chevronIcon,style:{color:null===(j=null==K?void 0:K.iconColors)||void 0===j?void 0:j.chevronIcon,width:null===(k=null==K?void 0:K.iconSizes)||void 0===k?void 0:k.chevronIcon,height:null===(b=null==K?void 0:K.iconSizes)||void 0===b?void 0:b.chevronIcon}})})),e.jsxs("div",i.__assign({className:d.default.headerContent,style:null==ni?void 0:ni.headerContent},{children:[e.jsxs("div",i.__assign({className:d.default.artifactIdRow,style:null==ni?void 0:ni.artifactIdRow},{children:[e.jsx(li,{className:d.default.bookmarkIcon,style:{color:null===(w=null==K?void 0:K.iconColors)||void 0===w?void 0:w.bookmarkIcon,width:null===(N=null==K?void 0:K.iconSizes)||void 0===N?void 0:N.bookmarkIcon,height:null===(R=null==K?void 0:K.iconSizes)||void 0===R?void 0:R.bookmarkIcon}}),e.jsx("span",i.__assign({style:null==ni?void 0:ni.artifactIdText},{children:P.artifactTitleID}))]})),e.jsx(o.Tooltip,i.__assign({title:c(P.title,null===(G=null==K?void 0:K.icons)||void 0===G?void 0:G.infoIcon,null===(q=null==K?void 0:K.iconColors)||void 0===q?void 0:q.infoIcon,null===(z=null==K?void 0:K.iconSizes)||void 0===z?void 0:z.infoIcon),arrow:!0},{children:e.jsx("h3",i.__assign({className:d.default.title,style:i.__assign(i.__assign({},null==ni?void 0:ni.title),ii?null==ni?void 0:ni.titleHover:{})},{children:c(P.title,null===(F=null==K?void 0:K.icons)||void 0===F?void 0:F.infoIcon,null===(W=null==K?void 0:K.iconColors)||void 0===W?void 0:W.infoIcon,null===(A=null==K?void 0:K.iconSizes)||void 0===A?void 0:A.infoIcon)}))})),!Y&&e.jsx("div",i.__assign({className:d.default.collapsedSummary,style:null==ni?void 0:ni.collapsedSummary},{children:(0===L||ai.critical+ai.warning+ai.recommendation>0)&&e.jsxs(e.Fragment,{children:[e.jsx("span",i.__assign({className:d.default.summaryLabel,style:null==ni?void 0:ni.summaryLabel},{children:"Gap"===T?"Gaps : ":"Risks : "})),e.jsxs("div",i.__assign({className:d.default.summaryBadgesContainer,style:null==ni?void 0:ni.summaryBadgesContainer},{children:[ai.critical>0&&e.jsx(t.default,{title:"Critical",length:ai.critical,badgeColorClass:"critical",customStyles:J}),ai.warning>0&&e.jsx(t.default,{title:"Warning",length:ai.warning,badgeColorClass:"warning",customStyles:J}),ai.recommendation>0&&e.jsx(t.default,{title:"JAS",length:ai.recommendation,badgeColorClass:"suggestion",customStyles:J})]}))]})}))]}))]})),Y&&e.jsxs("div",i.__assign({className:d.default.expandedContent,style:null==ni?void 0:ni.expandedContent},{children:[e.jsx("div",i.__assign({className:d.default.expandedInnerPadding,style:null==ni?void 0:ni.expandedInnerPadding},{children:di?L>0&&e.jsx("span",i.__assign({className:d.default.summaryLabel,style:null==ni?void 0:ni.summaryLabel},{children:"Gaps: No Gaps Found"})):e.jsxs("div",i.__assign({className:d.default.itemsContainer,style:null==ni?void 0:ni.itemsContainer},{children:[e.jsx(a.default,{title:"Critical",items:P.display_items.critical,badgeColorClass:"critical",defaultOpen:"Critical"===ti,type:T,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K}),e.jsx(a.default,{title:"Warning",items:P.display_items.warning,badgeColorClass:"warning",defaultOpen:"Warning"===ti,type:T,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K}),e.jsx(a.default,{title:"Suggestion",items:P.display_items.recommendation,badgeColorClass:"suggestion",defaultOpen:"Suggestion"===ti,type:T,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K})]}))})),P.sub_feature&&P.sub_feature.length>0&&e.jsx("div",i.__assign({className:d.default.subFeaturesWrapper,style:null==ni?void 0:ni.subFeaturesWrapper},{children:P.sub_feature.map(function(i,n){return e.jsx(u,{story:i,depth:L+1,onClickStoryNodeCallback:M,type:T,isProcessingGapItems:O,onClickAiReasoning:B,handleFixRisk:D,handleHighlightGapContent:E,customStyles:J,customIcons:K,onSelectStory:Q,rootArtifactId:V},n)})}))]}))]}))};exports.default=u,exports.replaceLearnedTagsWithInfo=c;
2
2
  //# sourceMappingURL=StoryNode.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),r=require("../../store/ref.context.js");exports.SectionStatus=void 0,(e=exports.SectionStatus||(exports.SectionStatus={})).WAITING="waiting",e.IN_PROGRESS="in_progress",e.GENERATED="generated",e.FAILED="failed",e.GENERATE="generate";var o=i.createContext(null);exports.default=function(e){var s=e.children,a=e.userStory,u=e.setUserStory,c=e.aiReasoning,g=e.setAiReasoning,f=e.citations,d=e.setCitations,l=e.apiCachingConfig,C=e.customStyles,h=e.customIcons,p=e.searchQueryList,S=e.searchQueryReasoningIdList,m=e.citationConfig,v=e.chatHistory,x=e.chatCitationConfigs,y=e.gptCitationConfigs,I=e.diffEditConfig,R=e.aiReasoningAccordionOpenStates,A=e.persistedDataFiles,E=e.inlineUpdateComponentConfig,_=e.segmentComponentConfig,q=e.sectionStatusConfig,N=e.customSectionConfig,b=i.useState(0),j=b[0],L=b[1],w=i.useMemo(function(){if(0===a.length||0===c.length)return Array(a.length).fill(0);var e=Array.from({length:a.length},function(){return[]});return c.forEach(function(t){var n=Number(t.relevance_score);if(!(isNaN(n)||n<=0)){var i="ai_reasoning$".concat(t.id),r=a.findIndex(function(e){var t;return e.value.includes(i)||(null===(t=e.sub_features)||void 0===t?void 0:t.some(function(e){return e.value.includes(i)}))});-1!==r&&e[r].push(n)}}),e.map(function(e){return 0===e.length?0:Math.round(e.reduce(function(e,t){return e+t},0)/e.length)})},[a,c]),D=i.useCallback(function(e){var t,n=a.findIndex(function(t){return t.artifactId===e});return-1===n?0:null!==(t=w[n])&&void 0!==t?t:0},[a,w]);return n.jsx(o.Provider,t.__assign({value:{chatHistory:v,userStory:a,setUserStory:u,aiReasoning:c,setAiReasoning:g,citations:f,setCitations:d,apiCachingConfig:l,customStyles:C,customIcons:h,searchQueryList:p,searchQueryReasoningIdList:S,citationConfig:m,getAvgScoreForStory:D,chatCitationConfigs:x,gptCitationConfigs:y,diffEditConfig:I,aiReasoningAccordionOpenStates:R,persistedDataFiles:A,currentHighlightIndex:j,setCurrentHighlightIndex:L,inlineUpdateComponentConfig:E,segmentComponentConfig:_,sectionStatusConfig:q,customSectionConfig:N}},{children:n.jsx(r.RefProvider,{children:s})}))},exports.useRequirementAI=function(){var e=i.useContext(o);if(!e)throw new Error("useRequirementAI must be used within RequirementAIWrapper");return e};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),r=require("../../store/ref.context.js");exports.SectionStatus=void 0,(e=exports.SectionStatus||(exports.SectionStatus={})).WAITING="waiting",e.IN_PROGRESS="in_progress",e.GENERATED="generated",e.FAILED="failed",e.GENERATE="generate",e.APPROVED="approved";var o=i.createContext(null);exports.default=function(e){var s=e.children,a=e.userStory,u=e.setUserStory,c=e.aiReasoning,g=e.setAiReasoning,f=e.citations,d=e.setCitations,l=e.apiCachingConfig,C=e.customStyles,h=e.customIcons,p=e.searchQueryList,S=e.searchQueryReasoningIdList,m=e.citationConfig,v=e.chatHistory,R=e.chatCitationConfigs,x=e.gptCitationConfigs,y=e.diffEditConfig,I=e.aiReasoningAccordionOpenStates,A=e.persistedDataFiles,E=e.inlineUpdateComponentConfig,_=e.segmentComponentConfig,q=e.sectionStatusConfig,N=e.customSectionConfig,b=i.useState(0),P=b[0],j=b[1],D=i.useMemo(function(){if(0===a.length||0===c.length)return Array(a.length).fill(0);var e=Array.from({length:a.length},function(){return[]});return c.forEach(function(t){var n=Number(t.relevance_score);if(!(isNaN(n)||n<=0)){var i="ai_reasoning$".concat(t.id),r=a.findIndex(function(e){var t;return e.value.includes(i)||(null===(t=e.sub_features)||void 0===t?void 0:t.some(function(e){return e.value.includes(i)}))});-1!==r&&e[r].push(n)}}),e.map(function(e){return 0===e.length?0:Math.round(e.reduce(function(e,t){return e+t},0)/e.length)})},[a,c]),L=i.useCallback(function(e){var t,n=a.findIndex(function(t){return t.artifactId===e});return-1===n?0:null!==(t=D[n])&&void 0!==t?t:0},[a,D]);return n.jsx(o.Provider,t.__assign({value:{chatHistory:v,userStory:a,setUserStory:u,aiReasoning:c,setAiReasoning:g,citations:f,setCitations:d,apiCachingConfig:l,customStyles:C,customIcons:h,searchQueryList:p,searchQueryReasoningIdList:S,citationConfig:m,getAvgScoreForStory:L,chatCitationConfigs:R,gptCitationConfigs:x,diffEditConfig:y,aiReasoningAccordionOpenStates:I,persistedDataFiles:A,currentHighlightIndex:P,setCurrentHighlightIndex:j,inlineUpdateComponentConfig:E,segmentComponentConfig:_,sectionStatusConfig:q,customSectionConfig:N}},{children:n.jsx(r.RefProvider,{children:s})}))},exports.useRequirementAI=function(){var e=i.useContext(o);if(!e)throw new Error("useRequirementAI must be used within RequirementAIWrapper");return e};
2
2
  //# sourceMappingURL=RequirementAIWrapper.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"),i=require("lucide-react"),s=require("showdown"),l=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),u=require("../../utils/helpers.js"),d=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),_=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js"),h=require("./TitleEditor/TitleEditor.js"),p=require("./ClinicalTrialSection.js"),y=require("../story-screen/CompletionPanel.js"),m=require("../../icons/CDIcon.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x,C=S(s),j=((x={})[_.SectionStatus.WAITING]="WAITING TO GENERATE",x[_.SectionStatus.IN_PROGRESS]="IN PROGRESS",x[_.SectionStatus.GENERATED]="GENERATED",x[_.SectionStatus.FAILED]="FAILED",x[_.SectionStatus.GENERATE]="GENERATE",x);function I(n){for(var s,o=[],r=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(s=r.exec(n));){var c=s[1],v=s.index;v>u&&o.push(t.jsx("span",{children:n.slice(u,v)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(i.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(a.v4()))),u=r.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function w(t,n,i){var s;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return i&&(null===(s=t.subFeatureOverrides)||void 0===s?void 0:s[i])?e.__assign(e.__assign({},l),t.subFeatureOverrides[i]):l}var N=function(n){var s,l=n.displayName,o=_.useRequirementAI().customStyles,a=null===(s=null==o?void 0:o.userStoryCardStyles)||void 0===s?void 0:s.showDisplayName;return t.jsxs("div",e.__assign({className:r.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(i.Bookmark,{className:r.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},b=function(s){var S,x,E,D,B,T,A,k,U,R,P,M,q,L,F,W,G,H,z,O,V=s.isUserStoryCurrentlyUpdated,Q=s.artifactId,X=s.artifactTitleId,Z=s.parentUserStory,J=s.currentUserStory,K=s.onUserStoryChange,Y=s.parentIndex,$=s.currentIndex,ee=s.enableDownload,te=s.isDiffEditReviewMode,ne=s.showUserStoryDiff,ie=s.handleDownloadUserStory,se=s.handleOpenSendDialog,le=s.updateUserStoryArtifact,oe=s.selectedArtifactId,ae=s.isDisplayHighlightControl,re=s.elementDisplayConfig,ue=s._resolvedConfig,de=s.showWrapper,ce=void 0!==de&&de,ve=s.defaultExpanded,fe=s.actionItemsConfig,_e=s.onDelete,ge=s.contextVariant,he=s.expandedSubFeatures,pe=s.showDisplayName,ye=void 0===pe||pe,me=s.allowTitleEdit,Se=void 0===me||me,xe=s.showConfidenceScore,Ce=void 0===xe||xe,je=s.showBorderTop,Ie=void 0===je||je,we=s.sectionStatusConfig,Ne=s.showCompletionPanel,be=void 0!==Ne&&Ne,Ee=s.showAddSectionButton,De=void 0!==Ee&&Ee,Be=null!=we?we:{},Te=Be.isLoadingSectionData,Ae=void 0!==Te&&Te,ke=Be.onLoadSectionData,Ue=Be.status,Re=Be.onStatusClick,Pe=Be.completedCount,Me=Be.totalCount,qe=Be.isNoDataAvailable,Le=void 0!==qe&&qe,Fe=_.useRequirementAI(),We=Fe.searchQueryList,Ge=Fe.citations,He=Fe.customStyles,ze=Fe.customSectionConfig,Oe=null==He?void 0:He.userStoryCardStyles,Ve=null==Oe?void 0:Oe.statusStyles,Qe=null===(x=null==He?void 0:He.userStoryCardStyles)||void 0===x?void 0:x.userStoryEditStyles,Xe=null===(E=null==He?void 0:He.userStoryScreenStyles)||void 0===E?void 0:E.userStoryContentStyles,Ze=null==Oe?void 0:Oe.progressHeaderStyles,Je=null==Oe?void 0:Oe.clinicalTrialSectionStyles,Ke=null==Oe?void 0:Oe.CompletionStyles,Ye=null==Oe?void 0:Oe.noDataStyles,$e=null!==(B=null===(D=null==ze?void 0:ze.shouldRender)||void 0===D?void 0:D.call(ze,J))&&void 0!==B&&B,et=null===(T=null==ze?void 0:ze.getValue)||void 0===T?void 0:T.call(ze,J),tt=null!==(k=null===(A=null==ze?void 0:ze.getFields)||void 0===A?void 0:A.call(ze,J))&&void 0!==k?k:[],nt=null!==(R=null===(U=null==ze?void 0:ze.isSaving)||void 0===U?void 0:U.call(ze,J))&&void 0!==R&&R,it=(z=null!==(P=J.completion_percentage)&&void 0!==P?P:0,O=Ke,z>=80?null==O?void 0:O.highCompletion:z>=50?null==O?void 0:O.mediumCompletion:null==O?void 0:O.lowCompletion),st=((S={})[_.SectionStatus.WAITING]=null==Ve?void 0:Ve.waiting,S[_.SectionStatus.IN_PROGRESS]=null==Ve?void 0:Ve.inProgress,S[_.SectionStatus.GENERATED]=null==Ve?void 0:Ve.generated,S[_.SectionStatus.FAILED]=null==Ve?void 0:Ve.failed,S[_.SectionStatus.GENERATE]=null==Ve?void 0:Ve.generate,S),lt=n.useState(e.__assign(e.__assign({},structuredClone(J)),{value:u.formatMarkdown(J.value)||""})),ot=lt[0],at=lt[1],rt=n.useState({userStory:!!J.isDefaultEdit}),ut=rt[0],dt=rt[1],ct=n.useState(!1),vt=ct[0],ft=ct[1],_t=n.useState(!1),gt=_t[0],ht=_t[1],pt=n.useState(null),yt=pt[0],mt=pt[1],St=n.useState(null),xt=St[0],Ct=St[1],jt=_.useRequirementAI(),It=jt.userStory,wt=jt.customIcons,Nt=n.useState(null!=ve?ve:""===Y||oe===J.artifactId||!!J.isDefaultOpen),bt=Nt[0],Et=Nt[1],Dt=n.useState(!1);Dt[0];var Bt=Dt[1],Tt=n.useState(null),At=Tt[0],kt=Tt[1],Ut=n.useState(null),Rt=Ut[0],Pt=Ut[1],Mt=n.useState(!1),qt=Mt[0],Lt=Mt[1],Ft=n.useRef(null),Wt=n.useState(!1);Wt[0];var Gt=Wt[1],Ht=n.useState(!1),zt=Ht[0],Ot=Ht[1],Vt=n.useRef(null);n.useEffect(function(){V&&Et(V)},[V]),n.useEffect(function(){at(e.__assign(e.__assign({},structuredClone(J)),{value:u.formatMarkdown(J.value)||""}))},[J]),n.useEffect(function(){We.length>0?Et(!0):void 0===ve&&(oe?Et(oe===J.artifactId):he&&he.length>0&&Et(he.includes(J.artifactId)))},[We,oe,J.artifactId,he]);var Qt=function(){kt(null)},Xt=function(){Pt(null)},Zt=function(){Et(function(e){return!e})};var Jt=null!=(null==J?void 0:J.big_enough)&&!Number.isNaN(J.big_enough)&&!!(null==J?void 0:J.big_enough_decision_factors),Kt=null!==(M=null==J?void 0:J.completion_percentage)&&void 0!==M?M:0,Yt=!!(null==J?void 0:J.completion_decision_factors),$t=""===Y,en=null!=ue?ue:w(re,$t),tn=!te&&!ne;return n.useEffect(function(){if(xt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(xt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[xt]),n.useEffect(function(){J.isDefaultEdit&&dt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[J.isDefaultEdit]),t.jsxs("div",e.__assign({className:r.default.card,style:null==Oe?void 0:Oe.cardStyle,id:"story-card-".concat(J.title),"data-expanded":bt},{children:[t.jsxs("div",e.__assign({className:r.default.titleSection,style:null==Oe?void 0:Oe.titleSection},{children:[t.jsxs("div",e.__assign({className:r.default.titleRow,style:null==Oe?void 0:Oe.titleRow,onClick:Zt},{children:[t.jsxs("div",e.__assign({className:r.default.titleLeft,style:null==Oe?void 0:Oe.titleLeft,onMouseEnter:function(){return Gt(!0)},onMouseLeave:function(){return Gt(!1)}},{children:[ye&&t.jsx(N,{displayName:X}),vt&&tn?t.jsx(h.InlineTitleEditor,{title:J.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var i,s;return e.__generator(this,function(l){try{i=e.__assign({},J),J.artifactId===n?i.title=t:i.sub_features=(null===(s=J.sub_features)||void 0===s?void 0:s.map(function(i){return i.artifactId===n?e.__assign(e.__assign({},i),{title:t}):i}))||[],at(i),K(i),ft(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,J.artifactId)},onCancel:function(){ft(!1)},inputStyle:null==Qe?void 0:Qe.inlineTitleInput,confirmButtonStyle:null==Qe?void 0:Qe.inlineTitleConfirm,cancelButtonStyle:null==Qe?void 0:Qe.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:r.default.storyTitleWrapper},{children:[t.jsx("h2",e.__assign({title:J.title,className:r.default.storyTitle,style:null==Oe?void 0:Oe.storyTitle},{children:I(J.title)}),J.artifactId),be&&!$e&&(Yt?t.jsx(y.CompletionPanel,e.__assign({customIcons:null==wt?void 0:wt.userStoryIcons,customStyles:null==Oe?void 0:Oe.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==Oe?void 0:Oe.CompletionStyles,onToggleStateChange:Ot},{children:t.jsxs("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ke?void 0:Ke.badge),it)},{children:[t.jsxs("span",{children:[Kt,"% Completed"]}),t.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:t.jsx(m.default,{color:"currentColor"})})),zt?t.jsx(i.ChevronUp,{size:14,style:null==Ke?void 0:Ke.chevronStyle}):t.jsx(i.ChevronDown,{size:14,style:null==Ke?void 0:Ke.chevronStyle})]}))})):t.jsx("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==Ke?void 0:Ke.badge),it)},{children:t.jsxs("span",{children:[Kt,"% Completed"]})}))),Se&&t.jsx("button",e.__assign({type:"button",className:r.default.titleEditButton,style:null==Qe?void 0:Qe.titleEditButton,onClick:function(e){e.stopPropagation(),ft(!0),bt||Et(!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"})}))}))]}))]})),(Ue||void 0!==Pe&&void 0!==Me)&&t.jsxs("div",e.__assign({className:r.default.statusContainer},{children:[void 0!==Pe&&void 0!==Me&&t.jsxs("div",e.__assign({className:r.default.completedBadge},{children:["Completed: ",Pe,"/",Me]})),Ue&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==Re||Re()},className:r.default.statusButton,style:st[Ue]},{children:j[Ue]}))]})),t.jsxs("div",e.__assign({className:r.default.titleActions,style:null==Oe?void 0:Oe.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(en.showProgressPercentage||en.showGapBox)&&ce&&t.jsxs("div",e.__assign({className:r.default.progressHeader,style:null==Ze?void 0:Ze.wrapper},{children:[en.showProgressPercentage&&t.jsxs("div",e.__assign({className:r.default.progressPercentage,style:null==Ze?void 0:Ze.percentage},{children:[null!==(L=null!==(q=null==J?void 0:J.confidenceScore)&&void 0!==q?q:null==en?void 0:en.confidenceValue)&&void 0!==L?L:"0","%"]})),en.showGapBox&&t.jsxs("div",e.__assign({className:r.default.gapBox,style:null==Ze?void 0:Ze.gapBox},{children:[null!==(W=null!==(F=null==J?void 0:J.gapValue)&&void 0!==F?F:null==en?void 0:en.gapBoxValue)&&void 0!==W?W:"2"," ","Gaps"]}))]})),Jt&&t.jsx(g.BigEnoughPanel,{customIcons:null==wt?void 0:wt.userStoryIcons,customStyles:null==Oe?void 0:Oe.aiReasoningCitaionStyles,currentUserStory:J,panelStyles:null==Oe?void 0:Oe.BigEnoughStyles}),!ut.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==en?void 0:en.showShareButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Oe?void 0:Oe.iconButton,onClick:function(e){kt(e.currentTarget)}},{children:t.jsx(i.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:At,open:!!At,onClose:function(){return kt(null)},style:null==Oe?void 0:Oe.userStoryShareMenu},{children:[ee&&t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.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 Bt(!0),ie?[4,Promise.all([ie("pdf"),ie("doc")])]:[2];case 1:return e.sent(),Bt(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Ft,className:r.default.menuItemContent,style:null==Oe?void 0:Oe.menuItemContent},{children:[t.jsx(i.Download,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=J,Z&&(t=e.__assign(e.__assign({},J),{value:"".concat(d.replaceTitleSection(null==Z?void 0:Z.value,J.title)," \n").concat(J.value)})),null==se||se(!0,[t],J.artifactId),Qt(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==Oe?void 0:Oe.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Share2,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,i,s,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new C.default.Converter,n=t.makeHtml(u.formatMarkdown(J.value)||J.value),i=function(e){var t=(new C.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(u.formatMarkdown(J.value)||J.value),s=new ClipboardItem({"text/plain":new Blob([i],{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([s])];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 Qt(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==Oe?void 0:Oe.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Copy,{size:16,color:null==Oe?void 0:Oe.menuIconColor}),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:"Copy"}))]}))}))]}))]}),ut.userStory&&bt?t.jsx(c.default,{type:"outline",children:"Cancel",style:null==Oe?void 0:Oe.cancelButton,onClick:function(){var t;null===(t=Vt.current)||void 0===t||t.abort(),dt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),ut.userStory&&bt?t.jsx(c.default,{type:"fill",children:qt?t.jsxs("span",e.__assign({className:r.default.savingSpinner,style:null==Oe?void 0:Oe.savingSpinner},{children:[t.jsx(i.LoaderCircle,{className:r.default.spinAnimation,style:null==Oe?void 0:Oe.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:qt,style:qt?null==Oe?void 0:Oe.savingButton:null==Oe?void 0:Oe.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 Lt(!0),"userStory"==="userStory"&&(K(ot),console.log("I am changing RTE editor values",ot)),[4,le(Ge,It,Q,null===(t=Vt.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),K(e.__assign(e.__assign({},ot),{isDefaultEdit:!1})),dt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Lt(!1),[2]}})})}}):!te&&!ne&&bt&&!1!==(null==en?void 0:en.showEditButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Oe?void 0:Oe.editButton,onClick:function(){return dt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(i.PencilIcon,{color:null==Oe?void 0:Oe.pencilIconColor,size:16})})),De&&$t&&bt&&!te&&!ne&&!1!==(null==en?void 0:en.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:r.default.addSectionButton,style:null==Qe?void 0:Qe.addSectionButton,onClick:function(t){var n,i,s;t.stopPropagation();var l=(null!==(i=null===(n=J.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,o={artifactId:a.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},r=e.__assign(e.__assign({},J),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(s=J.sub_features)&&void 0!==s?s:[],!0),[o],!1)});at(r),K(r),Et(!0),Ct(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(i.Plus,{size:14}),t.jsx("span",e.__assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!$t&&!te&&!ne&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==_e||_e()},className:r.default.iconButton,style:null==Qe?void 0:Qe.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(i.Trash2,{size:16})})),$e&&t.jsx("button",e.__assign({type:"button",className:r.default.iconButton,onClick:function(e){if(e.stopPropagation(),gt)return mt(null),void ht(!1);mt(structuredClone(null!=et?et:{})),Et(!0),ht(!0)}},{children:gt?t.jsx(i.X,{size:16,color:null==Oe?void 0:Oe.pencilIconColor}):t.jsx(i.PencilIcon,{size:16,color:null==Oe?void 0:Oe.pencilIconColor})})),(null==en?void 0:en.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:r.default.actionItemBtn,style:null==Oe?void 0:Oe.actionItemBtn,onClick:function(e){e.stopPropagation(),Pt(e.currentTarget)}},{children:t.jsx(i.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:Rt,open:!!Rt,onClose:Xt,style:null==Oe?void 0:Oe.userStoryShareMenu},{children:null==fe?void 0:fe.items.map(function(n,i){return t.jsx(l.MenuItem,e.__assign({style:null==Oe?void 0:Oe.userStoryMenuItem,onClick:function(){n.onclick(J),Xt()}},{children:t.jsxs("div",e.__assign({className:r.default.menuItemContent,style:e.__assign(e.__assign({},null==Oe?void 0:Oe.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:r.default.menuItemIcon,style:null==Oe?void 0:Oe.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==Oe?void 0:Oe.menuLabel},{children:n.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==Oe?void 0:Oe.menuItemRight})]}))}),"action-item-".concat(i,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Zt()},style:null==Oe?void 0:Oe.chevronButton,className:r.default.chevronButton},{children:bt?t.jsx(i.ChevronUp,{className:r.default.chevronIcon,color:null==Oe?void 0:Oe.chevronIconColor}):t.jsx(i.ChevronDown,{className:r.default.chevronIcon,color:null==Oe?void 0:Oe.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==Oe?void 0:Oe.dividerStyle})]})),bt&&t.jsx("div",e.__assign({className:r.default.cardContent,style:e.__assign(e.__assign({},null==Oe?void 0:Oe.cardContentStyle),{borderTop:Ie?"1px solid #E5E5E5":"none"})},{children:Ae?t.jsxs("div",e.__assign({className:r.default.loadingContainer},{children:[t.jsx("div",e.__assign({className:r.default.loadingIconWrapper},{children:t.jsx(i.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),t.jsxs("div",{children:[t.jsx("h3",e.__assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),t.jsx("p",e.__assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(){return null==ke?void 0:ke()},className:r.default.viewStatusButton},{children:"View Status"}))]})):Le?t.jsxs("div",e.__assign({className:r.default.noDataContainer,style:null==Ye?void 0:Ye.container},{children:[t.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration,style:null==Ye?void 0:Ye.illustration}),t.jsx("h3",e.__assign({className:r.default.noDataTitle,style:null==Ye?void 0:Ye.title},{children:"No Data Available for This Section"})),t.jsx("p",e.__assign({className:r.default.noDataSubtitle,style:null==Ye?void 0:Ye.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",e.__assign({className:r.default.contentInner,style:null==Oe?void 0:Oe.contentInner},{children:[t.jsxs("div",e.__assign({className:r.default.descriptionSection,style:null==Oe?void 0:Oe.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==Oe?void 0:Oe.justifyBetween}),ut.userStory?t.jsx(v.default,{minHeight:"100%",height:"100%",type:"string",value:u.formatMarkdown(J.value)||"",handleUpdateState:function(t,n){var i=u.indentMarkdown(n);at(function(t){return e.__assign(e.__assign({},t),{value:i||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ut.userStory?"edit":"readOnly"}):$e?t.jsx(p.default,{styles:Je,fields:tt,readonly:!gt,isSaving:nt,value:null!==(G=null!=yt?yt:et)&&void 0!==G?G:{},onChange:mt,onSave:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return yt?[4,null===(t=null==ze?void 0:ze.onSave)||void 0===t?void 0:t.call(ze,J,yt)]:[2];case 1:return e.sent(),mt(null),ht(!1),[2]}})})},onCancel:function(){mt(null),ht(!1)}}):t.jsx(f.default,{showUserStoryDiff:ne,isParent:""===Y,message:u.formatMarkdown(J.value)||"",artifactId:J.artifactId,customStyles:Xe,isDisplayHighlightControl:ae,contextVariant:ge,showConfidenceScore:Ce})]})),null===(H=ot.sub_features)||void 0===H?void 0:H.map(function(n,i){var s=w(re,!1,n.artifactId);return t.jsx(b,{artifactId:Q,isUserStoryCurrentlyUpdated:V,artifactTitleId:"".concat(X,"-").concat(String.fromCharCode(65+i)),parentUserStory:J,parentIndex:"".concat(Y).concat(Y&&".").concat($),currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var i=e.__spreadArray([],J.sub_features||[],!0);i[t]=n,K(e.__assign(e.__assign({},J),{sub_features:i}))}(i,t)},enableDownload:!0,isDiffEditReviewMode:te,showUserStoryDiff:ne,updateUserStoryArtifact:le,handleDownloadUserStory:ie,handleOpenSendDialog:se,isDisplayHighlightControl:ae,elementDisplayConfig:re,_resolvedConfig:s,actionItemsConfig:fe,onDelete:function(){return function(t){var n=(J.sub_features||[]).filter(function(e,n){return n!==t}),i=e.__assign(e.__assign({},J),{sub_features:n});at(i),K(i)}(i)},expandedSubFeatures:he},n.artifactId)})]}))}))]}))};exports.StoryCard=b,exports.UserStoryCardWrapper=function(n){var s=n.artifactTitleIDs,l=n.expandedSubFeatures,o=n.isDiffEditReviewMode,a=n.showUserStoryDiff,u=n.updateUserStoryArtifact,d=n.isUserStoryCurrentlyUpdated,c=n.artifactId,v=n.handleOpenSendDialog,f=n.handleDownloadUserStory,g=n.selectedArtifactId,h=n.isDisplayHighlightControl,p=n.elementDisplayConfig,y=n.showWrapper,m=n.actionItemsConfig,S=n.contextVariant,x=n.showDisplayName,C=n.allowTitleEdit,j=n.showConfidenceScore,I=n.showBorderTop,N=n.defaultExpanded,E=n.showCompletionPanel,D=void 0!==E&&E,B=n.showAddSectionButton,T=void 0!==B&&B,A=_.useRequirementAI(),k=A.userStory,U=A.setUserStory,R=A.customStyles,P=A.searchQueryList,M=A.currentHighlightIndex,q=A.setCurrentHighlightIndex;A.segmentComponentConfig;var L=A.sectionStatusConfig,F=null==R?void 0:R.userStoryCardStyles,W=0===M,G=M===P.length-1;return t.jsxs("div",e.__assign({className:r.default.userStoryCardWrapper,style:h?e.__assign(e.__assign({},null==F?void 0:F.userStoryCardWrapper),{position:"relative"}):null==F?void 0:F.userStoryCardWrapper},{children:[h&&t.jsx(t.Fragment,{children:P.length>0&&t.jsx("div",e.__assign({className:r.default.wrapper},{children:t.jsx("div",e.__assign({className:r.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:r.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:r.default.navCounter},{children:[M+1," of ",P.length]})),t.jsxs("div",e.__assign({className:r.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){M>0&&q(function(e){return e-1})},className:r.default.navButton,disabled:W},{children:t.jsx(i.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){M<P.length-1&&q(function(e){return e+1})},className:r.default.navButton,disabled:G},{children:t.jsx(i.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),k.map(function(n,i){var r=w(p,!0);return t.jsx(b,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:s[i]||"",expandedSubFeatures:l,currentUserStory:n,onUserStoryChange:function(t){U(function(n){return n[i]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:a,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:g,isDisplayHighlightControl:h,elementDisplayConfig:p,_resolvedConfig:r,showWrapper:y,defaultExpanded:N,actionItemsConfig:m,contextVariant:S,showDisplayName:x,allowTitleEdit:C,showConfidenceScore:j,showBorderTop:I,sectionStatusConfig:L,showCompletionPanel:D,showAddSectionButton:T},n.artifactId)})]}))},exports.default=b,exports.replaceLearnedTagsWithInfo=I;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react"),s=require("showdown"),l=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),u=require("../../utils/helpers.js"),d=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),_=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js"),p=require("./TitleEditor/TitleEditor.js"),h=require("./ClinicalTrialSection.js"),y=require("../story-screen/CompletionPanel.js"),m=require("../../icons/CDIcon.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x,C=S(s),j=((x={})[_.SectionStatus.WAITING]="WAITING TO GENERATE",x[_.SectionStatus.IN_PROGRESS]="IN PROGRESS",x[_.SectionStatus.GENERATED]="GENERATED",x[_.SectionStatus.FAILED]="FAILED",x[_.SectionStatus.GENERATE]="GENERATE",x[_.SectionStatus.APPROVED]="APPROVED",x);function I(n){for(var s,o=[],r=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(s=r.exec(n));){var c=s[1],v=s.index;v>u&&o.push(t.jsx("span",{children:n.slice(u,v)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(i.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(a.v4()))),u=r.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function w(t,n,i){var s;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return i&&(null===(s=t.subFeatureOverrides)||void 0===s?void 0:s[i])?e.__assign(e.__assign({},l),t.subFeatureOverrides[i]):l}var N=function(n){var s,l=n.displayName,o=_.useRequirementAI().customStyles,a=null===(s=null==o?void 0:o.userStoryCardStyles)||void 0===s?void 0:s.showDisplayName;return t.jsxs("div",e.__assign({className:r.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(i.Bookmark,{className:r.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},b=function(s){var S,x,E,D,B,T,A,k,P,U,R,M,q,L,F,z,O,V,W,G,H,Q=s.isUserStoryCurrentlyUpdated,X=s.artifactId,Z=s.artifactTitleId,J=s.parentUserStory,K=s.currentUserStory,Y=s.onUserStoryChange,$=s.parentIndex,ee=s.currentIndex,te=s.enableDownload,ne=s.isDiffEditReviewMode,ie=s.showUserStoryDiff,se=s.handleDownloadUserStory,le=s.handleOpenSendDialog,oe=s.updateUserStoryArtifact,ae=s.selectedArtifactId,re=s.isDisplayHighlightControl,ue=s.elementDisplayConfig,de=s._resolvedConfig,ce=s.showWrapper,ve=void 0!==ce&&ce,fe=s.defaultExpanded,_e=s.actionItemsConfig,ge=s.onDelete,pe=s.contextVariant,he=s.expandedSubFeatures,ye=s.showDisplayName,me=void 0===ye||ye,Se=s.allowTitleEdit,xe=void 0===Se||Se,Ce=s.showConfidenceScore,je=void 0===Ce||Ce,Ie=s.showBorderTop,we=void 0===Ie||Ie,Ne=s.sectionStatusConfig,be=s.showCompletionPanel,Ee=void 0!==be&&be,De=s.showAddSectionButton,Be=void 0!==De&&De,Te=s.disableEditPlan,Ae=void 0!==Te&&Te,ke=s.useMuiTooltip,Pe=void 0!==ke&&ke,Ue=s.approveButtonConfig,Re=null!=Ne?Ne:{},Me=Re.isLoadingSectionData,qe=void 0!==Me&&Me,Le=Re.onLoadSectionData,Fe=Re.status,ze=Re.onStatusClick,Oe=Re.completedCount,Ve=Re.totalCount,We=Re.isNoDataAvailable,Ge=void 0!==We&&We,He=_.useRequirementAI(),Qe=He.searchQueryList,Xe=He.citations,Ze=He.customStyles,Je=He.customSectionConfig,Ke=null==Ze?void 0:Ze.userStoryCardStyles,Ye=null==Ke?void 0:Ke.statusStyles,$e=null===(x=null==Ze?void 0:Ze.userStoryCardStyles)||void 0===x?void 0:x.userStoryEditStyles,et=null===(E=null==Ze?void 0:Ze.userStoryScreenStyles)||void 0===E?void 0:E.userStoryContentStyles,tt=null==Ke?void 0:Ke.progressHeaderStyles,nt=null==Ke?void 0:Ke.clinicalTrialSectionStyles,it=null==Ke?void 0:Ke.CompletionStyles,st=null==Ke?void 0:Ke.noDataStyles,lt=null==Ke?void 0:Ke.approveButtonStyles,ot=null!==(B=null===(D=null==Je?void 0:Je.shouldRender)||void 0===D?void 0:D.call(Je,K))&&void 0!==B&&B,at=null===(T=null==Je?void 0:Je.getValue)||void 0===T?void 0:T.call(Je,K),rt=null!==(k=null===(A=null==Je?void 0:Je.getFields)||void 0===A?void 0:A.call(Je,K))&&void 0!==k?k:[],ut=null!==(P=null==Je?void 0:Je.isEditDisabled)&&void 0!==P&&P,dt=null!==(R=null===(U=null==Je?void 0:Je.isSaving)||void 0===U?void 0:U.call(Je,K))&&void 0!==R&&R,ct=(G=null!==(M=K.completion_percentage)&&void 0!==M?M:0,H=it,G>=80?null==H?void 0:H.highCompletion:G>=50?null==H?void 0:H.mediumCompletion:null==H?void 0:H.lowCompletion),vt=((S={})[_.SectionStatus.WAITING]=null==Ye?void 0:Ye.waiting,S[_.SectionStatus.IN_PROGRESS]=null==Ye?void 0:Ye.inProgress,S[_.SectionStatus.GENERATED]=null==Ye?void 0:Ye.generated,S[_.SectionStatus.FAILED]=null==Ye?void 0:Ye.failed,S[_.SectionStatus.GENERATE]=null==Ye?void 0:Ye.generate,S[_.SectionStatus.APPROVED]=null==Ye?void 0:Ye.approved,S),ft=n.useState(e.__assign(e.__assign({},structuredClone(K)),{value:u.formatMarkdown(K.value)||""})),_t=ft[0],gt=ft[1],pt=n.useState({userStory:!!K.isDefaultEdit}),ht=pt[0],yt=pt[1],mt=n.useState(!1),St=mt[0],xt=mt[1],Ct=n.useState(!1),jt=Ct[0],It=Ct[1],wt=n.useState(null),Nt=wt[0],bt=wt[1],Et=n.useState(null),Dt=Et[0],Bt=Et[1],Tt=_.useRequirementAI(),At=Tt.userStory,kt=Tt.customIcons,Pt=n.useState(null!=fe?fe:""===$||ae===K.artifactId||!!K.isDefaultOpen),Ut=Pt[0],Rt=Pt[1],Mt=n.useState(!1);Mt[0];var qt=Mt[1],Lt=n.useState(null),Ft=Lt[0],zt=Lt[1],Ot=n.useState(null),Vt=Ot[0],Wt=Ot[1],Gt=n.useState(!1),Ht=Gt[0],Qt=Gt[1],Xt=n.useRef(null),Zt=n.useState(!1);Zt[0];var Jt=Zt[1],Kt=n.useState(!1),Yt=Kt[0],$t=Kt[1],en=n.useRef(null);n.useEffect(function(){Q&&Rt(Q)},[Q]),n.useEffect(function(){gt(e.__assign(e.__assign({},structuredClone(K)),{value:u.formatMarkdown(K.value)||""}))},[K]),n.useEffect(function(){Qe.length>0?Rt(!0):void 0===fe&&(ae?Rt(ae===K.artifactId):he&&he.length>0&&Rt(he.includes(K.artifactId)))},[Qe,ae,K.artifactId,he]);var tn=function(){zt(null)},nn=function(){Wt(null)},sn=function(){Rt(function(e){return!e})};var ln=null!=(null==K?void 0:K.big_enough)&&!Number.isNaN(K.big_enough)&&!!(null==K?void 0:K.big_enough_decision_factors),on=null!==(q=null==K?void 0:K.completion_percentage)&&void 0!==q?q:0,an=!!(null==K?void 0:K.completion_decision_factors),rn=""===$,un=null!=de?de:w(ue,rn),dn=!ne&&!ie;return n.useEffect(function(){if(Dt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Dt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Dt]),n.useEffect(function(){K.isDefaultEdit&&yt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[K.isDefaultEdit]),t.jsxs("div",e.__assign({className:r.default.card,style:null==Ke?void 0:Ke.cardStyle,id:"story-card-".concat(K.title),"data-expanded":Ut},{children:[t.jsxs("div",e.__assign({className:r.default.titleSection,style:null==Ke?void 0:Ke.titleSection},{children:[t.jsxs("div",e.__assign({className:r.default.titleRow,style:null==Ke?void 0:Ke.titleRow,onClick:sn},{children:[t.jsxs("div",e.__assign({className:r.default.titleLeft,style:null==Ke?void 0:Ke.titleLeft,onMouseEnter:function(){return Jt(!0)},onMouseLeave:function(){return Jt(!1)}},{children:[me&&t.jsx(N,{displayName:Z}),St&&dn?t.jsx(p.InlineTitleEditor,{title:K.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var i,s;return e.__generator(this,function(l){try{i=e.__assign({},K),K.artifactId===n?i.title=t:i.sub_features=(null===(s=K.sub_features)||void 0===s?void 0:s.map(function(i){return i.artifactId===n?e.__assign(e.__assign({},i),{title:t}):i}))||[],gt(i),Y(i),xt(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,K.artifactId)},onCancel:function(){xt(!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",e.__assign({className:r.default.storyTitleWrapper},{children:[t.jsx(l.Tooltip,e.__assign({title:I(K.title),arrow:!0},{children:t.jsx("h2",e.__assign({title:Pe?void 0:K.title,className:r.default.storyTitle,style:null==Ke?void 0:Ke.storyTitle},{children:I(K.title)}),K.artifactId)})),Ee&&!ot&&(an?t.jsx(y.CompletionPanel,e.__assign({customIcons:null==kt?void 0:kt.userStoryIcons,customStyles:null==Ke?void 0:Ke.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==Ke?void 0:Ke.CompletionStyles,onToggleStateChange:$t},{children:t.jsxs("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==it?void 0:it.badge),ct)},{children:[t.jsxs("span",{children:[on,"% Completed"]}),t.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:t.jsx(m.default,{color:"currentColor"})})),Yt?t.jsx(i.ChevronUp,{size:14,style:null==it?void 0:it.chevronStyle}):t.jsx(i.ChevronDown,{size:14,style:null==it?void 0:it.chevronStyle})]}))})):t.jsx("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==it?void 0:it.badge),ct)},{children:t.jsxs("span",{children:[on,"% Completed"]})}))),xe&&t.jsx("button",e.__assign({type:"button",className:r.default.titleEditButton,style:null==$e?void 0:$e.titleEditButton,onClick:function(e){e.stopPropagation(),xt(!0),Ut||Rt(!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"})}))}))]}))]})),(Fe||void 0!==Oe&&void 0!==Ve)&&t.jsxs("div",e.__assign({className:r.default.statusContainer},{children:[void 0!==Oe&&void 0!==Ve&&t.jsxs("div",e.__assign({className:r.default.completedBadge},{children:["Completed: ",Oe,"/",Ve]})),Fe&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==ze||ze()},className:r.default.statusButton,style:vt[Fe]},{children:j[Fe]}))]})),t.jsxs("div",e.__assign({className:r.default.titleActions,style:null==Ke?void 0:Ke.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(un.showProgressPercentage||un.showGapBox)&&ve&&t.jsxs("div",e.__assign({className:r.default.progressHeader,style:null==tt?void 0:tt.wrapper},{children:[un.showProgressPercentage&&t.jsxs("div",e.__assign({className:r.default.progressPercentage,style:null==tt?void 0:tt.percentage},{children:[null!==(F=null!==(L=null==K?void 0:K.confidenceScore)&&void 0!==L?L:null==un?void 0:un.confidenceValue)&&void 0!==F?F:"0","%"]})),un.showGapBox&&t.jsxs("div",e.__assign({className:r.default.gapBox,style:null==tt?void 0:tt.gapBox},{children:[null!==(O=null!==(z=null==K?void 0:K.gapValue)&&void 0!==z?z:null==un?void 0:un.gapBoxValue)&&void 0!==O?O:"2"," ","Gaps"]}))]})),ln&&t.jsx(g.BigEnoughPanel,{customIcons:null==kt?void 0:kt.userStoryIcons,customStyles:null==Ke?void 0:Ke.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==Ke?void 0:Ke.BigEnoughStyles}),!ht.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==un?void 0:un.showShareButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Ke?void 0:Ke.iconButton,onClick:function(e){zt(e.currentTarget)}},{children:t.jsx(i.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:Ft,open:!!Ft,onClose:function(){return zt(null)},style:null==Ke?void 0:Ke.userStoryShareMenu},{children:[te&&t.jsx(l.MenuItem,e.__assign({style:null==Ke?void 0:Ke.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 qt(!0),se?[4,Promise.all([se("pdf"),se("doc")])]:[2];case 1:return e.sent(),qt(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Xt,className:r.default.menuItemContent,style:null==Ke?void 0:Ke.menuItemContent},{children:[t.jsx(i.Download,{size:16,color:null==Ke?void 0:Ke.menuIconColor}),t.jsx("p",e.__assign({style:null==Ke?void 0:Ke.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Ke?void 0:Ke.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=K,J&&(t=e.__assign(e.__assign({},K),{value:"".concat(d.replaceTitleSection(null==J?void 0:J.value,K.title)," \n").concat(K.value)})),null==le||le(!0,[t],K.artifactId),tn(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==Ke?void 0:Ke.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Share2,{size:16,color:null==Ke?void 0:Ke.menuIconColor}),t.jsx("p",e.__assign({style:null==Ke?void 0:Ke.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Ke?void 0:Ke.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,i,s,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new C.default.Converter,n=t.makeHtml(u.formatMarkdown(K.value)||K.value),i=function(e){var t=(new C.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(u.formatMarkdown(K.value)||K.value),s=new ClipboardItem({"text/plain":new Blob([i],{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([s])];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 tn(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==Ke?void 0:Ke.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Copy,{size:16,color:null==Ke?void 0:Ke.menuIconColor}),t.jsx("p",e.__assign({style:null==Ke?void 0:Ke.menuLabel},{children:"Copy"}))]}))}))]}))]}),ht.userStory&&Ut?t.jsx(c.default,{type:"outline",children:"Cancel",style:null==Ke?void 0:Ke.cancelButton,onClick:function(){var t;null===(t=en.current)||void 0===t||t.abort(),yt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),ht.userStory&&Ut?t.jsx(c.default,{type:"fill",children:Ht?t.jsxs("span",e.__assign({className:r.default.savingSpinner,style:null==Ke?void 0:Ke.savingSpinner},{children:[t.jsx(i.LoaderCircle,{className:r.default.spinAnimation,style:null==Ke?void 0:Ke.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Ht,style:Ht?null==Ke?void 0:Ke.savingButton:null==Ke?void 0:Ke.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 Qt(!0),"userStory"==="userStory"&&(Y(_t),console.log("I am changing RTE editor values",_t)),[4,oe(Xe,At,X,null===(t=en.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Y(e.__assign(e.__assign({},_t),{isDefaultEdit:!1})),yt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Qt(!1),[2]}})})}}):!ne&&!ie&&!Ae&&Ut&&!1!==(null==un?void 0:un.showEditButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Ke?void 0:Ke.editButton,onClick:function(){return yt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(i.PencilIcon,{color:null==Ke?void 0:Ke.pencilIconColor,size:16})})),Be&&rn&&Ut&&!ne&&!ie&&!1!==(null==un?void 0:un.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:r.default.addSectionButton,style:null==$e?void 0:$e.addSectionButton,onClick:function(t){var n,i,s;t.stopPropagation();var l=(null!==(i=null===(n=K.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,o={artifactId:a.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},r=e.__assign(e.__assign({},K),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(s=K.sub_features)&&void 0!==s?s:[],!0),[o],!1)});gt(r),Y(r),Rt(!0),Bt(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(i.Plus,{size:14}),t.jsx("span",e.__assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!rn&&!ne&&!Ae&&!ie&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==ge||ge()},className:r.default.iconButton,style:null==$e?void 0:$e.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(i.Trash2,{size:16})})),ot&&t.jsx("button",e.__assign({type:"button",className:r.default.iconButton,disabled:ut,onClick:function(e){if(e.stopPropagation(),jt)return bt(null),void It(!1);bt(structuredClone(null!=at?at:{})),Rt(!0),It(!0)}},{children:jt?t.jsx(i.X,{size:16,color:null==Ke?void 0:Ke.pencilIconColor}):t.jsx(i.PencilIcon,{size:16,color:null==Ke?void 0:Ke.pencilIconColor})})),(null==un?void 0:un.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:r.default.actionItemBtn,style:null==Ke?void 0:Ke.actionItemBtn,onClick:function(e){e.stopPropagation(),Wt(e.currentTarget)}},{children:t.jsx(i.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:Vt,open:!!Vt,onClose:nn,style:null==Ke?void 0:Ke.userStoryShareMenu},{children:null==_e?void 0:_e.items.map(function(n,i){return t.jsx(l.MenuItem,e.__assign({style:null==Ke?void 0:Ke.userStoryMenuItem,onClick:function(){n.onclick(K),nn()}},{children:t.jsxs("div",e.__assign({className:r.default.menuItemContent,style:e.__assign(e.__assign({},null==Ke?void 0:Ke.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:r.default.menuItemIcon,style:null==Ke?void 0:Ke.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==Ke?void 0:Ke.menuLabel},{children:n.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==Ke?void 0:Ke.menuItemRight})]}))}),"action-item-".concat(i,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),sn()},style:null==Ke?void 0:Ke.chevronButton,className:r.default.chevronButton},{children:Ut?t.jsx(i.ChevronUp,{className:r.default.chevronIcon,color:null==Ke?void 0:Ke.chevronIconColor}):t.jsx(i.ChevronDown,{className:r.default.chevronIcon,color:null==Ke?void 0:Ke.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==Ke?void 0:Ke.dividerStyle})]})),Ut&&t.jsx("div",e.__assign({className:r.default.cardContent,style:e.__assign(e.__assign({},null==Ke?void 0:Ke.cardContentStyle),{borderTop:we?"1px solid #E5E5E5":"none"})},{children:qe?t.jsxs("div",e.__assign({className:r.default.loadingContainer},{children:[t.jsx("div",e.__assign({className:r.default.loadingIconWrapper},{children:t.jsx(i.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),t.jsxs("div",{children:[t.jsx("h3",e.__assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),t.jsx("p",e.__assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(){return null==Le?void 0:Le()},className:r.default.viewStatusButton},{children:"View Status"}))]})):Ge?t.jsxs("div",e.__assign({className:r.default.noDataContainer,style:null==st?void 0:st.container},{children:[t.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration,style:null==st?void 0:st.illustration}),t.jsx("h3",e.__assign({className:r.default.noDataTitle,style:null==st?void 0:st.title},{children:"No Data Available for This Section"})),t.jsx("p",e.__assign({className:r.default.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."}))]})):t.jsxs("div",e.__assign({className:r.default.contentInner,style:null==Ke?void 0:Ke.contentInner},{children:[t.jsxs("div",e.__assign({className:r.default.descriptionSection,style:null==Ke?void 0:Ke.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==Ke?void 0:Ke.justifyBetween}),ht.userStory?t.jsx(v.default,{minHeight:"100%",height:"100%",type:"string",value:u.formatMarkdown(K.value)||"",handleUpdateState:function(t,n){var i=u.indentMarkdown(n);gt(function(t){return e.__assign(e.__assign({},t),{value:i||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ht.userStory?"edit":"readOnly"}):ot?t.jsx(h.default,{styles:nt,fields:rt,readonly:!jt,isSaving:dt,value:null!==(V=null!=Nt?Nt:at)&&void 0!==V?V:{},onChange:bt,onSave:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return Nt?[4,null===(t=null==Je?void 0:Je.onSave)||void 0===t?void 0:t.call(Je,K,Nt)]:[2];case 1:return e.sent(),bt(null),It(!1),[2]}})})},onCancel:function(){bt(null),It(!1)}}):t.jsxs(t.Fragment,{children:[t.jsx(f.default,{showUserStoryDiff:ie,isParent:""===$,message:u.formatMarkdown(K.value)||"",artifactId:K.artifactId,customStyles:et,isDisplayHighlightControl:re,contextVariant:pe,showConfidenceScore:je}),Ue&&t.jsx("div",e.__assign({className:r.default.approveButtonContainer,style:null==lt?void 0:lt.container},{children:t.jsx("button",e.__assign({type:"button",className:r.default.approveButton,style:null==lt?void 0:lt.button,disabled:Ue.disabled||Ue.isLoading,onClick:function(e){var t;e.stopPropagation(),null===(t=null==Ue?void 0:Ue.onClick)||void 0===t||t.call(Ue)}},{children:Ue.isLoading?t.jsxs(t.Fragment,{children:[t.jsx(i.LoaderCircle,{size:16,className:r.default.spinner,style:null==lt?void 0:lt.icon}),t.jsx("span",e.__assign({style:null==lt?void 0:lt.text},{children:Ue.label}))]}):t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({style:null==lt?void 0:lt.text},{children:Ue.label})),t.jsx(i.Check,{size:16,style:null==lt?void 0:lt.icon})]})}))}))]})]})),null===(W=_t.sub_features)||void 0===W?void 0:W.map(function(n,i){var s=w(ue,!1,n.artifactId);return t.jsx(b,{artifactId:X,isUserStoryCurrentlyUpdated:Q,artifactTitleId:"".concat(Z,"-").concat(String.fromCharCode(65+i)),parentUserStory:K,parentIndex:"".concat($).concat($&&".").concat(ee),currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var i=e.__spreadArray([],K.sub_features||[],!0);i[t]=n,Y(e.__assign(e.__assign({},K),{sub_features:i}))}(i,t)},enableDownload:!0,isDiffEditReviewMode:ne,showUserStoryDiff:ie,updateUserStoryArtifact:oe,handleDownloadUserStory:se,handleOpenSendDialog:le,isDisplayHighlightControl:re,elementDisplayConfig:ue,_resolvedConfig:s,actionItemsConfig:_e,onDelete:function(){return function(t){var n=(K.sub_features||[]).filter(function(e,n){return n!==t}),i=e.__assign(e.__assign({},K),{sub_features:n});gt(i),Y(i)}(i)},expandedSubFeatures:he,disableEditPlan:Ae,useMuiTooltip:Pe},n.artifactId)})]}))}))]}))};exports.StoryCard=b,exports.UserStoryCardWrapper=function(n){var s=n.artifactTitleIDs,l=n.expandedSubFeatures,o=n.isDiffEditReviewMode,a=n.showUserStoryDiff,u=n.updateUserStoryArtifact,d=n.isUserStoryCurrentlyUpdated,c=n.artifactId,v=n.handleOpenSendDialog,f=n.handleDownloadUserStory,g=n.selectedArtifactId,p=n.isDisplayHighlightControl,h=n.elementDisplayConfig,y=n.showWrapper,m=n.actionItemsConfig,S=n.contextVariant,x=n.showDisplayName,C=n.allowTitleEdit,j=n.showConfidenceScore,I=n.showBorderTop,N=n.defaultExpanded,E=n.showCompletionPanel,D=void 0!==E&&E,B=n.showAddSectionButton,T=void 0!==B&&B,A=n.disableEditPlan,k=void 0!==A&&A,P=n.useMuiTooltip,U=void 0!==P&&P,R=n.approveButtonConfig,M=_.useRequirementAI(),q=M.userStory,L=M.setUserStory,F=M.customStyles,z=M.searchQueryList,O=M.currentHighlightIndex,V=M.setCurrentHighlightIndex;M.segmentComponentConfig;var W=M.sectionStatusConfig,G=null==F?void 0:F.userStoryCardStyles,H=0===O,Q=O===z.length-1;return t.jsxs("div",e.__assign({className:r.default.userStoryCardWrapper,style:p?e.__assign(e.__assign({},null==G?void 0:G.userStoryCardWrapper),{position:"relative"}):null==G?void 0:G.userStoryCardWrapper},{children:[p&&t.jsx(t.Fragment,{children:z.length>0&&t.jsx("div",e.__assign({className:r.default.wrapper},{children:t.jsx("div",e.__assign({className:r.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:r.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:r.default.navCounter},{children:[O+1," of ",z.length]})),t.jsxs("div",e.__assign({className:r.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){O>0&&V(function(e){return e-1})},className:r.default.navButton,disabled:H},{children:t.jsx(i.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){O<z.length-1&&V(function(e){return e+1})},className:r.default.navButton,disabled:Q},{children:t.jsx(i.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),q.map(function(n,i){var r=w(h,!0);return t.jsx(b,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:s[i]||"",expandedSubFeatures:l,currentUserStory:n,onUserStoryChange:function(t){L(function(n){return n[i]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:a,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:g,isDisplayHighlightControl:p,elementDisplayConfig:h,_resolvedConfig:r,showWrapper:y,defaultExpanded:N,actionItemsConfig:m,contextVariant:S,showDisplayName:x,allowTitleEdit:C,showConfidenceScore:j,showBorderTop:I,sectionStatusConfig:W,showCompletionPanel:D,showAddSectionButton:T,disableEditPlan:k,useMuiTooltip:U,approveButtonConfig:R},n.artifactId)})]}))},exports.default=b,exports.replaceLearnedTagsWithInfo=I;
2
2
  //# sourceMappingURL=UserStoryCard.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryCard-module_card__9pErS{border:1px solid #e5e5e5;border-radius:.75rem;display:flex;flex:1;flex-direction:column;margin-bottom:auto;margin-left:auto;margin-right:auto;position:relative;width:100%}.UserStoryCard-module_titleSection__pGbpL{cursor:pointer;padding:.5rem 1rem;width:100%}.UserStoryCard-module_titleRow__TyEN9{align-items:center;display:flex;justify-content:space-between;margin-top:.5rem;position:relative;width:100%}.UserStoryCard-module_titleLeft__fzF6u{align-items:center;display:flex;font-family:Inter,sans-serif;gap:.5rem;max-width:66.666%}.UserStoryCard-module_titleActions__Dabx1{align-items:center;display:flex;gap:.5rem;width:fit-content}.UserStoryCard-module_divider__xG-FC{background-color:#ffffff4d;border-radius:9999px;height:.25rem;width:4rem}.UserStoryCard-module_displayName__Jj-HK{align-items:center;color:#4b5563;display:inline-flex;font-size:.875rem;font-weight:500;gap:.5rem}.UserStoryCard-module_displayNameIcon__-SCM3{height:1rem;width:1rem}.UserStoryCard-module_storyTitle__FDX4p{color:#374151;flex:1;font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.UserStoryCard-module_iconButton__DkfRA{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryCard-module_iconButton__DkfRA:hover{background-color:#f9fafb}.UserStoryCard-module_chevronButton__nxxYC{background:none;border:none;cursor:pointer;margin-left:.5rem;padding:.25rem}.UserStoryCard-module_chevronIcon__Azswy{color:#4b5563;height:1.5rem;width:1.5rem}.UserStoryCard-module_cardContent__rR2g3{max-height:fit-content;opacity:1;padding:1.5rem 2rem 2rem;transition:all .3s ease-in-out;width:100%}.UserStoryCard-module_contentInner__AYQbu{display:flex;flex-direction:column;gap:2.5rem;width:100%}.UserStoryCard-module_descriptionSection__5j6cg{display:flex;flex-direction:column;gap:1rem;width:100%}.UserStoryCard-module_justifyBetween__cD-EG{display:flex;justify-content:space-between}.UserStoryCard-module_savingSpinner__UmbEq{align-items:center;color:#fff;display:flex;flex-direction:row;gap:.5rem}.UserStoryCard-module_spinAnimation__INSou{animation:UserStoryCard-module_spin__afcZ6 1s linear infinite}@keyframes UserStoryCard-module_spin__afcZ6{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.UserStoryCard-module_menuItemContent__U-ZxP{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryCard-module_actionItemBtn__3jocB{font-size:18px;line-height:0}.UserStoryCard-module_menuItemIcon__BxrJU{align-items:center;display:inline-flex;margin-right:.5rem}.UserStoryCard-module_menuItemRight__Cjw2j{align-self:center;border-radius:50%;height:8px;margin-left:auto;width:8px}.UserStoryCard-module_wrapper__ahzRY{background-color:#fff;border-bottom:1px solid hsla(0,0%,50%,.126);display:flex;justify-content:flex-end;margin-bottom:4px;padding:5px 10px 5px 0;position:sticky;top:0;width:100%;z-index:1000}.UserStoryCard-module_highlightNavigation__vv8RW{width:max-content}.UserStoryCard-module_navigationContainer__2UcOj{align-items:center;border:1px solid hsla(0,0%,50%,.126);border-radius:10px;display:inline-flex;gap:8px;padding:6px 8px}.UserStoryCard-module_navButton__EWoVi{align-items:center;background:none;border:none;color:#374151;cursor:pointer;display:flex;justify-content:center;padding:2px;transition:color .15s ease}.UserStoryCard-module_navIcon__3ZSIH{height:20px;width:20px}.UserStoryCard-module_navCounter__sIIeS{color:#4b5563;font-size:17px;font-weight:500;letter-spacing:.01em;min-width:28px;text-align:center}.UserStoryCard-module_navButtons__6oLaN{display:flex;gap:0}.UserStoryCard-module_navButton__EWoVi:disabled{cursor:not-allowed;opacity:.4}.UserStoryCard-module_menuItemContentPadded__w6udq{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}.UserStoryCard-module_userStoryCardWrapper__0gC-E{width:100%}.UserStoryCard-module_progressHeader__LBMsg{align-items:center;display:flex;gap:8px}.UserStoryCard-module_progressPercentage__brScW{background:#fff;border:1px solid #d0d5dd;border-radius:8px;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_gapBox__LkEiT{background:#fff7e6;border:1px solid #f7d58d;border-radius:8px;color:#b26b00;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_storyTitleWrapper__Ng-Th{align-items:center;display:flex;gap:6px;min-width:0}.UserStoryCard-module_titleEditButton__iJADR{align-items:center;background:#0000;border:none;border-radius:4px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;opacity:1;padding:3px;transition:opacity .15s ease,background .15s ease,color .15s ease}.UserStoryCard-module_titleEditButton__iJADR:hover{background:var(--color-surface-hover,#f3f4f6);color:var(--color-primary,#4f46e5);opacity:1}.UserStoryCard-module_titleEditButton__iJADR:focus-visible{opacity:1;outline:2px solid var(--color-primary,#4f46e5);outline-offset:1px}.UserStoryCard-module_inlineTitleEditor__rdF-w{align-items:center;display:flex;flex:1;gap:4px;min-width:0}.UserStoryCard-module_inlineTitleInput__Ft6mB{background:var(--color-surface,#fff);border:1.5px solid var(--color-primary,#4f46e5);border-radius:5px;color:var(--color-text-primary,#111827);flex:1;font-size:inherit;font-weight:600;line-height:1.4;min-width:0;outline:none;padding:3px 8px;transition:border-color .15s ease,box-shadow .15s ease}.UserStoryCard-module_inlineTitleInput__Ft6mB:focus{border-color:var(--color-primary,#4f46e5);box-shadow:0 0 0 3px #4f46e526}.UserStoryCard-module_inlineTitleConfirm__YTG-3{align-items:center;background:var(--color-primary,#4f46e5);border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,transform .1s ease;width:26px}.UserStoryCard-module_inlineTitleConfirm__YTG-3:hover:not(:disabled){background:var(--color-primary-dark,#4338ca)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:active:not(:disabled){transform:scale(.93)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:disabled{cursor:not-allowed;opacity:.45}.UserStoryCard-module_inlineTitleConfirm__YTG-3:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_inlineTitleCancel__clhBR{align-items:center;background:#0000;border:1.5px solid var(--color-border,#e5e7eb);border-radius:5px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,color .15s ease,border-color .15s ease;width:26px}.UserStoryCard-module_inlineTitleCancel__clhBR:hover{background:var(--color-surface-hover,#f3f4f6);border-color:var(--color-danger,#ef4444);color:var(--color-danger,#ef4444)}.UserStoryCard-module_inlineTitleCancel__clhBR:focus-visible{outline:2px solid var(--color-danger,#ef4444);outline-offset:2px}.UserStoryCard-module_addSectionButton__lBCWj{align-items:center;background:#0000;border:1.5px dashed var(--color-border,#d1d5db);border-radius:6px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:500;gap:5px;padding:6px 10px;transition:border-color .15s ease,color .15s ease,background .15s ease;white-space:nowrap}.UserStoryCard-module_addSectionButton__lBCWj:hover{background:var(--color-primary-subtle,#4f46e50d);border-color:var(--color-primary,#4f46e5);color:var(--color-primary,#4f46e5)}.UserStoryCard-module_addSectionButton__lBCWj:active{transform:scale(.97)}.UserStoryCard-module_addSectionButton__lBCWj:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_addSectionLabel__kUs2E{display:inline}.UserStoryCard-module_viewStatusButton__4-ISq{background:#0000;border:1px solid #5b3df5;border-radius:12px;color:#5b3df5;cursor:pointer;font-size:14px;font-weight:600;padding:10px 20px;transition:all .2s ease}.UserStoryCard-module_viewStatusButton__4-ISq:hover{background:#5b3df5;color:#fff}.UserStoryCard-module_viewStatusButton__4-ISq:active{transform:scale(.98)}.UserStoryCard-module_statusContainer__Blr6F{align-items:center;display:flex;gap:8px;margin-left:auto;margin-right:12px}.UserStoryCard-module_completedBadge__BURPe{background:#f3f4f6;border-radius:8px;color:#374151;font-size:12px;font-weight:600;padding:4px 10px;white-space:nowrap}.UserStoryCard-module_statusButton__zeFUj{align-items:center;border:none;border-radius:5px;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:600;gap:5px;padding:4px 8px;transition:all .2s ease}.UserStoryCard-module_statusWaiting__mTSf-{background:#fef3c7;color:#b45309}.UserStoryCard-module_statusInProgress__OsBoU{background:#ede9fe;color:#6d28d9}.UserStoryCard-module_statusSuccess__ufhqE{background:#dcfce7;color:#15803d}.UserStoryCard-module_loadingContainer__uPfG-{align-items:center;display:flex;flex-direction:column;gap:16px;justify-content:center;min-height:240px;padding:48px 24px;text-align:center}.UserStoryCard-module_loadingIconWrapper__5eUX7{align-items:center;background:#f4f1ff;border-radius:50%;display:flex;height:64px;justify-content:center;width:64px}.UserStoryCard-module_loadingTitle__MHwmb{color:#0f172a;font-size:18px;font-weight:600;margin:0}.UserStoryCard-module_loadingSubtitle__PKUur{color:#64748b;font-size:16px;margin-top:8px}.UserStoryCard-module_noDataContainer__Rys9X{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:24px;text-align:center}.UserStoryCard-module_noDataIllustration__BoSPy{height:auto;margin-bottom:12px;width:88px}.UserStoryCard-module_noDataTitle__DKazv{color:#111827;font-size:18px;font-weight:600;line-height:26px;margin:0 0 6px}.UserStoryCard-module_noDataSubtitle__ME3eH{color:#6b7280;font-size:14px;line-height:20px;margin:0;max-width:520px}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={card:"UserStoryCard-module_card__9pErS",titleSection:"UserStoryCard-module_titleSection__pGbpL",titleRow:"UserStoryCard-module_titleRow__TyEN9",titleLeft:"UserStoryCard-module_titleLeft__fzF6u",titleActions:"UserStoryCard-module_titleActions__Dabx1",divider:"UserStoryCard-module_divider__xG-FC",displayName:"UserStoryCard-module_displayName__Jj-HK",displayNameIcon:"UserStoryCard-module_displayNameIcon__-SCM3",storyTitle:"UserStoryCard-module_storyTitle__FDX4p",iconButton:"UserStoryCard-module_iconButton__DkfRA",chevronButton:"UserStoryCard-module_chevronButton__nxxYC",chevronIcon:"UserStoryCard-module_chevronIcon__Azswy",cardContent:"UserStoryCard-module_cardContent__rR2g3",contentInner:"UserStoryCard-module_contentInner__AYQbu",descriptionSection:"UserStoryCard-module_descriptionSection__5j6cg",justifyBetween:"UserStoryCard-module_justifyBetween__cD-EG",savingSpinner:"UserStoryCard-module_savingSpinner__UmbEq",spinAnimation:"UserStoryCard-module_spinAnimation__INSou",spin:"UserStoryCard-module_spin__afcZ6",menuItemContent:"UserStoryCard-module_menuItemContent__U-ZxP",actionItemBtn:"UserStoryCard-module_actionItemBtn__3jocB",menuItemIcon:"UserStoryCard-module_menuItemIcon__BxrJU",menuItemRight:"UserStoryCard-module_menuItemRight__Cjw2j",wrapper:"UserStoryCard-module_wrapper__ahzRY",highlightNavigation:"UserStoryCard-module_highlightNavigation__vv8RW",navigationContainer:"UserStoryCard-module_navigationContainer__2UcOj",navButton:"UserStoryCard-module_navButton__EWoVi",navIcon:"UserStoryCard-module_navIcon__3ZSIH",navCounter:"UserStoryCard-module_navCounter__sIIeS",navButtons:"UserStoryCard-module_navButtons__6oLaN",menuItemContentPadded:"UserStoryCard-module_menuItemContentPadded__w6udq",userStoryCardWrapper:"UserStoryCard-module_userStoryCardWrapper__0gC-E",progressHeader:"UserStoryCard-module_progressHeader__LBMsg",progressPercentage:"UserStoryCard-module_progressPercentage__brScW",gapBox:"UserStoryCard-module_gapBox__LkEiT",storyTitleWrapper:"UserStoryCard-module_storyTitleWrapper__Ng-Th",titleEditButton:"UserStoryCard-module_titleEditButton__iJADR",inlineTitleEditor:"UserStoryCard-module_inlineTitleEditor__rdF-w",inlineTitleInput:"UserStoryCard-module_inlineTitleInput__Ft6mB",inlineTitleConfirm:"UserStoryCard-module_inlineTitleConfirm__YTG-3",inlineTitleCancel:"UserStoryCard-module_inlineTitleCancel__clhBR",addSectionButton:"UserStoryCard-module_addSectionButton__lBCWj",addSectionLabel:"UserStoryCard-module_addSectionLabel__kUs2E",viewStatusButton:"UserStoryCard-module_viewStatusButton__4-ISq",statusContainer:"UserStoryCard-module_statusContainer__Blr6F",completedBadge:"UserStoryCard-module_completedBadge__BURPe",statusButton:"UserStoryCard-module_statusButton__zeFUj",statusWaiting:"UserStoryCard-module_statusWaiting__mTSf-",statusInProgress:"UserStoryCard-module_statusInProgress__OsBoU",statusSuccess:"UserStoryCard-module_statusSuccess__ufhqE",loadingContainer:"UserStoryCard-module_loadingContainer__uPfG-",loadingIconWrapper:"UserStoryCard-module_loadingIconWrapper__5eUX7",loadingTitle:"UserStoryCard-module_loadingTitle__MHwmb",loadingSubtitle:"UserStoryCard-module_loadingSubtitle__PKUur",noDataContainer:"UserStoryCard-module_noDataContainer__Rys9X",noDataIllustration:"UserStoryCard-module_noDataIllustration__BoSPy",noDataTitle:"UserStoryCard-module_noDataTitle__DKazv",noDataSubtitle:"UserStoryCard-module_noDataSubtitle__ME3eH"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryCard-module_card__9pErS{border:1px solid #e5e5e5;border-radius:.75rem;display:flex;flex:1;flex-direction:column;margin-bottom:auto;margin-left:auto;margin-right:auto;position:relative;width:100%}.UserStoryCard-module_titleSection__pGbpL{cursor:pointer;padding:.5rem 1rem;width:100%}.UserStoryCard-module_titleRow__TyEN9{align-items:center;display:flex;justify-content:space-between;margin-top:.5rem;position:relative;width:100%}.UserStoryCard-module_titleLeft__fzF6u{align-items:center;display:flex;font-family:Inter,sans-serif;gap:.5rem;max-width:66.666%}.UserStoryCard-module_titleActions__Dabx1{align-items:center;display:flex;gap:.5rem;width:fit-content}.UserStoryCard-module_divider__xG-FC{background-color:#ffffff4d;border-radius:9999px;height:.25rem;width:4rem}.UserStoryCard-module_displayName__Jj-HK{align-items:center;color:#4b5563;display:inline-flex;font-size:.875rem;font-weight:500;gap:.5rem}.UserStoryCard-module_displayNameIcon__-SCM3{height:1rem;width:1rem}.UserStoryCard-module_storyTitle__FDX4p{color:#374151;flex:1;font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.UserStoryCard-module_iconButton__DkfRA{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryCard-module_iconButton__DkfRA:hover{background-color:#f9fafb}.UserStoryCard-module_chevronButton__nxxYC{background:none;border:none;cursor:pointer;margin-left:.5rem;padding:.25rem}.UserStoryCard-module_chevronIcon__Azswy{color:#4b5563;height:1.5rem;width:1.5rem}.UserStoryCard-module_cardContent__rR2g3{max-height:fit-content;opacity:1;padding:1.5rem 2rem 2rem;transition:all .3s ease-in-out;width:100%}.UserStoryCard-module_contentInner__AYQbu{display:flex;flex-direction:column;gap:2.5rem;width:100%}.UserStoryCard-module_descriptionSection__5j6cg{display:flex;flex-direction:column;gap:1rem;width:100%}.UserStoryCard-module_justifyBetween__cD-EG{display:flex;justify-content:space-between}.UserStoryCard-module_savingSpinner__UmbEq{align-items:center;color:#fff;display:flex;flex-direction:row;gap:.5rem}.UserStoryCard-module_spinAnimation__INSou{animation:UserStoryCard-module_spin__afcZ6 1s linear infinite}@keyframes UserStoryCard-module_spin__afcZ6{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.UserStoryCard-module_menuItemContent__U-ZxP{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryCard-module_actionItemBtn__3jocB{font-size:18px;line-height:0}.UserStoryCard-module_menuItemIcon__BxrJU{align-items:center;display:inline-flex;margin-right:.5rem}.UserStoryCard-module_menuItemRight__Cjw2j{align-self:center;border-radius:50%;height:8px;margin-left:auto;width:8px}.UserStoryCard-module_wrapper__ahzRY{background-color:#fff;border-bottom:1px solid hsla(0,0%,50%,.126);display:flex;justify-content:flex-end;margin-bottom:4px;padding:5px 10px 5px 0;position:sticky;top:0;width:100%;z-index:1000}.UserStoryCard-module_highlightNavigation__vv8RW{width:max-content}.UserStoryCard-module_navigationContainer__2UcOj{align-items:center;border:1px solid hsla(0,0%,50%,.126);border-radius:10px;display:inline-flex;gap:8px;padding:6px 8px}.UserStoryCard-module_navButton__EWoVi{align-items:center;background:none;border:none;color:#374151;cursor:pointer;display:flex;justify-content:center;padding:2px;transition:color .15s ease}.UserStoryCard-module_navIcon__3ZSIH{height:20px;width:20px}.UserStoryCard-module_navCounter__sIIeS{color:#4b5563;font-size:17px;font-weight:500;letter-spacing:.01em;min-width:28px;text-align:center}.UserStoryCard-module_navButtons__6oLaN{display:flex;gap:0}.UserStoryCard-module_navButton__EWoVi:disabled{cursor:not-allowed;opacity:.4}.UserStoryCard-module_menuItemContentPadded__w6udq{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}.UserStoryCard-module_userStoryCardWrapper__0gC-E{width:100%}.UserStoryCard-module_progressHeader__LBMsg{align-items:center;display:flex;gap:8px}.UserStoryCard-module_progressPercentage__brScW{background:#fff;border:1px solid #d0d5dd;border-radius:8px;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_gapBox__LkEiT{background:#fff7e6;border:1px solid #f7d58d;border-radius:8px;color:#b26b00;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_storyTitleWrapper__Ng-Th{align-items:center;display:flex;gap:6px;min-width:0}.UserStoryCard-module_titleEditButton__iJADR{align-items:center;background:#0000;border:none;border-radius:4px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;opacity:1;padding:3px;transition:opacity .15s ease,background .15s ease,color .15s ease}.UserStoryCard-module_titleEditButton__iJADR:hover{background:var(--color-surface-hover,#f3f4f6);color:var(--color-primary,#4f46e5);opacity:1}.UserStoryCard-module_titleEditButton__iJADR:focus-visible{opacity:1;outline:2px solid var(--color-primary,#4f46e5);outline-offset:1px}.UserStoryCard-module_inlineTitleEditor__rdF-w{align-items:center;display:flex;flex:1;gap:4px;min-width:0}.UserStoryCard-module_inlineTitleInput__Ft6mB{background:var(--color-surface,#fff);border:1.5px solid var(--color-primary,#4f46e5);border-radius:5px;color:var(--color-text-primary,#111827);flex:1;font-size:inherit;font-weight:600;line-height:1.4;min-width:0;outline:none;padding:3px 8px;transition:border-color .15s ease,box-shadow .15s ease}.UserStoryCard-module_inlineTitleInput__Ft6mB:focus{border-color:var(--color-primary,#4f46e5);box-shadow:0 0 0 3px #4f46e526}.UserStoryCard-module_inlineTitleConfirm__YTG-3{align-items:center;background:var(--color-primary,#4f46e5);border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,transform .1s ease;width:26px}.UserStoryCard-module_inlineTitleConfirm__YTG-3:hover:not(:disabled){background:var(--color-primary-dark,#4338ca)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:active:not(:disabled){transform:scale(.93)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:disabled{cursor:not-allowed;opacity:.45}.UserStoryCard-module_inlineTitleConfirm__YTG-3:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_inlineTitleCancel__clhBR{align-items:center;background:#0000;border:1.5px solid var(--color-border,#e5e7eb);border-radius:5px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,color .15s ease,border-color .15s ease;width:26px}.UserStoryCard-module_inlineTitleCancel__clhBR:hover{background:var(--color-surface-hover,#f3f4f6);border-color:var(--color-danger,#ef4444);color:var(--color-danger,#ef4444)}.UserStoryCard-module_inlineTitleCancel__clhBR:focus-visible{outline:2px solid var(--color-danger,#ef4444);outline-offset:2px}.UserStoryCard-module_addSectionButton__lBCWj{align-items:center;background:#0000;border:1.5px dashed var(--color-border,#d1d5db);border-radius:6px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:500;gap:5px;padding:6px 10px;transition:border-color .15s ease,color .15s ease,background .15s ease;white-space:nowrap}.UserStoryCard-module_addSectionButton__lBCWj:hover{background:var(--color-primary-subtle,#4f46e50d);border-color:var(--color-primary,#4f46e5);color:var(--color-primary,#4f46e5)}.UserStoryCard-module_addSectionButton__lBCWj:active{transform:scale(.97)}.UserStoryCard-module_addSectionButton__lBCWj:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_addSectionLabel__kUs2E{display:inline}.UserStoryCard-module_viewStatusButton__4-ISq{background:#0000;border:1px solid #5b3df5;border-radius:12px;color:#5b3df5;cursor:pointer;font-size:14px;font-weight:600;padding:10px 20px;transition:all .2s ease}.UserStoryCard-module_viewStatusButton__4-ISq:hover{background:#5b3df5;color:#fff}.UserStoryCard-module_viewStatusButton__4-ISq:active{transform:scale(.98)}.UserStoryCard-module_statusContainer__Blr6F{align-items:center;display:flex;gap:8px;margin-left:auto;margin-right:12px}.UserStoryCard-module_completedBadge__BURPe{background:#f3f4f6;border-radius:8px;color:#374151;font-size:12px;font-weight:600;padding:4px 10px;white-space:nowrap}.UserStoryCard-module_statusButton__zeFUj{align-items:center;border:none;border-radius:5px;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:600;gap:5px;padding:4px 8px;transition:all .2s ease}.UserStoryCard-module_statusWaiting__mTSf-{background:#fef3c7;color:#b45309}.UserStoryCard-module_statusInProgress__OsBoU{background:#ede9fe;color:#6d28d9}.UserStoryCard-module_statusSuccess__ufhqE{background:#dcfce7;color:#15803d}.UserStoryCard-module_loadingContainer__uPfG-{align-items:center;display:flex;flex-direction:column;gap:16px;justify-content:center;min-height:240px;padding:48px 24px;text-align:center}.UserStoryCard-module_loadingIconWrapper__5eUX7{align-items:center;background:#f4f1ff;border-radius:50%;display:flex;height:64px;justify-content:center;width:64px}.UserStoryCard-module_loadingTitle__MHwmb{color:#0f172a;font-size:18px;font-weight:600;margin:0}.UserStoryCard-module_loadingSubtitle__PKUur{color:#64748b;font-size:16px;margin-top:8px}.UserStoryCard-module_noDataContainer__Rys9X{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:24px;text-align:center}.UserStoryCard-module_noDataIllustration__BoSPy{height:auto;margin-bottom:12px;width:88px}.UserStoryCard-module_noDataTitle__DKazv{color:#111827;font-size:18px;font-weight:600;line-height:26px;margin:0 0 6px}.UserStoryCard-module_noDataSubtitle__ME3eH{color:#6b7280;font-size:14px;line-height:20px;margin:0;max-width:520px}.UserStoryCard-module_approveButtonContainer__5FUNI{align-items:center;display:flex;justify-content:center;padding-bottom:12px;width:100%}.UserStoryCard-module_approveButton__aIjbK{align-items:center;background:#0000;border:none;color:#5b3df5;cursor:pointer;display:inline-flex;font-size:16px;font-weight:600;gap:6px;padding:0}.UserStoryCard-module_approveButton__aIjbK:hover{opacity:.85}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={card:"UserStoryCard-module_card__9pErS",titleSection:"UserStoryCard-module_titleSection__pGbpL",titleRow:"UserStoryCard-module_titleRow__TyEN9",titleLeft:"UserStoryCard-module_titleLeft__fzF6u",titleActions:"UserStoryCard-module_titleActions__Dabx1",divider:"UserStoryCard-module_divider__xG-FC",displayName:"UserStoryCard-module_displayName__Jj-HK",displayNameIcon:"UserStoryCard-module_displayNameIcon__-SCM3",storyTitle:"UserStoryCard-module_storyTitle__FDX4p",iconButton:"UserStoryCard-module_iconButton__DkfRA",chevronButton:"UserStoryCard-module_chevronButton__nxxYC",chevronIcon:"UserStoryCard-module_chevronIcon__Azswy",cardContent:"UserStoryCard-module_cardContent__rR2g3",contentInner:"UserStoryCard-module_contentInner__AYQbu",descriptionSection:"UserStoryCard-module_descriptionSection__5j6cg",justifyBetween:"UserStoryCard-module_justifyBetween__cD-EG",savingSpinner:"UserStoryCard-module_savingSpinner__UmbEq",spinAnimation:"UserStoryCard-module_spinAnimation__INSou",spin:"UserStoryCard-module_spin__afcZ6",menuItemContent:"UserStoryCard-module_menuItemContent__U-ZxP",actionItemBtn:"UserStoryCard-module_actionItemBtn__3jocB",menuItemIcon:"UserStoryCard-module_menuItemIcon__BxrJU",menuItemRight:"UserStoryCard-module_menuItemRight__Cjw2j",wrapper:"UserStoryCard-module_wrapper__ahzRY",highlightNavigation:"UserStoryCard-module_highlightNavigation__vv8RW",navigationContainer:"UserStoryCard-module_navigationContainer__2UcOj",navButton:"UserStoryCard-module_navButton__EWoVi",navIcon:"UserStoryCard-module_navIcon__3ZSIH",navCounter:"UserStoryCard-module_navCounter__sIIeS",navButtons:"UserStoryCard-module_navButtons__6oLaN",menuItemContentPadded:"UserStoryCard-module_menuItemContentPadded__w6udq",userStoryCardWrapper:"UserStoryCard-module_userStoryCardWrapper__0gC-E",progressHeader:"UserStoryCard-module_progressHeader__LBMsg",progressPercentage:"UserStoryCard-module_progressPercentage__brScW",gapBox:"UserStoryCard-module_gapBox__LkEiT",storyTitleWrapper:"UserStoryCard-module_storyTitleWrapper__Ng-Th",titleEditButton:"UserStoryCard-module_titleEditButton__iJADR",inlineTitleEditor:"UserStoryCard-module_inlineTitleEditor__rdF-w",inlineTitleInput:"UserStoryCard-module_inlineTitleInput__Ft6mB",inlineTitleConfirm:"UserStoryCard-module_inlineTitleConfirm__YTG-3",inlineTitleCancel:"UserStoryCard-module_inlineTitleCancel__clhBR",addSectionButton:"UserStoryCard-module_addSectionButton__lBCWj",addSectionLabel:"UserStoryCard-module_addSectionLabel__kUs2E",viewStatusButton:"UserStoryCard-module_viewStatusButton__4-ISq",statusContainer:"UserStoryCard-module_statusContainer__Blr6F",completedBadge:"UserStoryCard-module_completedBadge__BURPe",statusButton:"UserStoryCard-module_statusButton__zeFUj",statusWaiting:"UserStoryCard-module_statusWaiting__mTSf-",statusInProgress:"UserStoryCard-module_statusInProgress__OsBoU",statusSuccess:"UserStoryCard-module_statusSuccess__ufhqE",loadingContainer:"UserStoryCard-module_loadingContainer__uPfG-",loadingIconWrapper:"UserStoryCard-module_loadingIconWrapper__5eUX7",loadingTitle:"UserStoryCard-module_loadingTitle__MHwmb",loadingSubtitle:"UserStoryCard-module_loadingSubtitle__PKUur",noDataContainer:"UserStoryCard-module_noDataContainer__Rys9X",noDataIllustration:"UserStoryCard-module_noDataIllustration__BoSPy",noDataTitle:"UserStoryCard-module_noDataTitle__DKazv",noDataSubtitle:"UserStoryCard-module_noDataSubtitle__ME3eH",approveButtonContainer:"UserStoryCard-module_approveButtonContainer__5FUNI",approveButton:"UserStoryCard-module_approveButton__aIjbK"};
2
2
  //# sourceMappingURL=UserStoryCard.module.css.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),o=require("react"),n=require("../RequirementAIWrapper/RequirementAIWrapper.js"),r=require("../../utils/userstory-approval-transform.utils.js"),a=require("../../utils/userstory-approval.utils.js"),i=require("../../hooks/useApprovalStatus.js"),l=require("./components/ContentSegment/ContentSegment.js"),s=require("./components/ApprovalBadge/ApprovalBadge.js"),d=require("./UserStoryApprovalScreen.module.css.js"),c=require("../../icons/CheckIcon.js"),u=require("../../icons/BookmarkIcon.js"),v=require("./components/ApprovalSidebar/ApprovalSidebar.js"),p=require("lucide-react"),g=require("./UserStoryApprovalContext.js"),S=require("../story-screen/BigEnoughPanel.js"),f=require("../../icons/BigEnoughIcon.js"),h={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},y={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},_=Object.assign(function(l){var s,c=l.artifactTitleIds,u=l.config,v=void 0===u?{}:u,p=l.callbacks,S=void 0===p?{}:p,f=l.labels,_=void 0===f?{}:f,m=l.isDisabled,A=void 0!==m&&m,b=l.children,I=l.classNames,C=l.selectedArtifactId,x=n.useRequirementAI(),j=x.userStory,E=x.customStyles,U=e.__assign(e.__assign({},h),v),N=e.__assign(e.__assign({},y),_),w=o.useState([]),k=w[0],q=w[1],F=o.useState(""),T=F[0],B=F[1],R=o.useState(""),D=R[0],P=R[1],M=o.useState(!1),W=M[0],O=M[1],V=o.useState(!0),z=V[0],L=V[1],H=o.useRef(void 0),G=o.useCallback(function(e,t,o,n){S.onShowNotification?S.onShowNotification(e,t,o,n):console.log("[".concat(e.toUpperCase(),"] ").concat(t,": ").concat(o))},[S]),Y=o.useCallback(function(e){S.onScrollToElement?S.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[S]),J=o.useMemo(function(){var e=k.findIndex(function(e){return e.artifactId===T});return e>=0?e:0},[k,T]),K=k[J];o.useEffect(function(){H.current=K},[K]),o.useEffect(function(){var e;if(null==j?void 0:j.length){null===(e=S.onInitialize)||void 0===e||e.call(S),1===j.length&&L(!1),j.length>0&&!T&&B(C||j[0].artifactId);var t=r.createUserStoriesForApproval(r.cloneUserStories(j));q(t)}},[j,C]),o.useEffect(function(){C&&C!==T&&B(C)},[C,T]),o.useEffect(function(){if(K){var e=a.getFirstNonApprovedSegmentId(K,"");P(e)}},[null==K?void 0:K.artifactId]);var Q=o.useCallback(function(t,o){q(function(n){var r=e.__spreadArray([],n,!0);if("APPROVED"===o.approval_status&&"APPROVED"!==n[t].approval_status){var i=a.getFirstUnapprovedStoryId(n,o.artifactId);i&&B(i)}return r[t]=o,r})},[]),X=o.useCallback(function(e){var t=H.current;if(t){var o=a.getFirstNonApprovedSegmentId(t,e);"NA"!==o&&(P(""),setTimeout(function(){P(o)},0))}},[]);i.useApprovalStatus({userStoryForApproval:k,selectedUserStoryForApproval:K,userStoryIndex:J,callbacks:S,labels:N,onSaveUserStory:Q});var Z=e.__assign({height:U.containerHeight},U.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}),$={userStoryForApproval:k,setUserStoryForApproval:q,selectedStoryArtifactId:T,setSelectedStoryArtifactId:B,selectedUserStoryIndex:J,selectedUserStoryForApproval:K,currentContentId:D,setCurrentContentId:P,isEditingSegment:W,setIsEditingSegment:O,isSidebarExpanded:z,setIsSidebarExpanded:L,artifactTitleIds:c,config:U,labels:N,callbacks:S,isDisabled:A,handleSaveUserStory:Q,handleUpdateContentId:X,showNotification:G,scrollToElement:Y};return t.jsx(g.UserStoryApprovalScreenContext.Provider,e.__assign({value:$},{children:t.jsx("div",e.__assign({className:"".concat(d.default.container," ").concat((null==I?void 0:I.container)||""),style:e.__assign(e.__assign({},Z),null===(s=null==E?void 0:E.approvalScreen)||void 0===s?void 0:s.wrapperContainer)},{children:b}))}))},{Sidebar:function(e){var o=e.Component,n=e.config,r=e.className,a=g.useUserStoryApprovalScreen(),i=a.isSidebarExpanded,l=a.selectedStoryArtifactId,s=a.setSelectedStoryArtifactId,d=a.userStoryForApproval,c=a.isEditingSegment,u=a.artifactTitleIds;return o?t.jsx(o,{isSidebarExpanded:i,selectedStoryArtifactId:l,setSelectedStoryArtifactId:s,userStoryForApproval:d,isEditingAnUserStorySegment:c,artifactTitleIds:u}):t.jsx(v.ApprovalSidebar,{config:n,className:r})},SidebarToggle:function(o){var n=o.OpenIcon,r=o.CloseIcon,a=o.className,i=void 0===a?"":a,l=g.useUserStoryApprovalScreen(),s=l.isSidebarExpanded,c=l.setIsSidebarExpanded,u=n||p.SidebarOpenIcon,v=r||p.SidebarCloseIcon;return t.jsx("div",e.__assign({className:"".concat(d.default.sidebarToggleWrapper," ").concat(i)},{children:t.jsx("button",e.__assign({onClick:function(){return c(function(e){return!e})},className:d.default.sidebarToggleBtn,"aria-label":s?"Collapse sidebar":"Expand sidebar",type:"button"},{children:s?t.jsx(v,{}):t.jsx(u,{})}))}))},Content:function(r){var i,l,v,p,h,y,_,m,A,b,I,C,x,j,E,U,N,w,k,q,F,T,B,R,D,P,M,W,O,V,z,L=r.children,H=r.ButtonComponent,G=r.hideApproveAll,Y=void 0!==G&&G,J=r.pageTitle,K=void 0===J?"Review Generated Requirements":J,Q=r.pageDescription,X=void 0===Q?"This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements.":Q,Z=g.useUserStoryApprovalScreen(),$=Z.selectedUserStoryForApproval,ee=Z.selectedUserStoryIndex,te=Z.artifactTitleIds,oe=Z.labels,ne=Z.config,re=Z.isDisabled,ae=Z.isEditingSegment,ie=Z.handleSaveUserStory,le=Z.setCurrentContentId,se=Z.showNotification,de=n.useRequirementAI(),ce=de.customStyles,ue=de.customIcons,ve=o.useState(!1),pe=ve[0],ge=ve[1],Se=o.useCallback(function(){if($)if(ae)se("warn","Warning!",oe.unsavedChangesWarning,3e3);else{var e=a.approveAllSegments($);ie(ee,e),le("")}},[$,ee,ae,oe,ie,le,se]);if(!$)return null;var fe=te[ee]||"",he="APPROVED"===$.approval_status,ye=null!=(null==$?void 0:$.big_enough)&&!Number.isNaN($.big_enough)&&!!(null==$?void 0:$.big_enough_decision_factors);return t.jsxs("div",e.__assign({className:d.default.content,style:e.__assign({},null===(l=null===(i=null==ce?void 0:ce.approvalScreen)||void 0===i?void 0:i.content)||void 0===l?void 0:l.content),"data-lsc-ui-page-title":K,"data-lsc-ui-page-description":X},{children:[t.jsxs("div",e.__assign({className:d.default.header,style:e.__assign({},null===(h=null===(p=null===(v=null==ce?void 0:ce.approvalScreen)||void 0===v?void 0:v.body)||void 0===p?void 0:p.contentSegment)||void 0===h?void 0:h.header)},{children:[t.jsxs("div",e.__assign({className:d.default.headerLeft,style:e.__assign({},null===(_=null===(y=null==ce?void 0:ce.approvalScreen)||void 0===y?void 0:y.content)||void 0===_?void 0:_.headerLeft)},{children:[t.jsxs("div",e.__assign({className:d.default.headerMeta,style:e.__assign({},null===(b=null===(A=null===(m=null==ce?void 0:ce.approvalScreen)||void 0===m?void 0:m.body)||void 0===A?void 0:A.contentSegment)||void 0===b?void 0:b.headerMeta)},{children:[t.jsx(u.BookmarkIcon,{size:16,color:(null===(x=null===(C=null===(I=null==ce?void 0:ce.approvalScreen)||void 0===I?void 0:I.body)||void 0===C?void 0:C.contentSegment)||void 0===x?void 0:x.bookMarkColor)||"#8C8C8C"}),t.jsx("h2",e.__assign({className:d.default.headerArtifactId,style:e.__assign({},null===(U=null===(E=null===(j=null==ce?void 0:ce.approvalScreen)||void 0===j?void 0:j.body)||void 0===E?void 0:E.contentSegment)||void 0===U?void 0:U.headerArtifactId)},{children:fe}))]})),t.jsx("p",e.__assign({className:d.default.headerTitle,style:e.__assign({},null===(k=null===(w=null===(N=null==ce?void 0:ce.approvalScreen)||void 0===N?void 0:N.body)||void 0===w?void 0:w.contentSegment)||void 0===k?void 0:k.headerTitle)},{children:null==$?void 0:$.title}))]})),t.jsxs("div",e.__assign({className:null===d.default||void 0===d.default?void 0:d.default.containerStyle,style:null===(F=null===(q=null==ce?void 0:ce.approvalScreen)||void 0===q?void 0:q.BigEnoughStyles)||void 0===F?void 0:F.containerStyle},{children:[ye&&t.jsx("button",e.__assign({className:d.default.developerEffortButton,style:null===(B=null===(T=null==ce?void 0:ce.approvalScreen)||void 0===T?void 0:T.BigEnoughStyles)||void 0===B?void 0:B.buttonStyle,onClick:function(){return ge(!pe)}},{children:t.jsx(f.default,{color:null===(D=null===(R=null==ce?void 0:ce.approvalScreen)||void 0===R?void 0:R.BigEnoughStyles)||void 0===D?void 0:D.iconColor,size:null===(M=null===(P=null==ce?void 0:ce.approvalScreen)||void 0===P?void 0:P.BigEnoughStyles)||void 0===M?void 0:M.iconSize})})),!Y&&ne.showApproveAllButton&&t.jsx("div",e.__assign({className:d.default.headerRight},{children:he?t.jsx(s.ApprovalBadge,{status:"APPROVED",label:oe.approved}):H?t.jsx(H,e.__assign({type:"fill",onClick:Se,isDisable:re,className:d.default.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:oe.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."}},{children:t.jsxs("div",e.__assign({className:d.default.approveAllContent},{children:[t.jsx(c.CheckIcon,{size:16,color:"white"}),t.jsx("span",{children:oe.approveAll})]}))})):t.jsxs("button",e.__assign({onClick:Se,disabled:re,className:d.default.approveAllButtonDefault,style:e.__assign({},null===(O=null===(W=null==ce?void 0:ce.approvalScreen)||void 0===W?void 0:W.content)||void 0===O?void 0:O.approveAllButtonDefault)},{children:[t.jsx(c.CheckIcon,{size:16,color:"white"}),t.jsx("span",{children:oe.approveAll})]}))}))]}))]})),pe&&ye&&t.jsx("div",e.__assign({className:d.default.bigEnoughWrapper},{children:t.jsx(S.BigEnoughPanel,{customIcons:null==ue?void 0:ue.userStoryIcons,customStyles:null===(V=null==ce?void 0:ce.approvalScreen)||void 0===V?void 0:V.aiReasoningCitaionStyles,currentUserStory:$,panelStyles:null===(z=null==ce?void 0:ce.approvalScreen)||void 0===z?void 0:z.BigEnoughStyles,showPanel:pe})})),L]}))},Body:function(r){var a,i,s,c=r.children,u=r.EditorComponent,v=r.ViewerComponent,p=g.useUserStoryApprovalScreen(),S=p.selectedUserStoryForApproval,f=p.selectedUserStoryIndex,h=p.artifactTitleIds,y=p.handleSaveUserStory,_=n.useRequirementAI().customStyles,m=o.useCallback(function(e){y(f,e)},[f,y]),A=o.useCallback(function(t,o){var n;if(S){var r=e.__assign(e.__assign({},S),{sub_features:null===(n=S.sub_features)||void 0===n?void 0:n.map(function(e,n){return n===t?o:e})});y(f,r)}},[S,f,y]),b=o.useCallback(function(t){var o;if(S){var n=e.__assign(e.__assign({},S),{sub_features:null===(o=S.sub_features)||void 0===o?void 0:o.filter(function(e,o){return o!==t})});y(f,n)}},[S,f,y]);if(!S)return null;var I=h[f]||"";return t.jsxs("div",e.__assign({className:d.default.body,style:e.__assign({},null===(i=null===(a=null==_?void 0:_.approvalScreen)||void 0===a?void 0:a.body)||void 0===i?void 0:i.container)},{children:[t.jsx(l.ContentSegment,{userStoryForApproval:S,artifactTitleId:I,onSaveMainStoryContent:m,EditorComponent:u,ViewerComponent:v}),null===(s=S.sub_features)||void 0===s?void 0:s.map(function(e,o){return t.jsx(l.ContentSegment,{userStoryForApproval:e,artifactTitleId:"".concat(I," - ").concat(String.fromCharCode(65+o)),isSubFeature:!0,subFeatureIndex:o,onSaveSubFeature:A,onDeleteSubFeature:b,EditorComponent:u,ViewerComponent:v},e.artifactId)}),c]}))}});exports.default=_;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),o=require("showdown"),r=require("../RequirementAIWrapper/RequirementAIWrapper.js"),l=require("../../utils/userstory-approval-transform.utils.js"),a=require("../../utils/userstory-approval.utils.js"),i=require("../../hooks/useApprovalStatus.js"),s=require("./components/ContentSegment/ContentSegment.js"),d=require("./components/ApprovalBadge/ApprovalBadge.js"),u=require("./UserStoryApprovalScreen.module.css.js"),c=require("../../icons/CheckIcon.js"),v=require("../../icons/BookmarkIcon.js"),p=require("./components/ApprovalSidebar/ApprovalSidebar.js"),g=require("lucide-react"),S=require("./UserStoryApprovalContext.js"),f=require("../story-screen/BigEnoughPanel.js"),h=require("../../icons/BigEnoughIcon.js"),m=require("@mui/material"),_=require("../../utils/helpers.js"),y=require("../../utils/user-story.utils.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=b(o),A={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},C={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},x=Object.assign(function(o){var s,d=o.artifactTitleIds,c=o.config,v=void 0===c?{}:c,p=o.callbacks,g=void 0===p?{}:p,f=o.labels,h=void 0===f?{}:f,m=o.isDisabled,_=void 0!==m&&m,y=o.children,b=o.classNames,I=o.selectedArtifactId,x=r.useRequirementAI(),j=x.userStory,w=x.customStyles,E=e.__assign(e.__assign({},A),v),k=e.__assign(e.__assign({},C),h),U=t.useState([]),N=U[0],q=U[1],T=t.useState(""),B=T[0],F=T[1],D=t.useState(""),M=D[0],R=D[1],P=t.useState(!1),z=P[0],O=P[1],W=t.useState(!0),L=W[0],V=W[1],H=t.useRef(void 0),G=t.useCallback(function(e,n,t,o){g.onShowNotification?g.onShowNotification(e,n,t,o):console.log("[".concat(e.toUpperCase(),"] ").concat(n,": ").concat(t))},[g]),Y=t.useCallback(function(e){g.onScrollToElement?g.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[g]),J=t.useMemo(function(){var e=N.findIndex(function(e){return e.artifactId===B});return e>=0?e:0},[N,B]),K=N[J];t.useEffect(function(){H.current=K},[K]),t.useEffect(function(){var e;if(null==j?void 0:j.length){null===(e=g.onInitialize)||void 0===e||e.call(g),1===j.length&&V(!1),j.length>0&&!B&&F(I||j[0].artifactId);var n=l.createUserStoriesForApproval(l.cloneUserStories(j));q(n)}},[j,I]),t.useEffect(function(){I&&I!==B&&F(I)},[I,B]),t.useEffect(function(){if(K){var e=a.getFirstNonApprovedSegmentId(K,"");R(e)}},[null==K?void 0:K.artifactId]);var Q=t.useCallback(function(n,t){q(function(o){var r=e.__spreadArray([],o,!0);if("APPROVED"===t.approval_status&&"APPROVED"!==o[n].approval_status){var l=a.getFirstUnapprovedStoryId(o,t.artifactId);l&&F(l)}return r[n]=t,r})},[]),X=t.useCallback(function(e){var n=H.current;if(n){var t=a.getFirstNonApprovedSegmentId(n,e);"NA"!==t&&(R(""),setTimeout(function(){R(t)},0))}},[]);i.useApprovalStatus({userStoryForApproval:N,selectedUserStoryForApproval:K,userStoryIndex:J,callbacks:g,labels:k,onSaveUserStory:Q});var Z=e.__assign({height:E.containerHeight},E.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}),$={userStoryForApproval:N,setUserStoryForApproval:q,selectedStoryArtifactId:B,setSelectedStoryArtifactId:F,selectedUserStoryIndex:J,selectedUserStoryForApproval:K,currentContentId:M,setCurrentContentId:R,isEditingSegment:z,setIsEditingSegment:O,isSidebarExpanded:L,setIsSidebarExpanded:V,artifactTitleIds:d,config:E,labels:k,callbacks:g,isDisabled:_,handleSaveUserStory:Q,handleUpdateContentId:X,showNotification:G,scrollToElement:Y};return n.jsx(S.UserStoryApprovalScreenContext.Provider,e.__assign({value:$},{children:n.jsx("div",e.__assign({className:"".concat(u.default.container," ").concat((null==b?void 0:b.container)||""),style:e.__assign(e.__assign({},Z),null===(s=null==w?void 0:w.approvalScreen)||void 0===s?void 0:s.wrapperContainer)},{children:y}))}))},{Sidebar:function(e){var t=e.Component,o=e.config,r=e.className,l=S.useUserStoryApprovalScreen(),a=l.isSidebarExpanded,i=l.selectedStoryArtifactId,s=l.setSelectedStoryArtifactId,d=l.userStoryForApproval,u=l.isEditingSegment,c=l.artifactTitleIds;return t?n.jsx(t,{isSidebarExpanded:a,selectedStoryArtifactId:i,setSelectedStoryArtifactId:s,userStoryForApproval:d,isEditingAnUserStorySegment:u,artifactTitleIds:c}):n.jsx(p.ApprovalSidebar,{config:o,className:r})},SidebarToggle:function(t){var o=t.OpenIcon,r=t.CloseIcon,l=t.className,a=void 0===l?"":l,i=S.useUserStoryApprovalScreen(),s=i.isSidebarExpanded,d=i.setIsSidebarExpanded,c=o||g.SidebarOpenIcon,v=r||g.SidebarCloseIcon;return n.jsx("div",e.__assign({className:"".concat(u.default.sidebarToggleWrapper," ").concat(a)},{children:n.jsx("button",e.__assign({onClick:function(){return d(function(e){return!e})},className:u.default.sidebarToggleBtn,"aria-label":s?"Collapse sidebar":"Expand sidebar",type:"button"},{children:s?n.jsx(v,{}):n.jsx(c,{})}))}))},Content:function(o){var l,i,s,p,b,A,C,x,j,w,E,k,U,N,q,T,B,F,D,M,R,P,z,O,W,L,V,H,G,Y,J,K=o.children,Q=o.ButtonComponent,X=o.hideApproveAll,Z=void 0!==X&&X,$=o.pageTitle,ee=void 0===$?"Review Generated Requirements":$,ne=o.showShareIcon,te=void 0!==ne&&ne,oe=o.handleDownloadUserStory,re=o.handleOpenSendDialog,le=o.pageDescription,ae=void 0===le?"This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements.":le,ie=S.useUserStoryApprovalScreen(),se=ie.selectedUserStoryForApproval,de=ie.selectedUserStoryIndex,ue=ie.artifactTitleIds,ce=ie.labels,ve=ie.config,pe=ie.isDisabled,ge=ie.isEditingSegment,Se=ie.handleSaveUserStory,fe=ie.setCurrentContentId,he=ie.showNotification,me=r.useRequirementAI(),_e=me.userStory;me.setUserStory;var ye=_e[0],be=t.useState(null),Ie=be[0],Ae=be[1],Ce=function(){Ae(null)},xe=t.useRef(null),je=t.useState(!1);je[0];var we=je[1],Ee=r.useRequirementAI(),ke=Ee.customStyles,Ue=Ee.customIcons,Ne=null==ke?void 0:ke.userStoryCardStyles,qe=t.useState(!1),Te=qe[0],Be=qe[1],Fe=t.useCallback(function(){if(se)if(ge)he("warn","Warning!",ce.unsavedChangesWarning,3e3);else{var e=a.approveAllSegments(se);Se(de,e),fe("")}},[se,de,ge,ce,Se,fe,he]);if(!se)return null;var De=ue[de]||"",Me="APPROVED"===se.approval_status,Re=null!=(null==se?void 0:se.big_enough)&&!Number.isNaN(se.big_enough)&&!!(null==se?void 0:se.big_enough_decision_factors);return n.jsxs("div",e.__assign({className:u.default.content,style:e.__assign({},null===(i=null===(l=null==ke?void 0:ke.approvalScreen)||void 0===l?void 0:l.content)||void 0===i?void 0:i.content),"data-lsc-ui-page-title":ee,"data-lsc-ui-page-description":ae},{children:[n.jsxs("div",e.__assign({className:u.default.header,style:e.__assign({},null===(b=null===(p=null===(s=null==ke?void 0:ke.approvalScreen)||void 0===s?void 0:s.body)||void 0===p?void 0:p.contentSegment)||void 0===b?void 0:b.header)},{children:[n.jsxs("div",e.__assign({className:u.default.headerLeft,style:e.__assign({},null===(C=null===(A=null==ke?void 0:ke.approvalScreen)||void 0===A?void 0:A.content)||void 0===C?void 0:C.headerLeft)},{children:[n.jsxs("div",e.__assign({className:u.default.headerMeta,style:e.__assign({},null===(w=null===(j=null===(x=null==ke?void 0:ke.approvalScreen)||void 0===x?void 0:x.body)||void 0===j?void 0:j.contentSegment)||void 0===w?void 0:w.headerMeta)},{children:[n.jsx(v.BookmarkIcon,{size:16,color:(null===(U=null===(k=null===(E=null==ke?void 0:ke.approvalScreen)||void 0===E?void 0:E.body)||void 0===k?void 0:k.contentSegment)||void 0===U?void 0:U.bookMarkColor)||"#8C8C8C"}),n.jsx("h2",e.__assign({className:u.default.headerArtifactId,style:e.__assign({},null===(T=null===(q=null===(N=null==ke?void 0:ke.approvalScreen)||void 0===N?void 0:N.body)||void 0===q?void 0:q.contentSegment)||void 0===T?void 0:T.headerArtifactId)},{children:De}))]})),n.jsx("p",e.__assign({className:u.default.headerTitle,style:e.__assign({},null===(D=null===(F=null===(B=null==ke?void 0:ke.approvalScreen)||void 0===B?void 0:B.body)||void 0===F?void 0:F.contentSegment)||void 0===D?void 0:D.headerTitle)},{children:null==se?void 0:se.title}))]})),n.jsxs("div",e.__assign({className:null===u.default||void 0===u.default?void 0:u.default.containerStyle,style:null===(R=null===(M=null==ke?void 0:ke.approvalScreen)||void 0===M?void 0:M.BigEnoughStyles)||void 0===R?void 0:R.containerStyle},{children:[Re&&n.jsx("button",e.__assign({className:u.default.developerEffortButton,style:null===(z=null===(P=null==ke?void 0:ke.approvalScreen)||void 0===P?void 0:P.BigEnoughStyles)||void 0===z?void 0:z.buttonStyle,onClick:function(){return Be(!Te)}},{children:n.jsx(h.default,{color:null===(W=null===(O=null==ke?void 0:ke.approvalScreen)||void 0===O?void 0:O.BigEnoughStyles)||void 0===W?void 0:W.iconColor,size:null===(V=null===(L=null==ke?void 0:ke.approvalScreen)||void 0===L?void 0:L.BigEnoughStyles)||void 0===V?void 0:V.iconSize})})),te&&n.jsxs(n.Fragment,{children:[n.jsx("button",e.__assign({className:u.default.iconButton,style:null==Ne?void 0:Ne.iconButton,onClick:function(e){Ae(e.currentTarget)}},{children:n.jsx(g.ExternalLink,{size:16})})),n.jsxs(m.Menu,e.__assign({id:"user-story-share-menu",anchorEl:Ie,open:!!Ie,onClose:function(){return Ae(null)},style:null==Ne?void 0:Ne.userStoryShareMenu},{children:[n.jsx(m.MenuItem,e.__assign({style:null==Ne?void 0:Ne.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 we(!0),oe?[4,Promise.all([oe("pdf"),oe("doc")])]:[2];case 1:return e.sent(),we(!1),[2]}})})}},{children:n.jsxs("div",e.__assign({ref:xe,className:u.default.menuItemContent,style:null==Ne?void 0:Ne.menuItemContent},{children:[n.jsx(g.Download,{size:16,color:null==Ne?void 0:Ne.menuIconColor}),n.jsx("p",e.__assign({style:null==Ne?void 0:Ne.menuLabel},{children:"Download"}))]}))})),n.jsx(m.MenuItem,e.__assign({style:null==Ne?void 0:Ne.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(t){return ye,n=e.__assign(e.__assign({},ye),{value:"".concat(y.replaceTitleSection(null==ye?void 0:ye.value,ye.title)," \n").concat(ye.value)}),null==re||re(!0,[n],ye.artifactId),Ce(),[2]})})}},{children:n.jsxs("div",e.__assign({style:null==Ne?void 0:Ne.menuItemContent,className:u.default.menuItemContentPadded},{children:[n.jsx(g.Share2,{size:16,color:null==Ne?void 0:Ne.menuIconColor}),n.jsx("p",e.__assign({style:null==Ne?void 0:Ne.menuLabel},{children:"Send"}))]}))})),n.jsx(m.MenuItem,e.__assign({style:null==Ne?void 0:Ne.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,t,o,r,l;return e.__generator(this,function(e){switch(e.label){case 0:n=new I.default.Converter,t=n.makeHtml(_.formatMarkdown(ye.value)||ye.value),o=function(e){var n=(new I.default.Converter).makeHtml(e),t=document.createElement("div");return t.innerHTML=n,t.textContent||t.innerText||""}(_.formatMarkdown(ye.value)||ye.value),r=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([r])];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 Ce(),[7];case 5:return[2]}})})}},{children:n.jsxs("div",e.__assign({style:null==Ne?void 0:Ne.menuItemContent,className:u.default.menuItemContentPadded},{children:[n.jsx(g.Copy,{size:16,color:null==Ne?void 0:Ne.menuIconColor}),n.jsx("p",e.__assign({style:null==Ne?void 0:Ne.menuLabel},{children:"Copy"}))]}))}))]}))]}),!Z&&ve.showApproveAllButton&&n.jsx("div",e.__assign({className:u.default.headerRight},{children:Me?n.jsx(d.ApprovalBadge,{status:"APPROVED",label:ce.approved}):Q?n.jsx(Q,e.__assign({type:"fill",onClick:Fe,isDisable:pe,className:u.default.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:ce.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."}},{children:n.jsxs("div",e.__assign({className:u.default.approveAllContent},{children:[n.jsx(c.CheckIcon,{size:16,color:"white"}),n.jsx("span",{children:ce.approveAll})]}))})):n.jsxs("button",e.__assign({onClick:Fe,disabled:pe,className:u.default.approveAllButtonDefault,style:e.__assign({},null===(G=null===(H=null==ke?void 0:ke.approvalScreen)||void 0===H?void 0:H.content)||void 0===G?void 0:G.approveAllButtonDefault)},{children:[n.jsx(c.CheckIcon,{size:16,color:"white"}),n.jsx("span",{children:ce.approveAll})]}))}))]}))]})),Te&&Re&&n.jsx("div",e.__assign({className:u.default.bigEnoughWrapper},{children:n.jsx(f.BigEnoughPanel,{customIcons:null==Ue?void 0:Ue.userStoryIcons,customStyles:null===(Y=null==ke?void 0:ke.approvalScreen)||void 0===Y?void 0:Y.aiReasoningCitaionStyles,currentUserStory:se,panelStyles:null===(J=null==ke?void 0:ke.approvalScreen)||void 0===J?void 0:J.BigEnoughStyles,showPanel:Te})})),K]}))},Body:function(o){var l,a,i,d=o.children,c=o.EditorComponent,v=o.ViewerComponent,p=o.handleDownloadUserStory,g=o.handleOpenSendDialog,f=o.showShareIcon,h=void 0!==f&&f,m=S.useUserStoryApprovalScreen(),_=m.selectedUserStoryForApproval,y=m.selectedUserStoryIndex,b=m.artifactTitleIds,I=m.handleSaveUserStory,A=r.useRequirementAI().customStyles,C=t.useCallback(function(e){I(y,e)},[y,I]),x=t.useCallback(function(n,t){var o;if(_){var r=e.__assign(e.__assign({},_),{sub_features:null===(o=_.sub_features)||void 0===o?void 0:o.map(function(e,o){return o===n?t:e})});I(y,r)}},[_,y,I]),j=t.useCallback(function(n){var t;if(_){var o=e.__assign(e.__assign({},_),{sub_features:null===(t=_.sub_features)||void 0===t?void 0:t.filter(function(e,t){return t!==n})});I(y,o)}},[_,y,I]);if(!_)return null;var w=b[y]||"";return n.jsxs("div",e.__assign({className:u.default.body,style:e.__assign({},null===(a=null===(l=null==A?void 0:A.approvalScreen)||void 0===l?void 0:l.body)||void 0===a?void 0:a.container)},{children:[n.jsx(s.ContentSegment,{userStoryForApproval:_,artifactTitleId:w,onSaveMainStoryContent:C,EditorComponent:c,ViewerComponent:v}),null===(i=_.sub_features)||void 0===i?void 0:i.map(function(e,t){return n.jsx(s.ContentSegment,{userStoryForApproval:e,artifactTitleId:"".concat(w," - ").concat(String.fromCharCode(65+t)),isSubFeature:!0,subFeatureIndex:t,onSaveSubFeature:x,onDeleteSubFeature:j,EditorComponent:c,ViewerComponent:v,handleDownloadUserStory:p,handleOpenSendDialog:g,showShareIcon:h},e.artifactId)}),d]}))}});exports.default=x;
2
2
  //# sourceMappingURL=UserStoryApprovalScreen.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryApprovalScreen-module_container__Hy5uc{border:1px solid #d1d5db;display:flex;flex-direction:row;font-family:Inter,sans-serif;min-height:100vh}.UserStoryApprovalScreen-module_container__Hy5uc *{font-family:inherit}.UserStoryApprovalScreen-module_developerEffortButton__9EfUX{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.UserStoryApprovalScreen-module_containerStyle__PS6Gn{align-items:center;display:flex;gap:3px}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{transition:color .2s ease}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:hover{opacity:.8}.UserStoryApprovalScreen-module_content__VQ6Z9{display:flex;flex:1;flex-direction:column;min-height:100%;overflow-y:auto;position:relative;width:100%}.UserStoryApprovalScreen-module_header__zsOki{align-items:center;background-color:#fff;border-bottom:1px solid #d1d5db;display:flex;flex-direction:row;justify-content:space-between;padding:16px 32px;position:sticky;top:0;z-index:50}.UserStoryApprovalScreen-module_headerLeft__s-1Eq{display:flex;flex-direction:column;gap:4px}.UserStoryApprovalScreen-module_headerMeta__3JPhW{align-items:center;color:#6932e2;display:flex;flex-direction:row;gap:8px}.UserStoryApprovalScreen-module_headerArtifactId__xjOR9{font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.UserStoryApprovalScreen-module_headerTitle__xxkv-{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.UserStoryApprovalScreen-module_headerRight__BWc-W{align-items:center;display:flex}.UserStoryApprovalScreen-module_approveAllButton__HkH1f{height:40px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs{align-items:center;display:flex;flex-direction:row;gap:4px;height:32px;padding:0 2px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs span{color:#fff;font-family:Inter,sans-serif;font-size:14px;text-transform:none}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR{align-items:center;background:linear-gradient(115.1deg,#2546f0 -23.58%,#5928ed 74.92%);border:none;border-radius:8px;color:#fff;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;font-size:14px;gap:4px;height:40px;padding:0 16px;transition:opacity .2s ease}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:hover{opacity:.9}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:disabled{cursor:not-allowed;opacity:.5}.UserStoryApprovalScreen-module_body__aAJwQ{display:flex;flex-direction:column;width:100%}.UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4{flex-shrink:0;height:100%;position:relative;width:0}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;left:0;margin:0;padding:0;position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s ease;z-index:10}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:focus{outline:none}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"UserStoryApprovalScreen-module_container__Hy5uc",sidebarToggleWrapper:"UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4",developerEffortButton:"UserStoryApprovalScreen-module_developerEffortButton__9EfUX",containerStyle:"UserStoryApprovalScreen-module_containerStyle__PS6Gn",sidebarToggleBtn:"UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf",content:"UserStoryApprovalScreen-module_content__VQ6Z9",header:"UserStoryApprovalScreen-module_header__zsOki",headerLeft:"UserStoryApprovalScreen-module_headerLeft__s-1Eq",headerMeta:"UserStoryApprovalScreen-module_headerMeta__3JPhW",headerArtifactId:"UserStoryApprovalScreen-module_headerArtifactId__xjOR9",headerTitle:"UserStoryApprovalScreen-module_headerTitle__xxkv-",headerRight:"UserStoryApprovalScreen-module_headerRight__BWc-W",approveAllButton:"UserStoryApprovalScreen-module_approveAllButton__HkH1f",approveAllContent:"UserStoryApprovalScreen-module_approveAllContent__-UTDs",approveAllButtonDefault:"UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR",body:"UserStoryApprovalScreen-module_body__aAJwQ"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryApprovalScreen-module_container__Hy5uc{border:1px solid #d1d5db;display:flex;flex-direction:row;font-family:Inter,sans-serif;min-height:100vh}.UserStoryApprovalScreen-module_container__Hy5uc *{font-family:inherit}.UserStoryApprovalScreen-module_developerEffortButton__9EfUX{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.UserStoryApprovalScreen-module_containerStyle__PS6Gn{align-items:center;display:flex;gap:3px}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{transition:color .2s ease}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:hover{opacity:.8}.UserStoryApprovalScreen-module_content__VQ6Z9{display:flex;flex:1;flex-direction:column;min-height:100%;overflow-y:auto;position:relative;width:100%}.UserStoryApprovalScreen-module_header__zsOki{align-items:center;background-color:#fff;border-bottom:1px solid #d1d5db;display:flex;flex-direction:row;justify-content:space-between;padding:16px 32px;position:sticky;top:0;z-index:50}.UserStoryApprovalScreen-module_headerLeft__s-1Eq{display:flex;flex-direction:column;gap:4px}.UserStoryApprovalScreen-module_headerMeta__3JPhW{align-items:center;color:#6932e2;display:flex;flex-direction:row;gap:8px}.UserStoryApprovalScreen-module_headerArtifactId__xjOR9{font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.UserStoryApprovalScreen-module_headerTitle__xxkv-{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.UserStoryApprovalScreen-module_headerRight__BWc-W{align-items:center;display:flex}.UserStoryApprovalScreen-module_approveAllButton__HkH1f{height:40px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs{align-items:center;display:flex;flex-direction:row;gap:4px;height:32px;padding:0 2px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs span{color:#fff;font-family:Inter,sans-serif;font-size:14px;text-transform:none}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR{align-items:center;background:linear-gradient(115.1deg,#2546f0 -23.58%,#5928ed 74.92%);border:none;border-radius:8px;color:#fff;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;font-size:14px;gap:4px;height:40px;padding:0 16px;transition:opacity .2s ease}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:hover{opacity:.9}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:disabled{cursor:not-allowed;opacity:.5}.UserStoryApprovalScreen-module_body__aAJwQ{display:flex;flex-direction:column;width:100%}.UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4{flex-shrink:0;height:100%;position:relative;width:0}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;left:0;margin:0;padding:0;position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s ease;z-index:10}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:focus{outline:none}.UserStoryApprovalScreen-module_iconButton__PGTVl{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryApprovalScreen-module_menuItemContent__SCM6V{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryApprovalScreen-module_menuItemContentPadded__3UjuU{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"UserStoryApprovalScreen-module_container__Hy5uc",sidebarToggleWrapper:"UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4",developerEffortButton:"UserStoryApprovalScreen-module_developerEffortButton__9EfUX",containerStyle:"UserStoryApprovalScreen-module_containerStyle__PS6Gn",sidebarToggleBtn:"UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf",content:"UserStoryApprovalScreen-module_content__VQ6Z9",header:"UserStoryApprovalScreen-module_header__zsOki",headerLeft:"UserStoryApprovalScreen-module_headerLeft__s-1Eq",headerMeta:"UserStoryApprovalScreen-module_headerMeta__3JPhW",headerArtifactId:"UserStoryApprovalScreen-module_headerArtifactId__xjOR9",headerTitle:"UserStoryApprovalScreen-module_headerTitle__xxkv-",headerRight:"UserStoryApprovalScreen-module_headerRight__BWc-W",approveAllButton:"UserStoryApprovalScreen-module_approveAllButton__HkH1f",approveAllContent:"UserStoryApprovalScreen-module_approveAllContent__-UTDs",approveAllButtonDefault:"UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR",body:"UserStoryApprovalScreen-module_body__aAJwQ",iconButton:"UserStoryApprovalScreen-module_iconButton__PGTVl",menuItemContent:"UserStoryApprovalScreen-module_menuItemContent__SCM6V",menuItemContentPadded:"UserStoryApprovalScreen-module_menuItemContentPadded__3UjuU"};
2
2
  //# sourceMappingURL=UserStoryApprovalScreen.module.css.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("react"),i=require("../ContentBlock/ContentBlock.js"),l=require("./ContentSegment.module.css.js"),a=require("../../../../icons/ChevronUpIcon.js"),t=require("../../../../icons/BookmarkIcon.js"),s=require("../../../../icons/ChevronDownIcon.js"),r=require("../../../RequirementAIWrapper/RequirementAIWrapper.js"),u=require("../../../story-screen/BigEnoughPanel.js"),d=function(d){var v,c,_,g,p,m,S,f,h,C,y,b,j,I,x,k,q,A,N,B,F,E,M,T,w,D,R,W,z,P=d.userStoryForApproval,U=d.artifactTitleId,V=d.isSubFeature,O=void 0!==V&&V,G=d.subFeatureIndex,H=d.onSaveSubFeature,J=d.onDeleteSubFeature,K=d.onSaveMainStoryContent,L=d.EditorComponent,Q=d.ViewerComponent,X=o.useState(!0),Y=X[0],Z=X[1],$=r.useRequirementAI(),ee=$.customStyles,ne=$.customIcons,oe=o.useCallback(function(){Z(function(e){return!e})},[]),ie=o.useCallback(function(n){if(void 0!==G){var o=e.__assign(e.__assign({},P),{value:P.value.map(function(o,i){return i===n?e.__assign(e.__assign({},o),{isApproved:!0}):o})});null==H||H(G,o)}},[P,G,H]),le=o.useCallback(function(n,o){if(void 0!==G){var i=e.__assign(e.__assign({},P),{value:P.value.map(function(i,l){return l===n?e.__assign(e.__assign({},i),{content:o}):i})});null==H||H(G,i)}},[P,G,H]),ae=o.useCallback(function(n){if(void 0!==G){var o=e.__assign(e.__assign({},P),{value:P.value.filter(function(e,o){return o!==n})});0!==o.value.length?null==H||H(G,o):null==J||J(G)}},[P,G,H,J]),te=o.useCallback(function(n,o){var i;if(!O){var l=null===(i=P.value[n])||void 0===i?void 0:i.contentId;if(l){var a=e.__assign(e.__assign({},P),{value:P.value.map(function(n){return n.contentId===l?e.__assign(e.__assign({},n),{content:o}):n})});null==K||K(a)}}},[P,O,K]),se=o.useCallback(function(n){var o;if(!O){var i=null===(o=P.value[n])||void 0===o?void 0:o.contentId;if(i){var l=e.__assign(e.__assign({},P),{value:P.value.map(function(n){return n.contentId===i?e.__assign(e.__assign({},n),{isApproved:!0}):n})});null==K||K(l)}}},[P,O,K]),re=null!=(null==P?void 0:P.big_enough)&&!Number.isNaN(P.big_enough)&&!!(null==P?void 0:P.big_enough_decision_factors);return n.jsxs("div",e.__assign({className:l.default.container,style:e.__assign({},null===(_=null===(c=null===(v=null==ee?void 0:ee.approvalScreen)||void 0===v?void 0:v.body)||void 0===c?void 0:c.contentSegment)||void 0===_?void 0:_.container)},{children:[O&&n.jsxs("button",e.__assign({onClick:oe,className:l.default.header,style:e.__assign({},null===(m=null===(p=null===(g=null==ee?void 0:ee.approvalScreen)||void 0===g?void 0:g.body)||void 0===p?void 0:p.contentSegment)||void 0===m?void 0:m.header)},{children:[n.jsxs("div",e.__assign({className:l.default.headerContent,style:e.__assign({},null===(h=null===(f=null===(S=null==ee?void 0:ee.approvalScreen)||void 0===S?void 0:S.body)||void 0===f?void 0:f.contentSegment)||void 0===h?void 0:h.headerContent)},{children:[n.jsxs("div",e.__assign({className:l.default.headerMeta,style:e.__assign({},null===(b=null===(y=null===(C=null==ee?void 0:ee.approvalScreen)||void 0===C?void 0:C.body)||void 0===y?void 0:y.contentSegment)||void 0===b?void 0:b.headerMeta)},{children:[n.jsx(t.BookmarkIcon,{size:16,color:(null===(x=null===(I=null===(j=null==ee?void 0:ee.approvalScreen)||void 0===j?void 0:j.body)||void 0===I?void 0:I.contentSegment)||void 0===x?void 0:x.bookMarkColor)||"#8C8C8C"}),n.jsx("h2",e.__assign({className:l.default.headerArtifactId,style:e.__assign({},null===(A=null===(q=null===(k=null==ee?void 0:ee.approvalScreen)||void 0===k?void 0:k.body)||void 0===q?void 0:q.contentSegment)||void 0===A?void 0:A.headerArtifactId)},{children:U}))]})),n.jsx("p",e.__assign({className:l.default.headerTitle,style:e.__assign({},null===(F=null===(B=null===(N=null==ee?void 0:ee.approvalScreen)||void 0===N?void 0:N.body)||void 0===B?void 0:B.contentSegment)||void 0===F?void 0:F.headerTitle)},{children:null==P?void 0:P.title}))]})),n.jsxs("div",e.__assign({className:l.default.headerToggle,style:e.__assign({},null===(T=null===(M=null===(E=null==ee?void 0:ee.approvalScreen)||void 0===E?void 0:E.body)||void 0===M?void 0:M.contentSegment)||void 0===T?void 0:T.headerToggle)},{children:[re&&n.jsx(u.BigEnoughPanel,{customIcons:null==ne?void 0:ne.userStoryIcons,customStyles:null===(w=null==ee?void 0:ee.approvalScreen)||void 0===w?void 0:w.aiReasoningCitaionStyles,currentUserStory:P,panelStyles:null===(D=null==ee?void 0:ee.approvalScreen)||void 0===D?void 0:D.BigEnoughStyles}),Y?n.jsx(a.ChevronUpIcon,{size:16}):n.jsx(s.ChevronDownIcon,{size:16})]}))]})),Y&&n.jsx("div",e.__assign({className:l.default.contentWrapper,style:e.__assign({},null===(z=null===(W=null===(R=null==ee?void 0:ee.approvalScreen)||void 0===R?void 0:R.body)||void 0===W?void 0:W.contentSegment)||void 0===z?void 0:z.contentWrapper)},{children:Array.isArray(null==P?void 0:P.value)&&P.value.map(function(e,o){return n.jsx(i.ContentBlock,{segment:e,segmentIndex:o,isSubFeature:O,onSaveContent:O?le:te,onApproveContent:O?ie:se,onDeleteContent:O?ae:void 0,EditorComponent:L,ViewerComponent:Q},e.contentId)})}))]}))};exports.ContentSegment=d,exports.default=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("react"),l=require("../ContentBlock/ContentBlock.js"),t=require("./ContentSegment.module.css.js"),i=require("../../../../icons/ChevronUpIcon.js"),r=require("../../../../icons/BookmarkIcon.js"),s=require("../../../../icons/ChevronDownIcon.js"),a=require("../../../RequirementAIWrapper/RequirementAIWrapper.js"),u=require("../../../story-screen/BigEnoughPanel.js"),d=require("@mui/material"),v=require("lucide-react"),c=require("showdown"),_=require("../../../../utils/helpers.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=m(c),p=function(c){var m,p,f,h,y,S,C,b,j,x,I,k,w,q,M,N,B,A,D,E,F,T,z,P,L,R,U,W,H,O=c.userStoryForApproval,V=c.artifactTitleId,G=c.isSubFeature,J=void 0!==G&&G,K=c.subFeatureIndex,Q=c.onSaveSubFeature,X=c.onDeleteSubFeature,Y=c.onSaveMainStoryContent,Z=c.EditorComponent,$=c.ViewerComponent,ee=c.handleDownloadUserStory,ne=c.handleOpenSendDialog,oe=c.showShareIcon,le=void 0!==oe&&oe,te=o.useState(!0),ie=te[0],re=te[1],se=a.useRequirementAI(),ae=se.customStyles,ue=se.customIcons,de=null==ae?void 0:ae.userStoryCardStyles,ve=o.useState(null),ce=ve[0],_e=ve[1],me=o.useState(!1);me[0];var ge=me[1],pe=o.useRef(null),fe=o.useCallback(function(){re(function(e){return!e})},[]),he=o.useCallback(function(n){if(void 0!==K){var o=e.__assign(e.__assign({},O),{value:O.value.map(function(o,l){return l===n?e.__assign(e.__assign({},o),{isApproved:!0}):o})});null==Q||Q(K,o)}},[O,K,Q]),ye=o.useCallback(function(n,o){if(void 0!==K){var l=e.__assign(e.__assign({},O),{value:O.value.map(function(l,t){return t===n?e.__assign(e.__assign({},l),{content:o}):l})});null==Q||Q(K,l)}},[O,K,Q]),Se=o.useCallback(function(n){if(void 0!==K){var o=e.__assign(e.__assign({},O),{value:O.value.filter(function(e,o){return o!==n})});0!==o.value.length?null==Q||Q(K,o):null==X||X(K)}},[O,K,Q,X]),Ce=o.useCallback(function(n,o){var l;if(!J){var t=null===(l=O.value[n])||void 0===l?void 0:l.contentId;if(t){var i=e.__assign(e.__assign({},O),{value:O.value.map(function(n){return n.contentId===t?e.__assign(e.__assign({},n),{content:o}):n})});null==Y||Y(i)}}},[O,J,Y]),be=o.useCallback(function(n){var o;if(!J){var l=null===(o=O.value[n])||void 0===o?void 0:o.contentId;if(l){var t=e.__assign(e.__assign({},O),{value:O.value.map(function(n){return n.contentId===l?e.__assign(e.__assign({},n),{isApproved:!0}):n})});null==Y||Y(t)}}},[O,J,Y]),je=function(){_e(null)},xe=function(n){var o,l=n.value.map(function(e){return e.content}).join("");return e.__assign(e.__assign({},n),{value:l,sub_features:null===(o=n.sub_features)||void 0===o?void 0:o.map(xe)})},Ie=null!=(null==O?void 0:O.big_enough)&&!Number.isNaN(O.big_enough)&&!!(null==O?void 0:O.big_enough_decision_factors);return n.jsxs("div",e.__assign({className:t.default.container,style:e.__assign({},null===(f=null===(p=null===(m=null==ae?void 0:ae.approvalScreen)||void 0===m?void 0:m.body)||void 0===p?void 0:p.contentSegment)||void 0===f?void 0:f.container)},{children:[J&&n.jsxs("button",e.__assign({onClick:fe,className:t.default.header,style:e.__assign({},null===(S=null===(y=null===(h=null==ae?void 0:ae.approvalScreen)||void 0===h?void 0:h.body)||void 0===y?void 0:y.contentSegment)||void 0===S?void 0:S.header)},{children:[n.jsxs("div",e.__assign({className:t.default.headerContent,style:e.__assign({},null===(j=null===(b=null===(C=null==ae?void 0:ae.approvalScreen)||void 0===C?void 0:C.body)||void 0===b?void 0:b.contentSegment)||void 0===j?void 0:j.headerContent)},{children:[n.jsxs("div",e.__assign({className:t.default.headerMeta,style:e.__assign({},null===(k=null===(I=null===(x=null==ae?void 0:ae.approvalScreen)||void 0===x?void 0:x.body)||void 0===I?void 0:I.contentSegment)||void 0===k?void 0:k.headerMeta)},{children:[n.jsx(r.BookmarkIcon,{size:16,color:(null===(M=null===(q=null===(w=null==ae?void 0:ae.approvalScreen)||void 0===w?void 0:w.body)||void 0===q?void 0:q.contentSegment)||void 0===M?void 0:M.bookMarkColor)||"#8C8C8C"}),n.jsx("h2",e.__assign({className:t.default.headerArtifactId,style:e.__assign({},null===(A=null===(B=null===(N=null==ae?void 0:ae.approvalScreen)||void 0===N?void 0:N.body)||void 0===B?void 0:B.contentSegment)||void 0===A?void 0:A.headerArtifactId)},{children:V}))]})),n.jsx("p",e.__assign({className:t.default.headerTitle,style:e.__assign({},null===(F=null===(E=null===(D=null==ae?void 0:ae.approvalScreen)||void 0===D?void 0:D.body)||void 0===E?void 0:E.contentSegment)||void 0===F?void 0:F.headerTitle)},{children:null==O?void 0:O.title}))]})),n.jsxs("div",e.__assign({className:t.default.headerToggle,style:e.__assign({},null===(P=null===(z=null===(T=null==ae?void 0:ae.approvalScreen)||void 0===T?void 0:T.body)||void 0===z?void 0:z.contentSegment)||void 0===P?void 0:P.headerToggle)},{children:[Ie&&n.jsx(u.BigEnoughPanel,{customIcons:null==ue?void 0:ue.userStoryIcons,customStyles:null===(L=null==ae?void 0:ae.approvalScreen)||void 0===L?void 0:L.aiReasoningCitaionStyles,currentUserStory:O,panelStyles:null===(R=null==ae?void 0:ae.approvalScreen)||void 0===R?void 0:R.BigEnoughStyles}),le&&n.jsxs(n.Fragment,{children:[n.jsx("button",e.__assign({className:t.default.iconButton,style:null==de?void 0:de.iconButton,onClick:function(e){_e(e.currentTarget)}},{children:n.jsx(v.ExternalLink,{size:16})})),n.jsxs(d.Menu,e.__assign({id:"user-story-share-menu",anchorEl:ce,open:!!ce,onClose:function(){return _e(null)},style:null==de?void 0:de.userStoryShareMenu},{children:[n.jsx(d.MenuItem,e.__assign({style:null==de?void 0:de.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 ge(!0),ee?[4,Promise.all([ee("pdf"),ee("doc")])]:[2];case 1:return e.sent(),ge(!1),[2]}})})}},{children:n.jsxs("div",e.__assign({ref:pe,className:t.default.menuItemContent,style:null==de?void 0:de.menuItemContent},{children:[n.jsx(v.Download,{size:16,color:null==de?void 0:de.menuIconColor}),n.jsx("p",e.__assign({style:null==de?void 0:de.menuLabel},{children:"Download"}))]}))})),n.jsx(d.MenuItem,e.__assign({style:null==de?void 0:de.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(e){return n=xe(O),null==ne||ne(!0,[n],O.artifactId),je(),[2]})})}},{children:n.jsxs("div",e.__assign({style:null==de?void 0:de.menuItemContent,className:t.default.menuItemContentPadded},{children:[n.jsx(v.Share2,{size:16,color:null==de?void 0:de.menuIconColor}),n.jsx("p",e.__assign({style:null==de?void 0:de.menuLabel},{children:"Send"}))]}))})),n.jsx(d.MenuItem,e.__assign({style:null==de?void 0:de.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,o,l,t,i,r;return e.__generator(this,function(e){switch(e.label){case 0:n=new g.default.Converter,o=O.value.map(function(e){return e.content}).join(""),l=n.makeHtml(_.formatMarkdown(o)||o),t=function(e){var n=(new g.default.Converter).makeHtml(e),o=document.createElement("div");return o.innerHTML=n,o.textContent||o.innerText||""}(_.formatMarkdown(o)||o),i=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([l],{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 r=e.sent(),console.error("Failed to copy user story:",r),[3,5];case 4:return je(),[7];case 5:return[2]}})})}},{children:n.jsxs("div",e.__assign({style:null==de?void 0:de.menuItemContent,className:t.default.menuItemContentPadded},{children:[n.jsx(v.Copy,{size:16,color:null==de?void 0:de.menuIconColor}),n.jsx("p",e.__assign({style:null==de?void 0:de.menuLabel},{children:"Copy"}))]}))}))]}))]}),ie?n.jsx(i.ChevronUpIcon,{size:16}):n.jsx(s.ChevronDownIcon,{size:16})]}))]})),ie&&n.jsx("div",e.__assign({className:t.default.contentWrapper,style:e.__assign({},null===(H=null===(W=null===(U=null==ae?void 0:ae.approvalScreen)||void 0===U?void 0:U.body)||void 0===W?void 0:W.contentSegment)||void 0===H?void 0:H.contentWrapper)},{children:Array.isArray(null==O?void 0:O.value)&&O.value.map(function(e,o){return n.jsx(l.ContentBlock,{segment:e,segmentIndex:o,isSubFeature:J,onSaveContent:J?ye:Ce,onApproveContent:J?he:be,onDeleteContent:J?Se:void 0,EditorComponent:Z,ViewerComponent:$},e.contentId)})}))]}))};exports.ContentSegment=p,exports.default=p;
2
2
  //# sourceMappingURL=ContentSegment.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".ContentSegment-module_container__pZD9O{display:flex;flex-direction:column;font-family:Inter,sans-serif}.ContentSegment-module_header__zzh-M{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-left:none;border-right:none;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;justify-content:space-between;padding:1rem 2rem;position:relative}.ContentSegment-module_headerContent__o77O4{display:flex;flex-direction:column;gap:.5rem}.ContentSegment-module_headerMeta__Iv4Wf{align-items:center;color:#8c8c8c;display:flex;flex-direction:row;gap:8px}.ContentSegment-module_headerArtifactId__Gr4B2{color:#6932e2;font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.ContentSegment-module_headerTitle__U7nsT{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.ContentSegment-module_headerToggle__45got{align-items:center;display:flex;justify-content:center}.ContentSegment-module_contentWrapper__eIUig{display:flex;flex-direction:column;gap:16px;padding:16px 32px}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={container:"ContentSegment-module_container__pZD9O",header:"ContentSegment-module_header__zzh-M",headerContent:"ContentSegment-module_headerContent__o77O4",headerMeta:"ContentSegment-module_headerMeta__Iv4Wf",headerArtifactId:"ContentSegment-module_headerArtifactId__Gr4B2",headerTitle:"ContentSegment-module_headerTitle__U7nsT",headerToggle:"ContentSegment-module_headerToggle__45got",contentWrapper:"ContentSegment-module_contentWrapper__eIUig"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".ContentSegment-module_container__pZD9O{display:flex;flex-direction:column;font-family:Inter,sans-serif}.ContentSegment-module_header__zzh-M{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-left:none;border-right:none;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;justify-content:space-between;padding:1rem 2rem;position:relative}.ContentSegment-module_headerContent__o77O4{display:flex;flex-direction:column;gap:.5rem}.ContentSegment-module_headerMeta__Iv4Wf{align-items:center;color:#8c8c8c;display:flex;flex-direction:row;gap:8px}.ContentSegment-module_headerArtifactId__Gr4B2{color:#6932e2;font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.ContentSegment-module_headerTitle__U7nsT{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.ContentSegment-module_headerToggle__45got{align-items:center;display:flex;justify-content:center}.ContentSegment-module_contentWrapper__eIUig{display:flex;flex-direction:column;gap:16px;padding:16px 32px}.ContentSegment-module_iconButton__0F6ls{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.ContentSegment-module_menuItemContent__39-so{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.ContentSegment-module_menuItemContentPadded__CP7YL{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={container:"ContentSegment-module_container__pZD9O",header:"ContentSegment-module_header__zzh-M",headerContent:"ContentSegment-module_headerContent__o77O4",headerMeta:"ContentSegment-module_headerMeta__Iv4Wf",headerArtifactId:"ContentSegment-module_headerArtifactId__Gr4B2",headerTitle:"ContentSegment-module_headerTitle__U7nsT",headerToggle:"ContentSegment-module_headerToggle__45got",contentWrapper:"ContentSegment-module_contentWrapper__eIUig",iconButton:"ContentSegment-module_iconButton__0F6ls",menuItemContent:"ContentSegment-module_menuItemContent__39-so",menuItemContentPadded:"ContentSegment-module_menuItemContentPadded__CP7YL"};
2
2
  //# sourceMappingURL=ContentSegment.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsxs as n,jsx as o,Fragment as l}from"react/jsx-runtime";import{useState as e,useMemo as t}from"react";import{Bookmark as s,ChevronDown as a,ChevronRight as d,Info as r}from"lucide-react";import{Tooltip as c}from"@mui/material";import{v4 as u}from"uuid";import v from"../RiskSidebarCategorySection/RiskSidebarCategorySection.js";import m from"../RiskCategorySection/RiskCategorySection.js";import h from"./StoryNode.module.css.js";var g=function(i){var n,o,l,e,t,s,a,d=(null===(o=null===(n=i.display_items)||void 0===n?void 0:n.critical)||void 0===o?void 0:o.length)||0,r=(null===(e=null===(l=i.display_items)||void 0===l?void 0:l.warning)||void 0===e?void 0:e.length)||0,c=(null===(s=null===(t=i.display_items)||void 0===t?void 0:t.recommendation)||void 0===s?void 0:s.length)||0;if((null===(a=i.sub_feature)||void 0===a?void 0:a.length)>0)for(var u=0,v=i.sub_feature;u<v.length;u++){var m=v[u],h=g(m);d+=h.critical,r+=h.warning,c+=h.recommendation}return{critical:d,warning:r,recommendation:c}};function p(n,l,e,t){for(var s,a=[],d=/<learned>(.*?)<\/learned>/g,v=0,m=0,g=l||r;null!==(s=d.exec(n));){s[0];var p=s[1],y=s.index;y>v&&a.push(o("span",{children:n.slice(v,y)},"text-pre-".concat(m++))),a.push(o(c,i({title:p,placement:"top"},{children:o(g,{size:t||16,className:h.infoIcon,style:{color:e,width:t,height:t}})}),"tooltip-".concat(u()))),v=d.lastIndex}return v<(null==n?void 0:n.length)&&a.push(o("span",{children:n.slice(v)},"text-post-".concat(m++))),a}var y=function(r){var u,C,f,I,S,k,b,w,N,R,_,x,G,z,A,W,F,H,P,j,L,O,B,D,M=r.story,T=r.depth,E=void 0===T?0:T,J=r.onClickStoryNodeCallback,q=r.type,K=r.isProcessingGapItems,Q=r.onClickAiReasoning,U=r.handleFixRisk,V=r.handleHighlightGapContent,X=r.customStyles,Y=r.customIcons,Z=r.onSelectStory,$=r.rootArtifactId,ii=void 0===$?M.id:$,ni=e(0===E),oi=ni[0],li=ni[1],ei=e(!1),ti=ei[0],si=ei[1],ai=null==X?void 0:X.storyNode,di=(null===(u=null==Y?void 0:Y.icons)||void 0===u?void 0:u.bookmarkIcon)||s,ri=(null===(C=null==Y?void 0:Y.icons)||void 0===C?void 0:C.chevronDownIcon)||a,ci=(null===(f=null==Y?void 0:Y.icons)||void 0===f?void 0:f.chevronRightIcon)||d,ui=t(function(){return M.display_items.critical.length>0?"Critical":M.display_items.warning.length>0?"Warning":M.display_items.recommendation.length>0?"Suggestion":null},[M.display_items,q]),vi=t(function(){return g(M)},[M]),mi=0===((null===(S=null===(I=M.display_items)||void 0===I?void 0:I.critical)||void 0===S?void 0:S.length)||0)+((null===(b=null===(k=M.display_items)||void 0===k?void 0:k.warning)||void 0===b?void 0:b.length)||0)+((null===(N=null===(w=M.display_items)||void 0===w?void 0:w.recommendation)||void 0===N?void 0:N.length)||0);return n("div",i({className:"".concat(h.container," ").concat(E>0?h.nestedContainer:""),style:i(i({},null==ai?void 0:ai.container),E>0?null==ai?void 0:ai.nestedContainer:{})},{children:[n("div",i({onClick:function(){li(!oi),null==J||J(),null==Z||Z(ii)},className:h.headerRow,style:i(i({},null==ai?void 0:ai.headerRow),ti?null==ai?void 0:ai.headerRowHover:{}),onMouseEnter:function(){return si(!0)},onMouseLeave:function(){return si(!1)}},{children:[o("div",i({className:h.chevronWrapper,style:null==ai?void 0:ai.chevronWrapper},{children:oi?o(ri,{className:h.chevronIcon,style:{color:null===(R=null==Y?void 0:Y.iconColors)||void 0===R?void 0:R.chevronIcon,width:null===(_=null==Y?void 0:Y.iconSizes)||void 0===_?void 0:_.chevronIcon,height:null===(x=null==Y?void 0:Y.iconSizes)||void 0===x?void 0:x.chevronIcon}}):o(ci,{className:h.chevronIcon,style:{color:null===(G=null==Y?void 0:Y.iconColors)||void 0===G?void 0:G.chevronIcon,width:null===(z=null==Y?void 0:Y.iconSizes)||void 0===z?void 0:z.chevronIcon,height:null===(A=null==Y?void 0:Y.iconSizes)||void 0===A?void 0:A.chevronIcon}})})),n("div",i({className:h.headerContent,style:null==ai?void 0:ai.headerContent},{children:[n("div",i({className:h.artifactIdRow,style:null==ai?void 0:ai.artifactIdRow},{children:[o(di,{className:h.bookmarkIcon,style:{color:null===(W=null==Y?void 0:Y.iconColors)||void 0===W?void 0:W.bookmarkIcon,width:null===(F=null==Y?void 0:Y.iconSizes)||void 0===F?void 0:F.bookmarkIcon,height:null===(H=null==Y?void 0:Y.iconSizes)||void 0===H?void 0:H.bookmarkIcon}}),o("span",i({style:null==ai?void 0:ai.artifactIdText},{children:M.artifactTitleID}))]})),o(c,i({title:p(M.title,null===(P=null==Y?void 0:Y.icons)||void 0===P?void 0:P.infoIcon,null===(j=null==Y?void 0:Y.iconColors)||void 0===j?void 0:j.infoIcon,null===(L=null==Y?void 0:Y.iconSizes)||void 0===L?void 0:L.infoIcon),arrow:!0},{children:o("h3",i({className:h.title,style:i(i({},null==ai?void 0:ai.title),ti?null==ai?void 0:ai.titleHover:{})},{children:p(M.title,null===(O=null==Y?void 0:Y.icons)||void 0===O?void 0:O.infoIcon,null===(B=null==Y?void 0:Y.iconColors)||void 0===B?void 0:B.infoIcon,null===(D=null==Y?void 0:Y.iconSizes)||void 0===D?void 0:D.infoIcon)}))})),!oi&&o("div",i({className:h.collapsedSummary,style:null==ai?void 0:ai.collapsedSummary},{children:(0===E||vi.critical+vi.warning+vi.recommendation>0)&&n(l,{children:[o("span",i({className:h.summaryLabel,style:null==ai?void 0:ai.summaryLabel},{children:"Gap"===q?"Gaps : ":"Risks : "})),n("div",i({className:h.summaryBadgesContainer,style:null==ai?void 0:ai.summaryBadgesContainer},{children:[vi.critical>0&&o(v,{title:"Critical",length:vi.critical,badgeColorClass:"critical",customStyles:X}),vi.warning>0&&o(v,{title:"Warning",length:vi.warning,badgeColorClass:"warning",customStyles:X}),vi.recommendation>0&&o(v,{title:"JAS",length:vi.recommendation,badgeColorClass:"suggestion",customStyles:X})]}))]})}))]}))]})),oi&&n("div",i({className:h.expandedContent,style:null==ai?void 0:ai.expandedContent},{children:[o("div",i({className:h.expandedInnerPadding,style:null==ai?void 0:ai.expandedInnerPadding},{children:!mi&&n("div",i({className:h.itemsContainer,style:null==ai?void 0:ai.itemsContainer},{children:[o(m,{title:"Critical",items:M.display_items.critical,badgeColorClass:"critical",defaultOpen:"Critical"===ui,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y}),o(m,{title:"Warning",items:M.display_items.warning,badgeColorClass:"warning",defaultOpen:"Warning"===ui,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y}),o(m,{title:"Suggestion",items:M.display_items.recommendation,badgeColorClass:"suggestion",defaultOpen:"Suggestion"===ui,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y})]}))})),M.sub_feature&&M.sub_feature.length>0&&o("div",i({className:h.subFeaturesWrapper,style:null==ai?void 0:ai.subFeaturesWrapper},{children:M.sub_feature.map(function(i,n){return o(y,{story:i,depth:E+1,onClickStoryNodeCallback:J,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y,onSelectStory:Z,rootArtifactId:ii},n)})}))]}))]}))};export{y as default,p as replaceLearnedTagsWithInfo};
1
+ import{__assign as i}from"tslib";import{jsxs as n,jsx as o,Fragment as l}from"react/jsx-runtime";import{useState as e,useMemo as t}from"react";import{Bookmark as a,ChevronDown as s,ChevronRight as d,Info as r}from"lucide-react";import{Tooltip as c}from"@mui/material";import{v4 as u}from"uuid";import v from"../RiskSidebarCategorySection/RiskSidebarCategorySection.js";import m from"../RiskCategorySection/RiskCategorySection.js";import h from"./StoryNode.module.css.js";var g=function(i){var n,o,l,e,t,a,s,d=(null===(o=null===(n=i.display_items)||void 0===n?void 0:n.critical)||void 0===o?void 0:o.length)||0,r=(null===(e=null===(l=i.display_items)||void 0===l?void 0:l.warning)||void 0===e?void 0:e.length)||0,c=(null===(a=null===(t=i.display_items)||void 0===t?void 0:t.recommendation)||void 0===a?void 0:a.length)||0;if((null===(s=i.sub_feature)||void 0===s?void 0:s.length)>0)for(var u=0,v=i.sub_feature;u<v.length;u++){var m=v[u],h=g(m);d+=h.critical,r+=h.warning,c+=h.recommendation}return{critical:d,warning:r,recommendation:c}};function p(n,l,e,t){for(var a,s=[],d=/<learned>(.*?)<\/learned>/g,v=0,m=0,g=l||r;null!==(a=d.exec(n));){a[0];var p=a[1],y=a.index;y>v&&s.push(o("span",{children:n.slice(v,y)},"text-pre-".concat(m++))),s.push(o(c,i({title:p,placement:"top"},{children:o(g,{size:t||16,className:h.infoIcon,style:{color:e,width:t,height:t}})}),"tooltip-".concat(u()))),v=d.lastIndex}return v<(null==n?void 0:n.length)&&s.push(o("span",{children:n.slice(v)},"text-post-".concat(m++))),s}var y=function(r){var u,C,f,I,S,k,b,N,w,R,_,x,G,z,A,F,W,H,P,L,j,O,B,D,M=r.story,T=r.depth,E=void 0===T?0:T,J=r.onClickStoryNodeCallback,q=r.type,K=r.isProcessingGapItems,Q=r.onClickAiReasoning,U=r.handleFixRisk,V=r.handleHighlightGapContent,X=r.customStyles,Y=r.customIcons,Z=r.onSelectStory,$=r.rootArtifactId,ii=void 0===$?M.id:$,ni=e(0===E),oi=ni[0],li=ni[1],ei=e(!1),ti=ei[0],ai=ei[1],si=null==X?void 0:X.storyNode,di=(null===(u=null==Y?void 0:Y.icons)||void 0===u?void 0:u.bookmarkIcon)||a,ri=(null===(C=null==Y?void 0:Y.icons)||void 0===C?void 0:C.chevronDownIcon)||s,ci=(null===(f=null==Y?void 0:Y.icons)||void 0===f?void 0:f.chevronRightIcon)||d,ui=t(function(){return M.display_items.critical.length>0?"Critical":M.display_items.warning.length>0?"Warning":M.display_items.recommendation.length>0?"Suggestion":null},[M.display_items,q]),vi=t(function(){return g(M)},[M]),mi=0===((null===(S=null===(I=M.display_items)||void 0===I?void 0:I.critical)||void 0===S?void 0:S.length)||0)+((null===(b=null===(k=M.display_items)||void 0===k?void 0:k.warning)||void 0===b?void 0:b.length)||0)+((null===(w=null===(N=M.display_items)||void 0===N?void 0:N.recommendation)||void 0===w?void 0:w.length)||0);return n("div",i({className:"".concat(h.container," ").concat(E>0?h.nestedContainer:""),style:i(i({},null==si?void 0:si.container),E>0?null==si?void 0:si.nestedContainer:{})},{children:[n("div",i({onClick:function(){li(!oi),null==J||J(),null==Z||Z(ii)},className:h.headerRow,style:i(i({},null==si?void 0:si.headerRow),ti?null==si?void 0:si.headerRowHover:{}),onMouseEnter:function(){return ai(!0)},onMouseLeave:function(){return ai(!1)}},{children:[o("div",i({className:h.chevronWrapper,style:null==si?void 0:si.chevronWrapper},{children:oi?o(ri,{className:h.chevronIcon,style:{color:null===(R=null==Y?void 0:Y.iconColors)||void 0===R?void 0:R.chevronIcon,width:null===(_=null==Y?void 0:Y.iconSizes)||void 0===_?void 0:_.chevronIcon,height:null===(x=null==Y?void 0:Y.iconSizes)||void 0===x?void 0:x.chevronIcon}}):o(ci,{className:h.chevronIcon,style:{color:null===(G=null==Y?void 0:Y.iconColors)||void 0===G?void 0:G.chevronIcon,width:null===(z=null==Y?void 0:Y.iconSizes)||void 0===z?void 0:z.chevronIcon,height:null===(A=null==Y?void 0:Y.iconSizes)||void 0===A?void 0:A.chevronIcon}})})),n("div",i({className:h.headerContent,style:null==si?void 0:si.headerContent},{children:[n("div",i({className:h.artifactIdRow,style:null==si?void 0:si.artifactIdRow},{children:[o(di,{className:h.bookmarkIcon,style:{color:null===(F=null==Y?void 0:Y.iconColors)||void 0===F?void 0:F.bookmarkIcon,width:null===(W=null==Y?void 0:Y.iconSizes)||void 0===W?void 0:W.bookmarkIcon,height:null===(H=null==Y?void 0:Y.iconSizes)||void 0===H?void 0:H.bookmarkIcon}}),o("span",i({style:null==si?void 0:si.artifactIdText},{children:M.artifactTitleID}))]})),o(c,i({title:p(M.title,null===(P=null==Y?void 0:Y.icons)||void 0===P?void 0:P.infoIcon,null===(L=null==Y?void 0:Y.iconColors)||void 0===L?void 0:L.infoIcon,null===(j=null==Y?void 0:Y.iconSizes)||void 0===j?void 0:j.infoIcon),arrow:!0},{children:o("h3",i({className:h.title,style:i(i({},null==si?void 0:si.title),ti?null==si?void 0:si.titleHover:{})},{children:p(M.title,null===(O=null==Y?void 0:Y.icons)||void 0===O?void 0:O.infoIcon,null===(B=null==Y?void 0:Y.iconColors)||void 0===B?void 0:B.infoIcon,null===(D=null==Y?void 0:Y.iconSizes)||void 0===D?void 0:D.infoIcon)}))})),!oi&&o("div",i({className:h.collapsedSummary,style:null==si?void 0:si.collapsedSummary},{children:(0===E||vi.critical+vi.warning+vi.recommendation>0)&&n(l,{children:[o("span",i({className:h.summaryLabel,style:null==si?void 0:si.summaryLabel},{children:"Gap"===q?"Gaps : ":"Risks : "})),n("div",i({className:h.summaryBadgesContainer,style:null==si?void 0:si.summaryBadgesContainer},{children:[vi.critical>0&&o(v,{title:"Critical",length:vi.critical,badgeColorClass:"critical",customStyles:X}),vi.warning>0&&o(v,{title:"Warning",length:vi.warning,badgeColorClass:"warning",customStyles:X}),vi.recommendation>0&&o(v,{title:"JAS",length:vi.recommendation,badgeColorClass:"suggestion",customStyles:X})]}))]})}))]}))]})),oi&&n("div",i({className:h.expandedContent,style:null==si?void 0:si.expandedContent},{children:[o("div",i({className:h.expandedInnerPadding,style:null==si?void 0:si.expandedInnerPadding},{children:mi?E>0&&o("span",i({className:h.summaryLabel,style:null==si?void 0:si.summaryLabel},{children:"Gaps: No Gaps Found"})):n("div",i({className:h.itemsContainer,style:null==si?void 0:si.itemsContainer},{children:[o(m,{title:"Critical",items:M.display_items.critical,badgeColorClass:"critical",defaultOpen:"Critical"===ui,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y}),o(m,{title:"Warning",items:M.display_items.warning,badgeColorClass:"warning",defaultOpen:"Warning"===ui,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y}),o(m,{title:"Suggestion",items:M.display_items.recommendation,badgeColorClass:"suggestion",defaultOpen:"Suggestion"===ui,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y})]}))})),M.sub_feature&&M.sub_feature.length>0&&o("div",i({className:h.subFeaturesWrapper,style:null==si?void 0:si.subFeaturesWrapper},{children:M.sub_feature.map(function(i,n){return o(y,{story:i,depth:E+1,onClickStoryNodeCallback:J,type:q,isProcessingGapItems:K,onClickAiReasoning:Q,handleFixRisk:U,handleHighlightGapContent:V,customStyles:X,customIcons:Y,onSelectStory:Z,rootArtifactId:ii},n)})}))]}))]}))};export{y as default,p as replaceLearnedTagsWithInfo};
2
2
  //# sourceMappingURL=StoryNode.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as n}from"tslib";import{jsx as t}from"react/jsx-runtime";import{createContext as i,useState as e,useMemo as o,useCallback as r,useContext as s}from"react";import{RefProvider as a}from"../../store/ref.context.js";var u;!function(n){n.WAITING="waiting",n.IN_PROGRESS="in_progress",n.GENERATED="generated",n.FAILED="failed",n.GENERATE="generate"}(u||(u={}));var c=i(null),f=function(i){var s=i.children,u=i.userStory,f=i.setUserStory,g=i.aiReasoning,d=i.setAiReasoning,l=i.citations,C=i.setCitations,h=i.apiCachingConfig,m=i.customStyles,p=i.customIcons,v=i.searchQueryList,S=i.searchQueryReasoningIdList,y=i.citationConfig,I=i.chatHistory,R=i.chatCitationConfigs,A=i.gptCitationConfigs,E=i.diffEditConfig,x=i.aiReasoningAccordionOpenStates,N=i.persistedDataFiles,L=i.inlineUpdateComponentConfig,_=i.segmentComponentConfig,b=i.sectionStatusConfig,w=i.customSectionConfig,D=e(0),F=D[0],G=D[1],H=o(function(){if(0===u.length||0===g.length)return Array(u.length).fill(0);var n=Array.from({length:u.length},function(){return[]});return g.forEach(function(t){var i=Number(t.relevance_score);if(!(isNaN(i)||i<=0)){var e="ai_reasoning$".concat(t.id),o=u.findIndex(function(n){var t;return n.value.includes(e)||(null===(t=n.sub_features)||void 0===t?void 0:t.some(function(n){return n.value.includes(e)}))});-1!==o&&n[o].push(i)}}),n.map(function(n){return 0===n.length?0:Math.round(n.reduce(function(n,t){return n+t},0)/n.length)})},[u,g]),Q=r(function(n){var t,i=u.findIndex(function(t){return t.artifactId===n});return-1===i?0:null!==(t=H[i])&&void 0!==t?t:0},[u,H]);return t(c.Provider,n({value:{chatHistory:I,userStory:u,setUserStory:f,aiReasoning:g,setAiReasoning:d,citations:l,setCitations:C,apiCachingConfig:h,customStyles:m,customIcons:p,searchQueryList:v,searchQueryReasoningIdList:S,citationConfig:y,getAvgScoreForStory:Q,chatCitationConfigs:R,gptCitationConfigs:A,diffEditConfig:E,aiReasoningAccordionOpenStates:x,persistedDataFiles:N,currentHighlightIndex:F,setCurrentHighlightIndex:G,inlineUpdateComponentConfig:L,segmentComponentConfig:_,sectionStatusConfig:b,customSectionConfig:w}},{children:t(a,{children:s})}))},g=function(){var n=s(c);if(!n)throw new Error("useRequirementAI must be used within RequirementAIWrapper");return n};export{u as SectionStatus,f as default,g as useRequirementAI};
1
+ import{__assign as n}from"tslib";import{jsx as t}from"react/jsx-runtime";import{createContext as i,useState as e,useMemo as o,useCallback as r,useContext as s}from"react";import{RefProvider as a}from"../../store/ref.context.js";var u;!function(n){n.WAITING="waiting",n.IN_PROGRESS="in_progress",n.GENERATED="generated",n.FAILED="failed",n.GENERATE="generate",n.APPROVED="approved"}(u||(u={}));var c=i(null),f=function(i){var s=i.children,u=i.userStory,f=i.setUserStory,g=i.aiReasoning,d=i.setAiReasoning,l=i.citations,C=i.setCitations,h=i.apiCachingConfig,m=i.customStyles,p=i.customIcons,v=i.searchQueryList,S=i.searchQueryReasoningIdList,y=i.citationConfig,I=i.chatHistory,R=i.chatCitationConfigs,A=i.gptCitationConfigs,E=i.diffEditConfig,x=i.aiReasoningAccordionOpenStates,N=i.persistedDataFiles,D=i.inlineUpdateComponentConfig,L=i.segmentComponentConfig,_=i.sectionStatusConfig,b=i.customSectionConfig,w=e(0),F=w[0],G=w[1],H=o(function(){if(0===u.length||0===g.length)return Array(u.length).fill(0);var n=Array.from({length:u.length},function(){return[]});return g.forEach(function(t){var i=Number(t.relevance_score);if(!(isNaN(i)||i<=0)){var e="ai_reasoning$".concat(t.id),o=u.findIndex(function(n){var t;return n.value.includes(e)||(null===(t=n.sub_features)||void 0===t?void 0:t.some(function(n){return n.value.includes(e)}))});-1!==o&&n[o].push(i)}}),n.map(function(n){return 0===n.length?0:Math.round(n.reduce(function(n,t){return n+t},0)/n.length)})},[u,g]),O=r(function(n){var t,i=u.findIndex(function(t){return t.artifactId===n});return-1===i?0:null!==(t=H[i])&&void 0!==t?t:0},[u,H]);return t(c.Provider,n({value:{chatHistory:I,userStory:u,setUserStory:f,aiReasoning:g,setAiReasoning:d,citations:l,setCitations:C,apiCachingConfig:h,customStyles:m,customIcons:p,searchQueryList:v,searchQueryReasoningIdList:S,citationConfig:y,getAvgScoreForStory:O,chatCitationConfigs:R,gptCitationConfigs:A,diffEditConfig:E,aiReasoningAccordionOpenStates:x,persistedDataFiles:N,currentHighlightIndex:F,setCurrentHighlightIndex:G,inlineUpdateComponentConfig:D,segmentComponentConfig:L,sectionStatusConfig:_,customSectionConfig:b}},{children:t(a,{children:s})}))},g=function(){var n=s(c);if(!n)throw new Error("useRequirementAI must be used within RequirementAIWrapper");return n};export{u as SectionStatus,f as default,g as useRequirementAI};
2
2
  //# sourceMappingURL=RequirementAIWrapper.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 l,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as u}from"react";import{ChevronUp as d,ChevronDown as c,ExternalLink as v,Download as m,Share2 as p,Copy as f,LoaderCircle as h,PencilIcon as y,Plus as S,Trash2 as g,X as C,Ellipsis as I,Hourglass as N,ChevronUpIcon as w,ChevronDownIcon as b,Info as D,Bookmark as E}from"lucide-react";import B from"showdown";import{Menu as x,MenuItem as T,Tooltip as A}from"@mui/material";import U from"../../icons/Illustration.svg.js";import{v4 as k}from"uuid";import R from"./UserStoryCard.module.css.js";import{formatMarkdown as P,indentMarkdown as _}from"../../utils/helpers.js";import{replaceTitleSection as L}from"../../utils/user-story.utils.js";import M from"../../shared/AtomicButton.js";import j from"../RichTextEditor/RichTextEditor.js";import G from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as H,useRequirementAI as W}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as V}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as z}from"./TitleEditor/TitleEditor.js";import F from"./ClinicalTrialSection.js";import{CompletionPanel as O}from"../story-screen/CompletionPanel.js";import q from"../../icons/CDIcon.js";var Q,Z=((Q={})[H.WAITING]="WAITING TO GENERATE",Q[H.IN_PROGRESS]="IN PROGRESS",Q[H.GENERATED]="GENERATED",Q[H.FAILED]="FAILED",Q[H.GENERATE]="GENERATE",Q);function J(t){for(var n,o=[],l=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=l.exec(t));){var s=n[1],u=n.index;u>r&&o.push(i("span",{children:t.slice(r,u)},"text-pre-".concat(a++))),o.push(i(A,e({title:s,placement:"top"},{children:i(D,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(k()))),r=l.lastIndex}return r<(null==t?void 0:t.length)&&o.push(i("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function K(t,n,o){var l;if(!t)return{};if(n)return e({},t.parentConfig);var i=e({},t.childConfig);return o&&(null===(l=t.subFeatureOverrides)||void 0===l?void 0:l[o])?e(e({},i),t.subFeatureOverrides[o]):i}var X=function(t){var n,o=t.displayName,r=W().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return l("div",e({className:R.displayName,style:null==a?void 0:a.wrapper},{children:[i(E,{className:R.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),l("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},Y=function(w){var b,D,E,A,Q,$,ee,te,ne,oe,le,ie,re,ae,se,ue,de,ce,ve=w.isUserStoryCurrentlyUpdated,me=w.artifactId,pe=w.artifactTitleId,fe=w.parentUserStory,he=w.currentUserStory,ye=w.onUserStoryChange,Se=w.parentIndex,ge=w.currentIndex,Ce=w.enableDownload,Ie=w.isDiffEditReviewMode,Ne=w.showUserStoryDiff,we=w.handleDownloadUserStory,be=w.handleOpenSendDialog,De=w.updateUserStoryArtifact,Ee=w.selectedArtifactId,Be=w.isDisplayHighlightControl,xe=w.elementDisplayConfig,Te=w._resolvedConfig,Ae=w.showWrapper,Ue=void 0!==Ae&&Ae,ke=w.defaultExpanded,Re=w.actionItemsConfig,Pe=w.onDelete,_e=w.contextVariant,Le=w.expandedSubFeatures,Me=w.showDisplayName,je=void 0===Me||Me,Ge=w.allowTitleEdit,He=void 0===Ge||Ge,We=w.showConfidenceScore,Ve=void 0===We||We,ze=w.showBorderTop,Fe=void 0===ze||ze,Oe=w.sectionStatusConfig,qe=w.showCompletionPanel,Qe=void 0!==qe&&qe,Ze=w.showAddSectionButton,Je=void 0!==Ze&&Ze,Ke=null!=Oe?Oe:{},Xe=Ke.isLoadingSectionData,Ye=void 0!==Xe&&Xe,$e=Ke.onLoadSectionData,et=Ke.status,tt=Ke.onStatusClick,nt=Ke.completedCount,ot=Ke.totalCount,lt=Ke.isNoDataAvailable,it=void 0!==lt&&lt,rt=W(),at=rt.searchQueryList,st=rt.citations,ut=rt.customStyles,dt=rt.customSectionConfig,ct=null==ut?void 0:ut.userStoryCardStyles,vt=null==ct?void 0:ct.statusStyles,mt=null===(D=null==ut?void 0:ut.userStoryCardStyles)||void 0===D?void 0:D.userStoryEditStyles,pt=null===(E=null==ut?void 0:ut.userStoryScreenStyles)||void 0===E?void 0:E.userStoryContentStyles,ft=null==ct?void 0:ct.progressHeaderStyles,ht=null==ct?void 0:ct.clinicalTrialSectionStyles,yt=null==ct?void 0:ct.CompletionStyles,St=null==ct?void 0:ct.noDataStyles,gt=null!==(Q=null===(A=null==dt?void 0:dt.shouldRender)||void 0===A?void 0:A.call(dt,he))&&void 0!==Q&&Q,Ct=null===($=null==dt?void 0:dt.getValue)||void 0===$?void 0:$.call(dt,he),It=null!==(te=null===(ee=null==dt?void 0:dt.getFields)||void 0===ee?void 0:ee.call(dt,he))&&void 0!==te?te:[],Nt=null!==(oe=null===(ne=null==dt?void 0:dt.isSaving)||void 0===ne?void 0:ne.call(dt,he))&&void 0!==oe&&oe,wt=function(e,t){return e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion}(null!==(le=he.completion_percentage)&&void 0!==le?le:0,yt),bt=((b={})[H.WAITING]=null==vt?void 0:vt.waiting,b[H.IN_PROGRESS]=null==vt?void 0:vt.inProgress,b[H.GENERATED]=null==vt?void 0:vt.generated,b[H.FAILED]=null==vt?void 0:vt.failed,b[H.GENERATE]=null==vt?void 0:vt.generate,b),Dt=a(e(e({},structuredClone(he)),{value:P(he.value)||""})),Et=Dt[0],Bt=Dt[1],xt=a({userStory:!!he.isDefaultEdit}),Tt=xt[0],At=xt[1],Ut=a(!1),kt=Ut[0],Rt=Ut[1],Pt=a(!1),_t=Pt[0],Lt=Pt[1],Mt=a(null),jt=Mt[0],Gt=Mt[1],Ht=a(null),Wt=Ht[0],Vt=Ht[1],zt=W(),Ft=zt.userStory,Ot=zt.customIcons,qt=a(null!=ke?ke:""===Se||Ee===he.artifactId||!!he.isDefaultOpen),Qt=qt[0],Zt=qt[1],Jt=a(!1);Jt[0];var Kt=Jt[1],Xt=a(null),Yt=Xt[0],$t=Xt[1],en=a(null),tn=en[0],nn=en[1],on=a(!1),ln=on[0],rn=on[1],an=s(null),sn=a(!1);sn[0];var un=sn[1],dn=a(!1),cn=dn[0],vn=dn[1],mn=s(null);u(function(){ve&&Zt(ve)},[ve]),u(function(){Bt(e(e({},structuredClone(he)),{value:P(he.value)||""}))},[he]),u(function(){at.length>0?Zt(!0):void 0===ke&&(Ee?Zt(Ee===he.artifactId):Le&&Le.length>0&&Zt(Le.includes(he.artifactId)))},[at,Ee,he.artifactId,Le]);var pn=function(){$t(null)},fn=function(){nn(null)},hn=function(){Zt(function(e){return!e})};var yn=null!=(null==he?void 0:he.big_enough)&&!Number.isNaN(he.big_enough)&&!!(null==he?void 0:he.big_enough_decision_factors),Sn=null!==(ie=null==he?void 0:he.completion_percentage)&&void 0!==ie?ie:0,gn=!!(null==he?void 0:he.completion_decision_factors),Cn=""===Se,In=null!=Te?Te:K(xe,Cn),Nn=!Ie&&!Ne;return u(function(){if(Wt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Wt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Wt]),u(function(){he.isDefaultEdit&&At(function(t){return e(e({},t),{userStory:!0})})},[he.isDefaultEdit]),l("div",e({className:R.card,style:null==ct?void 0:ct.cardStyle,id:"story-card-".concat(he.title),"data-expanded":Qt},{children:[l("div",e({className:R.titleSection,style:null==ct?void 0:ct.titleSection},{children:[l("div",e({className:R.titleRow,style:null==ct?void 0:ct.titleRow,onClick:hn},{children:[l("div",e({className:R.titleLeft,style:null==ct?void 0:ct.titleLeft,onMouseEnter:function(){return un(!0)},onMouseLeave:function(){return un(!1)}},{children:[je&&i(X,{displayName:pe}),kt&&Nn?i(z,{title:he.title,onSave:function(o){return function(o,l){return t(void 0,void 0,void 0,function(){var t,i;return n(this,function(n){try{t=e({},he),he.artifactId===l?t.title=o:t.sub_features=(null===(i=he.sub_features)||void 0===i?void 0:i.map(function(t){return t.artifactId===l?e(e({},t),{title:o}):t}))||[],Bt(t),ye(t),Rt(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,he.artifactId)},onCancel:function(){Rt(!1)},inputStyle:null==mt?void 0:mt.inlineTitleInput,confirmButtonStyle:null==mt?void 0:mt.inlineTitleConfirm,cancelButtonStyle:null==mt?void 0:mt.inlineTitleCancel},"inline-title-editor"):l("div",e({className:R.storyTitleWrapper},{children:[i("h2",e({title:he.title,className:R.storyTitle,style:null==ct?void 0:ct.storyTitle},{children:J(he.title)}),he.artifactId),Qe&&!gt&&(gn?i(O,e({customIcons:null==Ot?void 0:Ot.userStoryIcons,customStyles:null==ct?void 0:ct.aiReasoningCitaionStyles,currentUserStory:he,panelStyles:null==ct?void 0:ct.CompletionStyles,onToggleStateChange:vn},{children:l("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==yt?void 0:yt.badge),wt)},{children:[l("span",{children:[Sn,"% Completed"]}),i("span",e({style:{display:"flex",alignItems:"center"}},{children:i(q,{color:"currentColor"})})),i(cn?d:c,{size:14,style:null==yt?void 0:yt.chevronStyle})]}))})):i("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==yt?void 0:yt.badge),wt)},{children:l("span",{children:[Sn,"% Completed"]})}))),He&&i("button",e({type:"button",className:R.titleEditButton,style:null==mt?void 0:mt.titleEditButton,onClick:function(e){e.stopPropagation(),Rt(!0),Qt||Zt(!0)},"aria-label":"Edit title",title:"Edit title"},{children:i("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("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"})}))}))]}))]})),(et||void 0!==nt&&void 0!==ot)&&l("div",e({className:R.statusContainer},{children:[void 0!==nt&&void 0!==ot&&l("div",e({className:R.completedBadge},{children:["Completed: ",nt,"/",ot]})),et&&i("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==tt||tt()},className:R.statusButton,style:bt[et]},{children:Z[et]}))]})),l("div",e({className:R.titleActions,style:null==ct?void 0:ct.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(In.showProgressPercentage||In.showGapBox)&&Ue&&l("div",e({className:R.progressHeader,style:null==ft?void 0:ft.wrapper},{children:[In.showProgressPercentage&&l("div",e({className:R.progressPercentage,style:null==ft?void 0:ft.percentage},{children:[null!==(ae=null!==(re=null==he?void 0:he.confidenceScore)&&void 0!==re?re:null==In?void 0:In.confidenceValue)&&void 0!==ae?ae:"0","%"]})),In.showGapBox&&l("div",e({className:R.gapBox,style:null==ft?void 0:ft.gapBox},{children:[null!==(ue=null!==(se=null==he?void 0:he.gapValue)&&void 0!==se?se:null==In?void 0:In.gapBoxValue)&&void 0!==ue?ue:"2"," ","Gaps"]}))]})),yn&&i(V,{customIcons:null==Ot?void 0:Ot.userStoryIcons,customStyles:null==ct?void 0:ct.aiReasoningCitaionStyles,currentUserStory:he,panelStyles:null==ct?void 0:ct.BigEnoughStyles}),!Tt.userStory&&l(r,{children:[!1!==(null==In?void 0:In.showShareButton)&&i("button",e({className:R.iconButton,style:null==ct?void 0:ct.iconButton,onClick:function(e){$t(e.currentTarget)}},{children:i(v,{size:16})})),l(x,e({id:"user-story-share-menu",anchorEl:Yt,open:!!Yt,onClose:function(){return $t(null)},style:null==ct?void 0:ct.userStoryShareMenu},{children:[Ce&&i(T,e({style:null==ct?void 0:ct.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return Kt(!0),we?[4,Promise.all([we("pdf"),we("doc")])]:[2];case 1:return e.sent(),Kt(!1),[2]}})})}},{children:l("div",e({ref:an,className:R.menuItemContent,style:null==ct?void 0:ct.menuItemContent},{children:[i(m,{size:16,color:null==ct?void 0:ct.menuIconColor}),i("p",e({style:null==ct?void 0:ct.menuLabel},{children:"Download"}))]}))})),i(T,e({style:null==ct?void 0:ct.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=he,fe&&(t=e(e({},he),{value:"".concat(L(null==fe?void 0:fe.value,he.title)," \n").concat(he.value)})),null==be||be(!0,[t],he.artifactId),pn(),[2]})})}},{children:l("div",e({style:null==ct?void 0:ct.menuItemContent,className:R.menuItemContentPadded},{children:[i(p,{size:16,color:null==ct?void 0:ct.menuIconColor}),i("p",e({style:null==ct?void 0:ct.menuLabel},{children:"Send"}))]}))})),i(T,e({style:null==ct?void 0:ct.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,l,i;return n(this,function(n){switch(n.label){case 0:e=new B.Converter,t=e.makeHtml(P(he.value)||he.value),o=function(e){var t=(new B.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(P(he.value)||he.value),l=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([l])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return i=n.sent(),console.error("Failed to copy user story:",i),[3,5];case 4:return pn(),[7];case 5:return[2]}})})}},{children:l("div",e({style:null==ct?void 0:ct.menuItemContent,className:R.menuItemContentPadded},{children:[i(f,{size:16,color:null==ct?void 0:ct.menuIconColor}),i("p",e({style:null==ct?void 0:ct.menuLabel},{children:"Copy"}))]}))}))]}))]}),Tt.userStory&&Qt?i(M,{type:"outline",children:"Cancel",style:null==ct?void 0:ct.cancelButton,onClick:function(){var t;null===(t=mn.current)||void 0===t||t.abort(),At(function(t){return e(e({},t),{userStory:!1})})}}):i(r,{}),Tt.userStory&&Qt?i(M,{type:"fill",children:ln?l("span",e({className:R.savingSpinner,style:null==ct?void 0:ct.savingSpinner},{children:[i(h,{className:R.spinAnimation,style:null==ct?void 0:ct.spinAnimation}),i("span",{children:"Saving..."})]})):"Save",isDisable:ln,style:ln?null==ct?void 0:ct.savingButton:null==ct?void 0:ct.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 rn(!0),"userStory"==="userStory"&&(ye(Et),console.log("I am changing RTE editor values",Et)),[4,De(st,Ft,me,null===(t=mn.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),ye(e(e({},Et),{isDefaultEdit:!1})),At(function(t){return e(e({},t),{userStory:!1})}),rn(!1),[2]}})})}}):!Ie&&!Ne&&Qt&&!1!==(null==In?void 0:In.showEditButton)&&i("button",e({className:R.iconButton,style:null==ct?void 0:ct.editButton,onClick:function(){return At(function(t){return e(e({},t),{userStory:!0})})}},{children:i(y,{color:null==ct?void 0:ct.pencilIconColor,size:16})})),Je&&Cn&&Qt&&!Ie&&!Ne&&!1!==(null==In?void 0:In.showEditButton)&&l("button",e({type:"button",className:R.addSectionButton,style:null==mt?void 0:mt.addSectionButton,onClick:function(t){var n,l,i;t.stopPropagation();var r=(null!==(l=null===(n=he.sub_features)||void 0===n?void 0:n.length)&&void 0!==l?l:0)+1,a={artifactId:k(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},he),{sub_features:o(o([],null!==(i=he.sub_features)&&void 0!==i?i:[],!0),[a],!1)});Bt(s),ye(s),Zt(!0),Vt(a.title)},"aria-label":"Add section",title:"Add section"},{children:[i(S,{size:14}),i("span",e({className:R.addSectionLabel},{children:"Add Section"}))]})),!Cn&&!Ie&&!Ne&&i("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==Pe||Pe()},className:R.iconButton,style:null==mt?void 0:mt.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:i(g,{size:16})})),gt&&i("button",e({type:"button",className:R.iconButton,onClick:function(e){if(e.stopPropagation(),_t)return Gt(null),void Lt(!1);Gt(structuredClone(null!=Ct?Ct:{})),Zt(!0),Lt(!0)}},{children:i(_t?C:y,{size:16,color:null==ct?void 0:ct.pencilIconColor})})),(null==In?void 0:In.actionItemsButton)&&l(r,{children:[i("span",e({className:R.actionItemBtn,style:null==ct?void 0:ct.actionItemBtn,onClick:function(e){e.stopPropagation(),nn(e.currentTarget)}},{children:i(I,{})})),i(x,e({id:"user-story-action-menu",anchorEl:tn,open:!!tn,onClose:fn,style:null==ct?void 0:ct.userStoryShareMenu},{children:null==Re?void 0:Re.items.map(function(t,n){return i(T,e({style:null==ct?void 0:ct.userStoryMenuItem,onClick:function(){t.onclick(he),fn()}},{children:l("div",e({className:R.menuItemContent,style:e(e({},null==ct?void 0:ct.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[i("span",e({className:R.menuItemIcon,style:null==ct?void 0:ct.menuItemIcon},{children:t.icon})),i("p",e({style:null==ct?void 0:ct.menuLabel},{children:t.name})),i("span",{className:R.menuItemRight,style:null==ct?void 0:ct.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),hn()},style:null==ct?void 0:ct.chevronButton,className:R.chevronButton},{children:i(Qt?d:c,{className:R.chevronIcon,color:null==ct?void 0:ct.chevronIconColor})}))]}))]})),i("div",{className:R.divider,style:null==ct?void 0:ct.dividerStyle})]})),Qt&&i("div",e({className:R.cardContent,style:e(e({},null==ct?void 0:ct.cardContentStyle),{borderTop:Fe?"1px solid #E5E5E5":"none"})},{children:l("div",Ye?e({className:R.loadingContainer},{children:[i("div",e({className:R.loadingIconWrapper},{children:i(N,{size:28,color:"#5B3DF5",className:R.spinAnimation})})),l("div",{children:[i("h3",e({className:R.loadingTitle},{children:"Section generation in progress.."})),i("p",e({className:R.loadingSubtitle},{children:"This may take a few minutes"}))]}),i("button",e({type:"button",onClick:function(){return null==$e?void 0:$e()},className:R.viewStatusButton},{children:"View Status"}))]}):it?e({className:R.noDataContainer,style:null==St?void 0:St.container},{children:[i("img",{src:U,alt:"No data available",className:R.noDataIllustration,style:null==St?void 0:St.illustration}),i("h3",e({className:R.noDataTitle,style:null==St?void 0:St.title},{children:"No Data Available for This Section"})),i("p",e({className:R.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."}))]}):e({className:R.contentInner,style:null==ct?void 0:ct.contentInner},{children:[l("div",e({className:R.descriptionSection,style:null==ct?void 0:ct.descriptionSection},{children:[i("div",{className:R.justifyBetween,style:null==ct?void 0:ct.justifyBetween}),Tt.userStory?i(j,{minHeight:"100%",height:"100%",type:"string",value:P(he.value)||"",handleUpdateState:function(t,n){var o=_(n);Bt(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Tt.userStory?"edit":"readOnly"}):gt?i(F,{styles:ht,fields:It,readonly:!_t,isSaving:Nt,value:null!==(de=null!=jt?jt:Ct)&&void 0!==de?de:{},onChange:Gt,onSave:function(){return t(void 0,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return jt?[4,null===(e=null==dt?void 0:dt.onSave)||void 0===e?void 0:e.call(dt,he,jt)]:[2];case 1:return t.sent(),Gt(null),Lt(!1),[2]}})})},onCancel:function(){Gt(null),Lt(!1)}}):i(G,{showUserStoryDiff:Ne,isParent:""===Se,message:P(he.value)||"",artifactId:he.artifactId,customStyles:pt,isDisplayHighlightControl:Be,contextVariant:_e,showConfidenceScore:Ve})]})),null===(ce=Et.sub_features)||void 0===ce?void 0:ce.map(function(t,n){var l=K(xe,!1,t.artifactId);return i(Y,{artifactId:me,isUserStoryCurrentlyUpdated:ve,artifactTitleId:"".concat(pe,"-").concat(String.fromCharCode(65+n)),parentUserStory:he,parentIndex:"".concat(Se).concat(Se&&".").concat(ge),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var l=o([],he.sub_features||[],!0);l[t]=n,ye(e(e({},he),{sub_features:l}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:Ie,showUserStoryDiff:Ne,updateUserStoryArtifact:De,handleDownloadUserStory:we,handleOpenSendDialog:be,isDisplayHighlightControl:Be,elementDisplayConfig:xe,_resolvedConfig:l,actionItemsConfig:Re,onDelete:function(){return function(t){var n=(he.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},he),{sub_features:n});Bt(o),ye(o)}(n)},expandedSubFeatures:Le},t.artifactId)})]}))}))]}))},$=function(t){var n=t.artifactTitleIDs,a=t.expandedSubFeatures,s=t.isDiffEditReviewMode,u=t.showUserStoryDiff,d=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,v=t.artifactId,m=t.handleOpenSendDialog,p=t.handleDownloadUserStory,f=t.selectedArtifactId,h=t.isDisplayHighlightControl,y=t.elementDisplayConfig,S=t.showWrapper,g=t.actionItemsConfig,C=t.contextVariant,I=t.showDisplayName,N=t.allowTitleEdit,D=t.showConfidenceScore,E=t.showBorderTop,B=t.defaultExpanded,x=t.showCompletionPanel,T=void 0!==x&&x,A=t.showAddSectionButton,U=void 0!==A&&A,k=W(),P=k.userStory,_=k.setUserStory,L=k.customStyles,M=k.searchQueryList,j=k.currentHighlightIndex,G=k.setCurrentHighlightIndex;k.segmentComponentConfig;var H=k.sectionStatusConfig,V=null==L?void 0:L.userStoryCardStyles,z=0===j,F=j===M.length-1;return l("div",e({className:R.userStoryCardWrapper,style:h?e(e({},null==V?void 0:V.userStoryCardWrapper),{position:"relative"}):null==V?void 0:V.userStoryCardWrapper},{children:[h&&i(r,{children:M.length>0&&i("div",e({className:R.wrapper},{children:i("div",e({className:R.highlightNavigation},{children:l("div",e({className:R.navigationContainer},{children:[l("span",e({className:R.navCounter},{children:[j+1," of ",M.length]})),l("div",e({className:R.navButtons},{children:[i("button",e({onClick:function(){j>0&&G(function(e){return e-1})},className:R.navButton,disabled:z},{children:i(w,{size:20,className:R.navIcon})})),i("button",e({onClick:function(){j<M.length-1&&G(function(e){return e+1})},className:R.navButton,disabled:F},{children:i(b,{size:20,className:R.navIcon})}))]}))]}))}))}))}),P.map(function(e,t){var l=K(y,!0);return i(Y,{isUserStoryCurrentlyUpdated:c,artifactId:v,artifactTitleId:n[t]||"",expandedSubFeatures:a,currentUserStory:e,onUserStoryChange:function(e){_(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:u,updateUserStoryArtifact:d,handleOpenSendDialog:m,handleDownloadUserStory:p,selectedArtifactId:f,isDisplayHighlightControl:h,elementDisplayConfig:y,_resolvedConfig:l,showWrapper:S,defaultExpanded:B,actionItemsConfig:g,contextVariant:C,showDisplayName:I,allowTitleEdit:N,showConfidenceScore:D,showBorderTop:E,sectionStatusConfig:H,showCompletionPanel:T,showAddSectionButton:U},e.artifactId)})]}))};export{Y as StoryCard,$ as UserStoryCardWrapper,Y as default,J as replaceLearnedTagsWithInfo};
1
+ import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as l,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as d}from"react";import{ChevronUp as u,ChevronDown as c,ExternalLink as v,Download as p,Share2 as m,Copy as h,LoaderCircle as f,PencilIcon as y,Plus as S,Trash2 as g,X as C,Ellipsis as I,Hourglass as N,Check as b,ChevronUpIcon as w,ChevronDownIcon as E,Info as D,Bookmark as B}from"lucide-react";import x from"showdown";import{Tooltip as T,Menu as A,MenuItem as P}from"@mui/material";import U from"../../icons/Illustration.svg.js";import{v4 as k}from"uuid";import R from"./UserStoryCard.module.css.js";import{formatMarkdown as _,indentMarkdown as M}from"../../utils/helpers.js";import{replaceTitleSection as L}from"../../utils/user-story.utils.js";import j from"../../shared/AtomicButton.js";import V from"../RichTextEditor/RichTextEditor.js";import G from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as O,useRequirementAI as z}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as H}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as W}from"./TitleEditor/TitleEditor.js";import F from"./ClinicalTrialSection.js";import{CompletionPanel as q}from"../story-screen/CompletionPanel.js";import Q from"../../icons/CDIcon.js";var Z,J=((Z={})[O.WAITING]="WAITING TO GENERATE",Z[O.IN_PROGRESS]="IN PROGRESS",Z[O.GENERATED]="GENERATED",Z[O.FAILED]="FAILED",Z[O.GENERATE]="GENERATE",Z[O.APPROVED]="APPROVED",Z);function K(t){for(var n,o=[],l=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=l.exec(t));){var s=n[1],d=n.index;d>r&&o.push(i("span",{children:t.slice(r,d)},"text-pre-".concat(a++))),o.push(i(T,e({title:s,placement:"top"},{children:i(D,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(k()))),r=l.lastIndex}return r<(null==t?void 0:t.length)&&o.push(i("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function X(t,n,o){var l;if(!t)return{};if(n)return e({},t.parentConfig);var i=e({},t.childConfig);return o&&(null===(l=t.subFeatureOverrides)||void 0===l?void 0:l[o])?e(e({},i),t.subFeatureOverrides[o]):i}var Y=function(t){var n,o=t.displayName,r=z().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return l("div",e({className:R.displayName,style:null==a?void 0:a.wrapper},{children:[i(B,{className:R.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),l("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},$=function(w){var E,D,B,Z,ee,te,ne,oe,le,ie,re,ae,se,de,ue,ce,ve,pe,me,he=w.isUserStoryCurrentlyUpdated,fe=w.artifactId,ye=w.artifactTitleId,Se=w.parentUserStory,ge=w.currentUserStory,Ce=w.onUserStoryChange,Ie=w.parentIndex,Ne=w.currentIndex,be=w.enableDownload,we=w.isDiffEditReviewMode,Ee=w.showUserStoryDiff,De=w.handleDownloadUserStory,Be=w.handleOpenSendDialog,xe=w.updateUserStoryArtifact,Te=w.selectedArtifactId,Ae=w.isDisplayHighlightControl,Pe=w.elementDisplayConfig,Ue=w._resolvedConfig,ke=w.showWrapper,Re=void 0!==ke&&ke,_e=w.defaultExpanded,Me=w.actionItemsConfig,Le=w.onDelete,je=w.contextVariant,Ve=w.expandedSubFeatures,Ge=w.showDisplayName,Oe=void 0===Ge||Ge,ze=w.allowTitleEdit,He=void 0===ze||ze,We=w.showConfidenceScore,Fe=void 0===We||We,qe=w.showBorderTop,Qe=void 0===qe||qe,Ze=w.sectionStatusConfig,Je=w.showCompletionPanel,Ke=void 0!==Je&&Je,Xe=w.showAddSectionButton,Ye=void 0!==Xe&&Xe,$e=w.disableEditPlan,et=void 0!==$e&&$e,tt=w.useMuiTooltip,nt=void 0!==tt&&tt,ot=w.approveButtonConfig,lt=null!=Ze?Ze:{},it=lt.isLoadingSectionData,rt=void 0!==it&&it,at=lt.onLoadSectionData,st=lt.status,dt=lt.onStatusClick,ut=lt.completedCount,ct=lt.totalCount,vt=lt.isNoDataAvailable,pt=void 0!==vt&&vt,mt=z(),ht=mt.searchQueryList,ft=mt.citations,yt=mt.customStyles,St=mt.customSectionConfig,gt=null==yt?void 0:yt.userStoryCardStyles,Ct=null==gt?void 0:gt.statusStyles,It=null===(D=null==yt?void 0:yt.userStoryCardStyles)||void 0===D?void 0:D.userStoryEditStyles,Nt=null===(B=null==yt?void 0:yt.userStoryScreenStyles)||void 0===B?void 0:B.userStoryContentStyles,bt=null==gt?void 0:gt.progressHeaderStyles,wt=null==gt?void 0:gt.clinicalTrialSectionStyles,Et=null==gt?void 0:gt.CompletionStyles,Dt=null==gt?void 0:gt.noDataStyles,Bt=null==gt?void 0:gt.approveButtonStyles,xt=null!==(ee=null===(Z=null==St?void 0:St.shouldRender)||void 0===Z?void 0:Z.call(St,ge))&&void 0!==ee&&ee,Tt=null===(te=null==St?void 0:St.getValue)||void 0===te?void 0:te.call(St,ge),At=null!==(oe=null===(ne=null==St?void 0:St.getFields)||void 0===ne?void 0:ne.call(St,ge))&&void 0!==oe?oe:[],Pt=null!==(le=null==St?void 0:St.isEditDisabled)&&void 0!==le&&le,Ut=null!==(re=null===(ie=null==St?void 0:St.isSaving)||void 0===ie?void 0:ie.call(St,ge))&&void 0!==re&&re,kt=function(e,t){return e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion}(null!==(ae=ge.completion_percentage)&&void 0!==ae?ae:0,Et),Rt=((E={})[O.WAITING]=null==Ct?void 0:Ct.waiting,E[O.IN_PROGRESS]=null==Ct?void 0:Ct.inProgress,E[O.GENERATED]=null==Ct?void 0:Ct.generated,E[O.FAILED]=null==Ct?void 0:Ct.failed,E[O.GENERATE]=null==Ct?void 0:Ct.generate,E[O.APPROVED]=null==Ct?void 0:Ct.approved,E),_t=a(e(e({},structuredClone(ge)),{value:_(ge.value)||""})),Mt=_t[0],Lt=_t[1],jt=a({userStory:!!ge.isDefaultEdit}),Vt=jt[0],Gt=jt[1],Ot=a(!1),zt=Ot[0],Ht=Ot[1],Wt=a(!1),Ft=Wt[0],qt=Wt[1],Qt=a(null),Zt=Qt[0],Jt=Qt[1],Kt=a(null),Xt=Kt[0],Yt=Kt[1],$t=z(),en=$t.userStory,tn=$t.customIcons,nn=a(null!=_e?_e:""===Ie||Te===ge.artifactId||!!ge.isDefaultOpen),on=nn[0],ln=nn[1],rn=a(!1);rn[0];var an=rn[1],sn=a(null),dn=sn[0],un=sn[1],cn=a(null),vn=cn[0],pn=cn[1],mn=a(!1),hn=mn[0],fn=mn[1],yn=s(null),Sn=a(!1);Sn[0];var gn=Sn[1],Cn=a(!1),In=Cn[0],Nn=Cn[1],bn=s(null);d(function(){he&&ln(he)},[he]),d(function(){Lt(e(e({},structuredClone(ge)),{value:_(ge.value)||""}))},[ge]),d(function(){ht.length>0?ln(!0):void 0===_e&&(Te?ln(Te===ge.artifactId):Ve&&Ve.length>0&&ln(Ve.includes(ge.artifactId)))},[ht,Te,ge.artifactId,Ve]);var wn=function(){un(null)},En=function(){pn(null)},Dn=function(){ln(function(e){return!e})};var Bn=null!=(null==ge?void 0:ge.big_enough)&&!Number.isNaN(ge.big_enough)&&!!(null==ge?void 0:ge.big_enough_decision_factors),xn=null!==(se=null==ge?void 0:ge.completion_percentage)&&void 0!==se?se:0,Tn=!!(null==ge?void 0:ge.completion_decision_factors),An=""===Ie,Pn=null!=Ue?Ue:X(Pe,An),Un=!we&&!Ee;return d(function(){if(Xt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Xt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Xt]),d(function(){ge.isDefaultEdit&&Gt(function(t){return e(e({},t),{userStory:!0})})},[ge.isDefaultEdit]),l("div",e({className:R.card,style:null==gt?void 0:gt.cardStyle,id:"story-card-".concat(ge.title),"data-expanded":on},{children:[l("div",e({className:R.titleSection,style:null==gt?void 0:gt.titleSection},{children:[l("div",e({className:R.titleRow,style:null==gt?void 0:gt.titleRow,onClick:Dn},{children:[l("div",e({className:R.titleLeft,style:null==gt?void 0:gt.titleLeft,onMouseEnter:function(){return gn(!0)},onMouseLeave:function(){return gn(!1)}},{children:[Oe&&i(Y,{displayName:ye}),zt&&Un?i(W,{title:ge.title,onSave:function(o){return function(o,l){return t(void 0,void 0,void 0,function(){var t,i;return n(this,function(n){try{t=e({},ge),ge.artifactId===l?t.title=o:t.sub_features=(null===(i=ge.sub_features)||void 0===i?void 0:i.map(function(t){return t.artifactId===l?e(e({},t),{title:o}):t}))||[],Lt(t),Ce(t),Ht(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,ge.artifactId)},onCancel:function(){Ht(!1)},inputStyle:null==It?void 0:It.inlineTitleInput,confirmButtonStyle:null==It?void 0:It.inlineTitleConfirm,cancelButtonStyle:null==It?void 0:It.inlineTitleCancel},"inline-title-editor"):l("div",e({className:R.storyTitleWrapper},{children:[i(T,e({title:K(ge.title),arrow:!0},{children:i("h2",e({title:nt?void 0:ge.title,className:R.storyTitle,style:null==gt?void 0:gt.storyTitle},{children:K(ge.title)}),ge.artifactId)})),Ke&&!xt&&(Tn?i(q,e({customIcons:null==tn?void 0:tn.userStoryIcons,customStyles:null==gt?void 0:gt.aiReasoningCitaionStyles,currentUserStory:ge,panelStyles:null==gt?void 0:gt.CompletionStyles,onToggleStateChange:Nn},{children:l("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==Et?void 0:Et.badge),kt)},{children:[l("span",{children:[xn,"% Completed"]}),i("span",e({style:{display:"flex",alignItems:"center"}},{children:i(Q,{color:"currentColor"})})),i(In?u:c,{size:14,style:null==Et?void 0:Et.chevronStyle})]}))})):i("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==Et?void 0:Et.badge),kt)},{children:l("span",{children:[xn,"% Completed"]})}))),He&&i("button",e({type:"button",className:R.titleEditButton,style:null==It?void 0:It.titleEditButton,onClick:function(e){e.stopPropagation(),Ht(!0),on||ln(!0)},"aria-label":"Edit title",title:"Edit title"},{children:i("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("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"})}))}))]}))]})),(st||void 0!==ut&&void 0!==ct)&&l("div",e({className:R.statusContainer},{children:[void 0!==ut&&void 0!==ct&&l("div",e({className:R.completedBadge},{children:["Completed: ",ut,"/",ct]})),st&&i("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==dt||dt()},className:R.statusButton,style:Rt[st]},{children:J[st]}))]})),l("div",e({className:R.titleActions,style:null==gt?void 0:gt.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Pn.showProgressPercentage||Pn.showGapBox)&&Re&&l("div",e({className:R.progressHeader,style:null==bt?void 0:bt.wrapper},{children:[Pn.showProgressPercentage&&l("div",e({className:R.progressPercentage,style:null==bt?void 0:bt.percentage},{children:[null!==(ue=null!==(de=null==ge?void 0:ge.confidenceScore)&&void 0!==de?de:null==Pn?void 0:Pn.confidenceValue)&&void 0!==ue?ue:"0","%"]})),Pn.showGapBox&&l("div",e({className:R.gapBox,style:null==bt?void 0:bt.gapBox},{children:[null!==(ve=null!==(ce=null==ge?void 0:ge.gapValue)&&void 0!==ce?ce:null==Pn?void 0:Pn.gapBoxValue)&&void 0!==ve?ve:"2"," ","Gaps"]}))]})),Bn&&i(H,{customIcons:null==tn?void 0:tn.userStoryIcons,customStyles:null==gt?void 0:gt.aiReasoningCitaionStyles,currentUserStory:ge,panelStyles:null==gt?void 0:gt.BigEnoughStyles}),!Vt.userStory&&l(r,{children:[!1!==(null==Pn?void 0:Pn.showShareButton)&&i("button",e({className:R.iconButton,style:null==gt?void 0:gt.iconButton,onClick:function(e){un(e.currentTarget)}},{children:i(v,{size:16})})),l(A,e({id:"user-story-share-menu",anchorEl:dn,open:!!dn,onClose:function(){return un(null)},style:null==gt?void 0:gt.userStoryShareMenu},{children:[be&&i(P,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return an(!0),De?[4,Promise.all([De("pdf"),De("doc")])]:[2];case 1:return e.sent(),an(!1),[2]}})})}},{children:l("div",e({ref:yn,className:R.menuItemContent,style:null==gt?void 0:gt.menuItemContent},{children:[i(p,{size:16,color:null==gt?void 0:gt.menuIconColor}),i("p",e({style:null==gt?void 0:gt.menuLabel},{children:"Download"}))]}))})),i(P,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=ge,Se&&(t=e(e({},ge),{value:"".concat(L(null==Se?void 0:Se.value,ge.title)," \n").concat(ge.value)})),null==Be||Be(!0,[t],ge.artifactId),wn(),[2]})})}},{children:l("div",e({style:null==gt?void 0:gt.menuItemContent,className:R.menuItemContentPadded},{children:[i(m,{size:16,color:null==gt?void 0:gt.menuIconColor}),i("p",e({style:null==gt?void 0:gt.menuLabel},{children:"Send"}))]}))})),i(P,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,l,i;return n(this,function(n){switch(n.label){case 0:e=new x.Converter,t=e.makeHtml(_(ge.value)||ge.value),o=function(e){var t=(new x.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(_(ge.value)||ge.value),l=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([l])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return i=n.sent(),console.error("Failed to copy user story:",i),[3,5];case 4:return wn(),[7];case 5:return[2]}})})}},{children:l("div",e({style:null==gt?void 0:gt.menuItemContent,className:R.menuItemContentPadded},{children:[i(h,{size:16,color:null==gt?void 0:gt.menuIconColor}),i("p",e({style:null==gt?void 0:gt.menuLabel},{children:"Copy"}))]}))}))]}))]}),Vt.userStory&&on?i(j,{type:"outline",children:"Cancel",style:null==gt?void 0:gt.cancelButton,onClick:function(){var t;null===(t=bn.current)||void 0===t||t.abort(),Gt(function(t){return e(e({},t),{userStory:!1})})}}):i(r,{}),Vt.userStory&&on?i(j,{type:"fill",children:hn?l("span",e({className:R.savingSpinner,style:null==gt?void 0:gt.savingSpinner},{children:[i(f,{className:R.spinAnimation,style:null==gt?void 0:gt.spinAnimation}),i("span",{children:"Saving..."})]})):"Save",isDisable:hn,style:hn?null==gt?void 0:gt.savingButton:null==gt?void 0:gt.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 fn(!0),"userStory"==="userStory"&&(Ce(Mt),console.log("I am changing RTE editor values",Mt)),[4,xe(ft,en,fe,null===(t=bn.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Ce(e(e({},Mt),{isDefaultEdit:!1})),Gt(function(t){return e(e({},t),{userStory:!1})}),fn(!1),[2]}})})}}):!we&&!Ee&&!et&&on&&!1!==(null==Pn?void 0:Pn.showEditButton)&&i("button",e({className:R.iconButton,style:null==gt?void 0:gt.editButton,onClick:function(){return Gt(function(t){return e(e({},t),{userStory:!0})})}},{children:i(y,{color:null==gt?void 0:gt.pencilIconColor,size:16})})),Ye&&An&&on&&!we&&!Ee&&!1!==(null==Pn?void 0:Pn.showEditButton)&&l("button",e({type:"button",className:R.addSectionButton,style:null==It?void 0:It.addSectionButton,onClick:function(t){var n,l,i;t.stopPropagation();var r=(null!==(l=null===(n=ge.sub_features)||void 0===n?void 0:n.length)&&void 0!==l?l:0)+1,a={artifactId:k(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},ge),{sub_features:o(o([],null!==(i=ge.sub_features)&&void 0!==i?i:[],!0),[a],!1)});Lt(s),Ce(s),ln(!0),Yt(a.title)},"aria-label":"Add section",title:"Add section"},{children:[i(S,{size:14}),i("span",e({className:R.addSectionLabel},{children:"Add Section"}))]})),!An&&!we&&!et&&!Ee&&i("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==Le||Le()},className:R.iconButton,style:null==It?void 0:It.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:i(g,{size:16})})),xt&&i("button",e({type:"button",className:R.iconButton,disabled:Pt,onClick:function(e){if(e.stopPropagation(),Ft)return Jt(null),void qt(!1);Jt(structuredClone(null!=Tt?Tt:{})),ln(!0),qt(!0)}},{children:i(Ft?C:y,{size:16,color:null==gt?void 0:gt.pencilIconColor})})),(null==Pn?void 0:Pn.actionItemsButton)&&l(r,{children:[i("span",e({className:R.actionItemBtn,style:null==gt?void 0:gt.actionItemBtn,onClick:function(e){e.stopPropagation(),pn(e.currentTarget)}},{children:i(I,{})})),i(A,e({id:"user-story-action-menu",anchorEl:vn,open:!!vn,onClose:En,style:null==gt?void 0:gt.userStoryShareMenu},{children:null==Me?void 0:Me.items.map(function(t,n){return i(P,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){t.onclick(ge),En()}},{children:l("div",e({className:R.menuItemContent,style:e(e({},null==gt?void 0:gt.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[i("span",e({className:R.menuItemIcon,style:null==gt?void 0:gt.menuItemIcon},{children:t.icon})),i("p",e({style:null==gt?void 0:gt.menuLabel},{children:t.name})),i("span",{className:R.menuItemRight,style:null==gt?void 0:gt.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),Dn()},style:null==gt?void 0:gt.chevronButton,className:R.chevronButton},{children:i(on?u:c,{className:R.chevronIcon,color:null==gt?void 0:gt.chevronIconColor})}))]}))]})),i("div",{className:R.divider,style:null==gt?void 0:gt.dividerStyle})]})),on&&i("div",e({className:R.cardContent,style:e(e({},null==gt?void 0:gt.cardContentStyle),{borderTop:Qe?"1px solid #E5E5E5":"none"})},{children:l("div",rt?e({className:R.loadingContainer},{children:[i("div",e({className:R.loadingIconWrapper},{children:i(N,{size:28,color:"#5B3DF5",className:R.spinAnimation})})),l("div",{children:[i("h3",e({className:R.loadingTitle},{children:"Section generation in progress.."})),i("p",e({className:R.loadingSubtitle},{children:"This may take a few minutes"}))]}),i("button",e({type:"button",onClick:function(){return null==at?void 0:at()},className:R.viewStatusButton},{children:"View Status"}))]}):pt?e({className:R.noDataContainer,style:null==Dt?void 0:Dt.container},{children:[i("img",{src:U,alt:"No data available",className:R.noDataIllustration,style:null==Dt?void 0:Dt.illustration}),i("h3",e({className:R.noDataTitle,style:null==Dt?void 0:Dt.title},{children:"No Data Available for This Section"})),i("p",e({className:R.noDataSubtitle,style:null==Dt?void 0:Dt.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]}):e({className:R.contentInner,style:null==gt?void 0:gt.contentInner},{children:[l("div",e({className:R.descriptionSection,style:null==gt?void 0:gt.descriptionSection},{children:[i("div",{className:R.justifyBetween,style:null==gt?void 0:gt.justifyBetween}),Vt.userStory?i(V,{minHeight:"100%",height:"100%",type:"string",value:_(ge.value)||"",handleUpdateState:function(t,n){var o=M(n);Lt(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Vt.userStory?"edit":"readOnly"}):xt?i(F,{styles:wt,fields:At,readonly:!Ft,isSaving:Ut,value:null!==(pe=null!=Zt?Zt:Tt)&&void 0!==pe?pe:{},onChange:Jt,onSave:function(){return t(void 0,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return Zt?[4,null===(e=null==St?void 0:St.onSave)||void 0===e?void 0:e.call(St,ge,Zt)]:[2];case 1:return t.sent(),Jt(null),qt(!1),[2]}})})},onCancel:function(){Jt(null),qt(!1)}}):l(r,{children:[i(G,{showUserStoryDiff:Ee,isParent:""===Ie,message:_(ge.value)||"",artifactId:ge.artifactId,customStyles:Nt,isDisplayHighlightControl:Ae,contextVariant:je,showConfidenceScore:Fe}),ot&&i("div",e({className:R.approveButtonContainer,style:null==Bt?void 0:Bt.container},{children:i("button",e({type:"button",className:R.approveButton,style:null==Bt?void 0:Bt.button,disabled:ot.disabled||ot.isLoading,onClick:function(e){var t;e.stopPropagation(),null===(t=null==ot?void 0:ot.onClick)||void 0===t||t.call(ot)}},{children:ot.isLoading?l(r,{children:[i(f,{size:16,className:R.spinner,style:null==Bt?void 0:Bt.icon}),i("span",e({style:null==Bt?void 0:Bt.text},{children:ot.label}))]}):l(r,{children:[i("span",e({style:null==Bt?void 0:Bt.text},{children:ot.label})),i(b,{size:16,style:null==Bt?void 0:Bt.icon})]})}))}))]})]})),null===(me=Mt.sub_features)||void 0===me?void 0:me.map(function(t,n){var l=X(Pe,!1,t.artifactId);return i($,{artifactId:fe,isUserStoryCurrentlyUpdated:he,artifactTitleId:"".concat(ye,"-").concat(String.fromCharCode(65+n)),parentUserStory:ge,parentIndex:"".concat(Ie).concat(Ie&&".").concat(Ne),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var l=o([],ge.sub_features||[],!0);l[t]=n,Ce(e(e({},ge),{sub_features:l}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:we,showUserStoryDiff:Ee,updateUserStoryArtifact:xe,handleDownloadUserStory:De,handleOpenSendDialog:Be,isDisplayHighlightControl:Ae,elementDisplayConfig:Pe,_resolvedConfig:l,actionItemsConfig:Me,onDelete:function(){return function(t){var n=(ge.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},ge),{sub_features:n});Lt(o),Ce(o)}(n)},expandedSubFeatures:Ve,disableEditPlan:et,useMuiTooltip:nt},t.artifactId)})]}))}))]}))},ee=function(t){var n=t.artifactTitleIDs,a=t.expandedSubFeatures,s=t.isDiffEditReviewMode,d=t.showUserStoryDiff,u=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,v=t.artifactId,p=t.handleOpenSendDialog,m=t.handleDownloadUserStory,h=t.selectedArtifactId,f=t.isDisplayHighlightControl,y=t.elementDisplayConfig,S=t.showWrapper,g=t.actionItemsConfig,C=t.contextVariant,I=t.showDisplayName,N=t.allowTitleEdit,b=t.showConfidenceScore,D=t.showBorderTop,B=t.defaultExpanded,x=t.showCompletionPanel,T=void 0!==x&&x,A=t.showAddSectionButton,P=void 0!==A&&A,U=t.disableEditPlan,k=void 0!==U&&U,_=t.useMuiTooltip,M=void 0!==_&&_,L=t.approveButtonConfig,j=z(),V=j.userStory,G=j.setUserStory,O=j.customStyles,H=j.searchQueryList,W=j.currentHighlightIndex,F=j.setCurrentHighlightIndex;j.segmentComponentConfig;var q=j.sectionStatusConfig,Q=null==O?void 0:O.userStoryCardStyles,Z=0===W,J=W===H.length-1;return l("div",e({className:R.userStoryCardWrapper,style:f?e(e({},null==Q?void 0:Q.userStoryCardWrapper),{position:"relative"}):null==Q?void 0:Q.userStoryCardWrapper},{children:[f&&i(r,{children:H.length>0&&i("div",e({className:R.wrapper},{children:i("div",e({className:R.highlightNavigation},{children:l("div",e({className:R.navigationContainer},{children:[l("span",e({className:R.navCounter},{children:[W+1," of ",H.length]})),l("div",e({className:R.navButtons},{children:[i("button",e({onClick:function(){W>0&&F(function(e){return e-1})},className:R.navButton,disabled:Z},{children:i(w,{size:20,className:R.navIcon})})),i("button",e({onClick:function(){W<H.length-1&&F(function(e){return e+1})},className:R.navButton,disabled:J},{children:i(E,{size:20,className:R.navIcon})}))]}))]}))}))}))}),V.map(function(e,t){var l=X(y,!0);return i($,{isUserStoryCurrentlyUpdated:c,artifactId:v,artifactTitleId:n[t]||"",expandedSubFeatures:a,currentUserStory:e,onUserStoryChange:function(e){G(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:d,updateUserStoryArtifact:u,handleOpenSendDialog:p,handleDownloadUserStory:m,selectedArtifactId:h,isDisplayHighlightControl:f,elementDisplayConfig:y,_resolvedConfig:l,showWrapper:S,defaultExpanded:B,actionItemsConfig:g,contextVariant:C,showDisplayName:I,allowTitleEdit:N,showConfidenceScore:b,showBorderTop:D,sectionStatusConfig:q,showCompletionPanel:T,showAddSectionButton:P,disableEditPlan:k,useMuiTooltip:M,approveButtonConfig:L},e.artifactId)})]}))};export{$ as StoryCard,ee as UserStoryCardWrapper,$ as default,K as replaceLearnedTagsWithInfo};
2
2
  //# sourceMappingURL=UserStoryCard.js.map
@@ -1,2 +1,2 @@
1
- var e={card:"UserStoryCard-module_card__9pErS",titleSection:"UserStoryCard-module_titleSection__pGbpL",titleRow:"UserStoryCard-module_titleRow__TyEN9",titleLeft:"UserStoryCard-module_titleLeft__fzF6u",titleActions:"UserStoryCard-module_titleActions__Dabx1",divider:"UserStoryCard-module_divider__xG-FC",displayName:"UserStoryCard-module_displayName__Jj-HK",displayNameIcon:"UserStoryCard-module_displayNameIcon__-SCM3",storyTitle:"UserStoryCard-module_storyTitle__FDX4p",iconButton:"UserStoryCard-module_iconButton__DkfRA",chevronButton:"UserStoryCard-module_chevronButton__nxxYC",chevronIcon:"UserStoryCard-module_chevronIcon__Azswy",cardContent:"UserStoryCard-module_cardContent__rR2g3",contentInner:"UserStoryCard-module_contentInner__AYQbu",descriptionSection:"UserStoryCard-module_descriptionSection__5j6cg",justifyBetween:"UserStoryCard-module_justifyBetween__cD-EG",savingSpinner:"UserStoryCard-module_savingSpinner__UmbEq",spinAnimation:"UserStoryCard-module_spinAnimation__INSou",spin:"UserStoryCard-module_spin__afcZ6",menuItemContent:"UserStoryCard-module_menuItemContent__U-ZxP",actionItemBtn:"UserStoryCard-module_actionItemBtn__3jocB",menuItemIcon:"UserStoryCard-module_menuItemIcon__BxrJU",menuItemRight:"UserStoryCard-module_menuItemRight__Cjw2j",wrapper:"UserStoryCard-module_wrapper__ahzRY",highlightNavigation:"UserStoryCard-module_highlightNavigation__vv8RW",navigationContainer:"UserStoryCard-module_navigationContainer__2UcOj",navButton:"UserStoryCard-module_navButton__EWoVi",navIcon:"UserStoryCard-module_navIcon__3ZSIH",navCounter:"UserStoryCard-module_navCounter__sIIeS",navButtons:"UserStoryCard-module_navButtons__6oLaN",menuItemContentPadded:"UserStoryCard-module_menuItemContentPadded__w6udq",userStoryCardWrapper:"UserStoryCard-module_userStoryCardWrapper__0gC-E",progressHeader:"UserStoryCard-module_progressHeader__LBMsg",progressPercentage:"UserStoryCard-module_progressPercentage__brScW",gapBox:"UserStoryCard-module_gapBox__LkEiT",storyTitleWrapper:"UserStoryCard-module_storyTitleWrapper__Ng-Th",titleEditButton:"UserStoryCard-module_titleEditButton__iJADR",inlineTitleEditor:"UserStoryCard-module_inlineTitleEditor__rdF-w",inlineTitleInput:"UserStoryCard-module_inlineTitleInput__Ft6mB",inlineTitleConfirm:"UserStoryCard-module_inlineTitleConfirm__YTG-3",inlineTitleCancel:"UserStoryCard-module_inlineTitleCancel__clhBR",addSectionButton:"UserStoryCard-module_addSectionButton__lBCWj",addSectionLabel:"UserStoryCard-module_addSectionLabel__kUs2E",viewStatusButton:"UserStoryCard-module_viewStatusButton__4-ISq",statusContainer:"UserStoryCard-module_statusContainer__Blr6F",completedBadge:"UserStoryCard-module_completedBadge__BURPe",statusButton:"UserStoryCard-module_statusButton__zeFUj",statusWaiting:"UserStoryCard-module_statusWaiting__mTSf-",statusInProgress:"UserStoryCard-module_statusInProgress__OsBoU",statusSuccess:"UserStoryCard-module_statusSuccess__ufhqE",loadingContainer:"UserStoryCard-module_loadingContainer__uPfG-",loadingIconWrapper:"UserStoryCard-module_loadingIconWrapper__5eUX7",loadingTitle:"UserStoryCard-module_loadingTitle__MHwmb",loadingSubtitle:"UserStoryCard-module_loadingSubtitle__PKUur",noDataContainer:"UserStoryCard-module_noDataContainer__Rys9X",noDataIllustration:"UserStoryCard-module_noDataIllustration__BoSPy",noDataTitle:"UserStoryCard-module_noDataTitle__DKazv",noDataSubtitle:"UserStoryCard-module_noDataSubtitle__ME3eH"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryCard-module_card__9pErS{border:1px solid #e5e5e5;border-radius:.75rem;display:flex;flex:1;flex-direction:column;margin-bottom:auto;margin-left:auto;margin-right:auto;position:relative;width:100%}.UserStoryCard-module_titleSection__pGbpL{cursor:pointer;padding:.5rem 1rem;width:100%}.UserStoryCard-module_titleRow__TyEN9{align-items:center;display:flex;justify-content:space-between;margin-top:.5rem;position:relative;width:100%}.UserStoryCard-module_titleLeft__fzF6u{align-items:center;display:flex;font-family:Inter,sans-serif;gap:.5rem;max-width:66.666%}.UserStoryCard-module_titleActions__Dabx1{align-items:center;display:flex;gap:.5rem;width:fit-content}.UserStoryCard-module_divider__xG-FC{background-color:#ffffff4d;border-radius:9999px;height:.25rem;width:4rem}.UserStoryCard-module_displayName__Jj-HK{align-items:center;color:#4b5563;display:inline-flex;font-size:.875rem;font-weight:500;gap:.5rem}.UserStoryCard-module_displayNameIcon__-SCM3{height:1rem;width:1rem}.UserStoryCard-module_storyTitle__FDX4p{color:#374151;flex:1;font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.UserStoryCard-module_iconButton__DkfRA{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryCard-module_iconButton__DkfRA:hover{background-color:#f9fafb}.UserStoryCard-module_chevronButton__nxxYC{background:none;border:none;cursor:pointer;margin-left:.5rem;padding:.25rem}.UserStoryCard-module_chevronIcon__Azswy{color:#4b5563;height:1.5rem;width:1.5rem}.UserStoryCard-module_cardContent__rR2g3{max-height:fit-content;opacity:1;padding:1.5rem 2rem 2rem;transition:all .3s ease-in-out;width:100%}.UserStoryCard-module_contentInner__AYQbu{display:flex;flex-direction:column;gap:2.5rem;width:100%}.UserStoryCard-module_descriptionSection__5j6cg{display:flex;flex-direction:column;gap:1rem;width:100%}.UserStoryCard-module_justifyBetween__cD-EG{display:flex;justify-content:space-between}.UserStoryCard-module_savingSpinner__UmbEq{align-items:center;color:#fff;display:flex;flex-direction:row;gap:.5rem}.UserStoryCard-module_spinAnimation__INSou{animation:UserStoryCard-module_spin__afcZ6 1s linear infinite}@keyframes UserStoryCard-module_spin__afcZ6{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.UserStoryCard-module_menuItemContent__U-ZxP{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryCard-module_actionItemBtn__3jocB{font-size:18px;line-height:0}.UserStoryCard-module_menuItemIcon__BxrJU{align-items:center;display:inline-flex;margin-right:.5rem}.UserStoryCard-module_menuItemRight__Cjw2j{align-self:center;border-radius:50%;height:8px;margin-left:auto;width:8px}.UserStoryCard-module_wrapper__ahzRY{background-color:#fff;border-bottom:1px solid hsla(0,0%,50%,.126);display:flex;justify-content:flex-end;margin-bottom:4px;padding:5px 10px 5px 0;position:sticky;top:0;width:100%;z-index:1000}.UserStoryCard-module_highlightNavigation__vv8RW{width:max-content}.UserStoryCard-module_navigationContainer__2UcOj{align-items:center;border:1px solid hsla(0,0%,50%,.126);border-radius:10px;display:inline-flex;gap:8px;padding:6px 8px}.UserStoryCard-module_navButton__EWoVi{align-items:center;background:none;border:none;color:#374151;cursor:pointer;display:flex;justify-content:center;padding:2px;transition:color .15s ease}.UserStoryCard-module_navIcon__3ZSIH{height:20px;width:20px}.UserStoryCard-module_navCounter__sIIeS{color:#4b5563;font-size:17px;font-weight:500;letter-spacing:.01em;min-width:28px;text-align:center}.UserStoryCard-module_navButtons__6oLaN{display:flex;gap:0}.UserStoryCard-module_navButton__EWoVi:disabled{cursor:not-allowed;opacity:.4}.UserStoryCard-module_menuItemContentPadded__w6udq{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}.UserStoryCard-module_userStoryCardWrapper__0gC-E{width:100%}.UserStoryCard-module_progressHeader__LBMsg{align-items:center;display:flex;gap:8px}.UserStoryCard-module_progressPercentage__brScW{background:#fff;border:1px solid #d0d5dd;border-radius:8px;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_gapBox__LkEiT{background:#fff7e6;border:1px solid #f7d58d;border-radius:8px;color:#b26b00;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_storyTitleWrapper__Ng-Th{align-items:center;display:flex;gap:6px;min-width:0}.UserStoryCard-module_titleEditButton__iJADR{align-items:center;background:#0000;border:none;border-radius:4px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;opacity:1;padding:3px;transition:opacity .15s ease,background .15s ease,color .15s ease}.UserStoryCard-module_titleEditButton__iJADR:hover{background:var(--color-surface-hover,#f3f4f6);color:var(--color-primary,#4f46e5);opacity:1}.UserStoryCard-module_titleEditButton__iJADR:focus-visible{opacity:1;outline:2px solid var(--color-primary,#4f46e5);outline-offset:1px}.UserStoryCard-module_inlineTitleEditor__rdF-w{align-items:center;display:flex;flex:1;gap:4px;min-width:0}.UserStoryCard-module_inlineTitleInput__Ft6mB{background:var(--color-surface,#fff);border:1.5px solid var(--color-primary,#4f46e5);border-radius:5px;color:var(--color-text-primary,#111827);flex:1;font-size:inherit;font-weight:600;line-height:1.4;min-width:0;outline:none;padding:3px 8px;transition:border-color .15s ease,box-shadow .15s ease}.UserStoryCard-module_inlineTitleInput__Ft6mB:focus{border-color:var(--color-primary,#4f46e5);box-shadow:0 0 0 3px #4f46e526}.UserStoryCard-module_inlineTitleConfirm__YTG-3{align-items:center;background:var(--color-primary,#4f46e5);border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,transform .1s ease;width:26px}.UserStoryCard-module_inlineTitleConfirm__YTG-3:hover:not(:disabled){background:var(--color-primary-dark,#4338ca)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:active:not(:disabled){transform:scale(.93)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:disabled{cursor:not-allowed;opacity:.45}.UserStoryCard-module_inlineTitleConfirm__YTG-3:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_inlineTitleCancel__clhBR{align-items:center;background:#0000;border:1.5px solid var(--color-border,#e5e7eb);border-radius:5px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,color .15s ease,border-color .15s ease;width:26px}.UserStoryCard-module_inlineTitleCancel__clhBR:hover{background:var(--color-surface-hover,#f3f4f6);border-color:var(--color-danger,#ef4444);color:var(--color-danger,#ef4444)}.UserStoryCard-module_inlineTitleCancel__clhBR:focus-visible{outline:2px solid var(--color-danger,#ef4444);outline-offset:2px}.UserStoryCard-module_addSectionButton__lBCWj{align-items:center;background:#0000;border:1.5px dashed var(--color-border,#d1d5db);border-radius:6px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:500;gap:5px;padding:6px 10px;transition:border-color .15s ease,color .15s ease,background .15s ease;white-space:nowrap}.UserStoryCard-module_addSectionButton__lBCWj:hover{background:var(--color-primary-subtle,#4f46e50d);border-color:var(--color-primary,#4f46e5);color:var(--color-primary,#4f46e5)}.UserStoryCard-module_addSectionButton__lBCWj:active{transform:scale(.97)}.UserStoryCard-module_addSectionButton__lBCWj:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_addSectionLabel__kUs2E{display:inline}.UserStoryCard-module_viewStatusButton__4-ISq{background:#0000;border:1px solid #5b3df5;border-radius:12px;color:#5b3df5;cursor:pointer;font-size:14px;font-weight:600;padding:10px 20px;transition:all .2s ease}.UserStoryCard-module_viewStatusButton__4-ISq:hover{background:#5b3df5;color:#fff}.UserStoryCard-module_viewStatusButton__4-ISq:active{transform:scale(.98)}.UserStoryCard-module_statusContainer__Blr6F{align-items:center;display:flex;gap:8px;margin-left:auto;margin-right:12px}.UserStoryCard-module_completedBadge__BURPe{background:#f3f4f6;border-radius:8px;color:#374151;font-size:12px;font-weight:600;padding:4px 10px;white-space:nowrap}.UserStoryCard-module_statusButton__zeFUj{align-items:center;border:none;border-radius:5px;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:600;gap:5px;padding:4px 8px;transition:all .2s ease}.UserStoryCard-module_statusWaiting__mTSf-{background:#fef3c7;color:#b45309}.UserStoryCard-module_statusInProgress__OsBoU{background:#ede9fe;color:#6d28d9}.UserStoryCard-module_statusSuccess__ufhqE{background:#dcfce7;color:#15803d}.UserStoryCard-module_loadingContainer__uPfG-{align-items:center;display:flex;flex-direction:column;gap:16px;justify-content:center;min-height:240px;padding:48px 24px;text-align:center}.UserStoryCard-module_loadingIconWrapper__5eUX7{align-items:center;background:#f4f1ff;border-radius:50%;display:flex;height:64px;justify-content:center;width:64px}.UserStoryCard-module_loadingTitle__MHwmb{color:#0f172a;font-size:18px;font-weight:600;margin:0}.UserStoryCard-module_loadingSubtitle__PKUur{color:#64748b;font-size:16px;margin-top:8px}.UserStoryCard-module_noDataContainer__Rys9X{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:24px;text-align:center}.UserStoryCard-module_noDataIllustration__BoSPy{height:auto;margin-bottom:12px;width:88px}.UserStoryCard-module_noDataTitle__DKazv{color:#111827;font-size:18px;font-weight:600;line-height:26px;margin:0 0 6px}.UserStoryCard-module_noDataSubtitle__ME3eH{color:#6b7280;font-size:14px;line-height:20px;margin:0;max-width:520px}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
1
+ var e={card:"UserStoryCard-module_card__9pErS",titleSection:"UserStoryCard-module_titleSection__pGbpL",titleRow:"UserStoryCard-module_titleRow__TyEN9",titleLeft:"UserStoryCard-module_titleLeft__fzF6u",titleActions:"UserStoryCard-module_titleActions__Dabx1",divider:"UserStoryCard-module_divider__xG-FC",displayName:"UserStoryCard-module_displayName__Jj-HK",displayNameIcon:"UserStoryCard-module_displayNameIcon__-SCM3",storyTitle:"UserStoryCard-module_storyTitle__FDX4p",iconButton:"UserStoryCard-module_iconButton__DkfRA",chevronButton:"UserStoryCard-module_chevronButton__nxxYC",chevronIcon:"UserStoryCard-module_chevronIcon__Azswy",cardContent:"UserStoryCard-module_cardContent__rR2g3",contentInner:"UserStoryCard-module_contentInner__AYQbu",descriptionSection:"UserStoryCard-module_descriptionSection__5j6cg",justifyBetween:"UserStoryCard-module_justifyBetween__cD-EG",savingSpinner:"UserStoryCard-module_savingSpinner__UmbEq",spinAnimation:"UserStoryCard-module_spinAnimation__INSou",spin:"UserStoryCard-module_spin__afcZ6",menuItemContent:"UserStoryCard-module_menuItemContent__U-ZxP",actionItemBtn:"UserStoryCard-module_actionItemBtn__3jocB",menuItemIcon:"UserStoryCard-module_menuItemIcon__BxrJU",menuItemRight:"UserStoryCard-module_menuItemRight__Cjw2j",wrapper:"UserStoryCard-module_wrapper__ahzRY",highlightNavigation:"UserStoryCard-module_highlightNavigation__vv8RW",navigationContainer:"UserStoryCard-module_navigationContainer__2UcOj",navButton:"UserStoryCard-module_navButton__EWoVi",navIcon:"UserStoryCard-module_navIcon__3ZSIH",navCounter:"UserStoryCard-module_navCounter__sIIeS",navButtons:"UserStoryCard-module_navButtons__6oLaN",menuItemContentPadded:"UserStoryCard-module_menuItemContentPadded__w6udq",userStoryCardWrapper:"UserStoryCard-module_userStoryCardWrapper__0gC-E",progressHeader:"UserStoryCard-module_progressHeader__LBMsg",progressPercentage:"UserStoryCard-module_progressPercentage__brScW",gapBox:"UserStoryCard-module_gapBox__LkEiT",storyTitleWrapper:"UserStoryCard-module_storyTitleWrapper__Ng-Th",titleEditButton:"UserStoryCard-module_titleEditButton__iJADR",inlineTitleEditor:"UserStoryCard-module_inlineTitleEditor__rdF-w",inlineTitleInput:"UserStoryCard-module_inlineTitleInput__Ft6mB",inlineTitleConfirm:"UserStoryCard-module_inlineTitleConfirm__YTG-3",inlineTitleCancel:"UserStoryCard-module_inlineTitleCancel__clhBR",addSectionButton:"UserStoryCard-module_addSectionButton__lBCWj",addSectionLabel:"UserStoryCard-module_addSectionLabel__kUs2E",viewStatusButton:"UserStoryCard-module_viewStatusButton__4-ISq",statusContainer:"UserStoryCard-module_statusContainer__Blr6F",completedBadge:"UserStoryCard-module_completedBadge__BURPe",statusButton:"UserStoryCard-module_statusButton__zeFUj",statusWaiting:"UserStoryCard-module_statusWaiting__mTSf-",statusInProgress:"UserStoryCard-module_statusInProgress__OsBoU",statusSuccess:"UserStoryCard-module_statusSuccess__ufhqE",loadingContainer:"UserStoryCard-module_loadingContainer__uPfG-",loadingIconWrapper:"UserStoryCard-module_loadingIconWrapper__5eUX7",loadingTitle:"UserStoryCard-module_loadingTitle__MHwmb",loadingSubtitle:"UserStoryCard-module_loadingSubtitle__PKUur",noDataContainer:"UserStoryCard-module_noDataContainer__Rys9X",noDataIllustration:"UserStoryCard-module_noDataIllustration__BoSPy",noDataTitle:"UserStoryCard-module_noDataTitle__DKazv",noDataSubtitle:"UserStoryCard-module_noDataSubtitle__ME3eH",approveButtonContainer:"UserStoryCard-module_approveButtonContainer__5FUNI",approveButton:"UserStoryCard-module_approveButton__aIjbK"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryCard-module_card__9pErS{border:1px solid #e5e5e5;border-radius:.75rem;display:flex;flex:1;flex-direction:column;margin-bottom:auto;margin-left:auto;margin-right:auto;position:relative;width:100%}.UserStoryCard-module_titleSection__pGbpL{cursor:pointer;padding:.5rem 1rem;width:100%}.UserStoryCard-module_titleRow__TyEN9{align-items:center;display:flex;justify-content:space-between;margin-top:.5rem;position:relative;width:100%}.UserStoryCard-module_titleLeft__fzF6u{align-items:center;display:flex;font-family:Inter,sans-serif;gap:.5rem;max-width:66.666%}.UserStoryCard-module_titleActions__Dabx1{align-items:center;display:flex;gap:.5rem;width:fit-content}.UserStoryCard-module_divider__xG-FC{background-color:#ffffff4d;border-radius:9999px;height:.25rem;width:4rem}.UserStoryCard-module_displayName__Jj-HK{align-items:center;color:#4b5563;display:inline-flex;font-size:.875rem;font-weight:500;gap:.5rem}.UserStoryCard-module_displayNameIcon__-SCM3{height:1rem;width:1rem}.UserStoryCard-module_storyTitle__FDX4p{color:#374151;flex:1;font-size:1rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.UserStoryCard-module_iconButton__DkfRA{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryCard-module_iconButton__DkfRA:hover{background-color:#f9fafb}.UserStoryCard-module_chevronButton__nxxYC{background:none;border:none;cursor:pointer;margin-left:.5rem;padding:.25rem}.UserStoryCard-module_chevronIcon__Azswy{color:#4b5563;height:1.5rem;width:1.5rem}.UserStoryCard-module_cardContent__rR2g3{max-height:fit-content;opacity:1;padding:1.5rem 2rem 2rem;transition:all .3s ease-in-out;width:100%}.UserStoryCard-module_contentInner__AYQbu{display:flex;flex-direction:column;gap:2.5rem;width:100%}.UserStoryCard-module_descriptionSection__5j6cg{display:flex;flex-direction:column;gap:1rem;width:100%}.UserStoryCard-module_justifyBetween__cD-EG{display:flex;justify-content:space-between}.UserStoryCard-module_savingSpinner__UmbEq{align-items:center;color:#fff;display:flex;flex-direction:row;gap:.5rem}.UserStoryCard-module_spinAnimation__INSou{animation:UserStoryCard-module_spin__afcZ6 1s linear infinite}@keyframes UserStoryCard-module_spin__afcZ6{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.UserStoryCard-module_menuItemContent__U-ZxP{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryCard-module_actionItemBtn__3jocB{font-size:18px;line-height:0}.UserStoryCard-module_menuItemIcon__BxrJU{align-items:center;display:inline-flex;margin-right:.5rem}.UserStoryCard-module_menuItemRight__Cjw2j{align-self:center;border-radius:50%;height:8px;margin-left:auto;width:8px}.UserStoryCard-module_wrapper__ahzRY{background-color:#fff;border-bottom:1px solid hsla(0,0%,50%,.126);display:flex;justify-content:flex-end;margin-bottom:4px;padding:5px 10px 5px 0;position:sticky;top:0;width:100%;z-index:1000}.UserStoryCard-module_highlightNavigation__vv8RW{width:max-content}.UserStoryCard-module_navigationContainer__2UcOj{align-items:center;border:1px solid hsla(0,0%,50%,.126);border-radius:10px;display:inline-flex;gap:8px;padding:6px 8px}.UserStoryCard-module_navButton__EWoVi{align-items:center;background:none;border:none;color:#374151;cursor:pointer;display:flex;justify-content:center;padding:2px;transition:color .15s ease}.UserStoryCard-module_navIcon__3ZSIH{height:20px;width:20px}.UserStoryCard-module_navCounter__sIIeS{color:#4b5563;font-size:17px;font-weight:500;letter-spacing:.01em;min-width:28px;text-align:center}.UserStoryCard-module_navButtons__6oLaN{display:flex;gap:0}.UserStoryCard-module_navButton__EWoVi:disabled{cursor:not-allowed;opacity:.4}.UserStoryCard-module_menuItemContentPadded__w6udq{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}.UserStoryCard-module_userStoryCardWrapper__0gC-E{width:100%}.UserStoryCard-module_progressHeader__LBMsg{align-items:center;display:flex;gap:8px}.UserStoryCard-module_progressPercentage__brScW{background:#fff;border:1px solid #d0d5dd;border-radius:8px;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_gapBox__LkEiT{background:#fff7e6;border:1px solid #f7d58d;border-radius:8px;color:#b26b00;font-size:14px;font-weight:500;padding:4px 10px}.UserStoryCard-module_storyTitleWrapper__Ng-Th{align-items:center;display:flex;gap:6px;min-width:0}.UserStoryCard-module_titleEditButton__iJADR{align-items:center;background:#0000;border:none;border-radius:4px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;opacity:1;padding:3px;transition:opacity .15s ease,background .15s ease,color .15s ease}.UserStoryCard-module_titleEditButton__iJADR:hover{background:var(--color-surface-hover,#f3f4f6);color:var(--color-primary,#4f46e5);opacity:1}.UserStoryCard-module_titleEditButton__iJADR:focus-visible{opacity:1;outline:2px solid var(--color-primary,#4f46e5);outline-offset:1px}.UserStoryCard-module_inlineTitleEditor__rdF-w{align-items:center;display:flex;flex:1;gap:4px;min-width:0}.UserStoryCard-module_inlineTitleInput__Ft6mB{background:var(--color-surface,#fff);border:1.5px solid var(--color-primary,#4f46e5);border-radius:5px;color:var(--color-text-primary,#111827);flex:1;font-size:inherit;font-weight:600;line-height:1.4;min-width:0;outline:none;padding:3px 8px;transition:border-color .15s ease,box-shadow .15s ease}.UserStoryCard-module_inlineTitleInput__Ft6mB:focus{border-color:var(--color-primary,#4f46e5);box-shadow:0 0 0 3px #4f46e526}.UserStoryCard-module_inlineTitleConfirm__YTG-3{align-items:center;background:var(--color-primary,#4f46e5);border:none;border-radius:5px;color:#fff;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,transform .1s ease;width:26px}.UserStoryCard-module_inlineTitleConfirm__YTG-3:hover:not(:disabled){background:var(--color-primary-dark,#4338ca)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:active:not(:disabled){transform:scale(.93)}.UserStoryCard-module_inlineTitleConfirm__YTG-3:disabled{cursor:not-allowed;opacity:.45}.UserStoryCard-module_inlineTitleConfirm__YTG-3:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_inlineTitleCancel__clhBR{align-items:center;background:#0000;border:1.5px solid var(--color-border,#e5e7eb);border-radius:5px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;transition:background .15s ease,color .15s ease,border-color .15s ease;width:26px}.UserStoryCard-module_inlineTitleCancel__clhBR:hover{background:var(--color-surface-hover,#f3f4f6);border-color:var(--color-danger,#ef4444);color:var(--color-danger,#ef4444)}.UserStoryCard-module_inlineTitleCancel__clhBR:focus-visible{outline:2px solid var(--color-danger,#ef4444);outline-offset:2px}.UserStoryCard-module_addSectionButton__lBCWj{align-items:center;background:#0000;border:1.5px dashed var(--color-border,#d1d5db);border-radius:6px;color:var(--color-text-secondary,#6b7280);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:500;gap:5px;padding:6px 10px;transition:border-color .15s ease,color .15s ease,background .15s ease;white-space:nowrap}.UserStoryCard-module_addSectionButton__lBCWj:hover{background:var(--color-primary-subtle,#4f46e50d);border-color:var(--color-primary,#4f46e5);color:var(--color-primary,#4f46e5)}.UserStoryCard-module_addSectionButton__lBCWj:active{transform:scale(.97)}.UserStoryCard-module_addSectionButton__lBCWj:focus-visible{outline:2px solid var(--color-primary,#4f46e5);outline-offset:2px}.UserStoryCard-module_addSectionLabel__kUs2E{display:inline}.UserStoryCard-module_viewStatusButton__4-ISq{background:#0000;border:1px solid #5b3df5;border-radius:12px;color:#5b3df5;cursor:pointer;font-size:14px;font-weight:600;padding:10px 20px;transition:all .2s ease}.UserStoryCard-module_viewStatusButton__4-ISq:hover{background:#5b3df5;color:#fff}.UserStoryCard-module_viewStatusButton__4-ISq:active{transform:scale(.98)}.UserStoryCard-module_statusContainer__Blr6F{align-items:center;display:flex;gap:8px;margin-left:auto;margin-right:12px}.UserStoryCard-module_completedBadge__BURPe{background:#f3f4f6;border-radius:8px;color:#374151;font-size:12px;font-weight:600;padding:4px 10px;white-space:nowrap}.UserStoryCard-module_statusButton__zeFUj{align-items:center;border:none;border-radius:5px;cursor:pointer;display:inline-flex;flex-shrink:0;font-size:12px;font-weight:600;gap:5px;padding:4px 8px;transition:all .2s ease}.UserStoryCard-module_statusWaiting__mTSf-{background:#fef3c7;color:#b45309}.UserStoryCard-module_statusInProgress__OsBoU{background:#ede9fe;color:#6d28d9}.UserStoryCard-module_statusSuccess__ufhqE{background:#dcfce7;color:#15803d}.UserStoryCard-module_loadingContainer__uPfG-{align-items:center;display:flex;flex-direction:column;gap:16px;justify-content:center;min-height:240px;padding:48px 24px;text-align:center}.UserStoryCard-module_loadingIconWrapper__5eUX7{align-items:center;background:#f4f1ff;border-radius:50%;display:flex;height:64px;justify-content:center;width:64px}.UserStoryCard-module_loadingTitle__MHwmb{color:#0f172a;font-size:18px;font-weight:600;margin:0}.UserStoryCard-module_loadingSubtitle__PKUur{color:#64748b;font-size:16px;margin-top:8px}.UserStoryCard-module_noDataContainer__Rys9X{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:24px;text-align:center}.UserStoryCard-module_noDataIllustration__BoSPy{height:auto;margin-bottom:12px;width:88px}.UserStoryCard-module_noDataTitle__DKazv{color:#111827;font-size:18px;font-weight:600;line-height:26px;margin:0 0 6px}.UserStoryCard-module_noDataSubtitle__ME3eH{color:#6b7280;font-size:14px;line-height:20px;margin:0;max-width:520px}.UserStoryCard-module_approveButtonContainer__5FUNI{align-items:center;display:flex;justify-content:center;padding-bottom:12px;width:100%}.UserStoryCard-module_approveButton__aIjbK{align-items:center;background:#0000;border:none;color:#5b3df5;cursor:pointer;display:inline-flex;font-size:16px;font-weight:600;gap:6px;padding:0}.UserStoryCard-module_approveButton__aIjbK:hover{opacity:.85}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=UserStoryCard.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__spreadArray as o}from"tslib";import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useState as n,useRef as i,useCallback as l,useMemo as a,useEffect as d}from"react";import{useRequirementAI as s}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{createUserStoriesForApproval as c,cloneUserStories as v}from"../../utils/userstory-approval-transform.utils.js";import{getFirstNonApprovedSegmentId as u,getFirstUnapprovedStoryId as p,approveAllSegments as f}from"../../utils/userstory-approval.utils.js";import{useApprovalStatus as S}from"../../hooks/useApprovalStatus.js";import{ContentSegment as m}from"./components/ContentSegment/ContentSegment.js";import{ApprovalBadge as h}from"./components/ApprovalBadge/ApprovalBadge.js";import g from"./UserStoryApprovalScreen.module.css.js";import{CheckIcon as y}from"../../icons/CheckIcon.js";import{BookmarkIcon as b}from"../../icons/BookmarkIcon.js";import{ApprovalSidebar as A}from"./components/ApprovalSidebar/ApprovalSidebar.js";import{SidebarOpenIcon as I,SidebarCloseIcon as C}from"lucide-react";import{UserStoryApprovalScreenContext as E,useUserStoryApprovalScreen as w}from"./UserStoryApprovalContext.js";import{BigEnoughPanel as N}from"../story-screen/BigEnoughPanel.js";import T from"../../icons/BigEnoughIcon.js";var U={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},x={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},F=Object.assign(function(r){var f,m=r.artifactTitleIds,h=r.config,y=void 0===h?{}:h,b=r.callbacks,A=void 0===b?{}:b,I=r.labels,C=void 0===I?{}:I,w=r.isDisabled,N=void 0!==w&&w,T=r.children,F=r.classNames,B=r.selectedArtifactId,k=s(),j=k.userStory,D=k.customStyles,_=e(e({},U),y),P=e(e({},x),C),R=n([]),W=R[0],M=R[1],V=n(""),q=V[0],z=V[1],O=n(""),L=O[0],H=O[1],G=n(!1),Y=G[0],J=G[1],K=n(!0),Q=K[0],X=K[1],Z=i(void 0),$=l(function(e,o,t,r){A.onShowNotification?A.onShowNotification(e,o,t,r):console.log("[".concat(e.toUpperCase(),"] ").concat(o,": ").concat(t))},[A]),ee=l(function(e){A.onScrollToElement?A.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[A]),oe=a(function(){var e=W.findIndex(function(e){return e.artifactId===q});return e>=0?e:0},[W,q]),te=W[oe];d(function(){Z.current=te},[te]),d(function(){var e;if(null==j?void 0:j.length){null===(e=A.onInitialize)||void 0===e||e.call(A),1===j.length&&X(!1),j.length>0&&!q&&z(B||j[0].artifactId);var o=c(v(j));M(o)}},[j,B]),d(function(){B&&B!==q&&z(B)},[B,q]),d(function(){if(te){var e=u(te,"");H(e)}},[null==te?void 0:te.artifactId]);var re=l(function(e,t){M(function(r){var n=o([],r,!0);if("APPROVED"===t.approval_status&&"APPROVED"!==r[e].approval_status){var i=p(r,t.artifactId);i&&z(i)}return n[e]=t,n})},[]),ne=l(function(e){var o=Z.current;if(o){var t=u(o,e);"NA"!==t&&(H(""),setTimeout(function(){H(t)},0))}},[]);S({userStoryForApproval:W,selectedUserStoryForApproval:te,userStoryIndex:oe,callbacks:A,labels:P,onSaveUserStory:re});var ie=e({height:_.containerHeight},_.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}),le={userStoryForApproval:W,setUserStoryForApproval:M,selectedStoryArtifactId:q,setSelectedStoryArtifactId:z,selectedUserStoryIndex:oe,selectedUserStoryForApproval:te,currentContentId:L,setCurrentContentId:H,isEditingSegment:Y,setIsEditingSegment:J,isSidebarExpanded:Q,setIsSidebarExpanded:X,artifactTitleIds:m,config:_,labels:P,callbacks:A,isDisabled:N,handleSaveUserStory:re,handleUpdateContentId:ne,showNotification:$,scrollToElement:ee};return t(E.Provider,e({value:le},{children:t("div",e({className:"".concat(g.container," ").concat((null==F?void 0:F.container)||""),style:e(e({},ie),null===(f=null==D?void 0:D.approvalScreen)||void 0===f?void 0:f.wrapperContainer)},{children:T}))}))},{Sidebar:function(e){var o=e.Component,r=e.config,n=e.className,i=w(),l=i.isSidebarExpanded,a=i.selectedStoryArtifactId,d=i.setSelectedStoryArtifactId,s=i.userStoryForApproval,c=i.isEditingSegment,v=i.artifactTitleIds;return o?t(o,{isSidebarExpanded:l,selectedStoryArtifactId:a,setSelectedStoryArtifactId:d,userStoryForApproval:s,isEditingAnUserStorySegment:c,artifactTitleIds:v}):t(A,{config:r,className:n})},SidebarToggle:function(o){var r=o.OpenIcon,n=o.CloseIcon,i=o.className,l=void 0===i?"":i,a=w(),d=a.isSidebarExpanded,s=a.setIsSidebarExpanded,c=r||I,v=n||C;return t("div",e({className:"".concat(g.sidebarToggleWrapper," ").concat(l)},{children:t("button",e({onClick:function(){return s(function(e){return!e})},className:g.sidebarToggleBtn,"aria-label":d?"Collapse sidebar":"Expand sidebar",type:"button"},{children:t(d?v:c,{})}))}))},Content:function(o){var i,a,d,c,v,u,p,S,m,A,I,C,E,U,x,F,B,k,j,D,_,P,R,W,M,V,q,z,O,L,H,G=o.children,Y=o.ButtonComponent,J=o.hideApproveAll,K=void 0!==J&&J,Q=o.pageTitle,X=void 0===Q?"Review Generated Requirements":Q,Z=o.pageDescription,$=void 0===Z?"This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements.":Z,ee=w(),oe=ee.selectedUserStoryForApproval,te=ee.selectedUserStoryIndex,re=ee.artifactTitleIds,ne=ee.labels,ie=ee.config,le=ee.isDisabled,ae=ee.isEditingSegment,de=ee.handleSaveUserStory,se=ee.setCurrentContentId,ce=ee.showNotification,ve=s(),ue=ve.customStyles,pe=ve.customIcons,fe=n(!1),Se=fe[0],me=fe[1],he=l(function(){if(oe)if(ae)ce("warn","Warning!",ne.unsavedChangesWarning,3e3);else{var e=f(oe);de(te,e),se("")}},[oe,te,ae,ne,de,se,ce]);if(!oe)return null;var ge=re[te]||"",ye="APPROVED"===oe.approval_status,be=null!=(null==oe?void 0:oe.big_enough)&&!Number.isNaN(oe.big_enough)&&!!(null==oe?void 0:oe.big_enough_decision_factors);return r("div",e({className:g.content,style:e({},null===(a=null===(i=null==ue?void 0:ue.approvalScreen)||void 0===i?void 0:i.content)||void 0===a?void 0:a.content),"data-lsc-ui-page-title":X,"data-lsc-ui-page-description":$},{children:[r("div",e({className:g.header,style:e({},null===(v=null===(c=null===(d=null==ue?void 0:ue.approvalScreen)||void 0===d?void 0:d.body)||void 0===c?void 0:c.contentSegment)||void 0===v?void 0:v.header)},{children:[r("div",e({className:g.headerLeft,style:e({},null===(p=null===(u=null==ue?void 0:ue.approvalScreen)||void 0===u?void 0:u.content)||void 0===p?void 0:p.headerLeft)},{children:[r("div",e({className:g.headerMeta,style:e({},null===(A=null===(m=null===(S=null==ue?void 0:ue.approvalScreen)||void 0===S?void 0:S.body)||void 0===m?void 0:m.contentSegment)||void 0===A?void 0:A.headerMeta)},{children:[t(b,{size:16,color:(null===(E=null===(C=null===(I=null==ue?void 0:ue.approvalScreen)||void 0===I?void 0:I.body)||void 0===C?void 0:C.contentSegment)||void 0===E?void 0:E.bookMarkColor)||"#8C8C8C"}),t("h2",e({className:g.headerArtifactId,style:e({},null===(F=null===(x=null===(U=null==ue?void 0:ue.approvalScreen)||void 0===U?void 0:U.body)||void 0===x?void 0:x.contentSegment)||void 0===F?void 0:F.headerArtifactId)},{children:ge}))]})),t("p",e({className:g.headerTitle,style:e({},null===(j=null===(k=null===(B=null==ue?void 0:ue.approvalScreen)||void 0===B?void 0:B.body)||void 0===k?void 0:k.contentSegment)||void 0===j?void 0:j.headerTitle)},{children:null==oe?void 0:oe.title}))]})),r("div",e({className:null==g?void 0:g.containerStyle,style:null===(_=null===(D=null==ue?void 0:ue.approvalScreen)||void 0===D?void 0:D.BigEnoughStyles)||void 0===_?void 0:_.containerStyle},{children:[be&&t("button",e({className:g.developerEffortButton,style:null===(R=null===(P=null==ue?void 0:ue.approvalScreen)||void 0===P?void 0:P.BigEnoughStyles)||void 0===R?void 0:R.buttonStyle,onClick:function(){return me(!Se)}},{children:t(T,{color:null===(M=null===(W=null==ue?void 0:ue.approvalScreen)||void 0===W?void 0:W.BigEnoughStyles)||void 0===M?void 0:M.iconColor,size:null===(q=null===(V=null==ue?void 0:ue.approvalScreen)||void 0===V?void 0:V.BigEnoughStyles)||void 0===q?void 0:q.iconSize})})),!K&&ie.showApproveAllButton&&t("div",e({className:g.headerRight},{children:ye?t(h,{status:"APPROVED",label:ne.approved}):Y?t(Y,e({type:"fill",onClick:he,isDisable:le,className:g.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:ne.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."}},{children:r("div",e({className:g.approveAllContent},{children:[t(y,{size:16,color:"white"}),t("span",{children:ne.approveAll})]}))})):r("button",e({onClick:he,disabled:le,className:g.approveAllButtonDefault,style:e({},null===(O=null===(z=null==ue?void 0:ue.approvalScreen)||void 0===z?void 0:z.content)||void 0===O?void 0:O.approveAllButtonDefault)},{children:[t(y,{size:16,color:"white"}),t("span",{children:ne.approveAll})]}))}))]}))]})),Se&&be&&t("div",e({className:g.bigEnoughWrapper},{children:t(N,{customIcons:null==pe?void 0:pe.userStoryIcons,customStyles:null===(L=null==ue?void 0:ue.approvalScreen)||void 0===L?void 0:L.aiReasoningCitaionStyles,currentUserStory:oe,panelStyles:null===(H=null==ue?void 0:ue.approvalScreen)||void 0===H?void 0:H.BigEnoughStyles,showPanel:Se})})),G]}))},Body:function(o){var n,i,a,d=o.children,c=o.EditorComponent,v=o.ViewerComponent,u=w(),p=u.selectedUserStoryForApproval,f=u.selectedUserStoryIndex,S=u.artifactTitleIds,h=u.handleSaveUserStory,y=s().customStyles,b=l(function(e){h(f,e)},[f,h]),A=l(function(o,t){var r;if(p){var n=e(e({},p),{sub_features:null===(r=p.sub_features)||void 0===r?void 0:r.map(function(e,r){return r===o?t:e})});h(f,n)}},[p,f,h]),I=l(function(o){var t;if(p){var r=e(e({},p),{sub_features:null===(t=p.sub_features)||void 0===t?void 0:t.filter(function(e,t){return t!==o})});h(f,r)}},[p,f,h]);if(!p)return null;var C=S[f]||"";return r("div",e({className:g.body,style:e({},null===(i=null===(n=null==y?void 0:y.approvalScreen)||void 0===n?void 0:n.body)||void 0===i?void 0:i.container)},{children:[t(m,{userStoryForApproval:p,artifactTitleId:C,onSaveMainStoryContent:b,EditorComponent:c,ViewerComponent:v}),null===(a=p.sub_features)||void 0===a?void 0:a.map(function(e,o){return t(m,{userStoryForApproval:e,artifactTitleId:"".concat(C," - ").concat(String.fromCharCode(65+o)),isSubFeature:!0,subFeatureIndex:o,onSaveSubFeature:A,onDeleteSubFeature:I,EditorComponent:c,ViewerComponent:v},e.artifactId)}),d]}))}});export{F as default};
1
+ import{__assign as e,__spreadArray as o,__awaiter as t,__generator as n}from"tslib";import{jsx as r,jsxs as l,Fragment as i}from"react/jsx-runtime";import{useState as a,useRef as s,useCallback as d,useMemo as c,useEffect as u}from"react";import v from"showdown";import{useRequirementAI as p}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{createUserStoriesForApproval as m,cloneUserStories as h}from"../../utils/userstory-approval-transform.utils.js";import{getFirstNonApprovedSegmentId as f,getFirstUnapprovedStoryId as S,approveAllSegments as y}from"../../utils/userstory-approval.utils.js";import{useApprovalStatus as g}from"../../hooks/useApprovalStatus.js";import{ContentSegment as b}from"./components/ContentSegment/ContentSegment.js";import{ApprovalBadge as I}from"./components/ApprovalBadge/ApprovalBadge.js";import C from"./UserStoryApprovalScreen.module.css.js";import{CheckIcon as A}from"../../icons/CheckIcon.js";import{BookmarkIcon as w}from"../../icons/BookmarkIcon.js";import{ApprovalSidebar as E}from"./components/ApprovalSidebar/ApprovalSidebar.js";import{ExternalLink as N,Download as U,Share2 as x,Copy as T,SidebarOpenIcon as k,SidebarCloseIcon as B}from"lucide-react";import{UserStoryApprovalScreenContext as D,useUserStoryApprovalScreen as F}from"./UserStoryApprovalContext.js";import{BigEnoughPanel as j}from"../story-screen/BigEnoughPanel.js";import P from"../../icons/BigEnoughIcon.js";import{Menu as M,MenuItem as _}from"@mui/material";import{formatMarkdown as R}from"../../utils/helpers.js";import{replaceTitleSection as z}from"../../utils/user-story.utils.js";var W={showApproveAllButton:!0,allowEditing:!0,allowDeletion:!0,showSidebar:!1,containerHeight:"calc(100vh - 100px)",useFullWidth:!1},L={approveAll:"Approve All",approved:"Approved",approve:"Approve",correctMe:"Correct Me",delete:"Delete",save:"Save",cancel:"Cancel",savingArtifact:"Saving Artifact...",artifactSavedTitle:"Artifact Saved Successfully",artifactSavedMessage:"Your changes have been saved.",saveFailedTitle:"Failed to Save the Artifact",saveFailedMessage:"An error occurred while saving your changes.",emptyContentWarning:"Saving empty content is not allowed",unsavedChangesWarning:"Please save the updated changes to proceed with Approve All"},O=Object.assign(function(t){var n,l=t.artifactTitleIds,i=t.config,v=void 0===i?{}:i,y=t.callbacks,b=void 0===y?{}:y,I=t.labels,A=void 0===I?{}:I,w=t.isDisabled,E=void 0!==w&&w,N=t.children,U=t.classNames,x=t.selectedArtifactId,T=p(),k=T.userStory,B=T.customStyles,F=e(e({},W),v),j=e(e({},L),A),P=a([]),M=P[0],_=P[1],R=a(""),z=R[0],O=R[1],V=a(""),q=V[0],H=V[1],G=a(!1),Y=G[0],J=G[1],K=a(!0),Q=K[0],X=K[1],Z=s(void 0),$=d(function(e,o,t,n){b.onShowNotification?b.onShowNotification(e,o,t,n):console.log("[".concat(e.toUpperCase(),"] ").concat(o,": ").concat(t))},[b]),ee=d(function(e){b.onScrollToElement?b.onScrollToElement(e):(e.style.scrollMarginTop="20px",e.scrollIntoView({behavior:"smooth",block:"start"}))},[b]),oe=c(function(){var e=M.findIndex(function(e){return e.artifactId===z});return e>=0?e:0},[M,z]),te=M[oe];u(function(){Z.current=te},[te]),u(function(){var e;if(null==k?void 0:k.length){null===(e=b.onInitialize)||void 0===e||e.call(b),1===k.length&&X(!1),k.length>0&&!z&&O(x||k[0].artifactId);var o=m(h(k));_(o)}},[k,x]),u(function(){x&&x!==z&&O(x)},[x,z]),u(function(){if(te){var e=f(te,"");H(e)}},[null==te?void 0:te.artifactId]);var ne=d(function(e,t){_(function(n){var r=o([],n,!0);if("APPROVED"===t.approval_status&&"APPROVED"!==n[e].approval_status){var l=S(n,t.artifactId);l&&O(l)}return r[e]=t,r})},[]),re=d(function(e){var o=Z.current;if(o){var t=f(o,e);"NA"!==t&&(H(""),setTimeout(function(){H(t)},0))}},[]);g({userStoryForApproval:M,selectedUserStoryForApproval:te,userStoryIndex:oe,callbacks:b,labels:j,onSaveUserStory:ne});var le=e({height:F.containerHeight},F.useFullWidth?{width:"100%",marginLeft:0,marginRight:0}:{width:"calc(100% + 40px)",marginLeft:"-20px",marginRight:"-20px"}),ie={userStoryForApproval:M,setUserStoryForApproval:_,selectedStoryArtifactId:z,setSelectedStoryArtifactId:O,selectedUserStoryIndex:oe,selectedUserStoryForApproval:te,currentContentId:q,setCurrentContentId:H,isEditingSegment:Y,setIsEditingSegment:J,isSidebarExpanded:Q,setIsSidebarExpanded:X,artifactTitleIds:l,config:F,labels:j,callbacks:b,isDisabled:E,handleSaveUserStory:ne,handleUpdateContentId:re,showNotification:$,scrollToElement:ee};return r(D.Provider,e({value:ie},{children:r("div",e({className:"".concat(C.container," ").concat((null==U?void 0:U.container)||""),style:e(e({},le),null===(n=null==B?void 0:B.approvalScreen)||void 0===n?void 0:n.wrapperContainer)},{children:N}))}))},{Sidebar:function(e){var o=e.Component,t=e.config,n=e.className,l=F(),i=l.isSidebarExpanded,a=l.selectedStoryArtifactId,s=l.setSelectedStoryArtifactId,d=l.userStoryForApproval,c=l.isEditingSegment,u=l.artifactTitleIds;return o?r(o,{isSidebarExpanded:i,selectedStoryArtifactId:a,setSelectedStoryArtifactId:s,userStoryForApproval:d,isEditingAnUserStorySegment:c,artifactTitleIds:u}):r(E,{config:t,className:n})},SidebarToggle:function(o){var t=o.OpenIcon,n=o.CloseIcon,l=o.className,i=void 0===l?"":l,a=F(),s=a.isSidebarExpanded,d=a.setIsSidebarExpanded,c=t||k,u=n||B;return r("div",e({className:"".concat(C.sidebarToggleWrapper," ").concat(i)},{children:r("button",e({onClick:function(){return d(function(e){return!e})},className:C.sidebarToggleBtn,"aria-label":s?"Collapse sidebar":"Expand sidebar",type:"button"},{children:r(s?u:c,{})}))}))},Content:function(o){var c,u,m,h,f,S,g,b,E,k,B,D,W,L,O,V,q,H,G,Y,J,K,Q,X,Z,$,ee,oe,te,ne,re,le=o.children,ie=o.ButtonComponent,ae=o.hideApproveAll,se=void 0!==ae&&ae,de=o.pageTitle,ce=void 0===de?"Review Generated Requirements":de,ue=o.showShareIcon,ve=void 0!==ue&&ue,pe=o.handleDownloadUserStory,me=o.handleOpenSendDialog,he=o.pageDescription,fe=void 0===he?"This page displays automatically generated requirements for your project. Use this screen to review, refine, correct, or approve all generated requirements.":he,Se=F(),ye=Se.selectedUserStoryForApproval,ge=Se.selectedUserStoryIndex,be=Se.artifactTitleIds,Ie=Se.labels,Ce=Se.config,Ae=Se.isDisabled,we=Se.isEditingSegment,Ee=Se.handleSaveUserStory,Ne=Se.setCurrentContentId,Ue=Se.showNotification,xe=p(),Te=xe.userStory;xe.setUserStory;var ke=Te[0],Be=a(null),De=Be[0],Fe=Be[1],je=function(){Fe(null)},Pe=s(null),Me=a(!1);Me[0];var _e=Me[1],Re=p(),ze=Re.customStyles,We=Re.customIcons,Le=null==ze?void 0:ze.userStoryCardStyles,Oe=a(!1),Ve=Oe[0],qe=Oe[1],He=d(function(){if(ye)if(we)Ue("warn","Warning!",Ie.unsavedChangesWarning,3e3);else{var e=y(ye);Ee(ge,e),Ne("")}},[ye,ge,we,Ie,Ee,Ne,Ue]);if(!ye)return null;var Ge=be[ge]||"",Ye="APPROVED"===ye.approval_status,Je=null!=(null==ye?void 0:ye.big_enough)&&!Number.isNaN(ye.big_enough)&&!!(null==ye?void 0:ye.big_enough_decision_factors);return l("div",e({className:C.content,style:e({},null===(u=null===(c=null==ze?void 0:ze.approvalScreen)||void 0===c?void 0:c.content)||void 0===u?void 0:u.content),"data-lsc-ui-page-title":ce,"data-lsc-ui-page-description":fe},{children:[l("div",e({className:C.header,style:e({},null===(f=null===(h=null===(m=null==ze?void 0:ze.approvalScreen)||void 0===m?void 0:m.body)||void 0===h?void 0:h.contentSegment)||void 0===f?void 0:f.header)},{children:[l("div",e({className:C.headerLeft,style:e({},null===(g=null===(S=null==ze?void 0:ze.approvalScreen)||void 0===S?void 0:S.content)||void 0===g?void 0:g.headerLeft)},{children:[l("div",e({className:C.headerMeta,style:e({},null===(k=null===(E=null===(b=null==ze?void 0:ze.approvalScreen)||void 0===b?void 0:b.body)||void 0===E?void 0:E.contentSegment)||void 0===k?void 0:k.headerMeta)},{children:[r(w,{size:16,color:(null===(W=null===(D=null===(B=null==ze?void 0:ze.approvalScreen)||void 0===B?void 0:B.body)||void 0===D?void 0:D.contentSegment)||void 0===W?void 0:W.bookMarkColor)||"#8C8C8C"}),r("h2",e({className:C.headerArtifactId,style:e({},null===(V=null===(O=null===(L=null==ze?void 0:ze.approvalScreen)||void 0===L?void 0:L.body)||void 0===O?void 0:O.contentSegment)||void 0===V?void 0:V.headerArtifactId)},{children:Ge}))]})),r("p",e({className:C.headerTitle,style:e({},null===(G=null===(H=null===(q=null==ze?void 0:ze.approvalScreen)||void 0===q?void 0:q.body)||void 0===H?void 0:H.contentSegment)||void 0===G?void 0:G.headerTitle)},{children:null==ye?void 0:ye.title}))]})),l("div",e({className:null==C?void 0:C.containerStyle,style:null===(J=null===(Y=null==ze?void 0:ze.approvalScreen)||void 0===Y?void 0:Y.BigEnoughStyles)||void 0===J?void 0:J.containerStyle},{children:[Je&&r("button",e({className:C.developerEffortButton,style:null===(Q=null===(K=null==ze?void 0:ze.approvalScreen)||void 0===K?void 0:K.BigEnoughStyles)||void 0===Q?void 0:Q.buttonStyle,onClick:function(){return qe(!Ve)}},{children:r(P,{color:null===(Z=null===(X=null==ze?void 0:ze.approvalScreen)||void 0===X?void 0:X.BigEnoughStyles)||void 0===Z?void 0:Z.iconColor,size:null===(ee=null===($=null==ze?void 0:ze.approvalScreen)||void 0===$?void 0:$.BigEnoughStyles)||void 0===ee?void 0:ee.iconSize})})),ve&&l(i,{children:[r("button",e({className:C.iconButton,style:null==Le?void 0:Le.iconButton,onClick:function(e){Fe(e.currentTarget)}},{children:r(N,{size:16})})),l(M,e({id:"user-story-share-menu",anchorEl:De,open:!!De,onClose:function(){return Fe(null)},style:null==Le?void 0:Le.userStoryShareMenu},{children:[r(_,e({style:null==Le?void 0:Le.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return _e(!0),pe?[4,Promise.all([pe("pdf"),pe("doc")])]:[2];case 1:return e.sent(),_e(!1),[2]}})})}},{children:l("div",e({ref:Pe,className:C.menuItemContent,style:null==Le?void 0:Le.menuItemContent},{children:[r(U,{size:16,color:null==Le?void 0:Le.menuIconColor}),r("p",e({style:null==Le?void 0:Le.menuLabel},{children:"Download"}))]}))})),r(_,e({style:null==Le?void 0:Le.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var o;return n(this,function(t){return ke,o=e(e({},ke),{value:"".concat(z(null==ke?void 0:ke.value,ke.title)," \n").concat(ke.value)}),null==me||me(!0,[o],ke.artifactId),je(),[2]})})}},{children:l("div",e({style:null==Le?void 0:Le.menuItemContent,className:C.menuItemContentPadded},{children:[r(x,{size:16,color:null==Le?void 0:Le.menuIconColor}),r("p",e({style:null==Le?void 0:Le.menuLabel},{children:"Send"}))]}))})),r(_,e({style:null==Le?void 0:Le.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,o,t,r,l;return n(this,function(n){switch(n.label){case 0:e=new v.Converter,o=e.makeHtml(R(ke.value)||ke.value),t=function(e){var o=(new v.Converter).makeHtml(e),t=document.createElement("div");return t.innerHTML=o,t.textContent||t.innerText||""}(R(ke.value)||ke.value),r=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([o],{type:"text/html"})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,navigator.clipboard.write([r])];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 je(),[7];case 5:return[2]}})})}},{children:l("div",e({style:null==Le?void 0:Le.menuItemContent,className:C.menuItemContentPadded},{children:[r(T,{size:16,color:null==Le?void 0:Le.menuIconColor}),r("p",e({style:null==Le?void 0:Le.menuLabel},{children:"Copy"}))]}))}))]}))]}),!se&&Ce.showApproveAllButton&&r("div",e({className:C.headerRight},{children:Ye?r(I,{status:"APPROVED",label:Ie.approved}):ie?r(ie,e({type:"fill",onClick:He,isDisable:Ae,className:C.approveAllButton,overrideStyles:!0,lscUIAgent:{id:"approve-all",lscUIType:"button",lscUILabel:Ie.approveAll,lscUIDescription:"Clicks this button to approve all generated requirements on the page in a single action.",lscUIWhenToApply:"Apply when the user wants to accept all requirements without reviewing them individually, or when they say phrases like 'approve everything', 'finalize all', 'accept all', or 'this looks good, approve all'."}},{children:l("div",e({className:C.approveAllContent},{children:[r(A,{size:16,color:"white"}),r("span",{children:Ie.approveAll})]}))})):l("button",e({onClick:He,disabled:Ae,className:C.approveAllButtonDefault,style:e({},null===(te=null===(oe=null==ze?void 0:ze.approvalScreen)||void 0===oe?void 0:oe.content)||void 0===te?void 0:te.approveAllButtonDefault)},{children:[r(A,{size:16,color:"white"}),r("span",{children:Ie.approveAll})]}))}))]}))]})),Ve&&Je&&r("div",e({className:C.bigEnoughWrapper},{children:r(j,{customIcons:null==We?void 0:We.userStoryIcons,customStyles:null===(ne=null==ze?void 0:ze.approvalScreen)||void 0===ne?void 0:ne.aiReasoningCitaionStyles,currentUserStory:ye,panelStyles:null===(re=null==ze?void 0:ze.approvalScreen)||void 0===re?void 0:re.BigEnoughStyles,showPanel:Ve})})),le]}))},Body:function(o){var t,n,i,a=o.children,s=o.EditorComponent,c=o.ViewerComponent,u=o.handleDownloadUserStory,v=o.handleOpenSendDialog,m=o.showShareIcon,h=void 0!==m&&m,f=F(),S=f.selectedUserStoryForApproval,y=f.selectedUserStoryIndex,g=f.artifactTitleIds,I=f.handleSaveUserStory,A=p().customStyles,w=d(function(e){I(y,e)},[y,I]),E=d(function(o,t){var n;if(S){var r=e(e({},S),{sub_features:null===(n=S.sub_features)||void 0===n?void 0:n.map(function(e,n){return n===o?t:e})});I(y,r)}},[S,y,I]),N=d(function(o){var t;if(S){var n=e(e({},S),{sub_features:null===(t=S.sub_features)||void 0===t?void 0:t.filter(function(e,t){return t!==o})});I(y,n)}},[S,y,I]);if(!S)return null;var U=g[y]||"";return l("div",e({className:C.body,style:e({},null===(n=null===(t=null==A?void 0:A.approvalScreen)||void 0===t?void 0:t.body)||void 0===n?void 0:n.container)},{children:[r(b,{userStoryForApproval:S,artifactTitleId:U,onSaveMainStoryContent:w,EditorComponent:s,ViewerComponent:c}),null===(i=S.sub_features)||void 0===i?void 0:i.map(function(e,o){return r(b,{userStoryForApproval:e,artifactTitleId:"".concat(U," - ").concat(String.fromCharCode(65+o)),isSubFeature:!0,subFeatureIndex:o,onSaveSubFeature:E,onDeleteSubFeature:N,EditorComponent:s,ViewerComponent:c,handleDownloadUserStory:u,handleOpenSendDialog:v,showShareIcon:h},e.artifactId)}),a]}))}});export{O as default};
2
2
  //# sourceMappingURL=UserStoryApprovalScreen.js.map
@@ -1,2 +1,2 @@
1
- var e={container:"UserStoryApprovalScreen-module_container__Hy5uc",sidebarToggleWrapper:"UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4",developerEffortButton:"UserStoryApprovalScreen-module_developerEffortButton__9EfUX",containerStyle:"UserStoryApprovalScreen-module_containerStyle__PS6Gn",sidebarToggleBtn:"UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf",content:"UserStoryApprovalScreen-module_content__VQ6Z9",header:"UserStoryApprovalScreen-module_header__zsOki",headerLeft:"UserStoryApprovalScreen-module_headerLeft__s-1Eq",headerMeta:"UserStoryApprovalScreen-module_headerMeta__3JPhW",headerArtifactId:"UserStoryApprovalScreen-module_headerArtifactId__xjOR9",headerTitle:"UserStoryApprovalScreen-module_headerTitle__xxkv-",headerRight:"UserStoryApprovalScreen-module_headerRight__BWc-W",approveAllButton:"UserStoryApprovalScreen-module_approveAllButton__HkH1f",approveAllContent:"UserStoryApprovalScreen-module_approveAllContent__-UTDs",approveAllButtonDefault:"UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR",body:"UserStoryApprovalScreen-module_body__aAJwQ"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryApprovalScreen-module_container__Hy5uc{border:1px solid #d1d5db;display:flex;flex-direction:row;font-family:Inter,sans-serif;min-height:100vh}.UserStoryApprovalScreen-module_container__Hy5uc *{font-family:inherit}.UserStoryApprovalScreen-module_developerEffortButton__9EfUX{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.UserStoryApprovalScreen-module_containerStyle__PS6Gn{align-items:center;display:flex;gap:3px}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{transition:color .2s ease}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:hover{opacity:.8}.UserStoryApprovalScreen-module_content__VQ6Z9{display:flex;flex:1;flex-direction:column;min-height:100%;overflow-y:auto;position:relative;width:100%}.UserStoryApprovalScreen-module_header__zsOki{align-items:center;background-color:#fff;border-bottom:1px solid #d1d5db;display:flex;flex-direction:row;justify-content:space-between;padding:16px 32px;position:sticky;top:0;z-index:50}.UserStoryApprovalScreen-module_headerLeft__s-1Eq{display:flex;flex-direction:column;gap:4px}.UserStoryApprovalScreen-module_headerMeta__3JPhW{align-items:center;color:#6932e2;display:flex;flex-direction:row;gap:8px}.UserStoryApprovalScreen-module_headerArtifactId__xjOR9{font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.UserStoryApprovalScreen-module_headerTitle__xxkv-{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.UserStoryApprovalScreen-module_headerRight__BWc-W{align-items:center;display:flex}.UserStoryApprovalScreen-module_approveAllButton__HkH1f{height:40px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs{align-items:center;display:flex;flex-direction:row;gap:4px;height:32px;padding:0 2px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs span{color:#fff;font-family:Inter,sans-serif;font-size:14px;text-transform:none}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR{align-items:center;background:linear-gradient(115.1deg,#2546f0 -23.58%,#5928ed 74.92%);border:none;border-radius:8px;color:#fff;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;font-size:14px;gap:4px;height:40px;padding:0 16px;transition:opacity .2s ease}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:hover{opacity:.9}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:disabled{cursor:not-allowed;opacity:.5}.UserStoryApprovalScreen-module_body__aAJwQ{display:flex;flex-direction:column;width:100%}.UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4{flex-shrink:0;height:100%;position:relative;width:0}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;left:0;margin:0;padding:0;position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s ease;z-index:10}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:focus{outline:none}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
1
+ var e={container:"UserStoryApprovalScreen-module_container__Hy5uc",sidebarToggleWrapper:"UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4",developerEffortButton:"UserStoryApprovalScreen-module_developerEffortButton__9EfUX",containerStyle:"UserStoryApprovalScreen-module_containerStyle__PS6Gn",sidebarToggleBtn:"UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf",content:"UserStoryApprovalScreen-module_content__VQ6Z9",header:"UserStoryApprovalScreen-module_header__zsOki",headerLeft:"UserStoryApprovalScreen-module_headerLeft__s-1Eq",headerMeta:"UserStoryApprovalScreen-module_headerMeta__3JPhW",headerArtifactId:"UserStoryApprovalScreen-module_headerArtifactId__xjOR9",headerTitle:"UserStoryApprovalScreen-module_headerTitle__xxkv-",headerRight:"UserStoryApprovalScreen-module_headerRight__BWc-W",approveAllButton:"UserStoryApprovalScreen-module_approveAllButton__HkH1f",approveAllContent:"UserStoryApprovalScreen-module_approveAllContent__-UTDs",approveAllButtonDefault:"UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR",body:"UserStoryApprovalScreen-module_body__aAJwQ",iconButton:"UserStoryApprovalScreen-module_iconButton__PGTVl",menuItemContent:"UserStoryApprovalScreen-module_menuItemContent__SCM6V",menuItemContentPadded:"UserStoryApprovalScreen-module_menuItemContentPadded__3UjuU"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const r=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;r&&e.setAttribute("nonce",r),e.appendChild(document.createTextNode(".UserStoryApprovalScreen-module_container__Hy5uc{border:1px solid #d1d5db;display:flex;flex-direction:row;font-family:Inter,sans-serif;min-height:100vh}.UserStoryApprovalScreen-module_container__Hy5uc *{font-family:inherit}.UserStoryApprovalScreen-module_developerEffortButton__9EfUX{background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;margin-right:3px;padding:.4rem .8rem}.UserStoryApprovalScreen-module_containerStyle__PS6Gn{align-items:center;display:flex;gap:3px}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{transition:color .2s ease}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:hover{opacity:.8}.UserStoryApprovalScreen-module_content__VQ6Z9{display:flex;flex:1;flex-direction:column;min-height:100%;overflow-y:auto;position:relative;width:100%}.UserStoryApprovalScreen-module_header__zsOki{align-items:center;background-color:#fff;border-bottom:1px solid #d1d5db;display:flex;flex-direction:row;justify-content:space-between;padding:16px 32px;position:sticky;top:0;z-index:50}.UserStoryApprovalScreen-module_headerLeft__s-1Eq{display:flex;flex-direction:column;gap:4px}.UserStoryApprovalScreen-module_headerMeta__3JPhW{align-items:center;color:#6932e2;display:flex;flex-direction:row;gap:8px}.UserStoryApprovalScreen-module_headerArtifactId__xjOR9{font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.UserStoryApprovalScreen-module_headerTitle__xxkv-{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.UserStoryApprovalScreen-module_headerRight__BWc-W{align-items:center;display:flex}.UserStoryApprovalScreen-module_approveAllButton__HkH1f{height:40px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs{align-items:center;display:flex;flex-direction:row;gap:4px;height:32px;padding:0 2px}.UserStoryApprovalScreen-module_approveAllContent__-UTDs span{color:#fff;font-family:Inter,sans-serif;font-size:14px;text-transform:none}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR{align-items:center;background:linear-gradient(115.1deg,#2546f0 -23.58%,#5928ed 74.92%);border:none;border-radius:8px;color:#fff;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;font-size:14px;gap:4px;height:40px;padding:0 16px;transition:opacity .2s ease}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:hover{opacity:.9}.UserStoryApprovalScreen-module_approveAllButtonDefault__MrKNR:disabled{cursor:not-allowed;opacity:.5}.UserStoryApprovalScreen-module_body__aAJwQ{display:flex;flex-direction:column;width:100%}.UserStoryApprovalScreen-module_sidebarToggleWrapper__Z9C-4{flex-shrink:0;height:100%;position:relative;width:0}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf{align-items:center;background:none;border:none;cursor:pointer;display:flex;justify-content:center;left:0;margin:0;padding:0;position:absolute;top:50%;transform:translateY(-50%);transition:opacity .2s ease;z-index:10}.UserStoryApprovalScreen-module_sidebarToggleBtn__9edtf:focus{outline:none}.UserStoryApprovalScreen-module_iconButton__PGTVl{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.UserStoryApprovalScreen-module_menuItemContent__SCM6V{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.UserStoryApprovalScreen-module_menuItemContentPadded__3UjuU{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}"));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=UserStoryApprovalScreen.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as o}from"tslib";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useState as l,useCallback as i}from"react";import{ContentBlock as t}from"../ContentBlock/ContentBlock.js";import r from"./ContentSegment.module.css.js";import{ChevronUpIcon as d}from"../../../../icons/ChevronUpIcon.js";import{BookmarkIcon as v}from"../../../../icons/BookmarkIcon.js";import{ChevronDownIcon as u}from"../../../../icons/ChevronDownIcon.js";import{useRequirementAI as a}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as c}from"../../../story-screen/BigEnoughPanel.js";var s=function(s){var p,m,f,S,h,y,g,b,C,I,N,A,j,k,F,B,T,_,x,E,M,W,w,D,R,q,z,U,V,P=s.userStoryForApproval,G=s.artifactTitleId,H=s.isSubFeature,J=void 0!==H&&H,K=s.subFeatureIndex,L=s.onSaveSubFeature,O=s.onDeleteSubFeature,Q=s.onSaveMainStoryContent,X=s.EditorComponent,Y=s.ViewerComponent,Z=l(!0),$=Z[0],oo=Z[1],eo=a(),no=eo.customStyles,lo=eo.customIcons,io=i(function(){oo(function(o){return!o})},[]),to=i(function(e){if(void 0!==K){var n=o(o({},P),{value:P.value.map(function(n,l){return l===e?o(o({},n),{isApproved:!0}):n})});null==L||L(K,n)}},[P,K,L]),ro=i(function(e,n){if(void 0!==K){var l=o(o({},P),{value:P.value.map(function(l,i){return i===e?o(o({},l),{content:n}):l})});null==L||L(K,l)}},[P,K,L]),vo=i(function(e){if(void 0!==K){var n=o(o({},P),{value:P.value.filter(function(o,n){return n!==e})});0!==n.value.length?null==L||L(K,n):null==O||O(K)}},[P,K,L,O]),uo=i(function(e,n){var l;if(!J){var i=null===(l=P.value[e])||void 0===l?void 0:l.contentId;if(i){var t=o(o({},P),{value:P.value.map(function(e){return e.contentId===i?o(o({},e),{content:n}):e})});null==Q||Q(t)}}},[P,J,Q]),ao=i(function(e){var n;if(!J){var l=null===(n=P.value[e])||void 0===n?void 0:n.contentId;if(l){var i=o(o({},P),{value:P.value.map(function(e){return e.contentId===l?o(o({},e),{isApproved:!0}):e})});null==Q||Q(i)}}},[P,J,Q]),co=null!=(null==P?void 0:P.big_enough)&&!Number.isNaN(P.big_enough)&&!!(null==P?void 0:P.big_enough_decision_factors);return e("div",o({className:r.container,style:o({},null===(f=null===(m=null===(p=null==no?void 0:no.approvalScreen)||void 0===p?void 0:p.body)||void 0===m?void 0:m.contentSegment)||void 0===f?void 0:f.container)},{children:[J&&e("button",o({onClick:io,className:r.header,style:o({},null===(y=null===(h=null===(S=null==no?void 0:no.approvalScreen)||void 0===S?void 0:S.body)||void 0===h?void 0:h.contentSegment)||void 0===y?void 0:y.header)},{children:[e("div",o({className:r.headerContent,style:o({},null===(C=null===(b=null===(g=null==no?void 0:no.approvalScreen)||void 0===g?void 0:g.body)||void 0===b?void 0:b.contentSegment)||void 0===C?void 0:C.headerContent)},{children:[e("div",o({className:r.headerMeta,style:o({},null===(A=null===(N=null===(I=null==no?void 0:no.approvalScreen)||void 0===I?void 0:I.body)||void 0===N?void 0:N.contentSegment)||void 0===A?void 0:A.headerMeta)},{children:[n(v,{size:16,color:(null===(F=null===(k=null===(j=null==no?void 0:no.approvalScreen)||void 0===j?void 0:j.body)||void 0===k?void 0:k.contentSegment)||void 0===F?void 0:F.bookMarkColor)||"#8C8C8C"}),n("h2",o({className:r.headerArtifactId,style:o({},null===(_=null===(T=null===(B=null==no?void 0:no.approvalScreen)||void 0===B?void 0:B.body)||void 0===T?void 0:T.contentSegment)||void 0===_?void 0:_.headerArtifactId)},{children:G}))]})),n("p",o({className:r.headerTitle,style:o({},null===(M=null===(E=null===(x=null==no?void 0:no.approvalScreen)||void 0===x?void 0:x.body)||void 0===E?void 0:E.contentSegment)||void 0===M?void 0:M.headerTitle)},{children:null==P?void 0:P.title}))]})),e("div",o({className:r.headerToggle,style:o({},null===(D=null===(w=null===(W=null==no?void 0:no.approvalScreen)||void 0===W?void 0:W.body)||void 0===w?void 0:w.contentSegment)||void 0===D?void 0:D.headerToggle)},{children:[co&&n(c,{customIcons:null==lo?void 0:lo.userStoryIcons,customStyles:null===(R=null==no?void 0:no.approvalScreen)||void 0===R?void 0:R.aiReasoningCitaionStyles,currentUserStory:P,panelStyles:null===(q=null==no?void 0:no.approvalScreen)||void 0===q?void 0:q.BigEnoughStyles}),n($?d:u,{size:16})]}))]})),$&&n("div",o({className:r.contentWrapper,style:o({},null===(V=null===(U=null===(z=null==no?void 0:no.approvalScreen)||void 0===z?void 0:z.body)||void 0===U?void 0:U.contentSegment)||void 0===V?void 0:V.contentWrapper)},{children:Array.isArray(null==P?void 0:P.value)&&P.value.map(function(o,e){return n(t,{segment:o,segmentIndex:e,isSubFeature:J,onSaveContent:J?ro:uo,onApproveContent:J?to:ao,onDeleteContent:J?vo:void 0,EditorComponent:X,ViewerComponent:Y},o.contentId)})}))]}))};export{s as ContentSegment,s as default};
1
+ import{__assign as e,__awaiter as n,__generator as o}from"tslib";import{jsxs as l,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState as r,useRef as u,useCallback as d}from"react";import{ContentBlock as a}from"../ContentBlock/ContentBlock.js";import v from"./ContentSegment.module.css.js";import{ChevronUpIcon as c}from"../../../../icons/ChevronUpIcon.js";import{BookmarkIcon as s}from"../../../../icons/BookmarkIcon.js";import{ChevronDownIcon as m}from"../../../../icons/ChevronDownIcon.js";import{useRequirementAI as p}from"../../../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as f}from"../../../story-screen/BigEnoughPanel.js";import{Menu as h,MenuItem as y}from"@mui/material";import{ExternalLink as S,Download as C,Share2 as b,Copy as I}from"lucide-react";import g from"showdown";import{formatMarkdown as w}from"../../../../utils/helpers.js";var N=function(N){var k,j,x,A,B,M,T,F,_,z,D,E,L,P,U,W,H,R,q,V,O,G,J,K,Q,X,Y,Z,$,ee=N.userStoryForApproval,ne=N.artifactTitleId,oe=N.isSubFeature,le=void 0!==oe&&oe,te=N.subFeatureIndex,ie=N.onSaveSubFeature,re=N.onDeleteSubFeature,ue=N.onSaveMainStoryContent,de=N.EditorComponent,ae=N.ViewerComponent,ve=N.handleDownloadUserStory,ce=N.handleOpenSendDialog,se=N.showShareIcon,me=void 0!==se&&se,pe=r(!0),fe=pe[0],he=pe[1],ye=p(),Se=ye.customStyles,Ce=ye.customIcons,be=null==Se?void 0:Se.userStoryCardStyles,Ie=r(null),ge=Ie[0],we=Ie[1],Ne=r(!1);Ne[0];var ke=Ne[1],je=u(null),xe=d(function(){he(function(e){return!e})},[]),Ae=d(function(n){if(void 0!==te){var o=e(e({},ee),{value:ee.value.map(function(o,l){return l===n?e(e({},o),{isApproved:!0}):o})});null==ie||ie(te,o)}},[ee,te,ie]),Be=d(function(n,o){if(void 0!==te){var l=e(e({},ee),{value:ee.value.map(function(l,t){return t===n?e(e({},l),{content:o}):l})});null==ie||ie(te,l)}},[ee,te,ie]),Me=d(function(n){if(void 0!==te){var o=e(e({},ee),{value:ee.value.filter(function(e,o){return o!==n})});0!==o.value.length?null==ie||ie(te,o):null==re||re(te)}},[ee,te,ie,re]),Te=d(function(n,o){var l;if(!le){var t=null===(l=ee.value[n])||void 0===l?void 0:l.contentId;if(t){var i=e(e({},ee),{value:ee.value.map(function(n){return n.contentId===t?e(e({},n),{content:o}):n})});null==ue||ue(i)}}},[ee,le,ue]),Fe=d(function(n){var o;if(!le){var l=null===(o=ee.value[n])||void 0===o?void 0:o.contentId;if(l){var t=e(e({},ee),{value:ee.value.map(function(n){return n.contentId===l?e(e({},n),{isApproved:!0}):n})});null==ue||ue(t)}}},[ee,le,ue]),_e=function(){we(null)},ze=function(n){var o,l=n.value.map(function(e){return e.content}).join("");return e(e({},n),{value:l,sub_features:null===(o=n.sub_features)||void 0===o?void 0:o.map(ze)})},De=null!=(null==ee?void 0:ee.big_enough)&&!Number.isNaN(ee.big_enough)&&!!(null==ee?void 0:ee.big_enough_decision_factors);return l("div",e({className:v.container,style:e({},null===(x=null===(j=null===(k=null==Se?void 0:Se.approvalScreen)||void 0===k?void 0:k.body)||void 0===j?void 0:j.contentSegment)||void 0===x?void 0:x.container)},{children:[le&&l("button",e({onClick:xe,className:v.header,style:e({},null===(M=null===(B=null===(A=null==Se?void 0:Se.approvalScreen)||void 0===A?void 0:A.body)||void 0===B?void 0:B.contentSegment)||void 0===M?void 0:M.header)},{children:[l("div",e({className:v.headerContent,style:e({},null===(_=null===(F=null===(T=null==Se?void 0:Se.approvalScreen)||void 0===T?void 0:T.body)||void 0===F?void 0:F.contentSegment)||void 0===_?void 0:_.headerContent)},{children:[l("div",e({className:v.headerMeta,style:e({},null===(E=null===(D=null===(z=null==Se?void 0:Se.approvalScreen)||void 0===z?void 0:z.body)||void 0===D?void 0:D.contentSegment)||void 0===E?void 0:E.headerMeta)},{children:[t(s,{size:16,color:(null===(U=null===(P=null===(L=null==Se?void 0:Se.approvalScreen)||void 0===L?void 0:L.body)||void 0===P?void 0:P.contentSegment)||void 0===U?void 0:U.bookMarkColor)||"#8C8C8C"}),t("h2",e({className:v.headerArtifactId,style:e({},null===(R=null===(H=null===(W=null==Se?void 0:Se.approvalScreen)||void 0===W?void 0:W.body)||void 0===H?void 0:H.contentSegment)||void 0===R?void 0:R.headerArtifactId)},{children:ne}))]})),t("p",e({className:v.headerTitle,style:e({},null===(O=null===(V=null===(q=null==Se?void 0:Se.approvalScreen)||void 0===q?void 0:q.body)||void 0===V?void 0:V.contentSegment)||void 0===O?void 0:O.headerTitle)},{children:null==ee?void 0:ee.title}))]})),l("div",e({className:v.headerToggle,style:e({},null===(K=null===(J=null===(G=null==Se?void 0:Se.approvalScreen)||void 0===G?void 0:G.body)||void 0===J?void 0:J.contentSegment)||void 0===K?void 0:K.headerToggle)},{children:[De&&t(f,{customIcons:null==Ce?void 0:Ce.userStoryIcons,customStyles:null===(Q=null==Se?void 0:Se.approvalScreen)||void 0===Q?void 0:Q.aiReasoningCitaionStyles,currentUserStory:ee,panelStyles:null===(X=null==Se?void 0:Se.approvalScreen)||void 0===X?void 0:X.BigEnoughStyles}),me&&l(i,{children:[t("button",e({className:v.iconButton,style:null==be?void 0:be.iconButton,onClick:function(e){we(e.currentTarget)}},{children:t(S,{size:16})})),l(h,e({id:"user-story-share-menu",anchorEl:ge,open:!!ge,onClose:function(){return we(null)},style:null==be?void 0:be.userStoryShareMenu},{children:[t(y,e({style:null==be?void 0:be.userStoryMenuItem,onClick:function(){return n(void 0,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return ke(!0),ve?[4,Promise.all([ve("pdf"),ve("doc")])]:[2];case 1:return e.sent(),ke(!1),[2]}})})}},{children:l("div",e({ref:je,className:v.menuItemContent,style:null==be?void 0:be.menuItemContent},{children:[t(C,{size:16,color:null==be?void 0:be.menuIconColor}),t("p",e({style:null==be?void 0:be.menuLabel},{children:"Download"}))]}))})),t(y,e({style:null==be?void 0:be.userStoryMenuItem,onClick:function(){return n(void 0,void 0,void 0,function(){var e;return o(this,function(n){return e=ze(ee),null==ce||ce(!0,[e],ee.artifactId),_e(),[2]})})}},{children:l("div",e({style:null==be?void 0:be.menuItemContent,className:v.menuItemContentPadded},{children:[t(b,{size:16,color:null==be?void 0:be.menuIconColor}),t("p",e({style:null==be?void 0:be.menuLabel},{children:"Send"}))]}))})),t(y,e({style:null==be?void 0:be.userStoryMenuItem,onClick:function(){return n(void 0,void 0,void 0,function(){var e,n,l,t,i,r;return o(this,function(o){switch(o.label){case 0:e=new g.Converter,n=ee.value.map(function(e){return e.content}).join(""),l=e.makeHtml(w(n)||n),t=function(e){var n=(new g.Converter).makeHtml(e),o=document.createElement("div");return o.innerHTML=n,o.textContent||o.innerText||""}(w(n)||n),i=new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([l],{type:"text/html"})}),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return o.sent(),console.log("Copied User Story"),[3,5];case 3:return r=o.sent(),console.error("Failed to copy user story:",r),[3,5];case 4:return _e(),[7];case 5:return[2]}})})}},{children:l("div",e({style:null==be?void 0:be.menuItemContent,className:v.menuItemContentPadded},{children:[t(I,{size:16,color:null==be?void 0:be.menuIconColor}),t("p",e({style:null==be?void 0:be.menuLabel},{children:"Copy"}))]}))}))]}))]}),t(fe?c:m,{size:16})]}))]})),fe&&t("div",e({className:v.contentWrapper,style:e({},null===($=null===(Z=null===(Y=null==Se?void 0:Se.approvalScreen)||void 0===Y?void 0:Y.body)||void 0===Z?void 0:Z.contentSegment)||void 0===$?void 0:$.contentWrapper)},{children:Array.isArray(null==ee?void 0:ee.value)&&ee.value.map(function(e,n){return t(a,{segment:e,segmentIndex:n,isSubFeature:le,onSaveContent:le?Be:Te,onApproveContent:le?Ae:Fe,onDeleteContent:le?Me:void 0,EditorComponent:de,ViewerComponent:ae},e.contentId)})}))]}))};export{N as ContentSegment,N as default};
2
2
  //# sourceMappingURL=ContentSegment.js.map
@@ -1,2 +1,2 @@
1
- var e={container:"ContentSegment-module_container__pZD9O",header:"ContentSegment-module_header__zzh-M",headerContent:"ContentSegment-module_headerContent__o77O4",headerMeta:"ContentSegment-module_headerMeta__Iv4Wf",headerArtifactId:"ContentSegment-module_headerArtifactId__Gr4B2",headerTitle:"ContentSegment-module_headerTitle__U7nsT",headerToggle:"ContentSegment-module_headerToggle__45got",contentWrapper:"ContentSegment-module_contentWrapper__eIUig"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".ContentSegment-module_container__pZD9O{display:flex;flex-direction:column;font-family:Inter,sans-serif}.ContentSegment-module_header__zzh-M{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-left:none;border-right:none;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;justify-content:space-between;padding:1rem 2rem;position:relative}.ContentSegment-module_headerContent__o77O4{display:flex;flex-direction:column;gap:.5rem}.ContentSegment-module_headerMeta__Iv4Wf{align-items:center;color:#8c8c8c;display:flex;flex-direction:row;gap:8px}.ContentSegment-module_headerArtifactId__Gr4B2{color:#6932e2;font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.ContentSegment-module_headerTitle__U7nsT{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.ContentSegment-module_headerToggle__45got{align-items:center;display:flex;justify-content:center}.ContentSegment-module_contentWrapper__eIUig{display:flex;flex-direction:column;gap:16px;padding:16px 32px}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
1
+ var e={container:"ContentSegment-module_container__pZD9O",header:"ContentSegment-module_header__zzh-M",headerContent:"ContentSegment-module_headerContent__o77O4",headerMeta:"ContentSegment-module_headerMeta__Iv4Wf",headerArtifactId:"ContentSegment-module_headerArtifactId__Gr4B2",headerTitle:"ContentSegment-module_headerTitle__U7nsT",headerToggle:"ContentSegment-module_headerToggle__45got",contentWrapper:"ContentSegment-module_contentWrapper__eIUig",iconButton:"ContentSegment-module_iconButton__0F6ls",menuItemContent:"ContentSegment-module_menuItemContent__39-so",menuItemContentPadded:"ContentSegment-module_menuItemContentPadded__CP7YL"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode(".ContentSegment-module_container__pZD9O{display:flex;flex-direction:column;font-family:Inter,sans-serif}.ContentSegment-module_header__zzh-M{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-left:none;border-right:none;cursor:pointer;display:flex;flex-direction:row;font-family:Inter,sans-serif;justify-content:space-between;padding:1rem 2rem;position:relative}.ContentSegment-module_headerContent__o77O4{display:flex;flex-direction:column;gap:.5rem}.ContentSegment-module_headerMeta__Iv4Wf{align-items:center;color:#8c8c8c;display:flex;flex-direction:row;gap:8px}.ContentSegment-module_headerArtifactId__Gr4B2{color:#6932e2;font-family:Inter,sans-serif;font-size:14px;font-weight:400;margin:0}.ContentSegment-module_headerTitle__U7nsT{font-family:Inter,sans-serif;font-size:16px;font-weight:600;margin:0}.ContentSegment-module_headerToggle__45got{align-items:center;display:flex;justify-content:center}.ContentSegment-module_contentWrapper__eIUig{display:flex;flex-direction:column;gap:16px;padding:16px 32px}.ContentSegment-module_iconButton__0F6ls{align-items:center;background-color:#fff;border:1px solid #d1d5db;border-radius:.3rem;box-shadow:0 1px 2px #0000000d;cursor:pointer;display:flex;justify-content:center;margin-left:.5rem;padding:.4rem .8rem}.ContentSegment-module_menuItemContent__39-so{align-items:center;display:flex;flex-direction:row;gap:.5rem;margin-left:.25rem}.ContentSegment-module_menuItemContentPadded__CP7YL{align-items:center;display:flex;flex-direction:row;gap:.5rem;padding-left:.25rem}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=ContentSegment.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StoryNode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAoBpH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC,EACF,SAAS,CAAC,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,KAAK,CAAC,SAAS,EAAE,CAiDnB;AAED;;GAEG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IACxB,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,aAAa,EAAE,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5D,yBAAyB,EAAE,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC;IACxE,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAiRA,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"StoryNode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,kCAAkC,CAAC;AAsB1C,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC,EACF,SAAS,CAAC,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,KAAK,CAAC,SAAS,EAAE,CA+CnB;AAED;;GAEG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IACxB,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,aAAa,EAAE,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5D,yBAAyB,EAAE,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,CAAC;IACxE,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAsRA,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -12,7 +12,8 @@ export declare enum SectionStatus {
12
12
  IN_PROGRESS = "in_progress",
13
13
  GENERATED = "generated",
14
14
  FAILED = "failed",
15
- GENERATE = "generate"
15
+ GENERATE = "generate",
16
+ APPROVED = "approved"
16
17
  }
17
18
  export interface SectionStatusConfig {
18
19
  isLoadingSectionData?: boolean;
@@ -300,12 +301,19 @@ export interface RequirementAICustomStyles {
300
301
  addSectionLabel?: React.CSSProperties;
301
302
  deleteButton?: React.CSSProperties;
302
303
  };
304
+ approveButtonStyles?: {
305
+ container?: React.CSSProperties;
306
+ button?: React.CSSProperties;
307
+ text?: React.CSSProperties;
308
+ icon?: React.CSSProperties;
309
+ };
303
310
  statusStyles?: {
304
311
  waiting?: React.CSSProperties;
305
312
  inProgress?: React.CSSProperties;
306
313
  generated?: React.CSSProperties;
307
314
  generate?: React.CSSProperties;
308
315
  failed?: React.CSSProperties;
316
+ approved?: React.CSSProperties;
309
317
  };
310
318
  noDataStyles?: {
311
319
  container?: React.CSSProperties;
@@ -426,6 +434,7 @@ interface IRequirementAIContext {
426
434
  getValue?: (story: IUserStory) => CustomSectionData;
427
435
  isSaving?: (story: IUserStory) => boolean;
428
436
  onSave?: (story: IUserStory, value: CustomSectionData) => Promise<void> | void;
437
+ isEditDisabled?: boolean;
429
438
  };
430
439
  }
431
440
  export interface RequirementAIWrapperProps {
@@ -1 +1 @@
1
- {"version":3,"file":"RequirementAIWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAkC,MAAM,OAAO,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAElI,OAAO,KAAK,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACtH,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAC7G,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AACrG,OAAO,EAAY,uBAAuB,EAAgB,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAC,iBAAiB,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACvF,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,QA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uB,CAAC;IACjD,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE;QACpB,YAAY,CAAC,EAAE,CACb,KAAK,EAAE,UAAU,KACd,OAAO,CAAC;QAEb,SAAS,CAAC,EAAE,CACV,KAAK,EAAE,UAAU,KACd,YAAY,EAAE,CAAC;QAEpB,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,UAAU,KACd,iBAAiB,CAAC;QAEvB,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,UAAU,KACd,OAAO,CAAC;QAEb,MAAM,CAAC,EAAE,CACP,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,iBAAiB,KACrB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;KAC3B,CAAC;CAEH;AAID,QAAA,MAAM,oBAAoB,maAwBvB,yBAAyB,4CA2E3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,6BAU5B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"RequirementAIWrapper.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAkC,MAAM,OAAO,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,gBAAgB,EA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jB,KAAK,EAAE,iBAAiB,KACrB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;KAC3B,CAAC;CAEH;AAID,QAAA,MAAM,oBAAoB,maAwBvB,yBAAyB,4CA2E3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,6BAU5B,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -11,6 +11,12 @@ interface CardDisplayConfig {
11
11
  showGapBox?: boolean;
12
12
  gapBoxValue?: string | number;
13
13
  }
14
+ export interface ApproveButtonConfig {
15
+ isLoading?: boolean;
16
+ label?: string;
17
+ disabled?: boolean;
18
+ onClick?: () => void;
19
+ }
14
20
  export interface ElementDisplayConfig {
15
21
  parentConfig?: CardDisplayConfig;
16
22
  childConfig?: CardDisplayConfig;
@@ -59,9 +65,12 @@ interface StoryCardProps {
59
65
  sectionStatusConfig?: SectionStatusConfig;
60
66
  showCompletionPanel?: boolean;
61
67
  showAddSectionButton?: boolean;
68
+ disableEditPlan?: boolean;
69
+ useMuiTooltip?: boolean;
70
+ approveButtonConfig?: ApproveButtonConfig;
62
71
  }
63
72
  export declare function replaceLearnedTagsWithInfo(content: string): React.ReactNode[];
64
- export declare const StoryCard: ({ isUserStoryCurrentlyUpdated, artifactId, artifactTitleId, parentUserStory, currentUserStory, onUserStoryChange, parentIndex, currentIndex, enableDownload, isDiffEditReviewMode, showUserStoryDiff, handleDownloadUserStory, handleOpenSendDialog, updateUserStoryArtifact, selectedArtifactId, isDisplayHighlightControl, elementDisplayConfig, _resolvedConfig, showWrapper, defaultExpanded, actionItemsConfig, onDelete, contextVariant, expandedSubFeatures, showDisplayName, allowTitleEdit, showConfidenceScore, showBorderTop, sectionStatusConfig, showCompletionPanel, showAddSectionButton, }: StoryCardProps) => import("react/jsx-runtime").JSX.Element;
73
+ export declare const StoryCard: ({ isUserStoryCurrentlyUpdated, artifactId, artifactTitleId, parentUserStory, currentUserStory, onUserStoryChange, parentIndex, currentIndex, enableDownload, isDiffEditReviewMode, showUserStoryDiff, handleDownloadUserStory, handleOpenSendDialog, updateUserStoryArtifact, selectedArtifactId, isDisplayHighlightControl, elementDisplayConfig, _resolvedConfig, showWrapper, defaultExpanded, actionItemsConfig, onDelete, contextVariant, expandedSubFeatures, showDisplayName, allowTitleEdit, showConfidenceScore, showBorderTop, sectionStatusConfig, showCompletionPanel, showAddSectionButton, disableEditPlan, useMuiTooltip, approveButtonConfig }: StoryCardProps) => import("react/jsx-runtime").JSX.Element;
65
74
  interface IProps {
66
75
  isUserStoryCurrentlyUpdated?: boolean;
67
76
  artifactId: string;
@@ -85,7 +94,10 @@ interface IProps {
85
94
  defaultExpanded?: boolean;
86
95
  showCompletionPanel?: boolean;
87
96
  showAddSectionButton?: boolean;
97
+ disableEditPlan?: boolean;
98
+ useMuiTooltip?: boolean;
99
+ approveButtonConfig?: ApproveButtonConfig;
88
100
  }
89
- export declare const UserStoryCardWrapper: ({ artifactTitleIDs, expandedSubFeatures, isDiffEditReviewMode, showUserStoryDiff, updateUserStoryArtifact, isUserStoryCurrentlyUpdated, artifactId, handleOpenSendDialog, handleDownloadUserStory, selectedArtifactId, isDisplayHighlightControl, elementDisplayConfig, showWrapper, actionItemsConfig, contextVariant, showDisplayName, allowTitleEdit, showConfidenceScore, showBorderTop, defaultExpanded, showCompletionPanel, showAddSectionButton, }: IProps) => import("react/jsx-runtime").JSX.Element;
101
+ export declare const UserStoryCardWrapper: ({ artifactTitleIDs, expandedSubFeatures, isDiffEditReviewMode, showUserStoryDiff, updateUserStoryArtifact, isUserStoryCurrentlyUpdated, artifactId, handleOpenSendDialog, handleDownloadUserStory, selectedArtifactId, isDisplayHighlightControl, elementDisplayConfig, showWrapper, actionItemsConfig, contextVariant, showDisplayName, allowTitleEdit, showConfidenceScore, showBorderTop, defaultExpanded, showCompletionPanel, showAddSectionButton, disableEditPlan, useMuiTooltip, approveButtonConfig }: IProps) => import("react/jsx-runtime").JSX.Element;
90
102
  export default StoryCard;
91
103
  //# sourceMappingURL=UserStoryCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserStoryCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/UserStoryCard/UserStoryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AA0B/D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAMlE,OAAQ,EAA8C,mBAAmB,EAAoB,MAAM,8CAA8C,CAAC;AAClJ,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAYzE,UAAU,iBAAiB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAGD,MAAM,WAAW,oBAAoB;IACjC,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,gBAAgB,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED,UAAU,cAAc;IACpB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,gBAAgB,EAAE,UAA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AAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,cAAc,CAAC,EAAC,UAAU,GAAG,QAAQ,CAAC;IACtC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAC,OAAO,CAAC;IACvB,eAAe,CAAC,EAAC,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAElC;AAED,eAAO,MAAM,oBAAoB,+bAA8c,MAAM,4CAyGpf,CAAA;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"UserStoryCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/UserStoryCard/UserStoryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AA0B/D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAMlE,OAAQ,EAA8C,mBAAmB,EAAoB,MAAM,8CAA8C,CAAC;AAClJ,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAYzE,UAAU,iBAAiB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB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ED,eAAO,MAAM,oBAAoB,mfAAihB,MAAM,4CA4GvjB,CAAA;AAED,eAAe,SAAS,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { UserStoryApprovalScreenConfig, UserStoryApprovalScreenCallbacks, UserStoryApprovalScreenLabels, UserStoryApprovalScreenClassNames, ApprovalSidebarConfig } from "../../interfaces/userstory.interface";
2
+ import { UserStoryApprovalScreenConfig, UserStoryApprovalScreenCallbacks, UserStoryApprovalScreenLabels, UserStoryApprovalScreenClassNames, ApprovalSidebarConfig, IUserStory } from "../../interfaces/userstory.interface";
3
3
  interface RootProps {
4
4
  /**
5
5
  * Artifact title IDs for each story
@@ -54,11 +54,17 @@ interface ContentProps {
54
54
  pageTitle?: string;
55
55
  /** Page description for accessibility */
56
56
  pageDescription?: string;
57
+ handleDownloadUserStory?: (filetype: "pdf" | "doc") => Promise<void>;
58
+ handleOpenSendDialog?: (sendEmailDialog: boolean, userStoryToSend: IUserStory[], artifactId: string, initSelectedEmails?: string[], autoSendEmail?: boolean) => void;
59
+ showShareIcon?: boolean;
57
60
  }
58
61
  interface BodyProps {
59
62
  children?: React.ReactNode;
60
63
  EditorComponent?: React.ComponentType<any>;
61
64
  ViewerComponent?: React.ComponentType<any>;
65
+ handleDownloadUserStory?: (filetype: "pdf" | "doc") => Promise<void>;
66
+ handleOpenSendDialog?: (sendEmailDialog: boolean, userStoryToSend: IUserStory[], artifactId: string, initSelectedEmails?: string[], autoSendEmail?: boolean) => void;
67
+ showShareIcon?: boolean;
62
68
  }
63
69
  declare const UserStoryApprovalScreen: React.FC<RootProps> & {
64
70
  Sidebar: React.FC<SidebarProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"UserStoryApprovalScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,6BAA6B,EAC7B,gC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AyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAkKD,UAAU,SAAS;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CAC5C;AA0FD,QAAA,MAAM,uBAAuB;;;;;CAK3B,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"UserStoryApprovalScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,6BAA6B,EAC7B,gCAAgC,EAChC,6BAA6B,EAC7B,iCAAiC,EAEjC,qBAAqB,EACrB,UAAU,EACX,MAAM,sCAAsC,CAAC;AA4E9C,UAAU,SAAS;IACjB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,mEAAmE;IACnE,SAAS,CAAC,EAAE,gCAAgC,CAAC;IAC7C,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAChD,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yBAAyB;IACzB,UAAU,CAAC,EAAE,iCAAiC,CAAC;IAC/C,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA2OD,UAAU,YAAY;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,E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oB,CAAC,EAAE,CACrB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,UAAU,EAAE,EAC7B,UAAU,EAAE,MAAM,EAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,KACpB,IAAI,CAAC;IACV,aAAa,CAAC,EAAC,OAAO,CAAC;CACxB;AAmGD,QAAA,MAAM,uBAAuB;;;;;CAK3B,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { IUserStoryForApproval } from "../../../../interfaces/userstory.interface";
2
+ import { IUserStory, IUserStoryForApproval } from "../../../../interfaces/userstory.interface";
3
3
  export interface ContentSegmentProps {
4
4
  /** User story or sub-feature data */
5
5
  userStoryForApproval: IUserStoryForApproval;
@@ -19,6 +19,9 @@ export interface ContentSegmentProps {
19
19
  EditorComponent?: React.ComponentType<any>;
20
20
  /** Content viewer component */
21
21
  ViewerComponent?: React.ComponentType<any>;
22
+ handleDownloadUserStory?: (filetype: "pdf" | "doc") => Promise<void>;
23
+ handleOpenSendDialog?: (sendEmailDialog: boolean, userStoryToSend: IUserStory[], artifactId: string, initSelectedEmails?: string[], autoSendEmail?: boolean) => void;
24
+ showShareIcon?: boolean;
22
25
  }
23
26
  /**
24
27
  * Content segment component that displays either main story or sub-feature content.
@@ -1 +1 @@
1
- {"version":3,"file":"ContentSegment.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAQnF,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,oBAAoB,EAAE,qBAAqB,CAAC;IAC5C,oCAAoC;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uDAAuD;IACvD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,CACjB,eAAe,EAAE,MAAM,EACvB,iBAAiB,EAAE,qBAAqB,KACrC,IAAI,CAAC;IACV,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,yCAAyC;IACzC,sBAAsB,CAAC,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACvE,iCAAiC;IACjC,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,+BAA+B;IAC/B,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CAC5C;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwLxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"ContentSegment.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,EACL,UAAU,EACV,qBAAqB,EACtB,MAAM,4CAA4C,CAAC;AAgBpD,MAAM,WAAW,mBAAmB;IAClC,qCAAqC;IACrC,oBAAoB,EAAE,qBAAqB,CAAC;IAC5C,oCAAoC;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uDAAuD;IACvD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,CACjB,eAAe,EAAE,MAAM,EACvB,iBAAiB,EAAE,qBAAqB,KACrC,IAAI,CAAC;IACV,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,yCAAyC;IACzC,sBAAsB,CAAC,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACvE,iCAAiC;IACjC,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,+BAA+B;IAC/B,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAE3C,uBAAuB,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,oBAAoB,CAAC,EAAE,CACrB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,UAAU,EAAE,EAC7B,UAAU,EAAE,MAAM,EAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAC7B,aAAa,CAAC,EAAE,OAAO,KACpB,IAAI,CAAC;IACV,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwYxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/requirement-ai",
3
- "version": "0.0.206",
3
+ "version": "0.0.208",
4
4
  "author": "Saptyadeep Bhattacharjee",
5
5
  "description": "",
6
6
  "license": "MIT",