@parca/profile 0.19.140 → 0.19.142

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 (253) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/dist/GraphTooltipArrow/Content.js +224 -30
  3. package/dist/GraphTooltipArrow/DockedGraphTooltip/index.js +192 -33
  4. package/dist/GraphTooltipArrow/ExpandOnHoverValue.js +53 -3
  5. package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
  6. package/dist/GraphTooltipArrow/index.js +86 -56
  7. package/dist/GraphTooltipArrow/useGraphTooltip/index.js +37 -37
  8. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
  9. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +104 -72
  10. package/dist/MatchersInput/SuggestionItem.js +91 -12
  11. package/dist/MatchersInput/SuggestionsList.d.ts +2 -1
  12. package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
  13. package/dist/MatchersInput/SuggestionsList.js +371 -157
  14. package/dist/MatchersInput/SuggestionsList.test.d.ts +2 -0
  15. package/dist/MatchersInput/SuggestionsList.test.d.ts.map +1 -0
  16. package/dist/MatchersInput/index.js +308 -115
  17. package/dist/MetricsCircle/index.js +39 -3
  18. package/dist/MetricsGraph/MetricsContextMenu/index.js +119 -19
  19. package/dist/MetricsGraph/MetricsInfoPanel/index.js +81 -20
  20. package/dist/MetricsGraph/MetricsTooltip/index.d.ts.map +1 -1
  21. package/dist/MetricsGraph/MetricsTooltip/index.js +107 -74
  22. package/dist/MetricsGraph/index.js +552 -203
  23. package/dist/MetricsGraph/useMetricsGraphDimensions.js +46 -25
  24. package/dist/MetricsGraph/utils/colorMapping.js +24 -17
  25. package/dist/MetricsSeries/index.js +70 -7
  26. package/dist/PreSelectedMatchers/index.d.ts.map +1 -1
  27. package/dist/PreSelectedMatchers/index.js +249 -102
  28. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
  29. package/dist/ProfileExplorer/ProfileExplorerCompare.js +241 -45
  30. package/dist/ProfileExplorer/ProfileExplorerSingle.js +98 -11
  31. package/dist/ProfileExplorer/index.js +183 -32
  32. package/dist/ProfileFlameChart/SamplesStrips/SamplesGraph/index.js +333 -148
  33. package/dist/ProfileFlameChart/SamplesStrips/SamplesStrips.stories.js +69 -35
  34. package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
  35. package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
  36. package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
  37. package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
  38. package/dist/ProfileFlameChart/index.d.ts.map +1 -1
  39. package/dist/ProfileFlameChart/index.js +267 -129
  40. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
  41. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +288 -89
  42. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.js +56 -20
  43. package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js +211 -140
  44. package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.js +133 -38
  45. package/dist/ProfileFlameGraph/FlameGraphArrow/MiniMap.js +261 -216
  46. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
  47. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +72 -47
  48. package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -1
  49. package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.js +58 -28
  50. package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.d.ts.map +1 -1
  51. package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.js +59 -8
  52. package/dist/ProfileFlameGraph/FlameGraphArrow/index.js +396 -179
  53. package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.d.ts.map +1 -1
  54. package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.js +68 -50
  55. package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.js +62 -38
  56. package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.js +14 -6
  57. package/dist/ProfileFlameGraph/FlameGraphArrow/useScrollViewport.js +124 -82
  58. package/dist/ProfileFlameGraph/FlameGraphArrow/useVisibleNodes.js +160 -98
  59. package/dist/ProfileFlameGraph/FlameGraphArrow/useZoom.js +232 -112
  60. package/dist/ProfileFlameGraph/FlameGraphArrow/utils.js +137 -114
  61. package/dist/ProfileFlameGraph/benchmarks/benchdata/populateData.js +85 -0
  62. package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
  63. package/dist/ProfileFlameGraph/index.js +324 -150
  64. package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
  65. package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
  66. package/dist/ProfileMetricsGraph/index.js +519 -258
  67. package/dist/ProfileSelector/CompareButton.js +132 -12
  68. package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
  69. package/dist/ProfileSelector/MetricsGraphSection.js +236 -64
  70. package/dist/ProfileSelector/index.d.ts.map +1 -1
  71. package/dist/ProfileSelector/index.js +727 -141
  72. package/dist/ProfileSelector/useAutoQuerySelector.js +249 -130
  73. package/dist/ProfileSource.js +230 -163
  74. package/dist/ProfileTypeSelector/index.js +214 -125
  75. package/dist/ProfileView/components/ActionButtons/GroupByDropdown.js +50 -4
  76. package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
  77. package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +141 -35
  78. package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
  79. package/dist/ProfileView/components/ColorStackLegend.js +185 -55
  80. package/dist/ProfileView/components/DashboardItems/index.js +87 -28
  81. package/dist/ProfileView/components/DashboardLayout/index.js +108 -16
  82. package/dist/ProfileView/components/DiffLegend.js +172 -29
  83. package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +199 -55
  84. package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
  85. package/dist/ProfileView/components/InvertCallStack/index.js +100 -12
  86. package/dist/ProfileView/components/ProfileFilters/filterPresets.js +260 -315
  87. package/dist/ProfileView/components/ProfileFilters/index.js +518 -215
  88. package/dist/ProfileView/components/ProfileFilters/useProfileFilters.js +370 -306
  89. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +2 -1
  90. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
  91. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +188 -118
  92. package/dist/ProfileView/components/ProfileHeader/index.js +105 -11
  93. package/dist/ProfileView/components/ShareButton/ResultBox.js +119 -16
  94. package/dist/ProfileView/components/ShareButton/index.js +352 -62
  95. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
  96. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +678 -194
  97. package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
  98. package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
  99. package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +199 -157
  100. package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
  101. package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
  102. package/dist/ProfileView/components/Toolbars/index.js +441 -21
  103. package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
  104. package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
  105. package/dist/ProfileView/components/ViewSelector/index.js +212 -86
  106. package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
  107. package/dist/ProfileView/components/VisualizationContainer/index.js +52 -7
  108. package/dist/ProfileView/components/VisualizationPanel.js +185 -8
  109. package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
  110. package/dist/ProfileView/context/DashboardContext.js +85 -29
  111. package/dist/ProfileView/context/ProfileViewContext.js +56 -15
  112. package/dist/ProfileView/hooks/useAutoSelectDimension.js +71 -41
  113. package/dist/ProfileView/hooks/useProfileMetadata.js +50 -18
  114. package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
  115. package/dist/ProfileView/hooks/useResetFlameGraphState.js +32 -12
  116. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
  117. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
  118. package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
  119. package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +40 -19
  120. package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
  121. package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
  122. package/dist/ProfileView/hooks/useVisualizationState.js +258 -67
  123. package/dist/ProfileView/index.js +383 -45
  124. package/dist/ProfileView/types/visualization.js +1 -13
  125. package/dist/ProfileView/utils/colorUtils.js +8 -7
  126. package/dist/ProfileViewWithData.d.ts.map +1 -1
  127. package/dist/ProfileViewWithData.js +332 -228
  128. package/dist/QueryControls/index.js +418 -47
  129. package/dist/Sandwich/components/CalleesSection.js +54 -4
  130. package/dist/Sandwich/components/CallersSection.js +97 -27
  131. package/dist/Sandwich/components/TableSection.js +77 -4
  132. package/dist/Sandwich/index.d.ts.map +1 -1
  133. package/dist/Sandwich/index.js +126 -14
  134. package/dist/Sandwich/utils/processRowData.js +48 -39
  135. package/dist/SelectWithRefresh/index.js +102 -28
  136. package/dist/SimpleMatchers/Select.js +520 -187
  137. package/dist/SimpleMatchers/index.js +590 -288
  138. package/dist/SourceView/Highlighter.js +230 -70
  139. package/dist/SourceView/LineNo.js +72 -17
  140. package/dist/SourceView/index.d.ts.map +1 -1
  141. package/dist/SourceView/index.js +178 -104
  142. package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
  143. package/dist/SourceView/lang-detector/index.js +28 -14
  144. package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
  145. package/dist/SourceView/useSelectedLineRange.js +99 -23
  146. package/dist/Table/ColorCell.js +42 -1
  147. package/dist/Table/ColumnsVisibility.js +114 -6
  148. package/dist/Table/MoreDropdown.d.ts.map +1 -1
  149. package/dist/Table/MoreDropdown.js +122 -25
  150. package/dist/Table/TableContextMenu.d.ts.map +1 -1
  151. package/dist/Table/TableContextMenu.js +151 -137
  152. package/dist/Table/TableContextMenuWrapper.js +59 -14
  153. package/dist/Table/hooks/useColorManagement.js +58 -16
  154. package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
  155. package/dist/Table/hooks/useTableConfiguration.js +333 -169
  156. package/dist/Table/index.d.ts.map +1 -1
  157. package/dist/Table/index.js +222 -128
  158. package/dist/Table/utils/functions.js +169 -144
  159. package/dist/Table/utils/topAndBottomExpandedRowModel.js +69 -52
  160. package/dist/TimelineGuide/index.js +209 -16
  161. package/dist/TopTable/benchmarks/benchdata/populateData.js +91 -0
  162. package/dist/TopTable/index.d.ts.map +1 -1
  163. package/dist/TopTable/index.js +342 -123
  164. package/dist/contexts/LabelsQueryProvider.js +94 -32
  165. package/dist/contexts/UnifiedLabelsContext.js +114 -49
  166. package/dist/contexts/utils.js +37 -15
  167. package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
  168. package/dist/hooks/useCompareModeMeta.js +158 -64
  169. package/dist/hooks/useLabels.js +295 -52
  170. package/dist/hooks/useQueryState.d.ts +3 -3
  171. package/dist/hooks/useQueryState.d.ts.map +1 -1
  172. package/dist/hooks/useQueryState.js +373 -332
  173. package/dist/index.d.ts +2 -3
  174. package/dist/index.d.ts.map +1 -1
  175. package/dist/index.js +22 -8
  176. package/dist/testdata/fg-diff.json +3750 -0
  177. package/dist/testdata/fg-simple.json +1879 -0
  178. package/dist/testdata/link_data.json +56 -0
  179. package/dist/testdata/tabular.json +30 -0
  180. package/dist/testdata/test_flamegraph.json +26846 -0
  181. package/dist/testdata/test_graph.json +53 -0
  182. package/dist/useDelayedLoader.js +32 -18
  183. package/dist/useGrpcQuery/index.js +71 -11
  184. package/dist/useHasProfileData.js +90 -12
  185. package/dist/useQuery.js +205 -64
  186. package/dist/useSumBy.d.ts +1 -1
  187. package/dist/useSumBy.d.ts.map +1 -1
  188. package/dist/useSumBy.js +294 -138
  189. package/dist/utils.js +62 -30
  190. package/package.json +9 -10
  191. package/src/GraphTooltipArrow/index.tsx +3 -0
  192. package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +13 -11
  193. package/src/MatchersInput/SuggestionsList.test.tsx +70 -0
  194. package/src/MatchersInput/SuggestionsList.tsx +11 -10
  195. package/src/MatchersInput/index.tsx +1 -1
  196. package/src/MetricsGraph/MetricsTooltip/index.tsx +22 -34
  197. package/src/PreSelectedMatchers/index.tsx +3 -0
  198. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +9 -4
  199. package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
  200. package/src/ProfileFlameChart/index.tsx +28 -21
  201. package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +9 -10
  202. package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +6 -5
  203. package/src/ProfileFlameGraph/FlameGraphArrow/TooltipContext.tsx +3 -0
  204. package/src/ProfileFlameGraph/FlameGraphArrow/ZoomControls.tsx +3 -0
  205. package/src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts +3 -0
  206. package/src/ProfileFlameGraph/index.tsx +9 -6
  207. package/src/ProfileMetricsGraph/index.tsx +8 -6
  208. package/src/ProfileSelector/MetricsGraphSection.tsx +10 -5
  209. package/src/ProfileSelector/index.tsx +61 -39
  210. package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +6 -10
  211. package/src/ProfileView/components/ColorStackLegend.tsx +4 -2
  212. package/src/ProfileView/components/InvertCallStack/index.tsx +4 -5
  213. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +192 -94
  214. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
  215. package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +28 -24
  216. package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +5 -4
  217. package/src/ProfileView/components/Toolbars/index.tsx +3 -3
  218. package/src/ProfileView/components/ViewSelector/index.tsx +16 -9
  219. package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
  220. package/src/ProfileView/context/DashboardContext.tsx +6 -6
  221. package/src/ProfileView/hooks/useResetFlameGraphState.ts +4 -6
  222. package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +26 -24
  223. package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +8 -16
  224. package/src/ProfileView/hooks/useVisualizationState.ts +69 -61
  225. package/src/ProfileViewWithData.tsx +35 -29
  226. package/src/Sandwich/index.tsx +3 -4
  227. package/src/SourceView/index.tsx +2 -4
  228. package/src/SourceView/useSelectedLineRange.ts +19 -34
  229. package/src/Table/MoreDropdown.tsx +11 -9
  230. package/src/Table/TableContextMenu.tsx +13 -10
  231. package/src/Table/hooks/useTableConfiguration.tsx +11 -16
  232. package/src/Table/index.tsx +21 -12
  233. package/src/TopTable/index.tsx +4 -3
  234. package/src/hooks/useCompareModeMeta.ts +91 -61
  235. package/src/hooks/useQueryState.test.tsx +345 -275
  236. package/src/hooks/useQueryState.ts +118 -136
  237. package/src/index.tsx +15 -16
  238. package/src/useDelayedLoader.ts +10 -10
  239. package/src/useSumBy.ts +15 -21
  240. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
  241. package/dist/hooks/urlParsers.d.ts +0 -18
  242. package/dist/hooks/urlParsers.d.ts.map +0 -1
  243. package/dist/hooks/urlParsers.js +0 -32
  244. package/dist/hooks/useColorBy.d.ts +0 -5
  245. package/dist/hooks/useColorBy.d.ts.map +0 -1
  246. package/dist/hooks/useColorBy.js +0 -26
  247. package/dist/hooks/useDashboardItems.d.ts +0 -5
  248. package/dist/hooks/useDashboardItems.d.ts.map +0 -1
  249. package/dist/hooks/useDashboardItems.js +0 -27
  250. package/dist/hooks/useQueryState.test.js +0 -868
  251. package/src/hooks/urlParsers.ts +0 -38
  252. package/src/hooks/useColorBy.ts +0 -42
  253. package/src/hooks/useDashboardItems.ts +0 -46
