@parca/profile 0.19.155 → 0.19.157
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/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +9 -3
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +3 -1
- package/dist/ProfileSelector/index.js +274 -265
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +3 -1
- package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +55 -46
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +282 -255
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +141 -132
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +49 -40
- package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +37 -28
- package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +19 -10
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +122 -98
- package/dist/SourceView/useSelectedLineRange.js +2 -0
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +40 -31
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +3 -1
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +3 -1
- package/dist/hooks/useColorBy.d.ts.map +1 -1
- package/dist/hooks/useColorBy.js +27 -18
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +11 -3
- package/package.json +3 -3
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +12 -3
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +1 -1
- package/src/ProfileSelector/index.tsx +1 -1
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +1 -1
- package/src/ProfileView/components/InvertCallStack/index.tsx +4 -1
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +6 -3
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +4 -1
- package/src/ProfileView/components/ViewSelector/index.tsx +4 -1
- package/src/ProfileView/context/DashboardContext.tsx +4 -1
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +4 -1
- package/src/ProfileView/hooks/useVisualizationState.ts +7 -5
- package/src/SourceView/useSelectedLineRange.ts +1 -1
- package/src/Table/MoreDropdown.tsx +4 -1
- package/src/Table/TableContextMenu.tsx +4 -1
- package/src/Table/index.tsx +4 -1
- package/src/hooks/useColorBy.ts +4 -1
- package/src/hooks/useQueryState.ts +29 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableColumnsDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAS1C,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,oBAAoB,GAAI,kCAAgC,KAAK,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"TableColumnsDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAS1C,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,oBAAoB,GAAI,kCAAgC,KAAK,KAAG,GAAG,CAAC,OA8KzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -34,20 +34,29 @@ import { tableColumnsParser } from '../../../hooks/urlParsers';
|
|
|
34
34
|
import { useProfileViewContext } from '../../context/ProfileViewContext';
|
|
35
35
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
36
|
var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
37
|
-
var $ = _c(
|
|
37
|
+
var $ = _c(64);
|
|
38
38
|
var profileType = t0.profileType,
|
|
39
39
|
total = t0.total,
|
|
40
40
|
filtered = t0.filtered;
|
|
41
41
|
var _useProfileViewContex = useProfileViewContext(),
|
|
42
42
|
compareMode = _useProfileViewContex.compareMode;
|
|
43
|
-
var
|
|
43
|
+
var t1;
|
|
44
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
45
|
+
t1 = tableColumnsParser.withOptions({
|
|
46
|
+
history: "push"
|
|
47
|
+
});
|
|
48
|
+
$[0] = t1;
|
|
49
|
+
} else {
|
|
50
|
+
t1 = $[0];
|
|
51
|
+
}
|
|
52
|
+
var _useQueryState = useQueryState("table_columns", t1),
|
|
44
53
|
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
45
54
|
tableColumns = _useQueryState2[0],
|
|
46
55
|
setTableColumns = _useQueryState2[1];
|
|
47
|
-
var t1;
|
|
48
56
|
var t10;
|
|
49
57
|
var t11;
|
|
50
58
|
var t12;
|
|
59
|
+
var t13;
|
|
51
60
|
var t2;
|
|
52
61
|
var t3;
|
|
53
62
|
var t4;
|
|
@@ -56,21 +65,21 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
56
65
|
var t7;
|
|
57
66
|
var t8;
|
|
58
67
|
var t9;
|
|
59
|
-
if ($[
|
|
68
|
+
if ($[1] !== filtered || $[2] !== (profileType === null || profileType === void 0 ? void 0 : profileType.sampleUnit) || $[3] !== total) {
|
|
60
69
|
var _profileType$sampleUn;
|
|
61
70
|
var columnHelper = createColumnHelper();
|
|
62
71
|
var unit = (_profileType$sampleUn = profileType === null || profileType === void 0 ? void 0 : profileType.sampleUnit) !== null && _profileType$sampleUn !== void 0 ? _profileType$sampleUn : "";
|
|
63
72
|
var _t;
|
|
64
|
-
if ($[
|
|
73
|
+
if ($[16] !== unit) {
|
|
65
74
|
_t = function _t(info) {
|
|
66
75
|
return valueFormatter(info.getValue(), unit, 2);
|
|
67
76
|
};
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
77
|
+
$[16] = unit;
|
|
78
|
+
$[17] = _t;
|
|
70
79
|
} else {
|
|
71
|
-
_t = $[
|
|
80
|
+
_t = $[17];
|
|
72
81
|
}
|
|
73
|
-
|
|
82
|
+
t2 = columnHelper.accessor("flat", {
|
|
74
83
|
id: "flat",
|
|
75
84
|
header: "Flat",
|
|
76
85
|
cell: _t,
|
|
@@ -81,17 +90,17 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
81
90
|
invertSorting: true
|
|
82
91
|
});
|
|
83
92
|
var _t2;
|
|
84
|
-
if ($[
|
|
93
|
+
if ($[18] !== filtered || $[19] !== total) {
|
|
85
94
|
_t2 = function _t2(info_0) {
|
|
86
95
|
return getRatioString(info_0.getValue(), total, filtered);
|
|
87
96
|
};
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
97
|
+
$[18] = filtered;
|
|
98
|
+
$[19] = total;
|
|
99
|
+
$[20] = _t2;
|
|
91
100
|
} else {
|
|
92
|
-
_t2 = $[
|
|
101
|
+
_t2 = $[20];
|
|
93
102
|
}
|
|
94
|
-
|
|
103
|
+
t3 = columnHelper.accessor("flat", {
|
|
95
104
|
id: "flatPercentage",
|
|
96
105
|
header: "Flat (%)",
|
|
97
106
|
cell: _t2,
|
|
@@ -102,16 +111,16 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
102
111
|
invertSorting: true
|
|
103
112
|
});
|
|
104
113
|
var _t3;
|
|
105
|
-
if ($[
|
|
114
|
+
if ($[21] !== unit) {
|
|
106
115
|
_t3 = function _t3(info_1) {
|
|
107
116
|
return addPlusSign(valueFormatter(info_1.getValue(), unit, 2));
|
|
108
117
|
};
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
118
|
+
$[21] = unit;
|
|
119
|
+
$[22] = _t3;
|
|
111
120
|
} else {
|
|
112
|
-
_t3 = $[
|
|
121
|
+
_t3 = $[22];
|
|
113
122
|
}
|
|
114
|
-
|
|
123
|
+
t4 = columnHelper.accessor("flatDiff", {
|
|
115
124
|
id: "flatDiff",
|
|
116
125
|
header: "Flat Diff",
|
|
117
126
|
cell: _t3,
|
|
@@ -122,17 +131,17 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
122
131
|
invertSorting: true
|
|
123
132
|
});
|
|
124
133
|
var _t4;
|
|
125
|
-
if ($[
|
|
134
|
+
if ($[23] !== filtered || $[24] !== total) {
|
|
126
135
|
_t4 = function _t4(info_2) {
|
|
127
136
|
return getRatioString(info_2.getValue(), total, filtered);
|
|
128
137
|
};
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
138
|
+
$[23] = filtered;
|
|
139
|
+
$[24] = total;
|
|
140
|
+
$[25] = _t4;
|
|
132
141
|
} else {
|
|
133
|
-
_t4 = $[
|
|
142
|
+
_t4 = $[25];
|
|
134
143
|
}
|
|
135
|
-
|
|
144
|
+
t5 = columnHelper.accessor("flatDiff", {
|
|
136
145
|
id: "flatDiffPercentage",
|
|
137
146
|
header: "Flat Diff (%)",
|
|
138
147
|
cell: _t4,
|
|
@@ -143,16 +152,16 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
143
152
|
invertSorting: true
|
|
144
153
|
});
|
|
145
154
|
var _t5;
|
|
146
|
-
if ($[
|
|
155
|
+
if ($[26] !== unit) {
|
|
147
156
|
_t5 = function _t5(info_3) {
|
|
148
157
|
return valueFormatter(info_3.getValue(), unit, 2);
|
|
149
158
|
};
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
159
|
+
$[26] = unit;
|
|
160
|
+
$[27] = _t5;
|
|
152
161
|
} else {
|
|
153
|
-
_t5 = $[
|
|
162
|
+
_t5 = $[27];
|
|
154
163
|
}
|
|
155
|
-
|
|
164
|
+
t6 = columnHelper.accessor("cumulative", {
|
|
156
165
|
id: "cumulative",
|
|
157
166
|
header: "Cumulative",
|
|
158
167
|
cell: _t5,
|
|
@@ -163,17 +172,17 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
163
172
|
invertSorting: true
|
|
164
173
|
});
|
|
165
174
|
var _t6;
|
|
166
|
-
if ($[
|
|
175
|
+
if ($[28] !== filtered || $[29] !== total) {
|
|
167
176
|
_t6 = function _t6(info_4) {
|
|
168
177
|
return getRatioString(info_4.getValue(), total, filtered);
|
|
169
178
|
};
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
179
|
+
$[28] = filtered;
|
|
180
|
+
$[29] = total;
|
|
181
|
+
$[30] = _t6;
|
|
173
182
|
} else {
|
|
174
|
-
_t6 = $[
|
|
183
|
+
_t6 = $[30];
|
|
175
184
|
}
|
|
176
|
-
|
|
185
|
+
t7 = columnHelper.accessor("cumulative", {
|
|
177
186
|
id: "cumulativePercentage",
|
|
178
187
|
header: "Cumulative (%)",
|
|
179
188
|
cell: _t6,
|
|
@@ -184,16 +193,16 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
184
193
|
invertSorting: true
|
|
185
194
|
});
|
|
186
195
|
var _t7;
|
|
187
|
-
if ($[
|
|
196
|
+
if ($[31] !== unit) {
|
|
188
197
|
_t7 = function _t7(info_5) {
|
|
189
198
|
return addPlusSign(valueFormatter(info_5.getValue(), unit, 2));
|
|
190
199
|
};
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
200
|
+
$[31] = unit;
|
|
201
|
+
$[32] = _t7;
|
|
193
202
|
} else {
|
|
194
|
-
_t7 = $[
|
|
203
|
+
_t7 = $[32];
|
|
195
204
|
}
|
|
196
|
-
|
|
205
|
+
t8 = columnHelper.accessor("cumulativeDiff", {
|
|
197
206
|
id: "cumulativeDiff",
|
|
198
207
|
header: "Cumulative Diff",
|
|
199
208
|
cell: _t7,
|
|
@@ -204,17 +213,17 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
204
213
|
invertSorting: true
|
|
205
214
|
});
|
|
206
215
|
var _t8;
|
|
207
|
-
if ($[
|
|
216
|
+
if ($[33] !== filtered || $[34] !== total) {
|
|
208
217
|
_t8 = function _t8(info_6) {
|
|
209
218
|
return getRatioString(info_6.getValue(), total, filtered);
|
|
210
219
|
};
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
220
|
+
$[33] = filtered;
|
|
221
|
+
$[34] = total;
|
|
222
|
+
$[35] = _t8;
|
|
214
223
|
} else {
|
|
215
|
-
_t8 = $[
|
|
224
|
+
_t8 = $[35];
|
|
216
225
|
}
|
|
217
|
-
|
|
226
|
+
t9 = columnHelper.accessor("cumulativeDiff", {
|
|
218
227
|
id: "cumulativeDiffPercentage",
|
|
219
228
|
header: "Cumulative Diff (%)",
|
|
220
229
|
cell: _t8,
|
|
@@ -224,78 +233,78 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
224
233
|
},
|
|
225
234
|
invertSorting: true
|
|
226
235
|
});
|
|
227
|
-
|
|
236
|
+
t10 = columnHelper.accessor("name", {
|
|
228
237
|
id: "name",
|
|
229
238
|
header: "Name",
|
|
230
239
|
cell: _temp
|
|
231
240
|
});
|
|
232
|
-
|
|
241
|
+
t11 = columnHelper.accessor("functionSystemName", {
|
|
233
242
|
id: "functionSystemName",
|
|
234
243
|
header: "Function System Name",
|
|
235
244
|
cell: _temp2
|
|
236
245
|
});
|
|
237
|
-
|
|
246
|
+
t12 = columnHelper.accessor("functionFileName", {
|
|
238
247
|
id: "functionFileName",
|
|
239
248
|
header: "Function File Name",
|
|
240
249
|
cell: _temp3
|
|
241
250
|
});
|
|
242
|
-
|
|
251
|
+
t13 = columnHelper.accessor("mappingFile", {
|
|
243
252
|
id: "mappingFile",
|
|
244
253
|
header: "Mapping File",
|
|
245
254
|
cell: _temp4
|
|
246
255
|
});
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[3] = t1;
|
|
256
|
+
$[1] = filtered;
|
|
257
|
+
$[2] = profileType === null || profileType === void 0 ? void 0 : profileType.sampleUnit;
|
|
258
|
+
$[3] = total;
|
|
251
259
|
$[4] = t10;
|
|
252
260
|
$[5] = t11;
|
|
253
261
|
$[6] = t12;
|
|
254
|
-
$[7] =
|
|
255
|
-
$[8] =
|
|
256
|
-
$[9] =
|
|
257
|
-
$[10] =
|
|
258
|
-
$[11] =
|
|
259
|
-
$[12] =
|
|
260
|
-
$[13] =
|
|
261
|
-
$[14] =
|
|
262
|
+
$[7] = t13;
|
|
263
|
+
$[8] = t2;
|
|
264
|
+
$[9] = t3;
|
|
265
|
+
$[10] = t4;
|
|
266
|
+
$[11] = t5;
|
|
267
|
+
$[12] = t6;
|
|
268
|
+
$[13] = t7;
|
|
269
|
+
$[14] = t8;
|
|
270
|
+
$[15] = t9;
|
|
262
271
|
} else {
|
|
263
|
-
t1 = $[3];
|
|
264
272
|
t10 = $[4];
|
|
265
273
|
t11 = $[5];
|
|
266
274
|
t12 = $[6];
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
+
t13 = $[7];
|
|
276
|
+
t2 = $[8];
|
|
277
|
+
t3 = $[9];
|
|
278
|
+
t4 = $[10];
|
|
279
|
+
t5 = $[11];
|
|
280
|
+
t6 = $[12];
|
|
281
|
+
t7 = $[13];
|
|
282
|
+
t8 = $[14];
|
|
283
|
+
t9 = $[15];
|
|
275
284
|
}
|
|
276
|
-
var
|
|
277
|
-
if ($[
|
|
278
|
-
|
|
279
|
-
$[35] = t1;
|
|
285
|
+
var t14;
|
|
286
|
+
if ($[36] !== t10 || $[37] !== t11 || $[38] !== t12 || $[39] !== t13 || $[40] !== t2 || $[41] !== t3 || $[42] !== t4 || $[43] !== t5 || $[44] !== t6 || $[45] !== t7 || $[46] !== t8 || $[47] !== t9) {
|
|
287
|
+
t14 = [t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13];
|
|
280
288
|
$[36] = t10;
|
|
281
289
|
$[37] = t11;
|
|
282
290
|
$[38] = t12;
|
|
283
|
-
$[39] =
|
|
284
|
-
$[40] =
|
|
285
|
-
$[41] =
|
|
286
|
-
$[42] =
|
|
287
|
-
$[43] =
|
|
288
|
-
$[44] =
|
|
289
|
-
$[45] =
|
|
290
|
-
$[46] =
|
|
291
|
-
$[47] =
|
|
291
|
+
$[39] = t13;
|
|
292
|
+
$[40] = t2;
|
|
293
|
+
$[41] = t3;
|
|
294
|
+
$[42] = t4;
|
|
295
|
+
$[43] = t5;
|
|
296
|
+
$[44] = t6;
|
|
297
|
+
$[45] = t7;
|
|
298
|
+
$[46] = t8;
|
|
299
|
+
$[47] = t9;
|
|
300
|
+
$[48] = t14;
|
|
292
301
|
} else {
|
|
293
|
-
|
|
302
|
+
t14 = $[48];
|
|
294
303
|
}
|
|
295
|
-
var columns =
|
|
296
|
-
var
|
|
297
|
-
if ($[
|
|
298
|
-
|
|
304
|
+
var columns = t14;
|
|
305
|
+
var t15;
|
|
306
|
+
if ($[49] !== compareMode) {
|
|
307
|
+
t15 = function t15() {
|
|
299
308
|
return {
|
|
300
309
|
color: true,
|
|
301
310
|
flat: true,
|
|
@@ -312,19 +321,19 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
312
321
|
mappingFile: false
|
|
313
322
|
};
|
|
314
323
|
};
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
324
|
+
$[49] = compareMode;
|
|
325
|
+
$[50] = t15;
|
|
317
326
|
} else {
|
|
318
|
-
|
|
327
|
+
t15 = $[50];
|
|
319
328
|
}
|
|
320
|
-
var _useState = useState(
|
|
329
|
+
var _useState = useState(t15),
|
|
321
330
|
_useState2 = _slicedToArray(_useState, 2),
|
|
322
331
|
columnVisibility = _useState2[0],
|
|
323
332
|
setColumnVisibility = _useState2[1];
|
|
324
|
-
var t15;
|
|
325
333
|
var t16;
|
|
326
|
-
|
|
327
|
-
|
|
334
|
+
var t17;
|
|
335
|
+
if ($[51] !== tableColumns) {
|
|
336
|
+
t16 = function t16() {
|
|
328
337
|
if (Array.isArray(tableColumns)) {
|
|
329
338
|
setColumnVisibility(function (prevState) {
|
|
330
339
|
var newState = _objectSpread({}, prevState);
|
|
@@ -335,69 +344,69 @@ var TableColumnsDropdown = function TableColumnsDropdown(t0) {
|
|
|
335
344
|
});
|
|
336
345
|
}
|
|
337
346
|
};
|
|
338
|
-
|
|
339
|
-
$[
|
|
340
|
-
$[51] = t15;
|
|
347
|
+
t17 = [tableColumns];
|
|
348
|
+
$[51] = tableColumns;
|
|
341
349
|
$[52] = t16;
|
|
350
|
+
$[53] = t17;
|
|
342
351
|
} else {
|
|
343
|
-
t15 = $[51];
|
|
344
352
|
t16 = $[52];
|
|
353
|
+
t17 = $[53];
|
|
345
354
|
}
|
|
346
|
-
useEffect(
|
|
347
|
-
var
|
|
348
|
-
if ($[
|
|
349
|
-
|
|
355
|
+
useEffect(t16, t17);
|
|
356
|
+
var t18;
|
|
357
|
+
if ($[54] !== columnVisibility || $[55] !== setTableColumns) {
|
|
358
|
+
t18 = function t18(column_0, isVisible) {
|
|
350
359
|
var updatedColumns = _objectSpread(_objectSpread({}, columnVisibility), {}, _defineProperty({}, column_0, isVisible));
|
|
351
360
|
var newTableColumns = Object.keys(updatedColumns).filter(function (col) {
|
|
352
361
|
return updatedColumns[col];
|
|
353
362
|
});
|
|
354
363
|
setTableColumns(newTableColumns);
|
|
355
364
|
};
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
365
|
+
$[54] = columnVisibility;
|
|
366
|
+
$[55] = setTableColumns;
|
|
367
|
+
$[56] = t18;
|
|
359
368
|
} else {
|
|
360
|
-
|
|
369
|
+
t18 = $[56];
|
|
361
370
|
}
|
|
362
|
-
var updateColumnVisibility =
|
|
363
|
-
var
|
|
364
|
-
if ($[
|
|
365
|
-
|
|
371
|
+
var updateColumnVisibility = t18;
|
|
372
|
+
var t19;
|
|
373
|
+
if ($[57] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
374
|
+
t19 = /*#__PURE__*/_jsx("label", {
|
|
366
375
|
className: "text-sm",
|
|
367
376
|
children: "Table Columns"
|
|
368
377
|
});
|
|
369
|
-
$[
|
|
378
|
+
$[57] = t19;
|
|
370
379
|
} else {
|
|
371
|
-
|
|
380
|
+
t19 = $[57];
|
|
372
381
|
}
|
|
373
|
-
var
|
|
374
|
-
if ($[
|
|
375
|
-
|
|
382
|
+
var t20;
|
|
383
|
+
if ($[58] !== updateColumnVisibility) {
|
|
384
|
+
t20 = function t20(id, visible) {
|
|
376
385
|
updateColumnVisibility(id, visible);
|
|
377
386
|
};
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
387
|
+
$[58] = updateColumnVisibility;
|
|
388
|
+
$[59] = t20;
|
|
380
389
|
} else {
|
|
381
|
-
|
|
390
|
+
t20 = $[59];
|
|
382
391
|
}
|
|
383
|
-
var
|
|
384
|
-
if ($[
|
|
385
|
-
|
|
392
|
+
var t21;
|
|
393
|
+
if ($[60] !== columnVisibility || $[61] !== columns || $[62] !== t20) {
|
|
394
|
+
t21 = /*#__PURE__*/_jsxs("div", {
|
|
386
395
|
className: "flex flex-col gap-1",
|
|
387
|
-
children: [
|
|
396
|
+
children: [t19, /*#__PURE__*/_jsx(ColumnsVisibility, {
|
|
388
397
|
columns: columns,
|
|
389
398
|
visibility: columnVisibility,
|
|
390
|
-
setVisibility:
|
|
399
|
+
setVisibility: t20
|
|
391
400
|
})]
|
|
392
401
|
});
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[61] = t19;
|
|
402
|
+
$[60] = columnVisibility;
|
|
403
|
+
$[61] = columns;
|
|
396
404
|
$[62] = t20;
|
|
405
|
+
$[63] = t21;
|
|
397
406
|
} else {
|
|
398
|
-
|
|
407
|
+
t21 = $[63];
|
|
399
408
|
}
|
|
400
|
-
return
|
|
409
|
+
return t21;
|
|
401
410
|
};
|
|
402
411
|
export default TableColumnsDropdown;
|
|
403
412
|
function _temp(info_7) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ViewSelector/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAKrD,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,YAAY,GAAI,mBAAiB,KAAK,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ViewSelector/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAKrD,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,YAAY,GAAI,mBAAiB,KAAK,KAAG,GAAG,CAAC,OAuJlD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -27,32 +27,41 @@ import { useDashboardItems } from '../../../hooks/useDashboardItems';
|
|
|
27
27
|
import Dropdown from './Dropdown';
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
29
|
var ViewSelector = function ViewSelector(t0) {
|
|
30
|
-
var $ = _c(
|
|
30
|
+
var $ = _c(18);
|
|
31
31
|
var profileSource = t0.profileSource;
|
|
32
32
|
var _useDashboardItems = useDashboardItems(),
|
|
33
33
|
dashboardItems = _useDashboardItems.dashboardItems,
|
|
34
34
|
setDashboardItems = _useDashboardItems.setDashboardItems;
|
|
35
|
-
var
|
|
35
|
+
var t1;
|
|
36
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
37
|
+
t1 = stringParam.withOptions({
|
|
38
|
+
history: "replace"
|
|
39
|
+
});
|
|
40
|
+
$[0] = t1;
|
|
41
|
+
} else {
|
|
42
|
+
t1 = $[0];
|
|
43
|
+
}
|
|
44
|
+
var _useQueryState = useQueryState("sandwich_function_name", t1),
|
|
36
45
|
_useQueryState2 = _slicedToArray(_useQueryState, 2),
|
|
37
46
|
setSandwichFunctionName = _useQueryState2[1];
|
|
38
47
|
var _useParcaContext = useParcaContext(),
|
|
39
48
|
enableSourcesView = _useParcaContext.enableSourcesView,
|
|
40
49
|
enableSandwichView = _useParcaContext.enableSandwichView;
|
|
41
|
-
var
|
|
42
|
-
if ($[
|
|
43
|
-
|
|
44
|
-
$[
|
|
45
|
-
$[
|
|
50
|
+
var t2;
|
|
51
|
+
if ($[1] !== dashboardItems) {
|
|
52
|
+
t2 = dashboardItems.includes("flamegraph");
|
|
53
|
+
$[1] = dashboardItems;
|
|
54
|
+
$[2] = t2;
|
|
46
55
|
} else {
|
|
47
|
-
|
|
56
|
+
t2 = $[2];
|
|
48
57
|
}
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
if ($[
|
|
58
|
+
var t3 = !t2;
|
|
59
|
+
var t4;
|
|
60
|
+
if ($[3] !== dashboardItems || $[4] !== enableSandwichView || $[5] !== enableSourcesView || $[6] !== profileSource || $[7] !== setDashboardItems || $[8] !== setSandwichFunctionName || $[9] !== t3) {
|
|
52
61
|
var allItems = [{
|
|
53
62
|
key: "flamegraph",
|
|
54
63
|
label: "Flame Graph",
|
|
55
|
-
canBeSelected:
|
|
64
|
+
canBeSelected: t3
|
|
56
65
|
}, {
|
|
57
66
|
key: "table",
|
|
58
67
|
label: "Table",
|
|
@@ -115,7 +124,7 @@ var ViewSelector = function ViewSelector(t0) {
|
|
|
115
124
|
isDisabled: dashboardItems.length === 1 && dashboardItems.includes("sandwich")
|
|
116
125
|
};
|
|
117
126
|
};
|
|
118
|
-
|
|
127
|
+
t4 = allItems.map(function (item_0) {
|
|
119
128
|
return {
|
|
120
129
|
key: item_0.key,
|
|
121
130
|
disabled: !item_0.canBeSelected,
|
|
@@ -124,21 +133,21 @@ var ViewSelector = function ViewSelector(t0) {
|
|
|
124
133
|
innerAction: getInnerActionForItem(item_0)
|
|
125
134
|
};
|
|
126
135
|
});
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[8] = t2;
|
|
136
|
+
$[3] = dashboardItems;
|
|
137
|
+
$[4] = enableSandwichView;
|
|
138
|
+
$[5] = enableSourcesView;
|
|
139
|
+
$[6] = profileSource;
|
|
140
|
+
$[7] = setDashboardItems;
|
|
141
|
+
$[8] = setSandwichFunctionName;
|
|
134
142
|
$[9] = t3;
|
|
143
|
+
$[10] = t4;
|
|
135
144
|
} else {
|
|
136
|
-
|
|
145
|
+
t4 = $[10];
|
|
137
146
|
}
|
|
138
|
-
var items =
|
|
139
|
-
var
|
|
140
|
-
if ($[
|
|
141
|
-
|
|
147
|
+
var items = t4;
|
|
148
|
+
var t5;
|
|
149
|
+
if ($[11] !== dashboardItems || $[12] !== setDashboardItems) {
|
|
150
|
+
t5 = function t5(value) {
|
|
142
151
|
var isOnlyChart = dashboardItems.length === 1;
|
|
143
152
|
if (isOnlyChart && value === "sandwich") {
|
|
144
153
|
setDashboardItems([].concat(_toConsumableArray(dashboardItems), [value]));
|
|
@@ -151,33 +160,33 @@ var ViewSelector = function ViewSelector(t0) {
|
|
|
151
160
|
var newDashboardItems_0 = [dashboardItems[0], value];
|
|
152
161
|
setDashboardItems(newDashboardItems_0);
|
|
153
162
|
};
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
163
|
+
$[11] = dashboardItems;
|
|
164
|
+
$[12] = setDashboardItems;
|
|
165
|
+
$[13] = t5;
|
|
157
166
|
} else {
|
|
158
|
-
|
|
167
|
+
t5 = $[13];
|
|
159
168
|
}
|
|
160
|
-
var onSelection =
|
|
161
|
-
var
|
|
162
|
-
var
|
|
163
|
-
if ($[
|
|
164
|
-
|
|
169
|
+
var onSelection = t5;
|
|
170
|
+
var t6 = dashboardItems.length >= 2 ? "Multiple" : dashboardItems[0];
|
|
171
|
+
var t7;
|
|
172
|
+
if ($[14] !== items || $[15] !== onSelection || $[16] !== t6) {
|
|
173
|
+
t7 = /*#__PURE__*/_jsx(Dropdown, {
|
|
165
174
|
className: "h-view-selector",
|
|
166
175
|
items: items,
|
|
167
|
-
selectedKey:
|
|
176
|
+
selectedKey: t6,
|
|
168
177
|
onSelection: onSelection,
|
|
169
178
|
placeholder: "Select view type...",
|
|
170
179
|
id: "h-view-selector",
|
|
171
180
|
optionsClassName: "min-w-[260px]"
|
|
172
181
|
});
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[15] = t5;
|
|
182
|
+
$[14] = items;
|
|
183
|
+
$[15] = onSelection;
|
|
176
184
|
$[16] = t6;
|
|
185
|
+
$[17] = t7;
|
|
177
186
|
} else {
|
|
178
|
-
|
|
187
|
+
t7 = $[17];
|
|
179
188
|
}
|
|
180
|
-
return
|
|
189
|
+
return t7;
|
|
181
190
|
};
|
|
182
191
|
export default ViewSelector;
|
|
183
192
|
function _temp(t0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardContext.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/context/DashboardContext.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAMvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"DashboardContext.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/context/DashboardContext.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAMvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD,UAAU,oBAAoB;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAID,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CA+BnD,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,oBAM/B,CAAC"}
|