@codingame/monaco-vscode-search-service-override 4.5.1 → 4.5.2

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.
Files changed (26) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +82 -120
  3. package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +29 -40
  4. package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +21 -44
  5. package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +34 -35
  6. package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +132 -217
  7. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +8 -19
  8. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +46 -131
  9. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +24 -42
  10. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +4 -15
  11. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +2 -5
  12. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTopBar.js +52 -61
  13. package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +6 -13
  14. package/vscode/src/vs/workbench/contrib/search/browser/searchIcons.js +22 -97
  15. package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +5 -9
  16. package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +53 -104
  17. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +168 -282
  18. package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +52 -81
  19. package/vscode/src/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +14 -25
  20. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +38 -120
  21. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +50 -79
  22. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +1 -1
  23. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +30 -40
  24. package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +21 -42
  25. package/vscode/src/vs/workbench/services/search/browser/searchService.js +29 -36
  26. package/vscode/src/vs/workbench/services/search/common/searchService.js +3 -3
@@ -21,6 +21,7 @@ import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatab
21
21
  import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
22
22
 
23
23
  var FolderMatchRenderer_1, FileMatchRenderer_1, MatchRenderer_1;
24
+ const _moduleId = "vs/workbench/contrib/search/browser/searchResultsView";
24
25
  class SearchDelegate {
25
26
  static { this.ITEM_HEIGHT = 22; }
26
27
  getHeight(element) {
@@ -37,7 +38,7 @@ class SearchDelegate {
37
38
  return MatchRenderer.TEMPLATE_ID;
38
39
  }
39
40
  console.error('Invalid search tree element', element);
40
- throw new Error('Invalid search tree element');
41
+ throw ( (new Error('Invalid search tree element')));
41
42
  }
42
43
  }
43
44
  let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
@@ -56,7 +57,7 @@ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
56
57
  renderCompressedElements(node, index, templateData, height) {
57
58
  const compressed = node.element;
58
59
  const folder = compressed.elements[compressed.elements.length - 1];
59
- const label = ( compressed.elements.map(e => e.name()));
60
+ const label = ( (compressed.elements.map(e => e.name())));
60
61
  if (folder.resource) {
61
62
  const fileKind = (folder instanceof FolderMatchWorkspaceRoot) ? FileKind.ROOT_FOLDER : FileKind.FOLDER;
62
63
  templateData.label.setResource({ resource: folder.resource, name: label }, {
@@ -65,32 +66,24 @@ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
65
66
  });
66
67
  }
67
68
  else {
68
- templateData.label.setLabel(( localizeWithPath(
69
- 'vs/workbench/contrib/search/browser/searchResultsView',
70
- 'searchFolderMatch.other.label',
71
- "Other files"
72
- )));
69
+ templateData.label.setLabel(( localizeWithPath(_moduleId, 0, "Other files")));
73
70
  }
74
71
  this.renderFolderDetails(folder, templateData);
75
72
  }
76
73
  renderTemplate(container) {
77
- const disposables = ( new DisposableStore());
74
+ const disposables = ( (new DisposableStore()));
78
75
  const folderMatchElement = append(container, $('.foldermatch'));
79
76
  const label = this.labels.create(folderMatchElement, { supportDescriptionHighlights: true, supportHighlights: true });
80
77
  disposables.add(label);
81
- const badge = ( new CountBadge(
82
- append(folderMatchElement, $('.badge')),
83
- {},
84
- defaultCountBadgeStyles
85
- ));
78
+ const badge = ( (new CountBadge(append(folderMatchElement, $('.badge')), {}, defaultCountBadgeStyles)));
86
79
  const actionBarContainer = append(folderMatchElement, $('.actionBarContainer'));
87
- const elementDisposables = ( new DisposableStore());
80
+ const elementDisposables = ( (new DisposableStore()));
88
81
  disposables.add(elementDisposables);
89
82
  const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
90
83
  SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
91
84
  SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(false);
92
85
  SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(true);
93
- const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
86
+ const instantiationService = this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, contextKeyServiceMain]))));
94
87
  const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
95
88
  menuOptions: {
96
89
  shouldForwardArgs: true
@@ -121,11 +114,7 @@ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
121
114
  }
122
115
  }
123
116
  else {
124
- templateData.label.setLabel(( localizeWithPath(
125
- 'vs/workbench/contrib/search/browser/searchResultsView',
126
- 'searchFolderMatch.other.label',
127
- "Other files"
128
- )));
117
+ templateData.label.setLabel(( localizeWithPath(_moduleId, 0, "Other files")));
129
118
  }
