@codingame/monaco-vscode-dialogs-service-override 24.3.0 → 25.0.1

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": "24.3.0",
3
+ "version": "25.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - dialogs service-override",
6
6
  "keywords": [],
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "24.3.0"
18
+ "@codingame/monaco-vscode-api": "25.0.1"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -55,8 +55,8 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
55
55
  }
56
56
  async about(title, details, detailsToCopy) {
57
57
  const { button } = await this.doShow(Severity.Info, title, [
58
- ( localize(3025, "&&Copy")),
59
- ( localize(3026, "OK"))
58
+ ( localize(3047, "&&Copy")),
59
+ ( localize(3048, "OK"))
60
60
  ], details, 1);
61
61
  if (button === 0) {
62
62
  this.clipboardService.writeText(detailsToCopy);
@@ -121,17 +121,17 @@ let AbstractFileDialogService = class AbstractFileDialogService {
121
121
  return ConfirmResult.DONT_SAVE;
122
122
  }
123
123
  let message;
124
- let detail = ( localize(13784, "Your changes will be lost if you don't save them."));
124
+ let detail = ( localize(13839, "Your changes will be lost if you don't save them."));
125
125
  if (fileNamesOrResources.length === 1) {
126
126
  message = ( localize(
127
- 13785,
127
+ 13840,
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
- 13786,
134
+ 13841,
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(13787, "&&Save All")) :
148
- ( localize(13788, "&&Save")),
147
+ ( localize(13842, "&&Save All")) :
148
+ ( localize(13843, "&&Save")),
149
149
  run: () => ConfirmResult.SAVE
150
150
  },
151
151
  {
152
- label: ( localize(13789, "Do&&n't Save")),
152
+ label: ( localize(13844, "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(13790, 'Open File or Folder'));
166
+ const title = ( localize(13845, '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(13791, 'Open File'));
184
+ const title = ( localize(13846, '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(13792, 'Open Folder'));
201
+ const title = ( localize(13847, '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(13793, 'Open Workspace from File'));
210
- const filters = [{ name: ( localize(13794, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
209
+ const title = ( localize(13848, 'Open Workspace from File'));
210
+ const filters = [{ name: ( localize(13849, '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(13795, 'Save As'));
221
+ options.title = ( localize(13850, '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(13796, "Save As")),
272
+ title: ( localize(13851, "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(13797, "All Files")), extensions: ['*'] },
299
+ { name: ( localize(13852, "All Files")), extensions: ['*'] },
300
300
  matchingFilter,
301
301
  ...registeredLanguageFilters,
302
- { name: ( localize(13798, "No Extension")), extensions: [''] }
302
+ { name: ( localize(13853, "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(13799, "Can't open folders, try adding a folder to the workspace instead."))));
31
+ throw ( new Error(( localize(13854, "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(13799, "Can't open folders, try adding a folder to the workspace instead."))));
71
+ throw ( new Error(( localize(13854, "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
- 13800,
83
+ 13855,
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(13801, "&&Open Remote...")),
185
+ label: ( localize(13856, "&&Open Remote...")),
186
186
  run: async () => { await this.commandService.executeCommand('workbench.action.remote.showMenu'); }
187
187
  },
188
188
  {
189
- label: ( localize(13802, "&&Learn More")),
189
+ label: ( localize(13857, "&&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(13803, "Open &&Files...")),
195
+ label: ( localize(13858, "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(13804, "Opening Local Folders is Unsupported")),
215
+ message: ( localize(13859, "Opening Local Folders is Unsupported")),
216
216
  detail: ( localize(
217
- 13805,
217
+ 13860,
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
@@ -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(13806, "Open Local File..."));
44
+ OpenLocalFileCommand.LABEL = ( localize(13861, "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(13807, "Save Local File..."));
56
+ SaveLocalFileCommand.LABEL = ( localize(13862, "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(13808, "Open Local Folder..."));
72
+ OpenLocalFolderCommand.LABEL = ( localize(13863, "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(13809, "Open Local..."));
84
+ OpenLocalFileFolderCommand.LABEL = ( localize(13864, "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
- 13810,
203
+ 13865,
204
204
  'File system provider for {0} is not available.',
205
205
  (defaultUri.toString())
206
206
  )));
@@ -270,12 +270,13 @@ 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(13811, "Folder path"));
273
+ this.filePickBox.placeholder = ( localize(13866, "Folder path"));
274
274
  this.filePickBox.ok = true;
275
275
  this.filePickBox.okLabel = typeof this.options.openLabel === 'string' ? this.options.openLabel : this.options.openLabel?.withoutMnemonic;
276
276
  if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
277
277
  this.filePickBox.customButton = true;
278
- this.filePickBox.customLabel = ( localize(13812, 'Show Local'));
278
+ this.filePickBox.customLabel = ( localize(13867, 'Show Local'));
279
+ this.filePickBox.customButtonSecondary = true;
279
280
  let action;
280
281
  if (isSave) {
281
282
  action = SaveLocalFileCommand;
@@ -427,7 +428,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
427
428
  setButtons() {
428
429
  this.filePickBox.buttons = [{
429
430
  iconClass: this._showDotFiles ? ThemeIcon.asClassName(Codicon.eye) : ThemeIcon.asClassName(Codicon.eyeClosed),
430
- tooltip: this._showDotFiles ? ( localize(13813, "Hide dot files")) : ( localize(13814, "Show dot files")),
431
+ tooltip: this._showDotFiles ? ( localize(13868, "Hide dot files")) : ( localize(13869, "Show dot files")),
431
432
  alwaysVisible: true
432
433
  }];
433
434
  }
@@ -587,7 +588,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
587
588
  return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
588
589
  }
589
590
  else if (this.endsWithSlash(value)) {
590
- this.filePickBox.validationMessage = ( localize(13815, 'The path does not exist. Use ~ to go to your home directory.'));
591
+ this.filePickBox.validationMessage = ( localize(13870, 'The path does not exist. Use ~ to go to your home directory.'));
591
592
  this.badPath = value;
592
593
  return UpdateResult.InvalidPath;
593
594
  }
@@ -745,7 +746,8 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
745
746
  prompt.ignoreFocusOut = true;
746
747
  prompt.ok = true;
747
748
  prompt.customButton = true;
748
- prompt.customLabel = ( localize(13816, 'Cancel'));
749
+ prompt.customLabel = ( localize(13871, 'Cancel'));
750
+ prompt.customButtonSecondary = true;
749
751
  prompt.value = this.pathFromUri(uri);
750
752
  let isResolving = false;
751
753
  return ( new Promise(resolve => {
@@ -773,7 +775,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
773
775
  }
774
776
  async validate(uri) {
775
777
  if (uri === undefined) {
776
- this.filePickBox.validationMessage = ( localize(13817, 'Please enter a valid path.'));
778
+ this.filePickBox.validationMessage = ( localize(13872, 'Please enter a valid path.'));
777
779
  return Promise.resolve(false);
778
780
  }
779
781
  let stat;
@@ -786,36 +788,36 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
786
788
  }
787
789
  if (this.requiresTrailing) {
788
790
  if (stat?.isDirectory) {
789
- this.filePickBox.validationMessage = ( localize(13818, 'The folder already exists. Please use a new file name.'));
791
+ this.filePickBox.validationMessage = ( localize(13873, 'The folder already exists. Please use a new file name.'));
790
792
  return Promise.resolve(false);
791
793
  }
792
794
  else if (stat) {
793
795
  const message = ( localize(
794
- 13819,
796
+ 13874,
795
797
  '{0} already exists. Are you sure you want to overwrite it?',
796
798
  basename(uri)
797
799
  ));
798
800
  return this.yesNoPrompt(uri, message);
799
801
  }
800
802
  else if (!(isValidBasename(basename(uri), this.isWindows))) {
801
- this.filePickBox.validationMessage = ( localize(13820, 'Please enter a valid file name.'));
803
+ this.filePickBox.validationMessage = ( localize(13875, 'Please enter a valid file name.'));
802
804
  return Promise.resolve(false);
803
805
  }
804
806
  else if (!statDirname) {
805
807
  const message = ( localize(
806
- 13821,
808
+ 13876,
807
809
  'The folder {0} does not exist. Would you like to create it?',
808
810
  basename(dirname(uri))
809
811
  ));
810
812
  return this.yesNoPrompt(uri, message);
811
813
  }
812
814
  else if (!statDirname.isDirectory) {
813
- this.filePickBox.validationMessage = ( localize(13822, 'Please enter a path that exists.'));
815
+ this.filePickBox.validationMessage = ( localize(13877, 'Please enter a path that exists.'));
814
816
  return Promise.resolve(false);
815
817
  }
816
818
  else if (statDirname.readonly) {
817
819
  this.filePickBox.validationMessage = ( localize(
818
- 13823,
820
+ 13878,
819
821
  'This folder cannot be used as a save destination. Please choose another folder'
820
822
  ));
821
823
  return Promise.resolve(false);
@@ -823,19 +825,19 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
823
825
  }
824
826
  else {
825
827
  if (!stat) {
826
- this.filePickBox.validationMessage = ( localize(13822, 'Please enter a path that exists.'));
828
+ this.filePickBox.validationMessage = ( localize(13877, 'Please enter a path that exists.'));
827
829
  return Promise.resolve(false);
828
830
  }
829
831
  else if (uri.path === '/' && this.isWindows) {
830
- this.filePickBox.validationMessage = ( localize(13824, 'Please start the path with a drive letter.'));
832
+ this.filePickBox.validationMessage = ( localize(13879, 'Please start the path with a drive letter.'));
831
833
  return Promise.resolve(false);
832
834
  }
833
835
  else if (stat.isDirectory && !this.allowFolderSelection) {
834
- this.filePickBox.validationMessage = ( localize(13825, 'Please select a file.'));
836
+ this.filePickBox.validationMessage = ( localize(13880, 'Please select a file.'));
835
837
  return Promise.resolve(false);
836
838
  }
837
839
  else if (!stat.isDirectory && !this.allowFileSelection) {
838
- this.filePickBox.validationMessage = ( localize(13826, 'Please select a folder.'));
840
+ this.filePickBox.validationMessage = ( localize(13881, 'Please select a folder.'));
839
841
  return Promise.resolve(false);
840
842
  }
841
843
  }