@perses-dev/logs-table-plugin 0.2.0-beta.0 → 0.2.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.
Files changed (137) hide show
  1. package/__mf/js/{LogsTable.6980b2d9.js → LogsTable.2781dfd7.js} +3 -3
  2. package/__mf/js/async/1117.0a72bc85.js +2 -0
  3. package/__mf/js/async/1129.e0f0503a.js +7 -0
  4. package/__mf/js/async/1240.1a0b69fc.js +1 -0
  5. package/__mf/js/async/304.d0edd380.js +37 -0
  6. package/__mf/js/async/392.2e457deb.js +2 -0
  7. package/__mf/js/async/3982.ab5d25af.js +1 -0
  8. package/__mf/js/async/6034.130a9e6d.js +22 -0
  9. package/__mf/js/async/648.0ddef36d.js +1 -0
  10. package/__mf/js/async/7445.28262ec0.js +110 -0
  11. package/__mf/js/async/8542.1802a06b.js +1 -0
  12. package/__mf/js/async/8608.4e8b55b4.js +1 -0
  13. package/__mf/js/async/8859.f8f648fc.js +1 -0
  14. package/__mf/js/async/9293.7e278959.js +2 -0
  15. package/__mf/js/async/__federation_expose_LogsTable.f2d6f7ad.js +1 -0
  16. package/__mf/js/async/lib-router.04411383.js +2 -0
  17. package/__mf/js/async/{lib-router.318cb64e.js.LICENSE.txt → lib-router.04411383.js.LICENSE.txt} +3 -3
  18. package/__mf/js/{main.029df708.js → main.76fc2531.js} +3 -3
  19. package/lib/LogsTable.d.ts.map +1 -1
  20. package/lib/LogsTable.js +6 -1
  21. package/lib/LogsTable.js.map +1 -1
  22. package/lib/LogsTableComponent.d.ts.map +1 -1
  23. package/lib/LogsTableComponent.js +13 -9
  24. package/lib/LogsTableComponent.js.map +1 -1
  25. package/lib/LogsTableItemSelectionActionsEditor.d.ts +4 -0
  26. package/lib/LogsTableItemSelectionActionsEditor.d.ts.map +1 -0
  27. package/lib/LogsTableItemSelectionActionsEditor.js +36 -0
  28. package/lib/LogsTableItemSelectionActionsEditor.js.map +1 -0
  29. package/lib/LogsTablePanel.js +1 -1
  30. package/lib/LogsTablePanel.js.map +1 -1
  31. package/lib/LogsTableSettingsEditor.js +2 -2
  32. package/lib/LogsTableSettingsEditor.js.map +1 -1
  33. package/lib/bootstrap.js +1 -1
  34. package/lib/bootstrap.js.map +1 -1
  35. package/lib/cjs/LogsTable.js +6 -1
  36. package/lib/cjs/LogsTableComponent.js +12 -8
  37. package/lib/cjs/LogsTableItemSelectionActionsEditor.js +44 -0
  38. package/lib/cjs/LogsTablePanel.js +1 -1
  39. package/lib/cjs/LogsTableSettingsEditor.js +1 -1
  40. package/lib/cjs/bootstrap.js +1 -1
  41. package/lib/cjs/components/EmptyLogsState.js +1 -1
  42. package/lib/cjs/components/LogRow/LogDetailsTable.js +1 -1
  43. package/lib/cjs/components/LogRow/LogRow.js +260 -13
  44. package/lib/cjs/components/LogRow/LogTimestamp.js +1 -1
  45. package/lib/cjs/components/LogRow/LogsStyles.js +9 -7
  46. package/lib/cjs/components/LogRow/index.js +1 -1
  47. package/lib/cjs/components/LogsList.js +1 -1
  48. package/lib/cjs/components/VirtualizedLogsList.js +502 -19
  49. package/lib/cjs/components/hooks/useExpandedRows.js +1 -1
  50. package/lib/cjs/components/hooks/useSeverity.js +47 -0
  51. package/lib/cjs/components/utils.js +78 -0
  52. package/lib/cjs/env.d.js +1 -1
  53. package/lib/cjs/getPluginModule.js +12 -0
  54. package/lib/cjs/index-federation.js +1 -1
  55. package/lib/cjs/index.js +12 -0
  56. package/lib/cjs/model.js +1 -1
  57. package/lib/cjs/setup-tests.js +1 -1
  58. package/lib/cjs/test/mock-query-results.js +60 -3
  59. package/lib/cjs/utils/copyHelpers.js +70 -0
  60. package/lib/components/EmptyLogsState.js +1 -1
  61. package/lib/components/EmptyLogsState.js.map +1 -1
  62. package/lib/components/LogRow/LogDetailsTable.js +1 -1
  63. package/lib/components/LogRow/LogDetailsTable.js.map +1 -1
  64. package/lib/components/LogRow/LogRow.d.ts +4 -1
  65. package/lib/components/LogRow/LogRow.d.ts.map +1 -1
  66. package/lib/components/LogRow/LogRow.js +262 -15
  67. package/lib/components/LogRow/LogRow.js.map +1 -1
  68. package/lib/components/LogRow/LogTimestamp.js +1 -1
  69. package/lib/components/LogRow/LogTimestamp.js.map +1 -1
  70. package/lib/components/LogRow/LogsStyles.d.ts +3 -0
  71. package/lib/components/LogRow/LogsStyles.d.ts.map +1 -1
  72. package/lib/components/LogRow/LogsStyles.js +9 -7
  73. package/lib/components/LogRow/LogsStyles.js.map +1 -1
  74. package/lib/components/LogRow/index.js +1 -1
  75. package/lib/components/LogRow/index.js.map +1 -1
  76. package/lib/components/LogsList.js +1 -1
  77. package/lib/components/LogsList.js.map +1 -1
  78. package/lib/components/VirtualizedLogsList.d.ts.map +1 -1
  79. package/lib/components/VirtualizedLogsList.js +463 -21
  80. package/lib/components/VirtualizedLogsList.js.map +1 -1
  81. package/lib/components/hooks/useExpandedRows.js +1 -1
  82. package/lib/components/hooks/useExpandedRows.js.map +1 -1
  83. package/lib/components/hooks/useSeverity.d.ts +3 -0
  84. package/lib/components/hooks/useSeverity.d.ts.map +1 -0
  85. package/lib/components/hooks/useSeverity.js +39 -0
  86. package/lib/components/hooks/useSeverity.js.map +1 -0
  87. package/lib/components/utils.d.ts +5 -0
  88. package/lib/components/utils.d.ts.map +1 -0
  89. package/lib/components/utils.js +62 -0
  90. package/lib/components/utils.js.map +1 -0
  91. package/lib/env.d.js +1 -1
  92. package/lib/env.d.js.map +1 -1
  93. package/lib/getPluginModule.d.ts.map +1 -1
  94. package/lib/getPluginModule.js +12 -0
  95. package/lib/getPluginModule.js.map +1 -1
  96. package/lib/index-federation.js +1 -1
  97. package/lib/index-federation.js.map +1 -1
  98. package/lib/index.d.ts.map +1 -1
  99. package/lib/index.js +12 -0
  100. package/lib/index.js.map +1 -1
  101. package/lib/model.d.ts +4 -1
  102. package/lib/model.d.ts.map +1 -1
  103. package/lib/model.js +1 -1
  104. package/lib/model.js.map +1 -1
  105. package/lib/setup-tests.js +1 -1
  106. package/lib/setup-tests.js.map +1 -1
  107. package/lib/test/mock-query-results.d.ts +1 -0
  108. package/lib/test/mock-query-results.d.ts.map +1 -1
  109. package/lib/test/mock-query-results.js +57 -3
  110. package/lib/test/mock-query-results.js.map +1 -1
  111. package/lib/utils/copyHelpers.d.ts +28 -0
  112. package/lib/utils/copyHelpers.d.ts.map +1 -0
  113. package/lib/utils/copyHelpers.js +56 -0
  114. package/lib/utils/copyHelpers.js.map +1 -0
  115. package/mf-manifest.json +30 -30
  116. package/mf-stats.json +35 -32
  117. package/package.json +5 -5
  118. package/__mf/js/async/1117.921746cb.js +0 -2
  119. package/__mf/js/async/1939.46722505.js +0 -1
  120. package/__mf/js/async/392.ffb0729b.js +0 -2
  121. package/__mf/js/async/580.9e16464c.js +0 -110
  122. package/__mf/js/async/5997.f6b3408c.js +0 -2
  123. package/__mf/js/async/6600.884fc0ad.js +0 -22
  124. package/__mf/js/async/6916.3d24109f.js +0 -7
  125. package/__mf/js/async/7417.39d13c6a.js +0 -1
  126. package/__mf/js/async/8252.88cd9656.js +0 -1
  127. package/__mf/js/async/8294.dac3426d.js +0 -37
  128. package/__mf/js/async/8535.20f8a453.js +0 -1
  129. package/__mf/js/async/9558.692edca6.js +0 -1
  130. package/__mf/js/async/9890.b97f395d.js +0 -1
  131. package/__mf/js/async/__federation_expose_LogsTable.6f8b33f4.js +0 -1
  132. package/__mf/js/async/lib-router.318cb64e.js +0 -2
  133. /package/__mf/js/async/{1117.921746cb.js.LICENSE.txt → 1117.0a72bc85.js.LICENSE.txt} +0 -0
  134. /package/__mf/js/async/{6916.3d24109f.js.LICENSE.txt → 1129.e0f0503a.js.LICENSE.txt} +0 -0
  135. /package/__mf/js/async/{392.ffb0729b.js.LICENSE.txt → 392.2e457deb.js.LICENSE.txt} +0 -0
  136. /package/__mf/js/async/{6600.884fc0ad.js.LICENSE.txt → 6034.130a9e6d.js.LICENSE.txt} +0 -0
  137. /package/__mf/js/async/{580.9e16464c.js.LICENSE.txt → 7445.28262ec0.js.LICENSE.txt} +0 -0
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright The Perses Authors
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { ItemSelectionActionsEditor } from '@perses-dev/plugin-system';
15
+ export function LogsTableItemSelectionActionsEditor({ value, onChange }) {
16
+ function handleActionsChange(actions) {
17
+ onChange({
18
+ ...value,
19
+ actions: actions
20
+ });
21
+ }
22
+ function handleSelectionChange(selection) {
23
+ onChange({
24
+ ...value,
25
+ selection: selection
26
+ });
27
+ }
28
+ return /*#__PURE__*/ _jsx(ItemSelectionActionsEditor, {
29
+ actionOptions: value.actions,
30
+ onChangeActions: handleActionsChange,
31
+ selectionOptions: value.selection,
32
+ onChangeSelection: handleSelectionChange
33
+ });
34
+ }
35
+
36
+ //# sourceMappingURL=LogsTableItemSelectionActionsEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/LogsTableItemSelectionActionsEditor.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 { ActionOptions, ItemSelectionActionsEditor, SelectionOptions } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { LogsTableSettingsEditorProps } from './model';\n\nexport function LogsTableItemSelectionActionsEditor({ value, onChange }: LogsTableSettingsEditorProps): ReactElement {\n function handleActionsChange(actions: ActionOptions | undefined): void {\n onChange({ ...value, actions: actions });\n }\n\n function handleSelectionChange(selection: SelectionOptions | undefined): void {\n onChange({ ...value, selection: selection });\n }\n\n return (\n <ItemSelectionActionsEditor\n actionOptions={value.actions}\n onChangeActions={handleActionsChange}\n selectionOptions={value.selection}\n onChangeSelection={handleSelectionChange}\n />\n );\n}\n"],"names":["ItemSelectionActionsEditor","LogsTableItemSelectionActionsEditor","value","onChange","handleActionsChange","actions","handleSelectionChange","selection","actionOptions","onChangeActions","selectionOptions","onChangeSelection"],"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,SAAwBA,0BAA0B,QAA0B,4BAA4B;AAIxG,OAAO,SAASC,oCAAoC,EAAEC,KAAK,EAAEC,QAAQ,EAAgC;IACnG,SAASC,oBAAoBC,OAAkC;QAC7DF,SAAS;YAAE,GAAGD,KAAK;YAAEG,SAASA;QAAQ;IACxC;IAEA,SAASC,sBAAsBC,SAAuC;QACpEJ,SAAS;YAAE,GAAGD,KAAK;YAAEK,WAAWA;QAAU;IAC5C;IAEA,qBACE,KAACP;QACCQ,eAAeN,MAAMG,OAAO;QAC5BI,iBAAiBL;QACjBM,kBAAkBR,MAAMK,SAAS;QACjCI,mBAAmBL;;AAGzB"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- // Copyright 2025 The Perses Authors
2
+ // Copyright The Perses Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/LogsTablePanel.tsx"],"sourcesContent":["// Copyright 2025 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 } from '@mui/material';\nimport { useChartsTheme } from '@perses-dev/components';\nimport { ReactElement } from 'react';\nimport { LogsTableComponent } from './LogsTableComponent';\nimport { LogsTableProps } from './model';\n\nexport function LogsTablePanel(props: LogsTableProps): ReactElement {\n const { contentDimensions, queryResults, spec } = props;\n const chartsTheme = useChartsTheme();\n const contentPadding = chartsTheme.container.padding.default;\n\n return (\n <Box sx={{ height: contentDimensions?.height || 0, padding: `${contentPadding}px`, overflowY: 'scroll' }}>\n <LogsTableComponent queryResults={queryResults} spec={spec} />\n </Box>\n );\n}\n"],"names":["Box","useChartsTheme","LogsTableComponent","LogsTablePanel","props","contentDimensions","queryResults","spec","chartsTheme","contentPadding","container","padding","default","sx","height","overflowY"],"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,QAAQ,gBAAgB;AACpC,SAASC,cAAc,QAAQ,yBAAyB;AAExD,SAASC,kBAAkB,QAAQ,uBAAuB;AAG1D,OAAO,SAASC,eAAeC,KAAqB;IAClD,MAAM,EAAEC,iBAAiB,EAAEC,YAAY,EAAEC,IAAI,EAAE,GAAGH;IAClD,MAAMI,cAAcP;IACpB,MAAMQ,iBAAiBD,YAAYE,SAAS,CAACC,OAAO,CAACC,OAAO;IAE5D,qBACE,KAACZ;QAAIa,IAAI;YAAEC,QAAQT,mBAAmBS,UAAU;YAAGH,SAAS,GAAGF,eAAe,EAAE,CAAC;YAAEM,WAAW;QAAS;kBACrG,cAAA,KAACb;YAAmBI,cAAcA;YAAcC,MAAMA;;;AAG5D"}
1
+ {"version":3,"sources":["../../src/LogsTablePanel.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 { Box } from '@mui/material';\nimport { useChartsTheme } from '@perses-dev/components';\nimport { ReactElement } from 'react';\nimport { LogsTableComponent } from './LogsTableComponent';\nimport { LogsTableProps } from './model';\n\nexport function LogsTablePanel(props: LogsTableProps): ReactElement {\n const { contentDimensions, queryResults, spec } = props;\n const chartsTheme = useChartsTheme();\n const contentPadding = chartsTheme.container.padding.default;\n\n return (\n <Box sx={{ height: contentDimensions?.height || 0, padding: `${contentPadding}px`, overflowY: 'scroll' }}>\n <LogsTableComponent queryResults={queryResults} spec={spec} />\n </Box>\n );\n}\n"],"names":["Box","useChartsTheme","LogsTableComponent","LogsTablePanel","props","contentDimensions","queryResults","spec","chartsTheme","contentPadding","container","padding","default","sx","height","overflowY"],"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,GAAG,QAAQ,gBAAgB;AACpC,SAASC,cAAc,QAAQ,yBAAyB;AAExD,SAASC,kBAAkB,QAAQ,uBAAuB;AAG1D,OAAO,SAASC,eAAeC,KAAqB;IAClD,MAAM,EAAEC,iBAAiB,EAAEC,YAAY,EAAEC,IAAI,EAAE,GAAGH;IAClD,MAAMI,cAAcP;IACpB,MAAMQ,iBAAiBD,YAAYE,SAAS,CAACC,OAAO,CAACC,OAAO;IAE5D,qBACE,KAACZ;QAAIa,IAAI;YAAEC,QAAQT,mBAAmBS,UAAU;YAAGH,SAAS,GAAGF,eAAe,EAAE,CAAC;YAAEM,WAAW;QAAS;kBACrG,cAAA,KAACb;YAAmBI,cAAcA;YAAcC,MAAMA;;;AAG5D"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // Copyright 2025 The Perses Authors
2
+ // Copyright The Perses Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { OptionsEditorGrid, OptionsEditorColumn, ThresholdsEditor } from '@perses-dev/components';
14
+ import { OptionsEditorColumn, OptionsEditorGrid, ThresholdsEditor } from '@perses-dev/components';
15
15
  import { LegendOptionsEditor } from '@perses-dev/plugin-system';
16
16
  export function LogsTableSettingsEditor(props) {
17
17
  const { onChange, value } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/LogsTableSettingsEditor.tsx"],"sourcesContent":["// Copyright 2025 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 {\n OptionsEditorGrid,\n OptionsEditorColumn,\n ThresholdsEditor,\n ThresholdsEditorProps,\n} from '@perses-dev/components';\nimport { LegendOptionsEditor, LegendOptionsEditorProps, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { LogsTableOptions } from './model';\n\ntype LogsTableSettingsEditorProps = OptionsEditorProps<LogsTableOptions>;\n\nexport function LogsTableSettingsEditor(props: LogsTableSettingsEditorProps): ReactElement {\n const { onChange, value } = props;\n\n const handleLegendChange: LegendOptionsEditorProps['onChange'] = (newLegend) => {\n onChange({ ...value, legend: newLegend });\n };\n\n const handleThresholdsChange: ThresholdsEditorProps['onChange'] = (thresholds) => {\n onChange({ ...value, thresholds });\n };\n\n return (\n <OptionsEditorGrid>\n <OptionsEditorColumn>\n <LegendOptionsEditor value={value.legend} onChange={handleLegendChange} />\n </OptionsEditorColumn>\n <OptionsEditorColumn>\n <ThresholdsEditor hideDefault thresholds={value.thresholds} onChange={handleThresholdsChange} />\n </OptionsEditorColumn>\n </OptionsEditorGrid>\n );\n}\n"],"names":["OptionsEditorGrid","OptionsEditorColumn","ThresholdsEditor","LegendOptionsEditor","LogsTableSettingsEditor","props","onChange","value","handleLegendChange","newLegend","legend","handleThresholdsChange","thresholds","hideDefault"],"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,SACEA,iBAAiB,EACjBC,mBAAmB,EACnBC,gBAAgB,QAEX,yBAAyB;AAChC,SAASC,mBAAmB,QAAsD,4BAA4B;AAM9G,OAAO,SAASC,wBAAwBC,KAAmC;IACzE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAE5B,MAAMG,qBAA2D,CAACC;QAChEH,SAAS;YAAE,GAAGC,KAAK;YAAEG,QAAQD;QAAU;IACzC;IAEA,MAAME,yBAA4D,CAACC;QACjEN,SAAS;YAAE,GAAGC,KAAK;YAAEK;QAAW;IAClC;IAEA,qBACE,MAACZ;;0BACC,KAACC;0BACC,cAAA,KAACE;oBAAoBI,OAAOA,MAAMG,MAAM;oBAAEJ,UAAUE;;;0BAEtD,KAACP;0BACC,cAAA,KAACC;oBAAiBW,WAAW;oBAACD,YAAYL,MAAMK,UAAU;oBAAEN,UAAUK;;;;;AAI9E"}
1
+ {"version":3,"sources":["../../src/LogsTableSettingsEditor.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 {\n OptionsEditorColumn,\n OptionsEditorGrid,\n ThresholdsEditor,\n ThresholdsEditorProps,\n} from '@perses-dev/components';\nimport { LegendOptionsEditor, LegendOptionsEditorProps, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { LogsTableOptions } from './model';\n\ntype LogsTableSettingsEditorProps = OptionsEditorProps<LogsTableOptions>;\n\nexport function LogsTableSettingsEditor(props: LogsTableSettingsEditorProps): ReactElement {\n const { onChange, value } = props;\n\n const handleLegendChange: LegendOptionsEditorProps['onChange'] = (newLegend) => {\n onChange({ ...value, legend: newLegend });\n };\n\n const handleThresholdsChange: ThresholdsEditorProps['onChange'] = (thresholds) => {\n onChange({ ...value, thresholds });\n };\n\n return (\n <OptionsEditorGrid>\n <OptionsEditorColumn>\n <LegendOptionsEditor value={value.legend} onChange={handleLegendChange} />\n </OptionsEditorColumn>\n <OptionsEditorColumn>\n <ThresholdsEditor hideDefault thresholds={value.thresholds} onChange={handleThresholdsChange} />\n </OptionsEditorColumn>\n </OptionsEditorGrid>\n );\n}\n"],"names":["OptionsEditorColumn","OptionsEditorGrid","ThresholdsEditor","LegendOptionsEditor","LogsTableSettingsEditor","props","onChange","value","handleLegendChange","newLegend","legend","handleThresholdsChange","thresholds","hideDefault"],"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,SACEA,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,QAEX,yBAAyB;AAChC,SAASC,mBAAmB,QAAsD,4BAA4B;AAM9G,OAAO,SAASC,wBAAwBC,KAAmC;IACzE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGF;IAE5B,MAAMG,qBAA2D,CAACC;QAChEH,SAAS;YAAE,GAAGC,KAAK;YAAEG,QAAQD;QAAU;IACzC;IAEA,MAAME,yBAA4D,CAACC;QACjEN,SAAS;YAAE,GAAGC,KAAK;YAAEK;QAAW;IAClC;IAEA,qBACE,MAACX;;0BACC,KAACD;0BACC,cAAA,KAACG;oBAAoBI,OAAOA,MAAMG,MAAM;oBAAEJ,UAAUE;;;0BAEtD,KAACR;0BACC,cAAA,KAACE;oBAAiBW,WAAW;oBAACD,YAAYL,MAAMK,UAAU;oBAAEN,UAAUK;;;;;AAI9E"}
package/lib/bootstrap.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- // Copyright 2025 The Perses Authors
2
+ // Copyright The Perses Authors
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
5
5
  // You may obtain a copy of the License at
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/bootstrap.tsx"],"sourcesContent":["// Copyright 2025 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 from 'react';\nimport ReactDOM from 'react-dom/client';\n\nconst root = ReactDOM.createRoot(document.getElementById('root')!);\nroot.render(<React.StrictMode></React.StrictMode>);\n"],"names":["React","ReactDOM","root","createRoot","document","getElementById","render","StrictMode"],"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,OAAOA,WAAW,QAAQ;AAC1B,OAAOC,cAAc,mBAAmB;AAExC,MAAMC,OAAOD,SAASE,UAAU,CAACC,SAASC,cAAc,CAAC;AACzDH,KAAKI,MAAM,eAAC,KAACN,MAAMO,UAAU"}
1
+ {"version":3,"sources":["../../src/bootstrap.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 from 'react';\nimport ReactDOM from 'react-dom/client';\n\nconst root = ReactDOM.createRoot(document.getElementById('root')!);\nroot.render(<React.StrictMode></React.StrictMode>);\n"],"names":["React","ReactDOM","root","createRoot","document","getElementById","render","StrictMode"],"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,WAAW,QAAQ;AAC1B,OAAOC,cAAc,mBAAmB;AAExC,MAAMC,OAAOD,SAASE,UAAU,CAACC,SAASC,cAAc,CAAC;AACzDH,KAAKI,MAAM,eAAC,KAACN,MAAMO,UAAU"}
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "LogsTable", {
21
21
  }
22
22
  });