130
119
  SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!folderMatch.hasOnlyReadOnlyMatches());
131
120
  templateData.elementDisposables.add(folderMatch.onChange(() => {
@@ -145,26 +134,16 @@ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
145
134
  renderFolderDetails(folder, templateData) {
146
135
  const count = folder.recursiveMatchCount();
147
136
  templateData.badge.setCount(count);
148
- templateData.badge.setTitleFormat(count > 1 ? ( localizeWithPath(
149
- 'vs/workbench/contrib/search/browser/searchResultsView',
150
- 'searchFileMatches',
151
- "{0} files found",
152
- count
153
- )) : ( localizeWithPath(
154
- 'vs/workbench/contrib/search/browser/searchResultsView',
155
- 'searchFileMatch',
156
- "{0} file found",
157
- count
158
- )));
137
+ templateData.badge.setTitleFormat(count > 1 ? ( localizeWithPath(_moduleId, 1, "{0} files found", count)) : ( localizeWithPath(_moduleId, 2, "{0} file found", count)));
159
138
  templateData.actions.context = { viewer: this.searchView.getControl(), element: folder };
160
139
  }
161
140
  };
162
- FolderMatchRenderer = FolderMatchRenderer_1 = ( __decorate([
163
- ( __param(2, IWorkspaceContextService)),
164
- ( __param(3, ILabelService)),
165
- ( __param(4, IInstantiationService)),
166
- ( __param(5, IContextKeyService))
167
- ], FolderMatchRenderer));
141
+ FolderMatchRenderer = FolderMatchRenderer_1 = ( (__decorate([
142
+ ( (__param(2, IWorkspaceContextService))),
143
+ ( (__param(3, ILabelService))),
144
+ ( (__param(4, IInstantiationService))),
145
+ ( (__param(5, IContextKeyService)))
146
+ ], FolderMatchRenderer)));
168
147
  let FileMatchRenderer = class FileMatchRenderer extends Disposable {
169
148
  static { FileMatchRenderer_1 = this; }
170
149
  static { this.TEMPLATE_ID = 'fileMatch'; }
@@ -179,22 +158,22 @@ let FileMatchRenderer = class FileMatchRenderer extends Disposable {
179
158
  this.templateId = FileMatchRenderer_1.TEMPLATE_ID;
180
159
  }
181
160
  renderCompressedElements(node, index, templateData, height) {
182
- throw new Error('Should never happen since node is incompressible.');
161
+ throw ( (new Error('Should never happen since node is incompressible.')));
183
162
  }
184
163
  renderTemplate(container) {
185
- const disposables = ( new DisposableStore());
186
- const elementDisposables = ( new DisposableStore());
164
+ const disposables = ( (new DisposableStore()));
165
+ const elementDisposables = ( (new DisposableStore()));
187
166
  disposables.add(elementDisposables);
188
167
  const fileMatchElement = append(container, $('.filematch'));
189
168
  const label = this.labels.create(fileMatchElement);
190
169
  disposables.add(label);
191
- const badge = ( new CountBadge(append(fileMatchElement, $('.badge')), {}, defaultCountBadgeStyles));
170
+ const badge = ( (new CountBadge(append(fileMatchElement, $('.badge')), {}, defaultCountBadgeStyles)));
192
171
  const actionBarContainer = append(fileMatchElement, $('.actionBarContainer'));
193
172
  const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
194
173
  SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
195
174
  SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(true);
196
175
  SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
197
- const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
176
+ const instantiationService = this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, contextKeyServiceMain]))));
198
177
  const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
