@parca/profile 0.19.140 → 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 +9 -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.js +94 -68
- 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 +240 -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.js +645 -134
- package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
- package/dist/ProfileFlameChart/index.js +260 -126
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +283 -85
- 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 +71 -45
- 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.js +322 -147
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
- package/dist/ProfileMetricsGraph/index.js +515 -256
- package/dist/ProfileSelector/CompareButton.js +132 -12
- package/dist/ProfileSelector/MetricsGraphSection.js +228 -63
- package/dist/ProfileSelector/index.d.ts +1 -1
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +734 -142
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
- package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
- package/dist/ProfileSelector/useAutoQuerySelector.js +280 -132
- 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.js +137 -32
- package/dist/ProfileView/components/ColorStackLegend.js +182 -54
- 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.js +97 -9
- 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.js +191 -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 +664 -192
- package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +196 -155
- package/dist/ProfileView/components/Toolbars/index.js +441 -21
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
- package/dist/ProfileView/components/ViewSelector/index.js +186 -82
- 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.js +74 -26
- 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.js +31 -10
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +53 -17
- package/dist/ProfileView/hooks/useVisualizationState.js +229 -69
- 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.js +319 -225
- 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.js +125 -12
- 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.js +177 -101
- package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
- package/dist/SourceView/lang-detector/index.js +28 -14
- package/dist/SourceView/useSelectedLineRange.js +72 -20
- package/dist/Table/ColorCell.js +42 -1
- package/dist/Table/ColumnsVisibility.js +114 -6
- package/dist/Table/MoreDropdown.js +107 -21
- package/dist/Table/TableContextMenu.js +144 -134
- 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 +323 -167
- package/dist/Table/index.js +217 -123
- 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.js +325 -121
- package/dist/contexts/LabelsQueryProvider.js +94 -32
- package/dist/contexts/UnifiedLabelsContext.js +114 -49
- package/dist/contexts/utils.js +37 -15
- package/dist/hooks/urlParsers.js +27 -15
- package/dist/hooks/useColorBy.js +47 -10
- package/dist/hooks/useCompareModeMeta.js +112 -62
- package/dist/hooks/useDashboardItems.js +52 -11
- package/dist/hooks/useLabels.js +295 -52
- package/dist/hooks/useQueryState.d.ts +1 -1
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +375 -329
- package/dist/index.js +11 -6
- 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.map +1 -1
- package/dist/useSumBy.js +294 -138
- package/dist/utils.js +62 -30
- package/package.json +9 -9
- package/src/GraphTooltipArrow/index.tsx +3 -0
- 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 -2
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +3 -0
- 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/ProfileSelector/index.tsx +31 -9
- package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +3 -0
- package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
- package/src/Table/hooks/useTableConfiguration.tsx +7 -13
- package/src/hooks/useQueryState.ts +18 -3
- package/src/useDelayedLoader.ts +10 -10
- package/src/useSumBy.ts +12 -18
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
- package/dist/hooks/useQueryState.test.js +0 -868
|
@@ -1,4 +1,16 @@
|
|
|
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";
|
|
2
14
|
// Copyright 2022 The Parca Authors
|
|
3
15
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
16
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,6 +23,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
11
23
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
24
|
// See the License for the specific language governing permissions and
|
|
13
25
|
// limitations under the License.
|
|
26
|
+
|
|
14
27
|
import { useCallback } from 'react';
|
|
15
28
|
import { Icon } from '@iconify/react';
|
|
16
29
|
import cx from 'classnames';
|
|
@@ -19,221 +32,511 @@ import { TEST_IDS, testId } from '@parca/test-utils';
|
|
|
19
32
|
import { useProfileViewContext } from '../../context/ProfileViewContext';
|
|
20
33
|
import { getPresetByKey, getPresetsForProfileType, isPresetKey } from './filterPresets';
|
|
21
34
|
import { useProfileFilters } from './useProfileFilters';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
|
+
export var isFilterComplete = function isFilterComplete(filter) {
|
|
37
|
+
// For preset filters, only need type and value
|
|
38
|
+
if (filter.type != null && isPresetKey(filter.type)) {
|
|
39
|
+
return filter.value !== '' && filter.type != null;
|
|
40
|
+
}
|
|
41
|
+
// For regular filters, need all fields
|
|
42
|
+
return filter.value !== '' && filter.type != null && filter.field != null && filter.matchType != null;
|
|
43
|
+
};
|
|
44
|
+
var getFilterTypeItems = function getFilterTypeItems(currentProfileType) {
|
|
45
|
+
return [{
|
|
46
|
+
key: 'stack',
|
|
47
|
+
element: {
|
|
48
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
49
|
+
children: "Stack Filter"
|
|
50
|
+
}),
|
|
51
|
+
expanded: /*#__PURE__*/_jsxs(_Fragment, {
|
|
52
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
53
|
+
children: "Stack Filter"
|
|
54
|
+
}), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx("span", {
|
|
55
|
+
className: "text-xs",
|
|
56
|
+
children: "Filters entire call stacks"
|
|
57
|
+
})]
|
|
58
|
+
})
|
|
26
59
|
}
|
|
27
|
-
|
|
28
|
-
|
|
60
|
+
}, {
|
|
61
|
+
key: 'frame',
|
|
62
|
+
element: {
|
|
63
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
64
|
+
children: "Frame Filter"
|
|
65
|
+
}),
|
|
66
|
+
expanded: /*#__PURE__*/_jsxs(_Fragment, {
|
|
67
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
68
|
+
children: "Frame Filter"
|
|
69
|
+
}), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx("span", {
|
|
70
|
+
className: "text-xs",
|
|
71
|
+
children: "Filters individual frames"
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
}].concat(_toConsumableArray(getPresetsForProfileType(currentProfileType).map(function (preset) {
|
|
76
|
+
return {
|
|
77
|
+
key: preset.key,
|
|
78
|
+
element: {
|
|
79
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
80
|
+
children: preset.name
|
|
81
|
+
}),
|
|
82
|
+
expanded: /*#__PURE__*/_jsxs(_Fragment, {
|
|
83
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
84
|
+
children: preset.name
|
|
85
|
+
}), /*#__PURE__*/_jsx("br", {}), /*#__PURE__*/_jsx("span", {
|
|
86
|
+
className: "text-xs",
|
|
87
|
+
children: preset.description
|
|
88
|
+
})]
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
})));
|
|
29
93
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
94
|
+
var fieldItems = [{
|
|
95
|
+
key: 'function_name',
|
|
96
|
+
element: {
|
|
97
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
98
|
+
children: "Function"
|
|
99
|
+
}),
|
|
100
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
101
|
+
children: "Function Name"
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
key: 'binary',
|
|
106
|
+
element: {
|
|
107
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
108
|
+
children: "Binary"
|
|
109
|
+
}),
|
|
110
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
111
|
+
children: "Binary/Executable Name"
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
key: 'system_name',
|
|
116
|
+
element: {
|
|
117
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
118
|
+
children: "System Name"
|
|
119
|
+
}),
|
|
120
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
121
|
+
children: "System Name"
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
key: 'filename',
|
|
126
|
+
element: {
|
|
127
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
128
|
+
children: "Filename"
|
|
129
|
+
}),
|
|
130
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
131
|
+
children: "Source Filename"
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
}, {
|
|
135
|
+
key: 'address',
|
|
136
|
+
element: {
|
|
137
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
138
|
+
children: "Address"
|
|
139
|
+
}),
|
|
140
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
141
|
+
children: "Memory Address"
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
}, {
|
|
145
|
+
key: 'line_number',
|
|
146
|
+
element: {
|
|
147
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
148
|
+
children: "Line Number"
|
|
149
|
+
}),
|
|
150
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
151
|
+
children: "Source Line Number"
|
|
152
|
+
})
|
|
153
|
+
}
|
|
154
|
+
}];
|
|
155
|
+
var stringMatchTypeItems = [{
|
|
156
|
+
key: 'equal',
|
|
157
|
+
element: {
|
|
158
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
159
|
+
children: "Equals"
|
|
160
|
+
}),
|
|
161
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
162
|
+
children: "Equals"
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
key: 'not_equal',
|
|
167
|
+
element: {
|
|
168
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
169
|
+
children: "Not Equals"
|
|
170
|
+
}),
|
|
171
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
172
|
+
children: "Not Equals"
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
}, {
|
|
176
|
+
key: 'contains',
|
|
177
|
+
element: {
|
|
178
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
179
|
+
children: "Contains"
|
|
180
|
+
}),
|
|
181
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
182
|
+
children: "Contains"
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
}, {
|
|
186
|
+
key: 'not_contains',
|
|
187
|
+
element: {
|
|
188
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
189
|
+
children: "Not Contains"
|
|
190
|
+
}),
|
|
191
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
192
|
+
children: "Not Contains"
|
|
193
|
+
})
|
|
194
|
+
}
|
|
195
|
+
}, {
|
|
196
|
+
key: 'starts_with',
|
|
197
|
+
element: {
|
|
198
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
199
|
+
children: "Starts With"
|
|
200
|
+
}),
|
|
201
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
202
|
+
children: "Starts With"
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
key: 'not_starts_with',
|
|
207
|
+
element: {
|
|
208
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
209
|
+
children: "Not Starts With"
|
|
210
|
+
}),
|
|
211
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
212
|
+
children: "Not Starts With"
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
}];
|
|
216
|
+
var numberMatchTypeItems = [{
|
|
217
|
+
key: 'equal',
|
|
218
|
+
element: {
|
|
219
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
220
|
+
children: "Equals"
|
|
221
|
+
}),
|
|
222
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
223
|
+
children: "Equals"
|
|
224
|
+
})
|
|
225
|
+
}
|
|
226
|
+
}, {
|
|
227
|
+
key: 'not_equal',
|
|
228
|
+
element: {
|
|
229
|
+
active: /*#__PURE__*/_jsx(_Fragment, {
|
|
230
|
+
children: "Not Equals"
|
|
231
|
+
}),
|
|
232
|
+
expanded: /*#__PURE__*/_jsx(_Fragment, {
|
|
233
|
+
children: "Not Equals"
|
|
234
|
+
})
|
|
235
|
+
}
|
|
236
|
+
}];
|
|
237
|
+
var ProfileFilters = function ProfileFilters(t0) {
|
|
238
|
+
var $ = _c(49);
|
|
239
|
+
var t1;
|
|
240
|
+
if ($[0] !== t0) {
|
|
241
|
+
t1 = t0 === undefined ? {} : t0;
|
|
242
|
+
$[0] = t0;
|
|
243
|
+
$[1] = t1;
|
|
244
|
+
} else {
|
|
245
|
+
t1 = $[1];
|
|
246
|
+
}
|
|
247
|
+
var _t = t1,
|
|
248
|
+
t2 = _t.readOnly;
|
|
249
|
+
var readOnly = t2 === undefined ? false : t2;
|
|
250
|
+
var _useProfileViewContex = useProfileViewContext(),
|
|
251
|
+
profileSource = _useProfileViewContex.profileSource;
|
|
252
|
+
var t3;
|
|
253
|
+
if ($[2] !== profileSource) {
|
|
254
|
+
var _profileSource$Profil;
|
|
255
|
+
var currentProfileType = profileSource === null || profileSource === void 0 || (_profileSource$Profil = profileSource.ProfileType()) === null || _profileSource$Profil === void 0 ? void 0 : _profileSource$Profil.toString();
|
|
256
|
+
t3 = getFilterTypeItems(currentProfileType);
|
|
257
|
+
$[2] = profileSource;
|
|
258
|
+
$[3] = t3;
|
|
259
|
+
} else {
|
|
260
|
+
t3 = $[3];
|
|
261
|
+
}
|
|
262
|
+
var filterTypeItems = t3;
|
|
263
|
+
var _useProfileFilters = useProfileFilters(),
|
|
264
|
+
localFilters = _useProfileFilters.localFilters,
|
|
265
|
+
appliedFilters = _useProfileFilters.appliedFilters,
|
|
266
|
+
hasUnsavedChanges = _useProfileFilters.hasUnsavedChanges,
|
|
267
|
+
onApplyFilters = _useProfileFilters.onApplyFilters,
|
|
268
|
+
addFilter = _useProfileFilters.addFilter,
|
|
269
|
+
removeFilter = _useProfileFilters.removeFilter,
|
|
270
|
+
updateFilter = _useProfileFilters.updateFilter,
|
|
271
|
+
resetFilters = _useProfileFilters.resetFilters;
|
|
272
|
+
var t4;
|
|
273
|
+
if ($[4] !== onApplyFilters) {
|
|
274
|
+
t4 = function t4(e) {
|
|
275
|
+
if (e.key === "Enter") {
|
|
276
|
+
e.preventDefault();
|
|
277
|
+
if (e.currentTarget.value.trim() === "") {
|
|
278
|
+
return;
|
|
169
279
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
280
|
+
onApplyFilters();
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
$[4] = onApplyFilters;
|
|
284
|
+
$[5] = t4;
|
|
285
|
+
} else {
|
|
286
|
+
t4 = $[5];
|
|
287
|
+
}
|
|
288
|
+
var handleKeyDown = t4;
|
|
289
|
+
var t5;
|
|
290
|
+
if ($[6] !== appliedFilters || $[7] !== localFilters) {
|
|
291
|
+
t5 = localFilters.length > 0 ? localFilters : appliedFilters !== null && appliedFilters !== void 0 ? appliedFilters : [];
|
|
292
|
+
$[6] = appliedFilters;
|
|
293
|
+
$[7] = localFilters;
|
|
294
|
+
$[8] = t5;
|
|
295
|
+
} else {
|
|
296
|
+
t5 = $[8];
|
|
297
|
+
}
|
|
298
|
+
var filtersToRender = t5;
|
|
299
|
+
var t6;
|
|
300
|
+
if ($[9] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
301
|
+
t6 = testId(TEST_IDS.PROFILE_FILTERS_CONTAINER);
|
|
302
|
+
$[9] = t6;
|
|
303
|
+
} else {
|
|
304
|
+
t6 = $[9];
|
|
305
|
+
}
|
|
306
|
+
var t7;
|
|
307
|
+
if ($[10] !== filterTypeItems || $[11] !== filtersToRender || $[12] !== handleKeyDown || $[13] !== localFilters.length || $[14] !== readOnly || $[15] !== removeFilter || $[16] !== resetFilters || $[17] !== updateFilter) {
|
|
308
|
+
var _t2;
|
|
309
|
+
if ($[19] !== filterTypeItems || $[20] !== filtersToRender.length || $[21] !== handleKeyDown || $[22] !== localFilters.length || $[23] !== readOnly || $[24] !== removeFilter || $[25] !== resetFilters || $[26] !== updateFilter) {
|
|
310
|
+
_t2 = function _t2(filter) {
|
|
311
|
+
var _filter$field2, _filter$matchType2;
|
|
312
|
+
var isNumberField = filter.field === "address" || filter.field === "line_number";
|
|
313
|
+
var matchTypeItems = isNumberField ? numberMatchTypeItems : stringMatchTypeItems;
|
|
314
|
+
var isPresetFilter = filter.type != null && isPresetKey(filter.type);
|
|
315
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
316
|
+
className: "flex items-center gap-0",
|
|
317
|
+
children: [/*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
318
|
+
items: filterTypeItems,
|
|
319
|
+
selectedKey: filter.type,
|
|
320
|
+
placeholder: "Select Filter",
|
|
321
|
+
disabled: readOnly
|
|
322
|
+
}, testId(TEST_IDS.FILTER_TYPE_SELECT)), {}, {
|
|
323
|
+
flyoutTestId: "filter-type-select-flyout",
|
|
324
|
+
onSelection: function onSelection(key) {
|
|
325
|
+
if (isPresetKey(key)) {
|
|
326
|
+
var preset = getPresetByKey(key);
|
|
327
|
+
if (preset != null) {
|
|
328
|
+
updateFilter(filter.id, {
|
|
329
|
+
type: preset.key,
|
|
330
|
+
field: undefined,
|
|
331
|
+
matchType: undefined,
|
|
332
|
+
value: preset.name
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
var newType = key;
|
|
337
|
+
if (filter.type != null && isPresetKey(filter.type)) {
|
|
338
|
+
updateFilter(filter.id, {
|
|
339
|
+
type: newType,
|
|
340
|
+
field: "function_name",
|
|
341
|
+
matchType: "contains",
|
|
342
|
+
value: ""
|
|
343
|
+
});
|
|
344
|
+
} else {
|
|
345
|
+
var _filter$field, _filter$matchType;
|
|
346
|
+
updateFilter(filter.id, {
|
|
347
|
+
type: newType,
|
|
348
|
+
field: (_filter$field = filter.field) !== null && _filter$field !== void 0 ? _filter$field : "function_name",
|
|
349
|
+
matchType: (_filter$matchType = filter.matchType) !== null && _filter$matchType !== void 0 ? _filter$matchType : "contains"
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
className: cx("gap-0 focus:z-50 focus:relative focus:outline-1", readOnly ? "" : "pr-1", readOnly && isPresetFilter ? "rounded-md" : "rounded-l-md rounded-r-none", !readOnly && (isPresetFilter ? "rounded-r-none border-r-0" : "rounded-r-none"), readOnly ? "w-auto" : filter.type != null ? "border-r-0 w-auto" : "w-32"),
|
|
355
|
+
hideCaretDropdown: readOnly
|
|
356
|
+
})), filter.type != null && !isPresetFilter && /*#__PURE__*/_jsxs(_Fragment, {
|
|
357
|
+
children: [/*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
358
|
+
items: fieldItems,
|
|
359
|
+
selectedKey: (_filter$field2 = filter.field) !== null && _filter$field2 !== void 0 ? _filter$field2 : "",
|
|
360
|
+
disabled: readOnly
|
|
361
|
+
}, testId(TEST_IDS.FILTER_FIELD_SELECT)), {}, {
|
|
362
|
+
flyoutTestId: "filter-field-select-flyout",
|
|
363
|
+
onSelection: function onSelection(key_0) {
|
|
364
|
+
var newField = key_0;
|
|
365
|
+
var isNewFieldNumber = newField === "address" || newField === "line_number";
|
|
366
|
+
var isCurrentFieldNumber = filter.field === "address" || filter.field === "line_number";
|
|
367
|
+
if (isNewFieldNumber !== isCurrentFieldNumber) {
|
|
368
|
+
updateFilter(filter.id, {
|
|
369
|
+
field: newField,
|
|
370
|
+
matchType: "equal"
|
|
371
|
+
});
|
|
372
|
+
} else {
|
|
373
|
+
updateFilter(filter.id, {
|
|
374
|
+
field: newField
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
className: cx("rounded-none border-r-0 w-32 gap-0 focus:z-50 focus:relative focus:outline-1", readOnly ? "" : "pr-1"),
|
|
379
|
+
hideCaretDropdown: readOnly
|
|
380
|
+
})), /*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({
|
|
381
|
+
items: matchTypeItems,
|
|
382
|
+
selectedKey: (_filter$matchType2 = filter.matchType) !== null && _filter$matchType2 !== void 0 ? _filter$matchType2 : "",
|
|
383
|
+
disabled: readOnly
|
|
384
|
+
}, testId(TEST_IDS.FILTER_MATCH_TYPE_SELECT)), {}, {
|
|
385
|
+
flyoutTestId: "filter-match-type-select-flyout",
|
|
386
|
+
onSelection: function onSelection(key_1) {
|
|
387
|
+
return updateFilter(filter.id, {
|
|
388
|
+
matchType: key_1
|
|
389
|
+
});
|
|
390
|
+
},
|
|
391
|
+
className: cx("rounded-none border-r-0 gap-0 focus:z-50 focus:relative focus:outline-1", readOnly ? "" : "pr-1"),
|
|
392
|
+
hideCaretDropdown: readOnly
|
|
393
|
+
})), /*#__PURE__*/_jsx(Input, _objectSpread({
|
|
394
|
+
placeholder: "Value",
|
|
395
|
+
value: filter.value,
|
|
396
|
+
disabled: readOnly,
|
|
397
|
+
onChange: function onChange(e_0) {
|
|
398
|
+
return updateFilter(filter.id, {
|
|
399
|
+
value: e_0.target.value
|
|
400
|
+
});
|
|
401
|
+
},
|
|
402
|
+
onKeyDown: handleKeyDown,
|
|
403
|
+
className: "rounded-none w-36 text-sm focus:outline-1"
|
|
404
|
+
}, testId(TEST_IDS.FILTER_VALUE_INPUT)))]
|
|
405
|
+
}), !readOnly && /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
406
|
+
variant: "neutral"
|
|
407
|
+
}, testId(TEST_IDS.FILTER_REMOVE_BUTTON)), {}, {
|
|
408
|
+
onClick: function onClick() {
|
|
409
|
+
if (localFilters.length > 0 && localFilters.length === 1) {
|
|
410
|
+
resetFilters();
|
|
411
|
+
} else {
|
|
412
|
+
if (localFilters.length === 0 && filtersToRender.length === 1) {
|
|
413
|
+
resetFilters();
|
|
414
|
+
} else {
|
|
415
|
+
removeFilter(filter.id);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
className: cx("h-[38px] p-3", filter.type != null ? "rounded-none rounded-r-md" : "rounded-l-none rounded-r-md"),
|
|
420
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
421
|
+
icon: "mdi:close",
|
|
422
|
+
className: "h-4 w-4"
|
|
423
|
+
})
|
|
424
|
+
}))]
|
|
425
|
+
}, filter.id);
|
|
426
|
+
};
|
|
427
|
+
$[19] = filterTypeItems;
|
|
428
|
+
$[20] = filtersToRender.length;
|
|
429
|
+
$[21] = handleKeyDown;
|
|
430
|
+
$[22] = localFilters.length;
|
|
431
|
+
$[23] = readOnly;
|
|
432
|
+
$[24] = removeFilter;
|
|
433
|
+
$[25] = resetFilters;
|
|
434
|
+
$[26] = updateFilter;
|
|
435
|
+
$[27] = _t2;
|
|
436
|
+
} else {
|
|
437
|
+
_t2 = $[27];
|
|
438
|
+
}
|
|
439
|
+
t7 = filtersToRender.map(_t2);
|
|
440
|
+
$[10] = filterTypeItems;
|
|
441
|
+
$[11] = filtersToRender;
|
|
442
|
+
$[12] = handleKeyDown;
|
|
443
|
+
$[13] = localFilters.length;
|
|
444
|
+
$[14] = readOnly;
|
|
445
|
+
$[15] = removeFilter;
|
|
446
|
+
$[16] = resetFilters;
|
|
447
|
+
$[17] = updateFilter;
|
|
448
|
+
$[18] = t7;
|
|
449
|
+
} else {
|
|
450
|
+
t7 = $[18];
|
|
451
|
+
}
|
|
452
|
+
var t8;
|
|
453
|
+
if ($[28] !== addFilter || $[29] !== localFilters.length || $[30] !== readOnly) {
|
|
454
|
+
t8 = !readOnly && localFilters.length > 0 && /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
455
|
+
variant: "neutral",
|
|
456
|
+
onClick: addFilter,
|
|
457
|
+
className: "p-3 h-[38px]"
|
|
458
|
+
}, testId(TEST_IDS.ADD_FILTER_BUTTON)), {}, {
|
|
459
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
460
|
+
icon: "mdi:filter-plus-outline",
|
|
461
|
+
className: "h-4 w-4"
|
|
462
|
+
})
|
|
463
|
+
}));
|
|
464
|
+
$[28] = addFilter;
|
|
465
|
+
$[29] = localFilters.length;
|
|
466
|
+
$[30] = readOnly;
|
|
467
|
+
$[31] = t8;
|
|
468
|
+
} else {
|
|
469
|
+
t8 = $[31];
|
|
470
|
+
}
|
|
471
|
+
var t9;
|
|
472
|
+
if ($[32] !== addFilter || $[33] !== (appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.length) || $[34] !== localFilters.length || $[35] !== readOnly) {
|
|
473
|
+
var _appliedFilters$lengt;
|
|
474
|
+
t9 = !readOnly && localFilters.length === 0 && ((_appliedFilters$lengt = appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.length) !== null && _appliedFilters$lengt !== void 0 ? _appliedFilters$lengt : 0) === 0 && /*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({
|
|
475
|
+
variant: "neutral",
|
|
476
|
+
onClick: addFilter,
|
|
477
|
+
className: "flex items-center gap-2"
|
|
478
|
+
}, testId(TEST_IDS.ADD_FILTER_BUTTON)), {}, {
|
|
479
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
480
|
+
icon: "mdi:filter-outline",
|
|
481
|
+
className: "h-4 w-4"
|
|
482
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
483
|
+
children: "Filter"
|
|
484
|
+
})]
|
|
485
|
+
}));
|
|
486
|
+
$[32] = addFilter;
|
|
487
|
+
$[33] = appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.length;
|
|
488
|
+
$[34] = localFilters.length;
|
|
489
|
+
$[35] = readOnly;
|
|
490
|
+
$[36] = t9;
|
|
491
|
+
} else {
|
|
492
|
+
t9 = $[36];
|
|
493
|
+
}
|
|
494
|
+
var t10;
|
|
495
|
+
if ($[37] !== t7 || $[38] !== t8 || $[39] !== t9) {
|
|
496
|
+
t10 = /*#__PURE__*/_jsxs("div", {
|
|
497
|
+
className: "flex-1 flex flex-wrap gap-2",
|
|
498
|
+
children: [t7, t8, t9]
|
|
499
|
+
});
|
|
500
|
+
$[37] = t7;
|
|
501
|
+
$[38] = t8;
|
|
502
|
+
$[39] = t9;
|
|
503
|
+
$[40] = t10;
|
|
504
|
+
} else {
|
|
505
|
+
t10 = $[40];
|
|
506
|
+
}
|
|
507
|
+
var t11;
|
|
508
|
+
if ($[41] !== hasUnsavedChanges || $[42] !== localFilters || $[43] !== onApplyFilters || $[44] !== readOnly) {
|
|
509
|
+
t11 = !readOnly && localFilters.length > 0 && /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
510
|
+
variant: "primary",
|
|
511
|
+
onClick: onApplyFilters,
|
|
512
|
+
disabled: !hasUnsavedChanges || !localFilters.some(isFilterComplete),
|
|
513
|
+
className: cx("flex items-center gap-2 sticky top-0")
|
|
514
|
+
}, testId(TEST_IDS.APPLY_FILTERS_BUTTON)), {}, {
|
|
515
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
516
|
+
children: "Apply"
|
|
517
|
+
})
|
|
518
|
+
}));
|
|
519
|
+
$[41] = hasUnsavedChanges;
|
|
520
|
+
$[42] = localFilters;
|
|
521
|
+
$[43] = onApplyFilters;
|
|
522
|
+
$[44] = readOnly;
|
|
523
|
+
$[45] = t11;
|
|
524
|
+
} else {
|
|
525
|
+
t11 = $[45];
|
|
526
|
+
}
|
|
527
|
+
var t12;
|
|
528
|
+
if ($[46] !== t10 || $[47] !== t11) {
|
|
529
|
+
t12 = /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
530
|
+
className: "flex gap-2 w-full items-start"
|
|
531
|
+
}, t6), {}, {
|
|
532
|
+
children: [t10, t11]
|
|
533
|
+
}));
|
|
534
|
+
$[46] = t10;
|
|
535
|
+
$[47] = t11;
|
|
536
|
+
$[48] = t12;
|
|
537
|
+
} else {
|
|
538
|
+
t12 = $[48];
|
|
539
|
+
}
|
|
540
|
+
return t12;
|
|
238
541
|
};
|
|
239
|
-
export default ProfileFilters;
|
|
542
|
+
export default ProfileFilters;
|