@codingame/monaco-vscode-dialogs-service-override 14.0.2 → 14.0.4

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": "14.0.2",
3
+ "version": "14.0.4",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - dialogs service-override",
6
6
  "keywords": [],
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "14.0.2",
19
- "@codingame/monaco-vscode-44b92f80-48ea-5562-a8d0-18a015f8d845-common": "14.0.2",
20
- "@codingame/monaco-vscode-api": "14.0.2",
21
- "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common": "14.0.2"
18
+ "@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "14.0.4",
19
+ "@codingame/monaco-vscode-44b92f80-48ea-5562-a8d0-18a015f8d845-common": "14.0.4",
20
+ "@codingame/monaco-vscode-api": "14.0.4",
21
+ "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common": "14.0.4"
22
22
  },
23
23
  "main": "index.js",
24
24
  "module": "index.js",
@@ -90,7 +90,7 @@ configurationRegistry.registerConfiguration({
90
90
  type: 'boolean',
91
91
  default: false,
92
92
  tags: ['experimental'],
93
- description: ( localize(10930, "When enabled, a welcome widget is shown in the editor"))
93
+ description: ( localize(10931, "When enabled, a welcome widget is shown in the editor"))
94
94
  }
95
95
  }
96
96
  });
@@ -72,7 +72,7 @@ class WelcomeWidget extends Disposable {
72
72
  }