23
23
  const _LogsTableComponent = require("./LogsTableComponent");
24
+ const _LogsTableItemSelectionActionsEditor = require("./LogsTableItemSelectionActionsEditor");
24
25
  const _LogsTableSettingsEditor = require("./LogsTableSettingsEditor");
25
26
  const LogsTable = {
26
27
  PanelComponent: _LogsTableComponent.LogsTableComponent,
@@ -28,6 +29,10 @@ const LogsTable = {
28
29
  {
29
30
  label: 'Settings',
30
31
  content: _LogsTableSettingsEditor.LogsTableSettingsEditor
32
+ },
33
+ {
34
+ label: 'Item Actions',
35
+ content: _LogsTableItemSelectionActionsEditor.LogsTableItemSelectionActionsEditor
31
36
  }
32
37
  ],
33
38
  supportedQueryTypes: [
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -25,17 +25,21 @@ const _material = require("@mui/material");
25
25
  const _LogsList = require("./components/LogsList");
26
26
  function LogsTableComponent(props) {
27
27
  const { queryResults, spec } = props;
28
- if (queryResults[0]?.data.logs === undefined) {
29
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
30
- variant: "h3",
28
+ // all queries results must be included
29
+ const logs = queryResults.flatMap((result)=>result?.data.logs?.entries ?? []).sort((a, b)=>b.timestamp - a.timestamp);
30
+ if (!logs.length) {
31
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
31
32
  sx: {
32
- textAlign: 'center',
33
- marginTop: 4
33
+ display: 'flex',
34
+ justifyContent: 'center',
35
+ alignItems: 'center',
36
+ height: '100%'
34
37
  },
35
- children: "No logs to display"
38
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
39
+ children: "No logs to display"
40
+ })
36
41
  });
37
42
  }
