@perses-dev/logs-table-plugin 0.2.0 → 0.2.1

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/LogRow/LogRow.tsx"],"sourcesContent":["// Copyright 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 React, { memo, useCallback, useState, useRef, useEffect, ReactNode } from 'react';\nimport {\n Box,\n Collapse,\n useTheme,\n IconButton,\n Tooltip,\n Menu,\n MenuItem,\n ListItemIcon,\n ListItemText,\n} from '@mui/material';\nimport ChevronRight from 'mdi-material-ui/ChevronRight';\nimport ContentCopy from 'mdi-material-ui/ContentCopy';\nimport ChevronDown from 'mdi-material-ui/ChevronDown';\nimport FormatQuoteClose from 'mdi-material-ui/FormatQuoteClose';\nimport CodeJson from 'mdi-material-ui/CodeJson';\nimport Check from 'mdi-material-ui/Check';\nimport { LogEntry } from '@perses-dev/core';\nimport { useSeverityColor } from '../hooks/useSeverity';\nimport { formatLogEntry, formatLogMessage, formatLogAsJson } from '../../utils/copyHelpers';\nimport { LogTimestamp } from './LogTimestamp';\nimport { LogRowContainer, LogRowContent, ExpandButton, LogText } from './LogsStyles';\nimport { LogDetailsTable } from './LogDetailsTable';\n\nconst COPY_SUCCESS_DURATION_MS = 1500;\n\ninterface LogRowProps {\n log?: LogEntry;\n index: number;\n isExpanded: boolean;\n onToggle: (index: number) => void;\n isExpandable?: boolean;\n showTime?: boolean;\n allowWrap?: boolean;\n isSelected?: boolean;\n onSelect?: (index: number, event: React.MouseEvent) => void;\n itemActionButtons?: ReactNode[];\n}\n\nconst DefaultLogRow: React.FC<LogRowProps> = ({\n log,\n isExpanded,\n index,\n onToggle,\n isExpandable = true,\n showTime = false,\n allowWrap = false,\n isSelected = false,\n onSelect,\n itemActionButtons,\n}) => {\n const theme = useTheme();\n const severityColor = useSeverityColor(log);\n const [isHovered, setIsHovered] = useState(false);\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const [copySuccess, setCopySuccess] = useState(false);\n const rowRef = useRef<HTMLDivElement>(null);\n const copyTimeoutRef = useRef<number | null>(null);\n\n // Cleanup timeout on unmount\n useEffect(() => {\n return () => {\n if (copyTimeoutRef.current) {\n window.clearTimeout(copyTimeoutRef.current);\n }\n };\n }, []);\n\n const handleToggle = useCallback(\n (e: React.MouseEvent) => {\n if (isExpandable) {\n e.stopPropagation();\n onToggle(index);\n }\n },\n [isExpandable, onToggle, index]\n );\n\n const handleRowMouseDown = useCallback(\n (e: React.MouseEvent) => {\n if (onSelect) {\n onSelect(index, e);\n }\n },\n [onSelect, index]\n );\n\n const handleOpenMenu = useCallback((e: React.MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n setAnchorEl(e.currentTarget);\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setAnchorEl(null);\n setIsHovered(false);\n }, []);\n\n const handleCopy = useCallback(\n async (format: 'full' | 'message' | 'json') => {\n if (!log) return;\n\n let text: string;\n switch (format) {\n case 'message':\n text = formatLogMessage(log);\n break;\n case 'json':\n text = formatLogAsJson(log);\n break;\n case 'full':\n default:\n text = formatLogEntry(log);\n }\n\n await navigator.clipboard.writeText(text);\n setCopySuccess(true);\n handleCloseMenu();\n\n // Clear existing timeout\n if (copyTimeoutRef.current) {\n window.clearTimeout(copyTimeoutRef.current);\n }\n\n // Reset success state after configured duration\n copyTimeoutRef.current = window.setTimeout(() => {\n setCopySuccess(false);\n }, COPY_SUCCESS_DURATION_MS);\n },\n [log, handleCloseMenu]\n );\n\n if (!log) return null;\n\n const hasRowActions = itemActionButtons && itemActionButtons.length > 0;\n\n return (\n <LogRowContainer\n severityColor={severityColor}\n ref={rowRef}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => {\n if (!anchorEl) {\n setIsHovered(false);\n }\n }}\n data-log-index={index}\n data-testid={`log-row-container-${index}`}\n >\n <LogRowContent\n onMouseDown={handleRowMouseDown}\n isExpandable={isExpandable}\n isHighlighted={Boolean(anchorEl)}\n hasRowActions={hasRowActions}\n isSelected={isSelected}\n >\n {isExpandable && (\n <Box\n onClick={handleToggle}\n sx={{\n display: 'flex',\n alignItems: 'center',\n width: '16px',\n justifyContent: 'center',\n cursor: 'pointer',\n }}\n >\n <ExpandButton size=\"small\" isExpanded={isExpanded}>\n <ChevronRight sx={{ fontSize: '12px' }} />\n </ExpandButton>\n </Box>\n )}\n\n <LogTimestamp timestamp={log.timestamp} />\n\n <Box\n sx={{\n display: 'flex',\n gap: '10px',\n marginLeft: '36px',\n alignItems: 'center',\n }}\n >\n <LogText variant=\"body2\" allowWrap={allowWrap}>\n {log.line}\n </LogText>\n <Tooltip title={copySuccess ? 'Copied!' : 'Copy options'}>\n <IconButton\n size=\"small\"\n onClick={handleOpenMenu}\n aria-label=\"Copy log options\"\n sx={{\n padding: '4px',\n marginLeft: 'auto',\n color: copySuccess ? theme.palette.success.main : theme.palette.text.secondary,\n opacity: isHovered || Boolean(anchorEl) || copySuccess ? 1 : 0,\n pointerEvents: isHovered || Boolean(anchorEl) || copySuccess ? 'auto' : 'none',\n transition: 'opacity 0.08s ease, color 0.2s ease',\n '&:hover': {\n color: copySuccess ? theme.palette.success.main : theme.palette.primary.main,\n backgroundColor: theme.palette.action.hover,\n },\n borderRadius: '4px',\n display: 'flex',\n gap: '2px',\n }}\n >\n {copySuccess ? (\n <Check sx={{ fontSize: '14px' }} />\n ) : (\n <>\n <ContentCopy sx={{ fontSize: '14px' }} />\n <ChevronDown sx={{ fontSize: '12px' }} />\n </>\n )}\n </IconButton>\n </Tooltip>\n {hasRowActions && (\n <Box\n sx={{\n display: 'flex',\n gap: '4px',\n alignItems: 'center',\n opacity: isHovered || Boolean(anchorEl) ? 1 : 0,\n pointerEvents: isHovered || Boolean(anchorEl) ? 'auto' : 'none',\n transition: 'opacity 0.08s ease',\n }}\n >\n {itemActionButtons}\n </Box>\n )}\n <Menu\n anchorEl={anchorEl}\n open={Boolean(anchorEl)}\n onClose={handleCloseMenu}\n onClick={(e) => e.stopPropagation()}\n aria-label=\"Copy format options\"\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n slotProps={{\n paper: {\n sx: {\n mt: 0.5,\n minWidth: 180,\n boxShadow: theme.shadows[3],\n },\n },\n }}\n >\n <MenuItem\n onClick={() => handleCopy('full')}\n sx={{\n py: 1,\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <ListItemIcon>\n <ContentCopy fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText\n primary=\"Copy log\"\n secondary=\"Timestamp + labels + message\"\n slotProps={{\n primary: { fontSize: '14px' },\n secondary: { fontSize: '11px' },\n }}\n />\n </MenuItem>\n <MenuItem\n onClick={() => handleCopy('message')}\n sx={{\n py: 1,\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <ListItemIcon>\n <FormatQuoteClose fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText\n primary=\"Copy message\"\n secondary=\"Message text only\"\n slotProps={{\n primary: { fontSize: '14px' },\n secondary: { fontSize: '11px' },\n }}\n />\n </MenuItem>\n <MenuItem\n onClick={() => handleCopy('json')}\n sx={{\n py: 1,\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <ListItemIcon>\n <CodeJson fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText\n primary=\"Copy as JSON\"\n secondary=\"Full log entry\"\n slotProps={{\n primary: { fontSize: '14px' },\n secondary: { fontSize: '11px' },\n }}\n />\n </MenuItem>\n </Menu>\n </Box>\n </LogRowContent>\n\n <Collapse in={isExpanded} timeout={200}>\n <Box sx={{ padding: '8px' }}>\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: !showTime ? '1fr' : '8px minmax(160px, max-content) 1fr',\n gap: '12px',\n }}\n >\n {showTime && (\n <>\n <Box />\n <Box />\n </>\n )}\n <Box>\n <LogDetailsTable log={log.labels} />\n </Box>\n </Box>\n </Box>\n </Collapse>\n </LogRowContainer>\n );\n};\n\nexport const LogRow = memo(DefaultLogRow);\nLogRow.displayName = 'LogRow';\n"],"names":["React","memo","useCallback","useState","useRef","useEffect","Box","Collapse","useTheme","IconButton","Tooltip","Menu","MenuItem","ListItemIcon","ListItemText","ChevronRight","ContentCopy","ChevronDown","FormatQuoteClose","CodeJson","Check","useSeverityColor","formatLogEntry","formatLogMessage","formatLogAsJson","LogTimestamp","LogRowContainer","LogRowContent","ExpandButton","LogText","LogDetailsTable","COPY_SUCCESS_DURATION_MS","DefaultLogRow","log","isExpanded","index","onToggle","isExpandable","showTime","allowWrap","isSelected","onSelect","itemActionButtons","theme","severityColor","isHovered","setIsHovered","anchorEl","setAnchorEl","copySuccess","setCopySuccess","rowRef","copyTimeoutRef","current","window","clearTimeout","handleToggle","e","stopPropagation","handleRowMouseDown","handleOpenMenu","currentTarget","handleCloseMenu","handleCopy","format","text","navigator","clipboard","writeText","setTimeout","hasRowActions","length","ref","onMouseEnter","onMouseLeave","data-log-index","data-testid","onMouseDown","isHighlighted","Boolean","onClick","sx","display","alignItems","width","justifyContent","cursor","size","fontSize","timestamp","gap","marginLeft","variant","line","title","aria-label","padding","color","palette","success","main","secondary","opacity","pointerEvents","transition","primary","backgroundColor","action","hover","borderRadius","open","onClose","anchorOrigin","vertical","horizontal","transformOrigin","slotProps","paper","mt","minWidth","boxShadow","shadows","py","in","timeout","gridTemplateColumns","labels","LogRow","displayName"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1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kB,IAAI;4CACFyC,IAAI;4CACJ,WAAW;gDACThB,iBAAiB/D,MAAMuD,OAAO,CAACS,MAAM,CAACC,KAAK;4CAC7C;wCACF;;0DAEA,KAAC/F;0DACC,cAAA,KAACK;oDAAiBsE,UAAS;;;0DAE7B,KAAC1E;gDACC2F,SAAQ;gDACRJ,WAAU;gDACVe,WAAW;oDACTX,SAAS;wDAAEjB,UAAU;oDAAO;oDAC5Ba,WAAW;wDAAEb,UAAU;oDAAO;gDAChC;;;;kDAGJ,MAAC5E;wCACCoE,SAAS,IAAMjB,WAAW;wCAC1BkB,IAAI;4CACFyC,IAAI;4CACJ,WAAW;gDACThB,iBAAiB/D,MAAMuD,OAAO,CAACS,MAAM,CAACC,KAAK;4CAC7C;wCACF;;0DAEA,KAAC/F;0DACC,cAAA,KAACM;oDAASqE,UAAS;;;0DAErB,KAAC1E;gDACC2F,SAAQ;gDACRJ,WAAU;gDACVe,WAAW;oDACTX,SAAS;wDAAEjB,UAAU;oDAAO;oDAC5Ba,WAAW;wDAAEb,UAAU;oDAAO;gDAChC;;;;;;;;;;0BAOV,KAACjF;gBAASoH,IAAIzF;gBAAY0F,SAAS;0BACjC,cAAA,KAACtH;oBAAI2E,IAAI;wBAAEe,SAAS;oBAAM;8BACxB,cAAA,MAAC1F;wBACC2E,IAAI;4BACFC,SAAS;4BACT2C,qBAAqB,CAACvF,WAAW,QAAQ;4BACzCoD,KAAK;wBACP;;4BAECpD,0BACC;;kDACE,KAAChC;kDACD,KAACA;;;0CAGL,KAACA;0CACC,cAAA,KAACwB;oCAAgBG,KAAKA,IAAI6F,MAAM;;;;;;;;;AAO9C;AAEA,OAAO,MAAMC,uBAAS9H,KAAK+B,eAAe;AAC1C+F,OAAOC,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/LogRow/LogRow.tsx"],"sourcesContent":["// Copyright 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 React, { memo, useCallback, useState, useRef, useEffect, ReactNode } from 'react';\nimport {\n Box,\n Collapse,\n useTheme,\n IconButton,\n Tooltip,\n Menu,\n MenuItem,\n ListItemIcon,\n ListItemText,\n} from '@mui/material';\nimport ChevronRight from 'mdi-material-ui/ChevronRight';\nimport ContentCopy from 'mdi-material-ui/ContentCopy';\nimport ChevronDown from 'mdi-material-ui/ChevronDown';\nimport FormatQuoteClose from 'mdi-material-ui/FormatQuoteClose';\nimport CodeJson from 'mdi-material-ui/CodeJson';\nimport Check from 'mdi-material-ui/Check';\nimport { LogEntry } from '@perses-dev/core';\nimport { useSeverityColor } from '../hooks/useSeverity';\nimport { formatLogEntry, formatLogMessage, formatLogAsJson } from '../../utils/copyHelpers';\nimport { LogTimestamp } from './LogTimestamp';\nimport { LogRowContainer, LogRowContent, ExpandButton, LogText } from './LogsStyles';\nimport { LogDetailsTable } from './LogDetailsTable';\n\nconst COPY_SUCCESS_DURATION_MS = 1500;\n\ninterface LogRowProps {\n log?: LogEntry;\n index: number;\n isExpanded: boolean;\n onToggle: (index: number) => void;\n isExpandable?: boolean;\n showTime?: boolean;\n allowWrap?: boolean;\n isSelected?: boolean;\n onSelect?: (index: number, event: React.MouseEvent) => void;\n itemActionButtons?: ReactNode[];\n}\n\nconst DefaultLogRow: React.FC<LogRowProps> = ({\n log,\n isExpanded,\n index,\n onToggle,\n isExpandable = true,\n showTime = false,\n allowWrap = false,\n isSelected = false,\n onSelect,\n itemActionButtons,\n}) => {\n const theme = useTheme();\n const severityColor = useSeverityColor(log);\n const [isHovered, setIsHovered] = useState(false);\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const [copySuccess, setCopySuccess] = useState(false);\n const rowRef = useRef<HTMLDivElement>(null);\n const copyTimeoutRef = useRef<number | null>(null);\n\n // Cleanup timeout on unmount\n useEffect(() => {\n return (): void => {\n if (copyTimeoutRef.current) {\n window.clearTimeout(copyTimeoutRef.current);\n }\n };\n }, []);\n\n const handleToggle = useCallback(\n (e: React.MouseEvent) => {\n if (isExpandable) {\n e.stopPropagation();\n onToggle(index);\n }\n },\n [isExpandable, onToggle, index]\n );\n\n const handleRowMouseDown = useCallback(\n (e: React.MouseEvent) => {\n if (onSelect) {\n onSelect(index, e);\n }\n },\n [onSelect, index]\n );\n\n const handleOpenMenu = useCallback((e: React.MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n setAnchorEl(e.currentTarget);\n }, []);\n\n const handleCloseMenu = useCallback(() => {\n setAnchorEl(null);\n setIsHovered(false);\n }, []);\n\n const handleCopy = useCallback(\n async (format: 'full' | 'message' | 'json') => {\n if (!log) return;\n\n let text: string;\n switch (format) {\n case 'message':\n text = formatLogMessage(log);\n break;\n case 'json':\n text = formatLogAsJson(log);\n break;\n case 'full':\n default:\n text = formatLogEntry(log);\n }\n\n await navigator.clipboard.writeText(text);\n setCopySuccess(true);\n handleCloseMenu();\n\n // Clear existing timeout\n if (copyTimeoutRef.current) {\n window.clearTimeout(copyTimeoutRef.current);\n }\n\n // Reset success state after configured duration\n copyTimeoutRef.current = window.setTimeout(() => {\n setCopySuccess(false);\n }, COPY_SUCCESS_DURATION_MS);\n },\n [log, handleCloseMenu]\n );\n\n if (!log) return null;\n\n const hasRowActions = itemActionButtons && itemActionButtons.length > 0;\n\n return (\n <LogRowContainer\n severityColor={severityColor}\n ref={rowRef}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => {\n if (!anchorEl) {\n setIsHovered(false);\n }\n }}\n data-log-index={index}\n data-testid={`log-row-container-${index}`}\n >\n <LogRowContent\n onMouseDown={handleRowMouseDown}\n isExpandable={isExpandable}\n isHighlighted={Boolean(anchorEl)}\n hasRowActions={hasRowActions}\n isSelected={isSelected}\n >\n {isExpandable && (\n <Box\n onClick={handleToggle}\n sx={{\n display: 'flex',\n alignItems: 'center',\n width: '16px',\n justifyContent: 'center',\n cursor: 'pointer',\n }}\n >\n <ExpandButton size=\"small\" isExpanded={isExpanded}>\n <ChevronRight sx={{ fontSize: '12px' }} />\n </ExpandButton>\n </Box>\n )}\n\n <LogTimestamp timestamp={log.timestamp} />\n\n <Box\n sx={{\n display: 'flex',\n gap: '10px',\n marginLeft: '36px',\n alignItems: 'center',\n }}\n >\n <LogText variant=\"body2\" allowWrap={allowWrap}>\n {log.line}\n </LogText>\n <Tooltip title={copySuccess ? 'Copied!' : 'Copy options'}>\n <IconButton\n size=\"small\"\n onClick={handleOpenMenu}\n aria-label=\"Copy log options\"\n sx={{\n padding: '4px',\n marginLeft: 'auto',\n color: copySuccess ? theme.palette.success.main : theme.palette.text.secondary,\n opacity: isHovered || Boolean(anchorEl) || copySuccess ? 1 : 0,\n pointerEvents: isHovered || Boolean(anchorEl) || copySuccess ? 'auto' : 'none',\n transition: 'opacity 0.08s ease, color 0.2s ease',\n '&:hover': {\n color: copySuccess ? theme.palette.success.main : theme.palette.primary.main,\n backgroundColor: theme.palette.action.hover,\n },\n borderRadius: '4px',\n display: 'flex',\n gap: '2px',\n }}\n >\n {copySuccess ? (\n <Check sx={{ fontSize: '14px' }} />\n ) : (\n <>\n <ContentCopy sx={{ fontSize: '14px' }} />\n <ChevronDown sx={{ fontSize: '12px' }} />\n </>\n )}\n </IconButton>\n </Tooltip>\n {hasRowActions && (\n <Box\n sx={{\n display: 'flex',\n gap: '4px',\n alignItems: 'center',\n opacity: isHovered || Boolean(anchorEl) ? 1 : 0,\n pointerEvents: isHovered || Boolean(anchorEl) ? 'auto' : 'none',\n transition: 'opacity 0.08s ease',\n }}\n >\n {itemActionButtons}\n </Box>\n )}\n <Menu\n anchorEl={anchorEl}\n open={Boolean(anchorEl)}\n onClose={handleCloseMenu}\n onClick={(e) => e.stopPropagation()}\n aria-label=\"Copy format options\"\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n slotProps={{\n paper: {\n sx: {\n mt: 0.5,\n minWidth: 180,\n boxShadow: theme.shadows[3],\n },\n },\n }}\n >\n <MenuItem\n onClick={() => handleCopy('full')}\n sx={{\n py: 1,\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <ListItemIcon>\n <ContentCopy fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText\n primary=\"Copy log\"\n secondary=\"Timestamp + labels + message\"\n slotProps={{\n primary: { fontSize: '14px' },\n secondary: { fontSize: '11px' },\n }}\n />\n </MenuItem>\n <MenuItem\n onClick={() => handleCopy('message')}\n sx={{\n py: 1,\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <ListItemIcon>\n <FormatQuoteClose fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText\n primary=\"Copy message\"\n secondary=\"Message text only\"\n slotProps={{\n primary: { fontSize: '14px' },\n secondary: { fontSize: '11px' },\n }}\n />\n </MenuItem>\n <MenuItem\n onClick={() => handleCopy('json')}\n sx={{\n py: 1,\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <ListItemIcon>\n <CodeJson fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText\n primary=\"Copy as JSON\"\n secondary=\"Full log entry\"\n slotProps={{\n primary: { fontSize: '14px' },\n secondary: { fontSize: '11px' },\n }}\n />\n </MenuItem>\n </Menu>\n </Box>\n </LogRowContent>\n\n <Collapse in={isExpanded} timeout={200}>\n <Box sx={{ padding: '8px' }}>\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: !showTime ? '1fr' : '8px minmax(160px, max-content) 1fr',\n gap: '12px',\n }}\n >\n {showTime && (\n <>\n <Box />\n <Box />\n </>\n )}\n <Box>\n <LogDetailsTable log={log.labels} />\n </Box>\n </Box>\n </Box>\n </Collapse>\n </LogRowContainer>\n );\n};\n\nexport const LogRow = memo(DefaultLogRow);\nLogRow.displayName = 'LogRow';\n"],"names":["React","memo","useCallback","useState","useRef","useEffect","Box","Collapse","useTheme","IconButton","Tooltip","Menu","MenuItem","ListItemIcon","ListItemText","ChevronRight","ContentCopy","ChevronDown","FormatQuoteClose","CodeJson","Check","useSeverityColor","formatLogEntry","formatLogMessage","formatLogAsJson","LogTimestamp","LogRowContainer","LogRowContent","ExpandButton","LogText","LogDetailsTable","COPY_SUCCESS_DURATION_MS","DefaultLogRow","log","isExpanded","index","onToggle","isExpandable","showTime","allowWrap","isSelected","onSelect","itemActionButtons","theme","severityColor","isHovered","setIsHovered","anchorEl","setAnchorEl","copySuccess","setCopySuccess","rowRef","copyTimeoutRef","current","window","clearTimeout","handleToggle","e","stopPropagation","handleRowMouseDown","handleOpenMenu","currentTarget","handleCloseMenu","handleCopy","format","text","navigator","clipboard","writeText","setTimeout","hasRowActions","length","ref","onMouseEnter","onMouseLeave","data-log-index","data-testid","onMouseDown","isHighlighted","Boolean","onClick","sx","display","alignItems","width","justifyContent","cursor","size","fontSize","timestamp","gap","marginLeft","variant","line","title","aria-label","padding","color","palette","success","main","secondary","opacity","pointerEvents","transition","primary","backgroundColor","action","hover","borderRadius","open","onClose","anchorOrigin","vertical","horizontal","transformOrigin","slotProps","paper","mt","minWidth","boxShadow","shadows","py","in","timeout","gridTemplateColumns","labels","LogRow","displayName"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,SAASC,IAAI,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,SAAS,QAAmB,QAAQ;AACzF,SACEC,GAAG,EACHC,QAAQ,EACRC,QAAQ,EACRC,UAAU,EACVC,OAAO,EACPC,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DAAEb,UAAU;oDAAO;gDAChC;;;;kDAGJ,MAAC5E;wCACCoE,SAAS,IAAMjB,WAAW;wCAC1BkB,IAAI;4CACFyC,IAAI;4CACJ,WAAW;gDACThB,iBAAiB/D,MAAMuD,OAAO,CAACS,MAAM,CAACC,KAAK;4CAC7C;wCACF;;0DAEA,KAAC/F;0DACC,cAAA,KAACM;oDAASqE,UAAS;;;0DAErB,KAAC1E;gDACC2F,SAAQ;gDACRJ,WAAU;gDACVe,WAAW;oDACTX,SAAS;wDAAEjB,UAAU;oDAAO;oDAC5Ba,WAAW;wDAAEb,UAAU;oDAAO;gDAChC;;;;;;;;;;0BAOV,KAACjF;gBAASoH,IAAIzF;gBAAY0F,SAAS;0BACjC,cAAA,KAACtH;oBAAI2E,IAAI;wBAAEe,SAAS;oBAAM;8BACxB,cAAA,MAAC1F;wBACC2E,IAAI;4BACFC,SAAS;4BACT2C,qBAAqB,CAACvF,WAAW,QAAQ;4BACzCoD,KAAK;wBACP;;4BAECpD,0BACC;;kDACE,KAAChC;kDACD,KAACA;;;0CAGL,KAACA;0CACC,cAAA,KAACwB;oCAAgBG,KAAKA,IAAI6F,MAAM;;;;;;;;;AAO9C;AAEA,OAAO,MAAMC,uBAAS9H,KAAK+B,eAAe;AAC1C+F,OAAOC,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/VirtualizedLogsList.tsx"],"sourcesContent":["// Copyright 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 React, { useCallback, useState, useEffect, useRef, ReactNode } from 'react';\nimport { Box, useTheme, Popover, Button, ButtonGroup, IconButton } from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { Virtuoso } from 'react-virtuoso';\nimport { LogEntry } from '@perses-dev/core';\nimport { useSelection } from '@perses-dev/components';\nimport { useSelectionItemActions } from '@perses-dev/dashboards';\nimport { ActionOptions, useAllVariableValues } from '@perses-dev/plugin-system';\nimport { formatLogEntries, formatLogMessage } from '../utils/copyHelpers';\nimport { LogsTableOptions } from '../model';\nimport { LogRow } from './LogRow';\n\nconst PERSES_LOGSTABLE_HINTS_DISMISSED = 'PERSES_LOGSTABLE_HINTS_DISMISSED';\nconst COPY_TOAST_DURATION_MS = 5000;\n\n// Detect Mac for keyboard shortcuts display\nconst isMac = /(Mac|iPhone|iPod|iPad)/i.test(navigator.userAgent);\n\ninterface VirtualizedLogsListProps {\n logs: LogEntry[];\n spec: LogsTableOptions;\n expandedRows: Set<number>;\n onToggleExpand: (index: number) => void;\n}\n\nexport const VirtualizedLogsList: React.FC<VirtualizedLogsListProps> = ({\n logs,\n spec,\n expandedRows,\n onToggleExpand,\n}) => {\n const theme = useTheme();\n const [selectedRows, setSelectedRows] = useState<Set<number>>(new Set());\n const [lastSelectedIndex, setLastSelectedIndex] = useState<number | null>(null);\n const selectedRowsRef = useRef<Set<number>>(selectedRows);\n const [copyPopoverAnchor, setCopyPopoverAnchor] = useState<{ x: number; y: number } | null>(null);\n const [lastCopiedFormat, setLastCopiedFormat] = useState<'full' | 'message' | 'json'>('full');\n const [lastCopiedCount, setLastCopiedCount] = useState(0);\n const copyPopoverTimerRef = useRef<number | null>(null);\n const [isHintsDismissed, setIsHintsDismissed] = useState(() => {\n try {\n return localStorage.getItem(PERSES_LOGSTABLE_HINTS_DISMISSED) === 'true';\n } catch {\n return false;\n }\n });\n\n const selectionEnabled = spec.selection?.enabled ?? false;\n const { setSelection, clearSelection } = useSelection<LogEntry, number>();\n\n const allVariables = useAllVariableValues();\n const itemActionsConfig = spec.actions ? (spec.actions as ActionOptions) : undefined;\n const itemActionsListConfig =\n itemActionsConfig?.enabled && itemActionsConfig.displayWithItem ? itemActionsConfig.actionsList : [];\n\n const { getItemActionButtons, confirmDialog } = useSelectionItemActions<number>({\n actions: itemActionsListConfig,\n variableState: allVariables,\n });\n\n useEffect(() => {\n selectedRowsRef.current = selectedRows;\n }, [selectedRows]);\n\n // Sync local selection state with context when selection is enabled\n useEffect(() => {\n if (!selectionEnabled) return;\n\n if (selectedRows.size === 0) {\n clearSelection();\n } else {\n const selectionItems = Array.from(selectedRows)\n .map((index) => {\n const log = logs[index];\n return log ? { id: index, item: log } : null;\n })\n .filter((entry): entry is { id: number; item: LogEntry } => entry !== null);\n setSelection(selectionItems);\n }\n }, [selectedRows, logs, selectionEnabled, setSelection, clearSelection]);\n\n const handleDismissHints = useCallback(() => {\n setIsHintsDismissed(true);\n try {\n localStorage.setItem(PERSES_LOGSTABLE_HINTS_DISMISSED, 'true');\n } catch {\n // Ignore localStorage errors\n }\n }, []);\n\n const showCopyPopover = useCallback((format: 'full' | 'message' | 'json' = 'full', count: number) => {\n // Show toast at bottom-right corner\n const x = window.innerWidth - 32;\n const y = window.innerHeight - 32;\n setCopyPopoverAnchor({ x, y });\n setLastCopiedFormat(format);\n setLastCopiedCount(count);\n\n // Clear existing timer\n if (copyPopoverTimerRef.current) {\n window.clearTimeout(copyPopoverTimerRef.current);\n }\n\n // Auto-dismiss after configured duration\n copyPopoverTimerRef.current = window.setTimeout(() => {\n setCopyPopoverAnchor(null);\n }, COPY_TOAST_DURATION_MS);\n }, []);\n\n const handleCloseCopyPopover = useCallback(() => {\n if (copyPopoverTimerRef.current) {\n window.clearTimeout(copyPopoverTimerRef.current);\n }\n setCopyPopoverAnchor(null);\n }, []);\n\n const handleCopyInFormat = useCallback(\n async (format: 'full' | 'message' | 'json') => {\n const selectedLogs = Array.from(selectedRowsRef.current)\n .sort((a, b) => a - b)\n .map((index) => logs[index])\n .filter((log) => log !== undefined);\n\n let text: string;\n if (format === 'message') {\n text = selectedLogs.map(formatLogMessage).join('\\n');\n } else if (format === 'json') {\n text = JSON.stringify(selectedLogs, null, 2);\n } else {\n text = formatLogEntries(selectedLogs);\n }\n\n await navigator.clipboard.writeText(text);\n showCopyPopover(format, selectedLogs.length);\n },\n [logs, showCopyPopover]\n );\n\n const handleRowSelect = useCallback(\n (index: number, event: React.MouseEvent) => {\n if (event.shiftKey) {\n // Prevent text selection during shift-click\n event.preventDefault();\n window.getSelection()?.removeAllRanges();\n\n if (lastSelectedIndex !== null) {\n // Range selection: select all rows between anchor and current\n const start = Math.min(lastSelectedIndex, index);\n const end = Math.max(lastSelectedIndex, index);\n const newSelection = new Set<number>();\n for (let i = start; i <= end; i++) {\n newSelection.add(i);\n }\n setSelectedRows(newSelection);\n } else {\n // No anchor set: just select this row and set as anchor\n const newSelection = new Set([index]);\n setSelectedRows(newSelection);\n setLastSelectedIndex(index);\n }\n } else if (event.ctrlKey || event.metaKey) {\n // Prevent text selection during cmd/ctrl-click\n event.preventDefault();\n window.getSelection()?.removeAllRanges();\n\n // Toggle individual row (additive selection)\n const newSelection = new Set(selectedRows);\n if (newSelection.has(index)) {\n newSelection.delete(index);\n } else {\n newSelection.add(index);\n }\n setSelectedRows(newSelection);\n setLastSelectedIndex(index);\n } else {\n // Plain click: set as anchor for future shift-clicks\n // Don't prevent default to allow text selection\n setLastSelectedIndex(index);\n }\n },\n [selectedRows, lastSelectedIndex]\n );\n\n const renderLogRow = (index: number) => {\n const log = logs[index];\n if (!log) return null;\n\n const itemActionButtons: ReactNode[] = itemActionsListConfig?.length\n ? getItemActionButtons({ id: index, data: log as unknown as Record<string, unknown> })\n : [];\n\n return (\n <LogRow\n isExpandable={spec.enableDetails}\n log={log}\n index={index}\n isExpanded={expandedRows.has(index)}\n onToggle={onToggleExpand}\n allowWrap={spec.allowWrap}\n showTime={spec.showTime}\n isSelected={selectedRows.has(index)}\n onSelect={handleRowSelect}\n itemActionButtons={itemActionButtons}\n />\n );\n };\n\n const handleCopy = (e: React.ClipboardEvent<HTMLDivElement>) => {\n const selection = window.getSelection();\n const hasTextSelection = selection && selection.rangeCount > 0 && selection.toString().length > 0;\n\n // If user has text selected, let browser handle it normally\n if (hasTextSelection) {\n return;\n }\n\n // If rows are selected, copy those\n const currentSelectedRows = selectedRowsRef.current;\n if (currentSelectedRows.size > 0) {\n e.preventDefault();\n const selectedLogs = Array.from(currentSelectedRows)\n .sort((a, b) => a - b)\n .map((index) => logs[index])\n .filter((log) => log !== undefined);\n const formattedText = formatLogEntries(selectedLogs);\n e.clipboardData.setData('text/plain', formattedText);\n }\n };\n\n // Keyboard shortcuts for selection\n useEffect(() => {\n const handleKeyDown = async (e: KeyboardEvent) => {\n // Cmd/Ctrl+A: Select all logs\n if ((e.metaKey || e.ctrlKey) && e.key === 'a') {\n e.preventDefault();\n const allIndices = new Set(logs.map((_, index) => index));\n setSelectedRows(allIndices);\n if (logs.length > 0) {\n setLastSelectedIndex(logs.length - 1);\n }\n }\n\n // Cmd/Ctrl+C: Copy selected rows\n if ((e.metaKey || e.ctrlKey) && e.key === 'c') {\n const selection = window.getSelection();\n const hasTextSelection = selection && selection.rangeCount > 0 && selection.toString().length > 0;\n\n // Only handle if we have selected rows and no text selection\n if (selectedRowsRef.current.size > 0 && !hasTextSelection) {\n e.preventDefault();\n const selectedLogs = Array.from(selectedRowsRef.current)\n .sort((a, b) => a - b)\n .map((index) => logs[index])\n .filter((log) => log !== undefined);\n const formattedText = formatLogEntries(selectedLogs);\n await navigator.clipboard.writeText(formattedText);\n showCopyPopover('full', selectedLogs.length);\n }\n }\n\n // Escape: Clear selection\n if (e.key === 'Escape' && selectedRows.size > 0) {\n setSelectedRows(new Set());\n setLastSelectedIndex(null);\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [logs, selectedRows, showCopyPopover]);\n\n // Cleanup timer on unmount\n useEffect(() => {\n return () => {\n if (copyPopoverTimerRef.current) {\n window.clearTimeout(copyPopoverTimerRef.current);\n }\n };\n }, []);\n\n return (\n <>\n {confirmDialog}\n <Box\n sx={{\n height: '100%',\n backgroundColor: theme.palette.background.default,\n overflow: 'hidden',\n boxShadow: theme.shadows[1],\n display: 'flex',\n flexDirection: 'column',\n }}\n onCopy={handleCopy}\n >\n {!isHintsDismissed && (\n <Box\n sx={{\n px: 2,\n py: 0.75,\n fontSize: '12px',\n color: theme.palette.text.secondary,\n backgroundColor: theme.palette.background.paper,\n borderBottom: `1px solid ${theme.palette.divider}`,\n display: 'flex',\n alignItems: 'center',\n gap: 2,\n flexShrink: 0,\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 2, flex: 1 }}>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n {isMac ? '⌘' : 'Ctrl'}+Click to select\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.6 }}>\n •\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n Shift+Click for range\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.6 }}>\n •\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n {isMac ? '⌘' : 'Ctrl'}+C to copy\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.6 }}>\n •\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n Esc to clear\n </Box>\n </Box>\n <IconButton\n size=\"small\"\n onClick={handleDismissHints}\n sx={{\n opacity: 0.6,\n '&:hover': { opacity: 1 },\n padding: 0.5,\n }}\n aria-label=\"Dismiss hints\"\n >\n <CloseIcon sx={{ fontSize: '16px' }} />\n </IconButton>\n </Box>\n )}\n <Virtuoso\n style={{ height: '100%', flexGrow: 1 }}\n initialItemCount={spec.showAll ? logs.length : undefined}\n totalCount={logs.length}\n itemContent={renderLogRow}\n />\n <Popover\n open={Boolean(copyPopoverAnchor)}\n anchorReference=\"anchorPosition\"\n anchorPosition={copyPopoverAnchor ? { top: copyPopoverAnchor.y, left: copyPopoverAnchor.x } : undefined}\n onClose={handleCloseCopyPopover}\n disableScrollLock\n disableAutoFocus\n disableRestoreFocus\n disableEnforceFocus\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n transformOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n slotProps={{\n paper: {\n sx: {\n px: 2,\n py: 1.5,\n boxShadow: theme.shadows[8],\n borderRadius: 2,\n pointerEvents: 'auto',\n },\n },\n }}\n sx={{\n pointerEvents: 'none',\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>\n <Box\n sx={{\n fontSize: '14px',\n color: theme.palette.text.primary,\n fontWeight: 500,\n display: 'flex',\n alignItems: 'center',\n gap: 0.5,\n }}\n >\n ✓ Copied {lastCopiedCount} {lastCopiedCount === 1 ? 'log' : 'logs'} as{' '}\n <Box\n component=\"span\"\n sx={{ color: theme.palette.primary.main, minWidth: '60px', display: 'inline-block' }}\n >\n {lastCopiedFormat === 'full' ? 'Full' : lastCopiedFormat === 'message' ? 'Message' : 'JSON'}\n </Box>\n </Box>\n <ButtonGroup size=\"small\" variant=\"outlined\">\n <Button\n onClick={() => handleCopyInFormat('full')}\n sx={{\n fontSize: '12px',\n textTransform: 'none',\n minWidth: '52px',\n fontWeight: lastCopiedFormat === 'full' ? 600 : 400,\n bgcolor: lastCopiedFormat === 'full' ? theme.palette.action.selected : 'transparent',\n }}\n >\n Full\n </Button>\n <Button\n onClick={() => handleCopyInFormat('message')}\n sx={{\n fontSize: '12px',\n textTransform: 'none',\n minWidth: '74px',\n fontWeight: lastCopiedFormat === 'message' ? 600 : 400,\n bgcolor: lastCopiedFormat === 'message' ? theme.palette.action.selected : 'transparent',\n }}\n >\n Message\n </Button>\n <Button\n onClick={() => handleCopyInFormat('json')}\n sx={{\n fontSize: '12px',\n textTransform: 'none',\n minWidth: '52px',\n fontWeight: lastCopiedFormat === 'json' ? 600 : 400,\n bgcolor: lastCopiedFormat === 'json' ? theme.palette.action.selected : 'transparent',\n }}\n >\n JSON\n </Button>\n </ButtonGroup>\n </Box>\n </Popover>\n </Box>\n </>\n );\n};\n"],"names":["React","useCallback","useState","useEffect","useRef","Box","useTheme","Popover","Button","ButtonGroup","IconButton","CloseIcon","Virtuoso","useSelection","useSelectionItemActions","useAllVariableValues","formatLogEntries","formatLogMessage","LogRow","PERSES_LOGSTABLE_HINTS_DISMISSED","COPY_TOAST_DURATION_MS","isMac","test","navigator","userAgent","VirtualizedLogsList","logs","spec","expandedRows","onToggleExpand","theme","selectedRows","setSelectedRows","Set","lastSelectedIndex","setLastSelectedIndex","selectedRowsRef","copyPopoverAnchor","setCopyPopoverAnchor","lastCopiedFormat","setLastCopiedFormat","lastCopiedCount","setLastCopiedCount","copyPopoverTimerRef","isHintsDismissed","setIsHintsDismissed","localStorage","getItem","selectionEnabled","selection","enabled","setSelection","clearSelection","allVariables","itemActionsConfig","actions","undefined","itemActionsListConfig","displayWithItem","actionsList","getItemActionButtons","confirmDialog","variableState","current","size","selectionItems","Array","from","map","index","log","id","item","filter","entry","handleDismissHints","setItem","showCopyPopover","format","count","x","window","innerWidth","y","innerHeight","clearTimeout","setTimeout","handleCloseCopyPopover","handleCopyInFormat","selectedLogs","sort","a","b","text","join","JSON","stringify","clipboard","writeText","length","handleRowSelect","event","shiftKey","preventDefault","getSelection","removeAllRanges","start","Math","min","end","max","newSelection","i","add","ctrlKey","metaKey","has","delete","renderLogRow","itemActionButtons","data","isExpandable","enableDetails","isExpanded","onToggle","allowWrap","showTime","isSelected","onSelect","handleCopy","e","hasTextSelection","rangeCount","toString","currentSelectedRows","formattedText","clipboardData","setData","handleKeyDown","key","allIndices","_","addEventListener","removeEventListener","sx","height","backgroundColor","palette","background","default","overflow","boxShadow","shadows","display","flexDirection","onCopy","px","py","fontSize","color","secondary","paper","borderBottom","divider","alignItems","gap","flexShrink","flex","component","opacity","onClick","padding","aria-label","style","flexGrow","initialItemCount","showAll","totalCount","itemContent","open","Boolean","anchorReference","anchorPosition","top","left","onClose","disableScrollLock","disableAutoFocus","disableRestoreFocus","disableEnforceFocus","anchorOrigin","vertical","horizontal","transformOrigin","slotProps","borderRadius","pointerEvents","primary","fontWeight","main","minWidth","variant","textTransform","bgcolor","action","selected"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,SAASC,WAAW,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,QAAmB,QAAQ;AACnF,SAASC,GAAG,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,gBAAgB;AACxF,OAAOC,eAAe,wBAAwB;AAC9C,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAAwBC,oBAAoB,QAAQ,4BAA4B;AAChF,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAE1E,SAASC,MAAM,QAAQ,WAAW;AAElC,MAAMC,mCAAmC;AACzC,MAAMC,yBAAyB;AAE/B,4CAA4C;AAC5C,MAAMC,QAAQ,0BAA0BC,IAAI,CAACC,UAAUC,SAAS;AAShE,OAAO,MAAMC,sBAA0D,CAAC,EACtEC,IAAI,EACJC,IAAI,EACJC,YAAY,EACZC,cAAc,EACf;IACC,MAAMC,QAAQxB;IACd,MAAM,CAACyB,cAAcC,gBAAgB,GAAG9B,SAAsB,IAAI+B;IAClE,MAAM,CAACC,mBAAmBC,qBAAqB,GAAGjC,SAAwB;IAC1E,MAAMkC,kBAAkBhC,OAAoB2B;IAC5C,MAAM,CAACM,mBAAmBC,qBAAqB,GAAGpC,SAA0C;IAC5F,MAAM,CAACqC,kBAAkBC,oBAAoB,GAAGtC,SAAsC;IACtF,MAAM,CAACuC,iBAAiBC,mBAAmB,GAAGxC,SAAS;I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AAO,CAACkD,OAAO,CAACE,IAAI;gDAAEC,UAAU;gDAAQ/C,SAAS;4CAAe;sDAElFlH,qBAAqB,SAAS,SAASA,qBAAqB,YAAY,YAAY;;;;8CAGzF,MAAC9B;oCAAYuD,MAAK;oCAAQyI,SAAQ;;sDAChC,KAACjM;4CACCkK,SAAS,IAAMlF,mBAAmB;4CAClCwD,IAAI;gDACFc,UAAU;gDACV4C,eAAe;gDACfF,UAAU;gDACVF,YAAY/J,qBAAqB,SAAS,MAAM;gDAChDoK,SAASpK,qBAAqB,SAAST,MAAMqH,OAAO,CAACyD,MAAM,CAACC,QAAQ,GAAG;4CACzE;sDACD;;sDAGD,KAACrM;4CACCkK,SAAS,IAAMlF,mBAAmB;4CAClCwD,IAAI;gDACFc,UAAU;gDACV4C,eAAe;gDACfF,UAAU;gDACVF,YAAY/J,qBAAqB,YAAY,MAAM;gDACnDoK,SAASpK,qBAAqB,YAAYT,MAAMqH,OAAO,CAACyD,MAAM,CAACC,QAAQ,GAAG;4CAC5E;sDACD;;sDAGD,KAACrM;4CACCkK,SAAS,IAAMlF,mBAAmB;4CAClCwD,IAAI;gDACFc,UAAU;gDACV4C,eAAe;gDACfF,UAAU;gDACVF,YAAY/J,qBAAqB,SAAS,MAAM;gDAChDoK,SAASpK,qBAAqB,SAAST,MAAMqH,OAAO,CAACyD,MAAM,CAACC,QAAQ,GAAG;4CACzE;sDACD;;;;;;;;;;;AASf,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/VirtualizedLogsList.tsx"],"sourcesContent":["// Copyright 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 React, { useCallback, useState, useEffect, useRef, ReactNode } from 'react';\nimport { Box, useTheme, Popover, Button, ButtonGroup, IconButton } from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { Virtuoso } from 'react-virtuoso';\nimport { LogEntry } from '@perses-dev/core';\nimport { useSelection } from '@perses-dev/components';\nimport { useSelectionItemActions } from '@perses-dev/dashboards';\nimport { ActionOptions, useAllVariableValues } from '@perses-dev/plugin-system';\nimport { formatLogEntries, formatLogMessage } from '../utils/copyHelpers';\nimport { LogsTableOptions } from '../model';\nimport { LogRow } from './LogRow';\n\nconst PERSES_LOGSTABLE_HINTS_DISMISSED = 'PERSES_LOGSTABLE_HINTS_DISMISSED';\nconst COPY_TOAST_DURATION_MS = 5000;\n\n// Detect Mac for keyboard shortcuts display\nconst isMac = /(Mac|iPhone|iPod|iPad)/i.test(navigator.userAgent);\n\ninterface VirtualizedLogsListProps {\n logs: LogEntry[];\n spec: LogsTableOptions;\n expandedRows: Set<number>;\n onToggleExpand: (index: number) => void;\n}\n\nexport const VirtualizedLogsList: React.FC<VirtualizedLogsListProps> = ({\n logs,\n spec,\n expandedRows,\n onToggleExpand,\n}) => {\n const theme = useTheme();\n const [selectedRows, setSelectedRows] = useState<Set<number>>(new Set());\n const [lastSelectedIndex, setLastSelectedIndex] = useState<number | null>(null);\n const selectedRowsRef = useRef<Set<number>>(selectedRows);\n const [copyPopoverAnchor, setCopyPopoverAnchor] = useState<{ x: number; y: number } | null>(null);\n const [lastCopiedFormat, setLastCopiedFormat] = useState<'full' | 'message' | 'json'>('full');\n const [lastCopiedCount, setLastCopiedCount] = useState(0);\n const copyPopoverTimerRef = useRef<number | null>(null);\n const [isHintsDismissed, setIsHintsDismissed] = useState(() => {\n try {\n return localStorage.getItem(PERSES_LOGSTABLE_HINTS_DISMISSED) === 'true';\n } catch {\n return false;\n }\n });\n\n const selectionEnabled = spec.selection?.enabled ?? false;\n const { setSelection, clearSelection } = useSelection<LogEntry, number>();\n\n const allVariables = useAllVariableValues();\n const itemActionsConfig = spec.actions ? (spec.actions as ActionOptions) : undefined;\n const itemActionsListConfig =\n itemActionsConfig?.enabled && itemActionsConfig.displayWithItem ? itemActionsConfig.actionsList : [];\n\n const { getItemActionButtons, confirmDialog } = useSelectionItemActions<number>({\n actions: itemActionsListConfig,\n variableState: allVariables,\n });\n\n useEffect(() => {\n selectedRowsRef.current = selectedRows;\n }, [selectedRows]);\n\n // Sync local selection state with context when selection is enabled\n useEffect(() => {\n if (!selectionEnabled) return;\n\n if (selectedRows.size === 0) {\n clearSelection();\n } else {\n const selectionItems = Array.from(selectedRows)\n .map((index) => {\n const log = logs[index];\n return log ? { id: index, item: log } : null;\n })\n .filter((entry): entry is { id: number; item: LogEntry } => entry !== null);\n setSelection(selectionItems);\n }\n }, [selectedRows, logs, selectionEnabled, setSelection, clearSelection]);\n\n const handleDismissHints = useCallback(() => {\n setIsHintsDismissed(true);\n try {\n localStorage.setItem(PERSES_LOGSTABLE_HINTS_DISMISSED, 'true');\n } catch {\n // Ignore localStorage errors\n }\n }, []);\n\n const showCopyPopover = useCallback((format: 'full' | 'message' | 'json' = 'full', count: number) => {\n // Show toast at bottom-right corner\n const x = window.innerWidth - 32;\n const y = window.innerHeight - 32;\n setCopyPopoverAnchor({ x, y });\n setLastCopiedFormat(format);\n setLastCopiedCount(count);\n\n // Clear existing timer\n if (copyPopoverTimerRef.current) {\n window.clearTimeout(copyPopoverTimerRef.current);\n }\n\n // Auto-dismiss after configured duration\n copyPopoverTimerRef.current = window.setTimeout(() => {\n setCopyPopoverAnchor(null);\n }, COPY_TOAST_DURATION_MS);\n }, []);\n\n const handleCloseCopyPopover = useCallback(() => {\n if (copyPopoverTimerRef.current) {\n window.clearTimeout(copyPopoverTimerRef.current);\n }\n setCopyPopoverAnchor(null);\n }, []);\n\n const handleCopyInFormat = useCallback(\n async (format: 'full' | 'message' | 'json') => {\n const selectedLogs = Array.from(selectedRowsRef.current)\n .sort((a, b) => a - b)\n .map((index) => logs[index])\n .filter((log) => log !== undefined);\n\n let text: string;\n if (format === 'message') {\n text = selectedLogs.map(formatLogMessage).join('\\n');\n } else if (format === 'json') {\n text = JSON.stringify(selectedLogs, null, 2);\n } else {\n text = formatLogEntries(selectedLogs);\n }\n\n await navigator.clipboard.writeText(text);\n showCopyPopover(format, selectedLogs.length);\n },\n [logs, showCopyPopover]\n );\n\n const handleRowSelect = useCallback(\n (index: number, event: React.MouseEvent) => {\n if (event.shiftKey) {\n // Prevent text selection during shift-click\n event.preventDefault();\n window.getSelection()?.removeAllRanges();\n\n if (lastSelectedIndex !== null) {\n // Range selection: select all rows between anchor and current\n const start = Math.min(lastSelectedIndex, index);\n const end = Math.max(lastSelectedIndex, index);\n const newSelection = new Set<number>();\n for (let i = start; i <= end; i++) {\n newSelection.add(i);\n }\n setSelectedRows(newSelection);\n } else {\n // No anchor set: just select this row and set as anchor\n const newSelection = new Set([index]);\n setSelectedRows(newSelection);\n setLastSelectedIndex(index);\n }\n } else if (event.ctrlKey || event.metaKey) {\n // Prevent text selection during cmd/ctrl-click\n event.preventDefault();\n window.getSelection()?.removeAllRanges();\n\n // Toggle individual row (additive selection)\n const newSelection = new Set(selectedRows);\n if (newSelection.has(index)) {\n newSelection.delete(index);\n } else {\n newSelection.add(index);\n }\n setSelectedRows(newSelection);\n setLastSelectedIndex(index);\n } else {\n // Plain click: set as anchor for future shift-clicks\n // Don't prevent default to allow text selection\n setLastSelectedIndex(index);\n }\n },\n [selectedRows, lastSelectedIndex]\n );\n\n const renderLogRow = (index: number): ReactNode | null => {\n const log = logs[index];\n if (!log) return null;\n\n const itemActionButtons: ReactNode[] = itemActionsListConfig?.length\n ? getItemActionButtons({ id: index, data: log as unknown as Record<string, unknown> })\n : [];\n\n return (\n <LogRow\n isExpandable={spec.enableDetails}\n log={log}\n index={index}\n isExpanded={expandedRows.has(index)}\n onToggle={onToggleExpand}\n allowWrap={spec.allowWrap}\n showTime={spec.showTime}\n isSelected={selectedRows.has(index)}\n onSelect={handleRowSelect}\n itemActionButtons={itemActionButtons}\n />\n );\n };\n\n const handleCopy = (e: React.ClipboardEvent<HTMLDivElement>): void => {\n const selection = window.getSelection();\n const hasTextSelection = selection && selection.rangeCount > 0 && selection.toString().length > 0;\n\n // If user has text selected, let browser handle it normally\n if (hasTextSelection) {\n return;\n }\n\n // If rows are selected, copy those\n const currentSelectedRows = selectedRowsRef.current;\n if (currentSelectedRows.size > 0) {\n e.preventDefault();\n const selectedLogs = Array.from(currentSelectedRows)\n .sort((a, b) => a - b)\n .map((index) => logs[index])\n .filter((log) => log !== undefined);\n const formattedText = formatLogEntries(selectedLogs);\n e.clipboardData.setData('text/plain', formattedText);\n }\n };\n\n // Keyboard shortcuts for selection\n useEffect(() => {\n const handleKeyDown = async (e: KeyboardEvent): Promise<void> => {\n // Cmd/Ctrl+A: Select all logs\n if ((e.metaKey || e.ctrlKey) && e.key === 'a') {\n e.preventDefault();\n const allIndices = new Set(logs.map((_, index) => index));\n setSelectedRows(allIndices);\n if (logs.length > 0) {\n setLastSelectedIndex(logs.length - 1);\n }\n }\n\n // Cmd/Ctrl+C: Copy selected rows\n if ((e.metaKey || e.ctrlKey) && e.key === 'c') {\n const selection = window.getSelection();\n const hasTextSelection = selection && selection.rangeCount > 0 && selection.toString().length > 0;\n\n // Only handle if we have selected rows and no text selection\n if (selectedRowsRef.current.size > 0 && !hasTextSelection) {\n e.preventDefault();\n const selectedLogs = Array.from(selectedRowsRef.current)\n .sort((a, b) => a - b)\n .map((index) => logs[index])\n .filter((log) => log !== undefined);\n const formattedText = formatLogEntries(selectedLogs);\n await navigator.clipboard.writeText(formattedText);\n showCopyPopover('full', selectedLogs.length);\n }\n }\n\n // Escape: Clear selection\n if (e.key === 'Escape' && selectedRows.size > 0) {\n setSelectedRows(new Set());\n setLastSelectedIndex(null);\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return (): void => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [logs, selectedRows, showCopyPopover]);\n\n // Cleanup timer on unmount\n useEffect(() => {\n return (): void => {\n if (copyPopoverTimerRef.current) {\n window.clearTimeout(copyPopoverTimerRef.current);\n }\n };\n }, []);\n\n return (\n <>\n {confirmDialog}\n <Box\n sx={{\n height: '100%',\n backgroundColor: theme.palette.background.default,\n overflow: 'hidden',\n boxShadow: theme.shadows[1],\n display: 'flex',\n flexDirection: 'column',\n }}\n onCopy={handleCopy}\n >\n {!isHintsDismissed && (\n <Box\n sx={{\n px: 2,\n py: 0.75,\n fontSize: '12px',\n color: theme.palette.text.secondary,\n backgroundColor: theme.palette.background.paper,\n borderBottom: `1px solid ${theme.palette.divider}`,\n display: 'flex',\n alignItems: 'center',\n gap: 2,\n flexShrink: 0,\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 2, flex: 1 }}>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n {isMac ? '⌘' : 'Ctrl'}+Click to select\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.6 }}>\n •\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n Shift+Click for range\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.6 }}>\n •\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n {isMac ? '⌘' : 'Ctrl'}+C to copy\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.6 }}>\n •\n </Box>\n <Box component=\"span\" sx={{ opacity: 0.8 }}>\n Esc to clear\n </Box>\n </Box>\n <IconButton\n size=\"small\"\n onClick={handleDismissHints}\n sx={{\n opacity: 0.6,\n '&:hover': { opacity: 1 },\n padding: 0.5,\n }}\n aria-label=\"Dismiss hints\"\n >\n <CloseIcon sx={{ fontSize: '16px' }} />\n </IconButton>\n </Box>\n )}\n <Virtuoso\n style={{ height: '100%', flexGrow: 1 }}\n initialItemCount={spec.showAll ? logs.length : undefined}\n totalCount={logs.length}\n itemContent={renderLogRow}\n />\n <Popover\n open={Boolean(copyPopoverAnchor)}\n anchorReference=\"anchorPosition\"\n anchorPosition={copyPopoverAnchor ? { top: copyPopoverAnchor.y, left: copyPopoverAnchor.x } : undefined}\n onClose={handleCloseCopyPopover}\n disableScrollLock\n disableAutoFocus\n disableRestoreFocus\n disableEnforceFocus\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n transformOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n slotProps={{\n paper: {\n sx: {\n px: 2,\n py: 1.5,\n boxShadow: theme.shadows[8],\n borderRadius: 2,\n pointerEvents: 'auto',\n },\n },\n }}\n sx={{\n pointerEvents: 'none',\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>\n <Box\n sx={{\n fontSize: '14px',\n color: theme.palette.text.primary,\n fontWeight: 500,\n display: 'flex',\n alignItems: 'center',\n gap: 0.5,\n }}\n >\n ✓ Copied {lastCopiedCount} {lastCopiedCount === 1 ? 'log' : 'logs'} as{' '}\n <Box\n component=\"span\"\n sx={{ color: theme.palette.primary.main, minWidth: '60px', display: 'inline-block' }}\n >\n {lastCopiedFormat === 'full' ? 'Full' : lastCopiedFormat === 'message' ? 'Message' : 'JSON'}\n </Box>\n </Box>\n <ButtonGroup size=\"small\" variant=\"outlined\">\n <Button\n onClick={() => handleCopyInFormat('full')}\n sx={{\n fontSize: '12px',\n textTransform: 'none',\n minWidth: '52px',\n fontWeight: lastCopiedFormat === 'full' ? 600 : 400,\n bgcolor: lastCopiedFormat === 'full' ? theme.palette.action.selected : 'transparent',\n }}\n >\n Full\n </Button>\n <Button\n onClick={() => handleCopyInFormat('message')}\n sx={{\n fontSize: '12px',\n textTransform: 'none',\n minWidth: '74px',\n fontWeight: lastCopiedFormat === 'message' ? 600 : 400,\n bgcolor: lastCopiedFormat === 'message' ? theme.palette.action.selected : 'transparent',\n }}\n >\n Message\n </Button>\n <Button\n onClick={() => handleCopyInFormat('json')}\n sx={{\n fontSize: '12px',\n textTransform: 'none',\n minWidth: '52px',\n fontWeight: lastCopiedFormat === 'json' ? 600 : 400,\n bgcolor: lastCopiedFormat === 'json' ? theme.palette.action.selected : 'transparent',\n }}\n >\n JSON\n </Button>\n </ButtonGroup>\n </Box>\n </Popover>\n </Box>\n </>\n );\n};\n"],"names":["React","useCallback","useState","useEffect","useRef","Box","useTheme","Popover","Button","ButtonGroup","IconButton","CloseIcon","Virtuoso","useSelection","useSelectionItemActions","useAllVariableValues","formatLogEntries","formatLogMessage","LogRow","PERSES_LOGSTABLE_HINTS_DISMISSED","COPY_TOAST_DURATION_MS","isMac","test","navigator","userAgent","VirtualizedLogsList","logs","spec","expandedRows","onToggleExpand","theme","selectedRows","setSelectedRows","Set","lastSelectedIndex","setLastSelectedIndex","selectedRowsRef","copyPopoverAnchor","setCopyPopoverAnchor","lastCopiedFormat","setLastCopiedFormat","lastCopiedCount","setLastCopiedCount","copyPopoverTimerRef","isHintsDismissed","setIsHintsDismissed","localStorage","getItem","selectionEnabled","selection","enabled","setSelection","clearSelection","allVariables","itemActionsConfig","actions","undefined","itemActionsListConfig","displayWithItem","actionsList","getItemActionButtons","confirmDialog","variableState","current","size","selectionItems","Array","from","map","index","log","id","item","filter","entry","handleDismissHints","setItem","showCopyPopover","format","count","x","window","innerWidth","y","innerHeight","clearTimeout","setTimeout","handleCloseCopyPopover","handleCopyInFormat","selectedLogs","sort","a","b","text","join","JSON","stringify","clipboard","writeText","length","handleRowSelect","event","shiftKey","preventDefault","getSelection","removeAllRanges","start","Math","min","end","max","newSelection","i","add","ctrlKey","metaKey","has","delete","renderLogRow","itemActionButtons","data","isExpandable","enableDetails","isExpanded","onToggle","allowWrap","showTime","isSelected","onSelect","handleCopy","e","hasTextSelection","rangeCount","toString","currentSelectedRows","formattedText","clipboardData","setData","handleKeyDown","key","allIndices","_","addEventListener","removeEventListener","sx","height","backgroundColor","palette","background","default","overflow","boxShadow","shadows","display","flexDirection","onCopy","px","py","fontSize","color","secondary","paper","borderBottom","divider","alignItems","gap","flexShrink","flex","component","opacity","onClick","padding","aria-label","style","flexGrow","initialItemCount","showAll","totalCount","itemContent","open","Boolean","anchorReference","anchorPosition","top","left","onClose","disableScrollLock","disableAutoFocus","disableRestoreFocus","disableEnforceFocus","anchorOrigin","vertical","horizontal","transformOrigin","slotProps","borderRadius","pointerEvents","primary","fontWeight","main","minWidth","variant","textTransform","bgcolor","action","selected"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,SAASC,WAAW,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,QAAmB,QAAQ;AACnF,SAASC,GAAG,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,QAAQ,gBAAgB;AACxF,OAAOC,eAAe,wBAAwB;AAC9C,SAASC,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAAwBC,oBAAoB,QAAQ,4BAA4B;AAChF,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAE1E,SAASC,MAAM,QAAQ,WAAW;AAElC,MAAMC,mCAAmC;AACzC,MAAMC,yBAAyB;AAE/B,4CAA4C;AAC5C,MAAMC,QAAQ,0BAA0BC,IAAI,CAACC,UAAUC,SAAS;AAShE,OAAO,MAAMC,sBAA0D,CAAC,EACtEC,IAAI,EACJC,IAAI,EACJC,YAAY,EACZC,cAAc,EACf;IACC,MAAMC,QAAQxB;IACd,MAAM,CAACyB,cAAcC,gBAAgB,GAAG9B,SAAsB,IAAI+B;IAClE,MAAM,CAACC,mBAAmBC,qBAAqB,GAAGjC,SAAwB;IAC1E,MAAMkC,kBAAkBhC,OAAoB2B;IAC5C,MAAM,CAACM,mBAAmBC,qBAAqB,GAAGpC,SAA0C;IAC5F,MAAM,C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,QAAQ;wCAAO;wCAAI;sDACvE,KAACpC;4CACCmK,WAAU;4CACVxB,IAAI;gDAAEe,OAAOjI,MAAMqH,OAAO,CAACkD,OAAO,CAACE,IAAI;gDAAEC,UAAU;gDAAQ/C,SAAS;4CAAe;sDAElFlH,qBAAqB,SAAS,SAASA,qBAAqB,YAAY,YAAY;;;;8CAGzF,MAAC9B;oCAAYuD,MAAK;oCAAQyI,SAAQ;;sDAChC,KAACjM;4CACCkK,SAAS,IAAMlF,mBAAmB;4CAClCwD,IAAI;gDACFc,UAAU;gDACV4C,eAAe;gDACfF,UAAU;gDACVF,YAAY/J,qBAAqB,SAAS,MAAM;gDAChDoK,SAASpK,qBAAqB,SAAST,MAAMqH,OAAO,CAACyD,MAAM,CAACC,QAAQ,GAAG;4CACzE;sDACD;;sDAGD,KAACrM;4CACCkK,SAAS,IAAMlF,mBAAmB;4CAClCwD,IAAI;gDACFc,UAAU;gDACV4C,eAAe;gDACfF,UAAU;gDACVF,YAAY/J,qBAAqB,YAAY,MAAM;gDACnDoK,SAASpK,qBAAqB,YAAYT,MAAMqH,OAAO,CAACyD,MAAM,CAACC,QAAQ,GAAG;4CAC5E;sDACD;;sDAGD,KAACrM;4CACCkK,SAAS,IAAMlF,mBAAmB;4CAClCwD,IAAI;gDACFc,UAAU;gDACV4C,eAAe;gDACfF,UAAU;gDACVF,YAAY/J,qBAAqB,SAAS,MAAM;gDAChDoK,SAASpK,qBAAqB,SAAST,MAAMqH,OAAO,CAACyD,MAAM,CAACC,QAAQ,GAAG;4CACzE;sDACD;;;;;;;;;;;AASf,EAAE"}
@@ -1,6 +1,7 @@
1
- export declare const useExpandedRows: () => {
1
+ export interface UseExpandedRowsReturn {
2
2
  expandedRows: Set<number>;
3
3
  toggleExpand: (index: number) => void;
4
4
  clearExpanded: () => void;
5
- };
5
+ }
6
+ export declare const useExpandedRows: () => UseExpandedRowsReturn;
6
7
  //# sourceMappingURL=useExpandedRows.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useExpandedRows.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks/useExpandedRows.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,eAAe;;0BAGe,MAAM;;CAqBhD,CAAC"}