73
73
  async buildWidgetContent(title, message, buttonText, buttonAction) {
74
74
  const actionBar = this._register(( new ActionBar(this.element, {})));
75
- const action = this._register(( new Action('dialog.close', ( localize(10931, "Close Dialog")), ThemeIcon.asClassName(Codicon.dialogClose), true, async () => {
75
+ const action = this._register(( new Action('dialog.close', ( localize(10932, "Close Dialog")), ThemeIcon.asClassName(Codicon.dialogClose), true, async () => {
76
76
  this._hide();
77
77
  })));
78
78
  actionBar.push(action, { icon: true, label: false });
@@ -121,17 +121,17 @@ let AbstractFileDialogService = class AbstractFileDialogService {
121
121
  return ConfirmResult.DONT_SAVE;
122
122
  }
123
123
  let message;
124
- let detail = ( localize(11556, "Your changes will be lost if you don't save them."));
124
+ let detail = ( localize(11557, "Your changes will be lost if you don't save them."));
125
125
  if (fileNamesOrResources.length === 1) {
126
126
  message = ( localize(
127
- 11557,
127
+ 11558,
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
- 11558,
134
+ 11559,
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(11559, "&&Save All")) :
148
- ( localize(11560, "&&Save")),
147
+ ( localize(11560, "&&Save All")) :
148
+ ( localize(11561, "&&Save")),
149
149
  run: () => ConfirmResult.SAVE
150
150
  },
151
151
  {
152
- label: ( localize(11561, "Do&&n't Save")),
152
+ label: ( localize(11562, "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(11562, 'Open File or Folder'));
166
+ const title = ( localize(11563, '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(11563, 'Open File'));
184
+ const title = ( localize(11564, '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(11564, 'Open Folder'));
201
+ const title = ( localize(11565, '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(11565, 'Open Workspace from File'));
210
- const filters = [{ name: ( localize(11566, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
209
+ const title = ( localize(11566, 'Open Workspace from File'));
210
+ const filters = [{ name: ( localize(11567, '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(11567, 'Save As'));
221
+ options.title = ( localize(11568, 'Save As'));
222
222
  const uri = await this.saveRemoteResource(options);
223
223
  if (uri) {
224
224
  this.addFileToRecentlyOpened(uri);
@@ -269,7 +269,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
269
269
  getPickFileToSaveDialogOptions(defaultUri, availableFileSystems) {
270
270
  const options = {
271
271
  defaultUri,
272
- title: ( localize(11568, "Save As")),
272
+ title: ( localize(11569, "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(11569, "All Files")), extensions: ['*'] },
299
+ { name: ( localize(11570, "All Files")), extensions: ['*'] },
300
300
  matchingFilter,
301
301
  ...registeredLanguageFilters,
302
- { name: ( localize(11570, "No Extension")), extensions: [''] }
302
+ { name: ( localize(11571, "No Extension")), extensions: [''] }
303
303
  ]);
304
304
  return options;
305
305
  }
@@ -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(11571, "Can't open folders, try adding a folder to the workspace instead."))));
31
+ throw ( new Error(( localize(11572, "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(11571, "Can't open folders, try adding a folder to the workspace instead."))));
71
+ throw ( new Error(( localize(11572, "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
- 11572,
83
+ 11573,
84
84
  "Can't open workspaces, try adding a folder to the workspace instead."
85
85
  ))));
86
86
  }
@@ -182,17 +182,17 @@ class FileDialogService extends AbstractFileDialogService {
182
182
  }
183
183
  const buttons = [
184
184
  {
185
- label: ( localize(11573, "&&Open Remote...")),
185
+ label: ( localize(11574, "&&Open Remote...")),
186
186
  run: async () => { await this.commandService.executeCommand('workbench.action.remote.showMenu'); }
187
187
  },
188
188
  {
189
- label: ( localize(11574, "&&Learn More")),
189
+ label: ( localize(11575, "&&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(11575, "Open &&Files...")),
195
+ label: ( localize(11576, "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(11576, "Opening Local Folders is Unsupported")),
215
+ message: ( localize(11577, "Opening Local Folders is Unsupported")),
216
216
  detail: ( localize(
217
- 11577,
217
+ 11578,
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
@@ -37,7 +37,7 @@ import { getActiveDocument } from '@codingame/monaco-vscode-api/vscode/vs/base/b
37
37
  var OpenLocalFileCommand;
38
38
  (function (OpenLocalFileCommand) {
39
39
  OpenLocalFileCommand.ID = 'workbench.action.files.openLocalFile';
40
- OpenLocalFileCommand.LABEL = ( localize(11578, "Open Local File..."));
40
+ OpenLocalFileCommand.LABEL = ( localize(11579, "Open Local File..."));
41
41
  function handler() {
42
42
  return accessor => {
43
43
  const dialogService = accessor.get(IFileDialogService);
@@ -49,7 +49,7 @@ var OpenLocalFileCommand;
49
49
  var SaveLocalFileCommand;
50
50
  (function (SaveLocalFileCommand) {
51
51
  SaveLocalFileCommand.ID = 'workbench.action.files.saveLocalFile';
52
- SaveLocalFileCommand.LABEL = ( localize(11579, "Save Local File..."));
52
+ SaveLocalFileCommand.LABEL = ( localize(11580, "Save Local File..."));
53
53
  function handler() {
54
54
  return accessor => {
55
55
  const editorService = accessor.get(IEditorService);
@@ -65,7 +65,7 @@ var SaveLocalFileCommand;
65
65
  var OpenLocalFolderCommand;
66
66
  (function (OpenLocalFolderCommand) {
67
67
  OpenLocalFolderCommand.ID = 'workbench.action.files.openLocalFolder';
68
- OpenLocalFolderCommand.LABEL = ( localize(11580, "Open Local Folder..."));
68
+ OpenLocalFolderCommand.LABEL = ( localize(11581, "Open Local Folder..."));
69
69
  function handler() {
70
70
  return accessor => {
71
71
  const dialogService = accessor.get(IFileDialogService);
@@ -77,7 +77,7 @@ var OpenLocalFolderCommand;
77
77
  var OpenLocalFileFolderCommand;
78
78
  (function (OpenLocalFileFolderCommand) {
79
79
  OpenLocalFileFolderCommand.ID = 'workbench.action.files.openLocalFileFolder';
80
- OpenLocalFileFolderCommand.LABEL = ( localize(11581, "Open Local..."));
80
+ OpenLocalFileFolderCommand.LABEL = ( localize(11582, "Open Local..."));
81
81
  function handler() {
82
82
  return accessor => {
83
83
  const dialogService = accessor.get(IFileDialogService);
@@ -177,7 +177,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
177
177
  }
178
178
  if ((this.scheme !== Schemas.file) && !this.fileService.hasProvider(defaultUri)) {
179
179
  this.notificationService.info(( localize(
180
- 11582,
180
+ 11583,
181
181
  'File system provider for {0} is not available.',
182
182
  (defaultUri.toString())
183
183
  )));
@@ -248,10 +248,10 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
248
248
  this.filePickBox.sortByLabel = false;
249
249
  this.filePickBox.ignoreFocusOut = true;
250
250
  this.filePickBox.ok = true;
251
- this.filePickBox.okLabel = this.options.openLabel;
251
+ this.filePickBox.okLabel = typeof this.options.openLabel === 'string' ? this.options.openLabel : this.options.openLabel?.withoutMnemonic;
252
252
  if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
253
253
  this.filePickBox.customButton = true;
254
- this.filePickBox.customLabel = ( localize(11583, 'Show Local'));
254
+ this.filePickBox.customLabel = ( localize(11584, 'Show Local'));
255
255
  let action;
256
256
  if (isSave) {
257
257
  action = SaveLocalFileCommand;
@@ -552,7 +552,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
552
552
  return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
553
553
  }
554
554
  else if (this.endsWithSlash(value)) {
555
- this.filePickBox.validationMessage = ( localize(11584, 'The path does not exist. Use ~ to go to your home directory.'));
555
+ this.filePickBox.validationMessage = ( localize(11585, 'The path does not exist. Use ~ to go to your home directory.'));
556
556
  this.badPath = value;
557
557
  return UpdateResult.InvalidPath;
558
558
  }
@@ -710,7 +710,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
710
710
  prompt.ignoreFocusOut = true;
711
711
  prompt.ok = true;
712
712
  prompt.customButton = true;
713
- prompt.customLabel = ( localize(11585, 'Cancel'));
713
+ prompt.customLabel = ( localize(11586, 'Cancel'));
714
714
  prompt.value = this.pathFromUri(uri);
715
715
  let isResolving = false;
716
716
  return ( new Promise(resolve => {
@@ -738,7 +738,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
738
738
  }
739
739
  async validate(uri) {
740
740
  if (uri === undefined) {
741
- this.filePickBox.validationMessage = ( localize(11586, 'Please enter a valid path.'));
741
+ this.filePickBox.validationMessage = ( localize(11587, 'Please enter a valid path.'));
742
742
  return Promise.resolve(false);
743
743
  }
744
744
  let stat;
@@ -751,36 +751,36 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
751
751
  }
752
752
  if (this.requiresTrailing) {
753
753
  if (stat && stat.isDirectory) {
754
- this.filePickBox.validationMessage = ( localize(11587, 'The folder already exists. Please use a new file name.'));
754
+ this.filePickBox.validationMessage = ( localize(11588, 'The folder already exists. Please use a new file name.'));
755
755
  return Promise.resolve(false);
756
756
  }
757
757
  else if (stat) {
758
758
  const message = ( localize(
759
- 11588,
759
+ 11589,
760
760
  '{0} already exists. Are you sure you want to overwrite it?',
761
761
  basename(uri)
762
762
  ));
763
763
  return this.yesNoPrompt(uri, message);
764
764
  }
765
765
  else if (!(isValidBasename(basename(uri), this.isWindows))) {
766
- this.filePickBox.validationMessage = ( localize(11589, 'Please enter a valid file name.'));
766
+ this.filePickBox.validationMessage = ( localize(11590, 'Please enter a valid file name.'));
767
767
  return Promise.resolve(false);
768
768
  }
769
769
  else if (!statDirname) {
770
770
  const message = ( localize(
771
- 11590,
771
+ 11591,
772
772
  'The folder {0} does not exist. Would you like to create it?',
773
773
  basename(dirname(uri))
774
774
  ));
775
775
  return this.yesNoPrompt(uri, message);
776
776
  }
777
777
  else if (!statDirname.isDirectory) {
778
- this.filePickBox.validationMessage = ( localize(11591, 'Please enter a path that exists.'));
778
+ this.filePickBox.validationMessage = ( localize(11592, 'Please enter a path that exists.'));
779
779
  return Promise.resolve(false);
780
780
  }
781
781
  else if (statDirname.readonly) {
782
782
  this.filePickBox.validationMessage = ( localize(
783
- 11592,
783
+ 11593,
784
784
  'This folder cannot be used as a save destination. Please choose another folder'
785
785
  ));
786
786
  return Promise.resolve(false);
@@ -788,19 +788,19 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
788
788
  }
789
789
  else {
790
790
  if (!stat) {
791
- this.filePickBox.validationMessage = ( localize(11591, 'Please enter a path that exists.'));
791
+ this.filePickBox.validationMessage = ( localize(11592, 'Please enter a path that exists.'));
792
792
  return Promise.resolve(false);
793
793
  }
794
794
  else if (uri.path === '/' && this.isWindows) {
795
- this.filePickBox.validationMessage = ( localize(11593, 'Please start the path with a drive letter.'));
795
+ this.filePickBox.validationMessage = ( localize(11594, 'Please start the path with a drive letter.'));
796
796
  return Promise.resolve(false);
797
797
  }
798
798
  else if (stat.isDirectory && !this.allowFolderSelection) {
799
- this.filePickBox.validationMessage = ( localize(11594, 'Please select a file.'));
799
+ this.filePickBox.validationMessage = ( localize(11595, 'Please select a file.'));
800
800
  return Promise.resolve(false);
801
801
  }
802
802
  else if (!stat.isDirectory && !this.allowFileSelection) {
803
- this.filePickBox.validationMessage = ( localize(11595, 'Please select a folder.'));
803
+ this.filePickBox.validationMessage = ( localize(11596, 'Please select a folder.'));
804
804
  return Promise.resolve(false);
805
805
  }
806
806
  }