@e-llm-studio/requirement-ai 0.0.245 → 0.0.246
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/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts +3 -2
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),l=require("lucide-react"),o=require("./CustomChatCrRedirection.module.css.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),l=require("lucide-react"),o=require("./CustomChatCrRedirection.module.css.js"),t=require("../ai-reasoning/AiReasoningCitationContent.js"),n=require("../../icons/CognitiveDecision.js"),a=require("@mui/material");exports.CustomChatCrRedirection=function({isDefaultOpen:r,processItemId:s,isCompleted:d,mode:c,msg:u,type:v,id:p,aiReason:g,text:f,headerText:m,decisionStrength:x,statusUi:h,panelRef:j,onHandleSend:y,onRedirectClick:C,gapType:D,isGenerating:b=!1,customStyles:N,customIcons:I,cognitiveDecisionHeaders:S,metaData:T}){const[R,k]=i.useState(r),q=(null==I?void 0:I.highConfidence)||e.jsx(n.default,{}),B=()=>{"cra"===c?null==y||y(`Discuss ambiguities on ${f}`,p,T):null==y||y(`Deep Dive into ${D} ${m}: ${f}`,p,T)};return e.jsxs("div",{className:[o.default.outerWrapper,b?o.default.outerWrapperDisabled:""].join(" "),style:{...null==N?void 0:N.redirectionOuterWrapper,...b?null==N?void 0:N.redirectionOuterWrapperDisabled:{}},children:[e.jsxs("div",{className:[o.default.card,b?o.default.cardDisabled:o.default.cardInteractive].join(" "),style:{...null==N?void 0:N.redirectionCard,...b?null==N?void 0:N.redirectionCardDisabled:null==N?void 0:N.redirectionCardInteractive},children:[e.jsxs("div",{className:o.default.leftSide,style:null==N?void 0:N.redirectionLeftSide,children:[e.jsx(a.Tooltip,{title:m+" "+f,placement:"top",slotProps:{tooltip:{sx:{...null==N?void 0:N.headerTooltip}}},children:e.jsxs("span",{className:o.default.textBlock,style:null==N?void 0:N.redirectionTextBlock,children:[m&&e.jsxs("span",{className:o.default.headerText,style:null==N?void 0:N.redirectionHeaderText,children:[m,f?" ":""]}),f]})}),e.jsxs("span",{onClick:e=>{e.stopPropagation(),b||k(!R)},className:[o.default.reasoningToggle,b?o.default.reasoningToggleDisabled:o.default.reasoningToggleActive].join(" "),style:{...null==N?void 0:N.reasoningToggle,...b?null==N?void 0:N.reasoningToggleDisabled:null==N?void 0:N.reasoningToggleActive},children:[q,R?e.jsx(l.ChevronUp,{className:o.default.chevronIcon,style:null==N?void 0:N.chevronIcon}):e.jsx(l.ChevronDown,{className:o.default.chevronIcon,style:null==N?void 0:N.chevronIcon})]})]}),d?e.jsx("div",{className:o.default.completeTickWrapper,style:null==N?void 0:N.completeTickWrapper,children:e.jsx(l.Check,{color:(null==N?void 0:N.checkColor)||"green"})}):e.jsxs(e.Fragment,{children:["risk-gap"===c&&e.jsxs("div",{className:o.default.rightSide,style:null==N?void 0:N.redirectionRightSide,children:[e.jsx("button",{disabled:b,className:[o.default.fixButton,b?o.default.fixButtonDisabled:""].join(" "),style:{...null==N?void 0:N.redirectionFixButton,...b?null==N?void 0:N.fixButtonDisabled:{}},onClick:e=>{e.stopPropagation(),b||B()},children:"Fix"}),e.jsx(l.SquareArrowOutUpRight,{onClick:b?void 0:()=>{b||null==C||C({type:v,id:p,aiReason:g,msg:u,meta:{headerText:m,decisionStrength:x,text:f}})},size:18,className:[b?o.default.redirectIconDisabled:o.default.redirectIcon].join(" "),style:{...b?null==N?void 0:N.redirectIconDisabled:null==N?void 0:N.redirectIcon}})]}),"cra"===c&&!r&&e.jsx("div",{className:o.default.rightSide,style:null==N?void 0:N.redirectionRightSide,children:s===p?e.jsx("div",{className:o.default.loaderWrapper,style:null==N?void 0:N.loaderWrapper,children:e.jsx(l.Loader2,{size:16,className:o.default.loaderIcon,color:"grey",style:{animation:"spin 1s linear infinite",...null==N?void 0:N.loaderIcon}})}):e.jsx("button",{className:[o.default.clarifyButton].join(" "),style:{color:b?"grey":"",...null==N?void 0:N.redirectionClarifyButton},disabled:b,onClick:e=>{e.stopPropagation(),B()},children:"Clarify"})})]})]}),R&&e.jsx(t.default,{label:"cra"===c?"Clarify":"Select this option",aiReason:{id:"1",reason:(null==g?void 0:g.Reasoning)||"",gap:(null==g?void 0:g.Gap)||"",relevance_score:Number(null==g?void 0:g.Confidence_score),explanation:(null==g?void 0:g.explanation)||""},onSelectProceed:B,customStyles:null==N?void 0:N.aiReasoningStyles,customIcons:I,cognitiveDecisionHeaders:S})]})};
|
|
2
2
|
//# sourceMappingURL=CustomChatCrRedirection.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("lodash"),o=require("./GapFilterContentWrapper.js"),i=require("./GapFilterItem.js"),n=require("./CustomChatCrRedirection.js"),a=require("./gapFilterSvgs.js"),l=require("./GapFilterBlock.module.css.js");require("react-markdown"),require("rehype-raw"),require("../RequirementAIWrapper/RequirementAIWrapper.js");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("lodash"),o=require("./GapFilterContentWrapper.js"),i=require("./GapFilterItem.js"),n=require("./CustomChatCrRedirection.js"),a=require("./gapFilterSvgs.js"),l=require("./GapFilterBlock.module.css.js");require("react-markdown"),require("rehype-raw"),require("../RequirementAIWrapper/RequirementAIWrapper.js");const c=["critical","recommendation","warning"];function d(e){return(null==e?void 0:e.trim())?e.includes("%")?e:e.replace(/([0-9]+(?:\.[0-9]+)?)/g,"$1%"):""}function s(e){return t.Children.toArray(e).filter(e=>t.isValidElement(e)).filter(e=>{var t;return"gapfilteritem"===e.type||"crredirection"===e.type||"function"==typeof e.type&&"crredirection"===e.type.name||(null===(t=e.key)||void 0===t?void 0:t.includes("crredirection"))}).map(e=>{var t,r;const{children:o,...i}=e.props,n={};Object.keys(i).forEach(e=>{e.startsWith("data-")||(n[e]=i[e])});const a=function(e){const t={};return Object.keys(e).forEach(r=>{r.startsWith("data-")&&(t[r.replace(/^data-/,"")]=e[r])}),t}(i),l=function(e){const t={};return Object.keys(e).forEach(r=>{r.startsWith("meta-")&&(t[r.replace(/^meta-/,"")]=e[r])}),t}(i),c=i["decision-strength"],d=i["data-is-completed"];return{text:o,headerText:i.headertext,tags:i.tags,dataAttrs:a,decisionStrength:c,attrs:n,type:"gapfilteritem"===e.type?"gapfilteritem":"crredirection",score:i.score,isCompleted:d,pendingCount:i.pendingcount,question:i.question,components:i.components,showFix:null!==(t=i.showfix)&&void 0!==t&&t,showRedirect:null!==(r=i.showredirect)&&void 0!==r&&r,metaDataAttrs:l}})}const u={critical:{labelColor:"text-gray-900",badgeBg:"bg-[#FEE4E2]",badgeText:"text-[#B42318]",iconColor:"text-[#D92D20]"},warning:{labelColor:"text-gray-900",badgeBg:"bg-[#FEF0C7]",badgeText:"text-[#B54708]",iconColor:"text-[#DC6803]"},recommendation:{labelColor:"text-gray-900",badgeBg:"bg-[#D1FADF]",badgeText:"text-[#027A48]",iconColor:"text-[#039855]"}};exports.GapFilterBlock=({isDefaultOpen:g,processItemId:p,mode:m,node:C,children:b,type:f,supportedmodes:h="","decision-strength":y="",pendingdata:x="",isGeneratingGap:v=!1,selectedGapItemId:S="",onItemSelect:I,onHandleSend:k,onModeAction:j,msg:R,panelRef:F,getAccordionState:A,setAccordionState:B,registerGapFilterBlockCount:D,getShowGapReviewButtonType:G,customStyles:T,customIcons:q,cognitiveDecisionHeaders:w,onRedirectClick:N})=>{const E=f,W=d(y),[O,$]=t.useState(()=>{var e;const t=null!==(e=null==A?void 0:A(E))&&void 0!==e?e:"";return"true"!==g||t?t:E}),H=e=>{$(e),null==B||B(E,e)},z=s(b),M=t.useMemo(()=>z.reduce((e,t)=>{var r,o,i;const n=null!==(r=t.tags)&&void 0!==r?r:"Uncategorized",a=null!==(i=null===(o=t.dataAttrs)||void 0===o?void 0:o.categoryid)&&void 0!==i?i:"1";let l=e.find(e=>e.categoryName===n);return l||(l={categoryName:n,categoryId:a,type:t.type,items:[]},e.push(l)),l.items.push(t),e},[]),[z]),U={critical:{labelColor:"#d92d20",badgeBackgroundColor:"#fee4e2",badgeTextColor:"#b42318",icon:e.jsx(a.SirenIcon,{}),label:"risk-gap"===m?"Critical":"Must Clarify",decisionStrength:"< 70%"},warning:{labelColor:"#dc6803",badgeBackgroundColor:"#fef0c7",badgeTextColor:"#b54708",icon:e.jsx(a.WarningIcon,{}),label:"risk-gap"===m?"Warning":"Should Clarify",decisionStrength:"70–90%"},recommendation:{labelColor:"#039855",badgeBackgroundColor:"#d1fadf",badgeTextColor:"#027a48",icon:e.jsx(a.SupportIcon,{}),label:"risk-gap"===m?"Just a Suggestion":"Nice to Clarify",decisionStrength:"> 90%"},default:{labelColor:"#4b5563",badgeBackgroundColor:"#f3f4f6",badgeTextColor:"#4b5563",icon:e.jsx(a.SupportIcon,{}),label:"",decisionStrength:""}},_=t.useMemo(()=>{return e=E,c.includes(e)?{labelColor:U[E].labelColor,badgeBackgroundColor:U[E].badgeBackgroundColor,badgeTextColor:U[E].badgeTextColor,label:U[E].label,decisionStrength:W||U[E].decisionStrength}:{labelColor:U.default.labelColor,badgeBackgroundColor:U.default.badgeBackgroundColor,badgeTextColor:U.default.badgeTextColor,label:r.capitalize(E),decisionStrength:W||""};var e},[E,W]);t.useEffect(()=>{null==D||D(E,z.length)},[E,z.length,D]);const L=(e,t,r={})=>{if(v)return;const o=`${M[e].categoryId}-${t}`;null==I||I(o);const i={...M[e].items[t].dataAttrs,...r};null==j||j(h,i)};return G&&G(),e.jsx(o.GapFilterContentWrapper,{mode:m,type:E,config:_,count:z.length,handleReviewClick:()=>{z.length>0&&H(E)},openAccordion:O,onAccordionChange:e=>{H(O===e?"":e)},shouldShowReviewButton:!1,pendingData:x,customStyles:T,children:M.map((t,r)=>e.jsxs("div",{className:l.default.categoryGroup,style:null==T?void 0:T.categoryGroup,children:["gapfilteritem"===t.type&&"Uncategorized"!==t.categoryName&&e.jsx("p",{className:l.default.categoryLabel,style:null==T?void 0:T.categoryLabel,children:t.categoryName}),t.items.map((o,a)=>{var c,d,s,g;const C=o.attrs||{},b=null===(c=o.dataAttrs)||void 0===c?void 0:c["cognitive-reasoning"],f=C.id||(null===(d=o.dataAttrs)||void 0===d?void 0:d.id)||"",h="I"===f[0]?"UI_REF":"CHAT_REF",y=null===(s=null==R?void 0:R.contextAwareAgentReasoning)||void 0===s?void 0:s[b],x=o.isCompleted,I="true"===C.isDefaultOpen||"true"===C.isdefaultopen;return"gapfilteritem"===o.type?e.jsx("div",{className:[l.default.gapFilterItemWrapper,"Uncategorized"!==t.categoryName?l.default.gapFilterItemWrapperIndented:""].join(" "),style:null==T?void 0:T.blockContainer,children:e.jsx(i.GapFilterItem,{isDefaultOpen:I,isCompleted:x,mode:m,index:a,isSelected:S===`${t.categoryId}-${a}`,onClick:()=>L(r,a),onFixClick:()=>L(r,a,{triggerFrom:"fix"}),onRedirect:()=>L(r,a,{triggerFrom:"redirect"}),item:o,isGenerating:v,aiReason:y,panelRef:null!=F?F:{current:null},id:b,customStyles:T,customIcons:q,cognitiveDecisionHeaders:w})},a):e.jsx("div",{className:l.default.crRedirectionGroup,style:null==T?void 0:T.crRedirectionGroup,children:e.jsx("div",{className:l.default.crRedirectionInner,style:null==T?void 0:T.crRedirectionInner,children:e.jsx(n.CustomChatCrRedirection,{isDefaultOpen:I,processItemId:p,isCompleted:x,mode:m,msg:R,type:h,text:o.text,headerText:o.headerText,decisionStrength:o.decisionStrength,id:f,gapType:E,onHandleSend:k,isGenerating:v,aiReason:y,onRedirectClick:N,statusUi:null!==(g=u[E])&&void 0!==g?g:u.recommendation,panelRef:null!=F?F:{current:null},customStyles:T,customIcons:q,cognitiveDecisionHeaders:w,metaData:o.metaDataAttrs})})},a)})]},`${t.categoryName}-${r}`))})},exports.normalizeDecisionStrength=d;
|
|
2
2
|
//# sourceMappingURL=GapFilterBlock.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i,Fragment as o}from"react/jsx-runtime";import{useState as l}from"react";import{ChevronUp as n,ChevronDown as r,Check as t,SquareArrowOutUpRight as a,Loader2 as s}from"lucide-react";import d from"./CustomChatCrRedirection.module.css.js";import c from"../ai-reasoning/AiReasoningCitationContent.js";import u from"../../icons/CognitiveDecision.js";import{Tooltip as p}from"@mui/material";function m({isDefaultOpen:m,processItemId:v,isCompleted:g,mode:h,msg:y,type:f,id:C,aiReason:x,text:
|
|
1
|
+
import{jsx as e,jsxs as i,Fragment as o}from"react/jsx-runtime";import{useState as l}from"react";import{ChevronUp as n,ChevronDown as r,Check as t,SquareArrowOutUpRight as a,Loader2 as s}from"lucide-react";import d from"./CustomChatCrRedirection.module.css.js";import c from"../ai-reasoning/AiReasoningCitationContent.js";import u from"../../icons/CognitiveDecision.js";import{Tooltip as p}from"@mui/material";function m({isDefaultOpen:m,processItemId:v,isCompleted:g,mode:h,msg:y,type:f,id:C,aiReason:x,text:D,headerText:b,decisionStrength:N,statusUi:T,panelRef:I,onHandleSend:S,onRedirectClick:k,gapType:R,isGenerating:j=!1,customStyles:B,customIcons:W,cognitiveDecisionHeaders:P,metaData:H}){const[$,A]=l(m),O=(null==W?void 0:W.highConfidence)||e(u,{}),z=()=>{"cra"===h?null==S||S(`Discuss ambiguities on ${D}`,C,H):null==S||S(`Deep Dive into ${R} ${b}: ${D}`,C,H)};return i("div",{className:[d.outerWrapper,j?d.outerWrapperDisabled:""].join(" "),style:{...null==B?void 0:B.redirectionOuterWrapper,...j?null==B?void 0:B.redirectionOuterWrapperDisabled:{}},children:[i("div",{className:[d.card,j?d.cardDisabled:d.cardInteractive].join(" "),style:{...null==B?void 0:B.redirectionCard,...j?null==B?void 0:B.redirectionCardDisabled:null==B?void 0:B.redirectionCardInteractive},children:[i("div",{className:d.leftSide,style:null==B?void 0:B.redirectionLeftSide,children:[e(p,{title:b+" "+D,placement:"top",slotProps:{tooltip:{sx:{...null==B?void 0:B.headerTooltip}}},children:i("span",{className:d.textBlock,style:null==B?void 0:B.redirectionTextBlock,children:[b&&i("span",{className:d.headerText,style:null==B?void 0:B.redirectionHeaderText,children:[b,D?" ":""]}),D]})}),i("span",{onClick:e=>{e.stopPropagation(),j||A(!$)},className:[d.reasoningToggle,j?d.reasoningToggleDisabled:d.reasoningToggleActive].join(" "),style:{...null==B?void 0:B.reasoningToggle,...j?null==B?void 0:B.reasoningToggleDisabled:null==B?void 0:B.reasoningToggleActive},children:[O,e($?n:r,{className:d.chevronIcon,style:null==B?void 0:B.chevronIcon})]})]}),g?e("div",{className:d.completeTickWrapper,style:null==B?void 0:B.completeTickWrapper,children:e(t,{color:(null==B?void 0:B.checkColor)||"green"})}):i(o,{children:["risk-gap"===h&&i("div",{className:d.rightSide,style:null==B?void 0:B.redirectionRightSide,children:[e("button",{disabled:j,className:[d.fixButton,j?d.fixButtonDisabled:""].join(" "),style:{...null==B?void 0:B.redirectionFixButton,...j?null==B?void 0:B.fixButtonDisabled:{}},onClick:e=>{e.stopPropagation(),j||z()},children:"Fix"}),e(a,{onClick:j?void 0:()=>{j||null==k||k({type:f,id:C,aiReason:x,msg:y,meta:{headerText:b,decisionStrength:N,text:D}})},size:18,className:[j?d.redirectIconDisabled:d.redirectIcon].join(" "),style:{...j?null==B?void 0:B.redirectIconDisabled:null==B?void 0:B.redirectIcon}})]}),"cra"===h&&!m&&e("div",{className:d.rightSide,style:null==B?void 0:B.redirectionRightSide,children:v===C?e("div",{className:d.loaderWrapper,style:null==B?void 0:B.loaderWrapper,children:e(s,{size:16,className:d.loaderIcon,color:"grey",style:{animation:"spin 1s linear infinite",...null==B?void 0:B.loaderIcon}})}):e("button",{className:[d.clarifyButton].join(" "),style:{color:j?"grey":"",...null==B?void 0:B.redirectionClarifyButton},disabled:j,onClick:e=>{e.stopPropagation(),z()},children:"Clarify"})})]})]}),$&&e(c,{label:"cra"===h?"Clarify":"Select this option",aiReason:{id:"1",reason:(null==x?void 0:x.Reasoning)||"",gap:(null==x?void 0:x.Gap)||"",relevance_score:Number(null==x?void 0:x.Confidence_score),explanation:(null==x?void 0:x.explanation)||""},onSelectProceed:z,customStyles:null==B?void 0:B.aiReasoningStyles,customIcons:W,cognitiveDecisionHeaders:P})]})}export{m as CustomChatCrRedirection};
|
|
2
2
|
//# sourceMappingURL=CustomChatCrRedirection.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as o,useMemo as r,useEffect as i,Children as n,isValidElement as a}from"react";import{capitalize as l}from"lodash";import{GapFilterContentWrapper as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as o,useMemo as r,useEffect as i,Children as n,isValidElement as a}from"react";import{capitalize as l}from"lodash";import{GapFilterContentWrapper as c}from"./GapFilterContentWrapper.js";import{GapFilterItem as d}from"./GapFilterItem.js";import{CustomChatCrRedirection as s}from"./CustomChatCrRedirection.js";import{SirenIcon as g,WarningIcon as u,SupportIcon as p}from"./gapFilterSvgs.js";import m from"./GapFilterBlock.module.css.js";import"react-markdown";import"rehype-raw";import"../RequirementAIWrapper/RequirementAIWrapper.js";const C=["critical","recommendation","warning"];function b(e){return(null==e?void 0:e.trim())?e.includes("%")?e:e.replace(/([0-9]+(?:\.[0-9]+)?)/g,"$1%"):""}function f(e){return n.toArray(e).filter(e=>a(e)).filter(e=>{var t;return"gapfilteritem"===e.type||"crredirection"===e.type||"function"==typeof e.type&&"crredirection"===e.type.name||(null===(t=e.key)||void 0===t?void 0:t.includes("crredirection"))}).map(e=>{var t,o;const{children:r,...i}=e.props,n={};Object.keys(i).forEach(e=>{e.startsWith("data-")||(n[e]=i[e])});const a=function(e){const t={};return Object.keys(e).forEach(o=>{o.startsWith("data-")&&(t[o.replace(/^data-/,"")]=e[o])}),t}(i),l=function(e){const t={};return Object.keys(e).forEach(o=>{o.startsWith("meta-")&&(t[o.replace(/^meta-/,"")]=e[o])}),t}(i),c=i["decision-strength"],d=i["data-is-completed"];return{text:r,headerText:i.headertext,tags:i.tags,dataAttrs:a,decisionStrength:c,attrs:n,type:"gapfilteritem"===e.type?"gapfilteritem":"crredirection",score:i.score,isCompleted:d,pendingCount:i.pendingcount,question:i.question,components:i.components,showFix:null!==(t=i.showfix)&&void 0!==t&&t,showRedirect:null!==(o=i.showredirect)&&void 0!==o&&o,metaDataAttrs:l}})}const y={critical:{labelColor:"text-gray-900",badgeBg:"bg-[#FEE4E2]",badgeText:"text-[#B42318]",iconColor:"text-[#D92D20]"},warning:{labelColor:"text-gray-900",badgeBg:"bg-[#FEF0C7]",badgeText:"text-[#B54708]",iconColor:"text-[#DC6803]"},recommendation:{labelColor:"text-gray-900",badgeBg:"bg-[#D1FADF]",badgeText:"text-[#027A48]",iconColor:"text-[#039855]"}},h=({isDefaultOpen:n,processItemId:a,mode:h,node:v,children:x,type:S,supportedmodes:k="","decision-strength":I="",pendingdata:R="",isGeneratingGap:A=!1,selectedGapItemId:F="",onItemSelect:B,onHandleSend:T,onModeAction:D,msg:w,panelRef:G,getAccordionState:N,setAccordionState:j,registerGapFilterBlockCount:E,getShowGapReviewButtonType:W,customStyles:O,customIcons:$,cognitiveDecisionHeaders:H,onRedirectClick:U})=>{const q=S,z=b(I),[L,M]=o(()=>{var e;const t=null!==(e=null==N?void 0:N(q))&&void 0!==e?e:"";return"true"!==n||t?t:q}),_=e=>{M(e),null==j||j(q,e)},J=f(x),K=r(()=>J.reduce((e,t)=>{var o,r,i;const n=null!==(o=t.tags)&&void 0!==o?o:"Uncategorized",a=null!==(i=null===(r=t.dataAttrs)||void 0===r?void 0:r.categoryid)&&void 0!==i?i:"1";let l=e.find(e=>e.categoryName===n);return l||(l={categoryName:n,categoryId:a,type:t.type,items:[]},e.push(l)),l.items.push(t),e},[]),[J]),P={critical:{labelColor:"#d92d20",badgeBackgroundColor:"#fee4e2",badgeTextColor:"#b42318",icon:e(g,{}),label:"risk-gap"===h?"Critical":"Must Clarify",decisionStrength:"< 70%"},warning:{labelColor:"#dc6803",badgeBackgroundColor:"#fef0c7",badgeTextColor:"#b54708",icon:e(u,{}),label:"risk-gap"===h?"Warning":"Should Clarify",decisionStrength:"70–90%"},recommendation:{labelColor:"#039855",badgeBackgroundColor:"#d1fadf",badgeTextColor:"#027a48",icon:e(p,{}),label:"risk-gap"===h?"Just a Suggestion":"Nice to Clarify",decisionStrength:"> 90%"},default:{labelColor:"#4b5563",badgeBackgroundColor:"#f3f4f6",badgeTextColor:"#4b5563",icon:e(p,{}),label:"",decisionStrength:""}},Q=r(()=>{return e=q,C.includes(e)?{labelColor:P[q].labelColor,badgeBackgroundColor:P[q].badgeBackgroundColor,badgeTextColor:P[q].badgeTextColor,label:P[q].label,decisionStrength:z||P[q].decisionStrength}:{labelColor:P.default.labelColor,badgeBackgroundColor:P.default.badgeBackgroundColor,badgeTextColor:P.default.badgeTextColor,label:l(q),decisionStrength:z||""};var e},[q,z]);i(()=>{null==E||E(q,J.length)},[q,J.length,E]);const V=(e,t,o={})=>{if(A)return;const r=`${K[e].categoryId}-${t}`;null==B||B(r);const i={...K[e].items[t].dataAttrs,...o};null==D||D(k,i)};return W&&W(),e(c,{mode:h,type:q,config:Q,count:J.length,handleReviewClick:()=>{J.length>0&&_(q)},openAccordion:L,onAccordionChange:e=>{_(L===e?"":e)},shouldShowReviewButton:!1,pendingData:R,customStyles:O,children:K.map((o,r)=>t("div",{className:m.categoryGroup,style:null==O?void 0:O.categoryGroup,children:["gapfilteritem"===o.type&&"Uncategorized"!==o.categoryName&&e("p",{className:m.categoryLabel,style:null==O?void 0:O.categoryLabel,children:o.categoryName}),o.items.map((t,i)=>{var n,l,c,g;const u=t.attrs||{},p=null===(n=t.dataAttrs)||void 0===n?void 0:n["cognitive-reasoning"],C=u.id||(null===(l=t.dataAttrs)||void 0===l?void 0:l.id)||"",b="I"===C[0]?"UI_REF":"CHAT_REF",f=null===(c=null==w?void 0:w.contextAwareAgentReasoning)||void 0===c?void 0:c[p],v=t.isCompleted,x="true"===u.isDefaultOpen||"true"===u.isdefaultopen;return"gapfilteritem"===t.type?e("div",{className:[m.gapFilterItemWrapper,"Uncategorized"!==o.categoryName?m.gapFilterItemWrapperIndented:""].join(" "),style:null==O?void 0:O.blockContainer,children:e(d,{isDefaultOpen:x,isCompleted:v,mode:h,index:i,isSelected:F===`${o.categoryId}-${i}`,onClick:()=>V(r,i),onFixClick:()=>V(r,i,{triggerFrom:"fix"}),onRedirect:()=>V(r,i,{triggerFrom:"redirect"}),item:t,isGenerating:A,aiReason:f,panelRef:null!=G?G:{current:null},id:p,customStyles:O,customIcons:$,cognitiveDecisionHeaders:H})},i):e("div",{className:m.crRedirectionGroup,style:null==O?void 0:O.crRedirectionGroup,children:e("div",{className:m.crRedirectionInner,style:null==O?void 0:O.crRedirectionInner,children:e(s,{isDefaultOpen:x,processItemId:a,isCompleted:v,mode:h,msg:w,type:b,text:t.text,headerText:t.headerText,decisionStrength:t.decisionStrength,id:C,gapType:q,onHandleSend:T,isGenerating:A,aiReason:f,onRedirectClick:U,statusUi:null!==(g=y[q])&&void 0!==g?g:y.recommendation,panelRef:null!=G?G:{current:null},customStyles:O,customIcons:$,cognitiveDecisionHeaders:H,metaData:t.metaDataAttrs})})},i)})]},`${o.categoryName}-${r}`))})};export{h as GapFilterBlock,b as normalizeDecisionStrength};
|
|
2
2
|
//# sourceMappingURL=GapFilterBlock.js.map
|
package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ interface CustomChatCrRedirectionProps extends InlineRefIconProps {
|
|
|
28
28
|
badgeBg: string;
|
|
29
29
|
badgeText: string;
|
|
30
30
|
};
|
|
31
|
-
onHandleSend?: (userMessage: string, id?: string) => void;
|
|
31
|
+
onHandleSend?: (userMessage: string, id?: string, metaData?: Record<string, string>) => void;
|
|
32
32
|
gapType?: string;
|
|
33
33
|
isGenerating?: boolean;
|
|
34
34
|
customStyles?: GapFilterStyles;
|
|
@@ -50,7 +50,8 @@ interface CustomChatCrRedirectionProps extends InlineRefIconProps {
|
|
|
50
50
|
text: string;
|
|
51
51
|
};
|
|
52
52
|
}) => void;
|
|
53
|
+
metaData: Record<string, string>;
|
|
53
54
|
}
|
|
54
|
-
export declare function CustomChatCrRedirection({ isDefaultOpen, processItemId, isCompleted, mode, msg, type, id, aiReason, text, headerText, decisionStrength, statusUi, panelRef, onHandleSend, onRedirectClick, gapType, isGenerating, customStyles, customIcons, cognitiveDecisionHeaders, }: CustomChatCrRedirectionProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare function CustomChatCrRedirection({ isDefaultOpen, processItemId, isCompleted, mode, msg, type, id, aiReason, text, headerText, decisionStrength, statusUi, panelRef, onHandleSend, onRedirectClick, gapType, isGenerating, customStyles, customIcons, cognitiveDecisionHeaders, metaData }: CustomChatCrRedirectionProps): import("react/jsx-runtime").JSX.Element;
|
|
55
56
|
export {};
|
|
56
57
|
//# sourceMappingURL=CustomChatCrRedirection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomChatCrRedirection.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAKnE,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,EAAE,KAAK,GAAG,UAAU,CAAA;CACzB;AAED,UAAU,4BAA6B,SAAQ,kBAAkB;IAC/D,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,KAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomChatCrRedirection.d.ts","sourceRoot":"","sources":["../../../../../../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AAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,eAAe,CAAA;IAC9B,WAAW,CAAC,EAAE,cAAc,CAAA;IAC5B,wBAAwB,CAAC,EAAE,SAAS,CAAA;IACpC;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE;QAC1B,IAAI,EAAE,OAAO,CAAC;QACd,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,eAAe,CAAC;QAC1B,GAAG,EAAE,GAAG,CAAC;QACT,IAAI,EAAE;YAAE,UAAU,CAAC,EAAE,MAAM,CAAC;YAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KACxE,KAAK,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC;AAID,wBAAgB,uBAAuB,CAAC,EACtC,aAAa,EACb,aAAa,EACb,WAAW,EACX,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,OAAO,EACP,YAAoB,EACpB,YAAY,EACZ,WAAW,EACX,wBAAwB,EACxB,QAAQ,EACT,EAAE,4BAA4B,2CAyM9B"}
|
|
@@ -26,7 +26,7 @@ export interface GapFilterBlockProps {
|
|
|
26
26
|
isGeneratingGap?: boolean;
|
|
27
27
|
selectedGapItemId?: string;
|
|
28
28
|
onItemSelect?: (id: string) => void;
|
|
29
|
-
onHandleSend?: (
|
|
29
|
+
onHandleSend?: (userMessage: string, id?: string, metaData?: Record<string, string>) => void;
|
|
30
30
|
onModeAction?: (supportedmodes: string, payload: Record<string, any>) => void;
|
|
31
31
|
msg: any;
|
|
32
32
|
panelRef?: React.RefObject<any>;
|
package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GapFilterBlock.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAajF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAgB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAOvF,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,gBAAgB,CAAC;AACtE,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAQ5C,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"GapFilterBlock.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAajF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAgB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAOvF,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,gBAAgB,CAAC;AACtE,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAQ5C,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,C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