chrome-devtools-frontend 1.0.1514545 → 1.0.1515796
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/AUTHORS +1 -0
- package/docs/committers_policy.md +1 -1
- package/docs/contributing/infrastructure.md +101 -5
- package/front_end/Images/gdp-logo-dark.png +0 -0
- package/front_end/Images/gdp-logo-light.png +0 -0
- package/front_end/core/common/Settings.ts +11 -32
- package/front_end/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.js +4 -4
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol.ts +10 -1
- package/front_end/global_typings/global_defs.d.ts +15 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +22 -23
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +6 -7
- package/front_end/models/ai_assistance/ai_assistance.ts +3 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +141 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +96 -10
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +123 -55
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +1 -1
- package/front_end/models/extensions/ExtensionPanel.ts +4 -0
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +5 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -7
- package/front_end/models/text_utils/TextUtils.ts +26 -0
- package/front_end/models/trace/Processor.ts +1 -1
- package/front_end/models/trace/helpers/Trace.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +9 -7
- package/front_end/models/trace/types/Configuration.ts +12 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +6 -7
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -2
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +8 -2
- package/front_end/panels/common/BadgeNotification.ts +10 -8
- package/front_end/panels/common/GdpSignUpDialog.ts +25 -16
- package/front_end/panels/common/gdpSignUpDialog.css +10 -14
- package/front_end/panels/console/ConsoleView.ts +4 -0
- package/front_end/panels/elements/ElementsPanel.ts +4 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -4
- package/front_end/panels/network/NetworkConfigView.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +2 -2
- package/front_end/panels/network/components/HeaderSectionRow.ts +2 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +5 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +4 -0
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +7 -29
- package/front_end/panels/profiler/ProfileView.ts +4 -0
- package/front_end/panels/recorder/components/CreateRecordingView.ts +2 -2
- package/front_end/panels/search/SearchView.ts +322 -248
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/settings/components/SyncSection.ts +59 -14
- package/front_end/panels/settings/components/syncSection.css +17 -4
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +4 -7
- package/front_end/panels/sources/SourcesView.ts +4 -0
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +6 -3
- package/front_end/panels/timeline/CountersGraph.ts +5 -5
- package/front_end/panels/timeline/TimelineDetailsView.ts +2 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +4 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +9 -4
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +4 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +6 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +2 -1
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +2 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +6 -6
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +2 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -3
- package/front_end/panels/timeline/utils/utils.ts +0 -8
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/{panels/timeline/utils → services/tracing}/FreshRecording.ts +1 -1
- package/front_end/services/tracing/tracing.ts +2 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +22 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +50 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +21 -5
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +12 -0
- package/front_end/ui/components/text_editor/config.ts +66 -16
- package/front_end/ui/legacy/Dialog.ts +38 -13
- package/front_end/ui/legacy/InspectorView.ts +7 -9
- package/front_end/ui/legacy/ProgressIndicator.ts +4 -5
- package/front_end/ui/legacy/SearchableView.ts +73 -55
- package/front_end/ui/legacy/SettingsUI.ts +5 -5
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -4
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +5 -5
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +1 -4
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +10 -10
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +4 -0
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +4 -0
- package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -4
- package/front_end/ui/legacy/searchableView.css +0 -4
- package/front_end/ui/visual_logging/Debugging.ts +24 -12
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +3 -3
- package/front_end/Images/src/gdp-logo-standalone.svg +0 -9
- /package/front_end/{panels/timeline/utils → models/ai_assistance/performance}/AICallTree.ts +0 -0
- /package/front_end/{panels/timeline/utils → models/ai_assistance/performance}/AIContext.ts +0 -0
- /package/front_end/{panels/timeline/utils/InsightAIContext.ts → models/ai_assistance/performance/AIQueries.ts} +0 -0
@@ -108,69 +108,51 @@ const str_ = i18n.i18n.registerUIStrings('panels/search/SearchView.ts', UIString
|
|
108
108
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
109
109
|
const {ref} = Directives;
|
110
110
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
protected search!: HTMLInputElement;
|
128
|
-
protected matchCaseButton!: Buttons.Button.Button;
|
129
|
-
protected regexButton!: Buttons.Button.Button;
|
130
|
-
private searchMessageElement!: HTMLElement;
|
131
|
-
private searchProgressPlaceholderElement!: HTMLElement;
|
132
|
-
private searchResultsMessageElement!: HTMLElement;
|
133
|
-
private readonly advancedSearchConfig: Common.Settings.Setting<{
|
134
|
-
query: string,
|
135
|
-
ignoreCase: boolean,
|
136
|
-
isRegex: boolean,
|
137
|
-
}>;
|
138
|
-
private searchScope: SearchScope|null;
|
139
|
-
|
140
|
-
// We throttle adding search results, otherwise we trigger DOM layout for each
|
141
|
-
// result added.
|
142
|
-
#throttler: Common.Throttler.Throttler;
|
143
|
-
#pendingSearchResults: SearchResult[] = [];
|
144
|
-
#emptyStartView: UI.EmptyWidget.EmptyWidget;
|
145
|
-
|
146
|
-
constructor(settingKey: string, throttler: Common.Throttler.Throttler) {
|
147
|
-
super({
|
148
|
-
jslog: `${VisualLogging.panel('search').track({resize: true})}`,
|
149
|
-
useShadowDom: true,
|
150
|
-
});
|
151
|
-
this.setMinimumSize(0, 40);
|
111
|
+
interface SearchViewInput {
|
112
|
+
query: string;
|
113
|
+
focusSearchInput: boolean;
|
114
|
+
matchCase: boolean;
|
115
|
+
isRegex: boolean;
|
116
|
+
searchMessage: string;
|
117
|
+
searchResultsMessage: string;
|
118
|
+
onQueryChange: (query: string) => void;
|
119
|
+
onQueryKeyDown: (evt: KeyboardEvent) => void;
|
120
|
+
onPanelKeyDown: (evt: KeyboardEvent) => void;
|
121
|
+
onClearSearchInput: () => void;
|
122
|
+
onToggleRegex: () => void;
|
123
|
+
onToggleMatchCase: () => void;
|
124
|
+
onRefresh: () => void;
|
125
|
+
onClearSearch: () => void;
|
126
|
+
}
|
152
127
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
this.searchResultsCount = 0;
|
158
|
-
this.nonEmptySearchResultsCount = 0;
|
159
|
-
this.searchingView = null;
|
160
|
-
this.notFoundView = null;
|
161
|
-
this.searchConfig = null;
|
162
|
-
this.pendingSearchConfig = null;
|
163
|
-
this.searchResultsPane = null;
|
164
|
-
this.progressIndicator = null;
|
165
|
-
this.visiblePane = null;
|
166
|
-
this.#throttler = throttler;
|
128
|
+
interface SearchViewOutput {
|
129
|
+
searchResultsElement?: HTMLElement;
|
130
|
+
searchProgressPlaceholderElement?: HTMLElement;
|
131
|
+
}
|
167
132
|
|
168
|
-
|
169
|
-
|
170
|
-
|
133
|
+
type View = (input: SearchViewInput, output: SearchViewOutput, target: HTMLElement) => void;
|
134
|
+
|
135
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
136
|
+
const {
|
137
|
+
query,
|
138
|
+
focusSearchInput,
|
139
|
+
matchCase,
|
140
|
+
isRegex,
|
141
|
+
searchMessage,
|
142
|
+
searchResultsMessage,
|
143
|
+
onQueryChange,
|
144
|
+
onQueryKeyDown,
|
145
|
+
onPanelKeyDown,
|
146
|
+
onClearSearchInput,
|
147
|
+
onToggleRegex,
|
148
|
+
onToggleMatchCase,
|
149
|
+
onRefresh,
|
150
|
+
onClearSearch,
|
151
|
+
} = input;
|
152
|
+
// clang-format off
|
153
|
+
render(html`
|
171
154
|
<style>${searchViewStyles}</style>
|
172
|
-
<div class="search-drawer-header" @keydown=${
|
173
|
-
${ref(e => {this.searchPanelElement = e as HTMLElement;})}>
|
155
|
+
<div class="search-drawer-header" @keydown=${onPanelKeyDown}>
|
174
156
|
<div class="search-container">
|
175
157
|
<div class="toolbar-item-search">
|
176
158
|
<devtools-icon name="search"></devtools-icon>
|
@@ -181,10 +163,17 @@ export class SearchView extends UI.Widget.VBox {
|
|
181
163
|
change: true, keydown: 'ArrowUp|ArrowDown|Enter'})}
|
182
164
|
aria-label=${i18nString(UIStrings.find)}
|
183
165
|
size="100" results="0"
|
184
|
-
|
185
|
-
|
166
|
+
.value=${query}
|
167
|
+
@keydown=${onQueryKeyDown}
|
168
|
+
@input=${(e: Event) => onQueryChange((e.target as HTMLInputElement).value)}
|
169
|
+
${ref(e => {
|
170
|
+
if (e instanceof HTMLInputElement && focusSearchInput) {
|
171
|
+
e.focus();
|
172
|
+
e.select();
|
173
|
+
}
|
174
|
+
})}>
|
186
175
|
<devtools-button class="clear-button" tabindex="-1"
|
187
|
-
@click=${
|
176
|
+
@click=${onClearSearchInput}
|
188
177
|
.data=${{
|
189
178
|
variant: Buttons.Button.Variant.ICON,
|
190
179
|
iconName: 'cross-circle-filled',
|
@@ -193,40 +182,40 @@ export class SearchView extends UI.Widget.VBox {
|
|
193
182
|
title: i18nString(UIStrings.clearInput),
|
194
183
|
} as Buttons.Button.ButtonData}
|
195
184
|
></devtools-button>
|
196
|
-
<devtools-button @click=${
|
185
|
+
<devtools-button @click=${onToggleRegex} .data=${{
|
197
186
|
variant: Buttons.Button.Variant.ICON_TOGGLE,
|
198
187
|
iconName: 'regular-expression',
|
199
188
|
toggledIconName: 'regular-expression',
|
200
189
|
toggleType: Buttons.Button.ToggleType.PRIMARY,
|
201
190
|
size: Buttons.Button.Size.SMALL,
|
202
|
-
toggled:
|
203
|
-
title: i18nString(UIStrings.enableRegularExpression),
|
191
|
+
toggled: isRegex,
|
192
|
+
title: isRegex ? i18nString(UIStrings.disableRegularExpression) : i18nString(UIStrings.enableRegularExpression),
|
204
193
|
jslogContext: 'regular-expression',
|
205
194
|
} as Buttons.Button.ButtonData}
|
206
|
-
|
195
|
+
class="regex-button"
|
207
196
|
></devtools-button>
|
208
|
-
<devtools-button @click=${
|
197
|
+
<devtools-button @click=${onToggleMatchCase} .data=${{
|
209
198
|
variant: Buttons.Button.Variant.ICON_TOGGLE,
|
210
199
|
iconName: 'match-case',
|
211
200
|
toggledIconName: 'match-case',
|
212
201
|
toggleType: Buttons.Button.ToggleType.PRIMARY,
|
213
202
|
size: Buttons.Button.Size.SMALL,
|
214
|
-
toggled:
|
215
|
-
title: i18nString(UIStrings.enableCaseSensitive),
|
203
|
+
toggled: matchCase,
|
204
|
+
title: matchCase ? i18nString(UIStrings.disableCaseSensitive) : i18nString(UIStrings.enableCaseSensitive),
|
216
205
|
jslogContext: 'match-case',
|
217
206
|
} as Buttons.Button.ButtonData}
|
218
|
-
|
207
|
+
class="match-case-button"
|
219
208
|
></devtools-button>
|
220
209
|
</div>
|
221
210
|
</div>
|
222
211
|
<devtools-toolbar class="search-toolbar" jslog=${VisualLogging.toolbar()}>
|
223
|
-
<devtools-button title=${i18nString(UIStrings.refresh)} @click=${
|
212
|
+
<devtools-button title=${i18nString(UIStrings.refresh)} @click=${onRefresh}
|
224
213
|
.data=${{
|
225
214
|
variant: Buttons.Button.Variant.TOOLBAR,
|
226
215
|
iconName: 'refresh',
|
227
216
|
jslogContext: 'search.refresh',
|
228
217
|
} as Buttons.Button.ButtonData}></devtools-button>
|
229
|
-
<devtools-button title=${i18nString(UIStrings.clear)} @click=${
|
218
|
+
<devtools-button title=${i18nString(UIStrings.clear)} @click=${onClearSearch}
|
230
219
|
.data=${{
|
231
220
|
variant: Buttons.Button.Variant.TOOLBAR,
|
232
221
|
iconName: 'clear',
|
@@ -234,59 +223,146 @@ export class SearchView extends UI.Widget.VBox {
|
|
234
223
|
} as Buttons.Button.ButtonData}></devtools-button>
|
235
224
|
</devtools-toolbar>
|
236
225
|
</div>
|
237
|
-
<div class="search-results" @keydown=${
|
238
|
-
${ref(e => {
|
226
|
+
<div class="search-results" @keydown=${onPanelKeyDown}
|
227
|
+
${ref(e => {output.searchResultsElement = e as HTMLElement;})}>
|
239
228
|
</div>
|
240
|
-
<div class="search-toolbar-summary" @keydown=${
|
241
|
-
<div class="search-message"
|
242
|
-
<div class="flex-centered" ${ref(e => {
|
229
|
+
<div class="search-toolbar-summary" @keydown=${onPanelKeyDown}>
|
230
|
+
<div class="search-message">${searchMessage}</div>
|
231
|
+
<div class="flex-centered" ${ref(e => {output.searchProgressPlaceholderElement = e as HTMLElement;})}>
|
243
232
|
</div>
|
244
|
-
<div class="search-message"
|
245
|
-
|
246
|
-
|
247
|
-
|
233
|
+
<div class="search-message">${searchResultsMessage}</div>
|
234
|
+
</div>`, target);
|
235
|
+
// clang-format on
|
236
|
+
};
|
237
|
+
|
238
|
+
export class SearchView extends UI.Widget.VBox {
|
239
|
+
readonly #view: View;
|
240
|
+
#focusSearchInput: boolean;
|
241
|
+
#isIndexing: boolean;
|
242
|
+
#searchId: number;
|
243
|
+
#searchMatchesCount: number;
|
244
|
+
#searchResultsCount: number;
|
245
|
+
#nonEmptySearchResultsCount: number;
|
246
|
+
#searchingView: UI.Widget.Widget|null;
|
247
|
+
#notFoundView: UI.Widget.Widget|null;
|
248
|
+
#searchConfig: Workspace.SearchConfig.SearchConfig|null;
|
249
|
+
#pendingSearchConfig: Workspace.SearchConfig.SearchConfig|null;
|
250
|
+
#searchResultsPane: SearchResultsPane|null;
|
251
|
+
#progressIndicator: UI.ProgressIndicator.ProgressIndicator|null;
|
252
|
+
#visiblePane: UI.Widget.Widget|null;
|
253
|
+
#searchResultsElement!: HTMLElement;
|
254
|
+
#query: string;
|
255
|
+
#matchCase = false;
|
256
|
+
#isRegex = false;
|
257
|
+
#searchMessage = '';
|
258
|
+
#searchProgressPlaceholderElement!: HTMLElement;
|
259
|
+
#searchResultsMessage = '';
|
260
|
+
readonly #advancedSearchConfig: Common.Settings.Setting<{
|
261
|
+
query: string,
|
262
|
+
ignoreCase: boolean,
|
263
|
+
isRegex: boolean,
|
264
|
+
}>;
|
265
|
+
#searchScope: SearchScope|null;
|
266
|
+
|
267
|
+
// We throttle adding search results, otherwise we trigger DOM layout for each
|
268
|
+
// result added.
|
269
|
+
#throttler: Common.Throttler.Throttler;
|
270
|
+
#pendingSearchResults: SearchResult[] = [];
|
271
|
+
#emptyStartView: UI.EmptyWidget.EmptyWidget;
|
272
|
+
|
273
|
+
constructor(settingKey: string, throttler: Common.Throttler.Throttler, view = DEFAULT_VIEW) {
|
274
|
+
super({
|
275
|
+
jslog: `${VisualLogging.panel('search').track({resize: true})}`,
|
276
|
+
useShadowDom: true,
|
277
|
+
});
|
278
|
+
this.#view = view;
|
279
|
+
this.setMinimumSize(0, 40);
|
248
280
|
|
249
|
-
this
|
281
|
+
this.#focusSearchInput = false;
|
282
|
+
this.#isIndexing = false;
|
283
|
+
this.#searchId = 1;
|
284
|
+
this.#query = '';
|
285
|
+
this.#searchMatchesCount = 0;
|
286
|
+
this.#searchResultsCount = 0;
|
287
|
+
this.#nonEmptySearchResultsCount = 0;
|
288
|
+
this.#searchingView = null;
|
289
|
+
this.#notFoundView = null;
|
290
|
+
this.#searchConfig = null;
|
291
|
+
this.#pendingSearchConfig = null;
|
292
|
+
this.#searchResultsPane = null;
|
293
|
+
this.#progressIndicator = null;
|
294
|
+
this.#visiblePane = null;
|
295
|
+
this.#throttler = throttler;
|
296
|
+
|
297
|
+
this.#advancedSearchConfig = Common.Settings.Settings.instance().createLocalSetting(
|
250
298
|
settingKey + '-search-config', new Workspace.SearchConfig.SearchConfig('', true, false).toPlainObject());
|
251
299
|
|
252
|
-
this.
|
253
|
-
this
|
300
|
+
this.performUpdate();
|
301
|
+
this.#load();
|
302
|
+
this.performUpdate();
|
303
|
+
this.#searchScope = null;
|
254
304
|
|
255
305
|
this.#emptyStartView = new UI.EmptyWidget.EmptyWidget(
|
256
306
|
i18nString(UIStrings.noSearchResult), i18nString(UIStrings.typeAndPressSToSearch, {
|
257
307
|
PH1: UI.KeyboardShortcut.KeyboardShortcut.shortcutToString(UI.KeyboardShortcut.Keys.Enter)
|
258
308
|
}));
|
259
|
-
this
|
309
|
+
this.#showPane(this.#emptyStartView);
|
310
|
+
}
|
311
|
+
|
312
|
+
override performUpdate(): void {
|
313
|
+
const input: SearchViewInput = {
|
314
|
+
query: this.#query,
|
315
|
+
focusSearchInput: this.#focusSearchInput,
|
316
|
+
matchCase: this.#matchCase,
|
317
|
+
isRegex: this.#isRegex,
|
318
|
+
searchMessage: this.#searchMessage,
|
319
|
+
searchResultsMessage: this.#searchResultsMessage,
|
320
|
+
onQueryChange: (query: string) => {
|
321
|
+
this.#query = query;
|
322
|
+
},
|
323
|
+
onQueryKeyDown: this.#onQueryKeyDown.bind(this),
|
324
|
+
onPanelKeyDown: this.#onPanelKeyDown.bind(this),
|
325
|
+
onClearSearchInput: this.#onClearSearchInput.bind(this),
|
326
|
+
onToggleRegex: this.#onToggleRegex.bind(this),
|
327
|
+
onToggleMatchCase: this.#onToggleMatchCase.bind(this),
|
328
|
+
onRefresh: this.#onRefresh.bind(this),
|
329
|
+
onClearSearch: this.#onClearSearch.bind(this),
|
330
|
+
};
|
331
|
+
const output: SearchViewOutput = {};
|
332
|
+
this.#view(input, output, this.contentElement);
|
333
|
+
this.#focusSearchInput = false;
|
334
|
+
if (output.searchResultsElement) {
|
335
|
+
this.#searchResultsElement = output.searchResultsElement;
|
336
|
+
}
|
337
|
+
if (output.searchProgressPlaceholderElement) {
|
338
|
+
this.#searchProgressPlaceholderElement = output.searchProgressPlaceholderElement;
|
339
|
+
}
|
260
340
|
}
|
261
341
|
|
262
|
-
|
263
|
-
this
|
264
|
-
|
342
|
+
#onToggleRegex(): void {
|
343
|
+
this.#isRegex = !this.#isRegex;
|
344
|
+
this.performUpdate();
|
265
345
|
}
|
266
346
|
|
267
|
-
|
268
|
-
this
|
269
|
-
|
347
|
+
#onToggleMatchCase(): void {
|
348
|
+
this.#matchCase = !this.#matchCase;
|
349
|
+
this.performUpdate();
|
270
350
|
}
|
271
351
|
|
272
|
-
|
273
|
-
return new Workspace.SearchConfig.SearchConfig(
|
274
|
-
this.search.value, !this.matchCaseButton.toggled, this.regexButton.toggled);
|
352
|
+
#buildSearchConfig(): Workspace.SearchConfig.SearchConfig {
|
353
|
+
return new Workspace.SearchConfig.SearchConfig(this.#query, !this.#matchCase, this.#isRegex);
|
275
354
|
}
|
276
355
|
|
277
356
|
toggle(queryCandidate: string, searchImmediately?: boolean): void {
|
278
|
-
this
|
279
|
-
|
280
|
-
|
281
|
-
} else {
|
282
|
-
this.focusOnShow = true;
|
283
|
-
}
|
357
|
+
this.#query = queryCandidate;
|
358
|
+
this.requestUpdate();
|
359
|
+
this.focus();
|
284
360
|
|
285
|
-
this
|
361
|
+
this.#initScope();
|
286
362
|
if (searchImmediately) {
|
287
|
-
this
|
363
|
+
this.#onRefresh();
|
288
364
|
} else {
|
289
|
-
this
|
365
|
+
this.#startIndexing();
|
290
366
|
}
|
291
367
|
}
|
292
368
|
|
@@ -294,208 +370,208 @@ export class SearchView extends UI.Widget.VBox {
|
|
294
370
|
throw new Error('Not implemented');
|
295
371
|
}
|
296
372
|
|
297
|
-
|
298
|
-
this
|
373
|
+
#initScope(): void {
|
374
|
+
this.#searchScope = this.createScope();
|
299
375
|
}
|
300
376
|
|
301
|
-
|
302
|
-
|
303
|
-
if (this.focusOnShow) {
|
304
|
-
this.focus();
|
305
|
-
this.focusOnShow = false;
|
306
|
-
}
|
307
|
-
}
|
308
|
-
|
309
|
-
private onIndexingFinished(): void {
|
310
|
-
if (!this.progressIndicator) {
|
377
|
+
#onIndexingFinished(): void {
|
378
|
+
if (!this.#progressIndicator) {
|
311
379
|
return;
|
312
380
|
}
|
313
381
|
|
314
|
-
const finished = !this
|
315
|
-
this
|
316
|
-
this
|
317
|
-
this
|
318
|
-
this
|
382
|
+
const finished = !this.#progressIndicator.isCanceled();
|
383
|
+
this.#progressIndicator.done();
|
384
|
+
this.#progressIndicator = null;
|
385
|
+
this.#isIndexing = false;
|
386
|
+
this.#searchMessage = finished ? '' : i18nString(UIStrings.indexingInterrupted);
|
319
387
|
if (!finished) {
|
320
|
-
this
|
388
|
+
this.#pendingSearchConfig = null;
|
321
389
|
}
|
322
|
-
|
390
|
+
this.performUpdate();
|
391
|
+
if (!this.#pendingSearchConfig) {
|
323
392
|
return;
|
324
393
|
}
|
325
|
-
const searchConfig = this
|
326
|
-
this
|
327
|
-
this
|
394
|
+
const searchConfig = this.#pendingSearchConfig;
|
395
|
+
this.#pendingSearchConfig = null;
|
396
|
+
this.#innerStartSearch(searchConfig);
|
328
397
|
}
|
329
398
|
|
330
|
-
|
331
|
-
this
|
332
|
-
if (this
|
333
|
-
this
|
399
|
+
#startIndexing(): void {
|
400
|
+
this.#isIndexing = true;
|
401
|
+
if (this.#progressIndicator) {
|
402
|
+
this.#progressIndicator.done();
|
334
403
|
}
|
335
|
-
this
|
336
|
-
this
|
337
|
-
this
|
338
|
-
|
339
|
-
|
340
|
-
|
404
|
+
this.#progressIndicator = document.createElement('devtools-progress');
|
405
|
+
this.#searchMessage = i18nString(UIStrings.indexing);
|
406
|
+
this.#searchProgressPlaceholderElement.appendChild(this.#progressIndicator);
|
407
|
+
this.performUpdate();
|
408
|
+
if (this.#searchScope) {
|
409
|
+
this.#searchScope.performIndexing(
|
410
|
+
new Common.Progress.ProgressProxy(this.#progressIndicator, this.#onIndexingFinished.bind(this)));
|
341
411
|
}
|
342
412
|
}
|
343
413
|
|
344
|
-
|
345
|
-
this
|
346
|
-
this.
|
414
|
+
#onClearSearchInput(): void {
|
415
|
+
this.#query = '';
|
416
|
+
this.requestUpdate();
|
417
|
+
this.#save();
|
347
418
|
this.focus();
|
348
|
-
this
|
419
|
+
this.#showPane(this.#emptyStartView);
|
349
420
|
}
|
350
421
|
|
351
|
-
|
352
|
-
if (searchId !== this
|
422
|
+
#onSearchResult(searchId: number, searchResult: SearchResult): void {
|
423
|
+
if (searchId !== this.#searchId || !this.#progressIndicator) {
|
353
424
|
return;
|
354
425
|
}
|
355
|
-
if (this
|
356
|
-
this
|
426
|
+
if (this.#progressIndicator?.isCanceled()) {
|
427
|
+
this.#onIndexingFinished();
|
357
428
|
return;
|
358
429
|
}
|
359
|
-
if (!this
|
360
|
-
this
|
361
|
-
this
|
430
|
+
if (!this.#searchResultsPane) {
|
431
|
+
this.#searchResultsPane = this.createSearchResultsPane();
|
432
|
+
this.#showPane(this.#searchResultsPane);
|
362
433
|
}
|
363
434
|
this.#pendingSearchResults.push(searchResult);
|
364
435
|
void this.#throttler.schedule(async () => this.#addPendingSearchResults());
|
365
436
|
}
|
366
437
|
|
438
|
+
protected createSearchResultsPane(): SearchResultsPane {
|
439
|
+
return new SearchResultsPane((this.#searchConfig as Workspace.SearchConfig.SearchConfig));
|
440
|
+
}
|
441
|
+
|
367
442
|
#addPendingSearchResults(): void {
|
368
443
|
for (const searchResult of this.#pendingSearchResults) {
|
369
|
-
this
|
444
|
+
this.#addSearchResult(searchResult);
|
370
445
|
if (searchResult.matchesCount()) {
|
371
|
-
this
|
446
|
+
this.#searchResultsPane?.addSearchResult(searchResult);
|
372
447
|
}
|
373
448
|
}
|
374
449
|
this.#pendingSearchResults = [];
|
375
450
|
}
|
376
451
|
|
377
|
-
|
378
|
-
if (searchId !== this
|
452
|
+
#onSearchFinished(searchId: number, finished: boolean): void {
|
453
|
+
if (searchId !== this.#searchId || !this.#progressIndicator) {
|
379
454
|
return;
|
380
455
|
}
|
381
|
-
if (!this
|
382
|
-
this
|
456
|
+
if (!this.#searchResultsPane) {
|
457
|
+
this.#nothingFound();
|
383
458
|
}
|
384
|
-
this
|
385
|
-
this
|
386
|
-
UI.ARIAUtils.LiveAnnouncer.alert(
|
387
|
-
this.searchMessageElement.textContent + ' ' + this.searchResultsMessageElement.textContent);
|
459
|
+
this.#searchFinished(finished);
|
460
|
+
this.#searchConfig = null;
|
461
|
+
UI.ARIAUtils.LiveAnnouncer.alert(this.#searchMessage + ' ' + this.#searchResultsMessage);
|
388
462
|
}
|
389
463
|
|
390
|
-
|
391
|
-
this
|
392
|
-
if (this
|
393
|
-
this
|
464
|
+
#innerStartSearch(searchConfig: Workspace.SearchConfig.SearchConfig): void {
|
465
|
+
this.#searchConfig = searchConfig;
|
466
|
+
if (this.#progressIndicator) {
|
467
|
+
this.#progressIndicator.done();
|
394
468
|
}
|
395
|
-
this
|
396
|
-
this
|
397
|
-
if (this
|
398
|
-
void this
|
399
|
-
searchConfig, this
|
400
|
-
this
|
469
|
+
this.#progressIndicator = document.createElement('devtools-progress');
|
470
|
+
this.#searchStarted(this.#progressIndicator);
|
471
|
+
if (this.#searchScope) {
|
472
|
+
void this.#searchScope.performSearch(
|
473
|
+
searchConfig, this.#progressIndicator, this.#onSearchResult.bind(this, this.#searchId),
|
474
|
+
this.#onSearchFinished.bind(this, this.#searchId));
|
401
475
|
}
|
402
476
|
}
|
403
477
|
|
404
|
-
|
405
|
-
this
|
406
|
-
this
|
407
|
-
this
|
408
|
-
this
|
409
|
-
this
|
478
|
+
#resetSearch(): void {
|
479
|
+
this.#stopSearch();
|
480
|
+
this.#showPane(null);
|
481
|
+
this.#searchResultsPane = null;
|
482
|
+
this.#searchMessage = '';
|
483
|
+
this.#searchResultsMessage = '';
|
484
|
+
this.performUpdate();
|
410
485
|
}
|
411
486
|
|
412
|
-
|
413
|
-
if (this
|
414
|
-
this
|
487
|
+
#stopSearch(): void {
|
488
|
+
if (this.#progressIndicator && !this.#isIndexing) {
|
489
|
+
this.#progressIndicator.cancel();
|
415
490
|
}
|
416
|
-
if (this
|
417
|
-
this
|
491
|
+
if (this.#searchScope) {
|
492
|
+
this.#searchScope.stopSearch();
|
418
493
|
}
|
419
|
-
this
|
494
|
+
this.#searchConfig = null;
|
420
495
|
}
|
421
496
|
|
422
|
-
|
423
|
-
this
|
424
|
-
this
|
425
|
-
this
|
426
|
-
if (!this
|
427
|
-
this
|
497
|
+
#searchStarted(progressIndicator: UI.ProgressIndicator.ProgressIndicator): void {
|
498
|
+
this.#searchMatchesCount = 0;
|
499
|
+
this.#searchResultsCount = 0;
|
500
|
+
this.#nonEmptySearchResultsCount = 0;
|
501
|
+
if (!this.#searchingView) {
|
502
|
+
this.#searchingView = new UI.EmptyWidget.EmptyWidget(i18nString(UIStrings.searching), '');
|
428
503
|
}
|
429
|
-
this
|
430
|
-
this
|
431
|
-
this.
|
432
|
-
this.
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
504
|
+
this.#showPane(this.#searchingView);
|
505
|
+
this.#searchMessage = i18nString(UIStrings.searching);
|
506
|
+
this.performUpdate();
|
507
|
+
this.#searchProgressPlaceholderElement.appendChild(progressIndicator);
|
508
|
+
this.#updateSearchResultsMessage();
|
509
|
+
}
|
510
|
+
|
511
|
+
#updateSearchResultsMessage(): void {
|
512
|
+
if (this.#searchMatchesCount && this.#searchResultsCount) {
|
513
|
+
if (this.#searchMatchesCount === 1 && this.#nonEmptySearchResultsCount === 1) {
|
514
|
+
this.#searchResultsMessage = i18nString(UIStrings.foundMatchingLineInFile);
|
515
|
+
} else if (this.#searchMatchesCount > 1 && this.#nonEmptySearchResultsCount === 1) {
|
516
|
+
this.#searchResultsMessage = i18nString(UIStrings.foundDMatchingLinesInFile, {PH1: this.#searchMatchesCount});
|
442
517
|
} else {
|
443
|
-
this
|
518
|
+
this.#searchResultsMessage = i18nString(
|
444
519
|
UIStrings.foundDMatchingLinesInDFiles,
|
445
|
-
{PH1: this
|
520
|
+
{PH1: this.#searchMatchesCount, PH2: this.#nonEmptySearchResultsCount});
|
446
521
|
}
|
447
522
|
} else {
|
448
|
-
this
|
523
|
+
this.#searchResultsMessage = '';
|
449
524
|
}
|
525
|
+
this.performUpdate();
|
450
526
|
}
|
451
527
|
|
452
|
-
|
453
|
-
if (this
|
454
|
-
this
|
528
|
+
#showPane(panel: UI.Widget.Widget|null): void {
|
529
|
+
if (this.#visiblePane) {
|
530
|
+
this.#visiblePane.detach();
|
455
531
|
}
|
456
532
|
if (panel) {
|
457
|
-
panel.show(this
|
533
|
+
panel.show(this.#searchResultsElement);
|
458
534
|
}
|
459
|
-
this
|
535
|
+
this.#visiblePane = panel;
|
460
536
|
}
|
461
537
|
|
462
|
-
|
463
|
-
if (!this
|
464
|
-
this
|
538
|
+
#nothingFound(): void {
|
539
|
+
if (!this.#notFoundView) {
|
540
|
+
this.#notFoundView = new UI.EmptyWidget.EmptyWidget(
|
465
541
|
i18nString(UIStrings.noMatchesFound), i18nString(UIStrings.nothingMatchedTheQuery));
|
466
542
|
}
|
467
|
-
this
|
543
|
+
this.#showPane(this.#notFoundView);
|
468
544
|
}
|
469
545
|
|
470
|
-
|
546
|
+
#addSearchResult(searchResult: SearchResult): void {
|
471
547
|
const matchesCount = searchResult.matchesCount();
|
472
|
-
this
|
473
|
-
this
|
548
|
+
this.#searchMatchesCount += matchesCount;
|
549
|
+
this.#searchResultsCount++;
|
474
550
|
if (matchesCount) {
|
475
|
-
this
|
551
|
+
this.#nonEmptySearchResultsCount++;
|
476
552
|
}
|
477
|
-
this
|
553
|
+
this.#updateSearchResultsMessage();
|
478
554
|
}
|
479
555
|
|
480
|
-
|
481
|
-
this.
|
482
|
-
|
556
|
+
#searchFinished(finished: boolean): void {
|
557
|
+
this.#searchMessage = finished ? i18nString(UIStrings.searchFinished) : i18nString(UIStrings.searchInterrupted);
|
558
|
+
this.performUpdate();
|
483
559
|
}
|
484
560
|
|
485
561
|
override focus(): void {
|
486
|
-
this
|
487
|
-
this.
|
562
|
+
this.#focusSearchInput = true;
|
563
|
+
this.requestUpdate();
|
488
564
|
}
|
489
565
|
|
490
566
|
override willHide(): void {
|
491
|
-
this
|
567
|
+
this.#stopSearch();
|
492
568
|
}
|
493
569
|
|
494
|
-
|
495
|
-
this
|
570
|
+
#onQueryKeyDown(event: KeyboardEvent): void {
|
571
|
+
this.#save();
|
496
572
|
switch (event.keyCode) {
|
497
573
|
case UI.KeyboardShortcut.Keys.Enter.code:
|
498
|
-
this
|
574
|
+
this.#onRefresh();
|
499
575
|
break;
|
500
576
|
}
|
501
577
|
}
|
@@ -518,7 +594,7 @@ export class SearchView extends UI.Widget.VBox {
|
|
518
594
|
*
|
519
595
|
* @param event KeyboardEvent
|
520
596
|
*/
|
521
|
-
|
597
|
+
#onPanelKeyDown(event: KeyboardEvent): void {
|
522
598
|
const isMac = Host.Platform.isMac();
|
523
599
|
// "Command + Alt + ]" for Mac
|
524
600
|
const shouldShowAllForMac =
|
@@ -534,46 +610,44 @@ export class SearchView extends UI.Widget.VBox {
|
|
534
610
|
!isMac && event.ctrlKey && !event.metaKey && event.shiftKey && event.code === 'BracketLeft';
|
535
611
|
|
536
612
|
if (shouldShowAllForMac || shouldShowAllForOtherPlatforms) {
|
537
|
-
this
|
613
|
+
this.#searchResultsPane?.showAllMatches();
|
538
614
|
void VisualLogging.logKeyDown(event.currentTarget, event, 'show-all-matches');
|
539
615
|
} else if (shouldCollapseAllForMac || shouldCollapseAllForOtherPlatforms) {
|
540
|
-
this
|
616
|
+
this.#searchResultsPane?.collapseAllResults();
|
541
617
|
void VisualLogging.logKeyDown(event.currentTarget, event, 'collapse-all-results');
|
542
618
|
}
|
543
619
|
}
|
544
620
|
|
545
|
-
|
546
|
-
this
|
621
|
+
#save(): void {
|
622
|
+
this.#advancedSearchConfig.set(this.#buildSearchConfig().toPlainObject());
|
547
623
|
}
|
548
624
|
|
549
|
-
|
550
|
-
const searchConfig = Workspace.SearchConfig.SearchConfig.fromPlainObject(this
|
551
|
-
this
|
552
|
-
|
553
|
-
this.matchCaseButton.toggled = !searchConfig.ignoreCase();
|
554
|
-
this.matchCaseButtonToggled();
|
625
|
+
#load(): void {
|
626
|
+
const searchConfig = Workspace.SearchConfig.SearchConfig.fromPlainObject(this.#advancedSearchConfig.get());
|
627
|
+
this.#query = searchConfig.query();
|
555
628
|
|
556
|
-
this
|
557
|
-
this.
|
629
|
+
this.#matchCase = !searchConfig.ignoreCase();
|
630
|
+
this.#isRegex = searchConfig.isRegex();
|
631
|
+
this.requestUpdate();
|
558
632
|
}
|
559
633
|
|
560
|
-
|
561
|
-
const searchConfig = this
|
634
|
+
#onRefresh(): void {
|
635
|
+
const searchConfig = this.#buildSearchConfig();
|
562
636
|
if (!searchConfig.query()?.length) {
|
563
637
|
return;
|
564
638
|
}
|
565
|
-
this
|
566
|
-
++this
|
567
|
-
this
|
568
|
-
if (!this
|
569
|
-
this
|
639
|
+
this.#resetSearch();
|
640
|
+
++this.#searchId;
|
641
|
+
this.#initScope();
|
642
|
+
if (!this.#isIndexing) {
|
643
|
+
this.#startIndexing();
|
570
644
|
}
|
571
|
-
this
|
645
|
+
this.#pendingSearchConfig = searchConfig;
|
572
646
|
}
|
573
647
|
|
574
|
-
|
575
|
-
this
|
576
|
-
this
|
648
|
+
#onClearSearch(): void {
|
649
|
+
this.#resetSearch();
|
650
|
+
this.#onClearSearchInput();
|
577
651
|
}
|
578
652
|
|
579
653
|
get throttlerForTest(): Common.Throttler.Throttler {
|