1
+ {"version":3,"file":"useExpandedRows.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks/useExpandedRows.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,eAAe,QAAO,qBAwBlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/hooks/useExpandedRows.ts"],"sourcesContent":["// Copyright 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 { useState, useCallback } from 'react';\n\nexport const useExpandedRows = () => {\n const [expandedRows, setExpandedRows] = useState<Set<number>>(new Set());\n\n const toggleExpand = useCallback((index: number) => {\n setExpandedRows((prev) => {\n const newSet = new Set(prev);\n if (newSet.has(index)) {\n newSet.delete(index);\n } else {\n newSet.add(index);\n }\n return newSet;\n });\n }, []);\n\n const clearExpanded = useCallback(() => {\n setExpandedRows(new Set());\n }, []);\n\n return {\n expandedRows,\n toggleExpand,\n clearExpanded,\n };\n};\n"],"names":["useState","useCallback","useExpandedRows","expandedRows","setExpandedRows","Set","toggleExpand","index","prev","newSet","has","delete","add","clearExpanded"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,QAAQ,EAAEC,WAAW,QAAQ,QAAQ;AAE9C,OAAO,MAAMC,kBAAkB;IAC7B,MAAM,CAACC,cAAcC,gBAAgB,GAAGJ,SAAsB,IAAIK;IAElE,MAAMC,eAAeL,YAAY,CAACM;QAChCH,gBAAgB,CAACI;YACf,MAAMC,SAAS,IAAIJ,IAAIG;YACvB,IAAIC,OAAOC,GAAG,CAACH,QAAQ;gBACrBE,OAAOE,MAAM,CAACJ;YAChB,OAAO;gBACLE,OAAOG,GAAG,CAACL;YACb;YACA,OAAOE;QACT;IACF,GAAG,EAAE;IAEL,MAAMI,gBAAgBZ,YAAY;QAChCG,gBAAgB,IAAIC;IACtB,GAAG,EAAE;IAEL,OAAO;QACLF;QACAG;QACAO;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../../src/components/hooks/useExpandedRows.ts"],"sourcesContent":["// Copyright 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 { useState, useCallback } from 'react';\n\nexport interface UseExpandedRowsReturn {\n expandedRows: Set<number>;\n toggleExpand: (index: number) => void;\n clearExpanded: () => void;\n}\n\nexport const useExpandedRows = (): UseExpandedRowsReturn => {\n const [expandedRows, setExpandedRows] = useState<Set<number>>(new Set());\n\n const toggleExpand = useCallback((index: number) => {\n setExpandedRows((prev) => {\n const newSet = new Set(prev);\n if (newSet.has(index)) {\n newSet.delete(index);\n } else {\n newSet.add(index);\n }\n return newSet;\n });\n }, []);\n\n const clearExpanded = useCallback(() => {\n setExpandedRows(new Set());\n }, []);\n\n return {\n expandedRows,\n toggleExpand,\n clearExpanded,\n };\n};\n"],"names":["useState","useCallback","useExpandedRows","expandedRows","setExpandedRows","Set","toggleExpand","index","prev","newSet","has","delete","add","clearExpanded"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,QAAQ,EAAEC,WAAW,QAAQ,QAAQ;AAQ9C,OAAO,MAAMC,kBAAkB;IAC7B,MAAM,CAACC,cAAcC,gBAAgB,GAAGJ,SAAsB,IAAIK;IAElE,MAAMC,eAAeL,YAAY,CAACM;QAChCH,gBAAgB,CAACI;YACf,MAAMC,SAAS,IAAIJ,IAAIG;YACvB,IAAIC,OAAOC,GAAG,CAACH,QAAQ;gBACrBE,OAAOE,MAAM,CAACJ;YAChB,OAAO;gBACLE,OAAOG,GAAG,CAACL;YACb;YACA,OAAOE;QACT;IACF,GAAG,EAAE;IAEL,MAAMI,gBAAgBZ,YAAY;QAChCG,gBAAgB,IAAIC;IACtB,GAAG,EAAE;IAEL,OAAO;QACLF;QACAG;QACAO;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSeverity.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks/useSeverity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,eAAO,MAAM,gBAAgB,GAAI,MAAM,QAAQ,WAuB9C,CAAC"}
1
+ {"version":3,"file":"useSeverity.d.ts","sourceRoot":"","sources":["../../../../src/components/hooks/useSeverity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,eAAO,MAAM,gBAAgB,GAAI,MAAM,QAAQ,KAAG,MAuBjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/hooks/useSeverity.ts"],"sourcesContent":["// Copyright 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 { useTheme } from '@mui/material';\nimport { LogEntry } from '@perses-dev/core';\nimport { getSeverity } from '../utils';\n\nexport const useSeverityColor = (log?: LogEntry) => {\n const theme = useTheme();\n if (!log) {\n return theme.palette.text.secondary;\n }\n const severity = getSeverity(log);\n\n switch (severity) {\n case 'critical':\n return theme.palette.error.dark;\n case 'error':\n return theme.palette.error.main;\n case 'warning':\n return theme.palette.warning.main;\n case 'info':\n return theme.palette.info.main;\n case 'debug':\n return theme.palette.primary.main;\n case 'trace':\n return theme.palette.grey[500];\n default:\n return theme.palette.text.secondary;\n }\n};\n"],"names":["useTheme","getSeverity","useSeverityColor","log","theme","palette","text","secondary","severity","error","dark","main","warning","info","primary","grey"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,QAAQ,QAAQ,gBAAgB;AAEzC,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,mBAAmB,CAACC;IAC/B,MAAMC,QAAQJ;IACd,IAAI,CAACG,KAAK;QACR,OAAOC,MAAMC,OAAO,CAACC,IAAI,CAACC,SAAS;IACrC;IACA,MAAMC,WAAWP,YAAYE;IAE7B,OAAQK;QACN,KAAK;YACH,OAAOJ,MAAMC,OAAO,CAACI,KAAK,CAACC,IAAI;QACjC,KAAK;YACH,OAAON,MAAMC,OAAO,CAACI,KAAK,CAACE,IAAI;QACjC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACO,OAAO,CAACD,IAAI;QACnC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACQ,IAAI,CAACF,IAAI;QAChC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACS,OAAO,CAACH,IAAI;QACnC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACU,IAAI,CAAC,IAAI;QAChC;YACE,OAAOX,MAAMC,OAAO,CAACC,IAAI,CAACC,SAAS;IACvC;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../../src/components/hooks/useSeverity.ts"],"sourcesContent":["// Copyright 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 { useTheme } from '@mui/material';\nimport { LogEntry } from '@perses-dev/core';\nimport { getSeverity } from '../utils';\n\nexport const useSeverityColor = (log?: LogEntry): string => {\n const theme = useTheme();\n if (!log) {\n return theme.palette.text.secondary;\n }\n const severity = getSeverity(log);\n\n switch (severity) {\n case 'critical':\n return theme.palette.error.dark;\n case 'error':\n return theme.palette.error.main;\n case 'warning':\n return theme.palette.warning.main;\n case 'info':\n return theme.palette.info.main;\n case 'debug':\n return theme.palette.primary.main;\n case 'trace':\n return theme.palette.grey[500];\n default:\n return theme.palette.text.secondary;\n }\n};\n"],"names":["useTheme","getSeverity","useSeverityColor","log","theme","palette","text","secondary","severity","error","dark","main","warning","info","primary","grey"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,QAAQ,QAAQ,gBAAgB;AAEzC,SAASC,WAAW,QAAQ,WAAW;AAEvC,OAAO,MAAMC,mBAAmB,CAACC;IAC/B,MAAMC,QAAQJ;IACd,IAAI,CAACG,KAAK;QACR,OAAOC,MAAMC,OAAO,CAACC,IAAI,CAACC,SAAS;IACrC;IACA,MAAMC,WAAWP,YAAYE;IAE7B,OAAQK;QACN,KAAK;YACH,OAAOJ,MAAMC,OAAO,CAACI,KAAK,CAACC,IAAI;QACjC,KAAK;YACH,OAAON,MAAMC,OAAO,CAACI,KAAK,CAACE,IAAI;QACjC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACO,OAAO,CAACD,IAAI;QACnC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACQ,IAAI,CAACF,IAAI;QAChC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACS,OAAO,CAACH,IAAI;QACnC,KAAK;YACH,OAAOP,MAAMC,OAAO,CAACU,IAAI,CAAC,IAAI;QAChC;YACE,OAAOX,MAAMC,OAAO,CAACC,IAAI,CAACC,SAAS;IACvC;AACF,EAAE"}
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "LogsTable",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.2.0",
8
+ "buildVersion": "0.2.1",
9
9
  "buildName": "@perses-dev/logs-table-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/LogsTable.2781dfd7.js",
12
+ "name": "__mf/js/LogsTable.198d1d4a.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -87,14 +87,14 @@
87
87
  {
88
88
  "id": "LogsTable:@perses-dev/components",
89
89
  "name": "@perses-dev/components",
90
- "version": "0.53.0",
90
+ "version": "0.53.1",
91
91
  "singleton": true,
92
- "requiredVersion": "^0.53.0",
92
+ "requiredVersion": "^0.53.1",
93
93
  "assets": {
94
94
  "js": {
95
95
  "async": [],
96
96
  "sync": [
97
- "__mf/js/async/1129.e0f0503a.js"
97
+ "__mf/js/async/193.39599d76.js"
98
98
  ]
99
99
  },
100
100
  "css": {
@@ -106,9 +106,9 @@
106
106
  {
107
107
  "id": "LogsTable:@perses-dev/core",
108
108
  "name": "@perses-dev/core",
109
- "version": "0.53.0-rc.2",
109
+ "version": "0.53.0",
110
110
  "singleton": true,
111
- "requiredVersion": "^0.53.0-rc.2",
111
+ "requiredVersion": "^0.53.0",
112
112
  "assets": {
113
113
  "js": {
114
114
  "async": [],
@@ -125,14 +125,14 @@
125
125
  {
126
126
  "id": "LogsTable:@perses-dev/dashboards",
127
127
  "name": "@perses-dev/dashboards",
128
- "version": "0.53.0",
128
+ "version": "0.53.1",
129
129
  "singleton": true,
130
- "requiredVersion": "^0.53.0",
130
+ "requiredVersion": "^0.53.1",
131
131
  "assets": {
132
132
  "js": {
133
133
  "async": [],
134
134
  "sync": [
135
- "__mf/js/async/6034.130a9e6d.js"
135
+ "__mf/js/async/6034.7c4a93c7.js"
136
136
  ]
137
137
  },
138
138
  "css": {
@@ -144,14 +144,14 @@
144
144
  {
145
145
  "id": "LogsTable:@perses-dev/plugin-system",
146
146
  "name": "@perses-dev/plugin-system",
147
- "version": "0.53.0",
147
+ "version": "0.53.1",
148
148
  "singleton": true,
149
- "requiredVersion": "^0.53.0",
149
+ "requiredVersion": "^0.53.1",
150
150
  "assets": {
151
151
  "js": {
152
152
  "async": [],
153
153
  "sync": [
154
- "__mf/js/async/648.0ddef36d.js"
154
+ "__mf/js/async/1634.90d6ae2a.js"
155
155
  ]
156
156
  },
157
157
  "css": {
@@ -306,7 +306,7 @@
306
306
  "__mf/js/async/9293.7e278959.js",
307
307
  "__mf/js/async/7445.28262ec0.js",
308
308
  "__mf/js/async/8608.4e8b55b4.js",
309
- "__mf/js/async/__federation_expose_LogsTable.f2d6f7ad.js"
309
+ "__mf/js/async/__federation_expose_LogsTable.018ab634.js"
310
310
  ],
311
311
  "async": [
312
312
  "__mf/js/async/lib-router.04411383.js",
package/mf-stats.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "LogsTable",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.2.0",
8
+ "buildVersion": "0.2.1",
9
9
  "buildName": "@perses-dev/logs-table-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/LogsTable.2781dfd7.js",
12
+ "name": "__mf/js/LogsTable.198d1d4a.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -95,17 +95,17 @@
95
95
  },
96
96
  {
97
97
  "singleton": true,
98
- "requiredVersion": "^0.53.0",
98
+ "requiredVersion": "^0.53.1",
99
99
  "shareScope": "default",
100
100
  "name": "@perses-dev/components",
101
- "version": "0.53.0",
101
+ "version": "0.53.1",
102
102
  "eager": false,
103
103
  "id": "LogsTable:@perses-dev/components",
104
104
  "assets": {
105
105
  "js": {
106
106
  "async": [],
107
107
  "sync": [
108
- "__mf/js/async/1129.e0f0503a.js"
108
+ "__mf/js/async/193.39599d76.js"
109
109
  ]
110
110
  },
111
111
  "css": {
@@ -119,10 +119,10 @@
119
119
  },
120
120
  {
121
121
  "singleton": true,
122
- "requiredVersion": "^0.53.0-rc.2",
122
+ "requiredVersion": "^0.53.0",
123
123
  "shareScope": "default",
124
124
  "name": "@perses-dev/core",
125
- "version": "0.53.0-rc.2",
125
+ "version": "0.53.0",
126
126
  "eager": false,
127
127
  "id": "LogsTable:@perses-dev/core",
128
128
  "assets": {
@@ -141,17 +141,17 @@
141
141
  },
142
142
  {
143
143
  "singleton": true,
144
- "requiredVersion": "^0.53.0",
144
+ "requiredVersion": "^0.53.1",
145
145
  "shareScope": "default",
146
146
  "name": "@perses-dev/dashboards",
147
- "version": "0.53.0",
147
+ "version": "0.53.1",
148
148
  "eager": false,
149
149
  "id": "LogsTable:@perses-dev/dashboards",
150
150
  "assets": {
151
151
  "js": {
152
152
  "async": [],
153
153
  "sync": [
154
- "__mf/js/async/6034.130a9e6d.js"
154
+ "__mf/js/async/6034.7c4a93c7.js"
155
155
  ]
156
156
  },
157
157
  "css": {
@@ -165,17 +165,17 @@
165
165
  },
166
166
  {
167
167
  "singleton": true,
168
- "requiredVersion": "^0.53.0",
168
+ "requiredVersion": "^0.53.1",
169
169
  "shareScope": "default",
170
170
  "name": "@perses-dev/plugin-system",
171
- "version": "0.53.0",
171
+ "version": "0.53.1",
172
172
  "eager": false,
173
173
  "id": "LogsTable:@perses-dev/plugin-system",
174
174
  "assets": {
175
175
  "js": {
176
176
  "async": [],
177
177
  "sync": [
178
- "__mf/js/async/648.0ddef36d.js"
178
+ "__mf/js/async/1634.90d6ae2a.js"
179
179
  ]
180
180
  },
181
181
  "css": {
@@ -364,7 +364,7 @@
364
364
  "__mf/js/async/9293.7e278959.js",
365
365
  "__mf/js/async/7445.28262ec0.js",
366
366
  "__mf/js/async/8608.4e8b55b4.js",
367
- "__mf/js/async/__federation_expose_LogsTable.f2d6f7ad.js"
367
+ "__mf/js/async/__federation_expose_LogsTable.018ab634.js"
368
368
  ],
369
369
  "async": [
370
370
  "__mf/js/async/lib-router.04411383.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/logs-table-plugin",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "homepage": "https://github.com/perses/plugins/blob/main/README.md",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,10 +27,10 @@
27
27
  "@emotion/react": "^11.7.1",
28
28
  "@emotion/styled": "^11.6.0",
29
29
  "@hookform/resolvers": "^3.2.0",
30
- "@perses-dev/components": "^0.53.0",
31
- "@perses-dev/core": "^0.53.0-rc.2",
32
- "@perses-dev/plugin-system": "^0.53.0",
33
- "@perses-dev/dashboards": "^0.53.0",
30
+ "@perses-dev/components": "^0.53.1",
31
+ "@perses-dev/core": "^0.53.0",
32
+ "@perses-dev/plugin-system": "^0.53.1",
33
+ "@perses-dev/dashboards": "^0.53.1",
34
34
  "date-fns": "^4.1.0",
35
35
  "date-fns-tz": "^3.2.0",
36
36
  "echarts": "5.5.0",