@parca/profile 0.19.142 → 0.19.143

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 (135) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
  3. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +22 -28
  4. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
  5. package/dist/ProfileExplorer/ProfileExplorerCompare.js +72 -73
  6. package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
  7. package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
  8. package/dist/ProfileFlameChart/index.d.ts.map +1 -1
  9. package/dist/ProfileFlameChart/index.js +20 -24
  10. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
  11. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +13 -14
  12. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
  13. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +6 -5
  14. package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
  15. package/dist/ProfileFlameGraph/index.js +8 -7
  16. package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
  17. package/dist/ProfileMetricsGraph/index.js +6 -8
  18. package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
  19. package/dist/ProfileSelector/MetricsGraphSection.js +48 -55
  20. package/dist/ProfileSelector/index.d.ts +1 -1
  21. package/dist/ProfileSelector/index.d.ts.map +1 -1
  22. package/dist/ProfileSelector/index.js +216 -210
  23. package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
  24. package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
  25. package/dist/ProfileSelector/useAutoQuerySelector.js +133 -104
  26. package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
  27. package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +24 -25
  28. package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
  29. package/dist/ProfileView/components/ColorStackLegend.js +3 -5
  30. package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
  31. package/dist/ProfileView/components/InvertCallStack/index.js +47 -47
  32. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +1 -2
  33. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
  34. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +37 -34
  35. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
  36. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +282 -294
  37. package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
  38. package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +7 -8
  39. package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
  40. package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
  41. package/dist/ProfileView/components/Toolbars/index.js +1 -1
  42. package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
  43. package/dist/ProfileView/components/ViewSelector/index.js +53 -75
  44. package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
  45. package/dist/ProfileView/context/DashboardContext.js +36 -44
  46. package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
  47. package/dist/ProfileView/hooks/useResetFlameGraphState.js +8 -7
  48. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
  49. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +59 -59
  50. package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
  51. package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +37 -22
  52. package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
  53. package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
  54. package/dist/ProfileView/hooks/useVisualizationState.js +116 -147
  55. package/dist/ProfileViewWithData.d.ts.map +1 -1
  56. package/dist/ProfileViewWithData.js +35 -45
  57. package/dist/Sandwich/index.d.ts.map +1 -1
  58. package/dist/Sandwich/index.js +6 -5
  59. package/dist/SourceView/index.d.ts.map +1 -1
  60. package/dist/SourceView/index.js +6 -4
  61. package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
  62. package/dist/SourceView/useSelectedLineRange.js +52 -76
  63. package/dist/Table/MoreDropdown.d.ts.map +1 -1
  64. package/dist/Table/MoreDropdown.js +42 -53
  65. package/dist/Table/TableContextMenu.d.ts.map +1 -1
  66. package/dist/Table/TableContextMenu.js +15 -19
  67. package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
  68. package/dist/Table/hooks/useTableConfiguration.js +107 -115
  69. package/dist/Table/index.d.ts.map +1 -1
  70. package/dist/Table/index.js +16 -16
  71. package/dist/TopTable/index.d.ts.map +1 -1
  72. package/dist/TopTable/index.js +112 -127
  73. package/dist/hooks/urlParsers.d.ts +18 -0
  74. package/dist/hooks/urlParsers.d.ts.map +1 -0
  75. package/dist/hooks/urlParsers.js +44 -0
  76. package/dist/hooks/useColorBy.d.ts +5 -0
  77. package/dist/hooks/useColorBy.d.ts.map +1 -0
  78. package/dist/hooks/useColorBy.js +63 -0
  79. package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
  80. package/dist/hooks/useCompareModeMeta.js +94 -138
  81. package/dist/hooks/useDashboardItems.d.ts +5 -0
  82. package/dist/hooks/useDashboardItems.d.ts.map +1 -0
  83. package/dist/hooks/useDashboardItems.js +68 -0
  84. package/dist/hooks/useQueryState.d.ts +4 -4
  85. package/dist/hooks/useQueryState.d.ts.map +1 -1
  86. package/dist/hooks/useQueryState.js +127 -122
  87. package/dist/index.d.ts +3 -2
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +3 -12
  90. package/dist/useSumBy.d.ts +1 -1
  91. package/dist/useSumBy.d.ts.map +1 -1
  92. package/dist/useSumBy.js +2 -2
  93. package/package.json +4 -3
  94. package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +11 -13
  95. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +11 -9
  96. package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
  97. package/src/ProfileFlameChart/index.tsx +21 -28
  98. package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +10 -9
  99. package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +5 -3
  100. package/src/ProfileFlameGraph/index.tsx +6 -9
  101. package/src/ProfileMetricsGraph/index.tsx +6 -8
  102. package/src/ProfileSelector/MetricsGraphSection.tsx +5 -10
  103. package/src/ProfileSelector/index.tsx +33 -33
  104. package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
  105. package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +10 -6
  106. package/src/ProfileView/components/ColorStackLegend.tsx +2 -4
  107. package/src/ProfileView/components/InvertCallStack/index.tsx +5 -4
  108. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +94 -192
  109. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
  110. package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +24 -25
  111. package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +4 -5
  112. package/src/ProfileView/components/Toolbars/index.tsx +3 -3
  113. package/src/ProfileView/components/ViewSelector/index.tsx +9 -16
  114. package/src/ProfileView/context/DashboardContext.tsx +6 -6
  115. package/src/ProfileView/hooks/useResetFlameGraphState.ts +6 -4
  116. package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +24 -26
  117. package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +16 -8
  118. package/src/ProfileView/hooks/useVisualizationState.ts +61 -69
  119. package/src/ProfileViewWithData.tsx +29 -35
  120. package/src/Sandwich/index.tsx +4 -3
  121. package/src/SourceView/index.tsx +4 -2
  122. package/src/SourceView/useSelectedLineRange.ts +34 -19
  123. package/src/Table/MoreDropdown.tsx +9 -11
  124. package/src/Table/TableContextMenu.tsx +10 -13
  125. package/src/Table/hooks/useTableConfiguration.tsx +3 -4
  126. package/src/Table/index.tsx +12 -21
  127. package/src/TopTable/index.tsx +3 -4
  128. package/src/hooks/urlParsers.ts +38 -0
  129. package/src/hooks/useColorBy.ts +42 -0
  130. package/src/hooks/useCompareModeMeta.ts +61 -91
  131. package/src/hooks/useDashboardItems.ts +46 -0
  132. package/src/hooks/useQueryState.test.tsx +275 -345
  133. package/src/hooks/useQueryState.ts +153 -120
  134. package/src/index.tsx +16 -15
  135. package/src/useSumBy.ts +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileMetricsGraph/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,EAGL,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EAOd,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAyB,gBAAgB,EAAC,MAAM,IAAI,CAAC;AA6G5D,UAAU,6BAA6B;IACrC,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD,eAAO,MAAM,wBAAwB,GAAI,aAAW,6BAA6B,KAAG,GAAG,CAAC,OAMvF,CAAC;AAEF,UAAU,wBAAwB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CACf,MAAM,E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KAAK,EAAE,MAAM,CAAA;KAAC,GAAG,KAAK,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,KACvE,IAAI,CAAC;IACV,YAAY,EAAE,CACZ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,KAAK,EAAE,EACf,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,mBAAmB,GAAI,qHAW1B,wBAAwB,KAAG,GAAG,CAAC,OAgXjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -27,13 +27,15 @@ import { c as _c } from "react-compiler-runtime";
