@theia/search-in-workspace 1.34.2 → 1.34.3

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 (50) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +40 -40
  3. package/lib/browser/components/search-in-workspace-input.d.ts +39 -39
  4. package/lib/browser/components/search-in-workspace-input.js +120 -120
  5. package/lib/browser/search-in-workspace-context-key-service.d.ts +23 -23
  6. package/lib/browser/search-in-workspace-context-key-service.js +90 -90
  7. package/lib/browser/search-in-workspace-factory.d.ts +10 -10
  8. package/lib/browser/search-in-workspace-factory.js +68 -68
  9. package/lib/browser/search-in-workspace-frontend-contribution.d.ts +53 -53
  10. package/lib/browser/search-in-workspace-frontend-contribution.js +410 -410
  11. package/lib/browser/search-in-workspace-frontend-module.d.ts +6 -6
  12. package/lib/browser/search-in-workspace-frontend-module.js +70 -70
  13. package/lib/browser/search-in-workspace-label-provider.d.ts +9 -9
  14. package/lib/browser/search-in-workspace-label-provider.js +57 -57
  15. package/lib/browser/search-in-workspace-preferences.d.ts +17 -17
  16. package/lib/browser/search-in-workspace-preferences.js +82 -82
  17. package/lib/browser/search-in-workspace-result-tree-widget.d.ts +253 -253
  18. package/lib/browser/search-in-workspace-result-tree-widget.js +1072 -1072
  19. package/lib/browser/search-in-workspace-service.d.ts +35 -35
  20. package/lib/browser/search-in-workspace-service.js +158 -158
  21. package/lib/browser/search-in-workspace-widget.d.ts +121 -121
  22. package/lib/browser/search-in-workspace-widget.js +602 -602
  23. package/lib/browser/search-layout-migrations.d.ts +5 -5
  24. package/lib/browser/search-layout-migrations.js +64 -64
  25. package/lib/common/search-in-workspace-interface.d.ts +112 -112
  26. package/lib/common/search-in-workspace-interface.js +35 -35
  27. package/lib/node/ripgrep-search-in-workspace-server.d.ts +94 -94
  28. package/lib/node/ripgrep-search-in-workspace-server.js +423 -423
  29. package/lib/node/ripgrep-search-in-workspace-server.slow-spec.d.ts +1 -1
  30. package/lib/node/ripgrep-search-in-workspace-server.slow-spec.js +899 -899
  31. package/lib/node/search-in-workspace-backend-module.d.ts +3 -3
  32. package/lib/node/search-in-workspace-backend-module.js +32 -32
  33. package/package.json +9 -9
  34. package/src/browser/components/search-in-workspace-input.tsx +139 -139
  35. package/src/browser/search-in-workspace-context-key-service.ts +93 -93
  36. package/src/browser/search-in-workspace-factory.ts +59 -59
  37. package/src/browser/search-in-workspace-frontend-contribution.ts +402 -402
  38. package/src/browser/search-in-workspace-frontend-module.ts +82 -82
  39. package/src/browser/search-in-workspace-label-provider.ts +48 -48
  40. package/src/browser/search-in-workspace-preferences.ts +91 -91
  41. package/src/browser/search-in-workspace-result-tree-widget.tsx +1225 -1225
  42. package/src/browser/search-in-workspace-service.ts +152 -152
  43. package/src/browser/search-in-workspace-widget.tsx +711 -711
  44. package/src/browser/search-layout-migrations.ts +53 -53
  45. package/src/browser/styles/index.css +367 -367
  46. package/src/browser/styles/search.svg +6 -6
  47. package/src/common/search-in-workspace-interface.ts +149 -149
  48. package/src/node/ripgrep-search-in-workspace-server.slow-spec.ts +1073 -1073
  49. package/src/node/ripgrep-search-in-workspace-server.ts +482 -482
  50. package/src/node/search-in-workspace-backend-module.ts +33 -33
