it-data-nexus-ui-library 2.9.9 → 2.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionBar.mjs +1 -1
- package/dist/components/AgentChat/AgentChatDialog.mjs +1 -1
- package/dist/components/AgentChat/AgentChatWindow.mjs +1 -1
- package/dist/components/AgentChat/ChatComponents/ChatContentFallback.mjs +1 -0
- package/dist/components/AgentChat/ChatComponents/ChatDatapoints.mjs +1 -0
- package/dist/components/AgentChat/ChatComponents/ChatResponseMarkdown.mjs +1 -0
- package/dist/components/AgentChat/ChatComponents/CopyableTableContainer.mjs +1 -1
- package/dist/components/AgentChat/ChatComponents/MarkdownContent.mjs +1 -1
- package/dist/components/AgentChat/ChatComponents/MessageBubble.mjs +1 -1
- package/dist/components/AgentChat/ChatComponents/StreamingBubble.mjs +1 -1
- package/dist/components/AgentChat/WidgetParts/WidgetBody.mjs +1 -1
- package/dist/components/NexusOrbit.mjs +7 -0
- package/dist/components/ProcessSteps.mjs +1 -0
- package/dist/generated/version.mjs +1 -1
- package/dist/index.d.ts +173 -7
- package/dist/index.mjs +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.mjs +2 -0
- package/dist/utils/chatDatapoints.mjs +1 -0
- package/dist/utils/chatTableHtml.mjs +1 -0
- package/dist/utils/safeMarkdownUrl.mjs +1 -0
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useTheme as i,useMediaQuery as r,AppBar as l,Toolbar as o,IconButton as s}from"@mui/material";import c from"@mui/icons-material/ChevronLeft";import a from"@mui/icons-material/Menu";import{Box as d}from"./_Primitives/Box.mjs";import{Stack as m}from"./_Primitives/Stack.mjs";import{NexusHome as f}from"./Logo/NexusHome.mjs";import{ThemeToggle as x}from"./Theme/ThemeToggle.mjs";import h from"./Logo/NexusLogo.mjs";import{ActionBarTitle as p}from"./Typography.mjs";import{useRef as u,useState as g,useEffect as w}from"react";const y=({title:y,extraLeft:v,extraRight:C,
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useTheme as i,useMediaQuery as r,AppBar as l,Toolbar as o,IconButton as s}from"@mui/material";import c from"@mui/icons-material/ChevronLeft";import a from"@mui/icons-material/Menu";import{Box as d}from"./_Primitives/Box.mjs";import{Stack as m}from"./_Primitives/Stack.mjs";import{NexusHome as f}from"./Logo/NexusHome.mjs";import{ThemeToggle as x}from"./Theme/ThemeToggle.mjs";import h from"./Logo/NexusLogo.mjs";import{ActionBarTitle as p}from"./Typography.mjs";import{useRef as u,useState as g,useEffect as w}from"react";const y=({title:y,extraLeft:v,extraRight:C,rightActions:I,homeHref:b,showHome:j=!0,logo:z,mobileNavigation:R})=>{const k=z??e(h,{}),B=i(),L=r(B.breakpoints.up("lg")),E=u(null),[M,T]=g(49),A=u(null),S=u(null),H=u(null),O=u(null),N=u(null),$=u(null),[D,P]=g(null),[W,X]=g(null);return w(()=>{const e=E.current;if(!e)return;const n=()=>T(e.getBoundingClientRect().height);n();const t=window.ResizeObserver;if(!t)return;const i=new t(n);return i.observe(e),()=>i.disconnect()},[]),w(()=>{if(!L)return P(null),void X(null);function e(){const e=S.current,n=H.current,t=A.current,i=O.current,r=N.current,l=$.current;if(!e||!n||!t)return;const o=e.getBoundingClientRect(),s=n.getBoundingClientRect(),c=t.getBoundingClientRect();if(i){const e=i.getBoundingClientRect().width||0,n=(o.right+s.left)/2,t=o.right+e/2+8,r=s.left-e/2-8,l=Math.min(Math.max(n,t),r);P(l-c.left)}else P(null);if(r&&l){const e=r.getBoundingClientRect().width||0,n=l.getBoundingClientRect(),t=(s.right+n.left)/2,i=s.right+e/2+8,o=n.left-e/2-8,a=Math.min(Math.max(t,i),o);X(a-c.left)}else X(null)}e(),window.addEventListener("resize",e);let n=null;const t=window.ResizeObserver;return t&&(n=new t(e),A.current&&n.observe(A.current)),()=>{window.removeEventListener("resize",e),n&&n.disconnect()}},[L,v,C]),n(t,{children:[e(l,{position:"sticky",component:"header",color:"inherit",elevation:0,ref:E,sx:{zIndex:{xs:B.zIndex.appBar,sm:B.zIndex.drawer+1},[B.breakpoints.up("sm")]:{position:"fixed"}},children:n(o,{variant:"dense",sx:{display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:{lg:"center"},py:{xs:.5,lg:0}},children:[n(m,{direction:"row",sx:{display:{xs:"grid",sm:"none"},gridTemplateColumns:"minmax(72px, 1fr) minmax(0, auto) minmax(72px, 1fr)",alignItems:"center",width:"100%",minHeight:40,"& .MuiIconButton-root":{padding:"4px"},"& svg":{fontSize:"1.1rem"}},children:[e(d,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:R&&e(s,{ref:R.buttonRef,onClick:R.onToggle,size:"small","aria-label":R.open?"Close navigation":"Open navigation","aria-expanded":R.open,children:R.open?e(c,{fontSize:"small"}):e(a,{fontSize:"small"})})}),e(p,{noWrap:!0,sx:{minWidth:0,textAlign:"center",overflow:"hidden",textOverflow:"ellipsis"},children:y}),n(m,{direction:"row",sx:{justifyContent:"flex-end",alignItems:"center"},children:[I,j&&e(f,{href:b}),e(x,{})]})]}),(v||C)&&n(m,{direction:"row",sx:{display:{xs:"flex",sm:"none"},justifyContent:"center",alignItems:"center",gap:1,width:"100%",mt:1},children:[v,C]}),n(m,{sx:{display:{xs:"none",sm:"flex",lg:"none"},width:"100%"},spacing:.5,children:[n(m,{direction:"row",sx:{alignItems:"center",width:"100%"},children:[e(d,{sx:{flex:1,display:"flex",alignItems:"center"},children:e(d,{sx:{height:"38px",pt:.5},children:k})}),e(p,{children:y}),n(m,{direction:"row",sx:{flex:1,justifyContent:"flex-end",alignItems:"center",gap:1},children:[I,j&&e(f,{href:b}),e(x,{})]})]}),(v||C)&&n(m,{direction:"row",sx:{justifyContent:"center",alignItems:"center",gap:2,pb:.5},children:[v&&e(d,{children:v}),C&&e(d,{children:C})]})]}),e(d,{sx:{display:{xs:"none",lg:"block"},width:"100%"},children:n(d,{sx:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%",position:"relative"},ref:A,children:[e(d,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-start"},children:e(d,{sx:{height:"38px",pt:.5},ref:S,children:k})}),e(d,{sx:{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,right:0,pointerEvents:"none"},children:e(d,{sx:{pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:H,children:e(p,{children:y})})})}),e(d,{sx:{display:v?"block":"none",position:"absolute",left:null!=D?`${D}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:O,children:v})}),e(d,{sx:{display:C?"block":"none",position:"absolute",left:null!=W?`${W}px`:void 0,transform:"translateX(-50%)",pointerEvents:"auto",textAlign:"center"},children:e(d,{ref:N,children:C})}),e(d,{sx:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-end"},children:n(d,{sx:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:1},ref:$,children:[I,j&&e(f,{href:b}),e(x,{})]})})]})})]})}),e(d,{sx:{display:{xs:"none",sm:"block"},height:`${M}px`,flexShrink:0}})]})};export{y as ActionBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,jsx as e,Fragment as t}from"react/jsx-runtime";import{useState as i}from"react";import{useTheme as n,useMediaQuery as r,Popover as s}from"@mui/material";import l from"@mui/icons-material/CloseFullscreen";import a from"@mui/icons-material/GridView";import m from"@mui/icons-material/History";import{AgentChatWindow as p}from"./AgentChatWindow.mjs";import{ChatHistory as c}from"./ChatHistory.mjs";import{Dialog as d}from"../_Primitives/Dialog.mjs";import{Box as h}from"../_Primitives/Box.mjs";import{Stack as
|
|
1
|
+
import{jsxs as o,jsx as e,Fragment as t}from"react/jsx-runtime";import{useState as i}from"react";import{useTheme as n,useMediaQuery as r,Popover as s}from"@mui/material";import l from"@mui/icons-material/CloseFullscreen";import a from"@mui/icons-material/GridView";import m from"@mui/icons-material/History";import{AgentChatWindow as p}from"./AgentChatWindow.mjs";import{ChatHistory as c}from"./ChatHistory.mjs";import{Dialog as d}from"../_Primitives/Dialog.mjs";import{Box as h}from"../_Primitives/Box.mjs";import{Stack as u}from"../_Primitives/Stack.mjs";import{IconButton as C}from"../Buttons/IconButton.mjs";import{AiChip as f}from"../AiChip.mjs";import{H1 as g,H2 as v}from"../Typography.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material/styles";import"../Theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"./ChatComponents/MarkdownContent.mjs";import"../../node_modules/dompurify/dist/purify.es.mjs";import"../MetricStat.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"../Code.mjs";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import x from"./ChatComponents/SuggestedPrompts.mjs";import w from"./ChatComponents/MessageList.mjs";function S({open:S,onClose:y,title:b="Ask Nexus",subtitle:j="Ready to help",placeholder:A,suggestedPrompts:k=[],showAiChip:I=!0,isTyping:T,messages:z,streamingText:D,liveTraceEvents:P,showActivity:U=!1,onSend:E,onStop:O,onFeedback:L,followUpPrompts:N,followUpLabel:B="Suggested follow-ups:",topOffset:F,conversations:M,activeConversationId:_,onSelectConversation:H,onDeleteConversation:W,onNewConversation:X,agents:$,activeAgentId:G,onSelectAgent:R}){const V=n(),q=r(V.breakpoints.down("md")),[J,K]=i(!1),[Q,Y]=i(!1),[Z,oo]=i(null),eo=z.length>0||T,to=void 0!==M,io=F?`calc(100vh - ${F}px)`:"100vh",no=o(u,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[I&&e(f,{}),to&&q&&e(C,{title:"Chat history",size:"small",onClick:()=>K(o=>!o),children:e(m,{sx:{fontSize:18}})}),e(C,{title:"Close full view",size:"small",onClick:y,children:e(l,{sx:{fontSize:16}})})]}),ro=eo?e(w,{messages:z,isTyping:T,streamingText:D,liveTraceEvents:P,showActivity:U,onFeedback:L}):o(u,{direction:"column",sx:{gap:4,alignItems:"center"},children:[e(g,{children:b}),e(v,{sx:{color:"text.secondary"},children:j})]}),so=!eo&&k.length>0?o(t,{children:[e(C,{title:"Open prompt gallery",ariaLabel:"Open prompt gallery",size:"small",sx:{color:"text.jades"},onClick:o=>oo(o.currentTarget),children:e(a,{sx:{fontSize:18}})}),e(s,{open:Boolean(Z),anchorEl:Z,onClose:()=>oo(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:e(h,{sx:{p:2,maxWidth:360},children:e(x,{prompts:k,onSelect:o=>{oo(null),E(o)}})})})]}):void 0;return o(d,{open:S,fullScreen:!0,onClose:y,sx:F?{top:`${F}px`}:void 0,children:[o(h,{sx:{display:"flex",height:io,overflow:"hidden"},children:[to&&e(h,{sx:{display:{xs:"none",md:"flex"},flexShrink:0},children:e(c,{conversations:M,activeConversationId:_??null,onSelectConversation:H??(()=>{}),onDeleteConversation:W,onNewConversation:X,agents:$,activeAgentId:G,onSelectAgent:R,isCollapsed:Q,onToggleCollapse:()=>Y(o=>!o)})}),e(p,{title:b,subtitle:j,showAiChip:!1,headerActions:no,isEmpty:!eo,body:ro,followUpPrompts:N,onSelectFollowUp:E,followUpLabel:B,onSend:E,isStreaming:T,onStop:O,inputPlaceholder:A,inputActions:so})]}),to&&q&&o(t,{children:[J&&e(h,{onClick:()=>K(!1),sx:{position:"absolute",inset:0,zIndex:9,bgcolor:"rgba(0,0,0,0.45)"}}),e(h,{sx:{position:"absolute",top:0,left:0,bottom:0,width:288,zIndex:10,bgcolor:"background.paper",boxShadow:4,display:"flex",flexDirection:"column",overflow:"hidden",transform:J?"translateX(0)":"translateX(-100%)",transition:"transform 0.25s ease"},children:e(c,{conversations:M,activeConversationId:_??null,onSelectConversation:o=>{H?.(o),K(!1)},onDeleteConversation:W,onNewConversation:X?()=>{X(),K(!1)}:void 0,agents:$,activeAgentId:G,onSelectAgent:R,onClose:()=>K(!1)})})]})]})}export{S as AgentChatDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useState as i,useRef as
|
|
1
|
+
import{jsx as r,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useState as i,useRef as o,useEffect as n}from"react";import{Box as s}from"../_Primitives/Box.mjs";import{Stack as m}from"../_Primitives/Stack.mjs";import{Caption as a}from"../Typography.mjs";import{Paper as l}from"../_Primitives/Paper.mjs";import{ChatInput as c}from"./ChatInput.mjs";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material";import"@mui/material/styles";import"../Theme/tokens.mjs";import"./ChatComponents/ChatAvatar.mjs";import"./ChatComponents/MarkdownContent.mjs";import"../../node_modules/dompurify/dist/purify.es.mjs";import"../MetricStat.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"../Code.mjs";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import p from"./ChatComponents/SuggestedPrompts.mjs";import{AgentChatWindowHeader as u}from"./AgentChatWindowHeader.mjs";const d=({title:d="Nexus AI Chat",subtitle:h="Your intelligent assistant",showAiChip:f=!0,headerActions:x,body:C,followUpLabel:y="Suggested follow-ups:",followUpPrompts:b,onSelectFollowUp:g,onSend:w,inputDisabled:S=!1,inputPlaceholder:j="Ask me anything...",isStreaming:A=!1,onStop:k,inputActions:D,inputRef:M,inputLabel:v="Message",isEmpty:T=!1,inputSx:P,sx:I})=>{const[R,U]=i(!1),E=o(0),L=o(0),Y=o(0),_=o(null),H=Boolean(b&&b.length>0&&g);n(()=>{T&&(U(!1),E.current=0,L.current=0)},[T]);const W=r(c,{onSend:w,disabled:S,placeholder:j,isStreaming:A,onStop:k,actions:D,inputRef:M,label:v});return t(s,{sx:[{display:"flex",flex:1,flexDirection:"column",minWidth:0,minHeight:0,height:"100%"},...Array.isArray(I)?I:I?[I]:[]],onWheelCapture:()=>{Y.current=Date.now()},onTouchStartCapture:r=>{_.current=r.touches[0]?.clientY??null},onTouchMoveCapture:r=>{const t=r.touches[0]?.clientY;void 0!==t&&null!==_.current&&Math.abs(t-_.current)>1&&(Y.current=Date.now(),_.current=t)},onScrollCapture:r=>{const t=r.target;if(!(t instanceof HTMLElement))return;if("true"!==t.dataset.agentChatScrollContainer)return;const e=t.scrollTop,i=e-E.current;if(E.current=e,e<=0)return L.current=0,void U(!1);Date.now()-Y.current>250?L.current=0:(Math.sign(i)!==Math.sign(L.current)?L.current=i:L.current+=i,L.current>=12?(U(!0),L.current=0):L.current<=-12&&(U(!1),L.current=0))},children:[r(s,{sx:{display:{xs:R?"none":"block",sm:"block"},flexShrink:0},children:r(u,{title:d,subtitle:h,showAiChip:f,actions:x})}),T?t(l,{sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",px:2,pb:4},children:[C,r(s,{sx:[{mt:3,width:"100%"},...Array.isArray(P)?P:P?[P]:[]],children:W})]}):t(e,{children:[r(l,{"data-agent-chat-scroll-container":"true",sx:{borderRadius:0,border:"none",flex:1,display:"flex",flexDirection:"column",overflowY:"scroll"},children:C}),H&&t(m,{direction:{xs:"column",md:"row"},spacing:1,sx:{px:2,py:1,justifyContent:{xs:"center",sm:"flex-end"},alignItems:"center"},children:[r(a,{sx:{display:"block",mb:1},children:y}),r(p,{prompts:b??[],onSelect:g})]}),r(l,{sx:{borderRadius:0,border:"none"},children:r(s,{sx:[{p:2,flexShrink:0},...Array.isArray(P)?P:P?[P]:[]],children:W})})]})]})};export{d as AgentChatWindow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Alert as i}from"../../_Primitives/Alert.mjs";import{Box as t}from"../../_Primitives/Box.mjs";import{Paper as o}from"../../_Primitives/Paper.mjs";import{Stack as n}from"../../_Primitives/Stack.mjs";import{Caption as s}from"../../Typography.mjs";const a={chart:"This chart couldn't be displayed.",mermaid:"This diagram couldn't be displayed."},m=m=>"notice"===m.variant?e(n,{spacing:.5,role:"status",children:e(s,{children:m.kind&&a[m.kind]||"This content couldn't be displayed."})}):r(n,{spacing:1,role:"status",children:[e(i,{severity:"warning",children:m.reason||m.defaultReason||"This rich response could not be rendered safely."}),e(o,{variant:"outlined",component:"pre",sx:{p:1.5,overflowX:"auto",whiteSpace:"pre-wrap"},children:e(t,{component:"code",children:m.rawSource})})]});export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as t,jsx as r}from"react/jsx-runtime";import{Box as e}from"../../_Primitives/Box.mjs";import{Stack as l}from"../../_Primitives/Stack.mjs";import{Card as i}from"../../Card.mjs";import{MetricStat as a}from"../../MetricStat.mjs";import{H4 as o,Caption as n}from"../../Typography.mjs";import{columnsForItemCount as m,formatDatapointValue as s,formatDatapointDelta as p,deltaColorForPolarity as d}from"../../../utils/chatDatapoints.mjs";const u={p:.5,"&:last-child":{pb:.5}},c=({datapoints:c})=>{if(!c||!Array.isArray(c.items)||0===c.items.length)return null;const{items:f}=c,h=f.map(t=>[t.period,t.source].filter(Boolean).join(" · ")),g=f.length>1&&h.every(t=>t&&t===h[0])?h[0]:null,x=m(f.length);return t(l,{spacing:1,role:"group","aria-label":c.title||"Key figures",children:[c.title?r(o,{children:c.title}):null,g?r(n,{children:g}):null,r(e,{"data-testid":"datapoints-grid",sx:{display:"grid",gap:1.5,alignItems:"stretch",gridTemplateColumns:{xs:"repeat(auto-fill, minmax(140px, 1fr))",sm:`repeat(${x}, minmax(0, 1fr))`}},children:f.map((e,l)=>{const o=s(e.value,e.valueFormat,{currency:e.currency,unit:e.unit}),m=p(e.delta,e),c=d(e.delta,e.polarity),f=h[l],x=Boolean(f)&&!g;return t(i,{sx:{flexGrow:1},contentSx:u,children:[r(a,{label:e.label,value:o,delta:m||void 0,deltaColor:c}),x?r(n,{children:f}):null]},`${e.label}-${l}`)})})]})};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useMemo as r}from"react";import{Box as e}from"../../_Primitives/Box.mjs";import{Link as o}from"../../_Primitives/Link.mjs";import{safeMarkdownUrl as n}from"../../../utils/safeMarkdownUrl.mjs";import{splitRawHtmlTables as m,sanitizeRawHtmlTable as a}from"../../../utils/chatTableHtml.mjs";import{CopyableTableContainer as i}from"./CopyableTableContainer.mjs";import l from"./ChatContentFallback.mjs";import c,{chatWindowMarkdownComponents as s}from"./MarkdownContent.mjs";const h={img:({alt:r})=>t(e,{component:"span",children:r?`[Image omitted: ${r}]`:"[Image omitted]"}),a:({href:r,children:m})=>{const a=n(r);if(!a)return t(e,{component:"span",children:m});const i=a.startsWith("#");return t(o,{href:a,openInNewTab:!i,rel:i?void 0:"noopener noreferrer",children:m})}},p=({html:e})=>{const o=r(()=>{try{return{html:a(e),reason:null}}catch{return{html:null,reason:"The raw HTML table could not be rendered safely."}}},[e]);return o.html?t(i,{sanitizedHtml:o.html}):t(l,{variant:"diagnostic",reason:o.reason,rawSource:e})},u=({content:o,highlightQuery:n,compact:a=!1,components:i})=>{const u=r(()=>m(o),[o]),d={...a||n?{}:s,...h,...i};return t(e,{sx:{color:"text.primary"},children:u.map(r=>"html-table"===r.type?t(p,{html:r.html},r.key):"fallback"===r.type?t(l,{variant:"diagnostic",reason:r.reason,rawSource:r.rawSource},r.key):r.content?t(c,{content:r.content,highlightQuery:n,compact:a,components:d},r.key):null)})};export{u as default,h as safeChatMarkdownComponents};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as o}from"react";import l from"@mui/icons-material/Check";import
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as o,useMemo as n,createElement as i}from"react";import l from"@mui/icons-material/Check";import a from"@mui/icons-material/ContentCopy";import c from"@mui/icons-material/Download";import s from"@mui/icons-material/ArrowUpward";import d from"@mui/icons-material/ArrowDownward";import{Box as m}from"../../_Primitives/Box.mjs";import{Stack as p}from"../../_Primitives/Stack.mjs";import{Table as u,TableHead as f,TableRow as h,TableCell as y,TableBody as x}from"../../_Primitives/Table.mjs";import{ButtonBase as b}from"../../Buttons/ButtonBase.mjs";import{SecondaryButton as w}from"../../Buttons/SecondaryButton.mjs";const S=e=>e.replace(/\s+/g," ").trim(),g=e=>e?Array.from(e.querySelectorAll("table")).map(e=>Array.from(e.querySelectorAll("tr")).map(e=>Array.from(e.querySelectorAll("th, td")).map(e=>(e=>{const t=S(e||"");return/[",\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t})(e.textContent||"")).join(",")).filter(Boolean).join("\r\n")).filter(Boolean).join("\r\n\r\n"):"",C=(e,t)=>{if(3===e.nodeType)return e.textContent;if(1!==e.nodeType)return null;const r=e,o=r.tagName.toLowerCase();return["br","strong","em","code"].includes(o)?i(o,{key:t},...Array.from(r.childNodes,C)):r.textContent},A=({children:i,table:A,sanitizedHtml:v})=>{const[j,B]=r(!1),[T,q]=r(null),$=o(null),k=n(()=>v?(e=>{if("undefined"==typeof DOMParser)return null;const t=(new DOMParser).parseFromString(e,"text/html").querySelector("table");if(!t)return null;const r=e=>Array.from(e.cells,e=>({content:Array.from(e.childNodes,C),sortText:S(e.textContent||""),colSpan:e.colSpan,rowSpan:e.rowSpan,scope:e.getAttribute("scope")||void 0,header:"TH"===e.tagName})),o=Array.from(t.tHead?.rows||[]),n=[...Array.from(t.tBodies).flatMap(e=>Array.from(e.rows)),...Array.from(t.children).filter(e=>"TR"===e.tagName)],i=!o.length&&n[0]?.querySelector("th")?n.shift():void 0,l=o[0]||i||n.shift();return l?{headers:r(l),rows:[...o.slice(1),...n].map(r),footer:Array.from(t.tFoot?.rows||[],r),caption:t.caption?.textContent||void 0}:null})(v):null,[v]),z=A||k,D=n(()=>z&&T?z.rows.map((e,t)=>({row:e,index:t})).sort((e,t)=>{const r=e.row[T.column]?.sortText||"",o=t.row[T.column]?.sortText||"",n=r.localeCompare(o,void 0,{sensitivity:"base"});return("asc"===T.direction?n:-n)||e.index-t.index}).map(({row:e})=>e):z?.rows||[],[z,T]),L=(e,r)=>e.map((e,o)=>t(y,{colSpan:e.colSpan,rowSpan:e.rowSpan,component:e.header?"th":"td",scope:e.scope,sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:e.content},`${r}-${o}`));return e(m,{sx:{my:1},children:[e(p,{direction:"row",sx:{justifyContent:"flex-end",gap:1,mb:.5},children:[t(w,{size:"small",startIcon:t(j?l:a,{sx:{fontSize:14}}),onClick:async()=>{const e=(t=$.current)?Array.from(t.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?t.map(e=>{const r=null!==e.closest("thead")||e===t[0]&&null!==e.querySelector("th"),o=Array.from(e.querySelectorAll("th, td")).map(e=>S(e.textContent||"")),n="| "+o.join(" | ")+" |";return r?n+"\n| "+o.map(()=>"---").join(" | ")+" |":n}).join("\n"):""}).filter(Boolean).join("\n\n"):"";var t;const r=(e=>e?Array.from(e.querySelectorAll("table")).map(e=>{const t=Array.from(e.querySelectorAll("tr"));return t.length?`<table style="border-collapse:collapse;border:1px solid #d0d7de;">${t.map(e=>`<tr>${Array.from(e.querySelectorAll("th, td")).map(e=>{const t="th"===e.tagName.toLowerCase()?"th":"td";return`<${t} style="border:1px solid #d0d7de;padding:6px 10px;text-align:left;">${S(e.textContent||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</${t}>`}).join("")}</tr>`).join("")}</table>`:""}).filter(Boolean).join("<br>"):"")($.current);await(async(e,t)=>{if(navigator.clipboard?.write&&"undefined"!=typeof ClipboardItem)try{const r={"text/plain":new Blob([t||""],{type:"text/plain"})};return e&&(r["text/html"]=new Blob([e],{type:"text/html"})),void await navigator.clipboard.write([new ClipboardItem(r)])}catch{}t&&await navigator.clipboard.writeText(t)})(r,e),B(!0),setTimeout(()=>B(!1),2e3)},title:j?"Table copied":"Copy table","aria-label":j?"Table copied to clipboard":"Copy table",children:j?"Copied":"Copy table"}),t(w,{size:"small",startIcon:t(c,{sx:{fontSize:14}}),onClick:()=>{const e=g($.current);if(!e)return;((e,t)=>{if(!e)return;const r=new Blob(["\ufeff",e],{type:"text/csv;charset=utf-8;"}),o=URL.createObjectURL(r),n=document.createElement("a");n.href=o,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(o)})(e,`nexus-table-${(new Date).toISOString().slice(0,19).replace(/[:T]/g,"-")}.csv`)},title:"Download CSV","aria-label":"Download table as CSV",children:"CSV"})]}),t(m,{ref:$,sx:{overflowX:"auto",width:"100%",maxWidth:"100%"},children:z?e(u,{sx:{width:"100%",minWidth:"max-content",borderCollapse:"collapse"},children:[z.caption?t("caption",{children:z.caption}):null,t(f,{children:t(h,{children:z.headers.map((r,o)=>t(y,{component:"th",scope:"col",colSpan:r.colSpan,rowSpan:r.rowSpan,"aria-sort":T?.column===o?"asc"===T.direction?"ascending":"descending":void 0,sx:{border:"1px solid",borderColor:"divider",bgcolor:"action.hover",px:1.25,py:.75,fontWeight:600,textAlign:"left"},children:e(b,{onClick:()=>{return e=o,q(t=>t?.column!==e?{column:e,direction:"asc"}:"asc"===t.direction?{column:e,direction:"desc"}:null);var e},"aria-label":`Sort by ${r.sortText}${T?.column===o?", "+("asc"===T.direction?"ascending":"descending"):""}`,sx:{width:"100%",justifyContent:"flex-start",textAlign:"left",font:"inherit",fontWeight:"inherit",color:"inherit",gap:.5,"&.Mui-focusVisible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}},children:[r.content,t(m,{component:"span","aria-hidden":"true",sx:{display:"inline-flex",flex:"0 0 14px",width:14,height:14,visibility:T?.column===o?"visible":"hidden"},children:T?.column===o&&("asc"===T.direction?t(s,{sx:{fontSize:14}}):t(d,{sx:{fontSize:14}}))})]})},o))})}),e(x,{children:[D.map((e,r)=>t(h,{children:L(e,r)},r)),z.footer?.map((e,r)=>t(h,{children:L(e,r)},`footer-${r}`))]})]}):i})]})};export{A as CopyableTableContainer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as t,isValidElement as n,cloneElement as o,createElement as i}from"react";import l from"react-markdown";import c from"remark-gfm";import{Box as d}from"../../_Primitives/Box.mjs";import{Paper as p}from"../../_Primitives/Paper.mjs";import{ChatWindowBody as m,H4 as a,H3 as h}from"../../Typography.mjs";import{Code as s}from"../../Code.mjs";import{CopyableTableContainer as f}from"./CopyableTableContainer.mjs";const g=(r,t)=>{const n=t?.trim();if(!n)return r;const o=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(n)})`,"ig");return r.split(o).map((r,t)=>{if(!r)return null;return r.toLowerCase()===n.toLowerCase()?e(d,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:r},`${r}-${t}`):r})},u=(e,r)=>{if("string"==typeof e)return g(e,r);if("number"==typeof e)return g(e.toString(),r);if(Array.isArray(e))return e.map(e=>u(e,r));if(n(e)){const t=e.props.children;return void 0===t?e:o(e,void 0,u(t,r))}return e},y=r({}),x=e=>"text"===e.type?e.value:"children"in e?e.children.map(x).join(""):"",b=(e,r,t)=>{if("text"===e.type)return e.value;if("element"!==e.type)return null;const n=r[e.tagName]||e.tagName,o="string"==typeof n?{...e.properties,key:t}:{...e.properties,key:t,node:e};return i(n,o,...e.children.map((e,t)=>b(e,r,t)))},v=e=>"element"===e.type,S=(e,r)=>{const t=e.children.filter(v),n=t.find(e=>"thead"===e.tagName),o=t.find(e=>"tbody"===e.tagName),i=t.find(e=>"tfoot"===e.tagName),l=e=>e?.children.filter(v).filter(e=>"tr"===e.tagName).map(e=>e.children.filter(v).filter(e=>"th"===e.tagName||"td"===e.tagName).map(e=>((e,r)=>({content:e.children.map((e,t)=>b(e,r,t)),sortText:e.children.map(x).join("").replace(/\s+/g," ").trim(),colSpan:"number"==typeof e.properties.colSpan?e.properties.colSpan:void 0,rowSpan:"number"==typeof e.properties.rowSpan?e.properties.rowSpan:void 0}))(e,r)))||[],c=l(n),d=l(o);return{headers:c[0]||d.shift()||[],rows:[...c.slice(1),...d],footer:l(i)}},C=({node:r})=>{const n=t(y);return r?e(f,{table:S(r,n)}):null},w={table:C,p:({children:r})=>e(m,{sx:{mb:1,"&:last-child":{mb:0}},children:r}),li:({children:r})=>e(m,{component:"li",children:r}),strong:({children:r})=>e(d,{component:"strong",sx:{fontWeight:700,fontSize:"inherit",lineHeight:"inherit"},children:r}),em:({children:r})=>e(d,{component:"em",sx:{fontStyle:"italic",fontSize:"inherit",lineHeight:"inherit"},children:r})},j=({content:r,highlightQuery:t,compact:n=!1,components:o})=>{const i=e=>u(e,t),f=n?"0.875rem":void 0,g={...{p:({children:r})=>e(m,{sx:{mb:1,"&:last-child":{mb:0},fontSize:f},children:i(r)}),strong:({children:r})=>e(d,{component:"strong",sx:{fontWeight:700},children:i(r)}),em:({children:r})=>e(d,{component:"em",sx:{fontStyle:"italic"},children:i(r)}),ul:({children:r})=>e(d,{component:"ul",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"disc"},children:i(r)}),ol:({children:r})=>e(d,{component:"ol",sx:{pl:2.5,my:2,display:"grid",gap:.5,listStyleType:"decimal"},children:i(r)}),li:({children:r})=>e(m,{component:"li",sx:{fontSize:f},children:i(r)}),h1:({children:r})=>e(h,{sx:{mb:1,mt:.5},children:i(r)}),h2:({children:r})=>e(a,{sx:{mb:.5,mt:.5},children:i(r)}),h3:({children:r})=>e(a,{sx:{mb:.5,mt:.5},children:i(r)}),code:({children:r})=>e(s,{children:i(r)}),pre:({children:r})=>e(p,{component:"pre",variant:"outlined",sx:{my:2,p:1.5,overflowX:"auto",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',fontSize:"0.75rem",lineHeight:1.5,bgcolor:"action.hover"},children:i(r)}),hr:()=>e(d,{component:"hr",sx:{my:3,border:0,borderTop:1,borderColor:"divider"}}),table:C,th:({children:r})=>e(d,{component:"th",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left",bgcolor:"action.hover",fontWeight:600},children:r}),td:({children:r})=>e(d,{component:"td",sx:{border:"1px solid",borderColor:"divider",px:1.25,py:.75,textAlign:"left"},children:r})},...o};return e(y.Provider,{value:g,children:e(l,{remarkPlugins:[c],components:g,children:r})})};export{w as chatWindowMarkdownComponents,j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as r}from"react";import t from"@mui/icons-material/ExpandMore";import n from"@mui/icons-material/ExpandLess";import i from"@mui/icons-material/Download";import a from"../AgentActivity/AgentActivity.mjs";import{Box as l}from"../../_Primitives/Box.mjs";import{Stack as c}from"../../_Primitives/Stack.mjs";import{GhostButton as s}from"../../Buttons/GhostButton.mjs";import{SecondaryButton as m}from"../../Buttons/SecondaryButton.mjs";import d from"./
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as r}from"react";import t from"@mui/icons-material/ExpandMore";import n from"@mui/icons-material/ExpandLess";import i from"@mui/icons-material/Download";import a from"../AgentActivity/AgentActivity.mjs";import{Box as l}from"../../_Primitives/Box.mjs";import{Stack as c}from"../../_Primitives/Stack.mjs";import{GhostButton as s}from"../../Buttons/GhostButton.mjs";import{SecondaryButton as m}from"../../Buttons/SecondaryButton.mjs";import d from"./ChatResponseMarkdown.mjs";import p from"./MessageFeedbackBar.mjs";import{ChatWindowBody as f}from"../../Typography.mjs";import{colours as h}from"../../Theme/tokens.mjs";const g=({block:i})=>{const[a,c]=r(!1),m=i.language?.trim()||"text",d=i.content||"";if(!d.trim())return null;const p=Boolean(i.title);return o(l,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,overflow:"hidden",mb:1,"&:last-child":{mb:0}},children:[p&&o(s,{onClick:()=>c(e=>!e),"aria-expanded":a,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",px:1.5,py:.75,bgcolor:"action.hover",borderBottom:a?"1px solid":"none",borderColor:"divider"},children:[e(l,{component:"span",sx:{fontSize:"0.8rem",fontWeight:600,color:"text.secondary"},children:i.title}),e(l,{component:"span","aria-hidden":"true",sx:{display:"inline-flex",alignItems:"center",color:"text.secondary"},children:e(a?n:t,{sx:{fontSize:16}})})]}),(!p||a)&&e(l,{component:"pre",sx:{m:0,p:1.5,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"0.8125rem",fontFamily:'"SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", monospace',lineHeight:1.5,bgcolor:"action.hover"},children:e(l,{component:"code",className:`language-${m}`,children:d})})]})},u=({file:o,onDownloadFile:t})=>{const[n,a]=r(!1);return e(m,{size:"small",startIcon:e(i,{}),onClick:async()=>{if(t){a(!0);try{await t(o)}finally{a(!1)}}},disabled:n||!t,children:n?"Preparing…":o.downloadLabel||o.displayName||"Download file"})},x=(o,r)=>{const t=r?.trim();if(!t)return o;const n=new RegExp(`(${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t)})`,"ig");return o.split(n).map((o,r)=>{if(!o)return null;return o.toLowerCase()===t.toLowerCase()?e(l,{component:"mark",sx:{backgroundColor:e=>"dark"===e.palette.mode?"rgba(255, 214, 10, 0.35)":"rgba(255, 214, 10, 0.45)",color:"inherit",borderRadius:.5,px:.25,py:0},children:o},`${o}-${r}`):o})},y=({message:r,highlightQuery:t,showActivity:n=!1,onFeedback:i,onDownloadFile:s,contentRenderer:m,markdownComponents:y,compact:b=!1})=>{const w="user"===r.role,k=!w&&r.codeBlocks&&r.codeBlocks.length>0,v=!w&&r.files&&r.files.length>0;return e(l,{sx:{display:"flex",justifyContent:w?"flex-end":"flex-start"},children:o(l,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0,...w?{}:{flex:1}},children:[!w&&n&&r.traceEvents&&r.traceEvents.length>0&&e(a,{isStreaming:!1,traceEvents:r.traceEvents,latency:r.latency,activitySummary:r.activitySummary,compact:!0}),o(l,{sx:{borderRadius:w?"1rem 0.25rem 1rem 1rem":"0.25rem 1rem 1rem 1rem",px:1.75,py:1.25,bgcolor:w?h.jadeLight:"background.default",color:w?h.black:"text.primary",border:"none"},children:[k&&e(c,{spacing:0,sx:{mb:1.5},children:r.codeBlocks.map((o,r)=>e(g,{block:o},r))}),w?e(f,{sx:{whiteSpace:"pre-wrap",fontSize:b?"0.875rem":void 0},children:x(r.content,t)}):e("div",{className:"message-content",children:m?m(r.content):e(d,{content:r.content,highlightQuery:t,compact:b,components:y})}),v&&e(c,{direction:"row",spacing:1,sx:{mt:1.5,flexWrap:"wrap"},children:r.files.map((o,r)=>e(u,{file:o,onDownloadFile:s},`${o.bucket}-${o.key}-${r}`))})]}),!w&&i&&e(p,{message:r,onFeedback:i})]})})};export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as t,Fragment as r}from"react/jsx-runtime";import e from"../AgentActivity/AgentActivity.mjs";import{Box as n}from"../../_Primitives/Box.mjs";import{Stack as o}from"../../_Primitives/Stack.mjs";import{Caption as a}from"../../Typography.mjs";import c from"./
|
|
1
|
+
import{jsxs as i,jsx as t,Fragment as r}from"react/jsx-runtime";import e from"../AgentActivity/AgentActivity.mjs";import{Box as n}from"../../_Primitives/Box.mjs";import{Stack as o}from"../../_Primitives/Stack.mjs";import{Caption as a}from"../../Typography.mjs";import c from"./ChatResponseMarkdown.mjs";import{latestTraceLabel as m}from"./latestTraceLabel.mjs";const s=()=>t(n,{sx:{display:"inline-block",width:"2px",height:16,bgcolor:"primary.main",verticalAlign:"text-bottom",animation:"pulse 1.2s ease-in-out infinite","@keyframes pulse":{"0%, 100%":{opacity:.35},"50%":{opacity:1}}}}),l=({text:l,traceEvents:p,highlightQuery:g,avatarIcon:h,compact:d=!1,showActivity:x=!1})=>i(o,{direction:"row",spacing:1,sx:{justifyContent:"flex-start"},children:[h&&t(n,{sx:{mt:.25,flexShrink:0},children:h}),t(o,{spacing:1,sx:{flex:1,minWidth:0},children:x?i(r,{children:[t(e,{isStreaming:!0,traceEvents:p}),l&&i(n,{sx:{borderRadius:"0.25rem 1rem 1rem 1rem",bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[t(c,{content:l,highlightQuery:g,compact:d}),t(s,{})]})]}):t(r,{children:l?i(n,{sx:{borderRadius:"0.25rem 1rem 1rem 1rem",bgcolor:"background.default",color:"text.primary",px:1.75,py:1.25,lineHeight:1.6},children:[t(c,{content:l,highlightQuery:g,compact:d}),t(s,{})]}):t(n,{sx:{bgcolor:"background.default",px:1.75,py:1.25},children:t(o,{direction:"row",spacing:1,sx:{alignItems:"center"},children:i(o,{direction:"row",spacing:.5,children:[t(a,{children:p.length>0?`Agent is working... ${m(p)}`:"Agent is working..."}),[0,150,300].map(i=>t(n,{component:"span",sx:{bgcolor:"primary.main",animation:"bounce 1s ease-in-out infinite",animationDelay:`${i}ms`,"@keyframes bounce":{"0%, 80%, 100%":{opacity:.35,transform:"translateY(0)"},"40%":{opacity:1,transform:"translateY(-1px)"}}}},i))]})})})})})]});export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Box as i}from"../../_Primitives/Box.mjs";import"react";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/material";import"@mui/material/styles";import"../../Theme/tokens.mjs";import"../ChatComponents/ChatAvatar.mjs";import"
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Box as i}from"../../_Primitives/Box.mjs";import"react";import"@mui/icons-material/Check";import"@mui/icons-material/ContentCopy";import"@mui/icons-material/Download";import"@mui/icons-material/ArrowUpward";import"@mui/icons-material/ArrowDownward";import"@mui/material";import"@mui/material/styles";import"../../Theme/tokens.mjs";import"../ChatComponents/ChatAvatar.mjs";import"../ChatComponents/MarkdownContent.mjs";import"../../../node_modules/dompurify/dist/purify.es.mjs";import"../../Typography.mjs";import"../../MetricStat.mjs";import"@mui/icons-material/ExpandMore";import"@mui/icons-material/ExpandLess";import"@mui/icons-material/CheckCircle";import"@mui/icons-material/OpenInNew";import"../../Code.mjs";import"@mui/icons-material/ThumbUp";import"@mui/icons-material/ThumbDown";import m from"../ChatComponents/MessageList.mjs";import o from"../ChatComponents/EmptyState.mjs";const e=({avatarIcon:e,isTyping:r,liveTraceEvents:a,messages:s,showActivity:n,streamingText:p,emptyTitle:c,emptyDescription:l,dataSources:u,suggestedPrompts:d,onSend:h})=>{const C=s.length>0||r;return t(i,{sx:{flex:"1 1 0",minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:C?t(m,{messages:s,isTyping:r,streamingText:p,liveTraceEvents:a,avatarIcon:e,showActivity:n,compact:!0}):t(o,{title:c,description:l,dataSources:u,prompts:d.slice(0,4),avatarIcon:e,onSelect:h})})};export{e as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{keyframes as o,alpha as t}from"@mui/material/styles";import a from"@mui/material/useMediaQuery";import{Box as i}from"./_Primitives/Box.mjs";import{Stack as s}from"./_Primitives/Stack.mjs";import{NexusNodeIcon as n}from"./Logo/NexusNodeIcon.mjs";import{colours as d}from"./Theme/tokens.mjs";import{useTokens as l}from"./Theme/useTokens.mjs";import{Caption as m}from"./Typography.mjs";const b=o`
|
|
2
|
+
from { transform: rotate(var(--orbit-angle)); }
|
|
3
|
+
to { transform: rotate(calc(var(--orbit-angle) + 360deg)); }
|
|
4
|
+
`,c=o`
|
|
5
|
+
from { transform: translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle))); }
|
|
6
|
+
to { transform: translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle) - 360deg)); }
|
|
7
|
+
`,p=({labels:o,core:p,"aria-label":u,sx:g})=>{const x=l(),f=a("(prefers-reduced-motion: reduce)",{noSsr:!0}),h=o.slice(0,6),j={position:"absolute",borderRadius:"50%",border:`1px solid ${x.border}`};return r(i,{...u?{role:"img","aria-label":`${u}: ${h.join(", ")}`}:{"aria-hidden":!0},sx:[{position:"relative",aspectRatio:"1",width:"100%",maxWidth:450},...Array.isArray(g)?g:g?[g]:[]],children:[e(i,{"data-testid":"nexus-orbit-halo",sx:{position:"absolute",inset:"18%",borderRadius:"50%",backgroundColor:t(d.brilliantGreen,.07),filter:"blur(26px)"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...j,inset:"8%"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...j,inset:"22%",borderStyle:"dashed"}}),e(i,{"data-testid":"nexus-orbit-ring",sx:{...j,inset:"36%",borderColor:d.jade}}),e(i,{"data-testid":"nexus-orbit-core",sx:{position:"absolute",inset:"41%",display:"grid",placeItems:"center",border:`1px solid ${d.jade}`,borderRadius:"24%",backgroundColor:x.background.paper,boxShadow:x.shadow,transform:"rotate(45deg)"},children:e(i,{sx:{display:"grid",placeItems:"center",transform:"rotate(-45deg)"},children:p??e(n,{size:"lg",tone:"brand"})})}),h.map((o,t)=>{const a=360*t/h.length-35;return e(i,{"data-testid":"nexus-orbit-track",sx:{"--orbit-angle":`${a}deg`,position:"absolute",inset:"8%",transform:"rotate(var(--orbit-angle))",animation:f?"none":`${b} 46s linear infinite`,"@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:e(i,{sx:{position:"absolute",left:"50%",top:0},children:r(s,{direction:"row","data-testid":"nexus-orbit-label",sx:{position:"absolute",alignItems:"center",gap:1,px:1.875,py:1.25,border:`1px solid ${x.border}`,borderRadius:"30px",backgroundColor:x.background.paper,boxShadow:x.shadow,whiteSpace:"nowrap",transform:"translate(-50%, -50%) rotate(calc(0deg - var(--orbit-angle)))",animation:f?"none":`${c} 46s linear infinite`,"@media (prefers-reduced-motion: reduce)":{animation:"none"}},children:[e(i,{sx:{width:6,height:6,borderRadius:"50%",backgroundColor:d.jade}}),e(m,{sx:{fontSize:11,letterSpacing:"0.05em"},children:o})]})})},`${t}-${o}`)})]})};p.displayName="NexusOrbit";export{p as NexusOrbit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alpha as r}from"@mui/material/styles";import t from"@mui/icons-material/ArrowDownwardRounded";import a from"@mui/icons-material/ArrowForwardRounded";import{Box as o}from"./_Primitives/Box.mjs";import{Stack as s}from"./_Primitives/Stack.mjs";import{Caption as n,H3 as m,Body2 as d}from"./Typography.mjs";const l=({steps:l,"aria-label":p,headingLevel:c=3,sx:h})=>e(o,{component:"ol","aria-label":p,sx:[e=>({listStyle:"none",m:0,p:0,width:"100%",maxWidth:1100,mx:"auto",display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:`repeat(${l.length}, minmax(0, 1fr))`},columnGap:e.spacing(10),rowGap:{xs:e.spacing(6),md:0},alignItems:"start",textAlign:"left"}),...Array.isArray(h)?h:h?[h]:[]],children:l.map(({icon:p,title:h,description:x},g)=>i(o,{component:"li",sx:{position:"relative",minWidth:0},children:[i(s,{sx:{gap:1},children:[i(s,{direction:"row",sx:{gap:1.25,alignItems:"center"},children:[e(o,{"aria-hidden":"true",sx:e=>({width:40,height:40,display:"grid",placeItems:"center",borderRadius:1.75,flexShrink:0,backgroundColor:r(e.palette.primary.main,"dark"===e.palette.mode?.22:.12)}),children:e(p,{sx:{fontSize:22,color:"primary.main"}})}),i(s,{sx:{minWidth:0},children:[i(n,{children:["Step ",g+1]}),e(m,{component:`h${c}`,sx:{overflowWrap:"anywhere"},children:h})]})]}),e(d,{sx:{overflowWrap:"anywhere"},children:x})]}),g<l.length-1&&i(o,{"aria-hidden":"true","data-testid":"process-steps-connector",sx:e=>({position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",color:"primary.main",top:{xs:"100%",md:0},left:{xs:0,md:"100%"},width:{xs:"100%",md:e.spacing(10)},height:{xs:e.spacing(6),md:40}}),children:[e(a,{"data-testid":"process-steps-arrow-right",sx:{display:{xs:"none",md:"block"}}}),e(t,{"data-testid":"process-steps-arrow-down",sx:{display:{xs:"block",md:"none"}}})]})]},g))});l.displayName="ProcessSteps";export{l as ProcessSteps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="2.9.
|
|
1
|
+
const o="2.9.12";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -330,9 +330,26 @@ declare const chatHistoryMatchesQuery: (conversation: ChatHistoryConversation, q
|
|
|
330
330
|
declare const filterChatHistoryConversations: <TConversation extends ChatHistoryConversation>(conversations: TConversation[], query: string) => TConversation[];
|
|
331
331
|
|
|
332
332
|
interface CopyableTableContainerProps {
|
|
333
|
-
children
|
|
334
|
-
|
|
335
|
-
|
|
333
|
+
children?: ReactNode;
|
|
334
|
+
table?: ChatTableData;
|
|
335
|
+
/** HTML must be sanitized by the caller before it reaches this prop. */
|
|
336
|
+
sanitizedHtml?: string;
|
|
337
|
+
}
|
|
338
|
+
interface ChatTableCell {
|
|
339
|
+
content: ReactNode;
|
|
340
|
+
sortText: string;
|
|
341
|
+
colSpan?: number;
|
|
342
|
+
rowSpan?: number;
|
|
343
|
+
scope?: string;
|
|
344
|
+
header?: boolean;
|
|
345
|
+
}
|
|
346
|
+
interface ChatTableData {
|
|
347
|
+
headers: ChatTableCell[];
|
|
348
|
+
rows: ChatTableCell[][];
|
|
349
|
+
footer?: ChatTableCell[][];
|
|
350
|
+
caption?: ReactNode;
|
|
351
|
+
}
|
|
352
|
+
declare const CopyableTableContainer: ({ children, table, sanitizedHtml, }: CopyableTableContainerProps) => react.JSX.Element;
|
|
336
353
|
|
|
337
354
|
interface ChatAvatarProps {
|
|
338
355
|
size?: "sm" | "md" | "lg";
|
|
@@ -351,6 +368,61 @@ interface MarkdownContentProps {
|
|
|
351
368
|
declare const chatWindowMarkdownComponents: Partial<Components>;
|
|
352
369
|
declare const MarkdownContent: ({ content, highlightQuery, compact, components: extraComponents, }: MarkdownContentProps) => react.JSX.Element;
|
|
353
370
|
|
|
371
|
+
interface ChatResponseMarkdownProps {
|
|
372
|
+
content: string;
|
|
373
|
+
highlightQuery?: string;
|
|
374
|
+
compact?: boolean;
|
|
375
|
+
components?: Partial<Components>;
|
|
376
|
+
}
|
|
377
|
+
declare const safeChatMarkdownComponents: Partial<Components>;
|
|
378
|
+
declare const ChatResponseMarkdown: ({ content, highlightQuery, compact, components, }: ChatResponseMarkdownProps) => react.JSX.Element;
|
|
379
|
+
|
|
380
|
+
type ChatDatapointValueFormat = "number" | "currency" | "percentage" | "duration";
|
|
381
|
+
type ChatDatapointPolarity = "higher_is_better" | "lower_is_better" | "neutral";
|
|
382
|
+
interface ChatDatapointDelta {
|
|
383
|
+
value: number;
|
|
384
|
+
valueFormat: ChatDatapointValueFormat;
|
|
385
|
+
comparison?: string | null;
|
|
386
|
+
}
|
|
387
|
+
interface ChatDatapointItem {
|
|
388
|
+
label: string;
|
|
389
|
+
value: number;
|
|
390
|
+
valueFormat: ChatDatapointValueFormat;
|
|
391
|
+
currency?: string | null;
|
|
392
|
+
unit?: string | null;
|
|
393
|
+
delta?: ChatDatapointDelta | null;
|
|
394
|
+
polarity?: ChatDatapointPolarity | null;
|
|
395
|
+
period?: string | null;
|
|
396
|
+
source?: string | null;
|
|
397
|
+
}
|
|
398
|
+
interface ChatDatapointsData {
|
|
399
|
+
schemaVersion?: string;
|
|
400
|
+
title?: string | null;
|
|
401
|
+
items: ChatDatapointItem[];
|
|
402
|
+
}
|
|
403
|
+
declare const columnsForItemCount: (count: number, maxColumns?: number) => number;
|
|
404
|
+
declare const formatDatapointValue: (value: unknown, valueFormat: ChatDatapointValueFormat, { currency, unit }?: Pick<ChatDatapointItem, "currency" | "unit">) => string;
|
|
405
|
+
declare const formatDatapointDelta: (delta: ChatDatapointDelta | null | undefined, item?: Pick<ChatDatapointItem, "currency" | "unit">) => string | null;
|
|
406
|
+
declare const deltaColorForPolarity: (delta: {
|
|
407
|
+
value: number;
|
|
408
|
+
} | null | undefined, polarity: ChatDatapointPolarity | null | undefined) => string | undefined;
|
|
409
|
+
|
|
410
|
+
interface ChatDatapointsProps {
|
|
411
|
+
datapoints: ChatDatapointsData | null;
|
|
412
|
+
}
|
|
413
|
+
declare const ChatDatapoints: ({ datapoints }: ChatDatapointsProps) => react.JSX.Element | null;
|
|
414
|
+
|
|
415
|
+
type ChatContentFallbackProps = {
|
|
416
|
+
variant: "notice";
|
|
417
|
+
kind?: "chart" | "mermaid";
|
|
418
|
+
} | {
|
|
419
|
+
variant: "diagnostic";
|
|
420
|
+
reason?: string | null;
|
|
421
|
+
rawSource: string;
|
|
422
|
+
defaultReason?: string;
|
|
423
|
+
};
|
|
424
|
+
declare const ChatContentFallback: (props: ChatContentFallbackProps) => react.JSX.Element;
|
|
425
|
+
|
|
354
426
|
interface MessageBubbleProps {
|
|
355
427
|
message: ChatMessage;
|
|
356
428
|
highlightQuery?: string;
|
|
@@ -359,7 +431,7 @@ interface MessageBubbleProps {
|
|
|
359
431
|
onFeedback?: (messageId: string, rating: "positive" | "negative", comment?: string) => void;
|
|
360
432
|
/** Called when the user clicks a file download button */
|
|
361
433
|
onDownloadFile?: (file: FileArtifact) => Promise<void>;
|
|
362
|
-
/** Replaces the default
|
|
434
|
+
/** Replaces the default ChatResponseMarkdown renderer — use for custom chart/rich content */
|
|
363
435
|
contentRenderer?: (content: string) => React.ReactNode;
|
|
364
436
|
/** Override or extend individual markdown element renderers */
|
|
365
437
|
markdownComponents?: Partial<Components>;
|
|
@@ -684,6 +756,7 @@ interface ActionBarProps {
|
|
|
684
756
|
title?: ReactNode;
|
|
685
757
|
extraLeft?: ReactNode;
|
|
686
758
|
extraRight?: ReactNode;
|
|
759
|
+
rightActions?: ReactNode;
|
|
687
760
|
homeHref?: string;
|
|
688
761
|
showHome?: boolean;
|
|
689
762
|
logo?: ReactNode;
|
|
@@ -693,7 +766,7 @@ interface ActionBarProps {
|
|
|
693
766
|
buttonRef?: Ref<HTMLButtonElement>;
|
|
694
767
|
};
|
|
695
768
|
}
|
|
696
|
-
declare const ActionBar: ({ title, extraLeft, extraRight, homeHref, showHome, logo, mobileNavigation, }: ActionBarProps) => ReactElement;
|
|
769
|
+
declare const ActionBar: ({ title, extraLeft, extraRight, rightActions, homeHref, showHome, logo, mobileNavigation, }: ActionBarProps) => ReactElement;
|
|
697
770
|
|
|
698
771
|
interface AccordionGroupProps {
|
|
699
772
|
children: ReactNode;
|
|
@@ -1410,6 +1483,69 @@ declare namespace NexusHeatmap {
|
|
|
1410
1483
|
var displayName: string;
|
|
1411
1484
|
}
|
|
1412
1485
|
|
|
1486
|
+
interface ProcessStep {
|
|
1487
|
+
/** Icon component (e.g. an `@mui/icons-material` icon), rendered in a tinted tile. */
|
|
1488
|
+
icon: typeof SvgIcon;
|
|
1489
|
+
title: string;
|
|
1490
|
+
description: string;
|
|
1491
|
+
}
|
|
1492
|
+
interface ProcessStepsProps {
|
|
1493
|
+
steps: ProcessStep[];
|
|
1494
|
+
/** Accessible name for the list, e.g. "How citizen developers build on Nexus". */
|
|
1495
|
+
"aria-label": string;
|
|
1496
|
+
/** Heading level of each step title, so the list fits the host page outline. Defaults to 3. */
|
|
1497
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
1498
|
+
sx?: SxProps<Theme>;
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* A static, numbered sequence of process steps joined by arrow connectors.
|
|
1502
|
+
* Not a progress control: there is no active or completed state and nothing is
|
|
1503
|
+
* interactive. For stepping through a flow use `Stepper`.
|
|
1504
|
+
*
|
|
1505
|
+
* Steps sit in one row with right arrows from `md` up and stack with down
|
|
1506
|
+
* arrows below it. Connectors live inside each `<li>` (so the `<ol>` holds only
|
|
1507
|
+
* list items), are `aria-hidden`, and are absolutely positioned in the grid gap.
|
|
1508
|
+
*
|
|
1509
|
+
* ```tsx
|
|
1510
|
+
* <ProcessSteps
|
|
1511
|
+
* aria-label="How it works"
|
|
1512
|
+
* steps={[{ icon: SearchIcon, title: "Discover", description: "Find a use case." }]}
|
|
1513
|
+
* />
|
|
1514
|
+
* ```
|
|
1515
|
+
*/
|
|
1516
|
+
declare const ProcessSteps: {
|
|
1517
|
+
({ steps, "aria-label": ariaLabel, headingLevel, sx, }: ProcessStepsProps): react.JSX.Element;
|
|
1518
|
+
displayName: string;
|
|
1519
|
+
};
|
|
1520
|
+
|
|
1521
|
+
interface NexusOrbitProps {
|
|
1522
|
+
/** Node labels in order, spaced evenly around the orbit. Designed for 3 to 6; anything past 6 is ignored. */
|
|
1523
|
+
labels: string[];
|
|
1524
|
+
/** Replaces the centre graphic. Defaults to `NexusNodeIcon` (lg, brand). */
|
|
1525
|
+
core?: ReactNode;
|
|
1526
|
+
/**
|
|
1527
|
+
* Makes the orbit meaningful to assistive tech: the root becomes an image named
|
|
1528
|
+
* `<aria-label>: <label>, <label>, ...`. Omit it and the orbit is decorative (`aria-hidden`).
|
|
1529
|
+
*/
|
|
1530
|
+
"aria-label"?: string;
|
|
1531
|
+
sx?: SxProps<Theme>;
|
|
1532
|
+
}
|
|
1533
|
+
/**
|
|
1534
|
+
* A square, container-scaled orbit graphic: a soft halo and three concentric rings around a
|
|
1535
|
+
* rotated rounded-square core, with labelled nodes that circle slowly while their text stays upright.
|
|
1536
|
+
*
|
|
1537
|
+
* Under `prefers-reduced-motion: reduce` nothing animates; nodes sit at their angles.
|
|
1538
|
+
* There is no pause control, so keep it to a single decorative hero use.
|
|
1539
|
+
*
|
|
1540
|
+
* ```tsx
|
|
1541
|
+
* <NexusOrbit labels={["DATA", "AGENTS", "TRUST", "VALUE"]} />
|
|
1542
|
+
* ```
|
|
1543
|
+
*/
|
|
1544
|
+
declare const NexusOrbit: {
|
|
1545
|
+
({ labels, core, "aria-label": ariaLabel, sx, }: NexusOrbitProps): react.JSX.Element;
|
|
1546
|
+
displayName: string;
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1413
1549
|
declare const getFaviconUrls: (versioned?: boolean) => {
|
|
1414
1550
|
svg: string;
|
|
1415
1551
|
ico: string;
|
|
@@ -1521,6 +1657,36 @@ type ThemeModeProviderProps = PropsWithChildren<{
|
|
|
1521
1657
|
}>;
|
|
1522
1658
|
declare const ThemeModeProvider: ({ children, defaultMode, mode: legacyInitialMode, storageKey, onModeChange, }: ThemeModeProviderProps) => react.JSX.Element;
|
|
1523
1659
|
|
|
1660
|
+
type ChatTablePart = {
|
|
1661
|
+
type: "markdown";
|
|
1662
|
+
content: string;
|
|
1663
|
+
key: string;
|
|
1664
|
+
} | {
|
|
1665
|
+
type: "html-table";
|
|
1666
|
+
html: string;
|
|
1667
|
+
key: string;
|
|
1668
|
+
} | {
|
|
1669
|
+
type: "fallback";
|
|
1670
|
+
rawSource: string;
|
|
1671
|
+
reason: string;
|
|
1672
|
+
key: string;
|
|
1673
|
+
};
|
|
1674
|
+
interface TableSanitizerConfig {
|
|
1675
|
+
ALLOWED_TAGS: string[];
|
|
1676
|
+
ALLOWED_ATTR: string[];
|
|
1677
|
+
ALLOW_ARIA_ATTR: false;
|
|
1678
|
+
ALLOW_DATA_ATTR: false;
|
|
1679
|
+
}
|
|
1680
|
+
interface TableHtmlPurifier {
|
|
1681
|
+
sanitize: (html: string, config: TableSanitizerConfig) => string;
|
|
1682
|
+
}
|
|
1683
|
+
declare const sanitizeRawHtmlTable: (html: string, { purifier }?: {
|
|
1684
|
+
purifier?: TableHtmlPurifier;
|
|
1685
|
+
}) => string;
|
|
1686
|
+
declare const splitRawHtmlTables: (text: string) => ChatTablePart[];
|
|
1687
|
+
|
|
1688
|
+
declare const safeMarkdownUrl: (href: unknown) => string | null;
|
|
1689
|
+
|
|
1524
1690
|
declare function formatSurnameFirstname(name: string | null): string | null;
|
|
1525
1691
|
|
|
1526
1692
|
declare const getFiscalPeriod: (date: Date) => {
|
|
@@ -1556,5 +1722,5 @@ declare const getGradientBorderStyles: (theme: Theme, options?: GradientBorderOp
|
|
|
1556
1722
|
declare const leftPipe: SxProps<Theme>;
|
|
1557
1723
|
declare const expandableText: (isExpanded: boolean) => SxProps<Theme>;
|
|
1558
1724
|
|
|
1559
|
-
export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatDialog, AgentChatWidget, AgentChatWindow, AgentChatWindowHeader, AiButton, AiButtonTile, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Box, Breadcrumbs, ButtonBase, ButtonTile, Caption, Card, ChatAvatar, ChatHistory, ChatHistoryAgentItem, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatWindowBody, Checkbox, CheckboxGroup, Chip, CircularProgress, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, DeltaChip, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormDialog, FormGroup, GhostButton, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MetricCard, MetricStat, MetricValue, MuiAppThemeProvider, NEXUS_THEME_STORAGE_KEY, NexusBarChart, NexusDataGrid, NexusHeatmap, NexusHome, NexusLineChart, NexusLogo, NexusNodeIcon, NexusPieChart, NexusScatterChart, NexusiFrame, NotificationBell, NotificationListItem, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, RagChip, RagDot, SageLogoSvg, SearchInput, SecondaryButton, SecondaryButtonLink, SegmentedControl, Select, SelectableList, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, Slider, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Table, TableBody, TableCell, TableHead, TableRow, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, createSageTheme, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, ragColorForDelta, useThemeMode, useTokens };
|
|
1560
|
-
export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, ActivitySummary, AgentChatDialogProps, AgentChatWidgetProps, AgentChatWindowHeaderProps, AgentChatWindowProps, AiButtonProps, AiButtonTileProps, AiCardProps, AiChipProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, AvatarProps, AvatarSize, AvatarVariant, BreadcrumbItem, BreadcrumbsProps, ButtonTileProps, CardProps, CardTrend, ChartAsyncProps, ChatAvatarProps, ChatHistoryAgent, ChatHistoryAgentItemProps, ChatHistoryButtonBaseProps, ChatHistoryConversation, ChatHistoryHeaderProps, ChatHistoryProps, ChatInputProps, ChatMessage, CodeBlock, CopyableTableContainerProps, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, DeltaChipProps, DeltaChipTone, EmptyStateProps, FABButtonProps, FileArtifact, FormDialogProps, GhostButtonProps, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageFeedbackBarProps, MessageListProps, MetricCardProps, MetricStatProps, MetricValueSize, ModeTokens, NexusBarChartProps, NexusHeatmapAxisItem, NexusHeatmapCell, NexusHeatmapProps, NexusHeatmapStatus, NexusLineChartProps, NexusNodeIconProps, NexusNodeIconSize, NexusNodeIconTone, NexusPieChartProps, NexusScatterChartProps, NexusiFrameProps, NotificationBellProps, NotificationListItemProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, SecondaryButtonLinkProps, SecondaryButtonProps, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SelectableListItem, SelectableListProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SliderMarkOption, SliderProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, ThemeModeContextValue, ThemeModeProviderProps, TooltipProps, TraceEvent, TypingIndicatorProps };
|
|
1725
|
+
export { AccordionGroup, AccordionGroupItem, AccordionSingle, ActionBar, ActionBarTitle, AgentChatDialog, AgentChatWidget, AgentChatWindow, AgentChatWindowHeader, AiButton, AiButtonTile, AiCard, AiChip, AiGlassCard, AiGlassPaper, AiPaper, Alert, Avatar, Body1, Body2, Box, Breadcrumbs, ButtonBase, ButtonTile, Caption, Card, ChatAvatar, ChatContentFallback, ChatDatapoints, ChatHistory, ChatHistoryAgentItem, ChatHistoryButtonBase, ChatHistoryHeader, ChatInput, ChatResponseMarkdown, ChatWindowBody, Checkbox, CheckboxGroup, Chip, CircularProgress, Code, Collapse, Container, CopyableTableContainer, DateRangeFilter, DateRangePicker, DeltaChip, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, EmptyState, FABButton, FaviconLinks, FormControlLabel, FormDialog, FormGroup, GhostButton, GlassCard, GlassPaper, GlassPaperAsync, GreenWaveBackground, Grid, H1, H2, H3, H4, IconButton, Link, LoadingSpinnerNexus, LocationMultiSelect, LogoOptions, MarkdownContent, MessageBubble, MessageFeedbackBar, MessageList, MetricCard, MetricStat, MetricValue, MuiAppThemeProvider, NEXUS_THEME_STORAGE_KEY, NexusBarChart, NexusDataGrid, NexusHeatmap, NexusHome, NexusLineChart, NexusLogo, NexusNodeIcon, NexusOrbit, NexusPieChart, NexusScatterChart, NexusiFrame, NotificationBell, NotificationListItem, Paper, PaperAsync, PrimaryButton, PrimaryButtonLink, ProcessSteps, RagChip, RagDot, SageLogoSvg, SearchInput, SecondaryButton, SecondaryButtonLink, SegmentedControl, Select, SelectableList, SideBlade, SideBladeNavList, SideBladeNavListItem, Skeleton, SkillChip, SkipLink, Slider, SourceCitations, Span, Stack, StatusBadge, StatusChip, StreamingBubble, SuggestedPrompts, Switch, Tab, Table, TableBody, TableCell, TableHead, TableRow, Tabs, TextField, ThemeModeContext, ThemeModeProvider, ThemeToggle, Tooltip, TypingIndicator, chatHistoryMatchesQuery, chatWindowMarkdownComponents, colours, columnsForItemCount, createSageTheme, deltaColorForPolarity, expandableText, filterChatHistoryConversations, fontSageHeadline, fontSageText, fontSageUI, formatDatapointDelta, formatDatapointValue, formatDate, formatSurnameFirstname, getFaviconUrls, getFiscalPeriod, getGradientBorderStyles, getModeTokens, gradients, latestTraceLabel, leftPipe, ragColorForDelta, safeChatMarkdownComponents, safeMarkdownUrl, sanitizeRawHtmlTable, splitRawHtmlTables, useThemeMode, useTokens };
|
|
1726
|
+
export type { AccordionGroupItemProps, AccordionGroupProps, AccordionSingleProps, ActivitySummary, AgentChatDialogProps, AgentChatWidgetProps, AgentChatWindowHeaderProps, AgentChatWindowProps, AiButtonProps, AiButtonTileProps, AiCardProps, AiChipProps, AiGlassCardProps, AiGlassPaperProps, AiPaperProps, AvatarProps, AvatarSize, AvatarVariant, BreadcrumbItem, BreadcrumbsProps, ButtonTileProps, CardProps, CardTrend, ChartAsyncProps, ChatAvatarProps, ChatContentFallbackProps, ChatDatapointDelta, ChatDatapointItem, ChatDatapointPolarity, ChatDatapointValueFormat, ChatDatapointsData, ChatDatapointsProps, ChatHistoryAgent, ChatHistoryAgentItemProps, ChatHistoryButtonBaseProps, ChatHistoryConversation, ChatHistoryHeaderProps, ChatHistoryProps, ChatInputProps, ChatMessage, ChatResponseMarkdownProps, ChatTableCell, ChatTableData, ChatTablePart, CodeBlock, CopyableTableContainerProps, DateRangeFilterProps, DateRangePickerProps, DateRangePreset, DateRangeValue, DeltaChipProps, DeltaChipTone, EmptyStateProps, FABButtonProps, FileArtifact, FormDialogProps, GhostButtonProps, GlassCardProps, GlassPaperAsyncProps, GlassPaperProps, GradientBorderOptions, GreenWaveBackgroundProps, IconButtonProps, IconButtonVariant, LatencyMetrics, LinkProps, LoadingSpinnerNexusProps, MarkdownContentProps, MessageBubbleProps, MessageFeedbackBarProps, MessageListProps, MetricCardProps, MetricStatProps, MetricValueSize, ModeTokens, NexusBarChartProps, NexusHeatmapAxisItem, NexusHeatmapCell, NexusHeatmapProps, NexusHeatmapStatus, NexusLineChartProps, NexusNodeIconProps, NexusNodeIconSize, NexusNodeIconTone, NexusOrbitProps, NexusPieChartProps, NexusScatterChartProps, NexusiFrameProps, NotificationBellProps, NotificationListItemProps, PaperAsyncProps, ParsedActivity, PrimaryButtonLinkProps, PrimaryButtonProps, ProcessStep, ProcessStepsProps, SecondaryButtonLinkProps, SecondaryButtonProps, SegmentedControlOption, SegmentedControlProps, SelectOption, SelectProps, SelectableListItem, SelectableListProps, SideBladeNavItem, SideBladeNavListItemProps, SideBladeNavListProps, SideBladeProps, SkeletonProps, SkipLinkProps, SliderMarkOption, SliderProps, SourceCitationsProps, StatusBadgeProps, StatusBadgeVariant, StreamingBubbleProps, SuggestedPromptsProps, ThemeMode, ThemeModeContextValue, ThemeModeProviderProps, TooltipProps, TraceEvent, TypingIndicatorProps };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DateRangeFilter}from"./components/DateRangeFilter.mjs";export{DateRangePicker}from"./components/DateRangePicker.mjs";export{Alert}from"./components/_Primitives/Alert.mjs";export{AgentChatWidget}from"./components/AgentChat/AgentChatWidget.mjs";export{AgentChatDialog}from"./components/AgentChat/AgentChatDialog.mjs";export{FABButton}from"./components/AgentChat/FABButton.mjs";export{AgentChatWindow}from"./components/AgentChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/AgentChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/AgentChat/ChatInput.mjs";export{ChatHistory}from"./components/AgentChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/AgentChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/AgentChat/ChatHistoryButtonBase.mjs";export{ChatHistoryAgentItem}from"./components/AgentChat/ChatHistoryAgentItem.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/AgentChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/AgentChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/AgentChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/AgentChat/ChatComponents/MarkdownContent.mjs";export{default as MessageBubble}from"./components/AgentChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/AgentChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/AgentChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/AgentChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/AgentChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/AgentChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/AgentChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/AgentChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/AgentChat/ChatComponents/latestTraceLabel.mjs";export{Code}from"./components/Code.mjs";export{Container}from"./components/_Primitives/Container.mjs";export{Grid}from"./components/_Primitives/Grid.mjs";export{Link}from"./components/_Primitives/Link.mjs";export{Select}from"./components/Select.mjs";export{SkipLink}from"./components/SkipLink.mjs";export{StatusBadge}from"./components/StatusBadge.mjs";export{SegmentedControl}from"./components/SegmentedControl.mjs";export{Breadcrumbs}from"./components/Breadcrumbs.mjs";export{Switch}from"./components/_Primitives/Switch.mjs";export{Slider}from"./components/Slider.mjs";export{NotificationBell}from"./components/NotificationBell.mjs";export{NotificationListItem}from"./components/NotificationListItem.mjs";export{ActionBarTitle,Body1,Body2,Caption,ChatWindowBody,H1,H2,H3,H4,MetricValue,Span}from"./components/Typography.mjs";export{MetricStat}from"./components/MetricStat.mjs";export{MetricCard}from"./components/MetricCard.mjs";export{ActionBar}from"./components/ActionBar.mjs";export{AccordionGroup,AccordionGroupItem}from"./components/AccordionGroup.mjs";export{AccordionSingle}from"./components/AccordionSingle.mjs";export{AiButton}from"./components/Buttons/AiButton.mjs";export{AiChip}from"./components/AiChip.mjs";export{AiCard}from"./components/AiCard.mjs";export{AiGlassCard}from"./components/AiGlassCard.mjs";export{AiPaper}from"./components/AiPaper.mjs";export{AiGlassPaper}from"./components/AiGlassPaper.mjs";export{Box}from"./components/_Primitives/Box.mjs";export{CircularProgress}from"./components/_Primitives/CircularProgress.mjs";export{Collapse}from"./components/_Primitives/Collapse.mjs";export{NexusDataGrid}from"./components/NexusDataGrid.mjs";export{ButtonBase}from"./components/Buttons/ButtonBase.mjs";export{AiButtonTile,ButtonTile}from"./components/ButtonTile.mjs";export{GhostButton}from"./components/Buttons/GhostButton.mjs";export{SelectableList}from"./components/Buttons/SelectableList.mjs";export{Card}from"./components/Card.mjs";export{Checkbox}from"./components/Forms/Checkbox.mjs";export{FormControlLabel}from"./components/Forms/FormControlLabel.mjs";export{FormGroup}from"./components/Forms/FormGroup.mjs";export{CheckboxGroup}from"./components/Forms/CheckboxGroup.mjs";export{FormDialog}from"./components/Forms/FormDialog.mjs";export{Chip}from"./components/_Primitives/Chip.mjs";export{DeltaChip}from"./components/DeltaChip.mjs";export{Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle}from"./components/_Primitives/Dialog.mjs";export{Divider}from"./components/_Primitives/Divider.mjs";export{Table,TableBody,TableCell,TableHead,TableRow}from"./components/_Primitives/Table.mjs";export{GlassCard}from"./components/GlassCard.mjs";export{GlassPaper}from"./components/GlassPaper.mjs";export{GlassPaperAsync}from"./components/GlassPaperAsync.mjs";export{PaperAsync}from"./components/PaperAsync.mjs";export{GreenWaveBackground}from"./components/GreenWaveBackground.mjs";export{IconButton}from"./components/Buttons/IconButton.mjs";export{Avatar}from"./components/Avatar.mjs";export{LoadingSpinnerNexus}from"./components/LoadingSpinnerNexus.mjs";export{LocationMultiSelect}from"./components/LocationMultiSelect.mjs";export{LogoOptions}from"./components/Logo/LogoOptions/index.mjs";export{NexusHome}from"./components/Logo/NexusHome.mjs";export{default as NexusLogo}from"./components/Logo/NexusLogo.mjs";export{NexusNodeIcon}from"./components/Logo/NexusNodeIcon.mjs";export{SageLogoSvg}from"./components/Logo/LogoOptions/SageLogo.mjs";export{Paper}from"./components/_Primitives/Paper.mjs";export{PrimaryButton}from"./components/Buttons/PrimaryButton.mjs";export{PrimaryButtonLink}from"./components/Buttons/PrimaryButtonLink.mjs";export{SecondaryButton}from"./components/Buttons/SecondaryButton.mjs";export{RagDot}from"./components/RagDot.mjs";export{RagChip}from"./components/RagChip.mjs";export{ragColorForDelta}from"./components/ragColorForDelta.mjs";export{SecondaryButtonLink}from"./components/Buttons/SecondaryButtonLink.mjs";export{SearchInput}from"./components/SearchInput.mjs";export{SideBlade}from"./components/SideBlade/SideBlade.mjs";export{SideBladeNavList}from"./components/SideBlade/SideBladeNavList.mjs";export{SideBladeNavListItem}from"./components/SideBlade/SideBladeNavListItem.mjs";export{Skeleton}from"./components/_Primitives/Skeleton.mjs";export{SkillChip}from"./components/SkillChip.mjs";export{Stack}from"./components/_Primitives/Stack.mjs";export{StatusChip}from"./components/StatusChip.mjs";export{Tab}from"./components/_Primitives/Tab.mjs";export{Tabs}from"./components/_Primitives/Tabs.mjs";export{TextField}from"./components/_Primitives/TextField.mjs";export{ThemeToggle}from"./components/Theme/ThemeToggle.mjs";export{Tooltip}from"./components/Tooltip.mjs";export{NexusiFrame}from"./components/NexusiFrame.mjs";export{NexusLineChart}from"./components/Charts/NexusLineChart.mjs";export{NexusBarChart}from"./components/Charts/NexusBarChart.mjs";export{NexusPieChart}from"./components/Charts/NexusPieChart.mjs";export{NexusScatterChart}from"./components/Charts/NexusScatterChart.mjs";export{NexusHeatmap}from"./components/Charts/NexusHeatmap.mjs";export{default as nexusLogoNode}from"./assets/images/nexus-logo-node.svg.mjs";export{default as nexusLogoFavicon}from"./assets/images/nexus-logo-favicon.svg.mjs";export{default as nexusLogoIco}from"./assets/images/favicon.ico.mjs";export{getFaviconUrls}from"./assets/images/urls.mjs";export{FaviconLinks}from"./components/FaviconLinks.mjs";export{createSageTheme}from"./components/Theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./components/Theme/tokens.mjs";export{useTokens}from"./components/Theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./components/Theme/MuiAppThemeProvider.mjs";export{NEXUS_THEME_STORAGE_KEY,ThemeModeContext,ThemeModeProvider,useThemeMode}from"./components/Theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./components/Theme/sxHelpers.mjs";export{ChartsReferenceLine}from"./node_modules/@mui/x-charts/ChartsReferenceLine/ChartsReferenceLine.mjs";
|
|
1
|
+
export{DateRangeFilter}from"./components/DateRangeFilter.mjs";export{DateRangePicker}from"./components/DateRangePicker.mjs";export{Alert}from"./components/_Primitives/Alert.mjs";export{AgentChatWidget}from"./components/AgentChat/AgentChatWidget.mjs";export{AgentChatDialog}from"./components/AgentChat/AgentChatDialog.mjs";export{FABButton}from"./components/AgentChat/FABButton.mjs";export{AgentChatWindow}from"./components/AgentChat/AgentChatWindow.mjs";export{AgentChatWindowHeader}from"./components/AgentChat/AgentChatWindowHeader.mjs";export{ChatInput}from"./components/AgentChat/ChatInput.mjs";export{ChatHistory}from"./components/AgentChat/ChatHistory.mjs";export{ChatHistoryHeader}from"./components/AgentChat/ChatHistoryHeader.mjs";export{ChatHistoryButtonBase}from"./components/AgentChat/ChatHistoryButtonBase.mjs";export{ChatHistoryAgentItem}from"./components/AgentChat/ChatHistoryAgentItem.mjs";export{chatHistoryMatchesQuery,filterChatHistoryConversations}from"./components/AgentChat/ChatHistorySearch.mjs";export{CopyableTableContainer}from"./components/AgentChat/ChatComponents/CopyableTableContainer.mjs";export{default as ChatAvatar}from"./components/AgentChat/ChatComponents/ChatAvatar.mjs";export{default as MarkdownContent,chatWindowMarkdownComponents}from"./components/AgentChat/ChatComponents/MarkdownContent.mjs";export{default as ChatResponseMarkdown,safeChatMarkdownComponents}from"./components/AgentChat/ChatComponents/ChatResponseMarkdown.mjs";export{default as ChatDatapoints}from"./components/AgentChat/ChatComponents/ChatDatapoints.mjs";export{default as ChatContentFallback}from"./components/AgentChat/ChatComponents/ChatContentFallback.mjs";export{default as MessageBubble}from"./components/AgentChat/ChatComponents/MessageBubble.mjs";export{default as MessageFeedbackBar}from"./components/AgentChat/ChatComponents/MessageFeedbackBar.mjs";export{default as StreamingBubble}from"./components/AgentChat/ChatComponents/StreamingBubble.mjs";export{default as TypingIndicator}from"./components/AgentChat/ChatComponents/TypingIndicator.mjs";export{default as SuggestedPrompts}from"./components/AgentChat/ChatComponents/SuggestedPrompts.mjs";export{default as MessageList}from"./components/AgentChat/ChatComponents/MessageList.mjs";export{default as EmptyState}from"./components/AgentChat/ChatComponents/EmptyState.mjs";export{default as SourceCitations}from"./components/AgentChat/ChatComponents/SourceCitations.mjs";export{latestTraceLabel}from"./components/AgentChat/ChatComponents/latestTraceLabel.mjs";export{Code}from"./components/Code.mjs";export{Container}from"./components/_Primitives/Container.mjs";export{Grid}from"./components/_Primitives/Grid.mjs";export{Link}from"./components/_Primitives/Link.mjs";export{Select}from"./components/Select.mjs";export{SkipLink}from"./components/SkipLink.mjs";export{StatusBadge}from"./components/StatusBadge.mjs";export{SegmentedControl}from"./components/SegmentedControl.mjs";export{Breadcrumbs}from"./components/Breadcrumbs.mjs";export{Switch}from"./components/_Primitives/Switch.mjs";export{Slider}from"./components/Slider.mjs";export{NotificationBell}from"./components/NotificationBell.mjs";export{NotificationListItem}from"./components/NotificationListItem.mjs";export{ActionBarTitle,Body1,Body2,Caption,ChatWindowBody,H1,H2,H3,H4,MetricValue,Span}from"./components/Typography.mjs";export{MetricStat}from"./components/MetricStat.mjs";export{MetricCard}from"./components/MetricCard.mjs";export{ActionBar}from"./components/ActionBar.mjs";export{AccordionGroup,AccordionGroupItem}from"./components/AccordionGroup.mjs";export{AccordionSingle}from"./components/AccordionSingle.mjs";export{AiButton}from"./components/Buttons/AiButton.mjs";export{AiChip}from"./components/AiChip.mjs";export{AiCard}from"./components/AiCard.mjs";export{AiGlassCard}from"./components/AiGlassCard.mjs";export{AiPaper}from"./components/AiPaper.mjs";export{AiGlassPaper}from"./components/AiGlassPaper.mjs";export{Box}from"./components/_Primitives/Box.mjs";export{CircularProgress}from"./components/_Primitives/CircularProgress.mjs";export{Collapse}from"./components/_Primitives/Collapse.mjs";export{NexusDataGrid}from"./components/NexusDataGrid.mjs";export{ButtonBase}from"./components/Buttons/ButtonBase.mjs";export{AiButtonTile,ButtonTile}from"./components/ButtonTile.mjs";export{GhostButton}from"./components/Buttons/GhostButton.mjs";export{SelectableList}from"./components/Buttons/SelectableList.mjs";export{Card}from"./components/Card.mjs";export{Checkbox}from"./components/Forms/Checkbox.mjs";export{FormControlLabel}from"./components/Forms/FormControlLabel.mjs";export{FormGroup}from"./components/Forms/FormGroup.mjs";export{CheckboxGroup}from"./components/Forms/CheckboxGroup.mjs";export{FormDialog}from"./components/Forms/FormDialog.mjs";export{Chip}from"./components/_Primitives/Chip.mjs";export{DeltaChip}from"./components/DeltaChip.mjs";export{Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle}from"./components/_Primitives/Dialog.mjs";export{Divider}from"./components/_Primitives/Divider.mjs";export{Table,TableBody,TableCell,TableHead,TableRow}from"./components/_Primitives/Table.mjs";export{GlassCard}from"./components/GlassCard.mjs";export{GlassPaper}from"./components/GlassPaper.mjs";export{GlassPaperAsync}from"./components/GlassPaperAsync.mjs";export{PaperAsync}from"./components/PaperAsync.mjs";export{GreenWaveBackground}from"./components/GreenWaveBackground.mjs";export{IconButton}from"./components/Buttons/IconButton.mjs";export{Avatar}from"./components/Avatar.mjs";export{LoadingSpinnerNexus}from"./components/LoadingSpinnerNexus.mjs";export{LocationMultiSelect}from"./components/LocationMultiSelect.mjs";export{LogoOptions}from"./components/Logo/LogoOptions/index.mjs";export{NexusHome}from"./components/Logo/NexusHome.mjs";export{default as NexusLogo}from"./components/Logo/NexusLogo.mjs";export{NexusNodeIcon}from"./components/Logo/NexusNodeIcon.mjs";export{SageLogoSvg}from"./components/Logo/LogoOptions/SageLogo.mjs";export{Paper}from"./components/_Primitives/Paper.mjs";export{PrimaryButton}from"./components/Buttons/PrimaryButton.mjs";export{PrimaryButtonLink}from"./components/Buttons/PrimaryButtonLink.mjs";export{SecondaryButton}from"./components/Buttons/SecondaryButton.mjs";export{RagDot}from"./components/RagDot.mjs";export{RagChip}from"./components/RagChip.mjs";export{ragColorForDelta}from"./components/ragColorForDelta.mjs";export{SecondaryButtonLink}from"./components/Buttons/SecondaryButtonLink.mjs";export{SearchInput}from"./components/SearchInput.mjs";export{SideBlade}from"./components/SideBlade/SideBlade.mjs";export{SideBladeNavList}from"./components/SideBlade/SideBladeNavList.mjs";export{SideBladeNavListItem}from"./components/SideBlade/SideBladeNavListItem.mjs";export{Skeleton}from"./components/_Primitives/Skeleton.mjs";export{SkillChip}from"./components/SkillChip.mjs";export{Stack}from"./components/_Primitives/Stack.mjs";export{StatusChip}from"./components/StatusChip.mjs";export{Tab}from"./components/_Primitives/Tab.mjs";export{Tabs}from"./components/_Primitives/Tabs.mjs";export{TextField}from"./components/_Primitives/TextField.mjs";export{ThemeToggle}from"./components/Theme/ThemeToggle.mjs";export{Tooltip}from"./components/Tooltip.mjs";export{NexusiFrame}from"./components/NexusiFrame.mjs";export{NexusLineChart}from"./components/Charts/NexusLineChart.mjs";export{NexusBarChart}from"./components/Charts/NexusBarChart.mjs";export{NexusPieChart}from"./components/Charts/NexusPieChart.mjs";export{NexusScatterChart}from"./components/Charts/NexusScatterChart.mjs";export{NexusHeatmap}from"./components/Charts/NexusHeatmap.mjs";export{ProcessSteps}from"./components/ProcessSteps.mjs";export{NexusOrbit}from"./components/NexusOrbit.mjs";export{default as nexusLogoNode}from"./assets/images/nexus-logo-node.svg.mjs";export{default as nexusLogoFavicon}from"./assets/images/nexus-logo-favicon.svg.mjs";export{default as nexusLogoIco}from"./assets/images/favicon.ico.mjs";export{getFaviconUrls}from"./assets/images/urls.mjs";export{FaviconLinks}from"./components/FaviconLinks.mjs";export{createSageTheme}from"./components/Theme/sageTheme.mjs";export{colours,fontSageHeadline,fontSageText,fontSageUI,getModeTokens,gradients}from"./components/Theme/tokens.mjs";export{useTokens}from"./components/Theme/useTokens.mjs";export{default as MuiAppThemeProvider}from"./components/Theme/MuiAppThemeProvider.mjs";export{NEXUS_THEME_STORAGE_KEY,ThemeModeContext,ThemeModeProvider,useThemeMode}from"./components/Theme/ThemeContext.mjs";export{AlertTitle,MenuItem,alpha,useMediaQuery,useTheme}from"@mui/material";export{sanitizeRawHtmlTable,splitRawHtmlTables}from"./utils/chatTableHtml.mjs";export{safeMarkdownUrl}from"./utils/safeMarkdownUrl.mjs";export{columnsForItemCount,deltaColorForPolarity,formatDatapointDelta,formatDatapointValue}from"./utils/chatDatapoints.mjs";export{formatSurnameFirstname}from"./utils/nameFormats.mjs";export{formatDate,getFiscalPeriod}from"./utils/dateFormats.mjs";export{expandableText,getGradientBorderStyles,leftPipe}from"./components/Theme/sxHelpers.mjs";export{ChartsReferenceLine}from"./node_modules/@mui/x-charts/ChartsReferenceLine/ChartsReferenceLine.mjs";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */
|
|
2
|
+
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function t(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(c=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw r}}return l}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const n=Object.entries,o=Object.setPrototypeOf,r=Object.isFrozen,i=Object.getPrototypeOf,a=Object.getOwnPropertyDescriptor;let l=Object.freeze,c=Object.seal,s=Object.create,u="undefined"!=typeof Reflect&&Reflect,f=u.apply,p=u.construct;l||(l=function(e){return e}),c||(c=function(e){return e}),f||(f=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),p||(p=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const m=L(Array.prototype.forEach),d=L(Array.prototype.lastIndexOf),h=L(Array.prototype.pop),g=L(Array.prototype.push),y=L(Array.prototype.splice),b=Array.isArray,T=L(String.prototype.toLowerCase),S=L(String.prototype.toString),E=L(String.prototype.match),A=L(String.prototype.replace),N=L(String.prototype.indexOf),_=L(String.prototype.trim),w=L(Number.prototype.toString),O=L(Boolean.prototype.toString),v="undefined"==typeof BigInt?null:L(BigInt.prototype.toString),D="undefined"==typeof Symbol?null:L(Symbol.prototype.toString),R=L(Object.prototype.hasOwnProperty),C=L(Object.prototype.toString),I=L(RegExp.prototype.test),k=(x=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(x,t)});var x;function L(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return f(e,t,o)}}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;if(o&&o(e,null),!b(t))return e;let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(r(t)||(t[i]=e),o=e)}e[o]=!0}return e}function z(e){for(let t=0;t<e.length;t++){R(e,t)||(e[t]=null)}return e}function P(e){const o=s(null);for(const i of n(e)){var r=t(i,2);const n=r[0],a=r[1];R(e,n)&&(b(a)?o[n]=z(a):a&&"object"==typeof a&&a.constructor===Object?o[n]=P(a):o[n]=a)}return o}function U(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return L(n.get);if("function"==typeof n.value)return L(n.value)}e=i(e)}return function(){return null}}const F=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),H=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),B=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=l(["#text"]),q=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),X=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=c(/{{[\w\W]*|^[\w\W]*}}/g),Z=c(/<%[\w\W]*|^[\w\W]*%>/g),J=c(/\${[\w\W]*/g),Q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),ee=c(/^aria-[\-\w]+$/),te=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ne=c(/^(?:\w+script|data):/i),oe=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),re=c(/^html$/i),ie=c(/^[a-z][.\w]*(-[.\w]+)+$/i),ae=c(/<[/\w!]/g),le=c(/<[/\w]/g),ce=c(/<\/no(script|embed|frames)/i),se=c(/\/>/i),ue=1,fe=3,pe=7,me=8,de=9,he=11,ge=function(){return"undefined"==typeof window?null:window},ye=function(e,t,n,o){return R(e,t)&&b(e[t])?M(o.base?P(o.base):{},e[t],o.transform):n};var be=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ge();const o=t=>e(t);if(o.version="3.4.13",o.removed=[],!t||!t.document||t.document.nodeType!==de||!t.Element)return o.isSupported=!1,o;let r=t.document;const i=r,a=i.currentScript;t.DocumentFragment;const u=t.HTMLTemplateElement,f=t.Node,p=t.Element,x=t.NodeFilter,L=t.NamedNodeMap;void 0===L&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const z=t.DOMParser,be=t.trustedTypes,Te=p.prototype,Se=U(Te,"cloneNode"),Ee=U(Te,"remove"),Ae=U(Te,"nextSibling"),Ne=U(Te,"childNodes"),_e=U(Te,"parentNode"),we=U(Te,"shadowRoot"),Oe=U(Te,"attributes"),ve=f&&f.prototype?U(f.prototype,"nodeType"):null,De=f&&f.prototype?U(f.prototype,"nodeName"):null,Re=f&&f.prototype?U(f.prototype,"ownerDocument"):null;if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Ce,Ie,ke="",xe=!1,Le=0;const Me=function(){if(Le>0)throw k('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ze=function(e){Me(),Le++;try{return Ce.createHTML(e)}finally{Le--}},Pe=function(){return xe||(Ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(be,a),xe=!0),Ie},Ue=r,Fe=Ue.implementation,He=Ue.createNodeIterator,je=Ue.createDocumentFragment,Be=Ue.getElementsByTagName,Ge=i.importNode;let We={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof n&&"function"==typeof _e&&Fe&&void 0!==Fe.createHTMLDocument;const Ye=V,qe=Z,Xe=J,$e=Q,Ke=ee,Ve=ne,Ze=oe,Je=ie;let Qe=te,et=null;const tt=M({},[...F,...H,...j,...G,...Y]);let nt=null;const ot=M({},[...q,...X,...$,...K]);let rt=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),it=null,at=null;const lt=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ct=!0,st=!0,ut=!1,ft=!0,pt=!1,mt=!0,dt=!1,ht=!1,gt=null,yt=null,bt=!1,Tt=!1,St=!1,Et=!1,At=!0,Nt=!1;const _t="user-content-";let wt=!0,Ot=!1,vt={},Dt=null;const Rt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ct=null;const It=M({},["audio","video","img","source","image","track"]);let kt=null;const xt=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",Mt="http://www.w3.org/2000/svg",zt="http://www.w3.org/1999/xhtml";let Pt=zt,Ut=!1,Ft=null;const Ht=M({},[Lt,Mt,zt],S),jt=l(["mi","mo","mn","ms","mtext"]);let Bt=M({},jt);const Gt=l(["annotation-xml"]);let Wt=M({},Gt);const Yt=M({},["title","style","font","a","script"]);let qt=null;const Xt=["application/xhtml+xml","text/html"];let $t=null,Kt=null;const Vt=r.createElement("form"),Zt=function(e){return e instanceof RegExp||e instanceof Function},Jt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Kt&&Kt===e)return;e&&"object"==typeof e||(e={}),e=P(e),qt=-1===Xt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,$t="application/xhtml+xml"===qt?S:T,et=ye(e,"ALLOWED_TAGS",tt,{transform:$t}),nt=ye(e,"ALLOWED_ATTR",ot,{transform:$t}),Ft=ye(e,"ALLOWED_NAMESPACES",Ht,{transform:S}),kt=ye(e,"ADD_URI_SAFE_ATTR",xt,{transform:$t,base:xt}),Ct=ye(e,"ADD_DATA_URI_TAGS",It,{transform:$t,base:It}),Dt=ye(e,"FORBID_CONTENTS",Rt,{transform:$t}),it=ye(e,"FORBID_TAGS",P({}),{transform:$t}),at=ye(e,"FORBID_ATTR",P({}),{transform:$t}),vt=!!R(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?P(e.USE_PROFILES):e.USE_PROFILES),ct=!1!==e.ALLOW_ARIA_ATTR,st=!1!==e.ALLOW_DATA_ATTR,ut=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ft=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,pt=e.SAFE_FOR_TEMPLATES||!1,mt=!1!==e.SAFE_FOR_XML,dt=e.WHOLE_DOCUMENT||!1,Tt=e.RETURN_DOM||!1,St=e.RETURN_DOM_FRAGMENT||!1,Et=e.RETURN_TRUSTED_TYPE||!1,bt=e.FORCE_BODY||!1,At=!1!==e.SANITIZE_DOM,Nt=e.SANITIZE_NAMED_PROPS||!1,wt=!1!==e.KEEP_CONTENT,Ot=e.IN_PLACE||!1,Qe=function(e){try{return I(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:te,Pt="string"==typeof e.NAMESPACE?e.NAMESPACE:zt,Bt=R(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?P(e.MATHML_TEXT_INTEGRATION_POINTS):M({},jt),Wt=R(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?P(e.HTML_INTEGRATION_POINTS):M({},Gt);const t=R(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?P(e.CUSTOM_ELEMENT_HANDLING):s(null);if(rt=s(null),R(t,"tagNameCheck")&&Zt(t.tagNameCheck)&&(rt.tagNameCheck=t.tagNameCheck),R(t,"attributeNameCheck")&&Zt(t.attributeNameCheck)&&(rt.attributeNameCheck=t.attributeNameCheck),R(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(rt.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),c(rt),pt&&(st=!1),St&&(Tt=!0),vt&&(et=M({},Y),nt=s(null),!0===vt.html&&(M(et,F),M(nt,q)),!0===vt.svg&&(M(et,H),M(nt,X),M(nt,K)),!0===vt.svgFilters&&(M(et,j),M(nt,X),M(nt,K)),!0===vt.mathMl&&(M(et,G),M(nt,$),M(nt,K))),lt.tagCheck=null,lt.attributeCheck=null,R(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?lt.tagCheck=e.ADD_TAGS:b(e.ADD_TAGS)&&(et===tt&&(et=P(et)),M(et,e.ADD_TAGS,$t))),R(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?lt.attributeCheck=e.ADD_ATTR:b(e.ADD_ATTR)&&(nt===ot&&(nt=P(nt)),M(nt,e.ADD_ATTR,$t))),R(e,"ADD_URI_SAFE_ATTR")&&b(e.ADD_URI_SAFE_ATTR)&&M(kt,e.ADD_URI_SAFE_ATTR,$t),R(e,"FORBID_CONTENTS")&&b(e.FORBID_CONTENTS)&&(Dt===Rt&&(Dt=P(Dt)),M(Dt,e.FORBID_CONTENTS,$t)),R(e,"ADD_FORBID_CONTENTS")&&b(e.ADD_FORBID_CONTENTS)&&(Dt===Rt&&(Dt=P(Dt)),M(Dt,e.ADD_FORBID_CONTENTS,$t)),wt&&(et["#text"]=!0),dt&&M(et,["html","head","body"]),et.table&&(M(et,["tbody"]),delete it.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=Ce;Ce=e.TRUSTED_TYPES_POLICY;try{ke=ze("")}catch(e){throw Ce=t,e}}else null===e.TRUSTED_TYPES_POLICY?(Ce=void 0,ke=""):(void 0===Ce&&(Ce=Pe()),Ce&&"string"==typeof ke&&(ke=ze("")));l&&l(e),Kt=e},Qt=M({},[...H,...j,...B]),en=M({},[...G,...W]),tn=function(e){let t=_e(e);t&&t.tagName||(t={namespaceURI:Pt,tagName:"template"});const n=T(e.tagName),o=T(t.tagName);return!!Ft[e.namespaceURI]&&(e.namespaceURI===Mt?function(e,t,n){return t.namespaceURI===zt?"svg"===e:t.namespaceURI===Lt?"svg"===e&&("annotation-xml"===n||Bt[n]):Boolean(Qt[e])}(n,t,o):e.namespaceURI===Lt?function(e,t,n){return t.namespaceURI===zt?"math"===e:t.namespaceURI===Mt?"math"===e&&Wt[n]:Boolean(en[e])}(n,t,o):e.namespaceURI===zt?function(e,t,n){return!(t.namespaceURI===Mt&&!Wt[n])&&!(t.namespaceURI===Lt&&!Bt[n])&&!en[e]&&(Yt[e]||!Qt[e])}(n,t,o):!("application/xhtml+xml"!==qt||!Ft[e.namespaceURI]))},nn=function(e){g(o.removed,{element:e});try{_e(e).removeChild(e)}catch(t){if(Ee(e),!_e(e))throw k("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},on=function(e){ln(e);const t=Ne(e);if(t){const e=[];m(t,t=>{g(e,t)}),m(e,e=>{try{Ee(e)}catch(e){}})}const n=Oe(e);if(n)for(let t=n.length-1;t>=0;--t){const o=n[t],r=o&&o.name;if("string"==typeof r)try{e.removeAttribute(r)}catch(e){}}},rn=function(e,t){try{g(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Tt||St)try{nn(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},an=function(e){const t=Oe(e);if(t)for(let n=t.length-1;n>=0;--n){const o=t[n],r=o&&o.name;if("string"==typeof r&&!nt[$t(r)])try{e.removeAttribute(r)}catch(e){}}},ln=function(e){const t=[e];for(;t.length>0;){const e=t.pop();(ve?ve(e):e.nodeType)===ue&&an(e);const n=Ne(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},cn=function(e){let t=null,n=null;if(bt)e="<remove></remove>"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===qt&&Pt===zt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Ce?ze(e):e;if(Pt===zt)try{t=(new z).parseFromString(o,qt)}catch(e){}if(!t||!t.documentElement){t=Fe.createDocument(Pt,"template",null);try{t.documentElement.innerHTML=Ut?ke:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Pt===zt?Be.call(t,dt?"html":"body")[0]:dt?t.documentElement:i},sn=function(e){const t=Re?Re(e):e.ownerDocument;return He.call(t||e,e,x.SHOW_ELEMENT|x.SHOW_COMMENT|x.SHOW_TEXT|x.SHOW_PROCESSING_INSTRUCTION|x.SHOW_CDATA_SECTION,null)},un=function(e){return e=A(e,Ye," "),e=A(e,qe," "),e=A(e,Xe," ")},fn=function(e){var t;e.normalize();const n=Re?Re(e):e.ownerDocument,o=He.call(n||e,e,x.SHOW_TEXT|x.SHOW_COMMENT|x.SHOW_CDATA_SECTION|x.SHOW_PROCESSING_INSTRUCTION,null);let r=o.nextNode();for(;r;)r.data=un(r.data),r=o.nextNode();const i=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");i&&m(i,e=>{mn(e.content)&&fn(e.content)})},pn=function(e){const t=De?De(e):null;return"string"==typeof t&&("form"===$t(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==Oe(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==ve(e)||e.childNodes!==Ne(e)))},mn=function(e){if(!ve||"object"!=typeof e||null===e)return!1;try{return ve(e)===he}catch(e){return!1}},dn=function(e){if(!ve||"object"!=typeof e||null===e)return!1;try{return"number"==typeof ve(e)}catch(e){return!1}};function hn(e,t,n){0!==e.length&&m(e,e=>{e.call(o,t,n,Kt)})}const gn=function(e,t,n,o){return 0===e.length?t:t===n||t===o?P(t):t},yn=function(e,t){if(hn(We.beforeSanitizeElements,e,null),e!==t&&null===_e(e))return Ot&&ln(e),!0;if(pn(e))return nn(e),!0;const n=$t(De?De(e):e.nodeName);if(et=gn(We.uponSanitizeElement,et,tt,gt),hn(We.uponSanitizeElement,e,{tagName:n,allowedTags:et}),e!==t&&null===_e(e))return Ot&&ln(e),!0;if(function(e,t){return!!(mt&&e.hasChildNodes()&&!dn(e.firstElementChild)&&I(ae,e.textContent)&&I(ae,e.innerHTML))||!(!mt||e.namespaceURI!==zt||"style"!==t||!dn(e.firstElementChild))||e.nodeType===pe||!(!mt||e.nodeType!==me||!I(le,e.data))}(e,n))return nn(e),!0;if(it[n]||!(lt.tagCheck instanceof Function&<.tagCheck(n))&&!et[n]){const o=function(e,t,n){if(!it[t]&&Sn(t)){if(rt.tagNameCheck instanceof RegExp&&I(rt.tagNameCheck,t))return!1;if(rt.tagNameCheck instanceof Function&&rt.tagNameCheck(t))return!1}if(wt&&!Dt[t]){const t=_e(e),o=Ne(e);if(o&&t)for(let r=o.length-1;r>=0;--r){const i=e===n?Se(o[r],!0):o[r];t.insertBefore(i,Ae(e))}}return nn(e),!0}(e,n,t);return!1===o&&hn(We.afterSanitizeElements,e,null),o}if((ve?ve(e):e.nodeType)===ue&&!tn(e))return nn(e),!0;if(("noscript"===n||"noembed"===n||"noframes"===n)&&I(ce,e.innerHTML))return nn(e),!0;if(pt&&e.nodeType===fe){const t=un(e.textContent);e.textContent!==t&&(g(o.removed,{element:e.cloneNode()}),e.textContent=t)}return hn(We.afterSanitizeElements,e,null),!1},bn=function(e,t,n){if(at[t])return!1;if(mt&&"patchsrc"===t)return!1;if(mt&&"for"===t&&"label"!==e&&"output"!==e)return!1;if(At&&("id"===t||"name"===t)&&(n in r||n in Vt))return!1;const o=nt[t]||lt.attributeCheck instanceof Function&<.attributeCheck(t,e);if(st&&I($e,t));else if(ct&&I(Ke,t));else if(o)if(kt[t]);else if(I(Qe,A(n,Ze,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==N(n,"data:")||!Ct[e]){if(ut&&!I(Ve,A(n,Ze,"")));else if(n)return!1}else;else if(!(Sn(e)&&(rt.tagNameCheck instanceof RegExp&&I(rt.tagNameCheck,e)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(e))&&(rt.attributeNameCheck instanceof RegExp&&I(rt.attributeNameCheck,t)||rt.attributeNameCheck instanceof Function&&rt.attributeNameCheck(t,e))||"is"===t&&rt.allowCustomizedBuiltInElements&&(rt.tagNameCheck instanceof RegExp&&I(rt.tagNameCheck,n)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(n))))return!1;return!0},Tn=M({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Sn=function(e){return!Tn[T(e)]&&I(Je,e)},En=function(e,t,n,o){if(Ce&&"object"==typeof be&&"function"==typeof be.getAttributeType&&!n)switch(be.getAttributeType(e,t)){case"TrustedHTML":return ze(o);case"TrustedScriptURL":return function(e){Me(),Le++;try{return Ce.createScriptURL(e)}finally{Le--}}(o)}return o},An=function(e,t,n,r){try{n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),pn(e)?nn(e):h(o.removed)}catch(n){rn(t,e)}},Nn=function(e){hn(We.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||pn(e))return;nt=gn(We.uponSanitizeAttribute,nt,ot,yt);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let o=t.length;const r=$t(e.nodeName);for(;o--;){const i=t[o],a=i.name,l=i.namespaceURI,c=i.value,s=$t(a),u=c;let f="value"===a?u:_(u);n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,hn(We.uponSanitizeAttribute,e,n),f=n.attrValue,!Nt||"id"!==s&&"name"!==s||0===N(f,_t)||(rn(a,e),f=_t+f),mt&&I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)?rn(a,e):"attributename"===s&&E(f,"href")?rn(a,e):n.forceKeepAttr||(n.keepAttr&&(ft||!I(se,f))?(pt&&(f=un(f)),bn(r,s,f)?(f=En(r,s,l,f),f!==u&&An(e,a,l,f)):rn(a,e)):rn(a,e))}hn(We.afterSanitizeAttributes,e,null)},_n=function(e){let t=null;const n=sn(e);for(hn(We.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){hn(We.uponSanitizeShadowNode,t,null),yn(t,e),Nn(t),mn(t.content)&&_n(t.content);if((ve?ve(t):t.nodeType)===ue){const e=we(t);mn(e)&&(wn(e),_n(e))}}hn(We.afterSanitizeShadowDOM,e,null)},wn=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){_n(e.shadow);continue}const n=e.node,o=(ve?ve(n):n.nodeType)===ue,r=Ne(n);if(r)for(let e=r.length-1;e>=0;--e)t.push({node:r[e],shadow:null});if(o){const e=De?De(n):null;if("string"==typeof e&&"template"===$t(e)){const e=n.content;mn(e)&&t.push({node:e,shadow:null})}}if(o){const e=we(n);mn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(Ut=!e,Ut&&(e="\x3c!--\x3e"),"string"!=typeof e&&!dn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return w(e);case"boolean":return O(e);case"bigint":return v?v(e):"0";case"symbol":return D?D(e):"Symbol()";case"undefined":default:return C(e);case"function":case"object":{if(null===e)return C(e);const t=e,n=U(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:C(e)}return C(e)}}}(e)))throw k("dirty is not a string, aborting");if(!o.isSupported)return e;ht?(et=gt,nt=yt):Jt(t),(We.uponSanitizeElement.length>0||We.uponSanitizeAttribute.length>0)&&(et=P(et)),We.uponSanitizeAttribute.length>0&&(nt=P(nt)),o.removed=[];const c=Ot&&"string"!=typeof e&&dn(e);if(c){!function(e){if(!mt)return;const t=[e];for(;t.length>0;){const e=t.pop(),n=ve?ve(e):e.nodeType;if(n===pe||n===me&&I(le,e.data)){try{Ee(e)}catch(e){}continue}if(n===ue){const t=e,n=$t(De?De(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute("patchsrc")&&t.removeAttribute("patchsrc"),t.hasAttribute&&t.hasAttribute("for")&&"label"!==n&&"output"!==n&&t.removeAttribute("for")}catch(e){}}const o=Ne(e);if(o)for(let e=o.length-1;e>=0;--e)t.push(o[e])}}(e);const t=De?De(e):e.nodeName;if("string"==typeof t){const n=$t(t);if(!et[n]||it[n])throw on(e),k("root node is forbidden and cannot be sanitized in-place")}if(pn(e))throw on(e),k("root node is clobbered and cannot be sanitized in-place");try{wn(e)}catch(t){throw on(e),t}}else if(dn(e))n=cn("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===ue&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r),wn(r);else{if(!Tt&&!pt&&!dt&&-1===e.indexOf("<"))return Ce&&Et?ze(e):e;if(n=cn(e),!n)return Tt?null:Et?ke:""}n&&bt&&nn(n.firstChild);const s=c?e:n;try{const e=sn(s);for(;a=e.nextNode();)yn(a,s),Nn(a),mn(a.content)&&_n(a.content)}catch(t){throw c&&(on(e),m(o.removed,e=>{e.element&&ln(e.element)})),t}if(c)return m(o.removed,e=>{e.element&&ln(e.element)}),pt&&fn(e),e;if(Tt){if(pt&&fn(n),St)for(l=je.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(nt.shadowroot||nt.shadowrootmode)&&(l=Ge.call(i,l,!0)),l}let u=dt?n.outerHTML:n.innerHTML;return dt&&et["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&I(re,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),pt&&(u=un(u)),Ce&&Et?ze(u):u},o.setConfig=function(){Jt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ht=!0,gt=et,yt=nt},o.clearConfig=function(){Kt=null,ht=!1,gt=null,yt=null,Ce=Ie,ke=""},o.isValidAttribute=function(e,t,n){Kt||Jt({});const o=$t(e),r=$t(t);return bn(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&R(We,e)&&g(We[e],t)},o.removeHook=function(e,t){if(R(We,e)){if(void 0!==t){const n=d(We[e],t);return-1===n?void 0:y(We[e],n,1)[0]}return h(We[e])}},o.removeHooks=function(e){R(We,e)&&(We[e]=[])},o.removeAllHooks=function(){We={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();export{be as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=r=>"number"==typeof r&&Number.isFinite(r),i={k:"K",m:"M",bn:"B",tn:"T"},t=/(\d)(bn|tn|k|m)$/i,e=r=>r.replace(t,(r,t,e)=>`${t}${i[e.toLowerCase()]}`),n=(i,t=4)=>{if(!r(i)||i<=0)return 0;const e=Math.ceil(i/t);return Math.ceil(i/e)},a=(i,t,{currency:n,unit:a}={})=>{if(!r(i))return String(i);switch("currency"!==t||n?t:"number"){case"currency":return e(new Intl.NumberFormat("en-GB",{style:"currency",currency:n??void 0,currencyDisplay:"narrowSymbol",notation:"compact",minimumFractionDigits:0,maximumFractionDigits:1}).format(i));case"percentage":return`${new Intl.NumberFormat("en-GB",{minimumFractionDigits:0,maximumFractionDigits:1}).format(i)}%`;case"duration":{const r=new Intl.NumberFormat("en-GB",{minimumFractionDigits:0,maximumFractionDigits:1}).format(i);return a?`${r} ${a}`:r}default:return e(new Intl.NumberFormat("en-GB",{notation:"compact",minimumFractionDigits:0,maximumFractionDigits:1}).format(i))}},m=(i,t={})=>{if(!i||!r(i.value))return null;const{valueFormat:n}=i,{currency:a,unit:m}=t;let c;switch("currency"!==n||a?n:"number"){case"currency":c=e(new Intl.NumberFormat("en-GB",{style:"currency",currency:a??void 0,currencyDisplay:"narrowSymbol",notation:"compact",minimumFractionDigits:0,maximumFractionDigits:1,signDisplay:"exceptZero"}).format(i.value));break;case"percentage":c=`${new Intl.NumberFormat("en-GB",{minimumFractionDigits:0,maximumFractionDigits:1,signDisplay:"exceptZero"}).format(i.value)}%`;break;case"duration":{const r=new Intl.NumberFormat("en-GB",{minimumFractionDigits:0,maximumFractionDigits:1,signDisplay:"exceptZero"}).format(i.value);c=m?`${r} ${m}`:r;break}default:c=e(new Intl.NumberFormat("en-GB",{notation:"compact",minimumFractionDigits:0,maximumFractionDigits:1,signDisplay:"exceptZero"}).format(i.value))}return i.comparison?`${c} ${i.comparison}`:c},c=(i,t)=>{if(i&&r(i.value)&&0!==i.value&&t&&"neutral"!==t)return"higher_is_better"===t?i.value>0?"success.main":"error.main":"lower_is_better"===t?i.value>0?"error.main":"success.main":void 0};export{n as columnsForItemCount,c as deltaColorForPolarity,m as formatDatapointDelta,a as formatDatapointValue};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../node_modules/dompurify/dist/purify.es.mjs";const t=["table","caption","colgroup","col","thead","tbody","tfoot","tr","th","td","br","strong","em","code"],n=["abbr","colspan","headers","rowspan","scope","span"],i=(i,{purifier:l}={})=>{const o=l||e,s="function"==typeof o.sanitize?o:"undefined"!=typeof window?e(window):null;if(!s)throw new Error("DOM sanitisation is unavailable");const a=s.sanitize(i,{ALLOWED_TAGS:t,ALLOWED_ATTR:n,ALLOW_ARIA_ATTR:!1,ALLOW_DATA_ATTR:!1});if(!/<table\b/i.test(a))throw new Error("The raw HTML table could not be sanitised safely");return a},l=(e,t,n)=>({type:"markdown",content:e,key:`markdown-${t}-${n}`}),o=e=>{if("string"!=typeof e||!/<table\b/i.test(e))return[l("string"==typeof e?e:"",0,e?.length||0)];const t=[],n=/<table\b[^>]*>/gi,i=/<\/table\s*>/gi;let o,s=0;for(;null!==(o=n.exec(e));){if(o.index<s)continue;o.index>s&&t.push(l(e.slice(s,o.index),s,o.index)),i.lastIndex=n.lastIndex;const a=i.exec(e);if(!a){t.push({type:"fallback",rawSource:e.slice(o.index),reason:"The raw HTML table is incomplete.",key:`table-fallback-${o.index}-${e.length}`}),s=e.length;break}const r=a.index+a[0].length;t.push({type:"html-table",html:e.slice(o.index,r),key:`html-table-${o.index}-${r}`}),s=r,n.lastIndex=r}return s<e.length&&t.push(l(e.slice(s),s,e.length)),t.length>0?t:[l(e,0,e.length)]};export{i as sanitizeRawHtmlTable,o as splitRawHtmlTables};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=t=>{if("string"!=typeof t)return null;const r=t.trim();if(/^#[A-Za-z][A-Za-z0-9_.:-]*$/.test(r))return r;try{const t=new URL(r);return"http:"===t.protocol||"https:"===t.protocol?t.href:null}catch{return null}};export{t as safeMarkdownUrl};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "it-data-nexus-ui-library",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.12",
|
|
4
4
|
"description": "Nexus core components",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "emsmart-sage",
|
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
"lint": "eslint \"src/**/*.{ts,tsx,js,jsx}\"",
|
|
31
31
|
"prepublishOnly": "npm run lint && npm run build",
|
|
32
32
|
"storybook": "storybook dev -p 6006",
|
|
33
|
+
"test:unit": "vitest run --config vitest.unit.config.ts",
|
|
33
34
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"@mui/x-charts": "^9.4.0",
|
|
37
|
-
"@radix-ui/react-popover": "^1.1.15"
|
|
38
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
39
|
+
"dompurify": "3.4.13"
|
|
38
40
|
},
|
|
39
41
|
"peerDependencies": {
|
|
40
42
|
"@emotion/react": "^11.14.0",
|