@codingame/monaco-vscode-dialogs-service-override 22.1.9 → 23.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-dialogs-service-override",
3
- "version": "22.1.9",
3
+ "version": "23.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - dialogs service-override",
6
6
  "keywords": [],
@@ -15,9 +15,9 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "22.1.9",
19
- "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common": "22.1.9",
20
- "@codingame/monaco-vscode-f1bbc6d3-6129-583c-a2ba-c80b832993d2-common": "22.1.9"
18
+ "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.0.0",
19
+ "@codingame/monaco-vscode-api": "23.0.0",
20
+ "@codingame/monaco-vscode-f1bbc6d3-6129-583c-a2ba-c80b832993d2-common": "23.0.0"
21
21
  },
22
22
  "main": "index.js",
23
23
  "module": "index.js",
@@ -8,6 +8,7 @@ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/w
8
8
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
9
9
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
10
10
  import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
11
+ import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
11
12
  export declare class DialogHandlerContribution extends Disposable implements IWorkbenchContribution {
12
13
  private dialogService;
13
14
  private productService;
@@ -15,6 +16,6 @@ export declare class DialogHandlerContribution extends Disposable implements IWo
15
16
  private readonly model;
16
17
  private readonly impl;
17
18
  private currentDialog;
18
- constructor(dialogService: IDialogService, logService: ILogService, layoutService: ILayoutService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, productService: IProductService, clipboardService: IClipboardService, openerService: IOpenerService);
19
+ constructor(dialogService: IDialogService, logService: ILogService, layoutService: ILayoutService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, productService: IProductService, clipboardService: IClipboardService, openerService: IOpenerService, markdownRendererService: IMarkdownRendererService);
19
20
  private processDialogs;
20
21
  }
@@ -13,10 +13,11 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
13
13
  import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
14
14
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
15
15
  import { createBrowserAboutDialogDetails } from '@codingame/monaco-vscode-f1bbc6d3-6129-583c-a2ba-c80b832993d2-common/vscode/vs/platform/dialogs/browser/dialog';
16
+ import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
16
17
 
17
18
  let DialogHandlerContribution = class DialogHandlerContribution extends Disposable {
18
19
  static { this.ID = 'workbench.contrib.dialogHandler'; }
19
- constructor(dialogService, logService, layoutService, keybindingService, instantiationService, productService, clipboardService, openerService) {
20
+ constructor(dialogService, logService, layoutService, keybindingService, instantiationService, productService, clipboardService, openerService, markdownRendererService) {
20
21
  super();
21
22
  this.dialogService = dialogService;
22
23
  this.productService = productService;
@@ -26,7 +27,8 @@ let DialogHandlerContribution = class DialogHandlerContribution extends Disposab
26
27
  keybindingService,
27
28
  instantiationService,
28
29
  clipboardService,
29
- openerService
30
+ openerService,
31
+ markdownRendererService
30
32
  ))));
31
33
  this.model = this.dialogService.model;