38
- const logs = queryResults[0]?.data.logs.entries;
39
43
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsList.LogsList, {
40
44
  logs: logs,
41
45
  spec: spec
@@ -0,0 +1,44 @@
1
+ // Copyright 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
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ Object.defineProperty(exports, "LogsTableItemSelectionActionsEditor", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return LogsTableItemSelectionActionsEditor;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _pluginsystem = require("@perses-dev/plugin-system");
25
+ function LogsTableItemSelectionActionsEditor({ value, onChange }) {
26
+ function handleActionsChange(actions) {
27
+ onChange({
28
+ ...value,
29
+ actions: actions
30
+ });
31
+ }
32
+ function handleSelectionChange(selection) {
33
+ onChange({
34
+ ...value,
35
+ selection: selection
36
+ });
37
+ }
38
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_pluginsystem.ItemSelectionActionsEditor, {
39
+ actionOptions: value.actions,
40
+ onChangeActions: handleActionsChange,
41
+ selectionOptions: value.selection,
42
+ onChangeSelection: handleSelectionChange
43
+ });
44
+ }
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // You may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -24,6 +24,13 @@ const _jsxruntime = require("react/jsx-runtime");
24
24
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
25
25
  const _material = require("@mui/material");
26
26
  const _ChevronRight = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronRight"));
27
+ const _ContentCopy = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ContentCopy"));
28
+ const _ChevronDown = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronDown"));
29
+ const _FormatQuoteClose = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/FormatQuoteClose"));
30
+ const _CodeJson = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/CodeJson"));
31
+ const _Check = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Check"));
32
+ const _useSeverity = require("../hooks/useSeverity");
33
+ const _copyHelpers = require("../../utils/copyHelpers");
27
34
  const _LogTimestamp = require("./LogTimestamp");
28
35
  const _LogsStyles = require("./LogsStyles");
29
36
  const _LogDetailsTable = require("./LogDetailsTable");
@@ -73,11 +80,26 @@ function _interop_require_wildcard(obj, nodeInterop) {
73
80
  }
74
81
  return newObj;
75
82
  }