199
178
  menuOptions: {
200
179
  shouldForwardArgs: true
@@ -216,22 +195,12 @@ let FileMatchRenderer = class FileMatchRenderer extends Disposable {
216
195
  }
217
196
  renderElement(node, index, templateData) {
218
197
  const fileMatch = node.element;
219
- templateData.el.setAttribute('data-resource', ( fileMatch.resource.toString()));
198
+ templateData.el.setAttribute('data-resource', ( (fileMatch.resource.toString())));
220
199
  const decorationConfig = this.configurationService.getValue('search').decorations;
221
200
  templateData.label.setFile(fileMatch.resource, { hidePath: this.searchView.isTreeLayoutViewVisible && !(fileMatch.parent() instanceof FolderMatchNoRoot), hideIcon: false, fileDecorations: { colors: decorationConfig.colors, badges: decorationConfig.badges } });
222
201
  const count = fileMatch.count();
223
202
  templateData.badge.setCount(count);
224
- templateData.badge.setTitleFormat(count > 1 ? ( localizeWithPath(
225
- 'vs/workbench/contrib/search/browser/searchResultsView',
226
- 'searchMatches',
227
- "{0} matches found",
228
- count
229
- )) : ( localizeWithPath(
230
- 'vs/workbench/contrib/search/browser/searchResultsView',
231
- 'searchMatch',
232
- "{0} match found",
233
- count
234
- )));
203
+ templateData.badge.setTitleFormat(count > 1 ? ( localizeWithPath(_moduleId, 3, "{0} matches found", count)) : ( localizeWithPath(_moduleId, 4, "{0} match found", count)));
235
204
  templateData.actions.context = { viewer: this.searchView.getControl(), element: fileMatch };
236
205
  SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!fileMatch.hasOnlyReadOnlyMatches());
237
206
  templateData.elementDisposables.add(fileMatch.onChange(() => {
@@ -247,12 +216,12 @@ let FileMatchRenderer = class FileMatchRenderer extends Disposable {
247
216
  templateData.disposables.dispose();
248
217
  }
249
218
  };
250
- FileMatchRenderer = FileMatchRenderer_1 = ( __decorate([
251
- ( __param(2, IWorkspaceContextService)),
252
- ( __param(3, IConfigurationService)),
253
- ( __param(4, IInstantiationService)),
254
- ( __param(5, IContextKeyService))
255
- ], FileMatchRenderer));
219
+ FileMatchRenderer = FileMatchRenderer_1 = ( (__decorate([
220
+ ( (__param(2, IWorkspaceContextService))),
221
+ ( (__param(3, IConfigurationService))),
222
+ ( (__param(4, IInstantiationService))),
223
+ ( (__param(5, IContextKeyService)))
224
+ ], FileMatchRenderer)));
256
225
  let MatchRenderer = class MatchRenderer extends Disposable {
257
226
  static { MatchRenderer_1 = this; }
258
227
  static { this.TEMPLATE_ID = 'match'; }
@@ -266,7 +235,7 @@ let MatchRenderer = class MatchRenderer extends Disposable {
266
235
  this.templateId = MatchRenderer_1.TEMPLATE_ID;
267
236
  }
268
237
  renderCompressedElements(node, index, templateData, height) {
269
- throw new Error('Should never happen since node is incompressible.');
238
+ throw ( (new Error('Should never happen since node is incompressible.')));
270
239
  }
271
240
  renderTemplate(container) {
272
241
  container.classList.add('linematch');
@@ -277,12 +246,12 @@ let MatchRenderer = class MatchRenderer extends Disposable {
277
246
  const replace = append(parent, $('span.replaceMatch'));
278
247
  const after = append(parent, $('span'));
279
248
  const actionBarContainer = append(container, $('span.actionBarContainer'));
280
- const disposables = ( new DisposableStore());
249
+ const disposables = ( (new DisposableStore()));
281
250
  const contextKeyServiceMain = disposables.add(this.contextKeyService.createScoped(container));
282
251
  SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(true);
283
252
  SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(false);
284
253
  SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(false);
285
- const instantiationService = this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, contextKeyServiceMain])));
254
+ const instantiationService = this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, contextKeyServiceMain]))));
286
255
  const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
287
256
  menuOptions: {
288
257
  shouldForwardArgs: true
@@ -334,66 +303,46 @@ let MatchRenderer = class MatchRenderer extends Disposable {
334
303
  const startLine = match.range().startLineNumber;
335
304
  const numLines = match.range().endLineNumber - match.range().startLineNumber;
336
305
  const lineNumStr = showLineNumbers ?
337
- ( localizeWithPath(
338
- 'vs/workbench/contrib/search/browser/searchResultsView',
339
- 'lineNumStr',
340
- "From line {0}",
341
- startLine,
342
- numLines
343
- )) + ' ' :
306
+ ( localizeWithPath(_moduleId, 5, "From line {0}", startLine, numLines)) + ' ' :
344
307
  '';
345
308
  const numLinesStr = numLines > 0 ?
346
- '+ ' + ( localizeWithPath(
347
- 'vs/workbench/contrib/search/browser/searchResultsView',
348
- 'numLinesStr',
349
- "{0} more lines",
350
- numLines
351
- )) :
309
+ '+ ' + ( localizeWithPath(_moduleId, 6, "{0} more lines", numLines)) :
352
310
  '';
353
311
  return lineNumStr + numLinesStr;
354
312
  }
355
313
  };