32
34
  this._register(this.model.onWillShowDialog(() => {
@@ -74,7 +76,8 @@ DialogHandlerContribution = ( __decorate([
74
76
  ( __param(4, IInstantiationService)),
75
77
  ( __param(5, IProductService)),
76
78
  ( __param(6, IClipboardService)),
77
- ( __param(7, IOpenerService))
79
+ ( __param(7, IOpenerService)),
80
+ ( __param(8, IMarkdownRendererService))
78
81
  ], DialogHandlerContribution));
79
82
  registerWorkbenchContribution2(DialogHandlerContribution.ID, DialogHandlerContribution, WorkbenchPhase.BlockStartup
80
83
  );
@@ -1,9 +1,10 @@
1
- import { IConfirmation, IConfirmationResult, IInputResult, IInput, AbstractDialogHandler, IPrompt, IAsyncPromptResult } from "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs";
1
+ import { IConfirmation, IConfirmationResult, IInputResult, IInput, AbstractDialogHandler, IPrompt, IAsyncPromptResult } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs";
2
2
  import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";
3
3
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
4
4
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
5
5
  import { IClipboardService } from "@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service";
6
6
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
7
+ import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
7
8
  import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
8
9
  export declare class BrowserDialogHandler extends AbstractDialogHandler {
9
10
  private readonly logService;
@@ -11,9 +12,9 @@ export declare class BrowserDialogHandler extends AbstractDialogHandler {
11
12
  private readonly keybindingService;
12
13
  private readonly clipboardService;
13
14
  private readonly openerService;
15
+ private readonly markdownRendererService;
14
16
  private static readonly ALLOWABLE_COMMANDS;
15
- private readonly markdownRenderer;
16
- constructor(logService: ILogService, layoutService: ILayoutService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, clipboardService: IClipboardService, openerService: IOpenerService);
17
+ constructor(logService: ILogService, layoutService: ILayoutService, keybindingService: IKeybindingService, instantiationService: IInstantiationService, clipboardService: IClipboardService, openerService: IOpenerService, markdownRendererService: IMarkdownRendererService);
17
18
  prompt<T>(prompt: IPrompt<T>): Promise<IAsyncPromptResult<T>>;
18
19
  confirm(confirmation: IConfirmation): Promise<IConfirmationResult>;
19
20
  input(input: IInput): Promise<IInputResult>;
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
- import { AbstractDialogHandler } from '@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs';
4
+ import { AbstractDialogHandler } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs';
5
5
  import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
6
6
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
7
7
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
@@ -10,7 +10,8 @@ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/com
10
10
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
11
11
  import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
12
12
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
13
- import { MarkdownRenderer, openLinkFromMarkdown } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer';
13
+ import { openLinkFromMarkdown } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer';
14
+ import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
14
15
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
15
16
  import { createWorkbenchDialogOptions } from '@codingame/monaco-vscode-f1bbc6d3-6129-583c-a2ba-c80b832993d2-common/vscode/vs/platform/dialogs/browser/dialog';
16
17
 
@@ -25,14 +26,14 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
25
26
  'editor.action.clipboardCutAction',
26
27
  'editor.action.clipboardPasteAction'
27
28
  ]; }
28
- constructor(logService, layoutService, keybindingService, instantiationService, clipboardService, openerService) {
29
+ constructor(logService, layoutService, keybindingService, instantiationService, clipboardService, openerService, markdownRendererService) {
29
30
  super();
30
31
  this.logService = logService;
31
32
  this.layoutService = layoutService;
32
33
  this.keybindingService = keybindingService;
33
34
  this.clipboardService = clipboardService;
34
35
  this.openerService = openerService;
35
- this.markdownRenderer = instantiationService.createInstance(MarkdownRenderer, {});
36
+ this.markdownRendererService = markdownRendererService;
36
37
  }
37
38
  async prompt(prompt) {
38
39
  this.logService.trace('DialogService#prompt', prompt.message);
@@ -54,8 +55,8 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
54
55
  }
55
56
  async about(title, details, detailsToCopy) {
56
57
  const { button } = await this.doShow(Severity.Info, title, [
57
- ( localize(2968, "&&Copy")),
58
- ( localize(2969, "OK"))
58
+ ( localize(2988, "&&Copy")),
59
+ ( localize(2989, "OK"))
59
60
  ], details, 1);
60
61
  if (button === 0) {
61
62
  this.clipboardService.writeText(detailsToCopy);
@@ -66,7 +67,7 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
66
67
  const renderBody = customOptions ? (parent) => {
67
68
  parent.classList.add(...(customOptions.classes || []));
68
69
  customOptions.markdownDetails?.forEach(markdownDetail => {
69
- const result = dialogDisposables.add(this.markdownRenderer.render(markdownDetail.markdown, {
70
+ const result = dialogDisposables.add(this.markdownRendererService.render(markdownDetail.markdown, {
70
71
  actionHandler: markdownDetail.actionHandler || ((link, mdStr) => {
71
72
  return openLinkFromMarkdown(this.openerService, link, mdStr.isTrusted, true );
72
73
  }),
@@ -104,7 +105,8 @@ BrowserDialogHandler = BrowserDialogHandler_1 = ( __decorate([
104
105
  ( __param(2, IKeybindingService)),
105
106
  ( __param(3, IInstantiationService)),
106
107
  ( __param(4, IClipboardService)),
107
- ( __param(5, IOpenerService))
108
+ ( __param(5, IOpenerService)),
109
+ ( __param(6, IMarkdownRendererService))
108
110
  ], BrowserDialogHandler));
109
111
 
110
112
  export { BrowserDialogHandler };
@@ -1,6 +1,6 @@
1
1
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
- import { IDialogArgs, IDialogResult } from "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs";
3
+ import { IDialogArgs, IDialogResult } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs";
4
4
  export interface IDialogViewItem {
5
5
  readonly args: IDialogArgs;
6
6
  close(result?: IDialogResult | Error): void;
@@ -1,4 +1,4 @@
1
- import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions, ConfirmResult } from "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs";
1
+ import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions, ConfirmResult } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs";
2
2
  import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
3
3
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
4
4
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
@@ -2,7 +2,7 @@
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
4
  import { isWorkspaceToOpen, isFileToOpen } from '@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window';
5
- import { ConfirmResult, getFileNamesMessage } from '@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs';
5
+ import { ConfirmResult, getFileNamesMessage } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs';
6
6
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
7
7
  import { WorkbenchState, isSavedWorkspace, isTemporaryWorkspace, WORKSPACE_EXTENSION } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
8
8
  import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
@@ -121,17 +121,17 @@ let AbstractFileDialogService = class AbstractFileDialogService {
121
121
  return ConfirmResult.DONT_SAVE;
122
122
  }
123
123
  let message;
124
- let detail = ( localize(13323, "Your changes will be lost if you don't save them."));
124
+ let detail = ( localize(13620, "Your changes will be lost if you don't save them."));
125
125
  if (fileNamesOrResources.length === 1) {
126
126
  message = ( localize(
127
- 13324,
127
+ 13621,
128
128
  "Do you want to save the changes you made to {0}?",
129
129
  typeof fileNamesOrResources[0] === 'string' ? fileNamesOrResources[0] : basename(fileNamesOrResources[0])
130
130
  ));
131
131
  }
132
132
  else {
133
133
  message = ( localize(
134
- 13325,
134
+ 13622,
135
135
  "Do you want to save the changes to the following {0} files?",
136
136
  fileNamesOrResources.length
137
137
  ));
@@ -144,12 +144,12 @@ let AbstractFileDialogService = class AbstractFileDialogService {
144
144
  buttons: [
145
145
  {
146
146
  label: fileNamesOrResources.length > 1 ?
147
- ( localize(13326, "&&Save All")) :
148
- ( localize(13327, "&&Save")),
147
+ ( localize(13623, "&&Save All")) :
148
+ ( localize(13624, "&&Save")),
149
149
  run: () => ConfirmResult.SAVE
150
150
  },
151
151
  {
152
- label: ( localize(13328, "Do&&n't Save")),
152
+ label: ( localize(13625, "Do&&n't Save")),
153
153
  run: () => ConfirmResult.DONT_SAVE
154
154
  }
155
155
  ],
@@ -163,7 +163,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
163
163
  return schema === Schemas.untitled ? [Schemas.file] : (schema !== Schemas.file ? [schema, Schemas.file] : [schema]);
164
164
  }
165
165
  async pickFileFolderAndOpenSimplified(schema, options, preferNewWindow) {
166
- const title = ( localize(13329, 'Open File or Folder'));
166
+ const title = ( localize(13626, 'Open File or Folder'));
167
167
  const availableFileSystems = this.addFileSchemaIfNeeded(schema);
168
168
  const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
169
169
  if (uri) {
@@ -181,7 +181,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
181
181
  }
182
182
  }
183
183
  async pickFileAndOpenSimplified(schema, options, preferNewWindow) {
184
- const title = ( localize(13330, 'Open File'));
184
+ const title = ( localize(13627, 'Open File'));
185
185
  const availableFileSystems = this.addFileSchemaIfNeeded(schema);
186
186
  const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
187
187
  if (uri) {
@@ -198,7 +198,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
198
198
  this.workspacesService.addRecentlyOpened([{ fileUri: uri, label: this.labelService.getUriLabel(uri, { appendWorkspaceSuffix: true }) }]);
199
199
  }
200
200
  async pickFolderAndOpenSimplified(schema, options) {
201
- const title = ( localize(13331, 'Open Folder'));
201
+ const title = ( localize(13628, 'Open Folder'));
202
202
  const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
203
203
  const uri = await this.pickResource({ canSelectFiles: false, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
204
204
  if (uri) {
@@ -206,8 +206,8 @@ let AbstractFileDialogService = class AbstractFileDialogService {
206
206
  }
207
207
  }
208
208
  async pickWorkspaceAndOpenSimplified(schema, options) {
209
- const title = ( localize(13332, 'Open Workspace from File'));
210
- const filters = [{ name: ( localize(13333, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
209
+ const title = ( localize(13629, 'Open Workspace from File'));
210
+ const filters = [{ name: ( localize(13630, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
211
211
  const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
212
212
  const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, filters, availableFileSystems });
213
213
  if (uri) {
@@ -218,7 +218,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
218
218
  if (!options.availableFileSystems) {
219
219
  options.availableFileSystems = this.addFileSchemaIfNeeded(schema);
220
220
  }
221
- options.title = ( localize(13334, 'Save As'));
221
+ options.title = ( localize(13631, 'Save As'));
222
222
  const uri = await this.saveRemoteResource(options);
223
223
  if (uri) {
224
224
  this.addFileToRecentlyOpened(uri);
@@ -254,7 +254,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
254
254
  return this.environmentService.remoteAuthority;
255
255
  }
256
256
  getFileSystemSchema(options) {
257
- return options.availableFileSystems && options.availableFileSystems[0] || this.getSchemeFilterForWindow(options.defaultUri?.scheme);
257
+ return options.availableFileSystems?.[0] || this.getSchemeFilterForWindow(options.defaultUri?.scheme);
258
258
  }
259
259
  getWorkspaceAvailableFileSystems(options) {
260
260
  if (options.availableFileSystems && (options.availableFileSystems.length > 0)) {
@@ -269,7 +269,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
269
269
  getPickFileToSaveDialogOptions(defaultUri, availableFileSystems) {
270
270
  const options = {
271
271
  defaultUri,
272
- title: ( localize(13335, "Save As")),
272
+ title: ( localize(13632, "Save As")),
273
273
  availableFileSystems
274
274
  };
275
275
  const ext = defaultUri ? extname(defaultUri) : undefined;
@@ -296,10 +296,10 @@ let AbstractFileDialogService = class AbstractFileDialogService {
296
296
  matchingFilter = { name: trim(ext, '.').toUpperCase(), extensions: [trim(ext, '.')] };
297
297
  }
298
298
  options.filters = coalesce([
299
- { name: ( localize(13336, "All Files")), extensions: ['*'] },
299
+ { name: ( localize(13633, "All Files")), extensions: ['*'] },
300
300
  matchingFilter,
301
301
  ...registeredLanguageFilters,
302
- { name: ( localize(13337, "No Extension")), extensions: [''] }
302
+ { name: ( localize(13634, "No Extension")), extensions: [''] }
303
303
  ]);
304
304
  return options;
305
305
  }
@@ -1,4 +1,4 @@
1
- import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs";
1
+ import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs";
2
2
  import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
3
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
4
  import { AbstractFileDialogService } from "./abstractFileDialogService.js";
@@ -28,7 +28,7 @@ class FileDialogService extends AbstractFileDialogService {
28
28
  if (this.shouldUseSimplified(schema)) {
29
29
  return super.pickFileFolderAndOpenSimplified(schema, options, false);
30
30
  }
31
- throw ( new Error(( localize(13338, "Can't open folders, try adding a folder to the workspace instead."))));
31
+ throw ( new Error(( localize(13635, "Can't open folders, try adding a folder to the workspace instead."))));
32
32
  }
33
33
  addFileSchemaIfNeeded(schema, isFolder) {
34
34
  return (schema === Schemas.untitled) ? [Schemas.file]
@@ -68,7 +68,7 @@ class FileDialogService extends AbstractFileDialogService {
68
68
  if (this.shouldUseSimplified(schema)) {
69
69
  return super.pickFolderAndOpenSimplified(schema, options);
70
70
  }
71
- throw ( new Error(( localize(13338, "Can't open folders, try adding a folder to the workspace instead."))));
71
+ throw ( new Error(( localize(13635, "Can't open folders, try adding a folder to the workspace instead."))));
72
72
  }
73
73
  async pickWorkspaceAndOpen(options) {
74
74
  options.availableFileSystems = this.getWorkspaceAvailableFileSystems(options);
@@ -80,7 +80,7 @@ class FileDialogService extends AbstractFileDialogService {
80
80
  return super.pickWorkspaceAndOpenSimplified(schema, options);
81
81
  }
82
82
  throw ( new Error(( localize(
83
- 13339,
83
+ 13636,
84
84
  "Can't open workspaces, try adding a folder to the workspace instead."
85
85
  ))));
86
86
  }
@@ -110,10 +110,10 @@ class FileDialogService extends AbstractFileDialogService {
110
110
  getFilePickerTypes(filters) {
111
111
  return filters?.filter(filter => {
112
112
  return !((filter.extensions.length === 1) && ((filter.extensions[0] === '*') || filter.extensions[0] === ''));
113
- }).map(filter => {
113
+ }).map((filter) => {
114
114
  const accept = {};
115
115
  const extensions = filter.extensions.filter(ext => (ext.indexOf('-') < 0) && (ext.indexOf('*') < 0) && (ext.indexOf('_') < 0));
116
- accept[getMediaOrTextMime(`fileName.${filter.extensions[0]}`) ?? 'text/plain'] = ( extensions.map(ext => ext.startsWith('.') ? ext : `.${ext}`));
116
+ accept[(getMediaOrTextMime(`fileName.${filter.extensions[0]}`) ?? 'text/plain')] = ( extensions.map(ext => ext.startsWith('.') ? ext : `.${ext}`));
117
117
  return {
118
118
  description: filter.name,
119
119
  accept
@@ -182,17 +182,17 @@ class FileDialogService extends AbstractFileDialogService {
182
182
  }
183
183
  const buttons = [
184
184
  {
185
- label: ( localize(13340, "&&Open Remote...")),
185
+ label: ( localize(13637, "&&Open Remote...")),
186
186
  run: async () => { await this.commandService.executeCommand('workbench.action.remote.showMenu'); }
187
187
  },
188
188
  {
189
- label: ( localize(13341, "&&Learn More")),
189
+ label: ( localize(13638, "&&Learn More")),
190
190
  run: async () => { await this.openerService.open('https://aka.ms/VSCodeWebLocalFileSystemAccess'); }
191
191
  }
192
192
  ];
193
193
  if (context === 'open') {
194
194
  buttons.push({
195
- label: ( localize(13342, "Open &&Files...")),
195
+ label: ( localize(13639, "Open &&Files...")),
196
196
  run: async () => {
197
197
  const files = await triggerUpload();
198
198
  if (files) {
@@ -212,9 +212,9 @@ class FileDialogService extends AbstractFileDialogService {
212
212
  }
213
213
  await this.dialogService.prompt({
214
214
  type: Severity.Warning,
215
- message: ( localize(13343, "Opening Local Folders is Unsupported")),
215
+ message: ( localize(13640, "Opening Local Folders is Unsupported")),
216
216
  detail: ( localize(
217
- 13344,
217
+ 13641,
218
218
  "Your browser doesn't support opening local folders.\nYou can either open single files or open a remote repository."
219
219
  )),
220
220
  buttons
@@ -1,7 +1,7 @@
1
1
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
2
2
  import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
3
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
- import { ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs";
4
+ import { ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs";
5
5
  import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
6
6
  import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
7
7
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
@@ -41,7 +41,7 @@ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform
41
41
  var OpenLocalFileCommand;
42
42
  (function (OpenLocalFileCommand) {
43
43
  OpenLocalFileCommand.ID = 'workbench.action.files.openLocalFile';
44
- OpenLocalFileCommand.LABEL = ( localize(13345, "Open Local File..."));
44
+ OpenLocalFileCommand.LABEL = ( localize(13642, "Open Local File..."));
45
45
  function handler() {
46
46
  return accessor => {
47
47
  const dialogService = accessor.get(IFileDialogService);
@@ -53,7 +53,7 @@ var OpenLocalFileCommand;
53
53
  var SaveLocalFileCommand;
54
54
  (function (SaveLocalFileCommand) {
55
55
  SaveLocalFileCommand.ID = 'workbench.action.files.saveLocalFile';
56
- SaveLocalFileCommand.LABEL = ( localize(13346, "Save Local File..."));
56
+ SaveLocalFileCommand.LABEL = ( localize(13643, "Save Local File..."));
57
57
  function handler() {
58
58
  return accessor => {
59
59
  const editorService = accessor.get(IEditorService);
@@ -69,7 +69,7 @@ var SaveLocalFileCommand;
69
69
  var OpenLocalFolderCommand;
70
70
  (function (OpenLocalFolderCommand) {
71
71
  OpenLocalFolderCommand.ID = 'workbench.action.files.openLocalFolder';
72
- OpenLocalFolderCommand.LABEL = ( localize(13347, "Open Local Folder..."));
72
+ OpenLocalFolderCommand.LABEL = ( localize(13644, "Open Local Folder..."));
73
73
  function handler() {
74
74
  return accessor => {
75
75
  const dialogService = accessor.get(IFileDialogService);
@@ -81,7 +81,7 @@ var OpenLocalFolderCommand;
81
81
  var OpenLocalFileFolderCommand;
82
82
  (function (OpenLocalFileFolderCommand) {
83
83
  OpenLocalFileFolderCommand.ID = 'workbench.action.files.openLocalFileFolder';
84
- OpenLocalFileFolderCommand.LABEL = ( localize(13348, "Open Local..."));
84
+ OpenLocalFileFolderCommand.LABEL = ( localize(13645, "Open Local..."));
85
85
  function handler() {
86
86
  return accessor => {
87
87
  const dialogService = accessor.get(IFileDialogService);
@@ -200,7 +200,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
200
200
  }
201
201
  if ((this.scheme !== Schemas.file) && !this.fileService.hasProvider(defaultUri)) {
202
202
  this.notificationService.info(( localize(
203
- 13349,
203
+ 13646,
204
204
  'File system provider for {0} is not available.',
205
205
  (defaultUri.toString())
206
206
  )));
@@ -270,11 +270,12 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
270
270
  this.filePickBox.matchOnLabel = false;
271
271
  this.filePickBox.sortByLabel = false;
272
272
  this.filePickBox.ignoreFocusOut = true;
273
+ this.filePickBox.placeholder = ( localize(13647, "Folder path"));
273
274
  this.filePickBox.ok = true;
274
275
  this.filePickBox.okLabel = typeof this.options.openLabel === 'string' ? this.options.openLabel : this.options.openLabel?.withoutMnemonic;
275
276
  if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
276
277
  this.filePickBox.customButton = true;
277
- this.filePickBox.customLabel = ( localize(13350, 'Show Local'));
278
+ this.filePickBox.customLabel = ( localize(13648, 'Show Local'));
278
279
  let action;
279
280
  if (isSave) {
280
281
  action = SaveLocalFileCommand;
@@ -426,7 +427,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
426
427
  setButtons() {
427
428
  this.filePickBox.buttons = [{
428
429
  iconClass: this._showDotFiles ? ThemeIcon.asClassName(Codicon.eye) : ThemeIcon.asClassName(Codicon.eyeClosed),
429
- tooltip: this._showDotFiles ? ( localize(13351, "Hide dot files")) : ( localize(13352, "Show dot files")),
430
+ tooltip: this._showDotFiles ? ( localize(13649, "Hide dot files")) : ( localize(13650, "Show dot files")),
430
431
  alwaysVisible: true
431
432
  }];
432
433
  }
@@ -581,12 +582,12 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
581
582
  }
582
583
  catch (e) {
583
584
  }
584
- if (stat && stat.isDirectory && (basename(valueUri) !== '.') && this.endsWithSlash(value)) {
585
+ if (stat?.isDirectory && (basename(valueUri) !== '.') && this.endsWithSlash(value)) {
585
586
  valueUri = this.tryAddTrailingSeparatorToDirectory(valueUri, stat);
586
587
  return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
587
588
  }
588
589
  else if (this.endsWithSlash(value)) {
589
- this.filePickBox.validationMessage = ( localize(13353, 'The path does not exist. Use ~ to go to your home directory.'));
590
+ this.filePickBox.validationMessage = ( localize(13651, 'The path does not exist. Use ~ to go to your home directory.'));
590
591
  this.badPath = value;
591
592
  return UpdateResult.InvalidPath;
592
593
  }
@@ -603,7 +604,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
603
604
  }
604
605
  catch (e) {
605
606
  }
606
- if (statWithoutTrailing && statWithoutTrailing.isDirectory) {
607
+ if (statWithoutTrailing?.isDirectory) {
607
608
  this.badPath = undefined;
608
609
  inputUriDirname = this.tryAddTrailingSeparatorToDirectory(inputUriDirname, statWithoutTrailing);
609
610
  return (await this.updateItems(inputUriDirname, false, basename(valueUri))) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
@@ -744,7 +745,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
744
745
  prompt.ignoreFocusOut = true;
745
746
  prompt.ok = true;
746
747
  prompt.customButton = true;
747
- prompt.customLabel = ( localize(13354, 'Cancel'));
748
+ prompt.customLabel = ( localize(13652, 'Cancel'));
748
749
  prompt.value = this.pathFromUri(uri);
749
750
  let isResolving = false;
750
751
  return ( new Promise(resolve => {
@@ -772,7 +773,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
772
773
  }
773
774
  async validate(uri) {
774
775
  if (uri === undefined) {
775
- this.filePickBox.validationMessage = ( localize(13355, 'Please enter a valid path.'));
776
+ this.filePickBox.validationMessage = ( localize(13653, 'Please enter a valid path.'));
776
777
  return Promise.resolve(false);
777
778
  }
778
779
  let stat;
@@ -784,37 +785,37 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
784
785
  catch (e) {
785
786
  }
786
787
  if (this.requiresTrailing) {
787
- if (stat && stat.isDirectory) {
788
- this.filePickBox.validationMessage = ( localize(13356, 'The folder already exists. Please use a new file name.'));
788
+ if (stat?.isDirectory) {
789
+ this.filePickBox.validationMessage = ( localize(13654, 'The folder already exists. Please use a new file name.'));
789
790
  return Promise.resolve(false);
790
791
  }
791
792
  else if (stat) {
792
793
  const message = ( localize(
793
- 13357,
794
+ 13655,
794
795
  '{0} already exists. Are you sure you want to overwrite it?',
795
796
  basename(uri)
796
797
  ));
797
798
  return this.yesNoPrompt(uri, message);
798
799
  }
799
800
  else if (!(isValidBasename(basename(uri), this.isWindows))) {
800
- this.filePickBox.validationMessage = ( localize(13358, 'Please enter a valid file name.'));
801
+ this.filePickBox.validationMessage = ( localize(13656, 'Please enter a valid file name.'));
801
802
  return Promise.resolve(false);
802
803
  }
803
804
  else if (!statDirname) {
804
805
  const message = ( localize(
805
- 13359,
806
+ 13657,
806
807
  'The folder {0} does not exist. Would you like to create it?',
807
808
  basename(dirname(uri))
808
809
  ));
809
810
  return this.yesNoPrompt(uri, message);
810
811
  }
811
812
  else if (!statDirname.isDirectory) {
812
- this.filePickBox.validationMessage = ( localize(13360, 'Please enter a path that exists.'));
813
+ this.filePickBox.validationMessage = ( localize(13658, 'Please enter a path that exists.'));
813
814
  return Promise.resolve(false);
814
815
  }
815
816
  else if (statDirname.readonly) {
816
817
  this.filePickBox.validationMessage = ( localize(
817
- 13361,
818
+ 13659,
818
819
  'This folder cannot be used as a save destination. Please choose another folder'
819
820
  ));
820
821
  return Promise.resolve(false);
@@ -822,19 +823,19 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
822
823
  }
823
824
  else {
824
825
  if (!stat) {
825
- this.filePickBox.validationMessage = ( localize(13360, 'Please enter a path that exists.'));
826
+ this.filePickBox.validationMessage = ( localize(13658, 'Please enter a path that exists.'));
826
827
  return Promise.resolve(false);
827
828
  }
828
829
  else if (uri.path === '/' && this.isWindows) {
829
- this.filePickBox.validationMessage = ( localize(13362, 'Please start the path with a drive letter.'));
830
+ this.filePickBox.validationMessage = ( localize(13660, 'Please start the path with a drive letter.'));
830
831
  return Promise.resolve(false);
831
832
  }
832
833
  else if (stat.isDirectory && !this.allowFolderSelection) {
833
- this.filePickBox.validationMessage = ( localize(13363, 'Please select a file.'));
834
+ this.filePickBox.validationMessage = ( localize(13661, 'Please select a file.'));
834
835
  return Promise.resolve(false);
835
836
  }
836
837
  else if (!stat.isDirectory && !this.allowFileSelection) {
837
- this.filePickBox.validationMessage = ( localize(13364, 'Please select a folder.'));
838
+ this.filePickBox.validationMessage = ( localize(13662, 'Please select a folder.'));
838
839
  return Promise.resolve(false);
839
840
  }
840
841
  }
@@ -1,5 +1,5 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { IConfirmation, IConfirmationResult, IInput, IInputResult, IPrompt, IPromptResult, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/platform/dialogs/common/dialogs";
2
+ import { IConfirmation, IConfirmationResult, IInput, IInputResult, IPrompt, IPromptResult, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/platform/dialogs/common/dialogs";
3
3
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
4
4
  import { DialogsModel } from "../../../common/dialogs.js";
5
5
  import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";