@rustic-ai/ui-components 0.0.35 → 0.0.37
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/calendar/index.js +1 -1
- package/dist/components/codeSnippet/index.js +1 -1
- package/dist/components/filePreview/filePreview.d.ts +1 -12
- package/dist/components/filePreview/filePreview.d.ts.map +1 -1
- package/dist/components/image/image.d.ts +1 -7
- package/dist/components/image/image.d.ts.map +1 -1
- package/dist/components/image/index.css +11 -0
- package/dist/components/image/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/baseInput/baseInput.d.ts +1 -0
- package/dist/components/input/baseInput/baseInput.d.ts.map +1 -1
- package/dist/components/input/emoji/emoji.d.ts.map +1 -1
- package/dist/components/input/multimodal/multimodalInput/index.css +18 -0
- package/dist/components/input/multimodal/multimodalInput/index.js +1 -1
- package/dist/components/input/multimodal/multimodalInput/multimodalInput.d.ts +1 -11
- package/dist/components/input/multimodal/multimodalInput/multimodalInput.d.ts.map +1 -1
- package/dist/components/input/multimodal/uploader/index.css +11 -0
- package/dist/components/input/multimodal/uploader/index.js +1 -1
- package/dist/components/input/textInput/index.css +56 -0
- package/dist/components/input/textInput/index.js +1 -1
- package/dist/components/map/index.js +1 -1
- package/dist/components/markdown/index.js +1 -1
- package/dist/components/media/audio/index.js +1 -1
- package/dist/components/media/timeIndicator/timeIndicator.d.ts +2 -7
- package/dist/components/media/timeIndicator/timeIndicator.d.ts.map +1 -1
- package/dist/components/media/video/index.js +1 -1
- package/dist/components/messageCanvas/actions/copy/index.js +1 -1
- package/dist/components/messageCanvas/actions/index.js +1 -1
- package/dist/components/messageCanvas/actions/textToSpeech/index.js +1 -1
- package/dist/components/messageSpace/index.js +1 -1
- package/dist/components/messageSpace/messageSpace.d.ts +1 -7
- package/dist/components/messageSpace/messageSpace.d.ts.map +1 -1
- package/dist/components/multipart/chatCompletion/index.css +11 -0
- package/dist/components/multipart/chatCompletion/index.js +1 -1
- package/dist/components/multipart/multipart/index.css +11 -0
- package/dist/components/multipart/multipart/index.js +1 -1
- package/dist/components/participantsContainer/index.css +49 -0
- package/dist/components/participantsContainer/index.d.ts +2 -1
- package/dist/components/participantsContainer/index.d.ts.map +1 -1
- package/dist/components/participantsContainer/index.js +1 -1
- package/dist/components/participantsContainer/participantsContainer.d.ts +2 -14
- package/dist/components/participantsContainer/participantsContainer.d.ts.map +1 -1
- package/dist/components/pdfViewer/index.js +1 -1
- package/dist/components/promptBuilder/index.css +11 -0
- package/dist/components/promptBuilder/index.js +1 -1
- package/dist/components/question/index.js +1 -1
- package/dist/components/sharedDescription.d.ts +2 -0
- package/dist/components/sharedDescription.d.ts.map +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/text/index.js +1 -1
- package/dist/components/types.d.ts +18 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/video/index.css +11 -0
- package/dist/components/video/index.js +1 -1
- package/dist/components/video/youtubeVideo.d.ts +1 -7
- package/dist/components/video/youtubeVideo.d.ts.map +1 -1
- package/dist/components/visualization/chart/index.js +1 -1
- package/dist/components/visualization/chart/rechartsTimeSeries.d.ts +1 -10
- package/dist/components/visualization/chart/rechartsTimeSeries.d.ts.map +1 -1
- package/dist/components/visualization/perspectiveViz/index.js +1 -1
- package/dist/components/visualization/perspectiveViz/perspectiveViz.d.ts.map +1 -1
- package/dist/components/visualization/vegaLiteViz/index.js +1 -1
- package/dist/components/visualization/vegaLiteViz/vegaLiteViz.d.ts +1 -8
- package/dist/components/visualization/vegaLiteViz/vegaLiteViz.d.ts.map +1 -1
- package/dist/components/weather/index.js +1 -1
- package/dist/index.css +18 -0
- package/dist/index.js +1 -1
- package/package.json +36 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ParticipantRole:()=>S,ParticipantType:()=>C,default:()=>O});const r=require("react/jsx-runtime"),n=require("@mui/material/Box");var a=e.n(n);const o=require("@mui/material/Card");var i=e.n(o);const s=require("@mui/material/TextField");var c=e.n(s);const l=require("@mui/material/Typography");var u=e.n(l);const d=require("@mui/material/useMediaQuery");var m=e.n(d);const p=require("@mui/system/Stack");var f=e.n(p);const v=require("@mui/system/useTheme");var b=e.n(v);const h=require("pdfjs-dist"),y=require("react"),x=require("@mui/material/IconButton");var j=e.n(x);const g=require("@mui/material/Tooltip");var w=e.n(g),P=function(){return P=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},P.apply(this,arguments)};function N(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,r.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:P({},t),children:e.name})}const k=function(e){var t={zoomIn:{symbol:"zoom_in",label:"Zoom in"},zoomOut:{symbol:"zoom_out",label:"Zoom out"},close:{symbol:"close",label:"Close"},previousPage:{symbol:"arrow_back",label:"Previous page"},nextPage:{symbol:"arrow_forward",label:"Next page"}},n=(t[e.action].label.replaceAll(" ","-").toLowerCase(),t[e.action]);return(0,r.jsx)(w(),{title:n.label,children:(0,r.jsx)("span",{children:(0,r.jsx)(j(),{onClick:e.onClick,className:e.className,disabled:e.isDisabled,children:(0,r.jsx)(N,{name:n.symbol})})})})};var S,C;!function(e){e.Owner="owner",e.Member="member"}(S||(S={})),function(e){e.Human="human",e.Agent="agent"}(C||(C={}));const O=function(e){var t,n=(0,y.useRef)(null),o=(0,y.useState)(1),s=o[0],l=o[1],d=(0,y.useState)(1),p=d[0],v=d[1],x=(0,y.useState)(1),j=x[0],g=x[1],w=(0,y.useState)(!1),P=w[0],N=w[1],S=(0,y.useState)(),C=S[0],O=S[1],q=b()(),_=m()(q.breakpoints.down("sm")),T=m()(q.breakpoints.between("sm","md"));if(t=e.url,!/\/[^/]+\.pdf$/.test(t))return(0,r.jsx)(i(),{variant:"outlined",className:"rustic-pdf-error",children:(0,r.jsx)(u(),{variant:"body2",children:"The provided URL does not point to a PDF file."})});var z=(0,y.useState)((function(){return _?.5:T?1:1.5})),D=z[0],M=z[1];return(0,y.useEffect)((function(){h.GlobalWorkerOptions.workerSrc||(h.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(h.version,"/pdf.worker.mjs")),h.getDocument({url:"".concat(e.url)}).promise.then((function(e){v(e.numPages),function(e){e.getPage(s).then((function(e){var t=e.getViewport({scale:D}),r=n.current;if(r){var a=r.getContext("2d");if(a){var o=window.devicePixelRatio||1;r.style.width="".concat(t.width,"px"),r.style.height="".concat(t.height,"px"),r.width=t.width*o,r.height=t.height*o;var i={canvasContext:a,viewport:t,transform:[o,0,0,o,0,0]};C&&C.cancel();var s=e.render(i);O(s),s.promise.then((function(){O(void 0)})).catch((function(e){console.error(e)}))}}}))}(e)})).catch((function(){N(!0)}))}),[e.url,s,D]),P?(0,r.jsx)(i(),{variant:"outlined",className:"rustic-pdf-error",children:(0,r.jsx)(u(),{variant:"body2",children:"Failed to load the PDF file."})}):(0,r.jsxs)(i(),{variant:"outlined",className:"rustic-pdf-viewer",children:[(0,r.jsxs)(a(),{className:"rustic-pdf-viewer-header",children:[(0,r.jsx)(k,{action:"zoomOut",onClick:function(){M((function(e){return Math.max(e-.2,.2)}))}}),(0,r.jsx)(k,{action:"zoomIn",onClick:function(){M((function(e){return e+.2}))}})]}),(0,r.jsx)(a(),{className:"rustic-pdf-viewer-body",children:(0,r.jsx)(a(),{className:"rustic-pdf-viewer-body-inner",children:(0,r.jsx)("canvas",{ref:n})})}),(0,r.jsxs)(f(),{direction:"row",justifyContent:"center",alignItems:"center",gap:1,children:[(0,r.jsx)(k,{action:"previousPage",onClick:function(){s>1&&(l(s-1),g(s-1))},isDisabled:1===s}),(0,r.jsx)(u(),{variant:"body1",className:"rustic-page-indicator",children:"Page"}),(0,r.jsx)(c(),{type:"number",value:j,onChange:function(e){var t=parseInt(e.target.value);g(t),!isNaN(t)&&t>=1&&t<=p&&l(t)},size:"small",className:"rustic-pdf-page-input"}),(0,r.jsxs)(u(),{variant:"body1",className:"rustic-page-indicator",children:["of ",p]}),(0,r.jsx)(k,{action:"nextPage",onClick:function(){s<p&&(l(s+1),g(s+1))},isDisabled:s===p})]})]})};return t})()));
|
|
@@ -94,6 +94,17 @@ code {
|
|
|
94
94
|
margin-right: -8px;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
.rustic-participant-profile {
|
|
98
|
+
display: flex;
|
|
99
|
+
gap: 8px;
|
|
100
|
+
align-items: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.rustic-participant-profile .rustic-participant-avatar {
|
|
104
|
+
width: 16px;
|
|
105
|
+
height: 16px;
|
|
106
|
+
}
|
|
107
|
+
|
|
97
108
|
span.rustic-icon-large {
|
|
98
109
|
font-size: 32px;
|
|
99
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{ParticipantRole:()=>I,ParticipantType:()=>A,default:()=>E});const t=require("react/jsx-runtime"),n=require("@mui/material/Button");var i=e.n(n);const o=require("@mui/material/Card");var a=e.n(o);const s=require("@mui/material/CircularProgress");var l=e.n(s);const c=require("@mui/material/Dialog");var u=e.n(c);const d=require("@mui/material/DialogActions");var m=e.n(d);const p=require("@mui/material/DialogContent");var f=e.n(p);const g=require("@mui/material/DialogContentText");var b=e.n(g);const h=require("@mui/material/DialogTitle");var v=e.n(h);const x=require("@mui/material/Divider");var y=e.n(x);const j=require("@mui/material/Typography");var q=e.n(j);const w=require("@mui/system"),O=require("react");var C=e.n(O),N=function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},N.apply(this,arguments)};const P=function(e){var r=e.messages[0],n=e.messages.slice(1),i=e.supportedElements[r.format];return(0,t.jsx)(t.Fragment,{children:i?C().createElement(i,N(N({sender:e.sender,ws:e.ws,messageId:r.id,conversationId:r.conversationId},r.data),n.length>0&&{updatedData:n.map((function(e){return e.data}))})):(0,t.jsxs)(q(),{variant:"body2",children:["Unsupported element format: ",r.format]})})};var S=function(){return S=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},S.apply(this,arguments)};function B(e){e.name.replaceAll("_","-");var r={};return e.color&&(r={color:e.color}),(0,t.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:S({},r),children:e.name})}var I,A,D=function(){return D=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},D.apply(this,arguments)},T=function(e,r,t){if(t||2===arguments.length)for(var n,i=0,o=r.length;i<o;i++)!n&&i in r||(n||(n=Array.prototype.slice.call(r,0,i)),n[i]=r[i]);return e.concat(n||Array.prototype.slice.call(r))};!function(e){e.Owner="owner",e.Member="member"}(I||(I={})),function(e){e.Human="human",e.Agent="agent"}(A||(A={}));const E=function(e){var r=(0,O.useState)(!1),n=r[0],o=r[1],s=(0,O.useState)(!1),c=s[0],d=s[1],p=(0,O.useState)(!1),g=p[0],h=p[1],x=(0,O.useState)(!1),j=x[0],C=x[1],N=(0,O.useState)([]),S=N[0],I=N[1],A=(0,O.useState)(null),E=A[0],_=A[1],k=(0,w.useTheme)(),M=S[S.length-1],Q=D(D({},e.ws),{send:function(e){_(e)}});function R(e){I((function(r){return T(T([],r,!0),[e],!1)}))}function F(){if(E){var r=D(D({},E),{threadId:e.messageId});e.ws.send(r)}}if((0,O.useEffect)((function(){e.ws.onReceive&&e.ws.onReceive(R)}),[e.ws]),(0,O.useEffect)((function(){S.length>0&&(M&&M.sender.id!==e.sender.id&&d(!1),"promptBuilder"===M.format&&M.data.isLastQuestion&&o(!0))}),[S.length]),0!==S.length)return(0,t.jsxs)(a(),{variant:"outlined",className:"rustic-prompt-builder",children:[(0,t.jsxs)(u(),{open:g,onClose:function(){return h(!1)},"aria-labelledby":"quit-dialog-title","aria-describedby":"quit-dialog-description",sx:{"& .MuiPaper-root":{width:"clamp(320px,50vw,600px)",border:"1px solid ".concat(k.palette.divider)}},children:[(0,t.jsx)(v(),{id:"quit-dialog-title",className:"rustic-align-self-center",children:"Are you sure?"}),(0,t.jsx)(y(),{}),(0,t.jsx)(f(),{children:(0,t.jsx)(b(),{id:"quit-dialog-description",className:"rustic-align-self-center",children:"All progress will be lost."})}),(0,t.jsxs)(m(),{className:"rustic-prompt-builder-dialog-buttons",disableSpacing:!0,children:[(0,t.jsx)(i(),{variant:"outlined",color:"secondary",startIcon:(0,t.jsx)(B,{name:"close"}),onClick:function(){h(!1),e.onCancel()},children:"Quit"}),(0,t.jsx)(i(),{variant:"contained",color:"primary",onClick:function(){return h(!1)},children:"Continue build"})]})]}),e.getProfileComponent?e.getProfileComponent(S[0]):(0,t.jsx)(q(),{color:"text.secondary",children:"Prompt Builder"}),(0,t.jsx)(y(),{className:"rustic-prompt-builder-divider"}),(0,t.jsxs)(w.Box,{className:"rustic-prompt-builder-questions",children:[function(){if(!j&&S.length>0)return S.map((function(r){if(r.sender.id!==e.sender.id&&"promptBuilder"!==r.format)return(0,t.jsx)(P,{ws:Q,sender:e.sender,messages:[r],supportedElements:e.supportedElements},r.id)}))}(),c&&(0,t.jsx)(l(),{color:"secondary",className:"rustic-align-self-center"})]}),(0,t.jsx)(t.Fragment,{children:!j&&(0,t.jsxs)(w.Box,{className:"rustic-prompt-builder-buttons",children:[(0,t.jsxs)(w.Box,{className:"rustic-prompt-builder-buttons-left",children:[(0,t.jsx)(i(),{variant:"outlined",color:"secondary",startIcon:(0,t.jsx)(B,{name:"close"}),onClick:function(){return h(!0)},children:"Quit"}),(0,t.jsx)(i(),{variant:"outlined",color:"secondary",endIcon:(0,t.jsx)(B,{name:"chevron_right"}),onClick:function(){F(),_(null),d(!0)},disabled:!E,"aria-disabled":!E,children:"Next question"})]}),n&&(0,t.jsx)(w.Box,{className:"rustic-prompt-builder-buttons-right",children:(0,t.jsx)(i(),{variant:"contained",color:"primary",onClick:function(){F(),C(!0),d(!0),e.onSubmit()},disabled:c,"aria-disabled":c,children:"Generate"})})]})})]})};return r})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ParticipantRole:()=>f,ParticipantType:()=>b,default:()=>y});const r=require("react/jsx-runtime"),i=require("@mui/material"),n=require("@mui/material/Box");var o=e.n(n);const a=require("@mui/material/Chip");var s=e.n(a);const c=require("@mui/material/Stack");var u=e.n(c);const l=require("@mui/material/Typography");var d=e.n(l);const m=require("react"),p=require("uuid");var f,b;!function(e){e.Owner="owner",e.Member="member"}(f||(f={})),function(e){e.Human="human",e.Agent="agent"}(b||(b={}));const y=function(e){var t=(0,m.useState)(""),n=t[0],a=t[1],c=(0,i.useTheme)(),l=(0,i.useMediaQuery)(c.breakpoints.down("md"))?"column":"row",f=e.options.map((function(t,i){return(0,r.jsx)(s(),{onClick:function(){return function(t){a(t);var r=(new Date).toISOString(),i={id:(0,p.v4)(),timestamp:r,sender:e.sender,conversationId:e.conversationId,format:"text",data:{text:t},inReplyTo:e.messageId};e.ws.send(i)}(t)},color:"secondary",size:"small",sx:n===t?{"&.Mui-disabled":{backgroundColor:"secondary.light",color:"text.primary"}}:{},className:"rustic-option",disabled:!!n,"aria-disabled":!!n,label:t},i)}));return(0,r.jsxs)(o(),{className:"rustic-question",children:[(e.title||e.description)&&(0,r.jsxs)(o(),{className:"rustic-question-text",children:[e.title&&(0,r.jsx)(d(),{variant:"subtitle2",className:"rustic-title",children:e.title}),e.description&&(0,r.jsx)(d(),{variant:"caption",children:e.description})]}),(0,r.jsx)(u(),{direction:l,className:"rustic-options-container",children:f})]})};return t})()));
|
|
@@ -2,4 +2,6 @@ import type { InputType } from 'storybook/internal/types';
|
|
|
2
2
|
export declare const conversationIdDescription: InputType;
|
|
3
3
|
export declare const senderDescription: InputType;
|
|
4
4
|
export declare const wsDescription: InputType;
|
|
5
|
+
export declare const participantDetail: string;
|
|
6
|
+
export declare const getMembersDescription: InputType;
|
|
5
7
|
//# sourceMappingURL=sharedDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedDescription.d.ts","sourceRoot":"","sources":["../../src/components/sharedDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,eAAO,MAAM,yBAAyB,EAAE,SAIvC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,SAmB/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,SAwB3B,CAAA"}
|
|
1
|
+
{"version":3,"file":"sharedDescription.d.ts","sourceRoot":"","sources":["../../src/components/sharedDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,eAAO,MAAM,yBAAyB,EAAE,SAIvC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,SAmB/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,SAwB3B,CAAA;AAED,eAAO,MAAM,iBAAiB,QAMoC,CAAA;AAElE,eAAO,MAAM,qBAAqB,EAAE,SASnC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports["@rustic-ai/ui-components"]=a():e["@rustic-ai/ui-components"]=a()}(global,(()=>(()=>{"use strict";var e={n:a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},d:(a,t)=>{for(var r in t)e.o(t,r)&&!e.o(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:t[r]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};e.r(a),e.d(a,{default:()=>
|
|
1
|
+
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports["@rustic-ai/ui-components"]=a():e["@rustic-ai/ui-components"]=a()}(global,(()=>(()=>{"use strict";var e={n:a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},d:(a,t)=>{for(var r in t)e.o(t,r)&&!e.o(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:t[r]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};e.r(a),e.d(a,{ParticipantRole:()=>k,ParticipantType:()=>A,default:()=>R});const t=require("react/jsx-runtime"),r=require("@mui/material"),n=require("@mui/material/Stack");var i=e.n(n);const c=require("@mui/material/Table");var o=e.n(c);const s=require("@mui/material/TableBody");var l=e.n(s);const u=require("@mui/material/TableCell");var d=e.n(u);const m=require("@mui/material/TableContainer");var b=e.n(m);const p=require("@mui/material/TableHead");var f=e.n(p);const y=require("@mui/material/TablePagination");var g=e.n(y);const h=require("@mui/material/TableRow");var v=e.n(h);const j=require("@mui/material/TableSortLabel");var x=e.n(j);const O=require("@mui/material/Tooltip");var T=e.n(O);const P=require("@mui/material/Typography");var q=e.n(P);const w=require("react");var S;!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(S||(S={}));var N,k,A,D=function(){return D=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++)for(var n in a=arguments[t])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},D.apply(this,arguments)};function K(e){e.name.replaceAll("_","-");var a={};return e.color&&(a={color:e.color}),(0,t.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:D({},a),children:e.name})}function M(){return(0,t.jsx)(K,{name:"expand_all"})}!function(e){e.Ascending="asc",e.Descending="desc"}(N||(N={})),function(e){e.Owner="owner",e.Member="member"}(k||(k={})),function(e){e.Human="human",e.Agent="agent"}(A||(A={}));const R=function(e){if(0===e.data.length)return(0,t.jsx)(q(),{variant:"body2",children:"No data available"});var a,n,c,s=e.data.length>10,u=(0,w.useState)({}),m=u[0],p=u[1],y=(0,w.useState)(s?10:-1),h=y[0],j=y[1],O=(0,w.useState)(0),P=O[0],S=O[1],k=(0,r.useTheme)(),A=Array.from(new Set(e.data.flatMap((function(e){return Object.keys(e)})))),D=e.headers||A.map((function(e){return{dataKey:e}})),K=(a=e.data,n=Object.keys(m)[0],c=m[n],n&&c?a.slice().sort((function(e,a){var t=Object.keys(m)[0],r=m[t];return e[t]<a[t]?r===N.Descending?1:-1:e[t]>a[t]?r===N.Descending?-1:1:0})):a),R=K.slice(P*h,P*h+h),_=h>0?R:K;function C(e){if(!m[e])return M}return(0,t.jsxs)(i(),{className:"rustic-table",spacing:1,children:[e.title&&(0,t.jsx)(q(),{variant:"h6",className:"rustic-table-title",children:e.title}),e.description&&(0,t.jsx)(q(),{variant:"body1",children:e.description}),(0,t.jsx)(b(),{className:"rustic-table-container",children:(0,t.jsxs)(o(),{"aria-label":e.title||"a table of data",size:"small",stickyHeader:!0,children:[D.length>0&&(0,t.jsx)(f(),{children:(0,t.jsx)(v(),{children:D.map((function(e,a){return(0,t.jsx)(d(),{sortDirection:m[e.dataKey]||!1,children:(0,t.jsx)(T(),{title:(n=e.dataKey,i=m[n],i?Object.keys(N)[Object.values(N).indexOf(i)]:"Sort"),children:(0,t.jsx)(x(),{active:!0,direction:m[e.dataKey],onClick:function(){return function(e){p((function(a){var t,r,n={};switch(a[e]){case N.Ascending:(t={})[e]=N.Descending,n=t;break;case N.Descending:n={};break;default:(r={})[e]=N.Ascending,n=r}return n}))}(e.dataKey)},className:"rustic-table-header",IconComponent:C(e.dataKey),children:e.label||(r=e.dataKey,r.charAt(0).toUpperCase()+r.slice(1))})})},"header-".concat(a));var r,n,i}))})}),(0,t.jsx)(l(),{children:_.map((function(e,a){return(0,t.jsx)(v(),{children:D.map((function(r,n){return(0,t.jsx)(d(),{children:e[r.dataKey]},"cell-".concat(a,"-").concat(n))}))},"row-".concat(a))}))})]})}),s&&(0,t.jsx)(g(),{className:"rustic-table-pagination",component:"div",count:e.data.length,rowsPerPage:h,labelRowsPerPage:"Rows:",page:P,onPageChange:function(e,a){return S(a)},onRowsPerPageChange:function(e){j(+e.target.value),S(0)},sx:{"& .MuiTablePagination-selectLabel":{color:k.palette.text.disabled}},classes:{toolbar:"rustic-table-toolbar",input:"rustic-table-input",spacer:"rustic-table-spacer",displayedRows:"rustic-table-displayed-rows",actions:"rustic-table-actions"}})]})};return a})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={1737:(e,t,r)=>{r.d(t,{A:()=>p});var
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={1737:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(8732),o=r(5642),a=r.n(o),i=r(785),u=r.n(i),s=r(7447),d=r.n(s),c=r(2015);const p=function(e){var t=(0,c.useState)(d().sanitize(e.text)),r=t[0],o=t[1],i=(0,c.useState)(""),s=i[0],p=i[1];return(0,c.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){for(var t=e.text,r=0,n=e.updatedData;r<n.length;r++){var a=n[r];"string"!=typeof a.text&&(t+=" [MISSING TEXT]",p("Some of the incoming text was not correctly formatted. Some data may be missing.")),t+=a.text}o(d().sanitize(t))}}),[e.text,e.updatedData]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u(),{variant:"body2",children:r}),s&&(0,n.jsx)(a(),{severity:"error",children:s})]})}},7131:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(8732),o=r(785),a=r.n(o),i=r(7447),u=r.n(i);r(2015);const s=function(e){return(0,n.jsx)(a(),{variant:"body2",className:"rustic-text",children:u().sanitize(e.text)})}},7159:(e,t,r)=>{var n,o;r.d(t,{s:()=>n,y:()=>o}),function(e){e.Owner="owner",e.Member="member"}(n||(n={})),function(e){e.Human="human",e.Agent="agent"}(o||(o={}))},5642:e=>{e.exports=require("@mui/material/Alert")},785:e=>{e.exports=require("@mui/material/Typography")},7447:e=>{e.exports=require("dompurify")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{ParticipantRole:()=>i.s,ParticipantType:()=>i.y,StreamingText:()=>o.A,Text:()=>a.A,default:()=>u});var o=r(1737),a=r(7131),i=r(7159);const u=a.A;return n})()));
|
|
@@ -118,6 +118,7 @@ export type TableConfig = {
|
|
|
118
118
|
};
|
|
119
119
|
sort?: TableSort[];
|
|
120
120
|
filter?: TableFilter[];
|
|
121
|
+
expansionDepth?: number;
|
|
121
122
|
};
|
|
122
123
|
export interface TableFormat extends VisualizationFormat {
|
|
123
124
|
/** Data to be displayed in the table. */
|
|
@@ -169,6 +170,21 @@ export interface MultipartProps extends MultipartData {
|
|
|
169
170
|
/** Setting this to true will display long file names in full. If set to false, long names will be shortened. */
|
|
170
171
|
showFullName?: boolean;
|
|
171
172
|
}
|
|
173
|
+
export declare enum ParticipantRole {
|
|
174
|
+
Owner = "owner",
|
|
175
|
+
Member = "member"
|
|
176
|
+
}
|
|
177
|
+
export declare enum ParticipantType {
|
|
178
|
+
Human = "human",
|
|
179
|
+
Agent = "agent"
|
|
180
|
+
}
|
|
181
|
+
export interface Participant {
|
|
182
|
+
id: string;
|
|
183
|
+
displayName: string;
|
|
184
|
+
participantType: ParticipantType;
|
|
185
|
+
participantRole?: ParticipantRole;
|
|
186
|
+
icon?: string;
|
|
187
|
+
}
|
|
172
188
|
export interface BaseInputProps {
|
|
173
189
|
/** Current user. */
|
|
174
190
|
sender: Sender;
|
|
@@ -194,6 +210,8 @@ export interface BaseInputProps {
|
|
|
194
210
|
maximumEmojiSearchResults?: number;
|
|
195
211
|
/** URL to fetch the emoji data from. You need to host the emoji data by yourself. If not provided, the default url will be used. */
|
|
196
212
|
emojiDataSource?: string;
|
|
213
|
+
/** Function to fetch the list of members. Should return a promise that resolves to an array of members. */
|
|
214
|
+
getMembers?: () => Promise<Participant[]>;
|
|
197
215
|
}
|
|
198
216
|
export interface TextInputProps extends Omit<BaseInputProps, 'send' | 'isSendEnabled'> {
|
|
199
217
|
/** WebSocket connection to send and receive messages to and from a backend.*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.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C,CAAA;KAAE,CAAA;IAC1E,gHAAgH;IAChH,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>u});const r=require("react/jsx-runtime"),o=require("dompurify");var n=e.n(o);require("react");var i,a=function(){return a=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},a.apply(this,arguments)};!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(i||(i={}));var c=function(){return c=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},c.apply(this,arguments)};const u=function(e){var t,o,i,u=e.title,l=void 0===u?"Embedded video":u,p=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(e,["title"]),f=n().sanitize(p.youtubeVideoId);return(0,r.jsx)("iframe",c({},(i={},(t=p.width)&&(i={width:t}),(o=p.height)&&(i=a(a({},i),{height:o})),t||o||(i={className:"rustic-fit-container"}),i),{src:"https://www.youtube.com/embed/".concat(f),title:l,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen",loading:"lazy"}))};return t})()));
|
|
@@ -17,11 +17,5 @@ export interface YoutubeVideoProps {
|
|
|
17
17
|
* npm i dompurify
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
|
-
declare namespace YoutubeVideo {
|
|
22
|
-
var defaultProps: {
|
|
23
|
-
title: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export default YoutubeVideo;
|
|
20
|
+
export default function YoutubeVideo({ title, ...props }: YoutubeVideoProps): import("react/jsx-runtime").JSX.Element;
|
|
27
21
|
//# sourceMappingURL=youtubeVideo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"youtubeVideo.d.ts","sourceRoot":"","sources":["../../../src/components/video/youtubeVideo.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAOxB,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAA;IACtB,yIAAyI;IACzI,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"youtubeVideo.d.ts","sourceRoot":"","sources":["../../../src/components/video/youtubeVideo.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AAOxB,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,cAAc,EAAE,MAAM,CAAA;IACtB,yIAAyI;IACzI,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAwB,EACxB,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAanB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>T});const r=require("react/jsx-runtime"),n=require("@mui/material/FormControl");var i=e.n(n);const a=require("@mui/material/IconButton");var o=e.n(a);const c=require("@mui/material/Menu");var s=e.n(c);const l=require("@mui/material/MenuItem");var u=e.n(l);const m=require("@mui/material/Typography");var h=e.n(m);const d=require("@mui/system/Box");var p=e.n(d);const f=require("@mui/system/useTheme");var y=e.n(f);const x=require("react"),v=require("recharts");var g;function j(e,t){return function(e,t){var r,n=new Date(e),i=navigator.language;return r=t===g.HOUR?{hour:"numeric",minute:"2-digit",hour12:!0}:{month:"short",day:"numeric"},n.toLocaleString(i,r)}(e,t<=1?g.HOUR:g.MONTH_DATE)}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(g||(g={}));var b=function(){return b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},b.apply(this,arguments)};function O(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,r.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:b({},t),children:e.name})}var C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},C.apply(this,arguments)},k={line:v.LineChart,bar:v.BarChart,area:v.AreaChart};function S(e){var t={};return e.forEach((function(e){t[e]=!0})),t}const T=function(e){var t=e.minChartWidth,n=void 0===t?200:t,a=e.maxHeight,c=void 0===a?600:a,l=e.yAxisLabelWidth,m=void 0===l?30:l,d=e.aspectRatio,f=void 0===d?16/9:d,g=e.disableChartTypeToggle,b=void 0!==g&&g,T=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["minChartWidth","maxHeight","yAxisLabelWidth","aspectRatio","disableChartTypeToggle"]),A=(0,x.useState)(T.defaultChartType||"line"),L=A[0],D=A[1],w=(0,x.useState)(null),N=w[0],M=w[1],_=(0,x.useState)(T.timeSeries),q=_[0],H=_[1],P=y()(),E=q.length>0?Object.keys(q[0]):[],F=E[0],R=E.slice(1),W=(0,x.useState)(S(R)),B=W[0],U=W[1];(0,x.useEffect)((function(){if(T.updatedData&&T.updatedData.length>0){var e=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}([],T.timeSeries,!0);T.updatedData.forEach((function(t){e=e.concat(t.timeSeries),H(e)}))}}),[T.timeSeries,T.updatedData]);var K=k[L];function I(e){N?M(null):e&&M(e.currentTarget)}function Y(e,t){return B[e]?T.chartColors[t%T.chartColors.length]:"grey"}function z(e){return B[e]?"none":"line-through"}if(0===q.length)return(0,r.jsx)(h(),{variant:"body2",children:"No data available"});var G,X,J,Q,V=T.timeSeries[T.timeSeries.length-1],Z=(G=T.timeSeries[0][F],X=V[F],J=new Date(G),Q=new Date(X),Math.round(Math.abs((Q.getTime()-J.getTime())/864e5)));return(0,r.jsxs)(p(),{className:"rustic-recharts-time-series",children:[!b&&(0,r.jsxs)(i(),{className:"rustic-recharts-time-series-chart-toggle",children:[(0,r.jsx)(o(),{"aria-label":"chart options","aria-expanded":Boolean(N),"aria-haspopup":"true",onClick:I,color:"primary",children:(0,r.jsx)(O,{name:"more_vert"})}),(0,r.jsxs)(s(),{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:N,open:Boolean(N),onClose:function(e){return I(e)},children:[(0,r.jsx)(h(),{className:"rustic-recharts-time-series-chart-toggle-title",children:"Chart Types:"}),Object.keys(k).map((function(e){return(0,r.jsxs)(u(),{value:e,selected:e===L,onClick:function(){return function(e){D(e),I()}(e)},children:[e.charAt(0).toUpperCase()+e.slice(1)," ","Chart"]},e)}))]})]}),(0,r.jsxs)(p(),{children:[T.title&&(0,r.jsx)(h(),{variant:"subtitle2",className:"rustic-recharts-time-series-title",children:T.title}),T.description&&(0,r.jsx)(h(),{variant:"caption",className:"rustic-recharts-time-series-description",children:T.description}),(0,r.jsx)(v.ResponsiveContainer,{aspect:f,width:T.width,maxHeight:c,minWidth:n,children:(0,r.jsxs)(K,{data:q,margin:T.chartContainerMargin,children:[(0,r.jsx)(v.XAxis,{dataKey:F,tickFormatter:function(e){return j(e,Z)},stroke:P.palette.text.primary}),(0,r.jsx)(v.YAxis,{domain:["auto","auto"],width:m,tickFormatter:T.yAxisTickFormatter,stroke:P.palette.text.primary}),(0,r.jsx)(v.Tooltip,{labelFormatter:function(e){return[j(e,Z)]},formatter:T.tooltipFormatter,contentStyle:{color:P.palette.common.black}}),(0,r.jsx)(v.Legend,{content:function(){return(0,r.jsx)(p(),{className:"rustic-recharts-time-series-legend",children:R.map((function(e,t){return(0,r.jsxs)(p(),{className:"rustic-recharts-time-series-legend-item",onClick:function(){return function(e){var t,r=B[e]&&!R.find((function(t){return t!==e&&B[t]}));if(function(e){return Object.values(e).every((function(e){return!0===e}))}(B)){for(var n={},i=0,a=R;i<a.length;i++){var o=a[i],c=o===e;n[o]=c}U(n)}else U(r?S(R):C(C({},B),((t={})[e]=!B[e],t)))}(e)},sx:{color:Y(e,t)},children:[(0,r.jsx)(O,{name:"crop_16_9"}),(0,r.jsx)(h(),{variant:"body2",display:"inline",sx:{textDecorationLine:z(e)},children:e})]},t)}))})}}),R.map((function(e,t){return B[e]?function(e,t){var n=t%T.chartColors.length,i=B[e]?T.chartColors[n]:"transparent",a={onClick:T.onClick,cursor:"pointer"};switch(L){case"line":return(0,r.jsx)(v.Line,{type:"monotone",isAnimationActive:!1,dataKey:e,name:e,dot:!1,stroke:i,activeDot:T.onClick&&a},e);case"bar":return(0,r.jsx)(v.Bar,{dataKey:e,fill:i,onClick:T.onClick&&a.onClick,cursor:T.onClick&&a.cursor},e);case"area":return(0,r.jsxs)(x.Fragment,{children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:"color".concat(e),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:i,stopOpacity:.8}),(0,r.jsx)("stop",{offset:"95%",stopColor:i,stopOpacity:0})]})}),(0,r.jsx)(v.Area,{isAnimationActive:!1,dataKey:e,type:"monotone",stroke:i,fillOpacity:1,fill:"url(#color".concat(e,")"),activeDot:T.onClick&&a},e)]},e)}}(e,t):null})),T.referenceLineYAxis&&T.referenceLineYAxis.map((function(e,t){return(0,r.jsx)(v.ReferenceLine,{y:e,label:T.referenceLineLabel&&T.referenceLineLabel[t],stroke:T.referenceLineColor&&T.referenceLineColor[t],strokeDasharray:"3 3",ifOverflow:"extendDomain",strokeWidth:T.referenceLineStrokeWidth&&T.referenceLineStrokeWidth[t],isFront:!0},t)}))]})})]})]})};return t})()));
|
|
@@ -62,15 +62,6 @@ export type TimeSeriesType = 'line' | 'bar' | 'area';
|
|
|
62
62
|
* npm i recharts
|
|
63
63
|
* ```
|
|
64
64
|
*/
|
|
65
|
-
declare function RechartsTimeSeries(props: RechartsTimeSeriesProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
-
declare namespace RechartsTimeSeries {
|
|
67
|
-
var defaultProps: {
|
|
68
|
-
minChartWidth: number;
|
|
69
|
-
maxHeight: number;
|
|
70
|
-
yAxisLabelWidth: number;
|
|
71
|
-
aspectRatio: number;
|
|
72
|
-
disableChartTypeToggle: boolean;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
65
|
+
declare function RechartsTimeSeries({ minChartWidth, maxHeight, yAxisLabelWidth, aspectRatio, disableChartTypeToggle, ...props }: RechartsTimeSeriesProps): import("react/jsx-runtime").JSX.Element;
|
|
75
66
|
export default RechartsTimeSeries;
|
|
76
67
|
//# sourceMappingURL=rechartsTimeSeries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rechartsTimeSeries.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/chart/rechartsTimeSeries.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AA6BjC,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,uBAAuB;IACtC,2MAA2M;IAC3M,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,kKAAkK;IAClK,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,uCAAuC;IACvC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,oPAAoP;IACpP,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,8HAA8H;IAC9H,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,qLAAqL;IACrL,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,2EAA2E;IAE3E,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACjC,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mEAAmE;IACnE,WAAW,CAAC,EAAE;QAAE,UAAU,EAAE,cAAc,EAAE,CAAA;KAAE,EAAE,CAAA;IAChD,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6DAA6D;IAC7D,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,cAAc,CAAA;IACjC,iJAAiJ;IACjJ,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9C,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpE,uHAAuH;IACvH,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"rechartsTimeSeries.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/chart/rechartsTimeSeries.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AA6BjC,MA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CAAA;IAChC,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,cAAc,CAAA;IACjC,iJAAiJ;IACjJ,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9C,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpE,uHAAuH;IACvH,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;AAyBpD;;;;;;;GAOG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,aAAoC,EACpC,SAA4B,EAC5B,eAAwC,EAExC,WAAoB,EACpB,sBAA8B,EAC9B,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAgUzB;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ParticipantRole:()=>m,ParticipantType:()=>b,default:()=>f});const n=require("react/jsx-runtime"),r=(require("@finos/perspective-viewer/dist/esm/perspective-viewer.inline.js"),require("@finos/perspective-viewer-datagrid"),require("@finos/perspective-viewer-d3fc"),require("@finos/perspective-viewer/dist/css/pro.css"),require("@finos/perspective-viewer/dist/css/pro-dark.css"),require("@finos/perspective/dist/esm/perspective.inline.js"));var o=e.n(r);const i=require("@mui/material/styles"),a=require("@mui/material/Typography");var s=e.n(a);const u=require("@mui/system/Stack");var c=e.n(u);const p=require("react");var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function d(e){return e?e.reduce((function(e,t){var n=t.dataKey,r=t.label;return e[n]=r||n,e}),{}):{}}var m,b;!function(e){e.Owner="owner",e.Member="member"}(m||(m={})),function(e){e.Human="human",e.Agent="agent"}(b||(b={}));const f=function(e){if(0===e.data.length)return(0,n.jsx)(s(),{variant:"body2",children:"No data available."});var t=(0,p.useRef)(null),r=(0,i.useTheme)(),a=(0,p.useState)(!1),u=a[0],m=a[1],b=r.palette.mode,f="dark"===b?"Pro Dark":"Pro Light",v=d(e.headers),g="\n /* General Button Styles */\n button, .button:hover, #editor-container, .editable, #settings_button {\n border-radius: 16px !important;\n color: ".concat(r.palette.text.primary," !important;\n /* TODO: add background color after updating the theme */\n }\n \n #settings_button {\n border: 1px solid ").concat(r.palette.primary.light," !important;\n }\n \n /* Hide border for aggregate Selector */\n .aggregate-selector:hover {\n border: none !important;\n }\n \n /* Input and Select Elements */\n input, select, .noselect, #add-expression, .dropdown-width-container, \n .pivot-column-border, .pivot-column, .column-selector-column-border {\n border-radius: 8px !important;\n }\n \n /* Change background color */\n #settings_panel, #column_settings_sidebar {\n background: ").concat("dark"===b?"dark":"white"," !important;\n background-image: none !important;\n }\n \n /* Expression Edit Button */\n .expression-edit-button {\n display: none;\n }\n \n /* Add padding to expression input */\n #editor-container, .editable {\n padding: 8px !important;\n }\n \n /* Change Button Font Size */\n .button select, .button {\n font-size: 12px !important;\n }\n \n /* Button and Icon Colors */\n #status_bar .hover-target:hover .button>span {\n display:none !important;\n }\n \n #status_bar .hover-target.modal-target .button>span {\n display:none !important;\n }\n \n .button select:hover, .psp-expression-editor__button:hover, \n .sidebar_close_button_inner:hover {\n background-color: ").concat(r.palette.primary.light," !important;\n }\n \n /* Hide unused buttons */\n #debug_open_button.sidebar_close_button, .reset-default-style-disabled, \n .expression-edit-button, #theme, #status, #status_bar .input-sizer {\n display: none !important;\n }\n \n #status_bar .hover-target:hover, #status_bar .hover-target.modal-target {\n height: fit-content !important;\n }\n\n /* Enable Scrolling */\n #plugin_selector_container.open, #status_bar, #menu-bar, #app_panel {\n overflow: auto !important;\n }\n\n #settings_button:hover {\n color: ").concat(r.palette.primary.contrastText," !important;\n background-color: ").concat(r.palette.primary.main," !important;\n }\n ");var h,y,_,x,j,w,S,O,k,q=e.config&&(y=(h=e.config).groupBy,_=h.splitBy,x=h.aggregates,j=h.sort,w=h.filter,S=h.columns,O=null==j?void 0:j.map((function(e){return[v[e[0]]||e[0],e[1]]})),k=x&&Object.fromEntries(Object.entries(x).map((function(e){var t=e[0],n=e[1];return[v[t]||t,n]}))),{group_by:null==y?void 0:y.map((function(e){return v[e]||e})),split_by:null==_?void 0:_.map((function(e){return v[e]||e})),aggregates:k,sort:O,filter:w&&function(e){return e.map((function(e){return[v[e[0]]||e[0],e[1],e[e.length-1]]}))}(w),columns:null==S?void 0:S.map((function(e){return v[e]||e}))});return(0,p.useEffect)((function(){o().worker().then((function(t){return t.table(function(e,t){var n=d(t);return e.map((function(e){for(var t={},r=0,o=Object.entries(e);r<o.length;r++){var i=o[r],a=i[0],s=i[1];t[n[a]||a]=s}return t}))}(e.data,e.headers))})).then((function(n){var r=t.current;r&&r.load(n).then((function(){r.restore(l(l({},q),{theme:f,title:e.title,settings:!1})).then((function(){var t,n=null===(t=e.config)||void 0===t?void 0:t.expansionDepth;if("number"==typeof n&&r.getView().then((function(e){return e.set_depth(n).then((function(){r.resize()}))})),r.shadowRoot){var o=new CSSStyleSheet;o.replaceSync(g),r.shadowRoot.adoptedStyleSheets.push(o)}}))})).catch((function(){m(!0)}))}))}),[e.data,f]),u?(0,n.jsx)(s(),{variant:"body2",children:"Failed to create table from data."}):(0,n.jsxs)(c(),{direction:"column",className:"rustic-perspective-viz",children:[e.title&&(0,n.jsx)(s(),{variant:"h6",children:e.title}),e.description&&(0,n.jsx)(s(),{variant:"body1",children:e.description}),(0,n.jsx)("perspective-viewer",{ref:t,style:{fontFamily:r.typography.fontFamily}})]})};return t})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perspectiveViz.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/perspectiveViz/perspectiveViz.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,iEAAiE,CAAA;AACxE,OAAO,oCAAoC,CAAA;AAC3C,OAAO,gCAAgC,CAAA;AACvC,OAAO,4CAA4C,CAAA;AACnD,OAAO,iDAAiD,CAAA;
|
|
1
|
+
{"version":3,"file":"perspectiveViz.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/perspectiveViz/perspectiveViz.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,iEAAiE,CAAA;AACxE,OAAO,oCAAoC,CAAA;AAC3C,OAAO,gCAAgC,CAAA;AACvC,OAAO,4CAA4C,CAAA;AACnD,OAAO,iDAAiD,CAAA;AAkBxD,OAAO,KAAK,EAEV,SAAS,EAET,WAAW,EAEZ,MAAM,aAAa,CAAA;AAiBpB,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EACpD,OAAO,CAAC,EAAE,WAAW,EAAE,qCAWxB;AAED;;;;;;;GAOG;AACH,iBAAS,cAAc,CAAC,KAAK,EAAE,SAAS,2CA2MvC;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>G});const r=require("react/jsx-runtime"),n=require("@mui/material/Typography");var o=e.n(n);const a=require("@mui/system/Box");var i=e.n(a);const c=require("@mui/system/Stack");var s=e.n(c);const l=require("@mui/system/useTheme");var u=e.n(l);const d=require("react"),p=require("react-dom/server"),m=require("vega-embed");var f=e.n(m);const v=require("dompurify");var h=e.n(v);const b=require("marked");function y(e){var t=e.replace(/^[\u200B-\u200F\uFEFF]/,""),r=b.marked.parse(t,{async:!1});return h().sanitize(r)}const x=function(e){var t=(0,d.useState)(y(e.text)),n=t[0],a=t[1];return(0,d.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){var t=e.updatedData[e.updatedData.length-1].text;a(y(t))}}),[e.text,e.updatedData]),(0,r.jsx)(o(),{variant:"body2",dangerouslySetInnerHTML:{__html:n}})},j=require("@mui/material"),g=require("@mui/material/Button");var O=e.n(g);const w=require("@mui/material/Drawer");var q=e.n(w);const S=require("@mui/material/IconButton");var k=e.n(S);const F=require("@mui/material/ListItemText");var N=e.n(F);const P=require("@mui/material/Menu");var D=e.n(P);const T=require("@mui/material/MenuItem");var I=e.n(T);const R=require("@mui/material/styles"),C=require("@mui/material/Tooltip");var M=e.n(C);const L=require("@mui/system");var _=function(){return _=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_.apply(this,arguments)};function B(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,r.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:_({},t),children:e.name})}var E=function(){return E=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},E.apply(this,arguments)};function z(e){var t=(0,d.useState)(!1),n=t[0],a=t[1],i=(0,d.useRef)(null),c=(0,R.useTheme)(),s=(0,j.useMediaQuery)(c.breakpoints.down("md")),l=s?q():D(),u={borderRadius:"".concat(c.shape.borderRadius,"px"),border:"1px solid ".concat(c.palette.divider)};function p(e){return(0,r.jsxs)(r.Fragment,{children:[e.startDecorator&&(0,r.jsx)(L.Box,{sx:{color:"primary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-start-icon",children:e.startDecorator}),(0,r.jsx)(N(),{children:(0,r.jsx)(o(),{variant:"body2",children:e.label})}),e.endDecorator&&(0,r.jsx)(L.Box,{sx:{color:"secondary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-end-icon",children:e.endDecorator})]})}s&&(u=E(E({},u),{borderRadius:"".concat(c.shape.borderRadius,"px ").concat(c.shape.borderRadius,"px 0 0"),borderBottom:0}));var m=e.menuItems.map((function(e){return e.href?(0,r.jsx)(I(),{component:"a",onClick:function(){return a(!1)},href:e.href,download:e.downloadFileName||e.isFiledownload,children:p(e)},e.label):(0,r.jsx)(I(),{onClick:function(t){e.onClick&&e.onClick(t),a(!1)},disabled:!e.onClick,children:p(e)},e.label)}));var f,v,h=s?{}:{anchorEl:i.current};return(0,r.jsxs)(r.Fragment,{children:[(f={onClick:function(e){e.stopPropagation(),a(!0)},"aria-label":e.ariaLabel,ref:i,className:"rustic-popover-menu-button"},v=(0,r.jsx)(B,{name:"more_vert"}),e.buttonText?(0,r.jsx)(O(),E({},f,{startIcon:e.icon?e.icon:null,children:e.buttonText})):(0,r.jsx)(M(),{title:e.ariaLabel,children:(0,r.jsx)(k(),E({},f,{children:e.icon?e.icon:v}))})),(0,r.jsx)(l,E({open:n,onClose:function(){return a(!1)}},h,{anchor:"bottom",className:"rustic-popover-menu",sx:{"& .MuiPaper-root":E(E({},u),{backgroundImage:"none",boxShadow:c.shadows[2]})},children:m}))]})}var A=function(){return A=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},A.apply(this,arguments)};const G=function(e){var t=e.theme,n=void 0===t?{dark:"dark"}:t,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["theme"]),c=(0,d.useRef)(null),l=(0,d.useState)(!1),m=l[0],v=l[1],h=u()(),b="dark"===h.palette.mode,y=h.typography.fontFamily,j={backgroundColor:h.palette.primary.main,color:h.palette.background.paper,borderRadius:h.shape.borderRadius+"px",padding:"4px 8px",fontSize:h.typography.caption.fontSize,fontFamily:y,fontWeight:h.typography.caption.fontWeight},g={formatTooltip:function(e,t){return(0,p.renderToStaticMarkup)((0,r.jsx)("div",{role:"tooltip",className:"rustic-vega-lite-tooltip-content",style:j,children:Object.entries(e).map((function(e){var n=e[0],o=e[1];return(0,r.jsxs)("div",{children:[(0,r.jsxs)("strong",{children:[t(n),":"]})," ",t(o)]},n)}))}))},disableDefaultStyle:!0,id:"rustic-vega-lite-tooltip"},O=[{label:"Save as SVG"},{label:"Save as PNG"}];function w(){var e,t;if(c.current&&a.spec){var r=A(A({config:{font:y}},a.options),{theme:b?n.dark:n.light,tooltip:g,actions:!1});(null===(t=null===(e=a.options)||void 0===e?void 0:e.config)||void 0===t?void 0:t.font)||(r.config.font=y);var o=A({},a.spec);delete o.title,f()(c.current,o,r).then((function(e){var t=e.embedOptions,r=e.embedOptions.downloadFileName||"visualization";["svg","png"].map((function(n,o){var a="object"==typeof t.scaleFactor?t.scaleFactor[n]:t.scaleFactor;e.view.toImageURL(n,a).then((function(e){O[o].href=e,O[o].downloadFileName="".concat(r,".").concat(n)}))})),v(!1)})).catch((function(){v(!0)}))}}return(0,d.useEffect)((function(){function e(){w()}return w(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[a.spec,b]),m?(0,r.jsx)(o(),{variant:"body2",children:"Failed to load the chart."}):(0,r.jsxs)(s(),{direction:"column",className:"rustic-vega-lite-container",children:[(0,r.jsx)(i(),{justifyContent:"end",display:"flex",children:(0,r.jsx)(z,{menuItems:O,ariaLabel:"Download options"})}),a.title&&(0,r.jsx)(o(),{variant:"h6",children:a.title}),a.description&&(0,r.jsx)(x,{text:a.description}),(0,r.jsxs)(i(),{textAlign:"center",mt:1,children:["string"==typeof a.spec.title&&(0,r.jsx)(o(),{variant:"subtitle2",children:a.spec.title}),a.spec.description&&(0,r.jsx)(o(),{variant:"caption",children:a.spec.description})]}),(0,r.jsx)("div",{ref:c,className:"rustic-vega-lite"})]})};return t})()));
|
|
@@ -8,13 +8,6 @@ import type { VegaLiteData } from './vegaLiteViz.types';
|
|
|
8
8
|
* npm i vega-embed marked dompurify
|
|
9
9
|
* ```
|
|
10
10
|
*/
|
|
11
|
-
declare function VegaLiteViz(props: VegaLiteData): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
declare namespace VegaLiteViz {
|
|
13
|
-
var defaultProps: {
|
|
14
|
-
theme: {
|
|
15
|
-
dark: "dark";
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
}
|
|
11
|
+
declare function VegaLiteViz({ theme, ...props }: VegaLiteData): import("react/jsx-runtime").JSX.Element;
|
|
19
12
|
export default VegaLiteViz;
|
|
20
13
|
//# sourceMappingURL=vegaLiteViz.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vegaLiteViz.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/vegaLiteViz/vegaLiteViz.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAa1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;;;;GAOG;AACH,iBAAS,WAAW,CAAC,KAAK,EAAE,YAAY,2CA+
|
|
1
|
+
{"version":3,"file":"vegaLiteViz.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/vegaLiteViz/vegaLiteViz.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAa1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;;;;;;GAOG;AACH,iBAAS,WAAW,CAAC,EACnB,KAEC,EACD,GAAG,KAAK,EACT,EAAE,YAAY,2CA+Hd;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{ParticipantRole:()=>k,ParticipantType:()=>F,default:()=>_});const t=require("react/jsx-runtime"),n=require("@mui/material/Box");var a=e.n(n);const i=require("@mui/material/Card");var o=e.n(i);const c=require("@mui/material/Stack");var s=e.n(c);const u=require("@mui/material/Typography");var l=e.n(u);const m=require("react");var d;function p(e){var r=["Sun","Mon","Tues","Wed","Thurs","Fri","Sat"][new Date(1e3*e).getDay()];return{shortName:r,fullName:{Sun:"Sunday",Mon:"Monday",Tues:"Tuesday",Wed:"Wednesday",Thurs:"Thursday",Fri:"Friday",Sat:"Saturday"}[r]}}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(d||(d={}));var h=function(){return h=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},h.apply(this,arguments)};function x(e){e.name.replaceAll("_","-");var r={};return e.color&&(r={color:e.color}),(0,t.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:h({},r),children:e.name})}const v=require("@mui/material"),f=require("@mui/material/Button");var b=e.n(f);const y=require("@mui/material/Drawer");var j=e.n(y);const w=require("@mui/material/IconButton");var g=e.n(w);const N=require("@mui/material/ListItemText");var T=e.n(N);const O=require("@mui/material/Menu");var S=e.n(O);const q=require("@mui/material/MenuItem");var M=e.n(q);const I=require("@mui/material/styles"),D=require("@mui/material/Tooltip");var C=e.n(D);const P=require("@mui/system");var k,F,R=function(){return R=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},R.apply(this,arguments)};function H(e){var r=(0,m.useState)(!1),n=r[0],a=r[1],i=(0,m.useRef)(null),o=(0,I.useTheme)(),c=(0,v.useMediaQuery)(o.breakpoints.down("md")),s=c?j():S(),u={borderRadius:"".concat(o.shape.borderRadius,"px"),border:"1px solid ".concat(o.palette.divider)};function d(e){return(0,t.jsxs)(t.Fragment,{children:[e.startDecorator&&(0,t.jsx)(P.Box,{sx:{color:"primary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-start-icon",children:e.startDecorator}),(0,t.jsx)(T(),{children:(0,t.jsx)(l(),{variant:"body2",children:e.label})}),e.endDecorator&&(0,t.jsx)(P.Box,{sx:{color:"secondary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-end-icon",children:e.endDecorator})]})}c&&(u=R(R({},u),{borderRadius:"".concat(o.shape.borderRadius,"px ").concat(o.shape.borderRadius,"px 0 0"),borderBottom:0}));var p=e.menuItems.map((function(e){return e.href?(0,t.jsx)(M(),{component:"a",onClick:function(){return a(!1)},href:e.href,download:e.downloadFileName||e.isFiledownload,children:d(e)},e.label):(0,t.jsx)(M(),{onClick:function(r){e.onClick&&e.onClick(r),a(!1)},disabled:!e.onClick,children:d(e)},e.label)}));var h,f,y=c?{}:{anchorEl:i.current};return(0,t.jsxs)(t.Fragment,{children:[(h={onClick:function(e){e.stopPropagation(),a(!0)},"aria-label":e.ariaLabel,ref:i,className:"rustic-popover-menu-button"},f=(0,t.jsx)(x,{name:"more_vert"}),e.buttonText?(0,t.jsx)(b(),R({},h,{startIcon:e.icon?e.icon:null,children:e.buttonText})):(0,t.jsx)(C(),{title:e.ariaLabel,children:(0,t.jsx)(g(),R({},h,{children:e.icon?e.icon:f}))})),(0,t.jsx)(s,R({open:n,onClose:function(){return a(!1)}},y,{anchor:"bottom",className:"rustic-popover-menu",sx:{"& .MuiPaper-root":R(R({},u),{backgroundImage:"none",boxShadow:o.shadows[2]})},children:p}))]})}!function(e){e.Owner="owner",e.Member="member"}(k||(k={})),function(e){e.Human="human",e.Agent="agent"}(F||(F={}));const _=function(e){var r=(0,m.useState)(e.units),n=r[0],i=r[1];function c(r){return"metric"===e.units&&"imperial"===n?Math.round(1.8*r+32):"imperial"===e.units&&"metric"===n?Math.round(r*(5/9)-32):Math.round(r)}var u=new Date(1e3*e.weather[0].timestamp),d=p(e.weather[0].timestamp).shortName,h=u.getDate(),v=u.getFullYear().toString().slice(2),f="".concat(d," ").concat(h,"/").concat(v," TODAY"),b="HIGH: ".concat(c(e.weather[0].temp.high)," / LOW: ").concat(c(e.weather[0].temp.high)),y=e.weather.map((function(e,r){if(0!==r)return(0,t.jsxs)(o(),{variant:"outlined",className:"rustic-daily-weather-card",children:[(0,t.jsx)(l(),{variant:"h5",component:"span",color:"text.secondary","aria-label":p(e.timestamp).fullName,children:p(e.timestamp).shortName}),(0,t.jsx)("img",{src:e.weatherIcon.icon,alt:e.weatherIcon.description}),(0,t.jsxs)(l(),{variant:"body2",color:"text.secondary",children:["High: ",c(e.temp.high),"°"]}),(0,t.jsxs)(l(),{variant:"body2",color:"text.secondary",children:["Low: ",c(e.temp.low),"°"]})]},r)}));return(0,t.jsxs)(o(),{variant:"outlined",className:"rustic-weather",children:[(0,t.jsx)(H,{ariaLabel:"Temperature units",menuItems:[{label:"Celsius",endDecorator:"°C",onClick:function(){return i("metric")}},{label:"Fahrenheit",endDecorator:"°F",onClick:function(){return i("imperial")}}]}),(0,t.jsxs)(s(),{alignItems:"center",children:[(0,t.jsx)(l(),{variant:"h4",component:"span",children:e.location}),(0,t.jsxs)(s(),{direction:"row",alignItems:"center",spacing:1,className:"rustic-current-weather-description",children:[(0,t.jsx)("img",{src:e.weather[0].weatherIcon.icon,alt:""}),(0,t.jsx)(l(),{variant:"body2",children:e.weather[0].weatherIcon.description})]}),e.weather[0].temp.current&&(0,t.jsxs)(l(),{variant:"h1",component:"span",className:"rustic-current-temp",children:[c(e.weather[0].temp.current),"°",function(e){switch(e){case"imperial":return"F";case"metric":return"C"}}(n)]}),(0,t.jsxs)(s(),{direction:"row",spacing:2,children:[(0,t.jsx)(l(),{variant:"overline",children:f}),(0,t.jsx)(l(),{variant:"overline",children:b})]})]}),(0,t.jsx)(a(),{className:"rustic-daily-weather-container",children:y}),e.weatherProvider&&(0,t.jsxs)(s(),{alignItems:"center",direction:"row",spacing:1,alignSelf:"center",className:"rustic-weather-attribution",children:[(0,t.jsx)(x,{name:"cloud"}),(0,t.jsx)(l(),{variant:"body2",children:"Weather data provided by ".concat(e.weatherProvider)})]})]})};return r})()));
|
package/dist/index.css
CHANGED
|
@@ -98,6 +98,17 @@ code {
|
|
|
98
98
|
margin-right: -8px;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
.rustic-participant-profile {
|
|
102
|
+
display: flex;
|
|
103
|
+
gap: 8px;
|
|
104
|
+
align-items: center;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.rustic-participant-profile .rustic-participant-avatar {
|
|
108
|
+
width: 16px;
|
|
109
|
+
height: 16px;
|
|
110
|
+
}
|
|
111
|
+
|
|
101
112
|
.rustic-multimodal-input .rustic-bottom-buttons {
|
|
102
113
|
display: flex;
|
|
103
114
|
justify-content: space-between;
|
|
@@ -184,6 +195,13 @@ code {
|
|
|
184
195
|
align-self: start;
|
|
185
196
|
}
|
|
186
197
|
|
|
198
|
+
.rustic-suggestion-menu ul {
|
|
199
|
+
padding: 0;
|
|
200
|
+
max-height: 220px;
|
|
201
|
+
min-width: 220px;
|
|
202
|
+
overflow-y: auto;
|
|
203
|
+
}
|
|
204
|
+
|
|
187
205
|
emoji-picker {
|
|
188
206
|
--border-color: transparent;
|
|
189
207
|
--outline-size: 1px;
|