@parca/profile 0.19.140 → 0.19.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/dist/GraphTooltipArrow/Content.js +224 -30
- package/dist/GraphTooltipArrow/DockedGraphTooltip/index.js +192 -33
- package/dist/GraphTooltipArrow/ExpandOnHoverValue.js +53 -3
- package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/index.js +86 -56
- package/dist/GraphTooltipArrow/useGraphTooltip/index.js +37 -37
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +104 -72
- package/dist/MatchersInput/SuggestionItem.js +91 -12
- package/dist/MatchersInput/SuggestionsList.d.ts +2 -1
- package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
- package/dist/MatchersInput/SuggestionsList.js +371 -157
- package/dist/MatchersInput/SuggestionsList.test.d.ts +2 -0
- package/dist/MatchersInput/SuggestionsList.test.d.ts.map +1 -0
- package/dist/MatchersInput/index.js +308 -115
- package/dist/MetricsCircle/index.js +39 -3
- package/dist/MetricsGraph/MetricsContextMenu/index.js +119 -19
- package/dist/MetricsGraph/MetricsInfoPanel/index.js +81 -20
- package/dist/MetricsGraph/MetricsTooltip/index.d.ts.map +1 -1
- package/dist/MetricsGraph/MetricsTooltip/index.js +107 -74
- package/dist/MetricsGraph/index.js +552 -203
- package/dist/MetricsGraph/useMetricsGraphDimensions.js +46 -25
- package/dist/MetricsGraph/utils/colorMapping.js +24 -17
- package/dist/MetricsSeries/index.js +70 -7
- package/dist/PreSelectedMatchers/index.d.ts.map +1 -1
- package/dist/PreSelectedMatchers/index.js +249 -102
- package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +241 -45
- package/dist/ProfileExplorer/ProfileExplorerSingle.js +98 -11
- package/dist/ProfileExplorer/index.js +183 -32
- package/dist/ProfileFlameChart/SamplesStrips/SamplesGraph/index.js +333 -148
- package/dist/ProfileFlameChart/SamplesStrips/SamplesStrips.stories.js +69 -35
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
- package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
- package/dist/ProfileFlameChart/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.js +267 -129
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +288 -89
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.js +56 -20
- package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js +211 -140
- package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.js +133 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/MiniMap.js +261 -216
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +72 -47
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.js +58 -28
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.js +59 -8
- package/dist/ProfileFlameGraph/FlameGraphArrow/index.js +396 -179
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.js +68 -50
- package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.js +62 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.js +14 -6
- package/dist/ProfileFlameGraph/FlameGraphArrow/useScrollViewport.js +124 -82
- package/dist/ProfileFlameGraph/FlameGraphArrow/useVisibleNodes.js +160 -98
- package/dist/ProfileFlameGraph/FlameGraphArrow/useZoom.js +232 -112
- package/dist/ProfileFlameGraph/FlameGraphArrow/utils.js +137 -114
- package/dist/ProfileFlameGraph/benchmarks/benchdata/populateData.js +85 -0
- package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/index.js +324 -150
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +519 -258
- package/dist/ProfileSelector/CompareButton.js +132 -12
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +236 -64
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +727 -141
- package/dist/ProfileSelector/useAutoQuerySelector.js +249 -130
- package/dist/ProfileSource.js +230 -163
- package/dist/ProfileTypeSelector/index.js +214 -125
- package/dist/ProfileView/components/ActionButtons/GroupByDropdown.js +50 -4
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +141 -35
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +185 -55
- package/dist/ProfileView/components/DashboardItems/index.js +87 -28
- package/dist/ProfileView/components/DashboardLayout/index.js +108 -16
- package/dist/ProfileView/components/DiffLegend.js +172 -29
- package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +199 -55
- package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +100 -12
- package/dist/ProfileView/components/ProfileFilters/filterPresets.js +260 -315
- package/dist/ProfileView/components/ProfileFilters/index.js +518 -215
- package/dist/ProfileView/components/ProfileFilters/useProfileFilters.js +370 -306
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +2 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +188 -118
- package/dist/ProfileView/components/ProfileHeader/index.js +105 -11
- package/dist/ProfileView/components/ShareButton/ResultBox.js +119 -16
- package/dist/ProfileView/components/ShareButton/index.js +352 -62
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +678 -194
- package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +199 -157
- 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 +441 -21
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +212 -86
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
- package/dist/ProfileView/components/VisualizationContainer/index.js +52 -7
- package/dist/ProfileView/components/VisualizationPanel.js +185 -8
- package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +85 -29
- package/dist/ProfileView/context/ProfileViewContext.js +56 -15
- package/dist/ProfileView/hooks/useAutoSelectDimension.js +71 -41
- package/dist/ProfileView/hooks/useProfileMetadata.js +50 -18
- package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +32 -12
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +40 -19
- 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 +258 -67
- package/dist/ProfileView/index.js +383 -45
- package/dist/ProfileView/types/visualization.js +1 -13
- package/dist/ProfileView/utils/colorUtils.js +8 -7
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +332 -228
- package/dist/QueryControls/index.js +418 -47
- package/dist/Sandwich/components/CalleesSection.js +54 -4
- package/dist/Sandwich/components/CallersSection.js +97 -27
- package/dist/Sandwich/components/TableSection.js +77 -4
- package/dist/Sandwich/index.d.ts.map +1 -1
- package/dist/Sandwich/index.js +126 -14
- package/dist/Sandwich/utils/processRowData.js +48 -39
- package/dist/SelectWithRefresh/index.js +102 -28
- package/dist/SimpleMatchers/Select.js +520 -187
- package/dist/SimpleMatchers/index.js +590 -288
- package/dist/SourceView/Highlighter.js +230 -70
- package/dist/SourceView/LineNo.js +72 -17
- package/dist/SourceView/index.d.ts.map +1 -1
- package/dist/SourceView/index.js +178 -104
- package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
- package/dist/SourceView/lang-detector/index.js +28 -14
- package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
- package/dist/SourceView/useSelectedLineRange.js +99 -23
- package/dist/Table/ColorCell.js +42 -1
- package/dist/Table/ColumnsVisibility.js +114 -6
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +122 -25
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +151 -137
- package/dist/Table/TableContextMenuWrapper.js +59 -14
- package/dist/Table/hooks/useColorManagement.js +58 -16
- package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
- package/dist/Table/hooks/useTableConfiguration.js +333 -169
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +222 -128
- package/dist/Table/utils/functions.js +169 -144
- package/dist/Table/utils/topAndBottomExpandedRowModel.js +69 -52
- package/dist/TimelineGuide/index.js +209 -16
- package/dist/TopTable/benchmarks/benchdata/populateData.js +91 -0
- package/dist/TopTable/index.d.ts.map +1 -1
- package/dist/TopTable/index.js +342 -123
- package/dist/contexts/LabelsQueryProvider.js +94 -32
- package/dist/contexts/UnifiedLabelsContext.js +114 -49
- package/dist/contexts/utils.js +37 -15
- package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
- package/dist/hooks/useCompareModeMeta.js +158 -64
- package/dist/hooks/useLabels.js +295 -52
- package/dist/hooks/useQueryState.d.ts +3 -3
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +373 -332
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -8
- package/dist/testdata/fg-diff.json +3750 -0
- package/dist/testdata/fg-simple.json +1879 -0
- package/dist/testdata/link_data.json +56 -0
- package/dist/testdata/tabular.json +30 -0
- package/dist/testdata/test_flamegraph.json +26846 -0
- package/dist/testdata/test_graph.json +53 -0
- package/dist/useDelayedLoader.js +32 -18
- package/dist/useGrpcQuery/index.js +71 -11
- package/dist/useHasProfileData.js +90 -12
- package/dist/useQuery.js +205 -64
- package/dist/useSumBy.d.ts +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +294 -138
- package/dist/utils.js +62 -30
- package/package.json +9 -10
- package/src/GraphTooltipArrow/index.tsx +3 -0
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +13 -11
- package/src/MatchersInput/SuggestionsList.test.tsx +70 -0
- package/src/MatchersInput/SuggestionsList.tsx +11 -10
- package/src/MatchersInput/index.tsx +1 -1
- package/src/MetricsGraph/MetricsTooltip/index.tsx +22 -34
- package/src/PreSelectedMatchers/index.tsx +3 -0
- package/src/ProfileExplorer/ProfileExplorerCompare.tsx +9 -4
- package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
- package/src/ProfileFlameChart/index.tsx +28 -21
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +9 -10
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +6 -5
- package/src/ProfileFlameGraph/FlameGraphArrow/TooltipContext.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/ZoomControls.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts +3 -0
- package/src/ProfileFlameGraph/index.tsx +9 -6
- package/src/ProfileMetricsGraph/index.tsx +8 -6
- package/src/ProfileSelector/MetricsGraphSection.tsx +10 -5
- package/src/ProfileSelector/index.tsx +61 -39
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +6 -10
- package/src/ProfileView/components/ColorStackLegend.tsx +4 -2
- package/src/ProfileView/components/InvertCallStack/index.tsx +4 -5
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +192 -94
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +28 -24
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +5 -4
- package/src/ProfileView/components/Toolbars/index.tsx +3 -3
- package/src/ProfileView/components/ViewSelector/index.tsx +16 -9
- package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
- package/src/ProfileView/context/DashboardContext.tsx +6 -6
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +4 -6
- package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +26 -24
- package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +8 -16
- package/src/ProfileView/hooks/useVisualizationState.ts +69 -61
- package/src/ProfileViewWithData.tsx +35 -29
- package/src/Sandwich/index.tsx +3 -4
- package/src/SourceView/index.tsx +2 -4
- package/src/SourceView/useSelectedLineRange.ts +19 -34
- package/src/Table/MoreDropdown.tsx +11 -9
- package/src/Table/TableContextMenu.tsx +13 -10
- package/src/Table/hooks/useTableConfiguration.tsx +11 -16
- package/src/Table/index.tsx +21 -12
- package/src/TopTable/index.tsx +4 -3
- package/src/hooks/useCompareModeMeta.ts +91 -61
- package/src/hooks/useQueryState.test.tsx +345 -275
- package/src/hooks/useQueryState.ts +118 -136
- package/src/index.tsx +15 -16
- package/src/useDelayedLoader.ts +10 -10
- package/src/useSumBy.ts +15 -21
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
- package/dist/hooks/urlParsers.d.ts +0 -18
- package/dist/hooks/urlParsers.d.ts.map +0 -1
- package/dist/hooks/urlParsers.js +0 -32
- package/dist/hooks/useColorBy.d.ts +0 -5
- package/dist/hooks/useColorBy.d.ts.map +0 -1
- package/dist/hooks/useColorBy.js +0 -26
- package/dist/hooks/useDashboardItems.d.ts +0 -5
- package/dist/hooks/useDashboardItems.d.ts.map +0 -1
- package/dist/hooks/useDashboardItems.js +0 -27
- package/dist/hooks/useQueryState.test.js +0 -868
- package/src/hooks/urlParsers.ts +0 -38
- package/src/hooks/useColorBy.ts +0 -42
- package/src/hooks/useDashboardItems.ts +0 -46
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import { c as _c } from "react-compiler-runtime";
|
|
2
8
|
// Copyright 2022 The Parca Authors
|
|
3
9
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
10
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,69 +17,193 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
11
17
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
18
|
// See the License for the specific language governing permissions and
|
|
13
19
|
// limitations under the License.
|
|
14
|
-
|
|
20
|
+
|
|
21
|
+
import React, { useMemo } from 'react';
|
|
15
22
|
import { Icon } from '@iconify/react';
|
|
16
23
|
import cx from 'classnames';
|
|
24
|
+
import { useURLState } from '@parca/components';
|
|
17
25
|
import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@parca/hooks';
|
|
18
26
|
import { EVERYTHING_ELSE, selectDarkMode, useAppSelector } from '@parca/store';
|
|
19
27
|
import { getMappingColors } from '../../ProfileFlameGraph/FlameGraphArrow';
|
|
20
28
|
import useMappingList from '../../ProfileFlameGraph/FlameGraphArrow/useMappingList';
|
|
21
|
-
import { useColorBy } from '../../hooks/useColorBy';
|
|
22
29
|
import { useProfileFilters } from './ProfileFilters/useProfileFilters';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
|
+
var ColorStackLegend = function ColorStackLegend(t0) {
|
|
32
|
+
var $ = _c(24);
|
|
33
|
+
var mappings = t0.mappings,
|
|
34
|
+
t1 = t0.compareMode,
|
|
35
|
+
loading = t0.loading;
|
|
36
|
+
var compareMode = t1 === undefined ? false : t1;
|
|
37
|
+
var isDarkMode = useAppSelector(selectDarkMode);
|
|
38
|
+
var currentColorProfile = useCurrentColorProfile();
|
|
39
|
+
var _useUserPreference = useUserPreference(USER_PREFERENCES.FLAMEGRAPH_COLOR_PROFILE.key),
|
|
40
|
+
_useUserPreference2 = _slicedToArray(_useUserPreference, 1),
|
|
41
|
+
colorProfileName = _useUserPreference2[0];
|
|
42
|
+
var _useURLState = useURLState("color_by"),
|
|
43
|
+
_useURLState2 = _slicedToArray(_useURLState, 1),
|
|
44
|
+
colorByValue = _useURLState2[0];
|
|
45
|
+
var colorBy = colorByValue === "binary" || colorByValue === undefined ? "binary" : "filename";
|
|
46
|
+
var _useProfileFilters = useProfileFilters(),
|
|
47
|
+
appliedFilters = _useProfileFilters.appliedFilters,
|
|
48
|
+
removeExcludeBinary = _useProfileFilters.removeExcludeBinary,
|
|
49
|
+
excludeBinary = _useProfileFilters.excludeBinary;
|
|
50
|
+
var t2;
|
|
51
|
+
if ($[0] !== appliedFilters) {
|
|
52
|
+
t2 = (appliedFilters !== null && appliedFilters !== void 0 ? appliedFilters : []).filter(_temp).map(_temp2);
|
|
53
|
+
$[0] = appliedFilters;
|
|
54
|
+
$[1] = t2;
|
|
55
|
+
} else {
|
|
56
|
+
t2 = $[1];
|
|
57
|
+
}
|
|
58
|
+
var currentBinaryFilters = t2;
|
|
59
|
+
var mappingsList = useMappingList(mappings);
|
|
60
|
+
var t3;
|
|
61
|
+
if ($[2] !== currentColorProfile || $[3] !== isDarkMode || $[4] !== mappingsList) {
|
|
62
|
+
t3 = getMappingColors(mappingsList, isDarkMode, currentColorProfile);
|
|
63
|
+
$[2] = currentColorProfile;
|
|
64
|
+
$[3] = isDarkMode;
|
|
65
|
+
$[4] = mappingsList;
|
|
66
|
+
$[5] = t3;
|
|
67
|
+
} else {
|
|
68
|
+
t3 = $[5];
|
|
69
|
+
}
|
|
70
|
+
var colors = t3;
|
|
71
|
+
var mappingColors = colors;
|
|
72
|
+
var t4;
|
|
73
|
+
if ($[6] !== mappingColors) {
|
|
74
|
+
t4 = Object.entries(mappingColors).sort(_temp3);
|
|
75
|
+
$[6] = mappingColors;
|
|
76
|
+
$[7] = t4;
|
|
77
|
+
} else {
|
|
78
|
+
t4 = $[7];
|
|
79
|
+
}
|
|
80
|
+
var stackColorArray = t4;
|
|
81
|
+
if (stackColorArray.length === 0 && loading === false) {
|
|
82
|
+
var _t;
|
|
83
|
+
if ($[8] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
84
|
+
_t = /*#__PURE__*/_jsx(_Fragment, {});
|
|
85
|
+
$[8] = _t;
|
|
86
|
+
} else {
|
|
87
|
+
_t = $[8];
|
|
88
|
+
}
|
|
89
|
+
return _t;
|
|
90
|
+
}
|
|
91
|
+
if (Object.entries(mappingColors).length === 0) {
|
|
92
|
+
var _t2;
|
|
93
|
+
if ($[9] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
94
|
+
_t2 = /*#__PURE__*/_jsx(_Fragment, {});
|
|
95
|
+
$[9] = _t2;
|
|
96
|
+
} else {
|
|
97
|
+
_t2 = $[9];
|
|
53
98
|
}
|
|
54
|
-
|
|
55
|
-
|
|
99
|
+
return _t2;
|
|
100
|
+
}
|
|
101
|
+
if (colorProfileName === "default" || compareMode) {
|
|
102
|
+
var _t3;
|
|
103
|
+
if ($[10] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
104
|
+
_t3 = /*#__PURE__*/_jsx(_Fragment, {});
|
|
105
|
+
$[10] = _t3;
|
|
106
|
+
} else {
|
|
107
|
+
_t3 = $[10];
|
|
56
108
|
}
|
|
57
|
-
|
|
58
|
-
|
|
109
|
+
return _t3;
|
|
110
|
+
}
|
|
111
|
+
var t5;
|
|
112
|
+
if ($[11] !== colorBy || $[12] !== currentBinaryFilters || $[13] !== excludeBinary || $[14] !== removeExcludeBinary || $[15] !== stackColorArray) {
|
|
113
|
+
var _t4;
|
|
114
|
+
if ($[17] !== colorBy || $[18] !== currentBinaryFilters || $[19] !== excludeBinary || $[20] !== removeExcludeBinary) {
|
|
115
|
+
_t4 = function _t4(t7) {
|
|
116
|
+
var _t5 = _slicedToArray(t7, 2),
|
|
117
|
+
feature = _t5[0],
|
|
118
|
+
color = _t5[1];
|
|
119
|
+
var filteringAllowed = feature !== EVERYTHING_ELSE;
|
|
120
|
+
var isHighlighted = currentBinaryFilters.includes(feature);
|
|
121
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
122
|
+
className: cx("flex-no-wrap mb-1 flex w-[19.25%] items-center justify-between text-ellipsis p-1", {
|
|
123
|
+
"cursor-pointer": filteringAllowed && colorBy === "binary",
|
|
124
|
+
"bg-gray-200 dark:bg-gray-800": isHighlighted
|
|
125
|
+
}),
|
|
126
|
+
onClick: function onClick() {
|
|
127
|
+
if (!filteringAllowed || isHighlighted || colorBy !== "binary") {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
removeExcludeBinary(feature);
|
|
131
|
+
},
|
|
132
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
133
|
+
className: "flex w-11/12 items-center justify-start",
|
|
134
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
135
|
+
className: "flex w-5 items-center",
|
|
136
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
137
|
+
className: "mr-1 inline-block h-4 w-4 rounded-[4px]",
|
|
138
|
+
style: {
|
|
139
|
+
backgroundColor: color
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
143
|
+
className: "shrink overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:whitespace-normal",
|
|
144
|
+
children: feature
|
|
145
|
+
})]
|
|
146
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
147
|
+
className: "flex w-1/12 justify-end",
|
|
148
|
+
children: isHighlighted && /*#__PURE__*/_jsx(Icon, {
|
|
149
|
+
icon: "radix-icons:cross-circled",
|
|
150
|
+
onClick: function onClick(e) {
|
|
151
|
+
excludeBinary(feature);
|
|
152
|
+
e.stopPropagation();
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
})]
|
|
156
|
+
}, feature);
|
|
157
|
+
};
|
|
158
|
+
$[17] = colorBy;
|
|
159
|
+
$[18] = currentBinaryFilters;
|
|
160
|
+
$[19] = excludeBinary;
|
|
161
|
+
$[20] = removeExcludeBinary;
|
|
162
|
+
$[21] = _t4;
|
|
163
|
+
} else {
|
|
164
|
+
_t4 = $[21];
|
|
59
165
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
166
|
+
t5 = stackColorArray.map(_t4);
|
|
167
|
+
$[11] = colorBy;
|
|
168
|
+
$[12] = currentBinaryFilters;
|
|
169
|
+
$[13] = excludeBinary;
|
|
170
|
+
$[14] = removeExcludeBinary;
|
|
171
|
+
$[15] = stackColorArray;
|
|
172
|
+
$[16] = t5;
|
|
173
|
+
} else {
|
|
174
|
+
t5 = $[16];
|
|
175
|
+
}
|
|
176
|
+
var t6;
|
|
177
|
+
if ($[22] !== t5) {
|
|
178
|
+
t6 = /*#__PURE__*/_jsx("div", {
|
|
179
|
+
className: "my-4 flex w-full flex-wrap justify-start column-gap-2",
|
|
180
|
+
children: t5
|
|
181
|
+
});
|
|
182
|
+
$[22] = t5;
|
|
183
|
+
$[23] = t6;
|
|
184
|
+
} else {
|
|
185
|
+
t6 = $[23];
|
|
186
|
+
}
|
|
187
|
+
return t6;
|
|
78
188
|
};
|
|
79
189
|
export default ColorStackLegend;
|
|
190
|
+
function _temp(f) {
|
|
191
|
+
return f.type === "frame" && f.field === "binary";
|
|
192
|
+
}
|
|
193
|
+
function _temp2(f_0) {
|
|
194
|
+
return f_0.value;
|
|
195
|
+
}
|
|
196
|
+
function _temp3(t0, t1) {
|
|
197
|
+
var _featureA$localeCompa;
|
|
198
|
+
var _t6 = _slicedToArray(t0, 1),
|
|
199
|
+
featureA = _t6[0];
|
|
200
|
+
var _t7 = _slicedToArray(t1, 1),
|
|
201
|
+
featureB = _t7[0];
|
|
202
|
+
if (featureA === EVERYTHING_ELSE) {
|
|
203
|
+
return 1;
|
|
204
|
+
}
|
|
205
|
+
if (featureB === EVERYTHING_ELSE) {
|
|
206
|
+
return -1;
|
|
207
|
+
}
|
|
208
|
+
return (_featureA$localeCompa = featureA === null || featureA === void 0 ? void 0 : featureA.localeCompare(featureB !== null && featureB !== void 0 ? featureB : "")) !== null && _featureA$localeCompa !== void 0 ? _featureA$localeCompa : 0;
|
|
209
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
1
|
// Copyright 2022 The Parca Authors
|
|
3
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
3
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,6 +10,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
11
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
11
|
// See the License for the specific language governing permissions and
|
|
13
12
|
// limitations under the License.
|
|
13
|
+
|
|
14
14
|
import { Profiler } from 'react';
|
|
15
15
|
import { ConditionalWrapper } from '@parca/components';
|
|
16
16
|
import ProfileFlameChart from '../../../ProfileFlameChart';
|
|
@@ -18,30 +18,89 @@ import ProfileFlameGraph from '../../../ProfileFlameGraph';
|
|
|
18
18
|
import Sandwich from '../../../Sandwich';
|
|
19
19
|
import { SourceView } from '../../../SourceView';
|
|
20
20
|
import { Table } from '../../../Table';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
21
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
|
+
export var getDashboardItem = function getDashboardItem(_ref) {
|
|
23
|
+
var _perf$onRender, _topTableData$arrow;
|
|
24
|
+
var type = _ref.type,
|
|
25
|
+
isHalfScreen = _ref.isHalfScreen,
|
|
26
|
+
dimensions = _ref.dimensions,
|
|
27
|
+
flamegraphData = _ref.flamegraphData,
|
|
28
|
+
samplesData = _ref.samplesData,
|
|
29
|
+
topTableData = _ref.topTableData,
|
|
30
|
+
sourceData = _ref.sourceData,
|
|
31
|
+
sandwichData = _ref.sandwichData,
|
|
32
|
+
profileSource = _ref.profileSource,
|
|
33
|
+
total = _ref.total,
|
|
34
|
+
filtered = _ref.filtered,
|
|
35
|
+
curPathArrow = _ref.curPathArrow,
|
|
36
|
+
setNewCurPathArrow = _ref.setNewCurPathArrow,
|
|
37
|
+
perf = _ref.perf,
|
|
38
|
+
queryClient = _ref.queryClient,
|
|
39
|
+
onSwitchToFifteenMinutes = _ref.onSwitchToFifteenMinutes;
|
|
40
|
+
switch (type) {
|
|
41
|
+
case 'flamegraph':
|
|
42
|
+
return /*#__PURE__*/_jsx(ConditionalWrapper, {
|
|
43
|
+
condition: (perf === null || perf === void 0 ? void 0 : perf.onRender) != null,
|
|
44
|
+
WrapperComponent: Profiler,
|
|
45
|
+
wrapperProps: {
|
|
46
|
+
id: 'flameGraph',
|
|
47
|
+
onRender: (_perf$onRender = perf === null || perf === void 0 ? void 0 : perf.onRender) !== null && _perf$onRender !== void 0 ? _perf$onRender : function () {}
|
|
48
|
+
},
|
|
49
|
+
children: /*#__PURE__*/_jsx(ProfileFlameGraph, {
|
|
50
|
+
curPathArrow: curPathArrow,
|
|
51
|
+
setNewCurPathArrow: setNewCurPathArrow,
|
|
52
|
+
arrow: flamegraphData === null || flamegraphData === void 0 ? void 0 : flamegraphData.arrow,
|
|
53
|
+
total: total,
|
|
54
|
+
filtered: filtered,
|
|
55
|
+
profileType: profileSource === null || profileSource === void 0 ? void 0 : profileSource.ProfileType(),
|
|
56
|
+
loading: flamegraphData.loading,
|
|
57
|
+
error: flamegraphData.error,
|
|
58
|
+
isHalfScreen: isHalfScreen,
|
|
59
|
+
width: (dimensions === null || dimensions === void 0 ? void 0 : dimensions.width) !== undefined ? isHalfScreen ? (dimensions.width - 54) / 2 : dimensions.width - 16 : 0,
|
|
60
|
+
metadataMappingFiles: flamegraphData.metadataMappingFiles,
|
|
61
|
+
metadataLoading: flamegraphData.metadataLoading,
|
|
62
|
+
profileSource: profileSource
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
case 'flamechart':
|
|
66
|
+
return /*#__PURE__*/_jsx(ProfileFlameChart, {
|
|
67
|
+
samplesData: samplesData,
|
|
68
|
+
queryClient: queryClient,
|
|
69
|
+
profileSource: profileSource,
|
|
70
|
+
width: (dimensions === null || dimensions === void 0 ? void 0 : dimensions.width) !== undefined ? isHalfScreen ? (dimensions.width - 54) / 2 : dimensions.width - 16 : 0,
|
|
71
|
+
total: total,
|
|
72
|
+
filtered: filtered,
|
|
73
|
+
profileType: profileSource === null || profileSource === void 0 ? void 0 : profileSource.ProfileType(),
|
|
74
|
+
isHalfScreen: isHalfScreen,
|
|
75
|
+
metadataMappingFiles: flamegraphData.metadataMappingFiles,
|
|
76
|
+
metadataLoading: flamegraphData.metadataLoading,
|
|
77
|
+
onSwitchToFifteenMinutes: onSwitchToFifteenMinutes
|
|
78
|
+
});
|
|
79
|
+
case 'table':
|
|
80
|
+
return topTableData != null ? /*#__PURE__*/_jsx(Table, {
|
|
81
|
+
error: topTableData.error,
|
|
82
|
+
total: total,
|
|
83
|
+
filtered: filtered,
|
|
84
|
+
loading: topTableData.loading,
|
|
85
|
+
data: (_topTableData$arrow = topTableData.arrow) === null || _topTableData$arrow === void 0 ? void 0 : _topTableData$arrow.record,
|
|
86
|
+
unit: topTableData.unit,
|
|
87
|
+
profileType: profileSource === null || profileSource === void 0 ? void 0 : profileSource.ProfileType(),
|
|
88
|
+
isHalfScreen: isHalfScreen,
|
|
89
|
+
metadataMappingFiles: flamegraphData.metadataMappingFiles
|
|
90
|
+
}) : /*#__PURE__*/_jsx(_Fragment, {});
|
|
91
|
+
case 'sandwich':
|
|
92
|
+
return topTableData != null ? /*#__PURE__*/_jsx(Sandwich, {
|
|
93
|
+
profileSource: profileSource,
|
|
94
|
+
sandwichData: sandwichData
|
|
95
|
+
}) : /*#__PURE__*/_jsx(_Fragment, {});
|
|
96
|
+
case 'source':
|
|
97
|
+
return sourceData != null ? /*#__PURE__*/_jsx(SourceView, {
|
|
98
|
+
loading: sourceData.loading,
|
|
99
|
+
data: sourceData.data,
|
|
100
|
+
total: total,
|
|
101
|
+
filtered: filtered
|
|
102
|
+
}) : /*#__PURE__*/_jsx(_Fragment, {});
|
|
103
|
+
default:
|
|
104
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
105
|
+
}
|
|
106
|
+
};
|
|
@@ -1,20 +1,112 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
import { c as _c } from "react-compiler-runtime"; // Copyright 2022 The Parca Authors
|
|
14
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
// you may not use this file except in compliance with the License.
|
|
16
|
+
// You may obtain a copy of the License at
|
|
17
|
+
//
|
|
18
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
//
|
|
20
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
21
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
22
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23
|
+
// See the License for the specific language governing permissions and
|
|
24
|
+
// limitations under the License.
|
|
2
25
|
import cx from 'classnames';
|
|
3
|
-
import { DragDropContext, Draggable, Droppable
|
|
26
|
+
import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
|
|
4
27
|
import { useDashboard } from '../../context/DashboardContext';
|
|
5
28
|
import { VisualizationContainer } from '../VisualizationContainer';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
29
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
|
+
export var DashboardLayout = function DashboardLayout(t0) {
|
|
31
|
+
var $ = _c(11);
|
|
32
|
+
var getDashboardItemByType = t0.getDashboardItemByType,
|
|
33
|
+
actionButtons = t0.actionButtons;
|
|
34
|
+
var _useDashboard = useDashboard(),
|
|
35
|
+
dashboardItems = _useDashboard.dashboardItems,
|
|
36
|
+
setDashboardItems = _useDashboard.setDashboardItems,
|
|
37
|
+
isMultiPanelView = _useDashboard.isMultiPanelView;
|
|
38
|
+
var t1;
|
|
39
|
+
if ($[0] !== dashboardItems || $[1] !== setDashboardItems) {
|
|
40
|
+
t1 = function t1(result) {
|
|
41
|
+
var destination = result.destination,
|
|
42
|
+
source = result.source,
|
|
43
|
+
draggableId = result.draggableId;
|
|
44
|
+
if (Boolean(destination) && (destination === null || destination === void 0 ? void 0 : destination.index) !== source.index) {
|
|
45
|
+
var targetItem = draggableId;
|
|
46
|
+
var otherItems = dashboardItems.filter(function (item) {
|
|
47
|
+
return item !== targetItem;
|
|
48
|
+
});
|
|
49
|
+
var newDashboardItems = destination.index < source.index ? [targetItem].concat(_toConsumableArray(otherItems)) : [].concat(_toConsumableArray(otherItems), [targetItem]);
|
|
50
|
+
setDashboardItems(newDashboardItems);
|
|
51
|
+
}
|
|
18
52
|
};
|
|
19
|
-
|
|
20
|
-
|
|
53
|
+
$[0] = dashboardItems;
|
|
54
|
+
$[1] = setDashboardItems;
|
|
55
|
+
$[2] = t1;
|
|
56
|
+
} else {
|
|
57
|
+
t1 = $[2];
|
|
58
|
+
}
|
|
59
|
+
var onDragEnd = t1;
|
|
60
|
+
var t2;
|
|
61
|
+
if ($[3] !== actionButtons || $[4] !== dashboardItems || $[5] !== getDashboardItemByType || $[6] !== isMultiPanelView) {
|
|
62
|
+
t2 = /*#__PURE__*/_jsx(Droppable, {
|
|
63
|
+
droppableId: "droppable",
|
|
64
|
+
direction: "horizontal",
|
|
65
|
+
children: function children(provided) {
|
|
66
|
+
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
67
|
+
ref: provided.innerRef,
|
|
68
|
+
className: cx("grid w-full gap-2", isMultiPanelView ? "grid-cols-2 mt-4" : "grid-cols-1")
|
|
69
|
+
}, provided.droppableProps), {}, {
|
|
70
|
+
children: [dashboardItems.map(function (dashboardItem, index) {
|
|
71
|
+
return /*#__PURE__*/_jsx(Draggable, {
|
|
72
|
+
draggableId: dashboardItem,
|
|
73
|
+
index: index,
|
|
74
|
+
isDragDisabled: !isMultiPanelView,
|
|
75
|
+
children: function children(provided_0, snapshot) {
|
|
76
|
+
return /*#__PURE__*/_jsx(VisualizationContainer, {
|
|
77
|
+
provided: provided_0,
|
|
78
|
+
snapshot: snapshot,
|
|
79
|
+
dashboardItem: dashboardItem,
|
|
80
|
+
getDashboardItemByType: getDashboardItemByType,
|
|
81
|
+
isMultiPanelView: isMultiPanelView,
|
|
82
|
+
index: index,
|
|
83
|
+
actionButtons: actionButtons
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}, dashboardItem);
|
|
87
|
+
}), provided.placeholder]
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
$[3] = actionButtons;
|
|
92
|
+
$[4] = dashboardItems;
|
|
93
|
+
$[5] = getDashboardItemByType;
|
|
94
|
+
$[6] = isMultiPanelView;
|
|
95
|
+
$[7] = t2;
|
|
96
|
+
} else {
|
|
97
|
+
t2 = $[7];
|
|
98
|
+
}
|
|
99
|
+
var t3;
|
|
100
|
+
if ($[8] !== onDragEnd || $[9] !== t2) {
|
|
101
|
+
t3 = /*#__PURE__*/_jsx(DragDropContext, {
|
|
102
|
+
onDragEnd: onDragEnd,
|
|
103
|
+
children: t2
|
|
104
|
+
});
|
|
105
|
+
$[8] = onDragEnd;
|
|
106
|
+
$[9] = t2;
|
|
107
|
+
$[10] = t3;
|
|
108
|
+
} else {
|
|
109
|
+
t3 = $[10];
|
|
110
|
+
}
|
|
111
|
+
return t3;
|
|
112
|
+
};
|