@rustic-ai/ui-components 0.0.39 → 0.0.41
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/dynamicForm/index.js +1 -1
- package/dist/components/dynamicForm/uniformsForm.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/baseInput/baseInput.d.ts.map +1 -1
- package/dist/components/input/multimodal/multimodalInput/index.js +1 -1
- package/dist/components/input/multimodal/multimodalInput/multimodalInput.d.ts.map +1 -1
- package/dist/components/input/textInput/index.js +1 -1
- package/dist/components/input/textInput/textInput.d.ts.map +1 -1
- package/dist/components/messageSpace/index.js +1 -1
- package/dist/components/sharedDescription.d.ts +1 -0
- package/dist/components/sharedDescription.d.ts.map +1 -1
- package/dist/index.css +0 -40
- package/dist/index.js +1 -1
- package/package.json +2 -7
- package/dist/components/video/index.css +0 -49
- package/dist/components/video/index.d.ts +0 -3
- package/dist/components/video/index.d.ts.map +0 -1
- package/dist/components/video/index.js +0 -1
- package/dist/components/video/youtubeVideo.d.ts +0 -23
- package/dist/components/video/youtubeVideo.d.ts.map +0 -1
- package/dist/components/visualization/chart/index.css +0 -49
- package/dist/components/visualization/chart/index.d.ts +0 -4
- package/dist/components/visualization/chart/index.d.ts.map +0 -1
- package/dist/components/visualization/chart/index.js +0 -1
- package/dist/components/visualization/chart/rechartsTimeSeries.d.ts +0 -69
- package/dist/components/visualization/chart/rechartsTimeSeries.d.ts.map +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
body {
|
|
2
|
-
margin: 0;
|
|
3
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
-
sans-serif;
|
|
6
|
-
-webkit-font-smoothing: antialiased;
|
|
7
|
-
-moz-osx-font-smoothing: grayscale;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
code {
|
|
11
|
-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
-
monospace;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.rustic-fit-container {
|
|
16
|
-
object-fit: contain;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: 100%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.rustic-files {
|
|
22
|
-
display: flex;
|
|
23
|
-
gap: 8px;
|
|
24
|
-
flex-wrap: wrap;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.rustic-cursor-pointer {
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.rustic-align-self-center {
|
|
32
|
-
align-self: center;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.rustic-shift-to-right-by-8 {
|
|
36
|
-
margin-right: -8px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.rustic-participant-profile {
|
|
40
|
-
display: flex;
|
|
41
|
-
gap: 8px;
|
|
42
|
-
align-items: center;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.rustic-participant-profile .rustic-participant-avatar {
|
|
46
|
-
width: 16px;
|
|
47
|
-
height: 16px;
|
|
48
|
-
}
|
|
49
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/video/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,eAAe,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
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})()));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import '../../index.css';
|
|
2
|
-
export interface YoutubeVideoProps {
|
|
3
|
-
/** The string after "?v=" parameter of YouTube URLs. */
|
|
4
|
-
youtubeVideoId: string;
|
|
5
|
-
/** Width rendered in pixels. If neither width nor height are provided, the video will be set to be contained in the parent container. */
|
|
6
|
-
width?: number;
|
|
7
|
-
/** Height rendered in pixels. */
|
|
8
|
-
height?: number;
|
|
9
|
-
/** Title of the video used for assistive technology. */
|
|
10
|
-
title?: string;
|
|
11
|
-
}
|
|
12
|
-
/** > **Deprecated:** Use `Video` component instead. This component will be removed in the next release.
|
|
13
|
-
*
|
|
14
|
-
* The `YoutubeVideo` component enables the embedding of YouTube videos, providing a seamless playback experience.
|
|
15
|
-
*
|
|
16
|
-
* Note: `dompurify` is not bundled, so please install the following package using npm:
|
|
17
|
-
*
|
|
18
|
-
* ```typescript
|
|
19
|
-
* npm i dompurify
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export default function YoutubeVideo({ title, ...props }: YoutubeVideoProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
//# sourceMappingURL=youtubeVideo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAwB,EACxB,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAanB"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
.rustic-recharts-time-series {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.rustic-recharts-time-series-chart-toggle {
|
|
7
|
-
align-self: end;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.rustic-recharts-time-series-chart-toggle-title {
|
|
11
|
-
padding: 6px 16px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.rustic-recharts-time-series-title {
|
|
15
|
-
text-align: center;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.rustic-recharts-time-series-description {
|
|
19
|
-
padding: 16px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.rustic-recharts-time-series-legend {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-wrap: wrap;
|
|
25
|
-
gap: 8px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.rustic-recharts-time-series-legend-item {
|
|
29
|
-
display: flex;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.recharts-responsive-container {
|
|
33
|
-
font-size: 12px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.recharts-legend-wrapper {
|
|
37
|
-
display: flex;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
span.rustic-icon-large {
|
|
42
|
-
font-size: 32px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.rustic-markdown p {
|
|
46
|
-
margin-block-start: 0;
|
|
47
|
-
margin-block-end: 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,kBAAkB,MAAM,sBAAsB,CAAA;AAErD,eAAe,kBAAkB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
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:()=>N});const r=require("react/jsx-runtime"),n=require("@mui/material/FormControl");var a=e.n(n);const i=require("@mui/material/IconButton");var o=e.n(i);const c=require("@mui/material/Menu");var s=e.n(c);const l=require("@mui/material/MenuItem");var u=e.n(l);const d=require("@mui/material/Typography");var m=e.n(d);const p=require("@mui/system/Box");var f=e.n(p);const h=require("@mui/system/useTheme");var y=e.n(h);const x=require("react"),v=require("recharts");var g;function j(e,t){return function(e,t){var r,n=new Date(e),a=navigator.language;return r=t===g.HOUR?{hour:"numeric",minute:"2-digit",hour12:!0}:{month:"short",day:"numeric"},n.toLocaleString(a,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 a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);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})}const C=require("dompurify");var k=e.n(C);const S=require("marked");function T(e){var t=e.replace(/^[\u200B-\u200F\uFEFF]/,""),r=S.marked.parse(t,{async:!1});return k().sanitize(r)}const A=function(e){var t=(0,x.useState)(T(e.text)),n=t[0],a=t[1];return(0,x.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){var t=e.updatedData[e.updatedData.length-1].text;a(T(t))}}),[e.text,e.updatedData]),(0,r.jsx)(m(),{variant:"body1",className:"rustic-markdown",dangerouslySetInnerHTML:{__html:n}})};var D=function(){return D=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},D.apply(this,arguments)},L={line:v.LineChart,bar:v.BarChart,area:v.AreaChart};function w(e){var t={};return e.forEach((function(e){t[e]=!0})),t}const N=function(e){var t=e.minChartWidth,n=void 0===t?200:t,i=e.maxHeight,c=void 0===i?600:i,l=e.yAxisLabelWidth,d=void 0===l?30:l,p=e.aspectRatio,h=void 0===p?16/9:p,g=e.disableChartTypeToggle,b=void 0!==g&&g,C=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 a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}(e,["minChartWidth","maxHeight","yAxisLabelWidth","aspectRatio","disableChartTypeToggle"]),k=(0,x.useState)(C.defaultChartType||"line"),S=k[0],T=k[1],N=(0,x.useState)(null),_=N[0],q=N[1],F=(0,x.useState)(C.timeSeries),M=F[0],H=F[1],E=y()(),P=M.length>0?Object.keys(M[0]):[],R=P[0],W=P.slice(1),B=(0,x.useState)(w(W)),U=B[0],I=B[1];(0,x.useEffect)((function(){if(C.updatedData&&C.updatedData.length>0){var e=function(e,t,r){if(r||2===arguments.length)for(var n,a=0,i=t.length;a<i;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}([],C.timeSeries,!0);C.updatedData.forEach((function(t){e=e.concat(t.timeSeries),H(e)}))}}),[C.timeSeries,C.updatedData]);var K=L[S];function z(e){_?q(null):e&&q(e.currentTarget)}function Y(e,t){return U[e]?C.chartColors[t%C.chartColors.length]:"grey"}function G(e){return U[e]?"none":"line-through"}if(0===M.length)return(0,r.jsx)(m(),{variant:"body2",children:"No data available"});var X,J,Q,V,Z=C.timeSeries[C.timeSeries.length-1],$=(X=C.timeSeries[0][R],J=Z[R],Q=new Date(X),V=new Date(J),Math.round(Math.abs((V.getTime()-Q.getTime())/864e5)));return(0,r.jsxs)(f(),{className:"rustic-recharts-time-series",children:[!b&&(0,r.jsxs)(a(),{className:"rustic-recharts-time-series-chart-toggle",children:[(0,r.jsx)(o(),{"aria-label":"chart options","aria-expanded":Boolean(_),"aria-haspopup":"true",onClick:z,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:_,open:Boolean(_),onClose:function(e){return z(e)},children:[(0,r.jsx)(m(),{className:"rustic-recharts-time-series-chart-toggle-title",children:"Chart Types:"}),Object.keys(L).map((function(e){return(0,r.jsxs)(u(),{value:e,selected:e===S,onClick:function(){return function(e){T(e),z()}(e)},children:[e.charAt(0).toUpperCase()+e.slice(1)," ","Chart"]},e)}))]})]}),(0,r.jsxs)(f(),{children:[C.title&&(0,r.jsx)(m(),{variant:"h6",className:"rustic-recharts-time-series-title",children:C.title}),C.description&&(0,r.jsx)(A,{text:C.description}),(0,r.jsx)(v.ResponsiveContainer,{aspect:h,width:C.width,maxHeight:c,minWidth:n,children:(0,r.jsxs)(K,{data:M,margin:C.chartContainerMargin,children:[(0,r.jsx)(v.XAxis,{dataKey:R,tickFormatter:function(e){return j(e,$)},stroke:E.palette.text.primary}),(0,r.jsx)(v.YAxis,{domain:["auto","auto"],width:d,tickFormatter:C.yAxisTickFormatter,stroke:E.palette.text.primary}),(0,r.jsx)(v.Tooltip,{labelFormatter:function(e){return[j(e,$)]},formatter:C.tooltipFormatter,contentStyle:{color:E.palette.common.black}}),(0,r.jsx)(v.Legend,{content:function(){return(0,r.jsx)(f(),{className:"rustic-recharts-time-series-legend",children:W.map((function(e,t){return(0,r.jsxs)(f(),{className:"rustic-recharts-time-series-legend-item",onClick:function(){return function(e){var t,r=U[e]&&!W.find((function(t){return t!==e&&U[t]}));if(function(e){return Object.values(e).every((function(e){return!0===e}))}(U)){for(var n={},a=0,i=W;a<i.length;a++){var o=i[a],c=o===e;n[o]=c}I(n)}else I(r?w(W):D(D({},U),((t={})[e]=!U[e],t)))}(e)},sx:{color:Y(e,t)},children:[(0,r.jsx)(O,{name:"crop_16_9"}),(0,r.jsx)(m(),{variant:"body2",display:"inline",sx:{textDecorationLine:G(e)},children:e})]},t)}))})}}),W.map((function(e,t){return U[e]?function(e,t){var n=t%C.chartColors.length,a=U[e]?C.chartColors[n]:"transparent",i={onClick:C.onClick,cursor:"pointer"};switch(S){case"line":return(0,r.jsx)(v.Line,{type:"monotone",isAnimationActive:!1,dataKey:e,name:e,dot:!1,stroke:a,activeDot:C.onClick&&i},e);case"bar":return(0,r.jsx)(v.Bar,{dataKey:e,fill:a,onClick:C.onClick&&i.onClick,cursor:C.onClick&&i.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:a,stopOpacity:.8}),(0,r.jsx)("stop",{offset:"95%",stopColor:a,stopOpacity:0})]})}),(0,r.jsx)(v.Area,{isAnimationActive:!1,dataKey:e,type:"monotone",stroke:a,fillOpacity:1,fill:"url(#color".concat(e,")"),activeDot:C.onClick&&i},e)]},e)}}(e,t):null})),C.referenceLineYAxis&&C.referenceLineYAxis.map((function(e,t){return(0,r.jsx)(v.ReferenceLine,{y:e,label:C.referenceLineLabel&&C.referenceLineLabel[t],stroke:C.referenceLineColor&&C.referenceLineColor[t],strokeDasharray:"3 3",ifOverflow:"extendDomain",strokeWidth:C.referenceLineStrokeWidth&&C.referenceLineStrokeWidth[t],isFront:!0},t)}))]})})]})]})};return t})()));
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import './rechartsTimeSeries.css';
|
|
2
|
-
export interface TimeSeriesData {
|
|
3
|
-
timestamp: number;
|
|
4
|
-
[key: string]: number;
|
|
5
|
-
}
|
|
6
|
-
export interface Margin {
|
|
7
|
-
top?: number;
|
|
8
|
-
right?: number;
|
|
9
|
-
bottom?: number;
|
|
10
|
-
left?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface RechartsTimeSeriesProps {
|
|
13
|
-
/** Data to be displayed in the time series chart. The first field is used as the x-axis field. We currently support formatting timestamps in milliseconds. Other data types will be displayed as given. */
|
|
14
|
-
timeSeries: TimeSeriesData[];
|
|
15
|
-
/** An array containing a predefined set of Hex color codes or string colors (e.g. 'blue'). The colors will be applied to the keys of the data object in order. */
|
|
16
|
-
chartColors: string[];
|
|
17
|
-
/** Array of y-axis reference lines. */
|
|
18
|
-
referenceLineYAxis?: number[];
|
|
19
|
-
/** Array of y-axis reference line colors. Hex color codes and string colors are both supported for defining colors. If not provided, all lines default to grey. Skip providing a custom color for a certain y-axis by providing an empty string. */
|
|
20
|
-
referenceLineColor?: string[];
|
|
21
|
-
/** Array of y-axis reference line labels. Skip providing a custom label for a certain y-axis by providing an empty string. */
|
|
22
|
-
referenceLineLabel?: string[];
|
|
23
|
-
/** Array of y-axis reference line stroke widths. If not provided, all lines default to 1. Skip providing a custom stroke width for a certain y-axis by providing an empty string. */
|
|
24
|
-
referenceLineStrokeWidth?: number[];
|
|
25
|
-
/** Title of the time series chart. */
|
|
26
|
-
title?: string;
|
|
27
|
-
/** Description of the time series chart. */
|
|
28
|
-
description?: string;
|
|
29
|
-
/** Callback function to be called when a point on the graph is clicked. */
|
|
30
|
-
onClick?: (...args: any[]) => any;
|
|
31
|
-
/** Width of the y-axis labels in pixels. */
|
|
32
|
-
yAxisLabelWidth?: number;
|
|
33
|
-
/** Minimum width of the chart in pixels. */
|
|
34
|
-
minChartWidth?: number;
|
|
35
|
-
/** Maximum width of the chart in pixels. */
|
|
36
|
-
maxHeight?: number;
|
|
37
|
-
/** Updated data will be added to the original time series data. */
|
|
38
|
-
updatedData?: {
|
|
39
|
-
timeSeries: TimeSeriesData[];
|
|
40
|
-
}[];
|
|
41
|
-
/** Aspect ratio of the chart. */
|
|
42
|
-
aspectRatio?: number;
|
|
43
|
-
/** Width of the chart in pixels. */
|
|
44
|
-
width?: number;
|
|
45
|
-
/** Chart type toggle will be hidden if the value is true. */
|
|
46
|
-
disableChartTypeToggle?: boolean;
|
|
47
|
-
/** Define the default chart type: `line`, `bar`, or `area`. */
|
|
48
|
-
defaultChartType?: TimeSeriesType;
|
|
49
|
-
/** Pass a function to format y-axis label. Make sure to use tooltipFormatter and yAxisTickFormatter together so that the numbers are uniform. */
|
|
50
|
-
yAxisTickFormatter?: (value: number) => string;
|
|
51
|
-
/** Pass a function to format tooltip content. */
|
|
52
|
-
tooltipFormatter?: (value: number, name: string) => [string, string];
|
|
53
|
-
/** Margin of chart container in pixels. For example, adding left margin could show larger numbered labels properly. */
|
|
54
|
-
chartContainerMargin?: Margin;
|
|
55
|
-
}
|
|
56
|
-
export type TimeSeriesType = 'line' | 'bar' | 'area';
|
|
57
|
-
/** > **Deprecated:** Use other visualization components instead. This component will be removed in the next release.
|
|
58
|
-
*
|
|
59
|
-
* The `RechartsTimeSeries` component integrates the [Recharts](https://recharts.org/en-US/api) library to facilitate the visualization of time-based data through various chart types such as line charts, bar charts, and area charts. It supports customizations for reference lines, tooltips, and chart type toggling, providing a flexible and interactive data representation solution.
|
|
60
|
-
*
|
|
61
|
-
* Note: `Recharts` is not bundled, so please install the following package using npm:
|
|
62
|
-
*
|
|
63
|
-
* ```
|
|
64
|
-
* npm i recharts
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
declare function RechartsTimeSeries({ minChartWidth, maxHeight, yAxisLabelWidth, aspectRatio, disableChartTypeToggle, ...props }: RechartsTimeSeriesProps): import("react/jsx-runtime").JSX.Element;
|
|
68
|
-
export default RechartsTimeSeries;
|
|
69
|
-
//# sourceMappingURL=rechartsTimeSeries.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rechartsTimeSeries.d.ts","sourceRoot":"","sources":["../../../../src/components/visualization/chart/rechartsTimeSeries.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AA8BjC,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;AAyBpD;;;;;;;;;GASG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,aAAoC,EACpC,SAA4B,EAC5B,eAAwC,EAExC,WAAoB,EACpB,sBAA8B,EAC9B,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAyTzB;AAED,eAAe,kBAAkB,CAAA"}
|