76
- const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true, showTime = false, allowWrap = false })=>{
83
+ const COPY_SUCCESS_DURATION_MS = 1500;
84
+ const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true, showTime = false, allowWrap = false, isSelected = false, onSelect, itemActionButtons })=>{
77
85
  const theme = (0, _material.useTheme)();
78
- const severityColor = theme.palette.text.secondary;
79
- const handleToggle = (0, _react.useCallback)(()=>{
86
+ const severityColor = (0, _useSeverity.useSeverityColor)(log);
87
+ const [isHovered, setIsHovered] = (0, _react.useState)(false);
88
+ const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
89
+ const [copySuccess, setCopySuccess] = (0, _react.useState)(false);
90
+ const rowRef = (0, _react.useRef)(null);
91
+ const copyTimeoutRef = (0, _react.useRef)(null);
92
+ // Cleanup timeout on unmount
93
+ (0, _react.useEffect)(()=>{
94
+ return ()=>{
95
+ if (copyTimeoutRef.current) {
96
+ window.clearTimeout(copyTimeoutRef.current);
97
+ }
98
+ };
99
+ }, []);
100
+ const handleToggle = (0, _react.useCallback)((e)=>{
80
101
  if (isExpandable) {
102
+ e.stopPropagation();
81
103
  onToggle(index);
82
104
  }
83
105
  }, [
@@ -85,20 +107,80 @@ const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true,
85
107
  onToggle,
86
108
  index
87
109
  ]);
110
+ const handleRowMouseDown = (0, _react.useCallback)((e)=>{
111
+ if (onSelect) {
112
+ onSelect(index, e);
113
+ }
114
+ }, [
115
+ onSelect,
116
+ index
117
+ ]);
118
+ const handleOpenMenu = (0, _react.useCallback)((e)=>{
119
+ e.stopPropagation();
120
+ setAnchorEl(e.currentTarget);
121
+ }, []);
122
+ const handleCloseMenu = (0, _react.useCallback)(()=>{
123
+ setAnchorEl(null);
124
+ setIsHovered(false);
125
+ }, []);
126
+ const handleCopy = (0, _react.useCallback)(async (format)=>{
127
+ if (!log) return;
128
+ let text;
129
+ switch(format){
130
+ case 'message':
131
+ text = (0, _copyHelpers.formatLogMessage)(log);
132
+ break;
133
+ case 'json':
134
+ text = (0, _copyHelpers.formatLogAsJson)(log);
135
+ break;
136
+ case 'full':
137
+ default:
138
+ text = (0, _copyHelpers.formatLogEntry)(log);
139
+ }
140
+ await navigator.clipboard.writeText(text);
141
+ setCopySuccess(true);
142
+ handleCloseMenu();
143
+ // Clear existing timeout
144
+ if (copyTimeoutRef.current) {
145
+ window.clearTimeout(copyTimeoutRef.current);
146
+ }
147
+ // Reset success state after configured duration
148
+ copyTimeoutRef.current = window.setTimeout(()=>{
149
+ setCopySuccess(false);
150
+ }, COPY_SUCCESS_DURATION_MS);
151
+ }, [
152
+ log,
153
+ handleCloseMenu
154
+ ]);
88
155
  if (!log) return null;
156
+ const hasRowActions = itemActionButtons && itemActionButtons.length > 0;
89
157
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_LogsStyles.LogRowContainer, {
90
158
  severityColor: severityColor,
159
+ ref: rowRef,
160
+ onMouseEnter: ()=>setIsHovered(true),
161
+ onMouseLeave: ()=>{
162
+ if (!anchorEl) {
163
+ setIsHovered(false);
164
+ }
165
+ },
166
+ "data-log-index": index,
167
+ "data-testid": `log-row-container-${index}`,
91
168
  children: [
92
169
  /*#__PURE__*/ (0, _jsxruntime.jsxs)(_LogsStyles.LogRowContent, {
93
- onClick: handleToggle,
170
+ onMouseDown: handleRowMouseDown,
94
171
  isExpandable: isExpandable,
172
+ isHighlighted: Boolean(anchorEl),
173
+ hasRowActions: hasRowActions,
174
+ isSelected: isSelected,
95
175
  children: [
96
176
  isExpandable && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
177
+ onClick: handleToggle,
97
178
  sx: {
98
179
  display: 'flex',
99
180
  alignItems: 'center',
100
181
  width: '16px',
101
- justifyContent: 'center'
182
+ justifyContent: 'center',
183
+ cursor: 'pointer'
102
184
  },
103
185
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsStyles.ExpandButton, {
104
186
  size: "small",
@@ -113,17 +195,182 @@ const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true,
113
195
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogTimestamp.LogTimestamp, {
114
196
  timestamp: log.timestamp
115
197
  }),
116
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
198
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
117
199
  sx: {
118
200
  display: 'flex',
119
201
  gap: '10px',
120
- marginLeft: '36px'
202
+ marginLeft: '36px',
203
+ alignItems: 'center'
121
204
  },
122
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsStyles.LogText, {
123
- variant: "body2",
124
- allowWrap: allowWrap,
125
- children: log.line
126
- })
205
+ children: [
206
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_LogsStyles.LogText, {
207
+ variant: "body2",
208
+ allowWrap: allowWrap,
209
+ children: log.line
210
+ }),
211
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tooltip, {
212
+ title: copySuccess ? 'Copied!' : 'Copy options',
213
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
214
+ size: "small",
215
+ onClick: handleOpenMenu,
216
+ "aria-label": "Copy log options",
217
+ sx: {
218
+ padding: '4px',
219
+ marginLeft: 'auto',
220
+ color: copySuccess ? theme.palette.success.main : theme.palette.text.secondary,
221
+ opacity: isHovered || Boolean(anchorEl) || copySuccess ? 1 : 0,
222
+ pointerEvents: isHovered || Boolean(anchorEl) || copySuccess ? 'auto' : 'none',
223
+ transition: 'opacity 0.08s ease, color 0.2s ease',
224
+ '&:hover': {
225
+ color: copySuccess ? theme.palette.success.main : theme.palette.primary.main,
226
+ backgroundColor: theme.palette.action.hover
227
+ },
228
+ borderRadius: '4px',
229
+ display: 'flex',
230
+ gap: '2px'
231
+ },
232
+ children: copySuccess ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_Check.default, {
233
+ sx: {
234
+ fontSize: '14px'
235
+ }
236
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
237
+ children: [
238
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_ContentCopy.default, {
239
+ sx: {
240
+ fontSize: '14px'
241
+ }
242
+ }),
243
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronDown.default, {
244
+ sx: {
245
+ fontSize: '12px'
246
+ }
247
+ })
248
+ ]
249
+ })
250
+ })
251
+ }),
252
+ hasRowActions && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
253
+ sx: {
254
+ display: 'flex',
255
+ gap: '4px',
256
+ alignItems: 'center',
257
+ opacity: isHovered || Boolean(anchorEl) ? 1 : 0,
258
+ pointerEvents: isHovered || Boolean(anchorEl) ? 'auto' : 'none',
259
+ transition: 'opacity 0.08s ease'
260
+ },
261
+ children: itemActionButtons
262
+ }),
263
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Menu, {
264
+ anchorEl: anchorEl,
265
+ open: Boolean(anchorEl),
266
+ onClose: handleCloseMenu,
267
+ onClick: (e)=>e.stopPropagation(),
268
+ "aria-label": "Copy format options",
269
+ anchorOrigin: {
270
+ vertical: 'bottom',
271
+ horizontal: 'right'
272
+ },
273
+ transformOrigin: {
274
+ vertical: 'top',
275
+ horizontal: 'right'
276
+ },
277
+ slotProps: {
278
+ paper: {
279
+ sx: {
280
+ mt: 0.5,
281
+ minWidth: 180,
282
+ boxShadow: theme.shadows[3]
283
+ }
284
+ }
285
+ },
286
+ children: [
287
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.MenuItem, {
288
+ onClick: ()=>handleCopy('full'),
289
+ sx: {
290
+ py: 1,
291
+ '&:hover': {
292
+ backgroundColor: theme.palette.action.hover
293
+ }
294
+ },
295
+ children: [
296
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemIcon, {
297
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_ContentCopy.default, {
298
+ fontSize: "small"
299
+ })
300
+ }),
301
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemText, {
302
+ primary: "Copy log",
303
+ secondary: "Timestamp + labels + message",
304
+ slotProps: {
305
+ primary: {
306
+ fontSize: '14px'
307
+ },
308
+ secondary: {
309
+ fontSize: '11px'
310
+ }
311
+ }
312
+ })
313
+ ]
314
+ }),
315
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.MenuItem, {
316
+ onClick: ()=>handleCopy('message'),
317
+ sx: {
318
+ py: 1,
319
+ '&:hover': {
320
+ backgroundColor: theme.palette.action.hover
321
+ }
322
+ },
323
+ children: [
324
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemIcon, {
325
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FormatQuoteClose.default, {
326
+ fontSize: "small"
327
+ })
328
+ }),
329
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemText, {
330
+ primary: "Copy message",
331
+ secondary: "Message text only",
332
+ slotProps: {
333
+ primary: {
334
+ fontSize: '14px'
335
+ },
336
+ secondary: {
337
+ fontSize: '11px'
338
+ }
339
+ }
340
+ })
341
+ ]
342
+ }),
343
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.MenuItem, {
344
+ onClick: ()=>handleCopy('json'),
345
+ sx: {
346
+ py: 1,
347
+ '&:hover': {
348
+ backgroundColor: theme.palette.action.hover
349
+ }
350
+ },
351
+ children: [
352
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemIcon, {
353
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_CodeJson.default, {
354
+ fontSize: "small"
355
+ })
356
+ }),
357
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemText, {
358
+ primary: "Copy as JSON",
359
+ secondary: "Full log entry",
360
+ slotProps: {
361
+ primary: {
362
+ fontSize: '14px'
363
+ },
364
+ secondary: {
365
+ fontSize: '11px'
366
+ }
367
+ }
368
+ })
369
+ ]
370
+ })
371
+ ]
372
+ })
373
+ ]
127
374
  })
