@perses-dev/flame-chart-plugin 0.6.0 → 0.7.0-beta.2

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 (185) hide show
  1. package/__mf/js/FlameChart.33756535.js +7 -0
  2. package/__mf/js/async/121.ae51b948.js +2 -0
  3. package/__mf/js/async/168.ed0e0563.js +1 -0
  4. package/__mf/js/async/183.dc144550.js +2 -0
  5. package/__mf/js/async/192.3f1244ba.js +1 -0
  6. package/__mf/js/async/2.75224ecf.js +1 -0
  7. package/__mf/js/async/235.9348db07.js +1 -0
  8. package/__mf/js/async/274.0a78b5be.js +2 -0
  9. package/__mf/js/async/356.ee39adef.js +1 -0
  10. package/__mf/js/async/370.6c540347.js +43 -0
  11. package/__mf/js/async/{657.9473a80f.js.LICENSE.txt → 370.6c540347.js.LICENSE.txt} +41 -1
  12. package/__mf/js/async/392.f77064da.js +2 -0
  13. package/__mf/js/async/407.04a86ff1.js +4 -0
  14. package/__mf/js/async/407.04a86ff1.js.LICENSE.txt +9 -0
  15. package/__mf/js/async/43.0e1586c3.js +2 -0
  16. package/__mf/js/async/464.27f20b74.js +1 -0
  17. package/__mf/js/async/470.6bd2d801.js +2 -0
  18. package/__mf/js/async/496.05c3dd88.js +1 -0
  19. package/__mf/js/async/587.ef9e1dde.js +1 -0
  20. package/__mf/js/async/588.3789ede2.js +1 -0
  21. package/__mf/js/async/616.374f2afc.js +1 -0
  22. package/__mf/js/async/71.3a2deac6.js +1 -0
  23. package/__mf/js/async/77.c084c3a8.js +1 -0
  24. package/__mf/js/async/787.f52f7030.js +1 -0
  25. package/__mf/js/async/802.d67bb643.js +110 -0
  26. package/__mf/js/async/867.7ffd4a61.js +1 -0
  27. package/__mf/js/async/873.a9618120.js +1 -0
  28. package/__mf/js/async/941.16953d1e.js +2 -0
  29. package/__mf/js/async/968.0e172d86.js +1 -0
  30. package/__mf/js/async/978.490d8621.js +1 -0
  31. package/__mf/js/async/__federation_expose_FlameChart.a941b5b1.js +17 -0
  32. package/__mf/js/async/lib-router.59036814.js +2 -0
  33. package/__mf/js/{main.08e04feb.js → main.24fb9837.js} +2 -2
  34. package/lib/FlameChart.d.ts +3 -3
  35. package/lib/FlameChart.d.ts.map +1 -1
  36. package/lib/FlameChart.js +2 -2
  37. package/lib/FlameChart.js.map +1 -1
  38. package/lib/bootstrap.js +2 -2
  39. package/lib/components/CustomBreadcrumb.d.ts +1 -1
  40. package/lib/components/CustomBreadcrumb.d.ts.map +1 -1
  41. package/lib/components/CustomBreadcrumb.js +8 -8
  42. package/lib/components/CustomBreadcrumb.js.map +1 -1
  43. package/lib/components/FlameChart.d.ts +2 -2
  44. package/lib/components/FlameChart.d.ts.map +1 -1
  45. package/lib/components/FlameChart.js +10 -10
  46. package/lib/components/FlameChart.js.map +1 -1
  47. package/lib/components/FlameChartOptionsEditorSettings.d.ts +2 -2
  48. package/lib/components/FlameChartOptionsEditorSettings.d.ts.map +1 -1
  49. package/lib/components/FlameChartOptionsEditorSettings.js +6 -6
  50. package/lib/components/FlameChartOptionsEditorSettings.js.map +1 -1
  51. package/lib/components/FlameChartPanel.d.ts +4 -4
  52. package/lib/components/FlameChartPanel.d.ts.map +1 -1
  53. package/lib/components/FlameChartPanel.js +88 -71
  54. package/lib/components/FlameChartPanel.js.map +1 -1
  55. package/lib/components/PaletteSelector.d.ts +1 -1
  56. package/lib/components/PaletteSelector.d.ts.map +1 -1
  57. package/lib/components/PaletteSelector.js +2 -2
  58. package/lib/components/PaletteSelector.js.map +1 -1
  59. package/lib/components/SearchBar.d.ts +1 -1
  60. package/lib/components/SearchBar.d.ts.map +1 -1
  61. package/lib/components/SearchBar.js +3 -3
  62. package/lib/components/SearchBar.js.map +1 -1
  63. package/lib/components/SeriesChart.d.ts +2 -2
  64. package/lib/components/SeriesChart.d.ts.map +1 -1
  65. package/lib/components/SeriesChart.js +6 -6
  66. package/lib/components/SeriesChart.js.map +1 -1
  67. package/lib/components/Settings.d.ts +2 -2
  68. package/lib/components/Settings.d.ts.map +1 -1
  69. package/lib/components/Settings.js +6 -6
  70. package/lib/components/Settings.js.map +1 -1
  71. package/lib/components/SwitchSelector.d.ts +1 -1
  72. package/lib/components/SwitchSelector.d.ts.map +1 -1
  73. package/lib/components/SwitchSelector.js +3 -3
  74. package/lib/components/SwitchSelector.js.map +1 -1
  75. package/lib/components/TableChart.d.ts +2 -2
  76. package/lib/components/TableChart.d.ts.map +1 -1
  77. package/lib/components/TableChart.js +6 -6
  78. package/lib/components/TableChart.js.map +1 -1
  79. package/lib/components/index.js +10 -10
  80. package/lib/components/index.js.map +1 -1
  81. package/lib/flame-chart-model.d.ts +2 -2
  82. package/lib/flame-chart-model.d.ts.map +1 -1
  83. package/lib/flame-chart-model.js.map +1 -1
  84. package/lib/getPluginModule.d.ts +1 -1
  85. package/lib/getPluginModule.d.ts.map +1 -1
  86. package/lib/getPluginModule.js +3 -1
  87. package/lib/getPluginModule.js.map +1 -1
  88. package/lib/index-federation.js +1 -1
  89. package/lib/index.js +2 -2
  90. package/lib/index.js.map +1 -1
  91. package/lib/setup-tests.d.ts +1 -1
  92. package/lib/setup-tests.d.ts.map +1 -1
  93. package/lib/setup-tests.js +2 -2
  94. package/lib/setup-tests.js.map +1 -1
  95. package/lib/utils/data-transform.d.ts +2 -2
  96. package/lib/utils/data-transform.d.ts.map +1 -1
  97. package/lib/utils/data-transform.js +2 -2
  98. package/lib/utils/data-transform.js.map +1 -1
  99. package/lib/utils/format.js +2 -2
  100. package/lib/utils/palette-gen.js +1 -1
  101. package/lib/utils/palette-gen.js.map +1 -1
  102. package/lib/utils/palette.js +1 -1
  103. package/lib/utils/series-tooltip.d.ts +1 -1
  104. package/lib/utils/series-tooltip.d.ts.map +1 -1
  105. package/lib/utils/series-tooltip.js +1 -1
  106. package/lib/utils/series-tooltip.js.map +1 -1
  107. package/lib/utils/tooltip.d.ts +1 -1
  108. package/lib/utils/tooltip.d.ts.map +1 -1
  109. package/lib/utils/tooltip.js +2 -2
  110. package/lib/utils/tooltip.js.map +1 -1
  111. package/lib/utils/utils.d.ts +2 -2
  112. package/lib/utils/utils.d.ts.map +1 -1
  113. package/lib/utils/utils.js +1 -1
  114. package/lib/utils/utils.js.map +1 -1
  115. package/mf-manifest.json +35 -34
  116. package/mf-stats.json +35 -34
  117. package/package.json +10 -10
  118. package/__mf/js/FlameChart.8940202b.js +0 -7
  119. package/__mf/js/async/121.7241788e.js +0 -2
  120. package/__mf/js/async/177.d1b72566.js +0 -1
  121. package/__mf/js/async/187.d2c3954d.js +0 -7
  122. package/__mf/js/async/187.d2c3954d.js.LICENSE.txt +0 -39
  123. package/__mf/js/async/192.2e230dc2.js +0 -1
  124. package/__mf/js/async/2.3d2f3d32.js +0 -1
  125. package/__mf/js/async/235.f7949644.js +0 -1
  126. package/__mf/js/async/274.f1ae4a6c.js +0 -2
  127. package/__mf/js/async/356.941c6c54.js +0 -1
  128. package/__mf/js/async/367.8beb758e.js +0 -110
  129. package/__mf/js/async/392.157fda9a.js +0 -2
  130. package/__mf/js/async/43.2eeeac07.js +0 -2
  131. package/__mf/js/async/470.55030a0b.js +0 -2
  132. package/__mf/js/async/546.d47a49c6.js +0 -24
  133. package/__mf/js/async/546.d47a49c6.js.LICENSE.txt +0 -19
  134. package/__mf/js/async/587.8bcd9e70.js +0 -1
  135. package/__mf/js/async/588.0012e8ae.js +0 -1
  136. package/__mf/js/async/597.fee7f09c.js +0 -1
  137. package/__mf/js/async/616.da14f6a0.js +0 -1
  138. package/__mf/js/async/657.9473a80f.js +0 -39
  139. package/__mf/js/async/698.06b3786e.js +0 -1
  140. package/__mf/js/async/71.126af909.js +0 -1
  141. package/__mf/js/async/740.c1f5cc4b.js +0 -1
  142. package/__mf/js/async/873.cd4654cd.js +0 -1
  143. package/__mf/js/async/941.c00ae16d.js +0 -2
  144. package/__mf/js/async/968.f7510839.js +0 -1
  145. package/__mf/js/async/97.fd587361.js +0 -1
  146. package/__mf/js/async/978.e1b5b66e.js +0 -1
  147. package/__mf/js/async/__federation_expose_FlameChart.7a8d049a.js +0 -17
  148. package/__mf/js/async/lib-router.1a328ab9.js +0 -2
  149. package/lib/cjs/FlameChart.js +0 -37
  150. package/lib/cjs/bootstrap.js +0 -26
  151. package/lib/cjs/components/CustomBreadcrumb.js +0 -96
  152. package/lib/cjs/components/FlameChart.js +0 -341
  153. package/lib/cjs/components/FlameChartOptionsEditorSettings.js +0 -104
  154. package/lib/cjs/components/FlameChartPanel.js +0 -164
  155. package/lib/cjs/components/PaletteSelector.js +0 -49
  156. package/lib/cjs/components/SearchBar.js +0 -59
  157. package/lib/cjs/components/SeriesChart.js +0 -189
  158. package/lib/cjs/components/Settings.js +0 -202
  159. package/lib/cjs/components/SwitchSelector.js +0 -37
  160. package/lib/cjs/components/TableChart.js +0 -143
  161. package/lib/cjs/components/index.js +0 -39
  162. package/lib/cjs/env.d.js +0 -14
  163. package/lib/cjs/flame-chart-model.js +0 -31
  164. package/lib/cjs/getPluginModule.js +0 -39
  165. package/lib/cjs/index-federation.js +0 -55
  166. package/lib/cjs/index.js +0 -37
  167. package/lib/cjs/setup-tests.js +0 -19
  168. package/lib/cjs/utils/data-model.js +0 -18
  169. package/lib/cjs/utils/data-transform.js +0 -163
  170. package/lib/cjs/utils/format.js +0 -88
  171. package/lib/cjs/utils/palette-gen.js +0 -68
  172. package/lib/cjs/utils/palette.js +0 -62
  173. package/lib/cjs/utils/series-tooltip.js +0 -51
  174. package/lib/cjs/utils/tooltip.js +0 -76
  175. package/lib/cjs/utils/ui-text.js +0 -30
  176. package/lib/cjs/utils/utils.js +0 -122
  177. /package/__mf/css/async/{187.85c2cbf6.css → 370.85c2cbf6.css} +0 -0
  178. /package/__mf/js/async/{121.7241788e.js.LICENSE.txt → 121.ae51b948.js.LICENSE.txt} +0 -0
  179. /package/__mf/js/async/{274.f1ae4a6c.js.LICENSE.txt → 274.0a78b5be.js.LICENSE.txt} +0 -0
  180. /package/__mf/js/async/{392.157fda9a.js.LICENSE.txt → 392.f77064da.js.LICENSE.txt} +0 -0
  181. /package/__mf/js/async/{43.2eeeac07.js.LICENSE.txt → 43.0e1586c3.js.LICENSE.txt} +0 -0
  182. /package/__mf/js/async/{470.55030a0b.js.LICENSE.txt → 470.6bd2d801.js.LICENSE.txt} +0 -0
  183. /package/__mf/js/async/{367.8beb758e.js.LICENSE.txt → 802.d67bb643.js.LICENSE.txt} +0 -0
  184. /package/__mf/js/async/{941.c00ae16d.js.LICENSE.txt → 941.16953d1e.js.LICENSE.txt} +0 -0
  185. /package/__mf/js/async/{lib-router.1a328ab9.js.LICENSE.txt → lib-router.59036814.js.LICENSE.txt} +0 -0
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  // Copyright The Perses Authors
2
3
  // Licensed under the Apache License | Version 2.0 (the "License");