@@ -1,11 +1,11 @@
1
- import { ViewContainer, ViewContainerTitleOptions, WidgetFactory, WidgetManager } from '@theia/core/lib/browser';
2
- export declare const SEARCH_VIEW_CONTAINER_ID = "search-view-container";
3
- export declare const SEARCH_VIEW_CONTAINER_TITLE_OPTIONS: ViewContainerTitleOptions;
4
- export declare class SearchInWorkspaceFactory implements WidgetFactory {
5
- readonly id = "search-view-container";
6
- protected searchWidgetOptions: ViewContainer.Factory.WidgetOptions;
7
- protected readonly viewContainerFactory: ViewContainer.Factory;
8
- protected readonly widgetManager: WidgetManager;
9
- createWidget(): Promise<ViewContainer>;
10
- }
1
+ import { ViewContainer, ViewContainerTitleOptions, WidgetFactory, WidgetManager } from '@theia/core/lib/browser';
2
+ export declare const SEARCH_VIEW_CONTAINER_ID = "search-view-container";
3
+ export declare const SEARCH_VIEW_CONTAINER_TITLE_OPTIONS: ViewContainerTitleOptions;
4
+ export declare class SearchInWorkspaceFactory implements WidgetFactory {
5
+ readonly id = "search-view-container";
6
+ protected searchWidgetOptions: ViewContainer.Factory.WidgetOptions;
7
+ protected readonly viewContainerFactory: ViewContainer.Factory;
8
+ protected readonly widgetManager: WidgetManager;
9
+ createWidget(): Promise<ViewContainer>;
10
+ }
11
11
  //# sourceMappingURL=search-in-workspace-factory.d.ts.map
@@ -1,69 +1,69 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2021 SAP SE or an SAP affiliate company and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.SearchInWorkspaceFactory = exports.SEARCH_VIEW_CONTAINER_TITLE_OPTIONS = exports.SEARCH_VIEW_CONTAINER_ID = void 0;
28
- const inversify_1 = require("@theia/core/shared/inversify");
29
- const browser_1 = require("@theia/core/lib/browser");
30
- const search_in_workspace_widget_1 = require("./search-in-workspace-widget");
31
- const nls_1 = require("@theia/core/lib/common/nls");
32
- exports.SEARCH_VIEW_CONTAINER_ID = 'search-view-container';
33
- exports.SEARCH_VIEW_CONTAINER_TITLE_OPTIONS = {
34
- label: nls_1.nls.localizeByDefault('Search'),
35
- iconClass: (0, browser_1.codicon)('search'),
36
- closeable: true
37
- };
38
- let SearchInWorkspaceFactory = class SearchInWorkspaceFactory {
39
- constructor() {
40
- this.id = exports.SEARCH_VIEW_CONTAINER_ID;
41
- this.searchWidgetOptions = {
42
- canHide: false,
43
- initiallyCollapsed: false
44
- };
45
- }
46
- async createWidget() {
47
- const viewContainer = this.viewContainerFactory({
48
- id: exports.SEARCH_VIEW_CONTAINER_ID,
49
- progressLocationId: 'search'
50
- });
51
- viewContainer.setTitleOptions(exports.SEARCH_VIEW_CONTAINER_TITLE_OPTIONS);
52
- const widget = await this.widgetManager.getOrCreateWidget(search_in_workspace_widget_1.SearchInWorkspaceWidget.ID);
53
- viewContainer.addWidget(widget, this.searchWidgetOptions);
54
- return viewContainer;
55
- }
56
- };
57
- __decorate([
58
- (0, inversify_1.inject)(browser_1.ViewContainer.Factory),
59
- __metadata("design:type", Function)
60
- ], SearchInWorkspaceFactory.prototype, "viewContainerFactory", void 0);
61
- __decorate([
62
- (0, inversify_1.inject)(browser_1.WidgetManager),
63
- __metadata("design:type", browser_1.WidgetManager)
64
- ], SearchInWorkspaceFactory.prototype, "widgetManager", void 0);
65
- SearchInWorkspaceFactory = __decorate([
66
- (0, inversify_1.injectable)()
67
- ], SearchInWorkspaceFactory);
68
- exports.SearchInWorkspaceFactory = SearchInWorkspaceFactory;
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2021 SAP SE or an SAP affiliate company and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.SearchInWorkspaceFactory = exports.SEARCH_VIEW_CONTAINER_TITLE_OPTIONS = exports.SEARCH_VIEW_CONTAINER_ID = void 0;
28
+ const inversify_1 = require("@theia/core/shared/inversify");
29
+ const browser_1 = require("@theia/core/lib/browser");
30
+ const search_in_workspace_widget_1 = require("./search-in-workspace-widget");
31
+ const nls_1 = require("@theia/core/lib/common/nls");
32
+ exports.SEARCH_VIEW_CONTAINER_ID = 'search-view-container';
33
+ exports.SEARCH_VIEW_CONTAINER_TITLE_OPTIONS = {
34
+ label: nls_1.nls.localizeByDefault('Search'),
35
+ iconClass: (0, browser_1.codicon)('search'),
36
+ closeable: true
37
+ };
38
+ let SearchInWorkspaceFactory = class SearchInWorkspaceFactory {
39
+ constructor() {
40
+ this.id = exports.SEARCH_VIEW_CONTAINER_ID;
41
+ this.searchWidgetOptions = {
42
+ canHide: false,
43
+ initiallyCollapsed: false
44
+ };
45
+ }
46
+ async createWidget() {
47
+ const viewContainer = this.viewContainerFactory({
48
+ id: exports.SEARCH_VIEW_CONTAINER_ID,
49
+ progressLocationId: 'search'
50
+ });
51
+ viewContainer.setTitleOptions(exports.SEARCH_VIEW_CONTAINER_TITLE_OPTIONS);
52
+ const widget = await this.widgetManager.getOrCreateWidget(search_in_workspace_widget_1.SearchInWorkspaceWidget.ID);
53
+ viewContainer.addWidget(widget, this.searchWidgetOptions);
54
+ return viewContainer;
55
+ }
56
+ };
57
+ __decorate([
58
+ (0, inversify_1.inject)(browser_1.ViewContainer.Factory),
59
+ __metadata("design:type", Function)
60
+ ], SearchInWorkspaceFactory.prototype, "viewContainerFactory", void 0);
61
+ __decorate([
62
+ (0, inversify_1.inject)(browser_1.WidgetManager),
63
+ __metadata("design:type", browser_1.WidgetManager)
64
+ ], SearchInWorkspaceFactory.prototype, "widgetManager", void 0);
65
+ SearchInWorkspaceFactory = __decorate([
66
+ (0, inversify_1.injectable)()
67
+ ], SearchInWorkspaceFactory);
68
+ exports.SearchInWorkspaceFactory = SearchInWorkspaceFactory;
69
69
  //# sourceMappingURL=search-in-workspace-factory.js.map
