@e-llm-studio/instant-learning 0.0.290 → 0.0.291

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
  2. package/dist/cjs/features/IL-OTJ/_components/ILPopup.js +1 -1
  3. package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +2 -0
  4. package/dist/cjs/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +1 -0
  5. package/dist/cjs/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
  6. package/dist/features/IL-OTJ/ILOTJ.js +1 -1
  7. package/dist/features/IL-OTJ/_components/ILPopup.js +1 -1
  8. package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js +2 -0
  9. package/dist/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.js.map +1 -0
  10. package/dist/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.js +1 -1
  11. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +1 -0
  12. package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
  13. package/dist/types/src/features/IL-OTJ/ILOTJTriageAITest.d.ts +12 -0
  14. package/dist/types/src/features/IL-OTJ/ILOTJTriageAITest.d.ts.map +1 -0
  15. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts +2 -2
  16. package/dist/types/src/features/IL-OTJ/_components/ChatComponents/NormalChat.d.ts.map +1 -1
  17. package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts +2 -1
  18. package/dist/types/src/features/IL-OTJ/_components/ILPopup.d.ts.map +1 -1
  19. package/dist/types/src/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.d.ts +71 -0
  20. package/dist/types/src/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.d.ts.map +1 -0
  21. package/dist/types/src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts +2 -1
  22. package/dist/types/src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.d.ts.map +1 -1
  23. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@mui/material"),a=require("react"),o=require("./_components/ChatComponents/ChatComponent.js"),i=require("./_components/ILPopup.js"),s=require("./_components/VariantLoadingOverlay.js"),r=require("./_components/templates/RuleComparison/RuleComparison.js"),l=require("./_components/templates/RuleComparison/AgentComposerRuleComparison.js"),d=require("./_components/ChatComponents/NormalChat.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(a);exports.default=function(u){var g=u.open,h=u.chatAssistantName,m=u.organizationName,p=u.baseUrl,f=u.baseWebsocketUrl,C=u.closeFunction,v=u.ThinkingBulbIconComponent,x=u.customSections,S=u.customMetaData,b=u.chatTitle,k=void 0===b?"Instant Learning On-The-Job":b,w=u.formTitle,y=void 0===w?"Instant Learning On-The-Job Form":w,R=u.onSave,M=u.headerMessageHandlers,I=u.aiResponse,_=u.setAIResponse,j=u.width,F=void 0===j?"90vw":j,T=u.height,A=void 0===T?"90vh":T,V=u.sendMessageInChat,L=void 0===V?"":V,D=u.setSendMessageInChat,E=u.validateCustom,W=u.onResetChat,B=u.template,q=u.templateProps,P=u.initialChatMessage,z=u.setCitations,N=u.isLoading,O=void 0!==N&&N,U=u.isLocked,J=void 0!==U&&U,H=u.saveButtonConfig,G=void 0===H?{label:"Save Learning",loadingLabel:"Saving Learning..."}:H,X=u.saveWithoutValBtnConfig,Y=void 0===X?{label:"Save Without Validation",loadingLabel:"Saving Without Validation..."}:X,K=u.textareaPlaceholder,Q=u.setCurrentRequestId,Z=u.showSavedMessage,$=void 0!==Z&&Z,ee=u.savedMessage,ne=void 0===ee?"Thank you teacher for teaching me, your learning has been saved successfully.":ee,te=u.isError,ae=void 0!==te&&te,oe=u.errorMessage,ie=void 0===oe?"I'm sorry, I couldn't save your changes. Please try again.":oe,se=u.isSaving,re=void 0!==se&&se,le=u.isAiStreaming,de=u.setIsAiStreaming,ue=u.showConfirmReset,ce=void 0!==ue&&ue,ge=u.setShowConfirmReset,he=u.confirmReset,me=u.isLoadingVariants,pe=u.isFormDirty,fe=u.onResetRequest,Ce=u.mainText,ve=void 0===Ce?"Adding a variant":Ce,xe=u.subText,Se=void 0===xe?"This may take a moment as we update the learning with the new variant.":xe,be=u.showComparison,ke=void 0!==be&&be,we=u.setShowComparison,ye=u.showAgentComposerRuleComparison,Re=void 0!==ye&&ye,Me=u.setShowAgentComposerRuleComparison,Ie=u.isFetchingComparison,_e=u.handleOpenComparison,je=u.proposedRule,Fe=u.variants,Te=u.onAddAsVariant,Ae=u.isCopyEnabled,Ve=u.showSaveWithoutValidation,Le=void 0!==Ve&&Ve,De=u.onSaveWithoutValidation,Ee=u.onComparisonLinkClick,We=u.targetComparisonVariantId,Be=u.highlightedComparisonField,qe=u.onSubmitFeedback,Pe=u.isUseNormalChat,ze=void 0!==Pe&&Pe,Ne=u.userDetails,Oe=u.handleGlobalClickCapture,Ue=u.isGlobalEditActive,Je=a.useState(g),He=Je[0],Ge=Je[1],Xe=a.useState(!1);Xe[0];var Ye=Xe[1],Ke=a.useState(!1),Qe=Ke[0],Ze=Ke[1],$e=a.useState(!1),en=$e[0];$e[1];var nn=a.useState(45),tn=nn[0],an=nn[1],on=a.useState("right"),sn=on[0],rn=on[1],ln=c.default.useRef(sn),dn=a.useState(!1),un=dn[0],cn=dn[1],gn=a.useState(0),hn=gn[0],mn=gn[1],pn=a.useState(40),fn=pn[0],Cn=pn[1];a.useEffect(function(){ln.current=sn},[sn]),a.useEffect(function(){Ge(g)},[g]);var vn=a.useCallback(function(e){e.preventDefault(),cn(!0),mn(e.clientX),Cn(tn)},[tn]),xn=a.useCallback(function(e){if(un){var n=document.querySelector("[data-dialog-content]");if(n){var t=n.getBoundingClientRect(),a=(e.clientX-hn)/t.width*100,o=Math.max(20,Math.min(80,fn+a));an(o),o>fn&&rn("right"),o<fn&&rn("left")}}},[un,hn,fn]),Sn=a.useCallback(function(){cn(!1)},[]);a.useEffect(function(){if(un)return document.addEventListener("mousemove",xn),document.addEventListener("mouseup",Sn),function(){document.removeEventListener("mousemove",xn),document.removeEventListener("mouseup",Sn)}},[un,xn,Sn]);var bn=function(e,n){J&&"backdropClick"===n||("escapeKeyDown"!==n&&"manualClose"!==n||!(null==pe?void 0:pe())?(Ge(!1),C()):null==fe||fe())},kn=a.useCallback(function(e){an(function(n){var t;if("number"==typeof e)return e>n&&rn("right"),e<n&&rn("left"),e;var a=ln.current,o=null!==(t={20:30,30:"left"===a?20:50,50:"left"===a?30:75,75:"left"===a?50:100,100:75}[n])&&void 0!==t?t:40;return 100===o&&rn("left"),20===o&&rn("right"),o})},[]),wn=a.useCallback(function(){_e&&(kn(30),_e())},[kn,_e]);return n.jsx(t.Dialog,e.__assign({open:He,onClose:bn,maxWidth:!1,fullWidth:!0,PaperProps:{sx:{width:F,height:A,display:"flex",flexDirection:"column",padding:0,margin:0,maxWidth:"100vw",borderRadius:"10px"}}},{children:n.jsxs(t.DialogContent,e.__assign({"data-dialog-content":!0,onClickCapture:Oe,sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"row",gap:0,padding:0,fontFamily:'"Plus Jakarta Sans", sans-serif',"& *":{fontFamily:'"Plus Jakarta Sans", sans-serif !important'}}},{children:[n.jsx(t.Box,e.__assign({sx:{width:"".concat(tn,"%"),maxWidth:"".concat(tn,"%"),transition:un?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",bgcolor:"#ffffff",p:0,display:0===tn?"none":"flex",flexDirection:"column"}},{children:ze?n.jsx(d.default,{chatAssistantName:h,organizationName:m,baseUrl:p,baseWebsocketUrl:f,setIsNewChatClicked:Ye,ThinkingBulbIconComponent:v,isFormSaveClicked:Qe,setIsFormSavedClicked:Ze,onResetLearningData:function(){},sendMessageInChat:L,setSendMessageInChat:D,isFormValidating:en,chatTitle:k,customMetaData:S,headerMessageHandlers:M,aiResponse:I,setAIResponse:_,onResetChat:W,initialChatMessage:P,onSave:R,chatSize:tn,movingTowards:sn,setChatSize:kn,setCitations:z,textareaPlaceholder:K,setCurrentRequestId:Q,showSavedMessage:$,savedMessage:ne,isError:ae,errorMessage:ie,isSaving:re,onStreamingStateChange:de,onViewComparison:wn,isCopyEnabled:Ae,onComparisonLinkClick:Ee,onSubmitFeedback:qe}):n.jsx(o.default,{chatAssistantName:h,organizationName:m,baseUrl:p,baseWebsocketUrl:p,setIsNewChatClicked:Ye,ThinkingBulbIconComponent:v,isFormSaveClicked:Qe,setIsFormSavedClicked:Ze,onResetLearningData:function(){},sendMessageInChat:L,setSendMessageInChat:D,isFormValidating:en,chatTitle:k,customMetaData:S,headerMessageHandlers:M,aiResponse:I,setAIResponse:_,onResetChat:W,initialChatMessage:P,onSave:R,chatSize:tn,movingTowards:sn,setChatSize:kn,setCitations:z,textareaPlaceholder:K,setCurrentRequestId:Q,showSavedMessage:$,savedMessage:ne,isError:ae,errorMessage:ie,isSaving:re,onStreamingStateChange:de,onViewComparison:wn,isCopyEnabled:Ae,onComparisonLinkClick:Ee,onSubmitFeedback:qe,userDetails:Ne,isGlobalEditActive:Ue})})),n.jsx(t.Box,{sx:{width:"2px",cursor:"col-resize",backgroundColor:un?"#1976d2":"#e0e0e0",transition:"background-color 0.2s ease","&:hover":{backgroundColor:"#1976d2"},flexShrink:0},onMouseDown:vn}),n.jsxs(t.Box,e.__assign({sx:{width:"".concat(100-tn,"%"),maxWidth:"".concat(100-tn,"%"),transition:un?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",display:100===tn?"none":"flex",flexDirection:"column",overflowY:"hidden",position:"relative"}},{children:[n.jsx(s.default,{isLoading:Ie||!1,mainText:"Fetching differences between rules",subText:"This may take a moment..."}),n.jsx(s.default,{isLoading:me||!1,mainText:ve,subText:Se}),Re?n.jsx(l.default,{proposedRule:je,variants:Fe,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Te||Te(),kn(40),null==Me||Me(!1)},onSkip:function(){kn(40),null==Me||Me(!1)},onBack:function(){kn(40),null==Me||Me(!1)},targetVariantId:We,highlightedField:Be}):ke?n.jsx(r.default,{proposedRule:je,variants:Fe,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Te||Te(),kn(40),null==we||we(!1)},onSkip:function(){kn(40),null==we||we(!1)},onBack:function(){kn(40),null==we||we(!1)},targetVariantId:We,highlightedField:Be}):n.jsx(i.default,{setIsFormSavedClicked:Ze,customSections:x,onSave:R,formHeader:y,onClose:function(){return bn(0,"manualClose")},validateCustom:E,template:B,templateProps:q,isLoading:O,isAiStreaming:le,saveButtonConfig:G,showSaveWithoutValidation:Le,saveWithoutValBtnConfig:Y,onSaveWithoutValidation:De}),n.jsx(t.Dialog,e.__assign({open:ce,onClose:function(){return null==ge?void 0:ge(!1)},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:n.jsxs(t.Box,e.__assign({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[n.jsx("h3",e.__assign({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"6px"}},{children:"Exit Teach Me OTJ?"})),n.jsx("p",e.__assign({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"10px"}},{children:"Exiting will discard any unsaved changes and end your session."})),n.jsxs(t.Box,e.__assign({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[n.jsx("button",e.__assign({onClick:function(){return null==ge?void 0:ge(!1)},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Cancel"})),n.jsx("button",e.__assign({onClick:he,style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Yes, Discard"}))]}))]}))}))]}))]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("@mui/material"),a=require("react"),o=require("./_components/ChatComponents/ChatComponent.js"),i=require("./_components/ILPopup.js"),s=require("./_components/VariantLoadingOverlay.js"),r=require("./_components/templates/RuleComparison/RuleComparison.js"),l=require("./_components/templates/RuleComparison/AgentComposerRuleComparison.js"),d=require("./_components/ChatComponents/NormalChat.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(a);exports.default=function(u){var g=u.open,h=u.chatAssistantName,m=u.organizationName,p=u.baseUrl,f=u.baseWebsocketUrl,C=u.closeFunction,v=u.ThinkingBulbIconComponent,x=u.customSections,S=u.customMetaData,b=u.chatTitle,k=void 0===b?"Instant Learning On-The-Job":b,w=u.formTitle,y=void 0===w?"Instant Learning On-The-Job Form":w,R=u.onSave,M=u.headerMessageHandlers,I=u.aiResponse,_=u.setAIResponse,j=u.width,F=void 0===j?"90vw":j,T=u.height,A=void 0===T?"90vh":T,V=u.sendMessageInChat,L=void 0===V?"":V,D=u.setSendMessageInChat,E=u.validateCustom,B=u.onResetChat,W=u.template,q=u.templateProps,P=u.initialChatMessage,z=u.setCitations,N=u.isLoading,O=void 0!==N&&N,U=u.isLocked,J=void 0!==U&&U,H=u.saveButtonConfig,G=void 0===H?{label:"Save Learning",loadingLabel:"Saving Learning..."}:H,X=u.saveButtonColor,Y=u.saveWithoutValBtnConfig,K=void 0===Y?{label:"Save Without Validation",loadingLabel:"Saving Without Validation..."}:Y,Q=u.textareaPlaceholder,Z=u.setCurrentRequestId,$=u.showSavedMessage,ee=void 0!==$&&$,ne=u.savedMessage,te=void 0===ne?"Thank you teacher for teaching me, your learning has been saved successfully.":ne,ae=u.isError,oe=void 0!==ae&&ae,ie=u.errorMessage,se=void 0===ie?"I'm sorry, I couldn't save your changes. Please try again.":ie,re=u.isSaving,le=void 0!==re&&re,de=u.isAiStreaming,ue=u.setIsAiStreaming,ce=u.showConfirmReset,ge=void 0!==ce&&ce,he=u.setShowConfirmReset,me=u.confirmReset,pe=u.isLoadingVariants,fe=u.isFormDirty,Ce=u.onResetRequest,ve=u.mainText,xe=void 0===ve?"Adding a variant":ve,Se=u.subText,be=void 0===Se?"This may take a moment as we update the learning with the new variant.":Se,ke=u.showComparison,we=void 0!==ke&&ke,ye=u.setShowComparison,Re=u.showAgentComposerRuleComparison,Me=void 0!==Re&&Re,Ie=u.setShowAgentComposerRuleComparison,_e=u.isFetchingComparison,je=u.handleOpenComparison,Fe=u.proposedRule,Te=u.variants,Ae=u.onAddAsVariant,Ve=u.isCopyEnabled,Le=u.showSaveWithoutValidation,De=void 0!==Le&&Le,Ee=u.onSaveWithoutValidation,Be=u.onComparisonLinkClick,We=u.targetComparisonVariantId,qe=u.highlightedComparisonField,Pe=u.onSubmitFeedback,ze=u.isUseNormalChat,Ne=void 0!==ze&&ze,Oe=u.userDetails,Ue=u.handleGlobalClickCapture,Je=u.isGlobalEditActive,He=a.useState(g),Ge=He[0],Xe=He[1],Ye=a.useState(!1);Ye[0];var Ke=Ye[1],Qe=a.useState(!1),Ze=Qe[0],$e=Qe[1],en=a.useState(!1),nn=en[0];en[1];var tn=a.useState(45),an=tn[0],on=tn[1],sn=a.useState("right"),rn=sn[0],ln=sn[1],dn=c.default.useRef(rn),un=a.useState(!1),cn=un[0],gn=un[1],hn=a.useState(0),mn=hn[0],pn=hn[1],fn=a.useState(40),Cn=fn[0],vn=fn[1];a.useEffect(function(){dn.current=rn},[rn]),a.useEffect(function(){Xe(g)},[g]);var xn=a.useCallback(function(e){e.preventDefault(),gn(!0),pn(e.clientX),vn(an)},[an]),Sn=a.useCallback(function(e){if(cn){var n=document.querySelector("[data-dialog-content]");if(n){var t=n.getBoundingClientRect(),a=(e.clientX-mn)/t.width*100,o=Math.max(20,Math.min(80,Cn+a));on(o),o>Cn&&ln("right"),o<Cn&&ln("left")}}},[cn,mn,Cn]),bn=a.useCallback(function(){gn(!1)},[]);a.useEffect(function(){if(cn)return document.addEventListener("mousemove",Sn),document.addEventListener("mouseup",bn),function(){document.removeEventListener("mousemove",Sn),document.removeEventListener("mouseup",bn)}},[cn,Sn,bn]);var kn=function(e,n){J&&"backdropClick"===n||("escapeKeyDown"!==n&&"manualClose"!==n||!(null==fe?void 0:fe())?(Xe(!1),C()):null==Ce||Ce())},wn=a.useCallback(function(e){on(function(n){var t;if("number"==typeof e)return e>n&&ln("right"),e<n&&ln("left"),e;var a=dn.current,o=null!==(t={20:30,30:"left"===a?20:50,50:"left"===a?30:75,75:"left"===a?50:100,100:75}[n])&&void 0!==t?t:40;return 100===o&&ln("left"),20===o&&ln("right"),o})},[]),yn=a.useCallback(function(){je&&(wn(30),je())},[wn,je]);return n.jsx(t.Dialog,e.__assign({open:Ge,onClose:kn,maxWidth:!1,fullWidth:!0,PaperProps:{sx:{width:F,height:A,display:"flex",flexDirection:"column",padding:0,margin:0,maxWidth:"100vw",borderRadius:"10px"}}},{children:n.jsxs(t.DialogContent,e.__assign({"data-dialog-content":!0,onClickCapture:Ue,sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"row",gap:0,padding:0,fontFamily:'"Plus Jakarta Sans", sans-serif',"& *":{fontFamily:'"Plus Jakarta Sans", sans-serif !important'}}},{children:[n.jsx(t.Box,e.__assign({sx:{width:"".concat(an,"%"),maxWidth:"".concat(an,"%"),transition:cn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",bgcolor:"#ffffff",p:0,display:0===an?"none":"flex",flexDirection:"column"}},{children:Ne?n.jsx(d.default,{chatAssistantName:h,organizationName:m,baseUrl:p,baseWebsocketUrl:f,setIsNewChatClicked:Ke,ThinkingBulbIconComponent:v,isFormSaveClicked:Ze,setIsFormSavedClicked:$e,onResetLearningData:function(){},sendMessageInChat:L,setSendMessageInChat:D,isFormValidating:nn,chatTitle:k,customMetaData:S,headerMessageHandlers:M,aiResponse:I,setAIResponse:_,onResetChat:B,initialChatMessage:P,onSave:R,chatSize:an,movingTowards:rn,setChatSize:wn,setCitations:z,textareaPlaceholder:Q,setCurrentRequestId:Z,showSavedMessage:ee,savedMessage:te,isError:oe,errorMessage:se,isSaving:le,onStreamingStateChange:ue,onViewComparison:yn,isCopyEnabled:Ve,onComparisonLinkClick:Be,onSubmitFeedback:Pe}):n.jsx(o.default,{chatAssistantName:h,organizationName:m,baseUrl:p,baseWebsocketUrl:p,setIsNewChatClicked:Ke,ThinkingBulbIconComponent:v,isFormSaveClicked:Ze,setIsFormSavedClicked:$e,onResetLearningData:function(){},sendMessageInChat:L,setSendMessageInChat:D,isFormValidating:nn,chatTitle:k,customMetaData:S,headerMessageHandlers:M,aiResponse:I,setAIResponse:_,onResetChat:B,initialChatMessage:P,onSave:R,chatSize:an,movingTowards:rn,setChatSize:wn,setCitations:z,textareaPlaceholder:Q,setCurrentRequestId:Z,showSavedMessage:ee,savedMessage:te,isError:oe,errorMessage:se,isSaving:le,onStreamingStateChange:ue,onViewComparison:yn,isCopyEnabled:Ve,onComparisonLinkClick:Be,onSubmitFeedback:Pe,userDetails:Oe,isGlobalEditActive:Je})})),n.jsx(t.Box,{sx:{width:"2px",cursor:"col-resize",backgroundColor:cn?"#1976d2":"#e0e0e0",transition:"background-color 0.2s ease","&:hover":{backgroundColor:"#1976d2"},flexShrink:0},onMouseDown:xn}),n.jsxs(t.Box,e.__assign({sx:{width:"".concat(100-an,"%"),maxWidth:"".concat(100-an,"%"),transition:cn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",display:100===an?"none":"flex",flexDirection:"column",overflowY:"hidden",position:"relative"}},{children:[n.jsx(s.default,{isLoading:_e||!1,mainText:"Fetching differences between rules",subText:"This may take a moment..."}),n.jsx(s.default,{isLoading:pe||!1,mainText:xe,subText:be}),Me?n.jsx(l.default,{proposedRule:Fe,variants:Te,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Ae||Ae(),wn(40),null==Ie||Ie(!1)},onSkip:function(){wn(40),null==Ie||Ie(!1)},onBack:function(){wn(40),null==Ie||Ie(!1)},targetVariantId:We,highlightedField:qe}):we?n.jsx(r.default,{proposedRule:Fe,variants:Te,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Ae||Ae(),wn(40),null==ye||ye(!1)},onSkip:function(){wn(40),null==ye||ye(!1)},onBack:function(){wn(40),null==ye||ye(!1)},targetVariantId:We,highlightedField:qe}):n.jsx(i.default,{setIsFormSavedClicked:$e,customSections:x,onSave:R,formHeader:y,onClose:function(){return kn(0,"manualClose")},validateCustom:E,template:W,templateProps:q,isLoading:O,isAiStreaming:de,saveButtonConfig:G,saveButtonColor:X,showSaveWithoutValidation:De,saveWithoutValBtnConfig:K,onSaveWithoutValidation:Ee}),n.jsx(t.Dialog,e.__assign({open:ge,onClose:function(){return null==he?void 0:he(!1)},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:n.jsxs(t.Box,e.__assign({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[n.jsx("h3",e.__assign({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"6px"}},{children:"Exit Teach Me OTJ?"})),n.jsx("p",e.__assign({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"10px"}},{children:"Exiting will discard any unsaved changes and end your session."})),n.jsxs(t.Box,e.__assign({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[n.jsx("button",e.__assign({onClick:function(){return null==he?void 0:he(!1)},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Cancel"})),n.jsx("button",e.__assign({onClick:me,style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Yes, Discard"}))]}))]}))}))]}))]}))}))};
2
2
  //# sourceMappingURL=ILOTJ.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime"),a=require("lucide-react"),i=require("@mui/material"),n=require("../InstantLearning.module.css.js"),t=require("./ILPopup.styles.js"),l=require("./templates/TemplatesMap/templatesMap.js");exports.default=function(o){var r=o.customSections,d=o.showCustomSections,c=void 0===d||d,u=o.onSave,g=o.formHeader,m=o.onClose,p=o.validateCustom,v=o.template,x=o.templateProps,f=o.isLoading,h=o.saveButtonConfig,_=void 0===h?{label:"Save Learning",loadingLabel:"Saving Learning..."}:h,j=o.isAiStreaming,b=void 0!==j&&j,y=o.showSaveWithoutValidation,S=o.saveWithoutValBtnConfig,C=void 0===S?{label:"Save w/o validation",loadingLabel:"Saving w/o validation..."}:S,L=o.onSaveWithoutValidation,q=v?l.TemplateMap[v]:null,w=!p||p();return s.jsxs(s.Fragment,{children:[s.jsx("style",{children:t.componentStyles}),s.jsxs("div",e.__assign({className:"il-popup-container ".concat(n.default.customFont)},{children:[s.jsxs("div",e.__assign({className:"form-header"},{children:[s.jsx(i.Typography,e.__assign({sx:{fontSize:"1.125rem",fontWeight:500,lineHeight:"1.82rem",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:g})),s.jsx("div",e.__assign({onClick:m,style:{cursor:"pointer"}},{children:s.jsx(a.X,{})}))]})),s.jsx("div",e.__assign({style:{flexGrow:1,display:"flex",flexDirection:"column",width:"100%",padding:"20px 24px",overflowY:"auto",borderBottom:"1px solid #E7E7E9"}},{children:s.jsxs("div",e.__assign({className:"sections-space"},{children:[q&&s.jsx(q,e.__assign({},x)),c&&r]}))})),s.jsxs("div",e.__assign({className:"save-button-container"},{children:[y&&s.jsxs("button",e.__assign({className:"save-button-secondary",onClick:function(){L&&w&&L()},disabled:f||!w||b},{children:[s.jsx(a.TriangleAlert,{size:16,style:{marginRight:"4px"}}),f?C.loadingLabel:C.label]})),s.jsx("button",e.__assign({className:"save-button",onClick:function(){!p||p()?(u(),console.log("Form Data to Save:")):console.error("Please fill all required fields before saving the learning.")},disabled:f||!w||b,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",maxWidth:"fit-content"}},{children:f?_.loadingLabel:_.label}))]}))]}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime"),a=require("lucide-react"),i=require("@mui/material"),n=require("../InstantLearning.module.css.js"),t=require("./ILPopup.styles.js"),o=require("./templates/TemplatesMap/templatesMap.js");exports.default=function(l){var r=l.customSections,d=l.showCustomSections,c=void 0===d||d,u=l.onSave,g=l.formHeader,m=l.onClose,p=l.validateCustom,v=l.template,x=l.templateProps,f=l.isLoading,h=l.saveButtonConfig,_=void 0===h?{label:"Save Learning",loadingLabel:"Saving Learning..."}:h,b=l.isAiStreaming,j=void 0!==b&&b,y=l.showSaveWithoutValidation,S=l.saveWithoutValBtnConfig,C=void 0===S?{label:"Save w/o validation",loadingLabel:"Saving w/o validation..."}:S,L=l.onSaveWithoutValidation,q=l.saveButtonColor,w=v?o.TemplateMap[v]:null,N=!p||p();return s.jsxs(s.Fragment,{children:[s.jsx("style",{children:t.componentStyles}),s.jsxs("div",e.__assign({className:"il-popup-container ".concat(n.default.customFont)},{children:[s.jsxs("div",e.__assign({className:"form-header"},{children:[s.jsx(i.Typography,e.__assign({sx:{fontSize:"1.125rem",fontWeight:500,lineHeight:"1.82rem",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:g})),s.jsx("div",e.__assign({onClick:m,style:{cursor:"pointer"}},{children:s.jsx(a.X,{})}))]})),s.jsx("div",e.__assign({style:{flexGrow:1,display:"flex",flexDirection:"column",width:"100%",padding:"20px 24px",overflowY:"auto",borderBottom:"1px solid #E7E7E9"}},{children:s.jsxs("div",e.__assign({className:"sections-space"},{children:[w&&s.jsx(w,e.__assign({},x)),c&&r]}))})),s.jsxs("div",e.__assign({className:"save-button-container"},{children:[y&&s.jsxs("button",e.__assign({className:"save-button-secondary",onClick:function(){L&&N&&L()},disabled:f||!N||j},{children:[s.jsx(a.TriangleAlert,{size:16,style:{marginRight:"4px"}}),f?C.loadingLabel:C.label]})),s.jsx("button",e.__assign({className:"save-button",onClick:function(){!p||p()?(u(),console.log("Form Data to Save:")):console.error("Please fill all required fields before saving the learning.")},disabled:f||!N||j,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",maxWidth:"fit-content",backgroundColor:q,borderColor:q}},{children:f?_.loadingLabel:_.label}))]}))]}))]})};
2
2
  //# sourceMappingURL=ILPopup.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=s(t),o=0,a=function(){return"cond-".concat(Date.now(),"-").concat(++o)},l="#CBD5E1",d="#9B8AFB",c="#7C3AED",g="#FDA29B",u="#344054",p="#1E293B",x="#334155",f="#64748B",h="#94A3B8",_="#98A2B3",y="#F04438",m="#8F2C23",b="#5925DC",j="#475569",v="#FFFFFF",w="#F8FAFC",C="#F1F5F9",F="#F9F5FF",k="#17B26A",S="#F04438",z="#64748B",D="6px",E="8px",A="Inter, sans-serif",B={width:38,height:38,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid #D0D5DD",borderRadius:D,cursor:"pointer",background:v,flexShrink:0,transition:"background 0.15s"},R={width:"100%",boxSizing:"border-box",padding:"8px 11.5px",border:"1px solid #D0D5DD",borderRadius:D,fontSize:14,fontWeight:400,lineHeight:"100%",fontFamily:A,outline:"none",color:u,background:v},T={display:"flex",alignItems:"center",gap:4,marginBottom:8,color:u,fontSize:14,fontWeight:500,lineHeight:"130%",fontFamily:A},I={background:v,border:"1px solid ".concat(l),borderRadius:E,padding:16},W=n.jsx("span",e.__assign({style:{color:m,fontSize:12,lineHeight:1,display:"inline-flex",transform:"translateY(0.5px)"}},{children:"*"})),H={exact_match:{label:"Exact Match",bg:"#F0FDF4",border:"#BBF7D0",text:"#166534",dot:"#22C55E"},conflict:{label:"Conflict",bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",dot:"#EF4444"},partial_overlap:{label:"Partial Match",bg:"#FFF7ED",border:"#FED7AA",text:"#92400E",dot:"#F97316"},new_field:{label:"New",bg:"#F5F3FF",border:"#DDD6FE",text:"#5925DC",dot:"#7C3AED"}},L=function(e){return e?Array.isArray(e)?e.filter(Boolean).join("\n"):e:""},M=function(e,n){if(!n&&!e)return"exact_match";if(!n)return"new_field";if(!e)return"new_field";var t=function(e){return e.trim().toLowerCase()};if(t(e)===t(n))return"exact_match";var i=new Set(t(e).split(/\s+/)),s=new Set(t(n).split(/\s+/));return Array.from(i).filter(function(e){return s.has(e)}).length/Math.max(i.size,s.size)>=.45?"partial_overlap":"conflict"},N=function(t){var i=t.relation,s=H[i];return n.jsxs("div",e.__assign({style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 9px",borderRadius:20,background:s.bg,border:"1px solid ".concat(s.border),fontSize:10,fontWeight:600,color:s.text,fontFamily:A,whiteSpace:"nowrap",flexShrink:0}},{children:[n.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:s.dot,flexShrink:0}}),s.label]}))},O=r.default.forwardRef(function(t,i){var s=t.label,r=t.value;return n.jsxs("div",e.__assign({ref:i,style:{display:"flex",flexDirection:"column"}},{children:[n.jsx("p",e.__assign({style:{margin:"0 0 5px 0",fontSize:12,color:f,fontFamily:A}},{children:s})),n.jsx("div",e.__assign({style:{flex:1,padding:"9px 12px",borderRadius:E,background:"#FFF3F2",border:"1px solid ".concat("#FECACA"),fontSize:13,lineHeight:"150%",color:r?p:h,fontFamily:A,fontStyle:r?"normal":"italic",wordBreak:"break-word",whiteSpace:"pre-wrap",minHeight:37}},{children:r||"—"}))]}))});O.displayName="FieldCell";var q=function(s){var r=s.formData,o=s.existingData,a=s.onClose,d=s.visible,c=r.whenToApply.map(function(e){return e.text}).filter(Boolean).join("\n"),g=r.whenNotToApply.map(function(e){return e.text}).filter(Boolean).join("\n"),u=L(o.whenToApply),f=L(o.whenNotToApply),h=t.useMemo(function(){return[{label:"Title",proposed:r.name,existing:o.name||"",relation:M(r.name,o.name||"")},{label:"Description",proposed:r.description,existing:o.description||"",relation:M(r.description,o.description||"")},{label:"When to apply",proposed:c,existing:u,relation:M(c,u)},{label:"When NOT to Apply",proposed:g,existing:f,relation:g?M(g,f):f?"new_field":"exact_match"}]},[r.name,r.description,c,g,o.name,o.description,u,f]),_=h.reduce(function(e,n){return e[n.relation]=(e[n.relation]||0)+1,e},{}),y=t.useRef(null),m=t.useRef([]),j=t.useRef([]),w=t.useState([]),C=w[0],F=w[1];m.current=[],j.current=[];var k=t.useCallback(function(){if(y.current){var e=y.current.getBoundingClientRect(),n=[];h.forEach(function(t,i){var s=m.current[i],r=j.current[i];if(s&&r){s.style.height="auto",r.style.height="auto";var o=s.getBoundingClientRect(),a=r.getBoundingClientRect(),l=Math.max(o.height,a.height);s.style.height="".concat(l,"px"),r.style.height="".concat(l,"px");var d=s.getBoundingClientRect(),c=r.getBoundingClientRect(),g=d.top+d.height/2-e.top;n.push({x1:d.right-e.left,y1:g,x2:c.left-e.left,y2:g,relation:t.relation})}}),F(n)}},[h]);return t.useEffect(function(){var e=setTimeout(k,150);window.addEventListener("resize",k);var n=null;return y.current&&(n=new ResizeObserver(function(){window.requestAnimationFrame(function(){return k()})})).observe(y.current),function(){clearTimeout(e),window.removeEventListener("resize",k),n&&n.disconnect()}},[k,d]),n.jsxs(n.Fragment,{children:[n.jsx("div",{onClick:a,style:{position:"absolute",inset:0,background:"rgba(15,23,42,0.18)",zIndex:10,opacity:d?1:0,transition:"opacity 0.25s ease",pointerEvents:d?"auto":"none"}}),n.jsxs("div",e.__assign({style:{position:"absolute",inset:0,background:v,zIndex:11,display:"flex",flexDirection:"column",transform:d?"translateX(0)":"translateX(100%)",transition:"transform 0.28s cubic-bezier(0.4,0,0.2,1)",borderRadius:E,overflow:"hidden"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid ".concat(l),flexShrink:0,background:v}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:10}},{children:[n.jsx("button",e.__assign({type:"button",onClick:a,style:e.__assign(e.__assign({},B),{width:32,height:32,border:"1px solid ".concat(l),borderRadius:D})},{children:n.jsx(i.ArrowLeft,{size:15,color:x})})),n.jsx("span",e.__assign({style:{fontSize:15,fontWeight:600,color:p,fontFamily:A,letterSpacing:"-0.01em"}},{children:"Category Comparison"}))]})),n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"}},{children:Object.entries(_).map(function(t){var i=t[0],s=t[1];return n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:20,background:H[i].bg,border:"1px solid ".concat(H[i].border),fontSize:11,fontWeight:600,color:H[i].text,fontFamily:A}},{children:[n.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:H[i].dot}}),s," ",H[i].label]}),i)})}))]})),n.jsx("div",e.__assign({style:{flex:1,overflowY:"auto",padding:16}},{children:n.jsxs("div",e.__assign({ref:y,style:{display:"grid",gridTemplateColumns:"1fr 140px 1fr",alignItems:"start",gap:"0",position:"relative"}},{children:[n.jsx("svg",e.__assign({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}},{children:C.map(function(t,i){var s=(t.x1+t.x2)/2,r=t.y1,o=H[t.relation];return n.jsxs("g",{children:[n.jsx("line",{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:o.border,strokeWidth:"1.5"}),n.jsx("foreignObject",e.__assign({x:s-70,y:r-14,width:"140",height:"28"},{children:n.jsx("div",e.__assign({style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:n.jsx(N,{relation:t.relation})}))}))]},i)})})),n.jsxs("div",e.__assign({style:{border:"1.5px dashed #CBD5E1",borderRadius:10,padding:14,display:"flex",flexDirection:"column",gap:14}},{children:[n.jsx("p",e.__assign({style:{margin:"0 0 2px 0",fontSize:13,fontWeight:600,color:p,fontFamily:A}},{children:"Category You're Creating"})),h.map(function(e,t){return n.jsx(O,{ref:function(e){m.current[t]=e},label:e.label,value:e.proposed},t)})]})),n.jsx("div",{}),n.jsxs("div",e.__assign({style:{border:"1.5px dashed #CBD5E1",borderRadius:10,padding:14,display:"flex",flexDirection:"column",gap:14}},{children:[n.jsxs("p",e.__assign({style:{margin:"0 0 2px 0",fontSize:13,fontWeight:600,color:b,fontFamily:A,display:"flex",alignItems:"center",gap:5}},{children:[n.jsx(i.Sparkles,{size:13,color:b}),"Existing Category"]})),h.map(function(e,t){return n.jsx(O,{ref:function(e){j.current[t]=e},label:e.label,value:e.existing},t)})]}))]}))}))]}))]})},K=function(t){var s=t.condition,r=t.index,o=t.isEditing,a=t.editText,c=t.onEditStart,p=t.onEditChange,x=t.onEditSave,f=t.onEditCancel,_=t.onRemove,y=t.readOnly,m=t.onBlurContainer,b={width:40,height:38,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:w,borderRight:"1px solid #D0D5DD",color:j,fontSize:14,fontFamily:A};return o?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:12},onBlur:m},{children:[n.jsxs("div",e.__assign({style:{display:"flex",flex:1,alignItems:"center",background:v,border:"1px solid ".concat(d),borderRadius:E,overflow:"hidden"}},{children:[n.jsx("div",e.__assign({style:b},{children:r+1})),n.jsx("input",{type:"text",value:a,onChange:function(e){return p(e.target.value)},autoFocus:!0,onKeyDown:function(e){"Enter"===e.key&&a.trim()?x():"Escape"===e.key&&f()},style:{flex:1,padding:"8px 11.5px",fontSize:14,fontFamily:A,color:u,border:"none",outline:"none",background:"transparent"}})]})),n.jsx("button",e.__assign({type:"button",disabled:!a.trim(),onClick:x,style:e.__assign(e.__assign({},B),{borderRadius:E,opacity:a.trim()?1:.5,cursor:a.trim()?"pointer":"not-allowed",background:a.trim()?v:w})},{children:n.jsx(i.Check,{size:18,color:k})})),n.jsx("button",e.__assign({type:"button",onClick:f,style:e.__assign(e.__assign({},B),{borderRadius:E})},{children:n.jsx(i.X,{size:18,color:S})}))]})):n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:12}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",flex:1,alignItems:"center",background:v,border:"1px solid #D0D5DD",borderRadius:E,overflow:"hidden",height:38}},{children:[n.jsx("div",e.__assign({style:e.__assign(e.__assign({},b),{height:"100%"})},{children:r+1})),n.jsx("div",e.__assign({style:{flex:1,padding:"0 11.5px",fontSize:14,fontFamily:A,display:"flex",alignItems:"center",height:"100%"}},{children:s.text?n.jsx("span",e.__assign({style:{color:u}},{children:s.text})):n.jsx("span",e.__assign({style:{color:h}},{children:"Enter condition"}))}))]})),!y&&n.jsxs(n.Fragment,{children:[n.jsx("button",e.__assign({type:"button",onClick:c,style:e.__assign(e.__assign({},B),{border:"1px solid ".concat(l),borderRadius:E})},{children:n.jsx(i.Pencil,{size:16,color:z})})),n.jsx("button",e.__assign({type:"button",onClick:_,style:e.__assign(e.__assign({},B),{border:"1px solid ".concat(g),borderRadius:E})},{children:n.jsx(i.Trash2,{size:16,color:S})}))]})]}))},P=function(t){var s=t.title,r=t.required,o=t.isExpanded,a=t.setIsExpanded,d=t.conditions,c=t.prefix,g=t.editingCondKey,p=t.editingCondText,x=t.setEditingCondKey,_=t.setEditingCondText,m=t.onAdd,j=t.onUpdate,v=t.onRemove,w=t.addLabel,C=t.readOnly,F=t.errorMessage,k=t.style,S=d.length>0;return n.jsxs("div",e.__assign({style:e.__assign({border:"1px solid ".concat(l),borderRadius:E,padding:16},k)},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8,cursor:S?"pointer":"default",userSelect:"none"},onClick:function(){S&&a(function(e){return!e})}},{children:[n.jsxs("label",e.__assign({style:e.__assign(e.__assign({},T),{marginBottom:0,cursor:S?"pointer":"default"})},{children:[r&&W,n.jsx("span",{children:s})]})),n.jsx("button",e.__assign({type:"button",style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"flex",alignItems:"center",transform:o?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s"}},{children:n.jsx(i.ChevronUp,{size:20,color:S?u:h})}))]})),o&&n.jsxs(n.Fragment,{children:[0===d.length&&n.jsx("p",e.__assign({style:{color:f,fontSize:14,fontStyle:"italic",fontWeight:300,fontFamily:A,margin:"0 0 12px 0"}},{children:"No conditions applied"})),n.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:12,marginBottom:12}},{children:d.map(function(e,t){var i="".concat(c,"_").concat(e.id);return n.jsx(K,{condition:e,index:t,isEditing:g===i,editText:p,onEditStart:function(){x(i),_(e.text)},onEditChange:_,onEditSave:function(){p.trim()&&(j(e.id,p),x(null))},onEditCancel:function(){e.text?x(null):v(e.id)},onRemove:function(){return v(e.id)},readOnly:C,onBlurContainer:function(n){return function(e,n,t){if(!e.currentTarget.contains(e.relatedTarget)){var i="".concat(c,"_").concat(n);p.trim()||t?p.trim()&&j(n,p):v(n),g===i&&x(null)}}(n,e.id,e.text)}},e.id)})})),!C&&n.jsxs("button",e.__assign({type:"button",onClick:m,style:{display:"flex",alignItems:"center",gap:7,color:b,fontSize:14,fontWeight:500,fontFamily:A,background:"none",border:"none",cursor:"pointer",padding:0}},{children:[n.jsx(i.Plus,{size:16}),w]})),F&&n.jsx("p",e.__assign({style:{marginTop:8,color:y,fontSize:12,fontFamily:A,margin:"8px 0 0 0"}},{children:F}))]})]}))},U=function(s){var r=s.state,o=s.handlers,d=s.uiState,m=r.formData,w=r.nameLabel,H=void 0===w?"Category Name":w,L=r.namePlaceholder,M=void 0===L?"Enter category name":L,N=o.setFormData,O=d.readOnly,K=void 0!==O&&O,U=d.isAiStreaming,X=void 0!==U&&U;d.setActiveEditId,d.setSendMessageInChat;var Y=d.validationErrors,V=void 0===Y?{}:Y,Z=d.addExampleBtnRef,G=d.comparisonData,J=void 0===G?null:G,Q=d.onComparisonClose,$=t.useState(null),ee=$[0],ne=$[1],te=t.useState(""),ie=te[0],se=te[1],re=t.useState(null),oe=re[0],ae=re[1],le=t.useState(""),de=le[0],ce=le[1],ge=t.useState(!0),ue=ge[0],pe=ge[1],xe=t.useState(!0),fe=xe[0],he=xe[1],_e=t.useState(null),ye=_e[0],me=_e[1],be=t.useState(""),je=be[0],ve=be[1],we=t.useState(""),Ce=we[0],Fe=we[1],ke=t.useState([]),Se=ke[0],ze=ke[1],De=t.useState(!1),Ee=De[0],Ae=De[1],Be=t.useRef(null),Re=t.useState(!1),Te=Re[0],Ie=Re[1],We=t.useRef(X);t.useEffect(function(){J?requestAnimationFrame(function(){return Ae(!0)}):Ae(!1)},[J]),t.useEffect(function(){We.current&&!X&&Te&&Ie(!1),We.current=X},[X,Te]);var He=K,Le=t.useCallback(function(n,t){return N(function(i){var s;return e.__assign(e.__assign({},i),((s={})[n]=t,s))})},[N]),Me=function(n){var t=a();N(function(i){var s;return e.__assign(e.__assign({},i),((s={})[n]=e.__spreadArray(e.__spreadArray([],i[n],!0),[{id:t,text:""}],!1),s))}),ae("".concat("whenToApply"===n?"wta":"wnta","_").concat(t)),ce(""),"whenToApply"!==n||ue||pe(!0),"whenNotToApply"!==n||fe||he(!0)},Ne=function(n,t,i){return N(function(s){var r;return e.__assign(e.__assign({},s),((r={})[n]=s[n].map(function(n){return n.id===t?e.__assign(e.__assign({},n),{text:i}):n}),r))})},Oe=function(n,t){return N(function(i){var s;return e.__assign(e.__assign({},i),((s={})[n]=i[n].filter(function(e){return e.id!==t}),s))})},qe=function(n){return ze(function(t){return t.includes(n)?t.filter(function(e){return e!==n}):e.__spreadArray(e.__spreadArray([],t,!0),[n],!1)})},Ke=t.useCallback(function(){var n=a();N(function(t){return e.__assign(e.__assign({},t),{occurrences:e.__spreadArray(e.__spreadArray([],t.occurrences||[],!0),[{id:n,title:"",description:""}],!1)})}),me(n),ve(""),Fe(""),ze(function(t){return e.__spreadArray(e.__spreadArray([],t,!0),[n],!1)})},[N]),Pe=t.useCallback(function(){Ae(!1),setTimeout(function(){null==Q||Q()},280)},[Q]),Ue=function(t){return n.jsxs("button",e.__assign({ref:t?void 0:Z,type:"button",disabled:t,onClick:Ke,style:{display:"flex",alignItems:"center",gap:7,padding:"7px 10.5px",background:"none",border:"none",cursor:t?"not-allowed":"pointer",opacity:t?.5:1,transition:"opacity 0.15s"}},{children:[n.jsx(i.Plus,{size:14,color:b}),n.jsx("span",e.__assign({style:{color:b,fontSize:14,fontWeight:500,fontFamily:A}},{children:"Add example"}))]}))};return n.jsxs("div",e.__assign({style:{flex:1,overflowY:"auto",position:"relative"}},{children:[J&&n.jsx(q,{formData:m,existingData:J,onClose:Pe,visible:Ee}),Te&&X&&n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",color:"#141414",fontSize:13,fontWeight:500,fontStyle:"italic",marginBottom:12,paddingLeft:4,fontFamily:A}},{children:[n.jsx(i.Loader2Icon,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}}),"Updating category details..."]})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},I),{marginBottom:12})},{children:[n.jsxs("div",e.__assign({style:{marginBottom:12}},{children:[n.jsxs("label",e.__assign({style:T},{children:[W,n.jsx("span",{children:H})]})),He&&"name"!==ee?n.jsx("div",e.__assign({style:{display:"flex",alignItems:"center",gap:12}},{children:n.jsx("div",e.__assign({style:{flex:1,padding:"10px 14px",border:"1px solid #D0D5DD",borderRadius:D,fontSize:14,background:v,minHeight:42,display:"flex",alignItems:"center"}},{children:m.name?n.jsx("span",e.__assign({style:{color:u}},{children:m.name})):n.jsx("span",e.__assign({style:{color:_}},{children:M}))}))})):He&&"name"===ee?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:12}},{children:[n.jsx("input",{type:"text",value:ie,onChange:function(e){return se(e.target.value)},autoFocus:!0,onKeyDown:function(e){"Enter"===e.key?(Le("name",ie),ne(null)):"Escape"===e.key&&ne(null)},placeholder:M,style:e.__assign(e.__assign({},R),{flex:1,width:"auto",border:"1px solid ".concat(c)})}),n.jsx("button",e.__assign({type:"button",onClick:function(){Le("name",ie),ne(null)},style:B},{children:n.jsx(i.Check,{size:18,color:k})})),n.jsx("button",e.__assign({type:"button",onClick:function(){return ne(null)},style:B},{children:n.jsx(i.X,{size:18,color:S})}))]})):n.jsx("input",{type:"text",value:m.name,onChange:function(e){return Le("name",e.target.value)},placeholder:M,disabled:X,style:e.__assign(e.__assign({},R),{opacity:X?.6:1,cursor:X?"not-allowed":"text"})}),(null==V?void 0:V.name)&&n.jsx("p",e.__assign({style:{marginTop:4,color:y,fontSize:12,fontFamily:A,margin:"4px 0 0 0"}},{children:V.name}))]})),n.jsxs("div",e.__assign({style:{marginBottom:12}},{children:[n.jsxs("label",e.__assign({style:T},{children:[W,n.jsx("span",{children:"Category Description"})]})),He&&"description"!==ee?n.jsx("div",e.__assign({style:{display:"flex",alignItems:"flex-start",gap:12}},{children:n.jsx("div",e.__assign({style:{flex:1,padding:"12px 14px",border:"1px solid #D0D5DD",borderRadius:D,fontSize:14,background:v,minHeight:80}},{children:m.description?n.jsx("span",e.__assign({style:{color:u,whiteSpace:"pre-wrap"}},{children:m.description})):n.jsx("span",e.__assign({style:{color:_}},{children:"Describe when this category should be applied"}))}))})):He&&"description"===ee?n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"flex-start",gap:12}},{children:[n.jsx("textarea",{value:ie,onChange:function(e){return se(e.target.value)},autoFocus:!0,onKeyDown:function(e){"Escape"===e.key&&ne(null)},placeholder:"Enter Description",rows:4,style:e.__assign(e.__assign({},R),{flex:1,width:"auto",border:"1px solid ".concat(c),resize:"none",lineHeight:"140%"})}),n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:8}},{children:[n.jsx("button",e.__assign({type:"button",onClick:function(){Le("description",ie),ne(null)},style:B},{children:n.jsx(i.Check,{size:18,color:k})})),n.jsx("button",e.__assign({type:"button",onClick:function(){return ne(null)},style:B},{children:n.jsx(i.X,{size:18,color:S})}))]}))]})):n.jsx("textarea",{value:m.description,onChange:function(e){return Le("description",e.target.value)},placeholder:"Describe when this category should be applied.",disabled:X,style:e.__assign(e.__assign({},R),{height:60,paddingTop:7,paddingBottom:10.5,border:"1px solid ".concat(l),lineHeight:"140%",resize:"none",boxShadow:"0 1px 2px 0 rgba(18,18,23,0.05)",opacity:X?.6:1,cursor:X?"not-allowed":"text"})}),(null==V?void 0:V.description)&&n.jsx("p",e.__assign({style:{marginTop:4,color:y,fontSize:12,fontFamily:A,margin:"4px 0 0 0"}},{children:V.description}))]})),n.jsx(P,{title:"When to Apply",required:!0,isExpanded:ue,setIsExpanded:pe,conditions:m.whenToApply,prefix:"wta",editingCondKey:oe,editingCondText:de,setEditingCondKey:ae,setEditingCondText:ce,onAdd:function(){return Me("whenToApply")},onUpdate:function(e,n){return Ne("whenToApply",e,n)},onRemove:function(e){return Oe("whenToApply",e)},addLabel:"Add When to Apply",readOnly:X||K,errorMessage:null==V?void 0:V.whenToApply,style:{marginBottom:12}}),n.jsx(P,{title:"When NOT to Apply",required:!1,isExpanded:fe,setIsExpanded:he,conditions:m.whenNotToApply,prefix:"wnta",editingCondKey:oe,editingCondText:de,setEditingCondKey:ae,setEditingCondText:ce,onAdd:function(){return Me("whenNotToApply")},onUpdate:function(e,n){return Ne("whenNotToApply",e,n)},onRemove:function(e){return Oe("whenNotToApply",e)},addLabel:"Add When NOT to Apply",readOnly:X||K,errorMessage:null==V?void 0:V.whenNotToApply})]})),n.jsxs("div",e.__assign({style:e.__assign(e.__assign({},I),{marginTop:12})},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12}},{children:[n.jsxs("div",{children:[n.jsxs("h4",e.__assign({style:{color:p,fontSize:14,fontWeight:500,lineHeight:"120%",letterSpacing:"0.02em",fontFamily:A,margin:"0 0 4px 0"}},{children:["Example (",(m.occurrences||[]).length,")"]})),n.jsx("p",e.__assign({style:{color:f,fontSize:12,fontWeight:300,lineHeight:"120%",letterSpacing:"0.02em",fontFamily:A,margin:0}},{children:"Add real examples to help the system understand this category"}))]}),(m.occurrences||[]).length>0&&!K&&Ue(null!==ye||X)]})),0===(m.occurrences||[]).length?n.jsxs("div",e.__assign({style:{border:"1px solid ".concat(l),borderRadius:E,background:v,padding:"24px 12px 12px",minHeight:181,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center"}},{children:[n.jsx("div",e.__assign({style:{marginBottom:16}},{children:n.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 56 56",fill:"none"},{children:[n.jsx("rect",{x:"4",y:"4",width:"48",height:"48",rx:"24",fill:"#F1F5F9"}),n.jsx("rect",{x:"4",y:"4",width:"48",height:"48",rx:"24",stroke:"#F8FAFC",strokeWidth:"8"}),n.jsx("rect",{width:"24",height:"24",transform:"translate(16 16)",fill:"#F1F5F9"}),n.jsx("path",{d:"M25 19.5V18M21.0607 21.0607L20 20M21.0607 29L20 30.0607M29 21.0607L30.0607 20M19.5 25H18M31.8645 32.1896L29.3727 36.817C29.0881 37.3457 28.9457 37.61 28.7745 37.6769C28.6259 37.7349 28.4585 37.7185 28.324 37.6328C28.1689 37.534 28.0806 37.2471 27.9038 36.6733L24.4452 25.4453C24.3008 24.9765 24.2286 24.7421 24.2867 24.5838C24.3373 24.446 24.446 24.3373 24.5838 24.2867C24.7421 24.2286 24.9765 24.3008 25.4452 24.4452L36.6732 27.9038C37.247 28.0806 37.5339 28.169 37.6327 28.324C37.7185 28.4586 37.7348 28.6259 37.6768 28.7745C37.61 28.9458 37.3456 29.0881 36.817 29.3728L32.1896 31.8645C32.111 31.9068 32.0717 31.9279 32.0374 31.9551C32.0068 31.9792 31.9792 32.0068 31.9551 32.0374C31.9279 32.0717 31.9068 32.111 31.8645 32.1896Z",stroke:"#475569",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))})),n.jsx("p",e.__assign({style:{color:x,fontSize:12,fontWeight:500,lineHeight:"120%",fontFamily:A,margin:"0 0 8px 0"}},{children:"No example added yet"})),n.jsx("p",e.__assign({style:{color:f,fontSize:14,fontWeight:300,lineHeight:"140%",fontFamily:A,margin:"0 0 8px 0",maxWidth:530}},{children:"Add an example to show how this category is used, or generate one using chat."})),!K&&Ue(null!==ye||X)]})):n.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:12}},{children:(m.occurrences||[]).map(function(t,s){var r=Se.includes(t.id);return ye===t.id?n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",gap:12,border:"1px solid ".concat(l),borderRadius:E,background:v,padding:16,boxShadow:"0 1px 3px rgba(0,0,0,0.07)"}},{children:[n.jsxs("div",{children:[n.jsx("label",e.__assign({style:e.__assign(e.__assign({},T),{marginBottom:8})},{children:n.jsx("span",e.__assign({style:{color:x}},{children:"Title/Subject"}))})),n.jsx("input",{type:"text",value:je,onChange:function(e){return ve(e.target.value)},placeholder:"e.g., Follow-up on client feedback from last meeting",style:e.__assign(e.__assign({},R),{border:"1px solid ".concat(l),lineHeight:"140%"})})]}),n.jsxs("div",{children:[n.jsxs("label",e.__assign({style:{display:"flex",alignItems:"center",gap:4,marginBottom:8}},{children:[n.jsx("span",e.__assign({style:{color:x,fontSize:14,fontWeight:500,fontFamily:A}},{children:"Message body"})),W]})),n.jsx("textarea",{ref:function(e){e&&ye===t.id&&!Be.current&&(Be.current=e),e&&(e.style.height="auto",e.style.height="".concat(e.scrollHeight,"px"))},value:Ce,onChange:function(e){Fe(e.target.value),e.target.style.height="auto",e.target.style.height="".concat(e.target.scrollHeight,"px")},placeholder:"e.g., Hi, here's the latest update on the project. Let us know if you have any questions.",rows:1,style:e.__assign(e.__assign({},R),{border:"1px solid ".concat(l),overflow:"hidden",minHeight:60,lineHeight:"140%",resize:"none"})})]}),n.jsxs("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",gap:12,marginTop:4}},{children:[n.jsx("button",e.__assign({type:"button",onClick:function(){t.title||t.description||N(function(n){return e.__assign(e.__assign({},n),{occurrences:(n.occurrences||[]).filter(function(e){return e.id!==t.id})})}),me(null),Be.current=null},style:{padding:"6px 12px",color:j,fontSize:14,fontWeight:500,lineHeight:"140%",fontFamily:A,background:"none",border:"none",cursor:"pointer",borderRadius:D}},{children:"Cancel"})),n.jsx("button",e.__assign({type:"button",disabled:!Ce.trim(),onClick:function(){var n;Ce.trim()&&(n=t.id,N(function(t){return e.__assign(e.__assign({},t),{occurrences:t.occurrences.map(function(t){return t.id===n?e.__assign(e.__assign({},t),{title:je,description:Ce}):t})})}),me(null),Be.current=null,ze(function(e){return e.filter(function(e){return e!==t.id})}))},style:{padding:"6px 12px",borderRadius:D,fontSize:14,fontWeight:500,lineHeight:"140%",fontFamily:A,cursor:Ce.trim()?"pointer":"not-allowed",background:Ce.trim()?F:v,border:"1px solid ".concat(Ce.trim()?F:"#E2E8F0"),color:Ce.trim()?b:h,transition:"background 0.15s"}},{children:"Save"}))]}))]}),t.id):n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",border:"1px solid #E2E8F0",borderRadius:E,background:v,overflow:"hidden",boxShadow:"0 1px 3px rgba(0,0,0,0.07)"}},{children:[n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:12,padding:12}},{children:[n.jsx("div",e.__assign({style:{width:20,height:20,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:C,borderRadius:D,color:j,fontSize:10,fontWeight:500,fontFamily:A}},{children:s+1})),n.jsx("div",e.__assign({style:{flex:1,fontSize:15,fontWeight:500,lineHeight:"140%",fontFamily:A,color:x,wordBreak:"break-word"}},{children:t.title||n.jsx("span",e.__assign({style:{color:h,fontWeight:400,fontSize:14}},{children:"Untitled example"}))})),n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:8,flexShrink:0}},{children:[!K&&n.jsxs(n.Fragment,{children:[n.jsx("button",e.__assign({type:"button",disabled:null!==ye||X,onClick:function(){me(t.id),ve(t.title),Fe(t.description),r||qe(t.id)},style:e.__assign(e.__assign({},B),{width:36,height:36,border:"1px solid #E2E8F0",borderRadius:D,opacity:null!==ye||X?.5:1,cursor:null!==ye||X?"not-allowed":"pointer"})},{children:n.jsx(i.Pencil,{size:16,color:z})})),n.jsx("button",e.__assign({type:"button",disabled:null!==ye||X,onClick:function(){return N(function(n){return e.__assign(e.__assign({},n),{occurrences:(n.occurrences||[]).filter(function(e){return e.id!==t.id})})})},style:e.__assign(e.__assign({},B),{width:36,height:36,border:"1px solid ".concat(g),borderRadius:D,opacity:null!==ye||X?.5:1,cursor:null!==ye||X?"not-allowed":"pointer"})},{children:n.jsx(i.Trash2,{size:16,color:S})}))]}),n.jsx("button",e.__assign({type:"button",onClick:function(){return qe(t.id)},style:e.__assign(e.__assign({},B),{width:36,height:36,border:"none",background:"transparent"})},{children:r?n.jsx(i.ChevronUp,{size:20,color:z}):n.jsx(i.ChevronDown,{size:20,color:z})}))]}))]})),r&&n.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",padding:"4px 12px 16px"}},{children:[n.jsxs("div",e.__assign({style:{marginBottom:12}},{children:[n.jsx("p",e.__assign({style:{color:f,fontSize:13,lineHeight:"140%",fontFamily:A,margin:"0 0 4px 0"}},{children:"Title/Subject:"})),n.jsx("p",e.__assign({style:{color:p,fontSize:14,fontWeight:300,lineHeight:"150%",fontFamily:A,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0}},{children:t.title||n.jsx("span",e.__assign({style:{color:h,fontStyle:"italic"}},{children:"—"}))}))]})),n.jsxs("div",{children:[n.jsx("p",e.__assign({style:{color:f,fontSize:13,lineHeight:"140%",fontFamily:A,margin:"0 0 4px 0"}},{children:"Message body:"})),n.jsx("p",e.__assign({style:{color:p,fontSize:14,fontWeight:300,lineHeight:"150%",fontFamily:A,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0}},{children:t.description}))]})]}))]}),t.id)})}))]}))]}))};exports.CreateCategory=U,exports.default=U;
2
+ //# sourceMappingURL=CreateCategory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateCategory.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,t=require("../Testing/Testing.js"),a=require("../TrafficManager/CreateRule.js"),s=require("../TrafficManager/TrafficManagerTemplate.js"),o=require("../WorkflowComposer/WorkflowComposer.js");exports.TemplateList=void 0,(r=exports.TemplateList||(exports.TemplateList={})).TrafficManager="TRAFFIC_MANAGER",r.testing="TESTING",r.CreateRule="CREATE_RULE",r.WorkflowComposer="WORKFLOW_COMPOSER";var p=((e={})[exports.TemplateList.TrafficManager]=s.TrafficManagerTemplate,e[exports.TemplateList.testing]=t.Testing,e[exports.TemplateList.CreateRule]=a.CreateRule,e[exports.TemplateList.WorkflowComposer]=o.WorkflowComposer,e);exports.TemplateMap=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r,t=require("../CreateCategory/CreateCategory.js"),a=require("../Testing/Testing.js"),o=require("../TrafficManager/CreateRule.js"),s=require("../TrafficManager/TrafficManagerTemplate.js"),p=require("../WorkflowComposer/WorkflowComposer.js");exports.TemplateList=void 0,(r=exports.TemplateList||(exports.TemplateList={})).TrafficManager="TRAFFIC_MANAGER",r.testing="TESTING",r.CreateRule="CREATE_RULE",r.WorkflowComposer="WORKFLOW_COMPOSER",r.CreateCategory="CREATE_CATEGORY";var i=((e={})[exports.TemplateList.TrafficManager]=s.TrafficManagerTemplate,e[exports.TemplateList.testing]=a.Testing,e[exports.TemplateList.CreateRule]=o.CreateRule,e[exports.TemplateList.WorkflowComposer]=p.WorkflowComposer,e[exports.TemplateList.CreateCategory]=t.CreateCategory,e);exports.TemplateMap=i;
2
2
  //# sourceMappingURL=templatesMap.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,jsxs as o}from"react/jsx-runtime";import{Dialog as t,DialogContent as i,Box as a}from"@mui/material";import s,{useState as r,useEffect as l,useCallback as d}from"react";import u from"./_components/ChatComponents/ChatComponent.js";import c from"./_components/ILPopup.js";import m from"./_components/VariantLoadingOverlay.js";import h from"./_components/templates/RuleComparison/RuleComparison.js";import g from"./_components/templates/RuleComparison/AgentComposerRuleComparison.js";import p from"./_components/ChatComponents/NormalChat.js";var f=function(f){var C=f.open,v=f.chatAssistantName,x=f.organizationName,S=f.baseUrl,b=f.baseWebsocketUrl,k=f.closeFunction,w=f.ThinkingBulbIconComponent,y=f.customSections,R=f.customMetaData,M=f.chatTitle,I=void 0===M?"Instant Learning On-The-Job":M,F=f.formTitle,T=void 0===F?"Instant Learning On-The-Job Form":F,A=f.onSave,V=f.headerMessageHandlers,L=f.aiResponse,W=f.setAIResponse,D=f.width,E=void 0===D?"90vw":D,P=f.height,B=void 0===P?"90vh":P,z=f.sendMessageInChat,N=void 0===z?"":z,O=f.setSendMessageInChat,j=f.validateCustom,U=f.onResetChat,J=f.template,_=f.templateProps,q=f.initialChatMessage,H=f.setCitations,G=f.isLoading,X=void 0!==G&&G,Y=f.isLocked,K=void 0!==Y&&Y,Q=f.saveButtonConfig,Z=void 0===Q?{label:"Save Learning",loadingLabel:"Saving Learning..."}:Q,$=f.saveWithoutValBtnConfig,ee=void 0===$?{label:"Save Without Validation",loadingLabel:"Saving Without Validation..."}:$,ne=f.textareaPlaceholder,oe=f.setCurrentRequestId,te=f.showSavedMessage,ie=void 0!==te&&te,ae=f.savedMessage,se=void 0===ae?"Thank you teacher for teaching me, your learning has been saved successfully.":ae,re=f.isError,le=void 0!==re&&re,de=f.errorMessage,ue=void 0===de?"I'm sorry, I couldn't save your changes. Please try again.":de,ce=f.isSaving,me=void 0!==ce&&ce,he=f.isAiStreaming,ge=f.setIsAiStreaming,pe=f.showConfirmReset,fe=void 0!==pe&&pe,Ce=f.setShowConfirmReset,ve=f.confirmReset,xe=f.isLoadingVariants,Se=f.isFormDirty,be=f.onResetRequest,ke=f.mainText,we=void 0===ke?"Adding a variant":ke,ye=f.subText,Re=void 0===ye?"This may take a moment as we update the learning with the new variant.":ye,Me=f.showComparison,Ie=void 0!==Me&&Me,Fe=f.setShowComparison,Te=f.showAgentComposerRuleComparison,Ae=void 0!==Te&&Te,Ve=f.setShowAgentComposerRuleComparison,Le=f.isFetchingComparison,We=f.handleOpenComparison,De=f.proposedRule,Ee=f.variants,Pe=f.onAddAsVariant,Be=f.isCopyEnabled,ze=f.showSaveWithoutValidation,Ne=void 0!==ze&&ze,Oe=f.onSaveWithoutValidation,je=f.onComparisonLinkClick,Ue=f.targetComparisonVariantId,Je=f.highlightedComparisonField,_e=f.onSubmitFeedback,qe=f.isUseNormalChat,He=void 0!==qe&&qe,Ge=f.userDetails,Xe=f.handleGlobalClickCapture,Ye=f.isGlobalEditActive,Ke=r(C),Qe=Ke[0],Ze=Ke[1],$e=r(!1);$e[0];var en=$e[1],nn=r(!1),on=nn[0],tn=nn[1],an=r(!1),sn=an[0];an[1];var rn=r(45),ln=rn[0],dn=rn[1],un=r("right"),cn=un[0],mn=un[1],hn=s.useRef(cn),gn=r(!1),pn=gn[0],fn=gn[1],Cn=r(0),vn=Cn[0],xn=Cn[1],Sn=r(40),bn=Sn[0],kn=Sn[1];l(function(){hn.current=cn},[cn]),l(function(){Ze(C)},[C]);var wn=d(function(e){e.preventDefault(),fn(!0),xn(e.clientX),kn(ln)},[ln]),yn=d(function(e){if(pn){var n=document.querySelector("[data-dialog-content]");if(n){var o=n.getBoundingClientRect(),t=(e.clientX-vn)/o.width*100,i=Math.max(20,Math.min(80,bn+t));dn(i),i>bn&&mn("right"),i<bn&&mn("left")}}},[pn,vn,bn]),Rn=d(function(){fn(!1)},[]);l(function(){if(pn)return document.addEventListener("mousemove",yn),document.addEventListener("mouseup",Rn),function(){document.removeEventListener("mousemove",yn),document.removeEventListener("mouseup",Rn)}},[pn,yn,Rn]);var Mn=function(e,n){K&&"backdropClick"===n||("escapeKeyDown"!==n&&"manualClose"!==n||!(null==Se?void 0:Se())?(Ze(!1),k()):null==be||be())},In=d(function(e){dn(function(n){var o;if("number"==typeof e)return e>n&&mn("right"),e<n&&mn("left"),e;var t=hn.current,i=null!==(o={20:30,30:"left"===t?20:50,50:"left"===t?30:75,75:"left"===t?50:100,100:75}[n])&&void 0!==o?o:40;return 100===i&&mn("left"),20===i&&mn("right"),i})},[]),Fn=d(function(){We&&(In(30),We())},[In,We]);return n(t,e({open:Qe,onClose:Mn,maxWidth:!1,fullWidth:!0,PaperProps:{sx:{width:E,height:B,display:"flex",flexDirection:"column",padding:0,margin:0,maxWidth:"100vw",borderRadius:"10px"}}},{children:o(i,e({"data-dialog-content":!0,onClickCapture:Xe,sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"row",gap:0,padding:0,fontFamily:'"Plus Jakarta Sans", sans-serif',"& *":{fontFamily:'"Plus Jakarta Sans", sans-serif !important'}}},{children:[n(a,e({sx:{width:"".concat(ln,"%"),maxWidth:"".concat(ln,"%"),transition:pn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",bgcolor:"#ffffff",p:0,display:0===ln?"none":"flex",flexDirection:"column"}},{children:He?n(p,{chatAssistantName:v,organizationName:x,baseUrl:S,baseWebsocketUrl:b,setIsNewChatClicked:en,ThinkingBulbIconComponent:w,isFormSaveClicked:on,setIsFormSavedClicked:tn,onResetLearningData:function(){},sendMessageInChat:N,setSendMessageInChat:O,isFormValidating:sn,chatTitle:I,customMetaData:R,headerMessageHandlers:V,aiResponse:L,setAIResponse:W,onResetChat:U,initialChatMessage:q,onSave:A,chatSize:ln,movingTowards:cn,setChatSize:In,setCitations:H,textareaPlaceholder:ne,setCurrentRequestId:oe,showSavedMessage:ie,savedMessage:se,isError:le,errorMessage:ue,isSaving:me,onStreamingStateChange:ge,onViewComparison:Fn,isCopyEnabled:Be,onComparisonLinkClick:je,onSubmitFeedback:_e}):n(u,{chatAssistantName:v,organizationName:x,baseUrl:S,baseWebsocketUrl:S,setIsNewChatClicked:en,ThinkingBulbIconComponent:w,isFormSaveClicked:on,setIsFormSavedClicked:tn,onResetLearningData:function(){},sendMessageInChat:N,setSendMessageInChat:O,isFormValidating:sn,chatTitle:I,customMetaData:R,headerMessageHandlers:V,aiResponse:L,setAIResponse:W,onResetChat:U,initialChatMessage:q,onSave:A,chatSize:ln,movingTowards:cn,setChatSize:In,setCitations:H,textareaPlaceholder:ne,setCurrentRequestId:oe,showSavedMessage:ie,savedMessage:se,isError:le,errorMessage:ue,isSaving:me,onStreamingStateChange:ge,onViewComparison:Fn,isCopyEnabled:Be,onComparisonLinkClick:je,onSubmitFeedback:_e,userDetails:Ge,isGlobalEditActive:Ye})})),n(a,{sx:{width:"2px",cursor:"col-resize",backgroundColor:pn?"#1976d2":"#e0e0e0",transition:"background-color 0.2s ease","&:hover":{backgroundColor:"#1976d2"},flexShrink:0},onMouseDown:wn}),o(a,e({sx:{width:"".concat(100-ln,"%"),maxWidth:"".concat(100-ln,"%"),transition:pn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",display:100===ln?"none":"flex",flexDirection:"column",overflowY:"hidden",position:"relative"}},{children:[n(m,{isLoading:Le||!1,mainText:"Fetching differences between rules",subText:"This may take a moment..."}),n(m,{isLoading:xe||!1,mainText:we,subText:Re}),Ae?n(g,{proposedRule:De,variants:Ee,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Pe||Pe(),In(40),null==Ve||Ve(!1)},onSkip:function(){In(40),null==Ve||Ve(!1)},onBack:function(){In(40),null==Ve||Ve(!1)},targetVariantId:Ue,highlightedField:Je}):Ie?n(h,{proposedRule:De,variants:Ee,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Pe||Pe(),In(40),null==Fe||Fe(!1)},onSkip:function(){In(40),null==Fe||Fe(!1)},onBack:function(){In(40),null==Fe||Fe(!1)},targetVariantId:Ue,highlightedField:Je}):n(c,{setIsFormSavedClicked:tn,customSections:y,onSave:A,formHeader:T,onClose:function(){return Mn(0,"manualClose")},validateCustom:j,template:J,templateProps:_,isLoading:X,isAiStreaming:he,saveButtonConfig:Z,showSaveWithoutValidation:Ne,saveWithoutValBtnConfig:ee,onSaveWithoutValidation:Oe}),n(t,e({open:fe,onClose:function(){return null==Ce?void 0:Ce(!1)},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:o(a,e({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[n("h3",e({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"6px"}},{children:"Exit Teach Me OTJ?"})),n("p",e({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"10px"}},{children:"Exiting will discard any unsaved changes and end your session."})),o(a,e({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[n("button",e({onClick:function(){return null==Ce?void 0:Ce(!1)},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Cancel"})),n("button",e({onClick:ve,style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Yes, Discard"}))]}))]}))}))]}))]}))}))};export{f as default};
1
+ import{__assign as e}from"tslib";import{jsx as n,jsxs as o}from"react/jsx-runtime";import{Dialog as t,DialogContent as a,Box as i}from"@mui/material";import s,{useState as r,useEffect as l,useCallback as d}from"react";import u from"./_components/ChatComponents/ChatComponent.js";import c from"./_components/ILPopup.js";import m from"./_components/VariantLoadingOverlay.js";import h from"./_components/templates/RuleComparison/RuleComparison.js";import g from"./_components/templates/RuleComparison/AgentComposerRuleComparison.js";import p from"./_components/ChatComponents/NormalChat.js";var C=function(C){var f=C.open,v=C.chatAssistantName,x=C.organizationName,S=C.baseUrl,b=C.baseWebsocketUrl,k=C.closeFunction,w=C.ThinkingBulbIconComponent,y=C.customSections,R=C.customMetaData,M=C.chatTitle,I=void 0===M?"Instant Learning On-The-Job":M,F=C.formTitle,T=void 0===F?"Instant Learning On-The-Job Form":F,A=C.onSave,V=C.headerMessageHandlers,L=C.aiResponse,W=C.setAIResponse,D=C.width,E=void 0===D?"90vw":D,B=C.height,P=void 0===B?"90vh":B,z=C.sendMessageInChat,N=void 0===z?"":z,O=C.setSendMessageInChat,j=C.validateCustom,U=C.onResetChat,J=C.template,_=C.templateProps,q=C.initialChatMessage,H=C.setCitations,G=C.isLoading,X=void 0!==G&&G,Y=C.isLocked,K=void 0!==Y&&Y,Q=C.saveButtonConfig,Z=void 0===Q?{label:"Save Learning",loadingLabel:"Saving Learning..."}:Q,$=C.saveButtonColor,ee=C.saveWithoutValBtnConfig,ne=void 0===ee?{label:"Save Without Validation",loadingLabel:"Saving Without Validation..."}:ee,oe=C.textareaPlaceholder,te=C.setCurrentRequestId,ae=C.showSavedMessage,ie=void 0!==ae&&ae,se=C.savedMessage,re=void 0===se?"Thank you teacher for teaching me, your learning has been saved successfully.":se,le=C.isError,de=void 0!==le&&le,ue=C.errorMessage,ce=void 0===ue?"I'm sorry, I couldn't save your changes. Please try again.":ue,me=C.isSaving,he=void 0!==me&&me,ge=C.isAiStreaming,pe=C.setIsAiStreaming,Ce=C.showConfirmReset,fe=void 0!==Ce&&Ce,ve=C.setShowConfirmReset,xe=C.confirmReset,Se=C.isLoadingVariants,be=C.isFormDirty,ke=C.onResetRequest,we=C.mainText,ye=void 0===we?"Adding a variant":we,Re=C.subText,Me=void 0===Re?"This may take a moment as we update the learning with the new variant.":Re,Ie=C.showComparison,Fe=void 0!==Ie&&Ie,Te=C.setShowComparison,Ae=C.showAgentComposerRuleComparison,Ve=void 0!==Ae&&Ae,Le=C.setShowAgentComposerRuleComparison,We=C.isFetchingComparison,De=C.handleOpenComparison,Ee=C.proposedRule,Be=C.variants,Pe=C.onAddAsVariant,ze=C.isCopyEnabled,Ne=C.showSaveWithoutValidation,Oe=void 0!==Ne&&Ne,je=C.onSaveWithoutValidation,Ue=C.onComparisonLinkClick,Je=C.targetComparisonVariantId,_e=C.highlightedComparisonField,qe=C.onSubmitFeedback,He=C.isUseNormalChat,Ge=void 0!==He&&He,Xe=C.userDetails,Ye=C.handleGlobalClickCapture,Ke=C.isGlobalEditActive,Qe=r(f),Ze=Qe[0],$e=Qe[1],en=r(!1);en[0];var nn=en[1],on=r(!1),tn=on[0],an=on[1],sn=r(!1),rn=sn[0];sn[1];var ln=r(45),dn=ln[0],un=ln[1],cn=r("right"),mn=cn[0],hn=cn[1],gn=s.useRef(mn),pn=r(!1),Cn=pn[0],fn=pn[1],vn=r(0),xn=vn[0],Sn=vn[1],bn=r(40),kn=bn[0],wn=bn[1];l(function(){gn.current=mn},[mn]),l(function(){$e(f)},[f]);var yn=d(function(e){e.preventDefault(),fn(!0),Sn(e.clientX),wn(dn)},[dn]),Rn=d(function(e){if(Cn){var n=document.querySelector("[data-dialog-content]");if(n){var o=n.getBoundingClientRect(),t=(e.clientX-xn)/o.width*100,a=Math.max(20,Math.min(80,kn+t));un(a),a>kn&&hn("right"),a<kn&&hn("left")}}},[Cn,xn,kn]),Mn=d(function(){fn(!1)},[]);l(function(){if(Cn)return document.addEventListener("mousemove",Rn),document.addEventListener("mouseup",Mn),function(){document.removeEventListener("mousemove",Rn),document.removeEventListener("mouseup",Mn)}},[Cn,Rn,Mn]);var In=function(e,n){K&&"backdropClick"===n||("escapeKeyDown"!==n&&"manualClose"!==n||!(null==be?void 0:be())?($e(!1),k()):null==ke||ke())},Fn=d(function(e){un(function(n){var o;if("number"==typeof e)return e>n&&hn("right"),e<n&&hn("left"),e;var t=gn.current,a=null!==(o={20:30,30:"left"===t?20:50,50:"left"===t?30:75,75:"left"===t?50:100,100:75}[n])&&void 0!==o?o:40;return 100===a&&hn("left"),20===a&&hn("right"),a})},[]),Tn=d(function(){De&&(Fn(30),De())},[Fn,De]);return n(t,e({open:Ze,onClose:In,maxWidth:!1,fullWidth:!0,PaperProps:{sx:{width:E,height:P,display:"flex",flexDirection:"column",padding:0,margin:0,maxWidth:"100vw",borderRadius:"10px"}}},{children:o(a,e({"data-dialog-content":!0,onClickCapture:Ye,sx:{flex:1,overflow:"hidden",display:"flex",flexDirection:"row",gap:0,padding:0,fontFamily:'"Plus Jakarta Sans", sans-serif',"& *":{fontFamily:'"Plus Jakarta Sans", sans-serif !important'}}},{children:[n(i,e({sx:{width:"".concat(dn,"%"),maxWidth:"".concat(dn,"%"),transition:Cn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",bgcolor:"#ffffff",p:0,display:0===dn?"none":"flex",flexDirection:"column"}},{children:Ge?n(p,{chatAssistantName:v,organizationName:x,baseUrl:S,baseWebsocketUrl:b,setIsNewChatClicked:nn,ThinkingBulbIconComponent:w,isFormSaveClicked:tn,setIsFormSavedClicked:an,onResetLearningData:function(){},sendMessageInChat:N,setSendMessageInChat:O,isFormValidating:rn,chatTitle:I,customMetaData:R,headerMessageHandlers:V,aiResponse:L,setAIResponse:W,onResetChat:U,initialChatMessage:q,onSave:A,chatSize:dn,movingTowards:mn,setChatSize:Fn,setCitations:H,textareaPlaceholder:oe,setCurrentRequestId:te,showSavedMessage:ie,savedMessage:re,isError:de,errorMessage:ce,isSaving:he,onStreamingStateChange:pe,onViewComparison:Tn,isCopyEnabled:ze,onComparisonLinkClick:Ue,onSubmitFeedback:qe}):n(u,{chatAssistantName:v,organizationName:x,baseUrl:S,baseWebsocketUrl:S,setIsNewChatClicked:nn,ThinkingBulbIconComponent:w,isFormSaveClicked:tn,setIsFormSavedClicked:an,onResetLearningData:function(){},sendMessageInChat:N,setSendMessageInChat:O,isFormValidating:rn,chatTitle:I,customMetaData:R,headerMessageHandlers:V,aiResponse:L,setAIResponse:W,onResetChat:U,initialChatMessage:q,onSave:A,chatSize:dn,movingTowards:mn,setChatSize:Fn,setCitations:H,textareaPlaceholder:oe,setCurrentRequestId:te,showSavedMessage:ie,savedMessage:re,isError:de,errorMessage:ce,isSaving:he,onStreamingStateChange:pe,onViewComparison:Tn,isCopyEnabled:ze,onComparisonLinkClick:Ue,onSubmitFeedback:qe,userDetails:Xe,isGlobalEditActive:Ke})})),n(i,{sx:{width:"2px",cursor:"col-resize",backgroundColor:Cn?"#1976d2":"#e0e0e0",transition:"background-color 0.2s ease","&:hover":{backgroundColor:"#1976d2"},flexShrink:0},onMouseDown:yn}),o(i,e({sx:{width:"".concat(100-dn,"%"),maxWidth:"".concat(100-dn,"%"),transition:Cn?"none":"width 0.3s ease-in-out, max-width 0.3s ease-in-out",display:100===dn?"none":"flex",flexDirection:"column",overflowY:"hidden",position:"relative"}},{children:[n(m,{isLoading:We||!1,mainText:"Fetching differences between rules",subText:"This may take a moment..."}),n(m,{isLoading:Se||!1,mainText:ye,subText:Me}),Ve?n(g,{proposedRule:Ee,variants:Be,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Pe||Pe(),Fn(40),null==Le||Le(!1)},onSkip:function(){Fn(40),null==Le||Le(!1)},onBack:function(){Fn(40),null==Le||Le(!1)},targetVariantId:Je,highlightedField:_e}):Fe?n(h,{proposedRule:Ee,variants:Be,onSelectVariant:function(e){console.log("Selected Variant ID:",e.id)},onAddAsVariant:function(){null==Pe||Pe(),Fn(40),null==Te||Te(!1)},onSkip:function(){Fn(40),null==Te||Te(!1)},onBack:function(){Fn(40),null==Te||Te(!1)},targetVariantId:Je,highlightedField:_e}):n(c,{setIsFormSavedClicked:an,customSections:y,onSave:A,formHeader:T,onClose:function(){return In(0,"manualClose")},validateCustom:j,template:J,templateProps:_,isLoading:X,isAiStreaming:ge,saveButtonConfig:Z,saveButtonColor:$,showSaveWithoutValidation:Oe,saveWithoutValBtnConfig:ne,onSaveWithoutValidation:je}),n(t,e({open:fe,onClose:function(){return null==ve?void 0:ve(!1)},PaperProps:{sx:{borderRadius:"12px",padding:"8px",maxWidth:"400px"}}},{children:o(i,e({sx:{p:3,textAlign:"center",fontFamily:"'Plus Jakarta Sans', sans-serif"}},{children:[n("h3",e({style:{fontSize:"18px",fontWeight:600,color:"#0F172A",marginBottom:"6px"}},{children:"Exit Teach Me OTJ?"})),n("p",e({style:{fontSize:"14px",color:"#64748B",lineHeight:"1.5",marginBottom:"10px"}},{children:"Exiting will discard any unsaved changes and end your session."})),o(i,e({sx:{display:"flex",gap:2,justifyContent:"center"}},{children:[n("button",e({onClick:function(){return null==ve?void 0:ve(!1)},style:{flex:1,padding:"10px 16px",cursor:"pointer",backgroundColor:"white",border:"1px solid #E2E8F0",borderRadius:"8px",fontSize:"14px",fontWeight:500,color:"#475569",transition:"all 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F8FAFC"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="white"}},{children:"Cancel"})),n("button",e({onClick:xe,style:{flex:1,padding:"10px 16px",backgroundColor:"#EF4444",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:500,cursor:"pointer",transition:"background-color 0.2s"},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#DC2626"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="#EF4444"}},{children:"Yes, Discard"}))]}))]}))}))]}))]}))}))};export{C as default};
2
2
  //# sourceMappingURL=ILOTJ.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as i,Fragment as a,jsx as o}from"react/jsx-runtime";import{X as t,TriangleAlert as n}from"lucide-react";import{Typography as l}from"@mui/material";import s from"../InstantLearning.module.css.js";import{componentStyles as r}from"./ILPopup.styles.js";import{TemplateMap as d}from"./templates/TemplatesMap/templatesMap.js";var c=function(c){var m=c.customSections,p=c.showCustomSections,u=void 0===p||p,v=c.onSave,f=c.formHeader,g=c.onClose,h=c.validateCustom,b=c.template,x=c.templateProps,S=c.isLoading,y=c.saveButtonConfig,C=void 0===y?{label:"Save Learning",loadingLabel:"Saving Learning..."}:y,L=c.isAiStreaming,w=void 0!==L&&L,N=c.showSaveWithoutValidation,j=c.saveWithoutValBtnConfig,W=void 0===j?{label:"Save w/o validation",loadingLabel:"Saving w/o validation..."}:j,k=c.onSaveWithoutValidation,P=b?d[b]:null,B=!h||h();return i(a,{children:[o("style",{children:r}),i("div",e({className:"il-popup-container ".concat(s.customFont)},{children:[i("div",e({className:"form-header"},{children:[o(l,e({sx:{fontSize:"1.125rem",fontWeight:500,lineHeight:"1.82rem",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:f})),o("div",e({onClick:g,style:{cursor:"pointer"}},{children:o(t,{})}))]})),o("div",e({style:{flexGrow:1,display:"flex",flexDirection:"column",width:"100%",padding:"20px 24px",overflowY:"auto",borderBottom:"1px solid #E7E7E9"}},{children:i("div",e({className:"sections-space"},{children:[P&&o(P,e({},x)),u&&m]}))})),i("div",e({className:"save-button-container"},{children:[N&&i("button",e({className:"save-button-secondary",onClick:function(){k&&B&&k()},disabled:S||!B||w},{children:[o(n,{size:16,style:{marginRight:"4px"}}),S?W.loadingLabel:W.label]})),o("button",e({className:"save-button",onClick:function(){!h||h()?(v(),console.log("Form Data to Save:")):console.error("Please fill all required fields before saving the learning.")},disabled:S||!B||w,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",maxWidth:"fit-content"}},{children:S?C.loadingLabel:C.label}))]}))]}))]})};export{c as default};
1
+ import{__assign as e}from"tslib";import{jsxs as o,Fragment as i,jsx as a}from"react/jsx-runtime";import{X as t,TriangleAlert as l}from"lucide-react";import{Typography as n}from"@mui/material";import r from"../InstantLearning.module.css.js";import{componentStyles as s}from"./ILPopup.styles.js";import{TemplateMap as d}from"./templates/TemplatesMap/templatesMap.js";var c=function(c){var m=c.customSections,u=c.showCustomSections,p=void 0===u||u,v=c.onSave,f=c.formHeader,g=c.onClose,h=c.validateCustom,b=c.template,x=c.templateProps,S=c.isLoading,C=c.saveButtonConfig,y=void 0===C?{label:"Save Learning",loadingLabel:"Saving Learning..."}:C,L=c.isAiStreaming,w=void 0!==L&&L,N=c.showSaveWithoutValidation,j=c.saveWithoutValBtnConfig,k=void 0===j?{label:"Save w/o validation",loadingLabel:"Saving w/o validation..."}:j,W=c.onSaveWithoutValidation,B=c.saveButtonColor,P=b?d[b]:null,E=!h||h();return o(i,{children:[a("style",{children:s}),o("div",e({className:"il-popup-container ".concat(r.customFont)},{children:[o("div",e({className:"form-header"},{children:[a(n,e({sx:{fontSize:"1.125rem",fontWeight:500,lineHeight:"1.82rem",fontFamily:'"Plus Jakarta Sans", sans-serif'}},{children:f})),a("div",e({onClick:g,style:{cursor:"pointer"}},{children:a(t,{})}))]})),a("div",e({style:{flexGrow:1,display:"flex",flexDirection:"column",width:"100%",padding:"20px 24px",overflowY:"auto",borderBottom:"1px solid #E7E7E9"}},{children:o("div",e({className:"sections-space"},{children:[P&&a(P,e({},x)),p&&m]}))})),o("div",e({className:"save-button-container"},{children:[N&&o("button",e({className:"save-button-secondary",onClick:function(){W&&E&&W()},disabled:S||!E||w},{children:[a(l,{size:16,style:{marginRight:"4px"}}),S?k.loadingLabel:k.label]})),a("button",e({className:"save-button",onClick:function(){!h||h()?(v(),console.log("Form Data to Save:")):console.error("Please fill all required fields before saving the learning.")},disabled:S||!E||w,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",maxWidth:"fit-content",backgroundColor:B,borderColor:B}},{children:S?y.loadingLabel:y.label}))]}))]}))]})};export{c as default};
2
2
  //# sourceMappingURL=ILPopup.js.map
@@ -0,0 +1,2 @@
1
+ import{__assign as e,__spreadArray as t}from"tslib";import{jsx as n,jsxs as i,Fragment as o}from"react/jsx-runtime";import r,{useState as l,useRef as a,useEffect as d,useCallback as c,useMemo as s}from"react";import{Loader2Icon as p,Check as u,X as f,Pencil as h,Trash2 as g,ChevronUp as y,ChevronDown as x,ArrowLeft as m,Sparkles as b,Plus as v}from"lucide-react";var w=0,C=function(){return"cond-".concat(Date.now(),"-").concat(++w)},F="#CBD5E1",k="#9B8AFB",S="#7C3AED",z="#FDA29B",D="#344054",E="#1E293B",A="#334155",B="#64748B",R="#94A3B8",T="#98A2B3",I="#F04438",W="#8F2C23",H="#5925DC",j="#475569",L="#FFFFFF",M="#F8FAFC",N="#F1F5F9",_="#F9F5FF",O="#17B26A",K="#F04438",q="#64748B",U="6px",Y="8px",P="Inter, sans-serif",X={width:38,height:38,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid #D0D5DD",borderRadius:U,cursor:"pointer",background:L,flexShrink:0,transition:"background 0.15s"},V={width:"100%",boxSizing:"border-box",padding:"8px 11.5px",border:"1px solid #D0D5DD",borderRadius:U,fontSize:14,fontWeight:400,lineHeight:"100%",fontFamily:P,outline:"none",color:D,background:L},Z={display:"flex",alignItems:"center",gap:4,marginBottom:8,color:D,fontSize:14,fontWeight:500,lineHeight:"130%",fontFamily:P},G={background:L,border:"1px solid ".concat(F),borderRadius:Y,padding:16},J=n("span",e({style:{color:W,fontSize:12,lineHeight:1,display:"inline-flex",transform:"translateY(0.5px)"}},{children:"*"})),Q={exact_match:{label:"Exact Match",bg:"#F0FDF4",border:"#BBF7D0",text:"#166534",dot:"#22C55E"},conflict:{label:"Conflict",bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",dot:"#EF4444"},partial_overlap:{label:"Partial Match",bg:"#FFF7ED",border:"#FED7AA",text:"#92400E",dot:"#F97316"},new_field:{label:"New",bg:"#F5F3FF",border:"#DDD6FE",text:"#5925DC",dot:"#7C3AED"}},$=function(e){return e?Array.isArray(e)?e.filter(Boolean).join("\n"):e:""},ee=function(e,t){if(!t&&!e)return"exact_match";if(!t)return"new_field";if(!e)return"new_field";var n=function(e){return e.trim().toLowerCase()};if(n(e)===n(t))return"exact_match";var i=new Set(n(e).split(/\s+/)),o=new Set(n(t).split(/\s+/));return Array.from(i).filter(function(e){return o.has(e)}).length/Math.max(i.size,o.size)>=.45?"partial_overlap":"conflict"},te=function(t){var o=t.relation,r=Q[o];return i("div",e({style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 9px",borderRadius:20,background:r.bg,border:"1px solid ".concat(r.border),fontSize:10,fontWeight:600,color:r.text,fontFamily:P,whiteSpace:"nowrap",flexShrink:0}},{children:[n("span",{style:{width:5,height:5,borderRadius:"50%",background:r.dot,flexShrink:0}}),r.label]}))},ne=r.forwardRef(function(t,o){var r=t.label,l=t.value;return i("div",e({ref:o,style:{display:"flex",flexDirection:"column"}},{children:[n("p",e({style:{margin:"0 0 5px 0",fontSize:12,color:B,fontFamily:P}},{children:r})),n("div",e({style:{flex:1,padding:"9px 12px",borderRadius:Y,background:"#FFF3F2",border:"1px solid ".concat("#FECACA"),fontSize:13,lineHeight:"150%",color:l?E:R,fontFamily:P,fontStyle:l?"normal":"italic",wordBreak:"break-word",whiteSpace:"pre-wrap",minHeight:37}},{children:l||"—"}))]}))});ne.displayName="FieldCell";var ie=function(t){var r=t.formData,p=t.existingData,u=t.onClose,f=t.visible,h=r.whenToApply.map(function(e){return e.text}).filter(Boolean).join("\n"),g=r.whenNotToApply.map(function(e){return e.text}).filter(Boolean).join("\n"),y=$(p.whenToApply),x=$(p.whenNotToApply),v=s(function(){return[{label:"Title",proposed:r.name,existing:p.name||"",relation:ee(r.name,p.name||"")},{label:"Description",proposed:r.description,existing:p.description||"",relation:ee(r.description,p.description||"")},{label:"When to apply",proposed:h,existing:y,relation:ee(h,y)},{label:"When NOT to Apply",proposed:g,existing:x,relation:g?ee(g,x):x?"new_field":"exact_match"}]},[r.name,r.description,h,g,p.name,p.description,y,x]),w=v.reduce(function(e,t){return e[t.relation]=(e[t.relation]||0)+1,e},{}),C=a(null),k=a([]),S=a([]),z=l([]),D=z[0],B=z[1];k.current=[],S.current=[];var R=c(function(){if(C.current){var e=C.current.getBoundingClientRect(),t=[];v.forEach(function(n,i){var o=k.current[i],r=S.current[i];if(o&&r){o.style.height="auto",r.style.height="auto";var l=o.getBoundingClientRect(),a=r.getBoundingClientRect(),d=Math.max(l.height,a.height);o.style.height="".concat(d,"px"),r.style.height="".concat(d,"px");var c=o.getBoundingClientRect(),s=r.getBoundingClientRect(),p=c.top+c.height/2-e.top;t.push({x1:c.right-e.left,y1:p,x2:s.left-e.left,y2:p,relation:n.relation})}}),B(t)}},[v]);return d(function(){var e=setTimeout(R,150);window.addEventListener("resize",R);var t=null;return C.current&&(t=new ResizeObserver(function(){window.requestAnimationFrame(function(){return R()})})).observe(C.current),function(){clearTimeout(e),window.removeEventListener("resize",R),t&&t.disconnect()}},[R,f]),i(o,{children:[n("div",{onClick:u,style:{position:"absolute",inset:0,background:"rgba(15,23,42,0.18)",zIndex:10,opacity:f?1:0,transition:"opacity 0.25s ease",pointerEvents:f?"auto":"none"}}),i("div",e({style:{position:"absolute",inset:0,background:L,zIndex:11,display:"flex",flexDirection:"column",transform:f?"translateX(0)":"translateX(100%)",transition:"transform 0.28s cubic-bezier(0.4,0,0.2,1)",borderRadius:Y,overflow:"hidden"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid ".concat(F),flexShrink:0,background:L}},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[n("button",e({type:"button",onClick:u,style:e(e({},X),{width:32,height:32,border:"1px solid ".concat(F),borderRadius:U})},{children:n(m,{size:15,color:A})})),n("span",e({style:{fontSize:15,fontWeight:600,color:E,fontFamily:P,letterSpacing:"-0.01em"}},{children:"Category Comparison"}))]})),n("div",e({style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"}},{children:Object.entries(w).map(function(t){var o=t[0],r=t[1];return i("div",e({style:{display:"flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:20,background:Q[o].bg,border:"1px solid ".concat(Q[o].border),fontSize:11,fontWeight:600,color:Q[o].text,fontFamily:P}},{children:[n("span",{style:{width:5,height:5,borderRadius:"50%",background:Q[o].dot}}),r," ",Q[o].label]}),o)})}))]})),n("div",e({style:{flex:1,overflowY:"auto",padding:16}},{children:i("div",e({ref:C,style:{display:"grid",gridTemplateColumns:"1fr 140px 1fr",alignItems:"start",gap:"0",position:"relative"}},{children:[n("svg",e({style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:10}},{children:D.map(function(t,o){var r=(t.x1+t.x2)/2,l=t.y1,a=Q[t.relation];return i("g",{children:[n("line",{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:a.border,strokeWidth:"1.5"}),n("foreignObject",e({x:r-70,y:l-14,width:"140",height:"28"},{children:n("div",e({style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}},{children:n(te,{relation:t.relation})}))}))]},o)})})),i("div",e({style:{border:"1.5px dashed #CBD5E1",borderRadius:10,padding:14,display:"flex",flexDirection:"column",gap:14}},{children:[n("p",e({style:{margin:"0 0 2px 0",fontSize:13,fontWeight:600,color:E,fontFamily:P}},{children:"Category You're Creating"})),v.map(function(e,t){return n(ne,{ref:function(e){k.current[t]=e},label:e.label,value:e.proposed},t)})]})),n("div",{}),i("div",e({style:{border:"1.5px dashed #CBD5E1",borderRadius:10,padding:14,display:"flex",flexDirection:"column",gap:14}},{children:[i("p",e({style:{margin:"0 0 2px 0",fontSize:13,fontWeight:600,color:H,fontFamily:P,display:"flex",alignItems:"center",gap:5}},{children:[n(b,{size:13,color:H}),"Existing Category"]})),v.map(function(e,t){return n(ne,{ref:function(e){S.current[t]=e},label:e.label,value:e.existing},t)})]}))]}))}))]}))]})},oe=function(t){var r=t.condition,l=t.index,a=t.isEditing,d=t.editText,c=t.onEditStart,s=t.onEditChange,p=t.onEditSave,y=t.onEditCancel,x=t.onRemove,m=t.readOnly,b=t.onBlurContainer,v={width:40,height:38,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:M,borderRight:"1px solid #D0D5DD",color:j,fontSize:14,fontFamily:P};return i("div",a?e({style:{display:"flex",alignItems:"center",gap:12},onBlur:b},{children:[i("div",e({style:{display:"flex",flex:1,alignItems:"center",background:L,border:"1px solid ".concat(k),borderRadius:Y,overflow:"hidden"}},{children:[n("div",e({style:v},{children:l+1})),n("input",{type:"text",value:d,onChange:function(e){return s(e.target.value)},autoFocus:!0,onKeyDown:function(e){"Enter"===e.key&&d.trim()?p():"Escape"===e.key&&y()},style:{flex:1,padding:"8px 11.5px",fontSize:14,fontFamily:P,color:D,border:"none",outline:"none",background:"transparent"}})]})),n("button",e({type:"button",disabled:!d.trim(),onClick:p,style:e(e({},X),{borderRadius:Y,opacity:d.trim()?1:.5,cursor:d.trim()?"pointer":"not-allowed",background:d.trim()?L:M})},{children:n(u,{size:18,color:O})})),n("button",e({type:"button",onClick:y,style:e(e({},X),{borderRadius:Y})},{children:n(f,{size:18,color:K})}))]}):e({style:{display:"flex",alignItems:"center",gap:12}},{children:[i("div",e({style:{display:"flex",flex:1,alignItems:"center",background:L,border:"1px solid #D0D5DD",borderRadius:Y,overflow:"hidden",height:38}},{children:[n("div",e({style:e(e({},v),{height:"100%"})},{children:l+1})),n("div",e({style:{flex:1,padding:"0 11.5px",fontSize:14,fontFamily:P,display:"flex",alignItems:"center",height:"100%"}},{children:r.text?n("span",e({style:{color:D}},{children:r.text})):n("span",e({style:{color:R}},{children:"Enter condition"}))}))]})),!m&&i(o,{children:[n("button",e({type:"button",onClick:c,style:e(e({},X),{border:"1px solid ".concat(F),borderRadius:Y})},{children:n(h,{size:16,color:q})})),n("button",e({type:"button",onClick:x,style:e(e({},X),{border:"1px solid ".concat(z),borderRadius:Y})},{children:n(g,{size:16,color:K})}))]})]}))},re=function(t){var r=t.title,l=t.required,a=t.isExpanded,d=t.setIsExpanded,c=t.conditions,s=t.prefix,p=t.editingCondKey,u=t.editingCondText,f=t.setEditingCondKey,h=t.setEditingCondText,g=t.onAdd,x=t.onUpdate,m=t.onRemove,b=t.addLabel,w=t.readOnly,C=t.errorMessage,k=t.style,S=c.length>0;return i("div",e({style:e({border:"1px solid ".concat(F),borderRadius:Y,padding:16},k)},{children:[i("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8,cursor:S?"pointer":"default",userSelect:"none"},onClick:function(){S&&d(function(e){return!e})}},{children:[i("label",e({style:e(e({},Z),{marginBottom:0,cursor:S?"pointer":"default"})},{children:[l&&J,n("span",{children:r})]})),n("button",e({type:"button",style:{background:"none",border:"none",cursor:"pointer",padding:0,display:"flex",alignItems:"center",transform:a?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s"}},{children:n(y,{size:20,color:S?D:R})}))]})),a&&i(o,{children:[0===c.length&&n("p",e({style:{color:B,fontSize:14,fontStyle:"italic",fontWeight:300,fontFamily:P,margin:"0 0 12px 0"}},{children:"No conditions applied"})),n("div",e({style:{display:"flex",flexDirection:"column",gap:12,marginBottom:12}},{children:c.map(function(e,t){var i="".concat(s,"_").concat(e.id);return n(oe,{condition:e,index:t,isEditing:p===i,editText:u,onEditStart:function(){f(i),h(e.text)},onEditChange:h,onEditSave:function(){u.trim()&&(x(e.id,u),f(null))},onEditCancel:function(){e.text?f(null):m(e.id)},onRemove:function(){return m(e.id)},readOnly:w,onBlurContainer:function(t){return function(e,t,n){if(!e.currentTarget.contains(e.relatedTarget)){var i="".concat(s,"_").concat(t);u.trim()||n?u.trim()&&x(t,u):m(t),p===i&&f(null)}}(t,e.id,e.text)}},e.id)})})),!w&&i("button",e({type:"button",onClick:g,style:{display:"flex",alignItems:"center",gap:7,color:H,fontSize:14,fontWeight:500,fontFamily:P,background:"none",border:"none",cursor:"pointer",padding:0}},{children:[n(v,{size:16}),b]})),C&&n("p",e({style:{marginTop:8,color:I,fontSize:12,fontFamily:P,margin:"8px 0 0 0"}},{children:C}))]})]}))},le=function(r){var s=r.state,m=r.handlers,b=r.uiState,w=s.formData,k=s.nameLabel,W=void 0===k?"Category Name":k,M=s.namePlaceholder,Q=void 0===M?"Enter category name":M,$=m.setFormData,ee=b.readOnly,te=void 0!==ee&&ee,ne=b.isAiStreaming,oe=void 0!==ne&&ne;b.setActiveEditId,b.setSendMessageInChat;var le=b.validationErrors,ae=void 0===le?{}:le,de=b.addExampleBtnRef,ce=b.comparisonData,se=void 0===ce?null:ce,pe=b.onComparisonClose,ue=l(null),fe=ue[0],he=ue[1],ge=l(""),ye=ge[0],xe=ge[1],me=l(null),be=me[0],ve=me[1],we=l(""),Ce=we[0],Fe=we[1],ke=l(!0),Se=ke[0],ze=ke[1],De=l(!0),Ee=De[0],Ae=De[1],Be=l(null),Re=Be[0],Te=Be[1],Ie=l(""),We=Ie[0],He=Ie[1],je=l(""),Le=je[0],Me=je[1],Ne=l([]),_e=Ne[0],Oe=Ne[1],Ke=l(!1),qe=Ke[0],Ue=Ke[1],Ye=a(null),Pe=l(!1),Xe=Pe[0],Ve=Pe[1],Ze=a(oe);d(function(){se?requestAnimationFrame(function(){return Ue(!0)}):Ue(!1)},[se]),d(function(){Ze.current&&!oe&&Xe&&Ve(!1),Ze.current=oe},[oe,Xe]);var Ge=te,Je=c(function(t,n){return $(function(i){var o;return e(e({},i),((o={})[t]=n,o))})},[$]),Qe=function(n){var i=C();$(function(o){var r;return e(e({},o),((r={})[n]=t(t([],o[n],!0),[{id:i,text:""}],!1),r))}),ve("".concat("whenToApply"===n?"wta":"wnta","_").concat(i)),Fe(""),"whenToApply"!==n||Se||ze(!0),"whenNotToApply"!==n||Ee||Ae(!0)},$e=function(t,n,i){return $(function(o){var r;return e(e({},o),((r={})[t]=o[t].map(function(t){return t.id===n?e(e({},t),{text:i}):t}),r))})},et=function(t,n){return $(function(i){var o;return e(e({},i),((o={})[t]=i[t].filter(function(e){return e.id!==n}),o))})},tt=function(e){return Oe(function(n){return n.includes(e)?n.filter(function(t){return t!==e}):t(t([],n,!0),[e],!1)})},nt=c(function(){var n=C();$(function(i){return e(e({},i),{occurrences:t(t([],i.occurrences||[],!0),[{id:n,title:"",description:""}],!1)})}),Te(n),He(""),Me(""),Oe(function(e){return t(t([],e,!0),[n],!1)})},[$]),it=c(function(){Ue(!1),setTimeout(function(){null==pe||pe()},280)},[pe]),ot=function(t){return i("button",e({ref:t?void 0:de,type:"button",disabled:t,onClick:nt,style:{display:"flex",alignItems:"center",gap:7,padding:"7px 10.5px",background:"none",border:"none",cursor:t?"not-allowed":"pointer",opacity:t?.5:1,transition:"opacity 0.15s"}},{children:[n(v,{size:14,color:H}),n("span",e({style:{color:H,fontSize:14,fontWeight:500,fontFamily:P}},{children:"Add example"}))]}))};return i("div",e({style:{flex:1,overflowY:"auto",position:"relative"}},{children:[se&&n(ie,{formData:w,existingData:se,onClose:it,visible:qe}),Xe&&oe&&i("div",e({style:{display:"flex",alignItems:"center",color:"#141414",fontSize:13,fontWeight:500,fontStyle:"italic",marginBottom:12,paddingLeft:4,fontFamily:P}},{children:[n(p,{size:16,style:{marginRight:8,animation:"spin 1s linear infinite"}}),"Updating category details..."]})),i("div",e({style:e(e({},G),{marginBottom:12})},{children:[i("div",e({style:{marginBottom:12}},{children:[i("label",e({style:Z},{children:[J,n("span",{children:W})]})),Ge&&"name"!==fe?n("div",e({style:{display:"flex",alignItems:"center",gap:12}},{children:n("div",e({style:{flex:1,padding:"10px 14px",border:"1px solid #D0D5DD",borderRadius:U,fontSize:14,background:L,minHeight:42,display:"flex",alignItems:"center"}},{children:w.name?n("span",e({style:{color:D}},{children:w.name})):n("span",e({style:{color:T}},{children:Q}))}))})):Ge&&"name"===fe?i("div",e({style:{display:"flex",alignItems:"center",gap:12}},{children:[n("input",{type:"text",value:ye,onChange:function(e){return xe(e.target.value)},autoFocus:!0,onKeyDown:function(e){"Enter"===e.key?(Je("name",ye),he(null)):"Escape"===e.key&&he(null)},placeholder:Q,style:e(e({},V),{flex:1,width:"auto",border:"1px solid ".concat(S)})}),n("button",e({type:"button",onClick:function(){Je("name",ye),he(null)},style:X},{children:n(u,{size:18,color:O})})),n("button",e({type:"button",onClick:function(){return he(null)},style:X},{children:n(f,{size:18,color:K})}))]})):n("input",{type:"text",value:w.name,onChange:function(e){return Je("name",e.target.value)},placeholder:Q,disabled:oe,style:e(e({},V),{opacity:oe?.6:1,cursor:oe?"not-allowed":"text"})}),(null==ae?void 0:ae.name)&&n("p",e({style:{marginTop:4,color:I,fontSize:12,fontFamily:P,margin:"4px 0 0 0"}},{children:ae.name}))]})),i("div",e({style:{marginBottom:12}},{children:[i("label",e({style:Z},{children:[J,n("span",{children:"Category Description"})]})),Ge&&"description"!==fe?n("div",e({style:{display:"flex",alignItems:"flex-start",gap:12}},{children:n("div",e({style:{flex:1,padding:"12px 14px",border:"1px solid #D0D5DD",borderRadius:U,fontSize:14,background:L,minHeight:80}},{children:w.description?n("span",e({style:{color:D,whiteSpace:"pre-wrap"}},{children:w.description})):n("span",e({style:{color:T}},{children:"Describe when this category should be applied"}))}))})):Ge&&"description"===fe?i("div",e({style:{display:"flex",alignItems:"flex-start",gap:12}},{children:[n("textarea",{value:ye,onChange:function(e){return xe(e.target.value)},autoFocus:!0,onKeyDown:function(e){"Escape"===e.key&&he(null)},placeholder:"Enter Description",rows:4,style:e(e({},V),{flex:1,width:"auto",border:"1px solid ".concat(S),resize:"none",lineHeight:"140%"})}),i("div",e({style:{display:"flex",flexDirection:"column",gap:8}},{children:[n("button",e({type:"button",onClick:function(){Je("description",ye),he(null)},style:X},{children:n(u,{size:18,color:O})})),n("button",e({type:"button",onClick:function(){return he(null)},style:X},{children:n(f,{size:18,color:K})}))]}))]})):n("textarea",{value:w.description,onChange:function(e){return Je("description",e.target.value)},placeholder:"Describe when this category should be applied.",disabled:oe,style:e(e({},V),{height:60,paddingTop:7,paddingBottom:10.5,border:"1px solid ".concat(F),lineHeight:"140%",resize:"none",boxShadow:"0 1px 2px 0 rgba(18,18,23,0.05)",opacity:oe?.6:1,cursor:oe?"not-allowed":"text"})}),(null==ae?void 0:ae.description)&&n("p",e({style:{marginTop:4,color:I,fontSize:12,fontFamily:P,margin:"4px 0 0 0"}},{children:ae.description}))]})),n(re,{title:"When to Apply",required:!0,isExpanded:Se,setIsExpanded:ze,conditions:w.whenToApply,prefix:"wta",editingCondKey:be,editingCondText:Ce,setEditingCondKey:ve,setEditingCondText:Fe,onAdd:function(){return Qe("whenToApply")},onUpdate:function(e,t){return $e("whenToApply",e,t)},onRemove:function(e){return et("whenToApply",e)},addLabel:"Add When to Apply",readOnly:oe||te,errorMessage:null==ae?void 0:ae.whenToApply,style:{marginBottom:12}}),n(re,{title:"When NOT to Apply",required:!1,isExpanded:Ee,setIsExpanded:Ae,conditions:w.whenNotToApply,prefix:"wnta",editingCondKey:be,editingCondText:Ce,setEditingCondKey:ve,setEditingCondText:Fe,onAdd:function(){return Qe("whenNotToApply")},onUpdate:function(e,t){return $e("whenNotToApply",e,t)},onRemove:function(e){return et("whenNotToApply",e)},addLabel:"Add When NOT to Apply",readOnly:oe||te,errorMessage:null==ae?void 0:ae.whenNotToApply})]})),i("div",e({style:e(e({},G),{marginTop:12})},{children:[i("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12}},{children:[i("div",{children:[i("h4",e({style:{color:E,fontSize:14,fontWeight:500,lineHeight:"120%",letterSpacing:"0.02em",fontFamily:P,margin:"0 0 4px 0"}},{children:["Example (",(w.occurrences||[]).length,")"]})),n("p",e({style:{color:B,fontSize:12,fontWeight:300,lineHeight:"120%",letterSpacing:"0.02em",fontFamily:P,margin:0}},{children:"Add real examples to help the system understand this category"}))]}),(w.occurrences||[]).length>0&&!te&&ot(null!==Re||oe)]})),0===(w.occurrences||[]).length?i("div",e({style:{border:"1px solid ".concat(F),borderRadius:Y,background:L,padding:"24px 12px 12px",minHeight:181,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center"}},{children:[n("div",e({style:{marginBottom:16}},{children:i("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 56 56",fill:"none"},{children:[n("rect",{x:"4",y:"4",width:"48",height:"48",rx:"24",fill:"#F1F5F9"}),n("rect",{x:"4",y:"4",width:"48",height:"48",rx:"24",stroke:"#F8FAFC",strokeWidth:"8"}),n("rect",{width:"24",height:"24",transform:"translate(16 16)",fill:"#F1F5F9"}),n("path",{d:"M25 19.5V18M21.0607 21.0607L20 20M21.0607 29L20 30.0607M29 21.0607L30.0607 20M19.5 25H18M31.8645 32.1896L29.3727 36.817C29.0881 37.3457 28.9457 37.61 28.7745 37.6769C28.6259 37.7349 28.4585 37.7185 28.324 37.6328C28.1689 37.534 28.0806 37.2471 27.9038 36.6733L24.4452 25.4453C24.3008 24.9765 24.2286 24.7421 24.2867 24.5838C24.3373 24.446 24.446 24.3373 24.5838 24.2867C24.7421 24.2286 24.9765 24.3008 25.4452 24.4452L36.6732 27.9038C37.247 28.0806 37.5339 28.169 37.6327 28.324C37.7185 28.4586 37.7348 28.6259 37.6768 28.7745C37.61 28.9458 37.3456 29.0881 36.817 29.3728L32.1896 31.8645C32.111 31.9068 32.0717 31.9279 32.0374 31.9551C32.0068 31.9792 31.9792 32.0068 31.9551 32.0374C31.9279 32.0717 31.9068 32.111 31.8645 32.1896Z",stroke:"#475569",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))})),n("p",e({style:{color:A,fontSize:12,fontWeight:500,lineHeight:"120%",fontFamily:P,margin:"0 0 8px 0"}},{children:"No example added yet"})),n("p",e({style:{color:B,fontSize:14,fontWeight:300,lineHeight:"140%",fontFamily:P,margin:"0 0 8px 0",maxWidth:530}},{children:"Add an example to show how this category is used, or generate one using chat."})),!te&&ot(null!==Re||oe)]})):n("div",e({style:{display:"flex",flexDirection:"column",gap:12}},{children:(w.occurrences||[]).map(function(t,r){var l=_e.includes(t.id);return Re===t.id?i("div",e({style:{display:"flex",flexDirection:"column",gap:12,border:"1px solid ".concat(F),borderRadius:Y,background:L,padding:16,boxShadow:"0 1px 3px rgba(0,0,0,0.07)"}},{children:[i("div",{children:[n("label",e({style:e(e({},Z),{marginBottom:8})},{children:n("span",e({style:{color:A}},{children:"Title/Subject"}))})),n("input",{type:"text",value:We,onChange:function(e){return He(e.target.value)},placeholder:"e.g., Follow-up on client feedback from last meeting",style:e(e({},V),{border:"1px solid ".concat(F),lineHeight:"140%"})})]}),i("div",{children:[i("label",e({style:{display:"flex",alignItems:"center",gap:4,marginBottom:8}},{children:[n("span",e({style:{color:A,fontSize:14,fontWeight:500,fontFamily:P}},{children:"Message body"})),J]})),n("textarea",{ref:function(e){e&&Re===t.id&&!Ye.current&&(Ye.current=e),e&&(e.style.height="auto",e.style.height="".concat(e.scrollHeight,"px"))},value:Le,onChange:function(e){Me(e.target.value),e.target.style.height="auto",e.target.style.height="".concat(e.target.scrollHeight,"px")},placeholder:"e.g., Hi, here's the latest update on the project. Let us know if you have any questions.",rows:1,style:e(e({},V),{border:"1px solid ".concat(F),overflow:"hidden",minHeight:60,lineHeight:"140%",resize:"none"})})]}),i("div",e({style:{display:"flex",justifyContent:"flex-end",gap:12,marginTop:4}},{children:[n("button",e({type:"button",onClick:function(){t.title||t.description||$(function(n){return e(e({},n),{occurrences:(n.occurrences||[]).filter(function(e){return e.id!==t.id})})}),Te(null),Ye.current=null},style:{padding:"6px 12px",color:j,fontSize:14,fontWeight:500,lineHeight:"140%",fontFamily:P,background:"none",border:"none",cursor:"pointer",borderRadius:U}},{children:"Cancel"})),n("button",e({type:"button",disabled:!Le.trim(),onClick:function(){var n;Le.trim()&&(n=t.id,$(function(t){return e(e({},t),{occurrences:t.occurrences.map(function(t){return t.id===n?e(e({},t),{title:We,description:Le}):t})})}),Te(null),Ye.current=null,Oe(function(e){return e.filter(function(e){return e!==t.id})}))},style:{padding:"6px 12px",borderRadius:U,fontSize:14,fontWeight:500,lineHeight:"140%",fontFamily:P,cursor:Le.trim()?"pointer":"not-allowed",background:Le.trim()?_:L,border:"1px solid ".concat(Le.trim()?_:"#E2E8F0"),color:Le.trim()?H:R,transition:"background 0.15s"}},{children:"Save"}))]}))]}),t.id):i("div",e({style:{display:"flex",flexDirection:"column",border:"1px solid #E2E8F0",borderRadius:Y,background:L,overflow:"hidden",boxShadow:"0 1px 3px rgba(0,0,0,0.07)"}},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:12,padding:12}},{children:[n("div",e({style:{width:20,height:20,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:N,borderRadius:U,color:j,fontSize:10,fontWeight:500,fontFamily:P}},{children:r+1})),n("div",e({style:{flex:1,fontSize:15,fontWeight:500,lineHeight:"140%",fontFamily:P,color:A,wordBreak:"break-word"}},{children:t.title||n("span",e({style:{color:R,fontWeight:400,fontSize:14}},{children:"Untitled example"}))})),i("div",e({style:{display:"flex",alignItems:"center",gap:8,flexShrink:0}},{children:[!te&&i(o,{children:[n("button",e({type:"button",disabled:null!==Re||oe,onClick:function(){Te(t.id),He(t.title),Me(t.description),l||tt(t.id)},style:e(e({},X),{width:36,height:36,border:"1px solid #E2E8F0",borderRadius:U,opacity:null!==Re||oe?.5:1,cursor:null!==Re||oe?"not-allowed":"pointer"})},{children:n(h,{size:16,color:q})})),n("button",e({type:"button",disabled:null!==Re||oe,onClick:function(){return $(function(n){return e(e({},n),{occurrences:(n.occurrences||[]).filter(function(e){return e.id!==t.id})})})},style:e(e({},X),{width:36,height:36,border:"1px solid ".concat(z),borderRadius:U,opacity:null!==Re||oe?.5:1,cursor:null!==Re||oe?"not-allowed":"pointer"})},{children:n(g,{size:16,color:K})}))]}),n("button",e({type:"button",onClick:function(){return tt(t.id)},style:e(e({},X),{width:36,height:36,border:"none",background:"transparent"})},{children:n(l?y:x,{size:20,color:q})}))]}))]})),l&&i("div",e({style:{display:"flex",flexDirection:"column",padding:"4px 12px 16px"}},{children:[i("div",e({style:{marginBottom:12}},{children:[n("p",e({style:{color:B,fontSize:13,lineHeight:"140%",fontFamily:P,margin:"0 0 4px 0"}},{children:"Title/Subject:"})),n("p",e({style:{color:E,fontSize:14,fontWeight:300,lineHeight:"150%",fontFamily:P,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0}},{children:t.title||n("span",e({style:{color:R,fontStyle:"italic"}},{children:"—"}))}))]})),i("div",{children:[n("p",e({style:{color:B,fontSize:13,lineHeight:"140%",fontFamily:P,margin:"0 0 4px 0"}},{children:"Message body:"})),n("p",e({style:{color:E,fontSize:14,fontWeight:300,lineHeight:"150%",fontFamily:P,whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0}},{children:t.description}))]})]}))]}),t.id)})}))]}))]}))};export{le as CreateCategory,le as default};
2
+ //# sourceMappingURL=CreateCategory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateCategory.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{Testing as r}from"../Testing/Testing.js";import{CreateRule as o}from"../TrafficManager/CreateRule.js";import{TrafficManagerTemplate as e}from"../TrafficManager/TrafficManagerTemplate.js";import{WorkflowComposer as a}from"../WorkflowComposer/WorkflowComposer.js";var f,t;!function(r){r.TrafficManager="TRAFFIC_MANAGER",r.testing="TESTING",r.CreateRule="CREATE_RULE",r.WorkflowComposer="WORKFLOW_COMPOSER"}(t||(t={}));var i=((f={})[t.TrafficManager]=e,f[t.testing]=r,f[t.CreateRule]=o,f[t.WorkflowComposer]=a,f);export{t as TemplateList,i as TemplateMap};
1
+ import{CreateCategory as r}from"../CreateCategory/CreateCategory.js";import{Testing as e}from"../Testing/Testing.js";import{CreateRule as o}from"../TrafficManager/CreateRule.js";import{TrafficManagerTemplate as a}from"../TrafficManager/TrafficManagerTemplate.js";import{WorkflowComposer as t}from"../WorkflowComposer/WorkflowComposer.js";var f,C;!function(r){r.TrafficManager="TRAFFIC_MANAGER",r.testing="TESTING",r.CreateRule="CREATE_RULE",r.WorkflowComposer="WORKFLOW_COMPOSER",r.CreateCategory="CREATE_CATEGORY"}(C||(C={}));var i=((f={})[C.TrafficManager]=a,f[C.testing]=e,f[C.CreateRule]=o,f[C.WorkflowComposer]=t,f[C.CreateCategory]=r,f);export{C as TemplateList,i as TemplateMap};
2
2
  //# sourceMappingURL=templatesMap.js.map
@@ -77,6 +77,7 @@ interface ILOTJProps {
77
77
  };
78
78
  handleGlobalClickCapture?: (event: React.MouseEvent<HTMLDivElement>) => void;
79
79
  isGlobalEditActive?: boolean;
80
+ saveButtonColor?: string;
80
81
  }
81
82
  declare const ILOTJ: React.FC<ILOTJProps>;
82
83
  export default ILOTJ;
@@ -1 +1 @@
1
- {"version":3,"file":"ILOTJ.d.ts","sourceRoot":"","sources":["../../../../../src/features/IL-OTJ/ILOTJ.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AAGjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAOvD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AACzE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,UAAU,UAAU;IAChB,IAAI,EAAE,OAAO,CAAC;I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0 +1,12 @@
1
+ import React from "react";
2
+ import { HeaderMessageHandler } from "./helpers/utils";
3
+ export type HeaderMessageHandlers = Record<string, HeaderMessageHandler>;
4
+ interface ILOTJProps {
5
+ }
6
+ export interface GetVariantInfoPayload {
7
+ variant_ids: string[];
8
+ }
9
+ export declare const getVariantInfo: (payload: GetVariantInfoPayload) => Promise<any>;
10
+ declare const ILOTJTriageAITest: React.FC<ILOTJProps>;
11
+ export default ILOTJTriageAITest;
12
+ //# sourceMappingURL=ILOTJTriageAITest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILOTJTriageAITest.d.ts","sourceRoot":"","sources":["../../../../../src/features/IL-OTJ/ILOTJTriageAITest.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAKjF,OAAO,EAA2E,oBAAoB,EAAuB,MAAM,iBAAiB,CAAC;AAarJ,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAEzE,UAAU,UAAU;CACnB;AAKD,MAAM,WAAW,qBAAqB;IAClC,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAKD,eAAO,MAAM,cAAc,YAAmB,qBAAqB,iBASlE,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA40E3C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -40,6 +40,6 @@ interface ChatComponentProps {
40
40
  onSubmitFeedback?: (payload: any) => Promise<void>;
41
41
  }
42
42
  export declare const autoGeneratePrompt: (baseUrl?: string, userInput?: string) => Promise<any>;
43
- declare const ComposerChat: React.FC<ChatComponentProps>;
44
- export default ComposerChat;
43
+ declare const NormalChat: React.FC<ChatComponentProps>;
44
+ export default NormalChat;
45
45
  //# sourceMappingURL=NormalChat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NormalChat.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/IL-OTJ/_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K,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AACD,eAAO,MAAM,kBAAkB,aAAc,MAAM,cAAc,MAAM,iBAsBtE,CAAC;AAEF,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2/C5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -24,7 +24,8 @@ interface ILPopupProps {
24
24
  isAiStreaming?: boolean;
25
25
  showSaveWithoutValidation?: boolean;
26
26
  onSaveWithoutValidation?: () => void;
27
+ saveButtonColor?: string;
27
28
  }
28
- declare const ILPopup: ({ customSections, showCustomSections, onSave, formHeader, onClose, validateCustom, template, templateProps, isLoading, saveButtonConfig, isAiStreaming, showSaveWithoutValidation, saveWithoutValBtnConfig, onSaveWithoutValidation, }: ILPopupProps) => import("react/jsx-runtime").JSX.Element;
29
+ declare const ILPopup: ({ customSections, showCustomSections, onSave, formHeader, onClose, validateCustom, template, templateProps, isLoading, saveButtonConfig, isAiStreaming, showSaveWithoutValidation, saveWithoutValBtnConfig, onSaveWithoutValidation, saveButtonColor }: ILPopupProps) => import("react/jsx-runtime").JSX.Element;
29
30
  export default ILPopup;
30
31
  //# sourceMappingURL=ILPopup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ILPopup.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/ILPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,YAAY,EAAe,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AACF,UAAU,YAAY;IACpB,qBAAqB,EAAE,GAAG,CAAC;IAC3B,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,wDAAwD;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;CACtC;AAED,QAAA,MAAM,OAAO,2OAgBV,YAAY,4CA+Ed,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"ILPopup.d.ts","sourceRoot":"","sources":["../../../../../../src/features/IL-OTJ/_components/ILPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,YAAY,EAAe,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AACF,UAAU,YAAY;IACpB,qBAAqB,EAAE,GAAG,CAAC;IAC3B,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,wDAAwD;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,OAAO,2PAiBV,YAAY,4CA+Ed,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,71 @@
1
+ import React from "react";
2
+ interface Condition {
3
+ id: string;
4
+ text: string;
5
+ }
6
+ interface Occurrence {
7
+ id: string;
8
+ title: string;
9
+ description: string;
10
+ }
11
+ export interface CategoryFormData {
12
+ name: string;
13
+ description: string;
14
+ whenToApply: Condition[];
15
+ whenNotToApply: Condition[];
16
+ occurrences: Occurrence[];
17
+ }
18
+ /**
19
+ * Flexible shape for the existing category shown in the comparison overlay.
20
+ * The parent populates whatever fields the agent returns — all are optional
21
+ * so you can adjust to match your actual API response without touching this file.
22
+ */
23
+ export interface ExistingCategoryData {
24
+ name?: string;
25
+ description?: string;
26
+ /** Raw string or array of strings — both are handled */
27
+ whenToApply?: string | string[];
28
+ /** Raw string or array of strings — both are handled */
29
+ whenNotToApply?: string | string[];
30
+ /** Any extra fields the agent returns — stored but not displayed by default */
31
+ [key: string]: any;
32
+ }
33
+ export interface CreateCategoryState {
34
+ formData: CategoryFormData;
35
+ nameLabel?: string;
36
+ namePlaceholder?: string;
37
+ }
38
+ export interface CreateCategoryHandlers {
39
+ setFormData: React.Dispatch<React.SetStateAction<CategoryFormData>>;
40
+ onAiResponseChange?: (data: CategoryFormData) => void;
41
+ }
42
+ export interface CreateCategoryUiState {
43
+ readOnly?: boolean;
44
+ isAiStreaming?: boolean;
45
+ activeEditId?: string | null;
46
+ setActiveEditId?: (id: string | null) => void;
47
+ pendingEditId?: string | null;
48
+ setPendingEditId?: (id: string | null) => void;
49
+ setSendMessageInChat?: (msg: string) => void;
50
+ validationErrors?: Record<string, string>;
51
+ addExampleBtnRef?: React.RefObject<HTMLButtonElement>;
52
+ /**
53
+ * When non-null the comparison overlay is shown on top of the form.
54
+ * Set this from the parent (agent handler) to trigger the overlay,
55
+ * set to null to hide it.
56
+ */
57
+ comparisonData?: ExistingCategoryData | null;
58
+ /**
59
+ * Called when the user clicks "Back" in the overlay.
60
+ * The parent should set comparisonData back to null here.
61
+ */
62
+ onComparisonClose?: () => void;
63
+ }
64
+ interface CreateCategoryProps {
65
+ state: CreateCategoryState;
66
+ handlers: CreateCategoryHandlers;
67
+ uiState: CreateCategoryUiState;
68
+ }
69
+ export declare const CreateCategory: React.FC<CreateCategoryProps>;
70
+ export default CreateCategory;
71
+ //# sourceMappingURL=CreateCategory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateCategory.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/CreateCategory/CreateCategory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAqBjF,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,cAAc,EAAE,SAAS,EAAE,CAAC;IAC5B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACnC,+EAA+E;IAC/E,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACpE,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,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;IAC/C,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACtD;;;;OAIG;IACH,cAAc,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC7C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,UAAU,mBAAmB;IAC3B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAynBD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0kBxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -3,7 +3,8 @@ export declare enum TemplateList {
3
3
  TrafficManager = "TRAFFIC_MANAGER",
4
4
  testing = "TESTING",
5
5
  CreateRule = "CREATE_RULE",
6
- WorkflowComposer = "WORKFLOW_COMPOSER"
6
+ WorkflowComposer = "WORKFLOW_COMPOSER",
7
+ CreateCategory = "CREATE_CATEGORY"
7
8
  }
8
9
  export declare const TemplateMap: Record<string, React.FC<any>>;
9
10
  //# sourceMappingURL=templatesMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"templatesMap.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.ts"],"names":[],"mappings":";AAIA,oBAAY,YAAY;IACtB,cAAc,oBAAoB;IAClC,OAAO,YAAY;IACnB,UAAU,gBAAgB;IAC1B,gBAAgB,sBAAsB;CAEvC;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAKrD,CAAC"}
1
+ {"version":3,"file":"templatesMap.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/IL-OTJ/_components/templates/TemplatesMap/templatesMap.ts"],"names":[],"mappings":";AAKA,oBAAY,YAAY;IACtB,cAAc,oBAAoB;IAClC,OAAO,YAAY;IACnB,UAAU,gBAAgB;IAC1B,gBAAgB,sBAAsB;IACtC,cAAc,oBAAoB;CAEnC;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAMrD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/instant-learning",
3
- "version": "0.0.290",
3
+ "version": "0.0.291",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",