@@ -1,4 +1,16 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
10
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
13
+ import { c as _c } from "react-compiler-runtime";
2
14
  // Copyright 2022 The Parca Authors
3
15
  // Licensed under the Apache License, Version 2.0 (the "License");
4
16
  // you may not use this file except in compliance with the License.
@@ -11,133 +23,340 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
11
23
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
24
  // See the License for the specific language governing permissions and
13
25
  // limitations under the License.
26
+
14
27
  import React, { useCallback, useEffect, useMemo } from 'react';
15
28
  import { createColumnHelper } from '@tanstack/react-table';
16
- import { Button, Table } from '@parca/components';
17
- import { getLastItem, isSearchMatch, parseParams, valueFormatter, } from '@parca/utilities';
29
+ import { Button, Table, useURLState } from '@parca/components';
30
+ import { getLastItem, isSearchMatch, parseParams, valueFormatter } from '@parca/utilities';
18
31
  import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
19
- import { useDashboardItems } from '../hooks/useDashboardItems';
20
32
  import { hexifyAddress } from '../utils';
21
- export const RowLabel = (meta) => {
22
- if (meta === undefined)
23
- return '<unknown>';
24
- const mapping = `${meta?.mapping?.file !== undefined && meta?.mapping?.file !== ''
25
- ? `[${getLastItem(meta.mapping.file) ?? ''}]`
26
- : ''}`;
27
- if (meta.function?.name !== undefined && meta.function?.name !== '')
28
- return `${mapping} ${meta.function.name}`;
29
- const address = hexifyAddress(meta.location?.address);
30
- const fallback = `${mapping} ${address}`;
31
- return fallback === '' ? '<unknown>' : fallback;
33
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
34
+ export var RowLabel = function RowLabel(meta) {
35
+ var _meta$mapping, _meta$mapping2, _getLastItem, _meta$function, _meta$function2, _meta$location;
36
+ if (meta === undefined) return '<unknown>';
37
+ var mapping = "".concat((meta === null || meta === void 0 || (_meta$mapping = meta.mapping) === null || _meta$mapping === void 0 ? void 0 : _meta$mapping.file) !== undefined && (meta === null || meta === void 0 || (_meta$mapping2 = meta.mapping) === null || _meta$mapping2 === void 0 ? void 0 : _meta$mapping2.file) !== '' ? "[".concat((_getLastItem = getLastItem(meta.mapping.file)) !== null && _getLastItem !== void 0 ? _getLastItem : '', "]") : '');
38
+ if (((_meta$function = meta["function"]) === null || _meta$function === void 0 ? void 0 : _meta$function.name) !== undefined && ((_meta$function2 = meta["function"]) === null || _meta$function2 === void 0 ? void 0 : _meta$function2.name) !== '') return "".concat(mapping, " ").concat(meta["function"].name);
39
+ var address = hexifyAddress((_meta$location = meta.location) === null || _meta$location === void 0 ? void 0 : _meta$location.address);
40
+ var fallback = "".concat(mapping, " ").concat(address);
41
+ return fallback === '' ? '<unknown>' : fallback;
32
42
  };
33
- const columnHelper = createColumnHelper();
34
- const addPlusSign = (num) => {
35
- if (num.charAt(0) === '0' || num.charAt(0) === '-') {
36
- return num;
37
- }
38
- return `+${num}`;
43
+ var columnHelper = createColumnHelper();
44
+ var addPlusSign = function addPlusSign(num) {
45
+ if (num.charAt(0) === '0' || num.charAt(0) === '-') {
46
+ return num;
47
+ }
48
+ return "+".concat(num);
39
49
  };
40
- export const TopTable = React.memo(function TopTable({ data: top, sampleUnit: unit, navigateTo, loading, currentSearchString, setActionButtons, }) {
41
- const router = parseParams(window?.location.search);
42
- const { dashboardItems } = useDashboardItems();
43
- const { compareMode } = useProfileViewContext();
44
- const columns = useMemo(() => {
45
- const cols = [
46
- columnHelper.accessor('meta', {
47
- header: () => _jsx("span", { className: "text-left", children: "Name" }),
48
- cell: info => {
49
- const meta = info.row.original.meta;
50
- const name = RowLabel(meta);
51
- return name;
52
- },
53
- sortingFn: (a, b) => {
54
- const aName = RowLabel(a.original.meta);
55
- const bName = RowLabel(b.original.meta);
56
- return aName.localeCompare(bName);
57
- },
58
- }),
59
- columnHelper.accessor('flat', {
60
- header: () => 'Flat',
61
- cell: info => valueFormatter(info.getValue(), unit, 2),
62
- size: 150,
63
- meta: {
64
- align: 'right',
65
- },
66
- sortDescFirst: true,
67
- }),
68
- columnHelper.accessor('cumulative', {
69
- header: () => 'Cumulative',
70
- cell: info => valueFormatter(info.getValue(), unit, 2),
71
- size: 150,
72
- meta: {
73
- align: 'right',
74
- },
75
- sortDescFirst: true,
76
- }),
77
- ];
78
- if (compareMode) {
79
- cols.push(columnHelper.accessor('diff', {
80
- header: () => 'Diff',
81
- cell: info => addPlusSign(valueFormatter(info.getValue(), unit, 2)),
82
- size: 150,
83
- meta: {
84
- align: 'right',
85
- },
86
- sortDescFirst: true,
87
- }));
88
- }
89
- return cols;
90
- }, [unit, compareMode]);
91
- const selectSpan = useCallback((span) => {
92
- if (navigateTo != null) {
93
- navigateTo('/', {
94
- ...router,
95
- ...{ search_string: span.trim() },
96
- }, { replace: true });
97
- }
98
- }, [navigateTo, router]);
99
- const onRowClick = useCallback((row) => {
100
- // If there is only one dashboard item, we don't want to select a span
101
- if (dashboardItems.length <= 1) {
102
- return;
103
- }
104
- const meta = row.meta;
105
- if (meta === undefined) {
106
- return;
107
- }
108
- const name = RowLabel(meta);
109
- selectSpan(name);
110
- }, [selectSpan, dashboardItems.length]);
111
- const shouldHighlightRow = useCallback((row) => {
112
- const meta = row.meta;
113
- if (meta === undefined)
114
- return false;
115
- const name = RowLabel(meta);
116
- return isSearchMatch(currentSearchString, name);
117
- }, [currentSearchString]);
118
- const enableHighlighting = useMemo(() => {
119
- return currentSearchString != null && currentSearchString?.length > 0;
120
- }, [currentSearchString]);
121
- const clearSelection = useCallback(() => {
122
- if (navigateTo != null) {
123
- navigateTo('/', {
124
- ...router,
125
- ...{ search_string: '' },
126
- }, { replace: true });
127
- }
128
- }, [navigateTo, router]);
129
- useEffect(() => {
130
- if (setActionButtons === undefined) {
131
- return;
132
- }
133
- setActionButtons(dashboardItems.length > 1 ? (_jsx("div", { className: "ml-2", children: _jsx(Button, { color: "neutral", onClick: clearSelection, className: "w-auto", variant: "neutral", disabled: currentSearchString === undefined || currentSearchString.length === 0, children: "Clear selection" }) })) : (_jsx(_Fragment, {})));
134
- }, [dashboardItems, clearSelection, currentSearchString, setActionButtons]);
135
- const initialSorting = useMemo(() => {
136
- return [{ id: compareMode ? 'diff' : 'cumulative', desc: true }];
137
- }, [compareMode]);
138
- const total = top != null ? top.list.length : 0;
139
- if (total === 0 && !loading)
140
- return _jsx("div", { className: "mx-auto text-center", children: "Profile has no samples" });
141
- return (_jsx("div", { className: "relative", children: _jsx("div", { className: "font-robotoMono h-[80vh] w-full overflow-scroll", children: _jsx(Table, { data: top?.list ?? [], columns: columns, initialSorting: initialSorting, onRowClick: onRowClick, enableHighlighting: enableHighlighting, shouldHighlightRow: shouldHighlightRow, usePointerCursor: dashboardItems.length > 1 }) }) }));
50
+ export var TopTable = /*#__PURE__*/React.memo(function TopTable(t0) {
51
+ var $ = _c(46);
52
+ var top = t0.data,
53
+ unit = t0.sampleUnit,
54
+ navigateTo = t0.navigateTo,
55
+ loading = t0.loading,
56
+ currentSearchString = t0.currentSearchString,
57
+ setActionButtons = t0.setActionButtons;
58
+ var t1;
59
+ if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
60
+ var _window;
61
+ t1 = parseParams((_window = window) === null || _window === void 0 ? void 0 : _window.location.search);
62
+ $[0] = t1;
63
+ } else {
64
+ t1 = $[0];
65
+ }
66
+ var router = t1;
67
+ var t2;
68
+ if ($[1] === Symbol["for"]("react.memo_cache_sentinel")) {
69
+ t2 = {
70
+ alwaysReturnArray: true
71
+ };
72
+ $[1] = t2;
73
+ } else {
74
+ t2 = $[1];
75
+ }
76
+ var _useURLState = useURLState("dashboard_items", t2),
77
+ _useURLState2 = _slicedToArray(_useURLState, 1),
78
+ dashboardItems = _useURLState2[0];
79
+ var _useProfileViewContex = useProfileViewContext(),
80
+ compareMode = _useProfileViewContex.compareMode;
81
+ var t3;
82
+ if ($[2] === Symbol["for"]("react.memo_cache_sentinel")) {
83
+ t3 = columnHelper.accessor("meta", {
84
+ header: _temp,
85
+ cell: _temp2,
86
+ sortingFn: _temp3
87
+ });
88
+ $[2] = t3;
89
+ } else {
90
+ t3 = $[2];
91
+ }
92
+ var t4;
93
+ if ($[3] !== unit) {
94
+ t4 = columnHelper.accessor("flat", {
95
+ header: _temp4,
96
+ cell: function cell(info_0) {
97
+ return valueFormatter(info_0.getValue(), unit, 2);
98
+ },
99
+ size: 150,
100
+ meta: {
101
+ align: "right"
102
+ },
103
+ sortDescFirst: true
104
+ });
105
+ $[3] = unit;
106
+ $[4] = t4;
107
+ } else {
108
+ t4 = $[4];
109
+ }
110
+ var t5;
111
+ if ($[5] !== unit) {
112
+ t5 = columnHelper.accessor("cumulative", {
113
+ header: _temp5,
114
+ cell: function cell(info_1) {
115
+ return valueFormatter(info_1.getValue(), unit, 2);
116
+ },
117
+ size: 150,
118
+ meta: {
119
+ align: "right"
120
+ },
121
+ sortDescFirst: true
122
+ });
123
+ $[5] = unit;
124
+ $[6] = t5;
125
+ } else {
126
+ t5 = $[6];
127
+ }
128
+ var cols;
129
+ if ($[7] !== compareMode || $[8] !== t4 || $[9] !== t5 || $[10] !== unit) {
130
+ cols = [t3, t4, t5];
131
+ if (compareMode) {
132
+ var _t;
133
+ if ($[12] !== unit) {
134
+ _t = columnHelper.accessor("diff", {
135
+ header: _temp6,
136
+ cell: function cell(info_2) {
137
+ return addPlusSign(valueFormatter(info_2.getValue(), unit, 2));
138
+ },
139
+ size: 150,
140
+ meta: {
141
+ align: "right"
142
+ },
143
+ sortDescFirst: true
144
+ });
145
+ $[12] = unit;
146
+ $[13] = _t;
147
+ } else {
148
+ _t = $[13];
149
+ }
150
+ cols.push(_t);
151
+ }
152
+ $[7] = compareMode;
153
+ $[8] = t4;
154
+ $[9] = t5;
155
+ $[10] = unit;
156
+ $[11] = cols;
157
+ } else {
158
+ cols = $[11];
159
+ }
160
+ var columns = cols;
161
+ var t6;
162
+ if ($[14] !== navigateTo) {
163
+ t6 = function t6(span) {
164
+ if (navigateTo != null) {
165
+ navigateTo("/", _objectSpread(_objectSpread({}, router), {
166
+ search_string: span.trim()
167
+ }), {
168
+ replace: true
169
+ });
170
+ }
171
+ };
172
+ $[14] = navigateTo;
173
+ $[15] = t6;
174
+ } else {
175
+ t6 = $[15];
176
+ }
177
+ var selectSpan = t6;
178
+ var t7;
179
+ if ($[16] !== dashboardItems.length || $[17] !== selectSpan) {
180
+ t7 = function t7(row) {
181
+ if (dashboardItems.length <= 1) {
182
+ return;
183
+ }
184
+ var meta_0 = row.meta;
185
+ if (meta_0 === undefined) {
186
+ return;
187
+ }
188
+ var name_0 = RowLabel(meta_0);
189
+ selectSpan(name_0);
190
+ };
191
+ $[16] = dashboardItems.length;
192
+ $[17] = selectSpan;
193
+ $[18] = t7;
194
+ } else {
195
+ t7 = $[18];
196
+ }
197
+ var onRowClick = t7;
198
+ var t8;
199
+ if ($[19] !== currentSearchString) {
200
+ t8 = function t8(row_0) {
201
+ var meta_1 = row_0.meta;
202
+ if (meta_1 === undefined) {
203
+ return false;
204
+ }
205
+ var name_1 = RowLabel(meta_1);
206
+ return isSearchMatch(currentSearchString, name_1);
207
+ };
208
+ $[19] = currentSearchString;
209
+ $[20] = t8;
210
+ } else {
211
+ t8 = $[20];
212
+ }
213
+ var shouldHighlightRow = t8;
214
+ var enableHighlighting = currentSearchString != null && (currentSearchString === null || currentSearchString === void 0 ? void 0 : currentSearchString.length) > 0;
215
+ var t9;
216
+ if ($[21] !== navigateTo) {
217
+ t9 = function t9() {
218
+ if (navigateTo != null) {
219
+ navigateTo("/", _objectSpread(_objectSpread({}, router), {
220
+ search_string: ""
221
+ }), {
222
+ replace: true
223
+ });
224
+ }
225
+ };
226
+ $[21] = navigateTo;
227
+ $[22] = t9;
228
+ } else {
229
+ t9 = $[22];
230
+ }
231
+ var clearSelection = t9;
232
+ var t10;
233
+ if ($[23] !== clearSelection || $[24] !== currentSearchString || $[25] !== dashboardItems.length || $[26] !== setActionButtons) {
234
+ t10 = function t10() {
235
+ if (setActionButtons === undefined) {
236
+ return;
237
+ }
238
+ setActionButtons(dashboardItems.length > 1 ? /*#__PURE__*/_jsx("div", {
239
+ className: "ml-2",
240
+ children: /*#__PURE__*/_jsx(Button, {
241
+ color: "neutral",
242
+ onClick: clearSelection,
243
+ className: "w-auto",
244
+ variant: "neutral",
245
+ disabled: currentSearchString === undefined || currentSearchString.length === 0,
246
+ children: "Clear selection"
247
+ })
248
+ }) : /*#__PURE__*/_jsx(_Fragment, {}));
249
+ };
250
+ $[23] = clearSelection;
251
+ $[24] = currentSearchString;
252
+ $[25] = dashboardItems.length;
253
+ $[26] = setActionButtons;
254
+ $[27] = t10;
255
+ } else {
256
+ t10 = $[27];
257
+ }
258
+ var t11;
259
+ if ($[28] !== clearSelection || $[29] !== currentSearchString || $[30] !== dashboardItems || $[31] !== setActionButtons) {
260
+ t11 = [dashboardItems, clearSelection, currentSearchString, setActionButtons];
261
+ $[28] = clearSelection;
262
+ $[29] = currentSearchString;
263
+ $[30] = dashboardItems;
264
+ $[31] = setActionButtons;
265
+ $[32] = t11;
266
+ } else {
267
+ t11 = $[32];
268
+ }
269
+ useEffect(t10, t11);
270
+ var t12 = compareMode ? "diff" : "cumulative";
271
+ var t13;
272
+ if ($[33] !== t12) {
273
+ t13 = [{
274
+ id: t12,
275
+ desc: true
276
+ }];
277
+ $[33] = t12;
278
+ $[34] = t13;
279
+ } else {
280
+ t13 = $[34];
281
+ }
282
+ var initialSorting = t13;
283
+ var total = top != null ? top.list.length : 0;
284
+ if (total === 0 && !loading) {
285
+ var _t2;
286
+ if ($[35] === Symbol["for"]("react.memo_cache_sentinel")) {
287
+ _t2 = /*#__PURE__*/_jsx("div", {
288
+ className: "mx-auto text-center",
289
+ children: "Profile has no samples"
290
+ });
291
+ $[35] = _t2;
292
+ } else {
293
+ _t2 = $[35];
294
+ }
295
+ return _t2;
296
+ }
297
+ var t14;
298
+ if ($[36] !== (top === null || top === void 0 ? void 0 : top.list)) {
299
+ var _top$list;
300
+ t14 = (_top$list = top === null || top === void 0 ? void 0 : top.list) !== null && _top$list !== void 0 ? _top$list : [];
301
+ $[36] = top === null || top === void 0 ? void 0 : top.list;
302
+ $[37] = t14;
303
+ } else {
304
+ t14 = $[37];
305
+ }
306
+ var t15 = dashboardItems.length > 1;
307
+ var t16;
308
+ if ($[38] !== columns || $[39] !== enableHighlighting || $[40] !== initialSorting || $[41] !== onRowClick || $[42] !== shouldHighlightRow || $[43] !== t14 || $[44] !== t15) {
309
+ t16 = /*#__PURE__*/_jsx("div", {
310
+ className: "relative",
311
+ children: /*#__PURE__*/_jsx("div", {
312
+ className: "font-robotoMono h-[80vh] w-full overflow-scroll",
313
+ children: /*#__PURE__*/_jsx(Table, {
314
+ data: t14,
315
+ columns: columns,
316
+ initialSorting: initialSorting,
317
+ onRowClick: onRowClick,
318
+ enableHighlighting: enableHighlighting,
319
+ shouldHighlightRow: shouldHighlightRow,
320
+ usePointerCursor: t15
321
+ })
322
+ })
323
+ });
324
+ $[38] = columns;
325
+ $[39] = enableHighlighting;
326
+ $[40] = initialSorting;
327
+ $[41] = onRowClick;
328
+ $[42] = shouldHighlightRow;
329
+ $[43] = t14;
330
+ $[44] = t15;
331
+ $[45] = t16;
332
+ } else {
333
+ t16 = $[45];
334
+ }
335
+ return t16;
142
336
  });
143
337
  export default TopTable;
338
+ function _temp() {
339
+ return /*#__PURE__*/_jsx("span", {
340
+ className: "text-left",
341
+ children: "Name"
342
+ });
343
+ }
344
+ function _temp2(info) {
345
+ var meta = info.row.original.meta;
346
+ var name = RowLabel(meta);
347
+ return name;
348
+ }
349
+ function _temp3(a, b) {
350
+ var aName = RowLabel(a.original.meta);
351
+ var bName = RowLabel(b.original.meta);
352
+ return aName.localeCompare(bName);
353
+ }
354
+ function _temp4() {
355
+ return "Flat";
356
+ }
357
+ function _temp5() {
358
+ return "Cumulative";
359
+ }
360
+ function _temp6() {
361
+ return "Diff";
362
+ }
@@ -1,4 +1,10 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
+ import { c as _c } from "react-compiler-runtime";
2
8
  // Copyright 2022 The Parca Authors
3
9
  // Licensed under the Apache License, Version 2.0 (the "License");
4
10
  // you may not use this file except in compliance with the License.
@@ -11,6 +17,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
17
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
18
  // See the License for the specific language governing permissions and
13
19
  // limitations under the License.
20
+
14
21
  /**
15
22
  * LabelsQueryProvider - Data Fetching Layer
16
23
  *
@@ -31,40 +38,95 @@ import { jsx as _jsx } from "react/jsx-runtime";
31
38
  *
32
39
  * Consumer Hook: useLabelsQueryProvider()
33
40
  */
41
+
34
42
  import { createContext, useContext, useState } from 'react';
35
43
  import { useLabelNames, useLabelValues } from '../hooks/useLabels';
36
44
  import { useExtractedLabelNames } from './utils';
37
- const LabelsQueryProviderContext = createContext(null);
38
- export function LabelsQueryProvider({ children, queryClient, setMatchersString, runQuery, currentQuery, profileType, start, end, suffix, }) {
39
- const [currentLabelName, setCurrentLabelName] = useState(null);
40
- const { result: labelNamesResponse, loading: isLabelNamesLoading, refetch: labelNamesRefetch, } = useLabelNames(queryClient, profileType, start, end);
41
- const labelNames = useExtractedLabelNames(labelNamesResponse.response, labelNamesResponse.error);
42
- const { result: labelValuesOriginal, loading: isLabelValuesLoading, refetch: labelValuesRefetch, } = useLabelValues(queryClient, currentLabelName ?? '', profileType, start, end);
43
- const labelValues = labelValuesOriginal.response;
44
- const value = {
45
- labelNames,
46
- labelValues,
47
- isLabelNamesLoading,
48
- isLabelValuesLoading,
49
- refetchLabelValues: labelValuesRefetch,
50
- refetchLabelNames: labelNamesRefetch,
51
- queryClient,
52
- setMatchersString,
53
- runQuery,
54
- currentQuery,
55
- profileType,
56
- start,
57
- end,
58
- setCurrentLabelName,
59
- currentLabelName,
60
- suffix,
45
+ import { jsx as _jsx } from "react/jsx-runtime";
46
+ var LabelsQueryProviderContext = /*#__PURE__*/createContext(null);
47
+ export function LabelsQueryProvider(t0) {
48
+ var $ = _c(19);
49
+ var children = t0.children,
50
+ queryClient = t0.queryClient,
51
+ setMatchersString = t0.setMatchersString,
52
+ runQuery = t0.runQuery,
53
+ currentQuery = t0.currentQuery,
54
+ profileType = t0.profileType,
55
+ start = t0.start,
56
+ end = t0.end,
57
+ suffix = t0.suffix;
58
+ var _useState = useState(null),
59
+ _useState2 = _slicedToArray(_useState, 2),
60
+ currentLabelName = _useState2[0],
61
+ setCurrentLabelName = _useState2[1];
62
+ var _useLabelNames = useLabelNames(queryClient, profileType, start, end),
63
+ labelNamesResponse = _useLabelNames.result,
64
+ isLabelNamesLoading = _useLabelNames.loading,
65
+ labelNamesRefetch = _useLabelNames.refetch;
66
+ var labelNames = useExtractedLabelNames(labelNamesResponse.response, labelNamesResponse.error);
67
+ var _useLabelValues = useLabelValues(queryClient, currentLabelName !== null && currentLabelName !== void 0 ? currentLabelName : "", profileType, start, end),
68
+ labelValuesOriginal = _useLabelValues.result,
69
+ isLabelValuesLoading = _useLabelValues.loading,
70
+ labelValuesRefetch = _useLabelValues.refetch;
71
+ var labelValues = labelValuesOriginal.response;
72
+ var t1;
73
+ if ($[0] !== currentLabelName || $[1] !== currentQuery || $[2] !== end || $[3] !== isLabelNamesLoading || $[4] !== isLabelValuesLoading || $[5] !== labelNames || $[6] !== labelNamesRefetch || $[7] !== labelValues || $[8] !== labelValuesRefetch || $[9] !== profileType || $[10] !== queryClient || $[11] !== runQuery || $[12] !== setMatchersString || $[13] !== start || $[14] !== suffix) {
74
+ t1 = {
75
+ labelNames: labelNames,
76
+ labelValues: labelValues,
77
+ isLabelNamesLoading: isLabelNamesLoading,
78
+ isLabelValuesLoading: isLabelValuesLoading,
79
+ refetchLabelValues: labelValuesRefetch,
80
+ refetchLabelNames: labelNamesRefetch,
81
+ queryClient: queryClient,
82
+ setMatchersString: setMatchersString,
83
+ runQuery: runQuery,
84
+ currentQuery: currentQuery,
85
+ profileType: profileType,
86
+ start: start,
87
+ end: end,
88
+ setCurrentLabelName: setCurrentLabelName,
89
+ currentLabelName: currentLabelName,
90
+ suffix: suffix
61
91
  };
62
- return (_jsx(LabelsQueryProviderContext.Provider, { value: value, children: children }));
92
+ $[0] = currentLabelName;
93
+ $[1] = currentQuery;
94
+ $[2] = end;
95
+ $[3] = isLabelNamesLoading;
96
+ $[4] = isLabelValuesLoading;
97
+ $[5] = labelNames;
98
+ $[6] = labelNamesRefetch;
99
+ $[7] = labelValues;
100
+ $[8] = labelValuesRefetch;
101
+ $[9] = profileType;
102
+ $[10] = queryClient;
103
+ $[11] = runQuery;
104
+ $[12] = setMatchersString;
105
+ $[13] = start;
106
+ $[14] = suffix;
107
+ $[15] = t1;
108
+ } else {
109
+ t1 = $[15];
110
+ }
111
+ var value = t1;
112
+ var t2;
113
+ if ($[16] !== children || $[17] !== value) {
114
+ t2 = /*#__PURE__*/_jsx(LabelsQueryProviderContext.Provider, {
115
+ value: value,
116
+ children: children
117
+ });
118
+ $[16] = children;
119
+ $[17] = value;
120
+ $[18] = t2;
121
+ } else {
122
+ t2 = $[18];
123
+ }
124
+ return t2;
63
125
  }
64
126
  export function useLabelsQueryProvider() {
65
- const context = useContext(LabelsQueryProviderContext);
66
- if (context === null) {
67
- throw new Error('useLabelsQueryProvider must be used within a LabelsQueryProvider');
68
- }
69
- return context;
70
- }
127
+ var context = useContext(LabelsQueryProviderContext);
128
+ if (context === null) {
129
+ throw new Error("useLabelsQueryProvider must be used within a LabelsQueryProvider");
130
+ }
131
+ return context;
132
+ }