@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.
- package/CHANGELOG.md +4 -0
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +22 -28
- package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +72 -73
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.js +20 -24
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +13 -14
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +6 -5
- package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/index.js +8 -7
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +6 -8
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +48 -55
- package/dist/ProfileSelector/index.d.ts +1 -1
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +216 -210
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
- package/dist/ProfileSelector/useAutoQuerySelector.js +133 -104
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +24 -25
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +3 -5
- package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +47 -47
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +1 -2
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +37 -34
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +282 -294
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +7 -8
- package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.js +1 -1
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +53 -75
- package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +36 -44
- package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +8 -7
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +59 -59
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +37 -22
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +116 -147
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +35 -45
- package/dist/Sandwich/index.d.ts.map +1 -1
- package/dist/Sandwich/index.js +6 -5
- package/dist/SourceView/index.d.ts.map +1 -1
- package/dist/SourceView/index.js +6 -4
- package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
- package/dist/SourceView/useSelectedLineRange.js +52 -76
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +42 -53
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +15 -19
- package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
- package/dist/Table/hooks/useTableConfiguration.js +107 -115
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +16 -16
- package/dist/TopTable/index.d.ts.map +1 -1
- package/dist/TopTable/index.js +112 -127
- package/dist/hooks/urlParsers.d.ts +18 -0
- package/dist/hooks/urlParsers.d.ts.map +1 -0
- package/dist/hooks/urlParsers.js +44 -0
- package/dist/hooks/useColorBy.d.ts +5 -0
- package/dist/hooks/useColorBy.d.ts.map +1 -0
- package/dist/hooks/useColorBy.js +63 -0
- package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
- package/dist/hooks/useCompareModeMeta.js +94 -138
- package/dist/hooks/useDashboardItems.d.ts +5 -0
- package/dist/hooks/useDashboardItems.d.ts.map +1 -0
- package/dist/hooks/useDashboardItems.js +68 -0
- package/dist/hooks/useQueryState.d.ts +4 -4
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +127 -122
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/useSumBy.d.ts +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +2 -2
- package/package.json +4 -3
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +11 -13
- package/src/ProfileExplorer/ProfileExplorerCompare.tsx +11 -9
- package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
- package/src/ProfileFlameChart/index.tsx +21 -28
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +10 -9
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +5 -3
- package/src/ProfileFlameGraph/index.tsx +6 -9
- package/src/ProfileMetricsGraph/index.tsx +6 -8
- package/src/ProfileSelector/MetricsGraphSection.tsx +5 -10
- package/src/ProfileSelector/index.tsx +33 -33
- package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +10 -6
- package/src/ProfileView/components/ColorStackLegend.tsx +2 -4
- package/src/ProfileView/components/InvertCallStack/index.tsx +5 -4
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +94 -192
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +24 -25
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +4 -5
- package/src/ProfileView/components/Toolbars/index.tsx +3 -3
- package/src/ProfileView/components/ViewSelector/index.tsx +9 -16
- package/src/ProfileView/context/DashboardContext.tsx +6 -6
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +6 -4
- package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +24 -26
- package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +16 -8
- package/src/ProfileView/hooks/useVisualizationState.ts +61 -69
- package/src/ProfileViewWithData.tsx +29 -35
- package/src/Sandwich/index.tsx +4 -3
- package/src/SourceView/index.tsx +4 -2
- package/src/SourceView/useSelectedLineRange.ts +34 -19
- package/src/Table/MoreDropdown.tsx +9 -11
- package/src/Table/TableContextMenu.tsx +10 -13
- package/src/Table/hooks/useTableConfiguration.tsx +3 -4
- package/src/Table/index.tsx +12 -21
- package/src/TopTable/index.tsx +3 -4
- package/src/hooks/urlParsers.ts +38 -0
- package/src/hooks/useColorBy.ts +42 -0
- package/src/hooks/useCompareModeMeta.ts +61 -91
- package/src/hooks/useDashboardItems.ts +46 -0
- package/src/hooks/useQueryState.test.tsx +275 -345
- package/src/hooks/useQueryState.ts +153 -120
- package/src/index.tsx +16 -15
- package/src/useSumBy.ts +3 -3
|
@@ -18,95 +18,71 @@ 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 {
|
|
22
|
-
import {
|
|
21
|
+
import { useCallback } from 'react';
|
|
22
|
+
import { createParser, useQueryState } from 'nuqs';
|
|
23
|
+
var lineRangeParser = createParser({
|
|
24
|
+
parse: function parse(value) {
|
|
25
|
+
var _value$split = value.split('-'),
|
|
26
|
+
_value$split2 = _slicedToArray(_value$split, 2),
|
|
27
|
+
start = _value$split2[0],
|
|
28
|
+
end = _value$split2[1];
|
|
29
|
+
var startNum = parseInt(start, 10);
|
|
30
|
+
if (isNaN(startNum)) return null;
|
|
31
|
+
var endNum = end !== undefined ? parseInt(end, 10) : startNum;
|
|
32
|
+
return {
|
|
33
|
+
start: startNum,
|
|
34
|
+
end: isNaN(endNum) ? startNum : endNum
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
serialize: function serialize(value) {
|
|
38
|
+
return "".concat(value.start, "-").concat(value.end);
|
|
39
|
+
}
|
|
40
|
+
}).withOptions({
|
|
41
|
+
history: 'replace'
|
|
42
|
+
});
|
|
23
43
|
var useLineRange = function useLineRange() {
|
|
24
|
-
var $ = _c(
|
|
25
|
-
var _useURLState = useURLState("source_line"),
|
|
26
|
-
_useURLState2 = _slicedToArray(_useURLState, 2),
|
|
27
|
-
sourceLine = _useURLState2[0],
|
|
28
|
-
setSourceLine = _useURLState2[1];
|
|
44
|
+
var $ = _c(7);
|
|
29
45
|
var t0;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
t0 = _t;
|
|
40
|
-
break bb0;
|
|
41
|
-
}
|
|
42
|
-
var _t2;
|
|
43
|
-
if ($[1] !== sourceLine) {
|
|
44
|
-
_t2 = sourceLine.split("-");
|
|
45
|
-
$[1] = sourceLine;
|
|
46
|
-
$[2] = _t2;
|
|
47
|
-
} else {
|
|
48
|
-
_t2 = $[2];
|
|
49
|
-
}
|
|
50
|
-
var _t3 = _t2,
|
|
51
|
-
_t4 = _slicedToArray(_t3, 2),
|
|
52
|
-
start = _t4[0],
|
|
53
|
-
end = _t4[1];
|
|
54
|
-
if (end === undefined) {
|
|
55
|
-
var _t5 = parseInt(start, 10);
|
|
56
|
-
var _t6 = parseInt(start, 10);
|
|
57
|
-
var _t7;
|
|
58
|
-
if ($[3] !== _t5 || $[4] !== _t6) {
|
|
59
|
-
_t7 = [_t5, _t6];
|
|
60
|
-
$[3] = _t5;
|
|
61
|
-
$[4] = _t6;
|
|
62
|
-
$[5] = _t7;
|
|
63
|
-
} else {
|
|
64
|
-
_t7 = $[5];
|
|
65
|
-
}
|
|
66
|
-
t0 = _t7;
|
|
67
|
-
break bb0;
|
|
68
|
-
}
|
|
69
|
-
var _t8 = parseInt(start, 10);
|
|
70
|
-
var t3 = parseInt(end, 10);
|
|
71
|
-
var t4;
|
|
72
|
-
if ($[6] !== _t8 || $[7] !== t3) {
|
|
73
|
-
t4 = [_t8, t3];
|
|
74
|
-
$[6] = _t8;
|
|
75
|
-
$[7] = t3;
|
|
76
|
-
$[8] = t4;
|
|
77
|
-
} else {
|
|
78
|
-
t4 = $[8];
|
|
79
|
-
}
|
|
80
|
-
t0 = t4;
|
|
46
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
47
|
+
t0 = lineRangeParser.withDefault({
|
|
48
|
+
start: -1,
|
|
49
|
+
end: -1
|
|
50
|
+
});
|
|
51
|
+
$[0] = t0;
|
|
52
|
+
} else {
|
|
53
|
+
t0 = $[0];
|
|
81
54
|
}
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
55
|
+
var _useQueryState = useQueryState("source_line", t0),
|
|
56
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
57
|
+
lineRange = _useQueryState2[0],
|
|
58
|
+
setRawLineRange = _useQueryState2[1];
|
|
86
59
|
var t1;
|
|
87
|
-
if ($[
|
|
88
|
-
t1 = function t1(
|
|
89
|
-
|
|
60
|
+
if ($[1] !== setRawLineRange) {
|
|
61
|
+
t1 = function t1(start, end) {
|
|
62
|
+
setRawLineRange({
|
|
63
|
+
start: start,
|
|
64
|
+
end: end
|
|
65
|
+
});
|
|
90
66
|
};
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
67
|
+
$[1] = setRawLineRange;
|
|
68
|
+
$[2] = t1;
|
|
93
69
|
} else {
|
|
94
|
-
t1 = $[
|
|
70
|
+
t1 = $[2];
|
|
95
71
|
}
|
|
96
72
|
var setLineRange = t1;
|
|
97
73
|
var t2;
|
|
98
|
-
if ($[
|
|
74
|
+
if ($[3] !== lineRange.end || $[4] !== lineRange.start || $[5] !== setLineRange) {
|
|
99
75
|
t2 = {
|
|
100
|
-
startLine:
|
|
101
|
-
endLine:
|
|
76
|
+
startLine: lineRange.start,
|
|
77
|
+
endLine: lineRange.end,
|
|
102
78
|
setLineRange: setLineRange
|
|
103
79
|
};
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
80
|
+
$[3] = lineRange.end;
|
|
81
|
+
$[4] = lineRange.start;
|
|
82
|
+
$[5] = setLineRange;
|
|
83
|
+
$[6] = t2;
|
|
108
84
|
} else {
|
|
109
|
-
t2 = $[
|
|
85
|
+
t2 = $[6];
|
|
110
86
|
}
|
|
111
87
|
return t2;
|
|
112
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreDropdown.d.ts","sourceRoot":"","sources":["../../src/Table/MoreDropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MoreDropdown.d.ts","sourceRoot":"","sources":["../../src/Table/MoreDropdown.tsx"],"names":[],"mappings":"AAsBA,QAAA,MAAM,YAAY,GAAI,kBAAgB;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IA0DlF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -24,84 +24,73 @@ import { c as _c } from "react-compiler-runtime";
|
|
|
24
24
|
|
|
25
25
|
import { Menu } from '@headlessui/react';
|
|
26
26
|
import { Icon } from '@iconify/react';
|
|
27
|
-
import {
|
|
27
|
+
import { useQueryState } from 'nuqs';
|
|
28
|
+
import { useParcaContext } from '@parca/components';
|
|
29
|
+
import { stringParam } from '../hooks/urlParsers';
|
|
30
|
+
import { useDashboardItems } from '../hooks/useDashboardItems';
|
|
28
31
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
32
|
var MoreDropdown = function MoreDropdown(t0) {
|
|
30
|
-
var $ = _c(
|
|
33
|
+
var $ = _c(12);
|
|
31
34
|
var functionName = t0.functionName;
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
setSandwichFunctionName =
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
alwaysReturnArray: true
|
|
39
|
-
};
|
|
40
|
-
$[0] = t1;
|
|
41
|
-
} else {
|
|
42
|
-
t1 = $[0];
|
|
43
|
-
}
|
|
44
|
-
var _useURLState3 = useURLState("dashboard_items", t1),
|
|
45
|
-
_useURLState4 = _slicedToArray(_useURLState3, 2),
|
|
46
|
-
dashboardItems = _useURLState4[0],
|
|
47
|
-
setDashboardItems = _useURLState4[1];
|
|
35
|
+
var _useQueryState = useQueryState("sandwich_function_name", stringParam),
|
|
36
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
37
|
+
setSandwichFunctionName = _useQueryState2[1];
|
|
38
|
+
var _useDashboardItems = useDashboardItems(),
|
|
39
|
+
dashboardItems = _useDashboardItems.dashboardItems,
|
|
40
|
+
setDashboardItems = _useDashboardItems.setDashboardItems;
|
|
48
41
|
var _useParcaContext = useParcaContext(),
|
|
49
42
|
enableSandwichView = _useParcaContext.enableSandwichView;
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
setSandwichFunctionName(functionName.trim());
|
|
56
|
-
setDashboardItems([].concat(_toConsumableArray(dashboardItems), ["sandwich"]));
|
|
57
|
-
});
|
|
43
|
+
var t1;
|
|
44
|
+
if ($[0] !== dashboardItems || $[1] !== functionName || $[2] !== setDashboardItems || $[3] !== setSandwichFunctionName) {
|
|
45
|
+
t1 = function t1() {
|
|
46
|
+
setSandwichFunctionName(functionName.trim());
|
|
47
|
+
setDashboardItems([].concat(_toConsumableArray(dashboardItems), ["sandwich"]));
|
|
58
48
|
};
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
$[6] = t2;
|
|
49
|
+
$[0] = dashboardItems;
|
|
50
|
+
$[1] = functionName;
|
|
51
|
+
$[2] = setDashboardItems;
|
|
52
|
+
$[3] = setSandwichFunctionName;
|
|
53
|
+
$[4] = t1;
|
|
65
54
|
} else {
|
|
66
|
-
|
|
55
|
+
t1 = $[4];
|
|
67
56
|
}
|
|
68
|
-
var onSandwichViewSelect =
|
|
57
|
+
var onSandwichViewSelect = t1;
|
|
69
58
|
var menuItems;
|
|
70
|
-
if ($[
|
|
59
|
+
if ($[5] !== enableSandwichView || $[6] !== onSandwichViewSelect) {
|
|
71
60
|
menuItems = [];
|
|
72
61
|
if (enableSandwichView === true) {
|
|
73
62
|
var _t;
|
|
74
|
-
if ($[
|
|
63
|
+
if ($[8] !== onSandwichViewSelect) {
|
|
75
64
|
_t = {
|
|
76
65
|
label: "Show in Sandwich view",
|
|
77
66
|
action: function action() {
|
|
78
67
|
return onSandwichViewSelect();
|
|
79
68
|
}
|
|
80
69
|
};
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
70
|
+
$[8] = onSandwichViewSelect;
|
|
71
|
+
$[9] = _t;
|
|
83
72
|
} else {
|
|
84
|
-
_t = $[
|
|
73
|
+
_t = $[9];
|
|
85
74
|
}
|
|
86
75
|
menuItems.push(_t);
|
|
87
76
|
}
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
77
|
+
$[5] = enableSandwichView;
|
|
78
|
+
$[6] = onSandwichViewSelect;
|
|
79
|
+
$[7] = menuItems;
|
|
91
80
|
} else {
|
|
92
|
-
menuItems = $[
|
|
81
|
+
menuItems = $[7];
|
|
93
82
|
}
|
|
94
83
|
if (menuItems.length === 0) {
|
|
95
84
|
return null;
|
|
96
85
|
}
|
|
97
|
-
var
|
|
98
|
-
if ($[
|
|
99
|
-
|
|
86
|
+
var t2;
|
|
87
|
+
if ($[10] !== menuItems) {
|
|
88
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
100
89
|
className: "relative",
|
|
101
90
|
children: /*#__PURE__*/_jsx(Menu, {
|
|
102
|
-
children: function children(
|
|
103
|
-
var open =
|
|
104
|
-
close =
|
|
91
|
+
children: function children(t3) {
|
|
92
|
+
var open = t3.open,
|
|
93
|
+
close = t3.close;
|
|
105
94
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
106
95
|
children: [/*#__PURE__*/_jsx(Menu.Button, {
|
|
107
96
|
onClick: function onClick() {
|
|
@@ -124,12 +113,12 @@ var MoreDropdown = function MoreDropdown(t0) {
|
|
|
124
113
|
}
|
|
125
114
|
})
|
|
126
115
|
});
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
116
|
+
$[10] = menuItems;
|
|
117
|
+
$[11] = t2;
|
|
129
118
|
} else {
|
|
130
|
-
|
|
119
|
+
t2 = $[11];
|
|
131
120
|
}
|
|
132
|
-
return
|
|
121
|
+
return t2;
|
|
133
122
|
};
|
|
134
123
|
export default MoreDropdown;
|
|
135
124
|
function _temp(item) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableContextMenu.d.ts","sourceRoot":"","sources":["../../src/Table/TableContextMenu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableContextMenu.d.ts","sourceRoot":"","sources":["../../src/Table/TableContextMenu.tsx"],"names":[],"mappings":"AAkBA,OAAO,yCAAyC,CAAC;AAKjD,OAAO,EAAC,KAAK,GAAG,EAAC,MAAM,GAAG,CAAC;AAK3B,OAAO,EAAC,KAAK,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAElD,UAAU,qBAAqB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;CAChD;AAED,QAAA,MAAM,gBAAgB,GAAI,kEAOvB,qBAAqB,KAAG,KAAK,CAAC,GAAG,CAAC,OA6LpC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -23,11 +23,14 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
23
23
|
|
|
24
24
|
import { Icon } from '@iconify/react';
|
|
25
25
|
import cx from 'classnames';
|
|
26
|
+
import { useQueryState } from 'nuqs';
|
|
26
27
|
import { Item, Menu, Submenu } from 'react-contexify';
|
|
27
28
|
import 'react-contexify/dist/ReactContexify.css';
|
|
28
|
-
import { useParcaContext
|
|
29
|
+
import { useParcaContext } from '@parca/components';
|
|
29
30
|
import { valueFormatter } from '@parca/utilities';
|
|
30
31
|
import { getTextForCumulative } from '../ProfileFlameGraph/FlameGraphArrow/utils';
|
|
32
|
+
import { stringParam } from '../hooks/urlParsers';
|
|
33
|
+
import { useDashboardItems } from '../hooks/useDashboardItems';
|
|
31
34
|
import { truncateString } from '../utils';
|
|
32
35
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
36
|
var TableContextMenu = function TableContextMenu(_ref) {
|
|
@@ -38,29 +41,22 @@ var TableContextMenu = function TableContextMenu(_ref) {
|
|
|
38
41
|
total = _ref.total,
|
|
39
42
|
totalUnfiltered = _ref.totalUnfiltered,
|
|
40
43
|
columnVisibility = _ref.columnVisibility;
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
_ =
|
|
44
|
-
setSandwichFunctionName =
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_useURLState4 = _slicedToArray(_useURLState3, 2),
|
|
49
|
-
dashboardItems = _useURLState4[0],
|
|
50
|
-
setDashboardItems = _useURLState4[1];
|
|
44
|
+
var _useQueryState = useQueryState('sandwich_function_name', stringParam),
|
|
45
|
+
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
46
|
+
_ = _useQueryState2[0],
|
|
47
|
+
setSandwichFunctionName = _useQueryState2[1];
|
|
48
|
+
var _useDashboardItems = useDashboardItems(),
|
|
49
|
+
dashboardItems = _useDashboardItems.dashboardItems,
|
|
50
|
+
setDashboardItems = _useDashboardItems.setDashboardItems;
|
|
51
51
|
var _useParcaContext = useParcaContext(),
|
|
52
52
|
enableSandwichView = _useParcaContext.enableSandwichView,
|
|
53
53
|
isDarkMode = _useParcaContext.isDarkMode;
|
|
54
|
-
var batchUpdates = useURLStateBatch();
|
|
55
54
|
var onSandwichViewSelect = function onSandwichViewSelect() {
|
|
56
55
|
if ((row === null || row === void 0 ? void 0 : row.name) != null && row.name.length > 0) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
setDashboardItems([].concat(_toConsumableArray(dashboardItems), ['sandwich']));
|
|
62
|
-
}
|
|
63
|
-
});
|
|
56
|
+
void setSandwichFunctionName(row.name.trim());
|
|
57
|
+
if (!dashboardItems.includes('sandwich')) {
|
|
58
|
+
setDashboardItems([].concat(_toConsumableArray(dashboardItems), ['sandwich']));
|
|
59
|
+
}
|
|
64
60
|
}
|
|
65
61
|
};
|
|
66
62
|
var handleCopyItem = function handleCopyItem(text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableConfiguration.d.ts","sourceRoot":"","sources":["../../../src/Table/hooks/useTableConfiguration.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAqB,KAAK,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAKxE,OAAO,EAAC,KAAK,GAAG,EAAC,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useTableConfiguration.d.ts","sourceRoot":"","sources":["../../../src/Table/hooks/useTableConfiguration.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAqB,KAAK,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAKxE,OAAO,EAAC,KAAK,GAAG,EAAC,MAAM,IAAI,CAAC;AAG5B,OAAO,EAA2B,KAAK,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAE7E,UAAU,0BAA0B;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,kBAAkB;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,cAAc,EAAE,KAAK,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC;IACnD,gBAAgB,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;CAC/C;AAED,wBAAgB,qBAAqB,CAAC,EACpC,IAAS,EACT,KAAK,EACL,QAAQ,EACR,WAAW,GACZ,EAAE,0BAA0B,GAAG,kBAAkB,CAuKjD"}
|