@e-llm-studio/requirement-ai 0.0.15 → 0.0.17
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/GapFilterBlock.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/GapFilterBlock.d.ts.map +1 -1
- package/package.json +1 -4
|
@@ -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"),o=require("lodash"),r=require("./GapFilterContentWrapper.js"),i=require("./GapFilterItem.js"),l=require("./CustomChatCrRedirection.js"),a=require("./gapFilterSvgs.js"),s=require("./GapFilterBlock.module.css.js");require("react-markdown"),require("rehype-raw"),require("../RequirementAIWrapper/RequirementAIWrapper.js");var d=["critical","recommendation","warning"];function c(e){return(null==e?void 0:e.trim())?e.includes("%")?e:e.replace(/([0-9]+(?:\.[0-9]+)?)/g,"$1%"):""}function u(t){return n.Children.toArray(t).filter(function(e){return n.isValidElement(e)}).filter(function(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(function(t){var n,o,r=t.props,i=r.children,l=e.__rest(r,["children"]),a={};Object.keys(l).forEach(function(e){e.startsWith("data-")||(a[e]=l[e])});var s,d,c=(s=l,d={},Object.keys(s).forEach(function(e){e.startsWith("data-")&&(d[e.replace(/^data-/,"")]=s[e])}),d),u=l["decision-strength"];return{text:i,headerText:l.headertext,tags:l.tags,dataAttrs:c,decisionStrength:u,attrs:a,type:"gapfilteritem"===t.type?"gapfilteritem":"crredirection",score:l.score,pendingCount:l.pendingcount,question:l.question,components:l.components,showFix:null!==(n=l.showfix)&&void 0!==n&&n,showRedirect:null!==(o=l.showredirect)&&void 0!==o&&o}})}var g={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]"}};function p(n){var o=n.customStyles;return t.jsx("div",e.__assign({className:s.default.skeletonWrapper,style:null==o?void 0:o.skeletonWrapper},{children:t.jsx("div",e.__assign({className:s.default.skeletonInner,style:null==o?void 0:o.skeletonInner},{children:t.jsx("div",e.__assign({className:s.default.skeletonCard,style:null==o?void 0:o.skeletonCard},{children:t.jsxs("div",e.__assign({className:s.default.skeletonRow,style:null==o?void 0:o.skeletonRow},{children:[t.jsxs("div",e.__assign({className:s.default.skeletonTextGroup,style:null==o?void 0:o.skeletonGroup},{children:[t.jsx("div",{className:"".concat(s.default.skeletonLine," ").concat(s.default.skeletonLineLong),style:null==o?void 0:o.skeletonLineLong}),t.jsx("div",{className:"".concat(s.default.skeletonLine," ").concat(s.default.skeletonLineMedium),style:null==o?void 0:o.skeletonLineMedium})]})),t.jsxs("div",e.__assign({className:s.default.skeletonButtonGroup,style:null==o?void 0:o.skeletonButtonGroup},{children:[t.jsx("div",{className:s.default.skeletonButton,style:null==o?void 0:o.skeletonButton}),t.jsx("div",{className:s.default.skeletonIcon,style:null==o?void 0:o.skeletonIcon})]}))]}))}))}))}))}exports.GapFilterBlock=function(m){var f=m.mode;m.node;var v=m.children,y=m.type,x=m.supportedmodes,h=void 0===x?"":x,C=m["decision-strength"],b=void 0===C?"":C,k=m.pendingdata,j=void 0===k?"":k,_=m.isGeneratingGap,S=void 0!==_&&_,I=m.selectedGapItemId,R=void 0===I?"":I,B=m.onItemSelect,N=m.onHandleSend,F=m.onModeAction,G=m.msg,A=m.panelRef,T=m.getAccordionState,w=m.setAccordionState,q=m.registerGapFilterBlockCount,W=m.getShowGapReviewButtonType,E=m.customStyles,L=m.customIcons,D=y,M=c(b),z=n.useState(function(){var e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),o=require("lodash"),r=require("./GapFilterContentWrapper.js"),i=require("./GapFilterItem.js"),l=require("./CustomChatCrRedirection.js"),a=require("./gapFilterSvgs.js"),s=require("./GapFilterBlock.module.css.js");require("react-markdown"),require("rehype-raw"),require("../RequirementAIWrapper/RequirementAIWrapper.js");var d=["critical","recommendation","warning"];function c(e){return(null==e?void 0:e.trim())?e.includes("%")?e:e.replace(/([0-9]+(?:\.[0-9]+)?)/g,"$1%"):""}function u(t){return n.Children.toArray(t).filter(function(e){return n.isValidElement(e)}).filter(function(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(function(t){var n,o,r=t.props,i=r.children,l=e.__rest(r,["children"]),a={};Object.keys(l).forEach(function(e){e.startsWith("data-")||(a[e]=l[e])});var s,d,c=(s=l,d={},Object.keys(s).forEach(function(e){e.startsWith("data-")&&(d[e.replace(/^data-/,"")]=s[e])}),d),u=l["decision-strength"];return{text:i,headerText:l.headertext,tags:l.tags,dataAttrs:c,decisionStrength:u,attrs:a,type:"gapfilteritem"===t.type?"gapfilteritem":"crredirection",score:l.score,pendingCount:l.pendingcount,question:l.question,components:l.components,showFix:null!==(n=l.showfix)&&void 0!==n&&n,showRedirect:null!==(o=l.showredirect)&&void 0!==o&&o}})}var g={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]"}};function p(n){var o=n.customStyles;return t.jsx("div",e.__assign({className:s.default.skeletonWrapper,style:null==o?void 0:o.skeletonWrapper},{children:t.jsx("div",e.__assign({className:s.default.skeletonInner,style:null==o?void 0:o.skeletonInner},{children:t.jsx("div",e.__assign({className:s.default.skeletonCard,style:null==o?void 0:o.skeletonCard},{children:t.jsxs("div",e.__assign({className:s.default.skeletonRow,style:null==o?void 0:o.skeletonRow},{children:[t.jsxs("div",e.__assign({className:s.default.skeletonTextGroup,style:null==o?void 0:o.skeletonGroup},{children:[t.jsx("div",{className:"".concat(s.default.skeletonLine," ").concat(s.default.skeletonLineLong),style:null==o?void 0:o.skeletonLineLong}),t.jsx("div",{className:"".concat(s.default.skeletonLine," ").concat(s.default.skeletonLineMedium),style:null==o?void 0:o.skeletonLineMedium})]})),t.jsxs("div",e.__assign({className:s.default.skeletonButtonGroup,style:null==o?void 0:o.skeletonButtonGroup},{children:[t.jsx("div",{className:s.default.skeletonButton,style:null==o?void 0:o.skeletonButton}),t.jsx("div",{className:s.default.skeletonIcon,style:null==o?void 0:o.skeletonIcon})]}))]}))}))}))}))}exports.GapFilterBlock=function(m){var f=m.mode;m.node;var v=m.children,y=m.type,x=m.supportedmodes,h=void 0===x?"":x,C=m["decision-strength"],b=void 0===C?"":C,k=m.pendingdata,j=void 0===k?"":k,_=m.isGeneratingGap,S=void 0!==_&&_,I=m.selectedGapItemId,R=void 0===I?"":I,B=m.onItemSelect,N=m.onHandleSend,F=m.onModeAction,G=m.msg,A=m.panelRef,T=m.getAccordionState,w=m.setAccordionState,q=m.registerGapFilterBlockCount,W=m.getShowGapReviewButtonType,E=m.customStyles,L=m.customIcons,D=y,M=c(b),z=n.useState(function(){var e,t=null!==(e=null==T?void 0:T(D))&&void 0!==e?e:"";return"critical"!==D||t?t:D}),U=z[0],H=z[1],O=function(e){H(e),null==w||w(D,e)},J=u(v),P=n.useMemo(function(){return J.reduce(function(e,t){var n,o,r,i=null!==(n=t.tags)&&void 0!==n?n:"Uncategorized",l=null!==(r=null===(o=t.dataAttrs)||void 0===o?void 0:o.categoryid)&&void 0!==r?r:"1",a=e.find(function(e){return e.categoryName===i});return a||(a={categoryName:i,categoryId:l,type:t.type,items:[]},e.push(a)),a.items.push(t),e},[])},[J]),V={critical:{labelColor:"#d92d20",badgeBackgroundColor:"#fee4e2",badgeTextColor:"#b42318",icon:t.jsx(a.SirenIcon,{}),label:"risk-gap"===f?"Critical":"Must Clarify",decisionStrength:"< 70%"},warning:{labelColor:"#dc6803",badgeBackgroundColor:"#fef0c7",badgeTextColor:"#b54708",icon:t.jsx(a.WarningIcon,{}),label:"risk-gap"===f?"Warning":"Should Clarify",decisionStrength:"70–90%"},recommendation:{labelColor:"#039855",badgeBackgroundColor:"#d1fadf",badgeTextColor:"#027a48",icon:t.jsx(a.SupportIcon,{}),label:"risk-gap"===f?"Just a Suggestion":"Nice to Clarify",decisionStrength:"> 90%"},default:{labelColor:"#4b5563",badgeBackgroundColor:"#f3f4f6",badgeTextColor:"#4b5563",icon:t.jsx(a.SupportIcon,{}),label:"",decisionStrength:""}},$=n.useMemo(function(){return e=D,d.includes(e)?{labelColor:V[D].labelColor,badgeBackgroundColor:V[D].badgeBackgroundColor,badgeTextColor:V[D].badgeTextColor,label:V[D].label,decisionStrength:M||V[D].decisionStrength}:{labelColor:V.default.labelColor,badgeBackgroundColor:V.default.badgeBackgroundColor,badgeTextColor:V.default.badgeTextColor,label:o.capitalize(D),decisionStrength:M||""};var e},[D,M]);n.useEffect(function(){null==q||q(D,J.length)},[D,J.length,q]);var K=function(t,n,o){if(void 0===o&&(o={}),!S){var r="".concat(P[t].categoryId,"-").concat(n);null==B||B(r);var i=e.__assign(e.__assign({},P[t].items[n].dataAttrs),o);null==F||F(h,i)}};return W&&W(),t.jsxs(r.GapFilterContentWrapper,e.__assign({mode:f,type:D,config:$,count:J.length,handleReviewClick:function(){J.length>0&&O(D)},openAccordion:U,onAccordionChange:function(e){O(U===e?"":e)},shouldShowReviewButton:!1,pendingData:j,customStyles:E},{children:[P.map(function(n,o){return t.jsxs("div",e.__assign({className:s.default.categoryGroup,style:null==E?void 0:E.categoryGroup},{children:["gapfilteritem"===n.type&&"Uncategorized"!==n.categoryName&&t.jsx("p",e.__assign({className:s.default.categoryLabel,style:null==E?void 0:E.categoryLabel},{children:n.categoryName})),n.items.map(function(r,a){var d,c,u,p,m=r.attrs||{},v=null===(d=r.dataAttrs)||void 0===d?void 0:d["cognitive-reasoning"],y=m.id||(null===(c=r.dataAttrs)||void 0===c?void 0:c.id)||"",x="I"===y[0]?"UI_REF":"CHAT_REF",h=null===(u=null==G?void 0:G.contextAwareAgentReasoning)||void 0===u?void 0:u[v];return"gapfilteritem"===r.type?t.jsx("div",e.__assign({className:[s.default.gapFilterItemWrapper,"Uncategorized"!==n.categoryName?s.default.gapFilterItemWrapperIndented:""].join(" "),style:null==E?void 0:E.blockContainer},{children:t.jsx(i.GapFilterItem,{mode:f,index:a,isSelected:R==="".concat(n.categoryId,"-").concat(a),onClick:function(){return K(o,a)},onFixClick:function(){return K(o,a,{triggerFrom:"fix"})},onRedirect:function(){return K(o,a,{triggerFrom:"redirect"})},item:r,isGenerating:S,aiReason:h,panelRef:null!=A?A:{current:null},id:v,customStyles:E,customIcons:L})}),a):(console.log("testing::reasoningId",r.type),t.jsx("div",e.__assign({className:s.default.crRedirectionGroup,style:null==E?void 0:E.crRedirectionGroup},{children:t.jsx("div",e.__assign({className:s.default.crRedirectionInner,style:null==E?void 0:E.crRedirectionInner},{children:t.jsx(l.CustomChatCrRedirection,{mode:f,msg:G,type:x,text:r.text,headerText:r.headerText,decisionStrength:r.decisionStrength,id:y,gapType:D,onHandleSend:N,isGenerating:S,aiReason:h,statusUi:null!==(p=g[D])&&void 0!==p?p:g.recommendation,panelRef:null!=A?A:{current:null},customStyles:E,customIcons:L})}))}),a))})]}),"".concat(n.categoryName,"-").concat(o))}),S&&t.jsx(p,{customStyles:E})]}))},exports.normalizeDecisionStrength=c;
|
|
2
2
|
//# sourceMappingURL=GapFilterBlock.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__rest as t}from"tslib";import{jsx as o,jsxs as n}from"react/jsx-runtime";import{useState as r,useMemo as i,useEffect as l,Children as a,isValidElement as c}from"react";import{capitalize as d}from"lodash";import{GapFilterContentWrapper as s}from"./GapFilterContentWrapper.js";import{GapFilterItem as u}from"./GapFilterItem.js";import{CustomChatCrRedirection as g}from"./CustomChatCrRedirection.js";import{SirenIcon as m,WarningIcon as p,SupportIcon as v}from"./gapFilterSvgs.js";import f from"./GapFilterBlock.module.css.js";import"react-markdown";import"rehype-raw";import"../RequirementAIWrapper/RequirementAIWrapper.js";var y=["critical","recommendation","warning"];function h(e){return(null==e?void 0:e.trim())?e.includes("%")?e:e.replace(/([0-9]+(?:\.[0-9]+)?)/g,"$1%"):""}function b(e){return a.toArray(e).filter(function(e){return c(e)}).filter(function(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(function(e){var o,n,r=e.props,i=r.children,l=t(r,["children"]),a={};Object.keys(l).forEach(function(e){e.startsWith("data-")||(a[e]=l[e])});var c,d,s=(c=l,d={},Object.keys(c).forEach(function(e){e.startsWith("data-")&&(d[e.replace(/^data-/,"")]=c[e])}),d),u=l["decision-strength"];return{text:i,headerText:l.headertext,tags:l.tags,dataAttrs:s,decisionStrength:u,attrs:a,type:"gapfilteritem"===e.type?"gapfilteritem":"crredirection",score:l.score,pendingCount:l.pendingcount,question:l.question,components:l.components,showFix:null!==(o=l.showfix)&&void 0!==o&&o,showRedirect:null!==(n=l.showredirect)&&void 0!==n&&n}})}var C={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]"}};function k(t){var r=t.customStyles;return o("div",e({className:f.skeletonWrapper,style:null==r?void 0:r.skeletonWrapper},{children:o("div",e({className:f.skeletonInner,style:null==r?void 0:r.skeletonInner},{children:o("div",e({className:f.skeletonCard,style:null==r?void 0:r.skeletonCard},{children:n("div",e({className:f.skeletonRow,style:null==r?void 0:r.skeletonRow},{children:[n("div",e({className:f.skeletonTextGroup,style:null==r?void 0:r.skeletonGroup},{children:[o("div",{className:"".concat(f.skeletonLine," ").concat(f.skeletonLineLong),style:null==r?void 0:r.skeletonLineLong}),o("div",{className:"".concat(f.skeletonLine," ").concat(f.skeletonLineMedium),style:null==r?void 0:r.skeletonLineMedium})]})),n("div",e({className:f.skeletonButtonGroup,style:null==r?void 0:r.skeletonButtonGroup},{children:[o("div",{className:f.skeletonButton,style:null==r?void 0:r.skeletonButton}),o("div",{className:f.skeletonIcon,style:null==r?void 0:r.skeletonIcon})]}))]}))}))}))}))}var x=function(t){var a=t.mode;t.node;var c=t.children,x=t.type,S=t.supportedmodes,I=void 0===S?"":S,N=t["decision-strength"],R=void 0===N?"":N,B=t.pendingdata,A=void 0===B?"":B,F=t.isGeneratingGap,G=void 0!==F&&F,T=t.selectedGapItemId,w=void 0===T?"":T,j=t.onItemSelect,L=t.onHandleSend,W=t.onModeAction,E=t.msg,D=t.panelRef,U=t.getAccordionState,q=t.setAccordionState,M=t.registerGapFilterBlockCount,z=t.getShowGapReviewButtonType,H=t.customStyles,O=t.customIcons,_=x,J=h(R),$=r(function(){var e
|
|
1
|
+
import{__assign as e,__rest as t}from"tslib";import{jsx as o,jsxs as n}from"react/jsx-runtime";import{useState as r,useMemo as i,useEffect as l,Children as a,isValidElement as c}from"react";import{capitalize as d}from"lodash";import{GapFilterContentWrapper as s}from"./GapFilterContentWrapper.js";import{GapFilterItem as u}from"./GapFilterItem.js";import{CustomChatCrRedirection as g}from"./CustomChatCrRedirection.js";import{SirenIcon as m,WarningIcon as p,SupportIcon as v}from"./gapFilterSvgs.js";import f from"./GapFilterBlock.module.css.js";import"react-markdown";import"rehype-raw";import"../RequirementAIWrapper/RequirementAIWrapper.js";var y=["critical","recommendation","warning"];function h(e){return(null==e?void 0:e.trim())?e.includes("%")?e:e.replace(/([0-9]+(?:\.[0-9]+)?)/g,"$1%"):""}function b(e){return a.toArray(e).filter(function(e){return c(e)}).filter(function(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(function(e){var o,n,r=e.props,i=r.children,l=t(r,["children"]),a={};Object.keys(l).forEach(function(e){e.startsWith("data-")||(a[e]=l[e])});var c,d,s=(c=l,d={},Object.keys(c).forEach(function(e){e.startsWith("data-")&&(d[e.replace(/^data-/,"")]=c[e])}),d),u=l["decision-strength"];return{text:i,headerText:l.headertext,tags:l.tags,dataAttrs:s,decisionStrength:u,attrs:a,type:"gapfilteritem"===e.type?"gapfilteritem":"crredirection",score:l.score,pendingCount:l.pendingcount,question:l.question,components:l.components,showFix:null!==(o=l.showfix)&&void 0!==o&&o,showRedirect:null!==(n=l.showredirect)&&void 0!==n&&n}})}var C={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]"}};function k(t){var r=t.customStyles;return o("div",e({className:f.skeletonWrapper,style:null==r?void 0:r.skeletonWrapper},{children:o("div",e({className:f.skeletonInner,style:null==r?void 0:r.skeletonInner},{children:o("div",e({className:f.skeletonCard,style:null==r?void 0:r.skeletonCard},{children:n("div",e({className:f.skeletonRow,style:null==r?void 0:r.skeletonRow},{children:[n("div",e({className:f.skeletonTextGroup,style:null==r?void 0:r.skeletonGroup},{children:[o("div",{className:"".concat(f.skeletonLine," ").concat(f.skeletonLineLong),style:null==r?void 0:r.skeletonLineLong}),o("div",{className:"".concat(f.skeletonLine," ").concat(f.skeletonLineMedium),style:null==r?void 0:r.skeletonLineMedium})]})),n("div",e({className:f.skeletonButtonGroup,style:null==r?void 0:r.skeletonButtonGroup},{children:[o("div",{className:f.skeletonButton,style:null==r?void 0:r.skeletonButton}),o("div",{className:f.skeletonIcon,style:null==r?void 0:r.skeletonIcon})]}))]}))}))}))}))}var x=function(t){var a=t.mode;t.node;var c=t.children,x=t.type,S=t.supportedmodes,I=void 0===S?"":S,N=t["decision-strength"],R=void 0===N?"":N,B=t.pendingdata,A=void 0===B?"":B,F=t.isGeneratingGap,G=void 0!==F&&F,T=t.selectedGapItemId,w=void 0===T?"":T,j=t.onItemSelect,L=t.onHandleSend,W=t.onModeAction,E=t.msg,D=t.panelRef,U=t.getAccordionState,q=t.setAccordionState,M=t.registerGapFilterBlockCount,z=t.getShowGapReviewButtonType,H=t.customStyles,O=t.customIcons,_=x,J=h(R),$=r(function(){var e,t=null!==(e=null==U?void 0:U(_))&&void 0!==e?e:"";return"critical"!==_||t?t:_}),K=$[0],P=$[1],Q=function(e){P(e),null==q||q(_,e)},V=b(c),X=i(function(){return V.reduce(function(e,t){var o,n,r,i=null!==(o=t.tags)&&void 0!==o?o:"Uncategorized",l=null!==(r=null===(n=t.dataAttrs)||void 0===n?void 0:n.categoryid)&&void 0!==r?r:"1",a=e.find(function(e){return e.categoryName===i});return a||(a={categoryName:i,categoryId:l,type:t.type,items:[]},e.push(a)),a.items.push(t),e},[])},[V]),Y={critical:{labelColor:"#d92d20",badgeBackgroundColor:"#fee4e2",badgeTextColor:"#b42318",icon:o(m,{}),label:"risk-gap"===a?"Critical":"Must Clarify",decisionStrength:"< 70%"},warning:{labelColor:"#dc6803",badgeBackgroundColor:"#fef0c7",badgeTextColor:"#b54708",icon:o(p,{}),label:"risk-gap"===a?"Warning":"Should Clarify",decisionStrength:"70–90%"},recommendation:{labelColor:"#039855",badgeBackgroundColor:"#d1fadf",badgeTextColor:"#027a48",icon:o(v,{}),label:"risk-gap"===a?"Just a Suggestion":"Nice to Clarify",decisionStrength:"> 90%"},default:{labelColor:"#4b5563",badgeBackgroundColor:"#f3f4f6",badgeTextColor:"#4b5563",icon:o(v,{}),label:"",decisionStrength:""}},Z=i(function(){return e=_,y.includes(e)?{labelColor:Y[_].labelColor,badgeBackgroundColor:Y[_].badgeBackgroundColor,badgeTextColor:Y[_].badgeTextColor,label:Y[_].label,decisionStrength:J||Y[_].decisionStrength}:{labelColor:Y.default.labelColor,badgeBackgroundColor:Y.default.badgeBackgroundColor,badgeTextColor:Y.default.badgeTextColor,label:d(_),decisionStrength:J||""};var e},[_,J]);l(function(){null==M||M(_,V.length)},[_,V.length,M]);var ee=function(t,o,n){if(void 0===n&&(n={}),!G){var r="".concat(X[t].categoryId,"-").concat(o);null==j||j(r);var i=e(e({},X[t].items[o].dataAttrs),n);null==W||W(I,i)}};return z&&z(),n(s,e({mode:a,type:_,config:Z,count:V.length,handleReviewClick:function(){V.length>0&&Q(_)},openAccordion:K,onAccordionChange:function(e){Q(K===e?"":e)},shouldShowReviewButton:!1,pendingData:A,customStyles:H},{children:[X.map(function(t,r){return n("div",e({className:f.categoryGroup,style:null==H?void 0:H.categoryGroup},{children:["gapfilteritem"===t.type&&"Uncategorized"!==t.categoryName&&o("p",e({className:f.categoryLabel,style:null==H?void 0:H.categoryLabel},{children:t.categoryName})),t.items.map(function(n,i){var l,c,d,s,m=n.attrs||{},p=null===(l=n.dataAttrs)||void 0===l?void 0:l["cognitive-reasoning"],v=m.id||(null===(c=n.dataAttrs)||void 0===c?void 0:c.id)||"",y="I"===v[0]?"UI_REF":"CHAT_REF",h=null===(d=null==E?void 0:E.contextAwareAgentReasoning)||void 0===d?void 0:d[p];return"gapfilteritem"===n.type?o("div",e({className:[f.gapFilterItemWrapper,"Uncategorized"!==t.categoryName?f.gapFilterItemWrapperIndented:""].join(" "),style:null==H?void 0:H.blockContainer},{children:o(u,{mode:a,index:i,isSelected:w==="".concat(t.categoryId,"-").concat(i),onClick:function(){return ee(r,i)},onFixClick:function(){return ee(r,i,{triggerFrom:"fix"})},onRedirect:function(){return ee(r,i,{triggerFrom:"redirect"})},item:n,isGenerating:G,aiReason:h,panelRef:null!=D?D:{current:null},id:p,customStyles:H,customIcons:O})}),i):(console.log("testing::reasoningId",n.type),o("div",e({className:f.crRedirectionGroup,style:null==H?void 0:H.crRedirectionGroup},{children:o("div",e({className:f.crRedirectionInner,style:null==H?void 0:H.crRedirectionInner},{children:o(g,{mode:a,msg:E,type:y,text:n.text,headerText:n.headerText,decisionStrength:n.decisionStrength,id:v,gapType:_,onHandleSend:L,isGenerating:G,aiReason:h,statusUi:null!==(s=C[_])&&void 0!==s?s:C.recommendation,panelRef:null!=D?D:{current:null},customStyles:H,customIcons:O})}))}),i))})]}),"".concat(t.categoryName,"-").concat(r))}),G&&o(k,{customStyles:H})]}))};export{x as GapFilterBlock,h as normalizeDecisionStrength};
|
|
2
2
|
//# sourceMappingURL=GapFilterBlock.js.map
|
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,EAAgB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAO5E,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,gBAAgB,CAAC;AACtE,MAAM,MAAM,OAAO,GAAG,U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AM,KAAK,MAAM,CAAC;IAC7C,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,2BAA2B,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,0BAA0B,CAAC,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;IACxD,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,WAAW,CAAC,EAAE,cAAc,CAAA;CAC7B;AAID,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
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,EAAgB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAO5E,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;AAcD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI7D;AA6F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AI,EAAE,KAAK,GAAG,UAAU,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IAGjB,GAAG,EAAE,GAAG,CAAC;IACT,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,WAAW,CAAC,EAAE,cAAc,CAAA;CAC7B;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAqH9E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-llm-studio/requirement-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"author": "Saptyadeep Bhattacharjee",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -346,9 +346,6 @@
|
|
|
346
346
|
"pdfjs-dist": {
|
|
347
347
|
"optional": true
|
|
348
348
|
},
|
|
349
|
-
"@react-pdf-viewer/core": {
|
|
350
|
-
"optional": true
|
|
351
|
-
},
|
|
352
349
|
"@react-pdf-viewer/page-navigation": {
|
|
353
350
|
"optional": true
|
|
354
351
|
},
|