@e-llm-studio/citation 0.0.130 → 0.0.132

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 (28) hide show
  1. package/dist/cjs/features/ChatCitation/ChatCitationRenderer.js +1 -1
  2. package/dist/cjs/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
  3. package/dist/cjs/features/ExcelCitation/ExcelCitations.js +2 -0
  4. package/dist/cjs/features/ExcelCitation/ExcelCitations.js.map +1 -0
  5. package/dist/cjs/features/ExcelCitation/utils/helper.js +2 -0
  6. package/dist/cjs/features/ExcelCitation/utils/helper.js.map +1 -0
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/features/ChatCitation/ChatCitationRenderer.js +1 -1
  9. package/dist/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
  10. package/dist/features/ExcelCitation/ExcelCitations.js +2 -0
  11. package/dist/features/ExcelCitation/ExcelCitations.js.map +1 -0
  12. package/dist/features/ExcelCitation/utils/helper.js +2 -0
  13. package/dist/features/ExcelCitation/utils/helper.js.map +1 -0
  14. package/dist/index.js +1 -1
  15. package/dist/types/src/ExcelCitationTest.d.ts +2 -0
  16. package/dist/types/src/ExcelCitationTest.d.ts.map +1 -0
  17. package/dist/types/src/features/ChatCitation/ChatCitationRenderer.d.ts +1 -1
  18. package/dist/types/src/features/ChatCitation/ChatCitationRenderer.d.ts.map +1 -1
  19. package/dist/types/src/features/ChatCitation/InternalChatCitationRenderer.d.ts.map +1 -1
  20. package/dist/types/src/features/ChatCitation/types/citations.types.d.ts +2 -2
  21. package/dist/types/src/features/ChatCitation/types/citations.types.d.ts.map +1 -1
  22. package/dist/types/src/features/ExcelCitation/ExcelCitations.d.ts +15 -0
  23. package/dist/types/src/features/ExcelCitation/ExcelCitations.d.ts.map +1 -0
  24. package/dist/types/src/features/ExcelCitation/utils/helper.d.ts +2 -0
  25. package/dist/types/src/features/ExcelCitation/utils/helper.d.ts.map +1 -0
  26. package/dist/types/src/index.d.ts +1 -0
  27. package/dist/types/src/index.d.ts.map +1 -1
  28. package/package.json +7 -2
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),n=require("react/jsx-runtime"),e=require("react"),t=require("./InternalChatCitationRenderer.js"),i=require("./components/wrappers/Modal.js"),a=require("./components/IconContainer.js"),r=require("lucide-react");function s(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var l=s(require("@mui/icons-material/SwapHoriz"));exports.default=function(s){var d,u,c,_,v,C,p,h=e.useState(!1),g=h[0],y=h[1],x=e.useState(),f=x[0],j=x[1];function m(o){y(!0),j(o)}function b(){y(!1),j(void 0)}function A(o){j(o)}var k=e.useMemo(function(){var o;return!!(null===(o=s.ruleBookContainer)||void 0===o?void 0:o.data)},[null===(d=s.ruleBookContainer)||void 0===d?void 0:d.data]),w=e.useMemo(function(){var o;return!!((null===(o=s.tableComponent)||void 0===o?void 0:o.rows)&&Object.keys(s.tableComponent.rows).length>0)},[s.tableComponent]);return console.log("tableComponent data:",s.tableComponent),console.log("isTableDataPresent:",w),console.log("rootContainer",s.rootContainer),console.log("chatCitation",s.chatContainer),n.jsxs(n.Fragment,{children:[n.jsx(t.default,o.__assign({},s,{showRootContainer:s.showRootContainer,tableComponent:s.tableComponent,additionalData:o.__assign(o.__assign({},s.additionalData),{isExpanded:!1}),isRenderedCustomComponent:s.isRenderedCustomComponent||!1,closePreview:s.closePreview,chatContainer:o.__assign(o.__assign({},s.chatContainer),{show:!0,secondaryActions:function(e){var t,i,l,d,u;return o.__spreadArray(o.__spreadArray(o.__spreadArray([],e,!0),null!==(i=null===(t=s.chatContainer)||void 0===t?void 0:t.additionalSecondaryActions)&&void 0!==i?i:[],!0),[(null===(u=null===(d=null===(l=s.chatContainer)||void 0===l?void 0:l.detailedTab)||void 0===d?void 0:d.chip)||void 0===u?void 0:u.isActive)&&n.jsx("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),n.jsx(a.default,o.__assign({onClick:function(){return m("chat")},style:{cursor:"pointer"}},{children:n.jsx(r.Maximize2,{size:16,color:"#64748B"})}))],!1)}}),ruleBookContainer:k?o.__assign(o.__assign(o.__assign({},s.ruleBookContainer),null!==(c=null===(u=s.ruleBookContainer)||void 0===u?void 0:u.additionalSecondaryActions)&&void 0!==c?c:[]),{show:!0,secondaryActions:function(e){return o.__spreadArray(o.__spreadArray([],e,!0),[n.jsx("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),n.jsx(a.default,o.__assign({onClick:function(){return m("rulebook")},style:{cursor:"pointer"}},{children:n.jsx(r.Maximize2,{size:16,color:"#64748B"})}))],!1)}}):void 0})),n.jsx(i.Modal,o.__assign({isOpen:g,onClose:b},{children:n.jsx(t.default,o.__assign({},s,{showRootContainer:s.showRootContainer,tableComponent:s.tableComponent,additionalData:o.__assign(o.__assign({},s.additionalData),{isExpanded:!0}),rootContainer:o.__assign(o.__assign({},s.rootContainer),{secondaryActions:function(e){return o.__spreadArray(o.__spreadArray([],e,!0),[n.jsx(a.default,o.__assign({onClick:b,style:{cursor:"pointer"}},{children:n.jsx(r.X,{size:20,color:"#64748B"})}))],!1)}}),chatContainer:o.__assign(o.__assign({},s.chatContainer),{show:void 0===f?void 0:"chat"===f,secondaryActions:function(e){var t,i,r;return o.__spreadArray(o.__spreadArray([],e,!0),[(null===(r=null===(i=null===(t=s.chatContainer)||void 0===t?void 0:t.detailedTab)||void 0===i?void 0:i.chip)||void 0===r?void 0:r.isActive)&&(k||w)&&n.jsx("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),(k||w)&&n.jsx(a.default,o.__assign({style:{cursor:"pointer"},onClick:function(){return A("rulebook")}},{children:n.jsx(l.default,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o.__assign(o.__assign({},s.chatContainer.slotStyles),{chatDataContainer:o.__assign(o.__assign({},null===(_=s.chatContainer.slotStyles)||void 0===_?void 0:_.chatDataContainer),{maxHeight:void 0})})}),ruleBookContainer:k?o.__assign(o.__assign({},s.ruleBookContainer),{show:void 0===f?void 0:"rulebook"===f,secondaryActions:function(e){return o.__spreadArray(o.__spreadArray([],e,!0),[n.jsx("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),n.jsx(a.default,o.__assign({style:{cursor:"pointer"},onClick:function(){return A("chat")}},{children:n.jsx(l.default,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o.__assign(o.__assign({},null===(v=s.ruleBookContainer)||void 0===v?void 0:v.slotStyles),{dataContainer:o.__assign(o.__assign({},null===(p=null===(C=s.ruleBookContainer)||void 0===C?void 0:C.slotStyles)||void 0===p?void 0:p.dataContainer),{maxHeight:void 0})})}):void 0}))}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("tslib"),n=require("react/jsx-runtime"),e=require("react"),i=require("./InternalChatCitationRenderer.js"),t=require("./components/wrappers/Modal.js"),a=require("./components/IconContainer.js"),r=require("lucide-react");function s(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var l=s(require("@mui/icons-material/SwapHoriz"));exports.default=function(s){var d,u,c,_,v,C,p,h=e.useState(!1),g=h[0],y=h[1],x=e.useState(),f=x[0],j=x[1];function m(o){y(!0),j(o)}function b(){y(!1),j(void 0)}function A(o){j(o)}var k=e.useMemo(function(){var o;return!!(null===(o=s.ruleBookContainer)||void 0===o?void 0:o.data)},[null===(d=s.ruleBookContainer)||void 0===d?void 0:d.data]),w=e.useMemo(function(){var o;return!!((null===(o=s.tableComponent)||void 0===o?void 0:o.rows)&&Object.keys(s.tableComponent.rows).length>0)},[s.tableComponent]);return console.log("tableComponent data:",s.tableComponent),console.log("isTableDataPresent:",w),console.log("rootContainer",s.rootContainer),console.log("chatCitation",s.chatContainer),n.jsxs(n.Fragment,{children:[n.jsx(i.default,o.__assign({},s,{showRootContainer:s.showRootContainer,tableComponent:s.tableComponent,additionalData:o.__assign(o.__assign({},s.additionalData),{isExpanded:!1}),isRenderedCustomComponent:s.isRenderedCustomComponent||!1,closePreview:s.closePreview},s.chatContainer&&{chatContainer:o.__assign(o.__assign({},s.chatContainer),{show:!0,secondaryActions:function(e){var i,t,l,d,u;return o.__spreadArray(o.__spreadArray(o.__spreadArray([],e,!0),null!==(t=null===(i=s.chatContainer)||void 0===i?void 0:i.additionalSecondaryActions)&&void 0!==t?t:[],!0),[(null===(u=null===(d=null===(l=s.chatContainer)||void 0===l?void 0:l.detailedTab)||void 0===d?void 0:d.chip)||void 0===u?void 0:u.isActive)&&n.jsx("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),n.jsx(a.default,o.__assign({onClick:function(){return m("chat")},style:{cursor:"pointer"}},{children:n.jsx(r.Maximize2,{size:16,color:"#64748B"})}))],!1)}})},{ruleBookContainer:k?o.__assign(o.__assign({},s.ruleBookContainer),{show:!0,secondaryActions:function(e){var i,t;return o.__spreadArray(o.__spreadArray(o.__spreadArray([],e,!0),null!==(t=null===(i=s.ruleBookContainer)||void 0===i?void 0:i.additionalSecondaryActions)&&void 0!==t?t:[],!0),[n.jsx("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),n.jsx(a.default,o.__assign({onClick:function(){return m("rulebook")},style:{cursor:"pointer"}},{children:n.jsx(r.Maximize2,{size:16,color:"#64748B"})}))],!1)}}):void 0})),n.jsx(t.Modal,o.__assign({isOpen:g,onClose:b},{children:n.jsx(i.default,o.__assign({},s,{showRootContainer:s.showRootContainer,tableComponent:s.tableComponent,additionalData:o.__assign(o.__assign({},s.additionalData),{isExpanded:!0}),rootContainer:o.__assign(o.__assign({},s.rootContainer),{secondaryActions:function(e){return o.__spreadArray(o.__spreadArray([],e,!0),[n.jsx(a.default,o.__assign({onClick:b,style:{cursor:"pointer"}},{children:n.jsx(r.X,{size:20,color:"#64748B"})}))],!1)}})},s.chatContainer&&{chatContainer:o.__assign(o.__assign({},s.chatContainer),{show:void 0===f?void 0:"chat"===f,secondaryActions:function(e){var i,t,r;return o.__spreadArray(o.__spreadArray([],e,!0),[(null===(r=null===(t=null===(i=s.chatContainer)||void 0===i?void 0:i.detailedTab)||void 0===t?void 0:t.chip)||void 0===r?void 0:r.isActive)&&(k||w)&&n.jsx("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),(k||w)&&n.jsx(a.default,o.__assign({style:{cursor:"pointer"},onClick:function(){return A("rulebook")}},{children:n.jsx(l.default,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o.__assign(o.__assign({},null===(u=s.chatContainer)||void 0===u?void 0:u.slotStyles),{chatDataContainer:o.__assign(o.__assign({},null===(_=null===(c=s.chatContainer)||void 0===c?void 0:c.slotStyles)||void 0===_?void 0:_.chatDataContainer),{maxHeight:void 0})})})},{ruleBookContainer:k?o.__assign(o.__assign({},s.ruleBookContainer),{show:void 0===f?void 0:"rulebook"===f,secondaryActions:function(e){return o.__spreadArray(o.__spreadArray([],e,!0),[n.jsx("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),n.jsx(a.default,o.__assign({style:{cursor:"pointer"},onClick:function(){return A("chat")}},{children:n.jsx(l.default,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o.__assign(o.__assign({},null===(v=s.ruleBookContainer)||void 0===v?void 0:v.slotStyles),{dataContainer:o.__assign(o.__assign({},null===(p=null===(C=s.ruleBookContainer)||void 0===C?void 0:C.slotStyles)||void 0===p?void 0:p.dataContainer),{maxHeight:void 0})})}):void 0}))}))]})};
2
2
  //# sourceMappingURL=ChatCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("react/jsx-runtime"),o=require("./components/ChatCitation.js"),i=require("./utils/helpers.js"),n=require("./components/Chip.js"),t=require("./assets/message-chat-square.svg.js");require("@mui/icons-material/KeyboardArrowDown"),require("@mui/icons-material/KeyboardArrowUp"),require("@mui/icons-material/Clear");var r=require("./components/InViewNavigation.js"),s=require("./components/DetailedView.js"),d=require("./components/SummarizedView.js"),a=require("./components/RuleBook.js"),u=require("react"),v=require("./constants/renderer.js"),c=require("./components/IconContainer.js"),h=require("lucide-react"),f=require("./BigQueryTable.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=g(require("@mui/icons-material/CloseOutlined"));exports.default=function(g){var p,x,m,y,_,C,w,k,j,S,q,A,T,R,I,D,V,F,z,P,E,B,H,M,N,W,Y,O,K,Q,U,G,J,L,X,Z,$,ee,le,oe,ie,ne,te,re=g.rootContainer,se=g.chatContainer,de=g.ruleBookContainer,ae=g.renderer,ue=g.additionalData,ve=g.tableComponent,ce=g.closePreview,he=g.isRenderedCustomComponent,fe=void 0!==he&&he,ge=g.showRootContainer,be=void 0===ge||ge,pe=g.reversePanels,xe=void 0!==pe&&pe,me=u.useState(0),ye=me[0],_e=me[1],Ce=u.useState(0),we=Ce[0],ke=Ce[1],je=u.useState(0),Se=je[0],qe=je[1],Ae=u.useState(0),Te=Ae[0],Re=Ae[1],Ie=u.useRef(null),De=u.useRef(null),Ve=u.useMemo(function(){return e.__assign(e.__assign(e.__assign({},v.defaultRenderer),ae),{highlight:function(o){var i;return l.jsx("span",e.__assign({"data-highlight":"true",style:{backgroundColor:null!==(i=null==se?void 0:se.highlightColor)&&void 0!==i?i:"#ffffb8",borderRadius:"2px"}},{children:o.children}))}})},[ae,null==se?void 0:se.highlightColor]),Fe=u.useMemo(function(){return!!((null==ve?void 0:ve.rows)&&Object.keys(ve.rows).length>0)},[ve]),ze=u.useMemo(function(){var e;return null!==(e=null==ue?void 0:ue.RuleBookDetailedViewVerticallyStacked)&&void 0!==e&&e},[null==ue?void 0:ue.RuleBookDetailedViewVerticallyStacked]);u.useEffect(function(){var e,l;if((null==de?void 0:de.show)&&Ie.current){var o=null===(e=Ie.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(_e((null==o?void 0:o.length)||0),ke(0),o&&o.length>0)(i=o[0]).style.backgroundColor="#ffff5c",i.scrollIntoView({behavior:"smooth",block:"center"})}if(se.show&&De.current){var i,n=null===(l=De.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(qe((null==n?void 0:n.length)||0),Re(0),n&&n.length>0)(i=n[0]).style.backgroundColor="#ffff5c",i.scrollIntoView({behavior:"smooth",block:"center"})}},[se.show,null==de?void 0:de.show,null==de?void 0:de.data,null==se?void 0:se.chatData]);var Pe=u.useCallback(function(){var e;if(we+1<ye){var l=null===(e=Ie.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(!l)return;l[we].style.backgroundColor="#ffffb8";var o=we+1;ke(o);var i=l[o];i.style.backgroundColor="#ffff5c",null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}},[we,ye]),Ee=u.useCallback(function(){var e;if(!(we-1<0)){var l=null===(e=Ie.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(l){l[we].style.backgroundColor="#ffffb8";var o=we-1,i=l[o];i.style.backgroundColor="#ffff5c",ke(o),null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}}},[we]),Be=u.useCallback(function(){var e;if(Te+1<Se){var l=null===(e=De.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(!l)return;l[Te].style.backgroundColor="#ffffb8";var o=Te+1,i=l[o];i.style.backgroundColor="#ffff5c",Re(o),null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}},[Te,Se]),He=u.useCallback(function(){var e;if(!(Te-1<0)){var l=null===(e=De.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(l){l[Te].style.backgroundColor="#ffffb8";var o=Te-1,i=l[o];i.style.backgroundColor="#ffff5c",Re(o),null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}}},[Te]),Me=i.getColorCode((null==re?void 0:re.relevanceScore)||0),Ne=u.useMemo(function(){var o,i=l.jsxs("span",e.__assign({style:e.__assign({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:Me.border,backgroundColor:Me.background,color:Me.text},null===(o=null==re?void 0:re.slotStyles)||void 0===o?void 0:o.relevanceScore)},{children:[(null==re?void 0:re.relevanceTitle)||"Decision Strength",":"," ",(null==re?void 0:re.relevanceScore)||0,"%"]}),"relevance-score"),n=l.jsx("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:ce},{children:l.jsx(b.default,{})}),"close-preview");return fe&&!(null==ue?void 0:ue.isExpanded)?[i,n]:[i]},[fe,Me.background,Me.border,Me.text,null==re?void 0:re.relevanceScore,null===(p=null==re?void 0:re.slotStyles)||void 0===p?void 0:p.relevanceScore,null==re?void 0:re.relevanceTitle]),We=u.useMemo(function(){return[ye>0&&l.jsx(r.default,{currentItemNumber:we+1,totalItems:ye,disableNext:we+1>=ye,onNext:Pe,onPrevious:Ee,disablePrevious:we<=0},"rulebook-nav")]},[we,Pe,Ee,ye]),Ye=u.useMemo(function(){return(null==ue?void 0:ue.RuleBookContainerHeight)?ue.RuleBookContainerHeight:!(!ze||(null==ue?void 0:ue.isExpanded))&&"600px"},[null==ue?void 0:ue.RuleBookContainerHeight,ze]),Oe=u.useMemo(function(){var e,o;return[(null===(o=null===(e=null==se?void 0:se.detailedTab)||void 0===e?void 0:e.chip)||void 0===o?void 0:o.isActive)&&Se>0&&l.jsx(r.default,{currentItemNumber:Te+1,totalItems:Se,onNext:Be,onPrevious:He,disableNext:Te+1>=Se,disablePrevious:Te<=0},"chat-nav")]},[null===(m=null===(x=null==se?void 0:se.detailedTab)||void 0===x?void 0:x.chip)||void 0===m?void 0:m.isActive,Te,Be,He,Se]),Ke=l.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:xe?ze?"column-reverse":"row-reverse":ze?"column":"row",gap:"12px",height:Ye||"100%",minHeight:0},null===(y=null==re?void 0:re.slotStyles)||void 0===y?void 0:y.container)},{children:[Fe&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(_=null==se?void 0:se.slotStyles)||void 0===_?void 0:_.outerContainer)},{children:l.jsx(o.default,e.__assign({title:"Invoice Data Preview",icon:l.jsx(c.default,{children:l.jsx(h.Table,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:l.jsx("div",e.__assign({style:{height:"100%",maxHeight:(null==ue?void 0:ue.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==ve?void 0:ve.rows)&&l.jsx(f.BigQueryTable,{rows:ve.rows,columns:ve.columns||[]})}))}))})),(null==de?void 0:de.data)&&(de.show||void 0===de.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(C=null==de?void 0:de.slotStyles)||void 0===C?void 0:C.outerContainer)},{children:l.jsx(o.default,e.__assign({title:null!==(w=null==de?void 0:de.title)&&void 0!==w?w:"Rule book",icon:null==de?void 0:de.ruleBookIcon,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(k=null==de?void 0:de.slotStyles)||void 0===k?void 0:k.title)},secondaryActions:(null==de?void 0:de.secondaryActions)?de.secondaryActions(We):We},{children:l.jsx("div",e.__assign({style:e.__assign({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(j=null==de?void 0:de.slotStyles)||void 0===j?void 0:j.dataContainer)},{children:l.jsx("div",e.__assign({style:{position:"absolute",padding:"12px",inset:0,overflowY:"auto"},ref:Ie},{children:l.jsx(a.default,{data:de.data,renderers:null!==(S=null==de?void 0:de.renderer)&&void 0!==S?S:Ve})}))}))}))})),(se.show||void 0===se.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(q=null==se?void 0:se.slotStyles)||void 0===q?void 0:q.outerContainer)},{children:l.jsx(o.default,e.__assign({title:null!==(A=null==se?void 0:se.title)&&void 0!==A?A:"Chat",icon:null==se?void 0:se.chatIcon,containerStyles:null===(T=null==se?void 0:se.slotStyles)||void 0===T?void 0:T.container,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(R=null==se?void 0:se.slotStyles)||void 0===R?void 0:R.title)},primaryActions:[((null===(D=null===(I=null==se?void 0:se.summarizedTab)||void 0===I?void 0:I.chip)||void 0===D?void 0:D.show)||void 0===(null===(F=null===(V=null==se?void 0:se.summarizedTab)||void 0===V?void 0:V.chip)||void 0===F?void 0:F.show))&&l.jsx(n.default,e.__assign({label:"Summarized"},null===(z=null==se?void 0:se.summarizedTab)||void 0===z?void 0:z.chip)),l.jsx(n.default,e.__assign({label:"Detailed"},null===(P=null==se?void 0:se.detailedTab)||void 0===P?void 0:P.chip))],secondaryActions:se.secondaryActions?null==se?void 0:se.secondaryActions(Oe):Oe},{children:l.jsxs("div",e.__assign({style:e.__assign({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(E=null==se?void 0:se.slotStyles)||void 0===E?void 0:E.chatDataContainer)},{children:[(null===(H=null===(B=null==se?void 0:se.detailedTab)||void 0===B?void 0:B.chip)||void 0===H?void 0:H.isActive)&&l.jsx("div",e.__assign({ref:De,style:{position:(null==ue?void 0:ue.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:l.jsx(s.default,{chatData:se.chatData,assistantChatProps:e.__assign(e.__assign({},null===(N=null===(M=null==se?void 0:se.detailedTab)||void 0===M?void 0:M.view)||void 0===N?void 0:N.assistantChatProps),{renderers:null!==(O=null===(Y=null===(W=null==se?void 0:se.detailedTab)||void 0===W?void 0:W.detailedViewRenderer)||void 0===Y?void 0:Y.assistantText)&&void 0!==O?O:Ve}),userChatItemProps:e.__assign(e.__assign({},null===(Q=null===(K=null==se?void 0:se.detailedTab)||void 0===K?void 0:K.view)||void 0===Q?void 0:Q.userChatItemProps),{renderers:null!==(J=null===(G=null===(U=null==se?void 0:se.detailedTab)||void 0===U?void 0:U.detailedViewRenderer)||void 0===G?void 0:G.userText)&&void 0!==J?J:Ve})})})),(null===(X=null===(L=null==se?void 0:se.summarizedTab)||void 0===L?void 0:L.chip)||void 0===X?void 0:X.show)&&(null===($=null===(Z=null==se?void 0:se.summarizedTab)||void 0===Z?void 0:Z.chip)||void 0===$?void 0:$.isActive)&&l.jsx(d.default,e.__assign({chatData:se.chatData},null===(ee=null==se?void 0:se.summarizedTab)||void 0===ee?void 0:ee.view,{renderer:null!==(oe=null===(le=null==se?void 0:se.summarizedTab)||void 0===le?void 0:le.summarizedViewRenderer)&&void 0!==oe?oe:Ve}))]}))}))}))]}));return be?l.jsx(o.default,e.__assign({title:null==re?void 0:re.title,slotStyles:{title:null===(ie=null==re?void 0:re.slotStyles)||void 0===ie?void 0:ie.title},containerStyles:null===(ne=null==re?void 0:re.slotStyles)||void 0===ne?void 0:ne.container,icon:null!==(te=null==re?void 0:re.icon)&&void 0!==te?te:l.jsx(c.default,{children:l.jsx("img",{src:t.default,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==re?void 0:re.secondaryActions)?re.secondaryActions(Ne):Ne},{children:Ke})):Ke};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("react/jsx-runtime"),o=require("./components/ChatCitation.js"),i=require("./utils/helpers.js"),n=require("./components/Chip.js"),t=require("./assets/message-chat-square.svg.js");require("@mui/icons-material/KeyboardArrowDown"),require("@mui/icons-material/KeyboardArrowUp"),require("@mui/icons-material/Clear");var r=require("./components/InViewNavigation.js"),d=require("./components/DetailedView.js"),s=require("./components/SummarizedView.js"),a=require("./components/RuleBook.js"),u=require("react"),v=require("./constants/renderer.js"),c=require("./components/IconContainer.js"),h=require("lucide-react"),f=require("./BigQueryTable.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=g(require("@mui/icons-material/CloseOutlined"));exports.default=function(g){var p,x,m,y,_,C,w,k,j,S,q,A,T,D,R,I,V,F,z,P,E,B,H,M,N,W,Y,O,K,Q,U,G,J,L,X,Z,$,ee,le,oe,ie,ne,te,re,de,se=g.rootContainer,ae=g.chatContainer,ue=void 0===ae?{chatData:[]}:ae,ve=g.ruleBookContainer,ce=g.renderer,he=g.additionalData,fe=g.tableComponent,ge=g.closePreview,be=g.isRenderedCustomComponent,pe=void 0!==be&&be,xe=g.showRootContainer,me=void 0===xe||xe,ye=g.reversePanels,_e=void 0!==ye&&ye,Ce=u.useState(0),we=Ce[0],ke=Ce[1],je=u.useState(0),Se=je[0],qe=je[1],Ae=u.useState(0),Te=Ae[0],De=Ae[1],Re=u.useState(0),Ie=Re[0],Ve=Re[1],Fe=u.useRef(null),ze=u.useRef(null),Pe=u.useMemo(function(){return e.__assign(e.__assign({},v.defaultRenderer),ce)},[ce]),Ee=u.useMemo(function(){return!!((null==fe?void 0:fe.rows)&&Object.keys(fe.rows).length>0)},[fe]),Be=u.useMemo(function(){var e;return null!==(e=null==he?void 0:he.RuleBookDetailedViewVerticallyStacked)&&void 0!==e&&e},[null==he?void 0:he.RuleBookDetailedViewVerticallyStacked]);u.useEffect(function(){var e,l;if((null==ve?void 0:ve.show)&&Fe.current){var o=null===(e=Fe.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(ke((null==o?void 0:o.length)||0),qe(0),o&&o.length>0)(i=o[0]).style.backgroundColor="#ffff5c",i.scrollIntoView({behavior:"smooth",block:"center"})}if((null==ue?void 0:ue.show)&&(null==ze?void 0:ze.current)){var i,n=null===(l=ze.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(De((null==n?void 0:n.length)||0),Ve(0),n&&n.length>0)(i=n[0]).style.backgroundColor="#ffff5c",i.scrollIntoView({behavior:"smooth",block:"center"})}},[null==ue?void 0:ue.show,null==ve?void 0:ve.show,null==ve?void 0:ve.data,null==ue?void 0:ue.chatData]);var He=u.useCallback(function(){var e;if(Se+1<we){var l=null===(e=Fe.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(!l)return;l[Se].style.backgroundColor="#ffffb8";var o=Se+1;qe(o);var i=l[o];i.style.backgroundColor="#ffff5c",null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}},[Se,we]),Me=u.useCallback(function(){var e;if(!(Se-1<0)){var l=null===(e=Fe.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(l){l[Se].style.backgroundColor="#ffffb8";var o=Se-1,i=l[o];i.style.backgroundColor="#ffff5c",qe(o),null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}}},[Se]),Ne=u.useCallback(function(){var e;if(Ie+1<Te){var l=null===(e=ze.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(!l)return;l[Ie].style.backgroundColor="#ffffb8";var o=Ie+1,i=l[o];i.style.backgroundColor="#ffff5c",Ve(o),null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}},[Ie,Te]),We=u.useCallback(function(){var e;if(!(Ie-1<0)){var l=null===(e=ze.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(l){l[Ie].style.backgroundColor="#ffffb8";var o=Ie-1,i=l[o];i.style.backgroundColor="#ffff5c",Ve(o),null==i||i.scrollIntoView({behavior:"smooth",block:"center"})}}},[Ie]),Ye=i.getColorCode((null==se?void 0:se.relevanceScore)||0),Oe=u.useMemo(function(){var o,i=l.jsxs("span",e.__assign({style:e.__assign({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:Ye.border,backgroundColor:Ye.background,color:Ye.text},null===(o=null==se?void 0:se.slotStyles)||void 0===o?void 0:o.relevanceScore)},{children:[(null==se?void 0:se.relevanceTitle)||"Decision Strength",":"," ",(null==se?void 0:se.relevanceScore)||0,"%"]}),"relevance-score"),n=l.jsx("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:ge},{children:l.jsx(b.default,{})}),"close-preview");return pe&&!(null==he?void 0:he.isExpanded)?[i,n]:[i]},[pe,Ye.background,Ye.border,Ye.text,null==se?void 0:se.relevanceScore,null===(p=null==se?void 0:se.slotStyles)||void 0===p?void 0:p.relevanceScore,null==se?void 0:se.relevanceTitle]),Ke=u.useMemo(function(){return[we>0&&l.jsx(r.default,{currentItemNumber:Se+1,totalItems:we,disableNext:Se+1>=we,onNext:He,onPrevious:Me,disablePrevious:Se<=0},"rulebook-nav")]},[Se,He,Me,we]),Qe=u.useMemo(function(){return(null==he?void 0:he.RuleBookContainerHeight)?he.RuleBookContainerHeight:!(!Be||(null==he?void 0:he.isExpanded))&&"600px"},[null==he?void 0:he.RuleBookContainerHeight,Be]),Ue=u.useMemo(function(){var e,o;return[(null===(o=null===(e=null==ue?void 0:ue.detailedTab)||void 0===e?void 0:e.chip)||void 0===o?void 0:o.isActive)&&Te>0&&l.jsx(r.default,{currentItemNumber:Ie+1,totalItems:Te,onNext:Ne,onPrevious:We,disableNext:Ie+1>=Te,disablePrevious:Ie<=0},"chat-nav")]},[null===(m=null===(x=null==ue?void 0:ue.detailedTab)||void 0===x?void 0:x.chip)||void 0===m?void 0:m.isActive,Ie,Ne,We,Te]),Ge=l.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:_e?Be?"column-reverse":"row-reverse":Be?"column":"row",gap:"12px",height:Qe||"100%",minHeight:0},null===(y=null==se?void 0:se.slotStyles)||void 0===y?void 0:y.container)},{children:[Ee&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(_=null==ue?void 0:ue.slotStyles)||void 0===_?void 0:_.outerContainer)},{children:l.jsx(o.default,e.__assign({title:"Invoice Data Preview",icon:l.jsx(c.default,{children:l.jsx(h.Table,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:l.jsx("div",e.__assign({style:{height:"100%",maxHeight:(null==he?void 0:he.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==fe?void 0:fe.rows)&&l.jsx(f.BigQueryTable,{rows:fe.rows,columns:fe.columns||[]})}))}))})),(null==ve?void 0:ve.data)&&(ve.show||void 0===ve.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(C=null==ve?void 0:ve.slotStyles)||void 0===C?void 0:C.outerContainer)},{children:l.jsx(o.default,e.__assign({title:null!==(w=null==ve?void 0:ve.title)&&void 0!==w?w:"Rule book",icon:null==ve?void 0:ve.ruleBookIcon,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(k=null==ve?void 0:ve.slotStyles)||void 0===k?void 0:k.title)},secondaryActions:(null==ve?void 0:ve.secondaryActions)?ve.secondaryActions(Ke):Ke},{children:l.jsx("div",e.__assign({style:e.__assign({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(j=null==ve?void 0:ve.slotStyles)||void 0===j?void 0:j.dataContainer)},{children:l.jsx("div",e.__assign({style:{padding:"12px",height:"100%",overflowY:"auto"},ref:Fe},{children:l.jsx(a.default,{data:ve.data,renderers:null!==(S=null==ve?void 0:ve.renderer)&&void 0!==S?S:Pe})}))}))}))})),(null==ue?void 0:ue.chatData)&&ue.chatData.length>0&&(ue.show||void 0===ue.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(q=null==ue?void 0:ue.slotStyles)||void 0===q?void 0:q.outerContainer)},{children:l.jsx(o.default,e.__assign({title:null!==(A=null==ue?void 0:ue.title)&&void 0!==A?A:"Chat",icon:null==ue?void 0:ue.chatIcon,containerStyles:null===(T=null==ue?void 0:ue.slotStyles)||void 0===T?void 0:T.container,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(D=null==ue?void 0:ue.slotStyles)||void 0===D?void 0:D.title)},primaryActions:[((null===(I=null===(R=null==ue?void 0:ue.summarizedTab)||void 0===R?void 0:R.chip)||void 0===I?void 0:I.show)||void 0===(null===(F=null===(V=null==ue?void 0:ue.summarizedTab)||void 0===V?void 0:V.chip)||void 0===F?void 0:F.show))&&l.jsx(n.default,e.__assign({label:"Summarized"},null===(z=null==ue?void 0:ue.summarizedTab)||void 0===z?void 0:z.chip)),l.jsx(n.default,e.__assign({label:"Detailed"},null===(P=null==ue?void 0:ue.detailedTab)||void 0===P?void 0:P.chip))],secondaryActions:ue.secondaryActions?null==ue?void 0:ue.secondaryActions(Ue):Ue},{children:l.jsxs("div",e.__assign({style:e.__assign({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(E=null==ue?void 0:ue.slotStyles)||void 0===E?void 0:E.chatDataContainer)},{children:[(null===(H=null===(B=null==ue?void 0:ue.detailedTab)||void 0===B?void 0:B.chip)||void 0===H?void 0:H.isActive)&&l.jsx("div",e.__assign({ref:ze,style:{position:(null==he?void 0:he.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:l.jsx(d.default,{chatData:null!==(M=ue.chatData)&&void 0!==M?M:[],assistantChatProps:e.__assign(e.__assign({},null===(W=null===(N=null==ue?void 0:ue.detailedTab)||void 0===N?void 0:N.view)||void 0===W?void 0:W.assistantChatProps),{renderers:null!==(K=null===(O=null===(Y=null==ue?void 0:ue.detailedTab)||void 0===Y?void 0:Y.detailedViewRenderer)||void 0===O?void 0:O.assistantText)&&void 0!==K?K:Pe}),userChatItemProps:e.__assign(e.__assign({},null===(U=null===(Q=null==ue?void 0:ue.detailedTab)||void 0===Q?void 0:Q.view)||void 0===U?void 0:U.userChatItemProps),{renderers:null!==(L=null===(J=null===(G=null==ue?void 0:ue.detailedTab)||void 0===G?void 0:G.detailedViewRenderer)||void 0===J?void 0:J.userText)&&void 0!==L?L:Pe})})})),(null===(Z=null===(X=null==ue?void 0:ue.summarizedTab)||void 0===X?void 0:X.chip)||void 0===Z?void 0:Z.show)&&(null===(ee=null===($=null==ue?void 0:ue.summarizedTab)||void 0===$?void 0:$.chip)||void 0===ee?void 0:ee.isActive)&&l.jsx(s.default,e.__assign({chatData:null!==(le=ue.chatData)&&void 0!==le?le:[]},null===(oe=null==ue?void 0:ue.summarizedTab)||void 0===oe?void 0:oe.view,{renderer:null!==(ne=null===(ie=null==ue?void 0:ue.summarizedTab)||void 0===ie?void 0:ie.summarizedViewRenderer)&&void 0!==ne?ne:Pe}))]}))}))}))]}));return me?l.jsx(o.default,e.__assign({title:null==se?void 0:se.title,slotStyles:{title:null===(te=null==se?void 0:se.slotStyles)||void 0===te?void 0:te.title},containerStyles:null===(re=null==se?void 0:se.slotStyles)||void 0===re?void 0:re.container,icon:null!==(de=null==se?void 0:se.icon)&&void 0!==de?de:l.jsx(c.default,{children:l.jsx("img",{src:t.default,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==se?void 0:se.secondaryActions)?se.secondaryActions(Oe):Oe},{children:Ge})):Ge};
2
2
  //# sourceMappingURL=InternalChatCitationRenderer.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),i=require("./utils/helper.js");exports.default=function(n){var o=n.data,a=n.highlightRow,l=n.loading,s=n.highlightText,d=n.isErrored,c=t.useRef(null);if(t.useEffect(function(){if(a&&s&&!l){var e=setTimeout(function(){var e=c.current;if(e){var r=e.querySelector('[data-highlight="true"]');r&&r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}},200);return function(){return clearTimeout(e)}}},[a,s,l,o]),l)return r.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.7)",backdropFilter:"blur(4px)"}},{children:[r.jsx("div",{style:{height:"2rem",width:"2rem",borderRadius:"9999px",border:"3px solid #d1d5db",borderTopColor:"#3b82f6",animation:"excel-citation-loader-spin 1s linear infinite"}}),r.jsx("span",e.__assign({style:{marginTop:"0.5rem",fontSize:"0.875rem",color:"#4b5563"}},{children:"Fetching citations…"}))]}));if(d)return r.jsx("div",e.__assign({style:{padding:"0.75rem 1rem",fontSize:"0.875rem",color:"#4b5563",backgroundColor:"white",border:"1px solid #e5e7eb",borderRadius:"2px"}},{children:"We are having trouble fetching the citations."}));var u=Object.values(null!=o?o:{}).reduce(function(e,r){return Math.max(e,r.length)},0);return r.jsx("div",e.__assign({style:{padding:"0.5rem 1rem",backgroundColor:"white"}},{children:r.jsx("div",e.__assign({ref:c,style:{position:"relative",maxHeight:"500px",overflow:"auto",border:"1px solid #d1d5db",borderRadius:"2px",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"}},{children:r.jsx("table",e.__assign({style:{width:"100%",borderCollapse:"collapse",fontSize:"0.875rem"}},{children:r.jsx("tbody",{children:Object.entries(null!=o?o:{}).map(function(t){var n=t[0],o=t[1],l=Number(n),d=1===l,c=l===a,h=c&&!!s&&o.some(function(e){return e.toLowerCase().includes(s.toLowerCase())});return r.jsxs("tr",e.__assign({"data-highlight":c?"true":"false",style:{transition:"background-color 0.2s",position:d?"sticky":"static",top:d?0:"auto",zIndex:d?9:"auto",fontWeight:d?"bold":"normal",backgroundColor:d?"white":"transparent",boxShadow:d?"0 1px 2px 0 rgba(0, 0, 0, 0.05)":"none"}},{children:[r.jsx("td",e.__assign({style:{position:"sticky",left:0,zIndex:8,width:"3rem",textAlign:"center",border:"1px solid #e5e7eb",minWidth:"0.5rem",padding:"0 0.5rem",backgroundColor:l!==a||h?"#f1f5f9":"#fef08a"}},{children:d?null:l})),o.map(function(t,n){return r.jsx("td",e.__assign({style:{padding:"0.5rem 0.75rem",border:"1px solid #e5e7eb",color:"#374151",whiteSpace:"nowrap",backgroundColor:!h&&c?"#fef08a":"transparent"}},{children:s&&c&&h?i.highlightMatch(t,s):t}),n)}),o.length<u&&Array.from({length:u-o.length}).map(function(e,t){return r.jsx("td",{style:{border:"1px solid #e5e7eb",backgroundColor:"rgba(249, 250, 251, 0.3)"}},"empty-".concat(t))})]}),l)})})}))}))}))};
2
+ //# sourceMappingURL=ExcelCitations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExcelCitations.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime");exports.highlightMatch=function(t,s){var a=new RegExp("(".concat(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),")"),"gi");return t.split(a).map(function(t,a){return t.toLowerCase()===s.toLowerCase()?r.jsx("span",e.__assign({"data-highlight":"true",className:"bg-yellow-200 px-1 rounded-sm"},{children:t}),a):t})};
2
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),o=require("./features/Bookemon/Bookemon.js"),r=require("./features/PdfEditorCitation/PdfEditorCitation.js"),n=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),u=require("./features/PaginatedTable/PaginatedTable.js"),C=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),d=require("./features/ChatCitation/ChatCitationRenderer.js"),f=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),p=require("./features/PdfViewer/PdfViewer.js"),g=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),l=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),q=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),j=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),x=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),c=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/CitationViewer/CitationsViewer.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=o.default,exports.PdfCitation=r.PdfEditorCitation,exports.CitationRenderer=n.default,exports.MarkdownRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=u.default,exports.NonWebReasoningComponent=C.default,exports.ChatCitation=d.default,exports.CognitiveDecisioningCard=f.default,exports.PdfViewer=p.default,exports.FaqCitation=g.default,exports.ImageCitationContent=l.default,exports.VideoCitationContent=q.default,exports.FileCitationContent=j.default,exports.WebCitationWithImageContent=x.default,exports.AiReasoningCitation=c.default,exports.CitationsViewer=R.default;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),o=require("./features/Bookemon/Bookemon.js"),r=require("./features/PdfEditorCitation/PdfEditorCitation.js"),n=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),u=require("./features/PaginatedTable/PaginatedTable.js"),C=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),d=require("./features/ChatCitation/ChatCitationRenderer.js"),f=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),l=require("./features/PdfViewer/PdfViewer.js"),p=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),g=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),q=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),j=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),x=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),c=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),R=require("./features/CitationViewer/CitationsViewer.js"),m=require("./features/ExcelCitation/ExcelCitations.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=o.default,exports.PdfCitation=r.PdfEditorCitation,exports.CitationRenderer=n.default,exports.MarkdownRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=u.default,exports.NonWebReasoningComponent=C.default,exports.ChatCitation=d.default,exports.CognitiveDecisioningCard=f.default,exports.PdfViewer=l.default,exports.FaqCitation=p.default,exports.ImageCitationContent=g.default,exports.VideoCitationContent=q.default,exports.FileCitationContent=j.default,exports.WebCitationWithImageContent=x.default,exports.AiReasoningCitation=c.default,exports.CitationsViewer=R.default,exports.ExcelCitation=m.default;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as o,__spreadArray as n}from"tslib";import{jsxs as t,Fragment as i,jsx as e}from"react/jsx-runtime";import{useState as r,useMemo as a}from"react";import l from"./InternalChatCitationRenderer.js";import{Modal as d}from"./components/wrappers/Modal.js";import s from"./components/IconContainer.js";import{Maximize2 as c,X as u}from"lucide-react";import C from"@mui/icons-material/SwapHoriz";function v(v){var p,h,m,y,f,b,k,w=r(!1),x=w[0],B=w[1],g=r(),S=g[0],E=g[1];function A(o){B(!0),E(o)}function D(){B(!1),E(void 0)}function R(o){E(o)}var z=a(function(){var o;return!!(null===(o=v.ruleBookContainer)||void 0===o?void 0:o.data)},[null===(p=v.ruleBookContainer)||void 0===p?void 0:p.data]),j=a(function(){var o;return!!((null===(o=v.tableComponent)||void 0===o?void 0:o.rows)&&Object.keys(v.tableComponent.rows).length>0)},[v.tableComponent]);return console.log("tableComponent data:",v.tableComponent),console.log("isTableDataPresent:",j),console.log("rootContainer",v.rootContainer),console.log("chatCitation",v.chatContainer),t(i,{children:[e(l,o({},v,{showRootContainer:v.showRootContainer,tableComponent:v.tableComponent,additionalData:o(o({},v.additionalData),{isExpanded:!1}),isRenderedCustomComponent:v.isRenderedCustomComponent||!1,closePreview:v.closePreview,chatContainer:o(o({},v.chatContainer),{show:!0,secondaryActions:function(t){var i,r,a,l,d;return n(n(n([],t,!0),null!==(r=null===(i=v.chatContainer)||void 0===i?void 0:i.additionalSecondaryActions)&&void 0!==r?r:[],!0),[(null===(d=null===(l=null===(a=v.chatContainer)||void 0===a?void 0:a.detailedTab)||void 0===l?void 0:l.chip)||void 0===d?void 0:d.isActive)&&e("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),e(s,o({onClick:function(){return A("chat")},style:{cursor:"pointer"}},{children:e(c,{size:16,color:"#64748B"})}))],!1)}}),ruleBookContainer:z?o(o(o({},v.ruleBookContainer),null!==(m=null===(h=v.ruleBookContainer)||void 0===h?void 0:h.additionalSecondaryActions)&&void 0!==m?m:[]),{show:!0,secondaryActions:function(t){return n(n([],t,!0),[e("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),e(s,o({onClick:function(){return A("rulebook")},style:{cursor:"pointer"}},{children:e(c,{size:16,color:"#64748B"})}))],!1)}}):void 0})),e(d,o({isOpen:x,onClose:D},{children:e(l,o({},v,{showRootContainer:v.showRootContainer,tableComponent:v.tableComponent,additionalData:o(o({},v.additionalData),{isExpanded:!0}),rootContainer:o(o({},v.rootContainer),{secondaryActions:function(t){return n(n([],t,!0),[e(s,o({onClick:D,style:{cursor:"pointer"}},{children:e(u,{size:20,color:"#64748B"})}))],!1)}}),chatContainer:o(o({},v.chatContainer),{show:void 0===S?void 0:"chat"===S,secondaryActions:function(t){var i,r,a;return n(n([],t,!0),[(null===(a=null===(r=null===(i=v.chatContainer)||void 0===i?void 0:i.detailedTab)||void 0===r?void 0:r.chip)||void 0===a?void 0:a.isActive)&&(z||j)&&e("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),(z||j)&&e(s,o({style:{cursor:"pointer"},onClick:function(){return R("rulebook")}},{children:e(C,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o(o({},v.chatContainer.slotStyles),{chatDataContainer:o(o({},null===(y=v.chatContainer.slotStyles)||void 0===y?void 0:y.chatDataContainer),{maxHeight:void 0})})}),ruleBookContainer:z?o(o({},v.ruleBookContainer),{show:void 0===S?void 0:"rulebook"===S,secondaryActions:function(t){return n(n([],t,!0),[e("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),e(s,o({style:{cursor:"pointer"},onClick:function(){return R("chat")}},{children:e(C,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o(o({},null===(f=v.ruleBookContainer)||void 0===f?void 0:f.slotStyles),{dataContainer:o(o({},null===(k=null===(b=v.ruleBookContainer)||void 0===b?void 0:b.slotStyles)||void 0===k?void 0:k.dataContainer),{maxHeight:void 0})})}):void 0}))}))]})}export{v as default};
1
+ import{__assign as o,__spreadArray as n}from"tslib";import{jsxs as t,Fragment as i,jsx as e}from"react/jsx-runtime";import{useState as r,useMemo as a}from"react";import l from"./InternalChatCitationRenderer.js";import{Modal as d}from"./components/wrappers/Modal.js";import s from"./components/IconContainer.js";import{Maximize2 as c,X as u}from"lucide-react";import v from"@mui/icons-material/SwapHoriz";function C(C){var h,p,m,y,f,b,k,w=r(!1),x=w[0],B=w[1],g=r(),S=g[0],E=g[1];function A(o){B(!0),E(o)}function D(){B(!1),E(void 0)}function R(o){E(o)}var z=a(function(){var o;return!!(null===(o=C.ruleBookContainer)||void 0===o?void 0:o.data)},[null===(h=C.ruleBookContainer)||void 0===h?void 0:h.data]),j=a(function(){var o;return!!((null===(o=C.tableComponent)||void 0===o?void 0:o.rows)&&Object.keys(C.tableComponent.rows).length>0)},[C.tableComponent]);return console.log("tableComponent data:",C.tableComponent),console.log("isTableDataPresent:",j),console.log("rootContainer",C.rootContainer),console.log("chatCitation",C.chatContainer),t(i,{children:[e(l,o({},C,{showRootContainer:C.showRootContainer,tableComponent:C.tableComponent,additionalData:o(o({},C.additionalData),{isExpanded:!1}),isRenderedCustomComponent:C.isRenderedCustomComponent||!1,closePreview:C.closePreview},C.chatContainer&&{chatContainer:o(o({},C.chatContainer),{show:!0,secondaryActions:function(t){var i,r,a,l,d;return n(n(n([],t,!0),null!==(r=null===(i=C.chatContainer)||void 0===i?void 0:i.additionalSecondaryActions)&&void 0!==r?r:[],!0),[(null===(d=null===(l=null===(a=C.chatContainer)||void 0===a?void 0:a.detailedTab)||void 0===l?void 0:l.chip)||void 0===d?void 0:d.isActive)&&e("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),e(s,o({onClick:function(){return A("chat")},style:{cursor:"pointer"}},{children:e(c,{size:16,color:"#64748B"})}))],!1)}})},{ruleBookContainer:z?o(o({},C.ruleBookContainer),{show:!0,secondaryActions:function(t){var i,r;return n(n(n([],t,!0),null!==(r=null===(i=C.ruleBookContainer)||void 0===i?void 0:i.additionalSecondaryActions)&&void 0!==r?r:[],!0),[e("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),e(s,o({onClick:function(){return A("rulebook")},style:{cursor:"pointer"}},{children:e(c,{size:16,color:"#64748B"})}))],!1)}}):void 0})),e(d,o({isOpen:x,onClose:D},{children:e(l,o({},C,{showRootContainer:C.showRootContainer,tableComponent:C.tableComponent,additionalData:o(o({},C.additionalData),{isExpanded:!0}),rootContainer:o(o({},C.rootContainer),{secondaryActions:function(t){return n(n([],t,!0),[e(s,o({onClick:D,style:{cursor:"pointer"}},{children:e(u,{size:20,color:"#64748B"})}))],!1)}})},C.chatContainer&&{chatContainer:o(o({},C.chatContainer),{show:void 0===S?void 0:"chat"===S,secondaryActions:function(t){var i,r,a;return n(n([],t,!0),[(null===(a=null===(r=null===(i=C.chatContainer)||void 0===i?void 0:i.detailedTab)||void 0===r?void 0:r.chip)||void 0===a?void 0:a.isActive)&&(z||j)&&e("span",{style:{width:"1px",height:"100%",border:"1px solid #E2E8F0"}}),(z||j)&&e(s,o({style:{cursor:"pointer"},onClick:function(){return R("rulebook")}},{children:e(v,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o(o({},null===(p=C.chatContainer)||void 0===p?void 0:p.slotStyles),{chatDataContainer:o(o({},null===(y=null===(m=C.chatContainer)||void 0===m?void 0:m.slotStyles)||void 0===y?void 0:y.chatDataContainer),{maxHeight:void 0})})})},{ruleBookContainer:z?o(o({},C.ruleBookContainer),{show:void 0===S?void 0:"rulebook"===S,secondaryActions:function(t){return n(n([],t,!0),[e("span",{style:{width:"1px",border:"1px solid #E2E8F0"}}),e(s,o({style:{cursor:"pointer"},onClick:function(){return R("chat")}},{children:e(v,{style:{color:"gray",fontSize:22}})}))],!1)},slotStyles:o(o({},null===(f=C.ruleBookContainer)||void 0===f?void 0:f.slotStyles),{dataContainer:o(o({},null===(k=null===(b=C.ruleBookContainer)||void 0===b?void 0:b.slotStyles)||void 0===k?void 0:k.dataContainer),{maxHeight:void 0})})}):void 0}))}))]})}export{C as default};
2
2
  //# sourceMappingURL=ChatCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as o}from"tslib";import{jsx as l,jsxs as i}from"react/jsx-runtime";import e from"./components/ChatCitation.js";import{getColorCode as n}from"./utils/helpers.js";import t from"./components/Chip.js";import r from"./assets/message-chat-square.svg.js";import"@mui/icons-material/KeyboardArrowDown";import"@mui/icons-material/KeyboardArrowUp";import"@mui/icons-material/Clear";import d from"./components/InViewNavigation.js";import a from"./components/DetailedView.js";import u from"./components/SummarizedView.js";import s from"./components/RuleBook.js";import{useState as v,useRef as c,useMemo as h,useEffect as f,useCallback as m}from"react";import{defaultRenderer as p}from"./constants/renderer.js";import b from"./components/IconContainer.js";import{Table as g}from"lucide-react";import{BigQueryTable as y}from"./BigQueryTable.js";import x from"@mui/icons-material/CloseOutlined";function w(w){var C,k,S,A,T,I,D,R,V,F,j,z,P,E,B,H,q,N,W,Y,K,O,Q,U,G,J,L,M,X,Z,$,_,oo,lo,io,eo,no,to,ro,ao,uo,so,vo,co=w.rootContainer,ho=w.chatContainer,fo=w.ruleBookContainer,mo=w.renderer,po=w.additionalData,bo=w.tableComponent,go=w.closePreview,yo=w.isRenderedCustomComponent,xo=void 0!==yo&&yo,wo=w.showRootContainer,Co=void 0===wo||wo,ko=w.reversePanels,So=void 0!==ko&&ko,Ao=v(0),To=Ao[0],Io=Ao[1],Do=v(0),Ro=Do[0],Vo=Do[1],Fo=v(0),jo=Fo[0],zo=Fo[1],Po=v(0),Eo=Po[0],Bo=Po[1],Ho=c(null),qo=c(null),No=h(function(){return o(o(o({},p),mo),{highlight:function(i){var e;return l("span",o({"data-highlight":"true",style:{backgroundColor:null!==(e=null==ho?void 0:ho.highlightColor)&&void 0!==e?e:"#ffffb8",borderRadius:"2px"}},{children:i.children}))}})},[mo,null==ho?void 0:ho.highlightColor]),Wo=h(function(){return!!((null==bo?void 0:bo.rows)&&Object.keys(bo.rows).length>0)},[bo]),Yo=h(function(){var o;return null!==(o=null==po?void 0:po.RuleBookDetailedViewVerticallyStacked)&&void 0!==o&&o},[null==po?void 0:po.RuleBookDetailedViewVerticallyStacked]);f(function(){var o,l;if((null==fo?void 0:fo.show)&&Ho.current){var i=null===(o=Ho.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(Io((null==i?void 0:i.length)||0),Vo(0),i&&i.length>0)(e=i[0]).style.backgroundColor="#ffff5c",e.scrollIntoView({behavior:"smooth",block:"center"})}if(ho.show&&qo.current){var e,n=null===(l=qo.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(zo((null==n?void 0:n.length)||0),Bo(0),n&&n.length>0)(e=n[0]).style.backgroundColor="#ffff5c",e.scrollIntoView({behavior:"smooth",block:"center"})}},[ho.show,null==fo?void 0:fo.show,null==fo?void 0:fo.data,null==ho?void 0:ho.chatData]);var Ko=m(function(){var o;if(Ro+1<To){var l=null===(o=Ho.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(!l)return;l[Ro].style.backgroundColor="#ffffb8";var i=Ro+1;Vo(i);var e=l[i];e.style.backgroundColor="#ffff5c",null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}},[Ro,To]),Oo=m(function(){var o;if(!(Ro-1<0)){var l=null===(o=Ho.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(l){l[Ro].style.backgroundColor="#ffffb8";var i=Ro-1,e=l[i];e.style.backgroundColor="#ffff5c",Vo(i),null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}}},[Ro]),Qo=m(function(){var o;if(Eo+1<jo){var l=null===(o=qo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(!l)return;l[Eo].style.backgroundColor="#ffffb8";var i=Eo+1,e=l[i];e.style.backgroundColor="#ffff5c",Bo(i),null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}},[Eo,jo]),Uo=m(function(){var o;if(!(Eo-1<0)){var l=null===(o=qo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(l){l[Eo].style.backgroundColor="#ffffb8";var i=Eo-1,e=l[i];e.style.backgroundColor="#ffff5c",Bo(i),null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}}},[Eo]),Go=n((null==co?void 0:co.relevanceScore)||0),Jo=h(function(){var e,n=i("span",o({style:o({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:Go.border,backgroundColor:Go.background,color:Go.text},null===(e=null==co?void 0:co.slotStyles)||void 0===e?void 0:e.relevanceScore)},{children:[(null==co?void 0:co.relevanceTitle)||"Decision Strength",":"," ",(null==co?void 0:co.relevanceScore)||0,"%"]}),"relevance-score"),t=l("span",o({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:go},{children:l(x,{})}),"close-preview");return xo&&!(null==po?void 0:po.isExpanded)?[n,t]:[n]},[xo,Go.background,Go.border,Go.text,null==co?void 0:co.relevanceScore,null===(C=null==co?void 0:co.slotStyles)||void 0===C?void 0:C.relevanceScore,null==co?void 0:co.relevanceTitle]),Lo=h(function(){return[To>0&&l(d,{currentItemNumber:Ro+1,totalItems:To,disableNext:Ro+1>=To,onNext:Ko,onPrevious:Oo,disablePrevious:Ro<=0},"rulebook-nav")]},[Ro,Ko,Oo,To]),Mo=h(function(){return(null==po?void 0:po.RuleBookContainerHeight)?po.RuleBookContainerHeight:!(!Yo||(null==po?void 0:po.isExpanded))&&"600px"},[null==po?void 0:po.RuleBookContainerHeight,Yo]),Xo=h(function(){var o,i;return[(null===(i=null===(o=null==ho?void 0:ho.detailedTab)||void 0===o?void 0:o.chip)||void 0===i?void 0:i.isActive)&&jo>0&&l(d,{currentItemNumber:Eo+1,totalItems:jo,onNext:Qo,onPrevious:Uo,disableNext:Eo+1>=jo,disablePrevious:Eo<=0},"chat-nav")]},[null===(S=null===(k=null==ho?void 0:ho.detailedTab)||void 0===k?void 0:k.chip)||void 0===S?void 0:S.isActive,Eo,Qo,Uo,jo]),Zo=i("div",o({style:o({display:"flex",flexDirection:So?Yo?"column-reverse":"row-reverse":Yo?"column":"row",gap:"12px",height:Mo||"100%",minHeight:0},null===(A=null==co?void 0:co.slotStyles)||void 0===A?void 0:A.container)},{children:[Wo&&l("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(T=null==ho?void 0:ho.slotStyles)||void 0===T?void 0:T.outerContainer)},{children:l(e,o({title:"Invoice Data Preview",icon:l(b,{children:l(g,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:l("div",o({style:{height:"100%",maxHeight:(null==po?void 0:po.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==bo?void 0:bo.rows)&&l(y,{rows:bo.rows,columns:bo.columns||[]})}))}))})),(null==fo?void 0:fo.data)&&(fo.show||void 0===fo.show)&&l("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(I=null==fo?void 0:fo.slotStyles)||void 0===I?void 0:I.outerContainer)},{children:l(e,o({title:null!==(D=null==fo?void 0:fo.title)&&void 0!==D?D:"Rule book",icon:null==fo?void 0:fo.ruleBookIcon,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(R=null==fo?void 0:fo.slotStyles)||void 0===R?void 0:R.title)},secondaryActions:(null==fo?void 0:fo.secondaryActions)?fo.secondaryActions(Lo):Lo},{children:l("div",o({style:o({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(V=null==fo?void 0:fo.slotStyles)||void 0===V?void 0:V.dataContainer)},{children:l("div",o({style:{position:"absolute",padding:"12px",inset:0,overflowY:"auto"},ref:Ho},{children:l(s,{data:fo.data,renderers:null!==(F=null==fo?void 0:fo.renderer)&&void 0!==F?F:No})}))}))}))})),(ho.show||void 0===ho.show)&&l("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(j=null==ho?void 0:ho.slotStyles)||void 0===j?void 0:j.outerContainer)},{children:l(e,o({title:null!==(z=null==ho?void 0:ho.title)&&void 0!==z?z:"Chat",icon:null==ho?void 0:ho.chatIcon,containerStyles:null===(P=null==ho?void 0:ho.slotStyles)||void 0===P?void 0:P.container,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(E=null==ho?void 0:ho.slotStyles)||void 0===E?void 0:E.title)},primaryActions:[((null===(H=null===(B=null==ho?void 0:ho.summarizedTab)||void 0===B?void 0:B.chip)||void 0===H?void 0:H.show)||void 0===(null===(N=null===(q=null==ho?void 0:ho.summarizedTab)||void 0===q?void 0:q.chip)||void 0===N?void 0:N.show))&&l(t,o({label:"Summarized"},null===(W=null==ho?void 0:ho.summarizedTab)||void 0===W?void 0:W.chip)),l(t,o({label:"Detailed"},null===(Y=null==ho?void 0:ho.detailedTab)||void 0===Y?void 0:Y.chip))],secondaryActions:ho.secondaryActions?null==ho?void 0:ho.secondaryActions(Xo):Xo},{children:i("div",o({style:o({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(K=null==ho?void 0:ho.slotStyles)||void 0===K?void 0:K.chatDataContainer)},{children:[(null===(Q=null===(O=null==ho?void 0:ho.detailedTab)||void 0===O?void 0:O.chip)||void 0===Q?void 0:Q.isActive)&&l("div",o({ref:qo,style:{position:(null==po?void 0:po.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:l(a,{chatData:ho.chatData,assistantChatProps:o(o({},null===(G=null===(U=null==ho?void 0:ho.detailedTab)||void 0===U?void 0:U.view)||void 0===G?void 0:G.assistantChatProps),{renderers:null!==(M=null===(L=null===(J=null==ho?void 0:ho.detailedTab)||void 0===J?void 0:J.detailedViewRenderer)||void 0===L?void 0:L.assistantText)&&void 0!==M?M:No}),userChatItemProps:o(o({},null===(Z=null===(X=null==ho?void 0:ho.detailedTab)||void 0===X?void 0:X.view)||void 0===Z?void 0:Z.userChatItemProps),{renderers:null!==(oo=null===(_=null===($=null==ho?void 0:ho.detailedTab)||void 0===$?void 0:$.detailedViewRenderer)||void 0===_?void 0:_.userText)&&void 0!==oo?oo:No})})})),(null===(io=null===(lo=null==ho?void 0:ho.summarizedTab)||void 0===lo?void 0:lo.chip)||void 0===io?void 0:io.show)&&(null===(no=null===(eo=null==ho?void 0:ho.summarizedTab)||void 0===eo?void 0:eo.chip)||void 0===no?void 0:no.isActive)&&l(u,o({chatData:ho.chatData},null===(to=null==ho?void 0:ho.summarizedTab)||void 0===to?void 0:to.view,{renderer:null!==(ao=null===(ro=null==ho?void 0:ho.summarizedTab)||void 0===ro?void 0:ro.summarizedViewRenderer)&&void 0!==ao?ao:No}))]}))}))}))]}));return Co?l(e,o({title:null==co?void 0:co.title,slotStyles:{title:null===(uo=null==co?void 0:co.slotStyles)||void 0===uo?void 0:uo.title},containerStyles:null===(so=null==co?void 0:co.slotStyles)||void 0===so?void 0:so.container,icon:null!==(vo=null==co?void 0:co.icon)&&void 0!==vo?vo:l(b,{children:l("img",{src:r,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==co?void 0:co.secondaryActions)?co.secondaryActions(Jo):Jo},{children:Zo})):Zo}export{w as default};
1
+ import{__assign as o}from"tslib";import{jsxs as l,jsx as i}from"react/jsx-runtime";import e from"./components/ChatCitation.js";import{getColorCode as n}from"./utils/helpers.js";import t from"./components/Chip.js";import r from"./assets/message-chat-square.svg.js";import"@mui/icons-material/KeyboardArrowDown";import"@mui/icons-material/KeyboardArrowUp";import"@mui/icons-material/Clear";import d from"./components/InViewNavigation.js";import a from"./components/DetailedView.js";import u from"./components/SummarizedView.js";import v from"./components/RuleBook.js";import{useState as s,useRef as c,useMemo as h,useEffect as m,useCallback as f}from"react";import{defaultRenderer as p}from"./constants/renderer.js";import b from"./components/IconContainer.js";import{Table as y}from"lucide-react";import{BigQueryTable as g}from"./BigQueryTable.js";import x from"@mui/icons-material/CloseOutlined";function w(w){var C,k,S,A,D,T,I,R,V,F,j,z,P,E,B,H,q,N,W,Y,K,O,Q,U,G,J,L,M,X,Z,$,_,oo,lo,io,eo,no,to,ro,ao,uo,vo,so,co,ho,mo=w.rootContainer,fo=w.chatContainer,po=void 0===fo?{chatData:[]}:fo,bo=w.ruleBookContainer,yo=w.renderer,go=w.additionalData,xo=w.tableComponent,wo=w.closePreview,Co=w.isRenderedCustomComponent,ko=void 0!==Co&&Co,So=w.showRootContainer,Ao=void 0===So||So,Do=w.reversePanels,To=void 0!==Do&&Do,Io=s(0),Ro=Io[0],Vo=Io[1],Fo=s(0),jo=Fo[0],zo=Fo[1],Po=s(0),Eo=Po[0],Bo=Po[1],Ho=s(0),qo=Ho[0],No=Ho[1],Wo=c(null),Yo=c(null),Ko=h(function(){return o(o({},p),yo)},[yo]),Oo=h(function(){return!!((null==xo?void 0:xo.rows)&&Object.keys(xo.rows).length>0)},[xo]),Qo=h(function(){var o;return null!==(o=null==go?void 0:go.RuleBookDetailedViewVerticallyStacked)&&void 0!==o&&o},[null==go?void 0:go.RuleBookDetailedViewVerticallyStacked]);m(function(){var o,l;if((null==bo?void 0:bo.show)&&Wo.current){var i=null===(o=Wo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(Vo((null==i?void 0:i.length)||0),zo(0),i&&i.length>0)(e=i[0]).style.backgroundColor="#ffff5c",e.scrollIntoView({behavior:"smooth",block:"center"})}if((null==po?void 0:po.show)&&(null==Yo?void 0:Yo.current)){var e,n=null===(l=Yo.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(Bo((null==n?void 0:n.length)||0),No(0),n&&n.length>0)(e=n[0]).style.backgroundColor="#ffff5c",e.scrollIntoView({behavior:"smooth",block:"center"})}},[null==po?void 0:po.show,null==bo?void 0:bo.show,null==bo?void 0:bo.data,null==po?void 0:po.chatData]);var Uo=f(function(){var o;if(jo+1<Ro){var l=null===(o=Wo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(!l)return;l[jo].style.backgroundColor="#ffffb8";var i=jo+1;zo(i);var e=l[i];e.style.backgroundColor="#ffff5c",null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}},[jo,Ro]),Go=f(function(){var o;if(!(jo-1<0)){var l=null===(o=Wo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(l){l[jo].style.backgroundColor="#ffffb8";var i=jo-1,e=l[i];e.style.backgroundColor="#ffff5c",zo(i),null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}}},[jo]),Jo=f(function(){var o;if(qo+1<Eo){var l=null===(o=Yo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(!l)return;l[qo].style.backgroundColor="#ffffb8";var i=qo+1,e=l[i];e.style.backgroundColor="#ffff5c",No(i),null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}},[qo,Eo]),Lo=f(function(){var o;if(!(qo-1<0)){var l=null===(o=Yo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(l){l[qo].style.backgroundColor="#ffffb8";var i=qo-1,e=l[i];e.style.backgroundColor="#ffff5c",No(i),null==e||e.scrollIntoView({behavior:"smooth",block:"center"})}}},[qo]),Mo=n((null==mo?void 0:mo.relevanceScore)||0),Xo=h(function(){var e,n=l("span",o({style:o({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:Mo.border,backgroundColor:Mo.background,color:Mo.text},null===(e=null==mo?void 0:mo.slotStyles)||void 0===e?void 0:e.relevanceScore)},{children:[(null==mo?void 0:mo.relevanceTitle)||"Decision Strength",":"," ",(null==mo?void 0:mo.relevanceScore)||0,"%"]}),"relevance-score"),t=i("span",o({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:wo},{children:i(x,{})}),"close-preview");return ko&&!(null==go?void 0:go.isExpanded)?[n,t]:[n]},[ko,Mo.background,Mo.border,Mo.text,null==mo?void 0:mo.relevanceScore,null===(C=null==mo?void 0:mo.slotStyles)||void 0===C?void 0:C.relevanceScore,null==mo?void 0:mo.relevanceTitle]),Zo=h(function(){return[Ro>0&&i(d,{currentItemNumber:jo+1,totalItems:Ro,disableNext:jo+1>=Ro,onNext:Uo,onPrevious:Go,disablePrevious:jo<=0},"rulebook-nav")]},[jo,Uo,Go,Ro]),$o=h(function(){return(null==go?void 0:go.RuleBookContainerHeight)?go.RuleBookContainerHeight:!(!Qo||(null==go?void 0:go.isExpanded))&&"600px"},[null==go?void 0:go.RuleBookContainerHeight,Qo]),_o=h(function(){var o,l;return[(null===(l=null===(o=null==po?void 0:po.detailedTab)||void 0===o?void 0:o.chip)||void 0===l?void 0:l.isActive)&&Eo>0&&i(d,{currentItemNumber:qo+1,totalItems:Eo,onNext:Jo,onPrevious:Lo,disableNext:qo+1>=Eo,disablePrevious:qo<=0},"chat-nav")]},[null===(S=null===(k=null==po?void 0:po.detailedTab)||void 0===k?void 0:k.chip)||void 0===S?void 0:S.isActive,qo,Jo,Lo,Eo]),ol=l("div",o({style:o({display:"flex",flexDirection:To?Qo?"column-reverse":"row-reverse":Qo?"column":"row",gap:"12px",height:$o||"100%",minHeight:0},null===(A=null==mo?void 0:mo.slotStyles)||void 0===A?void 0:A.container)},{children:[Oo&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(D=null==po?void 0:po.slotStyles)||void 0===D?void 0:D.outerContainer)},{children:i(e,o({title:"Invoice Data Preview",icon:i(b,{children:i(y,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:i("div",o({style:{height:"100%",maxHeight:(null==go?void 0:go.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==xo?void 0:xo.rows)&&i(g,{rows:xo.rows,columns:xo.columns||[]})}))}))})),(null==bo?void 0:bo.data)&&(bo.show||void 0===bo.show)&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(T=null==bo?void 0:bo.slotStyles)||void 0===T?void 0:T.outerContainer)},{children:i(e,o({title:null!==(I=null==bo?void 0:bo.title)&&void 0!==I?I:"Rule book",icon:null==bo?void 0:bo.ruleBookIcon,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(R=null==bo?void 0:bo.slotStyles)||void 0===R?void 0:R.title)},secondaryActions:(null==bo?void 0:bo.secondaryActions)?bo.secondaryActions(Zo):Zo},{children:i("div",o({style:o({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(V=null==bo?void 0:bo.slotStyles)||void 0===V?void 0:V.dataContainer)},{children:i("div",o({style:{padding:"12px",height:"100%",overflowY:"auto"},ref:Wo},{children:i(v,{data:bo.data,renderers:null!==(F=null==bo?void 0:bo.renderer)&&void 0!==F?F:Ko})}))}))}))})),(null==po?void 0:po.chatData)&&po.chatData.length>0&&(po.show||void 0===po.show)&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(j=null==po?void 0:po.slotStyles)||void 0===j?void 0:j.outerContainer)},{children:i(e,o({title:null!==(z=null==po?void 0:po.title)&&void 0!==z?z:"Chat",icon:null==po?void 0:po.chatIcon,containerStyles:null===(P=null==po?void 0:po.slotStyles)||void 0===P?void 0:P.container,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(E=null==po?void 0:po.slotStyles)||void 0===E?void 0:E.title)},primaryActions:[((null===(H=null===(B=null==po?void 0:po.summarizedTab)||void 0===B?void 0:B.chip)||void 0===H?void 0:H.show)||void 0===(null===(N=null===(q=null==po?void 0:po.summarizedTab)||void 0===q?void 0:q.chip)||void 0===N?void 0:N.show))&&i(t,o({label:"Summarized"},null===(W=null==po?void 0:po.summarizedTab)||void 0===W?void 0:W.chip)),i(t,o({label:"Detailed"},null===(Y=null==po?void 0:po.detailedTab)||void 0===Y?void 0:Y.chip))],secondaryActions:po.secondaryActions?null==po?void 0:po.secondaryActions(_o):_o},{children:l("div",o({style:o({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(K=null==po?void 0:po.slotStyles)||void 0===K?void 0:K.chatDataContainer)},{children:[(null===(Q=null===(O=null==po?void 0:po.detailedTab)||void 0===O?void 0:O.chip)||void 0===Q?void 0:Q.isActive)&&i("div",o({ref:Yo,style:{position:(null==go?void 0:go.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:i(a,{chatData:null!==(U=po.chatData)&&void 0!==U?U:[],assistantChatProps:o(o({},null===(J=null===(G=null==po?void 0:po.detailedTab)||void 0===G?void 0:G.view)||void 0===J?void 0:J.assistantChatProps),{renderers:null!==(X=null===(M=null===(L=null==po?void 0:po.detailedTab)||void 0===L?void 0:L.detailedViewRenderer)||void 0===M?void 0:M.assistantText)&&void 0!==X?X:Ko}),userChatItemProps:o(o({},null===($=null===(Z=null==po?void 0:po.detailedTab)||void 0===Z?void 0:Z.view)||void 0===$?void 0:$.userChatItemProps),{renderers:null!==(lo=null===(oo=null===(_=null==po?void 0:po.detailedTab)||void 0===_?void 0:_.detailedViewRenderer)||void 0===oo?void 0:oo.userText)&&void 0!==lo?lo:Ko})})})),(null===(eo=null===(io=null==po?void 0:po.summarizedTab)||void 0===io?void 0:io.chip)||void 0===eo?void 0:eo.show)&&(null===(to=null===(no=null==po?void 0:po.summarizedTab)||void 0===no?void 0:no.chip)||void 0===to?void 0:to.isActive)&&i(u,o({chatData:null!==(ro=po.chatData)&&void 0!==ro?ro:[]},null===(ao=null==po?void 0:po.summarizedTab)||void 0===ao?void 0:ao.view,{renderer:null!==(vo=null===(uo=null==po?void 0:po.summarizedTab)||void 0===uo?void 0:uo.summarizedViewRenderer)&&void 0!==vo?vo:Ko}))]}))}))}))]}));return Ao?i(e,o({title:null==mo?void 0:mo.title,slotStyles:{title:null===(so=null==mo?void 0:mo.slotStyles)||void 0===so?void 0:so.title},containerStyles:null===(co=null==mo?void 0:mo.slotStyles)||void 0===co?void 0:co.container,icon:null!==(ho=null==mo?void 0:mo.icon)&&void 0!==ho?ho:i(b,{children:i("img",{src:r,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==mo?void 0:mo.secondaryActions)?mo.secondaryActions(Xo):Xo},{children:ol})):ol}export{w as default};
2
2
  //# sourceMappingURL=InternalChatCitationRenderer.js.map
@@ -0,0 +1,2 @@
1
+ import{__assign as e}from"tslib";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{useRef as o,useEffect as i}from"react";import{highlightMatch as n}from"./utils/helper.js";var l=function(l){var a=l.data,d=l.highlightRow,c=l.loading,s=l.highlightText,u=l.isErrored,h=o(null);if(i(function(){if(d&&s&&!c){var e=setTimeout(function(){var e=h.current;if(e){var r=e.querySelector('[data-highlight="true"]');r&&r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}},200);return function(){return clearTimeout(e)}}},[d,s,c,a]),c)return r("div",e({style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.7)",backdropFilter:"blur(4px)"}},{children:[t("div",{style:{height:"2rem",width:"2rem",borderRadius:"9999px",border:"3px solid #d1d5db",borderTopColor:"#3b82f6",animation:"excel-citation-loader-spin 1s linear infinite"}}),t("span",e({style:{marginTop:"0.5rem",fontSize:"0.875rem",color:"#4b5563"}},{children:"Fetching citations…"}))]}));if(u)return t("div",e({style:{padding:"0.75rem 1rem",fontSize:"0.875rem",color:"#4b5563",backgroundColor:"white",border:"1px solid #e5e7eb",borderRadius:"2px"}},{children:"We are having trouble fetching the citations."}));var b=Object.values(null!=a?a:{}).reduce(function(e,r){return Math.max(e,r.length)},0);return t("div",e({style:{padding:"0.5rem 1rem",backgroundColor:"white"}},{children:t("div",e({ref:h,style:{position:"relative",maxHeight:"500px",overflow:"auto",border:"1px solid #d1d5db",borderRadius:"2px",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"}},{children:t("table",e({style:{width:"100%",borderCollapse:"collapse",fontSize:"0.875rem"}},{children:t("tbody",{children:Object.entries(null!=a?a:{}).map(function(o){var i=o[0],l=o[1],a=Number(i),c=1===a,u=a===d,h=u&&!!s&&l.some(function(e){return e.toLowerCase().includes(s.toLowerCase())});return r("tr",e({"data-highlight":u?"true":"false",style:{transition:"background-color 0.2s",position:c?"sticky":"static",top:c?0:"auto",zIndex:c?9:"auto",fontWeight:c?"bold":"normal",backgroundColor:c?"white":"transparent",boxShadow:c?"0 1px 2px 0 rgba(0, 0, 0, 0.05)":"none"}},{children:[t("td",e({style:{position:"sticky",left:0,zIndex:8,width:"3rem",textAlign:"center",border:"1px solid #e5e7eb",minWidth:"0.5rem",padding:"0 0.5rem",backgroundColor:a!==d||h?"#f1f5f9":"#fef08a"}},{children:c?null:a})),l.map(function(r,o){return t("td",e({style:{padding:"0.5rem 0.75rem",border:"1px solid #e5e7eb",color:"#374151",whiteSpace:"nowrap",backgroundColor:!h&&u?"#fef08a":"transparent"}},{children:s&&u&&h?n(r,s):r}),o)}),l.length<b&&Array.from({length:b-l.length}).map(function(e,r){return t("td",{style:{border:"1px solid #e5e7eb",backgroundColor:"rgba(249, 250, 251, 0.3)"}},"empty-".concat(r))})]}),a)})})}))}))}))};export{l as default};
2
+ //# sourceMappingURL=ExcelCitations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExcelCitations.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";var t=function(t,o){var a=new RegExp("(".concat(o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),")"),"gi");return t.split(a).map(function(t,a){return t.toLowerCase()===o.toLowerCase()?e("span",r({"data-highlight":"true",className:"bg-yellow-200 px-1 rounded-sm"},{children:t}),a):t})};export{t as highlightMatch};
2
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";
1
+ export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ export default function ExcelCitationTest(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=ExcelCitationTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExcelCitationTest.d.ts","sourceRoot":"","sources":["../../../src/ExcelCitationTest.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,iBAAiB,4CA8BxC"}
@@ -7,7 +7,7 @@ interface BigQueryTableData {
7
7
  type ChatCitationRendererProps = Omit<ChatCitationProps, "rootContainer" | "chatContainer" | "ruleBookContainer"> & {
8
8
  showRootContainer?: boolean;
9
9
  rootContainer?: ChatCitationProps["rootContainer"] extends undefined ? undefined : Omit<Exclude<ChatCitationProps["rootContainer"], undefined>, "secondaryActions">;
10
- chatContainer: Omit<ChatCitationProps["chatContainer"], "secondaryActions" | "show"> & {
10
+ chatContainer?: ChatCitationProps["chatContainer"] extends undefined ? undefined : Omit<Exclude<ChatCitationProps["chatContainer"], undefined>, "secondaryActions" | "show"> & {
11
11
  additionalSecondaryActions?: React.ReactNode[];
12
12
  };
13
13
  ruleBookContainer?: ChatCitationProps["ruleBookContainer"] extends undefined ? undefined : Omit<Exclude<ChatCitationProps["ruleBookContainer"], undefined>, "secondaryActions" | "show"> & {
@@ -1 +1 @@
1
- {"version":3,"file":"ChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/ChatCitationRenderer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAM5D,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,KAAK,yBAAyB,GAAG,IAAI,CACnC,iBAAiB,EACjB,eAAe,GAAG,eAAe,GAAG,mBAAmB,CACxD,GAAG;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,iBAAiB,CAAC,eAAe,CAAC,SAAS,SAAS,GAChE,SAAS,GACT,IAAI,CACF,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,EACtD,kBAAkB,CACnB,CAAC;IACN,aAAa,EAAE,IAAI,CACjB,iBAAiB,CAAC,eAAe,CAAC,EAClC,kBAAkB,GAAG,MAAM,CAC5B,GAAE;QACH,0BAA0B,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;KAChD,CAAC;IACA,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,SAAS,SAAS,GACxE,SAAS,GACT,IAAI,CACF,OAAO,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,SAAS,CAAC,EAC1D,kBAAkB,GAAG,MAAM,CAC5B,GAAE;QACP,0BAA0B,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;KAChD,CAAC;IACA,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,SAAS,SAAS,GAClE,SAAS,GACT,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5D,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,YAAY,CAAC,EAAC,MAAM,IAAI,CAAC;IACzB,oBAAoB,CAAC,EAAC,MAAM,GAAG,IAAI,CAAC;IACpC,yBAAyB,CAAC,EAAC,OAAO,CAAC;IACnC,aAAa,CAAC,EAAC,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CA0L5E"}
1
+ {"version":3,"file":"ChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/ChatCitationRenderer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAM5D,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,KAAK,yBAAyB,GAAG,IAAI,CACnC,iBAAiB,EACjB,eAAe,GAAG,eAAe,GAAG,mBAAmB,CACxD,GAAG;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,iBAAiB,CAAC,eAAe,CAAC,SAAS,SAAS,GAChE,SAAS,GACT,IAAI,CACF,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,EACtD,kBAAkB,CACnB,CAAC;IACR,aAAa,CAAC,EAAE,iBAAiB,CAAC,eAAe,CAAC,SAAS,SAAS,GAChE,SAAS,GACT,IAAI,CACF,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,EACtD,kBAAkB,GAAG,MAAM,CAC5B,GACC;QACA,0BAA0B,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;KAChD,CAAC;IACJ,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,SAAS,SAAS,GACxE,SAAS,GACT,IAAI,CACF,OAAO,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,SAAS,CAAC,EAC1D,kBAAkB,GAAG,MAAM,CAC5B,GAAE;QACP,0BAA0B,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;KAChD,CAAC;IACA,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,SAAS,SAAS,GAClE,SAAS,GACT,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5D,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,YAAY,CAAC,EAAC,MAAM,IAAI,CAAC;IACzB,oBAAoB,CAAC,EAAC,MAAM,GAAG,IAAI,CAAC;IACpC,yBAAyB,CAAC,EAAC,OAAO,CAAC;IACnC,aAAa,CAAC,EAAC,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAyK5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/InternalChatCitationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D,OAAO,qBAAqB,CAAC;AAM7B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAGD,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,yBAAiC,EACjC,iBAAwB,EACxB,aAAmB,EACpB,EAAE,iCAAiC,2CAghBnC"}
1
+ {"version":3,"file":"InternalChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/InternalChatCitationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D,OAAO,qBAAqB,CAAC;AAM7B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAGD,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,aAAa,EACb,aAAgC,EAChC,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,yBAAiC,EACjC,iBAAwB,EACxB,aAAmB,EACpB,EAAE,iCAAiC,2CAigBnC"}
@@ -45,9 +45,9 @@ export type ChatCitationProps = {
45
45
  };
46
46
  secondaryActions?: (alreadyPresentSecondaryActions: React.ReactNode[]) => React.ReactNode[];
47
47
  };
48
- chatContainer: {
48
+ chatContainer?: {
49
49
  show?: boolean;
50
- chatData: ChatCitationItem[];
50
+ chatData?: ChatCitationItem[];
51
51
  title?: string;
52
52
  chatIcon?: React.ReactNode;
53
53
  highlightColor?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"citations.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatCitation/types/citations.types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;IACjD,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,UAAU,CAAC,EAAE;QACX,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC;KACjC,CAAC;IACF,aAAa,CAAC,EAAE;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAC9B,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAC1C,oBAAoB,CACrB,CAAC;QACF,UAAU,CAAC,EAAE,KAAK,CAAC,iBAAiB,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AW,CAAC,CAAC;IAChD,cAAc,CAAC,EAAE;QACf,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,sBAAsB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACzC,qCAAqC,CAAC,EAAE,OAAO,CAAC;QAChD,uBAAuB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3C,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,yBAAyB,CAAC,EAAC,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAC,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAC,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
1
+ {"version":3,"file":"citations.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ChatCitation/types/citations.types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,KAAK,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,i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/excel-citation.css";
3
+ export interface DataDict {
4
+ [key: number]: string[];
5
+ }
6
+ interface ExcelCitationProps {
7
+ data: DataDict;
8
+ highlightRow?: number;
9
+ loading: boolean;
10
+ isErrored: boolean;
11
+ highlightText?: string | null;
12
+ }
13
+ declare const ExcelCitation: React.FC<ExcelCitationProps>;
14
+ export default ExcelCitation;
15
+ //# sourceMappingURL=ExcelCitations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExcelCitations.d.ts","sourceRoot":"","sources":["../../../../../src/features/ExcelCitation/ExcelCitations.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,0BAA0B,CAAC;AAElC,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACzB;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0M/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const highlightMatch: (originalText: string, highlightText: string) => (string | import("react/jsx-runtime").JSX.Element)[];
2
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../../src/features/ExcelCitation/utils/helper.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,iBAAkB,MAAM,iBAAiB,MAAM,yDAoBzE,CAAC"}
@@ -18,4 +18,5 @@ export { default as FileCitationContent } from "./features/RequirementAiCitation
18
18
  export { default as WebCitationWithImageContent } from "./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent";
19
19
  export { default as AiReasoningCitation } from "./features/RequirementAiCitations/AiReasoning/AiReasoningCitation";
20
20
  export { default as CitationsViewer } from "./features/CitationViewer/CitationsViewer";
21
+ export { default as ExcelCitation } from "./features/ExcelCitation/ExcelCitations";
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,iFAAiF,CAAC;AACpI,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AAClH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAC,MAAO,yDAAyD,CAAA;AAEhG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CA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AAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,yDAAyD,CAAC;AAEjG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sEAAsE,CAAC;AACvH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,oEAAoE,CAAC;AACpH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,2EAA2E,CAAC;AACnI,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AACnH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yCAAyC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-llm-studio/citation",
3
- "version": "0.0.130",
3
+ "version": "0.0.132",
4
4
  "author": "Devesh Patel",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -20,7 +20,7 @@
20
20
  "./FaqCitation": {
21
21
  "import": "./dist/features/CognitiveDecisioning/FaqCitation/FaqCitation.js",
22
22
  "require": "./dist/cjs/features/CognitiveDecisioning/FaqCitation/FaqCitation.js",
23
- "types": "./dist/types/features/CognitiveDecisioning/FaqCitation/FaqCitation.d.ts"
23
+ "types": "./dist/types/src/features/CognitiveDecisioning/FaqCitation/FaqCitation.d.ts"
24
24
  },
25
25
  "./ProjectAccordion": {
26
26
  "import": "./dist/features/ProjectAccordion/ProjectAccordion.js",
@@ -32,6 +32,11 @@
32
32
  "require": "./dist/cjs/features/ChatCitation/ChatCitationRenderer.js",
33
33
  "types": "./dist/types/src/features/ChatCitation/ChatCitationRenderer.d.ts"
34
34
  },
35
+ "./ExcelCitation": {
36
+ "import": "./dist/features/ExcelCitation/ExcelCitation.js",
37
+ "require": "./dist/cjs/features/ExcelCitation/ExcelCitation.js",
38
+ "types": "./dist/types/src/features/ExcelCitation/ExcelCitation.d.ts"
39
+ },
35
40
  "./CodeCitation": {
36
41
  "import": "./dist/features/CodeCitation/CodeCitation.js",
37
42
  "require": "./dist/cjs/features/CodeCitation/CodeCitation.js",