3
4
  // you may not use this file except in compliance with the License.
@@ -10,8 +11,7 @@
10
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.
11
12
  // See the License for the specific language governing permissions and
12
13
  // limitations under the License.
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { OptionsEditorControl, SettingsAutocomplete } from '@perses-dev/components';
14
+ import { OptionsEditorControl, SettingsAutocomplete } from "@perses-dev/components";
15
15
  const PALETTE_OPTIONS = [
16
16
  {
17
17
  id: 'package-name',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/PaletteSelector.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 { ReactElement } from 'react';\nimport { OptionsEditorControl, SettingsAutocomplete } from '@perses-dev/components';\n\nconst PALETTE_OPTIONS: Array<{ id: PaletteOption; label: string }> = [\n { id: 'package-name', label: 'By Package Name' },\n { id: 'value', label: 'By Value' },\n];\n\nexport type PaletteOption = 'package-name' | 'value';\n\nexport interface PaletteSelectorProps {\n onChange: (palette: PaletteOption) => void;\n value?: PaletteOption;\n}\n\nexport function PaletteSelector({ onChange, value = 'package-name' }: PaletteSelectorProps): ReactElement {\n const handlePaletteChange = (_: unknown, { id }: { id: PaletteOption }): void => {\n onChange(id);\n };\n\n return (\n <OptionsEditorControl\n label=\"Palette\"\n control={\n <SettingsAutocomplete\n value={PALETTE_OPTIONS.find((o) => o.id === value)}\n options={PALETTE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handlePaletteChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","PALETTE_OPTIONS","id","label","PaletteSelector","onChange","value","handlePaletteChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,oBAAoB,EAAEC,oBAAoB,QAAQ,yBAAyB;AAEpF,MAAMC,kBAA+D;IACnE;QAAEC,IAAI;QAAgBC,OAAO;IAAkB;IAC/C;QAAED,IAAI;QAASC,OAAO;IAAW;CAClC;AASD,OAAO,SAASC,gBAAgB,EAAEC,QAAQ,EAAEC,QAAQ,cAAc,EAAwB;IACxF,MAAMC,sBAAsB,CAACC,GAAY,EAAEN,EAAE,EAAyB;QACpEG,SAASH;IACX;IAEA,qBACE,KAACH;QACCI,OAAM;QACNM,uBACE,KAACT;YACCM,OAAOL,gBAAgBS,IAAI,CAAC,CAACC,IAAMA,EAAET,EAAE,KAAKI;YAC5CM,SAASX;YACTY,gBAAgB,CAACF,IAAMA,EAAER,KAAK;YAC9BE,UAAUE;YACVO,gBAAgB;;;AAK1B"}
1
+ {"version":3,"sources":["../../../src/components/PaletteSelector.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 { OptionsEditorControl, SettingsAutocomplete } from '@perses-dev/components';\nimport type { ReactElement } from 'react';\n\nconst PALETTE_OPTIONS: Array<{ id: PaletteOption; label: string }> = [\n { id: 'package-name', label: 'By Package Name' },\n { id: 'value', label: 'By Value' },\n];\n\nexport type PaletteOption = 'package-name' | 'value';\n\nexport interface PaletteSelectorProps {\n onChange: (palette: PaletteOption) => void;\n value?: PaletteOption;\n}\n\nexport function PaletteSelector({ onChange, value = 'package-name' }: PaletteSelectorProps): ReactElement {\n const handlePaletteChange = (_: unknown, { id }: { id: PaletteOption }): void => {\n onChange(id);\n };\n\n return (\n <OptionsEditorControl\n label=\"Palette\"\n control={\n <SettingsAutocomplete\n value={PALETTE_OPTIONS.find((o) => o.id === value)}\n options={PALETTE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handlePaletteChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","PALETTE_OPTIONS","id","label","PaletteSelector","onChange","value","handlePaletteChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,oBAAoB,EAAEC,oBAAoB,QAAQ,yBAAyB;AAGpF,MAAMC,kBAA+D;IACnE;QAAEC,IAAI;QAAgBC,OAAO;IAAkB;IAC/C;QAAED,IAAI;QAASC,OAAO;IAAW;CAClC;AASD,OAAO,SAASC,gBAAgB,EAAEC,QAAQ,EAAEC,QAAQ,cAAc,EAAwB;IACxF,MAAMC,sBAAsB,CAACC,GAAY,EAAEN,EAAE,EAAyB;QACpEG,SAASH;IACX;IAEA,qBACE,KAACH;QACCI,OAAM;QACNM,uBACE,KAACT;YACCM,OAAOL,gBAAgBS,IAAI,CAAC,CAACC,IAAMA,EAAET,EAAE,KAAKI;YAC5CM,SAASX;YACTY,gBAAgB,CAACF,IAAMA,EAAER,KAAK;YAC9BE,UAAUE;YACVO,gBAAgB;;;AAK1B"}
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import type { ReactElement } from 'react';
2
2
  export interface SearchBarProps {
3
3
  searchValue: string;
4
4
  onSearchValueChange: (value: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBar.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrC,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CA2B7D"}
1
+ {"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBar.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CA2B7D"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  // Copyright The Perses Authors
2
3
  // Licensed under the Apache License | Version 2.0 (the "License");
3
4
  // you may not use this file except in compliance with the License.
@@ -10,9 +11,8 @@
10
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.
11
12
  // See the License for the specific language governing permissions and
12
13
  // limitations under the License.
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { TextField, InputAdornment, Chip } from '@mui/material';
15
- import Magnify from 'mdi-material-ui/Magnify';
14
+ import { TextField, InputAdornment, Chip } from "@mui/material";
15
+ import Magnify from "mdi-material-ui/Magnify";
16
16
  export function SearchBar(props) {
17
17
  const { searchValue, onSearchValueChange } = props;
18
18
  return /*#__PURE__*/ _jsx(TextField, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SearchBar.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 { ReactElement } from 'react';\nimport { TextField, InputAdornment, Chip } from '@mui/material';\nimport Magnify from 'mdi-material-ui/Magnify';\n\nexport interface SearchBarProps {\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n}\n\nexport function SearchBar(props: SearchBarProps): ReactElement {\n const { searchValue, onSearchValueChange } = props;\n\n return (\n <TextField\n size=\"small\"\n variant=\"outlined\"\n placeholder=\"Search...\"\n fullWidth\n value={searchValue}\n onChange={(event) => onSearchValueChange(event.target.value)}\n slotProps={{\n input: {\n startAdornment: (\n <InputAdornment position=\"start\">\n <Magnify fontSize=\"small\" />\n </InputAdornment>\n ),\n endAdornment: searchValue !== '' && (\n <InputAdornment position=\"end\">\n <Chip label=\"Clear\" size=\"small\" onClick={() => onSearchValueChange('')} />\n </InputAdornment>\n ),\n },\n }}\n />\n );\n}\n"],"names":["TextField","InputAdornment","Chip","Magnify","SearchBar","props","searchValue","onSearchValueChange","size","variant","placeholder","fullWidth","value","onChange","event","target","slotProps","input","startAdornment","position","fontSize","endAdornment","label","onClick"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,SAAS,EAAEC,cAAc,EAAEC,IAAI,QAAQ,gBAAgB;AAChE,OAAOC,aAAa,0BAA0B;AAO9C,OAAO,SAASC,UAAUC,KAAqB;IAC7C,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,EAAE,GAAGF;IAE7C,qBACE,KAACL;QACCQ,MAAK;QACLC,SAAQ;QACRC,aAAY;QACZC,SAAS;QACTC,OAAON;QACPO,UAAU,CAACC,QAAUP,oBAAoBO,MAAMC,MAAM,CAACH,KAAK;QAC3DI,WAAW;YACTC,OAAO;gBACLC,8BACE,KAACjB;oBAAekB,UAAS;8BACvB,cAAA,KAAChB;wBAAQiB,UAAS;;;gBAGtBC,cAAcf,gBAAgB,oBAC5B,KAACL;oBAAekB,UAAS;8BACvB,cAAA,KAACjB;wBAAKoB,OAAM;wBAAQd,MAAK;wBAAQe,SAAS,IAAMhB,oBAAoB;;;YAG1E;QACF;;AAGN"}
1
+ {"version":3,"sources":["../../../src/components/SearchBar.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 { TextField, InputAdornment, Chip } from '@mui/material';\nimport Magnify from 'mdi-material-ui/Magnify';\nimport type { ReactElement } from 'react';\n\nexport interface SearchBarProps {\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n}\n\nexport function SearchBar(props: SearchBarProps): ReactElement {\n const { searchValue, onSearchValueChange } = props;\n\n return (\n <TextField\n size=\"small\"\n variant=\"outlined\"\n placeholder=\"Search...\"\n fullWidth\n value={searchValue}\n onChange={(event) => onSearchValueChange(event.target.value)}\n slotProps={{\n input: {\n startAdornment: (\n <InputAdornment position=\"start\">\n <Magnify fontSize=\"small\" />\n </InputAdornment>\n ),\n endAdornment: searchValue !== '' && (\n <InputAdornment position=\"end\">\n <Chip label=\"Clear\" size=\"small\" onClick={() => onSearchValueChange('')} />\n </InputAdornment>\n ),\n },\n }}\n />\n );\n}\n"],"names":["TextField","InputAdornment","Chip","Magnify","SearchBar","props","searchValue","onSearchValueChange","size","variant","placeholder","fullWidth","value","onChange","event","target","slotProps","input","startAdornment","position","fontSize","endAdornment","label","onClick"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,SAAS,EAAEC,cAAc,EAAEC,IAAI,QAAQ,gBAAgB;AAChE,OAAOC,aAAa,0BAA0B;AAQ9C,OAAO,SAASC,UAAUC,KAAqB;IAC7C,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,EAAE,GAAGF;IAE7C,qBACE,KAACL;QACCQ,MAAK;QACLC,SAAQ;QACRC,aAAY;QACZC,SAAS;QACTC,OAAON;QACPO,UAAU,CAACC,QAAUP,oBAAoBO,MAAMC,MAAM,CAACH,KAAK;QAC3DI,WAAW;YACTC,OAAO;gBACLC,8BACE,KAACjB;oBAAekB,UAAS;8BACvB,cAAA,KAAChB;wBAAQiB,UAAS;;;gBAGtBC,cAAcf,gBAAgB,oBAC5B,KAACL;oBAAekB,UAAS;8BACvB,cAAA,KAACjB;wBAAKoB,OAAM;wBAAQd,MAAK;wBAAQe,SAAS,IAAMhB,oBAAoB;;;YAG1E;QACF;;AAGN"}
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { ProfileData } from '@perses-dev/spec';
1
+ import type { ProfileData } from '@perses-dev/spec';
2
+ import type { ReactElement } from 'react';
3
3
  export interface SeriesChartProps {
4
4
  width: number;
5
5
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"SeriesChart.d.ts","sourceRoot":"","sources":["../../../src/components/SeriesChart.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAmB,MAAM,OAAO,CAAC;AAOtD,OAAO,EAAE,WAAW,EAAY,MAAM,kBAAkB,CAAC;AAQzD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAgKjE"}
1
+ {"version":3,"file":"SeriesChart.d.ts","sourceRoot":"","sources":["../../../src/components/SeriesChart.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,kBAAkB,CAAC;AAO9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAU1C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAgKjE"}
@@ -11,12 +11,12 @@ import { jsx as _jsx } 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 { useMemo, useRef } from 'react';
15
- import { Stack, useTheme } from '@mui/material';
16
- import { useChartsTheme, EChart, enableDataZoom } from '@perses-dev/components';
17
- import { useTimeRange } from '@perses-dev/plugin-system';
18
- import { formatItemValue } from '../utils/format';
19
- import { getSeriesTooltip } from '../utils/series-tooltip';
14
+ import { Stack, useTheme } from "@mui/material";
15
+ import { useChartsTheme, EChart, enableDataZoom } from "@perses-dev/components";
16
+ import { useTimeRange } from "@perses-dev/plugin-system";
17
+ import { useMemo, useRef } from "react";
18
+ import { formatItemValue } from "../utils/format.js";
19
+ import { getSeriesTooltip } from "../utils/series-tooltip.js";
20
20
  const LINE_WIDTH = 1.25;
21
21
  const POINT_SIZE_OFFSET = 2;
22
22
  export function SeriesChart(props) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SeriesChart.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 { ReactElement, useMemo, useRef } from 'react';\nimport { Stack, useTheme } from '@mui/material';\nimport { useChartsTheme, EChart, ZoomEventData, OnEventsType, enableDataZoom } from '@perses-dev/components';\nimport { useTimeRange } from '@perses-dev/plugin-system';\nimport type { EChartsCoreOption, LineSeriesOption } from 'echarts';\nimport { ECharts as EChartsInstance } from 'echarts/core';\nimport { CallbackDataParams } from 'echarts/types/dist/shared';\nimport { ProfileData, Timeline } from '@perses-dev/spec';\nimport { formatItemValue } from '../utils/format';\nimport { getSeriesTooltip } from '../utils/series-tooltip';\nimport { SeriesSample } from '../utils/data-model';\n\nconst LINE_WIDTH = 1.25;\nconst POINT_SIZE_OFFSET = 2;\n\nexport interface SeriesChartProps {\n width: number;\n height: number;\n data: ProfileData;\n}\n\nexport function SeriesChart(props: SeriesChartProps): ReactElement {\n const { width, height, data } = props;\n\n const chartsTheme = useChartsTheme();\n const theme = useTheme();\n const { setTimeRange } = useTimeRange();\n const chartRef = useRef<EChartsInstance>();\n\n const handleEvents: OnEventsType<LineSeriesOption['data'] | unknown> = useMemo(() => {\n return {\n datazoom: (params): void => {\n if (params.batch[0] === undefined) return;\n const xAxisStartValue = params.batch?.[0]?.startValue;\n const xAxisEndValue = params.batch?.[0]?.endValue;\n if (xAxisStartValue !== undefined && xAxisEndValue !== undefined) {\n const zoomEvent: ZoomEventData = {\n start: xAxisStartValue,\n end: xAxisEndValue,\n };\n setTimeRange({ start: new Date(zoomEvent.start), end: new Date(zoomEvent.end) });\n }\n },\n finished: (): void => {\n if (chartRef.current !== undefined) {\n enableDataZoom(chartRef.current);\n }\n },\n };\n }, [setTimeRange]);\n\n const seriesData: SeriesSample[] = useMemo(() => {\n const timeLine: Timeline = data.timeline || ({} as Timeline);\n const startTime = timeLine.startTime;\n const durationDelta = timeLine.durationDelta;\n return timeLine.samples.map((sample, index) => ({\n id: index,\n value: [(startTime + index * durationDelta) * 1000, Number(sample)],\n }));\n }, [data.timeline]);\n\n const option: EChartsCoreOption = useMemo(() => {\n const seriesMapping = {\n type: 'line',\n color: theme.palette.primary.main,\n sampling: 'lttb',\n showSymbol: true,\n showAllSymbol: true,\n symbolSize: LINE_WIDTH + POINT_SIZE_OFFSET,\n lineStyle: {\n width: LINE_WIDTH,\n opacity: 0.95,\n },\n areaStyle: {\n opacity: 0,\n },\n data: seriesData,\n };\n\n const timeLine: Timeline = data.timeline || ({} as Timeline);\n\n const option: EChartsCoreOption = {\n series: seriesMapping,\n xAxis: {\n type: 'time',\n min: timeLine.startTime * 1000,\n max: (timeLine.startTime + timeLine.samples.length * timeLine.durationDelta) * 1000,\n axisLabel: {\n hideOverlap: true,\n },\n axisPointer: {\n snap: false, // important so shared crosshair does not lag\n },\n },\n yAxis: {\n type: 'value',\n axisLabel: {\n formatter: (value: number) => {\n return formatItemValue(data.metadata?.units, value);\n },\n },\n },\n animation: false,\n tooltip: {\n show: true,\n showContent: true,\n trigger: 'axis',\n appendToBody: true,\n confine: true,\n backgroundColor: theme.palette.background.paper,\n borderColor: theme.palette.background.paper,\n textStyle: {\n color: theme.palette.text.primary,\n },\n formatter: (params: CallbackDataParams[]) =>\n getSeriesTooltip(\n (params[0]?.data as SeriesSample) || {},\n data.metadata?.units || '',\n data.metadata?.name || '',\n theme.palette.primary.main,\n theme.palette.divider\n ),\n },\n axisPointer: {\n type: 'line',\n z: 0, // ensure point symbol shows on top of dashed line\n triggerEmphasis: true,\n triggerTooltip: false,\n snap: false,\n },\n toolbox: {\n feature: {\n dataZoom: {\n icon: null,\n yAxisIndex: 'none',\n },\n },\n },\n grid: {\n left: 10,\n right: 10,\n top: 10,\n bottom: 10,\n },\n };\n\n return option;\n }, [data.timeline, data.metadata, seriesData, theme]);\n\n const seriesChart = useMemo(\n () => (\n <EChart\n style={{\n width: width,\n height: height,\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n onEvents={handleEvents}\n _instance={chartRef}\n />\n ),\n [chartsTheme.echartsTheme, height, option, width, handleEvents]\n );\n\n return (\n <Stack\n width={width}\n height={height}\n alignItems=\"center\"\n justifyContent=\"center\"\n onMouseEnter={() => {\n // This is necessary to ensure that the data zoom feature is enabled after the theme is changed.\n if (chartRef.current !== undefined) {\n enableDataZoom(chartRef.current);\n }\n }}\n >\n {seriesChart}\n </Stack>\n );\n}\n"],"names":["useMemo","useRef","Stack","useTheme","useChartsTheme","EChart","enableDataZoom","useTimeRange","formatItemValue","getSeriesTooltip","LINE_WIDTH","POINT_SIZE_OFFSET","SeriesChart","props","width","height","data","chartsTheme","theme","setTimeRange","chartRef","handleEvents","datazoom","params","batch","undefined","xAxisStartValue","startValue","xAxisEndValue","endValue","zoomEvent","start","end","Date","finished","current","seriesData","timeLine","timeline","startTime","durationDelta","samples","map","sample","index","id","value","Number","option","seriesMapping","type","color","palette","primary","main","sampling","showSymbol","showAllSymbol","symbolSize","lineStyle","opacity","areaStyle","series","xAxis","min","max","length","axisLabel","hideOverlap","axisPointer","snap","yAxis","formatter","metadata","units","animation","tooltip","show","showContent","trigger","appendToBody","confine","backgroundColor","background","paper","borderColor","textStyle","text","name","divider","z","triggerEmphasis","triggerTooltip","toolbox","feature","dataZoom","icon","yAxisIndex","grid","left","right","top","bottom","seriesChart","style","echartsTheme","onEvents","_instance","alignItems","justifyContent","onMouseEnter"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAuBA,OAAO,EAAEC,MAAM,QAAQ,QAAQ;AACtD,SAASC,KAAK,EAAEC,QAAQ,QAAQ,gBAAgB;AAChD,SAASC,cAAc,EAAEC,MAAM,EAA+BC,cAAc,QAAQ,yBAAyB;AAC7G,SAASC,YAAY,QAAQ,4BAA4B;AAKzD,SAASC,eAAe,QAAQ,kBAAkB;AAClD,SAASC,gBAAgB,QAAQ,0BAA0B;AAG3D,MAAMC,aAAa;AACnB,MAAMC,oBAAoB;AAQ1B,OAAO,SAASC,YAAYC,KAAuB;IACjD,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGH;IAEhC,MAAMI,cAAcb;IACpB,MAAMc,QAAQf;IACd,MAAM,EAAEgB,YAAY,EAAE,GAAGZ;IACzB,MAAMa,WAAWnB;IAEjB,MAAMoB,eAAiErB,QAAQ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,OAAOtD;IACT,GAAG;QAAChC,KAAKsB,QAAQ;QAAEtB,KAAKyD,QAAQ;QAAErC;QAAYlB;KAAM;IAEpD,MAAMqF,cAAcvG,QAClB,kBACE,KAACK;YACCmG,OAAO;gBACL1F,OAAOA;gBACPC,QAAQA;YACV;YACAiC,QAAQA;YACR9B,OAAOD,YAAYwF,YAAY;YAC/BC,UAAUrF;YACVsF,WAAWvF;YAGf;QAACH,YAAYwF,YAAY;QAAE1F;QAAQiC;QAAQlC;QAAOO;KAAa;IAGjE,qBACE,KAACnB;QACCY,OAAOA;QACPC,QAAQA;QACR6F,YAAW;QACXC,gBAAe;QACfC,cAAc;YACZ,gGAAgG;YAChG,IAAI1F,SAASe,OAAO,KAAKV,WAAW;gBAClCnB,eAAec,SAASe,OAAO;YACjC;QACF;kBAECoE;;AAGP"}
1
+ {"version":3,"sources":["../../../src/components/SeriesChart.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 { Stack, useTheme } from '@mui/material';\nimport type { ZoomEventData, OnEventsType } from '@perses-dev/components';\nimport { useChartsTheme, EChart, enableDataZoom } from '@perses-dev/components';\nimport { useTimeRange } from '@perses-dev/plugin-system';\nimport type { ProfileData, Timeline } from '@perses-dev/spec';\nimport type {\n DefaultLabelFormatterCallbackParams as CallbackDataParams,\n EChartsCoreOption,\n LineSeriesOption,\n} from 'echarts';\nimport type { ECharts as EChartsInstance } from 'echarts/core';\nimport type { ReactElement } from 'react';\nimport { useMemo, useRef } from 'react';\n\nimport type { SeriesSample } from '../utils/data-model';\nimport { formatItemValue } from '../utils/format';\nimport { getSeriesTooltip } from '../utils/series-tooltip';\n\nconst LINE_WIDTH = 1.25;\nconst POINT_SIZE_OFFSET = 2;\n\nexport interface SeriesChartProps {\n width: number;\n height: number;\n data: ProfileData;\n}\n\nexport function SeriesChart(props: SeriesChartProps): ReactElement {\n const { width, height, data } = props;\n\n const chartsTheme = useChartsTheme();\n const theme = useTheme();\n const { setTimeRange } = useTimeRange();\n const chartRef = useRef<EChartsInstance>();\n\n const handleEvents: OnEventsType<LineSeriesOption['data'] | unknown> = useMemo(() => {\n return {\n datazoom: (params): void => {\n if (params.batch[0] === undefined) return;\n const xAxisStartValue = params.batch?.[0]?.startValue;\n const xAxisEndValue = params.batch?.[0]?.endValue;\n if (xAxisStartValue !== undefined && xAxisEndValue !== undefined) {\n const zoomEvent: ZoomEventData = {\n start: xAxisStartValue,\n end: xAxisEndValue,\n };\n setTimeRange({ start: new Date(zoomEvent.start), end: new Date(zoomEvent.end) });\n }\n },\n finished: (): void => {\n if (chartRef.current !== undefined) {\n enableDataZoom(chartRef.current);\n }\n },\n };\n }, [setTimeRange]);\n\n const seriesData: SeriesSample[] = useMemo(() => {\n const timeLine: Timeline = data.timeline || ({} as Timeline);\n const startTime = timeLine.startTime;\n const durationDelta = timeLine.durationDelta;\n return timeLine.samples.map((sample, index) => ({\n id: index,\n value: [(startTime + index * durationDelta) * 1000, Number(sample)],\n }));\n }, [data.timeline]);\n\n const option: EChartsCoreOption = useMemo(() => {\n const seriesMapping = {\n type: 'line',\n color: theme.palette.primary.main,\n sampling: 'lttb',\n showSymbol: true,\n showAllSymbol: true,\n symbolSize: LINE_WIDTH + POINT_SIZE_OFFSET,\n lineStyle: {\n width: LINE_WIDTH,\n opacity: 0.95,\n },\n areaStyle: {\n opacity: 0,\n },\n data: seriesData,\n };\n\n const timeLine: Timeline = data.timeline || ({} as Timeline);\n\n const option: EChartsCoreOption = {\n series: seriesMapping,\n xAxis: {\n type: 'time',\n min: timeLine.startTime * 1000,\n max: (timeLine.startTime + timeLine.samples.length * timeLine.durationDelta) * 1000,\n axisLabel: {\n hideOverlap: true,\n },\n axisPointer: {\n snap: false, // important so shared crosshair does not lag\n },\n },\n yAxis: {\n type: 'value',\n axisLabel: {\n formatter: (value: number) => {\n return formatItemValue(data.metadata?.units, value);\n },\n },\n },\n animation: false,\n tooltip: {\n show: true,\n showContent: true,\n trigger: 'axis',\n appendToBody: true,\n confine: true,\n backgroundColor: theme.palette.background.paper,\n borderColor: theme.palette.background.paper,\n textStyle: {\n color: theme.palette.text.primary,\n },\n formatter: (params: CallbackDataParams[]) =>\n getSeriesTooltip(\n (params[0]?.data as SeriesSample) || {},\n data.metadata?.units || '',\n data.metadata?.name || '',\n theme.palette.primary.main,\n theme.palette.divider,\n ),\n },\n axisPointer: {\n type: 'line',\n z: 0, // ensure point symbol shows on top of dashed line\n triggerEmphasis: true,\n triggerTooltip: false,\n snap: false,\n },\n toolbox: {\n feature: {\n dataZoom: {\n icon: null,\n yAxisIndex: 'none',\n },\n },\n },\n grid: {\n left: 10,\n right: 10,\n top: 10,\n bottom: 10,\n },\n };\n\n return option;\n }, [data.timeline, data.metadata, seriesData, theme]);\n\n const seriesChart = useMemo(\n () => (\n <EChart\n style={{\n width: width,\n height: height,\n }}\n option={option}\n theme={chartsTheme.echartsTheme}\n onEvents={handleEvents}\n _instance={chartRef}\n />\n ),\n [chartsTheme.echartsTheme, height, option, width, handleEvents],\n );\n\n return (\n <Stack\n width={width}\n height={height}\n alignItems=\"center\"\n justifyContent=\"center\"\n onMouseEnter={() => {\n // This is necessary to ensure that the data zoom feature is enabled after the theme is changed.\n if (chartRef.current !== undefined) {\n enableDataZoom(chartRef.current);\n }\n }}\n >\n {seriesChart}\n </Stack>\n );\n}\n"],"names":["Stack","useTheme","useChartsTheme","EChart","enableDataZoom","useTimeRange","useMemo","useRef","formatItemValue","getSeriesTooltip","LINE_WIDTH","POINT_SIZE_OFFSET","SeriesChart","props","width","height","data","chartsTheme","theme","setTimeRange","chartRef","handleEvents","datazoom","params","batch","undefined","xAxisStartValue","startValue","xAxisEndValue","endValue","zoomEvent","start","end","Date","finished","current","seriesData","timeLine","timeline","startTime","durationDelta","samples","map","sample","index","id","value","Number","option","seriesMapping","type","color","palette","primary","main","sampling","showSymbol","showAllSymbol","symbolSize","lineStyle","opacity","areaStyle","series","xAxis","min","max","length","axisLabel","hideOverlap","axisPointer","snap","yAxis","formatter","metadata","units","animation","tooltip","show","showContent","trigger","appendToBody","confine","backgroundColor","background","paper","borderColor","textStyle","text","name","divider","z","triggerEmphasis","triggerTooltip","toolbox","feature","dataZoom","icon","yAxisIndex","grid","left","right","top","bottom","seriesChart","style","echartsTheme","onEvents","_instance","alignItems","justifyContent","onMouseEnter"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,KAAK,EAAEC,QAAQ,QAAQ,gBAAgB;AAEhD,SAASC,cAAc,EAAEC,MAAM,EAAEC,cAAc,QAAQ,yBAAyB;AAChF,SAASC,YAAY,QAAQ,4BAA4B;AASzD,SAASC,OAAO,EAAEC,MAAM,QAAQ,QAAQ;AAGxC,SAASC,eAAe,QAAQ,qBAAkB;AAClD,SAASC,gBAAgB,QAAQ,6BAA0B;AAE3D,MAAMC,aAAa;AACnB,MAAMC,oBAAoB;AAQ1B,OAAO,SAASC,YAAYC,KAAuB;IACjD,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGH;IAEhC,MAAMI,cAAcf;IACpB,MAAMgB,QAAQjB;IACd,MAAM,EAAEkB,YAAY,EAAE,GAAGd;IACzB,MAAMe,WAAWb;IAEjB,MAAMc,eAAiEf,QAAQ;QAC7E,OAAO;YACLgB,UAAU,CAACC;gBACT,IAAIA,OAAOC,KAAK,CAAC,EAAE,KAAKC,WAAW;gB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;IAEpD,MAAMqF,cAAcjG,QAClB,kBACE,KAACH;YACCqG,OAAO;gBACL1F,OAAOA;gBACPC,QAAQA;YACV;YACAiC,QAAQA;YACR9B,OAAOD,YAAYwF,YAAY;YAC/BC,UAAUrF;YACVsF,WAAWvF;YAGf;QAACH,YAAYwF,YAAY;QAAE1F;QAAQiC;QAAQlC;QAAOO;KAAa;IAGjE,qBACE,KAACrB;QACCc,OAAOA;QACPC,QAAQA;QACR6F,YAAW;QACXC,gBAAe;QACfC,cAAc;YACZ,gGAAgG;YAChG,IAAI1F,SAASe,OAAO,KAAKV,WAAW;gBAClCrB,eAAegB,SAASe,OAAO;YACjC;QACF;kBAECoE;;AAGP"}
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { FlameChartOptions } from '../flame-chart-model';
1
+ import type { ReactElement } from 'react';
2
+ import type { FlameChartOptions } from '../flame-chart-model';
3
3
  export interface SettingsProps {
4
4
  value: FlameChartOptions;
5
5
  selectedId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../src/components/Settings.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAqB,MAAM,OAAO,CAAC;AAMxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,iBAAiB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,KAAK,IAAI,CAAC;IAC7D,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,KAAK,IAAI,CAAC;CACpE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CA0J3D"}
1
+ {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../../src/components/Settings.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,iBAAiB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,KAAK,IAAI,CAAC;IAC7D,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,KAAK,IAAI,CAAC;CACpE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CA0J3D"}
@@ -11,12 +11,12 @@ 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 { useState, useMemo } from 'react';
15
- import RefreshIcon from 'mdi-material-ui/Refresh';
16
- import PaletteIcon from 'mdi-material-ui/Palette';
17
- import { Stack, Button, useTheme, MenuItem, Menu, Fade } from '@mui/material';
18
- import { ToolbarIconButton, InfoTooltip } from '@perses-dev/components';
19
- import { TOOLTIP_TEXT } from '../utils/ui-text';
14
+ import { Stack, Button, useTheme, MenuItem, Menu, Fade } from "@mui/material";
15
+ import { ToolbarIconButton, InfoTooltip } from "@perses-dev/components";
16
+ import PaletteIcon from "mdi-material-ui/Palette";
17
+ import RefreshIcon from "mdi-material-ui/Refresh";
18
+ import { useState, useMemo } from "react";
19
+ import { TOOLTIP_TEXT } from "../utils/ui-text.js";
20
20
  export function Settings(props) {
21
21
  const { value, selectedId, onSelectedIdChange, onChangePalette, onDisplayChange } = props;
22
22
  const theme = useTheme();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Settings.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 { ReactElement, useState, useMemo } from 'react';\nimport RefreshIcon from 'mdi-material-ui/Refresh';\nimport PaletteIcon from 'mdi-material-ui/Palette';\nimport { Stack, Button, useTheme, MenuItem, Menu, Fade } from '@mui/material';\nimport { ToolbarIconButton, InfoTooltip } from '@perses-dev/components';\nimport { TOOLTIP_TEXT } from '../utils/ui-text';\nimport { FlameChartOptions } from '../flame-chart-model';\n\nexport interface SettingsProps {\n value: FlameChartOptions;\n selectedId: number;\n onChangePalette: (palette: 'package-name' | 'value') => void;\n onSelectedIdChange: (newId: number) => void;\n onDisplayChange: (value: 'table' | 'flame-graph' | 'both') => void;\n}\n\nexport function Settings(props: SettingsProps): ReactElement {\n const { value, selectedId, onSelectedIdChange, onChangePalette, onDisplayChange } = props;\n const theme = useTheme();\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n\n const customButtonStyle = {\n fontSize: '12px',\n padding: '2px 6px',\n minWidth: 'auto',\n };\n\n const handleChangeColorShemeClick = (event: React.MouseEvent<HTMLElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleByPackageNameClick = (): void => {\n onChangePalette('package-name');\n handleClose();\n };\n\n const handleByValueClick = (): void => {\n onChangePalette('value');\n handleClose();\n };\n\n const handleClose = (): void => {\n setAnchorEl(null);\n };\n\n const isTableSelected = (): boolean => selectedView === 'table';\n const isFlameGraphSelected = (): boolean => selectedView === 'flame-graph';\n const isBothSelected = (): boolean => selectedView === 'both';\n\n // Update selected view based on the value of showTable and showFlameGraph\n const selectedView: 'table' | 'flame-graph' | 'both' | 'none' = useMemo(() => {\n if (!value.showTable && !value.showFlameGraph) {\n return 'none';\n } else if (value.showTable && value.showFlameGraph) {\n return 'both';\n } else if (value.showTable) {\n return 'table';\n } else {\n return 'flame-graph';\n }\n }, [value.showTable, value.showFlameGraph]);\n\n return (\n <Stack spacing=\"10px\" direction=\"row\" justifyContent=\"center\" alignItems=\"center\">\n {selectedId !== 0 && (\n <InfoTooltip description={TOOLTIP_TEXT.resetFlameGraph}>\n <ToolbarIconButton\n aria-label={TOOLTIP_TEXT.resetFlameGraph}\n onClick={() => onSelectedIdChange(0)}\n color=\"primary\"\n >\n <RefreshIcon fontSize=\"small\" />\n </ToolbarIconButton>\n </InfoTooltip>\n )}\n <Stack>\n <InfoTooltip description={TOOLTIP_TEXT.changeColorSheme}>\n <ToolbarIconButton\n id=\"change-color-sheme-button\"\n aria-label={TOOLTIP_TEXT.changeColorSheme}\n aria-controls={open ? 'change-color-sheme-menu' : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? 'true' : undefined}\n onClick={handleChangeColorShemeClick}\n color=\"primary\"\n >\n <PaletteIcon fontSize=\"small\" />\n </ToolbarIconButton>\n </InfoTooltip>\n <Menu\n id=\"change-color-sheme-menu\"\n slotProps={{\n list: { 'aria-labelledby': 'change-color-sheme-button' },\n }}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n slots={{ transition: Fade }}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n sx={{\n mt: 1,\n '& .MuiPaper-root': {\n backgroundColor: theme.palette.background.paper,\n padding: '0 5px',\n },\n '& .MuiMenuItem-root:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <MenuItem onClick={handleByPackageNameClick} selected={value.palette === 'package-name'}>\n By package name\n </MenuItem>\n <MenuItem onClick={handleByValueClick} selected={value.palette === 'value'}>\n By value\n </MenuItem>\n </Menu>\n </Stack>\n <Stack\n direction=\"row\"\n sx={{\n border: `1px solid ${theme.palette.primary.main}`,\n borderRadius: `${theme.shape.borderRadius}px`,\n padding: '2px',\n }}\n >\n <InfoTooltip description={TOOLTIP_TEXT.showTable}>\n <Button\n variant={isTableSelected() ? 'contained' : 'text'}\n color=\"primary\"\n size=\"small\"\n onClick={() => onDisplayChange('table')}\n sx={customButtonStyle}\n >\n Table\n </Button>\n </InfoTooltip>\n <InfoTooltip description={TOOLTIP_TEXT.showFlameGraph}>\n <Button\n variant={isFlameGraphSelected() ? 'contained' : 'text'}\n color=\"primary\"\n size=\"small\"\n onClick={() => onDisplayChange('flame-graph')}\n sx={customButtonStyle}\n >\n Flame Graph\n </Button>\n </InfoTooltip>\n <InfoTooltip description={TOOLTIP_TEXT.showBoth}>\n <Button\n variant={isBothSelected() ? 'contained' : 'text'}\n color=\"primary\"\n size=\"small\"\n onClick={() => onDisplayChange('both')}\n sx={customButtonStyle}\n >\n Both\n </Button>\n </InfoTooltip>\n </Stack>\n </Stack>\n );\n}\n"],"names":["useState","useMemo","RefreshIcon","PaletteIcon","Stack","Button","useTheme","MenuItem","Menu","Fade","ToolbarIconButton","InfoTooltip","TOOLTIP_TEXT","Settings","props","value","selectedId","onSelectedIdChange","onChangePalette","onDisplayChange","theme","anchorEl","setAnchorEl","open","Boolean","customButtonStyle","fontSize","padding","minWidth","handleChangeColorShemeClick","event","currentTarget","handleByPackageNameClick","handleClose","handleByValueClick","isTableSelected","selectedView","isFlameGraphSelected","isBothSelected","showTable","showFlameGraph","spacing","direction","justifyContent","alignItems","description","resetFlameGraph","aria-label","onClick","color","changeColorSheme","id","aria-controls","undefined","aria-haspopup","aria-expanded","slotProps","list","onClose","slots","transition","anchorOrigin","vertical","horizontal","transformOrigin","sx","mt","backgroundColor","palette","background","paper","action","hover","selected","border","primary","main","borderRadius","shape","variant","size","showBoth"],"mappings":";AAAA,+BAA+B;AAC/B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,UAAU1D,MAAMqD,OAAO,KAAK;0CAAgB;;0CAGzF,KAAC7D;gCAASyC,SAASd;gCAAoBuC,UAAU1D,MAAMqD,OAAO,KAAK;0CAAS;;;;;;0BAKhF,MAAChE;gBACCsC,WAAU;gBACVuB,IAAI;oBACFS,QAAQ,CAAC,UAAU,EAAEtD,MAAMgD,OAAO,CAACO,OAAO,CAACC,IAAI,EAAE;oBACjDC,cAAc,GAAGzD,MAAM0D,KAAK,CAACD,YAAY,CAAC,EAAE,CAAC;oBAC7ClD,SAAS;gBACX;;kCAEA,KAAChB;wBAAYkC,aAAajC,aAAa2B,SAAS;kCAC9C,cAAA,KAAClC;4BACC0E,SAAS5C,oBAAoB,cAAc;4BAC3Cc,OAAM;4BACN+B,MAAK;4BACLhC,SAAS,IAAM7B,gBAAgB;4BAC/B8C,IAAIxC;sCACL;;;kCAIH,KAACd;wBAAYkC,aAAajC,aAAa4B,cAAc;kCACnD,cAAA,KAACnC;4BACC0E,SAAS1C,yBAAyB,cAAc;4BAChDY,OAAM;4BACN+B,MAAK;4BACLhC,SAAS,IAAM7B,gBAAgB;4BAC/B8C,IAAIxC;sCACL;;;kCAIH,KAACd;wBAAYkC,aAAajC,aAAaqE,QAAQ;kCAC7C,cAAA,KAAC5E;4BACC0E,SAASzC,mBAAmB,cAAc;4BAC1CW,OAAM;4BACN+B,MAAK;4BACLhC,SAAS,IAAM7B,gBAAgB;4BAC/B8C,IAAIxC;sCACL;;;;;;;AAOX"}
1
+ {"version":3,"sources":["../../../src/components/Settings.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 { Stack, Button, useTheme, MenuItem, Menu, Fade } from '@mui/material';\nimport { ToolbarIconButton, InfoTooltip } from '@perses-dev/components';\nimport PaletteIcon from 'mdi-material-ui/Palette';\nimport RefreshIcon from 'mdi-material-ui/Refresh';\nimport type { ReactElement } from 'react';\nimport { useState, useMemo } from 'react';\n\nimport type { FlameChartOptions } from '../flame-chart-model';\nimport { TOOLTIP_TEXT } from '../utils/ui-text';\n\nexport interface SettingsProps {\n value: FlameChartOptions;\n selectedId: number;\n onChangePalette: (palette: 'package-name' | 'value') => void;\n onSelectedIdChange: (newId: number) => void;\n onDisplayChange: (value: 'table' | 'flame-graph' | 'both') => void;\n}\n\nexport function Settings(props: SettingsProps): ReactElement {\n const { value, selectedId, onSelectedIdChange, onChangePalette, onDisplayChange } = props;\n const theme = useTheme();\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n\n const customButtonStyle = {\n fontSize: '12px',\n padding: '2px 6px',\n minWidth: 'auto',\n };\n\n const handleChangeColorShemeClick = (event: React.MouseEvent<HTMLElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleByPackageNameClick = (): void => {\n onChangePalette('package-name');\n handleClose();\n };\n\n const handleByValueClick = (): void => {\n onChangePalette('value');\n handleClose();\n };\n\n const handleClose = (): void => {\n setAnchorEl(null);\n };\n\n const isTableSelected = (): boolean => selectedView === 'table';\n const isFlameGraphSelected = (): boolean => selectedView === 'flame-graph';\n const isBothSelected = (): boolean => selectedView === 'both';\n\n // Update selected view based on the value of showTable and showFlameGraph\n const selectedView: 'table' | 'flame-graph' | 'both' | 'none' = useMemo(() => {\n if (!value.showTable && !value.showFlameGraph) {\n return 'none';\n } else if (value.showTable && value.showFlameGraph) {\n return 'both';\n } else if (value.showTable) {\n return 'table';\n } else {\n return 'flame-graph';\n }\n }, [value.showTable, value.showFlameGraph]);\n\n return (\n <Stack spacing=\"10px\" direction=\"row\" justifyContent=\"center\" alignItems=\"center\">\n {selectedId !== 0 && (\n <InfoTooltip description={TOOLTIP_TEXT.resetFlameGraph}>\n <ToolbarIconButton\n aria-label={TOOLTIP_TEXT.resetFlameGraph}\n onClick={() => onSelectedIdChange(0)}\n color=\"primary\"\n >\n <RefreshIcon fontSize=\"small\" />\n </ToolbarIconButton>\n </InfoTooltip>\n )}\n <Stack>\n <InfoTooltip description={TOOLTIP_TEXT.changeColorSheme}>\n <ToolbarIconButton\n id=\"change-color-sheme-button\"\n aria-label={TOOLTIP_TEXT.changeColorSheme}\n aria-controls={open ? 'change-color-sheme-menu' : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? 'true' : undefined}\n onClick={handleChangeColorShemeClick}\n color=\"primary\"\n >\n <PaletteIcon fontSize=\"small\" />\n </ToolbarIconButton>\n </InfoTooltip>\n <Menu\n id=\"change-color-sheme-menu\"\n slotProps={{\n list: { 'aria-labelledby': 'change-color-sheme-button' },\n }}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n slots={{ transition: Fade }}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n sx={{\n mt: 1,\n '& .MuiPaper-root': {\n backgroundColor: theme.palette.background.paper,\n padding: '0 5px',\n },\n '& .MuiMenuItem-root:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n }}\n >\n <MenuItem onClick={handleByPackageNameClick} selected={value.palette === 'package-name'}>\n By package name\n </MenuItem>\n <MenuItem onClick={handleByValueClick} selected={value.palette === 'value'}>\n By value\n </MenuItem>\n </Menu>\n </Stack>\n <Stack\n direction=\"row\"\n sx={{\n border: `1px solid ${theme.palette.primary.main}`,\n borderRadius: `${theme.shape.borderRadius}px`,\n padding: '2px',\n }}\n >\n <InfoTooltip description={TOOLTIP_TEXT.showTable}>\n <Button\n variant={isTableSelected() ? 'contained' : 'text'}\n color=\"primary\"\n size=\"small\"\n onClick={() => onDisplayChange('table')}\n sx={customButtonStyle}\n >\n Table\n </Button>\n </InfoTooltip>\n <InfoTooltip description={TOOLTIP_TEXT.showFlameGraph}>\n <Button\n variant={isFlameGraphSelected() ? 'contained' : 'text'}\n color=\"primary\"\n size=\"small\"\n onClick={() => onDisplayChange('flame-graph')}\n sx={customButtonStyle}\n >\n Flame Graph\n </Button>\n </InfoTooltip>\n <InfoTooltip description={TOOLTIP_TEXT.showBoth}>\n <Button\n variant={isBothSelected() ? 'contained' : 'text'}\n color=\"primary\"\n size=\"small\"\n onClick={() => onDisplayChange('both')}\n sx={customButtonStyle}\n >\n Both\n </Button>\n </InfoTooltip>\n </Stack>\n </Stack>\n );\n}\n"],"names":["Stack","Button","useTheme","MenuItem","Menu","Fade","ToolbarIconButton","InfoTooltip","PaletteIcon","RefreshIcon","useState","useMemo","TOOLTIP_TEXT","Settings","props","value","selectedId","onSelectedIdChange","onChangePalette","onDisplayChange","theme","anchorEl","setAnchorEl","open","Boolean","customButtonStyle","fontSize","padding","minWidth","handleChangeColorShemeClick","event","currentTarget","handleByPackageNameClick","handleClose","handleByValueClick","isTableSelected","selectedView","isFlameGraphSelected","isBothSelected","showTable","showFlameGraph","spacing","direction","justifyContent","alignItems","description","resetFlameGraph","aria-label","onClick","color","changeColorSheme","id","aria-controls","undefined","aria-haspopup","aria-expanded","slotProps","list","onClose","slots","transition","anchorOrigin","vertical","horizontal","transformOrigin","sx","mt","backgroundColor","palette","background","paper","action","hover","selected","border","primary","main","borderRadius","shape","variant","size","showBoth"],"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,KAAK,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,IAAI,QAAQ,gBAAgB;AAC9E,SAASC,iBAAiB,EAAEC,WAAW,QAAQ,yBAA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AC,EAAE,CAAC;oBAC7ClD,SAAS;gBACX;;kCAEA,KAACpB;wBAAYsC,aAAajC,aAAa2B,SAAS;kCAC9C,cAAA,KAACtC;4BACC8E,SAAS5C,oBAAoB,cAAc;4BAC3Cc,OAAM;4BACN+B,MAAK;4BACLhC,SAAS,IAAM7B,gBAAgB;4BAC/B8C,IAAIxC;sCACL;;;kCAIH,KAAClB;wBAAYsC,aAAajC,aAAa4B,cAAc;kCACnD,cAAA,KAACvC;4BACC8E,SAAS1C,yBAAyB,cAAc;4BAChDY,OAAM;4BACN+B,MAAK;4BACLhC,SAAS,IAAM7B,gBAAgB;4BAC/B8C,IAAIxC;sCACL;;;kCAIH,KAAClB;wBAAYsC,aAAajC,aAAaqE,QAAQ;kCAC7C,cAAA,KAAChF;4BACC8E,SAASzC,mBAAmB,cAAc;4BAC1CW,OAAM;4BACN+B,MAAK;4BACLhC,SAAS,IAAM7B,gBAAgB;4BAC/B8C,IAAIxC;sCACL;;;;;;;AAOX"}
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
1
+ import type { ReactElement } from 'react';
2
2
  export interface SwitchSelectorProps {
3
3
  onChange: (newValue: boolean) => void;
4
4
  value?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchSelector.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,mBAAmB,GAAG,YAAY,CAM5F"}
1
+ {"version":3,"file":"SwitchSelector.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchSelector.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,mBAAmB,GAAG,YAAY,CAM5F"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  // Copyright The Perses Authors
2
3
  // Licensed under the Apache License | Version 2.0 (the "License");
3
4
  // you may not use this file except in compliance with the License.
@@ -10,9 +11,8 @@
10
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.
11
12
  // See the License for the specific language governing permissions and
12
13
  // limitations under the License.
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { OptionsEditorControl } from '@perses-dev/components';
15
- import { Switch } from '@mui/material';
14
+ import { Switch } from "@mui/material";
15
+ import { OptionsEditorControl } from "@perses-dev/components";
16
16
  export function SwitchSelector({ onChange, value, label }) {
17
17
  const handleValuesChange = (_, checked)=>{
18
18
  onChange(checked);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SwitchSelector.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 { ReactElement } from 'react';\nimport { OptionsEditorControl } from '@perses-dev/components';\nimport { Switch } from '@mui/material';\n\nexport interface SwitchSelectorProps {\n onChange: (newValue: boolean) => void;\n value?: boolean;\n label: string;\n}\n\nexport function SwitchSelector({ onChange, value, label }: SwitchSelectorProps): ReactElement {\n const handleValuesChange = (_: unknown, checked: boolean): void => {\n onChange(checked);\n };\n\n return <OptionsEditorControl label={label} control={<Switch checked={value} onChange={handleValuesChange} />} />;\n}\n"],"names":["OptionsEditorControl","Switch","SwitchSelector","onChange","value","label","handleValuesChange","_","checked","control"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,MAAM,QAAQ,gBAAgB;AAQvC,OAAO,SAASC,eAAe,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAuB;IAC5E,MAAMC,qBAAqB,CAACC,GAAYC;QACtCL,SAASK;IACX;IAEA,qBAAO,KAACR;QAAqBK,OAAOA;QAAOI,uBAAS,KAACR;YAAOO,SAASJ;YAAOD,UAAUG;;;AACxF"}
1
+ {"version":3,"sources":["../../../src/components/SwitchSelector.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 { Switch } from '@mui/material';\nimport { OptionsEditorControl } from '@perses-dev/components';\nimport type { ReactElement } from 'react';\n\nexport interface SwitchSelectorProps {\n onChange: (newValue: boolean) => void;\n value?: boolean;\n label: string;\n}\n\nexport function SwitchSelector({ onChange, value, label }: SwitchSelectorProps): ReactElement {\n const handleValuesChange = (_: unknown, checked: boolean): void => {\n onChange(checked);\n };\n\n return <OptionsEditorControl label={label} control={<Switch checked={value} onChange={handleValuesChange} />} />;\n}\n"],"names":["Switch","OptionsEditorControl","SwitchSelector","onChange","value","label","handleValuesChange","_","checked","control"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,MAAM,QAAQ,gBAAgB;AACvC,SAASC,oBAAoB,QAAQ,yBAAyB;AAS9D,OAAO,SAASC,eAAe,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAuB;IAC5E,MAAMC,qBAAqB,CAACC,GAAYC;QACtCL,SAASK;IACX;IAEA,qBAAO,KAACP;QAAqBI,OAAOA;QAAOI,uBAAS,KAACT;YAAOQ,SAASJ;YAAOD,UAAUG;;;AACxF"}
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
- import { ProfileData } from '@perses-dev/spec';
1
+ import type { ProfileData } from '@perses-dev/spec';
2
+ import type { ReactElement } from 'react';
3
3
  export interface TableChartProps {
4
4
  width: number;
5
5
  height: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TableChart.d.ts","sourceRoot":"","sources":["../../../src/components/TableChart.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAqB,MAAM,OAAO,CAAC;AAKxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAW/C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAyG/D"}
1
+ {"version":3,"file":"TableChart.d.ts","sourceRoot":"","sources":["../../../src/components/TableChart.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAa1C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAyG/D"}
@@ -11,12 +11,12 @@ 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 { useMemo, useState } from 'react';
15
- import { Stack, useTheme, Link } from '@mui/material';
16
- import { Table } from '@perses-dev/components';
17
- import { tableRecursionJson } from '../utils/data-transform';
18
- import { formatItemValue } from '../utils/format';
19
- import { SearchBar } from './SearchBar';
14
+ import { Stack, useTheme, Link } from "@mui/material";
15
+ import { Table } from "@perses-dev/components";
16
+ import { useMemo, useState } from "react";
17
+ import { tableRecursionJson } from "../utils/data-transform.js";
18
+ import { formatItemValue } from "../utils/format.js";
19
+ import { SearchBar } from "./SearchBar.js";
20
20
  const LARGE_PANEL_TRESHOLD = 600; // heigth treshold to switch to large panel mode
21
21
  const PADDING_TOP = 8;
22
22
  const SCROLL_BAR_WIDTH = 15;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/TableChart.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 { ReactElement, useMemo, useState } from 'react';\nimport { Stack, useTheme, Link } from '@mui/material';\n\nimport { Table, TableColumnConfig } from '@perses-dev/components';\nimport { SortingState } from '@tanstack/react-table';\nimport { ProfileData } from '@perses-dev/spec';\nimport { tableRecursionJson } from '../utils/data-transform';\nimport { TableChartSample } from '../utils/data-model';\nimport { formatItemValue } from '../utils/format';\nimport { SearchBar } from './SearchBar';\n\nconst LARGE_PANEL_TRESHOLD = 600; // heigth treshold to switch to large panel mode\nconst PADDING_TOP = 8;\nconst SCROLL_BAR_WIDTH = 15;\nconst SEARCH_BAR_HEIGHT = 50;\n\nexport interface TableChartProps {\n width: number;\n height: number;\n data: ProfileData;\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n onSelectedIdChange: (id: number) => void;\n}\n\nexport function TableChart(props: TableChartProps): ReactElement {\n const { width, height, data, searchValue, onSearchValueChange, onSelectedIdChange } = props;\n\n const theme = useTheme();\n\n const availableHeight = height;\n const availableWidth = width - 10;\n\n const tableData: TableChartSample[] = useMemo(() => {\n return tableRecursionJson(data.profile.stackTrace, searchValue);\n }, [data, searchValue]);\n\n const columns: Array<TableColumnConfig<unknown>> = useMemo(() => {\n const unit = data.metadata?.units || '';\n\n const columnSettings: Array<TableColumnConfig<unknown>> = [\n {\n accessorKey: 'name',\n header: 'Name',\n headerDescription: 'Function name',\n align: 'left',\n enableSorting: true,\n width: 0.5 * availableWidth,\n cell: (ctx): ReactElement => {\n const cellValue = ctx.getValue();\n return (\n <Link\n href=\"#\"\n underline=\"hover\"\n onClick={(e) => {\n e.preventDefault();\n const currentSample = ctx.row.original as TableChartSample;\n onSelectedIdChange(currentSample.id); // focus on this item in the flame graph\n onSearchValueChange(currentSample.name);\n }}\n >\n {cellValue}\n </Link>\n );\n },\n cellDescription: () => '',\n },\n {\n accessorKey: 'self',\n header: 'Self',\n headerDescription: 'Function self samples',\n align: 'right',\n enableSorting: true,\n width: 0.25 * availableWidth - SCROLL_BAR_WIDTH,\n cell: (ctx): string => {\n const cellValue = ctx.getValue();\n return formatItemValue(unit, cellValue);\n },\n },\n {\n accessorKey: 'total',\n header: 'Total',\n headerDescription: 'Function total samples',\n align: 'right',\n enableSorting: true,\n width: 0.25 * availableWidth,\n cell: (ctx): string => {\n const cellValue = ctx.getValue();\n return formatItemValue(unit, cellValue);\n },\n },\n ];\n\n return columnSettings;\n }, [data.metadata?.units, availableWidth, onSearchValueChange, onSelectedIdChange]);\n\n const [sorting, setSorting] = useState<SortingState>([{ id: 'total', desc: true }]);\n\n return (\n <Stack\n width={availableWidth}\n height={availableHeight}\n gap={1}\n sx={{\n '& .MuiTable-root': {\n borderCollapse: 'collapse',\n },\n '& .MuiTableCell-root': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n borderRight: `1px solid ${theme.palette.divider}`,\n '&:last-child': {\n borderRight: 'none',\n },\n },\n }}\n >\n <SearchBar searchValue={searchValue} onSearchValueChange={onSearchValueChange} />\n <Table\n data={tableData}\n columns={columns}\n height={availableHeight - PADDING_TOP - SEARCH_BAR_HEIGHT}\n width={availableWidth}\n density={availableHeight < LARGE_PANEL_TRESHOLD ? 'compact' : 'standard'}\n defaultColumnWidth=\"auto\"\n defaultColumnHeight=\"auto\"\n sorting={sorting}\n onSortingChange={setSorting}\n />\n </Stack>\n );\n}\n"],"names":["useMemo","useState","Stack","useTheme","Link","Table","tableRecursionJson","formatItemValue","SearchBar","LARGE_PANEL_TRESHOLD","PADDING_TOP","SCROLL_BAR_WIDTH","SEARCH_BAR_HEIGHT","TableChart","props","width","height","data","searchValue","onSearchValueChange","onSelectedIdChange","theme","availableHeight","availableWidth","tableData","profile","stackTrace","columns","unit","metadata","units","columnSettings","accessorKey","header","headerDescription","align","enableSorting","cell","ctx","cellValue","getValue","href","underline","onClick","e","preventDefault","currentSample","row","original","id","name","cellDescription","sorting","setSorting","desc","gap","sx","borderCollapse","borderBottom","palette","divider","borderRight","density","defaultColumnWidth","defaultColumnHeight","onSortingChange"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAuBA,OAAO,EAAEC,QAAQ,QAAQ,QAAQ;AACxD,SAASC,KAAK,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,gBAAgB;AAEtD,SAASC,KAAK,QAA2B,yBAAyB;AAGlE,SAASC,kBAAkB,QAAQ,0BAA0B;AAE7D,SAASC,eAAe,QAAQ,kBAAkB;AAClD,SAASC,SAAS,QAAQ,cAAc;AAExC,MAAMC,uBAAuB,KAAK,gDAAgD;AAClF,MAAMC,cAAc;AACpB,MAAMC,mBAAmB;AACzB,MAAMC,oBAAoB;AAW1B,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,WAAW,EAAEC,mBAAmB,EAAEC,kBAAkB,EAAE,GAAGN;IAEtF,MAAMO,QAAQlB;IAEd,MAAMmB,kBAAkBN;IACxB,MAAMO,iBAAiBR,QAAQ;IAE/B,MAAMS,YAAgCxB,QAAQ;QAC5C,OAAOM,mBAAmBW,KAAKQ,OAAO,CAACC,UAAU,EAAER;IACrD,GAAG;QAACD;QAAMC;KAAY;IAEtB,MAAMS,UAA6C3B,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cAAc,CAAC,UAAU,EAAErC,MAAMsC,OAAO,CAACC,OAAO,EAAE;gBAClDC,aAAa,CAAC,UAAU,EAAExC,MAAMsC,OAAO,CAACC,OAAO,EAAE;gBACjD,gBAAgB;oBACdC,aAAa;gBACf;YACF;QACF;;0BAEA,KAACrD;gBAAUU,aAAaA;gBAAaC,qBAAqBA;;0BAC1D,KAACd;gBACCY,MAAMO;gBACNG,SAASA;gBACTX,QAAQM,kBAAkBZ,cAAcE;gBACxCG,OAAOQ;gBACPuC,SAASxC,kBAAkBb,uBAAuB,YAAY;gBAC9DsD,oBAAmB;gBACnBC,qBAAoB;gBACpBZ,SAASA;gBACTa,iBAAiBZ;;;;AAIzB"}
1
+ {"version":3,"sources":["../../../src/components/TableChart.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 { Stack, useTheme, Link } from '@mui/material';\nimport type { TableColumnConfig } from '@perses-dev/components';\nimport { Table } from '@perses-dev/components';\nimport type { ProfileData } from '@perses-dev/spec';\nimport type { SortingState } from '@tanstack/react-table';\nimport type { ReactElement } from 'react';\nimport { useMemo, useState } from 'react';\n\nimport type { TableChartSample } from '../utils/data-model';\nimport { tableRecursionJson } from '../utils/data-transform';\nimport { formatItemValue } from '../utils/format';\nimport { SearchBar } from './SearchBar';\n\nconst LARGE_PANEL_TRESHOLD = 600; // heigth treshold to switch to large panel mode\nconst PADDING_TOP = 8;\nconst SCROLL_BAR_WIDTH = 15;\nconst SEARCH_BAR_HEIGHT = 50;\n\nexport interface TableChartProps {\n width: number;\n height: number;\n data: ProfileData;\n searchValue: string;\n onSearchValueChange: (value: string) => void;\n onSelectedIdChange: (id: number) => void;\n}\n\nexport function TableChart(props: TableChartProps): ReactElement {\n const { width, height, data, searchValue, onSearchValueChange, onSelectedIdChange } = props;\n\n const theme = useTheme();\n\n const availableHeight = height;\n const availableWidth = width - 10;\n\n const tableData: TableChartSample[] = useMemo(() => {\n return tableRecursionJson(data.profile.stackTrace, searchValue);\n }, [data, searchValue]);\n\n const columns: Array<TableColumnConfig<unknown>> = useMemo(() => {\n const unit = data.metadata?.units || '';\n\n const columnSettings: Array<TableColumnConfig<unknown>> = [\n {\n accessorKey: 'name',\n header: 'Name',\n headerDescription: 'Function name',\n align: 'left',\n enableSorting: true,\n width: 0.5 * availableWidth,\n cell: (ctx): ReactElement => {\n const cellValue = ctx.getValue();\n return (\n <Link\n href=\"#\"\n underline=\"hover\"\n onClick={(e) => {\n e.preventDefault();\n const currentSample = ctx.row.original as TableChartSample;\n onSelectedIdChange(currentSample.id); // focus on this item in the flame graph\n onSearchValueChange(currentSample.name);\n }}\n >\n {cellValue}\n </Link>\n );\n },\n cellDescription: () => '',\n },\n {\n accessorKey: 'self',\n header: 'Self',\n headerDescription: 'Function self samples',\n align: 'right',\n enableSorting: true,\n width: 0.25 * availableWidth - SCROLL_BAR_WIDTH,\n cell: (ctx): string => {\n const cellValue = ctx.getValue();\n return formatItemValue(unit, cellValue);\n },\n },\n {\n accessorKey: 'total',\n header: 'Total',\n headerDescription: 'Function total samples',\n align: 'right',\n enableSorting: true,\n width: 0.25 * availableWidth,\n cell: (ctx): string => {\n const cellValue = ctx.getValue();\n return formatItemValue(unit, cellValue);\n },\n },\n ];\n\n return columnSettings;\n }, [data.metadata?.units, availableWidth, onSearchValueChange, onSelectedIdChange]);\n\n const [sorting, setSorting] = useState<SortingState>([{ id: 'total', desc: true }]);\n\n return (\n <Stack\n width={availableWidth}\n height={availableHeight}\n gap={1}\n sx={{\n '& .MuiTable-root': {\n borderCollapse: 'collapse',\n },\n '& .MuiTableCell-root': {\n borderBottom: `1px solid ${theme.palette.divider}`,\n borderRight: `1px solid ${theme.palette.divider}`,\n '&:last-child': {\n borderRight: 'none',\n },\n },\n }}\n >\n <SearchBar searchValue={searchValue} onSearchValueChange={onSearchValueChange} />\n <Table\n data={tableData}\n columns={columns}\n height={availableHeight - PADDING_TOP - SEARCH_BAR_HEIGHT}\n width={availableWidth}\n density={availableHeight < LARGE_PANEL_TRESHOLD ? 'compact' : 'standard'}\n defaultColumnWidth=\"auto\"\n defaultColumnHeight=\"auto\"\n sorting={sorting}\n onSortingChange={setSorting}\n />\n </Stack>\n );\n}\n"],"names":["Stack","useTheme","Link","Table","useMemo","useState","tableRecursionJson","formatItemValue","SearchBar","LARGE_PANEL_TRESHOLD","PADDING_TOP","SCROLL_BAR_WIDTH","SEARCH_BAR_HEIGHT","TableChart","props","width","height","data","searchValue","onSearchValueChange","onSelectedIdChange","theme","availableHeight","availableWidth","tableData","profile","stackTrace","columns","unit","metadata","units","columnSettings","accessorKey","header","headerDescription","align","enableSorting","cell","ctx","cellValue","getValue","href","underline","onClick","e","preventDefault","currentSample","row","original","id","name","cellDescription","sorting","setSorting","desc","gap","sx","borderCollapse","borderBottom","palette","divider","borderRight","density","defaultColumnWidth","defaultColumnHeight","onSortingChange"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,KAAK,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,gBAAgB;AAEtD,SAASC,KAAK,QAAQ,yBAAyB;AAI/C,SAASC,OAAO,EAAEC,QAAQ,QAAQ,QAAQ;AAG1C,SAASC,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,eAAe,QAAQ,qBAAkB;AAClD,SAASC,SAAS,QAAQ,iBAAc;AAExC,MAAMC,uBAAuB,KAAK,gDAAgD;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,OAAO,OAAOQ;gBACdc,MAAM,CAACC;oBACL,MAAMC,YAAYD,IAAIE,QAAQ;oBAC9B,OAAOjC,gBAAgBqB,MAAMW;gBAC/B;YACF;SACD;QAED,OAAOR;IACT,GAAG;QAACd,KAAKY,QAAQ,EAAEC;QAAOP;QAAgBJ;QAAqBC;KAAmB;IAElF,MAAM,CAACgC,SAASC,WAAW,GAAGhD,SAAuB;QAAC;YAAE4C,IAAI;YAASK,MAAM;QAAK;KAAE;IAElF,qBACE,MAACtD;QACCe,OAAOQ;QACPP,QAAQM;QACRiC,KAAK;QACLC,IAAI;YACF,oBAAoB;gBAClBC,gBAAgB;YAClB;YACA,wBAAwB;gBACtBC,cAAc,CAAC,UAAU,EAAErC,MAAMsC,OAAO,CAACC,OAAO,EAAE;gBAClDC,aAAa,CAAC,UAAU,EAAExC,MAAMsC,OAAO,CAACC,OAAO,EAAE;gBACjD,gBAAgB;oBACdC,aAAa;gBACf;YACF;QACF;;0BAEA,KAACrD;gBAAUU,aAAaA;gBAAaC,qBAAqBA;;0BAC1D,KAAChB;gBACCc,MAAMO;gBACNG,SAASA;gBACTX,QAAQM,kBAAkBZ,cAAcE;gBACxCG,OAAOQ;gBACPuC,SAASxC,kBAAkBb,uBAAuB,YAAY;gBAC9DsD,oBAAmB;gBACnBC,qBAAoB;gBACpBZ,SAASA;gBACTa,iBAAiBZ;;;;AAIzB"}
@@ -10,15 +10,15 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './CustomBreadcrumb';
14
- export * from './FlameChart';
15
- export * from './FlameChartOptionsEditorSettings';
16
- export * from './FlameChartPanel';
17
- export * from './PaletteSelector';
18
- export * from './SearchBar';
19
- export * from './SeriesChart';
20
- export * from './Settings';
21
- export * from './SwitchSelector';
22
- export * from './TableChart';
13
+ export * from "./CustomBreadcrumb.js";
14
+ export * from "./FlameChart.js";
15
+ export * from "./FlameChartOptionsEditorSettings.js";
16
+ export * from "./FlameChartPanel.js";
17
+ export * from "./PaletteSelector.js";
18
+ export * from "./SearchBar.js";
19
+ export * from "./SeriesChart.js";
20
+ export * from "./Settings.js";
21
+ export * from "./SwitchSelector.js";
22
+ export * from "./TableChart.js";
23
23
 
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/index.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\nexport * from './CustomBreadcrumb';\nexport * from './FlameChart';\nexport * from './FlameChartOptionsEditorSettings';\nexport * from './FlameChartPanel';\nexport * from './PaletteSelector';\nexport * from './SearchBar';\nexport * from './SeriesChart';\nexport * from './Settings';\nexport * from './SwitchSelector';\nexport * from './TableChart';\n"],"names":[],"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,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,oCAAoC;AAClD,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,eAAe"}
1
+ {"version":3,"sources":["../../../src/components/index.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\nexport * from './CustomBreadcrumb';\nexport * from './FlameChart';\nexport * from './FlameChartOptionsEditorSettings';\nexport * from './FlameChartPanel';\nexport * from './PaletteSelector';\nexport * from './SearchBar';\nexport * from './SeriesChart';\nexport * from './Settings';\nexport * from './SwitchSelector';\nexport * from './TableChart';\n"],"names":[],"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,cAAc,wBAAqB;AACnC,cAAc,kBAAe;AAC7B,cAAc,uCAAoC;AAClD,cAAc,uBAAoB;AAClC,cAAc,uBAAoB;AAClC,cAAc,iBAAc;AAC5B,cAAc,mBAAgB;AAC9B,cAAc,gBAAa;AAC3B,cAAc,sBAAmB;AACjC,cAAc,kBAAe"}
@@ -1,5 +1,5 @@
1
- import { OptionsEditorProps } from '@perses-dev/plugin-system';
2
- import { Definition } from '@perses-dev/spec';
1
+ import type { OptionsEditorProps } from '@perses-dev/plugin-system';
2
+ import type { Definition } from '@perses-dev/spec';
3
3
  /**
4
4
  * The schema for a FlameChart panel.
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"flame-chart-model.d.ts","sourceRoot":"","sources":["../../src/flame-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,UAAU,CAAC,iBAAiB,CAAC;IACzE,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;AAEjF,wBAAgB,8BAA8B,IAAI,iBAAiB,CAQlE"}
1
+ {"version":3,"file":"flame-chart-model.d.ts","sourceRoot":"","sources":["../../src/flame-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,UAAU,CAAC,iBAAiB,CAAC;IACzE,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,4BAA4B,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;AAEjF,wBAAgB,8BAA8B,IAAI,iBAAiB,CAQlE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/flame-chart-model.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 { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { Definition } from '@perses-dev/spec';\n\n/**\n * The schema for a FlameChart panel.\n */\nexport interface FlameChartDefinition extends Definition<FlameChartOptions> {\n kind: 'FlameChart';\n}\n\nexport interface FlameChartOptions {\n palette: 'package-name' | 'value';\n showSettings: boolean;\n showSeries: boolean;\n showTable: boolean;\n showFlameGraph: boolean;\n traceHeight?: number;\n}\n\nexport type FlameChartOptionsEditorProps = OptionsEditorProps<FlameChartOptions>;\n\nexport function createInitialFlameChartOptions(): FlameChartOptions {\n return {\n palette: 'package-name',\n showSettings: true,\n showSeries: false,\n showTable: true,\n showFlameGraph: true,\n };\n}\n"],"names":["createInitialFlameChartOptions","palette","showSettings","showSeries","showTable","showFlameGraph"],"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;AAuBjC,OAAO,SAASA;IACd,OAAO;QACLC,SAAS;QACTC,cAAc;QACdC,YAAY;QACZC,WAAW;QACXC,gBAAgB;IAClB;AACF"}
1
+ {"version":3,"sources":["../../src/flame-chart-model.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 type { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport type { Definition } from '@perses-dev/spec';\n\n/**\n * The schema for a FlameChart panel.\n */\nexport interface FlameChartDefinition extends Definition<FlameChartOptions> {\n kind: 'FlameChart';\n}\n\nexport interface FlameChartOptions {\n palette: 'package-name' | 'value';\n showSettings: boolean;\n showSeries: boolean;\n showTable: boolean;\n showFlameGraph: boolean;\n traceHeight?: number;\n}\n\nexport type FlameChartOptionsEditorProps = OptionsEditorProps<FlameChartOptions>;\n\nexport function createInitialFlameChartOptions(): FlameChartOptions {\n return {\n palette: 'package-name',\n showSettings: true,\n showSeries: false,\n showTable: true,\n showFlameGraph: true,\n };\n}\n"],"names":["createInitialFlameChartOptions","palette","showSettings","showSeries","showTable","showFlameGraph"],"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;AAuBjC,OAAO,SAASA;IACd,OAAO;QACLC,SAAS;QACTC,cAAc;QACdC,YAAY;QACZC,WAAW;QACXC,gBAAgB;IAClB;AACF"}
@@ -1,4 +1,4 @@
1
- import { PluginModuleResource } from '@perses-dev/plugin-system';
1
+ import type { PluginModuleResource } from '@perses-dev/plugin-system';
2
2
  /**
3
3
  * Returns the plugin module information from package.json
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAGnF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
1
+ {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAIxF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
@@ -10,7 +10,9 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import packageJson from '../package.json';
13
+ import packageJson from "../package.json" with {
14
+ type: 'json'
15
+ };
14
16
  /**
15
17
  * Returns the plugin module information from package.json
16
18
  */ export function getPluginModule() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/getPluginModule.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 { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"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;AAGjC,OAAOA,iBAAiB,kBAAkB;AAE1C;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
1
+ {"version":3,"sources":["../../src/getPluginModule.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 type { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\n\nimport packageJson from '../package.json' with { type: 'json' };\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","type","getPluginModule","name","version","perses","kind","metadata","spec"],"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;AAIjC,OAAOA,iBAAiB,uBAAuB;IAAEC,MAAM;AAAO,EAAE;AAEhE;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGL;IAClC,OAAO;QACLM,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
@@ -10,6 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import('./bootstrap');
13
+ import("./bootstrap.js");
14
14
 
15
15
  //# sourceMappingURL=index-federation.js.map
package/lib/index.js CHANGED
@@ -10,7 +10,7 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './components';
14
- export { getPluginModule } from './getPluginModule';
13
+ export * from "./components/index.js";
14
+ export { getPluginModule } from "./getPluginModule.js";
15
15
 
16
16
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.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\nexport * from './components';\nexport { getPluginModule } from './getPluginModule';\n"],"names":["getPluginModule"],"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,cAAc,eAAe;AAC7B,SAASA,eAAe,QAAQ,oBAAoB"}
1
+ {"version":3,"sources":["../../src/index.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\nexport * from './components';\nexport { getPluginModule } from './getPluginModule';\n"],"names":["getPluginModule"],"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,cAAc,wBAAe;AAC7B,SAASA,eAAe,QAAQ,uBAAoB"}
@@ -1,2 +1,2 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom/vitest';
2
2
  //# sourceMappingURL=setup-tests.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/setup-tests.ts"],"names":[],"mappings":"AAaA,OAAO,2BAA2B,CAAC"}
1
+ {"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/setup-tests.ts"],"names":[],"mappings":"AAaA,OAAO,kCAAkC,CAAC"}
@@ -10,8 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import '@testing-library/jest-dom';
13
+ import "@testing-library/jest-dom/vitest";
14
14
  // Always mock e-charts during tests since we don't have a proper canvas in jsdom
15
- jest.mock('echarts/core');
15
+ vi.mock('echarts/core');
16
16
 
17
17
  //# sourceMappingURL=setup-tests.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/setup-tests.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 '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"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,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
1
+ {"version":3,"sources":["../../src/setup-tests.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 '@testing-library/jest-dom/vitest';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\nvi.mock('echarts/core');\n"],"names":["vi","mock"],"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,OAAO,mCAAmC;AAE1C,iFAAiF;AACjFA,GAAGC,IAAI,CAAC"}
@@ -1,5 +1,5 @@
1
- import { ProfileMetaData, StackTrace } from '@perses-dev/spec';
2
- import { FlameChartSample as Sample, TableChartSample } from './data-model';
1
+ import type { ProfileMetaData, StackTrace } from '@perses-dev/spec';
2
+ import type { FlameChartSample as Sample, TableChartSample } from './data-model';
3
3
  /**
4
4
  * Filter the global stacktrace by a function ID to focus on that function and display its corresponding flame chart
5
5
  */