27
27
  import { useEffect, useMemo, useState } from 'react';
28
28
  import { Icon } from '@iconify/react';
29
29
  import { AnimatePresence, motion } from 'framer-motion';
30
- import { MetricsGraphSkeleton, NumberParser, NumberSerializer, TextWithTooltip, useParcaContext, useURLStateCustom } from '@parca/components';
30
+ import { useQueryState } from 'nuqs';
31
+ import { MetricsGraphSkeleton, TextWithTooltip, useParcaContext } from '@parca/components';
31
32
  import { Query } from '@parca/parser';
32
33
  import { TEST_IDS, testId } from '@parca/test-utils';
33
34
  import { capitalizeOnlyFirstLetter, formatDate, timePattern, valueFormatter } from '@parca/utilities';
34
35
  import { MergedProfileSelection } from '..';
35
36
  import MetricsGraph from '../MetricsGraph';
36
37
  import { useMetricsGraphDimensions } from '../MetricsGraph/useMetricsGraphDimensions';
38
+ import { intParam } from '../hooks/urlParsers';
37
39
  import { getStepCountFromScreenWidth, useQueryRange } from './hooks/useQueryRange';
38
40
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
39
41
  var createProfileContextMenuItems = function createProfileContextMenuItems(addLabelMatcher, data) {
@@ -186,13 +188,9 @@ var ProfileMetricsGraph = function ProfileMetricsGraph(_ref) {
186
188
  _ref$comparing = _ref.comparing,
187
189
  comparing = _ref$comparing === void 0 ? false : _ref$comparing,
188
190
  sumBy = _ref.sumBy;
189
- var _useURLStateCustom = useURLStateCustom('step_count', {
190
- defaultValue: String(getStepCountFromScreenWidth(10)),
191
- parse: NumberParser,
192
- stringify: NumberSerializer
193
- }),
194
- _useURLStateCustom2 = _slicedToArray(_useURLStateCustom, 1),
195
- rawStepCount = _useURLStateCustom2[0];
191
+ var _useQueryState = useQueryState('step_count', intParam.withDefault(getStepCountFromScreenWidth(10))),
192
+ _useQueryState2 = _slicedToArray(_useQueryState, 1),
193
+ rawStepCount = _useQueryState2[0];
196
194
  // Clamp step count so the step duration is at least 1 second as we don't have this enforced server-side anymore.
197
195
  var stepCount = useMemo(function () {
198
196
  var maxForOneSecond = Math.floor((to - from) / 1000);
@@ -1 +1 @@
1
- {"version":3,"file":"MetricsGraphSection.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/MetricsGraphSection.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAQ,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAAC,aAAa,EAAoC,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAC;AAIpC,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAEvC,UAAU,wBAAwB;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gCAAgC,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3D,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,kBAAkB,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qB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KAAK,EACL,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,qBAAqB,EACrB,WAAW,EACX,mBAA2B,EAC3B,iBAAyB,GAC1B,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CA8HxC"}
@@ -25,14 +25,14 @@ import { c as _c } from "react-compiler-runtime";
25
25
  // limitations under the License.
26
26
 
27
27
  import cx from 'classnames';
28
- import { useParcaContext, useURLStateBatch } from '@parca/components';
28
+ import { useParcaContext } from '@parca/components';
29
29
  import { Query } from '@parca/parser';
30
30
  import { useMetricsGraphDimensions } from '../MetricsGraph/useMetricsGraphDimensions';
31
31
  import ProfileMetricsGraph, { ProfileMetricsEmptyState } from '../ProfileMetricsGraph';
32
32
  import { useResetStateOnSeriesChange } from '../ProfileView/hooks/useResetStateOnSeriesChange';
33
33
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
34
34
  export function MetricsGraphSection(t0) {
35
- var $ = _c(37);
35
+ var $ = _c(35);
36
36
  var showMetricsGraph = t0.showMetricsGraph,
37
37
  setDisplayHideMetricsGraphButton = t0.setDisplayHideMetricsGraphButton,
38
38
  querySelection = t0.querySelection,
@@ -53,7 +53,6 @@ export function MetricsGraphSection(t0) {
53
53
  var profileTypesLoading = t1 === undefined ? false : t1;
54
54
  var hasNoProfileTypes = t2 === undefined ? false : t2;
55
55
  var resetStateOnSeriesChange = useResetStateOnSeriesChange();
56
- var batchUpdates = useURLStateBatch();
57
56
  var _useParcaContext = useParcaContext(),
58
57
  profileExplorer = _useParcaContext.profileExplorer;
59
58
  var _useMetricsGraphDimen = useMetricsGraphDimensions(comparing, profileExplorer === null || profileExplorer === void 0 ? void 0 : profileExplorer.metricsGraph.height),
@@ -88,7 +87,7 @@ export function MetricsGraphSection(t0) {
88
87
  }
89
88
  var handleTimeRangeChange = t3;
90
89
  var t4;
91
- if ($[5] !== batchUpdates || $[6] !== commitDraft || $[7] !== queryExpressionString || $[8] !== setNewQueryExpression) {
90
+ if ($[5] !== commitDraft || $[6] !== queryExpressionString || $[7] !== setNewQueryExpression) {
92
91
  t4 = function t4(labels) {
93
92
  var replaceBackslash = _temp;
94
93
  var newQuery;
@@ -121,23 +120,20 @@ export function MetricsGraphSection(t0) {
121
120
  newQuery = query_1;
122
121
  }
123
122
  if (hasChanged) {
124
- batchUpdates(function () {
125
- setNewQueryExpression(newQuery.toString());
126
- commitDraft(undefined, newQuery.toString());
127
- });
123
+ setNewQueryExpression(newQuery.toString());
124
+ commitDraft(undefined, newQuery.toString());
128
125
  }
129
126
  };
130
- $[5] = batchUpdates;
131
- $[6] = commitDraft;
132
- $[7] = queryExpressionString;
133
- $[8] = setNewQueryExpression;
134
- $[9] = t4;
127
+ $[5] = commitDraft;
128
+ $[6] = queryExpressionString;
129
+ $[7] = setNewQueryExpression;
130
+ $[8] = t4;
135
131
  } else {
136
- t4 = $[9];
132
+ t4 = $[8];
137
133
  }
138
134
  var addLabelMatcher = t4;
139
135
  var t5;
140
- if ($[10] !== batchUpdates || $[11] !== resetStateOnSeriesChange || $[12] !== setProfileSelection) {
136
+ if ($[9] !== resetStateOnSeriesChange || $[10] !== setProfileSelection) {
141
137
  t5 = function t5(timestamp, labels_0, queryExpression, duration) {
142
138
  var query_2 = Query.parse(queryExpression);
143
139
  labels_0.forEach(function (l) {
@@ -151,32 +147,29 @@ export function MetricsGraphSection(t0) {
151
147
  });
152
148
  var mergeFrom = timestamp;
153
149
  var mergeTo = query_2.profileType().delta ? mergeFrom + BigInt(duration) : mergeFrom;
154
- batchUpdates(function () {
155
- resetStateOnSeriesChange();
156
- setProfileSelection(mergeFrom, mergeTo, query_2);
157
- });
150
+ resetStateOnSeriesChange();
151
+ setProfileSelection(mergeFrom, mergeTo, query_2);
158
152
  };
159
- $[10] = batchUpdates;
160
- $[11] = resetStateOnSeriesChange;
161
- $[12] = setProfileSelection;
162
- $[13] = t5;
153
+ $[9] = resetStateOnSeriesChange;
154
+ $[10] = setProfileSelection;
155
+ $[11] = t5;
163
156
  } else {
164
- t5 = $[13];
157
+ t5 = $[11];
165
158
  }
166
159
  var handlePointClick = t5;
167
160
  var t6 = !showMetricsGraph;
168
161
  var t7;
169
- if ($[14] !== t6) {
162
+ if ($[12] !== t6) {
170
163
  t7 = cx("relative", {
171
164
  "py-4": t6
172
165
  });
173
- $[14] = t6;
174
- $[15] = t7;
166
+ $[12] = t6;
167
+ $[13] = t7;
175
168
  } else {
176
- t7 = $[15];
169
+ t7 = $[13];
177
170
  }
178
171
  var t8;
179
- if ($[16] !== setDisplayHideMetricsGraphButton || $[17] !== showMetricsGraph) {
172
+ if ($[14] !== setDisplayHideMetricsGraphButton || $[15] !== showMetricsGraph) {
180
173
  t8 = setDisplayHideMetricsGraphButton != null ? /*#__PURE__*/_jsxs("button", {
181
174
  onClick: function onClick() {
182
175
  return setDisplayHideMetricsGraphButton(!showMetricsGraph);
@@ -184,14 +177,14 @@ export function MetricsGraphSection(t0) {
184
177
  className: cx("hidden px-3 py-1 text-sm font-medium text-gray-700 dark:text-gray-200 bg-gray-100 rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:bg-gray-900 z-[5]", showMetricsGraph && "absolute right-0 bottom-3 !flex", !showMetricsGraph && "relative !flex ml-auto"),
185
178
  children: [showMetricsGraph ? "Hide" : "Show", " Metrics Graph"]
186
179
  }) : null;
187
- $[16] = setDisplayHideMetricsGraphButton;
188
- $[17] = showMetricsGraph;
189
- $[18] = t8;
180
+ $[14] = setDisplayHideMetricsGraphButton;
181
+ $[15] = showMetricsGraph;
182
+ $[16] = t8;
190
183
  } else {
191
- t8 = $[18];
184
+ t8 = $[16];
192
185
  }
193
186
  var t9;
194
- if ($[19] !== addLabelMatcher || $[20] !== comparing || $[21] !== defaultSumByLoading || $[22] !== handlePointClick || $[23] !== handleTimeRangeChange || $[24] !== hasNoProfileTypes || $[25] !== heightStyle || $[26] !== profileSelection || $[27] !== profileTypesLoading || $[28] !== queryClient || $[29] !== querySelection || $[30] !== showMetricsGraph || $[31] !== sumBy) {
187
+ if ($[17] !== addLabelMatcher || $[18] !== comparing || $[19] !== defaultSumByLoading || $[20] !== handlePointClick || $[21] !== handleTimeRangeChange || $[22] !== hasNoProfileTypes || $[23] !== heightStyle || $[24] !== profileSelection || $[25] !== profileTypesLoading || $[26] !== queryClient || $[27] !== querySelection || $[28] !== showMetricsGraph || $[29] !== sumBy) {
195
188
  t9 = showMetricsGraph && /*#__PURE__*/_jsx(_Fragment, {
196
189
  children: /*#__PURE__*/_jsx("div", {
197
190
  style: {
@@ -221,35 +214,35 @@ export function MetricsGraphSection(t0) {
221
214
  }) : null
222
215
  })
223
216
  });
224
- $[19] = addLabelMatcher;
225
- $[20] = comparing;
226
- $[21] = defaultSumByLoading;
227
- $[22] = handlePointClick;
228
- $[23] = handleTimeRangeChange;
229
- $[24] = hasNoProfileTypes;
230
- $[25] = heightStyle;
231
- $[26] = profileSelection;
232
- $[27] = profileTypesLoading;
233
- $[28] = queryClient;
234
- $[29] = querySelection;
235
- $[30] = showMetricsGraph;
236
- $[31] = sumBy;
237
- $[32] = t9;
217
+ $[17] = addLabelMatcher;
218
+ $[18] = comparing;
219
+ $[19] = defaultSumByLoading;
220
+ $[20] = handlePointClick;
221
+ $[21] = handleTimeRangeChange;
222
+ $[22] = hasNoProfileTypes;
223
+ $[23] = heightStyle;
224
+ $[24] = profileSelection;
225
+ $[25] = profileTypesLoading;
226
+ $[26] = queryClient;
227
+ $[27] = querySelection;
228
+ $[28] = showMetricsGraph;
229
+ $[29] = sumBy;
230
+ $[30] = t9;
238
231
  } else {
239
- t9 = $[32];
232
+ t9 = $[30];
240
233
  }
241
234
  var t10;
242
- if ($[33] !== t7 || $[34] !== t8 || $[35] !== t9) {
235
+ if ($[31] !== t7 || $[32] !== t8 || $[33] !== t9) {
243
236
  t10 = /*#__PURE__*/_jsxs("div", {
244
237
  className: t7,
245
238
  children: [t8, t9]
246
239
  });
247
- $[33] = t7;
248
- $[34] = t8;
249
- $[35] = t9;
250
- $[36] = t10;
240
+ $[31] = t7;
241
+ $[32] = t8;
242
+ $[33] = t9;
243
+ $[34] = t10;
251
244
  } else {
252
- t10 = $[36];
245
+ t10 = $[34];
253
246
  }
254
247
  return t10;
255
248
  }
@@ -33,6 +33,6 @@ export interface IProfileTypesResult {
33
33
  error?: RpcError;
34
34
  }
35
35
  export declare const useProfileTypes: (client: QueryServiceClient, start?: number, end?: number) => IProfileTypesResult;
36
- declare const ProfileSelector: ({ queryClient, closeProfile, enforcedProfileName, comparing, navigateTo, showMetricsGraph, showSumBySelector, showProfileTypeSelector, setDisplayHideMetricsGraphButton, suffix, onSearchHook, }: ProfileSelectorProps) => JSX.Element;
36
+ declare const ProfileSelector: ({ queryClient, closeProfile, enforcedProfileName, comparing, navigateTo: _navigateTo, showMetricsGraph, showSumBySelector, showProfileTypeSelector, setDisplayHideMetricsGraphButton, suffix, onSearchHook, }: ProfileSelectorProps) => JSX.Element;
37
37
  export default ProfileSelector;
38
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAyC,MAAM,OAAO,CAAC;AAEvF,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAsB,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAY5F,OAAO,EAAyB,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAe/E,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAA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