@perses-dev/tracing-gantt-chart-plugin 0.6.0
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/LICENSE +201 -0
- package/README.md +41 -0
- package/__mf/css/async/341.6c6463ea.css +1 -0
- package/__mf/css/async/759.6c6463ea.css +1 -0
- package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
- package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
- package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
- package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
- package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
- package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
- package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
- package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
- package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
- package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
- package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
- package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
- package/__mf/js/788.91bbf7bd.js +5 -0
- package/__mf/js/TracingGanttChart.1a922a19.js +5 -0
- package/__mf/js/async/156.5a401ecb.js +1 -0
- package/__mf/js/async/173.6314a363.js +2 -0
- package/__mf/js/async/173.6314a363.js.LICENSE.txt +19 -0
- package/__mf/js/async/620.1d1ce390.js +2 -0
- package/__mf/js/async/620.1d1ce390.js.LICENSE.txt +9 -0
- package/__mf/js/async/651.3ea371e5.js +1 -0
- package/__mf/js/async/694.4580ad20.js +1 -0
- package/__mf/js/async/740.babbb403.js +1 -0
- package/__mf/js/async/75.d81e6bbf.js +1 -0
- package/__mf/js/async/770.5431adef.js +1 -0
- package/__mf/js/async/783.3c2c57f6.js +110 -0
- package/__mf/js/async/783.3c2c57f6.js.LICENSE.txt +27 -0
- package/__mf/js/async/844.556cc34d.js +66 -0
- package/__mf/js/async/844.556cc34d.js.LICENSE.txt +84 -0
- package/__mf/js/async/928.096f73eb.js +1 -0
- package/__mf/js/async/960.478a8f11.js +2 -0
- package/__mf/js/async/960.478a8f11.js.LICENSE.txt +8 -0
- package/__mf/js/async/964.a98cab40.js +2 -0
- package/__mf/js/async/964.a98cab40.js.LICENSE.txt +9 -0
- package/__mf/js/async/981.bc5132f8.js +2 -0
- package/__mf/js/async/981.bc5132f8.js.LICENSE.txt +8 -0
- package/__mf/js/async/__federation_expose_TracingGanttChart.5ab86c44.js +1 -0
- package/__mf/js/async/lib-router.36c0d526.js +2 -0
- package/__mf/js/async/lib-router.36c0d526.js.LICENSE.txt +32 -0
- package/__mf/js/main.e75dea7b.js +1 -0
- package/lib/TracingGanttChart/DetailPane/Attributes.d.ts +9 -0
- package/lib/TracingGanttChart/DetailPane/Attributes.d.ts.map +1 -0
- package/lib/TracingGanttChart/DetailPane/Attributes.js +66 -0
- package/lib/TracingGanttChart/DetailPane/Attributes.js.map +1 -0
- package/lib/TracingGanttChart/DetailPane/DetailPane.d.ts +14 -0
- package/lib/TracingGanttChart/DetailPane/DetailPane.d.ts.map +1 -0
- package/lib/TracingGanttChart/DetailPane/DetailPane.js +95 -0
- package/lib/TracingGanttChart/DetailPane/DetailPane.js.map +1 -0
- package/lib/TracingGanttChart/DetailPane/SpanEvents.d.ts +8 -0
- package/lib/TracingGanttChart/DetailPane/SpanEvents.d.ts.map +1 -0
- package/lib/TracingGanttChart/DetailPane/SpanEvents.js +54 -0
- package/lib/TracingGanttChart/DetailPane/SpanEvents.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts +13 -0
- package/lib/TracingGanttChart/GanttTable/GanttTable.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTable.js +93 -0
- package/lib/TracingGanttChart/GanttTable/GanttTable.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.d.ts +12 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js +56 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableHeader.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts +23 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js +45 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableProvider.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts +15 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.js +56 -0
- package/lib/TracingGanttChart/GanttTable/GanttTableRow.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.d.ts +9 -0
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.js +86 -0
- package/lib/TracingGanttChart/GanttTable/ResizableDivider.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/SpanDuration.d.ts +14 -0
- package/lib/TracingGanttChart/GanttTable/SpanDuration.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/SpanDuration.js +75 -0
- package/lib/TracingGanttChart/GanttTable/SpanDuration.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/SpanIndents.d.ts +14 -0
- package/lib/TracingGanttChart/GanttTable/SpanIndents.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/SpanIndents.js +90 -0
- package/lib/TracingGanttChart/GanttTable/SpanIndents.js.map +1 -0
- package/lib/TracingGanttChart/GanttTable/SpanName.d.ts +11 -0
- package/lib/TracingGanttChart/GanttTable/SpanName.d.ts.map +1 -0
- package/lib/TracingGanttChart/GanttTable/SpanName.js +61 -0
- package/lib/TracingGanttChart/GanttTable/SpanName.js.map +1 -0
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.d.ts +13 -0
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.d.ts.map +1 -0
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.js +243 -0
- package/lib/TracingGanttChart/MiniGanttChart/Canvas.js.map +1 -0
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.d.ts +13 -0
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.d.ts.map +1 -0
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +51 -0
- package/lib/TracingGanttChart/MiniGanttChart/MiniGanttChart.js.map +1 -0
- package/lib/TracingGanttChart/MiniGanttChart/draw.d.ts +3 -0
- package/lib/TracingGanttChart/MiniGanttChart/draw.d.ts.map +1 -0
- package/lib/TracingGanttChart/MiniGanttChart/draw.js +48 -0
- package/lib/TracingGanttChart/MiniGanttChart/draw.js.map +1 -0
- package/lib/TracingGanttChart/Ticks.d.ts +16 -0
- package/lib/TracingGanttChart/Ticks.d.ts.map +1 -0
- package/lib/TracingGanttChart/Ticks.js +94 -0
- package/lib/TracingGanttChart/Ticks.js.map +1 -0
- package/lib/TracingGanttChart/TracingGanttChart.d.ts +17 -0
- package/lib/TracingGanttChart/TracingGanttChart.d.ts.map +1 -0
- package/lib/TracingGanttChart/TracingGanttChart.js +106 -0
- package/lib/TracingGanttChart/TracingGanttChart.js.map +1 -0
- package/lib/TracingGanttChart/palette.d.ts +6 -0
- package/lib/TracingGanttChart/palette.d.ts.map +1 -0
- package/lib/TracingGanttChart/palette.js +64 -0
- package/lib/TracingGanttChart/palette.js.map +1 -0
- package/lib/TracingGanttChart/trace.d.ts +45 -0
- package/lib/TracingGanttChart/trace.d.ts.map +1 -0
- package/lib/TracingGanttChart/trace.js +109 -0
- package/lib/TracingGanttChart/trace.js.map +1 -0
- package/lib/TracingGanttChart/utils.d.ts +18 -0
- package/lib/TracingGanttChart/utils.d.ts.map +1 -0
- package/lib/TracingGanttChart/utils.js +48 -0
- package/lib/TracingGanttChart/utils.js.map +1 -0
- package/lib/TracingGanttChart.d.ts +5 -0
- package/lib/TracingGanttChart.d.ts.map +1 -0
- package/lib/TracingGanttChart.js +23 -0
- package/lib/TracingGanttChart.js.map +1 -0
- package/lib/TracingGanttChartPanel.d.ts +17 -0
- package/lib/TracingGanttChartPanel.d.ts.map +1 -0
- package/lib/TracingGanttChartPanel.js +45 -0
- package/lib/TracingGanttChartPanel.js.map +1 -0
- package/lib/bootstrap.d.ts +2 -0
- package/lib/bootstrap.d.ts.map +1 -0
- package/lib/bootstrap.js +19 -0
- package/lib/bootstrap.js.map +1 -0
- package/lib/cjs/TracingGanttChart/DetailPane/Attributes.js +74 -0
- package/lib/cjs/TracingGanttChart/DetailPane/DetailPane.js +106 -0
- package/lib/cjs/TracingGanttChart/DetailPane/SpanEvents.js +67 -0
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTable.js +101 -0
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTableHeader.js +64 -0
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTableProvider.js +60 -0
- package/lib/cjs/TracingGanttChart/GanttTable/GanttTableRow.js +64 -0
- package/lib/cjs/TracingGanttChart/GanttTable/ResizableDivider.js +94 -0
- package/lib/cjs/TracingGanttChart/GanttTable/SpanDuration.js +81 -0
- package/lib/cjs/TracingGanttChart/GanttTable/SpanIndents.js +97 -0
- package/lib/cjs/TracingGanttChart/GanttTable/SpanName.js +72 -0
- package/lib/cjs/TracingGanttChart/MiniGanttChart/Canvas.js +256 -0
- package/lib/cjs/TracingGanttChart/MiniGanttChart/MiniGanttChart.js +59 -0
- package/lib/cjs/TracingGanttChart/MiniGanttChart/draw.js +56 -0
- package/lib/cjs/TracingGanttChart/Ticks.js +106 -0
- package/lib/cjs/TracingGanttChart/TracingGanttChart.js +109 -0
- package/lib/cjs/TracingGanttChart/palette.js +83 -0
- package/lib/cjs/TracingGanttChart/trace.js +113 -0
- package/lib/cjs/TracingGanttChart/utils.js +76 -0
- package/lib/cjs/TracingGanttChart.js +31 -0
- package/lib/cjs/TracingGanttChartPanel.js +53 -0
- package/lib/cjs/bootstrap.js +26 -0
- package/lib/cjs/env.d.js +14 -0
- package/lib/cjs/gantt-chart-model.js +28 -0
- package/lib/cjs/getPluginModule.js +27 -0
- package/lib/cjs/index-federation.js +55 -0
- package/lib/cjs/index.js +27 -0
- package/lib/cjs/setup-tests.js +19 -0
- package/lib/cjs/test/convert/jaeger.js +86 -0
- package/lib/env.d.js +15 -0
- package/lib/env.d.js.map +1 -0
- package/lib/gantt-chart-model.d.ts +17 -0
- package/lib/gantt-chart-model.d.ts.map +1 -0
- package/lib/gantt-chart-model.js +22 -0
- package/lib/gantt-chart-model.js.map +1 -0
- package/lib/getPluginModule.d.ts +6 -0
- package/lib/getPluginModule.d.ts.map +1 -0
- package/lib/getPluginModule.js +16 -0
- package/lib/getPluginModule.js.map +1 -0
- package/lib/index-federation.d.ts +1 -0
- package/lib/index-federation.d.ts.map +1 -0
- package/lib/index-federation.js +15 -0
- package/lib/index-federation.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -0
- package/lib/setup-tests.d.ts +2 -0
- package/lib/setup-tests.d.ts.map +1 -0
- package/lib/setup-tests.js +17 -0
- package/lib/setup-tests.js.map +1 -0
- package/lib/test/convert/jaeger.d.ts +41 -0
- package/lib/test/convert/jaeger.d.ts.map +1 -0
- package/lib/test/convert/jaeger.js +78 -0
- package/lib/test/convert/jaeger.js.map +1 -0
- package/mf-manifest.json +233 -0
- package/mf-stats.json +269 -0
- package/package.json +58 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Stack, styled, useTheme } from '@mui/material';
|
|
15
|
+
import { memo } from 'react';
|
|
16
|
+
import { rowHeight } from '../utils';
|
|
17
|
+
import { SpanName } from './SpanName';
|
|
18
|
+
import { SpanDuration } from './SpanDuration';
|
|
19
|
+
export const GanttTableRow = /*#__PURE__*/ memo(function GanttTableRow(props) {
|
|
20
|
+
const { options, span, viewport, selected, nameColumnWidth, divider, onClick } = props;
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
const handleOnClick = ()=>{
|
|
23
|
+
// ignore event if triggered by selecting text
|
|
24
|
+
if (document.getSelection()?.type === 'Range') return;
|
|
25
|
+
onClick(span);
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/ _jsxs(RowContainer, {
|
|
28
|
+
sx: {
|
|
29
|
+
backgroundColor: selected ? theme.palette.action.selected : 'inherit'
|
|
30
|
+
},
|
|
31
|
+
direction: "row",
|
|
32
|
+
onClick: handleOnClick,
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ _jsx(SpanName, {
|
|
35
|
+
span: span,
|
|
36
|
+
nameColumnWidth: nameColumnWidth
|
|
37
|
+
}),
|
|
38
|
+
divider,
|
|
39
|
+
/*#__PURE__*/ _jsx(SpanDuration, {
|
|
40
|
+
options: options,
|
|
41
|
+
span: span,
|
|
42
|
+
viewport: viewport
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
const RowContainer = styled(Stack)(({ theme })=>({
|
|
48
|
+
height: rowHeight,
|
|
49
|
+
'&:hover': {
|
|
50
|
+
backgroundColor: theme.palette.action.hover,
|
|
51
|
+
borderTop: `1px solid ${theme.palette.divider}`,
|
|
52
|
+
borderBottom: `1px solid ${theme.palette.divider}`
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=GanttTableRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/TracingGanttChart/GanttTable/GanttTableRow.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Stack, styled, useTheme } from '@mui/material';\nimport { memo } from 'react';\nimport { Viewport, rowHeight } from '../utils';\nimport { TracingGanttChartOptions } from '../../gantt-chart-model';\nimport { Span } from '../trace';\nimport { SpanName } from './SpanName';\nimport { SpanDuration } from './SpanDuration';\n\ninterface GanttTableRowProps {\n options: TracingGanttChartOptions;\n span: Span;\n viewport: Viewport;\n selected?: boolean;\n nameColumnWidth: number;\n divider: React.ReactNode;\n onClick: (span: Span) => void;\n}\n\nexport const GanttTableRow = memo(function GanttTableRow(props: GanttTableRowProps) {\n const { options, span, viewport, selected, nameColumnWidth, divider, onClick } = props;\n const theme = useTheme();\n\n const handleOnClick = (): void => {\n // ignore event if triggered by selecting text\n if (document.getSelection()?.type === 'Range') return;\n\n onClick(span);\n };\n\n return (\n <RowContainer\n sx={{ backgroundColor: selected ? theme.palette.action.selected : 'inherit' }}\n direction=\"row\"\n onClick={handleOnClick}\n >\n <SpanName span={span} nameColumnWidth={nameColumnWidth} />\n {divider}\n <SpanDuration options={options} span={span} viewport={viewport} />\n </RowContainer>\n );\n});\n\nconst RowContainer = styled(Stack)(({ theme }) => ({\n height: rowHeight,\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n borderTop: `1px solid ${theme.palette.divider}`,\n borderBottom: `1px solid ${theme.palette.divider}`,\n },\n}));\n"],"names":["Stack","styled","useTheme","memo","rowHeight","SpanName","SpanDuration","GanttTableRow","props","options","span","viewport","selected","nameColumnWidth","divider","onClick","theme","handleOnClick","document","getSelection","type","RowContainer","sx","backgroundColor","palette","action","direction","height","hover","borderTop","borderBottom"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,KAAK,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,gBAAgB;AACxD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAAmBC,SAAS,QAAQ,WAAW;AAG/C,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,YAAY,QAAQ,iBAAiB;AAY9C,OAAO,MAAMC,8BAAgBJ,KAAK,SAASI,cAAcC,KAAyB;IAChF,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,eAAe,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGP;IACjF,MAAMQ,QAAQd;IAEd,MAAMe,gBAAgB;QACpB,8CAA8C;QAC9C,IAAIC,SAASC,YAAY,IAAIC,SAAS,SAAS;QAE/CL,QAAQL;IACV;IAEA,qBACE,MAACW;QACCC,IAAI;YAAEC,iBAAiBX,WAAWI,MAAMQ,OAAO,CAACC,MAAM,CAACb,QAAQ,GAAG;QAAU;QAC5Ec,WAAU;QACVX,SAASE;;0BAET,KAACZ;gBAASK,MAAMA;gBAAMG,iBAAiBA;;YACtCC;0BACD,KAACR;gBAAaG,SAASA;gBAASC,MAAMA;gBAAMC,UAAUA;;;;AAG5D,GAAG;AAEH,MAAMU,eAAepB,OAAOD,OAAO,CAAC,EAAEgB,KAAK,EAAE,GAAM,CAAA;QACjDW,QAAQvB;QACR,WAAW;YACTmB,iBAAiBP,MAAMQ,OAAO,CAACC,MAAM,CAACG,KAAK;YAC3CC,WAAW,CAAC,UAAU,EAAEb,MAAMQ,OAAO,CAACV,OAAO,EAAE;YAC/CgB,cAAc,CAAC,UAAU,EAAEd,MAAMQ,OAAO,CAACV,OAAO,EAAE;QACpD;IACF,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
interface ResizableDividerProps {
|
|
3
|
+
parentRef: React.RefObject<Element>;
|
|
4
|
+
spacing?: number;
|
|
5
|
+
onMove: (left: number) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ResizableDivider(props: ResizableDividerProps): ReactElement;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ResizableDivider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizableDivider.d.ts","sourceRoot":"","sources":["../../../../src/TracingGanttChart/GanttTable/ResizableDivider.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAiC,YAAY,EAAuB,MAAM,OAAO,CAAC;AAIzF,UAAU,qBAAqB;IAC7B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAuD3E"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { useEffect, useState } from 'react';
|
|
15
|
+
import { Box, styled } from '@mui/material';
|
|
16
|
+
import { useEvent } from '@perses-dev/core';
|
|
17
|
+
export function ResizableDivider(props) {
|
|
18
|
+
const { parentRef, spacing = 0, onMove } = props;
|
|
19
|
+
const [isResizing, setResizing] = useState(false);
|
|
20
|
+
const handleMouseDown = (e)=>{
|
|
21
|
+
// disable any default actions (text selection, etc.)
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
setResizing(true);
|
|
24
|
+
};
|
|
25
|
+
// need stable reference for window.removeEventListener() in useEffect() below
|
|
26
|
+
const handleMouseMove = useEvent((e)=>{
|
|
27
|
+
if (!parentRef.current) return;
|
|
28
|
+
const offsetX = e.clientX - parentRef.current.getBoundingClientRect().left + spacing;
|
|
29
|
+
const leftPercent = offsetX / parentRef.current.getBoundingClientRect().width;
|
|
30
|
+
if (0.05 <= leftPercent && leftPercent <= 0.95) {
|
|
31
|
+
onMove(leftPercent);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
// need stable reference for window.removeEventListener() in useEffect() below
|
|
35
|
+
const handleMouseUp = useEvent(()=>{
|
|
36
|
+
setResizing(false);
|
|
37
|
+
});
|
|
38
|
+
// capture mouseMove and mouseUp outside the element by attaching them to the window object
|
|
39
|
+
useEffect(()=>{
|
|
40
|
+
function startMouseAction() {
|
|
41
|
+
window.addEventListener('mousemove', handleMouseMove);
|
|
42
|
+
window.addEventListener('mouseup', handleMouseUp);
|
|
43
|
+
document.body.style.cursor = 'col-resize';
|
|
44
|
+
}
|
|
45
|
+
function stopMouseAction() {
|
|
46
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
47
|
+
window.removeEventListener('mouseup', handleMouseUp);
|
|
48
|
+
document.body.style.cursor = 'inherit';
|
|
49
|
+
}
|
|
50
|
+
if (isResizing) {
|
|
51
|
+
startMouseAction();
|
|
52
|
+
} else {
|
|
53
|
+
stopMouseAction();
|
|
54
|
+
}
|
|
55
|
+
return stopMouseAction;
|
|
56
|
+
}, [
|
|
57
|
+
isResizing,
|
|
58
|
+
handleMouseMove,
|
|
59
|
+
handleMouseUp
|
|
60
|
+
]);
|
|
61
|
+
// prevent onClick event when clicking on a divider
|
|
62
|
+
const stopEventPropagation = (e)=>e.stopPropagation();
|
|
63
|
+
return /*#__PURE__*/ _jsx(ResizableDividerBox, {
|
|
64
|
+
onMouseDown: handleMouseDown,
|
|
65
|
+
onClick: stopEventPropagation
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const ResizableDividerBox = styled(Box)(({ theme })=>({
|
|
69
|
+
position: 'relative',
|
|
70
|
+
width: '1px',
|
|
71
|
+
height: '100%',
|
|
72
|
+
backgroundColor: theme.palette.divider,
|
|
73
|
+
cursor: 'col-resize',
|
|
74
|
+
// increase clickable area from 1px to 7px
|
|
75
|
+
'&:before': {
|
|
76
|
+
position: 'absolute',
|
|
77
|
+
width: '7px',
|
|
78
|
+
left: '-3px',
|
|
79
|
+
top: 0,
|
|
80
|
+
bottom: 0,
|
|
81
|
+
content: '" "',
|
|
82
|
+
zIndex: 1
|
|
83
|
+
}
|
|
84
|
+
}));
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=ResizableDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/TracingGanttChart/GanttTable/ResizableDivider.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { MouseEvent as ReactMouseEvent, ReactElement, useEffect, useState } from 'react';\nimport { Box, styled } from '@mui/material';\nimport { useEvent } from '@perses-dev/core';\n\ninterface ResizableDividerProps {\n parentRef: React.RefObject<Element>;\n spacing?: number;\n onMove: (left: number) => void;\n}\n\nexport function ResizableDivider(props: ResizableDividerProps): ReactElement {\n const { parentRef, spacing = 0, onMove } = props;\n const [isResizing, setResizing] = useState(false);\n\n const handleMouseDown = (e: ReactMouseEvent): void => {\n // disable any default actions (text selection, etc.)\n e.preventDefault();\n\n setResizing(true);\n };\n\n // need stable reference for window.removeEventListener() in useEffect() below\n const handleMouseMove = useEvent((e: MouseEvent) => {\n if (!parentRef.current) return;\n\n const offsetX = e.clientX - parentRef.current.getBoundingClientRect().left + spacing;\n const leftPercent = offsetX / parentRef.current.getBoundingClientRect().width;\n\n if (0.05 <= leftPercent && leftPercent <= 0.95) {\n onMove(leftPercent);\n }\n });\n\n // need stable reference for window.removeEventListener() in useEffect() below\n const handleMouseUp = useEvent(() => {\n setResizing(false);\n });\n\n // capture mouseMove and mouseUp outside the element by attaching them to the window object\n useEffect(() => {\n function startMouseAction(): void {\n window.addEventListener('mousemove', handleMouseMove);\n window.addEventListener('mouseup', handleMouseUp);\n document.body.style.cursor = 'col-resize';\n }\n\n function stopMouseAction(): void {\n window.removeEventListener('mousemove', handleMouseMove);\n window.removeEventListener('mouseup', handleMouseUp);\n document.body.style.cursor = 'inherit';\n }\n\n if (isResizing) {\n startMouseAction();\n } else {\n stopMouseAction();\n }\n\n return stopMouseAction;\n }, [isResizing, handleMouseMove, handleMouseUp]);\n\n // prevent onClick event when clicking on a divider\n const stopEventPropagation = (e: ReactMouseEvent): void => e.stopPropagation();\n\n return <ResizableDividerBox onMouseDown={handleMouseDown} onClick={stopEventPropagation} />;\n}\n\nconst ResizableDividerBox = styled(Box)(({ theme }) => ({\n position: 'relative',\n width: '1px',\n height: '100%',\n backgroundColor: theme.palette.divider,\n cursor: 'col-resize',\n\n // increase clickable area from 1px to 7px\n '&:before': {\n position: 'absolute',\n width: '7px',\n left: '-3px',\n top: 0,\n bottom: 0,\n content: '\" \"',\n zIndex: 1, // without zIndex, the span duration row hides the right side of this element\n },\n}));\n"],"names":["useEffect","useState","Box","styled","useEvent","ResizableDivider","props","parentRef","spacing","onMove","isResizing","setResizing","handleMouseDown","e","preventDefault","handleMouseMove","current","offsetX","clientX","getBoundingClientRect","left","leftPercent","width","handleMouseUp","startMouseAction","window","addEventListener","document","body","style","cursor","stopMouseAction","removeEventListener","stopEventPropagation","stopPropagation","ResizableDividerBox","onMouseDown","onClick","theme","position","height","backgroundColor","palette","divider","top","bottom","content","zIndex"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAAsDA,SAAS,EAAEC,QAAQ,QAAQ,QAAQ;AACzF,SAASC,GAAG,EAAEC,MAAM,QAAQ,gBAAgB;AAC5C,SAASC,QAAQ,QAAQ,mBAAmB;AAQ5C,OAAO,SAASC,iBAAiBC,KAA4B;IAC3D,MAAM,EAAEC,SAAS,EAAEC,UAAU,CAAC,EAAEC,MAAM,EAAE,GAAGH;IAC3C,MAAM,CAACI,YAAYC,YAAY,GAAGV,SAAS;IAE3C,MAAMW,kBAAkB,CAACC;QACvB,qDAAqD;QACrDA,EAAEC,cAAc;QAEhBH,YAAY;IACd;IAEA,8EAA8E;IAC9E,MAAMI,kBAAkBX,SAAS,CAACS;QAChC,IAAI,CAACN,UAAUS,OAAO,EAAE;QAExB,MAAMC,UAAUJ,EAAEK,OAAO,GAAGX,UAAUS,OAAO,CAACG,qBAAqB,GAAGC,IAAI,GAAGZ;QAC7E,MAAMa,cAAcJ,UAAUV,UAAUS,OAAO,CAACG,qBAAqB,GAAGG,KAAK;QAE7E,IAAI,QAAQD,eAAeA,eAAe,MAAM;YAC9CZ,OAAOY;QACT;IACF;IAEA,8EAA8E;IAC9E,MAAME,gBAAgBnB,SAAS;QAC7BO,YAAY;IACd;IAEA,2FAA2F;IAC3FX,UAAU;QACR,SAASwB;YACPC,OAAOC,gBAAgB,CAAC,aAAaX;YACrCU,OAAOC,gBAAgB,CAAC,WAAWH;YACnCI,SAASC,IAAI,CAACC,KAAK,CAACC,MAAM,GAAG;QAC/B;QAEA,SAASC;YACPN,OAAOO,mBAAmB,CAAC,aAAajB;YACxCU,OAAOO,mBAAmB,CAAC,WAAWT;YACtCI,SAASC,IAAI,CAACC,KAAK,CAACC,MAAM,GAAG;QAC/B;QAEA,IAAIpB,YAAY;YACdc;QACF,OAAO;YACLO;QACF;QAEA,OAAOA;IACT,GAAG;QAACrB;QAAYK;QAAiBQ;KAAc;IAE/C,mDAAmD;IACnD,MAAMU,uBAAuB,CAACpB,IAA6BA,EAAEqB,eAAe;IAE5E,qBAAO,KAACC;QAAoBC,aAAaxB;QAAiByB,SAASJ;;AACrE;AAEA,MAAME,sBAAsBhC,OAAOD,KAAK,CAAC,EAAEoC,KAAK,EAAE,GAAM,CAAA;QACtDC,UAAU;QACVjB,OAAO;QACPkB,QAAQ;QACRC,iBAAiBH,MAAMI,OAAO,CAACC,OAAO;QACtCb,QAAQ;QAER,0CAA0C;QAC1C,YAAY;YACVS,UAAU;YACVjB,OAAO;YACPF,MAAM;YACNwB,KAAK;YACLC,QAAQ;YACRC,SAAS;YACTC,QAAQ;QACV;IACF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Viewport } from '../utils';
|
|
3
|
+
import { TracingGanttChartOptions } from '../../gantt-chart-model';
|
|
4
|
+
import { Span } from '../trace';
|
|
5
|
+
export interface SpanDurationProps {
|
|
6
|
+
options: TracingGanttChartOptions;
|
|
7
|
+
span: Span;
|
|
8
|
+
viewport: Viewport;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SpanDuration renders the right column of a SpanRow, i.e. the span bar and span duration
|
|
12
|
+
*/
|
|
13
|
+
export declare function SpanDuration(props: SpanDurationProps): ReactElement;
|
|
14
|
+
//# sourceMappingURL=SpanDuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpanDuration.d.ts","sourceRoot":"","sources":["../../../../src/TracingGanttChart/GanttTable/SpanDuration.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAgD,MAAM,UAAU,CAAC;AAElF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,wBAAwB,CAAC;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,YAAY,CAuDnE"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Box, useTheme } from '@mui/material';
|
|
15
|
+
import { useChartsTheme } from '@perses-dev/components';
|
|
16
|
+
import { formatDuration, getSpanColor, minSpanWidthPx } from '../utils';
|
|
17
|
+
import { Ticks } from '../Ticks';
|
|
18
|
+
/**
|
|
19
|
+
* SpanDuration renders the right column of a SpanRow, i.e. the span bar and span duration
|
|
20
|
+
*/ export function SpanDuration(props) {
|
|
21
|
+
const { options, span, viewport } = props;
|
|
22
|
+
const muiTheme = useTheme();
|
|
23
|
+
const chartsTheme = useChartsTheme();
|
|
24
|
+
const spanDuration = span.endTimeUnixMs - span.startTimeUnixMs;
|
|
25
|
+
const viewportDuration = viewport.endTimeUnixMs - viewport.startTimeUnixMs;
|
|
26
|
+
const relativeDuration = spanDuration / viewportDuration;
|
|
27
|
+
const relativeStart = (span.startTimeUnixMs - viewport.startTimeUnixMs) / viewportDuration;
|
|
28
|
+
return /*#__PURE__*/ _jsxs(Box, {
|
|
29
|
+
sx: {
|
|
30
|
+
position: 'relative',
|
|
31
|
+
height: '100%',
|
|
32
|
+
flexGrow: 1,
|
|
33
|
+
overflow: 'hidden'
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ _jsx(Ticks, {}),
|
|
37
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
38
|
+
"data-testid": "span-duration-bar",
|
|
39
|
+
sx: {
|
|
40
|
+
position: 'absolute',
|
|
41
|
+
top: 0,
|
|
42
|
+
bottom: 0,
|
|
43
|
+
margin: 'auto',
|
|
44
|
+
minWidth: `${minSpanWidthPx}px`,
|
|
45
|
+
height: '8px',
|
|
46
|
+
borderRadius: muiTheme.shape.borderRadius
|
|
47
|
+
},
|
|
48
|
+
style: {
|
|
49
|
+
left: `${relativeStart * 100}%`,
|
|
50
|
+
width: `${relativeDuration * 100}%`,
|
|
51
|
+
backgroundColor: getSpanColor(muiTheme, chartsTheme, options.visual?.palette?.mode, span)
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
55
|
+
sx: {
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
top: '50%',
|
|
58
|
+
transform: 'translateY(-50%)',
|
|
59
|
+
padding: '0 8px',
|
|
60
|
+
color: muiTheme.palette.grey[700],
|
|
61
|
+
fontSize: '.7rem'
|
|
62
|
+
},
|
|
63
|
+
style: /* print span duration on right side of the span bar, if there is space */ relativeStart + relativeDuration < 0.95 ? {
|
|
64
|
+
left: `${(relativeStart + relativeDuration) * 100}%`
|
|
65
|
+
} : {
|
|
66
|
+
left: `${relativeStart * 100}%`,
|
|
67
|
+
transform: 'translateY(-50%) translateX(-100%)'
|
|
68
|
+
},
|
|
69
|
+
children: formatDuration(spanDuration)
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=SpanDuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/TracingGanttChart/GanttTable/SpanDuration.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box, useTheme } from '@mui/material';\nimport { useChartsTheme } from '@perses-dev/components';\nimport { ReactElement } from 'react';\nimport { Viewport, formatDuration, getSpanColor, minSpanWidthPx } from '../utils';\nimport { Ticks } from '../Ticks';\nimport { TracingGanttChartOptions } from '../../gantt-chart-model';\nimport { Span } from '../trace';\n\nexport interface SpanDurationProps {\n options: TracingGanttChartOptions;\n span: Span;\n viewport: Viewport;\n}\n\n/**\n * SpanDuration renders the right column of a SpanRow, i.e. the span bar and span duration\n */\nexport function SpanDuration(props: SpanDurationProps): ReactElement {\n const { options, span, viewport } = props;\n const muiTheme = useTheme();\n const chartsTheme = useChartsTheme();\n\n const spanDuration = span.endTimeUnixMs - span.startTimeUnixMs;\n const viewportDuration = viewport.endTimeUnixMs - viewport.startTimeUnixMs;\n const relativeDuration = spanDuration / viewportDuration;\n const relativeStart = (span.startTimeUnixMs - viewport.startTimeUnixMs) / viewportDuration;\n\n return (\n <Box sx={{ position: 'relative', height: '100%', flexGrow: 1, overflow: 'hidden' }}>\n <Ticks />\n <Box\n data-testid=\"span-duration-bar\"\n sx={{\n position: 'absolute',\n top: 0,\n bottom: 0,\n margin: 'auto',\n minWidth: `${minSpanWidthPx}px`,\n height: '8px',\n borderRadius: muiTheme.shape.borderRadius,\n }}\n style={{\n left: `${relativeStart * 100}%`,\n width: `${relativeDuration * 100}%`,\n backgroundColor: getSpanColor(muiTheme, chartsTheme, options.visual?.palette?.mode, span),\n }}\n />\n <Box\n sx={{\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n padding: '0 8px',\n color: muiTheme.palette.grey[700],\n fontSize: '.7rem',\n }}\n style={\n /* print span duration on right side of the span bar, if there is space */\n relativeStart + relativeDuration < 0.95\n ? {\n left: `${(relativeStart + relativeDuration) * 100}%`,\n }\n : {\n left: `${relativeStart * 100}%`,\n transform: 'translateY(-50%) translateX(-100%)',\n }\n }\n >\n {formatDuration(spanDuration)}\n </Box>\n </Box>\n );\n}\n"],"names":["Box","useTheme","useChartsTheme","formatDuration","getSpanColor","minSpanWidthPx","Ticks","SpanDuration","props","options","span","viewport","muiTheme","chartsTheme","spanDuration","endTimeUnixMs","startTimeUnixMs","viewportDuration","relativeDuration","relativeStart","sx","position","height","flexGrow","overflow","data-testid","top","bottom","margin","minWidth","borderRadius","shape","style","left","width","backgroundColor","visual","palette","mode","transform","padding","color","grey","fontSize"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,EAAEC,QAAQ,QAAQ,gBAAgB;AAC9C,SAASC,cAAc,QAAQ,yBAAyB;AAExD,SAAmBC,cAAc,EAAEC,YAAY,EAAEC,cAAc,QAAQ,WAAW;AAClF,SAASC,KAAK,QAAQ,WAAW;AAUjC;;CAEC,GACD,OAAO,SAASC,aAAaC,KAAwB;IACnD,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGH;IACpC,MAAMI,WAAWX;IACjB,MAAMY,cAAcX;IAEpB,MAAMY,eAAeJ,KAAKK,aAAa,GAAGL,KAAKM,eAAe;IAC9D,MAAMC,mBAAmBN,SAASI,aAAa,GAAGJ,SAASK,eAAe;IAC1E,MAAME,mBAAmBJ,eAAeG;IACxC,MAAME,gBAAgB,AAACT,CAAAA,KAAKM,eAAe,GAAGL,SAASK,eAAe,AAAD,IAAKC;IAE1E,qBACE,MAACjB;QAAIoB,IAAI;YAAEC,UAAU;YAAYC,QAAQ;YAAQC,UAAU;YAAGC,UAAU;QAAS;;0BAC/E,KAAClB;0BACD,KAACN;gBACCyB,eAAY;gBACZL,IAAI;oBACFC,UAAU;oBACVK,KAAK;oBACLC,QAAQ;oBACRC,QAAQ;oBACRC,UAAU,GAAGxB,eAAe,EAAE,CAAC;oBAC/BiB,QAAQ;oBACRQ,cAAclB,SAASmB,KAAK,CAACD,YAAY;gBAC3C;gBACAE,OAAO;oBACLC,MAAM,GAAGd,gBAAgB,IAAI,CAAC,CAAC;oBAC/Be,OAAO,GAAGhB,mBAAmB,IAAI,CAAC,CAAC;oBACnCiB,iBAAiB/B,aAAaQ,UAAUC,aAAaJ,QAAQ2B,MAAM,EAAEC,SAASC,MAAM5B;gBACtF;;0BAEF,KAACV;gBACCoB,IAAI;oBACFC,UAAU;oBACVK,KAAK;oBACLa,WAAW;oBACXC,SAAS;oBACTC,OAAO7B,SAASyB,OAAO,CAACK,IAAI,CAAC,IAAI;oBACjCC,UAAU;gBACZ;gBACAX,OACE,wEAAwE,GACxEb,gBAAgBD,mBAAmB,OAC/B;oBACEe,MAAM,GAAG,AAACd,CAAAA,gBAAgBD,gBAAe,IAAK,IAAI,CAAC,CAAC;gBACtD,IACA;oBACEe,MAAM,GAAGd,gBAAgB,IAAI,CAAC,CAAC;oBAC/BoB,WAAW;gBACb;0BAGLpC,eAAeW;;;;AAIxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Span } from '../trace';
|
|
3
|
+
export interface SpanIndentsProps {
|
|
4
|
+
span: Span;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* SpanIndents renders the indention boxes,
|
|
8
|
+
* and handles the click and mouseOver events
|
|
9
|
+
*
|
|
10
|
+
* Note: This component gets re-rendered on every hover of any indention box,
|
|
11
|
+
* therefore rendering performance is essential.
|
|
12
|
+
*/
|
|
13
|
+
export declare function SpanIndents(props: SpanIndentsProps): ReactElement;
|
|
14
|
+
//# sourceMappingURL=SpanIndents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpanIndents.d.ts","sourceRoot":"","sources":["../../../../src/TracingGanttChart/GanttTable/SpanIndents.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAc,YAAY,EAAe,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAMhC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAuDjE"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
import { styled, useTheme } from '@mui/material';
|
|
15
|
+
import ChevronDownIcon from 'mdi-material-ui/ChevronDown';
|
|
16
|
+
import ChevronRightIcon from 'mdi-material-ui/ChevronRight';
|
|
17
|
+
import { useCallback } from 'react';
|
|
18
|
+
import { useGanttTableContext } from './GanttTableProvider';
|
|
19
|
+
const MIN_INDENT_WIDTH = 8;
|
|
20
|
+
const MAX_INDENT_WIDTH = 24;
|
|
21
|
+
/**
|
|
22
|
+
* SpanIndents renders the indention boxes,
|
|
23
|
+
* and handles the click and mouseOver events
|
|
24
|
+
*
|
|
25
|
+
* Note: This component gets re-rendered on every hover of any indention box,
|
|
26
|
+
* therefore rendering performance is essential.
|
|
27
|
+
*/ export function SpanIndents(props) {
|
|
28
|
+
const { span } = props;
|
|
29
|
+
const { collapsedSpans, setCollapsedSpans, visibleSpans, hoveredParent, setHoveredParent } = useGanttTableContext();
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
const handleToggleClick = useCallback((e)=>{
|
|
32
|
+
e.stopPropagation();
|
|
33
|
+
if (collapsedSpans.includes(span.spanId)) {
|
|
34
|
+
setCollapsedSpans(collapsedSpans.filter((spanId)=>spanId !== span.spanId));
|
|
35
|
+
} else {
|
|
36
|
+
setCollapsedSpans([
|
|
37
|
+
...collapsedSpans,
|
|
38
|
+
span.spanId
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
}, [
|
|
42
|
+
span,
|
|
43
|
+
collapsedSpans,
|
|
44
|
+
setCollapsedSpans
|
|
45
|
+
]);
|
|
46
|
+
const handleIconMouseEnter = useCallback(()=>{
|
|
47
|
+
setHoveredParent(span.spanId);
|
|
48
|
+
}, [
|
|
49
|
+
span,
|
|
50
|
+
setHoveredParent
|
|
51
|
+
]);
|
|
52
|
+
const spans = [
|
|
53
|
+
span
|
|
54
|
+
];
|
|
55
|
+
let parent = span.parentSpan;
|
|
56
|
+
while(parent){
|
|
57
|
+
spans.unshift(parent);
|
|
58
|
+
parent = parent.parentSpan;
|
|
59
|
+
}
|
|
60
|
+
// on first render visibleSpans is empty, therefore let's use MAX_INDENT_WIDTH to avoid an animation on page load.
|
|
61
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
62
|
+
children: spans.map((span, i)=>/*#__PURE__*/ _jsx(SpanIndentBox, {
|
|
63
|
+
style: {
|
|
64
|
+
width: i === spans.length - 1 || visibleSpans.length === 0 || visibleSpans.includes(span.spanId) ? MAX_INDENT_WIDTH : MIN_INDENT_WIDTH,
|
|
65
|
+
borderLeft: `${hoveredParent === (span.parentSpanId ?? '') ? 3 : 1}px solid ${theme.palette.divider}`
|
|
66
|
+
},
|
|
67
|
+
onMouseEnter: ()=>setHoveredParent(span.parentSpanId ?? ''),
|
|
68
|
+
onMouseLeave: ()=>setHoveredParent(undefined),
|
|
69
|
+
children: i === spans.length - 1 && span.childSpans.length > 0 && (collapsedSpans.includes(span.spanId) ? /*#__PURE__*/ _jsx(ChevronRightIcon, {
|
|
70
|
+
titleAccess: "expand",
|
|
71
|
+
onClick: handleToggleClick,
|
|
72
|
+
onMouseEnter: handleIconMouseEnter
|
|
73
|
+
}) : /*#__PURE__*/ _jsx(ChevronDownIcon, {
|
|
74
|
+
titleAccess: "collapse",
|
|
75
|
+
onClick: handleToggleClick,
|
|
76
|
+
onMouseEnter: handleIconMouseEnter
|
|
77
|
+
}))
|
|
78
|
+
}, span.spanId))
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
const SpanIndentBox = styled('div')({
|
|
82
|
+
display: 'flex',
|
|
83
|
+
height: '100%',
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
justifyContent: 'flex-end',
|
|
86
|
+
flexShrink: 0,
|
|
87
|
+
transition: 'width 1s'
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=SpanIndents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/TracingGanttChart/GanttTable/SpanIndents.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { styled, useTheme } from '@mui/material';\nimport ChevronDownIcon from 'mdi-material-ui/ChevronDown';\nimport ChevronRightIcon from 'mdi-material-ui/ChevronRight';\nimport { MouseEvent, ReactElement, useCallback } from 'react';\nimport { Span } from '../trace';\nimport { useGanttTableContext } from './GanttTableProvider';\n\nconst MIN_INDENT_WIDTH = 8;\nconst MAX_INDENT_WIDTH = 24;\n\nexport interface SpanIndentsProps {\n span: Span;\n}\n\n/**\n * SpanIndents renders the indention boxes,\n * and handles the click and mouseOver events\n *\n * Note: This component gets re-rendered on every hover of any indention box,\n * therefore rendering performance is essential.\n */\nexport function SpanIndents(props: SpanIndentsProps): ReactElement {\n const { span } = props;\n const { collapsedSpans, setCollapsedSpans, visibleSpans, hoveredParent, setHoveredParent } = useGanttTableContext();\n const theme = useTheme();\n\n const handleToggleClick = useCallback(\n (e: MouseEvent) => {\n e.stopPropagation();\n if (collapsedSpans.includes(span.spanId)) {\n setCollapsedSpans(collapsedSpans.filter((spanId) => spanId !== span.spanId));\n } else {\n setCollapsedSpans([...collapsedSpans, span.spanId]);\n }\n },\n [span, collapsedSpans, setCollapsedSpans]\n );\n\n const handleIconMouseEnter = useCallback(() => {\n setHoveredParent(span.spanId);\n }, [span, setHoveredParent]);\n\n const spans = [span];\n let parent = span.parentSpan;\n while (parent) {\n spans.unshift(parent);\n parent = parent.parentSpan;\n }\n\n // on first render visibleSpans is empty, therefore let's use MAX_INDENT_WIDTH to avoid an animation on page load.\n return (\n <>\n {spans.map((span, i) => (\n <SpanIndentBox\n key={span.spanId}\n style={{\n width:\n i === spans.length - 1 || visibleSpans.length === 0 || visibleSpans.includes(span.spanId)\n ? MAX_INDENT_WIDTH\n : MIN_INDENT_WIDTH,\n borderLeft: `${hoveredParent === (span.parentSpanId ?? '') ? 3 : 1}px solid ${theme.palette.divider}`,\n }}\n onMouseEnter={() => setHoveredParent(span.parentSpanId ?? '')}\n onMouseLeave={() => setHoveredParent(undefined)}\n >\n {i === spans.length - 1 &&\n span.childSpans.length > 0 &&\n (collapsedSpans.includes(span.spanId) ? (\n <ChevronRightIcon titleAccess=\"expand\" onClick={handleToggleClick} onMouseEnter={handleIconMouseEnter} />\n ) : (\n <ChevronDownIcon titleAccess=\"collapse\" onClick={handleToggleClick} onMouseEnter={handleIconMouseEnter} />\n ))}\n </SpanIndentBox>\n ))}\n </>\n );\n}\n\nconst SpanIndentBox = styled('div')({\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n justifyContent: 'flex-end',\n flexShrink: 0,\n transition: 'width 1s',\n});\n"],"names":["styled","useTheme","ChevronDownIcon","ChevronRightIcon","useCallback","useGanttTableContext","MIN_INDENT_WIDTH","MAX_INDENT_WIDTH","SpanIndents","props","span","collapsedSpans","setCollapsedSpans","visibleSpans","hoveredParent","setHoveredParent","theme","handleToggleClick","e","stopPropagation","includes","spanId","filter","handleIconMouseEnter","spans","parent","parentSpan","unshift","map","i","SpanIndentBox","style","width","length","borderLeft","parentSpanId","palette","divider","onMouseEnter","onMouseLeave","undefined","childSpans","titleAccess","onClick","display","height","alignItems","justifyContent","flexShrink","transition"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,EAAEC,QAAQ,QAAQ,gBAAgB;AACjD,OAAOC,qBAAqB,8BAA8B;AAC1D,OAAOC,sBAAsB,+BAA+B;AAC5D,SAAmCC,WAAW,QAAQ,QAAQ;AAE9D,SAASC,oBAAoB,QAAQ,uBAAuB;AAE5D,MAAMC,mBAAmB;AACzB,MAAMC,mBAAmB;AAMzB;;;;;;CAMC,GACD,OAAO,SAASC,YAAYC,KAAuB;IACjD,MAAM,EAAEC,IAAI,EAAE,GAAGD;IACjB,MAAM,EAAEE,cAAc,EAAEC,iBAAiB,EAAEC,YAAY,EAAEC,aAAa,EAAEC,gBAAgB,EAAE,GAAGV;IAC7F,MAAMW,QAAQf;IAEd,MAAMgB,oBAAoBb,YACxB,CAACc;QACCA,EAAEC,eAAe;QACjB,IAAIR,eAAeS,QAAQ,CAACV,KAAKW,MAAM,GAAG;YACxCT,kBAAkBD,eAAeW,MAAM,CAAC,CAACD,SAAWA,WAAWX,KAAKW,MAAM;QAC5E,OAAO;YACLT,kBAAkB;mBAAID;gBAAgBD,KAAKW,MAAM;aAAC;QACpD;IACF,GACA;QAACX;QAAMC;QAAgBC;KAAkB;IAG3C,MAAMW,uBAAuBnB,YAAY;QACvCW,iBAAiBL,KAAKW,MAAM;IAC9B,GAAG;QAACX;QAAMK;KAAiB;IAE3B,MAAMS,QAAQ;QAACd;KAAK;IACpB,IAAIe,SAASf,KAAKgB,UAAU;IAC5B,MAAOD,OAAQ;QACbD,MAAMG,OAAO,CAACF;QACdA,SAASA,OAAOC,UAAU;IAC5B;IAEA,kHAAkH;IAClH,qBACE;kBACGF,MAAMI,GAAG,CAAC,CAAClB,MAAMmB,kBAChB,KAACC;gBAECC,OAAO;oBACLC,OACEH,MAAML,MAAMS,MAAM,GAAG,KAAKpB,aAAaoB,MAAM,KAAK,KAAKpB,aAAaO,QAAQ,CAACV,KAAKW,MAAM,IACpFd,mBACAD;oBACN4B,YAAY,GAAGpB,kBAAmBJ,CAAAA,KAAKyB,YAAY,IAAI,EAAC,IAAK,IAAI,EAAE,SAAS,EAAEnB,MAAMoB,OAAO,CAACC,OAAO,EAAE;gBACvG;gBACAC,cAAc,IAAMvB,iBAAiBL,KAAKyB,YAAY,IAAI;gBAC1DI,cAAc,IAAMxB,iBAAiByB;0BAEpCX,MAAML,MAAMS,MAAM,GAAG,KACpBvB,KAAK+B,UAAU,CAACR,MAAM,GAAG,KACxBtB,CAAAA,eAAeS,QAAQ,CAACV,KAAKW,MAAM,kBAClC,KAAClB;oBAAiBuC,aAAY;oBAASC,SAAS1B;oBAAmBqB,cAAcf;mCAEjF,KAACrB;oBAAgBwC,aAAY;oBAAWC,SAAS1B;oBAAmBqB,cAAcf;kBACpF;eAjBGb,KAAKW,MAAM;;AAsB1B;AAEA,MAAMS,gBAAgB9B,OAAO,OAAO;IAClC4C,SAAS;IACTC,QAAQ;IACRC,YAAY;IACZC,gBAAgB;IAChBC,YAAY;IACZC,YAAY;AACd"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Span } from '../trace';
|
|
3
|
+
export interface SpanNameProps {
|
|
4
|
+
span: Span;
|
|
5
|
+
nameColumnWidth: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* SpanName renders the entire left column of a SpanRow, i.e. the hierarchy and the service and span name
|
|
9
|
+
*/
|
|
10
|
+
export declare function SpanName(props: SpanNameProps): ReactElement;
|
|
11
|
+
//# sourceMappingURL=SpanName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpanName.d.ts","sourceRoot":"","sources":["../../../../src/TracingGanttChart/GanttTable/SpanName.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGhC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAY3D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Box, Stack } from '@mui/material';
|
|
15
|
+
import AlertIcon from 'mdi-material-ui/AlertCircleOutline';
|
|
16
|
+
import { spanHasError } from '../utils';
|
|
17
|
+
import { SpanIndents } from './SpanIndents';
|
|
18
|
+
/**
|
|
19
|
+
* SpanName renders the entire left column of a SpanRow, i.e. the hierarchy and the service and span name
|
|
20
|
+
*/ export function SpanName(props) {
|
|
21
|
+
const { span, nameColumnWidth } = props;
|
|
22
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
23
|
+
direction: "row",
|
|
24
|
+
sx: {
|
|
25
|
+
alignItems: 'center'
|
|
26
|
+
},
|
|
27
|
+
style: {
|
|
28
|
+
width: `${nameColumnWidth * 100}%`
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx(SpanIndents, {
|
|
32
|
+
span: span
|
|
33
|
+
}),
|
|
34
|
+
spanHasError(span) && /*#__PURE__*/ _jsx(AlertIcon, {
|
|
35
|
+
titleAccess: "error",
|
|
36
|
+
color: "error",
|
|
37
|
+
sx: {
|
|
38
|
+
marginRight: '5px'
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
42
|
+
sx: {
|
|
43
|
+
whiteSpace: 'nowrap',
|
|
44
|
+
overflow: 'hidden'
|
|
45
|
+
},
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ _jsxs("strong", {
|
|
48
|
+
children: [
|
|
49
|
+
span.resource.serviceName,
|
|
50
|
+
":"
|
|
51
|
+
]
|
|
52
|
+
}),
|
|
53
|
+
" ",
|
|
54
|
+
span.name
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=SpanName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/TracingGanttChart/GanttTable/SpanName.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box, Stack } from '@mui/material';\nimport AlertIcon from 'mdi-material-ui/AlertCircleOutline';\nimport { ReactElement } from 'react';\nimport { spanHasError } from '../utils';\nimport { Span } from '../trace';\nimport { SpanIndents } from './SpanIndents';\n\nexport interface SpanNameProps {\n span: Span;\n nameColumnWidth: number;\n}\n\n/**\n * SpanName renders the entire left column of a SpanRow, i.e. the hierarchy and the service and span name\n */\nexport function SpanName(props: SpanNameProps): ReactElement {\n const { span, nameColumnWidth } = props;\n\n return (\n <Stack direction=\"row\" sx={{ alignItems: 'center' }} style={{ width: `${nameColumnWidth * 100}%` }}>\n <SpanIndents span={span} />\n {spanHasError(span) && <AlertIcon titleAccess=\"error\" color=\"error\" sx={{ marginRight: '5px' }} />}\n <Box sx={{ whiteSpace: 'nowrap', overflow: 'hidden' }}>\n <strong>{span.resource.serviceName}:</strong> {span.name}\n </Box>\n </Stack>\n );\n}\n"],"names":["Box","Stack","AlertIcon","spanHasError","SpanIndents","SpanName","props","span","nameColumnWidth","direction","sx","alignItems","style","width","titleAccess","color","marginRight","whiteSpace","overflow","strong","resource","serviceName","name"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,EAAEC,KAAK,QAAQ,gBAAgB;AAC3C,OAAOC,eAAe,qCAAqC;AAE3D,SAASC,YAAY,QAAQ,WAAW;AAExC,SAASC,WAAW,QAAQ,gBAAgB;AAO5C;;CAEC,GACD,OAAO,SAASC,SAASC,KAAoB;IAC3C,MAAM,EAAEC,IAAI,EAAEC,eAAe,EAAE,GAAGF;IAElC,qBACE,MAACL;QAAMQ,WAAU;QAAMC,IAAI;YAAEC,YAAY;QAAS;QAAGC,OAAO;YAAEC,OAAO,GAAGL,kBAAkB,IAAI,CAAC,CAAC;QAAC;;0BAC/F,KAACJ;gBAAYG,MAAMA;;YAClBJ,aAAaI,uBAAS,KAACL;gBAAUY,aAAY;gBAAQC,OAAM;gBAAQL,IAAI;oBAAEM,aAAa;gBAAM;;0BAC7F,MAAChB;gBAAIU,IAAI;oBAAEO,YAAY;oBAAUC,UAAU;gBAAS;;kCAClD,MAACC;;4BAAQZ,KAAKa,QAAQ,CAACC,WAAW;4BAAC;;;oBAAU;oBAAEd,KAAKe,IAAI;;;;;AAIhE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Viewport } from '../utils';
|
|
3
|
+
import { TracingGanttChartOptions } from '../../gantt-chart-model';
|
|
4
|
+
import { Trace } from '../trace';
|
|
5
|
+
interface CanvasProps {
|
|
6
|
+
options: TracingGanttChartOptions;
|
|
7
|
+
trace: Trace;
|
|
8
|
+
viewport: Viewport;
|
|
9
|
+
setViewport: (v: Viewport) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function Canvas(props: CanvasProps): ReactElement;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Canvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../../src/TracingGanttChart/MiniGanttChart/Canvas.tsx"],"names":[],"mappings":"AAeA,OAAO,EAA2E,YAAY,EAAE,MAAM,OAAO,CAAC;AAI9G,OAAO,EAAgB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAQ,KAAK,EAAE,MAAM,UAAU,CAAC;AAKvC,UAAU,WAAW;IACnB,OAAO,EAAE,wBAAwB,CAAC;IAClC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;CACpC;AAOD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CA2JvD"}
|