128
375
  ]
129
376
  }),
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -41,19 +41,21 @@ const LogRowContainer = (0, _material.styled)(_material.Box, {
41
41
  borderLeft: `4px solid ${severityColor}`,
42
42
  transition: 'all 0.2s ease',
43
43
  marginBottom: '4px',
44
- fontFamily: '"DejaVu Sans Mono", monospace'
44
+ fontFamily: '"DejaVu Sans Mono", monospace',
45
+ userSelect: 'text'
45
46
  }));
46
47
  const LogRowContent = (0, _material.styled)(_material.Box, {
47
- shouldForwardProp: (prop)=>prop !== 'isExpandable'
48
- })(({ theme, isExpandable })=>({
48
+ shouldForwardProp: (prop)=>prop !== 'isExpandable' && prop !== 'isHighlighted' && prop !== 'isSelected' && prop !== 'hasRowActions'
49
+ })(({ theme, isExpandable, isHighlighted, isSelected, hasRowActions })=>({
49
50
  display: 'grid',
50
- gridTemplateColumns: isExpandable ? '16px minmax(160px, max-content) 1fr' : 'minmax(160px, max-content) 1fr',
51
+ gridTemplateColumns: isExpandable ? `16px minmax(160px, max-content) 1fr ${hasRowActions ? 'min-content' : ''}` : `minmax(160px, max-content) 1fr ${hasRowActions ? 'min-content' : ''}`,
51
52
  alignItems: 'flex-start',
52
53
  padding: '4px 8px',
53
- cursor: isExpandable ? 'pointer' : 'default',
54
+ cursor: 'default',
54
55
  gap: '12px',
56
+ backgroundColor: isHighlighted ? theme.palette.action.hover : isSelected ? theme.palette.action.selected : 'transparent',
55
57
  '&:hover': {
56
- backgroundColor: theme.palette.action.hover
58
+ backgroundColor: isSelected ? theme.palette.action.focus : theme.palette.action.hover
57
59
  }
58
60
  }));
59
61
  const ExpandButton = (0, _material.styled)(_material.IconButton, {
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at
@@ -1,4 +1,4 @@
1
- // Copyright 2025 The Perses Authors
1
+ // Copyright The Perses Authors
2
2
  // Licensed under the Apache License, Version 2.0 (the "License");
3
3
  // you may not use this file except in compliance with the License.
4
4
  // You may obtain a copy of the License at