@parca/profile 0.19.143 → 0.19.145
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.
- package/CHANGELOG.md +8 -0
- package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
- package/dist/MatchersInput/SuggestionsList.js +73 -63
- package/dist/MatchersInput/index.d.ts.map +1 -1
- package/dist/MatchersInput/index.js +4 -5
- package/dist/ProfileTypeSelector/index.d.ts.map +1 -1
- package/dist/ProfileTypeSelector/index.js +33 -52
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +70 -118
- package/dist/ProfileView/components/ProfileFilters/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/index.js +0 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +319 -123
- package/dist/SelectWithRefresh/index.js +38 -33
- package/dist/SimpleMatchers/Select.d.ts.map +1 -1
- package/dist/SimpleMatchers/Select.js +63 -68
- package/dist/SourceView/Highlighter.d.ts.map +1 -1
- package/dist/SourceView/Highlighter.js +1 -1
- package/dist/useQuery.js +2 -1
- package/package.json +3 -3
- package/src/MatchersInput/SuggestionsList.tsx +71 -86
- package/src/MatchersInput/index.tsx +61 -74
- package/src/ProfileTypeSelector/index.tsx +4 -7
- package/src/ProfileView/components/ColorStackLegend.tsx +15 -23
- package/src/ProfileView/components/ProfileFilters/index.tsx +8 -13
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +113 -115
- package/src/SelectWithRefresh/index.tsx +28 -28
- package/src/SimpleMatchers/Select.tsx +29 -37
- package/src/SourceView/Highlighter.tsx +2 -2
- package/src/useQuery.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.19.145](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.144...@parca/profile@0.19.145) (2026-04-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.19.144](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.143...@parca/profile@0.19.144) (2026-04-16)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## 0.19.143 (2026-04-16)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionsList.d.ts","sourceRoot":"","sources":["../../src/MatchersInput/SuggestionsList.tsx"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"SuggestionsList.d.ts","sourceRoot":"","sources":["../../src/MatchersInput/SuggestionsList.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAU3D,qBAAa,UAAU;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;gBAEF,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAK3D;AAED,qBAAa,WAAW;IACtB,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;;CAO3B;AAED,UAAU,KAAK;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAaD,QAAA,MAAM,eAAe,GAAI,yKAWtB,KAAK,KAAG,GAAG,CAAC,OA0Td,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -31,7 +31,7 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
31
31
|
// See the License for the specific language governing permissions and
|
|
32
32
|
// limitations under the License.
|
|
33
33
|
|
|
34
|
-
import React, { Fragment,
|
|
34
|
+
import React, { Fragment, useEffect, useState } from 'react';
|
|
35
35
|
import { Transition } from '@headlessui/react';
|
|
36
36
|
import { usePopper } from 'react-popper';
|
|
37
37
|
import { RefreshButton, useParcaContext } from '@parca/components';
|
|
@@ -111,54 +111,64 @@ var SuggestionsList = function SuggestionsList(_ref) {
|
|
|
111
111
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
112
112
|
isRefetchingNames = _useState0[0],
|
|
113
113
|
setIsRefetchingNames = _useState0[1];
|
|
114
|
-
var handleRefetchValues =
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
114
|
+
var handleRefetchValues = /*#__PURE__*/function () {
|
|
115
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
116
|
+
return _regenerator().w(function (_context) {
|
|
117
|
+
while (1) switch (_context.p = _context.n) {
|
|
118
|
+
case 0:
|
|
119
|
+
if (!isRefetchingValues) {
|
|
120
|
+
_context.n = 1;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
return _context.a(2);
|
|
124
|
+
case 1:
|
|
125
|
+
setIsRefetchingValues(true);
|
|
126
|
+
_context.p = 2;
|
|
127
|
+
_context.n = 3;
|
|
128
|
+
return refetchLabelValues();
|
|
129
|
+
case 3:
|
|
130
|
+
_context.p = 3;
|
|
131
|
+
setIsRefetchingValues(false);
|
|
132
|
+
return _context.f(3);
|
|
133
|
+
case 4:
|
|
134
|
+
return _context.a(2);
|
|
135
|
+
}
|
|
136
|
+
}, _callee, null, [[2,, 3, 4]]);
|
|
137
|
+
}));
|
|
138
|
+
return function handleRefetchValues() {
|
|
139
|
+
return _ref2.apply(this, arguments);
|
|
140
|
+
};
|
|
141
|
+
}();
|
|
142
|
+
var handleRefetchNames = /*#__PURE__*/function () {
|
|
143
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
144
|
+
return _regenerator().w(function (_context2) {
|
|
145
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
146
|
+
case 0:
|
|
147
|
+
if (!isRefetchingNames) {
|
|
148
|
+
_context2.n = 1;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
return _context2.a(2);
|
|
152
|
+
case 1:
|
|
153
|
+
setIsRefetchingNames(true);
|
|
154
|
+
_context2.p = 2;
|
|
155
|
+
_context2.n = 3;
|
|
156
|
+
return refetchLabelNames();
|
|
157
|
+
case 3:
|
|
158
|
+
_context2.p = 3;
|
|
159
|
+
setIsRefetchingNames(false);
|
|
160
|
+
return _context2.f(3);
|
|
161
|
+
case 4:
|
|
162
|
+
return _context2.a(2);
|
|
163
|
+
}
|
|
164
|
+
}, _callee2, null, [[2,, 3, 4]]);
|
|
165
|
+
}));
|
|
166
|
+
return function handleRefetchNames() {
|
|
167
|
+
return _ref3.apply(this, arguments);
|
|
168
|
+
};
|
|
169
|
+
}();
|
|
160
170
|
var suggestionsLength = suggestions.literals.length + suggestions.labelNames.length + suggestions.labelValues.length;
|
|
161
|
-
var getSuggestion =
|
|
171
|
+
var getSuggestion = function getSuggestion(index) {
|
|
162
172
|
if (index < suggestions.labelNames.length) {
|
|
163
173
|
return suggestions.labelNames[index];
|
|
164
174
|
}
|
|
@@ -166,35 +176,35 @@ var SuggestionsList = function SuggestionsList(_ref) {
|
|
|
166
176
|
return suggestions.literals[index - suggestions.labelNames.length];
|
|
167
177
|
}
|
|
168
178
|
return suggestions.labelValues[index - suggestions.labelNames.length - suggestions.literals.length];
|
|
169
|
-
}
|
|
170
|
-
var resetHighlight =
|
|
179
|
+
};
|
|
180
|
+
var resetHighlight = function resetHighlight() {
|
|
171
181
|
return setHighlightedSuggestionIndex(-1);
|
|
172
|
-
}
|
|
173
|
-
var applyHighlightedSuggestion =
|
|
182
|
+
};
|
|
183
|
+
var applyHighlightedSuggestion = function applyHighlightedSuggestion() {
|
|
174
184
|
applySuggestion(getSuggestion(highlightedSuggestionIndex));
|
|
175
185
|
resetHighlight();
|
|
176
|
-
}
|
|
177
|
-
var applySuggestionWithIndex =
|
|
186
|
+
};
|
|
187
|
+
var applySuggestionWithIndex = function applySuggestionWithIndex(index_0) {
|
|
178
188
|
applySuggestion(getSuggestion(index_0));
|
|
179
189
|
resetHighlight();
|
|
180
|
-
}
|
|
181
|
-
var highlightNext =
|
|
190
|
+
};
|
|
191
|
+
var highlightNext = function highlightNext() {
|
|
182
192
|
var nextIndex = highlightedSuggestionIndex + 1;
|
|
183
193
|
if (nextIndex === suggestionsLength) {
|
|
184
194
|
resetHighlight();
|
|
185
195
|
return;
|
|
186
196
|
}
|
|
187
197
|
setHighlightedSuggestionIndex(nextIndex);
|
|
188
|
-
}
|
|
189
|
-
var highlightPrevious =
|
|
198
|
+
};
|
|
199
|
+
var highlightPrevious = function highlightPrevious() {
|
|
190
200
|
if (highlightedSuggestionIndex === -1) {
|
|
191
201
|
// Didn't select anything, so starting at the bottom.
|
|
192
202
|
setHighlightedSuggestionIndex(suggestionsLength - 1);
|
|
193
203
|
return;
|
|
194
204
|
}
|
|
195
205
|
setHighlightedSuggestionIndex(highlightedSuggestionIndex - 1);
|
|
196
|
-
}
|
|
197
|
-
var handleKeyPress =
|
|
206
|
+
};
|
|
207
|
+
var handleKeyPress = function handleKeyPress(event) {
|
|
198
208
|
if (event.key === 'Enter') {
|
|
199
209
|
// Disable new line in the text area
|
|
200
210
|
event.preventDefault();
|
|
@@ -213,8 +223,8 @@ var SuggestionsList = function SuggestionsList(_ref) {
|
|
|
213
223
|
return;
|
|
214
224
|
}
|
|
215
225
|
setShowSuggest(true);
|
|
216
|
-
}
|
|
217
|
-
var handleKeyDown =
|
|
226
|
+
};
|
|
227
|
+
var handleKeyDown = function handleKeyDown(event_0) {
|
|
218
228
|
// Don't need to handle any key interactions if no suggestions there.
|
|
219
229
|
if (suggestionsLength === 0 || !['Tab', 'ArrowUp', 'ArrowDown'].includes(event_0.key)) {
|
|
220
230
|
return;
|
|
@@ -242,7 +252,7 @@ var SuggestionsList = function SuggestionsList(_ref) {
|
|
|
242
252
|
if (event_0.key === 'ArrowDown') {
|
|
243
253
|
highlightNext();
|
|
244
254
|
}
|
|
245
|
-
}
|
|
255
|
+
};
|
|
246
256
|
useEffect(function () {
|
|
247
257
|
var el = inputRef.current;
|
|
248
258
|
if (el == null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MatchersInput/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAMpC,UAAU,KAAK;IACb,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,QAAA,MAAM,aAAa,GAAI,qDAAmD,KAAK,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/MatchersInput/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAMpC,UAAU,KAAK;IACb,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,QAAA,MAAM,aAAa,GAAI,qDAAmD,KAAK,KAAG,GAAG,CAAC,OAsLrF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -24,7 +24,7 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
24
24
|
// See the License for the specific language governing permissions and
|
|
25
25
|
// limitations under the License.
|
|
26
26
|
|
|
27
|
-
import React, {
|
|
27
|
+
import React, { useRef, useState } from 'react';
|
|
28
28
|
import cx from 'classnames';
|
|
29
29
|
import TextareaAutosize from 'react-textarea-autosize';
|
|
30
30
|
import { Query } from '@parca/parser';
|
|
@@ -150,7 +150,6 @@ var MatchersInput = function MatchersInput(t0) {
|
|
|
150
150
|
} else {
|
|
151
151
|
suggestionSections = $[12];
|
|
152
152
|
}
|
|
153
|
-
var suggestionSections_0 = suggestionSections;
|
|
154
153
|
var t3;
|
|
155
154
|
if ($[13] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
156
155
|
t3 = function t3() {
|
|
@@ -291,10 +290,10 @@ var MatchersInput = function MatchersInput(t0) {
|
|
|
291
290
|
}
|
|
292
291
|
var t17 = isLabelValuesLoading && lastCompleted.type === "literal" && lastCompleted.value !== ",";
|
|
293
292
|
var t18;
|
|
294
|
-
if ($[36] !== applySuggestion || $[37] !== commitDraft || $[38] !== focusedInput || $[39] !== isLabelNamesLoading || $[40] !== refetchLabelNames || $[41] !== refetchLabelValues || $[42] !== shouldHandlePrefixes || $[43] !==
|
|
293
|
+
if ($[36] !== applySuggestion || $[37] !== commitDraft || $[38] !== focusedInput || $[39] !== isLabelNamesLoading || $[40] !== refetchLabelNames || $[41] !== refetchLabelValues || $[42] !== shouldHandlePrefixes || $[43] !== suggestionSections || $[44] !== t17) {
|
|
295
294
|
t18 = /*#__PURE__*/_jsx(SuggestionsList, {
|
|
296
295
|
isLabelNamesLoading: isLabelNamesLoading,
|
|
297
|
-
suggestions:
|
|
296
|
+
suggestions: suggestionSections,
|
|
298
297
|
applySuggestion: applySuggestion,
|
|
299
298
|
inputRef: inputRef,
|
|
300
299
|
runQuery: commitDraft,
|
|
@@ -311,7 +310,7 @@ var MatchersInput = function MatchersInput(t0) {
|
|
|
311
310
|
$[40] = refetchLabelNames;
|
|
312
311
|
$[41] = refetchLabelValues;
|
|
313
312
|
$[42] = shouldHandlePrefixes;
|
|
314
|
-
$[43] =
|
|
313
|
+
$[43] = suggestionSections;
|
|
315
314
|
$[44] = t17;
|
|
316
315
|
$[45] = t18;
|
|
317
316
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileTypeSelector/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileTypeSelector/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAC,WAAW,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,EAAS,KAAK,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAG7D,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,iBAAiB;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAqF/B,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAU3F;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,8BAA8B,EAAE,OAAO,GACtC,aAAa,CAiBf;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,WAAW,KAAG,MAIxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,OAAO,WAAW,EAAE,KAAG,MAAM,EAItE,CAAC;AAEF,UAAU,KAAK;IACb,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,mBAAmB,GAAI,2GAQ1B,KAAK,KAAG,GAAG,CAAC,OA2Bd,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -4,8 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
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
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
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
|
-
import { c as _c } from "react-compiler-runtime";
|
|
8
|
-
// Copyright 2022 The Parca Authors
|
|
7
|
+
import { c as _c } from "react-compiler-runtime"; // Copyright 2022 The Parca Authors
|
|
9
8
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
9
|
// you may not use this file except in compliance with the License.
|
|
11
10
|
// You may obtain a copy of the License at
|
|
@@ -17,8 +16,6 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
17
16
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
17
|
// See the License for the specific language governing permissions and
|
|
19
18
|
// limitations under the License.
|
|
20
|
-
|
|
21
|
-
import { useMemo } from 'react';
|
|
22
19
|
import { Select } from '@parca/components';
|
|
23
20
|
import { TEST_IDS, testId } from '@parca/test-utils';
|
|
24
21
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -153,7 +150,7 @@ export var normalizeProfileTypesData = function normalizeProfileTypesData(types)
|
|
|
153
150
|
});
|
|
154
151
|
};
|
|
155
152
|
var ProfileTypeSelector = function ProfileTypeSelector(t0) {
|
|
156
|
-
var $ = _c(
|
|
153
|
+
var $ = _c(14);
|
|
157
154
|
var profileTypesData = t0.profileTypesData,
|
|
158
155
|
t1 = t0.loading,
|
|
159
156
|
error = t0.error,
|
|
@@ -164,57 +161,41 @@ var ProfileTypeSelector = function ProfileTypeSelector(t0) {
|
|
|
164
161
|
var loading = t1 === undefined ? false : t1;
|
|
165
162
|
var flexibleKnownProfilesDetection = t2 === undefined ? false : t2;
|
|
166
163
|
var t3;
|
|
167
|
-
if ($[0] !== error || $[1] !== profileTypesData) {
|
|
168
|
-
|
|
169
|
-
$[0] = error;
|
|
170
|
-
$[1] = profileTypesData;
|
|
171
|
-
$[2] = t3;
|
|
172
|
-
} else {
|
|
173
|
-
t3 = $[2];
|
|
174
|
-
}
|
|
175
|
-
var profileNames = t3;
|
|
176
|
-
var t4;
|
|
177
|
-
if ($[3] !== profileNames || $[4] !== selectedKey) {
|
|
178
|
-
t4 = profileNames.length > 0 ? profileNames : selectedKey != null ? [selectedKey] : [];
|
|
179
|
-
$[3] = profileNames;
|
|
180
|
-
$[4] = selectedKey;
|
|
181
|
-
$[5] = t4;
|
|
182
|
-
} else {
|
|
183
|
-
t4 = $[5];
|
|
184
|
-
}
|
|
185
|
-
var t5;
|
|
186
|
-
if ($[6] !== flexibleKnownProfilesDetection || $[7] !== t4) {
|
|
164
|
+
if ($[0] !== error || $[1] !== flexibleKnownProfilesDetection || $[2] !== profileTypesData || $[3] !== selectedKey) {
|
|
165
|
+
var profileNames = (error === undefined || error == null) && profileTypesData !== undefined && profileTypesData != null ? normalizeProfileTypesData(profileTypesData.types) : [];
|
|
187
166
|
var _t;
|
|
188
|
-
if ($[
|
|
167
|
+
if ($[5] !== flexibleKnownProfilesDetection) {
|
|
189
168
|
_t = function _t(name) {
|
|
190
169
|
return {
|
|
191
170
|
key: name,
|
|
192
171
|
element: profileSelectElement(name, flexibleKnownProfilesDetection)
|
|
193
172
|
};
|
|
194
173
|
};
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
174
|
+
$[5] = flexibleKnownProfilesDetection;
|
|
175
|
+
$[6] = _t;
|
|
197
176
|
} else {
|
|
198
|
-
_t = $[
|
|
177
|
+
_t = $[6];
|
|
199
178
|
}
|
|
200
|
-
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
179
|
+
t3 = (profileNames.length > 0 ? profileNames : selectedKey != null ? [selectedKey] : []).map(_t);
|
|
180
|
+
$[0] = error;
|
|
181
|
+
$[1] = flexibleKnownProfilesDetection;
|
|
182
|
+
$[2] = profileTypesData;
|
|
183
|
+
$[3] = selectedKey;
|
|
184
|
+
$[4] = t3;
|
|
204
185
|
} else {
|
|
205
|
-
|
|
186
|
+
t3 = $[4];
|
|
206
187
|
}
|
|
207
|
-
var profileLabels =
|
|
208
|
-
var
|
|
209
|
-
if ($[
|
|
210
|
-
|
|
211
|
-
$[
|
|
188
|
+
var profileLabels = t3;
|
|
189
|
+
var t4;
|
|
190
|
+
if ($[7] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
191
|
+
t4 = testId(TEST_IDS.PROFILE_TYPE_SELECTOR);
|
|
192
|
+
$[7] = t4;
|
|
212
193
|
} else {
|
|
213
|
-
|
|
194
|
+
t4 = $[7];
|
|
214
195
|
}
|
|
215
|
-
var
|
|
216
|
-
if ($[
|
|
217
|
-
|
|
196
|
+
var t5;
|
|
197
|
+
if ($[8] !== disabled || $[9] !== loading || $[10] !== onSelection || $[11] !== profileLabels || $[12] !== selectedKey) {
|
|
198
|
+
t5 = /*#__PURE__*/_jsx(Select, _objectSpread({
|
|
218
199
|
items: profileLabels,
|
|
219
200
|
selectedKey: selectedKey,
|
|
220
201
|
onSelection: onSelection,
|
|
@@ -222,16 +203,16 @@ var ProfileTypeSelector = function ProfileTypeSelector(t0) {
|
|
|
222
203
|
loading: loading,
|
|
223
204
|
className: "bg-white h-profile-type-dropdown",
|
|
224
205
|
disabled: disabled
|
|
225
|
-
},
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
206
|
+
}, t4));
|
|
207
|
+
$[8] = disabled;
|
|
208
|
+
$[9] = loading;
|
|
209
|
+
$[10] = onSelection;
|
|
210
|
+
$[11] = profileLabels;
|
|
211
|
+
$[12] = selectedKey;
|
|
212
|
+
$[13] = t5;
|
|
232
213
|
} else {
|
|
233
|
-
|
|
214
|
+
t5 = $[13];
|
|
234
215
|
}
|
|
235
|
-
return
|
|
216
|
+
return t5;
|
|
236
217
|
};
|
|
237
218
|
export default ProfileTypeSelector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,oCAA0C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OA6FrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -18,7 +18,7 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
18
18
|
// See the License for the specific language governing permissions and
|
|
19
19
|
// limitations under the License.
|
|
20
20
|
|
|
21
|
-
import React
|
|
21
|
+
import React from 'react';
|
|
22
22
|
import { Icon } from '@iconify/react';
|
|
23
23
|
import cx from 'classnames';
|
|
24
24
|
import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@parca/hooks';
|
|
@@ -29,7 +29,7 @@ import { useColorBy } from '../../hooks/useColorBy';
|
|
|
29
29
|
import { useProfileFilters } from './ProfileFilters/useProfileFilters';
|
|
30
30
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
31
|
var ColorStackLegend = function ColorStackLegend(t0) {
|
|
32
|
-
var $ = _c(
|
|
32
|
+
var $ = _c(5);
|
|
33
33
|
var mappings = t0.mappings,
|
|
34
34
|
t1 = t0.compareMode,
|
|
35
35
|
loading = t0.loading;
|
|
@@ -45,144 +45,96 @@ var ColorStackLegend = function ColorStackLegend(t0) {
|
|
|
45
45
|
appliedFilters = _useProfileFilters.appliedFilters,
|
|
46
46
|
removeExcludeBinary = _useProfileFilters.removeExcludeBinary,
|
|
47
47
|
excludeBinary = _useProfileFilters.excludeBinary;
|
|
48
|
-
var
|
|
49
|
-
if ($[0] !== appliedFilters) {
|
|
50
|
-
t2 = (appliedFilters !== null && appliedFilters !== void 0 ? appliedFilters : []).filter(_temp).map(_temp2);
|
|
51
|
-
$[0] = appliedFilters;
|
|
52
|
-
$[1] = t2;
|
|
53
|
-
} else {
|
|
54
|
-
t2 = $[1];
|
|
55
|
-
}
|
|
56
|
-
var currentBinaryFilters = t2;
|
|
48
|
+
var currentBinaryFilters = (appliedFilters !== null && appliedFilters !== void 0 ? appliedFilters : []).filter(_temp).map(_temp2);
|
|
57
49
|
var mappingsList = useMappingList(mappings);
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
t3 = getMappingColors(mappingsList, isDarkMode, currentColorProfile);
|
|
61
|
-
$[2] = currentColorProfile;
|
|
62
|
-
$[3] = isDarkMode;
|
|
63
|
-
$[4] = mappingsList;
|
|
64
|
-
$[5] = t3;
|
|
65
|
-
} else {
|
|
66
|
-
t3 = $[5];
|
|
67
|
-
}
|
|
68
|
-
var colors = t3;
|
|
69
|
-
var mappingColors = colors;
|
|
70
|
-
var t4;
|
|
71
|
-
if ($[6] !== mappingColors) {
|
|
72
|
-
t4 = Object.entries(mappingColors).sort(_temp3);
|
|
73
|
-
$[6] = mappingColors;
|
|
74
|
-
$[7] = t4;
|
|
75
|
-
} else {
|
|
76
|
-
t4 = $[7];
|
|
77
|
-
}
|
|
78
|
-
var stackColorArray = t4;
|
|
50
|
+
var mappingColors = getMappingColors(mappingsList, isDarkMode, currentColorProfile);
|
|
51
|
+
var stackColorArray = Object.entries(mappingColors).sort(_temp3);
|
|
79
52
|
if (stackColorArray.length === 0 && loading === false) {
|
|
80
53
|
var _t;
|
|
81
|
-
if ($[
|
|
54
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
82
55
|
_t = /*#__PURE__*/_jsx(_Fragment, {});
|
|
83
|
-
$[
|
|
56
|
+
$[0] = _t;
|
|
84
57
|
} else {
|
|
85
|
-
_t = $[
|
|
58
|
+
_t = $[0];
|
|
86
59
|
}
|
|
87
60
|
return _t;
|
|
88
61
|
}
|
|
89
62
|
if (Object.entries(mappingColors).length === 0) {
|
|
90
63
|
var _t2;
|
|
91
|
-
if ($[
|
|
64
|
+
if ($[1] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
92
65
|
_t2 = /*#__PURE__*/_jsx(_Fragment, {});
|
|
93
|
-
$[
|
|
66
|
+
$[1] = _t2;
|
|
94
67
|
} else {
|
|
95
|
-
_t2 = $[
|
|
68
|
+
_t2 = $[1];
|
|
96
69
|
}
|
|
97
70
|
return _t2;
|
|
98
71
|
}
|
|
99
72
|
if (colorProfileName === "default" || compareMode) {
|
|
100
73
|
var _t3;
|
|
101
|
-
if ($[
|
|
74
|
+
if ($[2] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
102
75
|
_t3 = /*#__PURE__*/_jsx(_Fragment, {});
|
|
103
|
-
$[
|
|
76
|
+
$[2] = _t3;
|
|
104
77
|
} else {
|
|
105
|
-
_t3 = $[
|
|
78
|
+
_t3 = $[2];
|
|
106
79
|
}
|
|
107
80
|
return _t3;
|
|
108
81
|
}
|
|
109
|
-
var
|
|
110
|
-
|
|
111
|
-
var _t4
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
82
|
+
var t2 = "my-4 flex w-full flex-wrap justify-start column-gap-2";
|
|
83
|
+
var t4 = stackColorArray.map(function (t3) {
|
|
84
|
+
var _t4 = _slicedToArray(t3, 2),
|
|
85
|
+
feature = _t4[0],
|
|
86
|
+
color = _t4[1];
|
|
87
|
+
var filteringAllowed = feature !== EVERYTHING_ELSE;
|
|
88
|
+
var isHighlighted = currentBinaryFilters.includes(feature);
|
|
89
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
90
|
+
className: cx("flex-no-wrap mb-1 flex w-[19.25%] items-center justify-between text-ellipsis p-1", {
|
|
91
|
+
"cursor-pointer": filteringAllowed && colorBy === "binary",
|
|
92
|
+
"bg-gray-200 dark:bg-gray-800": isHighlighted
|
|
93
|
+
}),
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
if (!filteringAllowed || isHighlighted || colorBy !== "binary") {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
removeExcludeBinary(feature);
|
|
99
|
+
},
|
|
100
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
101
|
+
className: "flex w-11/12 items-center justify-start",
|
|
102
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
103
|
+
className: "flex w-5 items-center",
|
|
104
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
105
|
+
className: "mr-1 inline-block h-4 w-4 rounded-[4px]",
|
|
106
|
+
style: {
|
|
107
|
+
backgroundColor: color
|
|
127
108
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
e.stopPropagation();
|
|
151
|
-
}
|
|
152
|
-
})
|
|
153
|
-
})]
|
|
154
|
-
}, feature);
|
|
155
|
-
};
|
|
156
|
-
$[17] = colorBy;
|
|
157
|
-
$[18] = currentBinaryFilters;
|
|
158
|
-
$[19] = excludeBinary;
|
|
159
|
-
$[20] = removeExcludeBinary;
|
|
160
|
-
$[21] = _t4;
|
|
161
|
-
} else {
|
|
162
|
-
_t4 = $[21];
|
|
163
|
-
}
|
|
164
|
-
t5 = stackColorArray.map(_t4);
|
|
165
|
-
$[11] = colorBy;
|
|
166
|
-
$[12] = currentBinaryFilters;
|
|
167
|
-
$[13] = excludeBinary;
|
|
168
|
-
$[14] = removeExcludeBinary;
|
|
169
|
-
$[15] = stackColorArray;
|
|
170
|
-
$[16] = t5;
|
|
171
|
-
} else {
|
|
172
|
-
t5 = $[16];
|
|
173
|
-
}
|
|
174
|
-
var t6;
|
|
175
|
-
if ($[22] !== t5) {
|
|
176
|
-
t6 = /*#__PURE__*/_jsx("div", {
|
|
177
|
-
className: "my-4 flex w-full flex-wrap justify-start column-gap-2",
|
|
178
|
-
children: t5
|
|
109
|
+
})
|
|
110
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
111
|
+
className: "shrink overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:whitespace-normal",
|
|
112
|
+
children: feature
|
|
113
|
+
})]
|
|
114
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
115
|
+
className: "flex w-1/12 justify-end",
|
|
116
|
+
children: isHighlighted && /*#__PURE__*/_jsx(Icon, {
|
|
117
|
+
icon: "radix-icons:cross-circled",
|
|
118
|
+
onClick: function onClick(e) {
|
|
119
|
+
excludeBinary(feature);
|
|
120
|
+
e.stopPropagation();
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
})]
|
|
124
|
+
}, feature);
|
|
125
|
+
});
|
|
126
|
+
var t5;
|
|
127
|
+
if ($[3] !== t4) {
|
|
128
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
129
|
+
className: t2,
|
|
130
|
+
children: t4
|
|
179
131
|
});
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
132
|
+
$[3] = t4;
|
|
133
|
+
$[4] = t5;
|
|
182
134
|
} else {
|
|
183
|
-
|
|
135
|
+
t5 = $[4];
|
|
184
136
|
}
|
|
185
|
-
return
|
|
137
|
+
return t5;
|
|
186
138
|
};
|
|
187
139
|
export default ColorStackLegend;
|
|
188
140
|
function _temp(f) {
|
|
@@ -193,10 +145,10 @@ function _temp2(f_0) {
|
|
|
193
145
|
}
|
|
194
146
|
function _temp3(t0, t1) {
|
|
195
147
|
var _featureA$localeCompa;
|
|
196
|
-
var
|
|
197
|
-
featureA =
|
|
198
|
-
var
|
|
199
|
-
featureB =
|
|
148
|
+
var _t5 = _slicedToArray(t0, 1),
|
|
149
|
+
featureA = _t5[0];
|
|
150
|
+
var _t6 = _slicedToArray(t1, 1),
|
|
151
|
+
featureB = _t6[0];
|
|
200
152
|
if (featureA === EVERYTHING_ELSE) {
|
|
201
153
|
return 1;
|
|
202
154
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ProfileFilters/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ProfileFilters/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAoB,KAAK,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAE1E,eAAO,MAAM,gBAAgB,GAAI,QAAQ,aAAa,KAAG,OASxD,CAAC;AAuJF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,GAAI,eAAoB,mBAAwB,KAAG,GAAG,CAAC,OAsN1E,CAAC;AAEF,eAAe,cAAc,CAAC"}
|