356
- MatchRenderer = MatchRenderer_1 = ( __decorate([
357
- ( __param(1, IWorkspaceContextService)),
358
- ( __param(2, IConfigurationService)),
359
- ( __param(3, IInstantiationService)),
360
- ( __param(4, IContextKeyService))
361
- ], MatchRenderer));
314
+ MatchRenderer = MatchRenderer_1 = ( (__decorate([
315
+ ( (__param(1, IWorkspaceContextService))),
316
+ ( (__param(2, IConfigurationService))),
317
+ ( (__param(3, IInstantiationService))),
318
+ ( (__param(4, IContextKeyService)))
319
+ ], MatchRenderer)));
362
320
  let SearchAccessibilityProvider = class SearchAccessibilityProvider {
363
321
  constructor(searchView, labelService) {
364
322
  this.searchView = searchView;
365
323
  this.labelService = labelService;
366
324
  }
367
325
  getWidgetAriaLabel() {
368
- return ( localizeWithPath(
369
- 'vs/workbench/contrib/search/browser/searchResultsView',
370
- 'search',
371
- "Search"
372
- ));
326
+ return ( localizeWithPath(_moduleId, 7, "Search"));
373
327
  }
374
328
  getAriaLabel(element) {
375
329
  if (element instanceof FolderMatch) {
376
330
  const count = element.allDownstreamFileMatches().reduce((total, current) => total + current.count(), 0);
377
331
  return element.resource ?
378
332
  ( localizeWithPath(
379
- 'vs/workbench/contrib/search/browser/searchResultsView',
380
- 'folderMatchAriaLabel',
333
+ _moduleId,
334
+ 8,
381
335
  "{0} matches in folder root {1}, Search result",
382
336
  count,
383
337
  element.name()
384
338
  )) :
385
- ( localizeWithPath(
386
- 'vs/workbench/contrib/search/browser/searchResultsView',
387
- 'otherFilesAriaLabel',
388
- "{0} matches outside of the workspace, Search result",
389
- count
390
- ));
339
+ ( localizeWithPath(_moduleId, 9, "{0} matches outside of the workspace, Search result", count));
391
340
  }
392
341
  if (element instanceof FileMatch) {
393
342
  const path = this.labelService.getUriLabel(element.resource, { relative: true }) || element.resource.fsPath;
394
343
  return ( localizeWithPath(
395
- 'vs/workbench/contrib/search/browser/searchResultsView',
396
- 'fileMatchAriaLabel',
344
+ _moduleId,
345
+ 10,
397
346
  "{0} matches in file {1} of folder {2}, Search result",
398
347
  element.count(),
399
348
  element.name(),
@@ -409,8 +358,8 @@ let SearchAccessibilityProvider = class SearchAccessibilityProvider {
409
358
  const matchText = match.text().substr(0, range.endColumn + 150);
410
359
  if (replace) {
411
360
  return ( localizeWithPath(
412
- 'vs/workbench/contrib/search/browser/searchResultsView',
413
- 'replacePreviewResultAria',
361
+ _moduleId,
362
+ 11,
414
363
  "'{0}' at column {1} replace {2} with {3}",
415
364
  matchText,
416
365
  range.startColumn,
@@ -419,8 +368,8 @@ let SearchAccessibilityProvider = class SearchAccessibilityProvider {
419
368
  ));
420
369
  }
421
370
  return ( localizeWithPath(
422
- 'vs/workbench/contrib/search/browser/searchResultsView',
423
- 'searchResultAria',
371
+ _moduleId,
372
+ 12,
424
373
  "'{0}' at column {1} found {2}",
425
374
  matchText,
426
375
  range.startColumn,
@@ -430,8 +379,8 @@ let SearchAccessibilityProvider = class SearchAccessibilityProvider {
430
379
  return null;
431
380
  }
432
381
  };
433
- SearchAccessibilityProvider = ( __decorate([
434
- ( __param(1, ILabelService))
435
- ], SearchAccessibilityProvider));
382
+ SearchAccessibilityProvider = ( (__decorate([
383
+ ( (__param(1, ILabelService)))
384
+ ], SearchAccessibilityProvider)));
436
385
 
437
386
  export { FileMatchRenderer, FolderMatchRenderer, MatchRenderer, SearchAccessibilityProvider, SearchDelegate };