@e-llm-studio/instant-learning 0.0.260 → 0.0.261
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/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/features/IL-OTJ/_components/AccordianSection.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponents/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/CriticalGaps.js +1 -1
- package/dist/features/IL-OTJ/_components/MessageRendering/MessageRendering.js +1 -1
- package/dist/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/features/IL-OTJ/helpers/message-rendering-utils.js +1 -1
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/AccordianSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponents/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CriticalGaps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/NewMinimizedThinkingSteps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +2 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/helpers/message-rendering-utils.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as n,__rest as t}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import o,{useState as l,useRef as a,useEffect as s,useMemo as d}from"react";import{Box as c,Typography as p,IconButton as h,Skeleton as u}from"@mui/material";import{ArrowLeft as g,ArrowRight as x}from"lucide-react";import f from"../../_svg/SparkleIcon.js";import{CognitiveDecisioningCard as m}from"@e-llm-studio/citation";import{ButtonCognitiveIcon as b}from"../../_svg/ButtonCognitiveIcon.js";var v=function(e,n){if(!n)return null;var t=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),i=n.match(t);return i?i[1].replace(/\\n/g,"\n"):null},y=function(e,n,t){var i=100*e;if(!t)return{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:"Not Defined"};var r=function(e){return e&&"null"!==e.toLowerCase()?e.split("_").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" "):"Different"}(n);return i>=70?{bg:"#FEF2F2",border:"#FEE2E2",badgeBg:"#FEF2F2",badgeBorder:"#FECACA",badgeText:"#B91C1C",highlightBg:"#FECACA",label:r}:i>=40?{bg:"#FFFCF6",border:"#FFDD80",badgeBg:"#FEF9C3",badgeBorder:"#FEF08A",badgeText:"#A16207",highlightBg:"#FDDEB3",label:r}:{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:r}},w=o.forwardRef(function(n,t){var o=n.label,l=n.content,a=n.highlights,s=void 0===a?[]:a,d=n.styleVariant,h=n.isHighlighted,u=void 0!==h&&h,g=Array.isArray(l)?l.join("\n"):l||"",x="#B91C1C"===d.badgeText?{borderColor:"#EF4444",shadow:"rgba(239, 68, 68, 0.25)"}:"#A16207"===d.badgeText?{borderColor:"#F59E0B",shadow:"rgba(245, 158, 11, 0.25)"}:{borderColor:"#6366F1",shadow:"rgba(99, 102, 241, 0.25)"};return i(c,e({sx:{mb:1.5}},{children:[r(p,e({sx:{fontSize:"12px",color:"#19213D",mb:.5,fontWeight:500,lineHeight:"130%"}},{children:o})),r(c,e({ref:t,sx:{p:"4px 12px",borderRadius:"6px",border:u?"1.5px solid ".concat(x.borderColor):"1px solid ".concat(d.border),boxShadow:u?"0px 0px 0px 2px ".concat(x.shadow):"none",bgcolor:d.bg,fontSize:"13px",color:"#0B0E1A",lineHeight:1.4,minHeight:"24px",display:"flex",alignItems:"center",whiteSpace:"pre-line",wordBreak:"break-word"}},{children:r(c,{children:function(){if(!g)return r(p,e({sx:{color:"#94A3B8",fontSize:"12px",fontStyle:"italic"}},{children:"Not Defined"}));if(!s||0===s.length)return g;var n=s.filter(function(e){return e&&e.length>0}).map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(0===n.length)return g;var t=new RegExp("(".concat(n.join("|"),")"),"gi");return g.split(t).map(function(n,t){return s.some(function(e){return e&&e.toLowerCase()===n.toLowerCase()})?r(c,e({component:"span",sx:{bgcolor:d.highlightBg,borderRadius:"2px",px:"2px"}},{children:n}),t):n})}()})}))]}))}),F=function(n){var t=n.data,o=n.isSelected,l=n.isCognitiveOpen,a=n.onToggleCognitive,s=n.onClick,d=t.summaryText||t.description||"",h=d.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),g=h?d.replace(h[0],"").trim():d,x=!!h;return i(c,e({id:"variant-card-".concat(t.id),onClick:s,sx:{minWidth:"280px",maxWidth:"280px",p:2,m:.5,bgcolor:o?"#EFF6FF99":"#FFFFFF",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",gap:1,flexShrink:0,opacity:t.isLoading?.7:1,border:o?"1.4px solid #2563EB":null,boxShadow:o?"none":"0px 2px 4px 0px #19213D14","&:hover":{borderColor:o?"#2563EB":"#CBD5E1",boxShadow:o?"none":"0px 4px 8px 0px #19213D1F"}}},{children:[r(c,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:t.isLoading?r(u,{variant:"rounded",width:80,height:20}):i(c,e({sx:{bgcolor:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:600,px:1,py:.5,borderRadius:"100px",border:"1px solid #FFE1E1"}},{children:[void 0!==t.similarity?t.similarity:0,"% Similarity"]}))})),i(c,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"}},{children:[r(p,e({title:t.title,sx:{fontWeight:500,fontSize:"14px",color:"#19213D",lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"}},{children:t.title})),t.scope&&r(c,e({sx:{flexShrink:0,fontSize:"10px",fontWeight:600,color:"#19213D",bgcolor:"#FFF",border:"1px solid #EDEFF2",px:.75,py:.25,borderRadius:"6px",lineHeight:1.4,whiteSpace:"nowrap"}},{children:t.scope}))]})),t.isLoading?i(c,{children:[r(u,{width:"90%"}),r(u,{width:"60%"})]}):i(c,e({title:g,sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[r(p,e({sx:{fontWeight:400,fontSize:"13px",color:"#666F8D",lineHeight:1.4,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"}},{children:g})),x&&i(c,e({onClick:function(e){e.stopPropagation(),o||s(),a()},sx:{display:"inline-flex",alignItems:"center",alignSelf:"flex-start",gap:"4px",padding:"2px 6px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",marginLeft:"-4px","&:hover":{backgroundColor:"#F1F5F9"}}},{children:[r("div",e({style:{width:"13px",height:"13px",display:"flex",alignItems:"center"}},{children:r(b,{})})),r("svg",e({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:o&&l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:r("path",{d:"M6 9l6 6 6-6"})}))]}))]}))]}))]}))},_=function(o){var u,_,C=o.proposedRule,B=o.variants,E=void 0===B?[]:B,k=o.onSelectVariant;o.onAddAsVariant;var S=o.onSkip,A=o.onBack,D=o.targetVariantId,W=o.highlightedField,L=l(D||null),z=L[0],T=L[1],R=l(!1),I=R[0],j=R[1],H=l(null),O=H[0],M=H[1],V=a(null),N=a(null);s(function(){if(D&&T(D),M(null!=W?W:null),W){var e=setTimeout(function(){return M(null)},6e3);return function(){return clearTimeout(e)}}},[D,W]);var U=function(e){V.current&&V.current.scrollBy({left:"left"===e?-300:300,behavior:"smooth"})},P=d(function(){return n([],E,!0).sort(function(e,n){return(n.similarity||0)-(e.similarity||0)})},[E]),Y=d(function(){if(z){var e=String(z).trim();return E.find(function(n){return n.id&&String(n.id).trim()===e})||P[0]}return P.length>0?P[0]:null},[z,E,P]);s(function(){if(z&&V.current){var e=z.trim();setTimeout(function(){var n=document.getElementById("variant-card-".concat(e)),t=V.current;if(n&&t){var i=n.offsetLeft-t.offsetLeft-t.clientWidth/2+n.clientWidth/2;t.scrollTo({left:i,behavior:"smooth"})}},150)}},[z,P]);var $=Y||{title:"",scope:"",description:"",wta:"",wnta:"",variantType:"Default"},q=null==Y?void 0:Y.analysis,J=(null===(_=null===(u=null==q?void 0:q.rule_difference_comparison)||void 0===u?void 0:u.summary)||void 0===_?void 0:_.overall_summary)||"",X=J.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),G=!!X,K=X?X[1]:"",Q=v("reason",K)||"",Z=v("gap",K)||"",ee=v("relevance_score",K)||"",ne=d(function(){return{ul:function(n){n.node;var i=t(n,["node"]);return r("ol",e({},i,{style:{paddingLeft:"1.25rem",listStyleType:"decimal",margin:0}}))},li:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},ol:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},a:function(n){var o=n.href,l=n.children,a=t(n,["href","children"]);if(!o)return r("a",e({},a,{children:l}));var s=o||"";try{s=decodeURIComponent(o)}catch(e){console.error("Error decoding href",e)}if(s.includes("variant_id=")){var d="",c="",p=s.match(/variant_id=([^?&]+)/);p&&(d=p[1]);var h=s.match(/field_name=([^&]+)/);return h&&(c=h[1]),i("button",e({type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),T(d),M(c),setTimeout(function(){return M(null)},6e3)},style:{background:"none",border:"none",outline:"none",borderRadius:"6px",padding:"1px 4px",color:"#0F172A",cursor:"pointer",fontSize:"13px",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"2px",margin:"0 1px",verticalAlign:"baseline",textDecoration:"none",boxShadow:"none",WebkitAppearance:"none",MozAppearance:"none"},title:"View Comparison"},{children:[l,r("svg",e({width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M10.2082 8.67708H2.0415M2.0415 8.67708L4.08317 6.63542M2.0415 8.67708L4.08317 10.7188M2.0415 3.57292H10.2082M10.2082 3.57292L8.1665 1.53125M10.2082 3.57292L8.1665 5.61458",stroke:"#0F172A",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}))]}))}return r("a",e({href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"#7C3AED"}},a,{children:l}))}}},[]);s(function(){!z&&!D&&P.length>0&&!P[0].isLoading&&T(P[0].id)},[P,z,D]);var te=a(null),ie=l([]),re=ie[0],oe=ie[1],le=l(!1),ae=le[0],se=le[1],de=l(!1),ce=de[0],pe=de[1];s(function(){var e=V.current;if(e){var n=function(){se(e.scrollLeft>0),pe(e.scrollLeft+e.clientWidth<e.scrollWidth-1)};return n(),e.addEventListener("scroll",n),window.addEventListener("resize",n),function(){e.removeEventListener("scroll",n),window.removeEventListener("resize",n)}}},[P]);var he={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)},ue={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)};s(function(){if(O){var e="when_to_apply"===O?"wta":"when_not_to_apply"===O?"wnta":O,n=he[e]||ue[e];n&&n.current&&setTimeout(function(){n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}},[O]);var ge=function(e){var n,t,i,r,o,l=null===(n=null==q?void 0:q.rule_difference_comparison)||void 0===n?void 0:n.fields,a="when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e,s=!(!C[a]&&!$[a]);if(!l||!l[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=l[e];if(d.mappings){var c=d.mappings[0]||{};return{score:d.score,relation:c.relation||"",highlightsA:(null===(t=c.highlights)||void 0===t?void 0:t.ruleA_spans)||[],highlightsB:(null===(i=c.highlights)||void 0===i?void 0:i.ruleB_spans)||[],hasContent:s}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(r=d.highlights)||void 0===r?void 0:r.ruleA_spans)||[],highlightsB:(null===(o=d.highlights)||void 0===o?void 0:o.ruleB_spans)||[],hasContent:s}},xe=["title","scope","description","when_to_apply","when_not_to_apply"],fe=function(){if(te.current){var e=te.current.getBoundingClientRect(),n=[];xe.forEach(function(t){var i="when_to_apply"===t?he.wta:"when_not_to_apply"===t?he.wnta:he[t],r="when_to_apply"===t?ue.wta:"when_not_to_apply"===t?ue.wnta:ue[t];if(i.current&&r.current){i.current.style.height="auto",r.current.style.height="auto";var o=i.current.getBoundingClientRect(),l=r.current.getBoundingClientRect(),a=Math.max(o.height,l.height);i.current.style.height="".concat(a,"px"),r.current.style.height="".concat(a,"px");var s=i.current.getBoundingClientRect(),d=r.current.getBoundingClientRect(),c=ge(t),p=y(c.score,c.relation,c.hasContent),h=s.top+s.height/2-e.top;n.push({x1:s.right-e.left,y1:h,x2:d.left-e.left,y2:h,style:p})}}),oe(n)}};return s(function(){var e=setTimeout(fe,250);window.addEventListener("resize",fe);var n=null;return te.current&&(n=new ResizeObserver(function(){window.requestAnimationFrame(function(){fe()})})).observe(te.current),function(){clearTimeout(e),window.removeEventListener("resize",fe),n&&n.disconnect()}},[C,$,q,I]),i(c,e({sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden"}},{children:[i(c,e({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4"}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1}},{children:[r(h,e({onClick:A,size:"small"},{children:r(g,{})})),r(p,e({sx:{fontSize:"16px",fontWeight:450,color:"#0F172A"}},{children:"Rule Comparison"}))]})),r(h,e({onClick:S,size:"small"},{children:r(c,e({sx:{fontSize:24,lineHeight:.5}},{children:"×"}))}))]})),P.length>1&&i(c,e({sx:{px:3,pb:.25}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1}},{children:[r(p,e({sx:{fontSize:"13px",color:"#475569"}},{children:"Choose the Learning you want to compare with the rule you are creating."})),i(c,e({sx:{display:"flex",gap:.5,flexShrink:0,ml:1}},{children:[r(h,e({onClick:function(){return U("left")},size:"small",disabled:!ae},{children:r(g,{size:18})})),r(h,e({onClick:function(){return U("right")},size:"small",disabled:!ce},{children:r(x,{size:18})}))]}))]})),r(c,e({ref:V,sx:{display:"flex",gap:1,overflowX:"auto",pb:.05,"&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"transparent",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:"transparent"}}},{children:P.map(function(e){return r(F,{data:e,isSelected:(null==Y?void 0:Y.id)===e.id,isCognitiveOpen:I,onToggleCognitive:function(){j(function(e){var n=!e;return n&&N.current&&N.current.scrollTo({top:0,behavior:"smooth"}),n})},onClick:function(){return T((n=e).id),k(n),void j(!1);var n}},e.id)})}))]})),r(c,e({ref:N,sx:{flex:1,overflowY:"auto",py:1.5,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",borderTop:J&&G&&I?"none":"1.5px solid #EEF0F4"}},{children:i(c,e({sx:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"}},{children:[J&&G&&I&&r(c,e({sx:{width:"100%",pb:1,animation:"fadeIn 0.2s ease-out","& > div > button":{display:"none !important"},"& > div > div":{marginTop:"0px"}}},{children:r(m,{headerIcon:r(b,{}),reasoning:Q,gap:Z,score:ee,mdComponents:ne,isOpen:!0,onToggle:function(){return j(!1)}})})),i(c,e({ref:te,sx:{display:"grid",gridTemplateColumns:"1fr auto 1fr",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative"}},{children:[r("svg",e({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}},{children:re.map(function(n,t){var o=(n.x1+n.x2)/2,l=n.y1;return i("g",{children:[r("line",{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,stroke:n.style.badgeBorder,strokeWidth:"1"}),r("foreignObject",e({x:o-125,y:l-16,width:"250",height:"32"},{children:r(c,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:r(c,e({sx:{fontSize:"11px",bgcolor:n.style.badgeBg,color:n.style.badgeText,border:"1px solid ".concat(n.style.badgeBorder),borderRadius:"12px",px:1.5,py:.25,fontWeight:500,textAlign:"center",whiteSpace:"nowrap"}},{children:n.style.label}))}))}))]},t)})})),i(c,e({sx:{border:"1px dashed #B0B0B0",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px dashed #B0B0B0",borderRadius:"8px 8px 0 0",display:"flex",minHeight:"24px",alignItems:"center"}},{children:r(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#19213D"}},{children:"Rule You’re Creating"}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ge(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?he.wta:"when_not_to_apply"===e?he.wnta:he[e],o=C["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsA,styleVariant:t,isHighlighted:O===e},"left-".concat(e))})}))]})),r(c,{sx:{width:"1px"}}),i(c,e({sx:{border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"24px",display:"flex",alignItems:"center"}},{children:i(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",display:"flex",alignItems:"center",gap:1}},{children:[r("div",e({style:{width:"18px",height:"18px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:r(f,{})})),"Existing Rule"]}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ge(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?ue.wta:"when_not_to_apply"===e?ue.wnta:ue[e],o=$["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsB,styleVariant:t,isHighlighted:O===e},"right-".concat(e))})}))]}))]}))]}))}))]}))};export{_ as default};
|
|
1
|
+
import{__assign as e,__spreadArray as n,__rest as t}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import o,{useState as l,useRef as a,useEffect as s,useMemo as d}from"react";import{Box as c,Typography as p,IconButton as h,Skeleton as g}from"@mui/material";import{ArrowLeft as u,ArrowRight as x}from"lucide-react";import f from"../../_svg/SparkleIcon.js";import{CognitiveDecisioningCard as m}from"@e-llm-studio/citation";import{ButtonCognitiveIcon as b}from"../../_svg/ButtonCognitiveIcon.js";var v=function(e,n){if(!n)return null;var t=new RegExp("<".concat(e,"[^>]*>([\\s\\S]*?)<\\/").concat(e,">"),"i"),i=n.match(t);return i?i[1].replace(/\\n/g,"\n"):null},y=function(e,n,t){var i=100*e;if(!t)return{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:"Not Defined"};var r=function(e){return e.split("_").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}).join(" ")}(n);return i>=70?{bg:"#FEF2F2",border:"#FEE2E2",badgeBg:"#FEF2F2",badgeBorder:"#FECACA",badgeText:"#B91C1C",highlightBg:"#FECACA",label:r}:i>=40?{bg:"#FFFCF6",border:"#FFDD80",badgeBg:"#FEF9C3",badgeBorder:"#FEF08A",badgeText:"#A16207",highlightBg:"#FDDEB3",label:r}:{bg:"#FFFFFF",border:"#E2E8F0",badgeBg:"#F1F5F9",badgeBorder:"#CBD5E1",badgeText:"#64748B",highlightBg:"transparent",label:r}},w=o.forwardRef(function(n,t){var o=n.label,l=n.content,a=n.highlights,s=void 0===a?[]:a,d=n.styleVariant,h=n.isHighlighted,g=void 0!==h&&h,u=Array.isArray(l)?l.join("\n"):l||"",x="#B91C1C"===d.badgeText?{borderColor:"#EF4444",shadow:"rgba(239, 68, 68, 0.25)"}:"#A16207"===d.badgeText?{borderColor:"#F59E0B",shadow:"rgba(245, 158, 11, 0.25)"}:{borderColor:"#6366F1",shadow:"rgba(99, 102, 241, 0.25)"};return i(c,e({sx:{mb:1.5}},{children:[r(p,e({sx:{fontSize:"12px",color:"#19213D",mb:.5,fontWeight:500,lineHeight:"130%"}},{children:o})),r(c,e({ref:t,sx:{p:"4px 12px",borderRadius:"6px",border:g?"1.5px solid ".concat(x.borderColor):"1px solid ".concat(d.border),boxShadow:g?"0px 0px 0px 2px ".concat(x.shadow):"none",bgcolor:d.bg,fontSize:"13px",color:"#0B0E1A",lineHeight:1.4,minHeight:"24px",display:"flex",alignItems:"center",whiteSpace:"pre-line",wordBreak:"break-word"}},{children:r(c,{children:function(){if(!u)return r(p,e({sx:{color:"#94A3B8",fontSize:"12px",fontStyle:"italic"}},{children:"Not Defined"}));if(!s||0===s.length)return u;var n=s.filter(function(e){return e&&e.length>0}).map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(0===n.length)return u;var t=new RegExp("(".concat(n.join("|"),")"),"gi");return u.split(t).map(function(n,t){return s.some(function(e){return e&&e.toLowerCase()===n.toLowerCase()})?r(c,e({component:"span",sx:{bgcolor:d.highlightBg,borderRadius:"2px",px:"2px"}},{children:n}),t):n})}()})}))]}))}),F=function(n){var t=n.data,o=n.isSelected,l=n.isCognitiveOpen,a=n.onToggleCognitive,s=n.onClick,d=t.summaryText||t.description||"",h=d.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),u=h?d.replace(h[0],"").trim():d,x=!!h;return i(c,e({id:"variant-card-".concat(t.id),onClick:s,sx:{minWidth:"280px",maxWidth:"280px",p:2,m:.5,bgcolor:o?"#EFF6FF99":"#FFFFFF",borderRadius:"8px",cursor:"pointer",transition:"all 0.2s",display:"flex",flexDirection:"column",gap:1,flexShrink:0,opacity:t.isLoading?.7:1,border:o?"1.4px solid #2563EB":null,boxShadow:o?"none":"0px 2px 4px 0px #19213D14","&:hover":{borderColor:o?"#2563EB":"#CBD5E1",boxShadow:o?"none":"0px 4px 8px 0px #19213D1F"}}},{children:[r(c,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:t.isLoading?r(g,{variant:"rounded",width:80,height:20}):i(c,e({sx:{bgcolor:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:600,px:1,py:.5,borderRadius:"100px",border:"1px solid #FFE1E1"}},{children:[void 0!==t.similarity?t.similarity:0,"% Similarity"]}))})),i(c,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"nowrap"}},{children:[r(p,e({title:t.title,sx:{fontWeight:500,fontSize:"14px",color:"#19213D",lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block"}},{children:t.title})),t.scope&&r(c,e({sx:{flexShrink:0,fontSize:"10px",fontWeight:600,color:"#19213D",bgcolor:"#FFF",border:"1px solid #EDEFF2",px:.75,py:.25,borderRadius:"6px",lineHeight:1.4,whiteSpace:"nowrap"}},{children:t.scope}))]})),t.isLoading?i(c,{children:[r(g,{width:"90%"}),r(g,{width:"60%"})]}):i(c,e({title:u,sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[r(p,e({sx:{fontWeight:400,fontSize:"13px",color:"#666F8D",lineHeight:1.4,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"}},{children:u})),x&&i(c,e({onClick:function(e){e.stopPropagation(),o||s(),a()},sx:{display:"inline-flex",alignItems:"center",alignSelf:"flex-start",gap:"4px",padding:"2px 6px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",marginLeft:"-4px","&:hover":{backgroundColor:"#F1F5F9"}}},{children:[r("div",e({style:{width:"13px",height:"13px",display:"flex",alignItems:"center"}},{children:r(b,{})})),r("svg",e({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:o&&l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},{children:r("path",{d:"M6 9l6 6 6-6"})}))]}))]}))]}))]}))},_=function(o){var g,_,C=o.proposedRule,B=o.variants,E=void 0===B?[]:B,k=o.onSelectVariant;o.onAddAsVariant;var S=o.onSkip,A=o.onBack,L=o.targetVariantId,D=o.highlightedField,W=l(L||null),z=W[0],T=W[1],I=l(!1),R=I[0],j=I[1],H=l(null),O=H[0],M=H[1],V=a(null),N=a(null);s(function(){if(L&&T(L),M(null!=D?D:null),D){var e=setTimeout(function(){return M(null)},6e3);return function(){return clearTimeout(e)}}},[L,D]);var U=function(e){V.current&&V.current.scrollBy({left:"left"===e?-300:300,behavior:"smooth"})},P=d(function(){return n([],E,!0).sort(function(e,n){return(n.similarity||0)-(e.similarity||0)})},[E]),Y=d(function(){if(z){var e=String(z).trim();return E.find(function(n){return n.id&&String(n.id).trim()===e})||P[0]}return P.length>0?P[0]:null},[z,E,P]);s(function(){if(z&&V.current){var e=z.trim();setTimeout(function(){var n=document.getElementById("variant-card-".concat(e)),t=V.current;if(n&&t){var i=n.offsetLeft-t.offsetLeft-t.clientWidth/2+n.clientWidth/2;t.scrollTo({left:i,behavior:"smooth"})}},150)}},[z,P]);var $=Y||{title:"",scope:"",description:"",wta:"",wnta:"",variantType:"Default"},q=null==Y?void 0:Y.analysis,J=(null===(_=null===(g=null==q?void 0:q.rule_difference_comparison)||void 0===g?void 0:g.summary)||void 0===_?void 0:_.overall_summary)||"",X=J.match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),G=!!X,K=X?X[1]:"",Q=v("reason",K)||"",Z=v("gap",K)||"",ee=v("relevance_score",K)||"",ne=d(function(){return{ul:function(n){n.node;var i=t(n,["node"]);return r("ol",e({},i,{style:{paddingLeft:"1.25rem",listStyleType:"decimal",margin:0}}))},li:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},ol:function(n){n.node;var i=t(n,["node"]);return r("li",e({},i,{style:{marginBottom:"4px",listStyleType:"decimal"}},{children:i.children}))},a:function(n){var o=n.href,l=n.children,a=t(n,["href","children"]);if(!o)return r("a",e({},a,{children:l}));var s=o||"";try{s=decodeURIComponent(o)}catch(e){console.error("Error decoding href",e)}if(s.includes("variant_id=")){var d="",c="",p=s.match(/variant_id=([^?&]+)/);p&&(d=p[1]);var h=s.match(/field_name=([^&]+)/);return h&&(c=h[1]),i("button",e({type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),T(d),M(c),setTimeout(function(){return M(null)},6e3)},style:{background:"none",border:"none",outline:"none",borderRadius:"6px",padding:"1px 4px",color:"#0F172A",cursor:"pointer",fontSize:"13px",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"2px",margin:"0 1px",verticalAlign:"baseline",textDecoration:"none",boxShadow:"none",WebkitAppearance:"none",MozAppearance:"none"},title:"View Comparison"},{children:[l,r("svg",e({width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M10.2082 8.67708H2.0415M2.0415 8.67708L4.08317 6.63542M2.0415 8.67708L4.08317 10.7188M2.0415 3.57292H10.2082M10.2082 3.57292L8.1665 1.53125M10.2082 3.57292L8.1665 5.61458",stroke:"#0F172A",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}))]}))}return r("a",e({href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"#7C3AED"}},a,{children:l}))}}},[]);s(function(){!z&&!L&&P.length>0&&!P[0].isLoading&&T(P[0].id)},[P,z,L]);var te=a(null),ie=l([]),re=ie[0],oe=ie[1],le=l(!1),ae=le[0],se=le[1],de=l(!1),ce=de[0],pe=de[1];s(function(){var e=V.current;if(e){var n=function(){se(e.scrollLeft>0),pe(e.scrollLeft+e.clientWidth<e.scrollWidth-1)};return n(),e.addEventListener("scroll",n),window.addEventListener("resize",n),function(){e.removeEventListener("scroll",n),window.removeEventListener("resize",n)}}},[P]);var he={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)},ge={title:a(null),scope:a(null),description:a(null),wta:a(null),wnta:a(null)};s(function(){if(O){var e="when_to_apply"===O?"wta":"when_not_to_apply"===O?"wnta":O,n=he[e]||ge[e];n&&n.current&&setTimeout(function(){n.current.scrollIntoView({behavior:"smooth",block:"center"})},150)}},[O]);var ue=function(e){var n,t,i,r,o,l=null===(n=null==q?void 0:q.rule_difference_comparison)||void 0===n?void 0:n.fields,a="when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e,s=!(!C[a]&&!$[a]);if(!l||!l[e])return{score:0,relation:"",highlightsA:[],highlightsB:[],hasContent:!1};var d=l[e];if(d.mappings){var c=d.mappings[0]||{};return{score:d.score,relation:c.relation||"",highlightsA:(null===(t=c.highlights)||void 0===t?void 0:t.ruleA_spans)||[],highlightsB:(null===(i=c.highlights)||void 0===i?void 0:i.ruleB_spans)||[],hasContent:s}}return{score:d.score,relation:d.relation||"",highlightsA:(null===(r=d.highlights)||void 0===r?void 0:r.ruleA_spans)||[],highlightsB:(null===(o=d.highlights)||void 0===o?void 0:o.ruleB_spans)||[],hasContent:s}},xe=["title","scope","description","when_to_apply","when_not_to_apply"],fe=function(){if(te.current){var e=te.current.getBoundingClientRect(),n=[];xe.forEach(function(t){var i="when_to_apply"===t?he.wta:"when_not_to_apply"===t?he.wnta:he[t],r="when_to_apply"===t?ge.wta:"when_not_to_apply"===t?ge.wnta:ge[t];if(i.current&&r.current){i.current.style.height="auto",r.current.style.height="auto";var o=i.current.getBoundingClientRect(),l=r.current.getBoundingClientRect(),a=Math.max(o.height,l.height);i.current.style.height="".concat(a,"px"),r.current.style.height="".concat(a,"px");var s=i.current.getBoundingClientRect(),d=r.current.getBoundingClientRect(),c=ue(t),p=y(c.score,c.relation,c.hasContent),h=s.top+s.height/2-e.top;n.push({x1:s.right-e.left,y1:h,x2:d.left-e.left,y2:h,style:p})}}),oe(n)}};return s(function(){var e=setTimeout(fe,250);window.addEventListener("resize",fe);var n=null;return te.current&&(n=new ResizeObserver(function(){window.requestAnimationFrame(function(){fe()})})).observe(te.current),function(){clearTimeout(e),window.removeEventListener("resize",fe),n&&n.disconnect()}},[C,$,q,R]),i(c,e({sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"#F6F7F9B2",fontFamily:'"Plus Jakarta Sans", sans-serif',overflow:"hidden"}},{children:[i(c,e({sx:{px:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#FFFFFF",border:"1.5px solid #EEF0F4"}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",gap:1}},{children:[r(h,e({onClick:A,size:"small"},{children:r(u,{})})),r(p,e({sx:{fontSize:"16px",fontWeight:450,color:"#0F172A"}},{children:"Learning Comparison"}))]})),r(h,e({onClick:S,size:"small"},{children:r(c,e({sx:{fontSize:24,lineHeight:.5}},{children:"×"}))}))]})),P.length>1&&i(c,e({sx:{px:3,pb:.25}},{children:[i(c,e({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:1}},{children:[r(p,e({sx:{fontSize:"13px",color:"#475569"}},{children:"Choose the Learning you want to compare with the rule you are creating."})),i(c,e({sx:{display:"flex",gap:.5,flexShrink:0,ml:1}},{children:[r(h,e({onClick:function(){return U("left")},size:"small",disabled:!ae},{children:r(u,{size:18})})),r(h,e({onClick:function(){return U("right")},size:"small",disabled:!ce},{children:r(x,{size:18})}))]}))]})),r(c,e({ref:V,sx:{display:"flex",gap:1,overflowX:"auto",pb:.05,"&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"transparent",borderRadius:"10px"},"&::-webkit-scrollbar-thumb:hover":{background:"transparent"}}},{children:P.map(function(e){return r(F,{data:e,isSelected:(null==Y?void 0:Y.id)===e.id,isCognitiveOpen:R,onToggleCognitive:function(){j(function(e){var n=!e;return n&&N.current&&N.current.scrollTo({top:0,behavior:"smooth"}),n})},onClick:function(){return T((n=e).id),k(n),void j(!1);var n}},e.id)})}))]})),r(c,e({ref:N,sx:{flex:1,overflowY:"auto",py:1.5,px:3,display:"flex",justifyContent:"center",alignItems:"flex-start",bgcolor:"#FFFFFF",borderTop:J&&G&&R?"none":"1.5px solid #EEF0F4"}},{children:i(c,e({sx:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"1200px"}},{children:[J&&G&&R&&r(c,e({sx:{width:"100%",pb:1,animation:"fadeIn 0.2s ease-out","& > div > button":{display:"none !important"},"& > div > div":{marginTop:"0px"}}},{children:r(m,{headerIcon:r(b,{}),reasoning:Q,gap:Z,score:ee,mdComponents:ne,isOpen:!0,onToggle:function(){return j(!1)}})})),i(c,e({ref:te,sx:{display:"grid",gridTemplateColumns:"1fr auto 1fr",gap:"60px",maxWidth:"1200px",width:"100%",position:"relative"}},{children:[r("svg",e({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}},{children:re.map(function(n,t){var o=(n.x1+n.x2)/2,l=n.y1;return i("g",{children:[r("line",{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,stroke:n.style.badgeBorder,strokeWidth:"1"}),r("foreignObject",e({x:o-125,y:l-16,width:"250",height:"32"},{children:r(c,e({sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:r(c,e({sx:{fontSize:"11px",bgcolor:n.style.badgeBg,color:n.style.badgeText,border:"1px solid ".concat(n.style.badgeBorder),borderRadius:"12px",px:1.5,py:.25,fontWeight:500,textAlign:"center",whiteSpace:"nowrap"}},{children:n.style.label}))}))}))]},t)})})),i(c,e({sx:{border:"1px dashed #B0B0B0",borderRadius:"8px",bgcolor:"#FFFFFF",display:"flex",flexDirection:"column",position:"relative",zIndex:2,filter:"drop-shadow(0px 2px 4px #F2F2F2)",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px dashed #B0B0B0",borderRadius:"8px 8px 0 0",display:"flex",minHeight:"24px",alignItems:"center"}},{children:r(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#19213D"}},{children:"Learning You’re Creating"}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ue(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?he.wta:"when_not_to_apply"===e?he.wnta:he[e],o=C["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsA,styleVariant:t,isHighlighted:O===e},"left-".concat(e))})}))]})),r(c,{sx:{width:"1px"}}),i(c,e({sx:{border:"1px solid #E3E6EA",borderRadius:"8px",bgcolor:"#FFFFFF",boxShadow:"0px 1px 4px #F7F4FE",position:"relative",zIndex:2,display:"flex",flexDirection:"column",minWidth:0}},{children:[r(c,e({sx:{p:"8px",bgcolor:"#F7F8FA",borderBottom:"1px solid #E3E6EA",borderRadius:"8px 8px 0 0",minHeight:"24px",display:"flex",alignItems:"center"}},{children:i(p,e({sx:{fontSize:"16px",fontWeight:500,color:"#5928ED",display:"flex",alignItems:"center",gap:1}},{children:[r("div",e({style:{width:"18px",height:"18px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:r(f,{})})),"Existing Learning"]}))})),r(c,e({sx:{p:"12px",display:"flex",flexDirection:"column"}},{children:xe.map(function(e){var n=ue(e),t=y(n.score,n.relation,n.hasContent),i="when_to_apply"===e?ge.wta:"when_not_to_apply"===e?ge.wnta:ge[e],o=$["when_to_apply"===e?"wta":"when_not_to_apply"===e?"wnta":e];return r(w,{ref:i,label:"when_to_apply"===e?"When to apply":"when_not_to_apply"===e?"When NOT to Apply":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "),content:o,highlights:n.highlightsB,styleVariant:t,isHighlighted:O===e},"right-".concat(e))})}))]}))]}))]}))}))]}))};export{_ as default};
|
|
2
2
|
//# sourceMappingURL=RuleComparison.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import n,{useState as o,useEffect as l}from"react";import{InputDataReasoningCard as a}from"../../InputDataReasoningCard.js";import{ConditionSection as r}from"../../organisms/ConditionSection/ConditionSection.js";import{ConfigSection as d}from"../../organisms/ConfigSection/ConfigSection.js";import{ScopeSection as c}from"../../organisms/ScopeSection/ScopeSection.js";import{TextSection as s}from"../../organisms/TextSection/TextSection.js";import u from"../../AccordianSection.js";import{ButtonCognitiveIcon as p}from"../../_svg/ButtonCognitiveIcon.js";import{Loader2Icon as v,Pencil as f,Check as g,AlertTriangle as h}from"lucide-react";var y=function(o){var l=o.children,a=o.onAddVariant,r=o.isDisabled,d=n.Children.toArray(l);return e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[d.map(function(i,o){return e(n.Fragment,{children:[i,t("div",{style:{width:"2px",height:"20px",backgroundColor:"#E2E8F0",marginLeft:"30px"}})]},o)}),t("div",i({onClick:r?void 0:a,style:{padding:"8px 16px",border:"1px solid #E2E8F0",borderRadius:"8px",color:r?"#94a3b8":"#475569",fontSize:"14px",fontWeight:"500",cursor:r?"not-allowed":"pointer",backgroundColor:r?"#f8fafc":"#FFFFFF",opacity:r?.7:1,userSelect:"none",transition:"all 0.2s ease"}},{children:"Add Variant"}))]}))},m=function(m){var T,D,S,x,C,A,I,b,E,O,w,R=m.state,V=m.handlers,N=m.uiState,_=(null==N?void 0:N.highlights)||new Map,W=_.get("global_0")||{},j=o({}),M=j[0],k=j[1],B=o(null),F=B[0],L=B[1],z="rule-setup"===(null==N?void 0:N.activeEditId),q=o({title:"",scope:{}}),P=q[0],J=q[1],H=o(!1),K=H[0],U=H[1],$=n.useRef(null==N?void 0:N.isAiStreaming);l(function(){z||K||J({title:R.ruleTitle,scope:R.scopeData})},[R.ruleTitle,R.scopeData,z,K]),l(function(){var i;if($.current&&!(null==N?void 0:N.isAiStreaming)&&K&&(U(!1),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null),null==N?void 0:N.setSendMessageInChat)){var e=R.ruleTitle!==P.title,t=JSON.stringify(R.scopeData)!==JSON.stringify(P.scope),n=[];if(e&&n.push("Title with ".concat(R.ruleTitle)),t){var o=[];R.scopeData.station&&o.push(R.scopeData.station),R.scopeData.tiers&&R.scopeData.tiers.length>0&&o.push(R.scopeData.tiers.join(", ")),n.push("Scope with ".concat(o.join(", ")))}var l=n.join(" and ");N.setSendMessageInChat("__SKELETON_END__::Update Rule Setup using ".concat(l))}$.current=null==N?void 0:N.isAiStreaming},[null==N?void 0:N.isAiStreaming,K,R,P]);var Z=function(){var i;V.setRuleTitle(P.title),P.scope.station!==R.scopeData.station&&V.onScopeChange("station",P.scope.station),JSON.stringify(P.scope.tiers)!==JSON.stringify(R.scopeData.tiers)&&V.onScopeChange("tiers",P.scope.tiers),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},G=function(){var i,e,t=R.ruleTitle!==P.title,n=JSON.stringify(R.scopeData)!==JSON.stringify(P.scope);if(t||n){if(U(!0),null==N?void 0:N.setSendMessageInChat){var o="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),l=[];if(t){var a=(null===(e=R.ruleTitle)||void 0===e?void 0:e.trim())?"Title with ".concat(R.ruleTitle):"No Title";l.push(a)}if(n){var r=[];R.scopeData.station&&r.push("station: ".concat(R.scopeData.station)),R.scopeData.tiers&&R.scopeData.tiers.length>0&&r.push("tiers: ".concat(R.scopeData.tiers.join(", ")));var d=r.length>0?"with ".concat(r.join(" and ")):"No Tier Selected";l.push(d)}var c=l.join(" and ");N.setSendMessageInChat("__SKELETON__:".concat(o,":Update Rule Setup ").concat(c))}}else null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},Q=n.useRef(null==N?void 0:N.defaultVariantOpen),X=n.useRef(R.variantsByTier);n.useEffect(function(){var i,e,t,n,o=null,l=!1;if(Q.current!==(null==N?void 0:N.defaultVariantOpen)&&(l=!0,Q.current=null==N?void 0:N.defaultVariantOpen),R.variantsByTier,X.current,l){if(null==(null==N?void 0:N.defaultVariantOpen)||(null==N?void 0:N.defaultVariantOpen)<0)return L(null),void(X.current=R.variantsByTier);null===(e=null===(i=null==N?void 0:N.tierOptions)||void 0===i?void 0:i.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===e||e.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[]).forEach(function(i,e){(null==N?void 0:N.defaultVariantOpen)===e&&(o="".concat(t,"-variant-").concat(e)),(null==N?void 0:N.autoScrollVariantIndex)===e&&(o="".concat(t,"-variant-").concat(e))})}),o&&L(o)}null===F&&(null==N?void 0:N.defaultVariantOpen)>=0&&(null===(n=null===(t=null==N?void 0:N.tierOptions)||void 0===t?void 0:t.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===n||n.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[])[N.defaultVariantOpen]&&L("".concat(t,"-variant-").concat(N.defaultVariantOpen))})),X.current=R.variantsByTier},[R.variantsByTier,null==N?void 0:N.defaultVariantOpen,null===(T=R.scopeData)||void 0===T?void 0:T.tiers,null==N?void 0:N.tierOptions,null==N?void 0:N.autoScrollVariantIndex]);var Y=function(e){k(function(t){var n;return i(i({},t),((n={})[e]=!t[e],n))})},ii=function(i){var e,t=null===(e=R.fieldCitations)||void 0===e?void 0:e[i];return Array.isArray(t)&&t.length>0?t:R.citations},ei={marginTop:"-17px",position:"relative",zIndex:1},ti=function(i){i&&i.scrollIntoView({behavior:"smooth",block:"center"})};console.log("CreateRule state:",R),console.log("CreateRule uiState:",N);var ni=function(i){return i?i.replace(/_/g," ").replace(/([a-zA-Z])(\d)/g,"$1 $2").replace(/\b\w/g,function(i){return i.toUpperCase()}):"Variant 1"},oi=!!(null==N?void 0:N.activeEditId);return e("div",i({className:"traffic-manager-template"},{children:[t("div",i({"data-edit-id":"rule-setup"},{children:t(u,i({title:{type:"other",label:(null==N?void 0:N.setupLabel)||"Rule Setup"},actionButtons:function(n,o){if(z)return null;var l=!!(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId;return t("div",i({style:{position:"relative",display:"flex",flexDirection:"column"}},{children:e("button",i({title:l?"Save active edits first":"Edit",onClick:function(i){i.stopPropagation(),l?(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(N.activeEditId||null):(!function(){var i;(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId||(null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,"rule-setup"),J({title:R.ruleTitle,scope:R.scopeData}))}(),(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(null),n||o())},disabled:K,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"6px 8px",border:"1px solid #e5e7eb",borderRadius:"8px",cursor:K?"not-allowed":"pointer",backgroundColor:"#ffffff",color:"#6b7280",opacity:K?.5:1}},{children:[t(f,{size:14})," Edit"]}))}))},footerData:{ruleTitle:R.ruleTitle,stations:[R.scopeData.station],tiers:null===(D=R.scopeData)||void 0===D?void 0:D.tiers},defaultOpen:"Create"===(null==N?void 0:N.usedFor),readOnly:"Create"!==(null==N?void 0:N.usedFor),isAiStreaming:null==N?void 0:N.isAiStreaming},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[K&&e("div",i({style:{display:"flex",alignItems:"center",color:"#141414ff",fontSize:"13px",fontWeight:500,fontStyle:"italic",marginBottom:"8px",paddingLeft:"4px"}},{children:[t(v,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}},"loader"),"Checking the correctness of your Rule Setup..."]})),t(s,i({id:"rule-title",title:N.ruleTitle||"Rule Title",rows:1,placeholder:"Enter a short, descriptive title for the learning",required:!0,value:R.ruleTitle,onChange:V.setRuleTitle,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z,isOpen:M.ruleTitle,onToggle:function(){return Y("ruleTitle")},isHighlighted:W.ruleTitle||!1,showCognitiveIcon:R.citation.ruleTitle,tooltipDescription:"Why this Title?",errorMessage:null===(S=N.validationErrors)||void 0===S?void 0:S.ruleTitle},N)),R.citation.ruleTitle&&t("div",i({style:ei},{children:t(a,{isVisible:M.ruleTitle,citation:R.citation.ruleTitle,citations:ii("ruleTitle"),fieldName:"Rule Title",fieldValue:R.ruleTitle})})),t(c,i({id:"scope",title:"",required:!1,scopeData:R.scopeData,onScopeChange:V.onScopeChange,tierLabel:"Which tiers should this learning apply to?",stationLabel:"Which scope should this learning belong to?",highlights:W,isOpen:M.scopeData,onToggle:function(){return Y("scopeData")},showCognitiveIcon:R.citation.scopeData,cognitiveIcon:t(p,{}),tooltipDescription:"Why this Scope?",errorMessage:(null===(x=N.validationErrors)||void 0===x?void 0:x.station)||(null===(C=N.validationErrors)||void 0===C?void 0:C.tiers),stationErrorMessage:null===(A=N.validationErrors)||void 0===A?void 0:A.station,tierErrorMessage:null===(I=N.validationErrors)||void 0===I?void 0:I.tiers,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z},N)),R.citation.scopeData&&t("div",i({style:ei},{children:t(a,{isVisible:M.scopeData,citation:R.citation.scopeData,citations:ii("scopeData"),fieldName:"Scope",fieldValue:null===(E=null===(b=R.scopeData)||void 0===b?void 0:b.tiers)||void 0===E?void 0:E.join(", ")})})),!z||K?null:e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[e("div",i({style:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"16px"}},{children:[t("button",i({onClick:Z,style:{background:"none",border:"none",color:"#6b7280",fontSize:"14px",fontWeight:"500",cursor:"pointer",padding:"0"}},{children:"Discard Changes"})),e("button",i({onClick:G,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"12px",border:"none",backgroundColor:"#2563eb",color:"#ffffff",fontSize:"14px",fontWeight:"500",cursor:"pointer",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},{children:[t(g,{size:18,strokeWidth:2.5,color:"#ffffff"}),"Save Changes"]}))]})),"rule-setup"===(null==N?void 0:N.pendingEditId)&&e("div",i({style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"8px"}},{children:[t(h,{style:{color:"#C2410C"}}),t("div",i({style:{display:"flex",color:"#C2410C",fontSize:"13px",paddingTop:"8px",alignItems:"center"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]}))]}))}))})),null===(w=null===(O=null==N?void 0:N.tierOptions)||void 0===O?void 0:O.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===w?void 0:w.map(function(n,o,l){var c,p,v,f,g=n.toLowerCase().replace(/ /g,"_"),h=(null===(c=R.variantsByTier)||void 0===c?void 0:c[g])||[],m=h.length,T=!1;if(1===m){var D=h[0],S=!(null===(p=null==D?void 0:D.ruleDescription)||void 0===p?void 0:p.trim()),x=(null===(v=null==D?void 0:D.whenToApplyConditions)||void 0===v?void 0:v.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1,C=(null===(f=null==D?void 0:D.whenNotToApplyConditions)||void 0===f?void 0:f.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1;S&&!x&&!C&&(T=!0)}var A=T?void 0:"".concat(m," ").concat(1===m?"variant":"variants"," configured for this tier"),I=!((null==N?void 0:N.defaultTierOpen)>=0)||o===N.defaultTierOpen;return console.log("Rendering tier : ",n),t(u,i({variant:"tier-header",title:{type:"other",label:n},subtitle:A,defaultOpen:I,footerData:{description:"Variants for ".concat(n)}},{children:t(y,i({onAddVariant:function(){var i;return null===(i=V.addNewVariant)||void 0===i?void 0:i.call(V,g)},isDisabled:null==N?void 0:N.isAiStreaming},{children:h.map(function(n,o){var l,c,p,v,f,h,y,m,T,D,S,x=n.variantType||"default",C="".concat(g,"-variant-").concat(o),A=!0===n.is_variant,I="default"===x||"default_variant"===x;(null==N?void 0:N.defaultVariantOpen)>=0&&N.defaultVariantOpen;var b="".concat(g,"_").concat(o),E=_.get(b)||{},O=(null===(c=null===(l=N.separationItemsByTier)||void 0===l?void 0:l[g])||void 0===c?void 0:c.get(o))||[],w=(null===(v=null===(p=N.togglesByTier)||void 0===p?void 0:p[g])||void 0===v?void 0:v.get(o))||[],R=(null==N?void 0:N.autoScrollVariantIndex)===o||!0===n.is_variant;return console.log("Rendering ".concat(g," variant ").concat(o,":"),n),console.log("Rendering Variant : ",n),console.log("Open Accordion ID:",F,"Current Variant ID:",C),t("div",i({ref:R?ti:null,style:{width:"100%"}},{children:t(u,i({title:{type:I?"default":"variant",label:ni(x),number:o+1,isNewVariant:A,isDefault:n.isDefault,isModified:n.isModified},defaultOpen:!0,expanded:F===C,onToggle:function(){var i,e=F===C;console.log("is closing:",e),L(e?null:C),null===(i=null==N?void 0:N.setActiveVariantAccordionIndex)||void 0===i||i.call(N,e?null:o)},variant:"rule-behavior",footerData:{ruleTitle:x,description:n.ruleDescription||""}},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t(s,i({id:"rule-description-".concat(g,"-").concat(o),title:N.ruleDescriptionTitle||"Rule Description",rows:2,placeholder:"Explain the learning behaviour",required:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&(null==N?void 0:N.activeEditId)!=="rule-description-".concat(g,"-").concat(o),value:n.ruleDescription||"",onChange:function(i){return V.setRuleDescription(g,o,i)},isOpen:M["ruleDescription-".concat(g,"-").concat(o)],onToggle:function(){return Y("ruleDescription-".concat(g,"-").concat(o))},isHighlighted:E.ruleDescription||!1,showCognitiveIcon:null===(f=n.reasoning)||void 0===f?void 0:f.ruleDescription,tooltipDescription:"Why this Description?",errorMessage:null===(h=N.validationErrors)||void 0===h?void 0:h["ruleDescription-".concat(g,"-").concat(o)],enableInlineEdit:!0,setSendMessageInChat:null==N?void 0:N.setSendMessageInChat,isAiStreaming:null==N?void 0:N.isAiStreaming,fieldName:"Rule Description"},N)),(null===(y=n.reasoning)||void 0===y?void 0:y.ruleDescription)&&t("div",i({style:ei},{children:t(a,{isVisible:M["ruleDescription-".concat(g,"-").concat(o)],citation:n.reasoning.ruleDescription,citations:ii("ruleDescription_".concat(g,"_").concat(o)),fieldName:"Rule Description",fieldValue:n.ruleDescription})})),t(r,i({id:"when-to-apply-".concat(g,"-").concat(o),title:N.whenToApplyTitle||"When to apply",required:!0,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!(null===(m=n.whenToApplyConditions)||void 0===m?void 0:m.some(function(i){return"condition-".concat(g,"-").concat(o,"-").concat(i.id)===(null==N?void 0:N.activeEditId)})),conditions:n.whenToApplyConditions||[],onAdd:function(){return V.addWhenToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When to apply",isAiStreaming:N.isAiStreaming,errorMessage:(null===(T=N.validationErrors)||void 0===T?void 0:T["whenToApply-".concat(g,"-").concat(o)])||(null==N?void 0:N.conflictReason)},N)),t(r,i({id:"when-not-to-apply-".concat(g,"-").concat(o),title:N.whenNotToApplyTitle||"When NOT to apply",required:!1,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!(null===(D=n.whenNotToApplyConditions)||void 0===D?void 0:D.some(function(i){return"condition-".concat(g,"-").concat(o,"-").concat(i.id)===(null==N?void 0:N.activeEditId)})),conditions:n.whenNotToApplyConditions||[],onAdd:function(){return V.addWhenNotToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenNotToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenNotToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wnta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenNotToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When NOT to apply",isAiStreaming:N.isAiStreaming},N)),t(d,i({id:"config-".concat(g,"-").concat(o),title:N.configTitle||"Configuration",required:!1,highlights:E,bordered:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi,onConfigChange:function(i,e){return V.onConfigChange(g,o,i,e)},separationItems:O,toggles:w,index:o},N)),(null===(S=n.reasoning)||void 0===S?void 0:S.configData)&&t("div",i({style:ei},{children:t(a,{citation:n.reasoning.configData,citations:ii("configData_".concat(g,"_").concat(o)),fieldName:"Configuration",fieldValue:"Proposed Configuration"})}))]}))}),C)}),"".concat(g,"-variant-").concat(o))})}))}),"tier-".concat(o))})]}))};export{m as CreateRule};
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import n,{useState as o,useEffect as l}from"react";import{InputDataReasoningCard as a}from"../../InputDataReasoningCard.js";import{ConditionSection as r}from"../../organisms/ConditionSection/ConditionSection.js";import{ConfigSection as d}from"../../organisms/ConfigSection/ConfigSection.js";import{ScopeSection as c}from"../../organisms/ScopeSection/ScopeSection.js";import{TextSection as s}from"../../organisms/TextSection/TextSection.js";import u from"../../AccordianSection.js";import{ButtonCognitiveIcon as p}from"../../_svg/ButtonCognitiveIcon.js";import{Loader2Icon as v,Pencil as f,Check as g,AlertTriangle as h}from"lucide-react";var y=function(o){var l=o.children,a=o.onAddVariant,r=o.isDisabled,d=n.Children.toArray(l);return e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[d.map(function(i,o){return e(n.Fragment,{children:[i,t("div",{style:{width:"2px",height:"20px",backgroundColor:"#E2E8F0",marginLeft:"30px"}})]},o)}),t("div",i({onClick:r?void 0:a,style:{padding:"8px 16px",border:"1px solid #E2E8F0",borderRadius:"8px",color:r?"#94a3b8":"#475569",fontSize:"14px",fontWeight:"500",cursor:r?"not-allowed":"pointer",backgroundColor:r?"#f8fafc":"#FFFFFF",opacity:r?.7:1,userSelect:"none",transition:"all 0.2s ease"}},{children:"Add Variant"}))]}))},m=function(m){var D,T,x,S,C,A,I,b,E,O,w,R=m.state,V=m.handlers,N=m.uiState,_=(null==N?void 0:N.highlights)||new Map,W=_.get("global_0")||{},j=o({}),M=j[0],F=j[1],k=o(null),B=k[0],L=k[1],z="rule-setup"===(null==N?void 0:N.activeEditId),P=o({title:"",scope:{}}),q=P[0],J=P[1],H=o(!1),K=H[0],U=H[1],$=n.useRef(null==N?void 0:N.isAiStreaming);l(function(){z||K||J({title:R.ruleTitle,scope:R.scopeData})},[R.ruleTitle,R.scopeData,z,K]),l(function(){var i;if($.current&&!(null==N?void 0:N.isAiStreaming)&&K&&(U(!1),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null),null==N?void 0:N.setSendMessageInChat)){var e=R.ruleTitle!==q.title,t=JSON.stringify(R.scopeData)!==JSON.stringify(q.scope),n=[];if(e&&n.push("Title with ".concat(R.ruleTitle)),t){var o=[];R.scopeData.station&&o.push(R.scopeData.station),R.scopeData.tiers&&R.scopeData.tiers.length>0&&o.push(R.scopeData.tiers.join(", ")),n.push("Scope with ".concat(o.join(", ")))}var l=n.join(" and ");N.setSendMessageInChat("__SKELETON_END__::Update Rule Setup using ".concat(l))}$.current=null==N?void 0:N.isAiStreaming},[null==N?void 0:N.isAiStreaming,K,R,q]);var Z=function(){var i;V.setRuleTitle(q.title),q.scope.station!==R.scopeData.station&&V.onScopeChange("station",q.scope.station),JSON.stringify(q.scope.tiers)!==JSON.stringify(R.scopeData.tiers)&&V.onScopeChange("tiers",q.scope.tiers),null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},G=function(){var i,e,t=R.ruleTitle!==q.title,n=JSON.stringify(R.scopeData)!==JSON.stringify(q.scope);if(t||n){if(U(!0),null==N?void 0:N.setSendMessageInChat){var o="sk-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,8)),l=[];if(t){var a=(null===(e=R.ruleTitle)||void 0===e?void 0:e.trim())?"Title with ".concat(R.ruleTitle):"No Title";l.push(a)}if(n){var r=[];R.scopeData.station&&r.push("station: ".concat(R.scopeData.station)),R.scopeData.tiers&&R.scopeData.tiers.length>0&&r.push("tiers: ".concat(R.scopeData.tiers.join(", ")));var d=r.length>0?"with ".concat(r.join(" and ")):"No Tier Selected";l.push(d)}var c=l.join(" and ");N.setSendMessageInChat("__SKELETON__:".concat(o,":Update Rule Setup ").concat(c))}}else null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,null)},Q=n.useRef(null==N?void 0:N.defaultVariantOpen),X=n.useRef(R.variantsByTier);n.useEffect(function(){var i,e,t,n,o=null,l=!1;if(Q.current!==(null==N?void 0:N.defaultVariantOpen)&&(l=!0,Q.current=null==N?void 0:N.defaultVariantOpen),R.variantsByTier,X.current,l){if(null==(null==N?void 0:N.defaultVariantOpen)||(null==N?void 0:N.defaultVariantOpen)<0)return L(null),void(X.current=R.variantsByTier);null===(e=null===(i=null==N?void 0:N.tierOptions)||void 0===i?void 0:i.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===e||e.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[]).forEach(function(i,e){(null==N?void 0:N.defaultVariantOpen)===e&&(o="".concat(t,"-variant-").concat(e)),(null==N?void 0:N.autoScrollVariantIndex)===e&&(o="".concat(t,"-variant-").concat(e))})}),o&&L(o)}null===B&&(null==N?void 0:N.defaultVariantOpen)>=0&&(null===(n=null===(t=null==N?void 0:N.tierOptions)||void 0===t?void 0:t.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===n||n.forEach(function(i){var e,t=i.toLowerCase().replace(/ /g,"_");((null===(e=R.variantsByTier)||void 0===e?void 0:e[t])||[])[N.defaultVariantOpen]&&L("".concat(t,"-variant-").concat(N.defaultVariantOpen))})),X.current=R.variantsByTier},[R.variantsByTier,null==N?void 0:N.defaultVariantOpen,null===(D=R.scopeData)||void 0===D?void 0:D.tiers,null==N?void 0:N.tierOptions,null==N?void 0:N.autoScrollVariantIndex]);var Y=function(e){F(function(t){var n;return i(i({},t),((n={})[e]=!t[e],n))})},ii=function(i){var e,t=null===(e=R.fieldCitations)||void 0===e?void 0:e[i];return Array.isArray(t)&&t.length>0?t:R.citations},ei={marginTop:"-17px",position:"relative",zIndex:1},ti=function(i){i&&i.scrollIntoView({behavior:"smooth",block:"center"})};console.log("CreateRule state:",R),console.log("CreateRule uiState:",N);var ni=function(i){return i?i.replace(/_/g," ").replace(/([a-zA-Z])(\d)/g,"$1 $2").replace(/\b\w/g,function(i){return i.toUpperCase()}):"Variant 1"},oi=!!(null==N?void 0:N.activeEditId);return e("div",i({className:"traffic-manager-template"},{children:[t("div",i({"data-edit-id":"rule-setup"},{children:t(u,i({title:{type:"other",label:(null==N?void 0:N.setupLabel)||"Rule Setup"},actionButtons:function(e,n){if(z)return null;var o=!!(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId;return t("div",i({style:{position:"relative",display:"flex",flexDirection:"column"}},{children:t("button",i({title:o?"Save active edits first":"Edit",onClick:function(i){i.stopPropagation(),o?(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(N.activeEditId||null):(!function(){var i;(null==N?void 0:N.activeEditId)&&"rule-setup"!==N.activeEditId||(null===(i=null==N?void 0:N.setActiveEditId)||void 0===i||i.call(N,"rule-setup"),J({title:R.ruleTitle,scope:R.scopeData}))}(),(null==N?void 0:N.setPendingEditId)&&N.setPendingEditId(null),e||n())},disabled:K,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"6px 8px",border:"1px solid #e5e7eb",borderRadius:"8px",cursor:K?"not-allowed":"pointer",backgroundColor:"#ffffff",color:"#6b7280",opacity:K?.5:1}},{children:t(f,{size:14})}))}))},footerData:{ruleTitle:R.ruleTitle,stations:[R.scopeData.station],tiers:null===(T=R.scopeData)||void 0===T?void 0:T.tiers},defaultOpen:"Create"===(null==N?void 0:N.usedFor),readOnly:"Create"!==(null==N?void 0:N.usedFor),isAiStreaming:null==N?void 0:N.isAiStreaming,editFlow:"Edit"===(null==N?void 0:N.usedFor)},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[K&&e("div",i({style:{display:"flex",alignItems:"center",color:"#141414ff",fontSize:"13px",fontWeight:500,fontStyle:"italic",marginBottom:"8px",paddingLeft:"4px"}},{children:[t(v,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}},"loader"),"Checking the correctness of your Rule Setup..."]})),t(s,i({id:"rule-title",title:N.ruleTitle||"Rule Title",rows:1,placeholder:"Enter a short, descriptive title for the learning",required:!0,value:R.ruleTitle,onChange:V.setRuleTitle,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z,isOpen:M.ruleTitle,onToggle:function(){return Y("ruleTitle")},isHighlighted:W.ruleTitle||!1,showCognitiveIcon:R.citation.ruleTitle,tooltipDescription:"Why this Title?",errorMessage:null===(x=N.validationErrors)||void 0===x?void 0:x.ruleTitle},N)),R.citation.ruleTitle&&t("div",i({style:ei},{children:t(a,{isVisible:M.ruleTitle,citation:R.citation.ruleTitle,citations:ii("ruleTitle"),fieldName:"Rule Title",fieldValue:R.ruleTitle})})),t(c,i({id:"scope",title:"",required:!1,scopeData:R.scopeData,onScopeChange:V.onScopeChange,tierLabel:"Which tiers should this learning apply to?",stationLabel:"Which scope should this learning belong to?",highlights:W,isOpen:M.scopeData,onToggle:function(){return Y("scopeData")},showCognitiveIcon:R.citation.scopeData,cognitiveIcon:t(p,{}),tooltipDescription:"Why this Scope?",errorMessage:(null===(S=N.validationErrors)||void 0===S?void 0:S.station)||(null===(C=N.validationErrors)||void 0===C?void 0:C.tiers),stationErrorMessage:null===(A=N.validationErrors)||void 0===A?void 0:A.station,tierErrorMessage:null===(I=N.validationErrors)||void 0===I?void 0:I.tiers,readOnly:"Create"!==(null==N?void 0:N.usedFor)||(null==N?void 0:N.isAiStreaming)||!z},N)),R.citation.scopeData&&t("div",i({style:ei},{children:t(a,{isVisible:M.scopeData,citation:R.citation.scopeData,citations:ii("scopeData"),fieldName:"Scope",fieldValue:null===(E=null===(b=R.scopeData)||void 0===b?void 0:b.tiers)||void 0===E?void 0:E.join(", ")})})),!z||K?null:e("div",i({style:{display:"flex",flexDirection:"column",alignItems:"flex-start"}},{children:[e("div",i({style:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"16px"}},{children:[t("button",i({onClick:Z,style:{background:"none",border:"none",color:"#6b7280",fontSize:"14px",fontWeight:"500",cursor:"pointer",padding:"0"}},{children:"Discard Changes"})),e("button",i({onClick:G,style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"12px",border:"none",backgroundColor:"#2563eb",color:"#ffffff",fontSize:"14px",fontWeight:"500",cursor:"pointer",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"}},{children:[t(g,{size:18,strokeWidth:2.5,color:"#ffffff"}),"Save Changes"]}))]})),"rule-setup"===(null==N?void 0:N.pendingEditId)&&e("div",i({style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"8px"}},{children:[t(h,{style:{color:"#C2410C"}}),t("div",i({style:{display:"flex",color:"#C2410C",fontSize:"13px",paddingTop:"8px",alignItems:"center"}},{children:"Pending - Changes not applied yet. Apply or discard them to continue."}))]}))]}))]}))}))})),null===(w=null===(O=null==N?void 0:N.tierOptions)||void 0===O?void 0:O.filter(function(i){var e,t;return null===(t=null===(e=R.scopeData)||void 0===e?void 0:e.tiers)||void 0===t?void 0:t.includes(i)}))||void 0===w?void 0:w.map(function(n,o,l){var c,p,v,f,g=n.toLowerCase().replace(/ /g,"_"),h=(null===(c=R.variantsByTier)||void 0===c?void 0:c[g])||[],m=h.length,D=!1;if(1===m){var T=h[0],x=!(null===(p=null==T?void 0:T.ruleDescription)||void 0===p?void 0:p.trim()),S=(null===(v=null==T?void 0:T.whenToApplyConditions)||void 0===v?void 0:v.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1,C=(null===(f=null==T?void 0:T.whenNotToApplyConditions)||void 0===f?void 0:f.some(function(i){return(null==i?void 0:i.text)&&""!==i.text.trim()}))||!1;x&&!S&&!C&&(D=!0)}var A=D?void 0:"".concat(m," ").concat(1===m?"variant":"variants"," configured for this tier"),I=!((null==N?void 0:N.defaultTierOpen)>=0)||o===N.defaultTierOpen;return console.log("Rendering tier : ",n),t(u,i({variant:"tier-header",title:{type:"other",label:n},subtitle:A,defaultOpen:I,footerData:{description:"Variants for ".concat(n)}},{children:t(y,i({onAddVariant:function(){var i;return null===(i=V.addNewVariant)||void 0===i?void 0:i.call(V,g)},isDisabled:null==N?void 0:N.isAiStreaming},{children:h.map(function(n,o){var l,c,p,v,f,h,y,m,D,T,x,S=n.variantType||"default",C="".concat(g,"-variant-").concat(o),A=!0===n.is_variant,I="default"===S||"default_variant"===S;(null==N?void 0:N.defaultVariantOpen)>=0&&N.defaultVariantOpen;var b="".concat(g,"_").concat(o),E=_.get(b)||{},O=(null===(c=null===(l=N.separationItemsByTier)||void 0===l?void 0:l[g])||void 0===c?void 0:c.get(o))||[],w=(null===(v=null===(p=N.togglesByTier)||void 0===p?void 0:p[g])||void 0===v?void 0:v.get(o))||[],R=(null==N?void 0:N.autoScrollVariantIndex)===o||!0===n.is_variant;console.log("Rendering ".concat(g," variant ").concat(o,":"),n),console.log("Rendering Variant : ",n),console.log("Open Accordion ID:",B,"Current Variant ID:",C);var W=null===(f=null==N?void 0:N.activeEditId)||void 0===f?void 0:f.startsWith("condition-wta-".concat(g,"-").concat(o)),j=null===(h=null==N?void 0:N.activeEditId)||void 0===h?void 0:h.startsWith("condition-wnta-".concat(g,"-").concat(o));return t("div",i({ref:R?ti:null,style:{width:"100%"}},{children:t(u,i({title:{type:I?"default":"variant",label:ni(S),number:o+1,isNewVariant:A,isDefault:n.isDefault,isModified:n.isModified},defaultOpen:!0,expanded:B===C,onToggle:function(){var i,e=B===C;console.log("is closing:",e),L(e?null:C),null===(i=null==N?void 0:N.setActiveVariantAccordionIndex)||void 0===i||i.call(N,e?null:o)},variant:"rule-behavior",footerData:{ruleTitle:S,description:n.ruleDescription||""}},{children:e("div",i({style:{display:"flex",flexDirection:"column",gap:"12px"}},{children:[t(s,i({id:"rule-description-".concat(g,"-").concat(o),title:N.ruleDescriptionTitle||"Rule Description",rows:2,placeholder:"Explain the learning behaviour",required:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&(null==N?void 0:N.activeEditId)!=="rule-description-".concat(g,"-").concat(o),value:n.ruleDescription||"",onChange:function(i){return V.setRuleDescription(g,o,i)},isOpen:M["ruleDescription-".concat(g,"-").concat(o)],onToggle:function(){return Y("ruleDescription-".concat(g,"-").concat(o))},isHighlighted:E.ruleDescription||!1,showCognitiveIcon:null===(y=n.reasoning)||void 0===y?void 0:y.ruleDescription,tooltipDescription:"Why this Description?",errorMessage:null===(m=N.validationErrors)||void 0===m?void 0:m["ruleDescription-".concat(g,"-").concat(o)],enableInlineEdit:!0,setSendMessageInChat:null==N?void 0:N.setSendMessageInChat,isAiStreaming:null==N?void 0:N.isAiStreaming,fieldName:"Rule Description"},N)),(null===(D=n.reasoning)||void 0===D?void 0:D.ruleDescription)&&t("div",i({style:ei},{children:t(a,{isVisible:M["ruleDescription-".concat(g,"-").concat(o)],citation:n.reasoning.ruleDescription,citations:ii("ruleDescription_".concat(g,"_").concat(o)),fieldName:"Rule Description",fieldValue:n.ruleDescription})})),t(r,i({id:"when-to-apply-".concat(g,"-").concat(o),idPrefix:"condition-wta",title:N.whenToApplyTitle||"When to apply",required:!0,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!W,conditions:n.whenToApplyConditions||[],onAdd:function(){return V.addWhenToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When to apply",isAiStreaming:N.isAiStreaming,errorMessage:(null===(T=N.validationErrors)||void 0===T?void 0:T["whenToApply-".concat(g,"-").concat(o)])||(null==N?void 0:N.conflictReason)},N)),t(r,i({id:"when-not-to-apply-".concat(g,"-").concat(o),idPrefix:"condition-wnta",title:N.whenNotToApplyTitle||"When NOT to apply",required:!1,dividerRequired:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi&&!j,conditions:n.whenNotToApplyConditions||[],onAdd:function(){return V.addWhenNotToApply(g,o)},onRemove:function(i,e,t){return V.removeWhenNotToApply(i,e,t)},onEdit:function(i,e,t,n){return V.editWhenNotToApply(i,e,t,n)},index:o,tierKey:g,isHighlighted:E.wnta||!1,highlightedIds:null==N?void 0:N.highlightedIds,tooltipDescription:"Why this Condition?",citations:ii("whenNotToApply_".concat(g,"_").concat(o)),bordered:!0,addLabel:"Add When NOT to apply",isAiStreaming:N.isAiStreaming},N)),t(d,i({id:"config-".concat(g,"-").concat(o),title:N.configTitle||"Configuration",required:!1,highlights:E,bordered:!0,readOnly:n.isReadOnly||(null==N?void 0:N.isAiStreaming)||oi,onConfigChange:function(i,e){return V.onConfigChange(g,o,i,e)},separationItems:O,toggles:w,index:o},N)),(null===(x=n.reasoning)||void 0===x?void 0:x.configData)&&t("div",i({style:ei},{children:t(a,{citation:n.reasoning.configData,citations:ii("configData_".concat(g,"_").concat(o)),fieldName:"Configuration",fieldValue:"Proposed Configuration"})}))]}))}),C)}),"".concat(g,"-variant-").concat(o))})}))}),"tier-".concat(o))})]}))};export{m as CreateRule};
|
|
2
2
|
//# sourceMappingURL=CreateRule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function r(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function n(n){try{return JSON.parse(n)}catch(a){var e=n;return e=(e=(e=
|
|
1
|
+
function r(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function n(n){try{return JSON.parse(n)}catch(a){var e=n.replace(/`/g,"\\`");return e=(e=(e=function(r){return r.replace(/,\s*([}\]])/g,"$1")}(e=e.replace(/"([^"\\]*(\\.[^"\\]*)*)"/g,function(r){return r.replace(/\n/g,"\\n")}))).replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/g,function(n){return r(n)})).replace(/<explaination[\s\S]*?<\/explaination>/g,function(n){return r(n)}),JSON.parse(e)}}function e(r){for(var e,a=/<!--\s*```json\s+property="([^"]+)"\s*([\s\S]*?)```\s*-->/gi,o=[];null!==(e=a.exec(r));){var t=e[0],c=e[1],i=e[2].trim();try{var l=n(i);o.push({property:c,data:l,rawMatch:t})}catch(r){var s="".concat(c,"::").concat(i.slice(0,40));console.warn('Failed to parse JSON for property="'.concat(c,'" warnId="').concat(s,'":'),r),console.warn("👉 Raw JSON string:",i),console.warn("👉 Error:"),console.warn(r),o.push({property:c,data:null,rawMatch:t})}}return o}var a=function(r){if(null==r)return{text:"",aiReasoning:null};var n="",e=(n="string"==typeof r?r:Array.isArray(r)?r.join(", "):"object"==typeof r?JSON.stringify(r):String(r)).match(/<ai_reasoning>([\s\S]*?)<\/ai_reasoning>/i),a=null,o=n;if(e){var t=e[1],c=function(r){var n=t.match(new RegExp("<".concat(r,">([\\s\\S]*?)<\\/").concat(r,">"),"i"));return n?n[1].replace(/\\n/g,"\n").trim():""};a={id:c("id"),reason:c("reason"),gap:c("gap"),score:c("relevance_score")||c("score")},o=n.replace(/<ai_reasoning>[\s\S]*?<\/ai_reasoning>/gi,"").trim()}return{text:o,aiReasoning:a}},o=function(r){if(!r)return null;var n={id:null==r?void 0:r.id,reason:null==r?void 0:r.reason,gap:null==r?void 0:r.gap,score:(null==r?void 0:r.relevance_score)||(null==r?void 0:r.score)};return!(n.id||n.reason||n.gap||null!=n.score&&""!==n.score)?null:n};export{o as buildAiReasoning,a as extractReasoningFromText,e as parseJsonBlocks,n as safeParse,r as sanitizeBlock};
|
|
2
2
|
//# sourceMappingURL=message-rendering-utils.js.map
|
|
@@ -24,7 +24,7 @@ interface FooterData {
|
|
|
24
24
|
tiers?: string[];
|
|
25
25
|
description?: string;
|
|
26
26
|
}
|
|
27
|
-
declare const AccordionSection: ({ title, subtitle, children, defaultOpen, footerData, readOnly, variant, expanded, onToggle, actionButtons, isAiStreaming }: {
|
|
27
|
+
declare const AccordionSection: ({ title, subtitle, children, defaultOpen, footerData, readOnly, variant, expanded, onToggle, actionButtons, isAiStreaming, editFlow }: {
|
|
28
28
|
title: TitleProps;
|
|
29
29
|
subtitle?: string | undefined;
|
|
30
30
|
children: React.ReactNode;
|
|
@@ -36,6 +36,7 @@ declare const AccordionSection: ({ title, subtitle, children, defaultOpen, foote
|
|
|
36
36
|
onToggle?: (() => void) | undefined;
|
|
37
37
|
actionButtons?: ((isOpen: boolean, onToggle: () => void) => React.ReactNode) | undefined;
|
|
38
38
|
isAiStreaming?: boolean | undefined;
|
|
39
|
+
editFlow?: boolean | undefined;
|
|
39
40
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
40
41
|
export default AccordionSection;
|
|
41
42
|
//# sourceMappingURL=AccordianSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordianSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/AccordianSection.tsx"],"names":[],"mappings":"AAGA,KAAK,UAAU,GACT;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrH;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,YAAY,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,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAs/C/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalGaps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/CriticalGaps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CriticalGaps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/CriticalGaps.tsx"],"names":[],"mappings":"AA6jBA,eAAO,MAAM,YAAY;UASjB,GAAG;mBACM,OAAO;oCACS,OAAO,cAAc,GAAG,EAAE,KAAK,IAAI;;;iCAGtC,IAAI;;6CA0MjC,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/MessageRendering/MessageRendering.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageRendering.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/MessageRendering/MessageRendering.tsx"],"names":[],"mappings":"AAYA,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,OAAO,CAAC,EAAE,MAAM,GAAC,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,QAAA,MAAM,gBAAgB,uQAoBnB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"MessageRendering.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/MessageRendering/MessageRendering.tsx"],"names":[],"mappings":"AAYA,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,YAAY,EAAE,GAAG,CAAC;IAClB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,OAAO,CAAC,EAAE,MAAM,GAAC,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,QAAA,MAAM,gBAAgB,uQAoBnB,qBAAqB,4CA26BvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewMinimizedThinkingSteps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/NewMinimizedThinkingSteps.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAC;AACjC,OAAO,iCAAiC,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"NewMinimizedThinkingSteps.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/NewMinimizedThinkingSteps.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAC;AACjC,OAAO,iCAAiC,CAAC;AACzC,OAAO,EAAwB,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAMnG,QAAA,MAAM,yBAAyB,gHAmD9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -15,7 +15,7 @@ export declare const useThinkingSteps: ({ orchestratorAndAgentsMessages, isStrea
|
|
|
15
15
|
openSteps: Record<number, "open" | "expanded" | undefined>;
|
|
16
16
|
showMoreMap: Record<number, boolean>;
|
|
17
17
|
contentRefs: import("react").MutableRefObject<Record<number, HTMLDivElement | null>>;
|
|
18
|
-
currentStep: ThinkingResponseData;
|
|
18
|
+
currentStep: ThinkingResponseData | null;
|
|
19
19
|
currentContent: string;
|
|
20
20
|
wmwLabel: string;
|
|
21
21
|
toggleStep: (index: number) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Usethinkingsteps.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.ts"],"names":[],"mappings":";AAEA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;AAE5D,UAAU,qBAAqB;IAC7B,6BAA6B,EAAE,oBAAoB,EAAE,CAAC;IACtD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,GAAE,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB,2HAO1B,qBAAqB;;;;;;;;;wBA4DiB,MAAM;4BAcF,MAAM;;;
|
|
1
|
+
{"version":3,"file":"Usethinkingsteps.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_components/WatchMeWork/Usethinkingsteps.ts"],"names":[],"mappings":";AAEA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;AAE5D,UAAU,qBAAqB;IAC7B,6BAA6B,EAAE,oBAAoB,EAAE,CAAC;IACtD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,GAAE,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB,2HAO1B,qBAAqB;;;;;;;;;wBA4DiB,MAAM;4BAcF,MAAM;;;CA0ElD,CAAC"}
|
|
@@ -6,6 +6,7 @@ interface ListItem {
|
|
|
6
6
|
conflict?: any;
|
|
7
7
|
}
|
|
8
8
|
interface ConditionListProps {
|
|
9
|
+
idPrefix: string;
|
|
9
10
|
items: ListItem[];
|
|
10
11
|
onAdd: () => void;
|
|
11
12
|
onRemove: (tierKey: string, index: number, id: any) => void;
|
|
@@ -29,6 +30,6 @@ interface ConditionListProps {
|
|
|
29
30
|
pendingEditId?: string | null;
|
|
30
31
|
setPendingEditId?: (id: string | null) => void;
|
|
31
32
|
}
|
|
32
|
-
export declare const ConditionList: ({ items, onAdd, onRemove, onEdit, index, tierKey, readOnly, placeholder, addLabel, showAddButton, isHighlighted, highlightedIds, footer, tooltipDescription, citations, setSendMessageInChat, fieldName, isAiStreaming, activeEditId, setActiveEditId, pendingEditId, setPendingEditId }: ConditionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const ConditionList: ({ idPrefix, items, onAdd, onRemove, onEdit, index, tierKey, readOnly, placeholder, addLabel, showAddButton, isHighlighted, highlightedIds, footer, tooltipDescription, citations, setSendMessageInChat, fieldName, isAiStreaming, activeEditId, setActiveEditId, pendingEditId, setPendingEditId }: ConditionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
34
|
export {};
|
|
34
35
|
//# sourceMappingURL=ConditionList.d.ts.map
|
package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionList.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/molecules/Condition/ConditionList.tsx"],"names":[],"mappings":";AAQA,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5D,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"ConditionList.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/molecules/Condition/ConditionList.tsx"],"names":[],"mappings":";AAQA,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB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AAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,aAAa,uSAwBvB,kBAAkB,4CAgYpB,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ConditionSection: ({ conditions, onAdd, onRemove, onEdit, index, isHighlighted, highlightedIds, footer, tooltipDescription, citations, addLabel, title, sendMessageInChat, setSendMessageInChat, readOnly, isAiStreaming, errorMessage, activeEditId, setActiveEditId, pendingEditId, setPendingEditId, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const ConditionSection: ({ conditions, onAdd, onRemove, onEdit, index, isHighlighted, highlightedIds, footer, tooltipDescription, citations, addLabel, title, sendMessageInChat, setSendMessageInChat, readOnly, isAiStreaming, errorMessage, activeEditId, setActiveEditId, pendingEditId, setPendingEditId, idPrefix, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=ConditionSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionSection.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ConditionSection.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,8SAC6C,GAAG,4CAgC5E,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleComparison.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/RuleComparison/RuleCom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,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;
|
|
1
|
+
{"version":3,"file":"RuleComparison.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/RuleComparison/RuleComparison.tsx"],"names":[],"mappings":"AAOA,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,UAAU,kBAAkB;IAC1B,0BAA0B,EAAE;QAC1B,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC;YACtB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,MAAM,EAAE;YACN,KAAK,EAAE,uBAAuB,CAAC;YAC/B,KAAK,EAAE,uBAAuB,CAAC;YAC/B,WAAW,EAAE,uBAAuB,CAAC;YACrC,aAAa,EAAE;gBACb,KAAK,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,GAAG,EAAE,CAAC;aACjB,CAAC;YACF,iBAAiB,EAAE;gBACjB,KAAK,EAAE,MAAM,CAAC;gBACd,QAAQ,EAAE,GAAG,EAAE,CAAC;aACjB,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,eAAe,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAgVD,QAAA,MAAM,cAAc,mHASjB,mBAAmB,4CA4brB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.tsx"],"names":[],"mappings":"AAoDA,eAAO,MAAM,UAAU,iCAAkC,GAAG,
|
|
1
|
+
{"version":3,"file":"CreateRule.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.tsx"],"names":[],"mappings":"AAoDA,eAAO,MAAM,UAAU,iCAAkC,GAAG,4CAgpB3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-rendering-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/helpers/message-rendering-utils.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,UAO1C;
|
|
1
|
+
{"version":3,"file":"message-rendering-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/helpers/message-rendering-utils.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,UAO1C;AAaD,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,OAsBxC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,CA2BhE;AAGC,eAAO,MAAM,wBAAwB,WAAY,GAAG;;;;;;;;CAmCnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;;QAiBzC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-llm-studio/instant-learning",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.261",
|
|
4
4
|
"author": "Devesh Patel",
|
|
5
5
|
"description": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"dependencies": {
|
|
140
140
|
"@craco/craco": "^7.1.0",
|
|
141
141
|
"@e-llm-studio/citation": "^0.0.165",
|
|
142
|
-
"@e-llm-studio/watch-me-work": "^0.0.
|
|
142
|
+
"@e-llm-studio/watch-me-work": "^0.0.25",
|
|
143
143
|
"pdf-collaborative-tool": "^0.7.0",
|
|
144
144
|
"primeicons": "^7.0.0",
|
|
145
145
|
"primereact": "^10.9.7",
|