@@ -1,54 +1,54 @@
1
- import { AbstractViewContribution, KeybindingRegistry, LabelProvider, FrontendApplication, FrontendApplicationContribution, StylingParticipant, ColorTheme, CssStyleCollector } from '@theia/core/lib/browser';
2
- import { SearchInWorkspaceWidget } from './search-in-workspace-widget';
3
- import { CommandRegistry, MenuModelRegistry, SelectionService, Command } from '@theia/core';
4
- import { Widget } from '@theia/core/lib/browser/widgets';
5
- import { UriCommandHandler, UriAwareCommandHandler } from '@theia/core/lib/common/uri-command-handler';
6
- import URI from '@theia/core/lib/common/uri';
7
- import { WorkspaceService } from '@theia/workspace/lib/browser';
8
- import { SearchInWorkspaceContextKeyService } from './search-in-workspace-context-key-service';
9
- import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
10
- import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
11
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
12
- import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
13
- export declare namespace SearchInWorkspaceCommands {
14
- const TOGGLE_SIW_WIDGET: {
15
- id: string;
16
- };
17
- const OPEN_SIW_WIDGET: Command;
18
- const REPLACE_IN_FILES: Command;
19
- const FIND_IN_FOLDER: Command;
20
- const REFRESH_RESULTS: Command;
21
- const CANCEL_SEARCH: Command;
22
- const COLLAPSE_ALL: Command;
23
- const EXPAND_ALL: Command;
24
- const CLEAR_ALL: Command;
25
- const COPY_ALL: Command;
26
- const COPY_ONE: Command;
27
- const DISMISS_RESULT: Command;
28
- }
29
- export declare class SearchInWorkspaceFrontendContribution extends AbstractViewContribution<SearchInWorkspaceWidget> implements FrontendApplicationContribution, TabBarToolbarContribution, StylingParticipant {
30
- protected readonly selectionService: SelectionService;
31
- protected readonly labelProvider: LabelProvider;
32
- protected readonly workspaceService: WorkspaceService;
33
- protected readonly fileService: FileService;
34
- protected readonly editorManager: EditorManager;
35
- protected readonly clipboardService: ClipboardService;
36
- protected readonly contextKeyService: SearchInWorkspaceContextKeyService;
37
- constructor();
38
- protected init(): void;
39
- initializeLayout(app: FrontendApplication): Promise<void>;
40
- registerCommands(commands: CommandRegistry): Promise<void>;
41
- protected withWidget<T>(widget: Widget | undefined, fn: (widget: SearchInWorkspaceWidget) => T): T | false;
42
- /**
43
- * Get the search term based on current editor selection.
44
- * @returns the selection if available.
45
- */
46
- protected getSearchTerm(): string;
47
- registerKeybindings(keybindings: KeybindingRegistry): void;
48
- registerMenus(menus: MenuModelRegistry): void;
49
- registerToolbarItems(toolbarRegistry: TabBarToolbarRegistry): Promise<void>;
50
- protected newUriAwareCommandHandler(handler: UriCommandHandler<URI>): UriAwareCommandHandler<URI>;
51
- protected newMultiUriAwareCommandHandler(handler: UriCommandHandler<URI[]>): UriAwareCommandHandler<URI[]>;
52
- registerThemeStyle(theme: ColorTheme, collector: CssStyleCollector): void;
53
- }
1
+ import { AbstractViewContribution, KeybindingRegistry, LabelProvider, FrontendApplication, FrontendApplicationContribution, StylingParticipant, ColorTheme, CssStyleCollector } from '@theia/core/lib/browser';
2
+ import { SearchInWorkspaceWidget } from './search-in-workspace-widget';
3
+ import { CommandRegistry, MenuModelRegistry, SelectionService, Command } from '@theia/core';
4
+ import { Widget } from '@theia/core/lib/browser/widgets';
5
+ import { UriCommandHandler, UriAwareCommandHandler } from '@theia/core/lib/common/uri-command-handler';
6
+ import URI from '@theia/core/lib/common/uri';
7
+ import { WorkspaceService } from '@theia/workspace/lib/browser';
8
+ import { SearchInWorkspaceContextKeyService } from './search-in-workspace-context-key-service';
9
+ import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
10
+ import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
11
+ import { FileService } from '@theia/filesystem/lib/browser/file-service';
12
+ import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
13
+ export declare namespace SearchInWorkspaceCommands {
14
+ const TOGGLE_SIW_WIDGET: {
15
+ id: string;
16
+ };
17
+ const OPEN_SIW_WIDGET: Command;
18
+ const REPLACE_IN_FILES: Command;
19
+ const FIND_IN_FOLDER: Command;
20
+ const REFRESH_RESULTS: Command;
21
+ const CANCEL_SEARCH: Command;
22
+ const COLLAPSE_ALL: Command;
23
+ const EXPAND_ALL: Command;
24
+ const CLEAR_ALL: Command;
25
+ const COPY_ALL: Command;
26
+ const COPY_ONE: Command;
27
+ const DISMISS_RESULT: Command;
28
+ }
29
+ export declare class SearchInWorkspaceFrontendContribution extends AbstractViewContribution<SearchInWorkspaceWidget> implements FrontendApplicationContribution, TabBarToolbarContribution, StylingParticipant {
30
+ protected readonly selectionService: SelectionService;
31
+ protected readonly labelProvider: LabelProvider;
32
+ protected readonly workspaceService: WorkspaceService;
33
+ protected readonly fileService: FileService;
34
+ protected readonly editorManager: EditorManager;
35
+ protected readonly clipboardService: ClipboardService;
36
+ protected readonly contextKeyService: SearchInWorkspaceContextKeyService;
37
+ constructor();
38
+ protected init(): void;
39
+ initializeLayout(app: FrontendApplication): Promise<void>;
40
+ registerCommands(commands: CommandRegistry): Promise<void>;
41
+ protected withWidget<T>(widget: Widget | undefined, fn: (widget: SearchInWorkspaceWidget) => T): T | false;
42
+ /**
43
+ * Get the search term based on current editor selection.
44
+ * @returns the selection if available.
45
+ */
46
+ protected getSearchTerm(): string;
47
+ registerKeybindings(keybindings: KeybindingRegistry): void;
48
+ registerMenus(menus: MenuModelRegistry): void;
49
+ registerToolbarItems(toolbarRegistry: TabBarToolbarRegistry): Promise<void>;
50
+ protected newUriAwareCommandHandler(handler: UriCommandHandler<URI>): UriAwareCommandHandler<URI>;
51
+ protected newMultiUriAwareCommandHandler(handler: UriCommandHandler<URI[]>): UriAwareCommandHandler<URI[]>;
52
+ registerThemeStyle(theme: ColorTheme, collector: CssStyleCollector): void;
53
+ }
54
54
  //# sourceMappingURL=search-in-workspace-frontend-contribution.d.ts.map