@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
package/lib/cjs/env.d.js CHANGED
@@ -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,3 +1,15 @@
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.
1
13
  "use strict";
2
14
  Object.defineProperty(exports, "__esModule", {
3
15
  value: true
@@ -40,7 +40,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
40
40
  }
41
41
  return newObj;
42
42
  }
43
- // Copyright 2025 The Perses Authors
43
+ // Copyright The Perses Authors
44
44
  // Licensed under the Apache License, Version 2.0 (the "License");
45
45
  // you may not use this file except in compliance with the License.
46
46
  // You may obtain a copy of the License at
package/lib/cjs/index.js CHANGED
@@ -1,3 +1,15 @@
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.
1
13
  "use strict";
2
14
  Object.defineProperty(exports, "__esModule", {
3
15
  value: true
package/lib/cjs/model.js CHANGED
@@ -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
@@ -26,6 +26,9 @@ _export(exports, {
26
26
  },
27
27
  get MOCK_LOGS_QUERY_RESULT () {
28
28
  return MOCK_LOGS_QUERY_RESULT;
29
+ },
30
+ get MOCK_LOGS_QUERY_RESULTS () {
31
+ return MOCK_LOGS_QUERY_RESULTS;
29
32
  }
30
33
  });
31
34
  const MOCK_LOGS_QUERY_RESULT = {
@@ -37,7 +40,7 @@ const MOCK_LOGS_QUERY_RESULT = {
37
40
  },
38
41
  entries: [
39
42
  {
40
- timestamp: 1666625490,
43
+ timestamp: 1666625491,
41
44
  line: 'foo',
42
45
  labels: {
43
46
  device: '/dev/vda1',
@@ -49,7 +52,7 @@ const MOCK_LOGS_QUERY_RESULT = {
49
52
  }
50
53
  },
51
54
  {
52
- timestamp: 1666625491,
55
+ timestamp: 1666625490,
53
56
  line: 'bar',
54
57
  labels: {
55
58
  device: '/dev/vda15',
@@ -63,6 +66,60 @@ const MOCK_LOGS_QUERY_RESULT = {
63
66
  ]
64
67
  }
65
68
  };
69
+ const MOCK_LOGS_QUERY_RESULTS = [
70
+ {
71
+ logs: {
72
+ entries: [
73
+ {
74
+ timestamp: 1769009811.4465687,
75
+ line: '{"host":"120.180.160.121", "user-identifier":"-", "datetime":"21/Jan/2026:15:32:31 +0000", "method": "DELETE", "request": "/killer/pixy", "protocol":"HTTP/2.0", "status":200, "bytes":9821, "referer": "http://www.internationalend-to-end.com/e-business/web services"}',
76
+ labels: {
77
+ app: 'log-generator',
78
+ bytes: '9821',
79
+ datetime: '21/Jan/2026:15:32:31 +0000',
80
+ detected_level: 'unknown',
81
+ filename: '/var/log/fake/fake.log',
82
+ host: '120.180.160.121',
83
+ method: 'DELETE',
84
+ protocol: 'HTTP/2.0',
85
+ referer: 'http://www.internationalend-to-end.com/e-business/web services',
86
+ request: '/killer/pixy',
87
+ service_name: 'log-generator',
88
+ status: '200',
89
+ user_identifier: '-'
90
+ }
91
+ }
92
+ ],
93
+ totalCount: 1
94
+ }
95
+ },
96
+ {
97
+ logs: {
98
+ entries: [
99
+ {
100
+ timestamp: 1769009890.5294495,
101
+ line: '{"host":"18.178.231.77", "user-identifier":"cormier2584", "datetime":"21/Jan/2026:15:33:49 +0000", "method": "POST", "request": "/facilitate/mesh/methodologies/deploy", "protocol":"HTTP/1.1", "status":503, "bytes":9892, "referer": "http://www.direct.com/holistic"}',
102
+ labels: {
103
+ app: 'log-generator',
104
+ bytes: '9892',
105
+ datetime: '21/Jan/2026:15:33:49 +0000',
106
+ detected_level: 'unknown',
107
+ filename: '/var/log/fake/fake.log',
108
+ host: '18.178.231.77',
109
+ method: 'POST',
110
+ protocol: 'HTTP/1.1',
111
+ referer: 'http://www.direct.com/holistic',
112
+ request: '/facilitate/mesh/methodologies/deploy',
113
+ service_name: 'log-generator',
114
+ status: '503',
115
+ user_identifier: 'cormier2584'
116
+ }
117
+ }
118
+ ],
119
+ totalCount: 1
120
+ }
121
+ }
122
+ ];
66
123
  const MOCK_LOGS_QUERY_DEFINITION = {
67
124
  kind: 'LogsQuery',
68
125
  spec: {
@@ -0,0 +1,70 @@
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
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: Object.getOwnPropertyDescriptor(all, name).get
21
+ });
22
+ }
23
+ _export(exports, {
24
+ get formatLabels () {
25
+ return formatLabels;
26
+ },
27
+ get formatLogAsJson () {
28
+ return formatLogAsJson;
29
+ },
30
+ get formatLogEntries () {
31
+ return formatLogEntries;
32
+ },
33
+ get formatLogEntry () {
34
+ return formatLogEntry;
35
+ },
36
+ get formatLogMessage () {
37
+ return formatLogMessage;
38
+ },
39
+ get formatTimestamp () {
40
+ return formatTimestamp;
41
+ }
42
+ });
43
+ function formatTimestamp(timestamp) {
44
+ const date = typeof timestamp === 'number' ? new Date(timestamp * 1000) : parseTimestamp(timestamp);
45
+ return date.toISOString();
46
+ }
47
+ /**
48
+ * Parses a timestamp string to a Date object
49
+ */ function parseTimestamp(timestamp) {
50
+ return /^\d+$/.test(timestamp) ? new Date(parseInt(timestamp) * 1000) : new Date(Date.parse(timestamp));
51
+ }
52
+ function formatLabels(labels) {
53
+ const entries = Object.entries(labels);
54
+ if (entries.length === 0) return '';
55
+ return entries.map(([key, value])=>`${key}="${value}"`).join(' ');
56
+ }
57
+ function formatLogEntry(log) {
58
+ const timestamp = formatTimestamp(log.timestamp);
59
+ const labels = formatLabels(log.labels || {});
60
+ return labels ? `${timestamp} ${labels} ${log.line}` : `${timestamp} ${log.line}`;
61
+ }
62
+ function formatLogMessage(log) {
63
+ return log.line;
64
+ }
65
+ function formatLogAsJson(log) {
66
+ return JSON.stringify(log, null, 2);
67
+ }
68
+ function formatLogEntries(logs) {
69
+ return logs.map(formatLogEntry).join('\n');
70
+ }
@@ -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/components/EmptyLogsState.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 { Box, Typography, useTheme } from '@mui/material';\n\ninterface EmptyLogsStateProps {\n message?: string;\n}\n\nexport const EmptyLogsState: React.FC<EmptyLogsStateProps> = ({ message = 'No logs to display' }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '200px',\n }}\n >\n <Typography\n variant=\"body2\"\n sx={{\n color: theme.palette.text.secondary,\n fontSize: '14px',\n }}\n >\n {message}\n </Typography>\n </Box>\n );\n};\n"],"names":["React","Box","Typography","useTheme","EmptyLogsState","message","theme","sx","display","alignItems","justifyContent","height","variant","color","palette","text","secondary","fontSize"],"mappings":";AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAAW,QAAQ;AAC1B,SAASC,GAAG,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAM1D,OAAO,MAAMC,iBAAgD,CAAC,EAAEC,UAAU,oBAAoB,EAAE;IAC9F,MAAMC,QAAQH;IAEd,qBACE,KAACF;QACCM,IAAI;YACFC,SAAS;YACTC,YAAY;YACZC,gBAAgB;YAChBC,QAAQ;QACV;kBAEA,cAAA,KAACT;YACCU,SAAQ;YACRL,IAAI;gBACFM,OAAOP,MAAMQ,OAAO,CAACC,IAAI,CAACC,SAAS;gBACnCC,UAAU;YACZ;sBAECZ;;;AAIT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/EmptyLogsState.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 { Box, Typography, useTheme } from '@mui/material';\n\ninterface EmptyLogsStateProps {\n message?: string;\n}\n\nexport const EmptyLogsState: React.FC<EmptyLogsStateProps> = ({ message = 'No logs to display' }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '200px',\n }}\n >\n <Typography\n variant=\"body2\"\n sx={{\n color: theme.palette.text.secondary,\n fontSize: '14px',\n }}\n >\n {message}\n </Typography>\n </Box>\n );\n};\n"],"names":["React","Box","Typography","useTheme","EmptyLogsState","message","theme","sx","display","alignItems","justifyContent","height","variant","color","palette","text","secondary","fontSize"],"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,SAASC,GAAG,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAM1D,OAAO,MAAMC,iBAAgD,CAAC,EAAEC,UAAU,oBAAoB,EAAE;IAC9F,MAAMC,QAAQH;IAEd,qBACE,KAACF;QACCM,IAAI;YACFC,SAAS;YACTC,YAAY;YACZC,gBAAgB;YAChBC,QAAQ;QACV;kBAEA,cAAA,KAACT;YACCU,SAAQ;YACRL,IAAI;gBACFM,OAAOP,MAAMQ,OAAO,CAACC,IAAI,CAACC,SAAS;gBACnCC,UAAU;YACZ;sBAECZ;;;AAIT,EAAE"}
@@ -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
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/LogRow/LogDetailsTable.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 { Table, TableBody, TableRow, TableCell, useTheme, alpha } from '@mui/material';\nimport { Labels } from '@perses-dev/core';\n\ninterface LogDetailsTableProps {\n log: Labels;\n}\n\nexport const LogDetailsTable: React.FC<LogDetailsTableProps> = ({ log }) => {\n const theme = useTheme();\n\n return (\n <Table\n size=\"small\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n '& .MuiTableCell-root': {\n border: 'none',\n padding: '6px 8px',\n fontSize: '12px',\n },\n }}\n >\n <TableBody>\n {Object.entries(log).map(([key, value]) => (\n <TableRow\n key={key}\n sx={{\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.hover, 0.04),\n },\n }}\n >\n <TableCell\n sx={{\n color: theme.palette.text.secondary,\n fontWeight: 500,\n width: '33%',\n }}\n >\n {key}\n </TableCell>\n <TableCell\n sx={{\n color: theme.palette.text.primary,\n wordBreak: 'break-word',\n width: '67%',\n }}\n >\n {value !== undefined && value !== null && value !== '' ? value : '--'}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n );\n};\n"],"names":["React","Table","TableBody","TableRow","TableCell","useTheme","alpha","LogDetailsTable","log","theme","size","sx","border","palette","divider","padding","fontSize","Object","entries","map","key","value","backgroundColor","action","hover","color","text","secondary","fontWeight","width","primary","wordBreak","undefined"],"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,SAASC,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,gBAAgB;AAOvF,OAAO,MAAMC,kBAAkD,CAAC,EAAEC,GAAG,EAAE;IACrE,MAAMC,QAAQJ;IAEd,qBACE,KAACJ;QACCS,MAAK;QACLC,IAAI;YACFC,QAAQ,CAAC,UAAU,EAAEH,MAAMI,OAAO,CAACC,OAAO,EAAE;YAC5C,wBAAwB;gBACtBF,QAAQ;gBACRG,SAAS;gBACTC,UAAU;YACZ;QACF;kBAEA,cAAA,KAACd;sBACEe,OAAOC,OAAO,CAACV,KAAKW,GAAG,CAAC,CAAC,CAACC,KAAKC,MAAM,iBACpC,MAAClB;oBAECQ,IAAI;wBACF,WAAW;4BACTW,iBAAiBhB,MAAMG,MAAMI,OAAO,CAACU,MAAM,CAACC,KAAK,EAAE;wBACrD;oBACF;;sCAEA,KAACpB;4BACCO,IAAI;gCACFc,OAAOhB,MAAMI,OAAO,CAACa,IAAI,CAACC,SAAS;gCACnCC,YAAY;gCACZC,OAAO;4BACT;sCAECT;;sCAEH,KAAChB;4BACCO,IAAI;gCACFc,OAAOhB,MAAMI,OAAO,CAACa,IAAI,CAACI,OAAO;gCACjCC,WAAW;gCACXF,OAAO;4BACT;sCAECR,UAAUW,aAAaX,UAAU,QAAQA,UAAU,KAAKA,QAAQ;;;mBAvB9DD;;;AA8BjB,EAAE"}
1
+ {"version":3,"sources":["../../../../src/components/LogRow/LogDetailsTable.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 { Table, TableBody, TableRow, TableCell, useTheme, alpha } from '@mui/material';\nimport { Labels } from '@perses-dev/core';\n\ninterface LogDetailsTableProps {\n log: Labels;\n}\n\nexport const LogDetailsTable: React.FC<LogDetailsTableProps> = ({ log }) => {\n const theme = useTheme();\n\n return (\n <Table\n size=\"small\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n '& .MuiTableCell-root': {\n border: 'none',\n padding: '6px 8px',\n fontSize: '12px',\n },\n }}\n >\n <TableBody>\n {Object.entries(log).map(([key, value]) => (\n <TableRow\n key={key}\n sx={{\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.hover, 0.04),\n },\n }}\n >\n <TableCell\n sx={{\n color: theme.palette.text.secondary,\n fontWeight: 500,\n width: '33%',\n }}\n >\n {key}\n </TableCell>\n <TableCell\n sx={{\n color: theme.palette.text.primary,\n wordBreak: 'break-word',\n width: '67%',\n }}\n >\n {value !== undefined && value !== null && value !== '' ? value : '--'}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n );\n};\n"],"names":["React","Table","TableBody","TableRow","TableCell","useTheme","alpha","LogDetailsTable","log","theme","size","sx","border","palette","divider","padding","fontSize","Object","entries","map","key","value","backgroundColor","action","hover","color","text","secondary","fontWeight","width","primary","wordBreak","undefined"],"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,SAASC,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,gBAAgB;AAOvF,OAAO,MAAMC,kBAAkD,CAAC,EAAEC,GAAG,EAAE;IACrE,MAAMC,QAAQJ;IAEd,qBACE,KAACJ;QACCS,MAAK;QACLC,IAAI;YACFC,QAAQ,CAAC,UAAU,EAAEH,MAAMI,OAAO,CAACC,OAAO,EAAE;YAC5C,wBAAwB;gBACtBF,QAAQ;gBACRG,SAAS;gBACTC,UAAU;YACZ;QACF;kBAEA,cAAA,KAACd;sBACEe,OAAOC,OAAO,CAACV,KAAKW,GAAG,CAAC,CAAC,CAACC,KAAKC,MAAM,iBACpC,MAAClB;oBAECQ,IAAI;wBACF,WAAW;4BACTW,iBAAiBhB,MAAMG,MAAMI,OAAO,CAACU,MAAM,CAACC,KAAK,EAAE;wBACrD;oBACF;;sCAEA,KAACpB;4BACCO,IAAI;gCACFc,OAAOhB,MAAMI,OAAO,CAACa,IAAI,CAACC,SAAS;gCACnCC,YAAY;gCACZC,OAAO;4BACT;sCAECT;;sCAEH,KAAChB;4BACCO,IAAI;gCACFc,OAAOhB,MAAMI,OAAO,CAACa,IAAI,CAACI,OAAO;gCACjCC,WAAW;gCACXF,OAAO;4BACT;sCAECR,UAAUW,aAAaX,UAAU,QAAQA,UAAU,KAAKA,QAAQ;;;mBAvB9DD;;;AA8BjB,EAAE"}
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { LogEntry } from '@perses-dev/core';
3
3
  interface LogRowProps {
4
4
  log?: LogEntry;
@@ -8,6 +8,9 @@ interface LogRowProps {
8
8
  isExpandable?: boolean;
9
9
  showTime?: boolean;
10
10
  allowWrap?: boolean;
11
+ isSelected?: boolean;
12
+ onSelect?: (index: number, event: React.MouseEvent) => void;
13
+ itemActionButtons?: ReactNode[];
11
14
  }
12
15
  export declare const LogRow: React.NamedExoticComponent<LogRowProps>;
13
16
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"LogRow.d.ts","sourceRoot":"","sources":["../../../../src/components/LogRow/LogRow.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,UAAU,WAAW;IACnB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAgFD,eAAO,MAAM,MAAM,yCAAsB,CAAC"}
1
+ {"version":3,"file":"LogRow.d.ts","sourceRoot":"","sources":["../../../../src/components/LogRow/LogRow.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAkD,SAAS,EAAE,MAAM,OAAO,CAAC;AAkBzF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAS5C,UAAU,WAAW;IACnB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5D,iBAAiB,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC;AAqTD,eAAO,MAAM,MAAM,yCAAsB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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,17 +11,39 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
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 React, { memo, useCallback } from 'react';
15
- import { Box, Collapse, useTheme } from '@mui/material';
14
+ import React, { memo, useCallback, useState, useRef, useEffect } from 'react';
15
+ import { Box, Collapse, useTheme, IconButton, Tooltip, Menu, MenuItem, ListItemIcon, ListItemText } from '@mui/material';
16
16
  import ChevronRight from 'mdi-material-ui/ChevronRight';
17
+ import ContentCopy from 'mdi-material-ui/ContentCopy';
18
+ import ChevronDown from 'mdi-material-ui/ChevronDown';
19
+ import FormatQuoteClose from 'mdi-material-ui/FormatQuoteClose';
20
+ import CodeJson from 'mdi-material-ui/CodeJson';
21
+ import Check from 'mdi-material-ui/Check';
22
+ import { useSeverityColor } from '../hooks/useSeverity';
23
+ import { formatLogEntry, formatLogMessage, formatLogAsJson } from '../../utils/copyHelpers';
17
24
  import { LogTimestamp } from './LogTimestamp';
18
25
  import { LogRowContainer, LogRowContent, ExpandButton, LogText } from './LogsStyles';
19
26
  import { LogDetailsTable } from './LogDetailsTable';
20
- const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true, showTime = false, allowWrap = false })=>{
27
+ const COPY_SUCCESS_DURATION_MS = 1500;
28
+ const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true, showTime = false, allowWrap = false, isSelected = false, onSelect, itemActionButtons })=>{
21
29
  const theme = useTheme();
22
- const severityColor = theme.palette.text.secondary;
23
- const handleToggle = useCallback(()=>{
30
+ const severityColor = useSeverityColor(log);
31
+ const [isHovered, setIsHovered] = useState(false);
32
+ const [anchorEl, setAnchorEl] = useState(null);
33
+ const [copySuccess, setCopySuccess] = useState(false);
34
+ const rowRef = useRef(null);
35
+ const copyTimeoutRef = useRef(null);
36
+ // Cleanup timeout on unmount
37
+ useEffect(()=>{
38
+ return ()=>{
39
+ if (copyTimeoutRef.current) {
40
+ window.clearTimeout(copyTimeoutRef.current);
41
+ }
42
+ };
43
+ }, []);
44
+ const handleToggle = useCallback((e)=>{
24
45
  if (isExpandable) {
46
+ e.stopPropagation();
25
47
  onToggle(index);
26
48
  }
27
49
  }, [
@@ -29,20 +51,80 @@ const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true,
29
51
  onToggle,
30
52
  index
31
53
  ]);
54
+ const handleRowMouseDown = useCallback((e)=>{
55
+ if (onSelect) {
56
+ onSelect(index, e);
57
+ }
58
+ }, [
59
+ onSelect,
60
+ index
61
+ ]);
62
+ const handleOpenMenu = useCallback((e)=>{
63
+ e.stopPropagation();
64
+ setAnchorEl(e.currentTarget);
65
+ }, []);
66
+ const handleCloseMenu = useCallback(()=>{
67
+ setAnchorEl(null);
68
+ setIsHovered(false);
69
+ }, []);
70
+ const handleCopy = useCallback(async (format)=>{
71
+ if (!log) return;
72
+ let text;
73
+ switch(format){
74
+ case 'message':
75
+ text = formatLogMessage(log);
76
+ break;
77
+ case 'json':
78
+ text = formatLogAsJson(log);
79
+ break;
80
+ case 'full':
81
+ default:
82
+ text = formatLogEntry(log);
83
+ }
84
+ await navigator.clipboard.writeText(text);
85
+ setCopySuccess(true);
86
+ handleCloseMenu();
87
+ // Clear existing timeout
88
+ if (copyTimeoutRef.current) {
89
+ window.clearTimeout(copyTimeoutRef.current);
90
+ }
91
+ // Reset success state after configured duration
92
+ copyTimeoutRef.current = window.setTimeout(()=>{
93
+ setCopySuccess(false);
94
+ }, COPY_SUCCESS_DURATION_MS);
95
+ }, [
96
+ log,
97
+ handleCloseMenu
98
+ ]);
32
99
  if (!log) return null;
100
+ const hasRowActions = itemActionButtons && itemActionButtons.length > 0;
33
101
  return /*#__PURE__*/ _jsxs(LogRowContainer, {
34
102
  severityColor: severityColor,
103
+ ref: rowRef,
104
+ onMouseEnter: ()=>setIsHovered(true),
105
+ onMouseLeave: ()=>{
106
+ if (!anchorEl) {
107
+ setIsHovered(false);
108
+ }
109
+ },
110
+ "data-log-index": index,
111
+ "data-testid": `log-row-container-${index}`,
35
112
  children: [
36
113
  /*#__PURE__*/ _jsxs(LogRowContent, {
37
- onClick: handleToggle,
114
+ onMouseDown: handleRowMouseDown,
38
115
  isExpandable: isExpandable,
116
+ isHighlighted: Boolean(anchorEl),
117
+ hasRowActions: hasRowActions,
118
+ isSelected: isSelected,
39
119
  children: [
40
120
  isExpandable && /*#__PURE__*/ _jsx(Box, {
121
+ onClick: handleToggle,
41
122
  sx: {
42
123
  display: 'flex',
43
124
  alignItems: 'center',
44
125
  width: '16px',
45
- justifyContent: 'center'
126
+ justifyContent: 'center',
127
+ cursor: 'pointer'
46
128
  },
47
129
  children: /*#__PURE__*/ _jsx(ExpandButton, {
48
130
  size: "small",
@@ -57,17 +139,182 @@ const DefaultLogRow = ({ log, isExpanded, index, onToggle, isExpandable = true,
57
139
  /*#__PURE__*/ _jsx(LogTimestamp, {
58
140
  timestamp: log.timestamp
59
141
  }),
60
- /*#__PURE__*/ _jsx(Box, {
142
+ /*#__PURE__*/ _jsxs(Box, {
61
143
  sx: {
62
144
  display: 'flex',
63
145
  gap: '10px',
64
- marginLeft: '36px'
146
+ marginLeft: '36px',
147
+ alignItems: 'center'
65
148
  },
66
- children: /*#__PURE__*/ _jsx(LogText, {
67
- variant: "body2",
68
- allowWrap: allowWrap,
69
- children: log.line
70
- })
149
+ children: [
150
+ /*#__PURE__*/ _jsx(LogText, {
151
+ variant: "body2",
152
+ allowWrap: allowWrap,
153
+ children: log.line
154
+ }),
155
+ /*#__PURE__*/ _jsx(Tooltip, {
156
+ title: copySuccess ? 'Copied!' : 'Copy options',
157
+ children: /*#__PURE__*/ _jsx(IconButton, {
158
+ size: "small",
159
+ onClick: handleOpenMenu,
160
+ "aria-label": "Copy log options",
161
+ sx: {
162
+ padding: '4px',
163
+ marginLeft: 'auto',
164
+ color: copySuccess ? theme.palette.success.main : theme.palette.text.secondary,
165
+ opacity: isHovered || Boolean(anchorEl) || copySuccess ? 1 : 0,
166
+ pointerEvents: isHovered || Boolean(anchorEl) || copySuccess ? 'auto' : 'none',
167
+ transition: 'opacity 0.08s ease, color 0.2s ease',
168
+ '&:hover': {
169
+ color: copySuccess ? theme.palette.success.main : theme.palette.primary.main,
170
+ backgroundColor: theme.palette.action.hover
171
+ },
172
+ borderRadius: '4px',
173
+ display: 'flex',
174
+ gap: '2px'
175
+ },
176
+ children: copySuccess ? /*#__PURE__*/ _jsx(Check, {
177
+ sx: {
178
+ fontSize: '14px'
179
+ }
180
+ }) : /*#__PURE__*/ _jsxs(_Fragment, {
181
+ children: [
182
+ /*#__PURE__*/ _jsx(ContentCopy, {
183
+ sx: {
184
+ fontSize: '14px'
185
+ }
186
+ }),
187
+ /*#__PURE__*/ _jsx(ChevronDown, {
188
+ sx: {
189
+ fontSize: '12px'
190
+ }
191
+ })
192
+ ]
193
+ })
194
+ })
195
+ }),
196
+ hasRowActions && /*#__PURE__*/ _jsx(Box, {
197
+ sx: {
198
+ display: 'flex',
199
+ gap: '4px',
200
+ alignItems: 'center',
201
+ opacity: isHovered || Boolean(anchorEl) ? 1 : 0,
202
+ pointerEvents: isHovered || Boolean(anchorEl) ? 'auto' : 'none',
203
+ transition: 'opacity 0.08s ease'
204
+ },
205
+ children: itemActionButtons
206
+ }),
207
+ /*#__PURE__*/ _jsxs(Menu, {
208
+ anchorEl: anchorEl,
209
+ open: Boolean(anchorEl),
210
+ onClose: handleCloseMenu,
211
+ onClick: (e)=>e.stopPropagation(),
212
+ "aria-label": "Copy format options",
213
+ anchorOrigin: {
214
+ vertical: 'bottom',
215
+ horizontal: 'right'
216
+ },
217
+ transformOrigin: {
218
+ vertical: 'top',
219
+ horizontal: 'right'
220
+ },
221
+ slotProps: {
222
+ paper: {
223
+ sx: {
224
+ mt: 0.5,
225
+ minWidth: 180,
226
+ boxShadow: theme.shadows[3]
227
+ }
228
+ }
229
+ },
230
+ children: [
231
+ /*#__PURE__*/ _jsxs(MenuItem, {
232
+ onClick: ()=>handleCopy('full'),
233
+ sx: {
234
+ py: 1,
235
+ '&:hover': {
236
+ backgroundColor: theme.palette.action.hover
237
+ }
238
+ },
239
+ children: [
240
+ /*#__PURE__*/ _jsx(ListItemIcon, {
241
+ children: /*#__PURE__*/ _jsx(ContentCopy, {
242
+ fontSize: "small"
243
+ })
244
+ }),
245
+ /*#__PURE__*/ _jsx(ListItemText, {
246
+ primary: "Copy log",
247
+ secondary: "Timestamp + labels + message",
248
+ slotProps: {
249
+ primary: {
250
+ fontSize: '14px'
251
+ },
252
+ secondary: {
253
+ fontSize: '11px'
254
+ }
255
+ }
256
+ })
257
+ ]
258
+ }),
259
+ /*#__PURE__*/ _jsxs(MenuItem, {
260
+ onClick: ()=>handleCopy('message'),
261
+ sx: {
262
+ py: 1,
263
+ '&:hover': {
264
+ backgroundColor: theme.palette.action.hover
265
+ }
266
+ },
267
+ children: [
268
+ /*#__PURE__*/ _jsx(ListItemIcon, {
269
+ children: /*#__PURE__*/ _jsx(FormatQuoteClose, {
270
+ fontSize: "small"
271
+ })
272
+ }),
273
+ /*#__PURE__*/ _jsx(ListItemText, {
274
+ primary: "Copy message",
275
+ secondary: "Message text only",
276
+ slotProps: {
277
+ primary: {
278
+ fontSize: '14px'
279
+ },
280
+ secondary: {
281
+ fontSize: '11px'
282
+ }
283
+ }
284
+ })
285
+ ]
286
+ }),
287
+ /*#__PURE__*/ _jsxs(MenuItem, {
288
+ onClick: ()=>handleCopy('json'),
289
+ sx: {
290
+ py: 1,
291
+ '&:hover': {
292
+ backgroundColor: theme.palette.action.hover
293
+ }
294
+ },
295
+ children: [
296
+ /*#__PURE__*/ _jsx(ListItemIcon, {
297
+ children: /*#__PURE__*/ _jsx(CodeJson, {
298
+ fontSize: "small"
299
+ })
300
+ }),
301
+ /*#__PURE__*/ _jsx(ListItemText, {
302
+ primary: "Copy as JSON",
303
+ secondary: "Full log entry",
304
+ slotProps: {
305
+ primary: {
306
+ fontSize: '14px'
307
+ },
308
+ secondary: {
309
+ fontSize: '11px'
310
+ }
311
+ }
312
+ })
313
+ ]
314
+ })
315
+ ]
316
+ })
317
+ ]
71
318
  })
72
319
  ]
73
320
  }),