@e-llm-studio/requirement-ai 0.0.154 → 0.0.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
- package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/segment.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
- package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
- package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
- package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/features/RequirementAI/components/segment/segment.module.css.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
- package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +4 -10
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +3 -6
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/story-screen/SubfeatureBlock.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/story-screen/UserStoryScreen.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +3 -7
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +7 -0
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/utils/userstory-approval-transform.utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js
CHANGED
|
@@ -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("../../store/ref.context.js"),r=n.createContext(null);exports.default=function(o){var s=o.children,a=o.userStory,u=o.setUserStory,c=o.aiReasoning,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("../../store/ref.context.js"),r=n.createContext(null);exports.default=function(o){var s=o.children,a=o.userStory,u=o.setUserStory,c=o.aiReasoning,g=o.setAiReasoning,l=o.citations,f=o.setCitations,d=o.apiCachingConfig,h=o.customStyles,C=o.customIcons,p=o.searchQueryList,m=o.searchQueryReasoningIdList,v=o.citationConfig,y=o.chatHistory,x=o.chatCitationConfigs,I=o.gptCitationConfigs,R=o.aiReasoningAccordionOpenStates,S=o.persistedDataFiles,A=o.inlineUpdateComponentConfig,q=o.segmentComponentConfig,_=n.useState(0),b=_[0],j=_[1],H=n.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=n.useCallback(function(e){var t,n=a.findIndex(function(t){return t.artifactId===e});return-1===n?0:null!==(t=H[n])&&void 0!==t?t:0},[a,H]);return t.jsx(r.Provider,e.__assign({value:{chatHistory:y,userStory:a,setUserStory:u,aiReasoning:c,setAiReasoning:g,citations:l,setCitations:f,apiCachingConfig:d,customStyles:h,customIcons:C,searchQueryList:p,searchQueryReasoningIdList:m,citationConfig:v,getAvgScoreForStory:L,chatCitationConfigs:x,gptCitationConfigs:I,aiReasoningAccordionOpenStates:R,persistedDataFiles:S,currentHighlightIndex:b,setCurrentHighlightIndex:j,inlineUpdateComponentConfig:A,segmentComponentConfig:q}},{children:t.jsx(i.RefProvider,{children:s})}))},exports.useRequirementAI=function(){var e=n.useContext(r);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"),s=require("lucide-react"),r=require("showdown"),i=require("@mui/material"),l=require("uuid"),a=require("./UserStoryCard.module.css.js"),o=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),d=require("../../shared/AtomicButton.js"),c=require("../RichTextEditor/RichTextEditor.js"),v=require("../userstory-with-citation/UserStoryWithCitation.js"),f=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=h(r);function _(n){for(var r,a=[],o=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(r=o.exec(n));){var c=r[1],v=r.index;v>u&&a.push(t.jsx("span",{children:n.slice(u,v)},"text-pre-".concat(d++))),a.push(t.jsx(i.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(s.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(l.v4()))),u=o.lastIndex}return u<(null==n?void 0:n.length)&&a.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),a}function m(t,n,s){var r;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var i=e.__assign({},t.childConfig);return s&&(null===(r=t.subFeatureOverrides)||void 0===r?void 0:r[s])?e.__assign(e.__assign({},i),t.subFeatureOverrides[s]):i}var p=function(n){var r,i=n.displayName,l=f.useRequirementAI().customStyles,o=null===(r=null==l?void 0:l.userStoryCardStyles)||void 0===r?void 0:r.showDisplayName;return t.jsxs("div",e.__assign({className:a.default.displayName,style:null==o?void 0:o.wrapper},{children:[t.jsx(s.Bookmark,{className:a.default.displayNameIcon,style:null==o?void 0:o.displayNameIcon}),t.jsxs("span",e.__assign({style:null==o?void 0:o.label},{children:[i,":"]}))]}))},S=function(r){var l,h,x,C,j,I,w=r.isUserStoryCurrentlyUpdated,N=r.artifactId,D=r.artifactTitleId,b=r.parentUserStory,U=r.currentUserStory,B=r.onUserStoryChange,M=r.parentIndex,k=r.currentIndex,E=r.enableDownload,q=r.isDiffEditReviewMode,A=r.showUserStoryDiff,R=r.handleDownloadUserStory,L=r.handleOpenSendDialog,P=r.updateUserStoryArtifact,T=r.selectedArtifactId,H=r.isDisplayHighlightControl,F=r.elementDisplayConfig,V=r._resolvedConfig,W=r.showWrapper,z=void 0!==W&&W,G=r.handleViewGlossary,O=r.segmentDataList,Q=r.getSegmentExampleComponent,J=r.handleFetchSegmentDetails,K=f.useRequirementAI(),X=K.searchQueryList,Y=K.citations,Z=K.customStyles,$=null==Z?void 0:Z.userStoryCardStyles,ee=null===(l=null==Z?void 0:Z.userStoryScreenStyles)||void 0===l?void 0:l.userStoryContentStyles,te=null==$?void 0:$.progressHeaderStyles,ne=n.useState(e.__assign(e.__assign({},structuredClone(U)),{value:o.formatMarkdown(U.value)||""})),se=ne[0],re=ne[1],ie=n.useState({userStory:!1}),le=ie[0],ae=ie[1],oe=f.useRequirementAI(),ue=oe.userStory,de=oe.customIcons,ce=n.useState(""===M||T===U.artifactId),ve=ce[0],fe=ce[1],ge=n.useState(!1);ge[0];var he=ge[1],ye=n.useState(null),_e=ye[0],me=ye[1],pe=n.useState(!1),Se=pe[0],xe=pe[1],Ce=n.useRef(null),je=n.useState(!1);je[0];var Ie=je[1],we=n.useRef(null);n.useEffect(function(){w&&fe(w)},[w]),n.useEffect(function(){re(e.__assign(e.__assign({},structuredClone(U)),{value:o.formatMarkdown(U.value)||""}))},[U]),n.useEffect(function(){X.length>0?fe(!0):T&&fe(T===U.artifactId)},[X,T,U.artifactId]);var Ne=function(){me(null)},De=function(){fe(function(e){return!e})};var be=null!=(null==U?void 0:U.big_enough)&&!Number.isNaN(U.big_enough)&&!!(null==U?void 0:U.big_enough_decision_factors),Ue=null!=V?V:m(F,""===M);return t.jsxs("div",e.__assign({className:a.default.card,style:null==$?void 0:$.cardStyle,id:"story-card-".concat(U.title),"data-expanded":ve},{children:[t.jsxs("div",e.__assign({className:a.default.titleSection,style:null==$?void 0:$.titleSection},{children:[t.jsxs("div",e.__assign({className:a.default.titleRow,style:null==$?void 0:$.titleRow,onClick:De},{children:[t.jsxs("div",e.__assign({className:a.default.titleLeft,style:null==$?void 0:$.titleLeft,onMouseEnter:function(){return Ie(!0)},onMouseLeave:function(){return Ie(!1)}},{children:[t.jsx(p,{displayName:D}),t.jsx("h2",e.__assign({className:a.default.storyTitle,style:null==$?void 0:$.storyTitle},{children:_(U.title)}),U.artifactId)]})),t.jsxs("div",e.__assign({className:a.default.titleActions,style:null==$?void 0:$.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Ue.showProgressPercentage||Ue.showGapBox)&&z&&t.jsxs("div",e.__assign({className:a.default.progressHeader,style:null==te?void 0:te.wrapper},{children:[Ue.showProgressPercentage&&t.jsxs("div",e.__assign({className:a.default.progressPercentage,style:null==te?void 0:te.percentage},{children:[null!==(x=null!==(h=null==U?void 0:U.confidenceScore)&&void 0!==h?h:null==Ue?void 0:Ue.confidenceValue)&&void 0!==x?x:"0","%"]})),Ue.showGapBox&&t.jsxs("div",e.__assign({className:a.default.gapBox,style:null==te?void 0:te.gapBox},{children:[null!==(j=null!==(C=null==U?void 0:U.gapValue)&&void 0!==C?C:null==Ue?void 0:Ue.gapBoxValue)&&void 0!==j?j:"2"," ","Gaps"]}))]})),be&&t.jsx(g.BigEnoughPanel,{customIcons:null==de?void 0:de.userStoryIcons,customStyles:null==$?void 0:$.aiReasoningCitaionStyles,currentUserStory:U,panelStyles:null==$?void 0:$.BigEnoughStyles}),!le.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==Ue?void 0:Ue.showShareButton)&&t.jsx("button",e.__assign({className:a.default.iconButton,style:null==$?void 0:$.iconButton,onClick:function(e){me(e.currentTarget)}},{children:t.jsx(s.ExternalLink,{size:16})})),t.jsxs(i.Menu,e.__assign({id:"user-story-share-menu",anchorEl:_e,open:!!_e,onClose:function(){return me(null)},style:null==$?void 0:$.userStoryShareMenu},{children:[E&&t.jsx(i.MenuItem,e.__assign({style:null==$?void 0:$.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 he(!0),R?[4,Promise.all([R("pdf"),R("doc")])]:[2];case 1:return e.sent(),he(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Ce,className:a.default.menuItemContent,style:null==$?void 0:$.menuItemContent},{children:[t.jsx(s.Download,{size:16,color:null==$?void 0:$.menuIconColor}),t.jsx("p",e.__assign({style:null==$?void 0:$.menuLabel},{children:"Download"}))]}))})),t.jsx(i.MenuItem,e.__assign({style:null==$?void 0:$.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=U,b&&(t=e.__assign(e.__assign({},U),{value:"".concat(u.replaceTitleSection(null==b?void 0:b.value,U.title)," \n").concat(U.value)})),null==L||L(!0,[t],U.artifactId),Ne(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==$?void 0:$.menuItemContent,className:a.default.menuItemContentPadded},{children:[t.jsx(s.Share2,{size:16,color:null==$?void 0:$.menuIconColor}),t.jsx("p",e.__assign({style:null==$?void 0:$.menuLabel},{children:"Send"}))]}))})),t.jsx(i.MenuItem,e.__assign({style:null==$?void 0:$.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,s,r,i;return e.__generator(this,function(e){switch(e.label){case 0:t=new y.default.Converter,n=t.makeHtml(o.formatMarkdown(U.value)||U.value),s=function(e){var t=(new y.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(o.formatMarkdown(U.value)||U.value),r=new ClipboardItem({"text/plain":new Blob([s],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([r])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return i=e.sent(),console.error("Failed to copy user story:",i),[3,5];case 4:return Ne(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==$?void 0:$.menuItemContent,className:a.default.menuItemContentPadded},{children:[t.jsx(s.Copy,{size:16,color:null==$?void 0:$.menuIconColor}),t.jsx("p",e.__assign({style:null==$?void 0:$.menuLabel},{children:"Copy"}))]}))}))]}))]}),le.userStory&&ve?t.jsx(d.default,{type:"outline",children:"Cancel",style:null==$?void 0:$.cancelButton,onClick:function(){var t;null===(t=we.current)||void 0===t||t.abort(),ae(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),le.userStory&&ve?t.jsx(d.default,{type:"fill",children:Se?t.jsxs("span",e.__assign({className:a.default.savingSpinner,style:null==$?void 0:$.savingSpinner},{children:[t.jsx(s.LoaderCircle,{className:a.default.spinAnimation,style:null==$?void 0:$.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Se,style:Se?null==$?void 0:$.savingButton:null==$?void 0:$.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 xe(!0),"userStory"==="userStory"&&(B(se),console.log("I am changing RTE editor values",se)),[4,P(Y,ue,N,null===(t=we.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),ae(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),xe(!1),[2]}})})}}):!q&&!A&&ve&&!1!==(null==Ue?void 0:Ue.showEditButton)&&t.jsx("button",e.__assign({className:a.default.iconButton,style:null==$?void 0:$.editButton,onClick:function(){return ae(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(s.PencilIcon,{color:null==$?void 0:$.pencilIconColor,size:16})})),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),De()},style:null==$?void 0:$.chevronButton,className:a.default.chevronButton},{children:ve?t.jsx(s.ChevronUp,{className:a.default.chevronIcon,color:null==$?void 0:$.chevronIconColor}):t.jsx(s.ChevronDown,{className:a.default.chevronIcon,color:null==$?void 0:$.chevronIconColor})}))]}))]})),t.jsx("div",{className:a.default.divider,style:null==$?void 0:$.dividerStyle})]})),ve&&t.jsx("div",e.__assign({className:a.default.cardContent,style:null==$?void 0:$.cardContentStyle},{children:t.jsxs("div",e.__assign({className:a.default.contentInner,style:null==$?void 0:$.contentInner},{children:[t.jsxs("div",e.__assign({className:a.default.descriptionSection,style:null==$?void 0:$.descriptionSection},{children:[t.jsx("div",{className:a.default.justifyBetween,style:null==$?void 0:$.justifyBetween}),le.userStory?t.jsx(c.default,{minHeight:"100%",height:"100%",type:"string",value:o.formatMarkdown(U.value)||"",handleUpdateState:function(t,n){var s=o.indentMarkdown(n);re(function(t){return e.__assign(e.__assign({},t),{value:s||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:le.userStory?"edit":"readOnly"}):t.jsx(v.default,{showUserStoryDiff:A,isParent:""===M,message:o.formatMarkdown(U.value)||"",artifactId:U.artifactId,customStyles:ee,isDisplayHighlightControl:H,getSegmentExampleComponent:Q,handleViewGlossary:G,segmentDataList:O,handleFetchSegmentDetails:J})]})),null===(I=se.sub_features)||void 0===I?void 0:I.map(function(n,s){var r=m(F,!1,n.artifactId);return t.jsx(S,{artifactId:N,isUserStoryCurrentlyUpdated:w,artifactTitleId:"".concat(D,"-").concat(String.fromCharCode(65+s)),parentUserStory:U,parentIndex:"".concat(M).concat(M&&".").concat(k),currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var s=e.__spreadArray([],U.sub_features||[],!0);s[t]=n,B(e.__assign(e.__assign({},U),{sub_features:s}))}(s,t)},enableDownload:!0,isDiffEditReviewMode:q,showUserStoryDiff:A,updateUserStoryArtifact:P,handleDownloadUserStory:R,handleOpenSendDialog:L,isDisplayHighlightControl:H,elementDisplayConfig:F,_resolvedConfig:r,getSegmentExampleComponent:Q,handleViewGlossary:G,segmentDataList:O,handleFetchSegmentDetails:J},n.artifactId)})]}))}))]}))};exports.StoryCard=S,exports.UserStoryCardWrapper=function(n){var r=n.artifactTitleIDs,i=n.isDiffEditReviewMode,l=n.showUserStoryDiff,o=n.updateUserStoryArtifact,u=n.isUserStoryCurrentlyUpdated,d=n.artifactId,c=n.handleOpenSendDialog,v=n.handleDownloadUserStory,g=n.selectedArtifactId,h=n.isDisplayHighlightControl,y=n.elementDisplayConfig,_=n.showWrapper,p=f.useRequirementAI(),x=p.userStory,C=p.setUserStory,j=p.customStyles,I=p.searchQueryList,w=p.currentHighlightIndex,N=p.setCurrentHighlightIndex,D=p.segmentDataList,b=p.handleViewGlossary,U=p.getSegmentExampleComponent,B=p.handleFetchSegmentDetails,M=null==j?void 0:j.userStoryCardStyles,k=0===w,E=w===I.length-1;return t.jsxs("div",e.__assign({className:a.default.userStoryCardWrapper,style:h?e.__assign(e.__assign({},null==M?void 0:M.userStoryCardWrapper),{position:"relative"}):null==M?void 0:M.userStoryCardWrapper},{children:[h&&t.jsx(t.Fragment,{children:I.length>0&&t.jsx("div",e.__assign({className:a.default.wrapper},{children:t.jsx("div",e.__assign({className:a.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:a.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:a.default.navCounter},{children:[w+1," of ",I.length]})),t.jsxs("div",e.__assign({className:a.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){w>0&&N(function(e){return e-1})},className:a.default.navButton,disabled:k},{children:t.jsx(s.ChevronUpIcon,{size:20,className:a.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){w<I.length-1&&N(function(e){return e+1})},className:a.default.navButton,disabled:E},{children:t.jsx(s.ChevronDownIcon,{size:20,className:a.default.navIcon})}))]}))]}))}))}))}),x.map(function(n,s){var a=m(y,!0);return t.jsx(S,{isUserStoryCurrentlyUpdated:u,artifactId:d,artifactTitleId:r[s]||"",currentUserStory:n,onUserStoryChange:function(t){C(function(n){return n[s]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:i,showUserStoryDiff:l,updateUserStoryArtifact:o,handleOpenSendDialog:c,handleDownloadUserStory:v,selectedArtifactId:g,isDisplayHighlightControl:h,elementDisplayConfig:y,_resolvedConfig:a,showWrapper:_,getSegmentExampleComponent:U,handleViewGlossary:b,segmentDataList:D,handleFetchSegmentDetails:B},n.artifactId)})]}))},exports.default=S,exports.replaceLearnedTagsWithInfo=_;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),s=require("lucide-react"),r=require("showdown"),i=require("@mui/material"),o=require("uuid"),l=require("./UserStoryCard.module.css.js"),a=require("../../utils/helpers.js"),u=require("../../utils/user-story.utils.js"),d=require("../../shared/AtomicButton.js"),c=require("../RichTextEditor/RichTextEditor.js"),v=require("../userstory-with-citation/UserStoryWithCitation.js"),f=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=y(r);function h(t){for(var r,l=[],a=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(r=a.exec(t));){var c=r[1],v=r.index;v>u&&l.push(n.jsx("span",{children:t.slice(u,v)},"text-pre-".concat(d++))),l.push(n.jsx(i.Tooltip,e.__assign({title:c,placement:"top"},{children:n.jsx(s.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(o.v4()))),u=a.lastIndex}return u<(null==t?void 0:t.length)&&l.push(n.jsx("span",{children:t.slice(u)},"text-post-".concat(d++))),l}function p(n,t,s){var r;if(!n)return{};if(t)return e.__assign({},n.parentConfig);var i=e.__assign({},n.childConfig);return s&&(null===(r=n.subFeatureOverrides)||void 0===r?void 0:r[s])?e.__assign(e.__assign({},i),n.subFeatureOverrides[s]):i}var m=function(t){var r,i=t.displayName,o=f.useRequirementAI().customStyles,a=null===(r=null==o?void 0:o.userStoryCardStyles)||void 0===r?void 0:r.showDisplayName;return n.jsxs("div",e.__assign({className:l.default.displayName,style:null==a?void 0:a.wrapper},{children:[n.jsx(s.Bookmark,{className:l.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),n.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[i,":"]}))]}))},S=function(r){var o,y,x,C,j,I,w=r.isUserStoryCurrentlyUpdated,N=r.artifactId,b=r.artifactTitleId,U=r.parentUserStory,D=r.currentUserStory,B=r.onUserStoryChange,M=r.parentIndex,k=r.currentIndex,q=r.enableDownload,A=r.isDiffEditReviewMode,E=r.showUserStoryDiff,R=r.handleDownloadUserStory,P=r.handleOpenSendDialog,T=r.updateUserStoryArtifact,H=r.selectedArtifactId,L=r.isDisplayHighlightControl,W=r.elementDisplayConfig,z=r._resolvedConfig,O=r.showWrapper,F=void 0!==O&&O,V=r.segmentComponentConfig,G=f.useRequirementAI(),Q=G.searchQueryList,J=G.citations,K=G.customStyles,X=null==K?void 0:K.userStoryCardStyles,Y=null===(o=null==K?void 0:K.userStoryScreenStyles)||void 0===o?void 0:o.userStoryContentStyles,Z=null==X?void 0:X.progressHeaderStyles,$=t.useState(e.__assign(e.__assign({},structuredClone(D)),{value:a.formatMarkdown(D.value)||""})),ee=$[0],ne=$[1],te=t.useState({userStory:!1}),se=te[0],re=te[1],ie=f.useRequirementAI(),oe=ie.userStory,le=ie.customIcons,ae=t.useState(""===M||H===D.artifactId),ue=ae[0],de=ae[1],ce=t.useState(!1);ce[0];var ve=ce[1],fe=t.useState(null),ge=fe[0],ye=fe[1],_e=t.useState(!1),he=_e[0],pe=_e[1],me=t.useRef(null),Se=t.useState(!1);Se[0];var xe=Se[1],Ce=t.useRef(null);t.useEffect(function(){w&&de(w)},[w]),t.useEffect(function(){ne(e.__assign(e.__assign({},structuredClone(D)),{value:a.formatMarkdown(D.value)||""}))},[D]),t.useEffect(function(){Q.length>0?de(!0):H&&de(H===D.artifactId)},[Q,H,D.artifactId]);var je=function(){ye(null)},Ie=function(){de(function(e){return!e})};var we=null!=(null==D?void 0:D.big_enough)&&!Number.isNaN(D.big_enough)&&!!(null==D?void 0:D.big_enough_decision_factors),Ne=null!=z?z:p(W,""===M);return n.jsxs("div",e.__assign({className:l.default.card,style:null==X?void 0:X.cardStyle,id:"story-card-".concat(D.title),"data-expanded":ue},{children:[n.jsxs("div",e.__assign({className:l.default.titleSection,style:null==X?void 0:X.titleSection},{children:[n.jsxs("div",e.__assign({className:l.default.titleRow,style:null==X?void 0:X.titleRow,onClick:Ie},{children:[n.jsxs("div",e.__assign({className:l.default.titleLeft,style:null==X?void 0:X.titleLeft,onMouseEnter:function(){return xe(!0)},onMouseLeave:function(){return xe(!1)}},{children:[n.jsx(m,{displayName:b}),n.jsx("h2",e.__assign({className:l.default.storyTitle,style:null==X?void 0:X.storyTitle},{children:h(D.title)}),D.artifactId)]})),n.jsxs("div",e.__assign({className:l.default.titleActions,style:null==X?void 0:X.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Ne.showProgressPercentage||Ne.showGapBox)&&F&&n.jsxs("div",e.__assign({className:l.default.progressHeader,style:null==Z?void 0:Z.wrapper},{children:[Ne.showProgressPercentage&&n.jsxs("div",e.__assign({className:l.default.progressPercentage,style:null==Z?void 0:Z.percentage},{children:[null!==(x=null!==(y=null==D?void 0:D.confidenceScore)&&void 0!==y?y:null==Ne?void 0:Ne.confidenceValue)&&void 0!==x?x:"0","%"]})),Ne.showGapBox&&n.jsxs("div",e.__assign({className:l.default.gapBox,style:null==Z?void 0:Z.gapBox},{children:[null!==(j=null!==(C=null==D?void 0:D.gapValue)&&void 0!==C?C:null==Ne?void 0:Ne.gapBoxValue)&&void 0!==j?j:"2"," ","Gaps"]}))]})),we&&n.jsx(g.BigEnoughPanel,{customIcons:null==le?void 0:le.userStoryIcons,customStyles:null==X?void 0:X.aiReasoningCitaionStyles,currentUserStory:D,panelStyles:null==X?void 0:X.BigEnoughStyles}),!se.userStory&&n.jsxs(n.Fragment,{children:[!1!==(null==Ne?void 0:Ne.showShareButton)&&n.jsx("button",e.__assign({className:l.default.iconButton,style:null==X?void 0:X.iconButton,onClick:function(e){ye(e.currentTarget)}},{children:n.jsx(s.ExternalLink,{size:16})})),n.jsxs(i.Menu,e.__assign({id:"user-story-share-menu",anchorEl:ge,open:!!ge,onClose:function(){return ye(null)},style:null==X?void 0:X.userStoryShareMenu},{children:[q&&n.jsx(i.MenuItem,e.__assign({style:null==X?void 0:X.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 ve(!0),R?[4,Promise.all([R("pdf"),R("doc")])]:[2];case 1:return e.sent(),ve(!1),[2]}})})}},{children:n.jsxs("div",e.__assign({ref:me,className:l.default.menuItemContent,style:null==X?void 0:X.menuItemContent},{children:[n.jsx(s.Download,{size:16,color:null==X?void 0:X.menuIconColor}),n.jsx("p",e.__assign({style:null==X?void 0:X.menuLabel},{children:"Download"}))]}))})),n.jsx(i.MenuItem,e.__assign({style:null==X?void 0:X.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(t){return n=D,U&&(n=e.__assign(e.__assign({},D),{value:"".concat(u.replaceTitleSection(null==U?void 0:U.value,D.title)," \n").concat(D.value)})),null==P||P(!0,[n],D.artifactId),je(),[2]})})}},{children:n.jsxs("div",e.__assign({style:null==X?void 0:X.menuItemContent,className:l.default.menuItemContentPadded},{children:[n.jsx(s.Share2,{size:16,color:null==X?void 0:X.menuIconColor}),n.jsx("p",e.__assign({style:null==X?void 0:X.menuLabel},{children:"Send"}))]}))})),n.jsx(i.MenuItem,e.__assign({style:null==X?void 0:X.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,t,s,r,i;return e.__generator(this,function(e){switch(e.label){case 0:n=new _.default.Converter,t=n.makeHtml(a.formatMarkdown(D.value)||D.value),s=function(e){var n=(new _.default.Converter).makeHtml(e),t=document.createElement("div");return t.innerHTML=n,t.textContent||t.innerText||""}(a.formatMarkdown(D.value)||D.value),r=new ClipboardItem({"text/plain":new Blob([s],{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 i=e.sent(),console.error("Failed to copy user story:",i),[3,5];case 4:return je(),[7];case 5:return[2]}})})}},{children:n.jsxs("div",e.__assign({style:null==X?void 0:X.menuItemContent,className:l.default.menuItemContentPadded},{children:[n.jsx(s.Copy,{size:16,color:null==X?void 0:X.menuIconColor}),n.jsx("p",e.__assign({style:null==X?void 0:X.menuLabel},{children:"Copy"}))]}))}))]}))]}),se.userStory&&ue?n.jsx(d.default,{type:"outline",children:"Cancel",style:null==X?void 0:X.cancelButton,onClick:function(){var n;null===(n=Ce.current)||void 0===n||n.abort(),re(function(n){return e.__assign(e.__assign({},n),{userStory:!1})})}}):n.jsx(n.Fragment,{}),se.userStory&&ue?n.jsx(d.default,{type:"fill",children:he?n.jsxs("span",e.__assign({className:l.default.savingSpinner,style:null==X?void 0:X.savingSpinner},{children:[n.jsx(s.LoaderCircle,{className:l.default.spinAnimation,style:null==X?void 0:X.spinAnimation}),n.jsx("span",{children:"Saving..."})]})):"Save",isDisable:he,style:he?null==X?void 0:X.savingButton:null==X?void 0:X.saveButton,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(t){switch(t.label){case 0:return pe(!0),"userStory"==="userStory"&&(B(ee),console.log("I am changing RTE editor values",ee)),[4,T(J,oe,N,null===(n=Ce.current)||void 0===n?void 0:n.signal)];case 1:return t.sent(),re(function(n){return e.__assign(e.__assign({},n),{userStory:!1})}),pe(!1),[2]}})})}}):!A&&!E&&ue&&!1!==(null==Ne?void 0:Ne.showEditButton)&&n.jsx("button",e.__assign({className:l.default.iconButton,style:null==X?void 0:X.editButton,onClick:function(){return re(function(n){return e.__assign(e.__assign({},n),{userStory:!0})})}},{children:n.jsx(s.PencilIcon,{color:null==X?void 0:X.pencilIconColor,size:16})})),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),Ie()},style:null==X?void 0:X.chevronButton,className:l.default.chevronButton},{children:ue?n.jsx(s.ChevronUp,{className:l.default.chevronIcon,color:null==X?void 0:X.chevronIconColor}):n.jsx(s.ChevronDown,{className:l.default.chevronIcon,color:null==X?void 0:X.chevronIconColor})}))]}))]})),n.jsx("div",{className:l.default.divider,style:null==X?void 0:X.dividerStyle})]})),ue&&n.jsx("div",e.__assign({className:l.default.cardContent,style:null==X?void 0:X.cardContentStyle},{children:n.jsxs("div",e.__assign({className:l.default.contentInner,style:null==X?void 0:X.contentInner},{children:[n.jsxs("div",e.__assign({className:l.default.descriptionSection,style:null==X?void 0:X.descriptionSection},{children:[n.jsx("div",{className:l.default.justifyBetween,style:null==X?void 0:X.justifyBetween}),se.userStory?n.jsx(c.default,{minHeight:"100%",height:"100%",type:"string",value:a.formatMarkdown(D.value)||"",handleUpdateState:function(n,t){var s=a.indentMarkdown(t);ne(function(n){return e.__assign(e.__assign({},n),{value:s||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:se.userStory?"edit":"readOnly"}):n.jsx(v.default,{showUserStoryDiff:E,isParent:""===M,message:a.formatMarkdown(D.value)||"",artifactId:D.artifactId,customStyles:Y,isDisplayHighlightControl:L,segmentComponentConfig:V})]})),null===(I=ee.sub_features)||void 0===I?void 0:I.map(function(t,s){var r=p(W,!1,t.artifactId);return n.jsx(S,{artifactId:N,isUserStoryCurrentlyUpdated:w,artifactTitleId:"".concat(b,"-").concat(String.fromCharCode(65+s)),parentUserStory:D,parentIndex:"".concat(M).concat(M&&".").concat(k),currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(n){return function(n,t){var s=e.__spreadArray([],D.sub_features||[],!0);s[n]=t,B(e.__assign(e.__assign({},D),{sub_features:s}))}(s,n)},enableDownload:!0,isDiffEditReviewMode:A,showUserStoryDiff:E,updateUserStoryArtifact:T,handleDownloadUserStory:R,handleOpenSendDialog:P,isDisplayHighlightControl:L,elementDisplayConfig:W,_resolvedConfig:r,segmentComponentConfig:V},t.artifactId)})]}))}))]}))};exports.StoryCard=S,exports.UserStoryCardWrapper=function(t){var r=t.artifactTitleIDs,i=t.isDiffEditReviewMode,o=t.showUserStoryDiff,a=t.updateUserStoryArtifact,u=t.isUserStoryCurrentlyUpdated,d=t.artifactId,c=t.handleOpenSendDialog,v=t.handleDownloadUserStory,g=t.selectedArtifactId,y=t.isDisplayHighlightControl,_=t.elementDisplayConfig,h=t.showWrapper,m=f.useRequirementAI(),x=m.userStory,C=m.setUserStory,j=m.customStyles,I=m.searchQueryList,w=m.currentHighlightIndex,N=m.setCurrentHighlightIndex,b=m.segmentComponentConfig,U=null==j?void 0:j.userStoryCardStyles,D=0===w,B=w===I.length-1;return n.jsxs("div",e.__assign({className:l.default.userStoryCardWrapper,style:y?e.__assign(e.__assign({},null==U?void 0:U.userStoryCardWrapper),{position:"relative"}):null==U?void 0:U.userStoryCardWrapper},{children:[y&&n.jsx(n.Fragment,{children:I.length>0&&n.jsx("div",e.__assign({className:l.default.wrapper},{children:n.jsx("div",e.__assign({className:l.default.highlightNavigation},{children:n.jsxs("div",e.__assign({className:l.default.navigationContainer},{children:[n.jsxs("span",e.__assign({className:l.default.navCounter},{children:[w+1," of ",I.length]})),n.jsxs("div",e.__assign({className:l.default.navButtons},{children:[n.jsx("button",e.__assign({onClick:function(){w>0&&N(function(e){return e-1})},className:l.default.navButton,disabled:D},{children:n.jsx(s.ChevronUpIcon,{size:20,className:l.default.navIcon})})),n.jsx("button",e.__assign({onClick:function(){w<I.length-1&&N(function(e){return e+1})},className:l.default.navButton,disabled:B},{children:n.jsx(s.ChevronDownIcon,{size:20,className:l.default.navIcon})}))]}))]}))}))}))}),x.map(function(t,s){var l=p(_,!0);return n.jsx(S,{isUserStoryCurrentlyUpdated:u,artifactId:d,artifactTitleId:r[s]||"",currentUserStory:t,onUserStoryChange:function(n){C(function(t){return t[s]=n,e.__spreadArray([],t,!0)})},parentIndex:"",currentIndex:"".concat(s+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:i,showUserStoryDiff:o,updateUserStoryArtifact:a,handleOpenSendDialog:c,handleDownloadUserStory:v,selectedArtifactId:g,isDisplayHighlightControl:y,elementDisplayConfig:_,_resolvedConfig:l,showWrapper:h,segmentComponentConfig:b},t.artifactId)})]}))},exports.default=S,exports.replaceLearnedTagsWithInfo=h;
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),s=require("lucide-react"),a=require("react"),t=require("./AiReasonAccoridon.module.css.js");exports.default=function(l){var i=l.icon,r=l.title,o=l.content,c=l.subTitle,d=l.scenario,u=l.className,v=void 0===u?"":u,_=l.customStyles,p=l.alwaysOpen,h=void 0!==p&&p,x=l.defaultOpen,f=void 0===x||x,m=l.isSegmentExplanation,g=void 0!==m&&m,j=l.handleViewExample,y=l.handleViewGlossary,N=a.useState(f),B=N[0],k=N[1];return n.jsxs("div",e.__assign({className:"".concat("riskSideBar"!==d&&t.default.wrapperBorder," ").concat(t.default.wrapper," ").concat(v),style:null==_?void 0:_.wrapper},{children:[n.jsxs("div",e.__assign({className:"".concat(t.default.header," ").concat("riskSideBar"===d?t.default.headerPaddingRisk:t.default.headerPadding),style:null==_?void 0:_.header,onClick:function(){h||k(!B)}},{children:[n.jsxs("div",e.__assign({className:t.default.headerLeft,style:null==_?void 0:_.iconWrapper},{children:[i,n.jsxs("div",e.__assign({className:t.default.titleBlock},{children:[n.jsx("h1",e.__assign({className:t.default.title,style:null==_?void 0:_.title},{children:r})),n.jsx("p",e.__assign({className:t.default.subTitle,style:null==_?void 0:_.subTitle},{children:c}))]}))]})),"riskSideBar"!==d&&!h&&n.jsx("div",e.__assign({className:t.default.chevronWrapper,style:null==_?void 0:_.chevronWrapper},{children:B?n.jsx(s.ChevronUp,{className:t.default.chevronIcon}):n.jsx(s.ChevronDown,{className:t.default.chevronIcon})}))]})),B&&n.jsxs("div",e.__assign({className:"".concat("riskSideBar"!==d&&t.default.content," ").concat(t.default.contentBase),style:e.__assign({},null==_?void 0:_.contentContainerWrapper)},{children:[n.jsx("div",e.__assign({style:null==_?void 0:_.contentWrapper},{children:o})),g&&n.jsxs("div",e.__assign({className:"".concat(t.default.segmentExplanationButtonContainer," flex-row"),style:e.__assign({},null==_?void 0:_.segmentExplanationButtonContainer)},{children:[n.jsx("button",e.__assign({className:"".concat(t.default.segmentButton),onClick:function(){return null==j?void 0:j()},style:e.__assign({},null==_?void 0:_.explanationButton)},{children:"Show Example"})),n.jsxs("button",e.__assign({className:"".concat(t.default.segmentButton),onClick:function(){return null==y?void 0:y()},style:e.__assign({},null==_?void 0:_.explanationButton)},{children:["View in Glossary ",n.jsx(s.ExternalLink,{size:14})]}))]}))]}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),s=require("lucide-react"),a=require("react"),t=require("./AiReasonAccoridon.module.css.js");exports.default=function(l){var i=l.icon,r=l.title,o=l.content,c=l.subTitle,d=l.scenario,u=l.className,v=void 0===u?"":u,_=l.customStyles,p=l.alwaysOpen,h=void 0!==p&&p,x=l.defaultOpen,f=void 0===x||x,m=l.isSegmentExplanation,g=void 0!==m&&m,j=l.handleViewExample,y=l.handleViewGlossary,N=a.useState(f),B=N[0],k=N[1];return n.jsxs("div",e.__assign({className:"".concat("riskSideBar"!==d&&t.default.wrapperBorder," ").concat(t.default.wrapper," ").concat(v),style:null==_?void 0:_.wrapper},{children:[n.jsxs("div",e.__assign({className:"".concat(t.default.header," ").concat("riskSideBar"===d?t.default.headerPaddingRisk:t.default.headerPadding),style:null==_?void 0:_.header,onClick:function(){h||k(!B)}},{children:[n.jsxs("div",e.__assign({className:t.default.headerLeft,style:null==_?void 0:_.iconWrapper},{children:[i,n.jsxs("div",e.__assign({className:t.default.titleBlock},{children:[n.jsx("h1",e.__assign({className:t.default.title,style:null==_?void 0:_.title},{children:r})),n.jsx("p",e.__assign({className:t.default.subTitle,style:null==_?void 0:_.subTitle},{children:c}))]}))]})),"riskSideBar"!==d&&!h&&n.jsx("div",e.__assign({className:t.default.chevronWrapper,style:null==_?void 0:_.chevronWrapper},{children:B?n.jsx(s.ChevronUp,{className:t.default.chevronIcon}):n.jsx(s.ChevronDown,{className:t.default.chevronIcon})}))]})),B&&n.jsxs("div",e.__assign({className:"".concat("riskSideBar"!==d&&t.default.content," ").concat(t.default.contentBase),style:e.__assign({},null==_?void 0:_.contentContainerWrapper)},{children:[n.jsx("div",e.__assign({style:null==_?void 0:_.contentWrapper},{children:o})),(j||y)&&g&&n.jsxs("div",e.__assign({className:"".concat(t.default.segmentExplanationButtonContainer," flex-row"),style:e.__assign({},null==_?void 0:_.segmentExplanationButtonContainer)},{children:[j&&n.jsx("button",e.__assign({className:"".concat(t.default.segmentButton),onClick:function(){return null==j?void 0:j()},style:e.__assign({},null==_?void 0:_.explanationButton)},{children:"Show Example"})),y&&n.jsxs("button",e.__assign({className:"".concat(t.default.segmentButton),onClick:function(){return null==y?void 0:y()},style:e.__assign({},null==_?void 0:_.explanationButton)},{children:["View in Glossary ",n.jsx(s.ExternalLink,{size:14})]}))]}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=AIReasonAccordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),l=require("../../utils/user-story.utils.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("lucide-react"),l=require("../../utils/user-story.utils.js"),s=require("../userstory-with-citation/UserStoryWithCitation.js"),a=require("./PartialRequirementContent.module.css.js"),o=require("@mui/material"),r=require("../RequirementAIWrapper/RequirementAIWrapper.js"),d=require("../RichTextEditor/RichTextEditor.js"),u=function(u){var v,c,m,g,_,y,C,f,p,q,S,j,h,x,R,P,w,B,b=u.loadingPartialRequirements,N=u.localUserStory,A=u.setLocalUserStory,k=u.onCraFlowDiffAgentAction,E=u.disableEditing,D=u.isCraflow,T=void 0===D||D,U=u.onCraAccept,W=u.onCraReject,F=i.useState(!1),I=F[0],M=F[1],z=i.useState(""),L=z[0],H=z[1],O=r.useRequirementAI(),V=O.customStyles,X=O.segmentComponentConfig;i.useEffect(function(){E&&M(!1)},[E]),i.useEffect(function(){var e;H(null===(e=null==N?void 0:N[0])||void 0===e?void 0:e.value)},[N]);if(b)return t.jsx("div",e.__assign({className:a.default.skeletonWrapper,style:null===(v=null==V?void 0:V.PartialRequirementContentStyles)||void 0===v?void 0:v.skeletonWrapper},{children:[1,2,3,4,5].map(function(e){var i;return t.jsx("div",{className:a.default.skeletonLine,style:null===(i=null==V?void 0:V.PartialRequirementContentStyles)||void 0===i?void 0:i.skeletonLine},e)})}));var G=!L||""===L.trim();return t.jsxs("div",e.__assign({className:a.default.wrapper,style:null===(c=null==V?void 0:V.PartialRequirementContentStyles)||void 0===c?void 0:c.wrapper},{children:[t.jsx("div",e.__assign({className:a.default.actionBar,style:null===(m=null==V?void 0:V.PartialRequirementContentStyles)||void 0===m?void 0:m.actionBar},{children:I?t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({className:a.default.editingBadge,style:null===(C=null==V?void 0:V.PartialRequirementContentStyles)||void 0===C?void 0:C.editingBadge},{children:[t.jsx("span",{className:a.default.editingDot,style:null===(f=null==V?void 0:V.PartialRequirementContentStyles)||void 0===f?void 0:f.editingDot}),"Editing"]})),t.jsx("div",{className:a.default.btnDivider,style:null===(p=null==V?void 0:V.PartialRequirementContentStyles)||void 0===p?void 0:p.btnDivider}),t.jsx(o.Tooltip,e.__assign({title:G?"This field cannot be empty":"Save changes",slotProps:{tooltip:{sx:e.__assign({},null===(q=null==V?void 0:V.PartialRequirementContentStyles)||void 0===q?void 0:q.headerTooltip)}}},{children:t.jsx("span",{children:t.jsx("button",e.__assign({className:a.default.saveBtn,style:e.__assign(e.__assign(e.__assign({},null===(S=null==V?void 0:V.PartialRequirementContentStyles)||void 0===S?void 0:S.actionBtn),null===(j=null==V?void 0:V.PartialRequirementContentStyles)||void 0===j?void 0:j.saveBtn),{opacity:G?.5:1,cursor:G?"not-allowed":"pointer"}),onClick:function(){G||(A(function(t){var i=e.__assign(e.__assign({},t[0]),{value:L});return null==k||k("accept",[i]),[i]}),M(!1))},disabled:G},{children:t.jsx(n.Save,{size:16})}))})})),t.jsx("button",e.__assign({className:a.default.cancelBtn,style:e.__assign(e.__assign({},null===(h=null==V?void 0:V.PartialRequirementContentStyles)||void 0===h?void 0:h.actionBtn),null===(x=null==V?void 0:V.PartialRequirementContentStyles)||void 0===x?void 0:x.cancelBtn),onClick:function(){var e;H(null===(e=null==N?void 0:N[0])||void 0===e?void 0:e.value),M(!1)},title:"Discard changes","aria-label":"Discard changes"},{children:t.jsx(n.X,{size:16})}))]}):t.jsx(o.Tooltip,e.__assign({title:E?"Editing is disabled":"Edit",slotProps:{tooltip:{sx:e.__assign({},null===(g=null==V?void 0:V.PartialRequirementContentStyles)||void 0===g?void 0:g.headerTooltip)}}},{children:t.jsx("span",{children:t.jsx("button",e.__assign({className:a.default.editBtn,style:e.__assign(e.__assign(e.__assign({},null===(_=null==V?void 0:V.PartialRequirementContentStyles)||void 0===_?void 0:_.actionBtn),null===(y=null==V?void 0:V.PartialRequirementContentStyles)||void 0===y?void 0:y.editBtn),{opacity:E?.5:1,cursor:E?"not-allowed":"pointer"}),onClick:function(){E||M(!0)},disabled:E,"aria-label":"Edit requirement"},{children:t.jsx(n.Pencil,{size:16})}))})}))})),I?t.jsx("div",e.__assign({className:a.default.editorContainer,style:null===(R=null==V?void 0:V.PartialRequirementContentStyles)||void 0===R?void 0:R.editorContainer},{children:t.jsx(d.default,{minHeight:"100%",height:"100%",type:"string",value:l.formatMarkdown((null===(P=null==N?void 0:N[0])||void 0===P?void 0:P.value)||""),handleUpdateState:function(e,t){H(t)},doNotShowBorderInViewMode:!1,mode:"edit"})})):t.jsx("div",e.__assign({className:a.default.viewContainer,style:null===(w=null==V?void 0:V.PartialRequirementContentStyles)||void 0===w?void 0:w.viewContainer},{children:t.jsx(s.default,{message:l.formatMarkdown((null===(B=null==N?void 0:N[0])||void 0===B?void 0:B.value)||""),craFlowConfig:{isCraflow:!0,craUserStory:N,setCraUserStory:A,onCraFlowDiffAgentAction:k,displayActionButtons:!I},isCraflow:T,onCraAccept:U,onCraReject:W,customStyles:null==V?void 0:V.UserStoryWithCitationCustomStyles,segmentComponentConfig:X})}))]}))};exports.PartialRequirementContent=u,exports.default=u;
|
|
2
2
|
//# sourceMappingURL=PartialRequirementContent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),a=require("lucide-react"),s=require("../../../UserStoryImport/lib/cn.js"),l=require("./segment.module.css.js"),o=require("./ExampleComponentWrapper.js"),i=require("../ai-reasoning/AiReasoningCitationContent.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=r(t);exports.default=function(t){var r=t.id,u=void 0===r?"Segment":r,d=t.label;t.originalValue,t.decisionStrength;var m=t.aiReason,g=t.customStyles,p=t.customIcons,f=t.aiReasoningCitationCustomStyles,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),a=require("lucide-react"),s=require("../../../UserStoryImport/lib/cn.js"),l=require("./segment.module.css.js"),o=require("./ExampleComponentWrapper.js"),i=require("../ai-reasoning/AiReasoningCitationContent.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=r(t);exports.default=function(t){var r=t.id,u=void 0===r?"Segment":r,d=t.label;t.originalValue,t.decisionStrength;var m=t.aiReason,g=t.customStyles,p=t.customIcons,f=t.aiReasoningCitationCustomStyles,v=t.segmentExampleComponent,_=t.handleViewGlossary,x=c.default.useState(!1),j=x[0],y=x[1],h=c.default.useState(!1),C=h[0],b=h[1];return n.jsxs("div",e.__assign({className:"".concat(l.default.segmentWrapper),style:e.__assign({},null==g?void 0:g.segmentWrapper)},{children:[n.jsxs("div",e.__assign({className:"".concat(l.default.segmentContainer),style:e.__assign({},null==g?void 0:g.container)},{children:[n.jsxs("span",e.__assign({className:"segment-".concat(u," ").concat(l.default.segmentLabel),style:e.__assign({},null==g?void 0:g.label)},{children:[u," ","{".concat(d,"}")]})),n.jsx("button",e.__assign({className:"".concat(l.default.segmentExplanationButtonContainer),style:e.__assign({},null==g?void 0:g.buttonContainer),onClick:function(){y(function(e){return!e}),b(!1)}},{children:n.jsx(a.ChevronDown,{className:s.cn("".concat(l.default.cheveronIcon),j&&"".concat(l.default.cheveronIconRotated)),style:e.__assign({},null==g?void 0:g.cheveronIcon)})}))]})),C?n.jsx(o.default,{label:null!=d?d:"",segmentExampleComponent:v,customStyles:null==g?void 0:g.segmentExample,handleCancelExample:function(){b(!1)}}):m&&j&&n.jsx(i.default,{aiReason:m,customStyles:f,customIcons:p,isSegmentExplanation:!0,handleViewGlossary:_?function(){y(!1),null==_||_(u)}:void 0,handleViewExample:v?function(){b(!0)}:void 0})]}))};
|
|
2
2
|
//# sourceMappingURL=Segment.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(
|
|
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(".segment-module_segmentWrapper__PVOuq{display:flex;flex-direction:column;gap:8px}.segment-module_segmentContainer__wBEel{align-items:center;background-color:#eff6ff;border:1px dashed #bfdbfe;border-radius:4px;color:#3b82f6;display:flex;gap:8px;padding:8px;width:fit-content}.segment-module_segmentLabel__-y8Su{color:#3b82f6;font-size:14px;font-weight:600;line-height:21px;text-transform:uppercase}.segment-module_segmentButtonContainer__X76sx{background-color:initial;border:none;cursor:pointer;padding:0}.segment-module_cheveronIcon__1njFy{color:#3b82f6;height:16px;transition:all .2s ease-in-out;width:16px}.segment-module_cheveronIconRotated__qDYj7{transform:rotate(180deg)}.segment-module_exampleWrapper__ptZzj{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.segment-module_uppercase__hjgxG{text-transform:uppercase}.segment-module_exampleContainer__9tMXx{align-items:flex-start;border:2px dashed #e2e8f0;border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:16px;width:100%}.segment-module_exampleHeader__9P11O{align-items:center;align-self:stretch;display:flex;justify-content:space-between}.segment-module_exampleHeaderText__MWMG0{color:#334155;font-size:14px;font-weight:600;line-height:21px;margin:0}.segment-module_cancelButton__-F5aZ{align-items:center;align-self:stretch;background-color:initial;border:none;color:#334155;cursor:pointer;display:flex;height:fit-content;justify-content:space-between;padding:4px;transition:all .2s ease-in-out}.segment-module_cancelButton__-F5aZ:hover{background-color:#eff6ff}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={segmentWrapper:"segment-module_segmentWrapper__PVOuq",segmentContainer:"segment-module_segmentContainer__wBEel",segmentLabel:"segment-module_segmentLabel__-y8Su",segmentButtonContainer:"segment-module_segmentButtonContainer__X76sx",cheveronIcon:"segment-module_cheveronIcon__1njFy",cheveronIconRotated:"segment-module_cheveronIconRotated__qDYj7",exampleWrapper:"segment-module_exampleWrapper__ptZzj",uppercase:"segment-module_uppercase__hjgxG",exampleContainer:"segment-module_exampleContainer__9tMXx",exampleHeader:"segment-module_exampleHeader__9P11O",exampleHeaderText:"segment-module_exampleHeaderText__MWMG0",cancelButton:"segment-module_cancelButton__-F5aZ"};
|
|
2
2
|
//# sourceMappingURL=segment.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"),n=require("react"),
|
|
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("../RequirementAIWrapper/RequirementAIWrapper.js"),r=require("../../utils/helpers.js"),a=require("../RichTextEditor/RichTextEditor.js"),o=require("../userstory-with-citation/UserStoryWithCitation.js"),l=require("../../shared/AtomicButton.js"),u=require("./SubfeatureBlock.module.css.js");exports.default=function(d){var c,f,v=d.parentArtifactId,_=d.artifactId,g=d.title,p=d.content,m=d.isEditingModeOn,h=d.setIsEditingModeOn,y=d.isCitationLoadingDisplay,j=void 0!==y&&y,x=s.useRequirementAI(),S=x.userStory,I=x.setUserStory,C=x.customStyles,q=x.customIcons,b=x.segmentComponentConfig,N=null===(c=null==C?void 0:C.userStoryScreenStyles)||void 0===c?void 0:c.subFeatureBlock,B=null===(f=null==C?void 0:C.userStoryScreenStyles)||void 0===f?void 0:f.userStoryContentStyles,k=n.useState(!0),A=k[0],w=k[1],W=n.useState(!1),M=W[0],E=W[1],P=n.useState(S),R=P[0],F=P[1];n.useEffect(function(){F(S)},[S]);return t.jsxs("div",e.__assign({className:u.default.container,style:null==N?void 0:N.container},{children:[t.jsxs("button",e.__assign({onClick:function(){w(function(e){return!e})},className:u.default.toggleButton,style:null==N?void 0:N.toggleButton},{children:[t.jsx("h1",e.__assign({className:u.default.title,style:null==N?void 0:N.title},{children:g})),t.jsxs("div",e.__assign({className:u.default.subFeatureToolbar,style:null==N?void 0:N.subFeatureToolbar},{children:[A&&t.jsx("div",e.__assign({className:u.default.actionBar,style:null==N?void 0:N.actionBar},{children:M?t.jsxs("div",e.__assign({className:u.default.editingActions},{children:[t.jsx(l.default,{type:"outline",children:"Cancel",onClick:function(e){e.stopPropagation(),E(!1),h(!1)}}),t.jsx(l.default,{type:"fill",children:"Save",onClick:function(e){e.stopPropagation(),I(R),E(!1),h(!1)}})]})):!m&&t.jsx("div",e.__assign({className:u.default.viewActions},{children:t.jsx("button",e.__assign({className:u.default.editButton,style:null==N?void 0:N.editButton,onClick:function(e){e.stopPropagation(),E(!0),h(!0)}},{children:t.jsx(i.PencilIcon,{size:16})}))}))})),t.jsx(i.ChevronDown,{className:"".concat(u.default.chevron," ").concat(A?u.default.chevronOpen:""),style:null==N?void 0:N.chevron})]}))]})),A&&t.jsx(t.Fragment,{children:M?t.jsx("div",e.__assign({className:u.default.editorWrapper,style:null==N?void 0:N.editorWrapper},{children:t.jsx(a.default,{minHeight:"100%",height:"100%",type:"string",value:r.formatMarkdown(p)||"",handleUpdateState:function(t,n){var i=r.indentMarkdown(n);F(function(t){var n=e.__spreadArray([],t,!0),s=n.findIndex(function(e){return e.artifactId===v});if(-1===s)return n;var r=n[s].sub_features;if(r){var a=r.findIndex(function(e){return e.artifactId===_});-1!==a&&(n[s]=e.__assign(e.__assign({},n[s]),{sub_features:r.map(function(t,n){return n===a?e.__assign(e.__assign({},t),{value:i}):t})}))}return n})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:"edit"})})):t.jsx("div",e.__assign({className:u.default.contentWrapper,style:null==N?void 0:N.contentWrapper},{children:t.jsx(o.default,{message:p,isCitationLoadingDisplay:j,customStyles:e.__assign({},B),customIcons:e.__assign({},null==q?void 0:q.userStoryIcons),segmentComponentConfig:b})}))})]}),_)};
|
|
2
2
|
//# sourceMappingURL=SubfeatureBlock.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"),s=require("react-resizable-panels"),l=require("lucide-react"),i=require("../../utils/helpers.js"),r=require("./SubfeatureBlock.js"),o=require("./UserStoryScreen.module.css.js"),a=require("../RequirementAIWrapper/RequirementAIWrapper.js"),d=n.createContext(null),u=function(){var e=n.useContext(d);if(!e)throw new Error("UserStoryScreen must be used inside its provider");return e},c=function(n){var s,l,i=n.AtomicButton,r=u(),d=r.selectedStreamingStoryIndex,c=r.isCitationLoadingNotStarted,m=r.classNames,g=r.scenario,y=a.useRequirementAI(),f=y.userStory,x=y.customStyles,p=null==x?void 0:x.userStoryScreenStyles;return(null==f?void 0:f.length)?t.jsxs("div",e.__assign({className:"".concat(o.default.header," ").concat(null!==(s=null==m?void 0:m.header)&&void 0!==s?s:""),style:null==p?void 0:p.header},{children:[t.jsxs("div",e.__assign({className:o.default.headerLeftContainer},{children:[t.jsx("span",e.__assign({className:o.default.headerTitle,style:null==p?void 0:p.headerTitle},{children:null===(l=f[d])||void 0===l?void 0:l.title})),"streaming"===g&&t.jsxs("span",e.__assign({className:o.default.headerSubtitle,style:null==p?void 0:p.headerSubtitle},{children:[t.jsx("span",e.__assign({className:o.default.streamingText,style:null==p?void 0:p.streamingText},{children:c?"Generating Requirement Doc":"Hang tight! We're loading the citations."}))," • Review & edit blocks as we build"]}))]})),t.jsx(v,{AtomicButton:i})]})):t.jsx(S,{classNames:m})},v=function(n){var s=n.AtomicButton,i=u(),r=i.isEditing,d=i.isEditingModeOn,c=i.setIsEditing,v=i.setIsEditingModeOn,S=i.userStoryCopy,m=a.useRequirementAI(),g=m.userStory,y=m.setUserStory,f=m.customStyles,x=null==f?void 0:f.userStoryScreenStyles;return(null==g?void 0:g.length)?r?t.jsxs("div",e.__assign({className:o.default.actions,style:null==x?void 0:x.actions},{children:[t.jsx(s,e.__assign({type:"outline",onClick:function(){c(!1),v(!1)},style:null==x?void 0:x.cancelAtomicButton},{children:"Cancel"})),t.jsx(s,e.__assign({type:"fill",onClick:function(){y(S),c(!1),v(!1)},style:null==x?void 0:x.saveAtomicButton},{children:"Save"}))]})):d?null:t.jsx("div",e.__assign({className:o.default.editToggleWrapper},{children:t.jsx("button",e.__assign({className:o.default.editToggleBtn,style:null==x?void 0:x.editToggleBtn,onClick:function(){c(!0),v(!0)}},{children:t.jsx(l.PencilIcon,{size:16})}))})):null},S=function(n){var s,l=n.classNames;return t.jsxs("div",e.__assign({className:"".concat(o.default.header," ").concat(null!==(s=null==l?void 0:l.header)&&void 0!==s?s:"")},{children:[t.jsx("div",{className:o.default.skeletonTitle}),t.jsx("div",{className:o.default.skeletonSubtitle})]}))},m=function(){var n,s=a.useRequirementAI().customStyles,l=null===(n=null==s?void 0:s.userStoryScreenStyles)||void 0===n?void 0:n.accordionSkeleton;return t.jsxs("div",e.__assign({className:o.default.accordionSkeleton,style:null==l?void 0:l.wrapper},{children:[t.jsx("div",{className:o.default.skeletonLine,style:null==l?void 0:l.line}),t.jsx("div",{className:o.default.skeletonBox,style:null==l?void 0:l.box})]}))},g=function(){var n,s=a.useRequirementAI().customStyles,l=null===(n=null==s?void 0:s.userStoryScreenStyles)||void 0===n?void 0:n.subFeatureSkeleton;return t.jsxs("div",e.__assign({className:o.default.subFeatureSkeleton,style:null==l?void 0:l.wrapper},{children:[t.jsx("div",{className:o.default.skeletonLine,style:null==l?void 0:l.line}),t.jsx("div",{className:o.default.skeletonLine,style:null==l?void 0:l.line}),t.jsx("div",{className:o.default.skeletonLine,style:null==l?void 0:l.line})]}))},y=Object.assign(function(l){var i,r,u,c,v,S=l.scenario,m=l.isCitationLoadingNotStarted,g=l.children,y=l.classNames,f=l.artifactTitleIds,x=a.useRequirementAI(),p=x.userStory,h=x.customStyles,_=n.useState(0),j=_[0],I=_[1],b=n.useState(!0),N=b[0],C=b[1],E=n.useState(!1),B=E[0],R=E[1],A=n.useState(!1),q=A[0],k=A[1],T=n.useState(!1),w=T[0],L=T[1],P=n.useState(!1),M=P[0],z=P[1],O=n.useState(p),W=O[0],F=O[1],D=n.useRef(null),H=n.useRef(null);return n.useEffect(function(){F(p)},[p]),n.useEffect(function(){R(!0);var e=setTimeout(function(){return R(!1)},2e3);return function(){return clearTimeout(e)}},[null===(r=null===(i=null==p?void 0:p[j])||void 0===i?void 0:i.sub_features)||void 0===r?void 0:r.length]),n.useEffect(function(){var e=H.current;if(e){var t=function(){k(e.scrollHeight-e.scrollTop-e.clientHeight<20)};return e.addEventListener("scroll",t),function(){return e.removeEventListener("scroll",t)}}},[null==p?void 0:p[j]]),t.jsx(d.Provider,e.__assign({value:{scenario:S,isCitationLoadingNotStarted:m,selectedStreamingStoryIndex:j,setSelectedStreamingStoryIndex:I,isSidebarExpanded:N,setIsSidebarExpanded:C,sidebarPanelRef:D,isEditing:w,setIsEditing:L,isEditingModeOn:M,setIsEditingModeOn:z,userStoryCopy:W,setUserStoryCopy:F,scrollContainerRef:H,isAtBottom:q,isScrollBtnBouncing:B,scrollToBottom:function(){H.current&&H.current.scrollTo({top:H.current.scrollHeight,behavior:"smooth"})},classNames:y,artifactTitleIds:f}},{children:t.jsx("div",e.__assign({className:"".concat(o.default.container," ").concat(null!==(u=null==y?void 0:y.container)&&void 0!==u?u:""),style:e.__assign({},null===(c=null==h?void 0:h.userStoryScreenStyles)||void 0===c?void 0:c.wrapperContainer)},{children:t.jsx(s.PanelGroup,e.__assign({direction:"horizontal",className:o.default.panelGroup,style:null===(v=null==h?void 0:h.userStoryScreenStyles)||void 0===v?void 0:v.panelGroup},{children:g}))}))}))},{Sidebar:function(n){var l,i=n.Component,r=u(),d=r.selectedStreamingStoryIndex,c=r.setSelectedStreamingStoryIndex,v=r.isSidebarExpanded,S=r.setIsSidebarExpanded,m=r.sidebarPanelRef,g=r.scenario,y=r.artifactTitleIds,f=a.useRequirementAI(),x=f.userStory,p=f.customStyles;return t.jsx(s.Panel,e.__assign({ref:m,defaultSize:25,minSize:15,collapsible:!0,collapsedSize:0,onCollapse:function(){return S(!1)},onExpand:function(){return S(!0)},id:"streaming-sidebar",order:1,className:o.default.sidebarPanel,style:null===(l=null==p?void 0:p.userStoryScreenStyles)||void 0===l?void 0:l.sidebarPanel},{children:t.jsx(i,{streamingUserStories:x,selectedStreamingStoryIndex:d,setSelectedStreamingStoryIndex:c,isSidebarExpanded:v,isStreamingScreen:"streaming"===g,artifactTitleIds:y})}))},SidebarToggle:function(n){var l=n.OpenIcon,i=n.CloseIcon,r=u(),d=r.isSidebarExpanded;r.setIsSidebarExpanded;var c=r.sidebarPanelRef,v=a.useRequirementAI().customStyles,S=null==v?void 0:v.userStoryScreenStyles;return t.jsx(s.PanelResizeHandle,e.__assign({className:o.default.resizeHandle,style:null==S?void 0:S.resizeHandle},{children:t.jsx("button",e.__assign({className:o.default.sidebarToggleBtn,onClick:function(e){e.stopPropagation(),function(){var e,t;d?null===(e=c.current)||void 0===e||e.collapse():null===(t=c.current)||void 0===t||t.expand()}()},style:null==S?void 0:S.sidebarToggleBtn},{children:d?t.jsx(i,{}):t.jsx(l,{})}))}))},Content:function(n){var l,i=n.children,r=n.AtomicButton,d=u(),v=d.scrollContainerRef,S=d.classNames,m=a.useRequirementAI().customStyles,g=null==m?void 0:m.userStoryScreenStyles;return t.jsx(s.Panel,e.__assign({minSize:0,id:"streaming-content",order:2,className:o.default.contentPanel,style:null==g?void 0:g.contentPanel},{children:t.jsxs("div",e.__assign({ref:v,className:"".concat(o.default.scrollContainer," ").concat(null!==(l=null==S?void 0:S.scrollContainer)&&void 0!==l?l:""),style:null==g?void 0:g.scrollContainer},{children:[t.jsx(c,{AtomicButton:r}),i]}))}))},Body:function(e){var n=e.children,s=a.useRequirementAI(),l=s.userStory;return s.setUserStory,(null==l?void 0:l.length)?t.jsx(t.Fragment,{children:n}):null},Story:function(n){var s,l,i,r=n.Component,d=u(),c=d.selectedStreamingStoryIndex,v=d.isEditing,S=d.scenario,m=a.useRequirementAI(),g=m.userStory,y=m.customStyles,f=m.customIcons,x=m.segmentDataList,p=m.handleViewGlossary,h=m.getSegmentExampleComponent,_=m.handleFetchSegmentDetails,j=null==y?void 0:y.userStoryScreenStyles,I=null==j?void 0:j.userStoryContentStyles;return v?null:t.jsx("div",e.__assign({className:o.default.storyWrapper,style:null==j?void 0:j.storyWrapper},{children:t.jsx(r,{message:null===(s=g[c])||void 0===s?void 0:s.value,aiReasoningsForBlock:(null===(l=g[c])||void 0===l?void 0:l.aiReasoning)||[],isCitationLoadingDisplay:"streaming"===S,customStyles:e.__assign({},I),customIcons:e.__assign({},null==f?void 0:f.userStoryIcons),artifactId:null===(i=g[c])||void 0===i?void 0:i.artifactId,getSegmentExampleComponent:h,handleViewGlossary:p,segmentDataList:x,handleFetchSegmentDetails:_})}))},Editor:function(n){var s,l=n.Component,r=n.onBlur,d=u(),c=d.selectedStreamingStoryIndex,v=d.isEditing,S=d.setUserStoryCopy,m=a.useRequirementAI(),g=m.userStory,y=m.customStyles,f=null==y?void 0:y.textEditorStyles;if(!v)return null;return t.jsx("div",e.__assign({className:o.default.editorWrapper,style:null==f?void 0:f.wrapper},{children:t.jsx(l,{minHeight:"100%",height:"100%",type:"string",value:i.formatMarkdown(null===(s=g[c])||void 0===s?void 0:s.value)||"",handleUpdateState:function(t,n){var s,l=i.indentMarkdown(n),r=null===(s=g[c])||void 0===s?void 0:s.storyNumber;S(function(t){var n=e.__spreadArray([],t,!0),s=n.findIndex(function(e){return e.storyNumber===r});return-1===s||(n[s]=e.__assign(e.__assign({},n[s]),{value:l})),n})},doNotShowBorderInViewMode:!1,onBlur:r,mode:"edit",customStyles:f})}))},SubFeatures:function(){var n,s=u(),l=s.selectedStreamingStoryIndex,i=s.isEditingModeOn,d=s.setIsEditingModeOn,c=s.scenario,v=s.isCitationLoadingNotStarted,S=a.useRequirementAI().userStory,y=(null===(n=null==S?void 0:S[l])||void 0===n?void 0:n.sub_features)||[];return 0===y.length&&"streaming"===c?t.jsx(m,{}):t.jsxs(t.Fragment,{children:[y.map(function(e){return t.jsx(r.default,{parentArtifactId:null==S?void 0:S[l].artifactId,artifactId:e.artifactId,title:e.title,content:e.value,aiReasoning:e.aiReasoning||[],isEditingModeOn:i,setIsEditingModeOn:d,isCitationLoadingDisplay:"streaming"===c},e.artifactId)}),"streaming"===c&&v&&t.jsx("div",e.__assign({className:o.default.subFeatureSkeletonWrapper},{children:t.jsx(g,{})}))]})},ScrollButton:function(){var n=u(),s=n.isAtBottom,i=n.isSidebarExpanded,r=n.scrollToBottom,d=n.isScrollBtnBouncing,c=a.useRequirementAI(),v=c.userStory,S=c.customStyles,m=null==S?void 0:S.userStoryScreenStyles;return!(null==v?void 0:v.length)||s?null:t.jsx("div",e.__assign({className:"".concat(o.default.scrollBtnWrapper," ").concat(i?o.default.scrollExpanded:o.default.scrollCollapsed),style:null==m?void 0:m.scrollBtnWrapper},{children:t.jsx("button",e.__assign({onClick:r,className:"".concat(o.default.scrollBtn," ").concat(d?o.default.bounce:""),style:null==m?void 0:m.scrollBtn,"aria-label":"Scroll to bottom"},{children:t.jsx(l.ChevronDown,{size:20})}))}))}});exports.default=y;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),s=require("react-resizable-panels"),i=require("lucide-react"),l=require("../../utils/helpers.js"),r=require("./SubfeatureBlock.js"),o=require("./UserStoryScreen.module.css.js"),a=require("../RequirementAIWrapper/RequirementAIWrapper.js"),u=n.createContext(null),d=function(){var e=n.useContext(u);if(!e)throw new Error("UserStoryScreen must be used inside its provider");return e},c=function(n){var s,i,l=n.AtomicButton,r=d(),u=r.selectedStreamingStoryIndex,c=r.isCitationLoadingNotStarted,m=r.classNames,g=r.scenario,f=a.useRequirementAI(),y=f.userStory,x=f.customStyles,p=null==x?void 0:x.userStoryScreenStyles;return(null==y?void 0:y.length)?t.jsxs("div",e.__assign({className:"".concat(o.default.header," ").concat(null!==(s=null==m?void 0:m.header)&&void 0!==s?s:""),style:null==p?void 0:p.header},{children:[t.jsxs("div",e.__assign({className:o.default.headerLeftContainer},{children:[t.jsx("span",e.__assign({className:o.default.headerTitle,style:null==p?void 0:p.headerTitle},{children:null===(i=y[u])||void 0===i?void 0:i.title})),"streaming"===g&&t.jsxs("span",e.__assign({className:o.default.headerSubtitle,style:null==p?void 0:p.headerSubtitle},{children:[t.jsx("span",e.__assign({className:o.default.streamingText,style:null==p?void 0:p.streamingText},{children:c?"Generating Requirement Doc":"Hang tight! We're loading the citations."}))," • Review & edit blocks as we build"]}))]})),t.jsx(v,{AtomicButton:l})]})):t.jsx(S,{classNames:m})},v=function(n){var s=n.AtomicButton,l=d(),r=l.isEditing,u=l.isEditingModeOn,c=l.setIsEditing,v=l.setIsEditingModeOn,S=l.userStoryCopy,m=a.useRequirementAI(),g=m.userStory,f=m.setUserStory,y=m.customStyles,x=null==y?void 0:y.userStoryScreenStyles;return(null==g?void 0:g.length)?r?t.jsxs("div",e.__assign({className:o.default.actions,style:null==x?void 0:x.actions},{children:[t.jsx(s,e.__assign({type:"outline",onClick:function(){c(!1),v(!1)},style:null==x?void 0:x.cancelAtomicButton},{children:"Cancel"})),t.jsx(s,e.__assign({type:"fill",onClick:function(){f(S),c(!1),v(!1)},style:null==x?void 0:x.saveAtomicButton},{children:"Save"}))]})):u?null:t.jsx("div",e.__assign({className:o.default.editToggleWrapper},{children:t.jsx("button",e.__assign({className:o.default.editToggleBtn,style:null==x?void 0:x.editToggleBtn,onClick:function(){c(!0),v(!0)}},{children:t.jsx(i.PencilIcon,{size:16})}))})):null},S=function(n){var s,i=n.classNames;return t.jsxs("div",e.__assign({className:"".concat(o.default.header," ").concat(null!==(s=null==i?void 0:i.header)&&void 0!==s?s:"")},{children:[t.jsx("div",{className:o.default.skeletonTitle}),t.jsx("div",{className:o.default.skeletonSubtitle})]}))},m=function(){var n,s=a.useRequirementAI().customStyles,i=null===(n=null==s?void 0:s.userStoryScreenStyles)||void 0===n?void 0:n.accordionSkeleton;return t.jsxs("div",e.__assign({className:o.default.accordionSkeleton,style:null==i?void 0:i.wrapper},{children:[t.jsx("div",{className:o.default.skeletonLine,style:null==i?void 0:i.line}),t.jsx("div",{className:o.default.skeletonBox,style:null==i?void 0:i.box})]}))},g=function(){var n,s=a.useRequirementAI().customStyles,i=null===(n=null==s?void 0:s.userStoryScreenStyles)||void 0===n?void 0:n.subFeatureSkeleton;return t.jsxs("div",e.__assign({className:o.default.subFeatureSkeleton,style:null==i?void 0:i.wrapper},{children:[t.jsx("div",{className:o.default.skeletonLine,style:null==i?void 0:i.line}),t.jsx("div",{className:o.default.skeletonLine,style:null==i?void 0:i.line}),t.jsx("div",{className:o.default.skeletonLine,style:null==i?void 0:i.line})]}))},f=Object.assign(function(i){var l,r,d,c,v,S=i.scenario,m=i.isCitationLoadingNotStarted,g=i.children,f=i.classNames,y=i.artifactTitleIds,x=a.useRequirementAI(),p=x.userStory,_=x.customStyles,h=n.useState(0),j=h[0],I=h[1],b=n.useState(!0),N=b[0],C=b[1],E=n.useState(!1),B=E[0],R=E[1],A=n.useState(!1),q=A[0],k=A[1],T=n.useState(!1),P=T[0],w=T[1],L=n.useState(!1),M=L[0],z=L[1],O=n.useState(p),W=O[0],H=O[1],U=n.useRef(null),F=n.useRef(null);return n.useEffect(function(){H(p)},[p]),n.useEffect(function(){R(!0);var e=setTimeout(function(){return R(!1)},2e3);return function(){return clearTimeout(e)}},[null===(r=null===(l=null==p?void 0:p[j])||void 0===l?void 0:l.sub_features)||void 0===r?void 0:r.length]),n.useEffect(function(){var e=F.current;if(e){var t=function(){k(e.scrollHeight-e.scrollTop-e.clientHeight<20)};return e.addEventListener("scroll",t),function(){return e.removeEventListener("scroll",t)}}},[null==p?void 0:p[j]]),t.jsx(u.Provider,e.__assign({value:{scenario:S,isCitationLoadingNotStarted:m,selectedStreamingStoryIndex:j,setSelectedStreamingStoryIndex:I,isSidebarExpanded:N,setIsSidebarExpanded:C,sidebarPanelRef:U,isEditing:P,setIsEditing:w,isEditingModeOn:M,setIsEditingModeOn:z,userStoryCopy:W,setUserStoryCopy:H,scrollContainerRef:F,isAtBottom:q,isScrollBtnBouncing:B,scrollToBottom:function(){F.current&&F.current.scrollTo({top:F.current.scrollHeight,behavior:"smooth"})},classNames:f,artifactTitleIds:y}},{children:t.jsx("div",e.__assign({className:"".concat(o.default.container," ").concat(null!==(d=null==f?void 0:f.container)&&void 0!==d?d:""),style:e.__assign({},null===(c=null==_?void 0:_.userStoryScreenStyles)||void 0===c?void 0:c.wrapperContainer)},{children:t.jsx(s.PanelGroup,e.__assign({direction:"horizontal",className:o.default.panelGroup,style:null===(v=null==_?void 0:_.userStoryScreenStyles)||void 0===v?void 0:v.panelGroup},{children:g}))}))}))},{Sidebar:function(n){var i,l=n.Component,r=d(),u=r.selectedStreamingStoryIndex,c=r.setSelectedStreamingStoryIndex,v=r.isSidebarExpanded,S=r.setIsSidebarExpanded,m=r.sidebarPanelRef,g=r.scenario,f=r.artifactTitleIds,y=a.useRequirementAI(),x=y.userStory,p=y.customStyles;return t.jsx(s.Panel,e.__assign({ref:m,defaultSize:25,minSize:15,collapsible:!0,collapsedSize:0,onCollapse:function(){return S(!1)},onExpand:function(){return S(!0)},id:"streaming-sidebar",order:1,className:o.default.sidebarPanel,style:null===(i=null==p?void 0:p.userStoryScreenStyles)||void 0===i?void 0:i.sidebarPanel},{children:t.jsx(l,{streamingUserStories:x,selectedStreamingStoryIndex:u,setSelectedStreamingStoryIndex:c,isSidebarExpanded:v,isStreamingScreen:"streaming"===g,artifactTitleIds:f})}))},SidebarToggle:function(n){var i=n.OpenIcon,l=n.CloseIcon,r=d(),u=r.isSidebarExpanded;r.setIsSidebarExpanded;var c=r.sidebarPanelRef,v=a.useRequirementAI().customStyles,S=null==v?void 0:v.userStoryScreenStyles;return t.jsx(s.PanelResizeHandle,e.__assign({className:o.default.resizeHandle,style:null==S?void 0:S.resizeHandle},{children:t.jsx("button",e.__assign({className:o.default.sidebarToggleBtn,onClick:function(e){e.stopPropagation(),function(){var e,t;u?null===(e=c.current)||void 0===e||e.collapse():null===(t=c.current)||void 0===t||t.expand()}()},style:null==S?void 0:S.sidebarToggleBtn},{children:u?t.jsx(l,{}):t.jsx(i,{})}))}))},Content:function(n){var i,l=n.children,r=n.AtomicButton,u=d(),v=u.scrollContainerRef,S=u.classNames,m=a.useRequirementAI().customStyles,g=null==m?void 0:m.userStoryScreenStyles;return t.jsx(s.Panel,e.__assign({minSize:0,id:"streaming-content",order:2,className:o.default.contentPanel,style:null==g?void 0:g.contentPanel},{children:t.jsxs("div",e.__assign({ref:v,className:"".concat(o.default.scrollContainer," ").concat(null!==(i=null==S?void 0:S.scrollContainer)&&void 0!==i?i:""),style:null==g?void 0:g.scrollContainer},{children:[t.jsx(c,{AtomicButton:r}),l]}))}))},Body:function(e){var n=e.children,s=a.useRequirementAI(),i=s.userStory;return s.setUserStory,(null==i?void 0:i.length)?t.jsx(t.Fragment,{children:n}):null},Story:function(n){var s,i,l,r=n.Component,u=d(),c=u.selectedStreamingStoryIndex,v=u.isEditing,S=u.scenario,m=a.useRequirementAI(),g=m.userStory,f=m.customStyles,y=m.customIcons,x=m.segmentComponentConfig,p=null==f?void 0:f.userStoryScreenStyles,_=null==p?void 0:p.userStoryContentStyles;return v?null:t.jsx("div",e.__assign({className:o.default.storyWrapper,style:null==p?void 0:p.storyWrapper},{children:t.jsx(r,{message:null===(s=g[c])||void 0===s?void 0:s.value,aiReasoningsForBlock:(null===(i=g[c])||void 0===i?void 0:i.aiReasoning)||[],isCitationLoadingDisplay:"streaming"===S,customStyles:e.__assign({},_),customIcons:e.__assign({},null==y?void 0:y.userStoryIcons),artifactId:null===(l=g[c])||void 0===l?void 0:l.artifactId,segmentComponentConfig:x})}))},Editor:function(n){var s,i=n.Component,r=n.onBlur,u=d(),c=u.selectedStreamingStoryIndex,v=u.isEditing,S=u.setUserStoryCopy,m=a.useRequirementAI(),g=m.userStory,f=m.customStyles,y=null==f?void 0:f.textEditorStyles;if(!v)return null;return t.jsx("div",e.__assign({className:o.default.editorWrapper,style:null==y?void 0:y.wrapper},{children:t.jsx(i,{minHeight:"100%",height:"100%",type:"string",value:l.formatMarkdown(null===(s=g[c])||void 0===s?void 0:s.value)||"",handleUpdateState:function(t,n){var s,i=l.indentMarkdown(n),r=null===(s=g[c])||void 0===s?void 0:s.storyNumber;S(function(t){var n=e.__spreadArray([],t,!0),s=n.findIndex(function(e){return e.storyNumber===r});return-1===s||(n[s]=e.__assign(e.__assign({},n[s]),{value:i})),n})},doNotShowBorderInViewMode:!1,onBlur:r,mode:"edit",customStyles:y})}))},SubFeatures:function(){var n,s=d(),i=s.selectedStreamingStoryIndex,l=s.isEditingModeOn,u=s.setIsEditingModeOn,c=s.scenario,v=s.isCitationLoadingNotStarted,S=a.useRequirementAI().userStory,f=(null===(n=null==S?void 0:S[i])||void 0===n?void 0:n.sub_features)||[];return 0===f.length&&"streaming"===c?t.jsx(m,{}):t.jsxs(t.Fragment,{children:[f.map(function(e){return t.jsx(r.default,{parentArtifactId:null==S?void 0:S[i].artifactId,artifactId:e.artifactId,title:e.title,content:e.value,aiReasoning:e.aiReasoning||[],isEditingModeOn:l,setIsEditingModeOn:u,isCitationLoadingDisplay:"streaming"===c},e.artifactId)}),"streaming"===c&&v&&t.jsx("div",e.__assign({className:o.default.subFeatureSkeletonWrapper},{children:t.jsx(g,{})}))]})},ScrollButton:function(){var n=d(),s=n.isAtBottom,l=n.isSidebarExpanded,r=n.scrollToBottom,u=n.isScrollBtnBouncing,c=a.useRequirementAI(),v=c.userStory,S=c.customStyles,m=null==S?void 0:S.userStoryScreenStyles;return!(null==v?void 0:v.length)||s?null:t.jsx("div",e.__assign({className:"".concat(o.default.scrollBtnWrapper," ").concat(l?o.default.scrollExpanded:o.default.scrollCollapsed),style:null==m?void 0:m.scrollBtnWrapper},{children:t.jsx("button",e.__assign({onClick:r,className:"".concat(o.default.scrollBtn," ").concat(u?o.default.bounce:""),style:null==m?void 0:m.scrollBtn,"aria-label":"Scroll to bottom"},{children:t.jsx(i.ChevronDown,{size:20})}))}))}});exports.default=f;
|
|
2
2
|
//# sourceMappingURL=UserStoryScreen.js.map
|
package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("react-markdown"),o=require("rehype-raw"),l=require("./UserStoryWithCitation.module.css.js"),a=require("../../shared/useMarkdownSearch.js"),r=require("lucide-react"),d=require("@mui/material"),s=require("../../shared/UpdatedAnimationContent.js"),c=require("../../shared/GeneratedCodeCitation.js"),u=require("../../shared/CitationLoadingIndicator.js"),v=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../../icons/CognitiveDecision.js"),h=require("../../icons/BrainRed.js"),f=require("../ai-reasoning/AiReasoningCitation.js"),m=require("../../icons/RelevanceScoreIcon.js"),p=require("../RecommendationBlock/RecommendationBlock.js"),C=require("../UserStoryCard/AttachedContext.js"),_=require("../ai-reasoning/AiReasoningCitationContent.js"),x=require("./components/InlineUpdatedComponent.js"),y=require("../segment/Segment.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var S=j(t),R=j(o),I=i.createContext(!1),w=i.createContext({expandedInfo:null,setExpanded:function(){},reasonToRow:{current:new Map}}),b=i.createContext({rowId:""}),N=function(t){var o,a=t.aiReason,r=t.isHighConfidence,d=t.customStyle,s=t.customIcons,c=i.useContext(w),u=c.expandedInfo,v=c.setExpanded,f=c.reasonToRow,m=i.useContext(b).rowId,p=String(a.id);m&&f.current.set(p,m);var C=(null===(o=null==u?void 0:u.aiReason)||void 0===o?void 0:o.id)===a.id,_=r?(null==s?void 0:s.highConfidence)||n.jsx(g.default,{}):(null==s?void 0:s.lowConfidence)||n.jsx(h.default,{});return n.jsxs("button",e.__assign({className:l.default.aiReasoningButton,style:d,onClick:function(e){e.stopPropagation(),e.preventDefault(),v(C?null:m,C?null:a)}},{children:[_,C?n.jsx("i",{className:"pi pi-angle-up ".concat(r?l.default.aiReasoningIconHighConfidence:l.default.aiReasoningIconLowConfidence)}):n.jsx("i",{className:"pi pi-angle-down ".concat(r?l.default.aiReasoningIconHighConfidence:l.default.aiReasoningIconLowConfidence)})]}))},q=function(t){var o,a,r=t.children,d=t.node,s=t.customStyles,c=t.customIcons,u=i.useRef(Math.random().toString(36).slice(2)).current,v=i.useContext(w).expandedInfo,g=(null==v?void 0:v.rowId)===u,h=Array.isArray(null==d?void 0:d.children)?d.children.filter(function(e){return"element"===e.type}).length:1,f=null!==(a=null===(o=null==d?void 0:d.properties)||void 0===o?void 0:o.style)&&void 0!==a?a:void 0;return n.jsxs(b.Provider,e.__assign({value:{rowId:u}},{children:[n.jsx("tr",e.__assign({style:f?{cssText:f}:void 0},{children:r})),g&&(null==v?void 0:v.aiReason)&&n.jsx("tr",e.__assign({style:{width:"100%"}},{children:n.jsx("td",e.__assign({colSpan:h||1,className:l.default.tableExpandedCell},{children:n.jsx("div",e.__assign({className:l.default.tableExpandedCellInner},{children:n.jsx("div",e.__assign({className:l.default.tableExpandedCellContent},{children:n.jsx(_.default,{aiReason:v.aiReason,customIcons:c,customStyles:{aiReasoningContent:null==s?void 0:s.aiReasoningContent,aiReasoningAccordion:null==s?void 0:s.aiReasoningAccordion,aiReasoningMarkdown:null==s?void 0:s.aiReasoningMarkdown,aiReasoningPill:null==s?void 0:s.aiReasoningPill,webCitation:null==s?void 0:s.webCitation,stormeeCitation:null==s?void 0:s.stormeeCitation,waveformCitation:null==s?void 0:s.waveformCitation,imageCitation:null==s?void 0:s.imageCitation,fileCitation:null==s?void 0:s.fileCitation,appModCitation:null==s?void 0:s.appModCitation,rcaCitation:null==s?void 0:s.rcaCitation,readFileCitation:null==s?void 0:s.readFileCitation,loadingCitations:null==s?void 0:s.loadingCitations,chatCitation:null==s?void 0:s.chatCitation}})}))}))}))}))]}))};exports.default=function(t){var o,g=t.message,h=t.isParent,_=t.scenario,j=t.showUserStoryDiff,b=void 0!==j&&j,A=t.aiReasoningsForBlock,k=t.isCitationLoadingDisplay,E=void 0!==k&&k,M=t.className;t.highConfidenceIcon,t.lowConfidenceIcon;var T=t.customStyles,U=t.customIcons,L=t.aiReasoningDiffView,P=t.userStoryCitations,D=t.artifactId,F=t.isCraflow,H=t.onCraAccept,$=t.onCraReject,O=t.craFlowConfig,W=t.isDisplayHighlightControl,B=void 0!==W&&W;t.segmentExampleComponent;var G=t.handleFetchSegmentDetails,z=t.handleViewGlossary,V=t.getSegmentExampleComponent,Q=t.segmentDataList,J=i.useRef(null),K=v.useRequirementAI(),X=K.userStory,Y=K.inlineUpdateComponentConfig,Z=K.getAvgScoreForStory,ee=K.setUserStory,ne=K.aiReasoning,ie=K.setAiReasoning,te=K.customIcons,oe=K.searchQueryList,le=K.searchQueryReasoningIdList,ae=K.currentHighlightIndex,re=null!=U?U:null==te?void 0:te.userStoryIcons;null==T||T.searchHighlight;var de=a.useMarkdownSearch(J),se=de.search,ce=de.clear,ue=i.useState("1"),ve=ue[0],ge=ue[1],he=i.useState(null),fe=he[0],me=he[1],pe=i.useRef(new Map),Ce=i.useCallback(function(e,n){me(e&&n?{rowId:e,aiReason:n}:null)},[]),_e=D?Z(D):0,xe=i.useState([]),ye=xe[0],je=xe[1],Se=function(e){var n=e;return n=function(e){for(var n,i=/<updated[^>]*>[\s\S]*?<\/updated>/gi,t=[],o=new RegExp(i.source,i.flags);null!==(n=o.exec(e));){var l=n[0],a=l.match(/<deleted>([\s\S]*?)<\/deleted>/i),r=l.match(/<changed>([\s\S]*?)<\/changed>/i),d=function(e){return(e.match(/^\s*\d+\.\s/gm)||[]).length};t.push({index:n.index,endIndex:n.index+n[0].length,deletedItemCount:d((null==a?void 0:a[1])||""),changedItemCount:d((null==r?void 0:r[1])||"")})}if(0===t.length)return e;for(var s=e,c=function(e){var n=t[e],i=n.changedItemCount-n.deletedItemCount;if(0===i)return"continue";for(var o=!1,l=0,a=s.substring(0,n.index).split("\n").reverse();l<a.length;l++){var r=a[l].trim();if(""!==r){/^\d+\.\s/.test(r)&&(o=!0);break}}if(!o)return"continue";var d=n.endIndex,c=e+1<t.length?t[e+1].index:s.length,u=s.substring(d,c);u=u.replace(/^(\s*)(\d+)\.\s/gm,function(e,n,t){return"".concat(n).concat(parseInt(t,10)+i,". ")}),s=s.substring(0,d)+u+s.substring(c)},u=t.length-1;u>=0;u--)c(u);return s}(n=(n=(n=(n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/ai_reasoning\$(\d+)/g,function(e,n){return"ai_reasoning$".concat(n,"-legacy")});return"<deleted>".concat(i,"</deleted>")})).replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,function(e,n,i){var t=btoa(encodeURIComponent(i.trim()));return"\n\n<generatedCode".concat(n,' data-raw="').concat(t,'"></generatedCode>\n\n')})).replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2")).replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,function(e,i,t,o){var l=n.substring(0,o),a=l.lastIndexOf("\n"),r=/^\s+[-*]\s/.test(l.substring(a+1))||/^\s+\d+\.\s/.test(l.substring(a+1)),d=/^\s*(\d+\.|\s*[-*])\s+$/.test(l.substring(a+1));if(r||d){var s=t;return s=(s=(s=(s=s.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),"<updated".concat(i,">").concat(s,"</updated>")}return e})),n=function(e){var n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),"<deleted>".concat(i,"</deleted>")});return n.replace(/<changed>([\s\S]*?)<\/changed>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),"<changed>".concat(i,"</changed>")})}(n),n},Re=i.useMemo(function(){return g?Se(g):g},[g]);i.useEffect(function(){je(A||ne)},[A,ne]);var Ie=i.useMemo(function(){return{upt:function(i){var t;i.node;var o=i.children,l=e.__rest(i,["node","children"]),a=null==l?void 0:l.id,r=a?null===(t=a.split("$"))||void 0===t?void 0:t[1]:null,d=ne.find(function(e){return e.id.toString()===r});return d?n.jsx(x.default,e.__assign({aiReason:d,customStyles:null==T?void 0:T.inlineUpdatedComponent,handleClickCognitiveDecision:null==Y?void 0:Y.handleClickCognitiveDecision,handleClickUpdatedPill:null==Y?void 0:Y.handleClickUpdatedPill},{children:o})):o},del:function(i){var t;i.node;var o=i.children,a=e.__rest(i,["node","children"]);return n.jsx("span",e.__assign({className:l.default.deleted,style:null==T?void 0:T.deleted},a,{onClick:null===(t=a.onclick)||void 0===t?void 0:t.call(a)},{children:o}))},ins:function(i){var t,o=i.children,a=e.__rest(i,["children"]);return n.jsx("span",e.__assign({className:l.default.inserted,style:null==T?void 0:T.inserted},a,{onClick:null===(t=a.onclick)||void 0===t?void 0:t.call(a)},{children:o}))},h1:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h1",e.__assign({className:l.default.heading1,style:null==T?void 0:T.heading1},{children:t.children}))},h2:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h2",e.__assign({className:l.default.heading2,style:null==T?void 0:T.heading2},{children:t.children}))},h3:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h3",e.__assign({className:l.default.heading3,style:null==T?void 0:T.heading3},{children:t.children}))},b:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("b",e.__assign({className:l.default.bold,style:null==T?void 0:T.bold},{children:null==t?void 0:t.children}))},p:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("p",e.__assign({},t,{className:l.default.paragraph,style:null==T?void 0:T.paragraph},{children:t.children}))},updated:function(i){var t=i.node,o=e.__rest(i,["node"]);return n.jsx(s.default,e.__assign({},o,{showUserStoryDiff:b,currentUpdatedTagId:ve,setCurrentUpdatedTagId:ge,userStory:X,setUserStory:ee,setAiReasoning:ie,node:t,isCraflow:F,onCraAccept:H,onCraReject:$,customStyles:null==T?void 0:T.updatedContent,craFlowConfig:O}))},ol:function(i){var t,o,a,r=i.node,d=e.__rest(i,["node"]),s=null!==(a=null!==(o=null===(t=null==r?void 0:r.properties)||void 0===t?void 0:t.start)&&void 0!==o?o:null==d?void 0:d.start)&&void 0!==a?a:void 0;return n.jsx("ol",e.__assign({className:l.default.orderedList,style:null==T?void 0:T.olist},s?{start:Number(s)}:{},{children:null==d?void 0:d.children}))},ul:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("ul",e.__assign({className:l.default.unorderedList,style:null==T?void 0:T.ulist},{children:null==t?void 0:t.children}))},table:function(i){var t=i.children;return n.jsx("div",e.__assign({className:l.default.tableWrapper},{children:n.jsx("table",e.__assign({className:l.default.table,style:null==T?void 0:T.table},{children:t}))}))},tr:function(e){var i=e.node,t=e.children;return n.jsx(q,{node:i,children:t,customStyles:T})},td:function(i){var t,o=i.node,l=i.children,a=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},r=a.style,d=e.__rest(a,["style"]);return n.jsx(I.Provider,e.__assign({value:!0},{children:n.jsx("td",e.__assign({},d,{style:r?{cssText:r}:void 0},{children:l}))}))},th:function(i){var t,o=i.node,l=i.children,a=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},r=a.style,d=e.__rest(a,["style"]);return n.jsx(I.Provider,e.__assign({value:!0},{children:n.jsx("th",e.__assign({},d,{style:r?{cssText:r}:void 0},{children:l}))}))},recommendation:function(i){var t;i.node;var o=e.__rest(i,["node"]),l="The AI has selected this content based on: ".concat((null===(t=null==o?void 0:o.children)||void 0===t?void 0:t[0])||"");return n.jsx(p.default,e.__assign({},o,{customStyles:null==T?void 0:T.recommendationBlock,label:l}))},a:function(t){var o,l,a;t.inline,t.children,t.node;var r=e.__rest(t,["inline","children","node"]),d=i.useContext(I)||"true"==(null==r?void 0:r.table),s="".concat(null==r?void 0:r.href),c=null===(o=s.split("$"))||void 0===o?void 0:o[0],u=null===(l=s.split("$"))||void 0===l?void 0:l[1];if("ai_reasoning"===c){var v=(null!==(a=b?L:ne)&&void 0!==a?a:[]).find(function(e){return e.id.toString()===decodeURIComponent(u)}),g=le.includes(u);if(v)return d?n.jsx(N,{aiReason:v,customStyle:null==T?void 0:T.tableAiReasoning,customIcons:re,isHighConfidence:v.relevance_score>=f.SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING}):n.jsx(f.default,{aiReason:v,isSourceHasHighlight:g,customIcons:re,customStyles:{aiReasoningContent:null==T?void 0:T.aiReasoningContent,aiReasoningAccordion:null==T?void 0:T.aiReasoningAccordion,aiReasoningMarkdown:null==T?void 0:T.aiReasoningMarkdown,aiReasoningPill:null==T?void 0:T.aiReasoningPill,webCitation:null==T?void 0:T.webCitation,stormeeCitation:null==T?void 0:T.stormeeCitation,waveformCitation:null==T?void 0:T.waveformCitation,imageCitation:null==T?void 0:T.imageCitation,fileCitation:null==T?void 0:T.fileCitation,appModCitation:null==T?void 0:T.appModCitation,rcaCitation:null==T?void 0:T.rcaCitation,readFileCitation:null==T?void 0:T.readFileCitation,loadingCitations:null==T?void 0:T.loadingCitations,chatCitation:null==T?void 0:T.chatCitation,bigEnoughCitation:null==T?void 0:T.bigEnoughCitation}})}return null},code:function(i){i.inline;var t=i.children,o=i.className;return i.node,e.__rest(i,["inline","children","className","node"]),/language-(\w+)/.exec(o||"")||(null==o?void 0:o.includes("language-"))?n.jsx("div",{children:n.jsx("code",e.__assign({className:l.default.blockCode,style:null==T?void 0:T.code},{children:t}))}):n.jsx("code",e.__assign({className:l.default.inlineCode,style:null==T?void 0:T.code},{children:t}))},learned:function(i){var t=i.children;return n.jsx(d.Tooltip,e.__assign({title:t,placement:"top"},{children:n.jsx(r.Info,{size:16,className:l.default.learned})}))},generatedcode:function(i){i.node;var t=e.__rest(i,["node"]),o=(null==t?void 0:t.language)||"python",l=function(e){var n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{var i=function(e){var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n}(t);return n.jsx(c.default,{title:"Generated Code",code:l,language:o,customStyles:{pill:null==T?void 0:T.generatedCodePill,content:null==T?void 0:T.generatedCodeContent}})},segment:function(i){var t,o,l,a,r,d,s,c,u,v,g;i.node;var h=i.children,f=e.__rest(i,["node","children"]),m=(null==f?void 0:f.id)||"Segment",p=(null==f?void 0:f.decisionstrength)||"80",C=null==Q?void 0:Q.find(function(e){return String(e.segment_id)===String(m)}),_={id:m,reason:null!==(t=null==C?void 0:C.reason)&&void 0!==t?t:"",gap:null!==(o=null==C?void 0:C.gap)&&void 0!==o?o:"",explanation:null!==(l=null==C?void 0:C.explanation)&&void 0!==l?l:"",relevance_score:null!==(a=null==C?void 0:C.relevance_score)&&void 0!==a?a:0,isOpen:!1},x=void 0;return G&&!C&&G(m),m&&C&&V&&(x=V(m,"".concat(h),C.segment_type)),n.jsx(y.default,{id:m,label:null==C?void 0:C.segment_name,originalValue:h,decisionStrength:p,aiReason:_,customIcons:U,aiReasoningCitationCustomStyles:T,segmentExampleComponent:x,handleViewGlossary:z,customStyles:{segmentWrapper:null===(r=null==T?void 0:T.segment)||void 0===r?void 0:r.segmentWrapper,container:null===(d=null==T?void 0:T.segment)||void 0===d?void 0:d.container,label:null===(s=null==T?void 0:T.segment)||void 0===s?void 0:s.label,decisionStrength:null===(c=null==T?void 0:T.segment)||void 0===c?void 0:c.decisionStrength,buttonContainer:null===(u=null==T?void 0:T.segment)||void 0===u?void 0:u.buttonContainer,cheveronIcon:null===(v=null==T?void 0:T.segment)||void 0===v?void 0:v.cheveronIcon,segmentExample:null===(g=null==T?void 0:T.segment)||void 0===g?void 0:g.segmentExample}})}}},[ye,O,ne,P,ve,b,g,U,oe,le,T]);return i.useEffect(function(){if(J.current){if(oe.length){var e;if(0===le.length||B)requestAnimationFrame(function(){se([oe[ae].replace(/\*/g,"")])});else{var n=J.current,i=new MutationObserver(function(){clearTimeout(e),e=setTimeout(function(){i.disconnect(),requestAnimationFrame(function(){se([oe[ae].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return function(){clearTimeout(e)}}ce()}},[oe,le,ae,B]),n.jsx(w.Provider,e.__assign({value:{expandedInfo:fe,setExpanded:Ce,reasonToRow:pe}},{children:n.jsxs("div",e.__assign({ref:J,className:"".concat(l.default.container," ").concat("approving"!==_?l.default.wrapper:""," ").concat(M||""),style:null==T?void 0:T.container},{children:[n.jsx(S.default,e.__assign({components:Ie,rehypePlugins:[R.default]},{children:Re})),_e>0&&n.jsx("div",e.__assign({className:l.default.confidenceScoreContainer,style:null==T?void 0:T.confidenceScoreContainer},{children:n.jsxs("span",e.__assign({className:l.default.confidenceScore,style:null==T?void 0:T.confidenceScore},{children:[n.jsx(m.default,{size:14,color:(null==T?void 0:T.confidenceScoreIconColor)||"#166534"}),_e,"%"]}))})),E&&n.jsx("div",e.__assign({className:l.default.citationLoader,style:null==T?void 0:T.citationLoaderContainer},{children:n.jsx(u.default,{customStyles:{container:null==T?void 0:T.citationLoadingContainer,icon:null==T?void 0:T.citationLoadingIcon,text:null==T?void 0:T.citationLoadingText}})})),h&&n.jsx("div",e.__assign({style:e.__assign({},null===(o=null==T?void 0:T.attachedContext)||void 0===o?void 0:o.wrapper),className:"flex mt-5"},{children:n.jsx(C.default,{})}))]}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),t=require("react-markdown"),o=require("rehype-raw"),a=require("./UserStoryWithCitation.module.css.js"),l=require("../../shared/useMarkdownSearch.js"),r=require("lucide-react"),d=require("@mui/material"),s=require("dompurify"),c=require("../../shared/UpdatedAnimationContent.js"),u=require("../../shared/GeneratedCodeCitation.js"),g=require("../../shared/CitationLoadingIndicator.js"),v=require("../RequirementAIWrapper/RequirementAIWrapper.js"),f=require("../../icons/CognitiveDecision.js"),h=require("../../icons/BrainRed.js"),m=require("../ai-reasoning/AiReasoningCitation.js"),p=require("../../icons/RelevanceScoreIcon.js"),C=require("../RecommendationBlock/RecommendationBlock.js"),_=require("../UserStoryCard/AttachedContext.js"),x=require("../ai-reasoning/AiReasoningCitationContent.js"),y=require("./components/InlineUpdatedComponent.js"),j=require("../segment/Segment.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=S(i),I=S(t),b=S(o),w=S(s),N=i.createContext(!1),q=i.createContext({expandedInfo:null,setExpanded:function(){},reasonToRow:{current:new Map}}),A=i.createContext({rowId:""}),k=function(t){var o,l=t.aiReason,r=t.isHighConfidence,d=t.customStyle,s=t.customIcons,c=i.useContext(q),u=c.expandedInfo,g=c.setExpanded,v=c.reasonToRow,m=i.useContext(A).rowId,p=String(l.id);m&&v.current.set(p,m);var C=(null===(o=null==u?void 0:u.aiReason)||void 0===o?void 0:o.id)===l.id,_=r?(null==s?void 0:s.highConfidence)||n.jsx(f.default,{}):(null==s?void 0:s.lowConfidence)||n.jsx(h.default,{});return n.jsxs("button",e.__assign({className:a.default.aiReasoningButton,style:d,onClick:function(e){e.stopPropagation(),e.preventDefault(),g(C?null:m,C?null:l)}},{children:[_,C?n.jsx("i",{className:"pi pi-angle-up ".concat(r?a.default.aiReasoningIconHighConfidence:a.default.aiReasoningIconLowConfidence)}):n.jsx("i",{className:"pi pi-angle-down ".concat(r?a.default.aiReasoningIconHighConfidence:a.default.aiReasoningIconLowConfidence)})]}))},E=function(t){var o,l,r=t.children,d=t.node,s=t.customStyles,c=t.customIcons,u=i.useRef(Math.random().toString(36).slice(2)).current,g=i.useContext(q).expandedInfo,v=(null==g?void 0:g.rowId)===u,f=Array.isArray(null==d?void 0:d.children)?d.children.filter(function(e){return"element"===e.type}).length:1,h=null!==(l=null===(o=null==d?void 0:d.properties)||void 0===o?void 0:o.style)&&void 0!==l?l:void 0;return n.jsxs(A.Provider,e.__assign({value:{rowId:u}},{children:[n.jsx("tr",e.__assign({style:h?{cssText:h}:void 0},{children:r})),v&&(null==g?void 0:g.aiReason)&&n.jsx("tr",e.__assign({style:{width:"100%"}},{children:n.jsx("td",e.__assign({colSpan:f||1,className:a.default.tableExpandedCell},{children:n.jsx("div",e.__assign({className:a.default.tableExpandedCellInner},{children:n.jsx("div",e.__assign({className:a.default.tableExpandedCellContent},{children:n.jsx(x.default,{aiReason:g.aiReason,customIcons:c,customStyles:{aiReasoningContent:null==s?void 0:s.aiReasoningContent,aiReasoningAccordion:null==s?void 0:s.aiReasoningAccordion,aiReasoningMarkdown:null==s?void 0:s.aiReasoningMarkdown,aiReasoningPill:null==s?void 0:s.aiReasoningPill,webCitation:null==s?void 0:s.webCitation,stormeeCitation:null==s?void 0:s.stormeeCitation,waveformCitation:null==s?void 0:s.waveformCitation,imageCitation:null==s?void 0:s.imageCitation,fileCitation:null==s?void 0:s.fileCitation,appModCitation:null==s?void 0:s.appModCitation,rcaCitation:null==s?void 0:s.rcaCitation,readFileCitation:null==s?void 0:s.readFileCitation,loadingCitations:null==s?void 0:s.loadingCitations,chatCitation:null==s?void 0:s.chatCitation}})}))}))}))}))]}))};exports.default=function(t){var o,s=t.message,f=t.isParent,h=t.scenario,x=t.showUserStoryDiff,S=void 0!==x&&x,A=t.aiReasoningsForBlock,U=t.isCitationLoadingDisplay,M=void 0!==U&&U,T=t.className;t.highConfidenceIcon,t.lowConfidenceIcon;var L=t.customStyles,P=t.customIcons,D=t.aiReasoningDiffView,F=t.userStoryCitations,H=t.artifactId,$=t.isCraflow,O=t.onCraAccept,W=t.onCraReject,B=t.craFlowConfig,z=t.isDisplayHighlightControl,G=void 0!==z&&z,V=t.segmentComponentConfig,Q=i.useRef(null),J=v.useRequirementAI(),K=J.userStory,X=J.inlineUpdateComponentConfig,Y=J.getAvgScoreForStory,Z=J.setUserStory,ee=J.aiReasoning,ne=J.setAiReasoning,ie=J.customIcons,te=J.searchQueryList,oe=J.searchQueryReasoningIdList,ae=J.currentHighlightIndex,le=null!=P?P:null==ie?void 0:ie.userStoryIcons;null==L||L.searchHighlight;var re=l.useMarkdownSearch(Q),de=re.search,se=re.clear,ce=i.useState("1"),ue=ce[0],ge=ce[1],ve=i.useState(null),fe=ve[0],he=ve[1],me=i.useRef(new Map),pe=i.useCallback(function(e,n){he(e&&n?{rowId:e,aiReason:n}:null)},[]),Ce=H?Y(H):0,_e=i.useState([]),xe=_e[0],ye=_e[1],je=function(e){return null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(je).join(""):R.default.isValidElement(e)?je(e.props.children):""},Se=function(e){var n=e;return n=function(e){for(var n,i=/<updated[^>]*>[\s\S]*?<\/updated>/gi,t=[],o=new RegExp(i.source,i.flags);null!==(n=o.exec(e));){var a=n[0],l=a.match(/<deleted>([\s\S]*?)<\/deleted>/i),r=a.match(/<changed>([\s\S]*?)<\/changed>/i),d=function(e){return(e.match(/^\s*\d+\.\s/gm)||[]).length};t.push({index:n.index,endIndex:n.index+n[0].length,deletedItemCount:d((null==l?void 0:l[1])||""),changedItemCount:d((null==r?void 0:r[1])||"")})}if(0===t.length)return e;for(var s=e,c=function(e){var n=t[e],i=n.changedItemCount-n.deletedItemCount;if(0===i)return"continue";for(var o=!1,a=0,l=s.substring(0,n.index).split("\n").reverse();a<l.length;a++){var r=l[a].trim();if(""!==r){/^\d+\.\s/.test(r)&&(o=!0);break}}if(!o)return"continue";var d=n.endIndex,c=e+1<t.length?t[e+1].index:s.length,u=s.substring(d,c);u=u.replace(/^(\s*)(\d+)\.\s/gm,function(e,n,t){return"".concat(n).concat(parseInt(t,10)+i,". ")}),s=s.substring(0,d)+u+s.substring(c)},u=t.length-1;u>=0;u--)c(u);return s}(n=(n=(n=(n=(n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/ai_reasoning\$(\d+)/g,function(e,n){return"ai_reasoning$".concat(n,"-legacy")});return"<deleted>".concat(i,"</deleted>")})).replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,function(e,n,i){var t=btoa(encodeURIComponent(i.trim()));return"\n\n<generatedCode".concat(n,' data-raw="').concat(t,'"></generatedCode>\n\n')})).replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2")).replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,function(e,n,i,t,o){var a=t.match(/<table[\s\S]*?<\/table>/i);if(a){var l=btoa(encodeURIComponent(a[0]));return"<segment".concat(i,' data-table="').concat(l,'"></segment>')}return e})).replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,function(e,i,t,o){var a=n.substring(0,o),l=a.lastIndexOf("\n"),r=/^\s+[-*]\s/.test(a.substring(l+1))||/^\s+\d+\.\s/.test(a.substring(l+1)),d=/^\s*(\d+\.|\s*[-*])\s+$/.test(a.substring(l+1));if(r||d){var s=t;return s=(s=(s=(s=s.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n")).replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n")).replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),"<updated".concat(i,">").concat(s,"</updated>")}return e})),n=function(e){var n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),"<deleted>".concat(i,"</deleted>")});return n.replace(/<changed>([\s\S]*?)<\/changed>/gi,function(e,n){var i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),"<changed>".concat(i,"</changed>")})}(n),n},Re=i.useMemo(function(){return s?Se(s):s},[s]);i.useEffect(function(){ye(A||ee)},[A,ee]);var Ie=i.useMemo(function(){return{upt:function(i){var t;i.node;var o=i.children,a=e.__rest(i,["node","children"]),l=null==a?void 0:a.id,r=l?null===(t=l.split("$"))||void 0===t?void 0:t[1]:null,d=ee.find(function(e){return e.id.toString()===r});return d?n.jsx(y.default,e.__assign({aiReason:d,customStyles:null==L?void 0:L.inlineUpdatedComponent,handleClickCognitiveDecision:null==X?void 0:X.handleClickCognitiveDecision,handleClickUpdatedPill:null==X?void 0:X.handleClickUpdatedPill},{children:o})):o},del:function(i){i.node;var t=i.children,o=e.__rest(i,["node","children"]);return n.jsx("span",e.__assign({className:a.default.deleted,style:null==L?void 0:L.deleted},o,{onClick:o.onclick},{children:t}))},ins:function(i){var t=i.children,o=e.__rest(i,["children"]);return n.jsx("span",e.__assign({className:a.default.inserted,style:null==L?void 0:L.inserted},o,{onClick:o.onclick},{children:t}))},h1:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h1",e.__assign({className:a.default.heading1,style:null==L?void 0:L.heading1},{children:t.children}))},h2:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h2",e.__assign({className:a.default.heading2,style:null==L?void 0:L.heading2},{children:t.children}))},h3:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("h3",e.__assign({className:a.default.heading3,style:null==L?void 0:L.heading3},{children:t.children}))},b:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("b",e.__assign({className:a.default.bold,style:null==L?void 0:L.bold},{children:null==t?void 0:t.children}))},p:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("p",e.__assign({},t,{className:a.default.paragraph,style:null==L?void 0:L.paragraph},{children:t.children}))},updated:function(i){var t=i.node,o=e.__rest(i,["node"]);return n.jsx(c.default,e.__assign({},o,{showUserStoryDiff:S,currentUpdatedTagId:ue,setCurrentUpdatedTagId:ge,userStory:K,setUserStory:Z,setAiReasoning:ne,node:t,isCraflow:$,onCraAccept:O,onCraReject:W,customStyles:null==L?void 0:L.updatedContent,craFlowConfig:B}))},ol:function(i){var t,o,l,r=i.node,d=e.__rest(i,["node"]),s=null!==(l=null!==(o=null===(t=null==r?void 0:r.properties)||void 0===t?void 0:t.start)&&void 0!==o?o:null==d?void 0:d.start)&&void 0!==l?l:void 0;return n.jsx("ol",e.__assign({className:a.default.orderedList,style:null==L?void 0:L.olist},s?{start:Number(s)}:{},{children:null==d?void 0:d.children}))},ul:function(i){i.node;var t=e.__rest(i,["node"]);return n.jsx("ul",e.__assign({className:a.default.unorderedList,style:null==L?void 0:L.ulist},{children:null==t?void 0:t.children}))},table:function(i){var t=i.children;return n.jsx("div",e.__assign({className:a.default.tableWrapper},{children:n.jsx("table",e.__assign({className:a.default.table,style:null==L?void 0:L.table},{children:t}))}))},tr:function(e){var i=e.node,t=e.children;return n.jsx(E,{node:i,children:t,customStyles:L})},td:function(i){var t,o=i.node,a=i.children,l=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},r=l.style,d=e.__rest(l,["style"]);return n.jsx(N.Provider,e.__assign({value:!0},{children:n.jsx("td",e.__assign({},d,{style:r?{cssText:r}:void 0},{children:a}))}))},th:function(i){var t,o=i.node,a=i.children,l=null!==(t=null==o?void 0:o.properties)&&void 0!==t?t:{},r=l.style,d=e.__rest(l,["style"]);return n.jsx(N.Provider,e.__assign({value:!0},{children:n.jsx("th",e.__assign({},d,{style:r?{cssText:r}:void 0},{children:a}))}))},recommendation:function(i){var t;i.node;var o=e.__rest(i,["node"]),a="The AI has selected this content based on: ".concat((null===(t=null==o?void 0:o.children)||void 0===t?void 0:t[0])||"");return n.jsx(C.default,e.__assign({},o,{customStyles:null==L?void 0:L.recommendationBlock,label:a}))},a:function(t){var o,a,l;t.inline,t.children,t.node;var r=e.__rest(t,["inline","children","node"]),d=i.useContext(N)||"true"==(null==r?void 0:r.table),s="".concat(null==r?void 0:r.href),c=null===(o=s.split("$"))||void 0===o?void 0:o[0],u=null===(a=s.split("$"))||void 0===a?void 0:a[1];if("ai_reasoning"===c){var g=(null!==(l=S?D:ee)&&void 0!==l?l:[]).find(function(e){return e.id.toString()===decodeURIComponent(u)}),v=oe.includes(u);if(g)return d?n.jsx(k,{aiReason:g,customStyle:null==L?void 0:L.tableAiReasoning,customIcons:le,isHighConfidence:g.relevance_score>=m.SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING}):n.jsx(m.default,{aiReason:g,isSourceHasHighlight:v,customIcons:le,customStyles:{aiReasoningContent:null==L?void 0:L.aiReasoningContent,aiReasoningAccordion:null==L?void 0:L.aiReasoningAccordion,aiReasoningMarkdown:null==L?void 0:L.aiReasoningMarkdown,aiReasoningPill:null==L?void 0:L.aiReasoningPill,webCitation:null==L?void 0:L.webCitation,stormeeCitation:null==L?void 0:L.stormeeCitation,waveformCitation:null==L?void 0:L.waveformCitation,imageCitation:null==L?void 0:L.imageCitation,fileCitation:null==L?void 0:L.fileCitation,appModCitation:null==L?void 0:L.appModCitation,rcaCitation:null==L?void 0:L.rcaCitation,readFileCitation:null==L?void 0:L.readFileCitation,loadingCitations:null==L?void 0:L.loadingCitations,chatCitation:null==L?void 0:L.chatCitation,bigEnoughCitation:null==L?void 0:L.bigEnoughCitation}})}return null},code:function(i){i.inline;var t=i.children,o=i.className;return i.node,e.__rest(i,["inline","children","className","node"]),/language-(\w+)/.exec(o||"")||(null==o?void 0:o.includes("language-"))?n.jsx("div",{children:n.jsx("code",e.__assign({className:a.default.blockCode,style:null==L?void 0:L.code},{children:t}))}):n.jsx("code",e.__assign({className:a.default.inlineCode,style:null==L?void 0:L.code},{children:t}))},learned:function(i){var t=i.children;return n.jsx(d.Tooltip,e.__assign({title:t,placement:"top"},{children:n.jsx(r.Info,{size:16,className:a.default.learned})}))},generatedcode:function(i){i.node;var t=e.__rest(i,["node"]),o=(null==t?void 0:t.language)||"python",a=function(e){var n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{var i=function(e){var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n}(t);return n.jsx(u.default,{title:"Generated Code",code:a,language:o,customStyles:{pill:null==L?void 0:L.generatedCodePill,content:null==L?void 0:L.generatedCodeContent}})},segment:function(i){var t,o,a,l,r,d,s,c,u,g,v;i.node;var f=i.children,h=e.__rest(i,["node","children"]),m=(null==h?void 0:h.id)||"Segment",p=(null==h?void 0:h.decisionstrength)||"80",C=V||{},_=C.segmentDataList,x=C.handleFetchSegmentDetails,y=C.getSegmentExampleComponent,S=C.handleViewGlossary,R=null==_?void 0:_.find(function(e){return String(e.segment_id)===String(m)}),I={id:m,reason:null!==(t=null==R?void 0:R.reason)&&void 0!==t?t:"",gap:null!==(o=null==R?void 0:R.gap)&&void 0!==o?o:"",explanation:null!==(a=null==R?void 0:R.explanation)&&void 0!==a?a:"",relevance_score:null!==(l=null==R?void 0:R.relevance_score)&&void 0!==l?l:0,isOpen:!1},b=void 0;x&&!R&&x(m);var N=je(f),q=h["data-table"],A="";if(q)try{A=decodeURIComponent(atob(q))}catch(e){console.error("Failed to decode data-table for segment",m,e)}var k=w.default.sanitize(A);return m&&R&&y&&(b=q?n.jsx(function(){return n.jsx("div",{dangerouslySetInnerHTML:{__html:k}})},{}):y(m,N,R.segment_type)),n.jsx(j.default,{id:m,label:null==R?void 0:R.segment_name,originalValue:f,decisionStrength:p,aiReason:I,customIcons:P,aiReasoningCitationCustomStyles:L,segmentExampleComponent:b,handleViewGlossary:S,customStyles:{segmentWrapper:null===(r=null==L?void 0:L.segment)||void 0===r?void 0:r.segmentWrapper,container:null===(d=null==L?void 0:L.segment)||void 0===d?void 0:d.container,label:null===(s=null==L?void 0:L.segment)||void 0===s?void 0:s.label,decisionStrength:null===(c=null==L?void 0:L.segment)||void 0===c?void 0:c.decisionStrength,buttonContainer:null===(u=null==L?void 0:L.segment)||void 0===u?void 0:u.buttonContainer,cheveronIcon:null===(g=null==L?void 0:L.segment)||void 0===g?void 0:g.cheveronIcon,segmentExample:null===(v=null==L?void 0:L.segment)||void 0===v?void 0:v.segmentExample}})}}},[xe,B,ee,F,ue,S,s,P,te,oe,L]);return i.useEffect(function(){if(Q.current){if(te.length){var e;if(0===oe.length||G)requestAnimationFrame(function(){de([te[ae].replace(/\*/g,"")])});else{var n=Q.current,i=new MutationObserver(function(){clearTimeout(e),e=setTimeout(function(){i.disconnect(),requestAnimationFrame(function(){de([te[ae].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return function(){clearTimeout(e)}}se()}},[te,oe,ae,G]),n.jsx(q.Provider,e.__assign({value:{expandedInfo:fe,setExpanded:pe,reasonToRow:me}},{children:n.jsxs("div",e.__assign({ref:Q,className:"".concat(a.default.container," ").concat("approving"!==h?a.default.wrapper:""," ").concat(T||""),style:null==L?void 0:L.container},{children:[n.jsx(I.default,e.__assign({components:Ie,rehypePlugins:[b.default]},{children:Re})),Ce>0&&n.jsx("div",e.__assign({className:a.default.confidenceScoreContainer,style:null==L?void 0:L.confidenceScoreContainer},{children:n.jsxs("span",e.__assign({className:a.default.confidenceScore,style:null==L?void 0:L.confidenceScore},{children:[n.jsx(p.default,{size:14,color:(null==L?void 0:L.confidenceScoreIconColor)||"#166534"}),Ce,"%"]}))})),M&&n.jsx("div",e.__assign({className:a.default.citationLoader,style:null==L?void 0:L.citationLoaderContainer},{children:n.jsx(g.default,{customStyles:{container:null==L?void 0:L.citationLoadingContainer,icon:null==L?void 0:L.citationLoadingIcon,text:null==L?void 0:L.citationLoadingText}})})),f&&n.jsx("div",e.__assign({style:e.__assign({},null===(o=null==L?void 0:L.attachedContext)||void 0===o?void 0:o.wrapper),className:"flex mt-5"},{children:n.jsx(_.default,{})}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=UserStoryWithCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),l=require("@mui/material"),o=require("../../../utils/css.utils.js"),n=require("./InlineUpdatedComponent.module.css.js"),t=require("../../../icons/CognitiveDecision.js"),r=require("lucide-react"),d=require("react");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(d);exports.default=function(a){var u,c,v,p,_,f,m,x,h,g,j,y,C,b,k=a.aiReason,q=a.children,D=a.customStyles,N=a.handleClickCognitiveDecision,S=a.handleClickUpdatedPill,T=d.useRef(),O=d.useRef(function(){null==S||S(T.current,k)}),P=d.useMemo(function(){var i=function(l,o){return s.default.Children.map(l,function(l){var n;if(!s.default.isValidElement(l))return l;var t=(null===(n=l.props)||void 0===n?void 0:n.children)?i(l.props.children,o):l.props.children,r=s.default.cloneElement(l,e.__assign(e.__assign({},l.props),{children:t}));return o(r)})};return i(q,function(e){return s.default.cloneElement(e,{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),l=require("@mui/material"),o=require("../../../utils/css.utils.js"),n=require("./InlineUpdatedComponent.module.css.js"),t=require("../../../icons/CognitiveDecision.js"),r=require("lucide-react"),d=require("react");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(d);exports.default=function(a){var u,c,v,p,_,f,m,x,h,g,j,y,C,b,k=a.aiReason,q=a.children,D=a.customStyles,N=a.handleClickCognitiveDecision,S=a.handleClickUpdatedPill,T=d.useRef(),O=d.useRef(function(){null==S||S(T.current,k)}),P=d.useMemo(function(){var i=function(l,o){return s.default.Children.map(l,function(l){var n;if(!s.default.isValidElement(l))return l;var t=(null===(n=l.props)||void 0===n?void 0:n.children)?i(l.props.children,o):l.props.children,r=s.default.cloneElement(l,e.__assign(e.__assign({},l.props),{children:t}));return o(r)})};return i(q,function(e){return s.default.cloneElement(e,{onclick:O.current})})},[q]),W=(null===(u=k.deviation_details)||void 0===u?void 0:u.resolved)?"#303030":null===(p=null===(v=null===(c=k.deviation_details)||void 0===c?void 0:c.evaluation_outputs)||void 0===v?void 0:v.metadata)||void 0===p?void 0:p.label_color,w={color:W||"#000000",background:o.hexToOpacity(W||"#000000",25),border:"1px solid ".concat(o.hexToOpacity(W||"#000000",75))},E=W||"#000000",I=o.hexToOpacity(W||"#000000",25),R={background:o.hexToOpacity(W||"#000000",75)},U=i.jsx(i.Fragment,{}),A=null===(_=k.deviation_details)||void 0===_?void 0:_.resolved;return"accepted"===A?U=i.jsx(r.Check,{color:"#16A34A"}):"rejected"===A?U=i.jsx(r.X,{color:"#DC2626"}):"reverted"===A&&(U=i.jsx(r.Undo2,{color:"#475569"})),i.jsxs(i.Fragment,{children:[i.jsx("div",e.__assign({className:n.default.resolvedStatus,style:null==D?void 0:D.resolvedIcon},{children:U})),i.jsx("div",e.__assign({ref:T,id:k.id.toString(),onClick:function(e){e.stopPropagation(),null==S||S(e.currentTarget,k)},className:n.default.pillWrapper,style:null==D?void 0:D.pillStyleWrapper},{children:i.jsxs("div",e.__assign({className:"".concat(n.default.pillComponent),style:e.__assign(e.__assign({},null===(f=null==D?void 0:D.pillComponent)||void 0===f?void 0:f.commonStyle),w)},{children:[i.jsx("span",{children:(null===(h=null===(x=null===(m=k.deviation_details)||void 0===m?void 0:m.evaluation_outputs)||void 0===x?void 0:x.metadata)||void 0===h?void 0:h.label_text)||""}),i.jsx(l.Divider,{className:n.default.dividerStyle,style:R}),i.jsx("span",{children:(null===(g=k.deviation_details)||void 0===g?void 0:g.resolved)?U:null===(y=null===(j=null==k?void 0:k.deviation_details)||void 0===j?void 0:j.evaluation_outputs)||void 0===y?void 0:y.output_value}),i.jsx(l.Divider,{className:n.default.dividerStyle,style:R}),i.jsx("span",e.__assign({onClick:function(e){e.stopPropagation(),null==N||N(e.currentTarget,k)},className:n.default.cognitiveDecisionWrapper,style:null===(C=null==D?void 0:D.cognitiveDecisionIcon)||void 0===C?void 0:C.wrapper},{children:i.jsx(t.default,{color:E,backgroundColor:I})})),i.jsx("span",e.__assign({className:n.default.chevronWrapper,style:null===(b=null==D?void 0:D.Chevron)||void 0===b?void 0:b.wrapper},{children:i.jsx(r.ChevronDown,{color:W})}))]}))})),P]})};
|
|
2
2
|
//# sourceMappingURL=InlineUpdatedComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("uuid"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("uuid"),r=function(e){if(!e)return[];return e.split(/(?=<h1>[A-Z]\.\s+.*?<\/h1>)/g).filter(Boolean).map(function(e){return e.trim()})};exports.cloneUserStories=function(e){return structuredClone(e)},exports.createUserStoriesForApproval=function(t){var n=function(t,o){var u=r(t.value).map(function(r){return{contentId:e.v4(),content:r,isApproved:!1}}),i={artifactId:t.artifactId,title:t.title,value:u,description:t.description,approval_status:o?void 0:"NOT_APPROVED",big_enough:null==t?void 0:t.big_enough,big_enough_decision_factors:null==t?void 0:t.big_enough_decision_factors,metadata:null==t?void 0:t.metadata,gapValue:null==t?void 0:t.gapValue,confidenceScore:null==t?void 0:t.confidenceScore,storyNumber:t.storyNumber,blockNumber:t.blockNumber};return t.sub_features&&t.sub_features.length>0&&(i.sub_features=t.sub_features.map(function(e){return n(e,!0)})),i};return t.map(function(e){return n(e,!1)})},exports.splitByHeaders=r,exports.transformApprovalToUserStory=function(e){var r=function(e){var t,n=Array.isArray(e.value)?e.value.map(function(e){return e.content}).join("\n\n"):e.value,o={artifactId:e.artifactId,title:e.title,description:e.description,value:n,big_enough:e.big_enough,big_enough_decision_factors:e.big_enough_decision_factors,metadata:null==e?void 0:e.metadata,gapValue:null==e?void 0:e.gapValue,confidenceScore:null==e?void 0:e.confidenceScore,storyNumber:e.storyNumber,blockNumber:e.blockNumber};return(null===(t=e.sub_features)||void 0===t?void 0:t.length)&&(o.sub_features=e.sub_features.map(r)),o};return e.map(r)};
|
|
2
2
|
//# sourceMappingURL=userstory-approval-transform.utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as n}from"tslib";import{jsx as t}from"react/jsx-runtime";import{createContext as e,useState as i,useMemo as r,useCallback as o,useContext as s}from"react";import{RefProvider as a}from"../../store/ref.context.js";var u=e(null),c=function(e){var s=e.children,c=e.userStory,g=e.setUserStory,f=e.aiReasoning,l=e.setAiReasoning,d=e.citations,h=e.setCitations,m=e.apiCachingConfig,C=e.customStyles,p=e.customIcons,v=e.searchQueryList,y=e.searchQueryReasoningIdList,I=e.citationConfig,R=e.chatHistory,S=e.chatCitationConfigs,A=e.gptCitationConfigs,x=e.aiReasoningAccordionOpenStates,b=e.persistedDataFiles,H=e.inlineUpdateComponentConfig,L=e.segmentComponentConfig,Q=i(0),U=Q[0],w=Q[1],F=r(function(){if(0===c.length||0===f.length)return Array(c.length).fill(0);var n=Array.from({length:c.length},function(){return[]});return f.forEach(function(t){var e=Number(t.relevance_score);if(!(isNaN(e)||e<=0)){var i="ai_reasoning$".concat(t.id),r=c.findIndex(function(n){var t;return n.value.includes(i)||(null===(t=n.sub_features)||void 0===t?void 0:t.some(function(n){return n.value.includes(i)}))});-1!==r&&n[r].push(e)}}),n.map(function(n){return 0===n.length?0:Math.round(n.reduce(function(n,t){return n+t},0)/n.length)})},[c,f]),N=o(function(n){var t,e=c.findIndex(function(t){return t.artifactId===n});return-1===e?0:null!==(t=F[e])&&void 0!==t?t:0},[c,F]);return t(u.Provider,n({value:{chatHistory:R,userStory:c,setUserStory:g,aiReasoning:f,setAiReasoning:l,citations:d,setCitations:h,apiCachingConfig:m,customStyles:C,customIcons:p,searchQueryList:v,searchQueryReasoningIdList:y,citationConfig:I,getAvgScoreForStory:N,chatCitationConfigs:S,gptCitationConfigs:A,aiReasoningAccordionOpenStates:x,persistedDataFiles:b,currentHighlightIndex:U,setCurrentHighlightIndex:w,inlineUpdateComponentConfig:H,segmentComponentConfig:L}},{children:t(a,{children:s})}))},g=function(){var n=s(u);if(!n)throw new Error("useRequirementAI must be used within RequirementAIWrapper");return n};export{c 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 r}from"tslib";import{jsxs as o,jsx as l,Fragment as i}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as u}from"react";import{ExternalLink as d,Download as c,Share2 as v,Copy as m,LoaderCircle as h,PencilIcon as y,ChevronUp as p,ChevronDown as f,ChevronUpIcon as S,ChevronDownIcon as g,Info as C,Bookmark as I}from"lucide-react";import w from"showdown";import{Menu as N,MenuItem as D,Tooltip as b}from"@mui/material";import{v4 as x}from"uuid";import U from"./UserStoryCard.module.css.js";import{formatMarkdown as B,indentMarkdown as E}from"../../utils/helpers.js";import{replaceTitleSection as k}from"../../utils/user-story.utils.js";import A from"../../shared/AtomicButton.js";import L from"../RichTextEditor/RichTextEditor.js";import M from"../userstory-with-citation/UserStoryWithCitation.js";import{useRequirementAI as H}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as P}from"../story-screen/BigEnoughPanel.js";function R(t){for(var n,r=[],o=/<learned>(.*?)<\/learned>/g,i=0,a=0;null!==(n=o.exec(t));){var s=n[1],u=n.index;u>i&&r.push(l("span",{children:t.slice(i,u)},"text-pre-".concat(a++))),r.push(l(b,e({title:s,placement:"top"},{children:l(C,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(x()))),i=o.lastIndex}return i<(null==t?void 0:t.length)&&r.push(l("span",{children:t.slice(i)},"text-post-".concat(a++))),r}function T(t,n,r){var o;if(!t)return{};if(n)return e({},t.parentConfig);var l=e({},t.childConfig);return r&&(null===(o=t.subFeatureOverrides)||void 0===o?void 0:o[r])?e(e({},l),t.subFeatureOverrides[r]):l}var j=function(t){var n,r=t.displayName,i=H().customStyles,a=null===(n=null==i?void 0:i.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return o("div",e({className:U.displayName,style:null==a?void 0:a.wrapper},{children:[l(I,{className:U.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),o("span",e({style:null==a?void 0:a.label},{children:[r,":"]}))]}))},V=function(S){var g,C,I,b,x,_,W=S.isUserStoryCurrentlyUpdated,z=S.artifactId,F=S.artifactTitleId,G=S.parentUserStory,O=S.currentUserStory,q=S.onUserStoryChange,Q=S.parentIndex,J=S.currentIndex,K=S.enableDownload,X=S.isDiffEditReviewMode,Y=S.showUserStoryDiff,Z=S.handleDownloadUserStory,$=S.handleOpenSendDialog,ee=S.updateUserStoryArtifact,te=S.selectedArtifactId,ne=S.isDisplayHighlightControl,re=S.elementDisplayConfig,oe=S._resolvedConfig,le=S.showWrapper,ie=void 0!==le&&le,ae=S.handleViewGlossary,se=S.segmentDataList,ue=S.getSegmentExampleComponent,de=S.handleFetchSegmentDetails,ce=H(),ve=ce.searchQueryList,me=ce.citations,he=ce.customStyles,ye=null==he?void 0:he.userStoryCardStyles,pe=null===(g=null==he?void 0:he.userStoryScreenStyles)||void 0===g?void 0:g.userStoryContentStyles,fe=null==ye?void 0:ye.progressHeaderStyles,Se=a(e(e({},structuredClone(O)),{value:B(O.value)||""})),ge=Se[0],Ce=Se[1],Ie=a({userStory:!1}),we=Ie[0],Ne=Ie[1],De=H(),be=De.userStory,xe=De.customIcons,Ue=a(""===Q||te===O.artifactId),Be=Ue[0],Ee=Ue[1],ke=a(!1);ke[0];var Ae=ke[1],Le=a(null),Me=Le[0],He=Le[1],Pe=a(!1),Re=Pe[0],Te=Pe[1],je=s(null),Ve=a(!1);Ve[0];var _e=Ve[1],We=s(null);u(function(){W&&Ee(W)},[W]),u(function(){Ce(e(e({},structuredClone(O)),{value:B(O.value)||""}))},[O]),u(function(){ve.length>0?Ee(!0):te&&Ee(te===O.artifactId)},[ve,te,O.artifactId]);var ze=function(){He(null)},Fe=function(){Ee(function(e){return!e})};var Ge=null!=(null==O?void 0:O.big_enough)&&!Number.isNaN(O.big_enough)&&!!(null==O?void 0:O.big_enough_decision_factors),Oe=null!=oe?oe:T(re,""===Q);return o("div",e({className:U.card,style:null==ye?void 0:ye.cardStyle,id:"story-card-".concat(O.title),"data-expanded":Be},{children:[o("div",e({className:U.titleSection,style:null==ye?void 0:ye.titleSection},{children:[o("div",e({className:U.titleRow,style:null==ye?void 0:ye.titleRow,onClick:Fe},{children:[o("div",e({className:U.titleLeft,style:null==ye?void 0:ye.titleLeft,onMouseEnter:function(){return _e(!0)},onMouseLeave:function(){return _e(!1)}},{children:[l(j,{displayName:F}),l("h2",e({className:U.storyTitle,style:null==ye?void 0:ye.storyTitle},{children:R(O.title)}),O.artifactId)]})),o("div",e({className:U.titleActions,style:null==ye?void 0:ye.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Oe.showProgressPercentage||Oe.showGapBox)&&ie&&o("div",e({className:U.progressHeader,style:null==fe?void 0:fe.wrapper},{children:[Oe.showProgressPercentage&&o("div",e({className:U.progressPercentage,style:null==fe?void 0:fe.percentage},{children:[null!==(I=null!==(C=null==O?void 0:O.confidenceScore)&&void 0!==C?C:null==Oe?void 0:Oe.confidenceValue)&&void 0!==I?I:"0","%"]})),Oe.showGapBox&&o("div",e({className:U.gapBox,style:null==fe?void 0:fe.gapBox},{children:[null!==(x=null!==(b=null==O?void 0:O.gapValue)&&void 0!==b?b:null==Oe?void 0:Oe.gapBoxValue)&&void 0!==x?x:"2"," ","Gaps"]}))]})),Ge&&l(P,{customIcons:null==xe?void 0:xe.userStoryIcons,customStyles:null==ye?void 0:ye.aiReasoningCitaionStyles,currentUserStory:O,panelStyles:null==ye?void 0:ye.BigEnoughStyles}),!we.userStory&&o(i,{children:[!1!==(null==Oe?void 0:Oe.showShareButton)&&l("button",e({className:U.iconButton,style:null==ye?void 0:ye.iconButton,onClick:function(e){He(e.currentTarget)}},{children:l(d,{size:16})})),o(N,e({id:"user-story-share-menu",anchorEl:Me,open:!!Me,onClose:function(){return He(null)},style:null==ye?void 0:ye.userStoryShareMenu},{children:[K&&l(D,e({style:null==ye?void 0:ye.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return Ae(!0),Z?[4,Promise.all([Z("pdf"),Z("doc")])]:[2];case 1:return e.sent(),Ae(!1),[2]}})})}},{children:o("div",e({ref:je,className:U.menuItemContent,style:null==ye?void 0:ye.menuItemContent},{children:[l(c,{size:16,color:null==ye?void 0:ye.menuIconColor}),l("p",e({style:null==ye?void 0:ye.menuLabel},{children:"Download"}))]}))})),l(D,e({style:null==ye?void 0:ye.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=O,G&&(t=e(e({},O),{value:"".concat(k(null==G?void 0:G.value,O.title)," \n").concat(O.value)})),null==$||$(!0,[t],O.artifactId),ze(),[2]})})}},{children:o("div",e({style:null==ye?void 0:ye.menuItemContent,className:U.menuItemContentPadded},{children:[l(v,{size:16,color:null==ye?void 0:ye.menuIconColor}),l("p",e({style:null==ye?void 0:ye.menuLabel},{children:"Send"}))]}))})),l(D,e({style:null==ye?void 0:ye.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,r,o,l;return n(this,function(n){switch(n.label){case 0:e=new w.Converter,t=e.makeHtml(B(O.value)||O.value),r=function(e){var t=(new w.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(B(O.value)||O.value),o=new ClipboardItem({"text/plain":new Blob([r],{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([o])];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 ze(),[7];case 5:return[2]}})})}},{children:o("div",e({style:null==ye?void 0:ye.menuItemContent,className:U.menuItemContentPadded},{children:[l(m,{size:16,color:null==ye?void 0:ye.menuIconColor}),l("p",e({style:null==ye?void 0:ye.menuLabel},{children:"Copy"}))]}))}))]}))]}),we.userStory&&Be?l(A,{type:"outline",children:"Cancel",style:null==ye?void 0:ye.cancelButton,onClick:function(){var t;null===(t=We.current)||void 0===t||t.abort(),Ne(function(t){return e(e({},t),{userStory:!1})})}}):l(i,{}),we.userStory&&Be?l(A,{type:"fill",children:Re?o("span",e({className:U.savingSpinner,style:null==ye?void 0:ye.savingSpinner},{children:[l(h,{className:U.spinAnimation,style:null==ye?void 0:ye.spinAnimation}),l("span",{children:"Saving..."})]})):"Save",isDisable:Re,style:Re?null==ye?void 0:ye.savingButton:null==ye?void 0:ye.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 Te(!0),"userStory"==="userStory"&&(q(ge),console.log("I am changing RTE editor values",ge)),[4,ee(me,be,z,null===(t=We.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Ne(function(t){return e(e({},t),{userStory:!1})}),Te(!1),[2]}})})}}):!X&&!Y&&Be&&!1!==(null==Oe?void 0:Oe.showEditButton)&&l("button",e({className:U.iconButton,style:null==ye?void 0:ye.editButton,onClick:function(){return Ne(function(t){return e(e({},t),{userStory:!0})})}},{children:l(y,{color:null==ye?void 0:ye.pencilIconColor,size:16})})),l("button",e({type:"button",onClick:function(e){e.stopPropagation(),Fe()},style:null==ye?void 0:ye.chevronButton,className:U.chevronButton},{children:l(Be?p:f,{className:U.chevronIcon,color:null==ye?void 0:ye.chevronIconColor})}))]}))]})),l("div",{className:U.divider,style:null==ye?void 0:ye.dividerStyle})]})),Be&&l("div",e({className:U.cardContent,style:null==ye?void 0:ye.cardContentStyle},{children:o("div",e({className:U.contentInner,style:null==ye?void 0:ye.contentInner},{children:[o("div",e({className:U.descriptionSection,style:null==ye?void 0:ye.descriptionSection},{children:[l("div",{className:U.justifyBetween,style:null==ye?void 0:ye.justifyBetween}),we.userStory?l(L,{minHeight:"100%",height:"100%",type:"string",value:B(O.value)||"",handleUpdateState:function(t,n){var r=E(n);Ce(function(t){return e(e({},t),{value:r||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:we.userStory?"edit":"readOnly"}):l(M,{showUserStoryDiff:Y,isParent:""===Q,message:B(O.value)||"",artifactId:O.artifactId,customStyles:pe,isDisplayHighlightControl:ne,getSegmentExampleComponent:ue,handleViewGlossary:ae,segmentDataList:se,handleFetchSegmentDetails:de})]})),null===(_=ge.sub_features)||void 0===_?void 0:_.map(function(t,n){var o=T(re,!1,t.artifactId);return l(V,{artifactId:z,isUserStoryCurrentlyUpdated:W,artifactTitleId:"".concat(F,"-").concat(String.fromCharCode(65+n)),parentUserStory:O,parentIndex:"".concat(Q).concat(Q&&".").concat(J),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var o=r([],O.sub_features||[],!0);o[t]=n,q(e(e({},O),{sub_features:o}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:X,showUserStoryDiff:Y,updateUserStoryArtifact:ee,handleDownloadUserStory:Z,handleOpenSendDialog:$,isDisplayHighlightControl:ne,elementDisplayConfig:re,_resolvedConfig:o,getSegmentExampleComponent:ue,handleViewGlossary:ae,segmentDataList:se,handleFetchSegmentDetails:de},t.artifactId)})]}))}))]}))},_=function(t){var n=t.artifactTitleIDs,a=t.isDiffEditReviewMode,s=t.showUserStoryDiff,u=t.updateUserStoryArtifact,d=t.isUserStoryCurrentlyUpdated,c=t.artifactId,v=t.handleOpenSendDialog,m=t.handleDownloadUserStory,h=t.selectedArtifactId,y=t.isDisplayHighlightControl,p=t.elementDisplayConfig,f=t.showWrapper,C=H(),I=C.userStory,w=C.setUserStory,N=C.customStyles,D=C.searchQueryList,b=C.currentHighlightIndex,x=C.setCurrentHighlightIndex,B=C.segmentDataList,E=C.handleViewGlossary,k=C.getSegmentExampleComponent,A=C.handleFetchSegmentDetails,L=null==N?void 0:N.userStoryCardStyles,M=0===b,P=b===D.length-1;return o("div",e({className:U.userStoryCardWrapper,style:y?e(e({},null==L?void 0:L.userStoryCardWrapper),{position:"relative"}):null==L?void 0:L.userStoryCardWrapper},{children:[y&&l(i,{children:D.length>0&&l("div",e({className:U.wrapper},{children:l("div",e({className:U.highlightNavigation},{children:o("div",e({className:U.navigationContainer},{children:[o("span",e({className:U.navCounter},{children:[b+1," of ",D.length]})),o("div",e({className:U.navButtons},{children:[l("button",e({onClick:function(){b>0&&x(function(e){return e-1})},className:U.navButton,disabled:M},{children:l(S,{size:20,className:U.navIcon})})),l("button",e({onClick:function(){b<D.length-1&&x(function(e){return e+1})},className:U.navButton,disabled:P},{children:l(g,{size:20,className:U.navIcon})}))]}))]}))}))}))}),I.map(function(e,t){var o=T(p,!0);return l(V,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:n[t]||"",currentUserStory:e,onUserStoryChange:function(e){w(function(n){return n[t]=e,r([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:a,showUserStoryDiff:s,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:m,selectedArtifactId:h,isDisplayHighlightControl:y,elementDisplayConfig:p,_resolvedConfig:o,showWrapper:f,getSegmentExampleComponent:k,handleViewGlossary:E,segmentDataList:B,handleFetchSegmentDetails:A},e.artifactId)})]}))};export{V as StoryCard,_ as UserStoryCardWrapper,V as default,R as replaceLearnedTagsWithInfo};
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as r,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as s,useRef as a,useEffect as u}from"react";import{ExternalLink as d,Download as c,Share2 as v,Copy as y,LoaderCircle as m,PencilIcon as h,ChevronUp as f,ChevronDown as p,ChevronUpIcon as S,ChevronDownIcon as g,Info as C,Bookmark as I}from"lucide-react";import w from"showdown";import{Menu as N,MenuItem as b,Tooltip as U}from"@mui/material";import{v4 as D}from"uuid";import x from"./UserStoryCard.module.css.js";import{formatMarkdown as B,indentMarkdown as k}from"../../utils/helpers.js";import{replaceTitleSection as A}from"../../utils/user-story.utils.js";import M from"../../shared/AtomicButton.js";import E from"../RichTextEditor/RichTextEditor.js";import H from"../userstory-with-citation/UserStoryWithCitation.js";import{useRequirementAI as P}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as R}from"../story-screen/BigEnoughPanel.js";function T(t){for(var n,o=[],r=/<learned>(.*?)<\/learned>/g,l=0,s=0;null!==(n=r.exec(t));){var a=n[1],u=n.index;u>l&&o.push(i("span",{children:t.slice(l,u)},"text-pre-".concat(s++))),o.push(i(U,e({title:a,placement:"top"},{children:i(C,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(D()))),l=r.lastIndex}return l<(null==t?void 0:t.length)&&o.push(i("span",{children:t.slice(l)},"text-post-".concat(s++))),o}function j(t,n,o){var r;if(!t)return{};if(n)return e({},t.parentConfig);var i=e({},t.childConfig);return o&&(null===(r=t.subFeatureOverrides)||void 0===r?void 0:r[o])?e(e({},i),t.subFeatureOverrides[o]):i}var _=function(t){var n,o=t.displayName,l=P().customStyles,s=null===(n=null==l?void 0:l.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return r("div",e({className:x.displayName,style:null==s?void 0:s.wrapper},{children:[i(I,{className:x.displayNameIcon,style:null==s?void 0:s.displayNameIcon}),r("span",e({style:null==s?void 0:s.label},{children:[o,":"]}))]}))},L=function(S){var g,C,I,U,D,W,z=S.isUserStoryCurrentlyUpdated,O=S.artifactId,V=S.artifactTitleId,F=S.parentUserStory,G=S.currentUserStory,q=S.onUserStoryChange,Q=S.parentIndex,J=S.currentIndex,K=S.enableDownload,X=S.isDiffEditReviewMode,Y=S.showUserStoryDiff,Z=S.handleDownloadUserStory,$=S.handleOpenSendDialog,ee=S.updateUserStoryArtifact,te=S.selectedArtifactId,ne=S.isDisplayHighlightControl,oe=S.elementDisplayConfig,re=S._resolvedConfig,ie=S.showWrapper,le=void 0!==ie&&ie,se=S.segmentComponentConfig,ae=P(),ue=ae.searchQueryList,de=ae.citations,ce=ae.customStyles,ve=null==ce?void 0:ce.userStoryCardStyles,ye=null===(g=null==ce?void 0:ce.userStoryScreenStyles)||void 0===g?void 0:g.userStoryContentStyles,me=null==ve?void 0:ve.progressHeaderStyles,he=s(e(e({},structuredClone(G)),{value:B(G.value)||""})),fe=he[0],pe=he[1],Se=s({userStory:!1}),ge=Se[0],Ce=Se[1],Ie=P(),we=Ie.userStory,Ne=Ie.customIcons,be=s(""===Q||te===G.artifactId),Ue=be[0],De=be[1],xe=s(!1);xe[0];var Be=xe[1],ke=s(null),Ae=ke[0],Me=ke[1],Ee=s(!1),He=Ee[0],Pe=Ee[1],Re=a(null),Te=s(!1);Te[0];var je=Te[1],_e=a(null);u(function(){z&&De(z)},[z]),u(function(){pe(e(e({},structuredClone(G)),{value:B(G.value)||""}))},[G]),u(function(){ue.length>0?De(!0):te&&De(te===G.artifactId)},[ue,te,G.artifactId]);var Le=function(){Me(null)},We=function(){De(function(e){return!e})};var ze=null!=(null==G?void 0:G.big_enough)&&!Number.isNaN(G.big_enough)&&!!(null==G?void 0:G.big_enough_decision_factors),Oe=null!=re?re:j(oe,""===Q);return r("div",e({className:x.card,style:null==ve?void 0:ve.cardStyle,id:"story-card-".concat(G.title),"data-expanded":Ue},{children:[r("div",e({className:x.titleSection,style:null==ve?void 0:ve.titleSection},{children:[r("div",e({className:x.titleRow,style:null==ve?void 0:ve.titleRow,onClick:We},{children:[r("div",e({className:x.titleLeft,style:null==ve?void 0:ve.titleLeft,onMouseEnter:function(){return je(!0)},onMouseLeave:function(){return je(!1)}},{children:[i(_,{displayName:V}),i("h2",e({className:x.storyTitle,style:null==ve?void 0:ve.storyTitle},{children:T(G.title)}),G.artifactId)]})),r("div",e({className:x.titleActions,style:null==ve?void 0:ve.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Oe.showProgressPercentage||Oe.showGapBox)&&le&&r("div",e({className:x.progressHeader,style:null==me?void 0:me.wrapper},{children:[Oe.showProgressPercentage&&r("div",e({className:x.progressPercentage,style:null==me?void 0:me.percentage},{children:[null!==(I=null!==(C=null==G?void 0:G.confidenceScore)&&void 0!==C?C:null==Oe?void 0:Oe.confidenceValue)&&void 0!==I?I:"0","%"]})),Oe.showGapBox&&r("div",e({className:x.gapBox,style:null==me?void 0:me.gapBox},{children:[null!==(D=null!==(U=null==G?void 0:G.gapValue)&&void 0!==U?U:null==Oe?void 0:Oe.gapBoxValue)&&void 0!==D?D:"2"," ","Gaps"]}))]})),ze&&i(R,{customIcons:null==Ne?void 0:Ne.userStoryIcons,customStyles:null==ve?void 0:ve.aiReasoningCitaionStyles,currentUserStory:G,panelStyles:null==ve?void 0:ve.BigEnoughStyles}),!ge.userStory&&r(l,{children:[!1!==(null==Oe?void 0:Oe.showShareButton)&&i("button",e({className:x.iconButton,style:null==ve?void 0:ve.iconButton,onClick:function(e){Me(e.currentTarget)}},{children:i(d,{size:16})})),r(N,e({id:"user-story-share-menu",anchorEl:Ae,open:!!Ae,onClose:function(){return Me(null)},style:null==ve?void 0:ve.userStoryShareMenu},{children:[K&&i(b,e({style:null==ve?void 0:ve.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return Be(!0),Z?[4,Promise.all([Z("pdf"),Z("doc")])]:[2];case 1:return e.sent(),Be(!1),[2]}})})}},{children:r("div",e({ref:Re,className:x.menuItemContent,style:null==ve?void 0:ve.menuItemContent},{children:[i(c,{size:16,color:null==ve?void 0:ve.menuIconColor}),i("p",e({style:null==ve?void 0:ve.menuLabel},{children:"Download"}))]}))})),i(b,e({style:null==ve?void 0:ve.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=G,F&&(t=e(e({},G),{value:"".concat(A(null==F?void 0:F.value,G.title)," \n").concat(G.value)})),null==$||$(!0,[t],G.artifactId),Le(),[2]})})}},{children:r("div",e({style:null==ve?void 0:ve.menuItemContent,className:x.menuItemContentPadded},{children:[i(v,{size:16,color:null==ve?void 0:ve.menuIconColor}),i("p",e({style:null==ve?void 0:ve.menuLabel},{children:"Send"}))]}))})),i(b,e({style:null==ve?void 0:ve.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,r,i;return n(this,function(n){switch(n.label){case 0:e=new w.Converter,t=e.makeHtml(B(G.value)||G.value),o=function(e){var t=(new w.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(B(G.value)||G.value),r=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([r])];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 Le(),[7];case 5:return[2]}})})}},{children:r("div",e({style:null==ve?void 0:ve.menuItemContent,className:x.menuItemContentPadded},{children:[i(y,{size:16,color:null==ve?void 0:ve.menuIconColor}),i("p",e({style:null==ve?void 0:ve.menuLabel},{children:"Copy"}))]}))}))]}))]}),ge.userStory&&Ue?i(M,{type:"outline",children:"Cancel",style:null==ve?void 0:ve.cancelButton,onClick:function(){var t;null===(t=_e.current)||void 0===t||t.abort(),Ce(function(t){return e(e({},t),{userStory:!1})})}}):i(l,{}),ge.userStory&&Ue?i(M,{type:"fill",children:He?r("span",e({className:x.savingSpinner,style:null==ve?void 0:ve.savingSpinner},{children:[i(m,{className:x.spinAnimation,style:null==ve?void 0:ve.spinAnimation}),i("span",{children:"Saving..."})]})):"Save",isDisable:He,style:He?null==ve?void 0:ve.savingButton:null==ve?void 0:ve.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 Pe(!0),"userStory"==="userStory"&&(q(fe),console.log("I am changing RTE editor values",fe)),[4,ee(de,we,O,null===(t=_e.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Ce(function(t){return e(e({},t),{userStory:!1})}),Pe(!1),[2]}})})}}):!X&&!Y&&Ue&&!1!==(null==Oe?void 0:Oe.showEditButton)&&i("button",e({className:x.iconButton,style:null==ve?void 0:ve.editButton,onClick:function(){return Ce(function(t){return e(e({},t),{userStory:!0})})}},{children:i(h,{color:null==ve?void 0:ve.pencilIconColor,size:16})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),We()},style:null==ve?void 0:ve.chevronButton,className:x.chevronButton},{children:i(Ue?f:p,{className:x.chevronIcon,color:null==ve?void 0:ve.chevronIconColor})}))]}))]})),i("div",{className:x.divider,style:null==ve?void 0:ve.dividerStyle})]})),Ue&&i("div",e({className:x.cardContent,style:null==ve?void 0:ve.cardContentStyle},{children:r("div",e({className:x.contentInner,style:null==ve?void 0:ve.contentInner},{children:[r("div",e({className:x.descriptionSection,style:null==ve?void 0:ve.descriptionSection},{children:[i("div",{className:x.justifyBetween,style:null==ve?void 0:ve.justifyBetween}),ge.userStory?i(E,{minHeight:"100%",height:"100%",type:"string",value:B(G.value)||"",handleUpdateState:function(t,n){var o=k(n);pe(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:ge.userStory?"edit":"readOnly"}):i(H,{showUserStoryDiff:Y,isParent:""===Q,message:B(G.value)||"",artifactId:G.artifactId,customStyles:ye,isDisplayHighlightControl:ne,segmentComponentConfig:se})]})),null===(W=fe.sub_features)||void 0===W?void 0:W.map(function(t,n){var r=j(oe,!1,t.artifactId);return i(L,{artifactId:O,isUserStoryCurrentlyUpdated:z,artifactTitleId:"".concat(V,"-").concat(String.fromCharCode(65+n)),parentUserStory:G,parentIndex:"".concat(Q).concat(Q&&".").concat(J),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var r=o([],G.sub_features||[],!0);r[t]=n,q(e(e({},G),{sub_features:r}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:X,showUserStoryDiff:Y,updateUserStoryArtifact:ee,handleDownloadUserStory:Z,handleOpenSendDialog:$,isDisplayHighlightControl:ne,elementDisplayConfig:oe,_resolvedConfig:r,segmentComponentConfig:se},t.artifactId)})]}))}))]}))},W=function(t){var n=t.artifactTitleIDs,s=t.isDiffEditReviewMode,a=t.showUserStoryDiff,u=t.updateUserStoryArtifact,d=t.isUserStoryCurrentlyUpdated,c=t.artifactId,v=t.handleOpenSendDialog,y=t.handleDownloadUserStory,m=t.selectedArtifactId,h=t.isDisplayHighlightControl,f=t.elementDisplayConfig,p=t.showWrapper,C=P(),I=C.userStory,w=C.setUserStory,N=C.customStyles,b=C.searchQueryList,U=C.currentHighlightIndex,D=C.setCurrentHighlightIndex,B=C.segmentComponentConfig,k=null==N?void 0:N.userStoryCardStyles,A=0===U,M=U===b.length-1;return r("div",e({className:x.userStoryCardWrapper,style:h?e(e({},null==k?void 0:k.userStoryCardWrapper),{position:"relative"}):null==k?void 0:k.userStoryCardWrapper},{children:[h&&i(l,{children:b.length>0&&i("div",e({className:x.wrapper},{children:i("div",e({className:x.highlightNavigation},{children:r("div",e({className:x.navigationContainer},{children:[r("span",e({className:x.navCounter},{children:[U+1," of ",b.length]})),r("div",e({className:x.navButtons},{children:[i("button",e({onClick:function(){U>0&&D(function(e){return e-1})},className:x.navButton,disabled:A},{children:i(S,{size:20,className:x.navIcon})})),i("button",e({onClick:function(){U<b.length-1&&D(function(e){return e+1})},className:x.navButton,disabled:M},{children:i(g,{size:20,className:x.navIcon})}))]}))]}))}))}))}),I.map(function(e,t){var r=j(f,!0);return i(L,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:n[t]||"",currentUserStory:e,onUserStoryChange:function(e){w(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:a,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:y,selectedArtifactId:m,isDisplayHighlightControl:h,elementDisplayConfig:f,_resolvedConfig:r,showWrapper:p,segmentComponentConfig:B},e.artifactId)})]}))};export{L as StoryCard,W as UserStoryCardWrapper,L as default,T as replaceLearnedTagsWithInfo};
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import{ChevronUp as l,ChevronDown as i,ExternalLink as a}from"lucide-react";import{useState as o}from"react";import r from"./AiReasonAccoridon.module.css.js";function c(c){var s=c.icon,d=c.title,u=c.content,m=c.subTitle,p=c.scenario,v=c.className,h=void 0===v?"":v,y=c.customStyles,f=c.alwaysOpen,B=void 0!==f&&f,N=c.defaultOpen,x=void 0===N||N,k=c.isSegmentExplanation,w=void 0!==k&&k,g=c.handleViewExample,S=c.handleViewGlossary,b=o(x),C=b[0],E=b[1];return n("div",e({className:"".concat("riskSideBar"!==p&&r.wrapperBorder," ").concat(r.wrapper," ").concat(h),style:null==y?void 0:y.wrapper},{children:[n("div",e({className:"".concat(r.header," ").concat("riskSideBar"===p?r.headerPaddingRisk:r.headerPadding),style:null==y?void 0:y.header,onClick:function(){B||E(!C)}},{children:[n("div",e({className:r.headerLeft,style:null==y?void 0:y.iconWrapper},{children:[s,n("div",e({className:r.titleBlock},{children:[t("h1",e({className:r.title,style:null==y?void 0:y.title},{children:d})),t("p",e({className:r.subTitle,style:null==y?void 0:y.subTitle},{children:m}))]}))]})),"riskSideBar"!==p&&!B&&t("div",e({className:r.chevronWrapper,style:null==y?void 0:y.chevronWrapper},{children:t(C?l:i,{className:r.chevronIcon})}))]})),C&&n("div",e({className:"".concat("riskSideBar"!==p&&r.content," ").concat(r.contentBase),style:e({},null==y?void 0:y.contentContainerWrapper)},{children:[t("div",e({style:null==y?void 0:y.contentWrapper},{children:u})),w&&n("div",e({className:"".concat(r.segmentExplanationButtonContainer," flex-row"),style:e({},null==y?void 0:y.segmentExplanationButtonContainer)},{children:[t("button",e({className:"".concat(r.segmentButton),onClick:function(){return null==g?void 0:g()},style:e({},null==y?void 0:y.explanationButton)},{children:"Show Example"})),n("button",e({className:"".concat(r.segmentButton),onClick:function(){return null==S?void 0:S()},style:e({},null==y?void 0:y.explanationButton)},{children:["View in Glossary ",t(a,{size:14})]}))]}))]}))]}))}export{c as default};
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import{ChevronUp as l,ChevronDown as i,ExternalLink as a}from"lucide-react";import{useState as o}from"react";import r from"./AiReasonAccoridon.module.css.js";function c(c){var s=c.icon,d=c.title,u=c.content,m=c.subTitle,p=c.scenario,v=c.className,h=void 0===v?"":v,y=c.customStyles,f=c.alwaysOpen,B=void 0!==f&&f,N=c.defaultOpen,x=void 0===N||N,k=c.isSegmentExplanation,w=void 0!==k&&k,g=c.handleViewExample,S=c.handleViewGlossary,b=o(x),C=b[0],E=b[1];return n("div",e({className:"".concat("riskSideBar"!==p&&r.wrapperBorder," ").concat(r.wrapper," ").concat(h),style:null==y?void 0:y.wrapper},{children:[n("div",e({className:"".concat(r.header," ").concat("riskSideBar"===p?r.headerPaddingRisk:r.headerPadding),style:null==y?void 0:y.header,onClick:function(){B||E(!C)}},{children:[n("div",e({className:r.headerLeft,style:null==y?void 0:y.iconWrapper},{children:[s,n("div",e({className:r.titleBlock},{children:[t("h1",e({className:r.title,style:null==y?void 0:y.title},{children:d})),t("p",e({className:r.subTitle,style:null==y?void 0:y.subTitle},{children:m}))]}))]})),"riskSideBar"!==p&&!B&&t("div",e({className:r.chevronWrapper,style:null==y?void 0:y.chevronWrapper},{children:t(C?l:i,{className:r.chevronIcon})}))]})),C&&n("div",e({className:"".concat("riskSideBar"!==p&&r.content," ").concat(r.contentBase),style:e({},null==y?void 0:y.contentContainerWrapper)},{children:[t("div",e({style:null==y?void 0:y.contentWrapper},{children:u})),(g||S)&&w&&n("div",e({className:"".concat(r.segmentExplanationButtonContainer," flex-row"),style:e({},null==y?void 0:y.segmentExplanationButtonContainer)},{children:[g&&t("button",e({className:"".concat(r.segmentButton),onClick:function(){return null==g?void 0:g()},style:e({},null==y?void 0:y.explanationButton)},{children:"Show Example"})),S&&n("button",e({className:"".concat(r.segmentButton),onClick:function(){return null==S?void 0:S()},style:e({},null==y?void 0:y.explanationButton)},{children:["View in Glossary ",t(a,{size:14})]}))]}))]}))]}))}export{c as default};
|
|
2
2
|
//# sourceMappingURL=AIReasonAccordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as l,useEffect as o}from"react";import{Pencil as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as l,useEffect as o}from"react";import{Pencil as r,Save as a,X as d}from"lucide-react";import{formatMarkdown as s}from"../../utils/user-story.utils.js";import u from"../userstory-with-citation/UserStoryWithCitation.js";import v from"./PartialRequirementContent.module.css.js";import{Tooltip as c}from"@mui/material";import{useRequirementAI as m}from"../RequirementAIWrapper/RequirementAIWrapper.js";import p from"../RichTextEditor/RichTextEditor.js";var y=function(y){var C,f,h,S,R,g,q,P,w,B,b,N,A,j,D,k,E,U,x=y.loadingPartialRequirements,W=y.localUserStory,T=y.setLocalUserStory,z=y.onCraFlowDiffAgentAction,F=y.disableEditing,I=y.isCraflow,L=void 0===I||I,H=y.onCraAccept,M=y.onCraReject,V=l(!1),G=V[0],J=V[1],K=l(""),O=K[0],Q=K[1],X=m(),Y=X.customStyles,Z=X.segmentComponentConfig;o(function(){F&&J(!1)},[F]),o(function(){var e;Q(null===(e=null==W?void 0:W[0])||void 0===e?void 0:e.value)},[W]);if(x)return t("div",e({className:v.skeletonWrapper,style:null===(C=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===C?void 0:C.skeletonWrapper},{children:[1,2,3,4,5].map(function(e){var i;return t("div",{className:v.skeletonLine,style:null===(i=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===i?void 0:i.skeletonLine},e)})}));var $=!O||""===O.trim();return i("div",e({className:v.wrapper,style:null===(f=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===f?void 0:f.wrapper},{children:[t("div",e({className:v.actionBar,style:null===(h=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===h?void 0:h.actionBar},{children:G?i(n,{children:[i("span",e({className:v.editingBadge,style:null===(q=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===q?void 0:q.editingBadge},{children:[t("span",{className:v.editingDot,style:null===(P=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===P?void 0:P.editingDot}),"Editing"]})),t("div",{className:v.btnDivider,style:null===(w=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===w?void 0:w.btnDivider}),t(c,e({title:$?"This field cannot be empty":"Save changes",slotProps:{tooltip:{sx:e({},null===(B=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===B?void 0:B.headerTooltip)}}},{children:t("span",{children:t("button",e({className:v.saveBtn,style:e(e(e({},null===(b=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===b?void 0:b.actionBtn),null===(N=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===N?void 0:N.saveBtn),{opacity:$?.5:1,cursor:$?"not-allowed":"pointer"}),onClick:function(){$||(T(function(t){var i=e(e({},t[0]),{value:O});return null==z||z("accept",[i]),[i]}),J(!1))},disabled:$},{children:t(a,{size:16})}))})})),t("button",e({className:v.cancelBtn,style:e(e({},null===(A=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===A?void 0:A.actionBtn),null===(j=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===j?void 0:j.cancelBtn),onClick:function(){var e;Q(null===(e=null==W?void 0:W[0])||void 0===e?void 0:e.value),J(!1)},title:"Discard changes","aria-label":"Discard changes"},{children:t(d,{size:16})}))]}):t(c,e({title:F?"Editing is disabled":"Edit",slotProps:{tooltip:{sx:e({},null===(S=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===S?void 0:S.headerTooltip)}}},{children:t("span",{children:t("button",e({className:v.editBtn,style:e(e(e({},null===(R=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===R?void 0:R.actionBtn),null===(g=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===g?void 0:g.editBtn),{opacity:F?.5:1,cursor:F?"not-allowed":"pointer"}),onClick:function(){F||J(!0)},disabled:F,"aria-label":"Edit requirement"},{children:t(r,{size:16})}))})}))})),t("div",G?e({className:v.editorContainer,style:null===(D=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===D?void 0:D.editorContainer},{children:t(p,{minHeight:"100%",height:"100%",type:"string",value:s((null===(k=null==W?void 0:W[0])||void 0===k?void 0:k.value)||""),handleUpdateState:function(e,t){Q(t)},doNotShowBorderInViewMode:!1,mode:"edit"})}):e({className:v.viewContainer,style:null===(E=null==Y?void 0:Y.PartialRequirementContentStyles)||void 0===E?void 0:E.viewContainer},{children:t(u,{message:s((null===(U=null==W?void 0:W[0])||void 0===U?void 0:U.value)||""),craFlowConfig:{isCraflow:!0,craUserStory:W,setCraUserStory:T,onCraFlowDiffAgentAction:z,displayActionButtons:!G},isCraflow:L,onCraAccept:H,onCraReject:M,customStyles:null==Y?void 0:Y.UserStoryWithCitationCustomStyles,segmentComponentConfig:Z})}))]}))};export{y as PartialRequirementContent,y as default};
|
|
2
2
|
//# sourceMappingURL=PartialRequirementContent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import o from"react";import{ChevronDown as a}from"lucide-react";import{cn as l}from"../../../UserStoryImport/lib/cn.js";import
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,jsx as t}from"react/jsx-runtime";import o from"react";import{ChevronDown as a}from"lucide-react";import{cn as l}from"../../../UserStoryImport/lib/cn.js";import i from"./segment.module.css.js";import s from"./ExampleComponentWrapper.js";import c from"../ai-reasoning/AiReasoningCitationContent.js";var r=function(r){var m=r.id,u=void 0===m?"Segment":m,p=r.label;r.originalValue,r.decisionStrength;var d=r.aiReason,g=r.customStyles,v=r.customIcons,f=r.aiReasoningCitationCustomStyles,h=r.segmentExampleComponent,y=r.handleViewGlossary,C=o.useState(!1),x=C[0],S=C[1],b=o.useState(!1),E=b[0],I=b[1];return n("div",e({className:"".concat(i.segmentWrapper),style:e({},null==g?void 0:g.segmentWrapper)},{children:[n("div",e({className:"".concat(i.segmentContainer),style:e({},null==g?void 0:g.container)},{children:[n("span",e({className:"segment-".concat(u," ").concat(i.segmentLabel),style:e({},null==g?void 0:g.label)},{children:[u," ","{".concat(p,"}")]})),t("button",e({className:"".concat(i.segmentExplanationButtonContainer),style:e({},null==g?void 0:g.buttonContainer),onClick:function(){S(function(e){return!e}),I(!1)}},{children:t(a,{className:l("".concat(i.cheveronIcon),x&&"".concat(i.cheveronIconRotated)),style:e({},null==g?void 0:g.cheveronIcon)})}))]})),E?t(s,{label:null!=p?p:"",segmentExampleComponent:h,customStyles:null==g?void 0:g.segmentExample,handleCancelExample:function(){I(!1)}}):d&&x&&t(c,{aiReason:d,customStyles:f,customIcons:v,isSegmentExplanation:!0,handleViewGlossary:y?function(){S(!1),null==y||y(u)}:void 0,handleViewExample:h?function(){I(!0)}:void 0})]}))};export{r as default};
|
|
2
2
|
//# sourceMappingURL=Segment.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={segmentWrapper:"segment-module_segmentWrapper__PVOuq",segmentContainer:"segment-module_segmentContainer__wBEel",segmentLabel:"segment-module_segmentLabel__-y8Su",segmentButtonContainer:"segment-module_segmentButtonContainer__X76sx",cheveronIcon:"segment-module_cheveronIcon__1njFy",cheveronIconRotated:"segment-module_cheveronIconRotated__qDYj7",exampleWrapper:"segment-module_exampleWrapper__ptZzj",uppercase:"segment-module_uppercase__hjgxG",exampleContainer:"segment-module_exampleContainer__9tMXx",exampleHeader:"segment-module_exampleHeader__9P11O",exampleHeaderText:"segment-module_exampleHeaderText__MWMG0",cancelButton:"segment-module_cancelButton__-F5aZ"};!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(
|
|
1
|
+
var e={segmentWrapper:"segment-module_segmentWrapper__PVOuq",segmentContainer:"segment-module_segmentContainer__wBEel",segmentLabel:"segment-module_segmentLabel__-y8Su",segmentButtonContainer:"segment-module_segmentButtonContainer__X76sx",cheveronIcon:"segment-module_cheveronIcon__1njFy",cheveronIconRotated:"segment-module_cheveronIconRotated__qDYj7",exampleWrapper:"segment-module_exampleWrapper__ptZzj",uppercase:"segment-module_uppercase__hjgxG",exampleContainer:"segment-module_exampleContainer__9tMXx",exampleHeader:"segment-module_exampleHeader__9P11O",exampleHeaderText:"segment-module_exampleHeaderText__MWMG0",cancelButton:"segment-module_cancelButton__-F5aZ"};!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(".segment-module_segmentWrapper__PVOuq{display:flex;flex-direction:column;gap:8px}.segment-module_segmentContainer__wBEel{align-items:center;background-color:#eff6ff;border:1px dashed #bfdbfe;border-radius:4px;color:#3b82f6;display:flex;gap:8px;padding:8px;width:fit-content}.segment-module_segmentLabel__-y8Su{color:#3b82f6;font-size:14px;font-weight:600;line-height:21px;text-transform:uppercase}.segment-module_segmentButtonContainer__X76sx{background-color:initial;border:none;cursor:pointer;padding:0}.segment-module_cheveronIcon__1njFy{color:#3b82f6;height:16px;transition:all .2s ease-in-out;width:16px}.segment-module_cheveronIconRotated__qDYj7{transform:rotate(180deg)}.segment-module_exampleWrapper__ptZzj{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.segment-module_uppercase__hjgxG{text-transform:uppercase}.segment-module_exampleContainer__9tMXx{align-items:flex-start;border:2px dashed #e2e8f0;border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:16px;width:100%}.segment-module_exampleHeader__9P11O{align-items:center;align-self:stretch;display:flex;justify-content:space-between}.segment-module_exampleHeaderText__MWMG0{color:#334155;font-size:14px;font-weight:600;line-height:21px;margin:0}.segment-module_cancelButton__-F5aZ{align-items:center;align-self:stretch;background-color:initial;border:none;color:#334155;cursor:pointer;display:flex;height:fit-content;justify-content:space-between;padding:4px;transition:all .2s ease-in-out}.segment-module_cancelButton__-F5aZ:hover{background-color:#eff6ff}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
|
|
2
2
|
//# sourceMappingURL=segment.module.css.js.map
|